From f2dc0484c97dc430279fe45a09a15c967a60a2b9 Mon Sep 17 00:00:00 2001 From: Administrator <Administrator@DESKTOP-5BIMHQ3> Date: 星期三, 13 三月 2024 11:16:23 +0800 Subject: [PATCH] PDA平库入库增加维护货主信息;入库完成增加维护供应商信息; --- HTML/views/ASNSetting/LabelPrint.html | 128 +++++++++++++++--------------------------- 1 files changed, 46 insertions(+), 82 deletions(-) diff --git a/HTML/views/ASNSetting/LabelPrint.html b/HTML/views/ASNSetting/LabelPrint.html index 0dc83e6..2519584 100644 --- a/HTML/views/ASNSetting/LabelPrint.html +++ b/HTML/views/ASNSetting/LabelPrint.html @@ -112,89 +112,61 @@ var laydate = layui.laydate; var id = getQueryString('Id'); - var reset = getQueryString('Reset'); + var reset = getQueryString('IsReset'); var arriveQty = getQueryString('ArriveQty'); var productionTime = getQueryString('ProductionTime'); var expirationTime = getQueryString('ExpirationTime'); var storeTime = getQueryString('StoreTime'); - console.log(productionTime); - console.log(expirationTime); - console.log(storeTime); + var doing = true; + // console.log(productionTime); + // console.log(expirationTime); + // console.log(storeTime); //鐢熸垚 $('#btnAdd').on('click', function () { - var param = { - Id: parseInt(id), - IsReset:reset, - ArriveQty:arriveQty, - ProductionTime:productionTime, - ExpirationTime:expirationTime, - StoreTime:storeTime - }; - console.log(param); - synData(IP + "/BllAsn/AddLabelBox", param , 'post', function (res) { - if (res.code == 0) { //鎴愬姛 - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { - parent.location.reload(); - parent.layer.close(layer.index); - }); - - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { }); - } - }); + if(doing){ + doing= false; + + + var param = { + Id: parseInt(id), + IsReset:reset, + ArriveQty:arriveQty, + ProductionTime:productionTime, + ExpirationTime:expirationTime, + StoreTime:storeTime + }; + // console.log(param); + synData(IP + "/BllAsn/AddLabelBox", param , 'post', function (res) { + if (res.code == 0) { //鎴愬姛 + layer.msg(res.msg, { + icon: 1, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + parent.location.reload(); + parent.layer.close(layer.index); + doing = true; + }); + + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + doing = true; + }); + } + }); + } }); //鎵撳嵃 $('#btnPrint').on('click', function () { var param = { ImportId: id, }; - if ($("#ProductionDate").val() == "" || $("#ProductionDate").val() == undefined || $("#ProductionDate").val() == null) { - layer.msg("鐢熶骇鏃ユ湡涓嶈兘涓虹┖", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { return; }); - } - if ($("#SupplierName").val() == "" || $("#SupplierName").val() == undefined || $("#SupplierName").val() == null) { - layer.msg("鐢熶骇鍘傚涓嶈兘涓虹┖", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { return; }); - } - if ($("#SupplierLot").val() == "" || $("#SupplierLot").val() == undefined || $("#SupplierLot").val() == null) { - console.log($("#SupplierLot").val()) - layer.msg("鍘傚鎵瑰彿涓嶈兘涓虹┖", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { return; }); - } - - if ($('#number').val() > 0) { - - if ($('#bQNum').val() > 0) { - div($('#number').val(), $('input[name="isprint"]:checked').val(), $('#bQNum').val()); - } else { - div($('#number').val(), $('input[name="isprint"]:checked').val(), 0); - } - - } - else { - - if ($('#bQNum').val() >= 0) { - div(0, $('input[name="isprint"]:checked').val(), $('#bQNum').val()); - } else { - div(0, $('input[name="isprint"]:checked').val(), 0); - } - - } + }); if (!id) { @@ -222,20 +194,13 @@ }, function () { }); } }); - - // div(-1, 1, 0); + } - - // 寰幆鍔犺浇鏍囩 - function div(number, isprint, bqNum) { - GetImportId(number, isprint, bqNum); - } - - // 鏍囩鍙橀噺璧嬪�� - function GetImportId(i, isprint, bqNum) { - + // 鍔犺浇鏍囩 + function div(i, isprint, bqNum) { + var param1 = { isprint: isprint, ImportId: id, @@ -350,9 +315,8 @@ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }, function () { }); } - }); - }; - + }); + } // 鑾峰彇浼犻�掑弬鏁� function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); -- Gitblit v1.8.0