|
@@ -72,7 +72,7 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<!-- 来电弹单 -->
|
|
|
- <template v-if="state.createBy === 'tel'">
|
|
|
+ <template v-if="['tel', 'transfer'].includes(state.createBy)">
|
|
|
<el-form-item label="来源渠道" prop="channel">
|
|
|
<el-select v-model="state.ruleForm.channel" placeholder="请选择来源渠道" class="w100" value-key="dicDataValue" disabled>
|
|
|
<el-option v-for="item in state.channelOptions" :value="item" :key="item.dicDataValue" :label="item.dicDataName" />
|
|
@@ -94,7 +94,7 @@
|
|
|
<el-form-item label="转接来源" prop="transferPhone"> 暂无 </el-form-item>
|
|
|
</template>
|
|
|
<!-- 来电弹单 -->
|
|
|
- <template v-if="state.createBy === 'tel'">
|
|
|
+ <template v-if="['tel', 'transfer'].includes(state.createBy)">
|
|
|
<el-form-item label="转接来源" prop="transferPhone">
|
|
|
<span>[{{ state.ruleForm.transferPhone }}]</span>
|
|
|
</el-form-item>
|
|
@@ -115,7 +115,7 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<!-- 来电弹单 -->
|
|
|
- <template v-if="state.createBy === 'tel'">
|
|
|
+ <template v-if="['tel', 'transfer'].includes(state.createBy)">
|
|
|
<el-form-item label="来电号码" prop="fromPhone">
|
|
|
<el-input v-model="state.ruleForm.fromPhone" placeholder="请填写来电号码" disabled> </el-input>
|
|
|
</el-form-item>
|
|
@@ -135,7 +135,7 @@
|
|
|
<span>{{ state.ruleForm.acceptorName }}</span>
|
|
|
</template>
|
|
|
<!-- 来电弹单 -->
|
|
|
- <template v-if="state.createBy === 'tel'">
|
|
|
+ <template v-if="['tel', 'transfer'].includes(state.createBy)">
|
|
|
<span>{{ state.ruleForm.acceptorName }}</span>
|
|
|
</template>
|
|
|
<!-- 互联网来信 -->
|
|
@@ -283,7 +283,7 @@
|
|
|
multiple
|
|
|
@change="changeFocusEvent"
|
|
|
>
|
|
|
- <el-option v-for="item in state.focusOnEvents" :key="item.dicDataValue" :label="item.dicDataName" :value="item.dicDataValue" />
|
|
|
+ <el-option v-for="item in state.focusOnEvents" :key="item.dicDataValue" :label="item.dicDataName" :value="item.dicDataValue" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -485,15 +485,15 @@
|
|
|
<el-col :xs="24" :sm="12" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item>
|
|
|
<el-button class="default-button" @click="onCancel" :loading="buttonLoading"> 取消 </el-button>
|
|
|
- <!-- <el-button class="default-button" @click="save(ruleFormRef)" :loading="buttonLoading" :disabled="isSaveSuccess"> 保存 </el-button>
|
|
|
+ <!-- <el-button class="default-button" @click="save(ruleFormRef)" :loading="buttonLoading" :disabled="isSaveSuccess"> 保存 </el-button>
|
|
|
<el-button type="primary" @click="submit(ruleFormRef)" :loading="buttonLoading" v-if="canHandle" :disabled="!isSaveSuccess">
|
|
|
办理
|
|
|
</el-button>-->
|
|
|
- <el-button class="default-button" @click="save(ruleFormRef)" :loading="buttonLoading" v-if="!isSaveSuccess"> 保存 </el-button>
|
|
|
- <el-button type="primary" @click="submit(ruleFormRef)" :loading="buttonLoading" v-if="canHandle && isSaveSuccess">
|
|
|
- 办理
|
|
|
- </el-button>
|
|
|
- <el-text class="ml12" type="danger" tag="b">注意:工单内容填写或者修改后请先保存再办理。</el-text>
|
|
|
+ <el-button class="default-button" @click="save(ruleFormRef)" :loading="buttonLoading" v-if="!isSaveSuccess"> 保存 </el-button>
|
|
|
+ <el-button type="primary" @click="submit(ruleFormRef)" :loading="buttonLoading" v-if="canHandle && isSaveSuccess">
|
|
|
+ 办理
|
|
|
+ </el-button>
|
|
|
+ <el-text class="ml12" type="danger" tag="b">注意:工单内容填写或者修改后请先保存再办理。</el-text>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -549,7 +549,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts" name="orderAccept">
|
|
|
-import { computed, defineAsyncComponent, onMounted, reactive, ref, watch } from 'vue';
|
|
|
+import { computed, defineAsyncComponent, onBeforeUnmount, onMounted, reactive, ref, watch } from 'vue';
|
|
|
import type { FormInstance } from 'element-plus';
|
|
|
import { ElMessage, ElMessageBox, ElNotification } from 'element-plus';
|
|
|
import { storeToRefs } from 'pinia';
|
|
@@ -565,7 +565,7 @@ import { treeArea } from '@/api/auxiliary/area';
|
|
|
import mittBus from '@/utils/mitt';
|
|
|
import { orderRepeatEvent } from '@/api/business/repeatEvent';
|
|
|
import { removeDuplicate } from '@/utils/arrayOperation';
|
|
|
-import { Session } from '@/utils/storage';
|
|
|
+import { Local, Session } from '@/utils/storage';
|
|
|
import { watchPausable } from '@vueuse/core';
|
|
|
|
|
|
// 引入组件
|
|
@@ -1163,7 +1163,7 @@ const loadForm = async () => {
|
|
|
// route.query.createBy createBy 代表来源 tel:来电弹单 letter:互联网来信 默认表示手动创建
|
|
|
state.createBy = route.query.createBy;
|
|
|
if (route.query.createBy === 'tel') {
|
|
|
- //通话
|
|
|
+ // 来电弹单
|
|
|
state.ruleForm.sourceChannel = '电话'; //电话
|
|
|
state.ruleForm.sourceChannelCode = 'RGDH'; //电话
|
|
|
state.ruleForm.fromPhone = route.query.fromTel; // 来电号码
|
|
@@ -1183,13 +1183,35 @@ const loadForm = async () => {
|
|
|
state.ruleForm.identityType = 1;
|
|
|
}
|
|
|
}
|
|
|
+ if (route.query.createBy === 'transfer') {
|
|
|
+ // 通话转写
|
|
|
+ state.ruleForm.sourceChannel = '电话'; //电话
|
|
|
+ state.ruleForm.sourceChannelCode = 'RGDH'; //电话
|
|
|
+ state.ruleForm.fromPhone = route.query.fromTel; // 来电号码
|
|
|
+ state.ruleForm.contact = route.query.fromTel; // 联系电话
|
|
|
+ state.ruleForm.callId = route.query.callId; // 通话id
|
|
|
+ state.ruleForm.transferPhone = route.query.transfer; // 转接来源
|
|
|
+ state.ruleForm.channel = {
|
|
|
+ // 来源渠道
|
|
|
+ dicDataValue: state.ruleForm.sourceChannelCode,
|
|
|
+ dicDataName: state.ruleForm.sourceChannel,
|
|
|
+ };
|
|
|
+ state.ruleForm.acceptTypeCode = '10';
|
|
|
+ state.ruleForm.acceptType = '咨询';
|
|
|
+ state.ruleForm.acceptTypeObj = {
|
|
|
+ // 受理类型
|
|
|
+ dicDataValue: state.ruleForm.acceptTypeCode,
|
|
|
+ dicDataName: state.ruleForm.acceptType,
|
|
|
+ };
|
|
|
+ state.ruleForm.content = Local.get(`${route.query.callId}`);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (route.query.id) {
|
|
|
// 如果 有id
|
|
|
const response = await orderDetail(route.query.id);
|
|
|
// 如果获取到id 调用查询详情
|
|
|
- state.ruleForm = response.result;
|
|
|
+ state.ruleForm = Object.assign(state.ruleForm, response.result);
|
|
|
state.ruleForm.files = transformFile(response.result.files);
|
|
|
if (response.result.duplicateIds && response.result.duplicateIds.length) {
|
|
|
// 是否重复
|
|
@@ -1257,7 +1279,10 @@ const loadForm = async () => {
|
|
|
|
|
|
state.formLoading = false;
|
|
|
|
|
|
- isSaveSuccess.value = true; // 如果是修改进入 可以直接办理
|
|
|
+ isSaveSuccess.value = true; // 如果是修改进入 可以直接办理
|
|
|
+ setTimeout(() => {
|
|
|
+ watchPauseAbleFn.resume();
|
|
|
+ }, 300);
|
|
|
} else {
|
|
|
state.formLoading = false;
|
|
|
}
|
|
@@ -1316,4 +1341,9 @@ onMounted(async () => {
|
|
|
await loadForm();
|
|
|
state.tagsViewList = await Session.get('tagsViewList');
|
|
|
});
|
|
|
+onBeforeUnmount(() => {
|
|
|
+ if (route.query.createBy && route.query.createBy === 'transfer') {
|
|
|
+ Local.remove(`${route.query.callId}`);
|
|
|
+ }
|
|
|
+});
|
|
|
</script>
|