|
@@ -1,11 +1,244 @@
|
|
|
-<script setup lang="ts">
|
|
|
-
|
|
|
-</script>
|
|
|
-
|
|
|
<template>
|
|
|
-
|
|
|
+ <div class="province-order-delay-container layout-pd">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent label-width="100px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
+ <el-form-item label="审核状态" prop="State">
|
|
|
+ <el-radio-group v-model="state.queryParams.State" @change="handleQuery">
|
|
|
+ <el-radio-button label="0">申请中</el-radio-button>
|
|
|
+ <el-radio-button label="1">同意</el-radio-button>
|
|
|
+ <el-radio-button label="2">不同意</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
+ <el-form-item label="工单标题" prop="Title">
|
|
|
+ <el-input v-model="state.queryParams.Title" placeholder="工单标题" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
+ <el-form-item label="工单编码" prop="No">
|
|
|
+ <el-input v-model="state.queryParams.No" placeholder="工单编码" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <transition name="el-zoom-in-top" v-show="!searchCol">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
+ <el-form-item label="省工单编码" prop="ProvinceNo">
|
|
|
+ <el-input v-model="state.queryParams.ProvinceNo" placeholder="省工单编码" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
+ <transition name="el-zoom-in-top" v-show="!searchCol">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
+ <el-form-item label="申请时间" prop="crTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="state.queryParams.crTime"
|
|
|
+ type="datetimerange"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ @change="handleQuery"
|
|
|
+ value-format="YYYY-MM-DD[T]HH:mm:ss"
|
|
|
+ :default-time="defaultTimeStartEnd"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
+ <transition name="el-zoom-in-top" v-show="!searchCol">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
+ <el-form-item label="申请人" prop="ApplyUserName">
|
|
|
+ <el-input v-model="state.queryParams.ApplyUserName" placeholder="申请人姓名" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
+ <el-form-item label=" ">
|
|
|
+ <div class="flex-end w100">
|
|
|
+ <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">
|
|
|
+ <SvgIcon name="ele-Refresh" class="mr5" />重置
|
|
|
+ </el-button>
|
|
|
+ <el-button link type="primary" @click="closeSearch" :loading="state.loading">
|
|
|
+ {{ searchCol ? '展开' : '收起' }}
|
|
|
+ <SvgIcon :class="{ 'is-reverse': searchCol }" name="ele-ArrowUp" class="mr5 arrow" size="18px" />
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+ <el-card shadow="never">
|
|
|
+ <ProTable
|
|
|
+ ref="proTableRef"
|
|
|
+ :columns="columns"
|
|
|
+ :data="state.tableData"
|
|
|
+ @updateTable="queryList"
|
|
|
+ :loading="state.loading"
|
|
|
+ :total="state.total"
|
|
|
+ v-model:page-index="state.queryParams.PageIndex"
|
|
|
+ v-model:page-size="state.queryParams.PageSize"
|
|
|
+ >
|
|
|
+ <template #expiredStatusText="{ row }">
|
|
|
+ <span :class="'overdue-status-' + row.order?.expiredStatus" :title="row.order?.expiredStatusText"></span>
|
|
|
+ </template>
|
|
|
+ <template #title="{ row }">
|
|
|
+ <order-detail :order="row.order" @updateList="queryList">{{ row.order?.title }}</order-detail>
|
|
|
+ </template>
|
|
|
+ <template #operation="{ row }">
|
|
|
+ <el-button type="primary" link @click="onDetail(row)" title="省工单延期明细"> 明细</el-button>
|
|
|
+ <order-detail :order="row.order" @updateList="queryList" />
|
|
|
+ </template>
|
|
|
+ </ProTable>
|
|
|
+ </el-card>
|
|
|
+ <detail-dialog ref="detailDialogRef" />
|
|
|
+ </div>
|
|
|
</template>
|
|
|
+<script setup lang="tsx" name="provinceDelay">
|
|
|
+import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
+import type { FormInstance } from 'element-plus';
|
|
|
+import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
|
|
|
+import { useRoute, useRouter } from 'vue-router';
|
|
|
+import { formatDate } from '@/utils/formatTime';
|
|
|
+import Other from '@/utils/other';
|
|
|
+import { provinceDelayList } from '@/api/province';
|
|
|
|
|
|
-<style scoped lang="scss">
|
|
|
+// 引入组件
|
|
|
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
+const DetailDialog = defineAsyncComponent(() => import('@/views/province/components/Detail-dialog.vue')); // 明细
|
|
|
|
|
|
-</style>
|
|
|
+// 定义变量内容
|
|
|
+const state = reactive<any>({
|
|
|
+ queryParams: {
|
|
|
+ PageIndex: 1, // 当前页
|
|
|
+ PageSize: 10, // 每页条数
|
|
|
+ No: null, // 工单编码
|
|
|
+ Title: null, // 工单标题
|
|
|
+ State: '0', // 审核中
|
|
|
+ ApplyUserName: null, // 申请人
|
|
|
+ ProvinceNo: null, // 省工单编号
|
|
|
+ crTime: [], // 申请时间
|
|
|
+ ApplyStartTime: null,
|
|
|
+ ApplyEndTime: null,
|
|
|
+ },
|
|
|
+ tableData: [], //表单
|
|
|
+ loading: false, // 加载
|
|
|
+ total: 0, // 总数
|
|
|
+});
|
|
|
+const ruleFormRef = ref<RefType>(); // 表单ref
|
|
|
+const searchCol = ref(true); // 展开/收起
|
|
|
+// 展开/收起
|
|
|
+const closeSearch = () => {
|
|
|
+ searchCol.value = !searchCol.value;
|
|
|
+};
|
|
|
+const route = useRoute(); // 路由
|
|
|
+const router = useRouter(); // 路由
|
|
|
+const proTableRef = ref<RefType>(); // 表格ref
|
|
|
+// 表格配置项
|
|
|
+const columns = ref<any[]>([
|
|
|
+ { prop: 'order.expiredStatusText', label: '超期状态', align: 'center', minWidth: 80 },
|
|
|
+ { prop: 'order.statusText', label: '工单状态', minWidth: 100 },
|
|
|
+ { prop: 'employeeName', label: '申请人', minWidth: 120 },
|
|
|
+ {
|
|
|
+ prop: 'applyDelayTime',
|
|
|
+ label: '申请时间',
|
|
|
+ minWidth: 160,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.applyDelayTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { prop: 'auditName', label: '审核人', minWidth: 120 },
|
|
|
+ {
|
|
|
+ prop: 'auditTime',
|
|
|
+ label: '审核时间',
|
|
|
+ minWidth: 160,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.auditTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { prop: 'delayStateText', label: '审核状态', minWidth: 100 },
|
|
|
+ { prop: 'order.actualHandleStepName', label: '办理节点', minWidth: 100 },
|
|
|
+ {
|
|
|
+ prop: 'order.isUrgentText',
|
|
|
+ label: '是否紧急',
|
|
|
+ render: (scope) => {
|
|
|
+ return <span class="color-danger font-bold">{scope.row.order?.isUrgentText}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { prop: 'order.provinceNo', label: '省工单编码', minWidth: 240 },
|
|
|
+ { prop: 'order.no', label: '工单编码', minWidth: 140 },
|
|
|
+ {
|
|
|
+ prop: 'order.startTime',
|
|
|
+ label: '受理时间',
|
|
|
+ minWidth: 160,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.order?.startTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { prop: 'order.title', label: '工单标题', minWidth: 200 },
|
|
|
+ {
|
|
|
+ prop: 'order.expiredTime',
|
|
|
+ label: '工单期满时间',
|
|
|
+ minWidth: 160,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.order?.expiredTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { prop: 'order.actualHandleOrgName', label: '接办部门', minWidth: 140 },
|
|
|
+ { prop: 'order.acceptType', label: '受理类型', minWidth: 100 },
|
|
|
+ { prop: 'order.hotspotName', label: '热点分类', minWidth: 150 },
|
|
|
+ { prop: 'order.acceptorName', label: '受理人', minWidth: 120 },
|
|
|
+ { prop: 'operation', label: '操作', fixed: 'right', width: 140, align: 'center' },
|
|
|
+]);
|
|
|
+// 手动查询,将页码设置为1
|
|
|
+const handleQuery = () => {
|
|
|
+ state.queryParams.PageIndex = 1;
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+/** 获取列表 */
|
|
|
+const requestParams = ref({});
|
|
|
+const queryList = () => {
|
|
|
+ requestParams.value = Other.deepClone(state.queryParams);
|
|
|
+ requestParams.value.ApplyStartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0]; // 生成时间
|
|
|
+ requestParams.value.ApplyEndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
|
|
|
+ Reflect.deleteProperty(requestParams.value, 'crTime'); // 删除无用的参数
|
|
|
+ state.loading = true;
|
|
|
+ provinceDelayList(requestParams.value)
|
|
|
+ .then((response: any) => {
|
|
|
+ state.tableData = response?.result.items ?? [];
|
|
|
+ state.total = response?.result.total;
|
|
|
+ state.loading = false;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ state.loading = false;
|
|
|
+ });
|
|
|
+};
|
|
|
+/** 重置按钮操作 */
|
|
|
+const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
+ if (!formEl) return;
|
|
|
+ formEl.resetFields();
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+// 查看明细
|
|
|
+const detailDialogRef = ref<RefType>();
|
|
|
+const onDetail = (row: any) => {
|
|
|
+ detailDialogRef.value.openDrawer(row.id, 'delay');
|
|
|
+};
|
|
|
+onMounted(() => {
|
|
|
+ queryList();
|
|
|
+});
|
|
|
+</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+.province-order-delay-container {
|
|
|
+ .arrow {
|
|
|
+ transition: transform var(--el-transition-duration);
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .arrow.is-reverse {
|
|
|
+ transform: rotateZ(-180deg);
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|