From 3c1c8a3f7b697de8ea8d3185054a28f15f3c56b2 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期三, 27 十二月 2023 13:41:36 +0800
Subject: [PATCH] 1

---
 WebTM/views/生产管理/产量汇报单/Sc_ProductReportBillList.html |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
index a3a37b6..b568186 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/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 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉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: '浜у搧浠g爜', 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: '鐢熶骇璧勬簮浠g爜', width: 200 }
                         , { field: 'HSourceName', title: '鐢熶骇璧勬簮', width: 200 }

--
Gitblit v1.9.1