edit-admin-ckinfo
This commit is contained in:
@@ -302,6 +302,12 @@ class Orders extends HD_Controller
|
||||
$agent['company'] = $company;
|
||||
$agent['ins_risk'] = $ins_risk;
|
||||
$agent['business_risk'] = $business_risk;
|
||||
$insurance_img = json_decode($img_data['insurance_img'],true);
|
||||
$business_img = json_decode($img_data['business_img'],true);
|
||||
$agent['insurance_price'] = $insurance_img['price'];
|
||||
$agent['insurance_product'] = $insurance_img['product'];
|
||||
$agent['business_price'] = $business_img['price'];
|
||||
$agent['business_product'] = $business_img['product'];
|
||||
$row['agent'] = $agent;
|
||||
//获取销售员
|
||||
if ($row['sale_id']) {
|
||||
@@ -1045,16 +1051,10 @@ class Orders extends HD_Controller
|
||||
return $this->show_json(SYS_CODE_FAIL, '参数错误!');
|
||||
}
|
||||
$agent = $this->order_agents_model->get(['o_id' => $row['id']]);
|
||||
$jsondata = json_decode($agent['jsondata'],true);
|
||||
$update = [];
|
||||
$update['car_num'] = $params['car_num'];
|
||||
$update['ins_time'] = $params['ins_time'] ? date('Y-m-d H:i:s', strtotime($params['ins_time'])) : '0000-00-00 00:00:00';
|
||||
|
||||
$jsondata['company'] = $params['company'];
|
||||
$jsondata['ins_risk'] = $params['ins_risk'];
|
||||
$jsondata['business_risk'] = $params['business_risk'];
|
||||
|
||||
$update['jsondata'] = json_encode($jsondata, JSON_UNESCAPED_UNICODE);
|
||||
if ($agent) {
|
||||
$result = $this->order_agents_model->update($update, ['id' => $agent['id']]);
|
||||
} else {
|
||||
@@ -1063,6 +1063,18 @@ class Orders extends HD_Controller
|
||||
$result = $this->order_agents_model->add($update);
|
||||
}
|
||||
if ($result) {
|
||||
$img_data = $this->receiver_order_datas_model->get(['o_id'=>$row['id']]);
|
||||
$insurance_img = json_decode($img_data['insurance_img'],true);
|
||||
$business_img = json_decode($img_data['business_img'],true);
|
||||
$insurance_img['product'] = $params['insurance_product'];
|
||||
$insurance_img['price'] = $params['insurance_price'];
|
||||
$business_img['product'] = $params['business_product'];
|
||||
$business_img['price'] = $params['business_price'];
|
||||
$up_data = [
|
||||
'insurance_img' => json_encode($insurance_img,JSON_UNESCAPED_UNICODE),
|
||||
'business_img' => json_encode($business_img,JSON_UNESCAPED_UNICODE)
|
||||
];
|
||||
$this->receiver_order_datas_model->update($up_data,['o_id'=>$row['id']]);
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '保存成功');
|
||||
} else {
|
||||
return $this->show_json(SYS_CODE_FAIL, '保存失败');
|
||||
@@ -1323,4 +1335,54 @@ class Orders extends HD_Controller
|
||||
}
|
||||
return $imgs;
|
||||
}
|
||||
|
||||
public function del_img(){
|
||||
$info = $this->input->post();
|
||||
if(!$info['type'] || !$info['field']){
|
||||
return $this->show_json(SYS_CODE_FAIL, '参数错误');
|
||||
}
|
||||
$res = false;
|
||||
if($info['type']=='data'){
|
||||
$row = $this->receiver_order_datas_model->get(['o_id'=>$info['id']]);
|
||||
if(!$row){
|
||||
return $this->show_json(SYS_CODE_FAIL, '参数错误');
|
||||
}
|
||||
if($info['field']=='ins_img'){
|
||||
$jsondata = json_decode($row[$info['field']],true);
|
||||
$new_jsondata = [];
|
||||
foreach ($jsondata as $item) {
|
||||
if(strpos($info['value'],$item) !== false) {
|
||||
}else{
|
||||
$new_jsondata[] = $item;
|
||||
}
|
||||
}
|
||||
$update = [
|
||||
$info['field'] => json_encode($new_jsondata,JSON_UNESCAPED_UNICODE)
|
||||
];
|
||||
}elseif ($info['field']=='insurance_img'||$info['field']=='business_img'){
|
||||
$update = [
|
||||
$info['field'] => json_encode([])
|
||||
];
|
||||
}else{
|
||||
$update = [
|
||||
$info['field'] => ''
|
||||
];
|
||||
}
|
||||
$res = $this->receiver_order_datas_model->update($update,['o_id'=>$info['id']]);
|
||||
}elseif($info['type']=='load_info'){
|
||||
$row = $this->order_loans_model->get(['o_id'=>$info['id']]);
|
||||
if(!$row){
|
||||
return $this->show_json(SYS_CODE_FAIL, '参数错误');
|
||||
}
|
||||
$update = [
|
||||
$info['field'] => ''
|
||||
];
|
||||
$res = $this->order_loans_model->update($update,['o_id'=>$info['id']]);
|
||||
}
|
||||
if($res){
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '保存成功');
|
||||
}else{
|
||||
return $this->show_json(SYS_CODE_FAIL, '保存失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
</th>
|
||||
<th width="10%"><span>门店</span></th>
|
||||
<th width="20%"><span>订单信息</span></th>
|
||||
<th width="10%"><span>单车毛利</span></th>
|
||||
<th width="10%"><span>单车毛利税后</span></th>
|
||||
<th width="10%"><span>保险利润</span></th>
|
||||
<th width="10%"><span>贷款利润</span></th>
|
||||
@@ -80,6 +81,7 @@
|
||||
{{v.title}} {{v.vin}}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{v.profix_car}}</td>
|
||||
<td>{{v.profix_car_after}}</td>
|
||||
<td>{{v.profix_insure}}</td>
|
||||
<td>{{v.profix_loan}}</td>
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">保险公司:</span></label>
|
||||
<label class="am-para-label label-width"><span class="span-bold">强制险公司:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label" style="width: 50%">
|
||||
<input type="text" name="company" v-model="info.agent.company">
|
||||
<input type="text" name="insurance_product" v-model="info.agent.insurance_product">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -40,7 +40,7 @@
|
||||
<label class="am-para-label label-width"><span class="span-bold">交强险费用:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label" style="width: 50%">
|
||||
<input type="text" name="ins_risk" v-model="info.agent.ins_risk"></label>
|
||||
<input type="number" name="insurance_price" v-model="info.agent.insurance_price"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -50,14 +50,19 @@
|
||||
<div class="am-form-inline">
|
||||
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">商业险费用:</span></label>
|
||||
<label class="am-para-label label-width"><span class="span-bold">商业险公司:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label" style="width: 50%">
|
||||
<input type="text" name="business_risk" v-model="info.agent.business_risk"></label>
|
||||
<input type="text" name="business_product" v-model="info.agent.business_product"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-inline am-u-lg-6">
|
||||
<div class="am-form-group am-u-lg-6" style="margin-top: 15px;">
|
||||
<label class="am-para-label label-width"><span class="span-bold">商业险费用:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label" style="width: 50%">
|
||||
<input type="number" name="business_price" v-model="info.agent.business_price"></label>
|
||||
</div>
|
||||
<div class="">
|
||||
<input type="hidden" name="oid" v-model="info.id">
|
||||
<a href='javascript:;' class='am-btn am-btn-primary am-btn-xs' @click="save_agent">
|
||||
保存
|
||||
@@ -74,7 +79,8 @@
|
||||
</p>
|
||||
<ul class="photopic-list ml30 clearfix">
|
||||
<?if($info['imgs_status']['business_licence']['imgs'][0]){?>
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('data','business_licence','')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-21">
|
||||
<img src="<?=$info['imgs_status']['business_licence']['imgs'][0]?>" @click="show_carimg(21)"/>
|
||||
</a>
|
||||
@@ -95,25 +101,15 @@
|
||||
<div class="" v-else>
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
身份证:
|
||||
<!--
|
||||
<?if($info['imgs_status']['cardida']['status']==0 && $info['imgs_status']['cardida']['imgs']){?>
|
||||
<button data-ajax="post" data-action="/receiver/orderv2/orders/edit_ckimg" data-params-ifcheck="1" data-params-type="1" data-params-id="<?=$info['id']?>" class="am-btn am-btn-xs am-btn-primary">审核通过</button>
|
||||
<button data-ajax="post" data-action="/receiver/orderv2/orders/edit_ckimg" data-params-ifcheck="0" data-params-type="1" data-params-id="<?=$info['id']?>" class="am-btn am-btn-xs am-btn-danger">审核不通过</button>
|
||||
<?}?>
|
||||
-->
|
||||
</p>
|
||||
<ul class="photopic-list ml30 clearfix">
|
||||
<?if($info['imgs_status']['cardida']['imgs'][0]){?>
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('data','cardida','')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-21">
|
||||
<img src="<?=$info['imgs_status']['cardida']['imgs'][0]?>" @click="show_carimg(21)"/>
|
||||
</a>
|
||||
<div class="f12 tc">身份证正面</div>
|
||||
<!--
|
||||
<div class="f16">审核结果:
|
||||
<span class="am-text-<?=$info['imgs_status']['cardida']['status_cls']?>"><?=$info['imgs_status']['cardida']['status_cn']?></span>
|
||||
</div>
|
||||
-->
|
||||
</li>
|
||||
<?}else{?>
|
||||
<li>
|
||||
@@ -126,16 +122,12 @@
|
||||
</li>
|
||||
<?}?>
|
||||
<?if($info['imgs_status']['cardida']['imgs'][1]){?>
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('data','cardidb','')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-22">
|
||||
<img src="<?=$info['imgs_status']['cardida']['imgs'][1]?>" @click="show_carimg(22)"/>
|
||||
</a>
|
||||
<div class="f12 tc">身份证反面</div>
|
||||
<!--
|
||||
<div class="f16">审核结果:
|
||||
<span class="am-text-<?=$info['imgs_status']['cardida']['status_cls']?>"><?=$info['imgs_status']['cardida']['status_cn']?></span>
|
||||
</div>
|
||||
-->
|
||||
</li>
|
||||
<?}else{?>
|
||||
<li>
|
||||
@@ -153,22 +145,12 @@
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">国补资料:</p>
|
||||
<ul class="photopic-list ml30 clearfix">
|
||||
<?if($info['imgs_status']['register_img']['imgs'][0]){?>
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('data','register_img','')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-31">
|
||||
<img src="<?=$info['imgs_status']['register_img']['imgs'][0]?>" @click="show_carimg(31)"/>
|
||||
</a>
|
||||
<div class="f12 tc">登记证</div>
|
||||
<!--
|
||||
<div class="f16">审核结果:
|
||||
<span class="am-text-<?=$info['imgs_status']['register_img']['status_cls']?>"><?=$info['imgs_status']['register_img']['status_cn']?></span>
|
||||
</div>
|
||||
<?if($info['imgs_status']['register_img']['status']==0){?>
|
||||
<div class="mt20">
|
||||
<button data-ajax="post" data-action="/receiver/orderv2/orders/edit_ckimg" data-params-ifcheck="1" data-params-type="2" data-params-id="<?=$info['id']?>" class="am-btn am-btn-xs am-btn-primary">审核通过</button>
|
||||
<button data-ajax="post" data-action="/receiver/orderv2/orders/edit_ckimg" data-params-ifcheck="0" data-params-type="2" data-params-id="<?=$info['id']?>" class="am-btn am-btn-xs am-btn-danger">审核不通过</button>
|
||||
</div>
|
||||
<?}?>
|
||||
-->
|
||||
</li>
|
||||
<?}else{?>
|
||||
<li>
|
||||
@@ -181,22 +163,12 @@
|
||||
</li>
|
||||
<?}?>
|
||||
<?if($info['imgs_status']['car_img']['imgs'][0]){?>
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('data','car_img','')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-32">
|
||||
<img src="<?=$info['imgs_status']['car_img']['imgs'][0]?>" @click="show_carimg(32)"/>
|
||||
</a>
|
||||
<div class="f12 tc">行驶证</div>
|
||||
<!--
|
||||
<div class="f16">审核结果:
|
||||
<span class="am-text-<?=$info['imgs_status']['car_img']['status_cls']?>"><?=$info['imgs_status']['car_img']['status_cn']?></span>
|
||||
</div>
|
||||
<?if($info['imgs_status']['car_img']['status']==0){?>
|
||||
<div class="mt20">
|
||||
<button data-ajax="post" data-action="/receiver/orderv2/orders/edit_ckimg" data-params-ifcheck="1" data-params-type="3" data-params-id="<?=$info['id']?>" class="am-btn am-btn-xs am-btn-primary">审核通过</button>
|
||||
<button data-ajax="post" data-action="/receiver/orderv2/orders/edit_ckimg" data-params-ifcheck="0" data-params-type="3" data-params-id="<?=$info['id']?>" class="am-btn am-btn-xs am-btn-danger">审核不通过</button>
|
||||
</div>
|
||||
<?}?>
|
||||
-->
|
||||
</li>
|
||||
<?}else{?>
|
||||
<li>
|
||||
@@ -217,7 +189,8 @@
|
||||
</p>
|
||||
<ul class="photopic-list ml30 clearfix">
|
||||
<?if($info['imgs_status']['insurance_img']['imgs'][0]){?>
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('data','insurance_img','')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-301">
|
||||
<img src="<?=$info['imgs_status']['insurance_img']['imgs'][0]?>" @click="show_carimg(301)"/>
|
||||
</a>
|
||||
@@ -234,7 +207,8 @@
|
||||
</li>
|
||||
<?}?>
|
||||
<?if($info['imgs_status']['business_img']['imgs'][0]){?>
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('data','business_img','')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-302">
|
||||
<img src="<?=$info['imgs_status']['business_img']['imgs'][0]?>" @click="show_carimg(302)"/>
|
||||
</a>
|
||||
@@ -257,30 +231,20 @@
|
||||
<div class="">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
其它保单:
|
||||
<!--
|
||||
<?if($info['imgs_status']['ins_img']['status']==0 && $info['imgs_status']['ins_img']['imgs']){?>
|
||||
<button data-ajax="post" data-action="/receiver/orderv2/orders/edit_ckimg" data-params-ifcheck="1" data-params-type="4" data-params-id="<?=$info['id']?>" class="am-btn am-btn-xs am-btn-primary">审核通过</button>
|
||||
<button data-ajax="post" data-action="/receiver/orderv2/orders/edit_ckimg" data-params-ifcheck="0" data-params-type="4" data-params-id="<?=$info['id']?>" class="am-btn am-btn-xs am-btn-danger">审核不通过</button>
|
||||
<?}?>
|
||||
-->
|
||||
</p>
|
||||
<ul class="photopic-list ml30 clearfix">
|
||||
<?if($info['imgs_status']['ins_img']['imgs']){?>
|
||||
<? foreach ($info['imgs_status']['ins_img']['imgs'] as $key=>$val) {?>
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<?if(strpos($val,'.pdf') !== false){?>
|
||||
<a href="<?=$val?>" target="_blank" class="pic">
|
||||
</a>
|
||||
<?}else{?>
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('data','ins_img','<?=$val?>')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-4<?=$key?>">
|
||||
<img src="<?=$val?>" @click="show_carimg(4<?=$key?>)"/>
|
||||
</a>
|
||||
<?}?>
|
||||
<!--
|
||||
<div class="f16">审核结果:
|
||||
<span class="am-text-<?=$info['imgs_status']['ins_img']['status_cls']?>"><?=$info['imgs_status']['ins_img']['status_cn']?></span>
|
||||
</div>
|
||||
-->
|
||||
</li>
|
||||
<?}?>
|
||||
<?}?>
|
||||
@@ -298,25 +262,15 @@
|
||||
<div class="">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
交车合照:
|
||||
<!--
|
||||
<?if($info['imgs_status']['other_img']['status']==0 && $info['imgs_status']['other_img']['imgs']){?>
|
||||
<button data-ajax="post" data-action="/receiver/orderv2/orders/edit_ckimg" data-params-ifcheck="1" data-params-type="5" data-params-id="<?=$info['id']?>" class="am-btn am-btn-xs am-btn-primary">审核通过</button>
|
||||
<button data-ajax="post" data-action="/receiver/orderv2/orders/edit_ckimg" data-params-ifcheck="0" data-params-type="5" data-params-id="<?=$info['id']?>" class="am-btn am-btn-xs am-btn-danger">审核不通过</button>
|
||||
<?}?>
|
||||
-->
|
||||
</p>
|
||||
<ul class="photopic-list ml30 clearfix">
|
||||
<?if($info['imgs_status']['other_img']['imgs']){?>
|
||||
<? foreach ($info['imgs_status']['other_img']['imgs'] as $key=>$val) {?>
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('data','other_img','<?=$val?>')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-5<?=$key?>">
|
||||
<img src="<?=$val?>" @click="show_carimg(5<?=$key?>)"/>
|
||||
</a>
|
||||
<!--
|
||||
<div class="f16">审核结果:
|
||||
<span class="am-text-<?=$info['imgs_status']['other_img']['status_cls']?>"><?=$info['imgs_status']['other_img']['status_cn']?></span>
|
||||
</div>
|
||||
-->
|
||||
</li>
|
||||
<?}?>
|
||||
<?}?>
|
||||
@@ -361,4 +315,23 @@
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
function del_img(type,field,value){
|
||||
layer.confirm('您确定要删除?', {icon: 3, title:'提示'}, function(index){
|
||||
layer.close(index);
|
||||
$.post("/receiver/orderv2/orders/del_img", {
|
||||
'id': <?=$info['id']?>,
|
||||
'type': type,
|
||||
'field': field,
|
||||
'value': value,
|
||||
}, function (data) {
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -58,19 +58,12 @@
|
||||
<div class="am-form-inline">
|
||||
<?if(is_img($info['loan_info']['notify_file_name'])){?>
|
||||
<ul class="photopic-list ml30 clearfix">
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('load_info','notify_file','')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-101">
|
||||
<img :src="info.loan_info.notify_file" @click="show_carimg(101)"/>
|
||||
</a>
|
||||
<div class="f12 tc"></div>
|
||||
<!--
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="business_licence" data-mark="compalbum">
|
||||
<input type="hidden" class="" name="business_licence" data-type="1" value="" onchange="upLoan(0,this)">
|
||||
<img :src="info.loan_info.notify_file" />
|
||||
</a>
|
||||
<div class="tc f12"></div>
|
||||
-->
|
||||
</li>
|
||||
</ul>
|
||||
<?}else{?>
|
||||
@@ -97,19 +90,12 @@
|
||||
<div class="am-form-inline">
|
||||
<?if(is_img($info['loan_info']['lend_file_name'])){?>
|
||||
<ul class="photopic-list ml30 clearfix">
|
||||
<li>
|
||||
<li style="position:relative;">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;" onclick="del_img('load_info','lend_file','')">x</div>
|
||||
<a target="_blank" class="pic" id="layer-photos-demo-100">
|
||||
<img :src="info.loan_info.lend_file" @click="show_carimg(100)"/>
|
||||
</a>
|
||||
<div class="f12 tc"></div>
|
||||
<!--
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="business_licence" data-mark="compalbum">
|
||||
<input type="hidden" class="" name="business_licence" data-type="1" value="" onchange="upLoan(1,this)">
|
||||
<img :src="info.loan_info.lend_file" />
|
||||
</a>
|
||||
<div class="tc f12"></div>
|
||||
-->
|
||||
</li>
|
||||
</ul>
|
||||
<?}else{?>
|
||||
|
||||
@@ -271,7 +271,7 @@ class Biz extends HD_Controller
|
||||
'biz_id' => $val['biz_id'],
|
||||
'title' => $insurance_img['product'],
|
||||
'type' => 2,
|
||||
"json_extract(jsondata, '$.type') = '1'" => null,
|
||||
"json_extract(jsondata, '$.type') = '2'" => null,
|
||||
"json_extract(jsondata, '$.s_time') >= '{$time}'" => null,
|
||||
"json_extract(jsondata, '$.e_time') <= '{$time}'" => null
|
||||
];
|
||||
@@ -282,7 +282,7 @@ class Biz extends HD_Controller
|
||||
'title' => $insurance_img['product'],
|
||||
'type' => 2,
|
||||
'is_def' => 1,
|
||||
"json_extract(jsondata, '$.type') = '1'" => null,
|
||||
"json_extract(jsondata, '$.type') = '2'" => null,
|
||||
];
|
||||
$fd_row = $this->biz_settle_srv_model->get($where);
|
||||
}
|
||||
@@ -297,7 +297,7 @@ class Biz extends HD_Controller
|
||||
'biz_id' => $val['biz_id'],
|
||||
'title' => $business_img['product'],
|
||||
'type' => 2,
|
||||
"json_extract(jsondata, '$.type') = '2'" => null,
|
||||
"json_extract(jsondata, '$.type') = '1'" => null,
|
||||
"json_extract(jsondata, '$.s_time') >= '{$time}'" => null,
|
||||
"json_extract(jsondata, '$.e_time') <= '{$time}'" => null
|
||||
];
|
||||
@@ -308,7 +308,7 @@ class Biz extends HD_Controller
|
||||
'title' => $business_img['product'],
|
||||
'type' => 2,
|
||||
'is_def' => 1,
|
||||
"json_extract(jsondata, '$.type') = '2'" => null,
|
||||
"json_extract(jsondata, '$.type') = '1'" => null,
|
||||
];
|
||||
$bis_fd_row = $this->biz_settle_srv_model->get($where);
|
||||
}
|
||||
@@ -339,7 +339,21 @@ class Biz extends HD_Controller
|
||||
$fd_jsondata = json_decode($fd_row['jsondata'],true);
|
||||
$loan_fd = $fd_jsondata['rebate'] ? $fd_jsondata['rebate']/100:0;
|
||||
$profix_loan = $money_json['price_loan']*$loan_fd;
|
||||
//获取贷款手续费
|
||||
$srv_loan = 0;
|
||||
$srv_json = json_decode($val['srv_ids'],true);
|
||||
if($srv_json){
|
||||
foreach ($srv_json as $v2) {
|
||||
if($v2['key']=='price_finance'){
|
||||
$srv_loan = $v2['price'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$profix_loan += $srv_loan;
|
||||
}
|
||||
$settle_money_json['profix_insuer_ins'] = $profix_insuer_ins;
|
||||
$settle_money_json['profix_insuer_bis'] = $profix_insuer_bis;
|
||||
$settle_money_json['in']['commission'] = $profix_loan+$profix_insuer;
|
||||
//精品成本(赠送的也要算)
|
||||
$profix_fine = 0;
|
||||
|
||||
@@ -68,6 +68,18 @@ class Business extends Wxapp{
|
||||
's_effect_time<=' => $e_time,
|
||||
];
|
||||
$row = $this->auto_business_model->get($where);
|
||||
if(!$row){
|
||||
$where = [
|
||||
'city_id' => $old_business_row['city_id'],
|
||||
'brand_id' => $old_business_row['brand_id'],
|
||||
's_id' => $s_id,
|
||||
'v_id' => $v_id,
|
||||
'if_effect' => 1,
|
||||
'status' => 1
|
||||
];
|
||||
$new_row = $this->auto_business_model->select($where,'id desc',1,1);
|
||||
$row = $new_row ? $new_row[0] : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user