소스 검색

reactor:对接受理类型统计;

zhangchong 9 달 전
부모
커밋
c698026b38
2개의 변경된 파일50개의 추가작업 그리고 14개의 파일을 삭제
  1. 33 0
      src/views/statistics/order/detailAcceptType.vue
  2. 17 14
      src/views/statistics/order/subRegional.vue

+ 33 - 0
src/views/statistics/order/detailAcceptType.vue

@@ -39,6 +39,11 @@
 				:exportMethod="statisticsOrderAcceptListDetailExport"
 				:exportParams="requestParams"
 			>
+				<template #tableHeader="scope">
+					<el-button type="primary" @click="onJbExport" :disabled="!scope.isSelected" :loading="state.loading"
+						><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出
+					</el-button>
+				</template>
 				<template #expiredStatusText="{ row }">
 					<span :class="'overdue-status-' + row.expiredStatus" :title="row.expiredStatusText"></span>
 				</template>
@@ -62,6 +67,9 @@ import { formatDate } from '@/utils/formatTime';
 import { statisticsOrderAcceptListDetail, statisticsOrderAcceptListDetailExport } from '@/api/statistics/order';
 import ProTable from '@/components/ProTable/index.vue';
 import { shortcuts } from '@/utils/constants';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import { exportJbOrder } from '@/api/business/order';
+import { downloadZip } from '@/utils/tools';
 
 // 引入组件
 const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
@@ -85,6 +93,7 @@ const router = useRouter(); // 路由
 const proTableRef = ref<RefType>(); // 表格ref
 // 表格配置项
 const columns = ref<any[]>([
+	{ type: 'selection', fixed: 'left', width: 55, align: 'center' },
 	{ prop: 'expiredStatusText', label: '超期状态', align: 'center', width: 80 },
 	{ prop: 'statusText', label: '工单状态', width: 100 },
 	{ prop: 'sourceChannel', label: '来源渠道', width: 100 },
@@ -157,6 +166,30 @@ const queryList = () => {
 			state.loading = false;
 		});
 };
+// 交办单导出
+const onJbExport = () => {
+	const ids = proTableRef.value.selectedList.map((item: any) => item.id);
+	ElMessageBox.confirm(`您确定导出选中的${proTableRef.value.selectedList.length}个工单的交办单,是否继续?`, '提示', {
+		confirmButtonText: '确认',
+		cancelButtonText: '取消',
+		type: 'warning',
+		draggable: true,
+		cancelButtonClass: 'default-button',
+		autofocus: false,
+	})
+		.then(() => {
+			state.loading = true;
+			exportJbOrder(ids)
+				.then((res: any) => {
+					downloadZip(res);
+					state.loading = false;
+				})
+				.catch(() => {
+					state.loading = false;
+				});
+		})
+		.catch(() => {});
+};
 /** 重置按钮操作 */
 const resetQuery = (formEl: FormInstance | undefined) => {
 	if (!formEl) return;

+ 17 - 14
src/views/statistics/order/subRegional.vue

@@ -40,11 +40,11 @@
 						<el-option v-for="item in identityTypeOptions" :value="item.value" :key="item.value" :label="item.key" />
 					</el-select>
 				</el-form-item>
-        <el-form-item label="热线号码" prop="CDPN">
-          <el-select v-model="state.queryParams.CDPN" placeholder="请选择热线号码" clearable @change="handleQuery">
-            <el-option v-for="item in state.callForwardingSource" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
-          </el-select>
-        </el-form-item>
+				<el-form-item label="热线号码" prop="Line">
+					<el-select v-model="state.queryParams.Line" placeholder="请选择热线号码" clearable @change="handleQuery">
+						<el-option v-for="item in state.callForwardingSource" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
+					</el-select>
+				</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(ruleFormRef)" class="default-button" :loading="state.loading">
@@ -77,7 +77,7 @@ import { FormInstance } from 'element-plus';
 import { statisticsOrderArea } from '@/api/statistics/order';
 import { defaultDate, shortcuts } from '@/utils/constants';
 import dayjs from 'dayjs';
-import {callPeriodBase} from "@/api/statistics/call";
+import { callPeriodBase } from '@/api/statistics/call';
 
 const columns = ref<any>([
 	{ prop: 'areaName', label: '区域名称' },
@@ -95,11 +95,12 @@ const state = reactive({
 		TypeId: null,
 		StartTime: null,
 		EndTime: null,
+		Line: null,
 	},
 	tableData: [], //表单
 	loading: false, // 加载
 	total: 0, // 总数
-  callForwardingSource:[]
+	callForwardingSource: [],
 });
 const identityTypeOptions = [
 	{ key: '市民', value: 1 },
@@ -140,6 +141,7 @@ const queryList = () => {
 		TypeId: state.queryParams.TypeId,
 		StartTime,
 		EndTime,
+		Line: state.queryParams.Line,
 	};
 	statisticsOrderArea(request)
 		.then((res: any) => {
@@ -183,6 +185,7 @@ const load = (row: any, treeNode: unknown, resolve: (date: any[]) => void) => {
 		EndTime,
 		AreaCode: row.areaCode,
 		TypeId: state.queryParams.TypeId,
+		Line: state.queryParams.Line,
 	};
 	statisticsOrderArea(request)
 		.then((res: any) => {
@@ -192,15 +195,15 @@ const load = (row: any, treeNode: unknown, resolve: (date: any[]) => void) => {
 };
 // 获取基础信息
 const getBaseInfo = async () => {
-  try {
-    const { result } = await callPeriodBase();
-    state.callForwardingSource = result.callForwardingSource ?? [];
-  } catch (e) {
-    console.log(e);
-  }
+	try {
+		const { result } = await callPeriodBase();
+		state.callForwardingSource = result.callForwardingSource ?? [];
+	} catch (e) {
+		console.log(e);
+	}
 };
 onMounted(() => {
-  getBaseInfo();
+	getBaseInfo();
 	queryList();
 });
 </script>