From 182a035f1864e149b6ad8582b45a0957ab28b6a3 Mon Sep 17 00:00:00 2001 From: Administrator <Administrator@DESKTOP-5BIMHQ3> Date: 星期五, 02 二月 2024 11:29:35 +0800 Subject: [PATCH] PDA组托功能开发 --- Pda/View/AsnSetting/productEnter.html | 76 ++++++++++++++++++++++++++----------- 1 files changed, 53 insertions(+), 23 deletions(-) diff --git a/Pda/View/AsnSetting/productEnter.html b/Pda/View/AsnSetting/productEnter.html index f4c2b73..65c4bb9 100644 --- a/Pda/View/AsnSetting/productEnter.html +++ b/Pda/View/AsnSetting/productEnter.html @@ -241,12 +241,15 @@ //鏄惁杩炵画浜岀骇鐮佺粍鎵� isContinue2 = "0"; //娓呮鏂囨湰妗嗕腑鏁版嵁 - function clear() { + function clear() { + $("#BOXCODE").val(""); + $("#BOXCODE2").val(""); + $("#BOXCODE01").val(""); + $("#BOXCODE02").val(""); + $("#ImportQuantity").val(""); - $("#GoodsCode").val(""); $("#Standard").val(""); $("#ImportFactQuantity").val(""); - $("#ImportQty").val(""); $("#BoxQty").val(""); } @@ -269,15 +272,15 @@ return } - if ($("#STOCKCODE").val() == "") { - layer.msg('璇峰厛鎵弿鎵樼洏鐮�', { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }); - $("#BOXCODE").val(""); - $("#STOCKCODE").focus(); - return; - } + // if ($("#STOCKCODE").val() == "") { + // layer.msg('璇峰厛鎵弿鎵樼洏鐮�', { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }); + // $("#BOXCODE").val(""); + // $("#STOCKCODE").focus(); + // return; + // } checkBoxInfo() } }); @@ -305,12 +308,14 @@ //閫変腑鍏ュ簱鍗曚簨浠� form.on('select(getbar)', function (data) { + clear(); updateGoodList() setOrderGoods(); }); //閫変腑鐗╂枡浜嬩欢 form.on('select(goodSelect)', function (data) { + clear(); setOrderGoods(); }); @@ -353,6 +358,9 @@ BoxNo: $("#BOXCODE").val(), IsContinue: isContinue, TailBoxNo: $("#BOXCODE2").val(), + BoxNo01:$("#BOXCODE01").val(), + IsContinue2:isContinue2, + TailBoxNo01:$("#BOXCODE02").val(), Origin:"PDA" } //缁勭洏 @@ -410,7 +418,7 @@ form.render('select'); var param = { - Type: "0,1" + Type: "0,1,2,3,4,5,6" }; sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { if (res.code == 0) { //鎴愬姛 @@ -441,7 +449,7 @@ var asnDetails = ""; // 缁戝畾鍏ュ簱鍗曠墿鏂欏強鎵规 - function updateGoodList() { + function updateGoodList(skuNo) { console.log("aaaa"); var input = $('select[id="goodSelect"]').next().find('.layui-select-title input') var val = input.val() @@ -457,16 +465,21 @@ if (res.code == 0) { //鎴愬姛 asnDetails = res.data; for (var i = 0; i < res.data.length; i++) { - if (i == 0) { + if(skuNo!='' && skuNo==res.data[i].SkuNo){ $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] .SkuName + "-" + res.data[i].LotNo + '</option>'); - } else { - $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i] - .SkuName + "-" + res.data[i].LotNo + - '</option>'); - } - + }else{ + if (i == 0) { + $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] + .SkuName + "-" + res.data[i].LotNo + + '</option>'); + } else { + $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i] + .SkuName + "-" + res.data[i].LotNo + + '</option>'); + } + } } form.render('select'); @@ -586,12 +599,11 @@ function checkBoxInfo() { var param = { - "ASNNo":$("#bar").val(), "BoxNo": $("#BOXCODE").val(), } sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) { if (res.code == 0) { //鎴愬姛 - var bl = false; console.log(res.data); + var bl = false; if (res.data.length == 0) { layer.msg("鏈煡璇㈠埌姝ょ鐗╂枡淇℃伅锛岃鏍稿疄!", { icon: 2, @@ -599,6 +611,24 @@ }); 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); -- Gitblit v1.8.0