|
@@ -439,6 +439,7 @@ import {
|
|
|
workflowPrevious,
|
|
|
workflowRecall,
|
|
|
workflowRecallParams,
|
|
|
+ workflowReject,
|
|
|
} from '@/api/system/workflow';
|
|
|
import { delayApply, delayApproveParams, delayBaseData, delayCalcEndTime, workflowDelayParams } from '@/api/business/delay';
|
|
|
import { discernApply, discernApproveParams, screenBaseData, workflowDiscernParams } from '@/api/business/discern';
|
|
@@ -997,7 +998,7 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
case '延期审批':
|
|
|
if (state.ruleForm.isPass) {
|
|
|
// 审批通过 下一步
|
|
|
- workflowNext({ ...submitObj,reviewResult:1, files: handleFiles.value })
|
|
|
+ workflowNext({ ...submitObj, files: handleFiles.value })
|
|
|
.then(() => {
|
|
|
afterSubmit('orderProcessSuccess', true);
|
|
|
})
|
|
@@ -1005,14 +1006,19 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
afterSubmit('orderProcessFailed');
|
|
|
});
|
|
|
} else {
|
|
|
- // 审批拒绝
|
|
|
- workflowNext({ ...submitObj,reviewResult:2, files: handleFiles.value })
|
|
|
- .then(() => {
|
|
|
- afterSubmit('orderProcessSuccess', true);
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- afterSubmit('orderProcessFailed');
|
|
|
- });
|
|
|
+ // 审批拒绝
|
|
|
+ const requestDelayAudit = {
|
|
|
+ opinion: state.ruleForm.opinion,
|
|
|
+ workflowId: state.workflowId,
|
|
|
+ files: handleFiles.value,
|
|
|
+ };
|
|
|
+ workflowReject(requestDelayAudit)
|
|
|
+ .then(() => {
|
|
|
+ afterSubmit('orderProcessSuccess', true);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ afterSubmit('orderProcessFailed');
|
|
|
+ });
|
|
|
}
|
|
|
break;
|
|
|
case '甄别申请':
|
|
@@ -1047,10 +1053,9 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
});
|
|
|
break;
|
|
|
case '甄别审批':
|
|
|
- // reviewResult 0默认 1通过 2不通过
|
|
|
if (state.ruleForm.isPass) {
|
|
|
// 审批通过 下一步
|
|
|
- workflowNext({ ...submitObj,reviewResult:1, files: handleFiles.value })
|
|
|
+ workflowNext({ ...submitObj, files: handleFiles.value })
|
|
|
.then(() => {
|
|
|
afterSubmit('orderProcessSuccess', true);
|
|
|
})
|
|
@@ -1059,13 +1064,18 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
});
|
|
|
} else {
|
|
|
// 审批拒绝
|
|
|
- workflowNext({ ...submitObj,reviewResult:2, files: handleFiles.value })
|
|
|
- .then(() => {
|
|
|
- afterSubmit('orderProcessSuccess', true);
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- afterSubmit('orderProcessFailed');
|
|
|
- });
|
|
|
+ const requestDiscernAudit = {
|
|
|
+ opinion: state.ruleForm.opinion,
|
|
|
+ workflowId: state.workflowId,
|
|
|
+ files: handleFiles.value,
|
|
|
+ };
|
|
|
+ workflowReject(requestDiscernAudit)
|
|
|
+ .then(() => {
|
|
|
+ afterSubmit('orderProcessSuccess', true);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ afterSubmit('orderProcessFailed');
|
|
|
+ });
|
|
|
}
|
|
|
break;
|
|
|
case '工单退回':
|
|
@@ -1102,7 +1112,7 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
case '知识审批':
|
|
|
if (state.ruleForm.isPass) {
|
|
|
// 审批通过 下一步
|
|
|
- workflowNext({ ...submitObj,reviewResult:1, files: handleFiles.value })
|
|
|
+ workflowNext({ ...submitObj, files: handleFiles.value })
|
|
|
.then(() => {
|
|
|
afterSubmit('orderProcessSuccess', true);
|
|
|
})
|
|
@@ -1110,14 +1120,19 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
afterSubmit('orderProcessFailed');
|
|
|
});
|
|
|
} else {
|
|
|
- // 审批拒绝
|
|
|
- workflowNext({ ...submitObj,reviewResult:2, files: handleFiles.value })
|
|
|
- .then(() => {
|
|
|
- afterSubmit('orderProcessSuccess', true);
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- afterSubmit('orderProcessFailed');
|
|
|
- });
|
|
|
+ // 审批拒绝
|
|
|
+ const requestDiscernAudit = {
|
|
|
+ opinion: state.ruleForm.opinion,
|
|
|
+ workflowId: state.workflowId,
|
|
|
+ files: handleFiles.value,
|
|
|
+ };
|
|
|
+ workflowReject(requestDiscernAudit)
|
|
|
+ .then(() => {
|
|
|
+ afterSubmit('orderProcessSuccess', true);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ afterSubmit('orderProcessFailed');
|
|
|
+ });
|
|
|
}
|
|
|
break;
|
|
|
case '更新新增知识':
|