From af73aff35be4607dd22232d5695e30ca3059c436 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期二, 01 四月 2025 15:58:21 +0800
Subject: [PATCH] PDA的2个拣货页面修改

---
 Pda/View/SoSetting/productOut.html      |   94 +++++++++++++++++++++++
 Wms/Wms/appsettings.json                |    4 
 HTML/views/index.html                   |    2 
 Wms/Wms/Controllers/PdaSoController.cs  |   20 +++++
 Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs |   42 +++++++---
 Pda/View/SoSetting/pinTuoOut.html       |   53 +++++++++++++
 Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs |   10 ++
 7 files changed, 206 insertions(+), 19 deletions(-)

diff --git a/HTML/views/index.html b/HTML/views/index.html
index e189027..835750b 100644
--- a/HTML/views/index.html
+++ b/HTML/views/index.html
@@ -66,7 +66,7 @@
 				<div class="layui-side layui-side-menu" id="leftmenu">
 					<div class="layui-side-scroll">
 						<div class="layui-logo" lay-href="home/console.html" style="background-color: #FFFFFF;">
-							<span>鍗氭煰鑾甭蜂粨鍌ㄧ鐞嗙郴缁�</span>
+							<span>娌傚崡鍔涜路浠撳偍绠$悊绯荤粺</span>
 						</div>
 						<ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
 							
diff --git a/Pda/View/SoSetting/pinTuoOut.html b/Pda/View/SoSetting/pinTuoOut.html
index 7f72c17..750b654 100644
--- a/Pda/View/SoSetting/pinTuoOut.html
+++ b/Pda/View/SoSetting/pinTuoOut.html
@@ -343,6 +343,8 @@
 														</div>
 													</div>
 												</td>
+											</tr>
+											<tr>
 												 <td>
 													<div class="layui-form-item ">
 														<label class="layui-form-label lableWidth">鎵樼洏涓婃暟閲忥細</label>
@@ -631,7 +633,20 @@
 			var tableData = null
 			var tableData2 = null
 			var canPickBox = true
-			$("#palletNo").focus();//鍏夋爣榛樿閫変腑		
+			$("#palletNo").focus();//鍏夋爣榛樿閫変腑
+			
+			function clear5()
+			{
+				$('#outModel').val("");//鍑哄簱鍙�
+				$('#standard').val("");//瑙勬牸
+
+				$('#pickQty').val("");//寰呮嫞鏁伴噺
+				$('#pickedQty').val("");//宸叉嫞鏁伴噺
+				$('#palletNoqty').val("");//宸叉嫞鏁伴噺
+				
+				$('#boxNo').val("");//绠辩爜
+				$('#boxQty').val("");//鎵樼洏涓婃暟閲�
+			}
 
 			function clear1() {
 				$('#outModel').val("");//鍑哄簱鍙�
@@ -792,6 +807,17 @@
 							icon: 2,
 							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
 						});
+						clear5;
+						
+						$("#palletNo").val("");//鎵樼洏鍙�
+						$("#pickQty1").val("");//鎵樼洏鍙�
+						
+						$("#planQty").val("");  //璁″垝鏁伴噺
+						$("#finishQty").val("");//瀹屾垚鏁伴噺
+						//鐗╂枡鎵规
+						$("#skuLotNo").empty();
+						$("#skuLotNo").append('<option value =>' + '</option>');
+						form.render('select');
 					}
 				});
 			}
@@ -886,6 +912,7 @@
 				if(list.length == 1){
 					$("#pickQty1").val(list[0].Qty) 
 				}
+				let pallnono = 0;
 				console.log(list != null);
 				console.log(list);
 				if (list != null && list.length > 0) { //鎴愬姛
@@ -905,6 +932,8 @@
 						tr.find("td[name='qty']").html(list[i].Qty);
 						tr.find("td[name='pickedQty']").html(list[i].PickedQty);
 
+						pallnono = pallnono + list[i].Qty;
+
 						tr.show();
 						arrTrs[i] = tr
 					}
@@ -919,6 +948,7 @@
 					// $("#boxNum").val(0)
 					setPages(1, 0)
 				}
+				$("#palletNoqty").val(pallnono)
 			}
 
 			//鑾峰彇鎵樼洏鐗╂枡鍚嶇粏
@@ -946,6 +976,27 @@
 					}
 				});
 			}
+			//鑾峰彇鎵樼洏鐗╂枡鍚嶇粏
+			function getpallnono() { 
+				let param2 = {
+					"PalletNo": $("#palletNo").val(),
+				}
+				synData(IP + "/PdaSo/GetDataPallnoInfo", param2, 'post', function (res) {
+					if (res.code == 0) {
+						console.log("111111111111111:"+res.data.Qty);
+						//tableData = deepCopy(res.data)
+						console.log("111111111111111:"+res.data.Qty);
+						
+						$("#palletNoqty").val(res.data.Qty) 
+						
+					} else {
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
+			}
 
 			//鍗曟嫞璐э紙纭鎸夐挳锛�
 			form.on('submit(formPickScatter)', function (data) {
diff --git a/Pda/View/SoSetting/productOut.html b/Pda/View/SoSetting/productOut.html
index 0928734..b18023e 100644
--- a/Pda/View/SoSetting/productOut.html
+++ b/Pda/View/SoSetting/productOut.html
@@ -262,6 +262,11 @@
 								<input type="checkbox" name="IsZhengTuo" id="IsZhengTuo" lay-skin="switch" lay-text="鏄瘄鍚�"
 									lay-filter="IsZhengTuo">
 							</div>
+							<label class="layui-form-label" lang>鏄惁杩炵画鎷h揣锛�</label>
+							<div class="layui-input-block">
+								<input type="checkbox" name="IsCheckCon" id="IsCheckCon" lay-skin="switch" lay-text="鏄瘄鍚�"
+									lay-filter="IsCheckCon">
+							</div>
 						</div>
 						<div id="BoxDIv" class="layout-tab-page">
 							<table class="layout-tab-content" border="" cellspacing="" cellpadding="">
@@ -345,6 +350,17 @@
 													</div>
 												</td> -->
 											</tr>
+											<tr>
+												<td>
+												   <div class="layui-form-item ">
+													   <label class="layui-form-label lableWidth">鎵樼洏涓婃暟閲忥細</label>
+													   <div class="layui-input-block">
+														   <input id="palletNoqty" class="layui-input" style="border: 0;"
+															   type="text" lay-verify="" disabled placeholder="">
+													   </div>
+												   </div>
+											   </td> 
+										   </tr>
 										</table>
 									</td>
 								</tr>
@@ -612,11 +628,25 @@
 			var curPageIndex = 1
 			//鏄惁鏁存墭鎷h揣
 			var isContinue = "0";
+			var isConCheck = "0";
 			var tableData = null
 			var tableData2 = null
 			var canPickBox = true
 			$("#palletNo").focus();//鍏夋爣榛樿閫変腑		
 
+
+			function clear5()
+			{
+				$('#outModel').val("");//鍑哄簱鍙�
+				$('#standard').val("");//瑙勬牸
+
+				$('#pickQty').val("");//寰呮嫞鏁伴噺
+				$('#pickedQty').val("");//宸叉嫞鏁伴噺
+				$('#palletNoqty').val("");//宸叉嫞鏁伴噺
+				
+				$('#boxNo').val("");//绠辩爜
+				$('#boxQty').val("");//鎵樼洏涓婃暟閲�
+			}
 			function clear1() {
 				$('#outModel').val("");//鍑哄簱鍙�
 				$('#standard').val("");//瑙勬牸
@@ -657,6 +687,16 @@
 				} else {					
 					$('#BoxDIv').attr("style", "display:block")
 					isContinue="0";
+				}
+				$('#boxNo').val("");
+				$('#boxNo3').val("");
+			});
+			
+			form.on('switch(IsCheckCon)', function (obj) {
+				if (obj.elem.checked) {
+					isConCheck="1";
+				} else {					
+					isConCheck="0";
 				}
 				$('#boxNo').val("");
 				$('#boxNo3').val("");
@@ -774,9 +814,22 @@
 							icon: 2,
 							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
 						});
+						clear5;
+						
+						$("#palletNo").val("");//鎵樼洏鍙�
+						$("#pickQty1").val("");//鎵樼洏鍙�
+						
+						$("#planQty").val("");  //璁″垝鏁伴噺
+						$("#finishQty").val("");//瀹屾垚鏁伴噺
+						//鐗╂枡鎵规
+						$("#skuLotNo").empty();
+						$("#skuLotNo").append('<option value =>' + '</option>');
+						form.render('select');
 					}
 				});
 			}
+
+			
 
 			//鍒濆鍖栨覆鏌� 鐗╂枡-鎵规
 			function updateSkuLotNoList() {
@@ -870,6 +923,7 @@
 
 				console.log(list != null);
 				console.log(list);
+				let pallnono = 0;
 				if (list != null && list.length > 0) { //鎴愬姛
 
 					var arrTrs = new Array()
@@ -886,6 +940,7 @@
 						tr.find("td[name='boxNo']").html(list[i].BoxNo); 
 						tr.find("td[name='qty']").html(list[i].Qty);
 						tr.find("td[name='pickedQty']").html(list[i].PickedQty);
+						pallnono = pallnono + list[i].Qty;
 
 						tr.show();
 						arrTrs[i] = tr
@@ -901,6 +956,7 @@
 					// $("#boxNum").val(0)
 					setPages(1, 0)
 				}
+				$("#palletNoqty").val(pallnono)
 			}
 
 			//鑾峰彇鎵樼洏鐗╂枡鍚嶇粏
@@ -982,7 +1038,36 @@
 						});
 						return;
 					}
-				}				
+				}	
+				if(isConCheck=="0"){
+					if ($('#boxNo').val() == "") {
+						layer.msg("璇疯緭鍏ョ鐮�", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}); return;
+					}
+					if ($('#boxQty').val() == "") {
+						layer.msg("绠卞唴鏁伴噺涓虹┖锛屼笉鑳芥嫞璐�", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return;
+					}
+					if(($('#boxNo3').val() != "" && ($('#pickQty1').val() != "" || $('#pickQty1').val() != 0))){
+						layer.msg("杩芥函鏉$爜鍜屾嫞璐ф暟閲忎笉鑳藉悓鏃惰緭鍏ワ紒", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return;
+					}
+					if($('#pickQty1').val() != "" && $('#pickQty1').val()>parseFloat($('#pickQty').val())){
+						layer.msg("鎷h揣鏁伴噺涓嶈兘澶т簬寰呮嫞鏁伴噺锛�", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return;
+					}
+				}			
 				// let boxQty = parseInt($('#boxQty').val())
 				// let qty = parseInt($('#qty').val()) 
 				// if (qty <= 0 || qty > boxQty) {
@@ -1279,6 +1364,7 @@
 				var param = {
 					PalletNo: $("#palletNo2").val(),
 				};
+				
 				synData(IP + "/PdaSo/GetRunSoNoticeList", param, 'post', function (res) {
 					if (res.code == 0) { //鎴愬姛
 						console.log(res.data);
@@ -1291,11 +1377,15 @@
 						}
 						form.render('select');
 
-					} else { //涓嶆垚鍔�
+					}
+					else
+					 { //涓嶆垚鍔�
+						
 						layer.msg(res.msg, {
 							icon: 2,
 							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
 						});
+						
 					}
 				});
 			}
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
index 8746b3a..e0b0cbc 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -2870,26 +2870,44 @@
                     throw new Exception("褰撳墠鎵樼洏鏈湪搴撳瓨涓�");
                 }
                 //鎬庝箞鍒ゆ柇褰撳墠鎵樼洏鏄簱澶栬鍙栨牱鐨勬墭鐩橈紝姝e父鍑哄簱鍓╀綑鎵樼洏鐩墠杩欑鎯呭喌涔熻兘鎷h揣鍟婏紝涔熸病鏈夊垎閰嶄俊鎭�
-                var allot = Db.Queryable<BllExportAllot>().First(m =>
-                    m.IsDel == "0" && m.PalletNo == palletNo && m.Status != "5" && m.Status != "6");
-                if (allot != null)
+                //鍏堣幏鍙栧崟鎹垎閰嶄俊鎭紝鍐嶈幏鍙栨墭鐩樺垎閰嶄俊鎭�
+                var allotnotice = Db.Queryable<BllExportNotice>().Where(m =>
+                    m.IsDel == "0" && m.Type == "3").ToList();
+                if (allotnotice.Count  == 0)
                 {
-                    var soNo = Db.Queryable<BllExportNotice>()
-                        .First(m => m.IsDel == "0" && m.SONo == allot.SONo);
-                    if (soNo == null)
+                    throw new Exception("鏈壘鍒板彇鏍峰崟鎹俊鎭�");
+                }
+                int pano = 0;
+                var sono = "";
+                foreach (var item in allotnotice)
+                {
+                    var allot = Db.Queryable<BllExportAllot>().First(m =>
+                    m.IsDel == "0" && m.PalletNo == palletNo && m.Status != "5" && m.Status != "6" && m.SONo == item.SONo);
+                    if (allot != null)
                     {
-                        throw new Exception("鏈壘鍒版墭鐩樹笂鍑哄簱鍗曟嵁淇℃伅");
+                        pano++;
+                        sono = item.SONo;
                     }
-                    if (soNo.Type != "3")
+                }
+                if (pano > 0)
+                {
+                    var locate = Db.Queryable<DataStockDetail>().First(w => w.PalletNo == palletNo);
+                    if (locate != null)
                     {
-                        throw new Exception("璇ユ墭鐩樹笉鏄彇鏍锋墭鐩�");
+                        if (locate.WareHouseNo == "w01")
+                        {
+                            type = "0";//搴撳唴鍙栨牱
+                        }
+                        else
+                        {
+                            type = "1";
+                        }
+                        
                     }
-                    type = "0";//搴撳唴鍙栨牱
                 }
                 else
                 {
-                    //鍒ゆ柇褰撳墠鎵樼洏鏄惁鏄湪骞冲簱鎴栧簱澶�
-                    type = "1";//搴撳墠鍙栨牱
+                    throw new Exception("鏈壘鍒板彇鏍锋墭鐩樹俊鎭�");
                 }
                 return type;
             }
diff --git a/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs b/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
index 2c01216..748f61b 100644
--- a/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
+++ b/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
@@ -55,7 +55,15 @@
         /// <param name="boxNo">绠辩爜</param>
         /// <param name="boxNo3">鏀�/琚嬬爜</param>
         /// <returns></returns>
-        List<BoxInfo> GetDataComBoxInfo(string soDetailId,string palletNo, string boxNo, string boxNo3);
+        List<BoxInfo> GetDataComBoxInfo(string soDetailId,string palletNo, string boxNo, string boxNo3); 
+
+        ///// <summary>
+        ///// 鑾峰彇鎵樼洏涓婃暟閲�
+        ///// </summary>
+        ///// <param name="palletNo">鎵樼洏鍙�</param>
+        ///// <returns></returns>
+        //List<BoxInfo> GetDataPallnoInfo(string palletNo);
+        
 
         /// <summary>
         /// 鑾峰彇搴撳唴鏃犵鐮佺殑鎵樼洏鍒嗛厤淇℃伅
diff --git a/Wms/Wms/Controllers/PdaSoController.cs b/Wms/Wms/Controllers/PdaSoController.cs
index 7339722..e5b0a33 100644
--- a/Wms/Wms/Controllers/PdaSoController.cs
+++ b/Wms/Wms/Controllers/PdaSoController.cs
@@ -160,6 +160,26 @@
             }
         }
 
+        ///// <summary>
+        ///// 鑾峰彇鎵樼洏涓婄墿鏂欐暟閲�
+        ///// </summary>
+        ///// <param name="model">Pallno:鎵樼洏鍙�</param> 
+        ///// <returns></returns>
+        //[HttpPost]
+        //public IActionResult GetDataPallnoInfo(PdaSoVm model)
+        //{
+        //    try
+        //    {
+        //        var models = _pdaSoSvc.GetDataPallnoInfo(model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3);
+
+        //        return Ok(new { code = 0, msg = "绠辩爜淇℃伅", data = models });
+        //    }
+        //    catch (Exception e)
+        //    {
+        //        return Ok(new { code = 1, msg = e.Message });
+        //    }
+        //}
+
         /// <summary>
         /// 鑾峰彇绠辩爜淇℃伅锛堣幏鍙栧簱鍐呮棤绠辩爜鐨勬墭鐩樺垎閰嶄俊鎭級
         /// </summary>
diff --git a/Wms/Wms/appsettings.json b/Wms/Wms/appsettings.json
index 883ae7c..42d353f 100644
--- a/Wms/Wms/appsettings.json
+++ b/Wms/Wms/appsettings.json
@@ -11,8 +11,8 @@
     //"ConnectionString": "Server=47.95.120.93;Database=WMS_JC09;User ID=sa;password=boxline!@#; Integrated Security=True;",
     //"ConnectionString": "Server=47.95.120.53;Database=WMS_JC09;User ID=sa;Password=boxline!@#;Integrated Security=False;",
     //"ConnectionString": "Server=192.168.62.106;Database=WMS_JC24;User ID=sa;Password=sql2019;Integrated Security=False;",
-    //"ConnectionString": "Server=192.168.62.200;Database=WMS_JC24;User ID=sa;Password=sql2019;Integrated Security=False;"
-    "ConnectionString": "Server=10.18.99.10;Database=WMS_JC24;User ID=sa;Password=sql2024;Integrated Security=False;"
+    "ConnectionString": "Server=192.168.62.200;Database=WMS_JC24;User ID=sa;Password=sql2019;Integrated Security=False;"
+    //"ConnectionString": "Server=10.18.99.10;Database=WMS_JC24;User ID=sa;Password=sql2024;Integrated Security=False;"
     //"ConnectionString": "Server=.;Database=WMS_JC24;User ID=sa;Password=sql2022;Integrated Security=False;"
     //"ConnectionString": "Data Source=DESKTOP-0EJDG95\\MSSQLSERVER1;Initial Catalog=WMS_V01;Integrated Security=True;"
   },

--
Gitblit v1.8.0