From 7df042662e1929abdd667cfd7b037f4e10e8c2ad Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 14 三月 2024 11:27:56 +0800
Subject: [PATCH] 其他应付单 增加子表保存,目录放到采购管理,其他入库单编辑模块 并完善 其他出库单 列表功能;( 常规 功能, 新增,修改,删除,审核,作废,关闭,自定义过滤,源单类型列表(源单 手工录入), 合计行,保存控制,审核控制,删除控制,关联数回填 等等 ) (注: 基础资料选择, 均用 基础资料列表 的方式)

---
 WebTM/views/设备管理/Sb_EquipMaintainBillList.html |   61 +++++++++++++++++++++++++-----
 1 files changed, 51 insertions(+), 10 deletions(-)

diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html"
index 7d4ccc3..fc2ae16 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html"
@@ -11,6 +11,7 @@
     <script src="../../layuiadmin/layui/layui.js"></script>
     <script src="../../layuiadmin/HideButton.js"></script>
     <script src="../../../layuiadmin/soulTable.slim.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
 
     <style type="text/css">
         input.layui-input.layui-unselect {
@@ -192,6 +193,13 @@
             var option1 = [];
             var option2 = [];
             var HModName = "Sb_EquipMaintainBillList";
+
+            //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            var HModuleType = "3901";
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
+        //#endregion
+
             var titleData = ["hmainid", "鍗曟嵁绫诲瀷", "琛ㄥご澶囨敞", "閰嶄欢浠g爜", "hsubid", "琛屽叧闂汉", "琛ㄤ綋澶囨敞", "鍒跺崟浜�", "淇敼浜�", "浣滃簾鏃ユ湡", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "HEquipID", "鍐呴儴鍗曟嵁鍙�", "HMaterID", "鍗曚綅ID", "璐熻矗浜篒D", "HBillType"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
             //#region 銆愯繃婊ゆ柟妗堛��
 
@@ -334,11 +342,12 @@
                     , toolbar: '#toolbarDemo'
                     , height: '400'
                     , page: true
+                    , totalRow: true
                     , cellMinWidth: 90
                     , limit: 50
                     , limits: [50, 500, 5000, 20000]
                     , cols: [[
-                        { type: 'checkbox', fixed: 'left' }
+                        { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�'}
                         , { field: 'hmainid', title: 'hmainid', hide: true }
                         , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
                         , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
@@ -354,13 +363,13 @@
                         , { field: '閰嶄欢浠g爜', title: '閰嶄欢浠g爜', width: 115, hide: true }
                         , { field: '閰嶄欢鍚嶇О', title: '閰嶄欢鍚嶇О', width: 200 }
                         , { field: '鍗曚綅鍚嶇О', title: '鍗曚綅鍚嶇О', width: 200 }
-                        , { field: '瀹為檯鐢ㄩ噺', title: '瀹為檯鐢ㄩ噺', width: 200 }
-                        , { field: '鏍囧噯鐢ㄩ噺', title: '鏍囧噯鐢ㄩ噺', width: 200 }
+                        , { field: '瀹為檯鐢ㄩ噺', title: '瀹為檯鐢ㄩ噺', width: 200, totalRow: true}
+                        , { field: '鏍囧噯鐢ㄩ噺', title: '鏍囧噯鐢ㄩ噺', width: 200 , totalRow: true}
                         , { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200 }
                         , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                         , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200 }
-                        , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
-                        , { field: '鍏宠仈閲戦', title: '鍏宠仈閲戦', width: 200 }
+                        , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 , totalRow: true}
+                        , { field: '鍏宠仈閲戦', title: '鍏宠仈閲戦', width: 200, totalRow: true}
                         , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 115, hide: true }
                         , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
                         , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200, hide: true }
@@ -382,6 +391,28 @@
                     ]]
                 }
             }
+
+            //#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
+
             //鍒濆鍖栬〃鏍�(瀛愯〃1)
             function set_InitGrid1() {
                 var ajaxLoad = layer.load();
@@ -390,6 +421,7 @@
                     //, toolbar: '#toolbarDemo'
                     , height: '350'
                     , page: true
+                    , totalRow: true
                     , cellMinWidth: 90
                     , limit: 50
                     , limits: [50, 500, 5000, 20000]
@@ -418,6 +450,7 @@
                     elem: '#mainTable2'
                     //, toolbar: '#toolbarDemo'
                     , height: '350'
+                    , totalRow: true
                     , page: true
                     , cellMinWidth: 90
                     , limit: 50
@@ -435,8 +468,8 @@
                         //, { field: 'HManagerID', title: '璐熻矗浜篒D', width: 200, hide: true }
                         //, { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', width: 200 }
                         //, { field: 'HManagerName', title: '璐熻矗浜�', width: 200 }
-                        , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200 }
-                        , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200 }
+                        , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200, totalRow: true}
+                        , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200, totalRow: true }
                         , { field: 'HRemark', title: '澶囨敞', width: 200 }
                     ]]
                 };
@@ -463,7 +496,7 @@
                                 data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                             }
                             //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
-                            col.push({ type: 'checkbox', fixed: 'left' });
+                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' });
                             for (var i = 0; i < data.length; i++) {
                                 if ($.inArray(data[i].name, titleData) > -1 ) {
                                     col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
@@ -474,6 +507,13 @@
                                         case 'DateTime':
                                             col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
                                             break;
+                                        case 'long':
+                                        case 'Int32':
+                                        case 'Int64':
+                                        case 'double':
+                                        case 'Decimal':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, totalRow: true });
+                                            break;  
                                         default:
                                             col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                     }
@@ -488,6 +528,7 @@
                                 , data: data1.data
                                 , height: 550
                                 , page: true
+                                , totalRow: true
                                 , cellMinWidth: 90
                                 , limit: 50
                                 , limits: [50, 500, 5000, 20000]
@@ -528,7 +569,7 @@
                 layer.open({
                     type: 2,
                     skin: 'layui-layer-rim', //鍔犱笂杈规
-                    title: '鏂板璁惧淇濆吇璁板綍鍗� ',
+                    title: '鏂板' + HPageTitle,
                     closeBtn: false,
                     shift: 2,
                     area: ['100%', '100%'],
@@ -552,7 +593,7 @@
                     layer.open({
                         type: 2
                         , area: ['100%', '100%']
-                        , title: '缂栬緫璁惧淇濆吇璁板綍鍗� '
+                        , title: '缂栬緫' + HPageTitle
                         , shade: 0.6 //閬僵閫忔槑搴�
                         , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                         , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�

--
Gitblit v1.9.1