|
@@ -79,15 +79,9 @@
|
|
|
</el-row>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12" v-if="['ZiGong','LuZhou'].includes(themeConfig.appScope)">
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12" v-if="['ZiGong', 'LuZhou'].includes(themeConfig.appScope)">
|
|
|
<el-form-item label="错件类别" :rules="[{ required: true, message: '请选择错件类别', trigger: 'change' }]" prop="error">
|
|
|
- <el-select
|
|
|
- v-model="state.ruleForm.error"
|
|
|
- placeholder="请选择错件类别"
|
|
|
- value-key="dicDataValue"
|
|
|
- clearable
|
|
|
- style="min-width: 240px"
|
|
|
- >
|
|
|
+ <el-select v-model="state.ruleForm.error" placeholder="请选择错件类别" value-key="dicDataValue" clearable style="min-width: 240px">
|
|
|
<el-option v-for="items in reTransactErrorType" :key="items.dicDataValue" :label="items.dicDataName" :value="items" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -159,7 +153,7 @@ const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
|
*/
|
|
|
const dialogTitle = ref('业务信件退回');
|
|
|
const defaultHandlerKey = ref();
|
|
|
-const openDialog = async (val: any,title?:string) => {
|
|
|
+const openDialog = async (val: any, title?: string) => {
|
|
|
defaultHandlerKey.value = null;
|
|
|
state.orderDetail = val;
|
|
|
state.workflowId = val.workflowId;
|
|
@@ -173,13 +167,13 @@ const openDialog = async (val: any,title?:string) => {
|
|
|
state.ruleForm.orgs = baseRes.result?.orgs ?? [];
|
|
|
|
|
|
// 默认选中退回节点
|
|
|
- if(baseRes.result.defaultHandlerKey){
|
|
|
+ if (baseRes.result.defaultHandlerKey) {
|
|
|
state.ruleForm.nextStepCode = baseRes.result?.defaultStepKey;
|
|
|
- state.ruleForm.nextStepName = steps.value.find(item => item.key === baseRes.result?.defaultStepKey).value;
|
|
|
+ state.ruleForm.nextStepName = steps.value.find((item) => item.key === baseRes.result?.defaultStepKey).value;
|
|
|
defaultHandlerKey.value = baseRes.result?.defaultHandlerKey;
|
|
|
selectNextCode(baseRes.result.defaultStepKey);
|
|
|
}
|
|
|
- if(title) dialogTitle.value = title;
|
|
|
+ if (title) dialogTitle.value = title;
|
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
|
} finally {
|
|
@@ -201,7 +195,6 @@ const orgId = ref('');
|
|
|
const orgName = ref('');
|
|
|
const selectNextCode = (val: any) => {
|
|
|
ruleFormRef.value?.resetFields('nextHandlers');
|
|
|
- ruleFormRef.value?.resetFields('nextMainHandler');
|
|
|
const next = steps.value.find((item: any) => item.key === val);
|
|
|
isDepartment.value = next.businessType === 2; // 如果是部门才可以选择延期
|
|
|
const items = next.items; //获取下一节点
|
|
@@ -219,14 +212,17 @@ const selectNextCode = (val: any) => {
|
|
|
label: item.value,
|
|
|
};
|
|
|
});
|
|
|
- if(['ZiGong','LuZhou'].includes(themeConfig.value.appScope)){
|
|
|
+ if (['ZiGong', 'LuZhou'].includes(themeConfig.value.appScope)) {
|
|
|
orgId.value = next.handler.orgId;
|
|
|
orgName.value = next.handler.orgName;
|
|
|
}
|
|
|
- if(defaultHandlerKey.value){
|
|
|
- state.ruleForm.nextHandlers = [
|
|
|
- handlerOptions.value.find((item: any) => item.value.key === defaultHandlerKey.value).value,
|
|
|
- ];
|
|
|
+ if (defaultHandlerKey.value) {
|
|
|
+ const handler = handlerOptions.value.find((item: any) => item.value.key === defaultHandlerKey.value);
|
|
|
+ if (handler) {
|
|
|
+ state.ruleForm.nextHandlers = [handler.value];
|
|
|
+ } else {
|
|
|
+ state.ruleForm.nextHandlers = [];
|
|
|
+ }
|
|
|
}
|
|
|
if (items.length === 1) {
|
|
|
// 如果办理对象只有一个默认选中
|
|
@@ -243,8 +239,8 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
formEl.validate((valid: boolean) => {
|
|
|
if (!valid) return;
|
|
|
state.loading = true;
|
|
|
- let reTransactError:any;
|
|
|
- if(['YiBin'].includes(themeConfig.value.appScope)){
|
|
|
+ let reTransactError: any;
|
|
|
+ if (['YiBin'].includes(themeConfig.value.appScope)) {
|
|
|
reTransactError = state.ruleForm.orgs
|
|
|
.filter((item: any) => item.choose)
|
|
|
.map((item: any) => {
|
|
@@ -255,15 +251,15 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
errorName: item.reason.dicDataName,
|
|
|
};
|
|
|
});
|
|
|
- }else if (['ZiGong','LuZhou'].includes(themeConfig.value.appScope)) {
|
|
|
+ } else if (['ZiGong', 'LuZhou'].includes(themeConfig.value.appScope)) {
|
|
|
reTransactError = [
|
|
|
{
|
|
|
orgId: orgId.value,
|
|
|
orgName: orgName.value,
|
|
|
errorId: state.ruleForm.error.dicDataValue,
|
|
|
errorName: state.ruleForm.error.dicDataName,
|
|
|
- }
|
|
|
- ]
|
|
|
+ },
|
|
|
+ ];
|
|
|
}
|
|
|
const request = {
|
|
|
workflowId: state.orderDetail.workflowId,
|
|
@@ -280,7 +276,7 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
|
handlerType: state.ruleForm.handlerType,
|
|
|
stepType: state.ruleForm.stepType,
|
|
|
reTransactError,
|
|
|
- specialType:3, // 1特提 2重办 3退回
|
|
|
+ specialType: 3, // 1特提 2重办 3退回
|
|
|
};
|
|
|
publishReturn(request)
|
|
|
.then(() => {
|