新增补贴购车合同 && 保存推广bug && 小程序识别身份证
This commit is contained in:
@@ -55,6 +55,7 @@ class Subsidy extends BaseController
|
||||
'bizName' => $biz['biz_name'],
|
||||
'brandName' => $brand_detail,
|
||||
'statusCn' => Receiver_order_subsidy_model::IF_CHECK_STATUS[$row['ifcheck']],
|
||||
'contractImg' => $row['contractImg'] ? build_qiniu_image_url($row['contractImg']) : '',
|
||||
'billImg' => $row['billImg'] ? build_qiniu_image_url($row['billImg']) : '',
|
||||
'businessImg' => $row['businessImg'] ? build_qiniu_image_url($row['businessImg']) : '',
|
||||
'cTime' => $row['createTime'],
|
||||
|
||||
@@ -28,7 +28,7 @@ class Config extends BaseController
|
||||
'nonceStr' => $sign_package['nonceStr'], // 必填,生成签名的随机串
|
||||
'signature' => $sign_package['signature'],// 必填,签名
|
||||
'jsApiList' => ['chooseImage', 'uploadImage', 'getLocation',
|
||||
'openLocation','hideMenuItems','hideAllNonBaseMenuItem','hideOptionMenu','showAllNonBaseMenuItem']
|
||||
'openLocation', 'hideMenuItems', 'hideAllNonBaseMenuItem', 'hideOptionMenu', 'showAllNonBaseMenuItem']
|
||||
];
|
||||
$this->return_response($data);
|
||||
}
|
||||
@@ -563,7 +563,12 @@ class Config extends BaseController
|
||||
"title" => "查看示例",
|
||||
"content" => "https://img.liche.cn/space/agent/admin/202506/p_760ad21bfc51e60a6ebfb7db0d9dd9c9.jpg",
|
||||
"type" => 2
|
||||
]
|
||||
],
|
||||
"buy_contract" => [
|
||||
"title" => "查看示例",
|
||||
"content" => "https://img.liche.cn/space/agent/admin/202506/p_760ad21bfc51e60a6ebfb7db0d9dd9c9.jpg",
|
||||
"type" => 2
|
||||
],
|
||||
];
|
||||
$this->return_response($result);
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ class Subsidy extends BaseController
|
||||
$update = [
|
||||
'billImg' => $params['billImg'] ?: '',
|
||||
'businessImg' => $params['businessImg'] ?: '',
|
||||
'contractImg' => $params['contractImg'] ?: '',
|
||||
'ifcheck' => Receiver_order_subsidy_model::IF_CHECK_NO
|
||||
];
|
||||
$result = $this->receiver_order_subsidy_model->update($update, ['id' => $params['id']]);
|
||||
@@ -81,10 +82,13 @@ class Subsidy extends BaseController
|
||||
$rowBiz = $this->biz_model->get(array('id' => $row['bizId']));
|
||||
$brand = $this->auto_brand_model->get(['id' => $row['brandId']], 'name');
|
||||
$series = $this->auto_series_model->get(['id' => $row['seriesId']], 'name');
|
||||
$insuranceFile = [];
|
||||
$contractFile = $insuranceFile = [];
|
||||
if ($row['businessImg']) {
|
||||
$insuranceFile[] = ['url' => $row['businessImg'] ? build_qiniu_image_url($row['businessImg']) : ''];
|
||||
}
|
||||
if($row['contractImg']){
|
||||
$contractFile[] = ['url' => $row['contractImg'] ? build_qiniu_image_url($row['contractImg']) : ''];
|
||||
}
|
||||
$data = [
|
||||
'mobile' => mobile_asterisk($userCoupon['mobile']),
|
||||
'name' => $order['name'],
|
||||
@@ -100,6 +104,8 @@ class Subsidy extends BaseController
|
||||
],
|
||||
'invoiceUrl' => $row['billImg'] ?: '',
|
||||
'insuranceFile' => $insuranceFile,
|
||||
'contractUtl' => $row['contractImg'] ?: '',
|
||||
'contractFile' => $contractFile,
|
||||
'insuranceUrl' => $row['businessImg'] ?: '',
|
||||
'reason' => Receiver_order_subsidy_model::IF_CHECK_NO_PASS ? $row['reason'] : '',
|
||||
];
|
||||
|
||||
@@ -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'],
|
||||
|
||||
@@ -82,6 +82,7 @@ class AutoUserCouponEntity
|
||||
$seriesId = $formParams['seriesId'];
|
||||
$billImg = $formParams['billImg'];
|
||||
$businessImg = $formParams['businessImg'];
|
||||
$contractImg = $formParams['contractImg'];
|
||||
if (!$cityId || !$bizId || !$brandId || !$seriesId || !$billImg || !$name) {
|
||||
return new MyResponse(EXIT_ERROR, "参数错误");
|
||||
}
|
||||
@@ -141,6 +142,7 @@ class AutoUserCouponEntity
|
||||
'seriesId' => $seriesId,
|
||||
'billImg' => $billImg,
|
||||
'businessImg' => $businessImg,
|
||||
'contractImg' => $contractImg,
|
||||
'createTime' => date('Y-m-d H:i:s')
|
||||
];
|
||||
$result = $this->ci->receiver_order_subsidy_model->add($data);
|
||||
|
||||
@@ -19,15 +19,12 @@ class Auto_product_city_model extends HD_Model
|
||||
public function updateProductCity($productId, $citys = [])
|
||||
{
|
||||
if ($citys) {
|
||||
$replace_batch = [];
|
||||
$cityIds = [];
|
||||
foreach ($citys as $item) {
|
||||
$replace_batch[] = [
|
||||
'productId' => $productId,
|
||||
'provinceId' => $item[0],
|
||||
'cityId' => $item[1],
|
||||
];
|
||||
$cityIds[] = $item[1];
|
||||
}
|
||||
is_array($replace_batch) && $this->replace_batch($replace_batch);
|
||||
$cityIdString = implode(',', $cityIds);
|
||||
$cityIdString && $this->delete(['productId' => $productId, "cityId not in ($cityIdString)" => null]);
|
||||
} else {
|
||||
$this->delete(['productId' => $productId]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user