From 50c44599c231e4e40397b1fe1b7aae7a4a3b82b8 Mon Sep 17 00:00:00 2001 From: qianhy Date: Sun, 23 Apr 2023 16:30:26 +0800 Subject: [PATCH] orders add if_usedcar about --- admin/controllers/receiver/orderv2/Orders.php | 1 + admin/libraries/Ordersv2List.php | 11 ++++++++++- admin/views/receiver/orderv2/get/oinfo.php | 2 +- admin/views/receiver/orderv2/lists.php | 13 +++++++++++-- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/admin/controllers/receiver/orderv2/Orders.php b/admin/controllers/receiver/orderv2/Orders.php index 60b7b4b8..d708a77f 100644 --- a/admin/controllers/receiver/orderv2/Orders.php +++ b/admin/controllers/receiver/orderv2/Orders.php @@ -382,6 +382,7 @@ class Orders extends HD_Controller $row_goods = $this->mdItems->get(array('id' => $row['item_id'])); $row['vin'] = $row_goods['vin']; } + $row['if_usedcar_name'] = $row['if_usedcar'] ? ' (二手车)':''; $row['delry_time'] = $row['delry_time'] != '0000-00-00 00:00:00' ? str_replace(" 00:00:00", "", $row['delry_time']) : ''; //获取车辆服务费 diff --git a/admin/libraries/Ordersv2List.php b/admin/libraries/Ordersv2List.php index cdd86a2b..fbbfe9c5 100644 --- a/admin/libraries/Ordersv2List.php +++ b/admin/libraries/Ordersv2List.php @@ -46,12 +46,14 @@ class Ordersv2List !$params['biz_type'] && $params['biz_type'] = ''; !strlen($params['over_id']) && $params['over_id'] = ''; !strlen($params['is_bill']) && $params['is_bill'] = ''; + !strlen($params['if_usedcar']) && $params['if_usedcar'] = ''; $fieldAry = $this->get_fields($status_pid,0,$params['status']); #$show_info['offlineSourcesAry'] = $this->ci->mdCustomers->offlineSources();//客户来源 $show_info['offlineSourcesAry'] = $this->ci->mdCustomers->offlineSources_search(); $show_info['paywayAry'] = $this->paywayAry;//付款方式 $show_info['overAry'] = $this->overAry; $show_info['bizTypeAry'] = $this->ci->biz_model->type_ary();//门店类型 + $show_info['usedcarAry'] = array(1=>'是', 0=>'否'); //渠道经理 $show_info['qdjl_lists'] = $this->ci->mdLichebUsers->select(array('group_id' => 4, 'status' => 1, 'biz_id<>' => '0') , 'id desc', 0, 0, 'id,uname as name'); @@ -271,7 +273,10 @@ class Ordersv2List $where = ["{$this->t1}.status>=" => 0]; $where["{$this->t1}.item_id in(select id from lc_items where vin like '%{$params['vin']}%')"] = null; } - $fileds = "{$this->t1}.id,{$this->t1}.name,{$this->t1}.mobile,{$this->t1}.brand_id,{$this->t1}.s_id,{$this->t1}.v_id, + if (strlen($params['if_usedcar'])) { + $where = ["{$this->t1}.if_usedcar>=" => $params['if_usedcar']]; + } + $fileds = "{$this->t1}.id,{$this->t1}.name,{$this->t1}.mobile,{$this->t1}.brand_id,{$this->t1}.s_id,{$this->t1}.v_id,{$this->t1}.if_usedcar, {$this->t1}.cor_id,{$this->t1}.incor_id,{$this->t1}.money_json,{$this->t1}.payway,{$this->t1}.status,{$this->t1}.c_time,{$this->t1}.fines, {$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,{$this->t1}.over_time,{$this->t1}.sale_id,{$this->t1}.finance_id,{$this->t1}.refund_time, @@ -449,6 +454,9 @@ class Ordersv2List $fields['over_time'] = $val['over_time'] != '0000-00-00 00:00:00' ? date('Y-m-d',strtotime($val['over_time'])) : ''; $fields['refund_time'] = $val['refund_time'] != '0000-00-00 00:00:00' ? date('Y-m-d',strtotime($val['refund_time'])) : ''; $fields['vin'] = $items[$val['item_id']] ? $items[$val['item_id']] : ''; + $fields['if_usedcar_name'] = $val['if_usedcar'] ? '是':''; + $if_usedcar_name = $val['if_usedcar'] ? ' (二手车)':''; + $if_usedcar_name && $fields['vin'] && $size<1000 && $fields['vin'] = "{$fields['vin']}{$if_usedcar_name}"; $fields['vin'] && $fields['car_name'] = $fields['car_name']."
".$fields['vin']; $fields['ck_time'] = $val['ck_time']; @@ -666,6 +674,7 @@ class Ordersv2List $fields1['v_name'] = ['title' => '车型']; $fields1['cor_name'] = ['title' => '车身颜色']; $fields1['vin'] = ['title' => 'vin码']; + $fields1['if_usedcar_name'] = ['title' => '二手车']; $fields1['city_name'] = ['title'=>'城市']; $fields1['biz_type'] = ['title'=>'门店类型']; $fields1['biz_name'] = ['title' => '门店']; diff --git a/admin/views/receiver/orderv2/get/oinfo.php b/admin/views/receiver/orderv2/get/oinfo.php index 843ad69c..c48b7441 100644 --- a/admin/views/receiver/orderv2/get/oinfo.php +++ b/admin/views/receiver/orderv2/get/oinfo.php @@ -98,7 +98,7 @@