From 54ce9f2fb768efb970e3e38c6505f55b95fbec90 Mon Sep 17 00:00:00 2001 From: nizongfeng Date: Thu, 25 Nov 2021 16:30:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/service/OrderMainService.php | 20 ++++++++++++++++ application/admin/view/order_main/index.html | 33 ++++++++++++++++++-------- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/application/admin/service/OrderMainService.php b/application/admin/service/OrderMainService.php index c470835..eefec4a 100644 --- a/application/admin/service/OrderMainService.php +++ b/application/admin/service/OrderMainService.php @@ -308,6 +308,26 @@ class OrderMainService if (!empty($param['endMoney']) && !empty($param['startMoney'])) { $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'])) { $where['create_time'] = [">=",$param['startTime']." 00:00:00"]; diff --git a/application/admin/view/order_main/index.html b/application/admin/view/order_main/index.html index 4adcb7a..51db32c 100755 --- a/application/admin/view/order_main/index.html +++ b/application/admin/view/order_main/index.html @@ -31,10 +31,12 @@ :value="item.id"> - - + - + @@ -260,6 +269,10 @@ "create_id":"", "startMoney":"", "endMoney":"", + "startCost":"", + "endCost":"", + "startProfit":"", + "endProfit":"", "startTime":"", "endTime":"", "pageNum":1,