From 62f346794d27086f41f7ce901bdd11eead5249c8 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 06 五月 2024 08:54:47 +0800
Subject: [PATCH] 1

---
 WebTM/views/设备管理/Sb_EquipMaintainPlanBillList.html |  853 +++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 678 insertions(+), 175 deletions(-)

diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillList.html"
index a30a076..0b6ff1f 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillList.html"
@@ -9,6 +9,9 @@
     <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
     <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/PageTitle.js"></script>
     <style type="text/css">
         input.layui-input.layui-unselect {
             padding-right: 0;
@@ -38,68 +41,90 @@
                                         </select>
                                     </div>
                                 </div>-->
-                                    <label class="layui-form-label">鍗曟嵁绫诲瀷</label>
-                                    <div class="layui-input-block">
-                                        <select name="HBillType" id="HBillType">
-                                            <option value="">鎵�鏈�</option>
-                                            <option value="ZHXJ">涓嬫灦鎵捐揣鍗�</option>
-                                            <option value="ZHSJ">涓婃灦褰掕繕鍗�</option>
-                                        </select>
-                                    </div>
-                                </div>
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鍗曟嵁鍙�</label>
                                     <div class="layui-input-block">
-                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
+                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo">
                                     </div>
                                 </div>
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鍒跺崟浜�</label>
                                     <div class="layui-input-block">
-                                        <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
+                                        <input type="text" class="layui-input ForFilteringSchemes" name="HCreateBy" id="HCreateBy">
                                     </div>
-                                </div>-->
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">寮�濮嬫椂闂�</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" name="BenginHCreateDate" id="BenginHCreateDate">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">缁撴潫鏃堕棿</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" name="EndHCreateDate" id="EndHCreateDate">
+                                    </div>
+                                </div>
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                 </button>
-                                <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>-->
-                                <!--<div class="layui-colla-content">
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                                <!--鏄剧ず褰撳墠杩囨护鏂规-->
+                                <div class="layui-inline" style="margin-left:5px;">
+                                    <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
+                                </div>
+                                <div class="layui-colla-content">
                                     <div class="layui-inline">
                                         <div class="layui-inline">
                                             <span>鍏朵粬鏉′欢></span>
                                         </div>
                                     </div>
-                                    <div class="layui-inline">
-                                        <label class="layui-form-label">寮�濮嬫椂闂�</label>
-                                        <div class="layui-input-block">
-                                            <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
-                                        </div>
-                                    </div>
-                                    <div class="layui-inline">
-                                        <label class="layui-form-label">缁撴潫鏃堕棿</label>
-                                        <div class="layui-input-block">
-                                            <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
-                                        </div>
-                                    </div>
-                                </div>-->
+                                </div>
                             </div>
                         </div>
+
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <div class="layui-tab layui-tab-card">
+                            <ul class="layui-tab-title">
+                                <li class="layui-this">淇濆吇椤逛俊鎭�</li>
+                                <li>閰嶄欢淇℃伅</li>
+                            </ul>
+                            <div class="layui-tab-content">
+                                <div class="layui-tab-item layui-show">
+                                    <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
+                                </div>
+                            </div>
+                        </div>
+
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
-                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
-                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>-->
-
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view" id="view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>鍏抽棴</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>鍙嶅叧闂�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>淇濆瓨鏂规</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
                             </div>
                         </script>
+
+                        <script type="text/html" id="xuhao">
+                            {{d.LAY_TABLE_INDEX+1}}
+                        </script>
+                        <script type="text/html" id="xuhao1">
+                            {{d.LAY_TABLE_INDEX+1}}
+                        </script>
+
                     </form>
                 </div>
             </div>
@@ -109,30 +134,61 @@
     <script src="../../layuiadmin/Scripts/json2.js"></script>
     <script src="../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../layuiadmin/PubCustom.js"></script>
+    <script src="../../layuiadmin/zgqCustom/zgqCustom.js"></script>
     <script>
         layui.config({
             base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
         }).extend({
             index: 'lib/index', //涓诲叆鍙fā鍧�
-        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+            //#region 鍏叡鍙橀噺
             var $ = layui.$
                 , admin = layui.admin
                 , layer = layui.layer
                 , table = layui.table
+                , table1 = layui.table
+                , table2 = layui.table
                 , form = layui.form
                 , element = layui.element
                 , laypage = layui.laypage
                 , laydate = layui.laydate
                 , util = layui.util
+                , soulTable = layui.soulTable
+            //鏌ヨ鏉′欢
             var sWhere = "";
-            //鍏敤鍙橀噺
             var option = [];
+            var option1 = [];
+            var option2 = [];
+            var HModName = "Sb_EquipMaintainPlanBillList";
 
-            //鍒濆鍖栬〃鏍�
-            set_InitGrid();
-            //鍔犺浇鏁版嵁鍒扮綉鏍�
-            get_Display(sWhere);
+            //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            var HModuleType = "3902";
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
+        //#endregion
 
+            //#region 銆愯繃婊ゆ柟妗堛��
+
+            //杩囨护鏉′欢鐨刢lass绫� 
+            var HClassTag = "ForFilteringSchemes";
+            //妯″潡鍚嶇О锛堜腑鏂囩増锛� 姣忎釜妯″潡椤甸潰閮介渶瑕佷慨鏀�
+            window.HModuleName = "璁惧淇濆吇璁″垝鍗曞垪琛�";
+            //鏄惁宸茬粡閫夋嫨浜嗚繃婊ゆ柟妗堬紙鍏ㄥ眬鍙橀噺锛�
+            window.HDefaultFilter = "";
+            //閫夋嫨鐨勮繃婊ゆ柟妗堝唴鐮侊紙鍏ㄥ眬鍙橀噺锛�
+            window.HInterID_Choose = 0;
+
+            //#endregion
+            //#endregion
+
+            //#region 杩涘叆椤甸潰鍗冲姞杞�
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+            //#endregion
+
+
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
             //澶村伐鍏锋爮浜嬩欢
             table.on('toolbar(mainTable)', function (obj) {
                 var checkStatus = table.checkStatus(obj.config.id);
@@ -141,110 +197,172 @@
                     case 'btn-Add':
                         set_AddNew();
                         break;
+                    //缂栬緫鎸夐挳
                     case 'btn-Edit':
                         set_ShowBill();
                         break;
+                    //鍒犻櫎
                     case 'btn-Delete':
                         set_DeleteBill();
                         break;
-                    //瀹℃牳鎸夐挳
-                    case 'btn-Audit':
-                        set_CheckBill();
+                    //娴忚
+                    case 'btn-view':
+                        get_ViewReport();
                         break;
-                    //鍙嶅鏍告寜閽�
-                    case 'btn-DeAudit':
-                        set_AbandonCheck();
-                        break;
-                    //棰勮鎸夐挳
-                    case 'btn-Print':
+                    //鎵撳嵃
+                    case 'btn-print':
                         get_PrintReport();
                         break;
-                    //閫�鍑烘寜閽�
-                    case 'btn-Close':
-                        parent.layui.admin.events.closeThisTabs();
+                    //鍒锋柊
+                    case 'get_Refresh':
+                        set_Refresh();
+                        break;
+                    //鎸夐挳璁剧疆
+                    case 'set_HideButton':
+                        var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                        var HBillType = "3902";
+                        get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+                        break;
+                    //瀹℃牳
+                    case 'set_CheckBill': set_CheckBill(1);
+                        break;
+                    //鍙嶅鏍�
+                    case 'set_AbandonCheck': set_CheckBill(2);
+                        break;
+                    //鍏抽棴
+                    case 'set_CloseBill': set_CloseBill(1);
+                        break;
+                    //鍙嶅叧闂�
+                    case 'set_CancelCloseBill': set_CloseBill(2);
+                        break;
+                    //淇濆瓨鏂规
+                    case 'set_SaveScheme': set_SaveScheme();
+                        break;
+                    //璇诲彇鏂规
+                    case 'set_ReadScheme': set_ReadScheme();
+                        break;
+                    //閫�鍑�
+                    case 'get_Exit':
+                        Pub_Close(2);
                         break;
                 };
             });
+
+            //鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁
+            table.on('row(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
+                var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹�
+                var linterid = datas.hmainid;
+                $.ajax({
+                    url: GetWEBURL() + 'Sb_EquipMaintainPlanBill/Sb_EquipMaintainPlanBillListProjectDetaiNew',
+                    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(result.code + result.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+                    }
+                });
+            });
+
+            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;
+                    }
+                });
+            })
 
             //閲嶇疆鎸夐挳
             form.on('submit(btnReSearch)', function (data) {
                 set_ClearQuery();
             });
-            //閲嶇疆杩囨护鏉′欢
-            function set_ClearQuery() {
-                $("#HNumber").val("");
-                $("#HName").val("");
-            }
-
             //鏌ヨ鎸夐挳
             form.on('submit(btnSearch)', function (data) {
-                get_FastQuery(table, option);
-            });
+                get_FastQuery();
+            })
+            //#endregion
 
-            //蹇�熻繃婊�
-            function get_FastQuery(table, option) {
-                //var HNumber = $("#HNumber").val();
-                //var HName = $("#HName").val();
-                //if (HNumber) {
-                //    sWhere += " and 鑱屽憳浠g爜 like '%" + HNumber + "%'";
-                //}
-                //if (HName) {
-                //    sWhere += " and 鑱屽憳鍚嶇О like '%" + HName + "%'";
-                //}
-                var index = layer.load(0);
+
+
+            //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+            function set_ClearBill() {
+                //鍒濆鍖栨棩鏈�
+                $("#BenginHCreateDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//寮�濮嬫棩鏈�
+                $("#EndHCreateDate").val(Format(new Date(), "yyyy-MM-dd"));//缁撴潫鏃ユ湡
+                //鍒濆鍖栬〃鏍�(涓昏〃)
+                set_InitGrid();
+                //鍒濆鍖栬〃鏍�(瀛愯〃1)
+                set_InitGrid1();
+                //鍒濆鍖栬〃鏍�(瀛愯〃2)
+                set_InitGrid2();
+                //鏌ヨ
                 get_Display(sWhere);
-                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+                //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规
+                get_DefaultModule();
             }
-
+            //鍒濆鍖栬〃鏍�(涓昏〃)
             function set_InitGrid() {
                 option = {
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
-                    , height: 'full-50'
+                    , height: '400'
                     , page: true
+                    , totalRow: true
                     , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
+                    , done: function (res, curr, count) {
+                        soulTable.render(this);
+                    }
                     , cols: [[
-                        { type: 'checkbox', fixed: 'left' }
-                        , { field: 'hmainid', title: 'hmainid', hide: true }
-                        , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160 }
-                        , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
-                        , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, hide: true }
-                        , { field: '璁惧浠g爜', title: '璁惧浠g爜', width: 200 }
-                        , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200, hide: true }
-                        , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 200, hide: true }
-                        , { field: '寮�濮嬫棩鏈�', title: '寮�濮嬫棩鏈�', width: 200 }
-                        , { field: '缁撴潫鏃ユ湡', title: '缁撴潫鏃ユ湡', width: 200 }
-                        , { field: '鍛ㄦ湡鍗曚綅', title: '鍛ㄦ湡鍗曚綅', width: 200 }
-                        , { field: '淇濆吇鍛ㄦ湡', title: '淇濆吇鍛ㄦ湡', width: 200 }
-                        , { field: '鎽樿', title: '鎽樿', width: 200 }
-                        , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 200 }
-                        , { 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: 'hsubid', title: 'hsubid', width: 200, hide: true }
-                        , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200 }
-                        , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
-                        , { field: '鍏宠仈閲戦', title: '鍏宠仈閲戦', width: 200 }
-                        , { 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 }
-                        , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
-                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, hide: true }
-                        , { field: '淇敼浜�', title: '淇敼浜�', width: 200, hide: true }
-                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 115, hide: true }
-                        , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
-                        , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200 }
-                        , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200, hide: true }
-                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 115, hide: true }
-                        , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
-                        , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
-                        , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
-                        , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
-                        , { field: 'hbilltype', title: 'hbilltype', width: 200 }
+                        { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' }
+                        , { field: 'hmainid', title: 'hmainid', hide: true, sort: true }
+                        , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+                        , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160, sort: true }
+                        , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, hide: true, sort: true }
+                        , { field: 'HEquipID', title: '璁惧ID', width: 160, hide: true, sort: true }
+                        , { field: '璁惧浠g爜', title: '璁惧浠g爜', width: 200, sort: true }
+                        , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200, sort: true }
+                        , { field: '寮�濮嬫棩鏈�', title: '寮�濮嬫棩鏈�', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+                        , { field: '缁撴潫鏃ユ湡', title: '缁撴潫鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>", 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 }
+                        , { field: '澶囨敞', title: '澶囨敞', width: 200, sort: true }
+                        , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 115, sort: true }
+                        , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+                        , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200, sort: true }
+                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+                        , { field: '淇敼浜�', title: '淇敼浜�', width: 200, sort: true }
+                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 115, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+                        , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200, sort: true }
+                        , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, sort: true }
+                        , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200, hide: true, sort: true }
+                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 115, hide: true, sort: true }
+                        , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true, sort: true }
+                        , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true, sort: true }
+                        , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200, sort: true }
+                        , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200, sort: true }
+                        , { field: 'hbilltype', title: 'hbilltype', width: 200, sort: true }
                     ]]
                 }
             }
@@ -256,7 +374,10 @@
                     //, toolbar: '#toolbarDemo'
                     , height: '350'
                     , page: true
+                    , totalRow: true
                     , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
                     , cols: [[
                         //{ type: 'checkbox', fixed: 'left' }
                         , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
@@ -283,7 +404,10 @@
                     //, toolbar: '#toolbarDemo'
                     , height: '350'
                     , page: true
+                    , totalRow: true
                     , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
                     , cols: [[
                         //{ type: 'checkbox', fixed: 'left' }
                         , { templet: '#xuhao1', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
@@ -294,32 +418,64 @@
                         , { field: 'HUnitID', title: '鍗曚綅ID', width: 200, hide: true }
                         , { field: 'HUnitNumber', title: '鍗曚綅浠g爜', width: 200 }
                         , { field: 'HUnitName', title: '鍗曚綅鍚嶇О', width: 200 }
-                        , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200 }
-                        , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200 }
-                        , { field: 'HManagerID', title: '璐熻矗浜篒D', width: 200, hide: true }
-                        , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', width: 200 ,hide: true}
-                        , { field: 'HManagerName', title: '璐熻矗浜�', width: 200,hide: true }
+                        , { field: 'HManagerID', title: '璐熻矗浜篒D', width: 200, hide: true}
+                        , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', width: 200 }
+                        , { field: 'HManagerName', title: '璐熻矗浜�', width: 200 }
+                        , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200, totalRow: true }
+                        , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200, totalRow: true }
                         , { field: 'HRemark', title: '澶囨敞', width: 200 }
                     ]]
                 };
                 option2.data = [];
                 table2.render(option2);
                 layer.close(ajaxLoad);
-                }
             }
-            var index = layer.load(0);
+
+            //鍔犺浇鏁版嵁鍒扮綉鏍�
+            function get_Display(sWhere) {
+                var index = layer.load(0);
+                $.ajax({
+                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
+                    url: GetWEBURL() + '/Sb_EquipMaintainPlanBill/GetEquipMaintainPlanBillList',
+                    type: "GET",
+                    async: false,
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            option.data = data1.data;
+                            table.render(option);
+
+                            //鍒锋柊鎸夐挳鏄剧ず
+                            var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                            var HBillType = "3902";
+                            Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+                            layer.close(index);
+                        } else {
+                            option.data = data1.data;
+                            table.render(option);
+                            layer.close(index);
+                            layer.alert("鏆傛棤鏁版嵁", { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(index);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+
             //鏂板
             function set_AddNew() {
                 //椤甸潰灞�-鑷畾涔�
                 layer.open({
                     type: 2,
                     skin: 'layui-layer-rim', //鍔犱笂杈规
-                    title: '鏂板璁惧淇濆吇璁″垝鍗� ',
+                    title: '鏂板' + HPageTitle,
                     closeBtn: false,
                     shift: 2,
                     area: ['100%', '100%'],
                     maxmin: true,
-                    content: '../璁惧绠$悊/Sb_EquipMaintainPlanBillEdit.html',
+                    content: '../璁惧绠$悊/Sb_EquipMaintainPlanBillEdit.html?OperationType=1&linterid=&HSouceBillType=',
                     end: function () {
                         //鍒锋柊椤甸潰,
                         location.reload();
@@ -328,35 +484,6 @@
 
                     }
                 });
-            }
-            //缂栬緫鍗曟嵁
-            function set_ShowBill() {
-                var checkStatus = table.checkStatus('mainTable')
-                    , data = checkStatus.data;
-                if (checkStatus.data.length === 1) {
-                    var hID = data[0].hmainid.toString();
-                    //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
-                    layer.open({
-                        type: 2
-                        , area: ['100%', '100%']
-                        , title: '缂栬緫璁惧淇濆吇璁″垝鍗� '
-                        , shade: 0.6 //閬僵閫忔槑搴�
-                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                        , content: '../璁惧绠$悊/Sb_EquipMaintainPlanBillEdit.html?hID=' + hID
-                        , resize: false,
-                        end: function () {
-                            //鍒锋柊椤甸潰,
-                            location.reload();
-                        }
-                        , cancel: function () {
-                            //$(".layui-btn").removeClass("layui-btn-disabled");
-                        }
-                    })
-
-                } else {
-                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
-                }
             }
             //鍒犻櫎
             function set_DeleteBill() {
@@ -370,7 +497,7 @@
                         $.ajax({
                             type: "GET",
                             url: GetWEBURL() + "/Sb_EquipMaintainPlanBill/DeltetEquipMaintainPlanBillList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                            data: { "HInterID": HInterID },
+                            data: { "HInterID": HInterID, "user": sessionStorage["HUserName"] },
                             success: function (result) {
                                 if (result.count == 1) {
                                     layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -395,41 +522,417 @@
                     layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
                 }
             }
+            //缂栬緫
+            function set_ShowBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var linterid = data[0].hmainid.toString();
+                    //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '缂栬緫' + HPageTitle
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: '../璁惧绠$悊/Sb_EquipMaintainPlanBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
+                        , resize: false,
+                        end: function () {
+                            //鍒锋柊椤甸潰,
+                            location.reload();
+                        }
+                        , cancel: function () {
+                            //$(".layui-btn").removeClass("layui-btn-disabled");
+                        }
+                    })
 
-            function get_Display(sWhere) {
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+
+            //瀹℃牳/鍙嶅鏍�
+            function set_CheckBill(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                if (data.length == 1) {
+                    layer.confirm("纭瑕佸鏍稿悧?", function (index) {
+                        var wait = layer.load();
+                        var HInterID = data[0].hmainid;
+                        $.ajax({
+                            url: GetWEBURL() + '/Sb_EquipMaintainPlanBill/CheckSb_EquipMaintainPlanBill',
+                            type: "GET",
+                            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 {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                    layer.close(wait);
+                                }
+                            }, error: function () {
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                layer.close(wait);
+                            }
+                        });
+                    })
+                } else {
+                    layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                }
+            }
+
+            //鍏抽棴/鍙嶅叧闂�
+            function set_CloseBill(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                if (data.length == 1) {
+                    layer.confirm("纭瑕佸叧闂悧?", function (index) {
+                        var wait = layer.load();
+                        var HInterID = data[0].hmainid;
+                        $.ajax({
+                            url: GetWEBURL() + '/Sb_EquipMaintainPlanBill/CloseSb_EquipMaintainPlanBill',
+                            type: "GET",
+                            data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    layer.msg(result.Message, { icon: 1 });
+                                    layer.close(wait);
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                    layer.close(wait);
+                                }
+                            }, error: function () {
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                layer.close(wait);
+                            }
+                        });
+                    })
+                }
+                else {
+                    layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                }
+            } 
+
+            //棰勮
+            function get_ViewReport() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + InterID + "&Type=HEquipMaintainPlanBill&OpenTmp=璁惧淇濆吇璁″垝鏉$爜");
+
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+                }
+            }
+            //鎵撳嵃
+            function get_PrintReport() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + InterID + "&Type=HEquipMaintainPlanBill&OpenTmp=璁惧淇濆吇璁″垝鏉$爜");
+
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+                }
+            }
+            //鍒锋柊
+            function set_Refresh() {
+                $("#btnSearch").click();
+            }
+            //蹇�熻繃婊�
+            function get_FastQuery(table, option) {
+                //var HBillType = $("#HBillType").val();//鍗曟嵁绫诲瀷
+                var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
+                var HCreateBy = $("#HCreateBy").val();//鍒跺崟浜�
+                var BenginHCreateDate = $("#BenginHCreateDate").val();//寮�濮嬪埗鍗曟椂闂�
+                var EndHCreateDate = $("#EndHCreateDate").val();//缁撴潫鍒跺崟鏃堕棿
+                if (HBillNo) {
+                    sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+                }
+                if (HCreateBy) {
+                    sWhere += " and 鍒跺崟浜� like '%" + HCreateBy + "%'";
+                }
+                if (BenginHCreateDate) {
+                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + BenginHCreateDate + "'";
+                }
+                if (EndHCreateDate) {
+                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + EndHCreateDate + "'";
+                }
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+            //閲嶇疆杩囨护鏉′欢鏂规硶
+            function set_ClearQuery() {
+                //$("#HBillType").val("");//鍗曟嵁绫诲瀷
+                $("#HBillNo").val("");//鍗曟嵁鍙�
+                $("#HSourceBillNo").val("");//婧愬崟鍙�
+                $("#HCreateBy").val("");//鍒跺崟浜�
+                $("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
+                $("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
+                sWhere = "";
+                $("#btnSearch").click();
+            }
+
+            //#region 銆愯繃婊ゆ柟妗堛��
+
+            //鑾峰彇褰撳墠鐢ㄦ埛鐨勯粯璁よ繃婊ゆ柟妗�
+            function get_DefaultModule() {
                 $.ajax({
-                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
-                    url: GetWEBURL() + '/Sb_EquipMaintainPlanBill/GetEquipMaintainPlanBillList',
+                    url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
                     type: "GET",
-                    data: { "sWhere": sWhere },
+                    data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" },
                     success: function (data1) {
                         if (data1.count == 1) {
-                            option.data = data1.data;
-                            table.render(option);
-                            layer.close(index);
+                            //褰撳墠鐢ㄦ埛璁剧疆鏈夐粯璁ょ殑杩囨护鏂规
+                            var data = data1.data;
+                            //褰撳墠閫夋嫨鐨勮繃婊ゆ柟妗�
+                            HInterID_Choose = data[0].hmainid;
+                            //杩囨护鏂规鍐呯爜
+                            HInterID = data[0].hmainid
+                            //杩囨护鏂规鍚嶇О
+                            HDefaultFilter = data[0].鏂规鍚嶇О
+                            //杩囨护鏂规鐨勫娉紙鏂规淇℃伅鎻忚堪锛�
+                            var HRemark = data[0].澶囨敞
+                            //鏄剧ず鍑哄綋鍓嶇殑榛樿杩囨护鏂规
+                            document.getElementById("HFilterScheme_Now").style.display = "block";
+                            document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + HRemark + ")" + '</span>';
+                            //鎶婅繃婊ゆ潯浠跺�煎洖鍐欏埌椤甸潰涓�
+                            for (let i = 0; i < data.length; i++) {
+                                $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+                                if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+                                    $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+                                }
+                            }
+                            //鎵ц鏌ヨ鏂规硶
+                            get_FastQuery()
+                            form.render("select");
                         } else {
-                            layer.close(index);
-                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                            //褰撳墠鐢ㄦ埛娌℃湁璁剧疆榛樿鐨勮繃婊ゆ柟妗�
+                            //闅愯棌鏄剧ず杩囨护鏂规鐨勬爣绛句俊鎭�
+                            document.getElementById("HFilterScheme_Now").style.display = "none";
+                            //鎵ц鏌ヨ鏂规硶
+                            get_FastQuery()
+                            form.render("select");
                         }
                     }, error: function () {
-                        layer.close(index);
                         layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 });
             }
+
+            //淇濆瓨鏂规
+            function set_SaveScheme() {
+                var index = layer.open()
+                //鍒ゆ柇鐢ㄦ埛鏄惁鐐瑰嚮浜嗗彸涓婅鐨勨�滃弶鍙封�濆叧闂脊绐楅〉闈�
+                var HIsClose_Manual = false;
+                //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+                var Filter = document.getElementsByClassName(HClassTag);
+
+                var HFilterIdList = "";//杩囨护鏉′欢
+                var HFilterIdLists = "";//鎷兼帴澶氫釜杩囨护鏉′欢
+                var HValue = "";//杩囨护鍊�
+                var HElement_type = "";//杩囨护鏍囩绫诲瀷
+
+                for (var i = 0; i < Filter.length; i++) {
+                    HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+                    HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+                    HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�                    
+                    HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+                }
+
+                //鍘婚櫎鏈熬閫楀彿
+                HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+                HValue = HValue.substring(0, HValue.length - 1);
+                HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+                //褰撳墠椤甸潰涓婃病鏈夐�夋嫨杩囨护鏂规锛岃繘鍏ユ柊澧炴柟娉�
+                if (HDefaultFilter == "") {
+                    layer.open({
+                        type: 2
+                        , area: ['40%', '80%']
+                        , title: '杩囨护鏂规'
+                        , shift: 0//寮瑰嚭鍔ㄧ敾
+                        , content: '../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+                        , cancel: function () {
+                            // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+                            HIsClose_Manual = true;
+                        }
+                        , end: function () {
+                            if (HIsClose_Manual != true) {
+                                get_FastQuery();
+                                //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+                                document.getElementById("HFilterScheme_Now").style.display = "block";
+                                document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+                            }
+                        }
+                    })
+                    layer.close(index)
+                } else {
+                    //褰撳墠椤甸潰宸叉湁杩囨护鏂规锛岀敤鎴烽�夋嫨 鏂板鎴栬�呯紪杈�
+                    layer.confirm('褰撳墠宸查�夋嫨杩囨护鏂规锛屾槸鍚︿慨鏀癸紵璇烽�夋嫨瀵瑰簲鎿嶄綔', {
+                        title: "鎿嶄綔鎻愮ず",
+                        icon: 0,
+                        btn: ['鏂板鏂规', '淇濆瓨淇敼褰撳墠鏂规', '鍙栨秷']
+                    }, function (index, layero) {
+                        //鏂板
+                        layer.open({
+                            type: 2
+                            , area: ['40%', '80%']
+                            , title: '杩囨护鏂规'
+                            , shift: 0//寮瑰嚭鍔ㄧ敾
+                            , content: '../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+                            , end: function () {
+                                get_FastQuery()
+                                //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+                                document.getElementById("HFilterScheme_Now").style.display = "block";
+                                document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+                            }
+                        })
+                        layer.close(index)
+                    }, function (index) {
+                        //缂栬緫
+                        var Filter_Edit = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+                        HFilterIdList = "";
+                        HFilterIdLists = "";
+                        HValue = "";
+                        HElement_type = "";
+                        for (var i = 0; i < Filter_Edit.length; i++) {
+                            HFilterIdList = Filter_Edit[i].id; //杩囨护鏉′欢ID
+                            HFilterIdLists += Filter_Edit[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+                            HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+                            HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+                        }
+                        //鍘婚櫎鏈熬閫楀彿
+                        HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+                        HValue = HValue.substring(0, HValue.length - 1);
+                        HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+                        var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3;
+
+                        //淇敼
+                        $.ajax({
+                            type: "POST",
+                            url: GetWEBURL() + "/Xt_FastICScheme/save", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            async: true,
+                            data: { "oMain": sMainSub },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                    layer.msg(data.Message, { time: 1 * 1000, icon: 1 });
+                                }
+                                else {
+
+                                }
+                                layer.closeAll("loading");
+                            },
+                            error: function (err) {
+
+
+                            }
+                        });
+                        layer.close(index)
+                    }, function (index) {
+                        //鍙栨秷
+                        layer.alert('鍙栨秷')
+                        layer.close(index)
+                    });
+                }
+
+            }
+
+            //璇诲彇鏂规
+            function set_ReadScheme() {
+                var HIsClose_Manual = false;
+                var Filter = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+
+                var HFilterIdList = "";
+                var HFilterIdLists = "";
+                var HValue = "";
+                var HElement_type = "";
+                for (var i = 0; i < Filter.length; i++) {
+                    HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+                    HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+                    HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+                    HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+                }
+                //鍘婚櫎鏈熬閫楀彿
+                HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+                HValue = HValue.substring(0, HValue.length - 1);
+                HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+                layer.open({
+                    type: 2
+                    , area: ['80%', '80%']
+                    , title: '杩囨护鏂规鍒楄〃'
+                    , shift: 0//寮瑰嚭鍔ㄧ敾
+                    , content: '../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName
+                    , cancel: function () {
+                        // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+                        HIsClose_Manual = true;
+                    }
+                    , end: function () {
+                        if (HIsClose_Manual != true) {
+                            get_FastQuery()
+                            form.render("select");
+                        }
+                    }
+                })
+            }
+
             //#endregion
 
-            //瀹℃牳
-            function set_CheckBill() {
-            }
+            //#endregion
 
-            //鍙嶅鏍�
-            function set_AbandonCheck() {
-            }
-            
+
         });
 
+        //#region 銆愯繃婊ゆ柟妗堣繑鍥炴暟鎹��
+        function HFilterScheme(obj)  //杩斿洖杩囨护鏂规
+        {
+            var HInterID = obj[0].hmainid;
+            HInterID_Choose = obj[0].hmainid;
+            $.ajax({
+                url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+                type: "GET",
+                data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": HInterID, "Type": "Select" },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        var data = data1.data;
+                        //璧嬪�艰繃婊ゆ柟妗堝悕绉�
+                        HDefaultFilter = data[0].鏂规鍚嶇О
+                        var HRemark = data[0].澶囨敞
+                        //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+                        document.getElementById("HFilterScheme_Now").style.display = "block";
+                        document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + HRemark + ")" + '</span>';
+                        HInterID = data[0].hmainid
+                        //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢
+                        for (let i = 0; i < data.length; i++) {
+                            $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+                            if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+                                $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+                            }
+                        }
 
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+        //#endregion
 
 
     </script>

--
Gitblit v1.9.1