edit-api-licheb-contract

This commit is contained in:
lccsw
2021-08-13 13:49:49 +08:00
parent acd589929d
commit 80fb543eac
12 changed files with 27 additions and 20 deletions
+1
View File
@@ -191,6 +191,7 @@ class Car extends Wxapp{
$add_data = [
'app_id' => $this->app_id,
'app_uid' => $this->session['uid'],
'mch_id' => '1612289137',
'sid' => $params['sid'],
'item_id' => $params['item_id'],
'item_title' => $params['item_title'],
+6 -2
View File
@@ -104,8 +104,12 @@ class Contract extends Wxapp{
throw new Exception('已签名', API_CODE_INVILD_PARAM);
}
//获取公司印章
$biz = $this->biz_model->get(['id'=>$order['biz_id']],'company_id');
$company = $this->sys_company_model->get(['id'=>$biz['company_id']],'img_seal,id');
if($type==1){
$company = $this->sys_company_model->get(["title like '%厦门狸车服务%'"=>null],'img_seal,id');
}else{
$biz = $this->biz_model->get(['id'=>$order['biz_id']],'company_id');
$company = $this->sys_company_model->get(['id'=>$biz['company_id']],'img_seal,id');
}
$img_seal = $company['img_seal'] ? build_qiniu_image_url($company['img_seal']) : '';
if(!$img_seal){
throw new Exception('公司公章未上传', API_CODE_FAIL);
+5 -6
View File
@@ -48,7 +48,7 @@ class Protocol extends CI_Controller{
//获取门店信息
$biz = $this->biz_model->get(['id'=>$row['biz_id']]);
$city = $this->area_model->get(['county_id'=>$biz['county_id']],'city_name,county_name');
$row['address'] = $city['city_name'].$city['county_name'].'  '.$biz['address'];
$row['address'] = $city['city_name'].$city['county_name'].'  '.$biz['address'] .' &nbsp'. $biz['biz_name'];
$company = $this->sys_company_model->get(['id'=>$biz['company_id']]);
$row['company'] = $company;
//获取选择代办包
@@ -66,7 +66,7 @@ class Protocol extends CI_Controller{
$row['price_rmb'] = num_to_rmb($row['price']);
$row['cid'] = $contract['cid'];
$row['day'] = $contract ? date('Y年m月d日',$contract['c_time']):date('Y年m月d日');
$row['dep_price'] = number_format(5000,2); //定金
$row['dep_price'] = number_format($row['deposit'],2); //定金
$folder = $wxapp ? 'protocol' : 'html2pdf';
$this->load->view("wxapp/licheb/{$folder}/car",$row);
}
@@ -81,12 +81,11 @@ class Protocol extends CI_Controller{
if($row){
//获取门店信息
$biz = $this->biz_model->get(['id'=>$row['biz_id']]);
$company = $this->sys_company_model->get(['id'=>$biz['company_id']]);
$row['company'] = $company;
$row['company'] = $this->sys_company_model->get(["title like '%厦门狸车服务%'"=>null]);
//获取服务包
$packs = $this->package_model->get(['id'=>$row['pack_id']],'srv_ids');
if($packs['srv_ids']){
$row['services'] = $services = $this->services_model->select(["id in ({$packs['srv_ids']})"],'','','','title,field_name');
$row['services'] = $services = $this->services_model->select(["id in ({$packs['srv_ids']})"=>null],'','','','title,field_name');
}
$attrs = "{$row['cor_id']}_{$row['v_id']}_{$row['incor_id']}";
$car = $this->auto_cars_model->get(['attrs'=>$attrs,'s_id'=>$row['s_id']]);
@@ -168,7 +167,7 @@ class Protocol extends CI_Controller{
//获取服务包
$packs = $this->package_model->get(['id'=>$row['pack_id']],'srv_ids');
if($packs['srv_ids']){
$row['services'] = $services = $this->services_model->select(["id in ({$packs['srv_ids']})"],'','','','title,field_name');
$row['services'] = $services = $this->services_model->select(["id in ({$packs['srv_ids']})"=>null],'','','','title,field_name');
}
$attrs = "{$row['cor_id']}_{$row['v_id']}_{$row['incor_id']}";
$car = $this->auto_cars_model->get(['attrs'=>$attrs,'s_id'=>$row['s_id']]);
+5 -2
View File
@@ -10,8 +10,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
require_once APPPATH.'controllers/wxapp/Wxapp.php';
class Services extends Wxapp{
public function __construct(){
parent::__construct();
function __construct($inputs, $app_key){
parent::__construct($inputs, $app_key);
$this->login_white = array('get_package');//登录白名单
$this->load->model('receiver/receiver_services_model','services_model');
$this->load->model('receiver/receiver_service_package_model','package_model');
@@ -20,12 +20,15 @@ class Services extends Wxapp{
protected function get_package(){
$page = $this->input_param('page');
$size = $this->input_param('size');
$type = $this->input_param('type');
!$page && $page = 1;
!$size && $size = 10;
$where = [
'status' => 1
];
$type==1 && $where['id!='] = 3; //全款
$type==2 && $where['id'] = 3; //分期
$count = $this->package_model->count($where);
$list = [];
if($count){
+1 -1
View File
@@ -61,7 +61,7 @@
<div>日期:<?=$day?></div>
</td>
<td style="width:40%;">
<div>乙方(签名</div>
<div>乙方(<?=$ifentrust?'委托人':'买受人'?></div>
<div>日期:<?=$day?></div>
</td>
</tr>
+2 -2
View File
@@ -70,7 +70,7 @@
<div>车辆单价为车身单价,续航里程为300KM以上的车辆已按扣减国家补贴后的价格结算。不包含车辆购置税、车辆保险费、挂牌杂费等其他费用。乙方如需委托甲方代理上牌、委托运输等服务的,双方应另外签订《委托服务协议》。</div>
<div><b>第三条付款方式</b></div>
<div>乙方在签订合同时即付定金人民币:<?=$dep_price?>元,定金在结算时冲抵车款。</div>
<div>乙方选择<?=$row['payway']?'一次性付款方式':'分期付款方式'?></div>
<div>乙方选择<?=$payway?'一次性付款方式':'分期付款方式'?></div>
<div><b>第四条 车辆交付</b></div>
<div>1、交车时间:合同签订之日起 <?=$give_time?>天内。</div>
<!--
@@ -117,7 +117,7 @@
<div>日期:<?=$day?></div>
</td>
<td style="width:40%;">
<div>乙方(买受人/委托人</div>
<div>乙方(<?=$ifentrust?'委托人':'买受人'?></div>
<div>日期:<?=$day?></div>
</td>
</tr>
+1 -1
View File
@@ -25,7 +25,7 @@
<div>日期:<?=$day?></div>
</td>
<td style="width:40%;">
<div>乙方(签名</div>
<div>乙方(<?=$ifentrust?'委托人':'买受人'?></div>
<div>日期:<?=$day?></div>
</td>
</tr>
+1 -1
View File
@@ -72,7 +72,7 @@
<div>日期:<?=$day?></div>
</td>
<td style="width:40%;">
<div>乙方(买受人</div>
<div>乙方(<?=$ifentrust?'委托人':'买受人'?></div>
<div>日期:<?=$day?></div>
</td>
</tr>
+1 -1
View File
@@ -42,7 +42,7 @@
<div>日期:<?=$day?></div>
</td>
<td style="width:50%;">
<div>乙方(签名</div>
<div>乙方(<?=$ifentrust?'委托人':'买受人'?></div>
<div>日期:<?=$day?></div>
</td>
</tr>
+2 -2
View File
@@ -74,7 +74,7 @@
<div>车辆单价为车身单价,续航里程为300KM以上的车辆已按扣减国家补贴后的价格结算。不包含车辆购置税、车辆保险费、挂牌杂费等其他费用。乙方如需委托甲方代理上牌、委托运输等服务的,双方应另外签订《委托服务协议》。</div>
<div><b>第三条付款方式</b></div>
<div>乙方在签订合同时即付定金人民币:<?=$dep_price?>元,定金在结算时冲抵车款。</div>
<div>乙方选择<?=$row['payway']?'一次性付款方式':'分期付款方式'?></div>
<div>乙方选择<?=$payway?'一次性付款方式':'分期付款方式'?></div>
<div><b>第四条 车辆交付</b></div>
<div>1、交车时间:合同签订之日起 <?=$give_time?>天内。</div>
<!--
@@ -121,7 +121,7 @@
<div>日期:<?=$day?></div>
</td>
<td style="width:50%;">
<div>乙方(买受人/委托人</div>
<div>乙方(<?=$ifentrust?'委托人':'买受人'?></div>
<div>日期:<?=$day?></div>
</td>
</tr>
+1 -1
View File
@@ -29,7 +29,7 @@
<div>日期:<?=$day?></div>
</td>
<td style="width:50%;">
<div>乙方(签名</div>
<div>乙方(<?=$ifentrust?'委托人':'买受人'?></div>
<div>日期:<?=$day?></div>
</td>
</tr>
+1 -1
View File
@@ -76,7 +76,7 @@
<div>日期:<?=$day?></div>
</td>
<td style="width:50%;">
<div>乙方(买受人/委托人</div>
<div>乙方(<?=$ifentrust?'委托人':'买受人'?></div>
<div>日期:<?=$day?></div>
</td>
</tr>