|
@@ -1,7 +1,98 @@
|
|
<template>
|
|
<template>
|
|
<div class="business-overdueSoon-container layout-padding">
|
|
<div class="business-overdueSoon-container layout-padding">
|
|
<div class="layout-padding-auto layout-padding-view pd20">
|
|
<div class="layout-padding-auto layout-padding-view pd20">
|
|
- <ProTable
|
|
|
|
|
|
+ <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
|
|
|
|
+ <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-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>
|
|
|
|
+ <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>
|
|
|
|
+ <vxe-toolbar
|
|
|
|
+ ref="toolbarRef"
|
|
|
|
+ :loading="state.loading"
|
|
|
|
+ custom
|
|
|
|
+ :refresh="{
|
|
|
|
+ queryMethod: handleQuery,
|
|
|
|
+ }"
|
|
|
|
+ :tools="[{ toolRender: { name: 'exportCurrent' } }, { toolRender: { name: 'exportAll' } }]"
|
|
|
|
+ >
|
|
|
|
+ <template #buttons>
|
|
|
|
+ <el-button type="primary" @click="onJbExport" :loading="state.loading" :disabled="isChecked"
|
|
|
|
+ ><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-toolbar>
|
|
|
|
+ <div style="overflow: hidden; width: 100%; height: 100%; flex: 1">
|
|
|
|
+ <vxe-table
|
|
|
|
+ border
|
|
|
|
+ :loading="state.loading"
|
|
|
|
+ :data="state.tableData"
|
|
|
|
+ :sort-config="{ remote: true }"
|
|
|
|
+ :column-config="{ resizable: true }"
|
|
|
|
+ :row-config="{ isCurrent: true, isHover: true, height: 30 }"
|
|
|
|
+ ref="tableRef"
|
|
|
|
+ @sort-change="sortChange"
|
|
|
|
+ @checkbox-all="selectAllChangeEvent"
|
|
|
|
+ @checkbox-change="selectChangeEvent"
|
|
|
|
+ height="auto"
|
|
|
|
+ auto-resize
|
|
|
|
+ show-overflow
|
|
|
|
+ :scrollY="{ enabled: true, gt: 0 }"
|
|
|
|
+ id="businessOverdueSoon"
|
|
|
|
+ :custom-config="{ storage: true }"
|
|
|
|
+ :params="{ exportMethod: exportOverdueSoon, exportParams: requestParams }"
|
|
|
|
+ showHeaderOverflow
|
|
|
|
+ >
|
|
|
|
+ <vxe-column type="checkbox" width="60" align="center"></vxe-column>
|
|
|
|
+ <vxe-column field="no" title="工单编码" width="140"></vxe-column>
|
|
|
|
+ <vxe-column field="isProvinceText" title="省/市工单" width="90"></vxe-column>
|
|
|
|
+ <vxe-column field="currentStepName" title="当前节点" width="100"></vxe-column>
|
|
|
|
+ <vxe-column field="delayText" title="是否延期" width="100"></vxe-column>
|
|
|
|
+ <vxe-column field="statusText" title="工单状态" width="100"></vxe-column>
|
|
|
|
+ <vxe-column field="title" title="工单标题" width="200">
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ <order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column field="centerToOrgHandlerName" title="派单员" width="120"></vxe-column>
|
|
|
|
+ <vxe-column field="startTime" title="受理时间" sortable width="160">
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ {{ formatDate(row.startTime, 'YYYY-mm-dd HH:MM:SS') }}
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column field="expiredTime" title="工单期满时间" sortable width="160">
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ {{ formatDate(row.expiredTime, 'YYYY-mm-dd HH:MM:SS') }}
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column field="filedTime" title="办结时间" sortable width="160">
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ {{ formatDate(row.filedTime, 'YYYY-mm-dd HH:MM:SS') }}
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column field="orgLevelOneName" title="一级部门" width="140"></vxe-column>
|
|
|
|
+ <vxe-column field="acceptType" title="受理类型" width="100"></vxe-column>
|
|
|
|
+ <vxe-column field="counterSignTypeText" title="是否会签" width="90"></vxe-column>
|
|
|
|
+ <vxe-column field="sourceChannel" title="来源渠道" width="100"></vxe-column>
|
|
|
|
+ <vxe-column field="hotspotName" title="热点分类" width="150"></vxe-column>
|
|
|
|
+ <vxe-column field="acceptorName" title="受理人" width="120"></vxe-column>
|
|
|
|
+ </vxe-table>
|
|
|
|
+ </div>
|
|
|
|
+ <vxe-pager
|
|
|
|
+ v-model:currentPage="state.queryParams.PageIndex"
|
|
|
|
+ v-model:pageSize="state.queryParams.PageSize"
|
|
|
|
+ :total="state.total"
|
|
|
|
+ @page-change="queryList"
|
|
|
|
+ :layouts="['PrevPage', 'Number', 'NextPage', 'Sizes', 'FullJump', 'Total']"
|
|
|
|
+ >
|
|
|
|
+ </vxe-pager>
|
|
|
|
+ <!-- <ProTable
|
|
ref="proTableRef"
|
|
ref="proTableRef"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="state.tableData"
|
|
:data="state.tableData"
|
|
@@ -16,23 +107,12 @@
|
|
@sort-change="sortChange"
|
|
@sort-change="sortChange"
|
|
>
|
|
>
|
|
<template #table-search>
|
|
<template #table-search>
|
|
- <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
|
|
|
|
- <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-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>
|
|
|
|
- <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>
|
|
<template #title="{ row }">
|
|
<template #title="{ row }">
|
|
<order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
|
|
<order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
|
|
</template>
|
|
</template>
|
|
- </ProTable>
|
|
|
|
|
|
+ </ProTable>-->
|
|
</div>
|
|
</div>
|
|
<!-- 更多查询 -->
|
|
<!-- 更多查询 -->
|
|
<el-drawer v-model="drawer" title="更多查询" size="500px">
|
|
<el-drawer v-model="drawer" title="更多查询" size="500px">
|
|
@@ -58,11 +138,14 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup lang="tsx" name="businessOverdueSoon">
|
|
<script setup lang="tsx" name="businessOverdueSoon">
|
|
-import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
|
|
|
+import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
import { FormInstance } from 'element-plus';
|
|
import { FormInstance } from 'element-plus';
|
|
import { formatDate } from '@/utils/formatTime';
|
|
import { formatDate } from '@/utils/formatTime';
|
|
import { exportOverdueSoon, overdueSoonList } from '@/api/query/overdue';
|
|
import { exportOverdueSoon, overdueSoonList } from '@/api/query/overdue';
|
|
import Other from '@/utils/other';
|
|
import Other from '@/utils/other';
|
|
|
|
+import { exportJbOrder } from '@/api/business/order';
|
|
|
|
+import { VxeUI } from 'vxe-pc-ui';
|
|
|
|
+import { downloadZip } from '@/utils/tools';
|
|
// 引入组件
|
|
// 引入组件
|
|
const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
|
|
|
@@ -96,7 +179,7 @@ const columns = ref<any[]>([
|
|
|
|
|
|
{ prop: 'actualHandleOrgName', label: '接办部门', minWidth: 140 },
|
|
{ prop: 'actualHandleOrgName', label: '接办部门', minWidth: 140 },
|
|
{ prop: 'acceptType', label: '受理类型', minWidth: 100 },
|
|
{ prop: 'acceptType', label: '受理类型', minWidth: 100 },
|
|
- { prop: 'counterSignTypeText', label: '是否会签', minWidth: 90},
|
|
|
|
|
|
+ { prop: 'counterSignTypeText', label: '是否会签', minWidth: 90 },
|
|
{ prop: 'orgLevelOneName', label: '一级部门', minWidth: 140 },
|
|
{ prop: 'orgLevelOneName', label: '一级部门', minWidth: 140 },
|
|
{ prop: 'sourceChannel', label: '来源渠道' },
|
|
{ prop: 'sourceChannel', label: '来源渠道' },
|
|
{ prop: 'hotspotName', label: '热点分类', minWidth: 150 },
|
|
{ prop: 'hotspotName', label: '热点分类', minWidth: 150 },
|
|
@@ -121,9 +204,9 @@ const state = reactive<any>({
|
|
});
|
|
});
|
|
// 排序
|
|
// 排序
|
|
const sortChange = (val: any) => {
|
|
const sortChange = (val: any) => {
|
|
- state.queryParams.SortField = val.order ? val.prop : null;
|
|
|
|
|
|
+ state.queryParams.SortField = val.order ? val.field : null;
|
|
// 0 升序 1 降序
|
|
// 0 升序 1 降序
|
|
- state.queryParams.SortRule = val.order ? (val.order == 'descending' ? 1 : 0) : null;
|
|
|
|
|
|
+ state.queryParams.SortRule = val.order ? (val.order == 'desc' ? 1 : 0) : null;
|
|
handleQuery();
|
|
handleQuery();
|
|
};
|
|
};
|
|
// 手动查询,将页码设置为1
|
|
// 手动查询,将页码设置为1
|
|
@@ -149,6 +232,66 @@ const queryList = () => {
|
|
state.loading = false;
|
|
state.loading = false;
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+// 交办单导出
|
|
|
|
+const onJbExport = () => {
|
|
|
|
+ const ids = checkTable.value.map((item: any) => item.id);
|
|
|
|
+ ElMessageBox.confirm(`您确定导出选中的工单交办单,是否继续?`, '提示', {
|
|
|
|
+ confirmButtonText: '确认',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ draggable: true,
|
|
|
|
+ cancelButtonClass: 'default-button',
|
|
|
|
+ autofocus: false,
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ VxeUI.modal.message({
|
|
|
|
+ content: `导出中,请稍等`,
|
|
|
|
+ status: 'loading',
|
|
|
|
+ id: 'exportJBD',
|
|
|
|
+ duration: -1,
|
|
|
|
+ });
|
|
|
|
+ exportJbOrder(ids)
|
|
|
|
+ .then((res: any) => {
|
|
|
|
+ downloadZip(res);
|
|
|
|
+ state.loading = false;
|
|
|
|
+ VxeUI.modal.close('exportJBD');
|
|
|
|
+ VxeUI.modal.message({
|
|
|
|
+ content: `导出成功`,
|
|
|
|
+ status: 'success',
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch((err: any) => {
|
|
|
|
+ console.log(err, '1111');
|
|
|
|
+ state.loading = false;
|
|
|
|
+ VxeUI.modal.close('exportJBD');
|
|
|
|
+ VxeUI.modal.message({
|
|
|
|
+ content: `导出失败`,
|
|
|
|
+ status: 'error',
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {});
|
|
|
|
+};
|
|
|
|
+const tableRef = ref<RefType>();
|
|
|
|
+const checkTable = ref<EmptyArrayType>([]);
|
|
|
|
+const selectAllChangeEvent = ({ checked }) => {
|
|
|
|
+ if (tableRef.value) {
|
|
|
|
+ const records = tableRef.value.getCheckboxRecords();
|
|
|
|
+ checkTable.value = records;
|
|
|
|
+ console.log(checked ? '所有勾选事件' : '所有取消事件', records);
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const selectChangeEvent = ({ checked }) => {
|
|
|
|
+ if (tableRef.value) {
|
|
|
|
+ const records = tableRef.value.getCheckboxRecords();
|
|
|
|
+ checkTable.value = records;
|
|
|
|
+ console.log(checked ? '勾选事件' : '取消事件', records);
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+const isChecked = computed(() => {
|
|
|
|
+ return !Boolean(checkTable.value.length);
|
|
|
|
+});
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
const drawerRuleFormRef = ref();
|
|
const drawerRuleFormRef = ref();
|
|
const ruleFormRef = ref<RefType>(); // 表单ref
|
|
const ruleFormRef = ref<RefType>(); // 表单ref
|
|
@@ -159,7 +302,11 @@ const resetQuery = (formEl: FormInstance | undefined) => {
|
|
ruleFormRef.value?.resetFields();
|
|
ruleFormRef.value?.resetFields();
|
|
queryList();
|
|
queryList();
|
|
};
|
|
};
|
|
|
|
+const toolbarRef = ref<RefType>();
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
queryList();
|
|
queryList();
|
|
|
|
+ if (tableRef.value && toolbarRef.value) {
|
|
|
|
+ tableRef.value.connect(toolbarRef.value);
|
|
|
|
+ }
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|