yangle
2024-10-28 0b7bd8cd736cc7c0182fcf0e46ca0cb0fa3cb00f
包装混箱功能
1个文件已修改
39 ■■■■■ 已修改文件
WebTM/views/车间管理/产线/MES_ProductionLinePackaging.html 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/³µ¼ä¹ÜÀí/²úÏß/MES_ProductionLinePackaging.html
@@ -102,6 +102,12 @@
                                        <input type="text" style="border-radius: 50px;width: 140%;" name="子件条码" id="SubBarcode" autocomplete="off" placeholder="请输入子件条码" class="layui-input">
                                    </div>
                                </div>
                                <div class="">
                                    <label class="layui-inline" style="width:60px;">是否混箱</label>
                                    <div class="layui-inline">
                                        <input type="checkbox" id="HMixedBox" name="HMixedBox" lay-skin="primary" value="" lay-filter="HMixedBox">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div class="">
@@ -441,6 +447,7 @@
                            return util.toDateString(time, "yyyy-MM-dd");
                        }
                    }
                    //, { field: 'HBarCode_Pack', title: '条形码', width: 145 }
                    , { field: 'HSourceBillNo', title: '条形码', width: 145 }
                    , { field: 'HBillNo', title: '源单单号', width: 125 }
                    , { field: 'HBarCode', title: '唯一码', width: 125 }
@@ -526,7 +533,7 @@
                        return;
                    }
                    //判断装箱数量不能大于剩余数量
                    if (zxQty > icmoQtyNow) {
                    if (zxQty > icmoQtyNow && $("#HMixedBox").val()=="") {
                        playSound();
                        layer.msg("装箱数量不允许大于流转卡剩余数量!剩余数量为" + icmoQtyNow, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        return;
@@ -584,6 +591,24 @@
                    }
                }
            });
            form.on('checkbox(HMixedBox)', function (obj) {
                if (icmoQtyNow == 0) {
                    playSound();
                    layer.msg("剩余数量为" + icmoQtyNow + ",不允许混箱!", { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                    $("input[name='HMixedBox']").prop("checked", false);
                    form.render('checkbox');
                    return;
                }
                if (obj.value == "") {
                    $("#HMixedBox").val("1");
                } else {
                    $("#HMixedBox").val("");
                }
            });
            //子件条码回车方法
            $('#SubBarcode').on('keydown', function (event) {   //扫条形码
@@ -688,7 +713,7 @@
                        url: GetWEBURL() + "/LEMS/SNBarcodeProcCtrl",
                        type: "GET",
                        async: false,
                        data: { "SubBarcode": SubBarcode, "HProcExchBillNo": HProcExchBillNo },
                        data: { "SubBarcode": SubBarcode, "HProcExchBillNo": HProcExchBillNo, "HMixedBox": $("#HMixedBox").val(), "HBillNo": HBillNo2 },
                        success: function (result) {
                            if (result.count == 0) {
                                a = 1;
@@ -728,6 +753,12 @@
                                        if (AllHqty >= icmoQty) {
                                            playSound();
                                            layer.alert("包装数量已等于流转卡数量!不允许扫码!", { icon: 1 });
                                            return;
                                        } else {
                                            //判断装箱数量不能大于剩余数量
                                            if (AllHqty > icmoQtyNow && $("#HMixedBox").val() == "") {
                                                playSound();
                                                layer.msg("装箱数量不允许大于流转卡剩余数量!剩余数量为" + icmoQtyNow, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                                            return;
                                        } else {
                                            $.ajax({//表体存temp表
@@ -810,6 +841,7 @@
                                                    layer.alert("子件条码方法发生错误!", { icon: 5 });
                                                }
                                            });
                                            }
                                        }
                                    }, error: function () {
                                        playSound();
@@ -994,6 +1026,9 @@
                    //清空扫描记录的装箱数量
                    zxQtyFlag = 0;
                    pcmQtyFlag = 0;
                    $("#HMixedBox").val("");
                    $("input[name='HMixedBox']").prop("checked", false);
                    form.render('checkbox');
                    //获取单据号
                    getBillno();
                    //扫描条码