From b742f00aac8e1e1bb628232383c35e67f4a41e4e Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期五, 26 一月 2024 15:21:28 +0800
Subject: [PATCH] 1

---
 WebTM/views/模治具管理/模治具管理/Sc_MouldMaintainPlanBillList.html |  319 +++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 247 insertions(+), 72 deletions(-)

diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldMaintainPlanBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldMaintainPlanBillList.html"
index 4cb421a..caa619e 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldMaintainPlanBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldMaintainPlanBillList.html"
@@ -2,13 +2,15 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title>妯″叿淇濆吇璁″垝琛ㄥ垪琛�</title>
+    <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, maximum-scale=1">
     <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>
     <style type="text/css">
         input.layui-input.layui-unselect {
             padding-right: 0;
@@ -29,15 +31,15 @@
                                     </div>
                                 </div>
                                 <!--<div class="layui-inline">
-                                    <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>-->
+                <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">
@@ -71,20 +73,38 @@
                             </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-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
-                                <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-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" style="display:none;" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-view" id="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-print" id="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Refresh" id="btn-Refresh"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Exit" id="btn-Exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><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>
@@ -95,12 +115,14 @@
     <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 () {
             var $ = layui.$
                 , admin = layui.admin
                 , layer = layui.layer
@@ -110,12 +132,23 @@
                 , laypage = layui.laypage
                 , laydate = layui.laydate
                 , util = layui.util
+                , soulTable = layui.soulTable
             var sWhere = "";
             //鍏敤鍙橀噺
+            var HModName = "Sc_MouldMaintainPlanBillList";
+            var HBillType = "3818";
             var option = [];
+            var option1 = [];
+            var option2 = [];
 
+            $("#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);
 
@@ -130,6 +163,13 @@
                     case 'btn-Edit':
                         set_ShowBill();
                         break;
+                    //棰勮
+                    case 'btn-view': get_ViewReport();
+                        break;
+                    //鎵撳嵃
+                    case 'btn-print': get_PrintReport();
+                        break;
+                    //鍒犻櫎
                     case 'btn-Delete':
                         set_DeleteBill();
                         break;
@@ -145,11 +185,42 @@
                     case 'btn-Print':
                         get_PrintReport();
                         break;
+                    //鍒锋柊
+                    case 'btn-Refresh':
+                        btn_Refresh();
+                        break;
                     //閫�鍑烘寜閽�
-                    case 'btn-Close':
-                        parent.layui.admin.events.closeThisTabs();
+                    case 'btn-Exit': Pub_Close(2);
+                        break;
+                    //鎸夐挳璁剧疆
+                    case 'set_HideButton':
+                        var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                        get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
                         break;
                 };
+            });
+
+            //鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁
+            table.on('row(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
+                var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹�
+                var linterid = datas.hmainid;
+                $.ajax({
+                    url: GetWEBURL() + 'Sc_MouldMaintainPlanBill/Sc_MouldMaintainPlanBillListProjectDetai',
+                    type: "GET",
+                    data: { "sqlWhere": "and hmainid=" + linterid },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            option1.data = data1.list[0];
+                            table.render(option1);
+                            option2.data = data1.list[1];
+                            table.render(option2);
+                        } else {
+                            layer.alert(result.code + result.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+                    }
+                });
             });
 
             //閲嶇疆鎸夐挳
@@ -158,8 +229,11 @@
             });
             //閲嶇疆杩囨护鏉′欢
             function set_ClearQuery() {
+                $("#BenginHCreateDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+                $("#EndHCreateDate").val(Format(new Date(), "yyyy-MM-dd"));
                 $("#HNumber").val("");
                 $("#HName").val("");
+                $("#HBillNo").val("");//鍗曟嵁鍙�
                 sWhere = "";
                 get_Display(sWhere);
             }
@@ -171,7 +245,7 @@
 
             //蹇�熻繃婊�
             function get_FastQuery(table, option) {
-                
+
                 var HDate = $("#BenginHCreateDate").val();//寮�濮嬫棩鏈�
                 var HDate1 = $("#EndHCreateDate").val();//缁撴潫鏃ユ湡
                 var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
@@ -184,7 +258,7 @@
                 if (HBillNo) {
                     sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
                 }
-           
+
                 get_Display(sWhere);
                 sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
             }
@@ -193,61 +267,126 @@
                 option = {
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
-                    , height: 'full-50'
+                    , height: 450
                     , page: 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: '鍗曟嵁ID', hide: true }
-                        , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160 }
-                        , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
-                        , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, 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: '澶囨敞', title: '澶囨敞', width: 200 }
-                        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
-                        , { field: 'hmaterid', title: 'hmaterid', width: 115, hide: true }
-                        , { field: '閰嶄欢浠g爜', title: '閰嶄欢浠g爜', width: 200 }
-                        , { field: '閰嶄欢鍚嶇О', title: '閰嶄欢鍚嶇О', width: 200 }
-                        , { field: 'hunitid', title: 'hunitid', width: 200, hide: true }
-                        , { field: '鍗曚綅浠g爜', title: '鍗曚綅浠g爜', width: 200 }
-                        , { field: '鍗曚綅鍚嶇О', title: '鍗曚綅鍚嶇О', width: 200 }
-                        , { field: '鐢ㄩ噺', title: '鐢ㄩ噺', width: 200 }
-                        , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
-                        , { field: '鏍囧噯鐢ㄩ噺', title: '鏍囧噯鐢ㄩ噺', width: 115 }
-                        , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 115 }
-                        , { 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 }
+                        , { field: 'hmainid', title: '鍗曟嵁ID', 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: '鍛ㄦ湡鍗曚綅', title: '鍛ㄦ湡鍗曚綅', 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: 'hsubid', title: 'hsubid', width: 200, hide: true, sort: true }
+                        , { field: 'hmaterid', title: 'hmaterid', width: 115, hide: true, sort: true }
+                        , { field: '閰嶄欢浠g爜', title: '閰嶄欢浠g爜', width: 200, sort: true }
+                        , { field: '閰嶄欢鍚嶇О', title: '閰嶄欢鍚嶇О', width: 200, sort: true }
+                        , { field: 'hunitid', title: 'hunitid', width: 200, hide: true, sort: true }
+                        , { field: '鍗曚綅浠g爜', title: '鍗曚綅浠g爜', 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: 115, 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, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡 ,'yyyy-MM-dd')}}</div>", sort: true }
+                        , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200, sort: true }
+                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, hide: true, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+                        , { field: '淇敼浜�', title: '淇敼浜�', width: 200, hide: true, sort: true }
+                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 115, hide: true, 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, hide: true, sort: true }
+                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 115, hide: true, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd')}}</div>", 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 }
                     ]]
                 }
             }
 
-          
+            //鍒濆鍖栬〃鏍�(瀛愯〃1)
+            function set_InitGrid1() {
+                var ajaxLoad = layer.load();
+                option1 = {
+                    elem: '#mainTable1'
+                    //, toolbar: '#toolbarDemo'
+                    , height: '250'
+                    , page: true
+                    , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
+                    , cols: [[
+                        //{ type: 'checkbox', fixed: 'left' }
+                        , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left' }
+                        , { field: 'HMaintainItemID', title: '淇濆吇椤圭洰ID', width: 200, hide: true }
+                        , { field: 'HMaintainItemNumber', title: '淇濆吇椤圭洰浠g爜', width: 200 }
+                        , { field: 'HMaintainItem', title: '淇濆吇椤圭洰', width: 200 }
+                        , { field: 'HMaintainPart', title: '淇濆吇閮ㄤ綅', width: 200 }
+                        , { field: 'HClaim', title: '鍏蜂綋瑕佹眰', width: 200 }
+                        , { field: 'HManagerID', title: '璐熻矗浜篒D', width: 200, hide: true }
+                        , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', width: 200 }
+                        , { field: 'HManagerName', title: '璐熻矗浜�', width: 200 }
+                        , { field: 'HRemark', title: '澶囨敞', width: 200 }
+                    ]]
+                };
+                option1.data = [];
+                table.render(option1);
+                layer.close(ajaxLoad);
+            }
+
+            //鍒濆鍖栬〃鏍�(瀛愯〃2)
+            function set_InitGrid2() {
+                var ajaxLoad = layer.load();
+                option2 = {
+                    elem: '#mainTable2'
+                    //, toolbar: '#toolbarDemo'
+                    , height: '250'
+                    , page: true
+                    , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
+                    , cols: [[
+                        //{ type: 'checkbox', fixed: 'left' }
+                        , { templet: '#xuhao1', title: '搴忓彿', sort: true, fixed: 'left'}
+                        , { field: 'HMaterID', title: '閰嶄欢ID', width: 200, hide: true }
+                        , { field: 'HMaterNumber', title: '閰嶄欢浠g爜', width: 200 }
+                        , { field: 'HMaterName', title: '閰嶄欢鍚嶇О', width: 200 }
+                        , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', width: 200, hide: true }
+                        , { 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: 'HRemark', title: '澶囨敞', width: 200 }
+                    ]]
+                };
+                option2.data = [];
+                table.render(option2);
+                layer.close(ajaxLoad);
+            }
+
             //鏂板
             function set_AddNew() {
                 layer.open({
                     type: 2,
                     skin: 'layui-layer-rim', //鍔犱笂杈规
-                    title: '鏂板妯″叿淇濆吇璁″垝鍗�',
+                    title: '鏂板鍣ㄥ叿淇濆吇璁″垝鍗�',
                     closeBtn: false,
                     shift: 2,
                     area: ['100%', '100%'],
@@ -272,7 +411,7 @@
                     layer.open({
                         type: 2
                         , area: ['100%', '100%']
-                        , title: '缂栬緫妯″叿淇濆吇璁″垝鍗�'
+                        , title: '缂栬緫鍣ㄥ叿淇濆吇璁″垝鍗�'
                         , shade: 0.6 //閬僵閫忔槑搴�
                         , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                         , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
@@ -291,6 +430,33 @@
                     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=HMouldMaintainPlanBill&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=HMouldMaintainPlanBill&OpenTmp=鍣ㄥ叿淇濆吇璁″垝鏉$爜");
+
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+                }
+            }
             //鍒犻櫎
             function set_DeleteBill() {
                 var checkStatus = table.checkStatus('mainTable')
@@ -303,7 +469,7 @@
                         $.ajax({
                             type: "GET",
                             url: GetWEBURL() + "/Sc_MouldMaintainPlanBill/DeltetMouldMaintainPlanBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                            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 () {
@@ -328,7 +494,7 @@
                     layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
                 }
             };
-             //鍔犺浇缃戞牸
+            //鍔犺浇缃戞牸
             function get_Display(sWhere) {
                 var ajaxLoad = layer.load();
                 //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
@@ -336,15 +502,20 @@
                     //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                     url: GetWEBURL() + '/Sc_MouldMaintainPlanBill/GetMouldMaintainPlanBillList',
                     type: "GET",
-                    data: { "sWhere": sWhere },
+                    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");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                            Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
                             layer.close(ajaxLoad);
                         } else {
                             layer.close(ajaxLoad);
-                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                            layer.alert("鏆傛棤璁板綍", { icon: 5 });
                         }
                     }, error: function () {
                         layer.close(ajaxLoad);
@@ -358,6 +529,10 @@
             //鍙嶅鏍�
             function set_AbandonCheck() {
             }
+            //鍒锋柊
+            function btn_Refresh() {
+                set_ClearQuery();
+            }
             //浠ヤ笂鏄痩ayui妯″潡
         });
 

--
Gitblit v1.9.1