From a4bf691ad07da83f77f78cc029c696779b6ef28f Mon Sep 17 00:00:00 2001
From: test <15284381150@163.com>
Date: 星期一, 22 九月 2025 18:22:33 +0800
Subject: [PATCH] 修改问题

---
 HTML/views/StatisticalReport/BoxInfor.html |  209 +++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 183 insertions(+), 26 deletions(-)

diff --git a/HTML/views/StatisticalReport/BoxInfor.html b/HTML/views/StatisticalReport/BoxInfor.html
index 04858a6..dd9d969 100644
--- a/HTML/views/StatisticalReport/BoxInfor.html
+++ b/HTML/views/StatisticalReport/BoxInfor.html
@@ -153,6 +153,30 @@
 							<input type="text" autocomplete="off" id="EndTime" class="layui-input" placeholder="缁撴潫鏃堕棿">
 						</div>
 					</div>
+					<div class="layui-inline">
+						<label class="layui-form-label" style="width: 60px;">鎵�灞炰粨搴�</label>
+						<div class="layui-input-inline">
+							<select name="WareHouseNo" id="WareHouseNo" lay-filter="getWareHouseNo" lay-search>
+								<option value=""></option>
+							</select>
+						</div>
+					</div>
+					<div class="layui-inline">
+						<label class="layui-form-label" style="width: 60px;">鎵�灞炲尯鍩�</label>
+						<div class="layui-input-inline">
+							<select name="AreaNo" id="AreaNo" lay-filter="getAreaNo" lay-search>
+								<option value=""></option>
+							</select>
+						</div>
+					</div>
+					<!-- 缁存姢澶囨敞寮规 -->
+					<div class="layui-inline" id="divEditDemo" style="display: none; padding-top: 10px;">
+						<label class="layui-form-label">澶囨敞</label>
+						<div class="layui-input-inline" style="width: 300px;height: 100%;">
+							<textarea placeholder="璇疯緭鍏ュ唴瀹�" id="NoticeDemo" name="NoticeDemo"
+								class="layui-textarea"></textarea>
+						</div>
+					</div>
 
 					<div class="layui-inline sousuo">
 						<button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
@@ -205,7 +229,14 @@
 									<!-- #region 鑷畾涔夎〃澶� -->
 									<script type="text/html" id="templetProductionTime">
 											{{# function GetBtn(d){
-													return formatDate(d.ProductionTime);
+													return formatDate2(d.ProductionTime);
+												}	
+											}}
+											{{ GetBtn(d) }}
+										</script>
+									<script type="text/html" id="templetExpirationTime">
+											{{# function GetBtn(d){
+													return formatDate2(d.ExpirationTime);
 												}	
 											}}
 											{{ GetBtn(d) }}
@@ -225,7 +256,21 @@
 					</div>
 
 				</div>
-
+				<script type="text/html" id="buttonTpl">
+					{{#  if(d.Status=='0'){ }}
+					  <button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">寰呭垎閰�</button>
+					{{#  } else if(d.Status == '1') { }}
+					  <button class="layui-btn layui-btn-radius layui-btn-xs">閮ㄥ垎鍒嗛厤</button>
+					{{#  } else if(d.Status == '2') { }}
+						<button class="layui-btn layui-btn-radius layui-btn-xs">宸插垎閰�</button>
+					{{#  } else if(d.Status == '3') { }}
+					   <button class="layui-btn layui-btn-radius layui-btn-xs">鐩樼偣閿佸畾</button>
+					{{#  } else if(d.Status == '4') { }}
+						<button class="layui-btn layui-btn-radius layui-btn-xs">绉诲簱閿佸畾</button>
+					{{#  } else if(d.Status == '5') { }}
+						<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-danger">寮傚父閿佸畾</button>
+					{{#  } }}
+				  </script>
 				<script type="text/html" id="BoxStatus">
                         {{#  if(d.Status=='0'){ }}
                             <p>鏈粍鎵�</p>
@@ -280,6 +325,13 @@
                             <i class="layui-icon layui-icon-edit"></i>璇︽儏
                         </button>
                     </script>
+					<!-- 娣诲姞澶囨敞鎸夐挳 -->
+					<script type="text/html" id="toolbarDemo1">
+
+						<a class="layui-btn layui-btn-normal layui-btn-xs editDemoClass" lay-event="editDemo">
+						  <i class="layui-icon layui-icon-edit"></i>澶囨敞
+						</a>
+					  </script>
 			</div>
 		</div>
 	</div>
@@ -349,33 +401,40 @@
 			//#region 鑷畾涔夎〃澶�
 			var TotalColsArr = [[
 				{ field: '', title: '搴忓彿', type: 'numbers', align: 'center', fixed: 'left', "disabled": true },
-				{ field: 'WareHouseName', title: '鎵�灞炰粨搴�', align: 'center' },
-				{ field: 'RoadwayName', title: '鎵�灞炲贩閬�', align: 'center' },
-				{ field: 'AreaName', title: '鎵�灞炲尯鍩�', align: 'center' },
-				{ field: 'LocatNo', title: '鍌ㄤ綅鍦板潃', align: 'center' },
-				{ field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center' },
-				{ field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center' },
-				{ field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center' },
-				{ field: 'OwnerNo', title: '璐т富缂栫爜', align: 'center' },
-				{ field: 'OwnerName', title: '璐т富鍚嶇О', align: 'center' },
-				{ field: 'SupplierNo', title: '渚涘簲鍟嗙紪鐮�', align: 'center' },
-				{ field: 'SupplierName', title: '渚涘簲鍟嗗悕绉�', align: 'center' },
-				{ field: 'LotNo', title: '鎵规鍙�', align: 'center' },
-				{ field: 'LotText', title: '鎵规鎻忚堪', align: 'center' },
-				{ field: 'SupplierLot', title: '渚涜揣鎵规', align: 'center' },
-				{ field: 'Qty', title: '鏁伴噺', align: 'center' },
-				{ field: 'LockQty', title: '閿佸畾鏁伴噺', align: 'center', },
-				{ field: 'FrozenQty', title: '鍐荤粨鏁伴噺', align: 'center' },
-				{ field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus' },
+				{ field: 'WareHouseName', title: '鎵�灞炰粨搴�', align: 'center', width: 120, },
+				{ field: 'RoadwayName', title: '鎵�灞炲贩閬�', align: 'center', width: 120, },
+				{ field: 'AreaName', title: '鎵�灞炲尯鍩�', align: 'center', width: 120, },
+				{ field: 'LocatNo', title: '鍌ㄤ綅鍦板潃', align: 'center', width: 100, },
+				{ field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', width: 100, },
+				{ field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', width: 120, },
+				{ field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', width: 120, },
+				{ field: 'LotNo', title: '鎵规鍙�', align: 'center', width: 100, },
+				//{ field: 'LotText', title: '鎵规鎻忚堪', align: 'center' },
+				{ field: 'SupplierLot', title: '渚涜揣鎵规', align: 'center', width: 120, },
+				{ field: 'Qty', title: '鏁伴噺', align: 'center', width: 90, },
+				{ field: 'LockQty', title: '閿佸畾鏁伴噺', align: 'center', width: 90, },
+				{ field: 'FrozenQty', title: '鍐荤粨鏁伴噺', align: 'center', width: 90, },
+
+				{ field: 'Status', title: '搴撳瓨鐘舵��', align: 'center', templet: '#buttonTpl', width: 90, },
+				{ field: 'InspectStatus', templet: '#InspectStatus1', title: '璐ㄦ鐘舵��', align: 'center', width: 100, },
+				{ field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus', width: 100, },
+				{ field: 'BitPalletMark', title: '闆舵墭鏍囪', align: 'center', templet: '#BitPalletMarkStatus', width: 100, },
+
 				{ field: 'ProductionTime', title: '鐢熶骇鏃ユ湡', align: 'center', templet: '#templetProductionTime' },
-				{ field: 'InspectStatus', templet: '#InspectStatus1', title: '璐ㄦ鐘舵��', align: 'center' },
-				{ field: 'BitPalletMark', title: '闆舵墭鏍囪', align: 'center', templet: '#BitPalletMarkStatus' },
+				{ field: 'ExpirationTime', title: '杩囨湡鏃ユ湡', align: 'center', templet: '#templetExpirationTime' },
+				{ field: 'OwnerNo', title: '璐т富缂栫爜', align: 'center', width: 100, },
+				{ field: 'OwnerName', title: '璐т富鍚嶇О', align: 'center', width: 100, },
+				{ field: 'SupplierNo', title: '渚涘簲鍟嗙紪鐮�', align: 'center', width: 100, },
+				{ field: 'SupplierName', title: '渚涘簲鍟嗗悕绉�', align: 'center', width: 100, },
+				{ field: 'Demo', title: '澶囨敞', align: 'center', width: 100, },
+				{ field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 280, align: 'center', toolbar: '#toolbarDemo1', "disabled": true }
+
 			]];
 			var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
 			//#endregion
 			//鑾峰彇鎵樼洏鏄庣粏
 			function refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark,
-				BitBoxMark, InspectStatus, OwnerNo, OwnerName, StartTime, EndTime) {
+				BitBoxMark, InspectStatus, OwnerNo, OwnerName, StartTime, EndTime, WareHouseNo, AreaNo) {
 				//#region 鑷畾涔夎〃澶�
 				var colsJson
 				var param1 = {
@@ -422,6 +481,8 @@
 						OwnerName: OwnerName, //璐т富鍚嶇О
 						StartTime: StartTime, //寮�濮嬫椂闂�
 						EndTime: EndTime, //缁撴潫鏃堕棿
+						WareHouseNo: WareHouseNo,
+						AreaNo: AreaNo,
 					};
 					sendData(IP + "/Statistical/GetBindList", param, 'get', function (res) {
 						console.log(res)
@@ -463,6 +524,7 @@
 				{ field: 'Qty', title: '鏁伴噺', width: 90, align: 'center' },
 				{ field: 'FullQty', title: '鏁寸鏁伴噺', width: 100, align: 'center' },
 				{ field: 'ProductionTime', title: '鐢熶骇鏃ユ湡', align: 'center', templet: '#templetProductionTime' },
+				{ field: 'ExpirationTime', title: '鏈夋晥鏈�', align: 'center', templet: '#templetExpirationTime' },
 				{ field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus' },
 				{ field: 'BitBoxMark', templet: '#BitPalletMarkStatus1', title: '闆剁鏍囪', align: 'center' },
 				{ field: 'InspectStatus', templet: '#InspectStatus1', title: '璐ㄦ鐘舵��', align: 'center' },
@@ -471,7 +533,8 @@
 			]];
 			var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
 			//#endregion				
-			function refreshTable2(Id, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus, StartTime, EndTime) {
+			function refreshTable2(Id, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus,
+				StartTime, EndTime, WareHouseNo, AreaNo) {
 				//#region 鑷畾涔夎〃澶�
 				var colsJson2
 				var param1 = {
@@ -516,6 +579,8 @@
 						InspectStatu: InspectStatus,
 						StartTime: StartTime,
 						EndTime: EndTime,
+						WareHouseNo: WareHouseNo,
+						AreaNo: AreaNo,
 					}
 					sendData(IP + "/Statistical/GetBoxInfo", param, 'get', function (res) {
 						if (res.code == 0) //鎴愬姛
@@ -542,7 +607,49 @@
 			}
 
 			//var url = IP + "/Statistical/GetInventoryList1";
+			table.on('tool(LAY-app-content-list)', function (obj) {
+				var data = obj.data;
+				switch (obj.event) {
+					case "editDemo":
+						$('#NoticeDemo').val(data.Demo);
+						layer.open({
+							type: 1,
+							title: '缁存姢澶囨敞',
+							content: $('#divEditDemo'),
+							maxmin: false,
+							area: ['420px', '260px'],
+							btn: ['纭畾', '鍙栨秷'],
+							yes: function (index, layero) {
+								var demo = $('#NoticeDemo').val();
+								var param = {
+									id: data.Id,
+									demo: demo,
+								};
+								sendData(IP + "/Statistical/EditStockDetailDemo", param, 'get', function (res) {
+									if (res.code == 0) { //鎴愬姛
+										refreshTable();
+										layer.msg(res.msg, {
+											icon: 1,
+											time: 1500 //1绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+										}, function () {
 
+										});
+									} else { //涓嶆垚鍔�
+										layer.msg(res.msg, {
+											icon: 2,
+											time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+										}, function () {
+											refreshTable();
+										});
+									}
+									layer.close(index);
+								});
+							}
+						});
+						break;
+					default: break;
+				}
+			});
 
 
 			//鎺ュ彈鍏ㄥ眬鍙橀噺
@@ -566,14 +673,18 @@
 
 				var StartTime = $("#StartTime").val();
 				var EndTime = $("#EndTime").val();
+				var WareHouseNo = $("#WareHouseNo").val();
+				var AreaNo = $("#AreaNo").val();
 
 				if (yemianid == 0) {
 					console.log("鎬诲崟");
-					refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark, BitBoxMark, InspectStatus, OwnerNo, OwnerName, StartTime, EndTime);
+					refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark, BitBoxMark,
+						InspectStatus, OwnerNo, OwnerName, StartTime, EndTime, WareHouseNo, AreaNo);
 				} else if (yemianid == 1) {
 					quanid = '';
 					console.log("鏄庣粏");
-					refreshTable2(quanid, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus, StartTime, EndTime);
+					refreshTable2(quanid, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark,
+						InspectStatus, StartTime, EndTime, WareHouseNo, AreaNo);
 				}
 
 			});
@@ -733,6 +844,52 @@
 
 			});
 
+
+			//鑾峰彇浠撳簱涓嬫媺妗嗕俊鎭�
+			sendData(IP + "/Sys/GetWarehouseDic", {}, 'get', function (res) {
+				if (res.code == 0) { //鎴愬姛
+					for (var i = 0; i < res.data.length; i++) {
+						$("#WareHouseNo").append('<option value =' + res.data[i].WareHouseNo + '>' + res.data[i].WareHouseNo + '-' +
+							res.data[i].WareHouseName + '</option>');
+					}
+					form.render('select');
+				} else { //涓嶆垚鍔�
+					layer.msg(res.msg, {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					}, function () { });
+				}
+			});
+
+			getAR("");
+			form.on('select(getWareHouseNo)', function (data) {
+				console.log(data);
+				getAR(data.value);
+			});
+			function getAR(val) {
+				//鑾峰彇 鍖哄煙涓嬫媺妗�
+				sendData(IP + "/Sys/GetStorageAreaByHouseNo?wareHouseNo=" + val, {}, 'get', function (res) {
+					$("#AreaNo").empty();
+					$("#AreaNo").append('<option value =""></option>');
+					if (res.code == 0) { //鎴愬姛 
+						for (var i = 0; i < res.data.length; i++) {
+							$("#AreaNo").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i].AreaNo + '-' +
+								res.data[i].AreaName + '</option>');
+						}
+						form.render('select');
+					} else { //涓嶆垚鍔�
+						layer.msg('鑾峰彇鍖哄煙淇℃伅澶辫触', {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () {
+							//鍥炶皟
+							form.render('select');
+						});
+					}
+				});
+
+			};
+
 			//#region 鑷畾涔夎〃澶�
 			//鑷畾涔夎〃澶�			
 			active = {

--
Gitblit v1.8.0