From 2a9bf520f65e85777fff0f20f4c84ba9a810eef5 Mon Sep 17 00:00:00 2001 From: yyk <2336760928@qq.com> Date: 星期四, 29 八月 2024 13:54:46 +0800 Subject: [PATCH] Merge branch 'yyk' --- Pda/View/AsnSetting/productEnterQuantity.html | 92 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 84 insertions(+), 8 deletions(-) diff --git a/Pda/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html index 18a62b3..f72aa08 100644 --- a/Pda/View/AsnSetting/productEnterQuantity.html +++ b/Pda/View/AsnSetting/productEnterQuantity.html @@ -86,7 +86,7 @@ <table border="" cellspacing="" cellpadding=""> <tr> <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg"></a></td> - <td class="title-text" lang>鎵樼洏缁戝畾</td> + <td class="title-text" lang>缁勬墭鏀惰揣</td> <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg"></td> </tr> </table> @@ -297,12 +297,25 @@ <div id="" class="layui-form-item layout-input"> <label class="layui-form-label" lang>鐗╂枡鏁伴噺锛�</label> <div class="layui-input-block"> - <input id="SkuQty" type="number" lay-verify="stock" lang langholder placeholder="璇疯緭鍏ョ墿鏂欐暟閲�" - autocomplete="off" class="layui-input" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"> + <input id="SkuQty" type="number" lay-verify="stock" lang langholder + placeholder="璇疯緭鍏ョ墿鏂欐暟閲�" autocomplete="off" class="layui-input" + oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"> </div> </div> <table class="layout-tbl-input" border="" cellspacing="" cellpadding=""> + <tr> + <td> + <div id="" class="layui-form-item layout-boxinfo"> + <label class="layui-form-label" lang>鏁存墭鏁伴噺锛�</label> + <div class="layui-input-block"> + <input id="FullQty" type="text" disabled placeholder="" autocomplete="off" + class="layui-input"> + </div> + </div> + </td> + <td></td> + </tr> <tr> <td> <div id="" class="layui-form-item layout-boxinfo"> @@ -855,7 +868,7 @@ $("#Standard").val(""); $("#ImportFactQuantity").val(""); $("#BoxQty").val(""); - // $("#STOCKCODE").val(""); + //$("#FullQty").val("123"); // $("#BOXCODE").val(""); var param = { @@ -872,9 +885,11 @@ }); } else if (xianshiyemian == 1) { + // 鏁伴噺 $("#ImportQuantity1").val(""); $("#Standard1").val(""); $("#ImportFactQuantity1").val(""); + $("#FullQty").val(""); var param = { Id: parseInt($("#goodSelect1").val()) @@ -886,6 +901,7 @@ $("#ImportQuantity1").val(res.data.Qty); $("#Standard1").val(res.data.Standard); $("#ImportFactQuantity1").val(res.data.FactQty + ""); + $("#FullQty").val(res.data.UDF1); } else { } }); @@ -1257,6 +1273,68 @@ sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) { BoxLevelVal = "0"; if (res.code == 0) { //鎴愬姛 + //鍒ゆ柇鏄惁涓洪浂绠盉itBoxMark + if (res.data[0].BitBoxMark == '1') { + getFMBoxinfo(); + } else { + var bl = false; + if (res.data.length == 0) { + layer.msg("鏈煡璇㈠埌姝ょ鐗╂枡淇℃伅锛岃鏍稿疄!", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + return; + } + + if (res.data[0].ASNNo != '' && res.data[0].ASNNo != null) { + $("#bar").empty() + $("#bar").append('<option value =>' + '</option>'); + form.render('select'); + + $("#bar").append('<option value =' + res.data[0].ASNNo + ' selected>' + res.data[0].ASNNo + '</option>'); + + updateGoodList(res.data[0].SkuNo) + setOrderGoods(); + } else { + if (asnDetails == '') { + layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗曟嵁!", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + return; + } + } + asnDetails.forEach(element => { + console.log(element); + + if (element.SkuNo == res.data[0].SkuNo && element.LotNo == res.data[0].LotNo) { + var sel = 'dd[lay-value=' + element.id + ']'; + $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this'); + bl = true; + } + }); + if (!bl) { + layer.msg("姝ょ鐗╂枡涓嶇鍚堣鍏ュ簱鍗曪紝璇锋牳瀹�!", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + } else { + $("#BoxQty").val(res.data[0].Qty); + } + } + } else { //涓嶆垚鍔� + //绠辩爜涓嶅瓨鍦紝璋冪敤璧嬬爜鎺ュ彛鑾峰彇绠变俊鎭� + getFMBoxinfo(); + } + }); + + } + function getFMBoxinfo(){ + var param = { + "BoxNo": $("#BOXCODE").val(), + } + sendData(IP + "/UpApi/GetFMBindBoxInfos", param, 'post', function (res) { + if (res.code == 0) { //鎴愬姛//鏍规嵁瀵规帴鎺ュ彛瀹氫箟鍚勫瓧娈靛垽鏂潯浠� var bl = false; if (res.data.length == 0) { layer.msg("鏈煡璇㈠埌姝ょ鐗╂枡淇℃伅锛岃鏍稿疄!", { @@ -1301,15 +1379,13 @@ } else { $("#BoxQty").val(res.data[0].Qty); } - - } else { //涓嶆垚鍔� + } else { layer.msg(res.msg, { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }); } - }); - + }) } -- Gitblit v1.8.0