add-api-liche_img_type
This commit is contained in:
@@ -846,6 +846,7 @@ class Orders extends HD_Controller
|
||||
if ($this->input->method() == 'post') {
|
||||
$money = $this->input->post('money');
|
||||
$pay_time = $this->input->post('pay_time');
|
||||
!$pay_time && $pay_time = date('Y-m-d H:i:s');
|
||||
$wx_mchid = $this->input->post('wx_mchid');
|
||||
$descrip = $this->input->post('descrip');
|
||||
$type = $this->input->post('type');
|
||||
|
||||
@@ -599,6 +599,15 @@ class Cusorder extends Wxapp{
|
||||
if(!$order_data['car_img']){
|
||||
throw new Exception('请先上传行驶证', ERR_PARAMS_ERROR);
|
||||
}
|
||||
if(!$order_data['wx_img']){
|
||||
throw new Exception('先上传企业微图片', ERR_PARAMS_ERROR);
|
||||
}
|
||||
if(!$order_data['mut_wx_img']){
|
||||
throw new Exception('先上传企业微多对一图片', ERR_PARAMS_ERROR);
|
||||
}
|
||||
if(!$order_data['destory_img']){
|
||||
throw new Exception('请先上传实销凭证', ERR_PARAMS_ERROR);
|
||||
}
|
||||
if(!$order_data['ins_img'] && !$order_data['insurance_img'] && !$order_data['business_img']){
|
||||
throw new Exception('请先上传保单', ERR_PARAMS_ERROR);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class Cusorderdata extends Wxapp{
|
||||
'img' => build_qiniu_image_url($row_data['register_img'])
|
||||
];
|
||||
}
|
||||
$delivery_ck_img = $bill_ck_img = $business_img = $insurance_img = [];
|
||||
$destory_img = $mut_wx_img = $wx_img = $delivery_ck_img = $bill_ck_img = $business_img = $insurance_img = [];
|
||||
$d_ins_info = json_decode($row_data['insurance_img'],true);
|
||||
if($d_ins_info){
|
||||
$insurance_img = [
|
||||
@@ -80,6 +80,24 @@ class Cusorderdata extends Wxapp{
|
||||
'img' => build_qiniu_image_url($row_data['delivery_ck_img'])
|
||||
];
|
||||
}
|
||||
if($row_data['wx_img']){
|
||||
$wx_img = [
|
||||
'value' => $row_data['wx_img'],
|
||||
'img' => build_qiniu_image_url($row_data['wx_img'])
|
||||
];
|
||||
}
|
||||
if($row_data['mut_wx_img']){
|
||||
$mut_wx_img = [
|
||||
'value' => $row_data['mut_wx_img'],
|
||||
'img' => build_qiniu_image_url($row_data['mut_wx_img'])
|
||||
];
|
||||
}
|
||||
if($row_data['destory_img']){
|
||||
$destory_img = [
|
||||
'value' => $row_data['destory_img'],
|
||||
'img' => build_qiniu_image_url($row_data['destory_img'])
|
||||
];
|
||||
}
|
||||
$imgs = [
|
||||
'cardida' => [],
|
||||
'cardidb' => [],
|
||||
@@ -91,6 +109,9 @@ class Cusorderdata extends Wxapp{
|
||||
'insurance_img' => $insurance_img,
|
||||
'business_img' => $business_img,
|
||||
'bill_ck_img' => $bill_ck_img,
|
||||
'wx_img' => $wx_img,
|
||||
'mut_wx_img' => $mut_wx_img,
|
||||
'destory_img' => $destory_img,
|
||||
];
|
||||
if($row['s_id']==1 || $row['s_id']==33){ //(EX1 Pro和EX1需要上传交付确认书)
|
||||
$imgs['delivery_ck_img'] = $delivery_ck_img;
|
||||
@@ -176,6 +197,9 @@ class Cusorderdata extends Wxapp{
|
||||
$insurance_img = $this->input_param('insurance_img');
|
||||
$business_img = $this->input_param('business_img');
|
||||
$delivery_ck_img = $this->input_param('delivery_ck_img');
|
||||
$wx_img = $this->input_param('wx_img');
|
||||
$mut_wx_img = $this->input_param('mut_wx_img');
|
||||
$destory_img = $this->input_param('destory_img');
|
||||
$update = [];
|
||||
if($cardida){
|
||||
$full_cardida = build_qiniu_image_url($cardida);
|
||||
@@ -251,6 +275,18 @@ class Cusorderdata extends Wxapp{
|
||||
$key = 'delivery_ck_img';
|
||||
$img = $delivery_ck_img;
|
||||
}
|
||||
if($wx_img){
|
||||
$key = 'wx_img';
|
||||
$img = $wx_img;
|
||||
}
|
||||
if($mut_wx_img){
|
||||
$key = 'mut_wx_img';
|
||||
$img = $mut_wx_img;
|
||||
}
|
||||
if($destory_img){
|
||||
$key = 'destory_img';
|
||||
$img = $destory_img;
|
||||
}
|
||||
$key && $update[$key] = $img;
|
||||
}
|
||||
$res = $this->receiver_order_datas_model->update($update,['o_id'=>$id]);
|
||||
|
||||
Reference in New Issue
Block a user