From 7984e0d8cebf4179f7ee3e2046207edd12398cf6 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Thu, 09 Nov 2023 14:47:09 +0800
Subject: [PATCH] fix:小程序详情修改

---
 pages/actionChange/workOrderDetails/index.vue |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/pages/actionChange/workOrderDetails/index.vue b/pages/actionChange/workOrderDetails/index.vue
index 490f43e..de61d5b 100644
--- a/pages/actionChange/workOrderDetails/index.vue
+++ b/pages/actionChange/workOrderDetails/index.vue
@@ -1,6 +1,6 @@
 <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 && basicInfor.stateName!=='���������'"
@@ -35,6 +35,7 @@
 				unitListL: [],
 				userInfor: null,
 				show: false,
+				isShow: false,
 				option: {}
 			}
 		},
@@ -57,13 +58,15 @@
 			//������������������ 
 			await this.$onLaunched
 			this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || 'null')
+			console.log('������������������������', 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) {
+					console.log('������������������', res)
+					if (res.data.code === 3) {
 						uni.showModal({
 							content: '���������������������������������������������',
 							showCancel: false,
@@ -76,8 +79,23 @@
 								}
 							},
 						})
+					} else if (res.data.code === 1) {
+						// ������������
+						this.basicInfor.pageState = 'edit'
+						this.basicInfor.stateName = res.data.name
+						this.isShow = true
+					} else if (res.data.code === 2) {
+						// ���������
+						this.isShow = true
+						this.basicInfor.pageState = 'view'
+						this.basicInfor.stateName = res.data.name
 					}
+				}).catch(errors => {
+					console.log('���������������������', errors)
+					console.log('���������������������params', params)
 				})
+			} else {
+				this.isShow = true
 			}
 			console.log('this.basicInfor123', this.basicInfor)
 		},

--
Gitblit v1.8.0