From bbae990ed1f4574fa954753faeae159052d03fba Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期二, 27 一月 2026 16:14:06 +0800
Subject: [PATCH] 待我审核增加销售订单,采购订单

---
 pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue |   97 +++++++++++++++++++++++++++++++++++-------------
 1 files changed, 70 insertions(+), 27 deletions(-)

diff --git a/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue b/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue
index 74c82a2..099c58f 100644
--- a/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue
+++ b/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue
@@ -11,14 +11,14 @@
 				</view>
 			</view>
 			<view class="form-item">
-				<view class="title">宸ュ簭:</view>
+				<view class="title required">宸ュ簭:</view>
 				<view class="right">
 					<uni-combox :candidates="HProcNameArray" name="HProcName" id="HProcName" placeholder="璇烽�夋嫨宸ュ簭鍙�"
 						v-model="hform.HProcName" @input="onHProcNameChangeHandler"></uni-combox>
 				</view>
 			</view>
 			<view class="form-item">
-				<view class="title">鍙栨牱鏁伴噺:</view>
+				<view class="title required">鍙栨牱鏁伴噺:</view>
 				<view class="right">
 					<input type="number" name="HQty" id="HQty" v-model="hform.HQty" />
 				</view>
@@ -31,7 +31,7 @@
 				</view>
 			</view>
 			<view class="form-item">
-				<view class="title">閫佹祴绫诲瀷:</view>
+				<view class="title required">閫佹祴绫诲瀷:</view>
 				<view class="right">
 					<uni-combox :candidates="TestTypeArray" v-model="hform.TestType"
 						@input="TestTypeChange"></uni-combox>
@@ -51,16 +51,16 @@
 				</view>
 			</view>
 			<view class="form-item">
-				<view class="title">鐢熶骇鐝:</view>
+				<view class="title required">鐢熶骇鐝:</view>
 				<view class="right">
 					<uni-combox :candidates="HShiftsNameArray" name="HShiftsName" id="HShiftsName" placeholder="璇烽�夋嫨鐢熶骇鐝"
 						v-model="hform.HShiftsName" @input="HShiftsNameChangeHandler"></uni-combox>
 				</view>
 			</view>
 			<view class="form-item">
-				<view class="title">鐢熶骇鐝粍:</view>
+				<view class="title required">鐢熶骇鐝粍:</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>
@@ -199,17 +199,17 @@
 					HSampleDamageQty: 0,
 					TestType: '棣栨',
 					HBadNote: '',
-					HDeptName: '',
-					HDeptID: 0,
-					HCenterID: 0,
+					HDeptName: getUserInfo().HDeptName,
+					HDeptID: getUserInfo().HDeptID,
+					HCenterID: getUserInfo().HWorkCenterID,
 					HShiftsName: '',
 					HShiftsID: 0,
-					HGroupName: '',
-					HGroupID: 0,
-					HCheckEmpName: '',
-					HCheckEmp: '',
-					HSourceName: '',
-					HSourceID: 0,
+					HGroupName: getUserInfo().HGroupName,
+					HGroupID: getUserInfo().HGroupID,
+					HCheckEmpName: getUserInfo().HEmpName,
+					HCheckEmp: getUserInfo().HEmpID,
+					HSourceName: getUserInfo().HSourceName,
+					HSourceID: getUserInfo().HSourceID,
 					HDate: dayjs(new Date()).format("YYYY-MM-DD"),
 					HBillNo: '',
 					HInterID: 0,
@@ -268,7 +268,7 @@
 			let {
 				operationType
 			} = e
-			if (operationType == 0) {
+			if (operationType == 0 || operationType == 1) {
 				this.getMaxNum()
 				this.refSav = 'Add'
 			} else {
@@ -281,6 +281,7 @@
 			this.GetEmployeeList()
 			this.getSourceList()
 			this.GetDepartmentList()
+			this.get_HWorkShift()
 		},
 		methods: {
 			HDeptNameChangeHandler() {
@@ -367,7 +368,7 @@
 					url: '/Web/GetEmployeeList_Json',
 					data: {
 						Employee: '',
-						HGroupID: this.hform.HGroupID
+						HGroupID: 0
 					},
 					resFunction: (res) => {
 						let {
@@ -494,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]['鐝']
+						}
 					}
 				})
 			},
@@ -625,7 +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',
@@ -650,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) {
@@ -706,10 +729,23 @@
 							Message
 						} = res.data
 						if (count == 1) {
-							return uni.showToast({
-								icon: 'none',
-								title: "鎻愪氦鎴愬姛!"
-							})
+							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)
+									}
+								}
+							});
 						} else {
 							return uni.showToast({
 								icon: 'none',
@@ -721,7 +757,7 @@
 			},
 			onAddNewHandler() {
 				uni.redirectTo({
-					url: "/pages/quyangdan/TakeSampleCheckBillList?operationType=0"
+					url: "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill?operationType=1"
 				})
 			},
 			goBack() {
@@ -757,7 +793,7 @@
 			}
 
 			.title {
-				width: 5em;
+				width: 6em;
 				font-size: 30rpx;
 				flex-shrink: 0;
 				text-align: right;
@@ -828,4 +864,11 @@
 	.placeholder__view {
 		flex: 1;
 	}
+    
+    .required::after{
+          content: "*";
+          color: red;
+          margin-left: 4px; 
+          font-weight: bold;
+    }
 </style>
\ No newline at end of file

--
Gitblit v1.9.1