@@ -209,7 +209,7 @@ export const config = {
|
|||||||
label: '流程',
|
label: '流程',
|
||||||
statusProp: 'approvalStatus',
|
statusProp: 'approvalStatus',
|
||||||
status: ['approved', 'change_approved'],
|
status: ['approved', 'change_approved'],
|
||||||
stage: ['formal', 'terminated'],
|
stage: ['temporary', 'formal', 'terminated'],
|
||||||
permission: 'contract_manage_view',
|
permission: 'contract_manage_view',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export const config = {
|
|||||||
action: 'mkAudit',
|
action: 'mkAudit',
|
||||||
label: '流程',
|
label: '流程',
|
||||||
statusProp: 'approvalStatus',
|
statusProp: 'approvalStatus',
|
||||||
status: ['reviewing', 'change_reviewing'],
|
status: ['reviewing', 'change_reviewing', 'approved', 'change_approved'],
|
||||||
permission: 'project_apply_approve',
|
permission: 'project_apply_approve',
|
||||||
mkOnly: true,
|
mkOnly: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1019,7 +1019,8 @@ import { getDictionary as getBizDictionary } from '@/api/system/dictbiz';
|
|||||||
import { config, option } from '@/option/business/contract-manage';
|
import { config, option } from '@/option/business/contract-manage';
|
||||||
import { getToken, isAdministrator } from '@/utils/auth';
|
import { getToken, isAdministrator } from '@/utils/auth';
|
||||||
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
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 BillingPlanEditor from './components/billing-plan-editor.vue';
|
||||||
import ChangeRecordDetailDialog from '@/components/change-record-detail-dialog/main.vue';
|
import ChangeRecordDetailDialog from '@/components/change-record-detail-dialog/main.vue';
|
||||||
import ContractAttachmentSection, {
|
import ContractAttachmentSection, {
|
||||||
@@ -1301,6 +1302,7 @@ export default {
|
|||||||
flowBox: false,
|
flowBox: false,
|
||||||
flowUrl: '',
|
flowUrl: '',
|
||||||
processInstanceId: '',
|
processInstanceId: '',
|
||||||
|
mkEnabled: false,
|
||||||
// 页面形态在实例创建时锁定,避免 keep-alive 缓存后随全局 $route 翻转
|
// 页面形态在实例创建时锁定,避免 keep-alive 缓存后随全局 $route 翻转
|
||||||
formPageLocked: false,
|
formPageLocked: false,
|
||||||
detailPageLocked: false,
|
detailPageLocked: false,
|
||||||
@@ -1520,6 +1522,13 @@ export default {
|
|||||||
this.loadProjectOptions();
|
this.loadProjectOptions();
|
||||||
this.loadSettlementDictionaries();
|
this.loadSettlementDictionaries();
|
||||||
this.loadOrganizationOptions();
|
this.loadOrganizationOptions();
|
||||||
|
loadMkEnabled()
|
||||||
|
.then(enabled => {
|
||||||
|
this.mkEnabled = !!enabled;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.mkEnabled = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (this.isFormPage) this.initFormPage();
|
if (this.isFormPage) this.initFormPage();
|
||||||
if (this.isDetailPage) this.initDetailPage();
|
if (this.isDetailPage) this.initDetailPage();
|
||||||
@@ -2858,6 +2867,10 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (operation.action === 'flow') {
|
if (operation.action === 'flow') {
|
||||||
|
if (this.mkEnabled) {
|
||||||
|
this.handleMkAudit(row);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.openFlow(row);
|
this.openFlow(row);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2911,6 +2924,24 @@ export default {
|
|||||||
query: { mode: 'add', copyId: row.id, name: '新增合同管理' },
|
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) {
|
openFlow(row, loaded = false) {
|
||||||
const processInstanceId = row.processInstanceId || row.processInstanceID || row.procInstId;
|
const processInstanceId = row.processInstanceId || row.processInstanceID || row.procInstId;
|
||||||
if (!processInstanceId && !loaded && row.id) {
|
if (!processInstanceId && !loaded && row.id) {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
<el-link
|
<el-link
|
||||||
v-if="
|
v-if="
|
||||||
mkEnabled &&
|
mkEnabled &&
|
||||||
row.approvalStatus === 'reviewing' &&
|
['reviewing', 'approved'].includes(row.approvalStatus) &&
|
||||||
hasPermission('bill_payment_approve')
|
hasPermission('bill_payment_approve')
|
||||||
"
|
"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
v-if="
|
v-if="
|
||||||
mkEnabled &&
|
mkEnabled &&
|
||||||
hasPermission('invoice_application_approve') &&
|
hasPermission('invoice_application_approve') &&
|
||||||
row.approvalStatus === 'reviewing'
|
['reviewing', 'approved'].includes(row.approvalStatus)
|
||||||
"
|
"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleMkAudit(row)"
|
@click="handleMkAudit(row)"
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
v-if="
|
v-if="
|
||||||
mkEnabled &&
|
mkEnabled &&
|
||||||
hasPermission('invoice_receipt_approve') &&
|
hasPermission('invoice_receipt_approve') &&
|
||||||
row.approvalStatus === 'reviewing'
|
['reviewing', 'approved'].includes(row.approvalStatus)
|
||||||
"
|
"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleMkAudit(row)"
|
@click="handleMkAudit(row)"
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
v-if="
|
v-if="
|
||||||
mkEnabled &&
|
mkEnabled &&
|
||||||
hasPermission('payment_application_approve') &&
|
hasPermission('payment_application_approve') &&
|
||||||
row.approvalStatus === 'reviewing'
|
['reviewing', 'approved'].includes(row.approvalStatus)
|
||||||
"
|
"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleMkAudit(row)"
|
@click="handleMkAudit(row)"
|
||||||
|
|||||||
@@ -194,7 +194,11 @@ export default {
|
|||||||
actions.push({ type: 'delete', label: '删除', danger: true });
|
actions.push({ type: 'delete', label: '删除', danger: true });
|
||||||
if (this.hasPermission('formal_settlement_submit') && this.isEditable(row))
|
if (this.hasPermission('formal_settlement_submit') && this.isEditable(row))
|
||||||
actions.push({ type: 'submit', label: '提交' });
|
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: '流程' });
|
actions.push({ type: 'mkAudit', label: '流程' });
|
||||||
}
|
}
|
||||||
if (!this.mkEnabled && this.hasPermission('formal_settlement_approve') && row.approvalStatus === 'reviewing') {
|
if (!this.mkEnabled && this.hasPermission('formal_settlement_approve') && row.approvalStatus === 'reviewing') {
|
||||||
|
|||||||
@@ -185,7 +185,7 @@
|
|||||||
v-if="
|
v-if="
|
||||||
mkEnabled &&
|
mkEnabled &&
|
||||||
hasPermission('pre_settlement_approve') &&
|
hasPermission('pre_settlement_approve') &&
|
||||||
row.approvalStatus === 'reviewing'
|
['reviewing', 'approved'].includes(row.approvalStatus)
|
||||||
"
|
"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleMkAudit(row)"
|
@click="handleMkAudit(row)"
|
||||||
|
|||||||
@@ -160,11 +160,11 @@
|
|||||||
v-if="
|
v-if="
|
||||||
mkEnabled &&
|
mkEnabled &&
|
||||||
hasPermission('customer_archive_approve') &&
|
hasPermission('customer_archive_approve') &&
|
||||||
row.approvalStatus === 'reviewing'
|
['reviewing', 'approved'].includes(row.approvalStatus)
|
||||||
"
|
"
|
||||||
@click="handleMkAudit(row)"
|
@click="handleMkAudit(row)"
|
||||||
>
|
>
|
||||||
审核
|
{{ row.approvalStatus === 'approved' ? '流程' : '审核' }}
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="success"
|
type="success"
|
||||||
|
|||||||
Reference in New Issue
Block a user