Administrator
2024-02-02 182a035f1864e149b6ad8582b45a0957ab28b6a3
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);