Browse Source

reactor:退回单独拆分;

zhangchong 2 months ago
parent
commit
531c7e0a55

+ 4 - 4
src/components/OrderDetail/index.vue

@@ -1126,10 +1126,10 @@ const orderProcessSuccess = () => {
 // 工单退回
 const orderReturnRef = ref<RefType>();
 const onReturn = () => {
-	if (state.ruleForm.isReturnUnderApproval) {
-		ElMessage.warning(`该工单存在正在审核中的退回,不能办理!`);
-		return;
-	}
+  if (state.ruleForm.isReturnUnderApproval) {
+    ElMessage.warning(`该工单存在正在审核中的退回,不能办理!`);
+    return;
+  }
 	orderReturnRef.value.openDialog(state.ruleForm);
 };
 // 补充信息

+ 1 - 1
src/components/ProcessAudit/LZProcess.vue

@@ -500,7 +500,7 @@
 </template>
 
 <script setup lang="ts" name="processApproval">
-import { computed, defineAsyncComponent, nextTick, reactive, ref, watch } from 'vue';
+import { computed, defineAsyncComponent, reactive, ref, watch } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
 import other from '@/utils/other';
 import { storeToRefs } from 'pinia';

+ 18 - 2
src/views/business/order/components/Order-return.vue

@@ -11,6 +11,9 @@
 		@close="close"
 	>
 		<el-form :model="state.ruleForm" label-width="90px" ref="ruleFormRef" v-loading="state.loading">
+			<el-form-item prop="isSms" v-if="isShowReturnSms">
+				<el-checkbox v-model="state.ruleForm.isSms" label="短信通知" />
+			</el-form-item>
 			<el-form-item label="退回意见" class="textarea" prop="opinion" :rules="[{ required: true, message: '请填写退回意见', trigger: 'blur' }]">
 				<common-advice
 					@chooseAdvice="chooseAdvice"
@@ -52,7 +55,7 @@ const state = reactive<any>({
 	dialogVisible: false,
 	ruleForm: {
 		opinion: null, // 退回原因
-		isSendSms: false, // 是否发送短信
+		isSms: false, // 是否发送短信
 		orderId: null,
 		workflowId: null,
 		nextStepCode: '', // 下一节点
@@ -73,6 +76,7 @@ const getSubmitObj = async (val: any) => {
 		state.ruleForm.orderId = val.id;
 		state.ruleForm.workflowId = val.workflowId;
 		console.log(result);
+		handleResultReturn(result);
 		state.loading = false;
 	} catch (e) {
 		state.loading = false;
@@ -86,7 +90,19 @@ const openDialog = (val: any) => {
 	state.dialogVisible = true;
 	getSubmitObj(val);
 };
-
+// 处理退回 currentBusinessType   表示选择节点到哪一步  0 坐席 1派单  2部门节点  3部门领导节点
+// targetBusinessType  0 坐席 1派单  2部门节点  3部门领导节点
+const isShowReturnSms = ref(false);
+const handleResultReturn = (result: any) => {
+	// 部门退部门需要默认选中短信
+	if (result.currentBusinessType === 2 && result.targetBusinessType === 2) {
+		isShowReturnSms.value = true;
+		state.ruleForm.isSms = true;
+	} else {
+		isShowReturnSms.value = false;
+		state.ruleForm.isSms = false;
+	}
+};
 // 关闭弹窗
 const closeDialog = () => {
 	state.dialogVisible = false;