From 11da2aef4b4aa8ebff5b58b5241aaa6e0df56eb4 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Tue, 18 Jun 2024 15:43:09 +0800
Subject: [PATCH] fix: bug修改

---
 pages/actionChange/workOrderDetails/index.vue |   93 ++++++++++++++++++++++++++++------------------
 1 files changed, 57 insertions(+), 36 deletions(-)

diff --git a/pages/actionChange/workOrderDetails/index.vue b/pages/actionChange/workOrderDetails/index.vue
index fec6ade..8db8670 100644
--- a/pages/actionChange/workOrderDetails/index.vue
+++ b/pages/actionChange/workOrderDetails/index.vue
@@ -1,5 +1,9 @@
 <template>
 	<view class="mainContent">
+		<u-sticky>
+			<u-alert v-if="basicInfor.invalidReason" :title="`���������:${basicInfor.invalidReason}`" type="warning"
+				:description="description"></u-alert>
+		</u-sticky>
 		<basicInfor :basic-infor="basicInfor" v-if="basicInfor.unitId" />
 		<rectificationInfor ref="rectificationInfor" :basic-infor="basicInfor"
 			v-if="!(pageState === 'view' && basicInfor.state === 20)&&isShow" />
@@ -55,43 +59,60 @@
 		async mounted() {
 			await this.$onLaunched
 			//������������������ 
-			this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || 'null')
+			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 => {
-					console.log('������������������', res)
-					if (res.data.code === 3) {
-						uni.showModal({
-							content: '���������������������������������������������',
-							showCancel: false,
-							confirmText: '������',
-							success: res => {
-								if (res.confirm) {
-									uni.reLaunch({
-										url: '/pages/index/index',
-									})
-								}
-							},
-						})
-					} else if (res.data.code === 1) {
-						// ������������
-						this.basicInfor.pageState = 'edit'
-						this.basicInfor.stateName = res.data.name
-						this.getData()
-					} else if (res.data.code === 2) {
-						// ���������
-						this.basicInfor.pageState = 'view'
-						this.basicInfor.stateName = res.data.name
-						this.getData()
+			if (this.option.type === 'share') {
+				if (this.userInfor) {
+					let params = {
+						allocationNum: this.basicInfor.allocationNum,
+						userId: this.userInfor.userId
 					}
-				}).catch(errors => {
-					console.log('���������������������', errors)
-					console.log('���������������������params', params)
-				})
+					this.$http.httpGet('/allocationApp/authority', params).then(res => {
+						console.log('������������������', res)
+						if (res.data.code === 3) {
+							uni.showModal({
+								content: '���������������������������������������������',
+								showCancel: false,
+								confirmText: '������',
+								success: res => {
+									if (res.confirm) {
+										uni.reLaunch({
+											url: '/pages/index/index',
+										})
+									}
+								},
+							})
+						} else if (res.data.code === 1) {
+							// ������������
+							this.basicInfor.pageState = 'edit'
+							this.basicInfor.stateName = res.data.name
+							this.getData()
+						} else if (res.data.code === 2) {
+							// ���������
+							this.basicInfor.pageState = 'view'
+							this.basicInfor.stateName = res.data.name
+							this.getData()
+						}
+					}).catch(errors => {
+						console.log('���������������������', errors)
+						console.log('���������������������params', params)
+					})
+				} else {
+					uni.showModal({
+						title: '���������',
+						content: '������������������������������������������',
+						showCancel: false,
+						confirmText: '������',
+						success: res => {
+							if (res.confirm) {
+								uni.reLaunch({
+									url: '/pages/login/login',
+								})
+							}
+						},
+					})
+					this.$isResolve()
+				}
 			} else {
 				this.isShow = true
 				this.getData()
@@ -108,7 +129,7 @@
 					}
 					console.log('this.basicInfor123', this.basicInfor)
 					let time = this.basicInfor.time.slice(5)
-					this.share.title = `${this.basicInfor.escalationUnitName}-${time}������������`
+					this.share.title = `${this.basicInfor.unitName}-${time}������������`
 					this.show = false
 					this.isShow = true
 				})

--
Gitblit v1.8.0