!24 feat(bpm): 新增发起销号流程功能,流程code为dq_delete_01
* feat(bpm): 新增发起销号流程功能,流程code为dq_delete_01
This commit is contained in:
@@ -261,6 +261,12 @@
|
|||||||
onClick: handleProcess.bind(null, record),
|
onClick: handleProcess.bind(null, record),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (record.bpmStatus && record.bpmStatus !== '1') {
|
||||||
|
actions.push({
|
||||||
|
label: '发起销号流程',
|
||||||
|
onClick: handleDeleteProcess.bind(null, record),
|
||||||
|
});
|
||||||
|
}
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -298,12 +304,17 @@
|
|||||||
const FLOW_CODE = 'inspect_flow_create_01';
|
const FLOW_CODE = 'inspect_flow_create_01';
|
||||||
const FLOW_NAME = '整改任务';
|
const FLOW_NAME = '整改任务';
|
||||||
const BUSINESS_TABLE_NAME = 'dq_inspect_task';
|
const BUSINESS_TABLE_NAME = 'dq_inspect_task';
|
||||||
const FORM_URL = 'dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=0&showFeedbackInfo=1';
|
const FORM_URL = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1';
|
||||||
|
const DELETE_FLOW_CODE = 'dq_delete_01';
|
||||||
|
const DELETE_FLOW_NAME = '销号';
|
||||||
|
const DELETE_FORM_URL = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1';
|
||||||
|
const currentScheduleFlowCode = ref('');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起流程
|
* 发起流程
|
||||||
*/
|
*/
|
||||||
function handleProcess(record) {
|
function handleProcess(record) {
|
||||||
|
currentScheduleFlowCode.value = FLOW_CODE;
|
||||||
flowScheduleModalRef.value?.open({
|
flowScheduleModalRef.value?.open({
|
||||||
title: '发起整改任务流程',
|
title: '发起整改任务流程',
|
||||||
payload: { record },
|
payload: { record },
|
||||||
@@ -315,11 +326,31 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发起销号流程
|
||||||
|
*/
|
||||||
|
function handleDeleteProcess(record) {
|
||||||
|
currentScheduleFlowCode.value = DELETE_FLOW_CODE;
|
||||||
|
flowScheduleModalRef.value?.open({
|
||||||
|
title: '发起销号流程',
|
||||||
|
payload: { record },
|
||||||
|
deptOptions: getDeptOptions(record),
|
||||||
|
showSuoleaderFields: true,
|
||||||
|
isNeedAppro: record.isNeedAppro,
|
||||||
|
supDeptleaderid: record.supDeptleaderid,
|
||||||
|
supDeptleaderName: record.supDeptleaderid_dictText,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程调度确认
|
* 流程调度确认
|
||||||
*/
|
*/
|
||||||
async function handleFlowScheduleConfirm({ payload, options }) {
|
async function handleFlowScheduleConfirm({ payload, options }) {
|
||||||
const record = payload?.record || {};
|
const record = payload?.record || {};
|
||||||
|
const isDeleteFlow = currentScheduleFlowCode.value === DELETE_FLOW_CODE;
|
||||||
|
const flowCode = isDeleteFlow ? DELETE_FLOW_CODE : FLOW_CODE;
|
||||||
|
const flowName = isDeleteFlow ? DELETE_FLOW_NAME : FLOW_NAME;
|
||||||
|
const formUrl = isDeleteFlow ? DELETE_FORM_URL : FORM_URL;
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
intervalType: options.intervalType,
|
intervalType: options.intervalType,
|
||||||
@@ -327,9 +358,9 @@
|
|||||||
taskTask: {
|
taskTask: {
|
||||||
triggerType: options.triggerType,
|
triggerType: options.triggerType,
|
||||||
startTime: options.intervalStartTime,
|
startTime: options.intervalStartTime,
|
||||||
flowCode: FLOW_CODE,
|
flowCode,
|
||||||
formUrl: FORM_URL,
|
formUrl,
|
||||||
flowName: FLOW_NAME,
|
flowName,
|
||||||
jsonData: { ...record },
|
jsonData: { ...record },
|
||||||
businessTablename: BUSINESS_TABLE_NAME,
|
businessTablename: BUSINESS_TABLE_NAME,
|
||||||
businessId: record.id,
|
businessId: record.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user