From 0a48655d2162b709ecb80d249a4085971add6140 Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期一, 07 七月 2025 17:26:30 +0800
Subject: [PATCH] 企业微信

---
 pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue |  155 ++++++++++++++++++++++++++++++---------------------
 1 files changed, 91 insertions(+), 64 deletions(-)

diff --git a/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue b/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue
index 6d6e422..9baefc1 100644
--- a/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue
+++ b/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue
@@ -14,16 +14,25 @@
 					<uni-forms-item :label-width="80" name="num" label="宸ュ崟鍙�:">
 						<uni-easyinput v-model="formData.orderNum" :disabled="true" />
 					</uni-forms-item>
-					<uni-forms-item :label-width="80" required name="num" label="璁惧缂栧彿:">
+					<uni-forms-item :label-width="80" name="maintenanceStatus_dictText" label="宸ュ崟鐘舵��:">
+						<uni-easyinput v-model="formData.maintenanceStatus_dictText" :disabled="true" />
+					</uni-forms-item>
+					<uni-forms-item :label-width="80"  name="num" label="璁惧缂栧彿:">
 						<uni-data-select v-model="formData.num" :localdata="equipmentList" @change="changeEquipmentList"
 							placeholder="璇烽�夋嫨" :disabled="true" />
 					</uni-forms-item>
 
+					<uni-forms-item :label-width="80" name="installationPosition_dictText" label="瀹夎浣嶇疆:">
+						<uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" />
+					</uni-forms-item>
 					<uni-forms-item :label-width="80" name="maintenanceDate" label="淇濆吇鏃ユ湡:">
 						<uni-easyinput v-model="formData.maintenanceDate" :disabled="true" />
 					</uni-forms-item>
 					<uni-forms-item :label-width="80" name="operator" label="淇濆吇浜�:">
 						<uni-easyinput v-model="formData.operator" :disabled="true" />
+					</uni-forms-item>
+					<uni-forms-item :label-width="100" name="operator" label="淇濆吇浜虹數璇�:">
+						<uni-easyinput v-model="formData.operatorPhone_dictText" :disabled="true" />
 					</uni-forms-item>
 					<uni-forms-item :label-width="80" name="remark" label="澶囨敞:">
 						<uni-easyinput v-model="formData.remark" :disabled="true" />
@@ -60,33 +69,14 @@
 							<view class="flex-sub bg-white padding-xs margin-xs radius text-right">
 								{{item.subItemName}}
 							</view>
-							<!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right"
-								v-if="item.subItemName!=null && item.subItemName.length>10">
-								{{(item.subItemName).toString().substr(0,10)+'...'}}
-							</view> -->
 
-							<!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else>
-								{{item.subItemName}}
-							</view> -->
 						</view>
 						<view class="flex">
 							<view class="flex-sub text-light bg-white  padding-xs margin-xs radius">淇濆吇瑕佹眰:</view>
 							<view class="flex-sub bg-white padding-xs margin-xs radius text-right">
 								{{item.itemDemand}}
 							</view>
-							<!-- <zb-tooltip placement="left" ref="tooltip7"  >
-								<view slot="content">
-									<view class="flex-sub bg-white padding-xs margin-xs radius text-right">
-										{{item.itemDemand}}
-									</view>
-								</view>
-								<view >
-									<button size="mini">鏇村</button >
-								</view>
-							</zb-tooltip> -->
-							<!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else>
-								{{item.itemDemand}}
-							</view> -->
+
 						</view>
 						<view class="flex">
 							<view class="flex-sub text-light bg-white  padding-xs margin-xs radius">鏄惁鎶ヤ慨:</view>
@@ -114,16 +104,17 @@
 			</uni-collapse>
 
 
-			<uni-forms  v-show="isShowSure"  ref="form" :modelValue="ScanData" validate-trigger="bind" err-show-type="undertext">
+			<uni-forms v-show="isShowSure" ref="form" :modelValue="ScanData" validate-trigger="bind"
+				err-show-type="undertext">
 				<uni-group top="1">
 					<view class="divider"><text>鐝粍闀跨‘璁や俊鎭�</text></view>
 					<!-- 	<view class="text-gray margin-bottom-lg">鈥斺�斺�斺�斺�斺�斺�斺�斺�旂彮缁勯暱纭淇℃伅鈥斺�斺�斺�斺�斺�斺�斺�斺�斺��</view> -->
 					<uni-forms-item :label-width="80" required name="typeName" label="纭绫诲瀷:">
 						<uni-data-select v-model="ScanData.typeName" :localdata="ScanData.handlingType"
-							@change="changehandlingType" placeholder="璇烽�夋嫨" :disabled="isShowSure" />
+							@change="changehandlingType" placeholder="璇烽�夋嫨" :disabled="isShowSureBtn" />
 					</uni-forms-item>
 					<uni-forms-item :label-width="80" required name="handlingSuggestion" label="纭鎰忚:">
-						<uni-easyinput type="textarea" v-model="ScanData.handlingSuggestion" :disabled="isShowSure" />
+						<uni-easyinput type="textarea" v-model="ScanData.handlingSuggestion" :disabled="isShowSureBtn"/>
 					</uni-forms-item>
 
 				</uni-group>
@@ -137,10 +128,10 @@
 						<uni-easyinput type="textarea" v-model="ScanData.initialAcceptanceComment" placeholder="璇疯緭鍏ユ剰瑙�"
 							:disabled="isShowLast" />
 					</uni-forms-item>
-					<uni-forms-item :label-width="80"  name="randomInspectionFlag" label="鎶芥鏍囪:">
+					<uni-forms-item :label-width="80" name="randomInspectionFlag" label="鎶芥鏍囪:">
 						<uni-data-select v-model="ScanData.InspectionFlagName"
 							:localdata="ScanData.randomInspectionFlagList" @change="changehandlingInspectionFlag"
-							placeholder="璇烽�夋嫨"    :disabled="isShowLast"/>
+							placeholder="璇烽�夋嫨" :disabled="isShowLast" />
 					</uni-forms-item>
 					<uni-forms-item :label-width="80" name="outNum" label="鍒濋獙鏀堕檮浠�:">
 						<uni-file-picker limit="9" :value="fileList" :image-styles="imageStyles"
@@ -157,7 +148,7 @@
 						<uni-easyinput type="textarea" v-model="ScanData.finalAcceptanceComment" placeholder="璇疯緭鍏ユ剰瑙�"
 							:disabled="isfinal" />
 					</uni-forms-item>
-					<uni-forms-item :label-width="80"  name="finalFlagName" label="鎶芥鏍囪:">
+					<uni-forms-item :label-width="80" name="finalFlagName" label="鎶芥鏍囪:">
 						<uni-data-select v-model="ScanData.finalFlagName" :localdata="ScanData.finalInspectionFlagList"
 							@change="changehandlingFinalFlag" placeholder="璇烽�夋嫨" :disabled="isfinal" />
 					</uni-forms-item>
@@ -184,6 +175,7 @@
 		mixins: [MescrollMixin], // 浣跨敤mixin
 		data() {
 			return {
+				isShowSureBtn:false,
 				readonly: false,
 				readonlyFirstFanl: false,
 				readonlyFirst: false,
@@ -293,11 +285,13 @@
 				procInstId: '',
 				values: '',
 				flag: '',
+				from: '',
 				imageFiles: '',
 				imageObjectInIt: [],
 				imageFilesList: [],
 				imageObjectFinal: [],
-				imageFilesnitialAcceptList: []
+				imageFilesnitialAcceptList: [],
+				todoName: ''
 			}
 		},
 		computed: {
@@ -314,9 +308,19 @@
 		onLoad(options) {
 			const annItem = JSON.parse(decodeURIComponent(options.item));
 			this.flag = options.flag
-			console.log(this.flag)
+			this.from = options.from
+			if (this.flag == 'task') {
+				this.todoName = annItem.taskName
+			} else {
+				this.todoName = annItem.name
+			}
+			if (this.from === 'detils') {
+				this.id = annItem.id;
+				console.log(annItem.id);
+			} else {
+				this.id = annItem.dataId;
+			}
 			this.variables = annItem.variables
-			this.id = annItem.dataId
 			this.taskId = annItem.id
 			this.procInstId = annItem.procInstId
 			this.assignee = annItem.assignee
@@ -328,7 +332,7 @@
 		},
 
 		methods: {
-		
+
 			changehandlingFinalFlag(e) {
 				this.ScanData.finalFlagName = e;
 			},
@@ -430,6 +434,14 @@
 						// })
 						this.$Router.replaceAll({
 							name: 'ToDoList'
+						})
+					} else {
+
+						uni.showModal({
+							title: "鎻愮ず",
+							content: res.data.message,
+							confirmText: '纭畾',
+							showCancel: false,
 						})
 					}
 				}).catch(() => {
@@ -671,16 +683,22 @@
 					//璁剧疆鍒楄〃鏁版嵁
 					if (res.data.success) {
 						console.log("res", res.data.result.equipmentCode)
+						this.title = this.todoName ?? '璇︽儏'
 						this.formData.num = this.announcement1.equipmentId
 						this.formData.orderNum = this.announcement1.orderNum
+						this.formData.maintenanceStatus_dictText = this.announcement1.maintenanceStatus_dictText
+						this.formData.installationPosition_dictText = this.announcement1
+							.installationPosition_dictText
 						this.formData.operator = this.announcement1.operator_dictText
+						this.formData.operatorPhone_dictText = this.announcement1.operatorPhone_dictText
 						this.formData.maintenanceDate = this.announcement1.maintenanceDate
 						this.formData.remark = this.announcement1.remark
 						this.ScanData.finalAcceptanceComment = this.announcement1.finalAcceptanceComment
+
 						if (this.announcement1.randomInspectionFlag != null) {
 							this.ScanData.InspectionFlagName = this.announcement1.randomInspectionFlag
 						}
-						
+
 						if (this.announcement1.finalRandomInspectionFlag != null) {
 							this.ScanData.finalFlagName = this.announcement1.finalRandomInspectionFlag
 						}
@@ -692,18 +710,20 @@
 							 */
 							case 'WAIT_INITIAL_ACCEPTANCE':
 								if (this.flag == 'task') {
-									this.title = '璇︽儏'
-									this.readonly = true;
-									this.readonlyFirst = true;
-									this.isShowSure = true;
-									this.isHideFist = true;
-									this.isShowLast = true;
-									this.isShowBtn = false;
-								} else {
-									this.title = '鍒濇'
+									// this.title = '璇︽儏'
 									this.readonly = true
-									this.isShowSure = true;
-									this.isHideFist = true;
+									this.isShowSureBtn=true
+									this.readonlyFirst = true
+									this.isShowSure = true
+									this.isHideFist = true
+									this.isShowLast = true
+									this.isShowBtn = false
+								} else {
+									// this.title = '鍒濇'
+									this.readonly = true
+									this.isShowSureBtn=true
+									this.isShowSure = true
+									this.isHideFist = true
 								}
 
 								break
@@ -712,24 +732,26 @@
 								 */
 							case 'WAIT_FINAL_ACCEPTANCE':
 								if (this.flag == 'task') {
-									this.title = '璇︽儏'
+									// this.title = '璇︽儏'
 									this.readonly = true
 									this.readonlyFirst = true
-									this.isHideFist = true;
-									this.isShowLast = true;
-									this.isShowSure = true;
-									this.isHideLast = true;
-									this.isShowBtn = false;
-									this.isfinal = true;
-									this.readonlyFirstFanl = true;
+									this.isHideFist = true
+									this.isShowLast = true
+									this.isShowSure = true
+									this.isHideLast = true
+									this.isShowBtn = false
+									this.isfinal = true
+									this.isShowSureBtn=true
+									this.readonlyFirstFanl = true
 								} else {
-									this.title = '璁捐兘閮ㄧ粓楠�'
+									// this.title = '璁捐兘閮ㄧ粓楠�'
 									this.readonly = true
+									this.isShowSureBtn=true
 									this.readonlyFirst = true
-									this.isHideFist = true;
-									this.isShowLast = true;
-									this.isShowSure = true;
-									this.isHideLast = true;
+									this.isHideFist = true
+									this.isShowLast = true
+									this.isShowSure = true
+									this.isHideLast = true
 								}
 
 								break
@@ -739,19 +761,21 @@
 							case 'WAIT_CONFIRM':
 
 								if (this.flag == 'task') {
-									this.title = '璇︽儏'
+									// this.title = '璇︽儏'
 									this.readonly = true
+									
 									this.isHideLast = false
 									this.isHideFist = false
 									this.isShowBtn = false
 									this.isShowSure = true
 								} else {
-									this.title = '鐝粍闀跨‘璁�'
+									// this.title = '鐝粍闀跨‘璁�'
 									this.isHideLast = false
 									this.readonly = true
 									this.isHideFist = false
 									this.isShowBtn = true
-									this.isShowSure = false
+									this.isShowSure = true
+								
 								}
 
 								break
@@ -761,23 +785,26 @@
 								this.isHideFist = true
 								this.isShowLast = true
 								this.isfinal = true
+								this.isShowSureBtn=true
 								this.readonlyFirst = true
 								this.readonly = true
 								this.readonlyFirstFanl = true
 								this.isShowBtn = false
-								this.title = '璇︽儏'
+								// this.title = '璇︽儏'
 								break
-								
+
 							case 'UNDER_MAINTENANCE':
-								
 								this.isfinal = true
 								this.readonlyFirst = true
 								this.readonly = true
 								this.readonlyFirstFanl = true
 								this.isShowBtn = false
-								this.title = '璇︽儏'
 								break
-								
+							case 'WAIT_MAINTENANCE':
+								if (this.flag == 'task')
+									this.readonly = true
+								this.isShowBtn = false
+								break
 						}
 						this.ScanData.initialAcceptanceComment = this.announcement1.initialAcceptanceComment
 						this.ScanData.typeName = this.announcement1.confirmDealType

--
Gitblit v1.9.3