From f92ce443c5052825aee2a419012ae11a8e2e77b1 Mon Sep 17 00:00:00 2001 From: dengbw Date: Sun, 26 Sep 2021 11:30:58 +0800 Subject: [PATCH] admin_orders_926 --- admin/controllers/receiver/Orders.php | 30 +++ admin/libraries/OrdersList.php | 18 +- admin/views/receiver/orders/get.php | 248 ++++++++++++------ .../receiver/order/Receiver_orders_model.php | 2 +- 4 files changed, 213 insertions(+), 85 deletions(-) diff --git a/admin/controllers/receiver/Orders.php b/admin/controllers/receiver/Orders.php index 8fd6d4a3..27b72ad8 100644 --- a/admin/controllers/receiver/Orders.php +++ b/admin/controllers/receiver/Orders.php @@ -110,6 +110,11 @@ class Orders extends HD_Controller $row['item_id'] = intval($row['item_id']); $row['cardid'] = $row['info_json']['cardid'] ? $row['info_json']['cardid'] : $row['info_json']['c_cardid']; $row['address'] = $row['info_json']['c_address'] ? $row['info_json']['c_address'] : ''; + $row['trustee_name'] = $row['info_json']['trustee_name'] ? $row['info_json']['trustee_name'] : ''; + $row['trustee_idcard'] = $row['info_json']['trustee_idcard'] ? $row['info_json']['trustee_idcard'] : ''; + $row['credit'] = $row['info_json']['c_credit'] ? $row['info_json']['c_credit'] : ''; + $row['business_licence'] = $row['info_json']['business_licence'] ? array('value' => $row['info_json']['business_licence'] + , 'src' => build_qiniu_image_url($row['info_json']['business_licence'])) : array('value' => '', 'src' => ''); //获取车信息 $brand = $this->auto_brand_model->get(['id' => $row['brand_id']], 'name'); $serie = $this->auto_series_model->get(['id' => $row['s_id']], 'name'); @@ -266,6 +271,31 @@ class Orders extends HD_Controller } } + /** + * Notes:更新营业执照 + * Created on: 2021/9/26 10:02 + * Created by: dengbw + * @return bool + */ + function edit_business_licence() + { + $id = $this->input->post('id'); + $business_licence = $this->input->post('business_licence'); + if (!$business_licence) { + return $this->show_json(SYS_CODE_FAIL, '请上传营业执照'); + } + $row = $this->orders_model->get(['id' => $id]); + $info_json = json_decode($row['info_json'], true); + $info_json['business_licence'] = $business_licence; + $upd = array('info_json' => json_encode($info_json,JSON_UNESCAPED_UNICODE)); + $result = $this->orders_model->update($upd, ['id' => $id]); + if ($result) { + return $this->show_json(SYS_CODE_SUCCESS, '保存成功'); + } else { + return $this->show_json(SYS_CODE_FAIL, '保存失败'); + } + } + //删除单条数据 public function del() { diff --git a/admin/libraries/OrdersList.php b/admin/libraries/OrdersList.php index 607f7d92..47636dee 100644 --- a/admin/libraries/OrdersList.php +++ b/admin/libraries/OrdersList.php @@ -60,7 +60,7 @@ class OrdersList $page = $params['page'] = $params['page'] ? intval($params['page']) : 1; $size = $params['size'] = $params['size'] ? intval($params['size']) : 20; $status_arr = $this->ci->mdOrders->statusAry(); - $where = ["id>" => 0]; + $where = ["status>=" => 0]; if ($params['title']) { $where["{$params['search_tp']} like '%{$params['title']}%'"] = null; } @@ -188,7 +188,7 @@ class OrdersList $t1 = 'lc_receiver_order_signs'; $t2 = 'lc_receiver_orders'; $where = [ - "$t2.id>" => 0, + "$t2.status>=" => 0, ]; $statusAry = $this->ci->mdOrders->statusAry($status_pid); if ($params['list_type'] == 'all') { @@ -348,7 +348,7 @@ class OrdersList } /** - * Notes: + * Notes:分期办理列表 * Created on: 2021/9/17 15:37 * Created by: dengbw * @param $status_pid @@ -362,7 +362,7 @@ class OrdersList $t1 = 'lc_receiver_order_loans'; $t2 = 'lc_receiver_orders'; $where = [ - "$t2.id>" => 0, + "$t2.status>=" => 0, ]; $statusAry = $this->ci->mdOrders->statusAry($status_pid); if ($params['list_type'] == 'all') { @@ -470,7 +470,7 @@ class OrdersList } /** - * Notes:车辆确认列表 + * Notes:车辆分配列表 * Created on: 2021/9/17 15:57 * Created by: dengbw * @param $status_pid @@ -484,7 +484,7 @@ class OrdersList $t1 = 'lc_receiver_order_ckcars'; $t2 = 'lc_receiver_orders'; $where = [ - "$t2.id>" => 0, + "$t2.status>=" => 0, ]; $statusAry = $this->ci->mdOrders->statusAry($status_pid); if ($params['list_type'] == 'all') { @@ -626,7 +626,7 @@ class OrdersList $t1 = 'lc_receiver_order_bills'; $t2 = 'lc_receiver_orders'; $where = [ - "$t2.id>" => 0, + "$t2.status>=" => 0, ]; $statusAry = $this->ci->mdOrders->statusAry($status_pid); if ($params['list_type'] == 'all') { @@ -767,7 +767,7 @@ class OrdersList $t1 = 'lc_receiver_order_agents'; $t2 = 'lc_receiver_orders'; $where = [ - "$t2.id>" => 0, + "$t2.status>=" => 0, ]; $statusAry = $this->ci->mdOrders->statusAry($status_pid); if ($params['list_type'] == 'all') { @@ -908,7 +908,7 @@ class OrdersList $t1 = 'lc_receiver_order_deliverys'; $t2 = 'lc_receiver_orders'; $where = [ - "$t2.id>" => 0, + "$t2.status>=" => 0, ]; $statusAry = $this->ci->mdOrders->statusAry($status_pid); if ($params['list_type'] == 'all') { diff --git a/admin/views/receiver/orders/get.php b/admin/views/receiver/orders/get.php index dcae3ceb..6f00c993 100644 --- a/admin/views/receiver/orders/get.php +++ b/admin/views/receiver/orders/get.php @@ -39,57 +39,130 @@
-
-
- -
- +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
-
- -
- +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ + +
+ 营业执照 + +
+
-
-
- -
- +
+
+
+ +
+ +
+
+
+ +
+ +
-
- -
- +
+
+ +
+ +
+
+
+ +
+ +
-
-
-
- -
- - - -
- 身份证正面 - 身份证反面 +
+
+ +
+ + + +
+ 身份证正面 + 身份证反面 +
@@ -111,25 +184,29 @@
- + 整车销售合同
{{info.contract_data[0]['status_name']}}
- + 委托服务协议
{{info.contract_data[1]['status_name']}}
- + 车辆确定
{{info.contract_data[2]['status_name']}}
- + 车辆交接
{{info.contract_data[3]['status_name']}} @@ -155,20 +232,24 @@ @@ -200,7 +281,7 @@ carslist: [], page: [], bx_imgs: [], - car_imgs:[], + car_imgs: [], brand_list: [], series_list: [], v_list: [], @@ -211,9 +292,9 @@ v_id: '', cor_id: '', incor_id: '', - vin:'' + vin: '' }, - mounted:function() { + mounted: function () { var that = this; that.info = ; that.brand_id = , @@ -222,7 +303,7 @@ that.cor_id = , that.incor_id = , that.bx_imgs = ; - that.car_imgs = ; + that.car_imgs = ; }, computed: {}, created: function () { @@ -250,7 +331,7 @@ }, carModal: function () { var that = this - if(that.info.loan_info && !that.info.loan_info.status){ + if (that.info.loan_info && !that.info.loan_info.status) { layer.msg('按揭审核尚未通过~', {icon: 2}); return; } @@ -295,7 +376,7 @@ v_id: vm.v_id, cor_id: vm.cor_id, incor_id: vm.incor_id, - vin:vm.vin + vin: vm.vin }, success: function (re) { var carslist = re.data.list; @@ -434,12 +515,12 @@ }); }, //保存 - save_cardID:function(){ + save_cardID: function () { var that = this; var data_post = { - o_id:that.info.id, - cardidA:that.info.bill.cardidA.value, - cardidB:that.info.bill.cardidB.value + o_id: that.info.id, + cardidA: that.info.bill.cardidA.value, + cardidB: that.info.bill.cardidB.value }; $.post("/receiver/orders/edit_cardID", data_post, function (data) { if (data.code) { @@ -450,6 +531,23 @@ layer.msg(data.msg, {icon: 2}); } }, 'json'); + }, + //保存 + save_business_licence: function () { + var that = this; + var data_post = { + id: that.info.id, + business_licence: that.info.business_licence.value + }; + $.post("/receiver/orders/edit_business_licence", data_post, function (data) { + if (data.code) { + layer.msg(data.msg, {time: 2000, icon: 1}, function () { + $.form.reload(); + }); + } else { + layer.msg(data.msg, {icon: 2}); + } + }, 'json'); } } }); @@ -474,15 +572,15 @@ if (h < (window.innerHeight)) { h = h * 1.05; w = w * 1.05; - width = width*1.05; - height = height*1.05; + width = width * 1.05; + height = height * 1.05; } } else if (delta < 0) { if (h > 100) { h = h * 0.95; w = w * 0.95; - width = width*0.95; - height = height*0.95; + width = width * 0.95; + height = height * 0.95; } } imagep.css("top", (window.innerHeight - h) / 2); @@ -492,24 +590,24 @@ imagep.height(h); imagep.width(w); var current = $("#current").val(); - if((current/90)%2==1){ - $('#imglayer').css("width",h); - $('#imglayer').css("margin-top",-(w-h)/2); - if(height