This commit is contained in:
2026-09-21 11:14:51 +08:00
parent 7078de6385
commit 57368f0179
15 changed files with 647 additions and 39 deletions
+23 -9
View File
@@ -1500,7 +1500,7 @@ import {
getDetail as getCreditScoreQuantificationDetail,
} from '@/api/vehicle/credit-score-quantification';
import { getDictionary } from '@/api/system/dictbiz';
import { processSubmit } from '@/api/system/business-process';
import { processDelete, processSubmit } from '@/api/system/business-process';
import { getDeptTree } from '@/api/system/dept';
import { getLazyTree } from '@/api/base/region';
import { exportBlob } from '@/api/common';
@@ -4152,7 +4152,11 @@ export default {
archive.fullName ||
this.archiveForm.fullName ||
'';
this.submitCustomerApproval(id, fullName).then(() => {
this.submitCustomerApproval(
id,
fullName,
archive.approvalStatus || this.archiveForm.approvalStatus
).then(() => {
this.closeArchive();
this.onLoad(this.page);
this.$message({ type: 'success', message: '提交成功!' });
@@ -4163,15 +4167,19 @@ export default {
/**
* 列表 / 新增 / 编辑提交共用:提交 MK 审核流并更新客商审批状态
*/
submitCustomerApproval(id, fullName = '') {
return this.submitMkApprovalFlow(id, fullName).then(() => submitApproval(id));
submitCustomerApproval(id, fullName = '', approvalStatus = '') {
return this.submitMkApprovalFlow(id, fullName, approvalStatus).then(() => submitApproval(id));
},
/**
* 提交 MK 审核流:templateCode 取业务字典 mk_template 中「提交审核流」的键值
* 提交 MK 审核流:templateCode 取业务字典 mk_template 中「提交客商审核流」的键值
* 提交人手机号由后端从用户表读取真实值(前端接口会脱敏)
* MK 驳回后再提交时,先删除旧流程再创建新流程
*/
async submitMkApprovalFlow(formInstanceId, subjectName = '') {
const templateCode = await this.resolveMkTemplateCode('提交审核流');
async submitMkApprovalFlow(formInstanceId, subjectName = '', approvalStatus = '') {
if (approvalStatus === 'rejected') {
await processDelete({ formInstanceId: String(formInstanceId) });
}
const templateCode = await this.resolveMkTemplateCode('提交客商审核流');
const subject = subjectName
? `客商准入审批:${subjectName}`
: `客商准入审批:${formInstanceId}`;
@@ -4181,7 +4189,7 @@ export default {
subject,
});
},
async resolveMkTemplateCode(dictName = '提交审核流') {
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);
@@ -4782,7 +4790,13 @@ export default {
cancelButtonText: '取消',
type: 'warning',
})
.then(() => this.submitCustomerApproval(row.id, archive.fullName || row.fullName))
.then(() =>
this.submitCustomerApproval(
row.id,
archive.fullName || row.fullName,
archive.approvalStatus || row.approvalStatus
)
)
.then(() => {
this.onLoad(this.page);
this.$message({ type: 'success', message: '提交成功!' });