From 18dfe607d34ecbc7881e8c80c8434354723d27c7 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期六, 02 三月 2024 16:56:24 +0800
Subject: [PATCH] Merge branch 'master' into wxw

---
 Pda/View/HouseDataSetting/stockCheck.html |  100 ++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 85 insertions(+), 15 deletions(-)

diff --git a/Pda/View/HouseDataSetting/stockCheck.html b/Pda/View/HouseDataSetting/stockCheck.html
index 387d64c..1ce8639 100644
--- a/Pda/View/HouseDataSetting/stockCheck.html
+++ b/Pda/View/HouseDataSetting/stockCheck.html
@@ -168,6 +168,9 @@
 			word-break: break-all;
 			word-wrap: break-word;
 		}
+		.layui-form-switch {
+			margin-top: 0;
+		}
 	</style>
 	<link rel="stylesheet" href="/css/adapter.css" />
 </head>
@@ -218,9 +221,16 @@
 								autocomplete="off" class="layui-input">
 						</div>
 					</div>
-
+					
 					<div class="layout-tab-page">
-						<div class="layui-form-item layout-input" style="margin-top: 10px;">
+						<div id="" class="layui-form-item layout-input"  >
+							<label class="layui-form-label">鏄惁鏁伴噺鐩樼偣锛�</label>
+							<div class="layui-input-block" style="position: absolute;top: 100;">
+								<input type="checkbox" name="IsZhengTuo" id="IsZhengTuo" lay-skin="switch" lay-text="鏄瘄鍚�"
+									lay-filter="IsZhengTuo" class="layui-input" >
+							</div>
+						</div>
+						<div id="boxno1" class="layui-form-item layout-input" style="margin-top: 10px;">
 							<label class="layui-form-label">绠辩爜锛�</label>
 							<div class="layui-input-block">
 								<input id="boxNo" type="text" lay-verify="boxNo" placeholder="璇锋壂鎻忓绠辨潯鐮�"
@@ -239,7 +249,7 @@
 							<div class="layui-input-block">
 								<select id="Result" lay-filter="Result" lay-search>
 									<!-- <option value=""></option> -->
-									<option value="0" selected>姝e父</option>
+									<option value="0">姝e父</option>
 									<option value="1">鐩樹簭</option>
 									<option value="2">鐩樼泩</option>
 								</select>
@@ -276,13 +286,13 @@
 				</form>
 			</div>
 
-			<div id="" class="layout-tbl-paging"> 
+			<div id="tableid" class="layout-tbl-paging"> 
 				<table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding="">
 					<tr>
-						<th style="width: 40%;">绠辩爜</th>
-						<th style="width: 30%;">鏀爜</th>
-						<th style="width: 15%;">绠卞唴鏁伴噺</th>
-						<th style="width: 15%;">缁撴灉</th>
+						<th style="width: 40%;"><p id="a">绠辩爜</p></th>
+						<th style="width: 30%;"><p id="b">鏀爜</p></th>
+						<th style="width: 15%;"><p id="c">绠卞唴鏁伴噺</p></th>
+						<th style="width: 15%;"><p id="d">缁撴灉</p></th>
 					</tr>
 					<tr id="boxCell" style="display: none;">
 						<td name="boxNo"></td>
@@ -310,6 +320,51 @@
 			var canPickBox = true;
 			$("#palletNo").focus();
 
+			//鏄惁鏁伴噺鐩樼偣
+			var isContinue = "0";
+
+			form.on('switch(IsZhengTuo)', function (obj) {
+				$("#a").html('');
+				$("#b").html('');
+				$("#c").html('');
+				
+				if (obj.elem.checked) {
+					$('#boxno1').attr("style", "display:none")
+					$('#boxno3').attr("style", "display:none")
+					isContinue="1";
+
+					$("#a").html('鐗╂枡缂栫爜');
+					$("#b").html('鎵樼洏鏉$爜');
+					$("#c").html('鎵樼洏鏁伴噺');
+
+				} else {					
+					$('#boxno1').attr("style", "display:block")
+					$('#boxno3').attr("style", "display:block")
+					isContinue="0";
+
+					$("#a").html('绠辩爜');
+					$("#b").html('鏀爜');
+					$("#c").html('绠卞唴鏁伴噺');
+
+					if ($("#Result").val() != "0") {
+						$('#boxno3').addClass("show");
+						$('#boxno3').removeClass("noshow");
+					}else{
+						$('#boxno3').addClass("noshow");
+						$('#boxno3').removeClass("show");
+					}
+					if($("#Result").val() == "2"){
+						$('#factNum').removeAttr("disabled");
+					}
+					else{
+						$('#factNum').attr("disabled","disabled");
+					}
+				}
+				$('#boxNo').val("");
+				$('#boxNo3').val("");
+				refreshTable()
+				checkPalletState()
+			});
 
 			$("#menuImg").click(function (e) {
 				//console.log("menuImg")
@@ -326,7 +381,7 @@
 				$("#menuList").hide()
 			})
 
-			// //褰撴墭鐩樻潯鐮佽緭鍏ユ澶卞幓鐒︾偣鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬�
+			//褰撴墭鐩樻潯鐮佽緭鍏ユ澶卞幓鐒︾偣鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬�
 			// $("#palletNo").blur(function () {
 			// 	//console.log("0000000000000")
 			// 	if ($("#palletNo").val() == "") {
@@ -447,7 +502,9 @@
 					"CrDetail": $("#skuLotNo").val(),
 					"PalletNo": $("#palletNo").val(),
 					"BoxNo": $("#boxNo").val(),
+					"isContinue": isContinue,
 				}
+				console.log(param)
 				synData(IP + "/PdaCr/GetStockCheckLogList", param, 'post', function (res) {
 					console.log(res)
 					if (res.code == 0) { //鎴愬姛 
@@ -482,7 +539,7 @@
 					}, function () { });
 					return
 				}
-				if ($("#Result").val() == "2") {
+				if ($("#Result").val() == "2" && isContinue == "0") {
 					if ($("#boxNo").val() == "" ||$("#boxNo3").val() == "") {
 						layer.msg("璇锋壂鎻忓绠辨潯鐮佸拰鏀爜", {
 							icon: 2,
@@ -509,6 +566,7 @@
 						"BoxNo3": $("#boxNo3").val(),
 						"Result": $("#Result").val(),
 						"Qty": parseInt($("#factNum").val()),
+						"isContinue": isContinue,
 					}
 					sendData(IP + "/PdaCr/CrSetCheck", param, 'post', function (res) {
 						
@@ -523,6 +581,7 @@
 								$("#boxNo3").val('')
 								$("#Result").val('0')
 								refreshTable()
+								GetOutInfo()
 								canPickBox = true
 							});
 
@@ -551,10 +610,10 @@
 					$('#boxno3').addClass("noshow");
 					$('#boxno3').removeClass("show");
 				}
-				if(data.value == "2"){
+				if(data.value == "2" || isContinue == "1"){
 					$('#factNum').removeAttr("disabled");
 				}
-				else{
+				else if(isContinue != "1"){
 					$('#factNum').attr("disabled","disabled");
 				}
 				$('#boxNo3').val("");
@@ -574,7 +633,7 @@
 				}
 
 
-				if (data.length > 0) { //鎴愬姛
+				if (data.length > 0 || isContinue == "1") { //鎴愬姛
 					$("#boxNum").val(data.length)
 					var list = data
 					var arrTrs = new Array()
@@ -586,9 +645,18 @@
 						tr.appendTo("#tableBoxList");
 						idx++;
 						tr.attr('index', idx)
-						tr.find("td[name='boxNo']").html(list[i].BoxNo);
-						tr.find("td[name='boxNo3']").html(list[i].BoxNo3);
+						//鍒ゆ柇鏄惁涓烘暟閲�
+						if(isContinue == "1")
+						{
+							tr.find("td[name='boxNo']").html(list[i].SkuNo);
+							tr.find("td[name='boxNo3']").html(list[i].PalletNo);
+						}
+						else{
+							tr.find("td[name='boxNo']").html(list[i].BoxNo);
+							tr.find("td[name='boxNo3']").html(list[i].BoxNo3);
+						}
 						tr.find("td[name='qty']").html(list[i].Qty);
+						
 
 						var CheckResultStr='';
 						if(list[i].CheckResult=='0'){
@@ -599,6 +667,8 @@
 							CheckResultStr='鐩樼泩';
 						}else if(list[i].CheckResult=='3'){
 							CheckResultStr='瀹炵墿涓嶇';
+						}else if(list[i].CheckResult=='4'){
+							CheckResultStr='鏁伴噺鐩樼偣';
 						}
 						tr.find("td[name='result']").html(CheckResultStr);
 

--
Gitblit v1.8.0