From b0bffe34022a062856ca9fedefeaa5ced90e7327 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期日, 25 一月 2026 16:40:40 +0800
Subject: [PATCH] 页面优化

---
 pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue |   65 +++++++++++++++++++++-----------
 1 files changed, 43 insertions(+), 22 deletions(-)

diff --git a/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue b/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue
index 5edebd6..25bedbd 100644
--- a/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue
+++ b/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue
@@ -60,7 +60,7 @@
 			<view class="form-item">
 				<view class="title">鐢熶骇鐝粍:</view>
 				<view class="right">
-					<uni-combox :candidates="HGroupNameArray" name="HShiftsName" id="HShiftsName" placeholder="璇烽�夋嫨鐢熶骇鐝粍"
+					<uni-combox :candidates="HGroupNameArray" name="HGroupName" id="HGroupName" placeholder="璇烽�夋嫨鐢熶骇鐝粍"
 						v-model="hform.HGroupName" @input="HGroupNameChangeHandler"></uni-combox>
 				</view>
 			</view>
@@ -368,7 +368,7 @@
 					url: '/Web/GetEmployeeList_Json',
 					data: {
 						Employee: '',
-						HGroupID:0
+						HGroupID: 0
 					},
 					resFunction: (res) => {
 						let {
@@ -495,9 +495,10 @@
 							Message,
 							count
 						} = res.data
-
-						this.hform.HShiftsID = data[0]['HInterID']
-						this.hform.HShiftsName = data[0]['鐝']
+						if (count && data && data.length > 0) {
+							this.hform.HShiftsID = data[0]['HInterID']
+							this.hform.HShiftsName = data[0]['鐝']
+						}
 					}
 				})
 			},
@@ -626,8 +627,22 @@
 								"HICMOBillNo": data1[0].浠诲姟鍗曞彿, //鐢熶骇璁㈠崟
 								"HDeptID": data1[0].HWorkShopID, //杞﹂棿ID
 								"HDeptName": data1[0].鐢熶骇杞﹂棿, //杞﹂棿
-								
+
 							})
+							if (data1 && data1.length === 1) {
+								// 鑾峰彇宸ュ簭ID
+								let procId = data1[0].HProcID
+								// 鍦ㄥ伐搴忔暟缁勪腑鏌ユ壘瀵瑰簲鐨勫伐搴忓悕绉�
+								let procIndex = this.HProcNameArraySource.findIndex(item => item.HItemID ==
+									procId)
+
+								if (procIndex !== -1) {
+									// 鑷姩璁剧疆宸ュ簭
+									this.hform.HProcName = this.HProcNameArraySource[procIndex].HName
+									this.hform.HProcID = procId
+									this.onHProcNameChangeHandler(this.hform.HProcName)
+								}
+							}
 
 							uni.showToast({
 								icon: 'none',
@@ -652,7 +667,13 @@
 				if (this.hform.HQty == '') {
 					return uni.showToast({
 						icon: 'none',
-						title: '鍙栨牱鏁伴噺涓虹┖'
+						title: '鍙栨牱鏁伴噺涓嶈兘涓虹┖'
+					})
+				}
+				if (this.hform.HSampleDamageQty == '') {
+					return uni.showToast({
+						icon: 'none',
+						title: '鐮村潖鎬у疄楠屾暟閲忎笉鑳戒负绌�'
 					})
 				}
 				if (this.hform.HProcID == 0) {
@@ -709,21 +730,21 @@
 						} = res.data
 						if (count == 1) {
 							uni.showModal({
-							    title: '鎻愮ず',
-							    content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵',
-							    success: (res) => {
-							        if (res.confirm) {
-							            console.log('鐢ㄦ埛鐐瑰嚮纭畾');
-							            uni.redirectTo({
-							                url: '/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill?operationType=1'
-							            })
-							        } else if (res.cancel) {
-							            console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
-							            setTimeout(() => {
-							            	uni.navigateBack();
-							            }, 50)
-							        }
-							    }
+								title: '鎻愮ず',
+								content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵',
+								success: (res) => {
+									if (res.confirm) {
+										console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+										uni.redirectTo({
+											url: '/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill?operationType=1'
+										})
+									} else if (res.cancel) {
+										console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+										setTimeout(() => {
+											uni.navigateBack();
+										}, 50)
+									}
+								}
 							});
 						} else {
 							return uni.showToast({

--
Gitblit v1.9.1