From c47dec91c838a2d6ed99f8e057e6e95ffbe77ced Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 31 十二月 2024 15:55:44 +0800
Subject: [PATCH] 模具添加列设置和按钮设置

---
 WebTM/views/工资管理/核算方式/Gy_ClassTimePrjSubBillList.html |   35 ++++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 deletions(-)

diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\346\240\270\347\256\227\346\226\271\345\274\217/Gy_ClassTimePrjSubBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\346\240\270\347\256\227\346\226\271\345\274\217/Gy_ClassTimePrjSubBillList.html"
index 8e22a8a..11c17c4 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\346\240\270\347\256\227\346\226\271\345\274\217/Gy_ClassTimePrjSubBillList.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\346\240\270\347\256\227\346\226\271\345\274\217/Gy_ClassTimePrjSubBillList.html"
@@ -146,6 +146,8 @@
                     , height: 'full-50'
                     , page: true
                     , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
                     , cols: [[
                         { type: 'checkbox', fixed: 'left' }
                         , { field: 'HInterID', title: 'HInterID', sort: true, hide: true }
@@ -178,7 +180,7 @@
                 $.ajax({
                     url: GetWEBURL() + '/Gy_ClassTimePrjSub/list',
                     type: "GET",
-                    data: { "sWhere": sWhere },
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                     success: function (data1) {
                         if (data1.count == 1) {
                             option.data = data1.data;
@@ -230,11 +232,34 @@
                     , title: '鏍哥畻璁板綍-鏂板'
                     , shift: 0//寮瑰嚭鍔ㄧ敾
                     , content: '../鏍哥畻鏂瑰紡/Gy_ClassTimePrjSubBillEdit.html?OperationType=1&linterid=&HSouceBillType='
+                    , end: function () {
+                        //鍒锋柊椤甸潰,
+                        location.reload();
+                    }
                 })
             }
             //#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 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+                layui.each(table.cache.mainTable, function (i, l) {
+                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+                        l.LAY_CHECKED = flag;
+                    }
+                });
+            })
+            //#endregion
 
             //#region 缂栬緫
             function set_ShowBill() {
@@ -249,6 +274,10 @@
                         , title: '鏍哥畻璁板綍-缂栬緫'
                         , shift: 0//寮瑰嚭鍔ㄧ敾
                         , content: '../鏍哥畻鏂瑰紡/Gy_ClassTimePrjSubBillEdit.html?OperationType=3&linterid=' + HInterID + '&HSouceBillType='
+                        , end: function () {
+                            //鍒锋柊椤甸潰,
+                            location.reload();
+                        }
                     })
                 } else {
                     layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
@@ -268,7 +297,7 @@
                         $.ajax({
                             url: GetWEBURL() + 'DeltetGy_ClassTimePrjSub',
                             type: "GET",
-                            data: { "HItemID": ItemID },
+                            data: { "HItemID": ItemID, "user": sessionStorage["HUserName"] },
                             success: function (result) {
                                 if (result.count == 1) {
                                     layer.msg(result.Message, { icon: 1 }, function () {

--
Gitblit v1.9.1