From ec6987436052c832125a4f1167df35b7b7836605 Mon Sep 17 00:00:00 2001
From: test <15284381150@163.com>
Date: 星期二, 23 九月 2025 16:06:08 +0800
Subject: [PATCH] 修改托盘明细问题

---
 HTML/views/StatisticalReport/BoxInfor.html |   92 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 89 insertions(+), 3 deletions(-)

diff --git a/HTML/views/StatisticalReport/BoxInfor.html b/HTML/views/StatisticalReport/BoxInfor.html
index 3a9707f..94d5113 100644
--- a/HTML/views/StatisticalReport/BoxInfor.html
+++ b/HTML/views/StatisticalReport/BoxInfor.html
@@ -169,7 +169,14 @@
 							</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
@@ -218,6 +225,17 @@
 										</button>
 									</div>
 									<!-- #endregion -->
+									<script type="text/html" id="toolbarDemo1">
+										{{# function GetBtn1(d){
+											var html = ''; 
+											
+											html += `<a class="layui-btn layui-btn-normal layui-btn-xs editDemoClass" lay-event="editDemo">
+												<i class="layui-icon layui-icon-edit"></i>澶囨敞</a>`;
+											return html;
+										} 
+									}}
+									{{ GetBtn1(d) }}
+									</script>
 
 									<!-- #region 鑷畾涔夎〃澶� -->
 									<script type="text/html" id="templetProductionTime">
@@ -318,6 +336,7 @@
                             <i class="layui-icon layui-icon-edit"></i>璇︽儏
                         </button>
                     </script>
+					
 			</div>
 		</div>
 	</div>
@@ -377,7 +396,7 @@
 			function addZero(s) {
 				return s < 10 ? ('0' + s) : s;
 			};
-
+			
 			var $ = layui.$;
 			var yemianid = 0;
 			refreshTable("", "", "", "", "", "", "", "", "", "", "", "", "", "");
@@ -407,11 +426,13 @@
 				{ field: 'BitPalletMark', title: '闆舵墭鏍囪', align: 'center', templet: '#BitPalletMarkStatus', width: 100, },
 
 				{ field: 'ProductionTime', title: '鐢熶骇鏃ユ湡', align: 'center', templet: '#templetProductionTime' },
+				{ 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缂栫爜
@@ -444,6 +465,7 @@
 						even: true,
 						cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
 						done: function () {
+							setRight();
 							//鑷畾涔夊垪瀹�
 							SetTableColW('LAY-app-content-list', 'Statistical/GetBindList', TotalColsSysArr);
 						},
@@ -489,6 +511,28 @@
 					});
 				});
 				//#endregion                    
+			}
+			function setRight() {
+				$(function () {
+					$(".editDemoClass").hide();//澶囨敞
+
+				});
+				sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
+					if (res.code == 0) { //鎴愬姛 
+						for (var k = 0; k < res.data.length; k++) {
+							if (res.data[k].MenuName == "缁存姢鎵樼洏鏄庣粏澶囨敞") {
+								$(function () {
+									$(".editDemoClass").show();
+								});
+							}
+						}
+					} else { //涓嶆垚鍔�
+						layer.msg('鑾峰彇鏉冮檺淇℃伅澶辫触', {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
 			}
 
 			// 琛ㄥ崟闇�瑕佺殑鍙橀噺
@@ -591,7 +635,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;
+				}
+			});
 
 
 			//鎺ュ彈鍏ㄥ眬鍙橀噺

--
Gitblit v1.8.0