|
@@ -541,6 +541,85 @@
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <!-- 宜宾的重办 -->
|
|
|
|
+ <template v-if="['YiBin'].includes(themeConfig.appScope)">
|
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
|
+ <el-form-item label="" prop="isTransact" :rules="[{ required: false, message: '请选择是否重办', trigger: 'change' }]">
|
|
|
|
+ <el-checkbox v-model="state.ruleForm.isTransact" @change="selectIsTransact">重办</el-checkbox>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <template v-if="state.ruleForm.isTransact">
|
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="w100">
|
|
|
|
+ <el-row :gutter="10" class="w100">
|
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="10" :xl="10">
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="流转目标"
|
|
|
|
+ prop="nextStepCode"
|
|
|
|
+ :rules="[{ required: true, message: '请选择流转目标', trigger: 'change' }]"
|
|
|
|
+ >
|
|
|
|
+ <el-select v-model="state.ruleForm.nextStepCode" placeholder="请选择流转目标" @change="selectNextCode">
|
|
|
|
+ <el-option v-for="item in steps" :value="item.key" :key="item.key" :label="item.value"> </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="10" :xl="10">
|
|
|
|
+ <el-form-item prop="timeLimit" label-width="0px" :rules="[{ required: true, message: '请填写延期数量', trigger: 'blur' }]">
|
|
|
|
+ <!-- <el-select
|
|
|
|
+ v-model="state.ruleForm.timeLimit"
|
|
|
|
+ placeholder="请选择延期数量"
|
|
|
|
+ :rules="[{ required: true, message: '请选择延期数量', trigger: 'change' }]"
|
|
|
|
+ clearable
|
|
|
|
+ >
|
|
|
|
+ <el-option v-for="item in delayOptions" :value="item.value" :key="item.value" :label="item.label" />
|
|
|
|
+ </el-select>-->
|
|
|
|
+ <el-input-number
|
|
|
|
+ v-model="state.ruleForm.timeLimit"
|
|
|
|
+ :min="1"
|
|
|
|
+ :precision="0"
|
|
|
|
+ class="w100"
|
|
|
|
+ :max="10"
|
|
|
|
+ placeholder="请填写延期数量"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="4" :xl="4">
|
|
|
|
+ <el-form-item
|
|
|
|
+ prop="timeLimitUnit"
|
|
|
|
+ label-width="0px"
|
|
|
|
+ :rules="[{ required: true, message: '请选择延期申请单位', trigger: 'change' }]"
|
|
|
|
+ >
|
|
|
|
+ <el-select v-model="state.ruleForm.timeLimitUnit" placeholder="延期申请单位" disabled>
|
|
|
|
+ <el-option v-for="item in timeType" :value="item.key" :key="item.key" :label="item.value" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
|
+ <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-option v-for="items in specialReason" :key="items.dicDataValue" :label="items.dicDataName" :value="items" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
|
+ <el-form-item label="重办意见" prop="reason" :rules="[{ required: true, message: '请填写重办意见', trigger: 'blur' }]">
|
|
|
|
+ <common-advice
|
|
|
|
+ @chooseAdvice="chooseAdvice"
|
|
|
|
+ v-model="state.ruleForm.reason"
|
|
|
|
+ placeholder="请填写重办意见"
|
|
|
|
+ :commonEnum="commonEnum.Return"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
</el-row>
|
|
</el-row>
|
|
</template>
|
|
</template>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -580,7 +659,7 @@
|
|
<visit-redo ref="visitRedoRef" @updateList="onRedoSuccess" />
|
|
<visit-redo ref="visitRedoRef" @updateList="onRedoSuccess" />
|
|
</template>
|
|
</template>
|
|
<script setup lang="tsx" name="orderFollowUpDetail">
|
|
<script setup lang="tsx" name="orderFollowUpDetail">
|
|
-import { computed, defineAsyncComponent, reactive, ref } from 'vue';
|
|
|
|
|
|
+import { computed, defineAsyncComponent, nextTick, reactive, ref } from 'vue';
|
|
import { ElMessage, FormInstance } from 'element-plus';
|
|
import { ElMessage, FormInstance } from 'element-plus';
|
|
import { commonEnum, getNowDateTime } from '@/utils/constants';
|
|
import { commonEnum, getNowDateTime } from '@/utils/constants';
|
|
import { storeToRefs } from 'pinia';
|
|
import { storeToRefs } from 'pinia';
|
|
@@ -594,6 +673,7 @@ import { specialApplyBase } from '@/api/business/special';
|
|
import { submitLog } from '@/api/public/log';
|
|
import { submitLog } from '@/api/public/log';
|
|
import { Local, Session } from '@/utils/storage';
|
|
import { Local, Session } from '@/utils/storage';
|
|
import { useAppConfig } from '@/stores/appConfig';
|
|
import { useAppConfig } from '@/stores/appConfig';
|
|
|
|
+import { publishReturnBaseData } from '@/api/business/publish';
|
|
|
|
|
|
// 引入组件
|
|
// 引入组件
|
|
const CommonAdvice = defineAsyncComponent(() => import('@/components/CommonAdvice/index.vue')); // 常用意见
|
|
const CommonAdvice = defineAsyncComponent(() => import('@/components/CommonAdvice/index.vue')); // 常用意见
|
|
@@ -612,6 +692,13 @@ const state = reactive<any>({
|
|
visitDetails: {},
|
|
visitDetails: {},
|
|
orgJudge: false, // 扭转部门满意度
|
|
orgJudge: false, // 扭转部门满意度
|
|
seatJudge: false, // 扭转坐席满意度
|
|
seatJudge: false, // 扭转坐席满意度
|
|
|
|
+ isTransact: false, // 是否重办
|
|
|
|
+
|
|
|
|
+ nextStepCode: null, // 退回节点
|
|
|
|
+ reason: '', // 重办意见
|
|
|
|
+ timeLimitUnit: 2,
|
|
|
|
+ timeLimit: 1,
|
|
|
|
+ stepType: null,
|
|
},
|
|
},
|
|
orderDetail: {}, // 工单详情
|
|
orderDetail: {}, // 工单详情
|
|
orderVisitModel: {}, // 回访详情
|
|
orderVisitModel: {}, // 回访详情
|
|
@@ -730,6 +817,7 @@ const callId = ref<string>('');
|
|
const appConfigStore = useAppConfig();
|
|
const appConfigStore = useAppConfig();
|
|
const { AppConfigInfo } = storeToRefs(appConfigStore); // 系统配置信息
|
|
const { AppConfigInfo } = storeToRefs(appConfigStore); // 系统配置信息
|
|
const openDialog = (row: any, type: string = '回访') => {
|
|
const openDialog = (row: any, type: string = '回访') => {
|
|
|
|
+ state.ruleForm.isTransact = false;
|
|
const callIdSession = Session.get(row.id);
|
|
const callIdSession = Session.get(row.id);
|
|
if (callIdSession) callId.value = callIdSession;
|
|
if (callIdSession) callId.value = callIdSession;
|
|
mittBus.on('outboundConnect', (data) => {
|
|
mittBus.on('outboundConnect', (data) => {
|
|
@@ -806,13 +894,53 @@ const selectReason = (val: any, index: number | string) => {
|
|
key: item.dicDataValue,
|
|
key: item.dicDataValue,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
- console.log(state.ruleForm.visitDetails[index].orgNoSatisfiedReason);
|
|
|
|
};
|
|
};
|
|
const close = () => {
|
|
const close = () => {
|
|
ruleFormRef.value?.clearValidate();
|
|
ruleFormRef.value?.clearValidate();
|
|
ruleFormRef.value?.resetFields();
|
|
ruleFormRef.value?.resetFields();
|
|
|
|
+ state.ruleForm.isTransact = false;
|
|
callId.value = '';
|
|
callId.value = '';
|
|
mittBus.off('outboundConnect');
|
|
mittBus.off('outboundConnect');
|
|
|
|
+ steps.value = [];
|
|
|
|
+ timeType.value = [];
|
|
|
|
+ specialReason.value = [];
|
|
|
|
+};
|
|
|
|
+// 选择是否重办
|
|
|
|
+const steps = ref<EmptyArrayType>([]); // 退回节点
|
|
|
|
+const timeType = ref<EmptyArrayType>([]); // 时间单位
|
|
|
|
+const specialReason = ref<EmptyArrayType>([]); // 重办原因
|
|
|
|
+const selectIsTransact = async (val: any) => {
|
|
|
|
+ if (val) {
|
|
|
|
+ const baseRes = await publishReturnBaseData(state.orderDetail.id);
|
|
|
|
+ timeType.value = baseRes.result?.specialTimeType ?? [];
|
|
|
|
+ steps.value = baseRes.result?.step?.steps ?? [];
|
|
|
|
+ specialReason.value = baseRes.result?.specialReason ?? [];
|
|
|
|
+ if (baseRes.result.defaultStepKey) {
|
|
|
|
+ await nextTick(() => {
|
|
|
|
+ // 如果有默认值需要默认选中
|
|
|
|
+ state.ruleForm.nextStepCode = baseRes.result.defaultStepKey;
|
|
|
|
+ state.ruleForm.nextStepName = steps.value.find((item) => item.key === baseRes.result?.defaultStepKey).value;
|
|
|
|
+ selectNextCode(baseRes.result.defaultStepKey);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ steps.value = [];
|
|
|
|
+ timeType.value = [];
|
|
|
|
+ specialReason.value = [];
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+// 选择重办节点
|
|
|
|
+const orgId = ref('');
|
|
|
|
+const orgName = ref('');
|
|
|
|
+const selectNextCode = (val: any) => {
|
|
|
|
+ const next = steps.value.find((item: any) => item.key === val);
|
|
|
|
+ state.ruleForm.nextStepName = next.value; // 下一节点name
|
|
|
|
+ state.ruleForm.businessType = next.businessType;
|
|
|
|
+ state.ruleForm.flowDirection = next.flowDirection;
|
|
|
|
+ state.ruleForm.handlerType = next.handlerType;
|
|
|
|
+ state.ruleForm.stepType = next.stepType;
|
|
|
|
+ orgId.value = next.handler.orgId;
|
|
|
|
+ orgName.value = next.handler.orgName;
|
|
};
|
|
};
|
|
// 提交
|
|
// 提交
|
|
const onSubmit = (formEl: FormInstance | undefined) => {
|
|
const onSubmit = (formEl: FormInstance | undefined) => {
|
|
@@ -820,19 +948,56 @@ const onSubmit = (formEl: FormInstance | undefined) => {
|
|
formEl.validate((valid: boolean) => {
|
|
formEl.validate((valid: boolean) => {
|
|
if (!valid) return;
|
|
if (!valid) return;
|
|
state.loading = true;
|
|
state.loading = true;
|
|
- let request = {
|
|
|
|
- ...state.ruleForm,
|
|
|
|
- // isPutThrough: !state.ruleForm.isPutThrough,
|
|
|
|
- ...state.visitDetails,
|
|
|
|
- id: visitId.value,
|
|
|
|
- isUpdate: dialogTitle.value === '修改回访结果',
|
|
|
|
- };
|
|
|
|
|
|
+ let reTransactError: any;
|
|
|
|
+ reTransactError = [
|
|
|
|
+ {
|
|
|
|
+ orgId: orgId.value,
|
|
|
|
+ orgName: orgName.value,
|
|
|
|
+ errorId: state.ruleForm.error?.dicDataValue,
|
|
|
|
+ errorName: state.ruleForm.error?.dicDataName,
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ let request: EmptyObjectType = {};
|
|
|
|
+ if (state.ruleForm.isTransact) {
|
|
|
|
+ // 重办
|
|
|
|
+ request = {
|
|
|
|
+ ...state.ruleForm,
|
|
|
|
+ // isPutThrough: !state.ruleForm.isPutThrough,
|
|
|
|
+ ...state.visitDetails,
|
|
|
|
+ id: visitId.value,
|
|
|
|
+ isUpdate: dialogTitle.value === '修改回访结果',
|
|
|
|
+ orderReTransact: {
|
|
|
|
+ workflowId: state.orderDetail.workflowId,
|
|
|
|
+ orderId: state.orderDetail.id,
|
|
|
|
+ nextStepCode: state.ruleForm.nextStepCode,
|
|
|
|
+ nextStepName: state.ruleForm.nextStepName,
|
|
|
|
+ reason: state.ruleForm.reason,
|
|
|
|
+ timeLimit: state.ruleForm.timeLimit,
|
|
|
|
+ timeLimitUnit: state.ruleForm.timeLimitUnit,
|
|
|
|
+ alterTime: !!state.ruleForm.timeLimit,
|
|
|
|
+ businessType: state.ruleForm.businessType,
|
|
|
|
+ flowDirection: state.ruleForm.flowDirection,
|
|
|
|
+ handlerType: state.ruleForm.handlerType,
|
|
|
|
+ stepType: state.ruleForm.stepType,
|
|
|
|
+ reTransactError,
|
|
|
|
+ specialType: 2, // 1特提 2重办 3退回
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+ } else {
|
|
|
|
+ request = {
|
|
|
|
+ ...state.ruleForm,
|
|
|
|
+ // isPutThrough: !state.ruleForm.isPutThrough,
|
|
|
|
+ ...state.visitDetails,
|
|
|
|
+ id: visitId.value,
|
|
|
|
+ isUpdate: dialogTitle.value === '修改回访结果',
|
|
|
|
+ };
|
|
|
|
+ }
|
|
if (callId.value) {
|
|
if (callId.value) {
|
|
request.callId = callId.value;
|
|
request.callId = callId.value;
|
|
}
|
|
}
|
|
visitOrder(request)
|
|
visitOrder(request)
|
|
.then(() => {
|
|
.then(() => {
|
|
- ElMessage.success('操作成功');
|
|
|
|
|
|
+ ElMessage.success('回访成功');
|
|
Session.remove(visitId.value);
|
|
Session.remove(visitId.value);
|
|
state.loading = false;
|
|
state.loading = false;
|
|
closeDialog();
|
|
closeDialog();
|