From 721108fc1336d8ca022971836106027d5f776d36 Mon Sep 17 00:00:00 2001 From: yuyou_x <2336760928@qq.com> Date: 星期一, 11 三月 2024 13:28:11 +0800 Subject: [PATCH] 调整pda标签样式 --- Pda/View/AsnSetting/productEnter.html | 99 ++++++++++++++++++++++++++++++++----------------- 1 files changed, 65 insertions(+), 34 deletions(-) diff --git a/Pda/View/AsnSetting/productEnter.html b/Pda/View/AsnSetting/productEnter.html index dc003fb..4f60afb 100644 --- a/Pda/View/AsnSetting/productEnter.html +++ b/Pda/View/AsnSetting/productEnter.html @@ -46,7 +46,7 @@ </ul> </div> - <div id="zongDiv" class="layout-bill-info" style="height: 255px;"> + <div id="zongDiv" class="layout-bill-info" style="height: 285px;"> <form class="layui-form" action=""> <div id="" class="layui-form-item layout-dropdownlist"> <label class="layui-form-label" lang>鍏ュ簱鍗曪細</label> @@ -179,7 +179,7 @@ </div> <table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding=""> <tr> - <th lang style="width: 15%;">缂栫爜</th> + <th lang style="width: 15%;">绠辩爜</th> <th lang style="width: 35%;">鍚嶇О</th> <th lang style="width: 25%;">鎵规</th> <th lang style="width: 15%;">鏁伴噺</th> @@ -214,15 +214,16 @@ //褰撳墠鍒嗛〉 var curPageIndex = 1; - //鏄惁杩炵画缁勬墭 + //鏄惁杩炵画澶栫缁勬墭 isContinue = "0"; //娓呮鏂囨湰妗嗕腑鏁版嵁 - function clear() { + function clear() { + $("#BOXCODE").val(""); + $("#BOXCODE2").val(""); + $("#ImportQuantity").val(""); - $("#GoodsCode").val(""); $("#Standard").val(""); $("#ImportFactQuantity").val(""); - $("#ImportQty").val(""); $("#BoxQty").val(""); } @@ -245,15 +246,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() } }); @@ -281,12 +282,14 @@ //閫変腑鍏ュ簱鍗曚簨浠� form.on('select(getbar)', function (data) { + clear(); updateGoodList() setOrderGoods(); }); //閫変腑鐗╂枡浜嬩欢 form.on('select(goodSelect)', function (data) { + clear(); setOrderGoods(); }); @@ -386,7 +389,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) { //鎴愬姛 @@ -417,8 +420,7 @@ var asnDetails = ""; // 缁戝畾鍏ュ簱鍗曠墿鏂欏強鎵规 - function updateGoodList() { - console.log("aaaa"); + function updateGoodList(skuNo) { var input = $('select[id="goodSelect"]').next().find('.layui-select-title input') var val = input.val() @@ -433,16 +435,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'); @@ -501,11 +508,11 @@ time: 0, //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 btn: ['鍒犻櫎', '鍙栨秷'], yes: function () { - + console.log(Id); var param = { - Id: Id, + boxNo: res.data[i].BoxNo, }; - sendData(IP + "/PdaAsn/DelBoxInfo", param, 'post', function (res) { + sendData(IP + "/BllAsn/DelBindBoxInfo", param, 'get', function (res) { if (res.code == 0) { //鎴愬姛 layer.msg(res.msg, { icon: 1, @@ -564,15 +571,33 @@ var param = { "BoxNo": $("#BOXCODE").val(), } - sendData(IP + "/PdaAsn/GetBoxInfos", param, 'post', function (res) { + 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, 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); @@ -605,13 +630,19 @@ form.on('switch(IsLianXu)', function (obj) { if (obj.elem.checked) { $('#BOX2').attr("style", "display:block") - $('#zongDiv').attr("style", "height: 285px;") - isContinue = "1"; + $('#zongDiv').attr("style", "height: 305px;") + isContinue = "1"; + + $('.BOX01').attr("style", "display:none") + $('.BOX02').attr("style", "display:none") + } else { $('#BOX2').attr("style", "display:none") - $('#zongDiv').attr("style", "height: 255px;") + $('#zongDiv').attr("style", "height: 285px;") isContinue = "0"; - } + + $('.BOX01').attr("style", "display:block"); + } $('#BOXCODE2').val(""); }); -- Gitblit v1.8.0