From 7c966809e4a0334d25d43e6fa2e644537aca59c3 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期一, 29 十一月 2021 18:04:29 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI

---
 WebTM/views/设备管理/Sb_EquipMaintainPlanBillEdit.html   |    1 
 WebTM/views/设备管理/设备规程单/Sb_EquipMaintainRuleEdit.html |  819 +++++++++++++++++++++++++++++++++++++++++++++++++++
 WebTM/views/设备管理/设备规程单/Sb_EquipMaintainRuleList.html |   11 
 WebTM/views/设备管理/Sb_EqpConkBookBillList.html         |    2 
 WebTM/WebTM.csproj                                   |    1 
 WebTM/views/设备管理/Sb_Add_EqpMaintenanceBillList.html  |   75 ++++
 6 files changed, 893 insertions(+), 16 deletions(-)

diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 08aec16..6f958e3 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -783,6 +783,7 @@
     <Content Include="views\璁惧绠$悊\璁惧妗f\Gy_EquipFileMainList.html" />
     <Content Include="views\璁惧绠$悊\璁惧瑙勭▼鍗昞Sb_EquipDotCheckRuleEdit.html" />
     <Content Include="views\璁惧绠$悊\璁惧瑙勭▼鍗昞Sb_EquipDotCheckRuleList.html" />
+    <Content Include="views\璁惧绠$悊\璁惧瑙勭▼鍗昞Sb_EquipMaintainRuleEdit.html" />
     <Content Include="views\璁惧绠$悊\璁惧瑙勭▼鍗昞Sb_EquipMaintainRuleList.html" />
     <Content Include="views\璐ㄩ噺绠$悊\鍑哄巶妫�楠屽崟\QC_OutCompCheckBill.html" />
     <Content Include="views\璐ㄩ噺绠$悊\宸℃璁板綍鍗昞QC_Add_Edit_PatrolProcCheckBill.html" />
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpMaintenanceBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpMaintenanceBillList.html"
index 29c9ada..01d5881 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpMaintenanceBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpMaintenanceBillList.html"
@@ -295,7 +295,7 @@
             table.on('toolbar(mainTable)', function (obj) {
                 var checkStatus = table.checkStatus('mainTable')
                     , data = checkStatus.data;;
-                var NewRow = { "HRepairID1": 0, "HRepairCode": "", "HRepairName": "", "HManagerID1": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "" };
+                var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " };
                 switch (obj.event) {
                     //澧炲姞涓�琛�
                     case 'btn-AddLine': set_AddLine(NewRow);
@@ -503,7 +503,8 @@
                     }
                 });
             });
-            //#region 琛ㄥご淇℃伅閫夋嫨鍗曟嵁寮圭獥
+
+            //琛ㄥご淇℃伅閫夋嫨鍗曟嵁寮圭獥
             form.on('submit(XDHList)', function () {
                 //椤甸潰灞�-鑷畾涔�
                 layer.open({
@@ -515,6 +516,7 @@
                     content: ['../璁惧绠$悊/Sb_EqpConkBookBillList.html', 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
+                        var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " };
                         //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                         var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
                         var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
@@ -524,6 +526,48 @@
                         $("#HMainSourceBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);
                         $("#HMainSourceInterID").val(checkStatus.data[0].hmainid);
                         $("#HMainSourceEntryID").val(checkStatus.data[0].hsubid);
+                        var list = [];
+                        for (var i = 0; i < checkStatus.data.length; i++) {
+                            list.push(checkStatus.data[i].鍗曟嵁鍙�)
+                        }
+                        if (isAllEqual(list))  //鐩稿悓鍗曞彿
+                        {
+                            var rowdate = layui.table.cache["mainTable"];
+                            //琛ㄤ綋鏁版嵁涓虹┖鏃�
+                            if (rowdate.length == 0) {
+                                buttonArr = [];//娓呯┖鏁扮粍
+                                for (var i = 0; i < checkStatus.data.length; i++) {
+                                    var checkrow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": checkStatus.data[i].hmainid, "HSourceEntryID": checkStatus.data[i].hsubid, "HSourceBillNo": checkStatus.data[i].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[i].鍗曟嵁绫诲瀷 };
+                                    buttonArr.push(checkrow);  //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+                                }
+                                buttonArr.push(NewRow);  //鍦ㄥ熬閮ㄥ姞涓�琛�
+                                table.reload("mainTable", {
+                                    data: buttonArr    //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+                                })
+                            }
+                            else {
+                                buttonArr = [];//娓呯┖鏁扮粍
+                                for (var i = 0; i < rowdate.length; i++) {
+                                    var checkrow = {
+                                        "HRepairID": rowdate[i].HRepairID, "HRepairCode": rowdate[i].HRepairCode, "HRepairName": rowdate[i].HRepairName,
+                                        "HRepairExplanation": rowdate[i].HRepairExplanation, "HManagerID": checkStatus.data[0].HManagerID, "HManagerCode": checkStatus.data[i].璐熻矗浜轰唬鐮�,
+                                        "HManagerName": rowdate[i].璐熻矗浜�, "HRemark": rowdate[i].HRemark,
+                                        "HSourceInterID": checkStatus.data[i].hmainid, "HSourceEntryID": checkStatus.data[i].hsubid,
+                                        "HSourceBillNo": checkStatus.data[i].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[i].鍗曟嵁绫诲瀷
+                                    };
+                                    buttonArr.push(checkrow);  //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+                                }
+                                buttonArr.push(NewRow);  //鍦ㄥ熬閮ㄥ姞涓�琛�
+                                table.reload("mainTable", {
+                                    data: buttonArr    //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+                                })
+                            }
+
+                            layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                        }
+                        else {
+                            layer.msg("璇烽�夋嫨鐩稿悓鍗曞彿!", { time: 1 * 2000, icon: 5 });
+                        }
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
                     , btn2: function (index, layero) {
@@ -615,14 +659,18 @@
                 columns = [
                     { type: 'checkbox', fixed: 'left' }
                     , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
-                    , { field: 'HRepairID1', title: 'HRepairID1', edit: 'text', event: "", hide: true }
+                    , { field: 'HRepairID', title: 'HRepairID', edit: 'text', event: "", hide: true }
                     , { field: 'HRepairCode', title: '缁翠慨椤圭洰浠g爜', edit: 'text', event: "", event: "HRepairCode" }
                     , { field: 'HRepairName', title: '缁翠慨椤圭洰', edit: 'text', event: "" }
-                    , { field: 'HManagerID1', title: 'HManagerID1', edit: 'text', hide: true }
+                    , { field: 'HManagerID', title: 'HManagerID', edit: 'text', hide: true }
                     , { field: 'HManagerCode', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: "HManagerCode" }
                     , { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' }
                     , { field: 'HRepairExplanation', title: '缁翠慨瑕佹眰', edit: 'text' }
                     , { field: 'HRemark', title: '澶囨敞', event: "", edit: 'text' }
+                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�' }
+                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�' }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿' }
+                    , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷' }
                     , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 150 }
                 ];
                 option = {
@@ -643,7 +691,7 @@
             function set_AddFNew() {
                 //鑾峰彇鏈�澶у崟鎹彿
                 get_MAXNum();
-                option.data = [{ "HRepairID1": 0, "HRepairCode": "", "HRepairName": "", "HManagerID1": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "" }];
+                option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " }];
                 table.render(option);
             }
 
@@ -671,7 +719,7 @@
             function set_EditFromGrid() {
                 set_EditForm(linterid);  //缂栬緫鑾峰彇琛ㄥご
                 set_EditGrid(linterid);  //缂栬緫鑾峰彇琛ㄤ綋
-                option.data = [{ "HRepairID1": 0, "HRepairCode": "", "HRepairName": "", "HManagerID1": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "" }];
+                option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " }];
                 table.render(option);
             }
 
@@ -806,7 +854,7 @@
                                     }
                                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                                     obj.update({
-                                        HRepairID1: checkStatus.data[0].HItemID,
+                                        HRepairID: checkStatus.data[0].HItemID,
                                         HRepairCode: checkStatus.data[0].HNumber,
                                         HRepairName: checkStatus.data[0].HName,
                                     });
@@ -847,7 +895,7 @@
 
                                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                                     obj.update({
-                                        HManagerID1: checkStatus.data[0].HItemID,
+                                        HManagerID: checkStatus.data[0].HItemID,
                                         HManagerCode: checkStatus.data[0].HNumber,
                                         HManagerName: checkStatus.data[0].HName
                                     });
@@ -902,6 +950,17 @@
                 }
             }
 
+            //鍒ゆ柇婧愬崟甯﹀洖鏁版嵁鏁扮粍涓殑鍊兼槸鍚︾浉鍚�
+            function isAllEqual(array) {
+                if (array.length > 0) {
+                    return !array.some(function (value, index) {
+                        return value !== array[0];
+                    });
+                } else {
+                    return true;
+                }
+            }
+
             //鏁版嵁楠岃瘉
             function AllowLoadData(sSubStr) {  //sSubStr
 
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html"
index e2f89a7..df6edec 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html"
@@ -165,7 +165,7 @@
                     , { field: '鏁呴殰鍘熷洜浠g爜', title: '鏁呴殰鍘熷洜浠g爜', width: 200 }
                     , { field: '鏁呴殰鍘熷洜鍚嶇О', title: '鏁呴殰鍘熷洜鍚嶇О', width: 200 }
                     , { field: '鏁呴殰鍘熷洜鎻忚堪', title: '鏁呴殰鍘熷洜鎻忚堪', width: 200 }
-                    , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true }
+                    , { field: 'HManagerID1', title: 'HManagerID1', width: 115, hide: true }
                     , { field: '琛ㄤ綋璐熻矗浜轰唬鐮�', title: '琛ㄤ綋璐熻矗浜轰唬鐮�', width: 200 }
                     , { field: '琛ㄤ綋璐熻矗浜�', title: '琛ㄤ綋璐熻矗浜�', width: 200 }
                     , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 200 }
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
index 3dd75b0..c989167 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
@@ -164,7 +164,6 @@
         </div>
     </div>
     <script type="text/html" id="barDemo">
-        <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
         <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
     </script>
     <script src="../../layuiadmin/layui/layui.js"></script>
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleEdit.html"
new file mode 100644
index 0000000..d790aaf
--- /dev/null
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleEdit.html"
@@ -0,0 +1,819 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <title>鏂板/缂栬緫璁惧淇濆吇瑙勭▼鍗�</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <style type="text/css">
+        .layui-form-label {
+            width: 85px;
+        }
+    </style>
+</head>
+<body>
+    <div id="layout1" class="layui-fluid">
+        <div class="layui-row layui-col-space15">
+            <div class="layui-col-md12">
+                <div class="layui-card">
+                    <form id="form0" class="layui-form" lay-filter="component-form-group" action="">
+                        <div class="layui-card-header">
+                            <div class="layui-btn-group">
+                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_AddNew" id="set_AddNew">鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver" id="add-btn">淇濆瓨</button>
+                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="view">棰勮</button>
+                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="print">鎵撳嵃</button>
+                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
+
+                            </div>
+
+                        </div>
+                        <div class="layui-card-body">
+                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
+                                <h1 style="text-align:center;"><b>璁惧淇濆吇瑙勭▼鍗�</b></h1>
+                                <div class="layui-tab-content">
+                                    <div class="layui-tab-item layui-show">
+                                        <div class="layui-form-item">
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                                <div class="layui-input-inline">
+                                                    <input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo">
+                                                    <input id="HInterID" name="HInterID" type="hidden" />
+                                                    <input id="HMaker" name="HMaker" type="hidden" />
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">鏃ユ湡</label>
+                                                <div class="layui-input-inline">
+                                                    <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">鍐呴儴鍗曟嵁鍙�</label>
+                                                <div class="layui-input-inline">
+                                                    <input type="text" name="HInnerBillNo" id="HInnerBillNo" class="layui-input">
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="layui-form-item">
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">鍛ㄦ湡鍗曚綅</label>
+                                                <div class="layui-input-inline">
+                                                    <select name="HCycleUnit" lay-filter="aihao" id="HCycleUnit">
+                                                        <option value="澶�">澶�</option>
+                                                        <option value="鏈�">鏈�</option>
+                                                        <option value="鍛�">鍛�</option>
+                                                    </select>
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">淇濆吇鍛ㄦ湡</label>
+                                                <div class="layui-input-inline">
+                                                    <input type="text" name="HCheckCycle" id="HCheckCycle" class="layui-input" value="0">
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="layui-form-item">
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">鎽樿</label>
+                                                <div class="layui-input-inline">
+                                                    <textarea placeholder="璇疯緭鍏ユ憳瑕�" class="layui-textarea" name="HExplanation" id="HExplanation"></textarea>
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">澶囨敞</label>
+                                                <div class="layui-input-inline">
+                                                    <textarea placeholder="璇疯緭鍏ュ娉�" class="layui-textarea" name="HRemark" id="HRemark"></textarea>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="layui-tab layui-tab-card" lay-filter="TabTest">
+                            <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="mainTable" lay-filter="mainTable"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></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-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+
+                            </div>
+                        </script>
+                        <script type="text/html" id="toolbarDemo1">
+                            <div class="layui-btn-container">
+
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine1"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine1"><i class="layui-icon layui-icon-form"></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>
+        </div>
+    </div>
+    <script type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </script>
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <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>
+        //鑾峰彇鍙傛暟
+        var params = get_UrlVars();
+        if (typeof (params[params[0]]) == "undefined") {
+            var OperationType = 1;//鎿嶄綔绫诲瀷
+        } else {
+            var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
+            var linterid = params[params[1]];//婧愬崟id
+            var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
+        }
+
+
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index' //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+            //#region 鍏叡鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , laydate = layui.laydate
+                , element = layui.element;
+            //鏌ヨ鏉′欢
+            var option = [];//淇濆吇
+            var option1 = [];//閰嶄欢
+            var sBillType = "3912";
+           //#endregion
+
+
+
+            //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+            //鍒濆鍖栬〃鍗曟彃浠�
+            set_InitFrom();
+            //鍒濆鍖栬〃鏍�
+            set_InitGrid();
+
+            //鍒ゆ柇鎿嶄綔绫诲瀷
+            if (OperationType == 1) {//鏃犳簮鏂板
+                set_AddFNew();
+            }
+            else if (OperationType == 3) {//缂栬緫
+                set_EditFromGrid(linterid);
+            }
+            else {
+                layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
+            }
+
+            //#endregion
+
+
+
+
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+            // 澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                var rowid = 0;
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;;
+                var AddRow = table.cache['mainTable'];
+                var NewRow = { "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " };
+                switch (obj.event) {
+                    //鏂板涓�琛�
+                    case 'btn-AddLine': btnAddLine(NewRow);
+                        break;
+                    //澶嶅埗涓�琛�
+                    case 'btn-CopyLine': btnCopyLine(data);
+                        break;
+                }
+            });
+            //澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable1)', function (obj) {
+                var checkStatus = table.checkStatus('mainTable1')
+                    , data = checkStatus.data;
+                var NewRow = { "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HRemark": "" };
+                switch (obj.event) {
+                    //鏂板涓�琛�
+                    case 'btn-AddLine1': btnAddLine1(NewRow);
+                        break;
+                    //澶嶅埗涓�琛�
+                    case 'btn-CopyLine1': btnCopyLine1(data);
+                        break;
+                }
+            });
+            //琛屽唴浜嬩欢
+            table.on('tool(mainTable)', function (obj) {
+                set_GridDelete(obj);   //琛屽唴鍒犻櫎
+                set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+            });
+            //琛屽唴浜嬩欢
+            table.on('tool(mainTable1)', function (obj) {
+                set_GridDelete1(obj);   //琛屽唴鍒犻櫎
+                set_GridCellCheck1(obj); //琛屽唴蹇嵎閿瓫閫�
+            });
+            //鏂板
+            form.on('submit(set_AddNew)', function (data) {
+                $("#component-form-group")[0].reset();
+                layui.form.render();
+                set_AddFNew();
+            });
+            //淇濆瓨
+            form.on('submit(Saver)', function (data) {
+                //debugger;
+                data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜�
+                var sMainStr = JSON.stringify(data.field);
+                var sSubStr = JSON.stringify(table.cache['mainTable']);
+                var sSubStr1 = JSON.stringify(table.cache['mainTable1']);
+                var sMainSub = sMainStr + ';' + sSubStr + ';' + sSubStr1;
+                if (!AllowLoadData(sSubStr))//鏁版嵁楠岃瘉
+                {
+                    return false;
+                }
+                $.ajax(
+                    {
+                        type: "POST",
+                        url: GetWEBURL() + "/Sb_EquipMaintainRuleBill/SaveEquipMaintainRuleBillList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        async: true,
+                        data: { "msg": sMainSub },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                    $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
+                                    var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
+                                    parent.layer.close(index); //鍐嶆墽琛屽叧闂�
+                                });
+                            }
+                            else {
+
+                                f_alert(data.Message);
+                                console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
+                            }
+                            layer.closeAll("loading");
+                        },
+                        error: function (err) {
+
+                            f_alert("閿欒:" + err);
+                            console.log("Reason" + sMainStr);
+                        }
+                    });
+
+            });
+            //棰勮Printing
+            form.on("submit(view)", function (data) {
+                window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + linterid + "&Type=HEquipMaintainPlanBill&OpenTmp=璁惧淇濆吇璁″垝鏉$爜");
+
+            });
+            //鎵撳嵃Printing
+            form.on("submit(print)", function (data) {
+                window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + linterid + "&Type=HEquipMaintainPlanBill&OpenTmp=璁惧淇濆吇璁″垝鏉$爜");
+
+            });
+            //閫�鍑�
+            form.on('submit(Exit)', function () {
+                if (linterid == undefined) {
+                    //鍏抽棴椤电
+                    Pub_Close(2);
+                }
+                else {
+                    //鍏抽棴椤电
+                    Pub_Close(1);
+                }
+            })
+            //鐩戝惉鎻愪氦
+            form.verify({
+                numberOrEmpty: function (value, item) {
+                    // if (value != '') {
+                    if (!/^\d+$/.test(value)) {
+                        return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
+                    }
+                    //}
+                }
+            });
+            //#endregion
+
+
+
+            //#region 姝ら〉闈㈡墍鏈夋柟娉�
+            //鍒濆鍖栬〃鍗�
+            function set_InitFrom() {
+                laydate.render({
+                    elem: '#HDate',
+                });
+                laydate.render({
+                    elem: '#HBeginDate'
+                });
+                laydate.render({
+                    elem: '#HEndDate'
+                });
+            }
+            //鍒濆鍖栬〃鏍�
+            function set_InitGrid() {
+                Table();  //淇濆吇椤瑰垪琛�
+                Table1();  //閰嶄欢椤瑰垪琛�
+            }
+            //鍒濆鍖栦繚鍏婚」鍒楄〃
+            function Table() {
+                //琛ㄥご
+                columns = [
+                    { type: 'checkbox', fixed: 'left' }
+                    , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
+                    , { field: 'HMaintainItemID', title: '淇濆吇椤圭洰ID', edit: 'text', hide: true }
+                    , { field: 'HMaintainItemNumber', title: '淇濆吇椤圭洰浠g爜', edit: 'text', event: 'HMaintainItemNumber' }
+                    , { field: 'HMaintainItem', title: '淇濆吇椤圭洰', edit: 'text' }
+                    , { field: 'HMaintainPart', title: '淇濆吇閮ㄤ綅', edit: 'text' }
+                    , { field: 'HClaim', title: '鍏蜂綋瑕佹眰', edit: 'text' }
+                    , { field: 'HManagerID', title: '璐熻矗浜篒D', edit: 'text', hide: true }
+                    , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: 'HManagerNumber' }
+                    , { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' }
+                    , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+                    , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+                ];
+                option = {
+                    id: 'mainTable'
+                    , elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , page: false
+                    , cellMinWidth: 120
+                    , height: 500
+                    , cols: [columns]
+                    , done: function (res, curr, count) {
+
+                    }
+                };
+            }
+            //鍒濆鍖栭厤浠堕」鍒楄〃
+            function Table1() {
+                //琛ㄥご
+                columns = [
+                    { type: 'checkbox', fixed: 'left' }
+                    , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
+                    , { field: 'HMaterID', title: '閰嶄欢ID', edit: 'text', hide: true }
+                    , { field: 'HMaterNumber', title: '閰嶄欢浠g爜', edit: 'text', event: "HMaterCode" }
+                    , { field: 'HMaterName', title: '閰嶄欢鍚嶇О', edit: 'text', event: "" }
+                    , { field: 'HUnitID', title: '鍗曚綅ID', edit: 'text', hide: true }
+                    , { field: 'HUnitNumber', title: '鍗曚綅浠g爜', edit: 'text', event: "HUnitCode" }
+                    , { field: 'HUnitName', title: '鍗曚綅鍚嶇О', edit: 'text', event: "" }
+                    , { field: 'HQty', title: '鐢ㄩ噺', edit: 'text' }
+                    , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+                    , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 150 }
+                ];
+                option1 = {
+                    id: 'mainTable1'
+                    , elem: '#mainTable1'
+                    , toolbar: '#toolbarDemo1'
+                    , height: 500
+                    , page: true
+                    , limit: 500
+                    , cellMinWidth: 120
+                    , height: 500
+                    , cols: [columns]
+                    , done: function (res, curr, count) {
+                    }
+                };
+            }
+            //鏃犳簮鍗曟柊澧�
+            function set_AddFNew() {
+                //鑾峰彇鏈�澶у崟鎹彿
+                get_MAXNum();
+                option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
+                option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HRemark": "" }];
+                table.render(option);
+                table.render(option1);
+            }
+            //鑾峰彇鏈�澶у崟鎹彿
+            function get_MAXNum() {
+                //鑾峰彇鏈�澶у崟鎹彿 new
+                $("#HInterID").val("0");
+                $("#HBillNo").val("");
+                $.ajax({
+                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    type: "GET",
+                    data: { "HBillType": sBillType },
+                    success: function (d) {
+                        //console.log(d.data);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                        $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
+                        $("#HInterID").val(0);
+                    }
+                });
+            }
+            //缂栬緫
+            function set_EditFromGrid(linterid) {
+                set_EditForm(linterid);  //缂栬緫鑾峰彇琛ㄥご
+                set_EditGrid(linterid);  //缂栬緫鑾峰彇琛ㄤ綋
+                option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
+                table.render(option);
+                option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "","HQty": "0", "HRemark": "" }];
+                table.render(option1);
+            }
+            //缂栬緫鑾峰彇琛ㄥご
+            function set_EditForm(linterid) {
+                $.ajax({
+                    url: GetWEBURL() + "Sb_EquipMaintainRuleBill/Sb_EquipMaintainRuleBillListCheckDetai",
+                    type: "GET",
+                    data: {
+                        "HID": linterid
+                    },
+                    success: function (result) {
+                        //console.log(result.code)
+                        if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            console.log(result)
+                            var data = result.data.Sb_EquipMaintainRuleBillMain[0];
+                            form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+                                "HBillNo": data.HBillNo
+                                , "HDate": formatDate(data.HDate)
+                                , "HInnerBillNo": data.HInnerBillNo
+                                , "HExplanation": data.HExplanation               //鎽樿
+                                , "HRemark": data.HRemark
+                                , "HCycleUnit": data.HCycleUnit
+                                , "HCheckCycle": data.HCheckCycle
+                            });
+
+                        } else {
+                            layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                        }
+                    }, error: function () {
+                        layer.alert("鍙戠敓閿欒!", { icon: 5 });
+                    }
+                });
+            }
+            //缂栬緫鑾峰彇琛ㄤ綋
+            function set_EditGrid(linterid) {
+                $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
+                //缂栬緫鍔犺浇鏁版嵁
+                $.ajax({
+                    url: GetWEBURL() + 'Sb_EquipMaintainRuleBill/Sb_EquipMaintainRuleBillSubAndSubItem',
+                    type: "GET",
+                    data: { "HInterID": linterid },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            option.data = result.list[0];
+                            table.render(option);
+                            option1.data = result.list[1];
+                            table.render(option1);
+
+                        } else {
+                            layer.alert(result.code + result.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(index0);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+
+            //鏃ユ湡鏍煎紡鍖�
+            function formatDate(date) {
+                var d = new Date(date),
+                    month = '' + (d.getMonth() + 1),
+                    day = '' + d.getDate(),
+                    year = d.getFullYear();
+
+                if (month.length < 2) month = '0' + month;
+                if (day.length < 2) day = '0' + day;
+
+                return [year, month, day].join('-');
+            }
+            //澧炲姞涓�琛�
+            function btnAddLine(NewRow) {
+                var tableBak = table.cache["mainTable"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
+                buttonArr = [];//娓呯┖鏁扮粍
+                for (var i = 0; i < tableBak.length; i++) {
+                    buttonArr.push(tableBak[i]);  //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+                }
+                buttonArr.push(NewRow);  //鍦ㄥ熬閮ㄥ姞涓�琛�
+                table.reload("mainTable", {
+                    data: buttonArr    //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+                })
+            }
+            //澧炲姞涓�琛�
+            function btnAddLine1(NewRow) {
+                var tableBak = table.cache["mainTable1"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
+                buttonArr = [];//娓呯┖鏁扮粍
+                for (var i = 0; i < tableBak.length; i++) {
+                    buttonArr.push(tableBak[i]);  //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+                }
+                buttonArr.push(NewRow);  //鍦ㄥ熬閮ㄥ姞涓�琛�
+                table.reload("mainTable1", {
+                    data: buttonArr    //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+                })
+            }
+            //澶嶅埗涓�琛�
+            function btnCopyLine(data) {
+                var copydata = JSON.stringify(data);
+                if (data.length <= 0) {
+                    layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                }
+                else if (data.length > 1) {
+                    layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                }
+                else {
+                    var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+                    var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+                    table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+                    option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+                    table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+                }
+            }
+            //澶嶅埗涓�琛�
+            function btnCopyLine1(data) {
+                var copydata = JSON.stringify(data);
+                if (data.length <= 0) {
+                    layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                }
+                else if (data.length > 1) {
+                    layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                }
+                else {
+                    var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+                    var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+                    table.cache["mainTable1"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+                    option1.data = table.cache["mainTable1"];//灏嗘暟鎹粦瀹氬埌data涓�
+                    table.render(option1);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+                }
+            }
+            // 琛ㄦ牸琛屽唴浜嬩欢鍒犻櫎
+            function set_GridDelete(obj) {
+                var data = obj.data;
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) {
+                        console.log("绱㈠紩涓�:" + rowIndex);
+                        if (rowIndex === '0') {
+                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                        } else {
+                            //obj.del();
+                            //layer.close(index);
+                            var oldData = table.cache["mainTable"];
+                            oldData.splice(obj.tr.data('index'), 1);
+                            table.reload('mainTable', { data: oldData });
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+            // 琛ㄦ牸琛屽唴浜嬩欢鍒犻櫎
+            function set_GridDelete1(obj) {
+                var data = obj.data;
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) {
+                        console.log("绱㈠紩涓�:" + rowIndex);
+                        if (rowIndex === '0') {
+                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                        } else {
+                            //obj.del();
+                            //layer.close(index);
+                            var oldData = table.cache["mainTable1"];
+                            oldData.splice(obj.tr.data('index'), 1);
+                            table.reload('mainTable1', { data: oldData });
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+
+            //琛ㄦ牸琛屽唴浜嬩欢蹇嵎閿瓫閫�--淇濆吇
+            function set_GridCellCheck(obj) {
+                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+                    if (event.key == "F7") {
+                        //淇濆吇椤圭洰淇℃伅
+                        if (obj.event === 'HMaintainItemNumber')  
+                        {
+                            //椤甸潰灞�-鑷畾涔�
+                            layer.open({
+                                type: 2,
+                                skin: 'layui-layer-rim', //鍔犱笂杈规
+                                title: '淇濆吇椤圭洰鍒楄〃',
+                                closeBtn: 1,
+                                shift: 2,
+                                area: ['90%', '90%'],
+                                maxmin: true,
+                                content: ['../../PublicPage/Gy_Maintain.html', 'yes'],
+                                btn: ['纭畾', '鍙栨秷']
+                                , btn1: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                                    var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                                    if (checkStatus.data.length === 0) {
+                                        return layer.msg('璇烽�夋嫨鏁版嵁');
+                                    }
+
+                                    //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                    obj.update({
+                                        HMaintainItemID: checkStatus.data[0].HItemID,
+                                        HMaintainItemNumber: checkStatus.data[0].HNumber,
+                                        HMaintainItem: checkStatus.data[0].HName,
+                                    });
+                                    layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                                }
+                                , btn2: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                                    //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                                },
+                                end: function () {
+                                }
+                            });
+                        }
+                         //璐d换浜轰俊鎭�
+                        if (obj.event === 'HManagerNumber') 
+                        {
+                            //椤甸潰灞�-鑷畾涔�
+                            layer.open({
+                                type: 2,
+                                skin: 'layui-layer-rim', //鍔犱笂杈规
+                                title: '璐d换浜哄垪琛�',
+                                closeBtn: 1,
+                                shift: 2,
+                                area: ['90%', '90%'],
+                                maxmin: true,
+                                content: ['../../PublicPage/UserInformation.html', 'yes'],
+                                btn: ['纭畾', '鍙栨秷']
+                                , btn1: function (index, layero) {
+
+                                    //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                                    var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                                    if (checkStatus.data.length === 0) {
+                                        return layer.msg('璇烽�夋嫨鏁版嵁');
+                                    }
+
+                                    //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                    obj.update({
+                                        HManagerID: checkStatus.data[0].HItemID,
+                                        HManagerNumber: checkStatus.data[0].HNumber,
+                                        HManagerName: checkStatus.data[0].HName
+                                    });
+
+                                    layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                                }
+                                , btn2: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                                    //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                                },
+                                end: function () {
+
+                                }
+                            });
+                        }
+                        obj.event = "";
+                        return false;
+
+                    }
+                })
+            }
+            // 琛ㄦ牸琛屽唴浜嬩欢蹇嵎閿瓫閫�--閰嶄欢
+            function set_GridCellCheck1(obj) {
+                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+                    if (event.key == "F7") {
+                        //鍗曚綅浠g爜
+                        if (obj.event === 'HUnitCode') {
+                            //椤甸潰灞�-鑷畾涔�
+                            layer.open({
+                                type: 2,
+                                skin: 'layui-layer-rim', //鍔犱笂杈规
+                                title: '鍗曚綅鍒楄〃',
+                                closeBtn: 1,
+                                shift: 2,
+                                area: ['90%', '90%'],
+                                maxmin: true,
+                                content: ['../../PublicPage/UnitInformation.html', 'yes'],
+                                btn: ['纭畾', '鍙栨秷']
+                                , btn1: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                                    var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                                    if (checkStatus.data.length === 0) {
+                                        return layer.msg('璇烽�夋嫨鏁版嵁');
+                                    }
+                                    //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                    obj.update({
+                                        HUnitID: checkStatus.data[0].HItemID,
+                                        HUnitNumber: checkStatus.data[0].HNumber,
+                                        HUnitName: checkStatus.data[0].HName
+                                    });
+                                    layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                                }
+                                , btn2: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                                    //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                                },
+                                end: function () {
+                                }
+                            });
+                        }
+                        //閰嶄欢浠g爜
+                        if (obj.event === 'HMaterCode') {
+                            //椤甸潰灞�-鑷畾涔�
+                            layer.open({
+                                type: 2,
+                                skin: 'layui-layer-rim', //鍔犱笂杈规
+                                title: '鍗曚綅鍒楄〃',
+                                closeBtn: 1,
+                                shift: 2,
+                                area: ['90%', '90%'],
+                                maxmin: true,
+                                content: ['../../PublicPage/PartInformation.html', 'yes'],
+                                btn: ['纭畾', '鍙栨秷']
+                                , btn1: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                                    var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                                    if (checkStatus.data.length === 0) {
+                                        return layer.msg('璇烽�夋嫨鏁版嵁');
+                                    }
+                                    //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                    obj.update({
+                                        HMaterID: checkStatus.data[0].HItemID,
+                                        HMaterNumber: checkStatus.data[0].HNumber,
+                                        HMaterName: checkStatus.data[0].HName
+                                    });
+                                    layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                                }
+                                , btn2: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                                    //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                                },
+                                end: function () {
+                                }
+                            });
+                        }
+                        obj.event = "";
+                        return false;
+
+                    }
+                })
+            }
+            //闈炵┖楠岃瘉
+            function AllowLoadData(sSubStr) {
+                var Result = true;
+                if ($("#HCheckCycle").val() == '' || $("#HCheckCycle").val() == '0') {
+                    layer.msg("璇疯緭鍏ヤ繚鍏诲懆鏈�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
+                }
+                if (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr == "[]") {
+                    layer.msg("淇濆吇椤规槑缁嗚褰曚笉鑳戒负绌�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
+                }
+                if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
+                    sSubStr = JSON.parse(sSubStr);
+                    for (var i = 0; i < sSubStr.length; i++) {
+                        if (sSubStr[i].HMaintainItemID == "") {
+                            layer.msg("淇濆吇椤规槑缁嗚褰曠" + (i + 1) + "琛�,淇濆吇椤圭洰淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            return Result = false;
+                        }
+                        if (sSubStr[i].HMaintainItem == "") {
+                            layer.msg("淇濆吇椤规槑缁嗚褰曠" + (i + 1) + "琛�,淇濆吇閮ㄤ綅淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            return Result = false;
+                        }
+                        if (sSubStr[i].HManagerNumber == "") {
+                            layer.msg("淇濆吇椤规槑缁嗚褰曠" + (i + 1) + "琛�,璐熻矗浜轰俊鎭负绌�!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            return Result = false;
+                        }
+
+                    }
+                }
+                else {
+                    return Result = true;
+                }
+                return Result;
+            }
+            function f_alert(sMsg) {
+                layer.alert(sMsg, { icon: 5 });
+            }
+            //#endregion
+
+        });
+    </script>
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleList.html"
index 965ff3f..b192038 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipMaintainRuleList.html"
@@ -17,7 +17,8 @@
 </head>
 <body>
     <div class="layui-fluid">
-        <div class="layui-col-md12">            <div class="layui-card" style="padding: 1px">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
                 <div class="layui-card-body" style="padding: 1px;">
                     <form class="layui-form" action="" lay-filter="component-form-group">
                         <div class="layui-collapse">
@@ -113,7 +114,7 @@
     <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
     <script>
         layui.config({
-            base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
         }).extend({
             index: 'lib/index', //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
@@ -236,8 +237,6 @@
                         , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
                         , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
                         , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, hide: true }
-                        , { field: '璁惧浠g爜', title: '璁惧浠g爜', width: 200 }
-                        , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200 }
                         , { field: '鍛ㄦ湡鍗曚綅', title: '鍛ㄦ湡鍗曚綅', width: 200 }
                         , { field: '淇濆吇鍛ㄦ湡', title: '淇濆吇鍛ㄦ湡', width: 200 }
                         , { field: '閰嶄欢ID', title: '閰嶄欢ID', width: 200, hide: true }
@@ -367,7 +366,7 @@
                     shift: 2,
                     area: ['100%', '100%'],
                     maxmin: true,
-                    content: '../妯℃不鍏风鐞�/妯℃不鍏风鐞�/Sc_MouldMaintainRuleBillEdit.html?OperationType=1&linterid=&HSouceBillType=',
+                    content: '../璁惧瑙勭▼鍗�/Sb_EquipMaintainRuleEdit.html?OperationType=1&linterid=&HSouceBillType=',
                     end: function () {
                         //鍒锋柊椤甸潰,
                         location.reload();
@@ -390,7 +389,7 @@
                         , shade: 0.6 //閬僵閫忔槑搴�
                         , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                         , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                        , content: '../妯℃不鍏风鐞�/妯℃不鍏风鐞�/Sc_MouldMaintainRuleBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
+                        , content: '../璁惧瑙勭▼鍗�/Sb_EquipMaintainRuleEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
                         , resize: false,
                         end: function () {
                             //鍒锋柊椤甸潰,

--
Gitblit v1.9.1