From 407599f9694186a6092d13bf1a6c9d92a9b7541e Mon Sep 17 00:00:00 2001
From: admin <qiutairan163@163.com>
Date: 星期一, 08 十二月 2025 16:36:19 +0800
Subject: [PATCH] 正在执行的单据也可以关单
---
HTML/views/SOSetting/ExportNotice.html | 99 +++++++++++++++++++++++++++----------------------
1 files changed, 54 insertions(+), 45 deletions(-)
diff --git a/HTML/views/SOSetting/ExportNotice.html b/HTML/views/SOSetting/ExportNotice.html
index 0fb3233..a639dda 100644
--- a/HTML/views/SOSetting/ExportNotice.html
+++ b/HTML/views/SOSetting/ExportNotice.html
@@ -68,7 +68,7 @@
<option value="2">鎶芥鍑哄簱</option>
<option value="4">涓嶅悎鏍煎搧鍑哄簱</option>
<option value="7">鍏朵粬鍑哄簱</option>
- <option value="9">鐢熶骇棰嗘枡鍑哄簱</option>
+ <option value="9">鐢熶骇棰嗘枡鍑哄簱</option>
</select>
</div>
</div>
@@ -338,7 +338,7 @@
</script>
<!-- #endregion -->
</div>
-<!-- if(d.Type == "1" && (d.Status == '2' || d.Status == '3')){
+ <!-- if(d.Type == "1" && (d.Status == '2' || d.Status == '3')){
html += `<a class="layui-btn layui-btn-normal layui-btn-xs outClass" lay-event="beiLiaoOutKu">
<i class="layui-icon layui-icon-ok"></i>澶囨枡
</a>`;
@@ -374,7 +374,7 @@
</a>`;
}
}
- if( d.Status == '4'){
+ if( d.Status == '3' || d.Status == '4'){
html += `<a class="layui-btn layui-btn-normal layui-btn-xs guanClass" lay-event="finish">
<i class="layui-icon layui-icon-ok"></i>鍏冲崟
</a>`;
@@ -400,11 +400,12 @@
{{# function GetBtn2(d){
var html = '';
- if((d.Status == "0" ||d.Status == "1")){
+ 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>鍒犻櫎
@@ -488,7 +489,7 @@
var TotalColsArr = [[
{ field: '', title: '搴忓彿', type: 'numbers', width: 50, align: 'center', fixed: 'left', "disabled": true },
{ field: 'SONo', title: '鍑哄簱鍗曞彿', align: 'center', fixed: 'left', width: 165, "disabled": true },
- { field: 'Type', title: '鍗曟嵁绫诲瀷', align: 'center', templet: '#templetType' , width: 120,},
+ { 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, },
@@ -496,7 +497,7 @@
{ field: 'WareHouseName', title: '浠撳簱', align: 'center', width: 90, },
{ field: 'Origin', title: '鏉ユ簮', align: 'center', width: 90, },
{ field: 'Demo', title: '澶囨敞', align: 'center', width: 180 },
- { field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center' , width: 110},
+ { field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 110 },
{ field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', width: 160, templet: '#templetCreateTime' },
{ field: 'UpdateUserName', title: '淇敼浜�', align: 'center', width: 110 },
{ field: 'UpdateTime', title: '淇敼鏃堕棿', align: 'center', width: 160, templet: '#templetUpdateTime' },
@@ -508,7 +509,7 @@
{ field: 'LotNoText', title: '鎵规鎻忚堪', align: 'center' },
{ field: 'IsDespatch', title: '鏄惁鍙戣繍', align: 'center', templet: '#templetIsDespatch' },
{ field: 'SupplierLot', title: '渚涜揣鎵规', align: 'center' },
-
+
{ field: 'caozuo', title: '鎿嶄綔', fixed: 'right', align: 'center', width: 360, toolbar: '#table-content-list', "disabled": false }
]];
var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
@@ -1127,7 +1128,7 @@
}
});
var isNeedUnpack = '0'//鏄惁闇�瑕佹媶绠憋紝0锛氬惁 1锛氭槸
- var xmlFileName="";
+ var xmlFileName = "";
//鐩戝惉鏁版嵁鎿嶄綔
table.on('tool(LAY-app-content-list)', function (obj) {
var data = obj.data;
@@ -1200,7 +1201,7 @@
isChongFu = true;
});
} else { //涓嶆垚鍔�
- if(res.code==2){
+ if (res.code == 2) {
layer.confirm('褰撳墠鍗曟嵁鎵规鍑哄簱鏄法鎵瑰嚭搴擄紝鏄惁璺ㄦ壒鍑哄簱锛�', function () {
var param1 = {
soNo: SoNo,
@@ -1225,12 +1226,12 @@
}
})
})
- }else{
+ } else {
layer.msg(res.msg, {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
});
- }
+ }
isChongFu = true;
}
});
@@ -1274,9 +1275,9 @@
area: ['1200px', '90%'],
});
} else if (obj.event === 'outKu') {
-
+
//if(data.WareHouseName =="鎴愬搧搴�"){
- outFunction(data.SONo);
+ outFunction(data.SONo);
// }else{
// outFunction2(data.SONo)
// }
@@ -1302,14 +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 (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("鎿嶄綔鎴愬姛锛�", {
@@ -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绉掞級
+ });
+ }
});
}
});
@@ -1409,10 +1418,10 @@
area: ['350px', '285px'],
btn: ['纭畾', '鍙栨秷'],
yes: function (index, layero) {
-
+
if (isChongFu == true) {
isChongFu = false;
-
+
if ($("#PickingArea").val() == '' || $('#PickingArea').val() == null) {
layer.msg("璇烽�夋嫨鍑哄簱鍙�", {
icon: 2,
@@ -1459,14 +1468,14 @@
}
});
}
-
+
//涓嶉�夋嫨鍑哄簱鍙g殑寮圭獥鏂规硶
function outFunction2(soNo) {
layer.confirm('纭畾褰撳墠鍗曟嵁鍑哄簱鍚楋紵', function (index) {
-
+
if (isChongFu == true) {
isChongFu = false;
-
+
var param = {
soNo: soNo,
};
@@ -1607,7 +1616,7 @@
function createFile(val) {
var content = val; // 鏂囦欢鍐呭
var blob = new Blob([content], { type: "text/plain;charset=utf-8" });
- var fileName = xmlFileName+".xml"; // 鏂囦欢鍚�
+ var fileName = xmlFileName + ".xml"; // 鏂囦欢鍚�
saveAs(blob, fileName);
}
//涓嬭浇鏂囦欢鍑芥暟
--
Gitblit v1.8.0