From fb0d024283a24042e55c70019dffbcd104792135 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期二, 21 四月 2026 16:53:50 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 pages/ZLGL/QualityReportStep/QualityReportStepBill.vue |  724 +++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 481 insertions(+), 243 deletions(-)

diff --git a/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue b/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
index 3df60d0..98fd4bf 100644
--- a/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
+++ b/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
@@ -4,9 +4,16 @@
 		<view class="bill-main-area">
 			<!-- 涓昏〃椤电 -->
 			<view class="bill-main-tabs">
-				<view :class="mainTabSelected == 1 ? 'selected' : ''" @tap="mainTabSelected = 1">鍩烘湰淇℃伅</view>
-				<view :class="mainTabSelected == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">鎵弿淇℃伅</view>
-				<view :class="mainTabSelected == 3 ? 'selected' : ''" @tap="mainTabSelected = 3">鍒跺崟淇℃伅</view>
+				<view class="tabs-left">
+					<view :class="mainTabSelected == 1 ? 'selected' : ''" @tap="mainTabSelected = 1">鍩烘湰淇℃伅</view>
+					<view :class="mainTabSelected == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">鎵弿淇℃伅</view>
+					<view :class="mainTabSelected == 3 ? 'selected' : ''" @tap="mainTabSelected = 3">鍒跺崟淇℃伅</view>
+					<view :class="mainTabSelected == 4 ? 'selected' : ''" @tap="mainTabSelected = 4">鍏朵粬淇℃伅</view>
+				</view>
+				<view class="mode-switch-right">
+					<text class="mode-text">{{ directInputMode ? '鐩存帴杈撳叆' : '鍙屽嚮绱姞' }}</text>
+					<switch :checked="directInputMode" @change="onModeSwitchChange" color="#3a78ff" style="transform: scale(0.7);" />
+				</view>
 			</view>
 			<!-- 涓昏〃鍐呭 -->
 			<view class="bill-main-contents">
@@ -80,30 +87,14 @@
 							<input type="text" disabled :value="hform.HMaterName" />
 						</view>
 					</view>
+					
+					
 					<view class="form-item">
-					    <view class="left">婧愬崟鏁伴噺</view>
-					    <view class="right disabled">
-					        <input type="number" v-model="hform.HSourceBillQty" />
-					    </view>
-					</view>
-					<view class="form-item">
-						<view class="left">妫�楠屾暟閲�</view>
-						<view class="right">
-							<input type="number" v-model="hform.HCheckQty" :disabled="hasCheckQty" />
+						<view class="left">宸ュ簭</view>
+						<view class="right disabled">
+							<input type="text" disabled :value="hform.HProcName" />
 						</view>
-					</view>
-					<view class="form-item">
-						<view class="left">鐢熶骇鐝粍</view>
-						<view class="right-select">
-							<zxz-uni-data-select
-								v-model="hform.HGroupID"
-								dataKey="鐝粍鍚嶇О"
-								dataValue="HItemID"
-								:filterable="true"
-								:localdata="HGroupList"
-								:clear="false"
-							></zxz-uni-data-select>
-						</view>
+						
 					</view>
 					<view class="form-item">
 						<view class="left">妫�楠屽憳</view>
@@ -119,29 +110,42 @@
 						</view>
 					</view>
 					
-					<view class="form-item">
-						<view class="left">宸ュ簭</view>
-						<view class="right disabled">
-							<input type="text" disabled :value="hform.HProcName" />
-						</view>
-						
-					</view>
+					
 					
 					<view class="form-item">
-						<view class="left">鐢熶骇璧勬簮</view>
-						<view class="right-select">
-							<zxz-uni-data-select
-								v-model="hform.HSourceID"
-								dataKey="鐢熶骇璧勬簮鍚嶇О"
-								dataValue="HItemID"
-								:filterable="true"
-								:localdata="HSourceList"
-								:clear="false"
-							></zxz-uni-data-select>
-						</view>
+					    <view class="left">婧愬崟鏁伴噺</view>
+					    <view class="right disabled">
+					        <input type="number" v-model="hform.HSourceBillQty" />
+					    </view>
 					</view>
 					
+					
+					
 					<view class="form-item">
+						<view class="left">閫佹鏁伴噺</view>
+						<view class="right">
+							<input type="number" v-model="hform.HCheckQty" :disabled="hasCheckQty" />
+						</view>
+					</view>
+					<view class="form-item">
+						<view class="left">涓嶈壇鏁伴噺</view>
+						<view class="right">
+							{{ totalNum }}
+						</view>
+					</view>
+					<view class="form-item">
+						<view class="left">鍚堟牸鏁伴噺</view>
+						<view class="right">
+							{{ hform.HCheckQty-totalNum }}
+						</view>
+					</view>
+					<view class="form-item">
+						<view class="left">涓嶈壇鐜�</view>
+						<view class="right">
+							{{ totalNum/(hform.HCheckQty==0?1:hform.HCheckQty) }}
+						</view>
+					</view>
+					<view class="form-item" style="width: 1350rpx;">
 						<view class="left">澶囨敞</view>
 						<view class="right">
 							<input type="text" v-model="hform.HRemark" value="" />
@@ -228,6 +232,35 @@
 						</view>
 					</view>
 				</view>
+				<!-- 鍏朵粬淇℃伅 -->
+				<view class="bill-main-content" v-if="mainTabSelected == 4">
+					<view class="form-item">
+						<view class="left">鐢熶骇鐝粍</view>
+						<view class="right-select">
+							<zxz-uni-data-select
+								v-model="hform.HGroupID"
+								dataKey="鐝粍鍚嶇О"
+								dataValue="HItemID"
+								:filterable="true"
+								:localdata="HGroupList"
+								:clear="false"
+							></zxz-uni-data-select>
+						</view>
+					</view>
+					<view class="form-item">
+						<view class="left">鐢熶骇璧勬簮</view>
+						<view class="right-select">
+							<zxz-uni-data-select
+								v-model="hform.HSourceID"
+								dataKey="鐢熶骇璧勬簮鍚嶇О"
+								dataValue="HItemID"
+								:filterable="true"
+								:localdata="HSourceList"
+								:clear="false"
+							></zxz-uni-data-select>
+						</view>
+					</view>
+				</view>
 			</view>
 		</view>
 		<!-- 瀛愯〃鍖哄煙 -->
@@ -250,7 +283,7 @@
 					<view >
 						<view>{{ item.涓嶈壇鍘熷洜浠g爜 }}</view>
 						<view>{{ item.涓嶈壇鍘熷洜鍚嶇О }}</view>
-						<view>姹囨姤鎬绘暟:{{ item.num }}</view>
+						<view style="color:brown;">姹囨姤鎬绘暟:{{ item.num }}</view>
 					</view>
 				</view>
 			</view>
@@ -265,6 +298,32 @@
 		
 		<BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HSourceBillType"
 			:HStockOrgID="hform.HStockOrgID" @BillSelectComplete="HandleBillSelectComplete"></BillListPopupVue>
+
+		<!-- 鐩存帴杈撳叆鏁伴噺寮圭獥 -->
+		<uni-popup ref="inputQtyPopup" type="center">
+			<view class="input-qty-popup">
+				<view class="popup-title">杈撳叆涓嶈壇鏁伴噺</view>
+				<view class="popup-content">
+					<view class="popup-info">
+						<text class="popup-label">涓嶈壇鍘熷洜锛�</text>
+						<text class="popup-value">{{ currentItem && currentItem.涓嶈壇鍘熷洜鍚嶇О || '' }}</text>
+					</view>
+					<view class="popup-info">
+						<text class="popup-label">褰撳墠鏁伴噺锛�</text>
+						<text class="popup-value">{{ currentItem && currentItem.num || 0 }}</text>
+					</view>
+					<view class="popup-input-row">
+						<text class="popup-label">杈撳叆鏁伴噺锛�</text>
+						<input class="popup-input" type="number" v-model="inputQtyValue" placeholder="璇疯緭鍏ユ暟閲�" />
+					</view>
+				</view>
+				<view class="popup-buttons">
+					<button class="btn-c" size="mini" @tap="cancelInputQty">鍙栨秷</button>
+					<view style="flex: 1;"></view>
+					<button class="btn-a" size="mini" @tap="confirmInputQty">纭</button>
+				</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 
@@ -287,6 +346,11 @@
 			BillListPopupVue,
 		},
 		computed: {
+			// 璁$畻 num 鍚堣
+			totalNum() {
+			  if (!this.HBadReasonList || this.HBadReasonList.length === 0) return 0;
+			  return this.HBadReasonList.reduce((sum, item) => sum + (item.num || 0), 0);
+			}
 		},
 		data() {
 			return {
@@ -294,7 +358,12 @@
 				//涓婁竴娆$偣鍑绘椂闂�
 				lastClickTime: 0,
 				operationType: 1,
-				
+				// 鐩存帴杈撳叆妯″紡寮�鍏�
+				directInputMode: true,
+				// 寮圭獥鐩稿叧
+				currentItem: null,
+				inputQtyValue: '',
+
 				mainTabSelected: 1,
 				subTabSelected: 0,
 
@@ -349,6 +418,7 @@
 					HCheckQty: 0,
 					//婧愬崟淇℃伅
 					HSourceBillQty: 0,
+					HSourceBillNo:'',
 					HSourceBillType: "3772",
 					//娴佽浆鍗′俊鎭�
 					HICMOBillNo: "",
@@ -402,6 +472,11 @@
 			},
 			//涓嶈壇鍘熷洜鍗曞嚮
 			reasonClick(item) {
+				// 鐩存帴杈撳叆妯″紡涓嬶紝鍗曞嚮鐩存帴寮瑰嚭杈撳叆妗�
+				if (this.directInputMode) {
+					this.showDirectInputDialog(item);
+					return;
+				}
 			    const now = Date.now();
 			    if (now - this.lastClickTime < 300) {
 			      // 鍙屽嚮閫昏緫
@@ -412,6 +487,37 @@
 			      this.handleSingleClick(item);
 			      this.lastClickTime = now;
 			    }
+			},
+			// 妯″紡鍒囨崲
+			onModeSwitchChange(e) {
+				this.directInputMode = e.detail.value;
+			},
+			// 鏄剧ず鐩存帴杈撳叆鏁伴噺鐨勫脊绐�
+			showDirectInputDialog(item) {
+				this.currentItem = item;
+				this.inputQtyValue = String(item.num || 0);
+				this.$refs.inputQtyPopup.open();
+			},
+			// 鍙栨秷杈撳叆
+			cancelInputQty() {
+				this.$refs.inputQtyPopup.close();
+				this.currentItem = null;
+				this.inputQtyValue = '';
+			},
+			// 纭杈撳叆
+			confirmInputQty() {
+				const inputQty = parseInt(this.inputQtyValue);
+				if (isNaN(inputQty) || inputQty < 0) {
+					uni.showToast({
+						title: '璇疯緭鍏ユ湁鏁堟暟閲�',
+						icon: 'none'
+					});
+					return;
+				}
+				this.submitBarCodeWithQty(this.currentItem, inputQty);
+				this.$refs.inputQtyPopup.close();
+				this.currentItem = null;
+				this.inputQtyValue = '';
 			},
 			handleSingleClick(item) {
 				console.log('鍗曞嚮:', item.涓嶈壇鍘熷洜鍚嶇О);
@@ -461,12 +567,18 @@
 			toScanCode() {
 				MpaasScan.scanCode((res) => {
 					if (res) {
-						this.getSourceBillInfo(HBarCode);
+						this.getSourceBillInfo(res);
 					}
 				});
 			},
 			async getGy_BadReasonList() {
-				let sWhere = ` and HUSEORGID = '${uni.getStorageSync('OrganizationID')}' and ISNULL(瀹℃牳浜�,'')  != '' order by 涓嶈壇鍘熷洜浠g爜`
+				let sWhere = ` and HUSEORGID = '${uni.getStorageSync('OrganizationID')}' and ISNULL(瀹℃牳浜�,'')  != '' `
+				if (this.serverUrl == 'http://122.228.39.234:7177/API/') {
+				    //娴疯瘹鏍规嵁鐗╂枡鍒嗙粍璁剧疆涓嶈壇鍘熷洜
+					sWhere += (" and HDeptID="+this.hform.HDeptID+" order by 涓嶈壇鍘熷洜浠g爜")
+				}else{
+					sWhere += " order by 涓嶈壇鍘熷洜浠g爜"
+				}
 				let res = await CommonUtils.doRequest2Async({
 					url: "/Gy_BadReason/list",
 					data: {
@@ -493,7 +605,7 @@
 						}		
 					})
 					this.HBadReasonList = data;
-					
+					this.getHisReportList();//鑾峰彇鍘嗗彶璁板綍
 				} else {
 					CommonUtils.showTips({
 						title: '娓╅Θ鎻愮ず',
@@ -523,12 +635,19 @@
 					count
 				} = res.data
 				if (count == 1) {
+					if(data[0]['HBack']==1){
+						CommonUtils.showTips({
+							title: '娓╅Θ鎻愮ず',
+							message: data[0]['HBackRemark']
+						})
+						return;
+					}
 					this.hform.HMaterID = data[0]['HMaterID']
 					this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
 					this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
 					//婧愬崟淇℃伅
-					this.hform.HMainSourceBillNo = data[0]['HBillNo']
-					this.hform.HSourceBillNo = data[0]['HBillNo']
+					this.hform.HMainSourceBillNo = data[0]['鍗曟嵁鍙�']
+					this.hform.HSourceBillNo = data[0]['鍗曟嵁鍙�']
 					this.hform.HMainSourceInterID = data[0].HInterID
 					this.hform.HMainSourceEntryID = data[0].HEntryID
 					this.hform.HSourceBillQty = data[0].娴佽浆鍗℃暟閲�
@@ -547,7 +666,8 @@
 					this.hform.HProcID= data[0].HProcID
 					this.hform.HProcName= data[0].褰撳墠宸ュ簭
 					this.hform.HDeptID= data[0].HWorkShopID
-
+					this.getGy_BadReasonList();
+					
 				} else {
 					CommonUtils.showTips({
 						title: '娓╅Θ鎻愮ず',
@@ -583,13 +703,21 @@
 			            count
 			        } = res.data
 			        if (count == 1) {
+						//濡傛灉婧愬崟鏁伴噺瓒呭嚭鎻愮ず
+						if(data[0]['HBack']==1){
+							CommonUtils.showTips({
+								title: '娓╅Θ鎻愮ず',
+								message: data[0]['HBackRemark']
+							})
+							return;
+						}
 			            console.log('鑾峰彇婧愬崟锛�', data)
 			            this.hform.HMaterID = data[0]['HMaterID']
 			            this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
 			            this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
 			            //婧愬崟淇℃伅
 			            this.hform.HMainSourceBillNo = data[0]['HBillNo']
-			            this.hform.HSourceBillNo = data[0]['HBillNo']
+			            this.hform.HSourceBillNo = data[0]['鍗曟嵁鍙�']
 			            this.hform.HMainSourceInterID = data[0].HInterID
 			            this.hform.HMainSourceEntryID = data[0].HEntryID
 			            this.hform.HSourceBillQty = data[0].娴佽浆鍗℃暟閲�
@@ -610,6 +738,7 @@
 			            this.hform.HProcName= data[0].褰撳墠宸ュ簭
 						this.hform.HDeptID= data[0].HWorkShopID
 			            this.$refs['billList'].exit()
+						this.getGy_BadReasonList();
 			        } else {
 			            CommonUtils.showTips({
 			                title: '娓╅Θ鎻愮ず',
@@ -633,22 +762,25 @@
 						url: "/Sc_QualityReportBill/get_BarCodeDetail",
 						data: {
 							HInterID: this.hform.HInterID,
-							
+
 						},
 					});
-			
+
 					let {
 						data,
 						Message,
 						count
 					} = res.data;
-			
+
 					if (count == 1) {
 						console.log("data: ", data);
 						this.HisReportList = data;
-						
+						// 缁熻鍚勪笉鑹師鍥犵殑鏁伴噺骞舵洿鏂板埌 HBadReasonList
+						this.updateBadReasonNumFromHisReport();
+
 					} else {
 						this.HisReportList = [];
+						this.clearBadReasonNum();
 						CommonUtils.showTips({
 							title: "娓╅Θ鎻愮ず",
 							message: `鑾峰彇鍘嗗彶鎵爜璁板綍澶辫触: ${Message}`,
@@ -660,6 +792,33 @@
 						message: `鑾峰彇鍘嗗彶鎵爜璁板綍澶辫触: ${err}`,
 					});
 				}
+			},
+			// 浠� HisReportList 缁熻鏇存柊 HBadReasonList 鐨� num
+			updateBadReasonNumFromHisReport() {
+				// 鍏堟竻绌烘墍鏈� num
+				this.HBadReasonList.forEach(item => {
+					this.$set(item, 'num', 0);
+				});
+
+				// 缁熻 HisReportList 涓悇涓嶈壇鍘熷洜鐨勬暟閲�
+				if (this.HisReportList && this.HisReportList.length > 0) {
+					this.HisReportList.forEach(hisItem => {
+						// 鏍规嵁 HBadReasonID 鍖归厤
+						const matchedItem = this.HBadReasonList.find(
+							badItem => badItem.涓嶈壇鍘熷洜浠g爜 == hisItem.HBadReasonNumber
+						);
+						if (matchedItem) {
+							const currentNum = matchedItem.num || 0;
+							this.$set(matchedItem, 'num', currentNum + hisItem.HBadReasonHQty||1);
+						}
+					});
+				}
+			},
+			// 娓呯┖ HBadReasonList 鐨� num
+			clearBadReasonNum() {
+				this.HBadReasonList.forEach(item => {
+					this.$set(item, 'num', 0);
+				});
 			},
 			//鍒犻櫎鍘嗗彶璁板綍
 			delReason(item) {
@@ -709,7 +868,7 @@
 					let res = await CommonUtils.doRequest2Async({
 						url: "/Gy_Employee/list",
 						data: {
-							sWhere: ` and 缁勭粐鍚嶇О = '${uni.getStorageSync("Organization")}' and 绂佺敤鏍囪 = ''and 瀹℃牳浜� !='' order by 閮ㄩ棬浠g爜`,
+							sWhere: ` and 绂佺敤鏍囪 = ''  and HDeptID = ${uni.getStorageSync("HDeptID")}`,
 							user: getUserInfo()["Czymc"],
 							Organization: uni.getStorageSync("Organization"),
 						},
@@ -744,7 +903,7 @@
 					let res = await CommonUtils.doRequest2Async({
 						url: "/Gy_Source/list",
 						data: {
-							sWhere: `and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'')  != '' and 缁勭粐 = '${uni.getStorageSync("Organization")}'`,
+							sWhere: `and 绂佺敤鏍囪 != 'Y' and 缁勭粐 = '${uni.getStorageSync("Organization")}'`,
 							user: getUserInfo()["Czymc"],
 						},
 					});
@@ -776,7 +935,7 @@
 					let res = await CommonUtils.doRequest2Async({
 						url: "/Gy_Group/list",
 						data: {
-							sWhere: `and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'')  != '' and 缁勭粐 = '${uni.getStorageSync("Organization")}'`,
+							sWhere: `and 绂佺敤鏍囪 != 'Y' and 缁勭粐 = '${uni.getStorageSync("Organization")}'`,
 							user: getUserInfo()["Czymc"],
 						},
 					});
@@ -862,6 +1021,9 @@
 						,HMakeDate:this.hform.HMakeDate
 						,HReportType:1
 						,HSourceBillType:this.hform.HSourceBillType
+						,HSourceBillNo:this.hform.HSourceBillNo
+						,HSourceInterID:this.hform.HMainSourceInterID
+						,HSourceEntryID:this.hform.HMainSourceEntryID
 						,HBadReasonHQty:1
 						,HQty:this.hform.HCheckQty
 					}
@@ -890,14 +1052,85 @@
 							title: "淇濆瓨鎴愬姛",
 							message: `淇濆瓨鎴愬姛`,
 						});
-						if(!item.num){
-							this.$set(item, 'num', 1);
-						}else{
-							this.$set(item, 'num', item.num++);
-						}
-						//this.$set(item, 'num', newValue);
+						// 鍒锋柊鍘嗗彶璁板綍锛宯um浼氳嚜鍔ㄤ粠HisReportList缁熻鏇存柊
 						this.getHisReportList();
 						this.hasCheckQty=true;
+					} else {
+						CommonUtils.showTips({
+							title: "娓╅Θ鎻愮ず",
+							message: `涓嶈壇鍘熷洜淇濆瓨閿欒: ${Message}`,
+						});
+					}
+				} catch (err) {
+					CommonUtils.showTips({
+						title: "娓╅Θ鎻愮ず",
+						message: `涓嶈壇鍘熷洜淇濆瓨閿欒: ${err}`,
+					});
+				}
+			},
+			//鎻愪氦涓嶈壇鍘熷洜鎵爜璁板綍缂撳瓨锛堢洿鎺ヨ緭鍏ユ暟閲忥級
+			async submitBarCodeWithQty(item, qty){
+				if(!this.checkSubmitValidate()){
+					return
+				}
+				try {
+					let oMainObject = {
+						HInterID:this.hform.HInterID
+						,HBillNo:this.hform.HBillNo
+						,HBillType:this.hform.HBillType
+						,HDate:new Date()
+						,HICMOBillNo:this.hform.HICMOBillNo
+						,HICMOInterID:this.hform.HICMOInterID
+						,HICMOEntryID:this.hform.HICMOEntryID
+						,HProcExchBillNo:this.hform.HProcExchBillNo
+						,HProcExchInterID:this.hform.HProcExchInterID
+						,HProcExchEntryID:this.hform.HProcExchEntryID
+						,HProcID:this.hform.HProcID
+						,HMaterID:this.hform.HMaterID
+						,HSourceID:this.hform.HSourceID
+						,HGroupID:this.hform.HGroupID
+						,HDeptID:this.hform.HDeptID
+						,HCheckManID:this.hform.HEmpID
+						,HBadReasonID:item.HItemID
+						,HBarCode:item.涓嶈壇鍘熷洜浠g爜
+						,HMaker:this.hform.HMaker
+						,HMakeDate:this.hform.HMakeDate
+						,HReportType:1
+						,HSourceBillType:this.hform.HSourceBillType
+						,HSourceBillNo:this.hform.HSourceBillNo
+						,HSourceInterID:this.hform.HMainSourceInterID
+						,HSourceEntryID:this.hform.HMainSourceEntryID
+						,HBadReasonHQty:qty
+						,HQty:this.hform.HCheckQty
+					}
+					var sMainStr = JSON.stringify(oMainObject);
+					var oMain = sMainStr + ';' + this.operationType;
+
+					let res = await CommonUtils.doRequest2Sync({
+						url: "/Sc_QualityReportBill/set_SaveBarCode",
+						data: {
+							oMain: oMain,
+						},
+						method: "POST",
+					});
+
+					if (!res) {
+						return;
+					}
+
+					let {
+						count,
+						Message,
+						data
+					} = res.data;
+					if (count == 1) {
+						CommonUtils.showTips({
+							title: "淇濆瓨鎴愬姛",
+							message: `淇濆瓨鎴愬姛锛屾暟閲�: ${qty}`,
+						});
+						// 鍒锋柊鍘嗗彶璁板綍锛宯um浼氳嚜鍔ㄤ粠HisReportList缁熻鏇存柊
+						this.getHisReportList();
+						this.hasCheckQty = true;
 					} else {
 						CommonUtils.showTips({
 							title: "娓╅Θ鎻愮ず",
@@ -944,6 +1177,13 @@
 				// if (!this.checkSubmitValidate()) {
 				// 	return;
 				// }
+				if(this.HisReportList.length<=0){
+					CommonUtils.showTips({
+						title: "娓╅Θ鎻愮ず",
+						message: `璇疯緭鍏ユ楠屼俊鎭痐,
+					});
+					return
+				}
 				try {
 					console.log('this.$refs: ', this.$refs);
 
@@ -1006,195 +1246,102 @@
 			goBack() {
 				uni.navigateBack();
 			},
-			async RoadBillMain() {
-				try {
-					let res = await CommonUtils.doRequest2Async({
-						url: "/QC_ProcessCheckBill/QC_ProcessCheckBill_Edit",
-						data: {
-							sWhere: ` and hmainid=${this.hform.HInterID}`,
-							user: getUserInfo()["Czymc"],
-						},
-					});
-
-					let {
-						data,
-						count,
-						Message
-					} = res.data;
-
-					if (count == 1) {
-						console.log("RoadBillMain: : ", data);
-						Object.assign(this.hform, {
-							HInterID: data[0].hmainid,
-							HBillNo: data[0].鍗曟嵁鍙�,
-							HDate: dayjs(data[0].鏃ユ湡).format("YYYY-MM-DD"),
-							HSourceID: data[0].HSourceID,
-							HSourceName: data[0].鐢熶骇璧勬簮鍚嶇О,
-							HICMOBillNo: data[0].浠诲姟鍗曞彿,
-							HICMOQty: data[0].浠诲姟鍗曟暟閲�,
-							HICMOInterID: data[0].HICMOInterID,
-							HICMOEntryID: data[0].HICMOEntryID || 1,
-							HMaterID: data[0].HMaterID,
-							HMaterName: data[0].鐗╂枡鍚嶇О,
-							HMaterNumber: data[0].鐗╂枡浠g爜,
-							HProcID: data[0].HProcID,
-							HProcName: data[0].HProcName,
-							HProcExchQty: data[0].HProcExchQty || 0,
-							HProcExchBillNo: data[0].HProcExchBillNo,
-							HProcExchInterID: data[0].HProcExchInterID,
-							HProcExchEntryID: data[0].HProcExchEntryID || 0,
-							HFirstCheckEmp: data[0].HFirstCheckEmp,
-							HFirstCheckEmpName: data[0].璐ㄦ鍛樺悕绉�,
-							HQCSchemeID: data[0].妫�楠屾柟妗圛D,
-							HQCSchemeName: data[0].妫�楠屾柟妗堝悕绉�,
-							HRemark: data[0].琛ㄥご澶囨敞,
-							HMaker: data[0].鍒跺崟浜�,
-							HMakeDate: data[0].鍒跺崟鏃ユ湡,
-							HChecker: data[0].瀹℃牳浜�,
-							HCheckDate: data[0].瀹℃牳鏃ユ湡,
-							HCloseMan: data[0].鍏抽棴浜�,
-							HCloseDate: data[0].鍏抽棴鏃ユ湡,
-							HUpDateDate: data[0].淇敼鏃ユ湡,
-							HDeleteDate: data[0].浣滃簾鏃ユ湡,
-							HSampleSchemeID: data[0].HSampleSchemeID,
-							HSampleSchemeName: data[0].鎶芥牱鏂规鍚嶇О,
-							HSampleQty: data[0].鏍锋湰閲�,
-							HSampleQty2: data[0].鏍锋湰閲�,
-							HSampleDamageQty: data[0].鏍锋湰鐮村潖鏁�,
-							HSamplingType: data[0].鎶芥牱绫诲瀷,
-							HAcceptQty: data[0].鍏佽鏁�,
-							HInspectionLevel: data[0].妫�楠屾按骞�,
-							HRejectQty: data[0].鎷掔粷鏁�,
-							HStrictness: data[0].涓ユ牸搴�,
-							HSampleUnRightQty: data[0].鏍锋湰涓嶅悎鏍兼暟 || 0,
-							HSampleUnRightQty2: data[0].鏍锋湰涓嶅悎鏍兼暟,
-							HAQL: data[0].AQL,
-							HUnitID: data[0].HUnitID,
-							HUnit: data[0].鍗曚綅,
-							HInspectValB: data[0].妫�娴嬪�煎熀纭�璧勬枡,
-							HInspectVal: data[0].妫�娴嬪��,
-							HTargetValB: data[0].鐩爣鍊煎熀纭�璧勬枡,
-							HTargetVal: data[0].鐩爣鍊�,
-							HUpLimit: data[0].涓婇檺鍊�,
-							HDownLimit: data[0].涓嬮檺鍊�,
-							HUpOffSet: data[0].涓婂亸宸�,
-							HDownOffSet: data[0].涓嬪亸宸�,
-							HEntryID: data[0].hsubid,
-							HQCCheckItemName: data[0].妫�楠岄」鐩悕绉�,
-							HQCCheckItemID: data[0].HQCCheckItemID,
-							HShiftsID: data[0].HShiftsID,
-							HShiftsName: data[0].鐝鍚嶇О,
-							HErrTreatment: data[0].寮傚父涓存椂澶勭悊鏂规,
-							HBatchNo: data[0].鎵瑰彿,
-							HCheckerResult: data[0].鍒ゅ畾缁撹 == "鍚堟牸" ? true : false,
-							HTakeSampleCheckBillID: data[0].HTakeSampleCheckBillID,
-							HTakeSampleCheckBillNo: data[0].HTakeSampleCheckBillNo,
-							HAnalysisMethod: function() {
-								if (data[0].HAnalysisMethod == 1) {
-									return '瀹氭�ф楠�'
-								} else if (data[0].HAnalysisMethod == 2) {
-									return '瀹氶噺妫�楠�'
-								} else {
-									return '鍏朵粬妫�楠�'
-								}
-							}(),
-
-
-
-						});
-
-						for (let i = 0; i < data.length; i++) {
-							this.addCheckItem({
-								HQCCheckItemID: data[i].HQCCheckItemID,
-								HQCCheckItemNumber: data[i].妫�楠岄」鐩唬鐮�,
-								HQCCheckItemName: data[i].妫�楠岄」鐩悕绉�,
-								HInspectInstruMentID: data[i].HInspectInstruMentID,
-								HInspectInstruMentNumber: data[i].妫�楠屼华鍣ㄤ唬鐮�,
-								HInspectInstruMentName: data[i].妫�楠屼华鍣ㄥ悕绉�,
-								HQCStd: data[i].妫�楠屾爣鍑�,
-								HUnit: data[i].鍗曚綅鍚嶇О,
-								HQCNote: data[i].妫�楠岃褰�,
-								HResult: data[i].缁撹 == "鍚堟牸" ? 1 : 0,
-								HMax: data[i].鏈�澶у��,
-								HMin: data[i].鏈�灏忓��,
-								HAvg: data[i].骞冲潎鍊�,
-								HRemark: data[i].琛ㄤ綋澶囨敞,
-								HAnalysisMethod: data[i].鍒嗘瀽鏂规硶 == "瀹氭�у垎鏋�" ?
-									1 : data[i].鍒嗘瀽鏂规硶 == "瀹氶噺鍒嗘瀽" ?
-									2 : 3,
-								HKeyInspect: data[i].閲嶇偣妫�鏌� == "鍚�" ? false : true,
-								HSampleSchemeID: data[i].HSampleSchemeID,
-								HUnitID: data[i].HUnitID,
-								HInspectVal: data[i].妫�娴嬪��,
-								HTargetVal: data[i].鐩爣鍊�,
-								HUpLimit: data[i].涓婇檺鍊�,
-								HDownLimit: data[i].涓嬮檺鍊�,
-								HUpOffSet: data[i].涓婂亸宸�,
-								HDownOffSet: data[i].涓嬪亸宸�,
-								HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
-								HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
-								HSampleQty: data[i].鏍锋湰閲�,
-								HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
-								HAcceptQty: data[i].鍏佽鏁�,
-								HInspectionLevel: 0,
-								HRejectQty: data[i].鎷掔粷鏁�,
-								HStrictness: 0,
-								HSampleUnRightQty: data[i].鏍锋湰涓嶅悎鏍兼暟,
-								HAQL: data[i].AQL,
-								HSamplingType: 0,
-								HSamplingType: data[i].鎶芥牱绫诲瀷,
-								HStrictness: data[i].涓ユ牸搴�,
-								HInspectResultToSee: data[i].妫�楠岀粨鏋�
-							});
-
-						}
-
-
-						this.hasSourceBill = true
-					} else {
-						CommonUtils.showTips({
-							title: "娓╅Θ鎻愮ず",
-							message: `鍔犺浇鍗曟嵁澶辫触: ${Message}`,
-						});
-					}
-				} catch (err) {
-					CommonUtils.showTips({
-						title: "娓╅Θ鎻愮ず",
-						message: `鍔犺浇鍗曟嵁澶辫触: ${err}`,
-					});
+			// 璁剧疆涓鸿嚜鍔�
+			setAuto() {
+				if (uni.getSystemInfoSync().platform === 'android' || 
+					  uni.getSystemInfoSync().platform === 'ios') {
+					plus.screen.unlockOrientation();
 				}
 			},
+			// 璁剧疆涓虹珫灞�
+			setPortrait() {
+			  if (uni.getSystemInfoSync().platform === 'android' || 
+				  uni.getSystemInfoSync().platform === 'ios') {
+				plus.screen.lockOrientation('portrait');
+			  }
+			},
+			
 		},
 		async onLoad(e) {
+			//this.setAuto(); 
 			this.operationType = e.operationType || 1;
 			this.hform.HInterID = e.linterid || 0;
 			if (this.operationType == 1) {
 				await this.getMaxBillNo();
 			} else if (this.operationType == 2) {
 
-			} else if (this.operationType == 3) {
-				await this.RoadBillMain();
-			}
-			this.getGy_BadReasonList();
+			} 
+			//this.getGy_BadReasonList();
 			await this.InitHSource();
 			await this.InitHEmp();
 			await this.InitHGroup();
 			await this.loadCache();
 		},
+		onUnload(){
+			this.setPortrait();
+		}
 	};
 </script>
 
 <style lang="scss" scoped>
 	input {
 		width: inherit;
-		font-size: 26rpx;
+		font-size: 30rpx;
 	}
 
 	.uni-input {
 		padding: 0;
 	}
 
-	.bill-main-tabs,
+	.bill-main-tabs {
+		box-sizing: border-box;
+		width: 100%;
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+		align-items: center;
+		border-bottom: 1px solid #ddd;
+		padding: 20rpx 10rpx;
+
+		.tabs-left {
+			display: flex;
+			flex-direction: row;
+			flex-wrap: nowrap;
+			gap: 20rpx;
+			flex-shrink: 0;
+			overflow-x: auto;
+			white-space: nowrap;
+
+			view {
+				width: auto;
+				font-size: 30rpx;
+				color: #555;
+				text-align: center;
+				padding: 16rpx 0;
+			}
+
+			.selected {
+				color: #3a78ff;
+				font-weight: bold;
+				border-bottom: 3px solid #3a78ff;
+			}
+		}
+
+		.mode-switch-right {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			gap: 10rpx;
+			flex-shrink: 0;
+			padding-right: 10rpx;
+
+			.mode-text {
+				font-size: 24rpx;
+				color: #666;
+			}
+		}
+	}
+
 	.bill-sub-tabs {
 		box-sizing: border-box;
 		width: 100%;
@@ -1210,7 +1357,7 @@
 
 		view {
 			width: auto;
-			font-size: 26rpx;
+			font-size: 30rpx;
 			color: #555;
 			text-align: center;
 			padding: 16rpx 0;
@@ -1220,6 +1367,93 @@
 			color: #3a78ff;
 			font-weight: bold;
 			border-bottom: 3px solid #3a78ff;
+		}
+	}
+
+	/* 鐩存帴杈撳叆鏁伴噺寮圭獥鏍峰紡 */
+	.input-qty-popup {
+		background-color: #fff;
+		border-radius: 20rpx;
+		padding: 30rpx;
+		width: 600rpx;
+		box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.15);
+
+		.popup-title {
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #333;
+			text-align: center;
+			padding-bottom: 20rpx;
+			border-bottom: 1px solid #eee;
+		}
+
+		.popup-content {
+			padding: 20rpx 0;
+
+			.popup-info {
+				display: flex;
+				align-items: center;
+				padding: 10rpx 0;
+
+				.popup-label {
+					font-size: 28rpx;
+					color: #666;
+					width: 180rpx;
+				}
+
+				.popup-value {
+					font-size: 28rpx;
+					color: #333;
+				}
+			}
+
+			.popup-input-row {
+				display: flex;
+				align-items: center;
+				padding: 15rpx 0;
+				margin-top: 10rpx;
+
+				.popup-label {
+					font-size: 28rpx;
+					color: #666;
+					width: 180rpx;
+				}
+
+				.popup-input {
+					flex: 1;
+					height: 60rpx;
+					border: 1px solid #acacac;
+					border-radius: 10rpx;
+					padding: 0 15rpx;
+					font-size: 28rpx;
+				}
+			}
+		}
+
+		.popup-buttons {
+			display: flex;
+			flex-direction: row;
+			gap: 10rpx;
+			padding-top: 20rpx;
+			border-top: 1px solid #eee;
+
+			button {
+				border-radius: 50rpx;
+				width: 150rpx;
+				height: 60rpx;
+				line-height: 60rpx;
+				font-size: 28rpx;
+			}
+
+			.btn-a {
+				background-color: #3a78ff;
+				color: #fff;
+			}
+
+			.btn-c {
+				background-color: #acacac;
+				color: #fff;
+			}
 		}
 	}
 
@@ -1233,10 +1467,10 @@
 		/* 鍙�夛細璁剧疆鎹㈣鍚庣殑瀵归綈鏂瑰紡 */
 		align-content: flex-start; /* 澶氳瀵归綈鏂瑰紡 */
 		.form-item {
-			width: 600rpx;
+			width: 650rpx;
 			display: flex;
 			align-items: center;
-			font-size: 26rpx;
+			font-size: 30rpx;
 			padding: 6rpx 0;
 			 margin-right: 20rpx;
 			.left {
@@ -1251,7 +1485,7 @@
 			.right {
 				// width: 450rpx;
 				padding: 8rpx 20rpx;
-				font-size: 26rpx;
+				font-size: 30rpx;
 				flex: 1;
 				border-radius: 22rpx;
 				border: 1px solid #acacac;
@@ -1262,18 +1496,19 @@
 
 					.uni-input-placeholder,
 					.uni-input-input {
-						font-size: 26rpx;
+						font-size: 30rpx;
 					}
 				}
 
 				.uni-combox::v-deep input {
 					height: inherit;
-					font-size: 26rpx;
+					font-size: 30rpx;
 				}
 			}
+			
 			.right-select {
 				//padding: 8rpx 20rpx;
-				font-size: 26rpx;
+				font-size: 30rpx;
 				flex: 1;
 				
 			}
@@ -1345,7 +1580,7 @@
 			width: 180rpx;
 			height: 66rpx;
 			line-height: 66rpx;
-			font-size: 26rpx;
+			font-size: 30rpx;
 		}
 
 		.btn-a {
@@ -1377,19 +1612,19 @@
 			gap: 10rpx 0;
 
 			input {
-				font-size: 26rpx;
+				font-size: 30rpx;
 			}
 
 			.detail {
 				// width: 50%;
 				box-sizing: border-box;
-				font-size: 26rpx;
+				font-size: 30rpx;
 				color: #555;
 				padding-right: 20rpx;
-
+				
 				text {
 					color: #999;
-					font-size: 26rpx;
+					font-size: 30rpx;
 				}
 			}
 
@@ -1497,18 +1732,20 @@
 	
 	.reason-item-flex {
 	  /* 鏂瑰潡鍩虹鏍峰紡 */
-	  background-color: #f5f5f5;
+	  background-color: #55ffff;
 	  border-radius: 8px;
 	  padding: 12px 16px;
 	  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
 	  transition: all 0.3s ease;
-	  
+		border-width: 2px;      /* 杈规瀹藉害 */
+		    border-style: solid;     /* 杈规鏍峰紡 */
+		    border-color: #333;      /* 杈规棰滆壊 */
 	  /* 鏂囧瓧鏍峰紡 */
-	  font-size: 14px;
+	  font-size: 30rpx;
 	  color: #333;
 	  text-align: center;
 	  
-	  width: 300rpx;
+	  width: 350rpx;
 	  
 	  /* 纭繚鍐呭涓嶆崲琛屾椂灞呬腑 */
 	  display: flex;
@@ -1520,6 +1757,7 @@
 	  0% {
 	    transform: scale(1);
 	    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
+		border-color: #0000ff;      /* 杈规棰滆壊 */
 	  }
 	  50% {
 	    transform: scale(0.95);

--
Gitblit v1.9.1