zrg
2024-11-28 727ee25aeb5fcaf84e2cf009b2eacd3a86bcb3ca
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Gy_SplitBarCode.html
@@ -237,6 +237,26 @@
                    return true;
                }
            }
            //#region ç‚¹å‡»è¡Œé€‰ä¸­é«˜äº®
            table.on('row(mainTable)', function (obj) {
                //选中行改变颜色
                var flag = !obj.tr.find(':checkbox:first').prop('checked');
                obj.tr.find(':checkbox').prop('checked', flag);
                if (flag) {
                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //设置复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//改变当前tr背景颜色和字体颜色
                } else {
                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//取消复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:" });//取消当前tr颜色
                }
                //mainTable ä¸ºè¡¨æ ¼ID   æ³¨æ„æ­¤å¤„如果ID不正确将导致你在监听复选框时获取不到你选择的数据,前面的只是添加或删除选中未选中样式以及设置背景色,字体颜色
                layui.each(table.cache.mainTable, function (i, l) {
                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
                        l.LAY_CHECKED = flag;
                    }
                });
            })
            //#endregion
            //#region ç¡®å®šæŒ‰é’®
            form.on('submit(ToolSure)', function (data) {//
@@ -306,8 +326,8 @@
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 75 }                  
                    , { field: 'HBarCode', title: '条码编号', width: 200 }
                    , { field: 'HQty', title: '条码数量', width: 200 }
                    , { field: 'HSplitNum', title: '拆分数量', width: 200, edit: 'text' }
                    , { field: 'HQty', title: '条码数量', width: 200, totalRow: true }
                    , { field: 'HSplitNum', title: '拆分数量', width: 200, edit: 'text', totalRow: true }
                    , { field: 'HNumber', title: '物料代码', width: 200 }
                    , { field: 'HName', title: '物料名称', width: 200 }
                    , { field: 'HModel', title: '规格型号', width: 200 }
@@ -319,6 +339,7 @@
                    , elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: false
                    , totalRow: true
                    , cellMinWidth: 75
                    , height: 'full-255'
                    , cols: [columns]
@@ -337,8 +358,8 @@
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 75 }
                    , { field: 'HBarCode', title: '条码编号', width: 200 }
                    , { field: 'HQty', title: '条码数量', width: 200 }
                    , { field: 'HSplitNum', title: '拆分数量', width: 200, edit: 'text' }
                    , { field: 'HQty', title: '条码数量', width: 200, totalRow: true}
                    , { field: 'HSplitNum', title: '拆分数量', width: 200, edit: 'text', totalRow: true}
                    , { field: 'HNumber', title: '物料代码', width: 200 }
                    , { field: 'HName', title: '物料名称', width: 200 }
                    , { field: 'HModel', title: '规格型号', width: 200 }
@@ -351,6 +372,7 @@
                    , elem: '#mainTable_New'
                    , toolbar: '#toolbarDemo_New'                    
                    , page: false
                    , totalRow: true
                    , cellMinWidth: 75
                    , height: 'full-255'
                    , cols: [columns]