|
@@ -205,7 +205,11 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-if="!returnArr.includes(state.processType) && showHandlers">
|
|
|
- <el-form-item label="办理对象" prop="nextHandlers" :rules="[{ required: nextHandlersRequired, message: '请选择办理对象', trigger: 'change' }]">
|
|
|
+ <el-form-item
|
|
|
+ label="办理对象"
|
|
|
+ prop="nextHandlers"
|
|
|
+ :rules="[{ required: nextHandlersRequired, message: '请选择办理对象', trigger: 'change' }]"
|
|
|
+ >
|
|
|
<el-select-v2
|
|
|
v-model="state.ruleForm.nextHandlers"
|
|
|
:options="state.handlerOptions"
|
|
@@ -283,7 +287,11 @@
|
|
|
</el-col>
|
|
|
<!-- 非退回流程都需要选择并且如果选择了结束节点就不需要选择办理对象 -->
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-if="!returnArr.includes(state.processType) && showHandlers">
|
|
|
- <el-form-item label="办理对象" prop="nextHandlers" :rules="[{ required: nextHandlersRequired, message: '请选择办理对象', trigger: 'change' }]">
|
|
|
+ <el-form-item
|
|
|
+ label="办理对象"
|
|
|
+ prop="nextHandlers"
|
|
|
+ :rules="[{ required: nextHandlersRequired, message: '请选择办理对象', trigger: 'change' }]"
|
|
|
+ >
|
|
|
<el-select-v2
|
|
|
v-model="state.ruleForm.nextHandlers"
|
|
|
:options="state.handlerOptions"
|
|
@@ -446,7 +454,7 @@ import other from '@/utils/other';
|
|
|
import { useUserInfo } from '@/stores/userInfo';
|
|
|
import { storeToRefs } from 'pinia';
|
|
|
import { commonEnum } from '@/utils/constants';
|
|
|
-import { orderFlowParams, orderHandle, orderStartFlow, orderTimeConfig } from "@/api/business/order";
|
|
|
+import { orderFlowParams, orderHandle, orderStartFlow, orderTimeConfig } from '@/api/business/order';
|
|
|
import {
|
|
|
orderPrevious,
|
|
|
workflowNext,
|
|
@@ -687,7 +695,7 @@ const selectNextStep = (val: any) => {
|
|
|
const next = state.nextStepOptions.find((item: any) => item.key === val);
|
|
|
const items = next.items; //获取下一节点
|
|
|
state.ruleForm.nextStepName = next.value; // 下一节点name
|
|
|
- state.ruleForm.handlerType = next.handlerType;
|
|
|
+ state.ruleForm.handlerType = next.handlerType;
|
|
|
state.ruleForm.backToCountersignEnd = next.backToCountersignEnd ?? false; // 是否回到会签结束节点
|
|
|
state.handlerOptions = items ?? [];
|
|
|
state.handlerOptions = state.handlerOptions.map((item: any) => {
|
|
@@ -701,9 +709,10 @@ const selectNextStep = (val: any) => {
|
|
|
fastStepName.value = next.recommendOrgName; // 推荐派单处理对象
|
|
|
fastStepCode.value = next.recommendOrgId; // 推荐派单处理对象code
|
|
|
|
|
|
- if(items.length === 1){ // 如果办理对象只有一个默认选中
|
|
|
- state.ruleForm.nextHandlers = [items[0]];
|
|
|
- }
|
|
|
+ if (items.length === 1) {
|
|
|
+ // 如果办理对象只有一个默认选中
|
|
|
+ state.ruleForm.nextHandlers = [items[0]];
|
|
|
+ }
|
|
|
};
|
|
|
// 会签是否可用 (多个办理对象,并且配置可以会签)
|
|
|
const countersignAble = computed(() => {
|
|
@@ -804,6 +813,14 @@ const selectHandlers = () => {
|
|
|
if (state.ruleForm.nextHandlers.length > 1) {
|
|
|
// 多个办理对象 主办
|
|
|
state.ruleForm.nextMainHandler = state.ruleForm.nextHandlers[0].key;
|
|
|
+ // 001170:省12345平台 001177:省12345交办 这两个对应的办理对象不能参与会签
|
|
|
+ const cantSelect = ['001170', '001177'];
|
|
|
+ const isProvince12345 = state.ruleForm.nextHandlers.find((item: any) => cantSelect.includes(item.key));
|
|
|
+ if (isProvince12345) {
|
|
|
+ // 如果选择了省12345平台或者省12345交办就提示不能参与会签 并且从选择中移除
|
|
|
+ ElMessage.warning('省12345平台和省12345交办不能参与会签');
|
|
|
+ state.ruleForm.nextHandlers = state.ruleForm.nextHandlers.filter((item: any) => item.key !== '001170' && item.key !== '001177');
|
|
|
+ }
|
|
|
}
|
|
|
if (state.ruleForm.nextHandlers.length <= 1) {
|
|
|
// 如果只有一个办理对象就不需要发起会签
|
|
@@ -812,11 +829,14 @@ const selectHandlers = () => {
|
|
|
};
|
|
|
// 办理对象是否必填
|
|
|
const nextHandlersRequired = ref<Boolean>(false);
|
|
|
-watch(() => state.ruleForm.nextStepCode,(val)=>{
|
|
|
- const next = state.nextStepOptions.find((item: any) => item.key === val);
|
|
|
- if (!next) return true;
|
|
|
- nextHandlersRequired.value = ![0].includes(next.handlerType);
|
|
|
-})
|
|
|
+watch(
|
|
|
+ () => state.ruleForm.nextStepCode,
|
|
|
+ (val) => {
|
|
|
+ const next = state.nextStepOptions.find((item: any) => item.key === val);
|
|
|
+ if (!next) return true;
|
|
|
+ nextHandlersRequired.value = ![0].includes(next.handlerType);
|
|
|
+ }
|
|
|
+);
|
|
|
|
|
|
// 是否展示主办
|
|
|
const showMainHandler = computed(() => {
|
|
@@ -878,10 +898,10 @@ const chooseAdviceDiscern = (item: any) => {
|
|
|
const chooseAdviceRedo = (item: any) => {
|
|
|
state.redoForm.redoOpinion += item.content;
|
|
|
};
|
|
|
-const afterSubmit = (emitType?: 'orderProcessSuccess' | 'orderProcessFailed', showMessage?: boolean,message?:string) => {
|
|
|
+const afterSubmit = (emitType?: 'orderProcessSuccess' | 'orderProcessFailed', showMessage?: boolean, message?: string) => {
|
|
|
state.loading = false;
|
|
|
closeDialog();
|
|
|
- const msg = message ?? '操作成功';
|
|
|
+ const msg = message ?? '操作成功';
|
|
|
if (showMessage) ElMessage.success(msg);
|
|
|
if (emitType) emit(emitType);
|
|
|
};
|
|
@@ -900,10 +920,10 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
formEl.validate((valid: boolean) => {
|
|
|
if (!valid) return;
|
|
|
let isAuditText = '确认办理';
|
|
|
- // expiredStatus 超期状态(0正常 1即将超期 2已超期) 工单流转选择“结束”节点,点击“办理”时需验证该工单是否处于已超期状态
|
|
|
- if(state.orderDetail.expiredStatus === 2 && state.ruleForm.nextStepCode=== 'end'){
|
|
|
- isAuditText = '该工单属于超期状态,若符合延期要求,请延期通过后办结,是否继续办理'
|
|
|
- }
|
|
|
+ // expiredStatus 超期状态(0正常 1即将超期 2已超期) 工单流转选择“结束”节点,点击“办理”时需验证该工单是否处于已超期状态
|
|
|
+ if (state.orderDetail.expiredStatus === 2 && state.ruleForm.nextStepCode === 'end') {
|
|
|
+ isAuditText = '该工单属于超期状态,若符合延期要求,请延期通过后办结,是否继续办理';
|
|
|
+ }
|
|
|
ElMessageBox.confirm(`${isAuditText}?`, '提示', {
|
|
|
confirmButtonText: '确认',
|
|
|
cancelButtonText: '取消',
|
|
@@ -972,7 +992,7 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
};
|
|
|
delayApply(requestDelay)
|
|
|
.then(() => {
|
|
|
- afterSubmit('orderProcessSuccess', true,'延期申请成功');
|
|
|
+ afterSubmit('orderProcessSuccess', true, '延期申请成功');
|
|
|
})
|
|
|
.catch(() => {
|
|
|
afterSubmit('orderProcessFailed');
|
|
@@ -1029,7 +1049,7 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
};
|
|
|
discernApply(requestDiscern)
|
|
|
.then(() => {
|
|
|
- afterSubmit('orderProcessSuccess', true,'甄别申请成功');
|
|
|
+ afterSubmit('orderProcessSuccess', true, '甄别申请成功');
|
|
|
})
|
|
|
.catch(() => {
|
|
|
afterSubmit('orderProcessFailed');
|
|
@@ -1097,7 +1117,7 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
});
|
|
|
break;
|
|
|
case '工单办理': // 工单办理流程
|
|
|
- orderHandle({ ...submitObj, files: handleFiles.value })
|
|
|
+ orderHandle({ ...submitObj, files: handleFiles.value })
|
|
|
.then(() => {
|
|
|
afterSubmit('orderProcessSuccess', true);
|
|
|
})
|
|
@@ -1158,13 +1178,13 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
});
|
|
|
break;
|
|
|
default: // 默认工单办理
|
|
|
- orderHandle({ ...submitObj, files: handleFiles.value })
|
|
|
- .then(() => {
|
|
|
- afterSubmit('orderProcessSuccess', true);
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- afterSubmit('orderProcessFailed');
|
|
|
- });
|
|
|
+ orderHandle({ ...submitObj, files: handleFiles.value })
|
|
|
+ .then(() => {
|
|
|
+ afterSubmit('orderProcessSuccess', true);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ afterSubmit('orderProcessFailed');
|
|
|
+ });
|
|
|
break;
|
|
|
}
|
|
|
})
|