diff --git a/api/controllers/wxapp/liche/Contract.php b/api/controllers/wxapp/liche/Contract.php index 236cbf11..7f700d1d 100644 --- a/api/controllers/wxapp/liche/Contract.php +++ b/api/controllers/wxapp/liche/Contract.php @@ -36,7 +36,7 @@ class Contract extends Wxapp{ $type = $this->input_param('type'); !strlen($type) && $type = 0; - $row = $this->orders_model->get(['id'=>$id,'mobile'=>$this->session['mobile']]); + $row = $this->orders_model->get(['id'=>$id]); $type_arr = $this->contracts_model->get_types(); if(!$row || !$type_arr[$type]){ throw new Exception('参数错误', API_CODE_INVILD_PARAM); @@ -148,7 +148,7 @@ class Contract extends Wxapp{ switch($type){ case 0: //整车 $sign_img = array_pop($imgs); - $height = $order['ifentrust'] ? 610 : 520; + $height = $order['ifentrust'] ? 640 : 520; $jsondata['c_cardid'] && $height += 30; $res = $sign_entity->merge($sign_img,$img,1070,$height,230); if(!$res){ @@ -175,7 +175,7 @@ class Contract extends Wxapp{ case 1: //协议 $sign_img = array_pop($imgs); $srv_count = $order['srv_ids'] ? count(explode(',',$order['srv_ids'])) : 0; - $height = $order['ifentrust'] ? 1400 : 1280; + $height = $order['ifentrust'] ? 1420 : 1280; $jsondata['c_cardid'] && $height += 30; $height += $srv_count*52; $res = $sign_entity->merge($sign_img,$img,1050,$height,300); @@ -200,7 +200,7 @@ class Contract extends Wxapp{ break; case 2: //确认信息 $sign_img = array_pop($imgs); - $height = $order['ifentrust'] ? 600 : 480; + $height = $order['ifentrust'] ? 630 : 480; $jsondata['c_cardid'] && $height += 30; $res = $sign_entity->merge($sign_img,$img,1050,$height,300); if(!$res){ @@ -226,7 +226,7 @@ class Contract extends Wxapp{ break; case 3: //车辆交接 $sign_img = array_pop($imgs); - $height = $order['ifentrust'] ? 1470 : 1350; + $height = $order['ifentrust'] ? 1510 : 1350; $res = $sign_entity->merge($sign_img,$img,1050,$height,350); if(!$res){ throw new Exception('签名失败', API_CODE_INVILD_PARAM); @@ -249,7 +249,7 @@ class Contract extends Wxapp{ break; case 4://车辆买卖合同补充协议 $sign_img = array_pop($imgs); - $height = $order['ifentrust'] ? 1470 : 1350; + $height = $order['ifentrust'] ? 1480 : 1350; $res = $sign_entity->merge($sign_img,$img,1050,$height,350); if(!$res){ throw new Exception('签名失败', API_CODE_INVILD_PARAM); @@ -277,7 +277,7 @@ class Contract extends Wxapp{ break; case 5://委托服务补充协议 $sign_img = array_pop($imgs); - $height = $order['ifentrust'] ? 1270 : 1150; + $height = $order['ifentrust'] ? 1280 : 1150; $res = $sign_entity->merge($sign_img,$img,1050,$height,340); if(!$res){ throw new Exception('签名失败', API_CODE_INVILD_PARAM); diff --git a/api/controllers/wxapp/liche/User.php b/api/controllers/wxapp/liche/User.php index 518d1e45..324e5258 100644 --- a/api/controllers/wxapp/liche/User.php +++ b/api/controllers/wxapp/liche/User.php @@ -392,12 +392,16 @@ class User extends Wxapp{ !$page && $page = 1; !$size && $size = 10; - $count = $this->orders_model->get_finsh($this->session['mobile'],'','',1); + $where = [ + "mobile" => $this->session['mobile'], + "status" => 6, + ]; + $count = $this->orders_model->count($where); $lists = []; if($count){ $this->load->model("items/items_model"); $this->load->model('receiver/order/receiver_order_agents_model','agents_model'); - $rows = $this->orders_model->get_finsh($this->session['mobile'],$page,$size); + $rows = $this->orders_model->select($where,'id desc',$page,$size); //品牌车型 $brand_arr = array_unique(array_column($rows,'brand_id')); $brands = $this->auto_brand_model->get_map_by_ids($brand_arr,'id,name'); diff --git a/api/controllers/wxapp/licheb/Cusorder.php b/api/controllers/wxapp/licheb/Cusorder.php index b6b15b8b..6acac433 100644 --- a/api/controllers/wxapp/licheb/Cusorder.php +++ b/api/controllers/wxapp/licheb/Cusorder.php @@ -70,7 +70,7 @@ class Cusorder extends Wxapp{ $ifentrust = $this->input_param('ifentrust'); $entrust_name = $this->input_param('entrust_name'); $entrust_idcard = $this->input_param('entrust_idcard'); - $entrust_idcard = $this->input_param('entrust_idcard'); + $entrust_mobile = $this->input_param('entrust_mobile'); $name = $this->input_param('name'); $mobile = $this->input_param('mobile'); $address = $this->input_param('address'); @@ -177,6 +177,7 @@ class Cusorder extends Wxapp{ $data['ifentrust'] = 1; $info_json['entrust_name'] = $entrust_name; $info_json['entrust_idcard'] = $entrust_idcard; + $info_json['entrust_mobile'] = $entrust_mobile; } $cardid && $info_json['c_cardid'] = $cardid; $address && $info_json['c_address'] = $address; @@ -416,6 +417,7 @@ class Cusorder extends Wxapp{ $car_data['是否委托'] = $row['ifentrust'] ? '是' : '否'; if($row['ifentrust']){ $car_data['委托人姓名'] = $info_json['entrust_name'] ? $info_json['entrust_name'] : ''; + $car_data['委托人手机号'] = $info_json['entrust_mobile'] ? $info_json['entrust_mobile'] : ''; $car_data['委托人身份证'] = $info_json['entrust_idcard'] ? $info_json['entrust_idcard'] : ''; } } diff --git a/api/views/wxapp/licheb/html2pdf/agent.php b/api/views/wxapp/licheb/html2pdf/agent.php index 12c3ce25..7838a17c 100644 --- a/api/views/wxapp/licheb/html2pdf/agent.php +++ b/api/views/wxapp/licheb/html2pdf/agent.php @@ -41,6 +41,7 @@
联系电话:
受托代理人:
+
受托人电话:
受托人身份证:
乙方为节省时间和精力,就甲乙双方《车辆买卖合同》标的的车辆,自愿委托甲方办理下列委托事项,并达成如下协议:
diff --git a/api/views/wxapp/licheb/html2pdf/agent_sp.php b/api/views/wxapp/licheb/html2pdf/agent_sp.php index 5a3614b3..880ade68 100644 --- a/api/views/wxapp/licheb/html2pdf/agent_sp.php +++ b/api/views/wxapp/licheb/html2pdf/agent_sp.php @@ -18,6 +18,7 @@
联系电话:
受托代理人:
+
受托人电话:
受托人身份证:
本协议中的所有术语,除非另有说明,否则其定义与双方于签订协议编号为的《委托服务协议》(以下简称“原协议”)中的定义相同。
diff --git a/api/views/wxapp/licheb/html2pdf/car.php b/api/views/wxapp/licheb/html2pdf/car.php index ff712905..84c98c30 100644 --- a/api/views/wxapp/licheb/html2pdf/car.php +++ b/api/views/wxapp/licheb/html2pdf/car.php @@ -18,6 +18,7 @@
联系电话:
受托代理人:
+
受托人电话:
受托人身份证:
甲、乙双方依据《中华人民共和国合同法》及其他有关法律、法规的规定,在平等、自愿、协商一致的基础上,就买卖汽车事宜,订立本合同。
diff --git a/api/views/wxapp/licheb/html2pdf/car_ck.php b/api/views/wxapp/licheb/html2pdf/car_ck.php index 05abbdf9..6b5c4374 100644 --- a/api/views/wxapp/licheb/html2pdf/car_ck.php +++ b/api/views/wxapp/licheb/html2pdf/car_ck.php @@ -17,6 +17,7 @@
联系电话:
受托代理人:
+
受托人电话:
受托人身份证:
乙方于在甲方购买 车辆 1 台,并确认车架号为:。乙方已对上述车辆的厂牌型号、配置等进行认真检查并验收合格无异议。
diff --git a/api/views/wxapp/licheb/html2pdf/car_fh.php b/api/views/wxapp/licheb/html2pdf/car_fh.php index 993db913..3ae4a114 100644 --- a/api/views/wxapp/licheb/html2pdf/car_fh.php +++ b/api/views/wxapp/licheb/html2pdf/car_fh.php @@ -17,6 +17,7 @@
联系电话:
受托代理人:
+
受托人电话:
受托人身份证:
一、车辆信息
diff --git a/api/views/wxapp/licheb/html2pdf/car_sp.php b/api/views/wxapp/licheb/html2pdf/car_sp.php index 589a0596..1eebc99a 100644 --- a/api/views/wxapp/licheb/html2pdf/car_sp.php +++ b/api/views/wxapp/licheb/html2pdf/car_sp.php @@ -15,6 +15,7 @@
联系电话:
委托代理人:
+
受托人电话:
受托人身份证:
本协议中的所有术语,除非另有说明,否则其定义与双方于签订合同编号为的《车辆买卖合同》(以下简称“原合同”)中的定义相同。
diff --git a/api/views/wxapp/licheb/protocol/agent.php b/api/views/wxapp/licheb/protocol/agent.php index e22d6c7d..e1e8d789 100644 --- a/api/views/wxapp/licheb/protocol/agent.php +++ b/api/views/wxapp/licheb/protocol/agent.php @@ -22,6 +22,7 @@
联系电话:
受托代理人:
+
受托人电话:
受托人身份证:
乙方为节省时间和精力,就甲乙双方《车辆买卖合同》标的的车辆,自愿委托甲方办理下列委托事项,并达成如下协议:
diff --git a/api/views/wxapp/licheb/protocol/agent_sp.php b/api/views/wxapp/licheb/protocol/agent_sp.php index bf053141..b9bd7db6 100644 --- a/api/views/wxapp/licheb/protocol/agent_sp.php +++ b/api/views/wxapp/licheb/protocol/agent_sp.php @@ -21,6 +21,7 @@
受托代理人:
+
受托人电话:
受托人身份证:
本协议中的所有术语,除非另有说明,否则其定义与双方于签订协议编号为的《委托服务协议》(以下简称“原协议”)中的定义相同。
diff --git a/api/views/wxapp/licheb/protocol/car.php b/api/views/wxapp/licheb/protocol/car.php index f6ba8611..c5b7cb97 100644 --- a/api/views/wxapp/licheb/protocol/car.php +++ b/api/views/wxapp/licheb/protocol/car.php @@ -22,6 +22,7 @@
联系电话:
受托代理人:
+
受托人电话:
受托人身份证:
甲、乙双方依据《中华人民共和国合同法》及其他有关法律、法规的规定,在平等、自愿、协商一致的基础上,就买卖汽车事宜,订立本合同。
diff --git a/api/views/wxapp/licheb/protocol/car_ck.php b/api/views/wxapp/licheb/protocol/car_ck.php index 11521a29..af736518 100644 --- a/api/views/wxapp/licheb/protocol/car_ck.php +++ b/api/views/wxapp/licheb/protocol/car_ck.php @@ -21,6 +21,7 @@
联系电话:
受托代理人:
+
受托人电话:
受托人身份证:
乙方于在甲方购买 车辆 1 台,并确认车架号为:。乙方已对上述车辆的厂牌型号、配置等进行认真检查并验收合格无异议。
diff --git a/api/views/wxapp/licheb/protocol/car_fh.php b/api/views/wxapp/licheb/protocol/car_fh.php index 5bd4e1d6..66018316 100644 --- a/api/views/wxapp/licheb/protocol/car_fh.php +++ b/api/views/wxapp/licheb/protocol/car_fh.php @@ -21,6 +21,7 @@
联系电话:
受托代理人:
+
受托人电话:
受托人身份证:
一、车辆信息
diff --git a/api/views/wxapp/licheb/protocol/car_sp.php b/api/views/wxapp/licheb/protocol/car_sp.php index 9ff3d647..862d346d 100644 --- a/api/views/wxapp/licheb/protocol/car_sp.php +++ b/api/views/wxapp/licheb/protocol/car_sp.php @@ -19,6 +19,7 @@
联系电话:
受托代理人:
+
受托人电话:
受托人身份证:
本协议中的所有术语,除非另有说明,否则其定义与双方于签订合同编号为的《车辆买卖合同》(以下简称“原合同”)中的定义相同。
diff --git a/common/models/receiver/order/Receiver_orders_model.php b/common/models/receiver/order/Receiver_orders_model.php index a0be71a8..f73d3e6f 100644 --- a/common/models/receiver/order/Receiver_orders_model.php +++ b/common/models/receiver/order/Receiver_orders_model.php @@ -52,61 +52,37 @@ class Receiver_orders_model extends HD_Model public function get_step($mobile) { - $t1 = 'lc_receiver_orders'; - //$t2 = 'lc_receiver_order_contracts'; - $this->db->select("$t1.*"); - $this->db->from($t1); - //$this->db->join($t2, "$t2.o_id = $t1.id and $t2.type=3",'left'); + //$t1 = 'lc_receiver_orders'; + //$this->db->select("$t1.*"); + //$this->db->from($t1); //$where = [ // "$t1.mobile" => $mobile, - // "($t2.status<1 or $t2.status is null)" => null + // "$t1.status<" => 6, + // "$t1.status>=" => 0, + // "$t1.brand_id>" => 0 //]; + //$this->db->where($where); + //$this->db->order_by("$t1.id desc"); + //$this->db->limit(1); + //$row = $this->db->get()->row_array(); $where = [ - "$t1.mobile" => $mobile, - "$t1.status<" => 6, - "$t1.status>=" => 0, - "$t1.brand_id>" => 0 + 'mobile' => $mobile, + 'status>=' => 0, + 'status<' => 6, + 'brand_id>' => 0 ]; - $this->db->where($where); - $this->db->order_by("$t1.id desc"); - $this->db->limit(1); - $row = $this->db->get()->row_array(); - return $row; - } - - //获取交车列表 - public function get_finsh($mobile, $page, $size, $count) - { - - $t1 = 'lc_receiver_orders'; - //$t2 = 'lc_receiver_order_contracts'; - $this->db->select("$t1.*"); - $this->db->from($t1); - //$this->db->join($t2, "$t2.o_id = $t1.id and $t2.type=3",'left'); - - //$where = [ - // "$t1.mobile" => $mobile, - // "$t2.status" => 1, - //]; - $where = [ - "$t1.mobile" => $mobile, - "$t1.status" => 6, - ]; - $this->db->where($where); - if ($count) { - return $this->db->count_all_results(); + $row = $this->select($where,'id desc',1,1); + if(!$row){ //本人不存在订单 代办订单 + $where = [ + 'ifentrust' => 1, + "json_extract(info_json,'$.entrust_mobile')='{$mobile}'" => null, + 'status>=' => 0, + 'status<' => 6, + 'brand_id>' => 0 + ]; + $row = $this->select($where,'id desc',1,1); } - - $this->db->order_by("$t1.id desc"); - if ($page) { - $offset = ($page - 1) * $size; - $limit = $size; - } else { - $offset = null; - $limit = null; - } - $this->db->limit($limit, $offset); - return $this->db->get()->result_array(); + return $row[0]; } public function get_status()