✨ 审核通过后保留流程按钮并跳转MK页面

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-08 18:57:49 +08:00
parent 3320155416
commit d1f804056e
10 changed files with 46 additions and 11 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ export const config = {
label: '流程',
statusProp: 'approvalStatus',
status: ['approved', 'change_approved'],
stage: ['formal', 'terminated'],
stage: ['temporary', 'formal', 'terminated'],
permission: 'contract_manage_view',
},
{
+1 -1
View File
@@ -71,7 +71,7 @@ export const config = {
action: 'mkAudit',
label: '流程',
statusProp: 'approvalStatus',
status: ['reviewing', 'change_reviewing'],
status: ['reviewing', 'change_reviewing', 'approved', 'change_approved'],
permission: 'project_apply_approve',
mkOnly: true,
},
+32 -1
View File
@@ -1019,7 +1019,8 @@ import { getDictionary as getBizDictionary } from '@/api/system/dictbiz';
import { config, option } from '@/option/business/contract-manage';
import { getToken, isAdministrator } from '@/utils/auth';
import { downloadFileByUrl, downloadXls } from '@/utils/util';
import { submitMkApprovalFlow } from '@/utils/mk-approval';
import { getMKApprovalUrl } from '@/api/system/business-process';
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
import BillingPlanEditor from './components/billing-plan-editor.vue';
import ChangeRecordDetailDialog from '@/components/change-record-detail-dialog/main.vue';
import ContractAttachmentSection, {
@@ -1301,6 +1302,7 @@ export default {
flowBox: false,
flowUrl: '',
processInstanceId: '',
mkEnabled: false,
// 页面形态在实例创建时锁定,避免 keep-alive 缓存后随全局 $route 翻转
formPageLocked: false,
detailPageLocked: false,
@@ -1520,6 +1522,13 @@ export default {
this.loadProjectOptions();
this.loadSettlementDictionaries();
this.loadOrganizationOptions();
loadMkEnabled()
.then(enabled => {
this.mkEnabled = !!enabled;
})
.catch(() => {
this.mkEnabled = false;
});
}
if (this.isFormPage) this.initFormPage();
if (this.isDetailPage) this.initDetailPage();
@@ -2858,6 +2867,10 @@ export default {
return;
}
if (operation.action === 'flow') {
if (this.mkEnabled) {
this.handleMkAudit(row);
return;
}
this.openFlow(row);
return;
}
@@ -2911,6 +2924,24 @@ export default {
query: { mode: 'add', copyId: row.id, name: '新增合同管理' },
});
},
handleMkAudit(row) {
if (!row?.id) {
this.$message.warning('合同ID为空,无法打开审核页');
return;
}
getMKApprovalUrl({ bizId: String(row.id) })
.then(res => {
const url = res?.data?.data;
if (!url) {
this.$message.error('获取审核跳转地址失败');
return;
}
window.open(url, '_blank');
})
.catch(() => {
this.$message.error('获取审核跳转地址失败');
});
},
openFlow(row, loaded = false) {
const processInstanceId = row.processInstanceId || row.processInstanceID || row.procInstId;
if (!processInstanceId && !loaded && row.id) {
@@ -61,7 +61,7 @@
<el-link
v-if="
mkEnabled &&
row.approvalStatus === 'reviewing' &&
['reviewing', 'approved'].includes(row.approvalStatus) &&
hasPermission('bill_payment_approve')
"
type="primary"
+1 -1
View File
@@ -154,7 +154,7 @@
v-if="
mkEnabled &&
hasPermission('invoice_application_approve') &&
row.approvalStatus === 'reviewing'
['reviewing', 'approved'].includes(row.approvalStatus)
"
type="primary"
@click="handleMkAudit(row)"
+1 -1
View File
@@ -149,7 +149,7 @@
v-if="
mkEnabled &&
hasPermission('invoice_receipt_approve') &&
row.approvalStatus === 'reviewing'
['reviewing', 'approved'].includes(row.approvalStatus)
"
type="primary"
@click="handleMkAudit(row)"
+1 -1
View File
@@ -163,7 +163,7 @@
v-if="
mkEnabled &&
hasPermission('payment_application_approve') &&
row.approvalStatus === 'reviewing'
['reviewing', 'approved'].includes(row.approvalStatus)
"
type="primary"
@click="handleMkAudit(row)"
@@ -194,7 +194,11 @@ export default {
actions.push({ type: 'delete', label: '删除', danger: true });
if (this.hasPermission('formal_settlement_submit') && this.isEditable(row))
actions.push({ type: 'submit', label: '提交' });
if (this.mkEnabled && this.hasPermission('formal_settlement_approve') && row.approvalStatus === 'reviewing') {
if (
this.mkEnabled &&
this.hasPermission('formal_settlement_approve') &&
['reviewing', 'approved'].includes(row.approvalStatus)
) {
actions.push({ type: 'mkAudit', label: '流程' });
}
if (!this.mkEnabled && this.hasPermission('formal_settlement_approve') && row.approvalStatus === 'reviewing') {
+1 -1
View File
@@ -185,7 +185,7 @@
v-if="
mkEnabled &&
hasPermission('pre_settlement_approve') &&
row.approvalStatus === 'reviewing'
['reviewing', 'approved'].includes(row.approvalStatus)
"
type="primary"
@click="handleMkAudit(row)"
+2 -2
View File
@@ -160,11 +160,11 @@
v-if="
mkEnabled &&
hasPermission('customer_archive_approve') &&
row.approvalStatus === 'reviewing'
['reviewing', 'approved'].includes(row.approvalStatus)
"
@click="handleMkAudit(row)"
>
审核
{{ row.approvalStatus === 'approved' ? '流程' : '审核' }}
</el-link>
<el-link
type="success"