|
@@ -30,7 +30,7 @@
|
|
|
<el-table-column prop="statusText" label="状态" width="70" fixed="right" align="center"></el-table-column>
|
|
|
<el-table-column prop="statusText" label="操作" width="100" fixed="right" align="center" v-if="!props.readonly">
|
|
|
<template #default="{ row }">
|
|
|
-<!-- <el-button @click="onSupply(row)" link type="primary" v-auth="'business:order:supply'"> 补充 </el-button>
|
|
|
+ <!-- <el-button @click="onSupply(row)" link type="primary" v-auth="'business:order:supply'"> 补充 </el-button>
|
|
|
<el-button @click="onRevoke(row)" link type="primary" v-auth="'business:order:revoke'"> 撤销 </el-button>-->
|
|
|
<el-button @click="onSupervise(row)" link type="primary"> 督办 </el-button>
|
|
|
</template>
|
|
@@ -50,12 +50,12 @@
|
|
|
<order-super-vise ref="orderSuperviseRef" @onSuperviseSuccess="onSuperviseSuccess" />
|
|
|
</template>
|
|
|
<script setup lang="ts" name="orderAcceptHistory">
|
|
|
-import {defineAsyncComponent, onMounted, reactive, ref, watch} from 'vue';
|
|
|
-import {ElMessage, FormInstance} from 'element-plus';
|
|
|
-import {throttle} from '/@/utils/tools';
|
|
|
-import {auth} from '/@/utils/authFunction';
|
|
|
-import {historyOrder} from '/@/api/business/order';
|
|
|
-import {useRoute} from 'vue-router';
|
|
|
+import { defineAsyncComponent, onMounted, reactive, ref, watch } from 'vue';
|
|
|
+import { ElMessage, FormInstance } from 'element-plus';
|
|
|
+import { throttle } from '/@/utils/tools';
|
|
|
+import { auth } from '/@/utils/authFunction';
|
|
|
+import { historyOrder } from '/@/api/business/order';
|
|
|
+import { useRoute } from 'vue-router';
|
|
|
|
|
|
const OrderSuperVise = defineAsyncComponent(() => import('/@/views/business/supervise/components/Order-supervise.vue')); // 工单督办
|
|
|
const OrderSupply = defineAsyncComponent(() => import('/@/views/business/order/components/Order-supply.vue')); // 补充信息
|
|
@@ -72,14 +72,15 @@ const props = defineProps({
|
|
|
return {};
|
|
|
},
|
|
|
},
|
|
|
- maxHeight: {
|
|
|
- type: [Number, String],
|
|
|
- default: 300,
|
|
|
- },
|
|
|
- readonly: { //只读 不允许操作
|
|
|
- type: Boolean,
|
|
|
- default: false,
|
|
|
- }
|
|
|
+ maxHeight: {
|
|
|
+ type: [Number, String],
|
|
|
+ default: 300,
|
|
|
+ },
|
|
|
+ readonly: {
|
|
|
+ //只读 不允许操作
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
});
|
|
|
const emit = defineEmits(['handleSelectionChange']);
|
|
|
const state = reactive<any>({
|
|
@@ -116,36 +117,33 @@ watch(
|
|
|
);
|
|
|
/** 获取历史工单 */
|
|
|
const searchHistory = throttle(async (orderDetail?: any) => {
|
|
|
- if (!auth('business:order:history')) ElMessage.error('抱歉,您没有权限查询历史工单!');
|
|
|
- else {
|
|
|
- state.loading = true;
|
|
|
- let request = {
|
|
|
- ...state.queryParams,
|
|
|
- PhoneNo: props.formData.contact,
|
|
|
- OrderId: props.orderId, //传入id 排除重复工单选择自己
|
|
|
- };
|
|
|
- try {
|
|
|
- const response = await historyOrder(request);
|
|
|
- state.tableData = response?.result.items ?? [];
|
|
|
- state.total = response?.result.total;
|
|
|
- state.loading = false;
|
|
|
- if (orderDetail) {
|
|
|
- if (orderDetail.duplicateIds && orderDetail.duplicateIds.length) {
|
|
|
- multipleSelection.value = orderDetail.duplicateIds;
|
|
|
- for (let i of multipleSelection.value) {
|
|
|
- for (let j of state.tableData) {
|
|
|
- if (i === j.id) {
|
|
|
- setTimeout(() => {
|
|
|
- multipleTableRef.value!.toggleRowSelection(j, true);
|
|
|
- }, 0);
|
|
|
- }
|
|
|
+ state.loading = true;
|
|
|
+ let request = {
|
|
|
+ ...state.queryParams,
|
|
|
+ PhoneNo: props.formData.contact,
|
|
|
+ OrderId: props.orderId, //传入id 排除重复工单选择自己
|
|
|
+ };
|
|
|
+ try {
|
|
|
+ const response = await historyOrder(request);
|
|
|
+ state.tableData = response?.result.items ?? [];
|
|
|
+ state.total = response?.result.total;
|
|
|
+ state.loading = false;
|
|
|
+ if (orderDetail) {
|
|
|
+ if (orderDetail.duplicateIds && orderDetail.duplicateIds.length) {
|
|
|
+ multipleSelection.value = orderDetail.duplicateIds;
|
|
|
+ for (let i of multipleSelection.value) {
|
|
|
+ for (let j of state.tableData) {
|
|
|
+ if (i === j.id) {
|
|
|
+ setTimeout(() => {
|
|
|
+ multipleTableRef.value!.toggleRowSelection(j, true);
|
|
|
+ }, 0);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- state.loading = false;
|
|
|
}
|
|
|
+ } catch (error) {
|
|
|
+ state.loading = false;
|
|
|
}
|
|
|
}, 300);
|
|
|
// 右边表格选中重复件
|