|
@@ -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;
|