1
yxj
2023-12-27 3c1c8a3f7b697de8ea8d3185054a28f15f3c56b2
WebTM/views/Éú²ú¹ÜÀí/²úÁ¿»ã±¨µ¥/Sc_ProductReportBillList.html
@@ -184,6 +184,25 @@
            //#endregion
            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;
                    }
                });
            })
            //#region æœ¬é¡µé¢æ‰€æœ‰è¢«è°ƒç”¨çš„æ–¹æ³•
            //初始化表格
@@ -193,9 +212,12 @@
                    elem: '#mainTable'
                    , height: 'full-50'
                    , page: true
                    , limit:500
                    , totalRow: true
                    , limits: [100, 500, 1000, 2000]
                    , cellMinWidth: 90
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        { type: 'checkbox', fixed: 'left', totalRowText: '合计' }
                        , { field: 'HInterID', title: 'HInterID', sort: true, hide: true, width: 200 }
                        , { field: 'HDate', title: '日期', width: 200, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: 'HBillNo', title: '单据号', width: 200 }
@@ -212,7 +234,7 @@
                        , { field: 'HMaterCode', title: '产品代码', width: 200 }
                        , { field: 'HMaterName', title: '产品名称', width: 200 }
                        , { field: 'HMaterSpec', title: '产品规格', width: 200 }
                        , { field: 'HQty', title: '汇报数量', width: 200 }
                        , { field: 'HQty', title: '汇报数量', width: 200, totalRow: true }
                        , { field: 'HSourceID', title: '生产资源ID', width: 200, hide: true }
                        , { field: 'HSourceCode', title: '生产资源代码', width: 200 }
                        , { field: 'HSourceName', title: '生产资源', width: 200 }