From c5380b5cb810005ebfcc1c48247dc4f603a0fd00 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期日, 28 九月 2025 10:15:21 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 pages/qitachuku_v2/form.vue      |   11 +++++
 pages/zhijiediaobo/form.vue      |   12 ++++-
 pages/gongxuOut/form.vue         |   82 +++++++++++++++++++++++++++++++++++++----
 pages/shengchanlingliao/form.vue |   12 +++---
 4 files changed, 99 insertions(+), 18 deletions(-)

diff --git a/pages/gongxuOut/form.vue b/pages/gongxuOut/form.vue
index 7938abf..27a3014 100644
--- a/pages/gongxuOut/form.vue
+++ b/pages/gongxuOut/form.vue
@@ -647,6 +647,13 @@
                 this.getEditData(e.linterid, e.HBillNo)
             } else {
                 this.getNewData()
+				if(e.HBarCode){
+					this.hform.HBarCode=e.HBarCode
+					setTimeout(() => {
+						this.toInCode(e);
+					}, 1000)
+				}
+				
             }
             this.getHMaterList()
             this.getHProcList()
@@ -657,6 +664,7 @@
             this.getHCenterList()
 
             this.getDefValByUser()
+			
         },
         methods: {
 			//閫変腑鍏ㄩ儴鏂囨湰
@@ -1753,18 +1761,22 @@
                                 } else {
                                     uni.showModal({
                                         title: '鎻愮ず',
-                                        content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+                                        content: res.data.Message + '銆傛槸鍚︾户缁柊澧炰笅涓�閬撳伐搴忥紵(鐐瑰嚮鍙栨秷杩斿洖鏂板椤甸潰)',
                                         success: (res) => {
                                             if (res.confirm) {
                                                 console.log('鐢ㄦ埛鐐瑰嚮纭畾');
-                                                uni.redirectTo({
-                                                    url: '/pages/gongxuOut/form?OperationType=1'
-                                                })
+												this.getNextProc()
+                                                // uni.redirectTo({
+                                                //     url: '/pages/gongxuOut/form?OperationType=1'
+                                                // })
                                             } else if (res.cancel) {
                                                 console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
-                                                setTimeout(() => {
-                                                    uni.navigateBack();
-                                                }, 50)
+                                                // setTimeout(() => {
+                                                //     uni.navigateBack();
+                                                // }, 50)
+												uni.redirectTo({
+												    url: '/pages/gongxuOut/form?OperationType=1'
+												})
                                             }
                                         }
                                     });
@@ -1897,7 +1909,61 @@
                         }
                     }
                 });
-            }
+            },
+			getNextProc(){
+				uni.request({
+				    url: this.serverUrl + '/LEMS/MES_Sc_ProcessExchangeBillQuerySub_Json',
+				    method: 'GET',
+				    dataType: "json",
+				    data: {
+				        sWhere:this.hform.HProcExchHinteID
+				    },
+				    success: (res) => {
+				        console.log(1, res);
+				        if (res.data.count == 1) {
+							let processList = res.data.data
+							
+							// 1. 鍏堣繃婊ゅ嚭 HSEQNumber === 'N' 鐨勬暟鎹�
+							processList = processList.filter(item => item.HSEQNumber === this.hform.HSEQNumber);
+							
+							//褰撳墠宸ュ簭缂栧彿
+							const currentIndex = processList.findIndex(item => item["宸ュ簭鍙�"] === this.hform.HProcNo);
+							// 鑾峰彇涓嬩竴涓伐搴忥紙濡傛灉瀛樺湪锛�
+							const nextProcess = currentIndex !== -1 && currentIndex < processList.length - 1 
+							  ? processList[currentIndex + 1] : null;
+							if(!nextProcess){
+								uni.showToast({
+								    title: '娌℃湁涓嬩竴閬撳伐搴忓嵆灏嗚烦杞柊澧為〉闈�',
+								    icon: 'none'
+								})
+								uni.redirectTo({
+								    url: '/pages/gongxuOut/form?OperationType=1'
+								})
+							}else{
+								this.hform.HProcNo=nextProcess["宸ュ簭鍙�"];
+								const HNextBarCode = this.hform.HBarCode+"@"+this.hform.HProcNo+"@"+this.hform.HSEQNumber
+								uni.redirectTo({
+								    url: '/pages/gongxuOut/form?OperationType=1&HBarCode='+HNextBarCode
+								})
+							}
+				        }else{
+							console.log(res);
+							uni.showToast({
+							    title: '鑾峰彇涓嬩竴閬撳伐搴忓け璐�',
+							    icon: 'none'
+							})
+						}
+				        
+				    },
+				    fail: (res) => {
+				        console.log(res);
+				        uni.showToast({
+				            title: '鎺ュ彛璇锋眰澶辫触',
+				            icon: 'none'
+				        })
+				    },
+				});
+			}
         }
     }
 </script>
diff --git a/pages/qitachuku_v2/form.vue b/pages/qitachuku_v2/form.vue
index 3334872..45884c7 100644
--- a/pages/qitachuku_v2/form.vue
+++ b/pages/qitachuku_v2/form.vue
@@ -320,6 +320,8 @@
                 OperationType: 1,
                 HInterID_Temp: '',
 
+                HSourceFlag: false,
+
                 showHStockPlaceName: false,
                 showHMainSourceBillType: true,
                 showHSourceBillNo: true,
@@ -994,6 +996,7 @@
                     success: (res) => {
                         if (res.data.count == 1) {
                             var data = res.data.data
+                            this.HSourceFlag = true
                             console.log(2, data);
                             this.hform.SourceFlag = true
                             this.hform.HSupName = data.hSupNameField
@@ -1050,6 +1053,7 @@
                 var sHQty = this.hform.HQty
                 var sSourceBillNo = this.hform.HSourceBillNo
                 var sSourceBillType = this.hform.HMainSourceBillType
+
                 // var HSourceFlag = this.hform.HSourceBillNo == '' ? false : true
                 console.log(this.hform.HSourceBillNo, this.hform.SourceFlag)
                 if (HDeleteFlag == "*") {
@@ -1112,6 +1116,7 @@
                             HSPID: sHSPID,
                             HQty: sHQty,
                             HRedBlueFlag: this.hform.HRedBlueFlag,
+                            // SourceFlag: HSourceFlag,
                             SourceFlag: this.hform.SourceFlag,
                             HSourceBillNo: sSourceBillNo,
                             HSourceBillType: sSourceBillType,
@@ -1146,6 +1151,7 @@
                                     this.hform.HDeptID = data.hDeptIDField
                                     this.tabs = 1
                                 } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+                                    this.HSourceFlag = true
                                     this.hform.HSupName = data.hSupNameField
                                     this.hform.HSupID = data.hSupIDField
                                     if (data.hDeptIDField != 0) {
@@ -1181,6 +1187,7 @@
                                     this.tabs = 2
                                 } else { //鐗╂枡鏉$爜
                                     this.tabs = 2
+                                    this.HSourceFlag = true
                                     if (!this.hform.HSourceBillNo) {
                                         this.hform.SourceFlag = true
                                     	this.hform.HSupName = data.hSupNameField
@@ -1224,7 +1231,7 @@
                                 this.DisBillEntryList()
                                 //娓呯┖鏁伴噺
                                 this.hform.HQty = ''
-								this.refreshBarCodeState()
+                                this.refreshBarCodeState()
                             } else {
                                 this.playSound(0)
                                 this.refreshBarCodeState()
@@ -1345,6 +1352,7 @@
             },
             //鏂板
             getNewData() {
+                this.HSourceFlag = false
                 uni.request({
                     url: this.serverUrl + '/WEBSController/GetMaxBillNoAndID_Json',
                     data: {
@@ -1373,6 +1381,7 @@
             },
             //淇敼鍥炲~鏁版嵁
             RoadBillMain(HInterID) {
+                this.HSourceFlag = true
                 uni.request({
                     url: this.serverUrl + '/WEBSController/GetSourceBill_Temp_Json',
                     data: {
diff --git a/pages/shengchanlingliao/form.vue b/pages/shengchanlingliao/form.vue
index f7100b5..9efb389 100644
--- a/pages/shengchanlingliao/form.vue
+++ b/pages/shengchanlingliao/form.vue
@@ -394,9 +394,9 @@
             },
             //鎵弿鍗曟嵁鍙锋潯鐮�
             GetMeesageByBillNo(e) {
-				if(this.hform.HBillNo==""||this.hform.HBillNo==undefined){
-					return
-				}
+                if (this.hform.HBillNo == "" || this.hform.HBillNo == undefined) {
+                    return
+                }
                 uni.request({
                     url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
                     data: {
@@ -529,9 +529,9 @@
             },
             //鎵潯鐮佸鐞�
             getCode(HBarCode) {
-				if(HBarCode==undefined||HBarCode==""){
-					return
-				}
+                if (HBarCode == undefined || HBarCode == "") {
+                    return
+                }
                 //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
                 if (!this.hform.HWHName) {
                     this.hform.HWHID = 0
diff --git a/pages/zhijiediaobo/form.vue b/pages/zhijiediaobo/form.vue
index c3d3ef1..ee591f0 100644
--- a/pages/zhijiediaobo/form.vue
+++ b/pages/zhijiediaobo/form.vue
@@ -426,7 +426,7 @@
                 arrayHOrgName: [], // 缁勭粐
                 arrayHOrgValue: [], // 缁勭粐瀵瑰簲ID
                 arrayHWHInName: [], // 璋冨叆浠撳簱
-                HHWHInNameList: [],
+                HWHInNameList: [],
                 arrayHStockPlaceInName: [], //璋冨叆浠撲綅
                 HStockPlaceInNameList: [],
 
@@ -518,7 +518,7 @@
                 this.getNewData()
             }
 
-            this.getHWarehouseInList()
+            //this.getHWarehouseInList()
             // this.getHBaseList()
             this.getHSupList()
             this.getHEmpList()
@@ -879,8 +879,10 @@
                     success: (res) => {
                         if (res.data.count == 1) {
                             this.HWHNameList = res.data.data
+							this.HWHInNameList = res.data.data
                             for (var i = 0; i < res.data.data.length; i++) {
                                 this.arrayHWHName[i] = res.data.data[i].浠撳簱鍚嶇О
+								this.arrayHWHInName[i] = res.data.data[i].浠撳簱鍚嶇О
                             }
                         } else {
                             uni.showToast({
@@ -1018,7 +1020,11 @@
 
                             this.arrayHMainSourceBillType.push('鎵嬪伐褰曞叆')
                             this.arrayHMainSourceBillValue.push('-1')
-
+							//濡傛灉鎵嬪伐褰曞叆涓嶇敤閫夋嫨婧愬崟
+							if(this.arrayHMainSourceBillType[0]=='鎵嬪伐褰曞叆'){
+								this.tabs=1
+							}
+							
                             this.HMainSourceBillType = this.arrayHMainSourceBillType[0]
                             this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0]
                         } else {

--
Gitblit v1.9.1