From 156e0d593769d1c4438eb1c6d4547063f76331b3 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期三, 19 十一月 2025 15:52:31 +0800
Subject: [PATCH] 修改拣货拼托bug

---
 HTML/views/SOSetting/ExportNotice.html |   49 +++++++++++++++++++++++++++++--------------------
 1 files changed, 29 insertions(+), 20 deletions(-)

diff --git a/HTML/views/SOSetting/ExportNotice.html b/HTML/views/SOSetting/ExportNotice.html
index 6ce58a7..0b70f99 100644
--- a/HTML/views/SOSetting/ExportNotice.html
+++ b/HTML/views/SOSetting/ExportNotice.html
@@ -400,11 +400,12 @@
 						{{# function GetBtn2(d){
 								var html = '';
 								
-								if((d.Status == "0" ||d.Status == "1") && d.Qty > d.AllotQty){ 
+								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"){
 									html +=`<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
 												<i class="layui-icon layui-icon-delete"></i>鍒犻櫎
@@ -1375,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绉掞級
+							});
+						}
 					});
 				}
 			});

--
Gitblit v1.8.0