edit-admin-loan_img

This commit is contained in:
lccsw
2022-11-22 15:22:11 +08:00
parent 86ea9a3586
commit 14f4f075c1
3 changed files with 50 additions and 12 deletions
+23 -6
View File
@@ -219,8 +219,15 @@ class Orders extends HD_Controller
if (!$row['payway']) {
$loan = $this->order_loans_model->get(['o_id' => $row['id']]);
$loan['notify_file'] = $loan['notify_file'] ? build_qiniu_image_url($loan['notify_file']) : '';
$loan['notify_file_name'] = $loan['notify_file'] ? end(explode('/', $loan['notify_file'])) : '';
$notify_file_list = [];
$file_list = explode(',',$loan['notify_file']);
if($file_list){
foreach ($file_list as $item) {
$notify_file_list[] = build_qiniu_image_url($item);
}
}
$loan['notify_file_list'] = $notify_file_list;
// $loan['notify_file_name'] = $loan['notify_file'] ? end(explode('/', $loan['notify_file'])) : '';
$loan['lend_file'] = $loan['lend_file'] ? build_qiniu_image_url($loan['lend_file']) : '';
$loan['lend_file_name'] = $loan['lend_file'] ? end(explode('/', $loan['lend_file'])) : '';
@@ -486,6 +493,7 @@ class Orders extends HD_Controller
$this->order_loans_model->add(['o_id' => $oid, 'c_time' => time()]);
$row = $this->order_loans_model->get(['o_id' => $oid]);
}
$notify_file_list = $row['notify_file'] ? explode(',',$row['notify_file']) : [];
$update = [];
$update['company_id'] = $info['loan_info']['company_id'];
$price_loan = $info['loan_info']['price_loan'];
@@ -512,7 +520,8 @@ class Orders extends HD_Controller
if ($params['type']) {
$update['lend_file'] = $res['file'];
} else {
$update['notify_file'] = $res['file'];
$notify_file_list[] = $res['file'];
$update['notify_file'] = implode(',',$notify_file_list);
}
$this->data['file_url'] = build_qiniu_image_url($res['file']);
}
@@ -1404,9 +1413,17 @@ class Orders extends HD_Controller
if(!$row){
return $this->show_json(SYS_CODE_FAIL, '参数错误');
}
$update = [
$info['field'] => ''
];
if($info['field']=='notify_file'){
$notify_file_lists = explode(',',$row['notify_file']);
unset($notify_file_lists[$info['value']]);
$update = [
$info['field'] => implode(',',$notify_file_lists)
];
}else{
$update = [
$info['field'] => ''
];
}
$res = $this->order_loans_model->update($update,['o_id'=>$info['id']]);
}
if($res){
+21 -1
View File
@@ -52,9 +52,28 @@
</div>
</div>
<div class="am-form-inline">
<div class="am-form-group am-u-lg-6">
<div class="am-form-group am-u-lg-12">
<label class="am-para-label label-width"><span class="span-bold">按揭通知函:</span></label>
<div class="am-para-input">
<label class="input-group-btn" style="width: 50px;">
<span class="am-btn am-btn-default am-btn-sm">
<i class="am-icon-cloud-upload"></i> 选择文件
<input type="file" style="display: none;" accept="jpg,png,gif,png,jpeg" @change="upTz(0,$event)">
</span>
</label>
<ul id="viewer-notify_file" class="photopic-list clearfix mt10" v-if="info.loan_info && info.loan_info.notify_file_list">
<? foreach ($info['loan_info']['notify_file_list'] as $key=>$val) {?>
<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','<?=$key?>')">x
</div>
<a target="_blank" class="pic">
<img alt="按揭通知函" onclick="showViewer('viewer-notify_file')" src="<?=$val?>"/>
</a>
<div class="f12 tc"></div>
</li>
<?}?>
</ul>
<!--
<div class="am-form-inline">
<? if (is_img($info['loan_info']['notify_file_name'])) { ?>
<ul id="viewer-notify_file" class="photopic-list ml30 clearfix">
@@ -85,6 +104,7 @@
</div>
<? } ?>
</div>
-->
</div>
</div>
<div class="am-form-group am-u-lg-6">
+6 -5
View File
@@ -118,7 +118,8 @@
this.getInfo()
if(this.info.alert_code){
this.msgisShowCode = true
// this.msgisShowCode = true
mDialog.msg('订阅成功');
}
this.getNotice()
@@ -130,11 +131,11 @@
showCode: function() {
let that = this;
if (that.info.subscribemsg == '已订阅直播') {
if(that.info.show_code){
this.msgisShowCode = true
}else{
// if(that.info.show_code){
// this.msgisShowCode = true
// }else{
mDialog.msg({content: that.info.subscribemsg});
}
// }
}else{
window.location.href = that.info.subscribemsg;
}