From f71917022b1f1078c2670972c8dd9c7f89eb3744 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Wed, 08 Nov 2023 11:16:48 +0800
Subject: [PATCH] fix:查看详情权限修改

---
 pages/actionChange/workOrderDetails/index.vue |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/pages/actionChange/workOrderDetails/index.vue b/pages/actionChange/workOrderDetails/index.vue
index 8c20e69..887b070 100644
--- a/pages/actionChange/workOrderDetails/index.vue
+++ b/pages/actionChange/workOrderDetails/index.vue
@@ -1,9 +1,10 @@
 <template>
 	<view class="mainContent">
-		<basicInfor :basic-infor="basicInfor" />
+		<basicInfor :basic-infor="basicInfor" v-if="isShow" />
 		<rectificationInfor ref="rectificationInfor" :basic-infor="basicInfor"
 			v-if="!(pageState === 'view' && basicInfor.state === 20)" />
-		<approvalnfor ref="approvalnfor" v-if="basicInfor.state >= 30" :basic-infor="basicInfor" />
+		<approvalnfor ref="approvalnfor" v-if="basicInfor.state >= 30 && basicInfor.stateName!=='���������'"
+			:basic-infor="basicInfor" />
 		<view class="bunts">
 			<view class="but butRight">
 				<u-button shape="square" @click="refuse" type="error"
@@ -33,7 +34,9 @@
 				basicInfor: {},
 				unitListL: [],
 				userInfor: null,
-				show: false
+				show: false,
+				isShow: false,
+				option: {}
 			}
 		},
 		computed: {
@@ -49,14 +52,19 @@
 			this.basicInfor = JSON.parse(option.infor)
 			// let type = JSON.parse(option.type)
 			console.log('option', option)
+			this.option = option
+		},
+		async mounted() {
+			//������������������ 
+			await this.$onLaunched
 			this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || 'null')
-			if (option.type === 'share' && this.userInfor) {
+			if (this.option.type === 'share' && this.userInfor) {
 				let params = {
 					allocationNum: this.basicInfor.allocationNum,
 					userId: this.userInfor.userId
 				}
 				this.$http.httpGet('/allocationApp/authority', params).then(res => {
-					if (!res.data) {
+					if (res.data === 3) {
 						uni.showModal({
 							content: '���������������������������������������������',
 							showCancel: false,
@@ -69,10 +77,20 @@
 								}
 							},
 						})
+					} else if (res.data === 1) {
+						// ������������
+						this.basicInfor.pageState = 'edit'
+						this.isShow = true
+					} else if (res.data === 2) {
+						// ���������
+						this.isShow = true
+						this.basicInfor.pageState = 'view'
 					}
 				})
+			} else {
+				this.isShow = true
 			}
-			console.log('this.basicInfor ', this.basicInfor)
+			console.log('this.basicInfor123', this.basicInfor)
 		},
 		methods: {
 			closePop() {},

--
Gitblit v1.8.0