@@ -624,6 +624,7 @@
<el-table-column label="开户人姓名" prop="accountHolderName" min-width="150" />
<el-table-column label="收款账号" prop="bankAccount" min-width="180" />
<el-table-column label="开户行" prop="bankName" min-width="180" />
<el-table-column label="联行号" prop="cnapsCode" min-width="160" />
<el-table-column label="备注" prop="remark" min-width="180" />
<el-table-column
label="操作"
@@ -1022,6 +1023,9 @@
<el-form-item label="开户行" prop="bankName">
<el-input v-model="receiptForm.bankName" maxlength="100" />
</el-form-item>
<el-form-item label="联行号" prop="cnapsCode">
<el-input v-model="receiptForm.cnapsCode" maxlength="32" />
</el-form-item>
<el-form-item label="收款账号" prop="bankAccount">
<el-input v-model="receiptForm.bankAccount" maxlength="50" />
</el-form-item>
@@ -1500,7 +1504,7 @@ import {
getDetail as getCreditScoreQuantificationDetail,
} from '@/api/vehicle/credit-score-quantification';
import { getDictionary } from '@/api/system/dictbiz';
import { processDelete, processSubmit } from '@/api/system/business-process ';
import { submitMkApprovalFlow } from '@/utils/mk-approval ';
import { getDeptTree } from '@/api/system/dept';
import { getLazyTree } from '@/api/base/region';
import { exportBlob } from '@/api/common';
@@ -1539,6 +1543,12 @@ export default {
OpenFileViewer,
PdfPreview,
},
props: {
embeddedPublicId: {
type: [String, Number],
default: '',
},
},
data() {
const nonNegativeLabelMap = {
invoiceTaxRate: '开票税点',
@@ -1779,6 +1789,7 @@ export default {
accountName: [{ required: true, message: '请输入收款单位名称', trigger: 'blur' }],
accountHolderName: [{ required: true, message: '请输入开户人姓名', trigger: 'blur' }],
bankName: [{ required: true, message: '请输入开户行', trigger: 'blur' }],
cnapsCode: [{ required: true, message: '请输入联行号', trigger: 'blur' }],
bankAccount: [{ required: true, message: '请输入收款账号', trigger: 'blur' }],
remark: [{ max: 200, message: '备注最多200个字符', trigger: 'blur' }],
},
@@ -1994,7 +2005,7 @@ export default {
created() {
if (this.isPublicViewPage) {
this.readonly = true;
const id = this.$route.query.id;
const id = this.embeddedPublicId || this.$route.query.id;
if (!id) {
this.archiveBox = true;
this.$message.error('缺少客商ID');
@@ -2029,7 +2040,9 @@ export default {
);
},
isPublicViewPage() {
return this.$route.path === '/vehicle/customer-archive/public-view';
return (
this.$route.path === '/vehicle/customer-archive/public-view' || !!this.embeddedPublicId
);
},
archiveContainer() {
return 'div';
@@ -2695,6 +2708,7 @@ export default {
accountName: '',
accountHolderName: '',
bankName: '',
cnapsCode: '',
bankAccount: '',
registeredPhone: '',
registeredAddress: '',
@@ -4079,7 +4093,7 @@ export default {
.filter(item => item.contactName || item.contactPhone);
archive.receiptAccounts = (archive.receiptAccounts || [])
.map(item => this.normalizeReceipt(item))
.filter(item => item.accountName || item.accountHolderName || item.bankAccount);
.filter(item => item.accountName || item.accountHolderName || item.bankAccount || item.cnapsCode );
archive.invoices = (archive.invoices || [])
.map(item => {
const invoice = this.normalizeInvoice(item);
@@ -4165,40 +4179,15 @@ export default {
});
},
/**
* 列表 / 新增 / 编辑提交共用:提交 MK 审核流并更新客商审批状态
* 列表 / 新增 / 编辑提交共用:开启 MK 时提交 审核流, 并更新客商审批状态
*/
submitCustomerApproval(id, fullName = '', approvalStatus = '') {
return this. submitMkApprovalFlow(id, fullName, approvalStatus).then(() => submitApproval(id));
} ,
/**
* 提交 MK 审核流:templateCode 取业务字典 mk_template 中「提交客商审核流」的键值
* 提交人手机号由后端从用户表读取真实值(前端接口会脱敏)
* MK 驳回后再提交时,先删除旧流程再创建新流程
*/
async submitMkApprovalFlow(formInstanceId, subjectName = '', approvalStatus = '') {
if (approvalStatus === 'rejected') {
await processDelete({ formInstanceId: String(formInstanceId) });
}
const templateCode = await this.resolveMkTemplateCode('提交客商审核流');
const subject = subjectName
? `客商准入审批:${subjectName}`
: `客商准入审批:${formInstanceId}`;
return processSubmit({
templateCode,
formInstanceId: String(formInstanceId),
subject,
});
},
async resolveMkTemplateCode(dictName = '提交客商审核流') {
const res = await getDictionary({ code: 'mk_template' });
const list = res?.data?.data || [];
const matched = list.find(item => String(item.dictValue || '').trim() === dictName);
const templateCode = matched?.dictKey;
if (!templateCode) {
this.$message.warning(`未配置业务字典 mk_template「${dictName}」,无法提交审核流`);
return Promise.reject(new Error(`未配置业务字典 mk_template「${dictName}」`));
}
return String(templateCode);
return submitMkApprovalFlow({
bizType: 'customer-archive' ,
formInstanceId: id,
subjectName: fullName,
approvalStatus,
}).then(() => submitApproval(id));
},
addScore() {
this.scoreRecordIndex = -1;
@@ -5309,6 +5298,16 @@ export default {
. invoice - form {
max - width : none ;
: deep ( . el - input ) ,
: deep ( . el - cascader ) ,
: deep ( . el - select ) {
width : 100 % ;
}
: deep ( . el - cascader . el - input ) {
width : 100 % ;
}
}
. invoice - contact - table {