From 026f10911a57e97526fff79bf857400e93734b9a Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Mon, 18 Apr 2022 17:37:54 +0800 Subject: [PATCH] edit-admin-order_list --- admin/controllers/receiver/orderv2/Orders.php | 7 +++++- admin/libraries/Ordersv2List.php | 22 ++++++++++++------- admin/views/receiver/orderv2/lists.php | 18 +++------------ 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/admin/controllers/receiver/orderv2/Orders.php b/admin/controllers/receiver/orderv2/Orders.php index 910ba3ad..d964be9b 100644 --- a/admin/controllers/receiver/orderv2/Orders.php +++ b/admin/controllers/receiver/orderv2/Orders.php @@ -65,7 +65,9 @@ class Orders extends HD_Controller if($key2){ $where_s = []; $key==1 && $where_s["{$t1}.payway"] = 0;//分期 - $key==3 && $where_s["{$t1}.id in (select o_id from lc_receiver_order_status where pid_status=0 and status=2)"] = null; + if($key==4){ //交付需要开票后才显示 + $where_s["{$t1}.id in (select o_id from lc_receiver_order_status where pid_status=3 and status=1)"] = null; + } if($key2){ $where_s["{$t2}.pid_status"] = $value['pid_status']; $up_key = $key2+1; @@ -83,6 +85,9 @@ class Orders extends HD_Controller ]; $key==1 && $where_s['payway'] = 0; $key==3 && $where_s['id in (select o_id from lc_receiver_order_status where pid_status=0 and status=2)'] = null; + if($key==4){ //交付需要开票后才显示 + $where_s["{$t1}.id in (select o_id from lc_receiver_order_status where pid_status=3 and status=1)"] = null; + } $where_s = array_merge($where,$where_s); $count2 = $this->receiver_orders_v2_model->count($where_s); } diff --git a/admin/libraries/Ordersv2List.php b/admin/libraries/Ordersv2List.php index d9cf0ef9..958cd297 100644 --- a/admin/libraries/Ordersv2List.php +++ b/admin/libraries/Ordersv2List.php @@ -70,10 +70,6 @@ class Ordersv2List $_title = '全部订单'; $view = 'receiver/orderv2/lists'; $params['status_pid']==1 && $where["{$this->t1}.payway"] = 0; -// if(strlen($params['status_pid']) && $params['status']){ -// $where["{$this->t2}.pid_status"] = $params['status_pid']; -// $where["{$this->t2}.status"] = $params['status']; -// } if(is_product()){ $where["{$this->t1}.biz_id<>"] = 1; } @@ -204,16 +200,19 @@ class Ordersv2List {$this->t1}.cor_id,{$this->t1}.incor_id,{$this->t1}.money_json,{$this->t1}.payway,{$this->t1}.status,{$this->t1}.c_time, {$this->t1}.biz_id,{$this->t1}.bill_time,{$this->t1}.customer_id,{$this->t1}.owner_name,{$this->t1}.owner_mobile,{$this->t1}.main_type,{$this->t1}.info_json, {$this->t1}.order_time,{$this->t1}.bill_time,{$this->t1}.item_id"; - if($params['status_pid']==3){ - $where["{$this->t1}.id in (select o_id from lc_receiver_order_status where pid_status=0 and status=2)"] = null; + if($params['status_pid']==3 && strlen($params['status'])){ //开票 + + } + if($params['status_pid']==4){ //交付需要开票后才显示 + $where["{$this->t1}.id in (select o_id from lc_receiver_order_status where pid_status=3 and status=1)"] = null; } if(strlen($params['status_pid'])){ $where["{$this->t1}.id>="] = Orders_v2_entity::V2_START_ID; } - if(strlen($params['status_pid']) && !$params['status_pid']){ + if(strlen($params['status_pid']) && !$params['status_pid']){ //付款列表 下定时间排序 $orderby = "{$this->t1}.order_time desc"; - }elseif ($params['status_pid']==3){ + }elseif ($params['status_pid']==3){ // 开票列表 开票时间排序 $orderby = "{$this->t1}.bill_time desc"; }else{ $orderby = "{$this->t1}.c_time desc"; @@ -232,6 +231,13 @@ class Ordersv2List 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; } + if($params['status_pid']==3){ //开票 + if(strlen($params['status'])){ //待开票 + $where['id in (select o_id from lc_receiver_order_status where pid_status=0 and status=2)'] = null; + }else{ //全部 + $where['id in (select o_id from lc_receiver_order_status where (pid_status=0 and status=2) or (pid_status=3 and status=1))'] = null; + } + } $count = $this->ci->mdOrders->count($where); $rows = $this->ci->mdOrders->select($where, $orderby, $page, $size,$fileds); } diff --git a/admin/views/receiver/orderv2/lists.php b/admin/views/receiver/orderv2/lists.php index 052b8a88..d948ef5b 100644 --- a/admin/views/receiver/orderv2/lists.php +++ b/admin/views/receiver/orderv2/lists.php @@ -73,11 +73,11 @@