@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user