Browse Source

Merge branch 'master' into dev

# Conflicts:
#	src/views/business/publish/component/Order-redo.vue
zhangchong 1 year ago
parent
commit
9634174d69

+ 8 - 16
src/views/business/publish/component/Order-redo.vue

@@ -56,14 +56,9 @@
 						</el-form-item>
 					</el-col>
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-						<el-form-item
-							label="错件类别"
-							:rules="[{ required: true, message: '请选择错件类别', validator: validatePass, trigger: 'change' }]"
-							prop="error"
-						>
+						<el-form-item label="错件类别" :rules="[{ required: true, message: '请选择错件类别', trigger: 'change' }]" prop="error">
 							<el-checkbox v-model="state.ruleForm.error" @change="selectError" style="display: none"></el-checkbox>
 							<el-row>
-								<el-text type="danger"> 注意:勾选后还需要选择类型</el-text>
 								<el-col :span="24" v-for="(item, index) in state.ruleForm.orgs" :key="item.id" class="mb18">
 									<el-form-item :prop="`orgs.${index}.reason`" :rules="[{ required: item.choose, message: '请选择错件类别', trigger: 'change' }]">
 										<template #label>
@@ -179,6 +174,9 @@ const selectNextCode = (val: any) => {
 	const items = next.items; //获取下一节点
 	state.ruleForm.nextStepName = next.value; // 下一节点name
 	handlerOptions.value = items ?? [];
+	state.ruleForm.businessType = next.businessType;
+	state.ruleForm.flowDirection = next.flowDirection;
+	state.ruleForm.handlerType = next.handlerType;
 	handlerOptions.value = handlerOptions.value.map((item: any) => {
 		return {
 			value: {
@@ -195,15 +193,7 @@ const selectNextCode = (val: any) => {
 };
 // 选择错件类别
 const selectError = () => {
-	state.ruleForm.error = !!state.ruleForm.orgs.find((item: any) => item.choose);
-};
-const validatePass = (rule: any, value: any, callback: any) => {
-	console.log(rule, value, callback);
-	if (!value) {
-		callback(new Error('请选择错件类别'));
-	} else {
-		callback();
-	}
+	state.ruleForm.error = state.ruleForm.orgs.find((item: any) => item.choose) ? true : null;
 };
 // 提交
 const onSubmit = (formEl: FormInstance | undefined) => {
@@ -231,9 +221,11 @@ const onSubmit = (formEl: FormInstance | undefined) => {
 			timeLimit: state.ruleForm.timeLimit,
 			timeLimitUnit: state.ruleForm.timeLimitUnit,
 			alterTime: !!state.ruleForm.timeLimit,
+			businessType: state.ruleForm.businessType,
+			flowDirection: state.ruleForm.flowDirection,
+			handlerType: state.ruleForm.handlerType,
 			reTransactError,
 		};
-		return;
 		redo(request)
 			.then(() => {
 				state.loading = false;

+ 1 - 1
src/views/business/publish/todo.vue

@@ -99,7 +99,7 @@ const columns = ref<any[]>([
 	{ prop: 'isProvince', label: '省/市工单', width: 100 },
 	{ prop: 'statusText', label: '发布状态', width: 100 },
 	{ prop: 'title', label: '工单标题', width: 300 },
-	{ prop: 'sourceChannel', label: '来源方式', width: 120 },
+	{ prop: 'sourceChannel', label: '来源方式' },
 	{ prop: 'acceptType', label: '受理类型', width: 150 },
 	{ prop: 'counterSignTypeText', label: '是否会签', width: 100 },
 	{ prop: 'actualHandleOrgName', label: '接办部门', width: 150 },

+ 10 - 9
src/views/business/special/components/Special-apply-order.vue

@@ -97,7 +97,6 @@ import { specialApplyBase, specialApply } from '@/api/business/special';
 import { orderTimeConfig } from '@/api/business/order';
 import { storeToRefs } from 'pinia';
 import { useUserInfo } from '@/stores/userInfo';
-import { useThemeConfig } from '@/stores/themeConfig';
 
 // 引入组件
 const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue'));
@@ -158,14 +157,16 @@ const close = () => {
 };
 // 选择节点确定处理对象
 const stores = useUserInfo();
-const storesThemeConfig = useThemeConfig();
 const { userInfos } = storeToRefs(stores);
-const selectTrace = (val: any, choose?) => {
-	const step = steps.value.find((item) => item.key === val);
+const selectTrace = (val: any, choose?:boolean) => {
+	const next = steps.value.find((item) => item.key === val);
 	if (choose) state.ruleForm.nextStepCode = val;
-	state.ruleForm.nextStepName = step?.value;
+	state.ruleForm.nextStepName = next?.value;
+  state.ruleForm.businessType = next.businessType;
+  state.ruleForm.flowDirection = next.flowDirection;
+  state.ruleForm.handlerType = next.handlerType;
 	ruleFormRef.value?.resetFields('nextHandlers');
-	stepsItems.value = step?.items ?? [];
+	stepsItems.value = next?.items ?? [];
 	stepsItems.value = stepsItems.value.map((item: any) => {
 		return {
 			value: {
@@ -181,11 +182,11 @@ const selectTrace = (val: any, choose?) => {
 			state.ruleForm.nextHandlers = [user.value];
 		}
 	}
-	state.ruleForm.flowDirection = step?.flowDirection;
+	state.ruleForm.flowDirection = next?.flowDirection;
 	const isBanzhang = userInfos.value?.monitor; // 判断当前用户是否是班长
-	const withHandler = stepsItems.value.find((item) => item.value.key === step.handler?.key); // 判断当前节点是否有之前选择的用户
+	const withHandler = stepsItems.value.find((item) => item.value.key === next.handler?.key); // 判断当前节点是否有之前选择的用户
 	if (isBanzhang && withHandler) {
-		state.ruleForm.nextHandlers = [step.handler];
+		state.ruleForm.nextHandlers = [next.handler];
 	}
 	queryHandleTime();
 };