From 4aa0b9c9c2c56ec1af1dc3ee8ef12c9374b3d1ff Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期四, 27 十一月 2025 11:36:08 +0800
Subject: [PATCH] 修改车间记录列表数据显示异常问题

---
 HTML/views/SOSetting/ExportNotice.html |   67 +++++++++++++++++++++------------
 1 files changed, 43 insertions(+), 24 deletions(-)

diff --git a/HTML/views/SOSetting/ExportNotice.html b/HTML/views/SOSetting/ExportNotice.html
index 6c0ee12..0b70f99 100644
--- a/HTML/views/SOSetting/ExportNotice.html
+++ b/HTML/views/SOSetting/ExportNotice.html
@@ -354,7 +354,7 @@
 											</a>`;
 										}
 									}
-									if(d.Status == '0' && d.Origin == 'WMS'){
+									if(d.Status == '0'){
 										html += `<a class="layui-btn layui-btn-normal layui-btn-xs uptClass" lay-event="edit">
 													<i class="layui-icon layui-icon-edit"></i>缂栬緫
 												</a>
@@ -368,7 +368,7 @@
 												</a>`;
 									}
 									
-									if( (d.Status == '2' || d.Status == '3') && d.Type=='0'){
+									if( (d.Status == '2' || d.Status == '3')){
 										html += `<a class="layui-btn layui-btn-normal layui-btn-xs outClass" lay-event="outKu">
 													<i class="layui-icon layui-icon-ok"></i>鍑哄簱
 												</a>`;
@@ -400,12 +400,13 @@
 						{{# function GetBtn2(d){
 								var html = '';
 								
-								if((d.Status == "0" ||d.Status == "1") && d.Qty > d.AllotQty && d.IsWave == "0"){ 
+								if(d.AllotQty<d.Qty){ 
 									html += `<a class="layui-btn layui-btn-normal layui-btn-xs shoufenClass" lay-event="wan">
 												<i class="layui-icon layui-icon-ok"></i>鎵嬪姩鍒嗛厤
 											</a>`;
 								} 
-								if(d.Status == "0" && d.Origin == "WMS" && d.IsWave == "0"){
+								
+								if(d.Status == "0" && d.Origin == "WMS"){
 									html +=`<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
 												<i class="layui-icon layui-icon-delete"></i>鍒犻櫎
 											</a>`;
@@ -490,6 +491,7 @@
 				{ field: 'SONo', title: '鍑哄簱鍗曞彿', align: 'center', fixed: 'left', width: 165, "disabled": true },
 				{ field: 'Type', title: '鍗曟嵁绫诲瀷', align: 'center', templet: '#templetType' , width: 120,},
 				{ field: 'Status', title: '鎵ц鐘舵��', align: 'center', templet: '#templetStatus', width: 90, },
+				{ field: 'OrderCode', title: '涓嬪彂鍗曞彿', align: 'center', width: 180 },
 				{ field: 'LogisticsName', title: '鎵胯繍鍟�', align: 'center', width: 120, },
 				{ field: 'CustomerName', title: '瀹㈡埛鍚嶇О', align: 'center', width: 120, },
 				{ field: 'WareHouseName', title: '浠撳簱', align: 'center', width: 90, },
@@ -1126,6 +1128,7 @@
 				}
 			});
 			var isNeedUnpack = '0'//鏄惁闇�瑕佹媶绠憋紝0锛氬惁  1锛氭槸
+			var xmlFileName="";
 			//鐩戝惉鏁版嵁鎿嶄綔
 			table.on('tool(LAY-app-content-list)', function (obj) {
 				var data = obj.data;
@@ -1300,6 +1303,14 @@
 							};
 							sendData(IP + "/BllSo/AddExXmlStr", param, 'post', function (res) {
 								console.log(res);
+								if(data.Type=="0"){
+									xmlFileName="SalesWareHouseOut_"+data.OrderCode+"_linklink";
+								}else if(data.Type=="2"){
+									xmlFileName="CheckWareHouseOut_"+data.OrderCode+"_linklink";
+								}else{
+									xmlFileName=data.OrderCode+"_linklink";
+								}
+								
 								if (res.code == 0) { //鎴愬姛 
 									createFile(res.data);
 									layer.msg("鎿嶄綔鎴愬姛锛�", {
@@ -1365,25 +1376,33 @@
 				} else if (obj.event === 'check') {//澶嶆牳
 					// 浠g爜鍖哄煙
 					layer.confirm('纭畾澶嶆牳姝ゅ崟鎹悧锛�', function (index) {
-						var param = {
-							Id: data.Id,
-						};
-						sendData(IP + "/UpApi/FinishExportNotice", param, 'post', function (res) {
-							if (res.code == 0) { //鎴愬姛
-								layer.msg(res.msg, {
-									icon: 1,
-									time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-								}, function () {
-									refreshTable();
-									doing = true
-								});
-							} else { //涓嶆垚鍔�
-								layer.msg(res.msg, {
-									icon: 2,
-									time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-								}, function () { doing = true });
-							}
-						});
+						if (isChongFu == true) {
+							isChongFu = false;
+							var param = {
+								Id: data.Id,
+							};
+							sendData(IP + "/UpApi/FinishExportNotice", param, 'post', function (res) {
+								if (res.code == 0) { //鎴愬姛
+									layer.msg(res.msg, {
+										icon: 1,
+										time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+									}, function () {
+										refreshTable();
+										isChongFu = true;
+									});
+								} else { //涓嶆垚鍔�
+									layer.msg(res.msg, {
+										icon: 2,
+										time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+									}, function () { isChongFu = true; });
+								}
+							});
+						} else {
+							layer.msg("璇峰嬁閲嶅鐐瑰嚮", {
+								icon: 2,
+								time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+							});
+						}
 					});
 				}
 			});
@@ -1597,7 +1616,7 @@
 			function createFile(val) {
 				var content = val;   // 鏂囦欢鍐呭
 				var blob = new Blob([content], { type: "text/plain;charset=utf-8" });
-				var fileName = "ExInfo.xml"; // 鏂囦欢鍚�
+				var fileName = xmlFileName+".xml"; // 鏂囦欢鍚�
 				saveAs(blob, fileName);
 			}
 			//涓嬭浇鏂囦欢鍑芥暟

--
Gitblit v1.8.0