Demo
2024-03-13 cbf4a8f42cd0d7e4ff994ee7f9b9e9c33b9c39c8
Pda/View/SoSetting/SampleOut.html
@@ -549,8 +549,9 @@
         var form = layui.form;
         /* 标签切换代码 */
         var xianshiyemian = 0;
            /* 标签切换代码 */
         var sampleType = "";  //0 库内取样; 1 库前取样
            
            $('#kuneilabel').hide();
            $('#kuqianlabel').hide();
@@ -655,6 +656,17 @@
                                    $('#kuneilabel').show();
                                    $('#kuneiQty').show();
                                    $('#kuqianlabel').hide();
                                    updateBillList();
                                    if ($('#bar').val() == "") {
                                        clear1();
                                        return;
                                    } else {
                                        updateSkuLotNoList();
                                        updateQtyList();
                                        getBar();
                                        GetBoxInfo();
                                    }
                                    sampleType = 0;
                                }
                                if (res.data == "1") {//库前取样
                                    $('#kuqianlabel').show();
@@ -662,17 +674,10 @@
                                    $('#kuneiQty').hide();
                                    
                                    updateAsnBillList();
                                    GetBoxInfo();
                                    sampleType = 1;
                                }
                                // updateBillList();
                                // if ($('#bar').val() == "") {
                                //     clear1();
                                //     return;
                                // } else {
                                //     updateSkuLotNoList();
                                //     updateQtyList();
                                //     getBar();
                                //     GetBoxInfo();
                                // }
                            }else { //不成功
                                layer.msg(res.msg, {
                                    icon: 2,
@@ -941,6 +946,7 @@
         //单拣货(确认按钮)
         form.on('submit(formPickScatter)', function (data) {
                if (sampleType == "0") {
            if ($('#bar').val() == "") {
               layer.msg("请选择出库单", {
                  icon: 2,
@@ -988,15 +994,19 @@
                  return;
               }
            }            
            // let boxQty = parseInt($('#boxQty').val())
            // let qty = parseInt($('#qty').val())
            // if (qty <= 0 || qty > boxQty) {
            //    layer.msg("拣货数量需大于0,并且不能超过待拣箱内数量", {
            //       icon: 2,
            //       time: 2000 //2秒关闭(如果不配置,默认是3秒)
            //    });
            //    return;
            // }
                }
                else if (sampleType == "1") {
                }
                else {
                    layer.msg("类型错误,请刷新页面重试", {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    });
                    return;
                }
            if (canPickBox == false) {