From edd7f4270d1c1ae41228bb35973b6a9a47057c74 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 19 八月 2025 11:29:42 +0800
Subject: [PATCH] 工序出战汇报,委外接收发出单添加序列号选择

---
 pages/weiwaigxIn/form.vue |  153 ++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 139 insertions(+), 14 deletions(-)

diff --git a/pages/weiwaigxIn/form.vue b/pages/weiwaigxIn/form.vue
index 5706239..c49402e 100644
--- a/pages/weiwaigxIn/form.vue
+++ b/pages/weiwaigxIn/form.vue
@@ -9,9 +9,16 @@
 				<uni-icons type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanCode"></uni-icons>
 			</view>
 			<view class="form-item">
+			    <view class="title">搴忓垪鍙�:</view>
+			    <view class="right">
+			        <uni-combox :candidates="arrayHSEQName" placeholder="璇烽�夋嫨搴忓垪" v-model="hform.HSEQName"
+			            @input="HSEQNameChange"></uni-combox>
+			    </view>
+			</view>
+			<view class="form-item">
 				<view class="title"><text>*</text>娴佹按鍙�:</view>
 				<view class="right" style="width: 380rpx;">
-					<input v-model="hform.HProcNo" placeholder="璇疯緭鍏�(鎴栨壂鎻�)娴佹按鍙�" @blur="getHProcNoData(hform.HBarCode,hform.HProcNo)"/>
+					<input v-model="hform.HProcNo" placeholder="璇疯緭鍏�(鎴栨壂鎻�)娴佹按鍙�" @blur="getHProcNoData2(hform.HBarCode,hform.HProcNo,hform.HSEQNumber)"/>
 				</view>
 				<uni-icons type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanProcNo"></uni-icons>
 			</view>
@@ -303,6 +310,7 @@
 				<button v-if="btnType != 0 && btnType == 2" class="btn-b" style="margin-left: 20rpx;" size="mini" @tap="check">瀹℃牳</button>
 				<button v-if="btnType != 0 && btnType == 3" class="btn-d" style="margin-left: 20rpx;" size="mini" @tap="abandonCheck">鍙嶅鏍�</button>
 				<!-- <button class="btn-b" size="mini" @tap="showMask = true">鏂板</button> -->
+				<button class="btn-b" size="mini" @tap="addNew">鏂板</button>
 				<button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
 			</view>
 		</view>
@@ -329,7 +337,8 @@
 				HSupNameList:[],
 				arrayHEmpName:[],//鎿嶄綔鍛�
 				HEmpNameList:[],
-				
+				arrayHSEQName:[],//搴忓垪
+				HSEQNameList:[],
 				isEdit: false,
 				hform:{
 					HInterID:'',
@@ -359,7 +368,8 @@
 					HProcID:'',
 					HPRDOrg:'',
 					HOrderProcNO:'',
-					
+					HSEQName:'',
+					HSEQNumber:0,
 					// HICMOInterID:'',
 					// HICMOQty:'',
 					// HProcExchHinteID:'',
@@ -465,9 +475,16 @@
 					var str = ret.resp_result
 					if(str.includes('@')) {
 					  const parts = str.split('@');
-					  this.hform.HBarCode = parts[0]
-					  this.hform.HProcNo = parts[1]
-					  this.getHBarCodeData(parts[0],1)
+					  if(parts.length==3){
+					  	this.hform.HBarCode = parts[0]
+					  	this.hform.HProcNo = parts[1]
+					  	this.hform.HSEQNumber = parts[2]
+					  	this.getHBarCodeData(parts[0], 2)
+					  }else{
+					  	this.hform.HBarCode = parts[0]
+					  	this.hform.HProcNo = parts[1]
+					  	this.getHBarCodeData(parts[0], 1)
+					  }
 					  // this.getHProcNoData(parts[0],parts[1])
 					}else{
 						this.hform.HBarCode = ret.resp_result
@@ -479,9 +496,16 @@
 				var str = this.hform.HBarCode
 				if (str.includes('@')) {
 					const parts = str.split('@');
-					this.hform.HBarCode = parts[0]
-					this.hform.HProcNo = parts[1]
-					this.getHBarCodeData(parts[0], 1)
+					if(parts.length==3){
+						this.hform.HBarCode = parts[0]
+						this.hform.HProcNo = parts[1]
+						this.hform.HSEQNumber = parts[2]
+						this.getHBarCodeData(parts[0], 2)
+					}else{
+						this.hform.HBarCode = parts[0]
+						this.hform.HProcNo = parts[1]
+						this.getHBarCodeData(parts[0], 1)
+					}
 					// this.getHProcNoData(parts[0],parts[1])
 				} else {
 					this.getHBarCodeData(this.hform.HBarCode)
@@ -497,7 +521,7 @@
 				},(ret) => {
 					console.log(ret.resp_result)
 					this.hform.HProcNo = ret.resp_result
-					this.getHProcNoData(this.hform.HBarCode,ret.resp_result)
+					this.getHProcNoData2(this.hform.HBarCode,ret.resp_result,this.hform.HSEQNumber)
 				})
 			},
 			//鏃ユ湡
@@ -657,7 +681,65 @@
 					}
 				}
 			},
-			
+			//搴忓垪鑾峰彇
+			getHSEQList(e){
+				uni.request({
+				    url: this.serverUrl + 'Cj_StationOutBill/getAllHSEQ',
+				    data: {
+				        HInterID:this.hform.HProcExchHinteID
+				    },
+				    success: (res) => {
+				        if (res.data.code == 1) {
+				            this.HSEQNameList = res.data.data
+				            for (var i = 0; i < res.data.data.length; i++) {
+				                this.arrayHSEQName[i] = res.data.data[i].HSEQName
+				            }
+				            this.$forceUpdate();
+							//娌℃湁搴忓垪鍙烽粯璁や富搴忓垪
+							if(e==1){
+								//璁剧疆涓诲簭鍒�
+								this.setMainHSEQ();
+								this.getHProcNoData2(this.hform.HBarCode,this.hform.HProcNo,this.hform.HSEQNumber)
+							}else if(e==2){
+								this.getHProcNoData2(this.hform.HBarCode,this.hform.HProcNo,this.hform.HSEQNumber)
+							}else{
+								//璁剧疆涓诲簭鍒�
+								this.setMainHSEQ();
+							}
+				        } else {
+				            uni.showToast({
+				                title: res.data.Message,
+				                icon: 'none'
+				            })
+				        }
+				    },
+				    fail: (res) => {
+				        console.log(res);
+				        uni.showToast({
+				            title: '鎺ュ彛璇锋眰澶辫触',
+				            icon: 'none'
+				        })
+				    },
+				});
+			},
+			//閫夋嫨搴忓垪
+			HSEQNameChange(e) {
+			    for (var i = 0; i < this.HSEQNameList.length; i++) {
+			        if (this.HSEQNameList[i].HSEQName == e) {
+			            this.hform.HSEQNumber = this.HSEQNameList[i].HSEQNumber
+			        }
+			    }
+			},
+			//璁剧疆涓诲簭鍒�
+			setMainHSEQ(){
+				for (var i = 0; i < this.HSEQNameList.length; i++) {
+				    if (this.HSEQNameList[i].HSEQType == 'M') {
+				        this.hform.HSEQNumber = this.HSEQNameList[i].HSEQNumber
+						this.hform.HSEQName = this.HSEQNameList[i].HSEQName
+						break;
+				    }
+				}
+			},
 			//缂栬緫
 			ifEdit(){
 				//鏄惁缂栬緫
@@ -796,10 +878,8 @@
                             this.hform.HDept= this.userInfo.HDept
                             this.hform.HProcExchHinteID= data.hmainid
                             this.hform.HPRDOrg= data.缁勭粐
+							this.getHSEQList(e);
 							
-							if(e){
-								this.getHProcNoData(this.hform.HBarCode,this.hform.HProcNo)
-							}
 						}else{
 							uni.showToast({
 								title:res.data.Message,
@@ -852,6 +932,46 @@
 					},
 				});
 			},
+			getHProcNoData2(HBarCode,HProcNo,HSEQNumber){
+				uni.request({
+				    url: this.serverUrl + '/Cj_StationEntrustInBill/txtHProcNo_KeyDown_Sec', 
+					data: {
+						sBillNo: HBarCode,
+						sProcNo: HProcNo,
+						HSEQNumber:HSEQNumber},
+				    success: (res) => {
+						console.log(3,res);
+						if(res.data.code == 1){
+							var data = res.data.data[0]
+							this.showHProcNoData = true
+							this.hform.lngBillSubKey= data.hsubid
+							this.hform.HProcName= data.宸ュ簭
+							this.hform.HProcID= data.HProcID
+							this.hform.HCenterName= data.宸ヤ綔涓績
+							this.hform.HCenterID= data.HCenterID
+							this.hform.HNotReportQty = data['鏈彂鍑烘暟閲�']
+							this.hform.HProcNumber = data['宸ュ簭浠g爜']
+							this.hform.HSEQName = data.搴忓垪鍚嶇О
+							if(!this.hform.HSupName){
+								this.hform.HSupName= data.渚涘簲鍟�
+								this.hform.HSupID= data.HSupID
+							}
+						}else{
+							uni.showToast({
+								title:res.data.Message,
+								icon:'none'
+							})
+						}
+					},
+					fail: (res) => {
+						console.log(res);
+						uni.showToast({
+							title:'鎺ュ彛璇锋眰澶辫触',
+							icon:'none'
+						})
+					},
+				});
+			},
 			//鏂板
 			getNewData(){
 				uni.request({
@@ -878,6 +998,11 @@
 					},
 				});
 			},
+			addNew() {
+				uni.redirectTo({
+					url: '/pages/weiwaigxIn/form?OperationType=1'
+				})
+			},
             submit() {
 				//鍘婚櫎鍒嗗彿浠ュ厤鍚庣鍒嗚В鎶ラ敊
 				this.hform.HMaterName= this.hform.HMaterName.replace(/;/g, '');

--
Gitblit v1.9.1