This commit is contained in:
小鱼开发
2024-06-18 01:25:24 +08:00
parent 2dfd437136
commit 3f30c5bcb2
4 changed files with 23 additions and 34 deletions
+2 -2
View File
@@ -225,9 +225,9 @@ class Cusorder extends Wxapp
if (!$res['code']) {
throw new Exception('网络错误,请联系管理员', ERR_PARAMS_ERROR);
}
throw new Exception('修改成功', API_CODE_SUCCESS);
throw new Exception('审核通过,操作成功', API_CODE_SUCCESS);
} else {
throw new Exception('修改失败', ERR_PARAMS_ERROR);
throw new Exception('操作失败,请联系管理员', ERR_PARAMS_ERROR);
}
}
+7 -18
View File
@@ -34,7 +34,7 @@ class Cusorderdata extends Wxapp
$data['img_status'] = 1;
$data['order_status'] = intval($row['status']);
$row_data = $this->receiver_order_datas_model->get(['o_id' => $id]);
$cardidb = $cardida = $business_licence = $car_img = [];
$cardida = $business_licence = $car_img = [];
if ($row_data['car_img']) {
$car_img = [
'value' => $row_data['car_img'],
@@ -95,7 +95,6 @@ class Cusorderdata extends Wxapp
}
$imgs = [
'cardida' => [],
'cardidb' => [],
'business_licence' => [],
'car_img' => $car_img,
'ins_img' => [],
@@ -131,14 +130,7 @@ class Cusorderdata extends Wxapp
'img' => build_qiniu_image_url($row_data['cardida'])
];
}
if ($row_data['cardidb']) {
$cardidb = [
'value' => $row_data['cardidb'],
'img' => build_qiniu_image_url($row_data['cardidb'])
];
}
$data['imgs']['cardida'] = $cardida;
$data['imgs']['cardidb'] = $cardidb;
}
return $data;
}
@@ -157,7 +149,6 @@ class Cusorderdata extends Wxapp
$this->receiver_order_datas_model->add(['o_id' => $id]);
}
$cardida = $this->input_param('cardida');
$cardidb = $this->input_param('cardidb');
$car_img = $this->input_param('car_img');
$business_licence = $this->input_param('business_licence');
@@ -177,7 +168,6 @@ class Cusorderdata extends Wxapp
$res_data['code'] = API_CODE_ORC_FAIL;
$res_data['data'] = [
['caridA' => false, 'errmsg' => $result['msg']],
['caridB' => true, 'errmsg' => ''],
];
return $res_data;
}
@@ -187,7 +177,6 @@ class Cusorderdata extends Wxapp
$res_data['code'] = API_CODE_ORC_FAIL;
$res_data['data'] = [
['caridA' => false, 'errmsg' => '身份证姓名与客户不一致'],
['caridB' => true, 'errmsg' => ''],
];
return $res_data;
}
@@ -196,7 +185,6 @@ class Cusorderdata extends Wxapp
$res_data['code'] = API_CODE_ORC_FAIL;
$res_data['data'] = [
['caridA' => false, 'errmsg' => '身份证号码与客户不一致'],
['caridB' => true, 'errmsg' => ''],
];
return $res_data;
}
@@ -217,10 +205,6 @@ class Cusorderdata extends Wxapp
} elseif ($business_img) {
$update['business_img'] = $business_img;
} else {
if ($cardidb) {
$key = 'cardidb';
$img = $cardidb;
}
if ($car_img) { //图片识别行驶证
$key = 'car_img';
$img = $car_img;
@@ -262,7 +246,12 @@ class Cusorderdata extends Wxapp
//发票识别
$result = $this->order_datas_entity->orc_bill_img($id, build_qiniu_image_url($bill_img));
if (!$result['code']) {
throw new Exception($result['msg'], ERR_PARAMS_ERROR);
$res_data['code'] = API_CODE_ORC_FAIL;
$res_data['data'] = [
['bill_img' => false, 'errmsg' => $result['msg']],
];
return $res_data;
//throw new Exception($result['msg'], ERR_PARAMS_ERROR);
}
$jsondata['bill_info'] = $result['data'];
$update['jsondata'] = json_encode($jsondata, JSON_UNESCAPED_UNICODE);
+1 -1
View File
@@ -80,7 +80,7 @@ class TcOrc
}
} catch (TencentCloudSDKException $e) {
debug_log($e, $this->log_file, $this->dir);
return ['code' => 0, 'msg' => '识别失败'];
return ['code' => 0, 'msg' => '识别失败,请重新上传'];
}
}
@@ -10,10 +10,10 @@ class Order_datas_entity
{
private $ci;
const COLOR_UN_UPLOAD = '#c1b8b9'; //未传
const COLOR_UN_UPLOAD = '#c1b8b9'; //未
const COLOR_IS_UPLOAD = '#ff0000'; //已传
const COLOR_UN_CHECK = '#f9394d'; //未通过
const COLOR_CHECK = '#36afa2'; //通过
const COLOR_CHECK = '#97d248'; //通过
public function __construct()
@@ -37,16 +37,16 @@ class Order_datas_entity
public function data_status($o_data, $order_status)
{
$result = [
'contract_img' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //合同图片
'pay_img' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //支付凭证
'cardida' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //身份证
'business_licence' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //营业执照
'equity_ck_img' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //权益确认书
'bill_img' => ['text' => '未传', 'type' => 1, 'color' => self::COLOR_UN_UPLOAD], //发票
'delivery_ck_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //交车确认图片
'car_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //行驶证
'car_auth_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //车机实名认证
'insurance_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //交强险图片
'contract_img' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //合同图片
'pay_img' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //支付凭证
'cardida' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //身份证
'business_licence' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //营业执照
'equity_ck_img' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //权益确认书
'bill_img' => ['text' => '未传', 'type' => 1, 'color' => self::COLOR_UN_UPLOAD], //发票
'delivery_ck_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //交车确认图片
'car_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //行驶证
'car_auth_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //车机实名认证
'insurance_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //交强险图片
];
foreach ($result as $key => $item) {
if ($o_data[$key]) {
@@ -54,7 +54,7 @@ class Order_datas_entity
$result[$key]['text'] = '已审核';
$result[$key]['color'] = self::COLOR_CHECK;
} else {
$result[$key]['text'] = '已传';
$result[$key]['text'] = '已传';
$result[$key]['color'] = self::COLOR_IS_UPLOAD;
}