|
@@ -9,6 +9,9 @@
|
|
|
<el-form-item label="工单编码" prop="No">
|
|
|
<el-input v-model.trim="state.queryParams.No" placeholder="工单编码" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="联系电话" prop="Contact">
|
|
|
+ <el-input v-model.trim="state.queryParams.Contact" placeholder="联系电话" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
<el-button @click="resetQuery(queryFormRef)" class="default-button" :loading="state.loading">
|
|
@@ -33,7 +36,7 @@
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
<el-button @click="state.dialogVisible = false" class="default-button">取 消</el-button>
|
|
|
- <el-button type="primary" @click="onSubmit(ruleFormRef)" :loading="state.loading" :disabled="isChecked">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="onSubmit" :loading="state.loading" :disabled="isChecked">确 定</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -41,7 +44,7 @@
|
|
|
<script setup lang="tsx">
|
|
|
import { ElMessage, FormInstance } from 'element-plus';
|
|
|
import { reactive, ref, defineAsyncComponent, computed } from 'vue';
|
|
|
-import { visitList } from '@/api/todo/visit';
|
|
|
+import { visitList, voiceVisitBatchXT } from '@/api/todo/visit';
|
|
|
|
|
|
const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
|
|
@@ -59,6 +62,7 @@ const state = reactive<any>({
|
|
|
QuerySelf: false, // 默认查所有
|
|
|
VisitStateQuery: 2, // 回访状态 2待回访
|
|
|
IsCountersign: false, // 是否会签
|
|
|
+ Contact: null, // 联系电话
|
|
|
},
|
|
|
total: 0, // 总数
|
|
|
dialogVisible: false, // 弹窗
|
|
@@ -106,6 +110,7 @@ const gridOptions = reactive<any>({
|
|
|
{ field: 'order.acceptType', title: '受理类型', width: 110 },
|
|
|
{ field: 'order.hotspotName', title: '热点分类', width: 150 },
|
|
|
{ field: 'order.fromPhone', title: '来电号码', width: 150 },
|
|
|
+ { field: 'order.contact', title: '联系电话', width: 150 },
|
|
|
{ field: 'order.orgLevelOneName', title: '一级部门', width: 150 },
|
|
|
{ field: 'order.actualHandleOrgName', title: '接办部门', width: 140 },
|
|
|
{
|
|
@@ -187,37 +192,36 @@ const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
};
|
|
|
// 保存
|
|
|
const ruleFormRef = ref<RefType>();
|
|
|
-const onSubmit = async (formEl: FormInstance | undefined) => {
|
|
|
- if (!formEl) return;
|
|
|
- await formEl.validate((valid: boolean) => {
|
|
|
- if (!valid) return;
|
|
|
- state.loading = true;
|
|
|
- gridOptions.loading = true;
|
|
|
- const $grid = gridRef.value;
|
|
|
- const selectRecords = $grid.getCheckboxRecords();
|
|
|
- const selectReserveRecords = $grid.getCheckboxReserveRecords();
|
|
|
- if (selectRecords.length === 0 && selectReserveRecords.length === 0) {
|
|
|
- ElMessage({
|
|
|
- message: '请至少选择一条数据',
|
|
|
- type: 'warning',
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- const selectAllRecords = [...selectRecords, ...selectReserveRecords];
|
|
|
- console.log(selectAllRecords);
|
|
|
- /* smartVisitAdd(request)
|
|
|
- .then(() => {
|
|
|
- state.loading = false;
|
|
|
- state.dialogVisible = false;
|
|
|
- ElMessage.success('操作成功');
|
|
|
- emit('updateList');
|
|
|
- gridOptions.loading = false;
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- state.loading = false;
|
|
|
- gridOptions.loading = false;
|
|
|
- });*/
|
|
|
- });
|
|
|
+const onSubmit = async () => {
|
|
|
+ state.loading = true;
|
|
|
+ gridOptions.loading = true;
|
|
|
+ const selectRecords = gridRef.value?.getCheckboxRecords();
|
|
|
+ const selectReserveRecords = gridRef.value?.getCheckboxReserveRecords();
|
|
|
+ if (selectRecords.length === 0 && selectReserveRecords.length === 0) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请至少选择一条数据',
|
|
|
+ type: 'warning',
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const selectAllRecords = [...selectRecords, ...selectReserveRecords];
|
|
|
+ const visitIds = selectAllRecords.map((item: any) => item.id);
|
|
|
+ const request = {
|
|
|
+ name: '',
|
|
|
+ visitIds,
|
|
|
+ };
|
|
|
+ voiceVisitBatchXT(request)
|
|
|
+ .then(() => {
|
|
|
+ state.loading = false;
|
|
|
+ state.dialogVisible = false;
|
|
|
+ ElMessage.success('操作成功');
|
|
|
+ emit('updateList');
|
|
|
+ gridOptions.loading = false;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ state.loading = false;
|
|
|
+ gridOptions.loading = false;
|
|
|
+ });
|
|
|
};
|
|
|
const gridRef = ref<RefType>();
|
|
|
const isChecked = computed(() => {
|