This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-04-03 17:53:11 +08:00
parent db58cbaea5
commit f06b44b41e
3 changed files with 92 additions and 57 deletions

View File

@ -10,6 +10,14 @@
import request from './request'
/**
* @description 银行卡审核 -- 修改 /sys/merchant/intention/edit/155
*/
export function editApi(data) {
return request.post('merchant/intention/edit/' + data.id, data)
}
/**
* @description 银行卡审核 -- 列表
*/

View File

@ -80,7 +80,8 @@
<template slot-scope="scope">
<el-button v-if="scope.row.is_check === 0" type="text" size="small"
@click="transferMark(scope.row, 1)">审核</el-button>
<el-button type="text" size="small" @click="transferMark(scope.row, 2)">查看</el-button>
<el-button type="text" size="small" @click="transferMark(scope.row, 2)">修改</el-button>
<el-button type="text" size="small" @click="transferMark(scope.row, 3)">查看</el-button>
</template>
</el-table-column>
</el-table>
@ -92,56 +93,60 @@
</el-card>
<!--审核 查看-->
<el-dialog :title="type == 1 ? '审核' : '查看'" :visible.sync="dialogVisible" width="700px" v-if="dialogVisible">
<div class="box-container">
<el-form ref="ruleForm" size="small" :model="auditForm">
<div class="section" style="padding-top:10px;">
<div class="title">商户信息</div>
<div class="list">
<div class="item"><label class="name">商户名称</label><input placeholder="请输入商户名称"
:disabled="type == 1 ? false : true" v-model="transferData.merchantInfo.mer_name"></div>
<div class="item"><label class="name">商户ID</label>{{ transferData.merchantInfo.mer_id }} </div>
<div class="item"><label class="name">开户银行</label><input placeholder="请输入开户银行"
:disabled="type == 1 ? false : true" v-model="transferData.financial_account.bank"></div>
<div class="item"><label class="name">银行账号</label><input placeholder="请输入银行账号"
:disabled="type == 1 ? false : true" v-model="transferData.financial_account.bank_code" /> </div>
<div class="item"><label class="name">开户户名</label><input placeholder="请输入开户户名"
v-model="transferData.financial_account.name" :disabled="type == 1 ? false : true" />
</div>
<div class="item"><label class="name">开户网点</label><input placeholder="请输入开户网点"
v-model="transferData.financial_account.bank_branch" :disabled="type == 1 ? false : true" /> </div>
<div class="item"><label class="name">真实姓名</label><input placeholder="请输入真实姓名"
v-model="transferData.merchantInfo.real_name" :disabled="type == 1 ? false : true" />
</div>
<div class="item"><label class="name">备注</label>{{ transferData.fail_msg ? transferData.fail_msg : '-' }}
</div>
<div class="item" v-if="transferData.financial_account.financial_img"><label class="name">凭证</label>
<el-image v-for="(item, indx) in srcParse(transferData)" :key="indx" :src="item"
:preview-src-list="srcParse(transferData)" style="width:100px;height:100px;margin-right:10px;" />
</div>
</div>
</div>
<div class="section" v-if="type == 1">
<div class="title">审核信息</div>
<div class="list">
<el-form-item label="审核状态:" class="item" prop="status"
:rules="{ required: true, message: '审核状态不能为空', trigger: 'change' }">
<el-radio-group v-model="auditForm.status" @change="radioChange">
<el-radio :label="1" class="radio">通过</el-radio>
<el-radio :label="2">拒绝</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="原因:" prop="fail_msg" class="item"
:rules="{ required: auditForm.status == 2 ? true : false, message: '拒绝原因不能为空', trigger: 'change' }">
<el-input type="textarea" v-model="auditForm.fail_msg"></el-input>
</el-form-item>
</div>
</div>
</el-form>
</div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="860px" v-if="dialogVisible">
<el-form ref="ruleForm" :model="auditForm" label-width="90px" class="box-container">
<el-row>
<el-col :span="12">
<el-form-item label="审核状态:" prop="status"
:rules="{ required: (auditForm.status == 2 && title == '审核') , message: '审核状态不能为空', trigger: 'change' }">
<el-radio-group v-model="auditForm.status" @change="radioChange" :disabled="(title == '查看' || title == '修改')">
<el-radio :label="1" class="radio">通过</el-radio>
<el-radio :label="2">拒绝</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="原因:" prop="fail_msg"
:rules="{ required: (auditForm.status == 2 && title == '审核') ? true : false, message: '拒绝原因不能为空', trigger: 'change' }">
<el-input type="textarea" v-model="auditForm.fail_msg" :rows="3" :disabled="title == '查看' || title == '修改'"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="商户名称:">
<el-input v-model="transferData.merchantInfo.mer_name" placeholder="请输入商户名称" :disabled="title == '查看'"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户银行:">
<el-input v-model="transferData.financial_account.bank" placeholder="请输入开户银行" :disabled="title == '查看'"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="银行账号:">
<el-input v-model="transferData.financial_account.bank_code" placeholder="请输入银行账号" :disabled="title == '查看'"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户户名:">
<el-input v-model="transferData.financial_account.name" placeholder="请输入开户户名" :disabled="title == '查看'"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户网点:">
<el-input v-model="transferData.financial_account.bank_branch" placeholder="请输入开户网点" :disabled="title == '查看'"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取消</el-button>
<el-button v-if="type == 1" type="primary" size="small" @click="transferReview">提交</el-button>
<el-button v-if="title != '查看'" type="primary" size="small" @click="transferReview">提交</el-button>
</span>
</el-dialog>
@ -160,7 +165,7 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { merSelectApi } from '@/api/product'
import { bankListApi, bandAuditApi } from "@/api/accounts";
import { bankListApi, bandAuditApi ,editApi} from "@/api/accounts";
import { transferRecordApi, transferDetailApi, transferReviewApi, transferEditApi, transferMarkApi, transferHeaderDataApi, transferRecordsExportApi } from '@/api/accounts'
import createWorkBook from '@/utils/newToExcel.js';
import timeOptions from '@/utils/timeOptions';
@ -195,7 +200,7 @@ export default {
status: '',
fail_msg: ''
},
type: '',//
title: '',//
}
},
mounted() {
@ -242,8 +247,18 @@ export default {
transferReview(id) {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.auditForm.id = this.transferData.id
this.auditForm.id = this.transferData.id;
this.auditForm.financial_account = this.transferData.financial_account;
if(this.title == '修改') {
editApi(this.auditForm).then(res=>{
this.$message.success(res.message);
this.dialogVisible = false;
this.getList(1);
}).catch(res => {
this.listLoading = false;
this.$message.error(res.message)
})
} else {
bandAuditApi(this.auditForm).then(res => {
this.$message.success(res.message);
this.dialogVisible = false;
@ -252,18 +267,22 @@ export default {
this.listLoading = false;
this.$message.error(res.message)
})
}
}
})
},
//
transferMark(item, type) {
console.log(item)
this.transferData = JSON.parse(JSON.stringify(item));
this.auditForm.status = '';
this.auditForm.fail_msg = '';
this.auditForm.status = item.is_check;
this.auditForm.fail_msg = item.fail_msg;
this.dialogVisible = true;
this.type = type;
if (type == 1) this.title = '审核';
if (type == 2) this.title = '修改';
if (type == 3) this.title = '查看';
},
//
@ -387,7 +406,6 @@ export default {
padding: 0 10px;
}
.section {
padding: 10px 0 30px;
border-bottom: 1px dashed #eeeeee;

View File

@ -94,6 +94,15 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="批发类型:" prop="wholesale">
<el-select v-model="merData.wholesale" placeholder="请选择批发类型" class="selWidth">
<el-option label="仅零售" :value="0"></el-option>
<el-option label="仅批发" :value="1"></el-option>
<el-option label="零售+批发" :value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注:" prop="mark">
<el-input type="textarea" size="small" v-model="merData.mark" placeholder="请填写备注" class="selWidth" />