From 19e95f4acc328bbf62a0427fe658d00268019e66 Mon Sep 17 00:00:00 2001 From: zhaowc <526854230@qq.com> Date: 星期一, 07 四月 2025 10:14:34 +0800 Subject: [PATCH] 修改IIS配置 --- Pda/View/AsnSetting/productEnterQuantity.html | 882 ++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 553 insertions(+), 329 deletions(-) diff --git a/Pda/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html index cb06baa..ee6ef29 100644 --- a/Pda/View/AsnSetting/productEnterQuantity.html +++ b/Pda/View/AsnSetting/productEnterQuantity.html @@ -101,11 +101,6 @@ </ul> </div> - <!-- <ul> - <li id="option1">鏍囩</li> - <li id="option2">鏁伴噺</li> - </ul> --> - <button id="option1" class="layout-btn" type="button">鏍囩</button> <button id="option2" class="layout-btn" type="button">鏁伴噺</button> <br /><br /> @@ -114,7 +109,7 @@ <div id="content1"> <div id="zongDiv" class="layout-bill-info" style="height: 285px;"> <form class="layui-form" action=""> - <div id="" class="layui-form-item layout-dropdownlist"> + <!-- <div id="" class="layui-form-item layout-dropdownlist"> <label class="layui-form-label" lang>鍏ュ簱鍗曪細</label> <div class="layui-input-block" id="selectDiv"> <select id="bar" lay-filter="getbar" lay-search> @@ -122,7 +117,7 @@ </select> <img src="/assets/down_arraw.png"> </div> - </div> + </div> --> <div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;"> <label class="layui-form-label">鐗╂枡-鎵规锛�</label> <div class="layui-input-block" id="goodDiv"> @@ -143,8 +138,15 @@ <div id="BOX" class="layui-form-item layout-input"> <label class="layui-form-label" lang>澶栫鏉$爜锛�</label> <div class="layui-input-block"> - <input id="BOXCODE" type="text" lay-verify="required" lang langholder + <input id="BOXCODE" type="text" lang langholder placeholder="璇锋壂鎻忓绠辨潯鐮�" autocomplete="off" class="layui-input"> + </div> + </div> + <div id="BOX" class="layui-form-item layout-input"> + <label class="layui-form-label" lang>杩芥函鏉$爜锛�</label> + <div class="layui-input-block"> + <input id="BOXCODE3" type="text" lang langholder + placeholder="璇锋壂鎻忚拷婧潯鐮�" autocomplete="off" class="layui-input"> </div> </div> <div id="" class="layui-form-item layout-input"> @@ -250,7 +252,7 @@ </table> <!-- 鍒嗛〉 --> <table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding=""> - <tr > + <tr> <td class="page-prev">涓婁竴椤�</td> <td class="page-num page-num-select">1</td> <td class="page-num">2</td> @@ -267,7 +269,7 @@ <div id="content2"> <div id="zongDiv" class="layout-bill-info" style="height: 255px;"> <form class="layui-form" id="form2" action=""> - <div id="" class="layui-form-item layout-dropdownlist"> + <!-- <div id="" class="layui-form-item layout-dropdownlist"> <label class="layui-form-label" lang>鍏ュ簱鍗曪細</label> <div class="layui-input-block" id="selectDiv1"> <select id="bar1" lay-filter="getbar1" lay-search> @@ -275,7 +277,7 @@ </select> <img src="/assets/down_arraw.png"> </div> - </div> + </div> --> <div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;"> <label class="layui-form-label">鐗╂枡-鎵规锛�</label> <div class="layui-input-block" id="goodDiv1"> @@ -352,11 +354,12 @@ <div id="demodiv" class="layui-form-item layout-input" style="height: auto;"> <label class="layui-form-label">瀵勫瓨澶囨敞锛�</label> <div class="layui-input-inline" style="width: 365px;height: auto;"> - <textarea placeholder="璇疯緭鍏ュ唴瀹�" id="NoticeDemo" name="NoticeDemo" class="layui-textarea" ></textarea> + <textarea placeholder="璇疯緭鍏ュ唴瀹�" id="NoticeDemo" name="NoticeDemo" + class="layui-textarea"></textarea> </div> <br> </div> - + <table class="layout-tbl-submit" border="" cellspacing="" cellpadding=""> <tr> <td style="width: 23%;"></td> @@ -375,9 +378,9 @@ <br> <br> <div id="demodiv1"> - <br><br><br><br><br><br><br> + <br><br><br><!--<br><br><br><br> --> </div> - + <div id="" class="cut-line"> <img src="/assets/fengexian.png"> @@ -455,8 +458,8 @@ xianshiyemian = 1; $('#content1').hide(); $('#option1').attr("style", "background-color: #999;width: 50%;float: left;text-align: center;"); //榛樿棰滆壊 - - + + $('#content2').show(); $('#option2').attr("style", "background-color: red;width: 50%;float: right;text-align: center;"); //閫変腑鍚庨鑹� @@ -544,131 +547,154 @@ checkBoxInfo() } }); + //绠辩爜鍥炶溅浜嬩欢 + $("#BOXCODE3").keydown(function (e) { + if (e.keyCode === 13) { + if ($("#BOXCODE3").val() == "") { + layer.msg('璇峰厛鎵弿杩芥函鐮�', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + return + } + // if ($("#STOCKCODE").val() == "") { + // layer.msg('璇峰厛鎵弿鎵樼洏鐮�', { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }); + // $("#BOXCODE").val(""); + // $("#STOCKCODE").focus(); + // return; + // } + checkBoxInfo3() + } + }); /* 鍏ュ簱鍗曟嵁涓嬫媺妗� */ //鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠� - $("#selectDiv").click(function () { - if (xianshiyemian == 0) { - var input = $('select[id="bar"]').next().find('.layui-select-title input') - var val = input.val() - //鍏堟洿鏂颁竴涓嬪叆搴撳崟 - updateBillList(function (data) { - $('select[id="bar"]').next().addClass('layui-form-selected') - $('select[id="bar"]').next().find('.layui-select-title input').val(val) - }) - } - }) - //鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠� - $("#selectDiv1").click(function () { - if (xianshiyemian == 1) { - var input = $('select[id="bar1"]').next().find('.layui-select-title input') - var val = input.val() - //鍏堟洿鏂颁竴涓嬪叆搴撳崟 - updateBillList(function (data) { - $('select[id="bar1"]').next().addClass('layui-form-selected') - $('select[id="bar1"]').next().find('.layui-select-title input').val(val) - }) - } - }) + // $("#selectDiv").click(function () { + // if (xianshiyemian == 0) { + // var input = $('select[id="bar"]').next().find('.layui-select-title input') + // var val = input.val() + // //鍏堟洿鏂颁竴涓嬪叆搴撳崟 + // updateBillList(function (data) { + // $('select[id="bar"]').next().addClass('layui-form-selected') + // $('select[id="bar"]').next().find('.layui-select-title input').val(val) + // }) + // } + // }) + // //鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠� + // $("#selectDiv1").click(function () { + // if (xianshiyemian == 1) { + // var input = $('select[id="bar1"]').next().find('.layui-select-title input') + // var val = input.val() + // //鍏堟洿鏂颁竴涓嬪叆搴撳崟 + // updateBillList(function (data) { + // $('select[id="bar1"]').next().addClass('layui-form-selected') + // $('select[id="bar1"]').next().find('.layui-select-title input').val(val) + // }) + // } + // }) /*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/ /* 缁戝畾鍏ュ簱鍗曚俊鎭� */ - function updateBillList(callback) { - if (xianshiyemian == 0) { - var input = $('select[id="bar"]').next().find('.layui-select-title input') - var val = input.val() - $("#bar").empty() - $("#bar").append('<option value =>' + '</option>'); - form.render('select'); + // function updateBillList(callback) { + // if (xianshiyemian == 0) { + // var input = $('select[id="bar"]').next().find('.layui-select-title input') + // var val = input.val() + // $("#bar").empty() + // $("#bar").append('<option value =>' + '</option>'); + // form.render('select'); - var param = { - Type: "0,1,3" - }; - sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { - if (res.code == 0) { //鎴愬姛 - for (var i = 0; i < res.data.length; i++) { - $("#bar").append('<option value =' + res.data[i].ASNNo + '>' + res.data[i] - .ASNNo + - '</option>'); - } - form.render('select'); + // var param = { + // Type: "0" + // }; + // sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { + // if (res.code == 0) { //鎴愬姛 + // for (var i = 0; i < res.data.length; i++) { + // $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); + // } + // form.render('select'); - if (!val) { - $('#bar').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') - } else { - var sel = 'dd[lay-value=' + val + ']'; - $('#bar').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') - } + // if (!val) { + // $('#bar').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') + // } else { + // var sel = 'dd[lay-value=' + val + ']'; + // $('#bar').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') + // } - callback(res.data) - } else { //涓嶆垚鍔� - // layer.msg(res.msg, { - // icon: 2, - // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - // }, function() {}); - } - }); - } - else if (xianshiyemian == 1) { - var input = $('select[id="bar1"]').next().find('.layui-select-title input') - var val = input.val() - $("#bar1").empty() - $("#bar1").append('<option value =>' + '</option>'); - form.render('select'); + // callback(res.data) + // } else { //涓嶆垚鍔� + // // layer.msg(res.msg, { + // // icon: 2, + // // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // // }, function() {}); + // } + // }); + // } + // else if (xianshiyemian == 1) { + // var input = $('select[id="bar1"]').next().find('.layui-select-title input') + // var val = input.val() + // $("#bar1").empty() + // $("#bar1").append('<option value =>' + '</option>'); + // form.render('select'); - var param = { - Type: "2,5,6,7" - }; - sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { - if (res.code == 0) { //鎴愬姛 - for (var i = 0; i < res.data.length; i++) { - $("#bar1").append('<option value =' + res.data[i].ASNNo + '>' + res.data[i] - .ASNNo + - '</option>'); - } - form.render('select'); + // var param = { + // Type: "1" + // }; + // sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { + // if (res.code == 0) { //鎴愬姛 + // console.log(res.data); + // for (var i = 0; i < res.data.length; i++) { + // $("#bar1").append('<option value =' + res.data[i] + '>' + res.data[i] +'</option>'); + // } + // form.render('select'); - if (!val) { - $('#bar1').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') - } else { - var sel = 'dd[lay-value=' + val + ']'; - $('#bar1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') - } + // if (!val) { + // $('#bar1').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') + // } else { + // var sel = 'dd[lay-value=' + val + ']'; + // $('#bar1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') + // } - callback(res.data) - } else { //涓嶆垚鍔� - // layer.msg(res.msg, { - // icon: 2, - // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - // }, function() {}); - } - }); - } + // callback(res.data) + // } else { //涓嶆垚鍔� + // // layer.msg(res.msg, { + // // icon: 2, + // // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // // }, function() {}); + // } + // }); + // } - } + // } /*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/ //鐐瑰嚮鐗╂枡涓嬫媺妗嗕簨浠� $("#goodDiv").click(function () { - if ($("#bar").val() == null || $("#bar").val() == "" || $("#bar").val() == undefined) { - layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { }); - } + var input = $('select[id="goodSelect"]').next().find('.layui-select-title input') + var val = input.val() + //鍏堟洿鏂颁竴涓嬪叆搴撳崟 + updateGoodListNew(function (data) { + $('select[id="goodSelect"]').next().addClass('layui-form-selected') + $('select[id="goodSelect"]').next().find('.layui-select-title input').val(val) + }) + }) //鐐瑰嚮鐗╂枡涓嬫媺妗嗕簨浠�-鏁伴噺 $("#goodDiv1").click(function () { - if ($("#bar1").val() == null || $("#bar1").val() == "" || $("#bar1").val() == undefined) { - layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { }); - } + var input = $('select[id="goodSelect1"]').next().find('.layui-select-title input') + var val = input.val() + //鍏堟洿鏂颁竴涓嬪叆搴撳崟 + updateGoodListNew(function (data) { + $('select[id="goodSelect1"]').next().addClass('layui-form-selected') + $('select[id="goodSelect1"]').next().find('.layui-select-title input').val(val) + }) + }) //閫変腑鍏ュ簱鍗曚簨浠� form.on('select(getbar)', function (data) { @@ -695,13 +721,13 @@ form.on('submit(formBind)', function (data) { if (xianshiyemian == 0) { console.log($("#goodSelect").val()); - if ($("#bar").val() == "") { - layer.msg('璇烽�夋嫨鍏ュ簱鍗�', { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }); - return; - } + // if ($("#bar").val() == "") { + // layer.msg('璇烽�夋嫨鍏ュ簱鍗�', { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }); + // return; + // } if ($("#goodSelect").val() == "") { layer.msg('璇烽�夋嫨鐗╂枡鍙婃槑缁�', { icon: 2, @@ -716,23 +742,26 @@ }); return; } - if ($("#BOXCODE").val() == "") { - layer.msg('璇锋壂鎻忓绠辨潯鐮�', { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }); - return; - } + // if ($("#BOXCODE").val() == "") { + // layer.msg('璇锋壂鎻忓绠辨潯鐮�', { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }); + // return; + // } var param = { - AsnNo: $("#bar").val(), + AsnNo: $("#goodSelect").val(), PalletNo: $("#STOCKCODE").val(), - AsnDetailId: parseInt($("#goodSelect").val()), + //AsnDetailId: parseInt($("#goodSelect").val()), LotNo: $("#goodSelect").find("option:selected").text(), BoxNo: $("#BOXCODE").val(), + BoxNo01: $("#BOXCODE3").val(), IsContinue: isContinue, TailBoxNo: $("#BOXCODE2").val(), - Origin: "PDA" + Origin: "PDA", + TableType: xianshiyemian, } + console.log(param) //缁勭洏 sendData(IP + "/PdaAsn/BindPallet", param, 'post', function (res) { if (res.code == 0) { //鎴愬姛 @@ -757,13 +786,14 @@ }); } else if (xianshiyemian == 1) { - if ($("#bar1").val() == "") { - layer.msg('璇烽�夋嫨鍏ュ簱鍗�', { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }); - return; - } + // if ($("#bar1").val() == "") { + // layer.msg('璇烽�夋嫨鍏ュ簱鍗�', { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }); + // return; + // } + var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; if ($("#goodSelect1").val() == "") { layer.msg('璇烽�夋嫨鐗╂枡鍙婃槑缁�', { icon: 2, @@ -778,14 +808,22 @@ }); return; } + if (!reg.test($("#SkuQty").val())) { + layer.msg("鍏ュ簱鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + return -1; + } var param = { - AsnNo: $("#bar1").val(), //鍑哄簱鍗曟嵁 + AsnNo: $("#goodSelect1").val(), //鍑哄簱鍗曟嵁 PalletNo: $("#STOCKCODE1").val(), //鎵樼洏鏉$爜 - AsnDetailId: parseInt($("#goodSelect1").val()), //鍏ュ簱鍗曟槑缁咺D + //AsnDetailId: parseInt($("#goodSelect1").val()), //鍏ュ簱鍗曟槑缁咺D LotNo: $("#goodSelect1").find("option:selected").text(), //鐗╂枡鎵规 - SkuQty: parseInt($("#SkuQty").val()), //鐗╂枡鏁伴噺 + SkuQty: parseFloat($("#SkuQty").val()), //鐗╂枡鏁伴噺 Demo: $("#NoticeDemo").val(), //鐗╂枡鏁伴噺 - Origin: "PDA" + Origin: "PDA", + TableType: xianshiyemian, } console.log(param) @@ -824,21 +862,19 @@ synData(IP + "/PdaAsn/GetArrivalNotice", param, 'post', function (res) { console.log(res) if (res.code == 0 && res.data != null) { //鎴愬姛 - + //鍒ゆ柇榛樿閫変腑鏄惁涓哄瘎瀛樼墿鏂� - if(res.data[0].Type == "7") - { + if (res.data[0].Type == "7") { $("textarea[name='NoticeDemo']").val(res.data[0].Demo); //澶囨敞 $('#demodiv').show(); $('#demodiv1').show(); } - else - { + else { $('#demodiv').hide(); $('#demodiv1').hide(); } } - else{ + else { $('#demodiv').hide(); $('#demodiv1').hide(); } @@ -862,6 +898,7 @@ $("#ImportQuantity").val(res.data.Qty); $("#Standard").val(res.data.Standard); $("#ImportFactQuantity").val(res.data.FactQty + ""); + } }); } @@ -880,8 +917,20 @@ $("#ImportQuantity1").val(res.data.Qty); $("#Standard1").val(res.data.Standard); $("#ImportFactQuantity1").val(res.data.FactQty + ""); + if (res.data.SkuNo == "100088") { + $("textarea[name='NoticeDemo']").val(res.data.UDF5); //澶囨敞 + $('#demodiv').show(); + $('#demodiv1').show(); + }else{ + $('#demodiv').hide(); + $('#demodiv1').hide(); + + } } - else{} + else { + $('#demodiv').hide(); + $('#demodiv1').hide(); + } }); } @@ -890,9 +939,8 @@ var asnDetails = ""; /* 缁戝畾鍏ュ簱鍗曠墿鏂欏強鎵规 */ - function updateGoodList(skuNo) { + function updateGoodListNew(callback) { if (xianshiyemian == 0) { - console.log("aaaa"); var input = $('select[id="goodSelect"]').next().find('.layui-select-title input') var val = input.val() @@ -900,57 +948,51 @@ $("#goodSelect").append('<option value =>' + '</option>'); var param = { - AsnNo: $("#bar").val(), + Type: "0", }; - synData(IP + "/PdaAsn/GetBindArrivalNoticeDetails", param, 'post', function (res) { - console.log("鍑哄簱鍙o細" + JSON.stringify(res)) + synData(IP + "/PdaAsn/GetArrivalNoticesInfo", param, 'post', function (res) { + if (res.code == 0) { //鎴愬姛 asnDetails = res.data; + if (asnDetails.length <= 0) { + layer.msg('褰撳墠鏈煡璇㈠埌璐存爣鐗╂枡淇℃伅', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + return; + } for (var i = 0; i < res.data.length; i++) { - if (skuNo != '' && skuNo == res.data[i].SkuNo) { - if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { - $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] - .SkuName + - '</option>'); - } else { - $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] - .SkuName + "-" + res.data[i].LotNo + - '</option>'); - } + + if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { + $("#goodSelect").append('<option value =' + res.data[i].Id+'-'+res.data[i] + .SkuName + '>' + res.data[i].Id+'-'+res.data[i].SkuName + + '</option>'); } else { - if (i == 0) { - if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { - $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] - .SkuName + - '</option>'); - } else { - $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] - .SkuName + "-" + res.data[i].LotNo + - '</option>'); - } - - } else { - if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { - $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i] - .SkuName + - '</option>'); - } else { - $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i] - .SkuName + "-" + res.data[i].LotNo + - '</option>'); - } - } + $("#goodSelect").append('<option value =' + res.data[i].Id +'-'+ res.data[i] + .SkuName + "-" + res.data[i].LotNo + '>' +res.data[i].Id+'-'+ res.data[i] + .SkuName + "-" + res.data[i].LotNo + + '</option>'); } + } form.render('select'); if (!val) { + + console.log(val +"+1"); $('#goodSelect').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') } else { + + console.log(val +"+1"); var sel = 'dd[lay-value=' + val + ']'; $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') } + callback(res.data); } else { + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function() {}); } }); } @@ -963,54 +1005,191 @@ $("#goodSelect1").append('<option value =>' + '</option>'); var param = { - AsnNo: $("#bar1").val(), + Type: "1", }; - synData(IP + "/PdaAsn/GetArrivalNoticeDetails", param, 'post', function (res) { - console.log("鍑哄簱鍙o細" + JSON.stringify(res)) + synData(IP + "/PdaAsn/GetArrivalNoticesInfo", param, 'post', function (res) { + if (res.code == 0) { //鎴愬姛 asnDetails = res.data; + // console.log(asnDetails.length) + if (asnDetails.length <= 0) { + layer.msg('褰撳墠鍗曟嵁涓嬩笉瀛樺湪涓嶈创鏍囩墿鏂�', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + return; + } for (var i = 0; i < res.data.length; i++) { - if (skuNo != '' && skuNo == res.data[i].SkuNo) { - - if (i == 0) { - $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] - .SkuName); - } else { - $("#goodSelect1").append('<option value =' + res.data[i].Id + '>' + res.data[i] - .SkuName); - } - if (res.data[i].LotNo != null) { - $("#goodSelect1").append("-" + res.data[i].LotNo + - '</option>'); - } + + if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { + $("#goodSelect1").append('<option value =' + res.data[i].Id+'-'+res.data[i] + .SkuName + '>' + res.data[i].Id+'-'+res.data[i].SkuName + + '</option>'); } else { - if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { - $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] - .SkuName + - '</option>'); - } else { - $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] - .SkuName + "-" + res.data[i].LotNo + - '</option>'); - } + $("#goodSelect1").append('<option value =' + res.data[i].Id +'-'+ res.data[i] + .SkuName + "-" + res.data[i].LotNo + '>' +res.data[i].Id+'-'+ res.data[i] + .SkuName + "-" + res.data[i].LotNo + + '</option>'); } - + } form.render('select'); - if (!val) { $('#goodSelect1').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') } else { var sel = 'dd[lay-value=' + val + ']'; $('#goodSelect1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') } + callback(res.data); } else { - + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function() {}); } }); } } + + + // /* 缁戝畾鍏ュ簱鍗曠墿鏂欏強鎵规 */ + // function updateGoodList(skuNo) { + // if (xianshiyemian == 0) { + // console.log("aaaa"); + // var input = $('select[id="goodSelect"]').next().find('.layui-select-title input') + // var val = input.val() + + // $("#goodSelect").empty() + // $("#goodSelect").append('<option value =>' + '</option>'); + + // var param = { + // AsnNo: $("#bar").val(), + // }; + // synData(IP + "/PdaAsn/GetBindArrivalNoticeDetails", param, 'post', function (res) { + // console.log("鍑哄簱鍙o細" + JSON.stringify(res)) + // if (res.code == 0) { //鎴愬姛 + // asnDetails = res.data; + // if (asnDetails.length <= 0) { + // layer.msg('褰撳墠鍗曟嵁涓嬩笉瀛樺湪璐存爣鐗╂枡', { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }); + // return; + // } + // for (var i = 0; i < res.data.length; i++) { + // if (skuNo != '' && skuNo == res.data[i].SkuNo) { + // if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { + // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] + // .SkuName + + // '</option>'); + // } else { + // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] + // .SkuName + "-" + res.data[i].LotNo + + // '</option>'); + // } + // } else { + // if (i == 0) { + // if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { + // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] + // .SkuName + + // '</option>'); + // } else { + // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i] + // .SkuName + "-" + res.data[i].LotNo + + // '</option>'); + // } + + // } else { + // if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { + // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i] + // .SkuName + + // '</option>'); + // } else { + // $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i] + // .SkuName + "-" + res.data[i].LotNo + + // '</option>'); + // } + // } + // } + // } + // form.render('select'); + + // if (!val) { + // $('#goodSelect').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') + // } else { + // var sel = 'dd[lay-value=' + val + ']'; + // $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') + // } + // } else { + // } + // }); + // } + // else if (xianshiyemian == 1) { + // console.log("bbbb"); + // var input = $('select[id="goodSelect1"]').next().find('.layui-select-title input') + // var val = input.val() + + // $("#goodSelect1").empty() + // $("#goodSelect1").append('<option value =>' + '</option>'); + + // var param = { + // AsnNo: $("#bar1").val(), + // }; + // synData(IP + "/PdaAsn/GetArrivalNoticeDetails", param, 'post', function (res) { + // console.log("鍑哄簱鍙o細" + JSON.stringify(res)) + // if (res.code == 0) { //鎴愬姛 + // asnDetails = res.data; + // // console.log(asnDetails.length) + // if (asnDetails.length <= 0) { + // layer.msg('褰撳墠鍗曟嵁涓嬩笉瀛樺湪涓嶈创鏍囩墿鏂�', { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }); + // return; + // } + // for (var i = 0; i < res.data.length; i++) { + // if (skuNo != '' && skuNo == res.data[i].SkuNo) { + + // if (i == 0) { + // $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] + // .SkuName); + // } else { + // $("#goodSelect1").append('<option value =' + res.data[i].Id + '>' + res.data[i] + // .SkuName); + // } + // if (res.data[i].LotNo != null) { + // $("#goodSelect1").append("-" + res.data[i].LotNo + + // '</option>'); + // } + // } else { + // if (res.data[i].LotNo == '' || res.data[i].LotNo == null) { + // $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] + // .SkuName + + // '</option>'); + // } else { + // $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] + // .SkuName + "-" + res.data[i].LotNo + + // '</option>'); + // } + // } + + // } + // form.render('select'); + + // if (!val) { + // $('#goodSelect1').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this') + // } else { + // var sel = 'dd[lay-value=' + val + ']'; + // $('#goodSelect1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') + // } + // } else { + + // } + // }); + // } + + // } // 娓叉煋绠辩爜淇℃伅 function refreshTable() { @@ -1142,6 +1321,7 @@ yes: function () { var param = { + Id: parseInt(Id), PalletNo: res.data[0].PalletNo, }; console.log(Id) @@ -1232,6 +1412,7 @@ function checkBoxInfo() { var param = { "BoxNo": $("#BOXCODE").val(), + "AsnNo":$("#goodSelect").val(), } sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) { if (res.code == 0) { //鎴愬姛 @@ -1243,24 +1424,24 @@ }); return; } - if (res.data[0].ASNNo != '' && res.data[0].ASNNo != null) { - $("#bar").empty() - $("#bar").append('<option value =>' + '</option>'); - form.render('select'); + // 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>'); + // $("#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; - } - } + // // updateGoodList(res.data[0].SkuNo) + // setOrderGoods(); + // } else { + // if (asnDetails == '') { + // layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗曟嵁!", { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }); + // return; + // } + // } asnDetails.forEach(element => { console.log(element); @@ -1289,103 +1470,146 @@ } + function checkBoxInfo3() { + var param = { + "BoxNo3": $("#BOXCODE3").val(), + "AsnNo":$("#goodSelect").val(), + } + sendData(IP + "/PdaAsn/GetBindBoxInfo2s", param, 'post', function (res) { + if (res.code == 0) { //鎴愬姛 + var bl = false; + if (res.data.length == 0) { + 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 { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + } + }); + + } /* 鍒嗛〉 */ //璁剧疆鍒嗛〉 function setPages(pageIndex, boxNum) { - if (boxNum <= 0) { - //鍒楄〃涓虹┖锛岄殣钘忓垎椤甸〉鐮� - $("#tableBoxPages").hide() - return - } + if (boxNum <= 0) { + //鍒楄〃涓虹┖锛岄殣钘忓垎椤甸〉鐮� + $("#tableBoxPages").hide() + return + } - let pageNum = Math.floor(boxNum / 10); - if (boxNum % 10 > 0) { - pageNum += 1; - } - //console.log("pageNum is " + pageNum) + let pageNum = Math.floor(boxNum / 10); + if (boxNum % 10 > 0) { + pageNum += 1; + } + //console.log("pageNum is " + pageNum) - $("#tableBoxPages").find("tr").remove() - let table = $("#tableBoxPages") - $("<tr></tr>").appendTo("#tableBoxPages") + $("#tableBoxPages").find("tr").remove() + let table = $("#tableBoxPages") + $("<tr></tr>").appendTo("#tableBoxPages") - // let newTr = table.append("<tr></tr>") - // newTr.append("<td class='page-prev'>涓婁竴椤�</td>") - $("<td id='prevPage' class='page-prev'>涓婁竴椤�</td>").appendTo("#tableBoxPages tr") - $("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function () { - onClickPrevPage() - }) - for (i = 1; i < pageNum + 1; i++) { - // newTr.append("<td class='page-num'>"+ i +"</td>") - $("<td class='page-num'>" + i + "</td>").appendTo("#tableBoxPages tr") - } - // newTr.append("<td class='page-next'>涓嬩竴椤�</td>") - $("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages tr") - $("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function () { - onClickNextPage() - }) - // pages.show() - $("#tableBoxPages").show() + // let newTr = table.append("<tr></tr>") + // newTr.append("<td class='page-prev'>涓婁竴椤�</td>") + $("<td id='prevPage' class='page-prev'>涓婁竴椤�</td>").appendTo("#tableBoxPages tr") + $("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function () { + onClickPrevPage() + }) + for (i = 1; i < pageNum + 1; i++) { + // newTr.append("<td class='page-num'>"+ i +"</td>") + $("<td class='page-num'>" + i + "</td>").appendTo("#tableBoxPages tr") + } + // newTr.append("<td class='page-next'>涓嬩竴椤�</td>") + $("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages tr") + $("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function () { + onClickNextPage() + }) + // pages.show() + $("#tableBoxPages").show() - setCurPage(1) - } + setCurPage(1) + } - //璁剧疆褰撳墠鍒嗛〉 - function setCurPage(pageIndex) { - let totalTrNum = $("#tableBoxList tr").length - if (totalTrNum <= 2) { - //console.log("tableBoxList 涓虹┖ totalTrNum: " + totalTrNum) - //curPageIndex = 1 - return - } + //璁剧疆褰撳墠鍒嗛〉 + function setCurPage(pageIndex) { + let totalTrNum = $("#tableBoxList tr").length + if (totalTrNum <= 2) { + //console.log("tableBoxList 涓虹┖ totalTrNum: " + totalTrNum) + //curPageIndex = 1 + return + } - let pageNum = getBoxPageNum() - if (pageIndex > pageNum) { - //console.log("璁剧疆鐨勯〉鐮佽秴鍑洪〉鏁�, pageIndex : " + pageIndex) - //curPageIndex = 1 - return - } + let pageNum = getBoxPageNum() + if (pageIndex > pageNum) { + //console.log("璁剧疆鐨勯〉鐮佽秴鍑洪〉鏁�, pageIndex : " + pageIndex) + //curPageIndex = 1 + return + } - let startIndex = (pageIndex - 1) * 10 + 1 - let n = totalTrNum - startIndex - let endIndex = 0 - if (n > 9) { - endIndex = startIndex + 9 - } else { - endIndex = startIndex + n - } - //console.log("startIndex is "+startIndex) - //console.log("endIndex is "+endIndex) - //startIndex =2 - //endIndex = 2 - let trs = $("#tableBoxList tr") - //console.log("琛屾暟 "+trs.length) - let d = 0 - for (let i = 2; i < trs.length; i++) { - //console.log("琛岀储寮� " + trs.eq(i).attr('index')) - let t = trs.eq(i) - d = t.attr('index') - if (d >= startIndex && d <= endIndex) { - //console.log("闇�瑕佹樉绀�") - //鏄剧ず琛� - t.show() - } else { - //闅愯棌琛� - t.hide() - } - } + let startIndex = (pageIndex - 1) * 10 + 1 + let n = totalTrNum - startIndex + let endIndex = 0 + if (n > 9) { + endIndex = startIndex + 9 + } else { + endIndex = startIndex + n + } + //console.log("startIndex is "+startIndex) + //console.log("endIndex is "+endIndex) + //startIndex =2 + //endIndex = 2 + let trs = $("#tableBoxList tr") + //console.log("琛屾暟 "+trs.length) + let d = 0 + for (let i = 2; i < trs.length; i++) { + //console.log("琛岀储寮� " + trs.eq(i).attr('index')) + let t = trs.eq(i) + d = t.attr('index') + if (d >= startIndex && d <= endIndex) { + //console.log("闇�瑕佹樉绀�") + //鏄剧ず琛� + t.show() + } else { + //闅愯棌琛� + t.hide() + } + } - curPageIndex = pageIndex + curPageIndex = pageIndex - let ptr = $("#tableBoxPages tr") - for (let i = 1; i < pageNum + 1; i++) { - ptr.eq(0).find("td").eq(i).removeClass("page-num-select") - if (i == curPageIndex) { - ptr.eq(0).find("td").eq(i).addClass("page-num-select") - } - } - //console.log("totalTrNum is " + totalTrNum) - } + let ptr = $("#tableBoxPages tr") + for (let i = 1; i < pageNum + 1; i++) { + ptr.eq(0).find("td").eq(i).removeClass("page-num-select") + if (i == curPageIndex) { + ptr.eq(0).find("td").eq(i).addClass("page-num-select") + } + } + //console.log("totalTrNum is " + totalTrNum) + } function onClickPrevPage() { //console.log("涓婁竴椤垫寜閽鐐瑰嚮") @@ -1398,24 +1622,24 @@ function onClickNextPage() { //console.log("涓嬩竴椤垫寜閽鐐瑰嚮") let n = getBoxPageNum() - if (curPageIndex == n-1) { + if (curPageIndex == n - 1) { return } setCurPage(curPageIndex + 1) } function getBoxPageNum() { - let num = $("#tableBoxList tr").length - if (num <= 2) { - return 0 - } + let num = $("#tableBoxList tr").length + if (num <= 2) { + return 0 + } - let pageNum = Math.floor(num / 10); - if (num % 10 > 0) { - pageNum += 1; - } + let pageNum = Math.floor(num / 10); + if (num % 10 > 0) { + pageNum += 1; + } - return pageNum - } + return pageNum + } /*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/ -- Gitblit v1.8.0