From 361ef22b987b45d97b88198b5c5370affbdaa434 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 24 十月 2024 15:09:02 +0800
Subject: [PATCH] 班组职员清单复制

---
 WebTM/views/设备管理/Sb_EquipMaintainBillList.html |  222 ++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 179 insertions(+), 43 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 520ad51..b56dcab 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"
@@ -10,7 +10,8 @@
     <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
     <script src="../../layuiadmin/layui/layui.js"></script>
     <script src="../../layuiadmin/HideButton.js"></script>
-    <script src="../../../layuiadmin/soulTable.slim.js"></script>
+    <script src="../../layuiadmin/soulTable.slim.js"></script>
+    <script src="../../layuiadmin/PageTitle.js"></script>
 
     <style type="text/css">
         input.layui-input.layui-unselect {
@@ -108,6 +109,60 @@
                                             <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
                                         </div>
                                     </div>
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent1" id="ColContent1">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent2" id="ColContent2">
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -192,6 +247,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 銆愯繃婊ゆ柟妗堛��
 
@@ -278,29 +340,6 @@
                 };
             });
 
-            //鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁
-            table.on('row(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
-                var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹�
-                var linterid = datas.hmainid;
-                $.ajax({
-                    url: GetWEBURL() + 'Sb_EquipMaintainBill/Sb_EquipMaintainBillListProjectDetaiNew',
-                    type: "GET",
-                    data: { "HInterID": linterid },
-                    success: function (data1) {
-                        if (data1.count == 1) {
-                            option1.data = data1.list[0];
-                            table1.render(option1);
-                            option2.data = data1.list[1];
-                            table2.render(option2);
-                        } else {
-                            layer.alert("鑾峰彇澶辫触", { icon: 5 });
-                        }
-                    }, error: function () {
-                        layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
-                    }
-                });
-            });
-
             //閲嶇疆鎸夐挳
             form.on('submit(btnReSearch)', function (data) {
                 set_ClearQuery();
@@ -323,7 +362,7 @@
                 //鍒濆鍖栬〃鏍�(瀛愯〃2)
                 set_InitGrid2();
                 //鏌ヨ
-                get_Display(sWhere);
+                //get_Display(sWhere);
                 //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规
                 get_DefaultModule();
             }
@@ -334,11 +373,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,26 +394,26 @@
                         , { 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 }
                         , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 115, hide: true }
-                        , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+                        , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
                         , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
-                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
                         , { field: '淇敼浜�', title: '淇敼浜�', width: 200, hide: true }
-                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 115, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 115, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
                         , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
-                        , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200 }
-                        , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
-                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 115, hide: true }
+                        , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd')}}</div>"}
+                        , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
+                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 115, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd')}}</div>", hide: true }
                         , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
                         , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
                         , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
@@ -401,6 +441,26 @@
                         l.LAY_CHECKED = flag;
                     }
                 });
+
+                var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹�
+                var linterid = datas.hmainid;
+                $.ajax({
+                    url: GetWEBURL() + 'Sb_EquipMaintainBill/Sb_EquipMaintainBillListProjectDetaiNew',
+                    type: "GET",
+                    data: { "HInterID": linterid },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            option1.data = data1.list[0];
+                            table1.render(option1);
+                            option2.data = data1.list[1];
+                            table2.render(option2);
+                        } else {
+                            layer.alert("鑾峰彇澶辫触", { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+                    }
+                });
             })
             //#endregion
 
@@ -412,6 +472,7 @@
                     //, toolbar: '#toolbarDemo'
                     , height: '350'
                     , page: true
+                    , totalRow: true
                     , cellMinWidth: 90
                     , limit: 50
                     , limits: [50, 500, 5000, 20000]
@@ -440,6 +501,7 @@
                     elem: '#mainTable2'
                     //, toolbar: '#toolbarDemo'
                     , height: '350'
+                    , totalRow: true
                     , page: true
                     , cellMinWidth: 90
                     , limit: 50
@@ -457,8 +519,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 }
                     ]]
                 };
@@ -471,6 +533,7 @@
                 var ajaxLoad = layer.load();    
                 //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
                 $.ajax({
+                    //h_v_Sc_EquipMaintain
                     //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                     url: GetWEBURL() + '/Sb_EquipMaintainBill/GetEquipMaintainBillList',
                     type: "GET",
@@ -483,9 +546,14 @@
                             //缁欑┖鐨勬暟缁勮祴鍊�
                             for (var key in data1.list) {
                                 data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                                //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
+                                var patrn = new RegExp(/^h/i);
+                                if (patrn.test(data1.list[key].ColmCols)) {
+                                    titleData[key] = data1.list[key].ColmCols;
+                                }
                             }
                             //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
-                            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鍒�
@@ -496,6 +564,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 });
                                     }
@@ -510,6 +585,7 @@
                                 , data: data1.data
                                 , height: 550
                                 , page: true
+                                , totalRow: true
                                 , cellMinWidth: 90
                                 , limit: 50
                                 , limits: [50, 500, 5000, 20000]
@@ -521,7 +597,6 @@
 
                             //鍒锋柊琛ㄦ牸鏁版嵁
                             DisPlay_HideColumn();
-
                             //鍒锋柊鎸夐挳鏄剧ず
                             var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
                             var HBillType = "3901";
@@ -550,7 +625,7 @@
                 layer.open({
                     type: 2,
                     skin: 'layui-layer-rim', //鍔犱笂杈规
-                    title: '鏂板璁惧淇濆吇璁板綍鍗� ',
+                    title: '鏂板' + HPageTitle,
                     closeBtn: false,
                     shift: 2,
                     area: ['100%', '100%'],
@@ -574,7 +649,7 @@
                     layer.open({
                         type: 2
                         , area: ['100%', '100%']
-                        , title: '缂栬緫璁惧淇濆吇璁板綍鍗� '
+                        , title: '缂栬緫' + HPageTitle
                         , shade: 0.6 //閬僵閫忔槑搴�
                         , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                         , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
@@ -678,6 +753,7 @@
                             data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] },
                             success: function (result) {
                                 if (result.count == 1) {
+                                    get_FastQuery();
                                     layer.msg(result.Message, { icon: 1 });
                                     layer.close(wait);
                                 } else {
@@ -737,6 +813,13 @@
                 var Comparator = $("#Comparator").val()
                 var ColContent = $("#ColContent").val();
 
+                var ColName1 = $("#ColName1").val();//澶嶉�夋
+                var Comparator1 = $("#Comparator1").val()
+                var ColContent1 = $("#ColContent1").val();
+                var ColName2 = $("#ColName2").val();//澶嶉�夋
+                var Comparator2 = $("#Comparator2").val()
+                var ColContent2 = $("#ColContent2").val();
+
                 if (ColName != 0 && Comparator != 0) {
                     var com = "";
                     switch (Comparator) {
@@ -757,6 +840,48 @@
                             break;
                     }
                     sWhere += " and " + ColName + " " + com;
+                }
+                if (ColName1 != 0 && Comparator1 != 0) {
+                    var com1 = "";
+                    switch (Comparator1) {
+                        case "7":
+                            com1 = "like'%" + ColContent1 + "%'";
+                            break;
+                        case "8":
+                            com1 = "like'%" + ColContent1 + "'";
+                            break;
+                        case "9":
+                            com1 = "like'" + ColContent1 + "%'";
+                            break;
+                        case "10":
+                            com1 = "not like'%" + ColContent1 + "%'";
+                            break;
+                        default:
+                            com1 = "" + Comparator1 + "'" + ColContent1 + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName1 + " " + com1;
+                }
+                if (ColName2 != 0 && Comparator2 != 0) {
+                    var com2 = "";
+                    switch (Comparator2) {
+                        case "7":
+                            com2 = "like'%" + ColContent2 + "%'";
+                            break;
+                        case "8":
+                            com2 = "like'%" + ColContent2 + "'";
+                            break;
+                        case "9":
+                            com2 = "like'" + ColContent2 + "%'";
+                            break;
+                        case "10":
+                            com2 = "not like'%" + ColContent2 + "%'";
+                            break;
+                        default:
+                            com2 = "" + Comparator + "'" + ColContent + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName2 + " " + com2;
                 }
                 if (HBillNo) {
                     sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
@@ -784,12 +909,18 @@
                 $("#ColContent").val("");
                 $("#ColName").val("0");
                 $("#Comparator").val("0");
+                $("#ColContent2").val("");
+                $("#ColName2").val("0");
+                $("#Comparator2").val("0");
+                $("#ColContent1").val("");
+                $("#ColName1").val("0");
+                $("#Comparator1").val("0");
                 form.render('select');
                 sWhere = "";
                 $("#btnSearch").click();
             }
 
-            //鍒楁槑鏄剧ず涓嬫媺妗�
+            //#region 鍒楁槑鏄剧ず涓嬫媺妗�
             function ColFilter() {
                 var Organization = '<option  value="0" selected="selected" ></option>';
                 for (var i = 1; i < option.cols[0].length; i++) {
@@ -799,8 +930,13 @@
                 }
                 $("#ColName").empty();
                 $("#ColName").append(Organization);
+                $("#ColName1").empty();
+                $("#ColName1").append(Organization);
+                $("#ColName2").empty();
+                $("#ColName2").append(Organization);
                 form.render('select');
             }
+            //#endregion
 
             //闅愯棌鍒楄缃�
             function get_HideColumn() {

--
Gitblit v1.9.1