1
zrg
2024-06-24 87c39697d9f0bf17ac97e241158f43c64e23e117
WebTM/views/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Gy_BarCodeBill.html
@@ -213,7 +213,7 @@
            var sWhere = "";
            var sBillType = "3801";
            var HModName = "Gy_BarCodeBill";
            var titleData = ["物料ID", "源单主内码", "源单子内码", "辅助属性ID", "计量单位ID", "客户ID", "HItemID", "hmainid", "hsubid", "HinterID", "车间ID", "供应商ID","HSTOCKORGID"];//不需要显示的字段 å¯æ‰©å±•
            var titleData = ["物料ID", "源单主内码", "源单子内码", "辅助属性ID", "计量单位ID", "客户ID", "HItemID", "hmainid", "hsubid", "HinterID", "车间ID", "供应商ID", "HSTOCKORGID","操作员ID","班组ID"];//不需要显示的字段 å¯æ‰©å±•
            var HMaterID = "";
            var HBatchNo = "";
@@ -223,7 +223,7 @@
            var HMaterInfo = "";  //存储物料信息
            var HBarInfo = ""; //存储条码信息
            var HFileList = "";  //存储档案列表
            //#endregion
            //#endregion
            //监听当前处于哪一个页签,传 HModName å€¼
            element.on('tab(tab-TabTest)', function (data) {
@@ -236,7 +236,7 @@
                    table.reload('mainTable', {
                        data: HMaterInfo // è°ƒç”¨table.reload é‡æ–°æ¸²æŸ“显示加载追加了数据的表格
                    });
                } else if (cur_title == "条码信息") {
                    HModName = "Gy_BarCodeBill_1";
                    //刷新表格数据
@@ -251,7 +251,7 @@
                    //加载档案列表
                    table.reload('mainTable2', {
                        data: HFileList // è°ƒç”¨table.reload é‡æ–°æ¸²æŸ“显示加载追加了数据的表格
                    });
                    });
                }
            })
@@ -263,11 +263,11 @@
            //加载工厂代码数据
            set_HWorksNumber();
            //加载条码类型数据
            set_HBarCodeType();
            set_HBarCodeType();
            var rowdata = [{
                "HMaterID": 0, "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HBQty": 0, "HMinQty": 0, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
                "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0
                "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0, "HEmpID": 0, "HEmpNumber": "", "HEmpName": "", "HGroupID": 0, "HGroupNumber": "", "HGroupName": "","HMTONo": ""
            }];
            //初始化表格
            set_InitGrid();
@@ -288,19 +288,19 @@
            else {
                layer.alert("未知操作类型!", { icon: 5 });
            }
            //#endregion
            //#endregion
            //#region ç‚¹å‡»äº‹ä»¶ï¼ŒåŒ…括on和form事件
            //头工具栏
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
                var AddRow = table.cache['mainTable'];
                var AddRow = table.cache['mainTable'];
                var NewRow = {
                    "HMaterID": 0, "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HBQty": 0, "HMinQty": 0, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
                    "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0
                };
                    "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0, "HEmpID": 0, "HEmpNumber": "", "HEmpName": "", "HGroupID": 0, "HGroupNumber": "", "HGroupName": "", "HMTONo": ""
                };
                //console.log(NewRow);
                switch (obj.event) {
                    //新增一行
@@ -398,8 +398,7 @@
                                HBQty: 0,                                      //箱数=数量/最小包装数量
                            });
                        }
                        else
                        {
                        else {
                            //同步更新表格和缓存对应的值
                            obj.update({
                                HQty: value,                                   //数量
@@ -411,7 +410,7 @@
                        value = isNaN(value) ? 0 : value;
                        HMinQty2 = value;   //给批次按钮功能中的最小包装数赋值
                        var HQty = isNaN(data.HQty) ? 0 : data.HQty;
                        if (HQty == 0) //除数为0
                        if (HQty == 0) //除数为0
                        {
                            //同步更新表格和缓存对应的值
                            obj.update({
@@ -426,7 +425,7 @@
                                HBQty: Math.ceil(HQty / value),                //箱数=数量/最小包装数量
                            });
                        }
                        break;
                    default:
                }
@@ -490,7 +489,7 @@
                    title: '' + getSupType() + '列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['95%', '80%'],
                    area: ['95%', '95%'],
                    maxmin: true,
                    content: [url, 'yes'],
                    btn: ['确定', '取消']
@@ -533,16 +532,17 @@
                                    HBatchNo = result.list[0].HBatchNo;
                                    if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                        for (let i = 0; i < result.list.length; i++) {
                                            result.list[i].HQty = result.list[i].HQty.toString().match(/^\d+(?:\.\d{0,6})?/)[0]  //保留小数点后六位小数
                                            result.list[i].HQty = result.list[i].HQty.toString().match(/^\d+(?:\.\d{0,6})?/)[0]  //保留小数点后六位小数
                                            if (result.list[i].HMinQty != 0) {
                                                result.list[i].HBQty = Math.ceil(result.list[i].HQty / result.list[i].HMinQty)
                                            }
                                                result.list[i].HBQty = Math.ceil(result.list[i].HQty / result.list[i].HMinQty)
                                            }
                                        }
                                        BatchNoArray = result.list;  //获取批号,用来给批次按钮功能中的批号赋值
                                        //for (let i = 0; i < result.list.length; i++) {
                                        //    result.list[i].HMinQty = '';//点击单元格的时候默认值0不会清除,客户看了会觉得很怪,所以先用空字符串取代;
                                        //}
                                        console.log(result.list[0]);
                                        table.reload('mainTable', {
                                            data: result.list // è°ƒç”¨table.reload é‡æ–°æ¸²æŸ“显示加载追加了数据的表格
                                        });
@@ -600,8 +600,7 @@
                var HOrgType = $("#HOrgID").find("option:selected").html();
                //获取选择的工厂代码
                var CampanyName = $("#HWorksNumber").find("option:selected").html();
                if (CampanyName == "" || CampanyName == null)
                {
                if (CampanyName == "" || CampanyName == null) {
                    CampanyName = "xxx";
                }
                //获取选择的源单类型
@@ -617,7 +616,7 @@
            //重置
            form.on('submit(ToolReset)', function (data) {
                layer.confirm('确定要清空当前界面信息,重置界面?',{
                layer.confirm('确定要清空当前界面信息,重置界面?', {
                    btn: ['确定', '取消'],
                    title: "提示",
                    icon: 3,
@@ -627,7 +626,7 @@
                    $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); //单据日期
                    $("#HSourceBillType").val('1'); //选择下拉框默认第一个选项
                    $("#HBarCodeType").val('0');
                    var arr = [{ HBillNo: '', HMaterNumber: '', HMaterName: '', HMaterModel: '', HAuxPropNumber: '', HAuxPropName: '', HUnitNumber: '', HUnitName: '', HBatchNo: '', HGiveAwayFlag: '0', HQty: '0', HMinQty: '0', HPackQty: '0', HBQty: '0', HDate: '', HCusNumber: '', HCusName: '', HSeOrderBillNo: '', HRemark: '' }]
                        var arr = [{ HBillNo: '', HMaterNumber: '', HMaterName: '', HMaterModel: '', HAuxPropNumber: '', HAuxPropName: '', HUnitNumber: '', HUnitName: '', HBatchNo: '', HGiveAwayFlag: '0', HQty: '0', HMinQty: '0', HPackQty: '0', HBQty: '0', HDate: '', HCusNumber: '', HCusName: '', HSeOrderBillNo: '', HRemark: '', HEmpID: 0, HEmpNumber: '', HEmpName: '', HGroupID: 0, HGroupNumber: '', HGroupName: '', HMTONo: ''}]
                    table.reload('mainTable', {
                        data: arr // è°ƒç”¨table.reload é‡æ–°æ¸²æŸ“显示加载追加了数据的表格
                    });
@@ -635,6 +634,7 @@
                        "HBarCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HAuxPropNumber": "", "HAuxPropName": ""
                        , "HGiveAwayFlag": "", "HUnitCode": "", "HUnitName": "", "HQty": 0, "HDate": "", "HCusNumber": "", "HCusName": ""
                        , "HSourceBillNo": "", "HSeOrderBillNo": "", "HRemark": "", "HMTONo": "", "HShowDate": "", "HInnerBillNo": "", "HMaker": ""
                        , "HEmpID": 0, "HEmpNumber": "", "HEmpName": "", "HGroupID": 0, "HGroupNumber": "", "HGroupName": "", "HMTONo": ""
                    }]
                    table.reload('mainTable1', {
                        data: arr1 // è°ƒç”¨table.reload é‡æ–°æ¸²æŸ“显示加载追加了数据的表格
@@ -646,7 +646,7 @@
                    table.reload('mainTable2', {
                        data: [] // è°ƒç”¨table.reload é‡æ–°æ¸²æŸ“显示加载追加了数据的表格
                    });
                        layer.close(index)
                    layer.close(index)
                })
            })
@@ -670,7 +670,7 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        var arr = [{ HBillNo: '', HMaterNumber: checkStatus.data[0].物料代码, HMaterName: checkStatus.data[0].物料名称, HMaterModel: '', HAuxPropNumber: '', HAuxPropName: '', HUnitNumber: checkStatus.data[0].计量单位代码, HUnitName: checkStatus.data[0].计量单位, HBatchNo: '', HGiveAwayFlag: '0', HQty: checkStatus.data[0].数量.toString("#0.00"), HMinQty: checkStatus.data[0].最小包装数, HPackQty: '0', HBQty: '0', HDate: '', HCusNumber: '', HCusName: '', HSeOrderBillNo: '', HRemark: '' }]
                        var arr = [{ HBillNo: '', HMaterNumber: checkStatus.data[0].物料代码, HMaterName: checkStatus.data[0].物料名称, HMaterModel: '', HAuxPropNumber: '', HAuxPropName: '', HUnitNumber: checkStatus.data[0].计量单位代码, HUnitName: checkStatus.data[0].计量单位, HBatchNo: '', HGiveAwayFlag: '0', HQty: checkStatus.data[0].数量.toString("#0.00"), HMinQty: checkStatus.data[0].最小包装数, HPackQty: '0', HBQty: '0', HDate: '', HCusNumber: '', HCusName: '', HSeOrderBillNo: '', HRemark: '', HEmpID: 0, HEmpNumber: '', HEmpName: '', HGroupID: 0, HGroupNumber: '', HGroupName: '', HMTONo: '' }]
                        //同步更新表格和缓存对应的值
                        table.reload('mainTable', {
                            data: arr // è°ƒç”¨table.reload é‡æ–°æ¸²æŸ“显示加载追加了数据的表格
@@ -696,7 +696,7 @@
                    success: function (data1) {
                        if (data1.code == 1) {
                            layer.alert(data1.Message)
                        }
                        }
                    }, error: function () {
                        layer.close(index);
                        layer.alert(data1.Message, { icon: 5 });
@@ -826,22 +826,28 @@
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 75 }
                    , { field: 'HMainID', title: '源单主内码',  width: 100, hide: true }
                    , { field: 'HSubID', title: '源单子内码',  width: 100, hide: true }
                    , { field: 'HMainID', title: '源单主内码', width: 100, hide: true }
                    , { field: 'HSubID', title: '源单子内码', width: 100, hide: true }
                    , { field: 'HBillNo', title: '源单单号', width: 200 }
                    , { field: 'HMaterID', title: '物料ID',  width: 100, hide: true }
                    , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
                    , { field: 'HMaterNumber', title: '物料代码', edit: 'text', event: 'HMaterNumber', width: 200 }
                    , { field: 'HMaterName', title: '物料名称',  width: 200 }
                    , { field: 'HMaterName', title: '物料名称', width: 200 }
                    , { field: 'HMaterModel', title: '规格型号', width: 200 }
                    , { field: 'HEmpID', title: '操作员ID', width: 100, hide: true }
                    , { field: 'HEmpNumber', title: '操作员代码', edit: 'text', width: 200, event: 'HEmpNumber'}
                    , { field: 'HEmpName', title: '操作员', width: 200 }
                    , { field: 'HGroupID', title: '班组ID', width: 100, hide: true }
                    , { field: 'HGroupNumber', title: '班组代码', edit: 'text', width: 200, event: 'HGroupNumber' }
                    , { field: 'HGroupName', title: '班组名称', width: 200 }
                    , { field: 'HBatchNo', title: '批号', edit: 'text', width: 100 }
                    , { field: 'HQty', title: '数量', edit: 'text', width: 100, totalRow: true}
                    , { field: 'HQty', title: '数量', edit: 'text', width: 100, totalRow: true }
                    , { field: 'HMinQty', title: '最小包装数', edit: 'text', totalRow: true, width: 100 }
                    , { field: 'HBQty', title: '箱数', width: 100, totalRow: true }
                    , { field: 'HPackQty', title: '外箱数', edit: 'text', width: 100, totalRow: true}
                    , { field: 'HPackQty', title: '外箱数', edit: 'text', width: 100, totalRow: true }
                    , { field: 'HCoilNO', title: '钢卷捆包号', edit: 'text', width: 100 }
                    , { field: 'HFurnaceNO', title: '炉号', edit: 'text', width: 100 }
                    , { field: 'HFactory', title: '厂商', edit: 'text', width: 100 }
                    , { field: 'HCusID', title: '客户ID',  width: 100, hide: true }
                    , { field: 'HCusID', title: '客户ID', width: 100, hide: true }
                    , { field: 'HCusNumber', title: '客户代码', edit: 'text', event: 'HCusNumber', width: 120 }
                    , { field: 'HCusName', title: '客户名称', width: 120 }
                    , { field: 'HSeOrderBillNo', title: '销售订单号', width: 200 }
@@ -849,16 +855,17 @@
                    , { field: 'HProduceDate', title: '生产日期', event: 'HProduceDate', width: 100 }
                    , { field: 'HExpiryDate', title: '保质期至', event: 'HExpiryDate', width: 100 }
                    , { field: 'HheatNO', title: '热处理', edit: 'text', width: 100 }
                    , { field: 'HAuxPropID', title: '辅助属性ID',  width: 100, hide: true }
                    , { field: 'HAuxPropID', title: '辅助属性ID', width: 100, hide: true }
                    , { field: 'HAuxPropNumber', title: '辅助属性代码', edit: 'text', event: 'HAuxPropNumber', width: 100 }
                    , { field: 'HAuxPropName', title: '辅助属性名称',  width: 100 }
                    , { field: 'HAuxPropName', title: '辅助属性名称', width: 100 }
                    , { field: 'HUnitID', title: '计量单位ID', width: 100, hide: true }
                    , { field: 'HUnitNumber', title: '计量单位代码', edit: 'text', event: 'HUnitNumber', width: 100 }
                    , { field: 'HUnitName', title: '计量单位',width: 100 }
                    , { field: 'HUnitName', title: '计量单位', width: 100 }
                    , { field: 'HAuxQty', title: '辅单位数量', edit: 'text', width: 100, totalRow: true }
                    , { field: 'HExpirationDateFlag', title: '是否启用保质期', width: 100, templet: '#switchTp3', unresize: false }
                    , { field: 'HGiveAwayFlag', title: '是否赠品', width: 100, templet: '#switchTpl', unresize: false }
                    , { field: 'HDate', title: '进料日期',  width: 100 }
                    , { field: 'HDate', title: '进料日期', width: 100 }
                    , { field: 'HMTONo', title: '计划跟踪号', width: 100, hide: true }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ];
                option = {
@@ -875,7 +882,7 @@
                    }
                };
                option.data = rowdata;
                table.render(option);
                table.render(option);
            }
            //初始条码信息表格
            function set_CountGrid() {
@@ -906,7 +913,7 @@
                option1 = {
                    id: 'mainTable1'
                    , elem: '#mainTable1'
                    , toolbar: '#toolbarDemo1'
                    , toolbar: '#toolbarDemo1'
                    , page: false
                    , limit: 500
                    , cellMinWidth: 120
@@ -975,7 +982,7 @@
                option2 = {
                    id: 'mainTable2'
                    , elem: '#mainTable2'
                    , toolbar: '#toolbarDemo2'
                    , toolbar: '#toolbarDemo2'
                    , page: false
                    , limit: 500
                    , cellMinWidth: 120
@@ -992,7 +999,7 @@
                    , "HAuxPropID": 0, "HAuxPropNumber": "", "HAuxPropName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HBatchNo": "", "HGiveAwayFlag": 0
                    , "HQty": 0, "HMinQty": '', "HBQty": 0, "HPackQty": 0, "HDate": "", "HCusID": 0, "HCusNumber": "", "HCusName": "", "HSeOrderBillNo": "", "HRemark": ""
                    , "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
                    "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0
                    "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0, "HEmpID": 0, "HEmpNumber": "", "HEmpName": "", "HGroupID": 0, "HGroupNumber": "", "HGroupName": "", "HMTONo": ""
                }];
                table.render(option);
                //刷新表格数据
@@ -1006,7 +1013,7 @@
                    "HBarCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HAuxPropNumber": "", "HAuxPropName": ""
                    , "HGiveAwayFlag": "", "HUnitCode": "", "HUnitName": "", "HQty": 0, "HDate": "", "HCusNumber": "", "HCusName": ""
                    , "HSourceBillNo": "", "HSeOrderBillNo": "", "HRemark": "", "HMTONo": "", "HShowDate": "", "HInnerBillNo": "", "HMaker": ""
                    , "HExpirationDateFlag": 0
                    , "HExpirationDateFlag": 0, "HEmpID": 0, "HEmpNumber": "", "HEmpName": "", "HGroupID": 0, "HGroupNumber": "", "HGroupName": ""
                }];
                table.render(option1);
                //刷新表格数据
@@ -1092,7 +1099,7 @@
                        colName += option2.cols[0][i]["title"] + ",";
                    }
                }
                var contentUrl = "";
                var urlStr = window.document.location.pathname;//获取文件路径
                var urlLen = urlStr.split('/');
@@ -1142,12 +1149,14 @@
                            var dataCol = [];//数据库查询出的列数据
                            dataCol = data1.data[0].HGridString.split(',');
                            for (var i = 0; i < option.cols[0].length - 2; i++) {
                                var dataCols = dataCol[i].split('|');
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;
@@ -1408,8 +1417,8 @@
            function set_GridCellCheck(obj) {
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        //模具信息  å¦‚果在模具代码列 æŒ‰F7
                        if (obj.event === 'HMaterNumber')  //模具信息  å¦‚果在模具代码列 æŒ‰F7
                        //物料信息  å¦‚果在物料代码列 æŒ‰F7
                        if (obj.event === 'HMaterNumber')  //物料信息  å¦‚果在模具代码列 æŒ‰F7
                        {
                            //页面层-自定义  //F7选择模具
                            layer.open({
@@ -1583,6 +1592,88 @@
                                }
                            });
                        }
                        //操作员代码
                        if (obj.event === 'HEmpNumber')  //操作员代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '操作员列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HEmpID: checkStatus.data[0].HItemID,
                                        HEmpNumber: checkStatus.data[0].职员代码,
                                        HEmpName: checkStatus.data[0].职员名称,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        //班组代码
                        if (obj.event === 'HGroupNumber')  //班组代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '班组列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../基础资料/工资基础资料/Gy_Group.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HGroupID: checkStatus.data[0].HItemID,
                                        HGroupNumber: checkStatus.data[0].班组代码,
                                        HGroupName: checkStatus.data[0].班组名称,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        obj.event = "";
                        return false;
                    }
@@ -1610,12 +1701,12 @@
                                });
                                HBarInfo = result.list;
                                //生成成功跳转到条码信息标签页
                                element.tabChange('tab-TabTest', '3');
                                element.tabChange('tab-TabTest', '3');
                                //加载档案列表
                                table.reload('mainTable2', {
                                    data: result.data // è°ƒç”¨table.reload é‡æ–°æ¸²æŸ“显示加载追加了数据的表格
                                });
                                HFileList = result.data;
                                HFileList = result.data;
                            }
                            else {
                                $('#ToolCreate').removeClass("layui-btn-disabled").attr("disabled", false);//生成按钮启用
@@ -1635,7 +1726,7 @@
                    , dataArr = checkStatus.data;
                //由于条码信息列表中没有 HItemID å­—段,所以采取了用 æ¡ç ç¼–号 åŽ»èŽ·å– HItemID çš„æ–¹å¼
                if (checkStatus.data.length>0) {
                if (checkStatus.data.length > 0) {
                    var rows = [];
                    for (var i = 0; i < dataArr.length; i++) {
                        rows.push(dataArr[i].HItemID.toString());