Эх сурвалжийг харах

reactor:307 新增【坐席退件明细】;309 新增【中心退件明细】

zhangchong 2 сар өмнө
parent
commit
7cd6fbe5bc

+ 50 - 0
src/api/statistics/center.ts

@@ -758,4 +758,54 @@ export const centerHotWordQuery = (params: object) => {
     method: 'get',
     params,
   });
+}
+/**
+ * @description 查询中心退件明细
+ * @param {object} params
+ */
+export const centerRefund = (params: object) => {
+  return request({
+    url: `/api/v1/StatisticalReport/getcenterreturnorderlist`,
+    method: 'get',
+    params,
+  });
+}
+/**
+ * @description 查询中心退件明细导出
+ * @param {object} data
+ */
+export const centerRefundExport = (data: object) => {
+  return request({
+    url: `/api/v1/StatisticalReport/getcenterreturnorderlist_export`,
+    method: 'post',
+    data,
+    responseType: 'blob',
+  }, {
+    reduce_data_format: false
+  });
+}
+/**
+ * @description 查询坐席退件明细
+ * @param {object} params
+ */
+export const centerRefundSeat = (params: object) => {
+  return request({
+    url: `/api/v1/StatisticalReport/getseatreturnorderlist`,
+    method: 'get',
+    params,
+  });
+}
+/**
+ * @description 查询坐席退件明细导出
+ * @param {object} data
+ */
+export const centerRefundSeatExport = (data: object) => {
+  return request({
+    url: `/api/v1/StatisticalReport/getseatreturnorderlist_export`,
+    method: 'post',
+    data,
+    responseType: 'blob',
+  }, {
+    reduce_data_format: false
+  });
 }

+ 2 - 2
src/utils/constants.ts

@@ -141,5 +141,5 @@ export const defaultTimeStartEnd: [Date, Date] = [new Date(2000, 1, 1, 0, 0, 0),
 /**
  * @description  登录密钥
  * */
-export const encryptionLoginKey = '-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgw+/x6IQPkH0A4eoF63jkLThsOXWyNBdcL9LATGy/G1yTHOr1RyKJB//iNug+V8DIoIHuFTlhgLHDbSqxvRWMONxIIF289riS6bDI4Ox/pFmOfmElFRk0lKGihaTE2Aefd6g/N+RfLLaHWztY+/voVeDTiOIw9y3tokIxjKwuJ/mQ66MkKh78AqQjjSD/3jcBP8ZhMyCJOK9XQcqvhD6WBFWkxlAqKOWggDU7YohfrbNkg3bd0oGE6zCE2EHhkcQbzGCh3lu1zf4TfKMXD+PPrr5JWDNYQTXFQklqgae+Puge7xxZGYRoi5YpIUnkQGm6zpPxhIOdxlz+Yb5geSJUQIDAQAB-----END PUBLIC KEY-----'
-
+export const encryptionLoginKey =
+	'-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgw+/x6IQPkH0A4eoF63jkLThsOXWyNBdcL9LATGy/G1yTHOr1RyKJB//iNug+V8DIoIHuFTlhgLHDbSqxvRWMONxIIF289riS6bDI4Ox/pFmOfmElFRk0lKGihaTE2Aefd6g/N+RfLLaHWztY+/voVeDTiOIw9y3tokIxjKwuJ/mQ66MkKh78AqQjjSD/3jcBP8ZhMyCJOK9XQcqvhD6WBFWkxlAqKOWggDU7YohfrbNkg3bd0oGE6zCE2EHhkcQbzGCh3lu1zf4TfKMXD+PPrr5JWDNYQTXFQklqgae+Puge7xxZGYRoi5YpIUnkQGm6zpPxhIOdxlz+Yb5geSJUQIDAQAB-----END PUBLIC KEY-----';

+ 223 - 0
src/views/statistics/center/centerReturn.vue

@@ -0,0 +1,223 @@
+<template>
+	<div class="statistics-center-center-return-container layout-padding">
+		<div class="layout-padding-auto layout-padding-view pd20">
+			<vxe-grid v-bind="gridOptions" ref="gridRef" v-on="gridEvents" @checkbox-all="selectAllChangeEvent" @checkbox-change="selectChangeEvent">
+				<template #form>
+					<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline :disabled="gridOptions.loading">
+						<el-form-item prop="slTime">
+							<statistical-time v-model="state.queryParams.slTime" @change="handleQuery" ref="statisticalTimeRef" :disabled="state.loading" />
+						</el-form-item>
+						<el-form-item label="姓名" prop="Name">
+							<el-input v-model="state.queryParams.Name" 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="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
+						</el-form-item>
+					</el-form>
+				</template>
+				<template #toolbar_buttons>
+					<el-button type="primary" @click="onJbExport" :disabled="isChecked" :loading="state.loading"
+						><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出<span v-if="checkTable.length">({{ checkTable.length }})</span></el-button
+					>
+				</template>
+				<template #order_detail="{ row }">
+					<order-detail :order="{ id: row.orderId }" @updateList="queryList">{{ row.title }}</order-detail>
+				</template>
+				<template #pager>
+					<pagination
+						@pagination="queryList"
+						:total="state.total"
+						v-model:current-page="state.queryParams.PageIndex"
+						v-model:page-size="state.queryParams.PageSize"
+						:disabled="state.loading"
+					/>
+				</template>
+			</vxe-grid>
+		</div>
+		<!--	更多查询	-->
+		<el-drawer v-model="drawer" title="更多查询" size="500px">
+			<el-form :model="state.queryParams" ref="drawerRuleFormRef" @submit.native.prevent label-width="90px" :disabled="gridOptions.loading">
+				<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="Title">
+					<el-input v-model.trim="state.queryParams.Title" placeholder="工单标题" clearable @keyup.enter="handleQuery" class="keyword-input" />
+				</el-form-item>
+			</el-form>
+			<template #footer>
+				<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+				<el-button @click="resetQuery(drawerRuleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
+			</template>
+		</el-drawer>
+	</div>
+</template>
+<script setup lang="tsx" name="statisticsCenterCenterReturn">
+import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
+import { FormInstance } from 'element-plus';
+import { defaultDate } from '@/utils/constants';
+import { exportAssignment } from '@/utils/tools';
+import Other from '@/utils/other';
+import { centerRefund, centerRefundExport } from '@/api/statistics/center';
+
+// 引入组件
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
+const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
+const StatisticalTime = defineAsyncComponent(() => import('@/components/StatisticalTime/index.vue')); // 日期类型选择组件
+// 定义变量内容
+const ruleFormRef = ref<RefType>(); // 表单ref
+const state = reactive<any>({
+	queryParams: {
+		// 查询条件
+		PageIndex: 1,
+		PageSize: 20,
+		Keyword: null, // 关键字
+		No: null, // 工单编码
+		Title: null, // 工单标题
+		slTime: defaultDate, // 受理时间
+		StartTime: null,
+		EndTime: null,
+		Name: null, // 姓名
+	},
+	tableData: [], //表单
+	loading: false, // 加载
+	total: 0, // 总数
+});
+const requestParams = ref<EmptyObjectType>({});
+const gridOptions = reactive<any>({
+	loading: false,
+	border: true,
+	showOverflow: true,
+	columnConfig: {
+		resizable: true,
+	},
+	scrollY: {
+		enabled: true,
+		gt: 100,
+	},
+	toolbarConfig: {
+		zoom: true,
+		custom: true,
+		refresh: {
+			queryMethod: () => {
+				handleQuery();
+			},
+		},
+		tools: [{ toolRender: { name: 'exportCurrent' } }, { toolRender: { name: 'exportAll' } }],
+		slots: {
+			buttons: 'toolbar_buttons',
+		},
+	},
+	customConfig: {
+		storage: true,
+	},
+	id: 'statisticsCenterCenterReturn',
+	rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
+	height: 'auto',
+	columns: [
+		{ type: 'checkbox', width: 50, align: 'center' },
+		{ field: 'no', title: '工单编码', width: 140 },
+		{
+			field: 'title',
+			title: '工单标题',
+			minWidth: 200,
+			slots: { default: 'order_detail' },
+		},
+		{ field: 'name', title: '姓名', width: 110 },
+		{
+			field: 'orderCreationTime',
+			title: '受理时间',
+			width: 160,
+			formatter: 'formatDate',
+			// sortable: true,
+		},
+		{ field: 'acceptType', title: '受理类型', width: 150 },
+		{ field: 'sourceChannel', title: '来源渠道', width: 140 },
+	],
+	data: [],
+	params: {
+		exportMethod: centerRefundExport,
+		exportParams: requestParams,
+	},
+	sortConfig: {
+		remote: true,
+	},
+});
+// 手动查询,将页码设置为1
+const handleQuery = () => {
+	state.queryParams.PageIndex = 1;
+	queryList();
+};
+/** 获取列表 */
+const queryList = () => {
+	state.loading = true;
+	gridOptions.loading = true;
+	requestParams.value = Other.deepClone(state.queryParams);
+	requestParams.value.StartTime = state.queryParams.slTime === null ? null : state.queryParams.slTime[0]; // 受理时间
+	requestParams.value.EndTime = state.queryParams.slTime === null ? null : state.queryParams.slTime[1];
+	Reflect.deleteProperty(requestParams.value, 'slTime'); // 删除无用的参数
+	state.loading = false;
+	centerRefund(requestParams.value)
+		.then((res: any) => {
+			gridOptions.data = res?.result.items ?? [];
+			state.total = res?.result.total ?? 0;
+			state.loading = false;
+			gridOptions.loading = false;
+			gridRef.value.clearCheckboxRow();
+			checkTable.value = [];
+		})
+		.catch(() => {
+			state.loading = false;
+			gridOptions.loading = false;
+			gridRef.value.clearCheckboxRow();
+			checkTable.value = [];
+		});
+};
+const gridEvents = {
+	sortChange(val: any) {
+		state.queryParams.SortField = val.order ? val.field : null;
+		// 0 升序 1 降序
+		state.queryParams.SortRule = val.order ? (val.order == 'desc' ? 1 : 0) : null;
+		handleQuery();
+	},
+};
+/** 重置按钮操作 */
+const drawerRuleFormRef = ref<RefType>();
+const drawer = ref(false);
+const statisticalTimeRef = ref<RefType>();
+const resetQuery = (formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	formEl.resetFields();
+	ruleFormRef.value?.resetFields();
+	statisticalTimeRef.value.reset();
+	queryList();
+};
+// 交办单导出
+const onJbExport = () => {
+	const ids = checkTable.value.map((item: any) => item.orderId);
+	exportAssignment(ids);
+};
+const checkTable = ref<EmptyArrayType>([]);
+const gridRef = ref<RefType>();
+const selectAllChangeEvent = ({ checked }) => {
+	if (gridRef.value) {
+		const records = gridRef.value.getCheckboxRecords();
+		checkTable.value = records;
+		console.log(checked ? '所有勾选事件' : '所有取消事件', records);
+	}
+};
+
+const selectChangeEvent = ({ checked }) => {
+	if (gridRef.value) {
+		const records = gridRef.value.getCheckboxRecords();
+		checkTable.value = records;
+		console.log(checked ? '勾选事件' : '取消事件', records);
+	}
+};
+const isChecked = computed(() => {
+	return !Boolean(checkTable.value.length);
+});
+onMounted(() => {
+	queryList();
+});
+</script>

+ 238 - 0
src/views/statistics/center/seatsReturn.vue

@@ -0,0 +1,238 @@
+<template>
+	<div class="statistics-center-seats-return-container layout-padding">
+		<div class="layout-padding-auto layout-padding-view pd20">
+			<vxe-grid v-bind="gridOptions" ref="gridRef" v-on="gridEvents" @checkbox-all="selectAllChangeEvent" @checkbox-change="selectChangeEvent">
+				<template #form>
+					<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline :disabled="gridOptions.loading">
+						<el-form-item prop="slTime">
+							<statistical-time v-model="state.queryParams.slTime" @change="handleQuery" ref="statisticalTimeRef" :disabled="state.loading" />
+						</el-form-item>
+						<el-form-item label="姓名" prop="Name">
+							<el-input v-model="state.queryParams.Name" 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="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
+						</el-form-item>
+					</el-form>
+				</template>
+				<template #toolbar_buttons>
+					<el-button type="primary" @click="onJbExport" :disabled="isChecked" :loading="state.loading"
+						><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出<span v-if="checkTable.length">({{ checkTable.length }})</span></el-button
+					>
+				</template>
+				<template #order_detail="{ row }">
+					<order-detail :order="{ id: row.orderId }" @updateList="queryList">{{ row.title }}</order-detail>
+				</template>
+				<template #pager>
+					<pagination
+						@pagination="queryList"
+						:total="state.total"
+						v-model:current-page="state.queryParams.PageIndex"
+						v-model:page-size="state.queryParams.PageSize"
+						:disabled="state.loading"
+					/>
+				</template>
+			</vxe-grid>
+		</div>
+		<!--	更多查询	-->
+		<el-drawer v-model="drawer" title="更多查询" size="500px">
+			<el-form :model="state.queryParams" ref="drawerRuleFormRef" @submit.native.prevent label-width="90PX" :disabled="gridOptions.loading">
+				<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="Title">
+					<el-input v-model.trim="state.queryParams.Title" placeholder="工单标题" clearable @keyup.enter="handleQuery" class="keyword-input" />
+				</el-form-item>
+			</el-form>
+			<template #footer>
+				<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+				<el-button @click="resetQuery(drawerRuleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
+			</template>
+		</el-drawer>
+	</div>
+</template>
+<script setup lang="tsx" name="statisticsCenterSeatsReturn">
+import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
+import { FormInstance } from 'element-plus';
+import { defaultDate } from '@/utils/constants';
+import { exportAssignment } from '@/utils/tools';
+import Other from '@/utils/other';
+import { returnBase } from '@/api/business/return';
+import { centerRefundSeat, centerRefundSeatExport } from '@/api/statistics/center';
+
+// 引入组件
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
+const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
+const StatisticalTime = defineAsyncComponent(() => import('@/components/StatisticalTime/index.vue')); // 日期类型选择组件
+// 定义变量内容
+const ruleFormRef = ref<RefType>(); // 表单ref
+const state = reactive<any>({
+	queryParams: {
+		// 查询条件
+		PageIndex: 1,
+		PageSize: 20,
+		Keyword: null, // 关键字
+		No: null, // 工单编码
+		Title: null, // 工单标题
+		slTime: defaultDate, // 受理时间
+		StartTime: null,
+		EndTime: null,
+		IndustrialName: null, // 行业名称
+		HotspotSpliceName: null, // 热点全称
+		OrgLevelOneName: null, // 一级部门
+		ActualHandleOrgName: null, // 接办部门
+	},
+	tableData: [], //表单
+	loading: false, // 加载
+	total: 0, // 总数
+});
+const requestParams = ref<EmptyObjectType>({});
+const gridOptions = reactive<any>({
+	loading: false,
+	border: true,
+	showOverflow: true,
+	columnConfig: {
+		resizable: true,
+	},
+	scrollY: {
+		enabled: true,
+		gt: 100,
+	},
+	toolbarConfig: {
+		zoom: true,
+		custom: true,
+		refresh: {
+			queryMethod: () => {
+				handleQuery();
+			},
+		},
+		tools: [{ toolRender: { name: 'exportCurrent' } }, { toolRender: { name: 'exportAll' } }],
+		slots: {
+			buttons: 'toolbar_buttons',
+		},
+	},
+	customConfig: {
+		storage: true,
+	},
+	id: 'statisticsCenterSeatsReturn',
+	rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
+	height: 'auto',
+	columns: [
+		{ type: 'checkbox', width: 50, align: 'center' },
+		{ field: 'no', title: '工单编码', width: 140 },
+		{
+			field: 'title',
+			title: '工单标题',
+			minWidth: 200,
+			slots: { default: 'order_detail' },
+		},
+		{ field: 'name', title: '姓名', width: 110 },
+		{
+			field: 'orderCreationTime',
+			title: '受理时间',
+			width: 160,
+			formatter: 'formatDate',
+			// sortable: true,
+		},
+		{ field: 'acceptType', title: '受理类型', width: 150 },
+		{ field: 'sourceChannel', title: '来源渠道', width: 140 },
+	],
+	data: [],
+	params: {
+		exportMethod: centerRefundSeatExport,
+		exportParams: requestParams,
+	},
+	sortConfig: {
+		remote: true,
+	},
+});
+// 手动查询,将页码设置为1
+const handleQuery = () => {
+	state.queryParams.PageIndex = 1;
+	queryList();
+};
+/** 获取列表 */
+const queryList = () => {
+	state.loading = true;
+	gridOptions.loading = true;
+	requestParams.value = Other.deepClone(state.queryParams);
+	requestParams.value.StartTime = state.queryParams.slTime === null ? null : state.queryParams.slTime[0]; // 受理时间
+	requestParams.value.EndTime = state.queryParams.slTime === null ? null : state.queryParams.slTime[1];
+	Reflect.deleteProperty(requestParams.value, 'slTime'); // 删除无用的参数
+	state.loading = false;
+	centerRefundSeat(requestParams.value)
+		.then((res: any) => {
+			gridOptions.data = res?.result.items ?? [];
+			state.total = res?.result.total ?? 0;
+			state.loading = false;
+			gridOptions.loading = false;
+			gridRef.value.clearCheckboxRow();
+			checkTable.value = [];
+		})
+		.catch(() => {
+			state.loading = false;
+			gridOptions.loading = false;
+			gridRef.value.clearCheckboxRow();
+			checkTable.value = [];
+		});
+};
+const gridEvents = {
+	sortChange(val: any) {
+		state.queryParams.SortField = val.order ? val.field : null;
+		// 0 升序 1 降序
+		state.queryParams.SortRule = val.order ? (val.order == 'desc' ? 1 : 0) : null;
+		handleQuery();
+	},
+};
+/** 重置按钮操作 */
+const drawerRuleFormRef = ref<RefType>();
+const drawer = ref(false);
+const statisticalTimeRef = ref<RefType>();
+const resetQuery = (formEl: FormInstance | undefined) => {
+	if (!formEl) return;
+	formEl.resetFields();
+	ruleFormRef.value?.resetFields();
+	statisticalTimeRef.value.reset();
+	queryList();
+};
+// 交办单导出
+const onJbExport = () => {
+	const ids = checkTable.value.map((item: any) => item.orderId);
+	exportAssignment(ids);
+};
+const checkTable = ref<EmptyArrayType>([]);
+const gridRef = ref<RefType>();
+const selectAllChangeEvent = ({ checked }) => {
+	if (gridRef.value) {
+		const records = gridRef.value.getCheckboxRecords();
+		checkTable.value = records;
+		console.log(checked ? '所有勾选事件' : '所有取消事件', records);
+	}
+};
+
+const selectChangeEvent = ({ checked }) => {
+	if (gridRef.value) {
+		const records = gridRef.value.getCheckboxRecords();
+		checkTable.value = records;
+		console.log(checked ? '勾选事件' : '取消事件', records);
+	}
+};
+const isChecked = computed(() => {
+	return !Boolean(checkTable.value.length);
+});
+const acceptTypeOptions = ref<EmptyArrayType>([]);
+const getBaseData = async () => {
+	// 获取基础数据
+	try {
+		const { result } = await returnBase();
+		acceptTypeOptions.value = result.acceptTypeOptions;
+	} catch (e) {
+		console.log(e);
+	}
+};
+onMounted(() => {
+	queryList();
+	getBaseData();
+});
+</script>