|
@@ -5,79 +5,90 @@
|
|
|
<el-tab-pane :name="1" label="终止待审批" :disabled="state.loading"></el-tab-pane>
|
|
|
<el-tab-pane :name="2" label="终止已审批" :disabled="state.loading"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
- <ProTable
|
|
|
- ref="proTableRef"
|
|
|
- :columns="columnsTodo"
|
|
|
- :data="state.tableData"
|
|
|
- @updateTable="queryList"
|
|
|
+ <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 label="">
|
|
|
+ <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"
|
|
|
- :total="state.total"
|
|
|
- v-model:page-index="state.queryParams.PageIndex"
|
|
|
- v-model:page-size="state.queryParams.PageSize"
|
|
|
- v-if="state.queryParams.AuditStatus === 1"
|
|
|
+ custom
|
|
|
+ :refresh="{
|
|
|
+ queryMethod: handleQuery,
|
|
|
+ }"
|
|
|
>
|
|
|
- <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 label="">
|
|
|
- <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 #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 link type="primary" @click="onDetail(row)" title="终止详情"> 终止详情 </el-button>
|
|
|
- <el-button link type="primary" @click="onProcessDetail(row)" title="流程明细"> 流程明细 </el-button>
|
|
|
- <el-button link type="primary" @click="onEdit(row)" title="理由修改" v-auth="'business:terminate:audit:edit'"> 理由修改 </el-button>
|
|
|
- </template>
|
|
|
- </ProTable>
|
|
|
- <ProTable
|
|
|
- ref="proTableRef"
|
|
|
- :columns="columnsDone"
|
|
|
- :data="state.tableData"
|
|
|
- @updateTable="queryList"
|
|
|
- :loading="state.loading"
|
|
|
+ </vxe-toolbar>
|
|
|
+ <div style="overflow: hidden; width: 100%; height: 100%; flex: 1">
|
|
|
+ <vxe-table
|
|
|
+ border
|
|
|
+ :loading="state.loading"
|
|
|
+ :data="state.tableData"
|
|
|
+ :column-config="{ resizable: true }"
|
|
|
+ :row-config="{ isCurrent: true, isHover: true, height: 30 }"
|
|
|
+ ref="tableRef"
|
|
|
+ height="auto"
|
|
|
+ auto-resize
|
|
|
+ show-overflow
|
|
|
+ :scrollY="{ enabled: true, gt: 0 }"
|
|
|
+ id="businessTerminateAudit"
|
|
|
+ :custom-config="{ storage: true }"
|
|
|
+ showHeaderOverflow
|
|
|
+ >
|
|
|
+ <vxe-column field="order.expiredStatusText" title="超期状态" width="90" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span :class="'overdue-status-' + row.order?.expiredStatus" :title="row.order?.expiredStatusText"></span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="order.no" title="工单编码" width="140"></vxe-column>
|
|
|
+ <vxe-column field="order.title" title="工单标题" min-width="200">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <order-detail :order="row.order" @updateList="queryList">{{ row.order?.title }}</order-detail>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="stateText" title="终止状态" width="100">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span class="color-danger">{{ row.statusText }}</span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="creatorName" title="申请人" width="120"></vxe-column>
|
|
|
+ <vxe-column field="creatorOrgName" title="申请部门" width="140"></vxe-column>
|
|
|
+ <vxe-column field="creationTime" title="申请时间" width="160">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ formatDate(row.creationTime, 'YYYY-mm-dd HH:MM:SS') }}
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="order.acceptType" title="受理类型" width="120"></vxe-column>
|
|
|
+ <vxe-column field="order.hotspotName" title="热点分类" width="150"></vxe-column>
|
|
|
+ <vxe-column title="操作" fixed="right" width="240" align="center" v-if="state.queryParams.AuditStatus === 1">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button link type="primary" @click="onDetail(row)" title="终止详情"> 终止详情 </el-button>
|
|
|
+ <el-button link type="primary" @click="onProcessDetail(row)" title="流程明细"> 流程明细 </el-button>
|
|
|
+ <el-button link type="primary" @click="onEdit(row)" title="理由修改" v-auth="'business:terminate:audit:edit'"> 理由修改 </el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column title="操作" fixed="right" width="160" align="center" v-else>
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button link type="primary" @click="onDetail(row)" title="终止详情"> 终止详情 </el-button>
|
|
|
+ <el-button link type="primary" @click="onProcessDetail(row)" title="流程明细"> 流程明细 </el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ </vxe-table>
|
|
|
+ </div>
|
|
|
+ <pagination
|
|
|
+ @pagination="queryList"
|
|
|
:total="state.total"
|
|
|
- v-model:page-index="state.queryParams.PageIndex"
|
|
|
+ v-model:current-page="state.queryParams.PageIndex"
|
|
|
v-model:page-size="state.queryParams.PageSize"
|
|
|
- v-else
|
|
|
- >
|
|
|
- <template #table-search>
|
|
|
- <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
|
|
|
- <el-form-item label="工单标题" prop="Title">
|
|
|
- <el-input v-model="state.queryParams.Title" placeholder="工单标题" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="工单编码" prop="No">
|
|
|
- <el-input v-model="state.queryParams.No" placeholder="工单编码" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="">
|
|
|
- <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 #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 link type="primary" @click="onDetail(row)" title="终止详情"> 终止详情 </el-button>
|
|
|
- <el-button link type="primary" @click="onProcessDetail(row)" title="流程明细"> 流程明细 </el-button>
|
|
|
- </template>
|
|
|
- </ProTable>
|
|
|
+ :disabled="state.loading"
|
|
|
+ />
|
|
|
</div>
|
|
|
<!-- 更多查询 -->
|
|
|
<el-drawer v-model="drawer" title="更多查询" size="500px">
|
|
@@ -144,6 +155,7 @@ const AuditRecord = defineAsyncComponent(() => import('@/components/AuditRecord/
|
|
|
const ProcessAudit = defineAsyncComponent(() => import('@/components/ProcessAudit/index.vue')); // 流程审批
|
|
|
const TerminateDetail = defineAsyncComponent(() => import('@/views/business/terminate/components/Terminate-detail.vue')); // 终止详情
|
|
|
const TerminateEditContent = defineAsyncComponent(() => import('@/views/business/terminate/components/Terminate-edit-content.vue')); // 修改理由
|
|
|
+const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
|
|
|
// 定义变量内容
|
|
|
const state = reactive<any>({
|
|
|
queryParams: {
|
|
@@ -165,63 +177,7 @@ const state = reactive<any>({
|
|
|
total: 0, // 总数
|
|
|
areaOptions: [],
|
|
|
});
|
|
|
-const proTableRef = ref<RefType>(); // 表格ref
|
|
|
const columns = ref<any[]>([]);
|
|
|
-// 表格配置项
|
|
|
-const columnsTodo = ref<any[]>([
|
|
|
- { type: 'selection', minWidth: 40, align: 'center' },
|
|
|
- { prop: 'order.expiredStatusText', label: '超期状态', align: 'center', minWidth: 80 },
|
|
|
- { prop: 'order.no', label: '工单编码', minWidth: 140 },
|
|
|
- {
|
|
|
- prop: 'statusText',
|
|
|
- label: '终止状态',
|
|
|
- minWidth: 140,
|
|
|
- render: (scope: any) => {
|
|
|
- return <span class="color-danger">{scope.row.statusText}</span>;
|
|
|
- },
|
|
|
- },
|
|
|
- { prop: 'order.title', label: '工单标题', minWidth: 200 },
|
|
|
- { prop: 'creatorOrgName', label: '申请部门', minWidth: 140 },
|
|
|
- { prop: 'creatorName', label: '申请人', minWidth: 140 },
|
|
|
- {
|
|
|
- prop: 'creationTime',
|
|
|
- label: '申请时间',
|
|
|
- minWidth: 160,
|
|
|
- render: (scope: any) => {
|
|
|
- return <span>{formatDate(scope.row.creationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
- },
|
|
|
- },
|
|
|
- { prop: 'order.acceptType', label: '受理类型', minWidth: 100 },
|
|
|
- { prop: 'order.hotspotName', label: '热点分类', minWidth: 150 },
|
|
|
- { prop: 'operation', label: '操作', fixed: 'right', minWidth: 220, align: 'center' },
|
|
|
-]);
|
|
|
-const columnsDone = ref<any[]>([
|
|
|
- { type: 'selection', minWidth: 40, align: 'center' },
|
|
|
- { prop: 'order.expiredStatusText', label: '超期状态', align: 'center', minWidth: 80 },
|
|
|
- { prop: 'order.no', label: '工单编码', minWidth: 140 },
|
|
|
- {
|
|
|
- prop: 'statusText',
|
|
|
- label: '终止状态',
|
|
|
- minWidth: 140,
|
|
|
- render: (scope: any) => {
|
|
|
- return <span class="color-danger">{scope.row.statusText}</span>;
|
|
|
- },
|
|
|
- },
|
|
|
- { prop: 'order.title', label: '工单标题', minWidth: 200 },
|
|
|
- { prop: 'creatorOrgName', label: '申请部门', minWidth: 140 },
|
|
|
- { prop: 'creatorName', label: '申请人', minWidth: 140 },
|
|
|
- {
|
|
|
- prop: 'creationTime',
|
|
|
- label: '申请时间',
|
|
|
- minWidth: 160,
|
|
|
- render: (scope: any) => {
|
|
|
- return <span>{formatDate(scope.row.creationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
- },
|
|
|
- },
|
|
|
- { prop: 'order.acceptType', label: '受理类型', minWidth: 100 },
|
|
|
- { prop: 'order.hotspotName', label: '热点分类', minWidth: 150 },
|
|
|
- { prop: 'operation', label: '操作', fixed: 'right', minWidth: 160, align: 'center' },
|
|
|
-]);
|
|
|
// 手动查询,将页码设置为1
|
|
|
const handleQuery = () => {
|
|
|
state.queryParams.PageIndex = 1;
|
|
@@ -232,7 +188,6 @@ const requestParams = ref<EmptyObjectType>({});
|
|
|
const queryList = async () => {
|
|
|
state.loading = true;
|
|
|
try {
|
|
|
- columns.value = state.queryParams.AuditStatus === 1 ? columnsDone.value : columnsTodo.value;
|
|
|
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];
|
|
@@ -273,14 +228,14 @@ const getBaseData = async () => {
|
|
|
};
|
|
|
// 理由修改
|
|
|
const terminateEditRef = ref<RefType>();
|
|
|
-const onEdit = (row:any)=>{
|
|
|
+const onEdit = (row: any) => {
|
|
|
terminateEditRef.value.openDialog(row);
|
|
|
-}
|
|
|
+};
|
|
|
// 终止详情
|
|
|
const terminateDetailRef = ref<RefType>();
|
|
|
-const onDetail = (row:any)=>{
|
|
|
+const onDetail = (row: any) => {
|
|
|
terminateDetailRef.value.openDialog(row);
|
|
|
-}
|
|
|
+};
|
|
|
// 流程明细
|
|
|
const auditRecordRef = ref<RefType>();
|
|
|
const onProcessDetail = (row: any) => {
|
|
@@ -290,8 +245,13 @@ const onProcessDetail = (row: any) => {
|
|
|
};
|
|
|
auditRecordRef.value.openDialog(params);
|
|
|
};
|
|
|
+const toolbarRef = ref<RefType>();
|
|
|
+const tableRef = ref<RefType>();
|
|
|
onMounted(() => {
|
|
|
- getBaseData();
|
|
|
queryList();
|
|
|
+ if (tableRef.value && toolbarRef.value) {
|
|
|
+ tableRef.value.connect(toolbarRef.value);
|
|
|
+ }
|
|
|
+ getBaseData();
|
|
|
});
|
|
|
</script>
|