1
yusijie
2024-02-21 79e949df349d586658623061068dc9adac1f5b87
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Kf_POStockInBillList.html
@@ -222,11 +222,12 @@
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , totalRow: true
                    , done: function (res, curr, count) {
                        soulTable.render(this);
                    }
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        { type: 'checkbox', fixed: 'left', totalRowText: '合计行' }
                       ,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true }
                        , { field: '日期', title: '日期', width: 160, sort: true }
                        , { field: '单据号', title: '单据号', width: 160, sort: true }
@@ -247,9 +248,9 @@
                        , { field: 'hunitid', title: 'hunitid', width: 200, hide: true, sort: true }
                        , { field: '计量单位代码', title: '计量单位代码', width: 200, sort: true }
                        , { field: '计量单位', title: '计量单位', width: 200, sort: true }
                        , { field: '数量', title: '数量', width: 200, sort: true }
                        , { field: '数量', title: '数量', width: 200, sort: true, totalRow: true}
                        , { field: '单价', title: '单价', width: 200, sort: true }
                        , { field: '金额', title: '金额', width: 200, sort: true }
                        , { field: '金额', title: '金额', width: 200, sort: true, totalRow: true}
                        , { field: 'hwhid', title: 'hwhid', width: 200, hide: true, sort: true }
                        , { field: 'HWHID', title: 'HWHID', hide: true, sort: true }
                        , { field: '收料仓库代码', title: '收料仓库代码', width: 150, sort: true }
@@ -519,6 +520,29 @@
                get_Display(sWhere);
            }
            //#endregion
            //#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
            //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')