zhangchong 1 жил өмнө
parent
commit
6cec409a5b

+ 23 - 3
src/components/OrderDetail/index.vue

@@ -412,17 +412,35 @@
 				<!-- 有流程信息就可以查询明细 -->
 				<el-button type="primary" @click="onRecord" :loading="state.loading" v-if="state.ruleForm?.workflowId">流程明细</el-button>
 				<!-- 有流程信息就可以撤回 -->
-				<el-button type="primary" @click="onSpecialHandle" :loading="state.loading" v-if="state.ruleForm?.workflowId">撤 回(特提)</el-button>
+				<el-button type="primary" @click="onSpecialHandle" :loading="state.loading" v-if="state.ruleForm?.workflowId" v-auth="'business:order:teti'"
+					>撤 回(特提)</el-button
+				>
 				<!-- 办理中和会签中,可以督办 -->
-				<el-button type="primary" @click="onSupervise" :loading="state.loading" v-if="[100, 200].includes(state.ruleForm?.status)">督 办</el-button>
+				<el-button
+					type="primary"
+					@click="onSupervise"
+					:loading="state.loading"
+					v-if="[100, 200].includes(state.ruleForm?.status)"
+					v-auth="'business:order:supervise:apply'"
+					>督 办</el-button
+				>
 				<!-- 办理中和会签中,可以催办 -->
-				<el-button type="primary" @click="onUrge" :loading="state.loading" v-if="[100, 200].includes(state.ruleForm?.status)"> 催 办</el-button>
+				<el-button
+					type="primary"
+					@click="onUrge"
+					:loading="state.loading"
+					v-if="[100, 200].includes(state.ruleForm?.status)"
+					v-auth="'business:order:urge:apply'"
+				>
+					催 办</el-button
+				>
 				<!-- 办理中和会签中,可以延期申请 -->
 				<el-button
 					type="primary"
 					@click="onSubmit('延期申请', '延期附件')"
 					:loading="state.loading"
 					v-if="[100, 200].includes(state.ruleForm?.status)"
+					v-auth="'business:order:delay'"
 					>延 期</el-button
 				>
 				<!-- 办理中和会签中并且应该自己办理 -->
@@ -431,6 +449,7 @@
 					@click="onSubmit('工单办理')"
 					:loading="state.loading"
 					v-if="[100, 200].includes(state.ruleForm?.status) && state.workflow.canHandle"
+					v-auth="'business:order:handle'"
 					>办 理</el-button
 				>
 				<!-- 流程结束之后不展示补充按钮 -->
@@ -452,6 +471,7 @@
 					@click="onSubmit('工单退回')"
 					:loading="state.loading"
 					v-if="[100, 200].includes(state.ruleForm?.status) && state.workflow.canHandle"
+					v-auth="'business:order:return'"
 					>退 回</el-button
 				>
 			</span>

+ 1 - 1
src/views/business/order/index.vue

@@ -218,7 +218,7 @@
 						</span>
 					</template>
 				</el-table-column>
-				<el-table-column label="操作" width="100" fixed="right" align="center">
+				<el-table-column label="操作" width=140 fixed="right" align="center">
 					<template #default="{ row }">
 						<el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.canEdit" v-auth="'business:order:edit'">
 							修改

+ 38 - 40
src/views/todo/seats/accept/History.vue

@@ -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);
 // 右边表格选中重复件