@@ -308,6 +308,26 @@ class OrderMainService | |||||
if (!empty($param['endMoney']) && !empty($param['startMoney'])) { | if (!empty($param['endMoney']) && !empty($param['startMoney'])) { | ||||
$where['total_amount'] = ["between",[$param['startMoney'],$param['endMoney']]]; | $where['total_amount'] = ["between",[$param['startMoney'],$param['endMoney']]]; | ||||
} | } | ||||
//成本区间查询 | |||||
if (!empty($param['startCost'])&& empty($param['endCost'])) { | |||||
$where['cost_amount'] = [">=",$param['startCost']]; | |||||
} | |||||
if (!empty($param['endCost']) && empty($param['startCost'])) { | |||||
$where['cost_amount'] = ["<=",$param['endCost']]; | |||||
} | |||||
if (!empty($param['endCost']) && !empty($param['startCost'])) { | |||||
$where['cost_amount'] = ["between",[$param['startCost'],$param['endCost']]]; | |||||
} | |||||
//利润区间查询 | |||||
if (!empty($param['startProfit'])&& empty($param['endProfit'])) { | |||||
$where['profit_amount'] = [">=",$param['startProfit']]; | |||||
} | |||||
if (!empty($param['endProfit']) && empty($param['startProfit'])) { | |||||
$where['profit_amount'] = ["<=",$param['endProfit']]; | |||||
} | |||||
if (!empty($param['endProfit']) && !empty($param['startProfit'])) { | |||||
$where['profit_amount'] = ["between",[$param['startProfit'],$param['endProfit']]]; | |||||
} | |||||
//时间区间查询 | //时间区间查询 | ||||
if (!empty($param['startTime']) && empty($param['endTime'])) { | if (!empty($param['startTime']) && empty($param['endTime'])) { | ||||
$where['create_time'] = [">=",$param['startTime']." 00:00:00"]; | $where['create_time'] = [">=",$param['startTime']." 00:00:00"]; | ||||
@@ -31,10 +31,12 @@ | |||||
:value="item.id"> | :value="item.id"> | ||||
</el-option> | </el-option> | ||||
</el-select> | </el-select> | ||||
</div> | |||||
<div class="header-search" style="width: 100%;margin-bottom: 10px"> | |||||
<span>用户名</span> | <span>用户名</span> | ||||
<el-input v-model="search.user_name" style="width: 150px;" placeholder="请输入内容" clearable></el-input> | <el-input v-model="search.user_name" style="width: 150px;" placeholder="请输入内容" clearable></el-input> | ||||
<span>手机号</span> | |||||
<el-input v-model="search.user_phone" style="width: 150px;" placeholder="请输入内容" clearable></el-input> | |||||
</div> | |||||
<div class="header-search" style="width: 100%;margin-bottom: 10px"> | |||||
<span>渠道订单号:</span> | <span>渠道订单号:</span> | ||||
<el-input v-model="search.channel_order_no" style="width: 150px;" placeholder="请输入内容" clearable></el-input> | <el-input v-model="search.channel_order_no" style="width: 150px;" placeholder="请输入内容" clearable></el-input> | ||||
<span>渠道:</span> | <span>渠道:</span> | ||||
@@ -64,14 +66,6 @@ | |||||
:value="item.id"> | :value="item.id"> | ||||
</el-option> | </el-option> | ||||
</el-select> | </el-select> | ||||
</div> | |||||
<div class="header-search" style="width: 100%;margin-bottom: 10px"> | |||||
<span>手机号</span> | |||||
<el-input v-model="search.user_phone" style="width: 150px;" placeholder="请输入内容" clearable></el-input> | |||||
<span>金额</span> | |||||
<el-input-number v-model="search.startMoney" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | |||||
~ | |||||
<el-input-number v-model="search.endMoney" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | |||||
<span>时间</span> | <span>时间</span> | ||||
<el-date-picker | <el-date-picker | ||||
style="width: 150px;" | style="width: 150px;" | ||||
@@ -88,6 +82,21 @@ | |||||
type="date" | type="date" | ||||
placeholder="选择日期"> | placeholder="选择日期"> | ||||
</el-date-picker> | </el-date-picker> | ||||
</div> | |||||
<div class="header-search" style="width: 100%;margin-bottom: 10px"> | |||||
<span>金额</span> | |||||
<el-input-number v-model="search.startMoney" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | |||||
~ | |||||
<el-input-number v-model="search.endMoney" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | |||||
<span>成本</span> | |||||
<el-input-number v-model="search.startCost" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | |||||
~ | |||||
<el-input-number v-model="search.endCost" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | |||||
<span>利润</span> | |||||
<el-input-number v-model="search.startProfit" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | |||||
~ | |||||
<el-input-number v-model="search.endProfit" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number> | |||||
<el-button type="primary" icon="el-icon-search" @click="getData(1)">搜索</el-button> | <el-button type="primary" icon="el-icon-search" @click="getData(1)">搜索</el-button> | ||||
<el-button type="primary" icon="el-icon-plus" @click="addShow=true" >新增</el-button> | <el-button type="primary" icon="el-icon-plus" @click="addShow=true" >新增</el-button> | ||||
</div> | </div> | ||||
@@ -260,6 +269,10 @@ | |||||
"create_id":"", | "create_id":"", | ||||
"startMoney":"", | "startMoney":"", | ||||
"endMoney":"", | "endMoney":"", | ||||
"startCost":"", | |||||
"endCost":"", | |||||
"startProfit":"", | |||||
"endProfit":"", | |||||
"startTime":"", | "startTime":"", | ||||
"endTime":"", | "endTime":"", | ||||
"pageNum":1, | "pageNum":1, | ||||