Kaynağa Gözat

reactor:修复办理后重新查询的问题;

zhangchong 3 ay önce
ebeveyn
işleme
809407defb

+ 50 - 48
src/views/todo/center/index.vue

@@ -1,56 +1,54 @@
 <template>
 	<div class="todo-center-container layout-padding">
 		<div class="layout-padding-auto layout-padding-view pd15">
-				<vxe-grid v-bind="gridOptions" v-on="gridEvents" ref="gridRef" @checkbox-all="selectAllChangeEvent" @checkbox-change="selectChangeEvent">
-					<template #form>
-						<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent class="mb10" inline :disabled="state.loading">
-							<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 #toolbar_buttons>
-						<el-button type="primary" @click="onJbExport" :loading="state.loading" :disabled="isChecked" v-auth="'todo:center:jbdExport'"
-							><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出<span v-if="checkTable.length">({{ checkTable.length }})</span>
-						</el-button>
-						<el-button type="primary" @click="onAssignOrders" :loading="state.loading" v-auth="'todo:center:assignOrders'"
-							><SvgIcon name="ele-List" class="mr5" />分配工单
-						</el-button>
-					</template>
-					<template #statusText="{ row }">
-						<el-text type="danger" tag="b" v-if="[1, 2, 3, 9, 101, 102, 103, 104, 105, 200].includes(row.status)">{{ row.statusText }}</el-text>
-						<span v-else>{{ row.statusText }}</span>
-					</template>
-					<template #order_detail="{ row }">
-						<order-detail :order="row" @updateList="handleQuery">{{ row.title }}</order-detail>
-					</template>
-					<template #action="{ row }">
-						<el-button link type="primary" @click="onSign(row)" title="签收工单" v-if="row.canSign" v-auth="'todo:center:sign'"> 签收 </el-button>
-						<el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.canEdit" v-auth="'todo:center:edit'">
-							修改
-						</el-button>
-						<el-button link type="primary" @click="onMigration(row)" title="平级移动" v-auth="'todo:center:migration'"> 平级移动 </el-button>
-					</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>
+			<vxe-grid v-bind="gridOptions" v-on="gridEvents" ref="gridRef" @checkbox-all="selectAllChangeEvent" @checkbox-change="selectChangeEvent">
+				<template #form>
+					<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent class="mb10" inline :disabled="state.loading">
+						<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 #toolbar_buttons>
+					<el-button type="primary" @click="onJbExport" :loading="state.loading" :disabled="isChecked" v-auth="'todo:center:jbdExport'"
+						><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出<span v-if="checkTable.length">({{ checkTable.length }})</span>
+					</el-button>
+					<el-button type="primary" @click="onAssignOrders" :loading="state.loading" v-auth="'todo:center:assignOrders'"
+						><SvgIcon name="ele-List" class="mr5" />分配工单
+					</el-button>
+				</template>
+				<template #statusText="{ row }">
+					<el-text type="danger" tag="b" v-if="[1, 2, 3, 9, 101, 102, 103, 104, 105, 200].includes(row.status)">{{ row.statusText }}</el-text>
+					<span v-else>{{ row.statusText }}</span>
+				</template>
+				<template #order_detail="{ row }">
+					<order-detail :order="row" @updateList="refreshList">{{ row.title }}</order-detail>
+				</template>
+				<template #action="{ row }">
+					<el-button link type="primary" @click="onSign(row)" title="签收工单" v-if="row.canSign" v-auth="'todo:center:sign'"> 签收 </el-button>
+					<el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.canEdit" v-auth="'todo:center:edit'"> 修改 </el-button>
+					<el-button link type="primary" @click="onMigration(row)" title="平级移动" v-auth="'todo:center:migration'"> 平级移动 </el-button>
+				</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>
 		<!-- 工单平移 -->
-		<order-migration ref="orderMigrationRef" @updateList="handleQuery" />
+		<order-migration ref="orderMigrationRef" @updateList="refreshList" />
 		<!--	更多查询	-->
 		<el-drawer v-model="drawer" title="更多查询" size="500px">
 			<el-form :model="state.queryParams" ref="drawerRuleFormRef" @submit.native.prevent label-width="100px">
@@ -306,6 +304,10 @@ const handleQuery = () => {
 	state.queryParams.PageIndex = 1;
 	queryList();
 };
+// 刷新列表  停留当前页 重新查询数据和总数
+const refreshList = () => {
+	queryList();
+};
 /** 获取列表 */
 const requestParams = ref<EmptyObjectType>({});
 const queryList = () => {

+ 8 - 2
src/views/todo/edit/index.vue

@@ -59,7 +59,7 @@
 					<span v-else>{{ row.statusText }}</span>
 				</template>
 				<template #order_detail="{ row }">
-					<order-detail :order="row" @updateList="handleQuery">{{ row.title }}</order-detail>
+					<order-detail :order="row" @updateList="refreshList">{{ row.title }}</order-detail>
 				</template>
 				<template #action="{ row }">
 					<el-button link type="primary" @click="onOrderEdit(row)" title="编辑工单" v-auth="'todo:edit:edit'"> 工单修改 </el-button>
@@ -210,7 +210,7 @@
 			</template>
 		</el-drawer>
 		<!--	修改工单	-->
-		<EditOrder ref="editOrderRef" @updateList="handleQuery" />
+		<EditOrder ref="editOrderRef" @updateList="refreshList" />
 	</div>
 </template>
 <script setup lang="tsx" name="todoEdit">
@@ -433,6 +433,12 @@ const getBaseData = async () => {
 const handleQuery = () => {
 	state.queryParams.PageIndex = 1;
 	queryList();
+  getTotal();
+};
+// 刷新列表  停留当前页 重新查询数据和总数
+const refreshList = () => {
+  queryList();
+  getTotal();
 };
 // 改变页码
 const queryList = () => {

+ 6 - 1
src/views/todo/order/index.vue

@@ -77,7 +77,7 @@
 						<span v-else>{{ row.statusText }}</span>
 					</template>
 					<template #order_detail="{ row }">
-						<order-detail :order="row" @updateList="handleQuery">{{ row.title }}</order-detail>
+						<order-detail :order="row" @updateList="refreshList">{{ row.title }}</order-detail>
 					</template>
 					<template #pager>
 						<pagination
@@ -317,6 +317,11 @@ const handleQuery = () => {
 	queryList();
 	getTotal();
 };
+// 刷新列表  停留当前页 重新查询数据和总数
+const refreshList = () => {
+  queryList();
+  getTotal();
+};
 /** 获取列表 */
 const queryList = async () => {
 	return new Promise(async (resolve, reject) => {

+ 1 - 8
src/views/todo/seats/accept/History.vue

@@ -57,11 +57,10 @@
 	/>
 </template>
 <script setup lang="ts" name="orderAcceptHistory">
-import { reactive, ref, defineAsyncComponent, onMounted } from 'vue';
+import { reactive, ref, defineAsyncComponent } from 'vue';
 import { FormInstance } from 'element-plus';
 import { throttle } from '@/utils/tools';
 import { historyOrder } from '@/api/business/order';
-import { useRoute } from 'vue-router';
 
 const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
 const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
@@ -136,12 +135,6 @@ onMounted(() => {
 		tableRef.value.connect(toolbarRef.value);
 	}
 });*/
-const route = useRoute();
-onMounted(() => {
-	if (route.query.createBy || route.query.createBy === 'tel' || route.query.createBy === 'transfer' || route.query.id) {
-		searchHistory();
-	}
-});
 defineExpose({
 	multipleSelection,
 	searchHistory,

+ 4 - 0
src/views/todo/seats/accept/lzAccept.vue

@@ -1139,6 +1139,9 @@ const loadForm = async () => {
 					state.ruleForm.identityType = 1;
 				}
 			}
+      setTimeout(() => {
+        historyOrderRef.value.searchHistory();
+      }, 300);
 		}
 
 		if (route.query.id) {
@@ -1218,6 +1221,7 @@ const loadForm = async () => {
 			isSaveSuccess.value = true; // 如果是修改进入 可以直接办理
 			setTimeout(() => {
 				watchPauseAbleFn.resume();
+        historyOrderRef.value.searchHistory();
 			}, 300);
 			state.formLoading = false;
 		} else {

+ 4 - 0
src/views/todo/seats/accept/ybAccept.vue

@@ -1238,6 +1238,9 @@ const loadForm = async () => {
 				};
 				state.ruleForm.content = Local.get(`${route.query.callId}`);
 			}
+      setTimeout(() => {
+        historyOrderRef.value.searchHistory();
+      }, 300);
 		}
 
 		if (route.query.id) {
@@ -1313,6 +1316,7 @@ const loadForm = async () => {
 			isSaveSuccess.value = true; // 如果是修改进入 可以直接办理
 			setTimeout(() => {
 				watchPauseAbleFn.resume();
+        historyOrderRef.value.searchHistory();
 			}, 300);
 		} else {
 			state.formLoading = false;

+ 4 - 0
src/views/todo/seats/accept/zgAccept.vue

@@ -1199,6 +1199,9 @@ const loadForm = async () => {
 					state.ruleForm.identityType = 1;
 				}
 			}
+      setTimeout(() => {
+        historyOrderRef.value.searchHistory();
+      }, 300);
 		}
 
 		if (route.query.id) {
@@ -1285,6 +1288,7 @@ const loadForm = async () => {
 			isSaveSuccess.value = true; // 如果是修改进入 可以直接办理
 			setTimeout(() => {
 				watchPauseAbleFn.resume();
+        historyOrderRef.value.searchHistory();
 			}, 300);
 			state.formLoading = false;
 		} else {

+ 6 - 1
src/views/todo/seats/index.vue

@@ -41,7 +41,7 @@
 						<span v-else>{{ row.statusText }}</span>
 					</template>
 					<template #order_detail="{ row }">
-						<order-detail :order="row" @updateList="handleQuery">{{ row.title }}</order-detail>
+						<order-detail :order="row" @updateList="refreshList">{{ row.title }}</order-detail>
 					</template>
 					<template #action="{ row }">
 						<el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.canEdit" v-auth="'todo:seats:edit'"> 修改 </el-button>
@@ -239,6 +239,11 @@ const handleQuery = () => {
 	queryList();
 	getTotal();
 };
+// 刷新列表  停留当前页 重新查询数据和总数
+const refreshList = () => {
+	queryList();
+	getTotal();
+};
 /** 获取列表 */
 const requestParams = ref<EmptyObjectType>({});
 const totalCount = ref(0);