From 26356a0e6472be4620651adceddda0e38c78fffa Mon Sep 17 00:00:00 2001 From: chengsc <Demo@DESKTOP-CPA90BF> Date: 星期四, 17 十月 2024 18:09:50 +0800 Subject: [PATCH] 修改问题 --- Pda/View/AsnSetting/productEnterQuantity.html | 498 ++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 306 insertions(+), 192 deletions(-) diff --git a/Pda/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html index 6550d26..fb2dc0b 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"> @@ -267,7 +262,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 +270,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"> @@ -548,125 +543,129 @@ /* 鍏ュ簱鍗曟嵁涓嬫媺妗� */ //鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠� - $("#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" - }; - 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'); + // 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: "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'); + // 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) { @@ -693,13 +692,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, @@ -722,9 +721,9 @@ 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(), IsContinue: isContinue, @@ -757,13 +756,13 @@ }); } 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; + // } if ($("#goodSelect1").val() == "") { layer.msg('璇烽�夋嫨鐗╂枡鍙婃槑缁�', { icon: 2, @@ -779,9 +778,9 @@ return; } 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()), //鐗╂枡鏁伴噺 Demo: $("#NoticeDemo").val(), //鐗╂枡鏁伴噺 @@ -889,9 +888,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() @@ -899,64 +897,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('褰撳墠鍗曟嵁涓嬩笉瀛樺湪璐存爣鐗╂枡', { + 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() {}); } }); } @@ -969,10 +954,10 @@ $("#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) @@ -984,47 +969,176 @@ 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() { @@ -1266,7 +1380,7 @@ $("#bar").append('<option value =' + res.data[0].ASNNo + ' selected>' + res.data[0].ASNNo + '</option>'); - updateGoodList(res.data[0].SkuNo) + // updateGoodList(res.data[0].SkuNo) setOrderGoods(); } else { if (asnDetails == '') { -- Gitblit v1.8.0