diff --git a/src/option/business/contract-manage.js b/src/option/business/contract-manage.js index 4a72be5..2bb7999 100644 --- a/src/option/business/contract-manage.js +++ b/src/option/business/contract-manage.js @@ -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', }, { diff --git a/src/option/business/project-apply.js b/src/option/business/project-apply.js index 721413a..445f9cb 100644 --- a/src/option/business/project-apply.js +++ b/src/option/business/project-apply.js @@ -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, }, diff --git a/src/views/business/contract-manage.vue b/src/views/business/contract-manage.vue index c3b48e7..75130e4 100644 --- a/src/views/business/contract-manage.vue +++ b/src/views/business/contract-manage.vue @@ -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) { diff --git a/src/views/payment/components/bill-payment-table.vue b/src/views/payment/components/bill-payment-table.vue index a88608a..6e2a664 100644 --- a/src/views/payment/components/bill-payment-table.vue +++ b/src/views/payment/components/bill-payment-table.vue @@ -61,7 +61,7 @@ - 审核 + {{ row.approvalStatus === 'approved' ? '流程' : '审核' }}