From d185322fdf0b6eb5fc1ca34c8a3873ae02d6ffed Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Mon, 18 Apr 2022 11:17:59 +0800 Subject: [PATCH] edit-admin-order_list --- admin/libraries/Ordersv2List.php | 12 ++++++++++-- admin/views/receiver/orderv2/lists.php | 12 ++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/admin/libraries/Ordersv2List.php b/admin/libraries/Ordersv2List.php index 2dfcbf4d..d9cf0ef9 100644 --- a/admin/libraries/Ordersv2List.php +++ b/admin/libraries/Ordersv2List.php @@ -210,6 +210,14 @@ class Ordersv2List if(strlen($params['status_pid'])){ $where["{$this->t1}.id>="] = Orders_v2_entity::V2_START_ID; } + + if(strlen($params['status_pid']) && !$params['status_pid']){ + $orderby = "{$this->t1}.order_time desc"; + }elseif ($params['status_pid']==3){ + $orderby = "{$this->t1}.bill_time desc"; + }else{ + $orderby = "{$this->t1}.c_time desc"; + } if(strlen($params['status_pid']) && $params['status']){ $where["{$this->t2}.pid_status"] = $params['status_pid']; $up_key = $params['status']+1; @@ -219,13 +227,13 @@ class Ordersv2List $having = "total >= 1"; } $count = $this->ci->mdOrders->selectOrders($where,'', '', '', 1,'',$having); - $rows = $this->ci->mdOrders->selectOrders($where, "c_time desc", $page, $size, '',$fileds,$having); + $rows = $this->ci->mdOrders->selectOrders($where, $orderby, $page, $size, '',$fileds,$having); }else{ if(strlen($params['status'])){ $where["id not in (select o_id from lc_receiver_order_status where pid_status={$params['status_pid']} and status=1)"] = null; } $count = $this->ci->mdOrders->count($where); - $rows = $this->ci->mdOrders->select($where, "c_time desc", $page, $size,$fileds); + $rows = $this->ci->mdOrders->select($where, $orderby, $page, $size,$fileds); } $lists = []; if ($count) { diff --git a/admin/views/receiver/orderv2/lists.php b/admin/views/receiver/orderv2/lists.php index e2d4ef39..052b8a88 100644 --- a/admin/views/receiver/orderv2/lists.php +++ b/admin/views/receiver/orderv2/lists.php @@ -2,12 +2,6 @@