新增补贴购车合同 && 保存推广bug && 小程序识别身份证

This commit is contained in:
lcc
2025-09-07 15:28:55 +08:00
parent 52f27d130d
commit af26635b37
7 changed files with 41 additions and 20 deletions
+11 -7
View File
@@ -122,10 +122,10 @@ class Cusorder extends Wxapp
$this->customers_entity->add_log($cus_id, $this->session['uid'], $this->session['uname'], '生成订单', 6);
//发短信
$users = $this->app_user_model->select(array('status' => 1, 'group_id' => 4, 'biz_id like "%,'.$this->biz_id.',%"' => null));
if($users){
foreach ($users as $v){
$content = "【好店云】亲爱的客户成功经理,您管理的".$biz['biz_name'].'新增了一个订单。';
$users = $this->app_user_model->select(array('status' => 1, 'group_id' => 4, 'biz_id like "%,' . $this->biz_id . ',%"' => null));
if ($users) {
foreach ($users as $v) {
$content = "【好店云】亲爱的客户成功经理,您管理的" . $biz['biz_name'] . '新增了一个订单。';
b2m_send_sms($v['mobile'], $content);
}
}
@@ -239,7 +239,7 @@ class Cusorder extends Wxapp
if (!$data_row['car_img']) throw new Exception('行驶证未上传', ERR_PARAMS_ERROR);
if (!$data_row['insurance_img']) throw new Exception('保单未上传', ERR_PARAMS_ERROR);
}
}else{
} else {
$status = 3;
}
$update = ['status' => $status];
@@ -575,9 +575,13 @@ class Cusorder extends Wxapp
if ($row['if_num']) {
$car_data['上牌费'] = $money_json['register_amount'] ? $money_json['register_amount'] : 0;
}
}else{
} else {
$bt_cn = '确认订单';
}
$edit_info_status = false;
if ($biz['type'] != Biz_model::BIZ_TYPE_4s && $row['status'] > 0) {
$edit_info_status = true;
}
$data = [
'id' => $id,
'name' => $row['name'],
@@ -601,7 +605,7 @@ class Cusorder extends Wxapp
'money_json' => json_decode($row['money_json'], true),
'downpayment_type' => $row['downpayment_type'],
'cardid' => $row['card_id'],
'edit_info_status' => $row['status'] > 0 ? false : true,
'edit_info_status' => $edit_info_status,
'edit_order_status' => $row['status'] > 1 ? false : true,
'group_id' => $this->session['group_id'],
];
@@ -160,6 +160,7 @@ class Cusorderdata extends Wxapp
if (!$row) {
throw new Exception('参数错误', ERR_PARAMS_ERROR);
}
$biz = $this->get_biz_info();
$data_row = $this->receiver_order_datas_model->get(['o_id' => $id]);
$jsondata = json_decode($data_row['jsondata'], true);
if (!$data_row) {
@@ -179,6 +180,7 @@ class Cusorderdata extends Wxapp
$car_auth_img = $this->input_param('car_auth_img');
$bill_img = $this->input_param('bill_img');
$update = [];
$idNum = '';
if ($cardida) {
$full_cardida = build_qiniu_image_url($cardida);
$result = $this->tcorc->IdentityCard($full_cardida);
@@ -199,13 +201,14 @@ class Cusorderdata extends Wxapp
return $res_data;
}
//个人核对身份证
if ($userinfo['IdNum'] != $row['card_id']) {
if ($biz['type'] != Biz_model::BIZ_TYPE_4s && $userinfo['IdNum'] != $row['card_id']) {
$res_data['code'] = API_CODE_ORC_FAIL;
$res_data['data'] = [
['caridA' => false, 'errmsg' => '身份证号码与客户不一致'],
];
return $res_data;
}
$idNum = $userinfo['IdNum'];
$update['cardida'] = $cardida;
} elseif ($business_licence) {
$full_business_licence = build_qiniu_image_url($business_licence);
@@ -282,10 +285,13 @@ class Cusorderdata extends Wxapp
$res = $this->receiver_order_datas_model->update($update, ['o_id' => $id]);
if ($res) {
//跳过审核
if($jsondata['bill_info'] && $row['status'] == 1){
if ($jsondata['bill_info'] && $row['status'] == 1) {
$this->orders_model->update(['status' => 2], ['id' => $id]);
}
//4s店保存识别身份证
if ($biz['type'] == Biz_model::BIZ_TYPE_4s) {
$this->orders_model->update(['card_id' => $idNum], ['id' => $id]);
}
$log = array(
'order_id' => $id,
'uid' => $this->session['uid'],