edit-api-contract-content

This commit is contained in:
lccsw
2021-08-31 15:24:52 +08:00
parent 7526f01e14
commit a7bef448ef
10 changed files with 30 additions and 5 deletions
+5 -2
View File
@@ -97,11 +97,11 @@ class Contract extends Wxapp{
$img = $this->input_param('img');
$row = $this->contracts_model->get(['type'=>$type,'o_id'=>$id]);
$order = $this->orders_model->get(['id'=>$id],'biz_id,ifentrust,pack_id');
$order = $this->orders_model->get(['id'=>$id],'biz_id,ifentrust,pack_id,info_json');
if(!$row['file'] || !$img){
throw new Exception('参数错误', API_CODE_INVILD_PARAM);
}
$jsondata = json_decode($order['info_json'],true);
if($row['status']==1){
throw new Exception('已签名', API_CODE_INVILD_PARAM);
@@ -139,6 +139,7 @@ class Contract extends Wxapp{
case 0: //整车
$sign_img = array_pop($imgs);
$height = $order['ifentrust'] ? 480 : 380;
$jsondata['c_cardid'] && $height += 30;
$res = $sign_entity->merge($sign_img,$img,1070,$height,230);
if(!$res){
throw new Exception('签名失败', API_CODE_INVILD_PARAM);
@@ -163,6 +164,7 @@ class Contract extends Wxapp{
$package = $this->package_model->get(['id'=>$order['pack_id']],'srv_ids');
$srv_count = $package ? count(explode(',',$package['srv_ids'])) : 0;
$height = $order['ifentrust'] ? 1400 : 1280;
$jsondata['c_cardid'] && $height += 30;
$height += $srv_count*52;
$res = $sign_entity->merge($sign_img,$img,1050,$height,300);
if(!$res){
@@ -188,6 +190,7 @@ class Contract extends Wxapp{
case 2: //确认信息
$sign_img = array_pop($imgs);
$height = $order['ifentrust'] ? 600 : 480;
$jsondata['c_cardid'] && $height += 30;
$res = $sign_entity->merge($sign_img,$img,1050,$height,300);
if(!$res){
throw new Exception('签名失败', API_CODE_INVILD_PARAM);
+1 -1
View File
@@ -63,7 +63,7 @@ class Cusorder extends Wxapp{
$row = $this->customers_model->get(['id'=>$cus_id]);
$series_row = $this->auto_series_model->get(['id'=>$car_id]);
if(!$row || !$series_row){
if(!$row || !$series_row || !$cardid || !$address){
throw new Exception('参数错误', ERR_PARAMS_ERROR);
}
//判断是否存在未完成流程
@@ -35,6 +35,9 @@
<div><b>甲方(出卖人):</b><?=$company['title']?></div>
<div><b>统一社会信用代码:</b><?=$company['credit_code']?></div>
<div><b>乙方(买受人):</b><?=$name?></div>
<?if($info_json['c_cardid']){?>
<div><b>身份证号码:</b><?=$info_json['c_cardid']?></div>
<?}?>
<div><b>联系电话:</b><?=$mobile?></div>
<?if($ifentrust){?>
<div><b>委托代理人:</b><?=$info_json['entrust_name']?></div>
+3
View File
@@ -12,6 +12,9 @@
<div><b>甲方(出卖人):</b><?=$company['title']?></div>
<div><b>统一社会信用代码:</b><?=$company['credit_code']?></div>
<div><b>乙方(买受人):</b><?=$name?></div>
<?if($info_json['c_cardid']){?>
<div><b>身份证号码:</b><?=$info_json['c_cardid']?></div>
<?}?>
<div><b>联系电话:</b><?=$mobile?></div>
<?if($ifentrust){?>
<div><b>委托代理人:</b><?=$info_json['entrust_name']?></div>
@@ -11,6 +11,9 @@
<div><b>甲方(出卖人):</b><?=$company['title']?></div>
<div><b>统一社会信用代码:</b><?=$company['credit_code']?></div>
<div><b>乙方(买受人):</b><?=$name?></div>
<?if($info_json['c_cardid']){?>
<div><b>身份证号码:</b><?=$info_json['c_cardid']?></div>
<?}?>
<div><b>联系电话:</b><?=$mobile?></div>
<?if($ifentrust){?>
<div><b>委托代理人:</b><?=$info_json['entrust_name']?></div>
+3 -1
View File
@@ -11,7 +11,9 @@
<div><b>甲方(出卖人):</b><?=$company['title']?></div>
<div><b>统一社会信用代码:</b><?=$company['credit_code']?></div>
<div><b>乙方(买受人):</b><?=$name?></div>
<div><b>身份证号码:</b><?=$cardid?></div>
<?if($info_json['c_cardid']||$info_json['cardid']){?>
<div><b>身份证号码:</b><?=$info_json['c_cardid']?$info_json['c_cardid']:$info_json['cardid']?></div>
<?}?>
<div><b>联系电话:</b><?=$mobile?></div>
<?if($ifentrust){?>
<div><b>委托代理人:</b><?=$info_json['entrust_name']?></div>
@@ -16,6 +16,9 @@
<div><b>甲方(出卖人):</b><?=$company['title']?></div>
<div><b>统一社会信用代码:</b><?=$company['credit_code']?></div>
<div><b>乙方(买受人):</b><?=$name?></div>
<?if($info_json['c_cardid']){?>
<div><b>身份证号码:</b><?=$info_json['c_cardid']?></div>
<?}?>
<div><b>联系电话:</b><?=$mobile?></div>
<?if($ifentrust){?>
<div><b>委托代理人:</b><?=$info_json['entrust_name']?></div>
+3
View File
@@ -16,6 +16,9 @@
<div><b>甲方(出卖人):</b><?=$company['title']?></div>
<div><b>统一社会信用代码:</b><?=$company['credit_code']?></div>
<div><b>乙方(买受人):</b><?=$name?></div>
<?if($info_json['c_cardid']){?>
<div><b>身份证号码:</b><?=$info_json['c_cardid']?></div>
<?}?>
<div><b>联系电话:</b><?=$mobile?></div>
<?if($ifentrust){?>
<div><b>委托代理人:</b><?=$info_json['entrust_name']?></div>
@@ -15,6 +15,9 @@
<div><b>甲方(出卖人):</b><?=$company['title']?></div>
<div><b>统一社会信用代码:</b><?=$company['credit_code']?></div>
<div><b>乙方(买受人):</b><?=$name?></div>
<?if($info_json['c_cardid']){?>
<div><b>身份证号码:</b><?=$info_json['c_cardid']?></div>
<?}?>
<div><b>联系电话:</b><?=$mobile?></div>
<?if($ifentrust){?>
<div><b>委托代理人:</b><?=$info_json['entrust_name']?></div>
+3 -1
View File
@@ -15,7 +15,9 @@
<div><b>甲方(出卖人):</b><?=$company['title']?></div>
<div><b>统一社会信用代码:</b><?=$company['credit_code']?></div>
<div><b>乙方(买受人):</b><?=$name?></div>
<div><b>身份证号码:</b><?=$cardid?></div>
<?if($info_json['c_cardid']){?>
<div><b>身份证号码:</b><?=$info_json['c_cardid']?$info_json['c_cardid']:$info_json['cardid']?></div>
<?}?>
<div><b>联系电话:</b><?=$mobile?></div>
<?if($ifentrust){?>
<div><b>委托代理人:</b><?=$info_json['entrust_name']?></div>