From 1c47ac8e2a430136b2ab326afa84e53b1e73a5ba Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期三, 14 七月 2021 21:41:56 +0800
Subject: [PATCH] 列表模板整理-磨具报废入库单

---
 WebTM/views/模治具管理/模治具仓库管理/Sc_MouldScrapInBillList.html | 1022 ++++++++++++++++++++++++++++++--------------------------
 WebTM/Properties/PublishProfiles/JFTM.pubxml.user      |   12 
 WebTM/layuiadmin/Scripts/webConfig.js                  |    4 
 WebTM/views/index.html                                 |    2 
 4 files changed, 553 insertions(+), 487 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index dcb2196..b5df938 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -630,7 +630,7 @@
       <publishTime>03/23/2021 14:14:38</publishTime>
     </File>
     <File Include="layuiadmin/Scripts/webConfig.js">
-      <publishTime>07/14/2021 13:31:25</publishTime>
+      <publishTime>07/14/2021 16:00:40</publishTime>
     </File>
     <File Include="layuiadmin/style/admin.css">
       <publishTime>03/23/2021 14:14:38</publishTime>
@@ -1065,7 +1065,7 @@
       <publishTime>07/12/2021 15:38:26</publishTime>
     </File>
     <File Include="views/index.html">
-      <publishTime>07/14/2021 13:28:59</publishTime>
+      <publishTime>07/14/2021 20:10:46</publishTime>
     </File>
     <File Include="views/index_Mobile.html">
       <publishTime>07/14/2021 13:14:15</publishTime>
@@ -1560,7 +1560,7 @@
       <publishTime>07/13/2021 17:09:13</publishTime>
     </File>
     <File Include="views/妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapInBillList.html">
-      <publishTime>07/06/2021 10:55:14</publishTime>
+      <publishTime>07/14/2021 21:30:44</publishTime>
     </File>
     <File Include="views/妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapOutBillList.html">
       <publishTime>07/13/2021 17:09:13</publishTime>
@@ -1581,7 +1581,7 @@
       <publishTime>06/15/2021 16:41:12</publishTime>
     </File>
     <File Include="views/妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_MouldScrapInBillList.html">
-      <publishTime>07/07/2021 15:15:06</publishTime>
+      <publishTime>07/14/2021 21:06:33</publishTime>
     </File>
     <File Include="views/妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_MouldScrapInBill_PDA.html">
       <publishTime>06/28/2021 15:13:43</publishTime>
@@ -1662,7 +1662,7 @@
       <publishTime>07/13/2021 17:09:13</publishTime>
     </File>
     <File Include="views/妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapInBillList.html">
-      <publishTime>07/06/2021 10:55:14</publishTime>
+      <publishTime>07/14/2021 21:30:44</publishTime>
     </File>
     <File Include="views/妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapOutBillList.html">
       <publishTime>07/13/2021 17:09:13</publishTime>
@@ -1683,7 +1683,7 @@
       <publishTime>06/15/2021 16:41:12</publishTime>
     </File>
     <File Include="views/妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_MouldScrapInBillList.html">
-      <publishTime>07/07/2021 15:15:06</publishTime>
+      <publishTime>07/14/2021 21:06:33</publishTime>
     </File>
     <File Include="views/妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_MouldScrapOutBillList.html">
       <publishTime>06/09/2021 13:43:29</publishTime>
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index 34475e5..7980c71 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -1,7 +1,7 @@
 锘縡unction GetWEBURL() {
     //var WEBURL = "http://192.168.16.80:8011/";          //鍔炲叕瀹ゆ湇鍔″櫒
     //var WEBURL = "http://localhost:8081/SWEAPI/";       //ch鏈湴
-    //var WEBURL = "http://localhost:8085/API/";   //zgq鏈湴
+    var WEBURL = "http://localhost:8085/API/";   //zgq鏈湴
     //var WEBURL = "http://192.168.2.21:8081/lubaoWebAPI/";//鐜嬫案娉㈡湰鍦伴厤缃紝璇峰嬁鏇存敼
      //var WEBURL = "http://101.37.171.70/API/";   //鍏徃鏈嶅姟鍣�
     //var WEBURL = "http://localhost:8080/API/";   //棰滄檽鍐涙湰鍦伴厤缃�
@@ -9,7 +9,7 @@
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //鏉ㄩ湶鏈湴閰嶇疆
     //var WEBURL = "http://10.1.4.154/API/";   //姹熶赴瀹㈡埛
     //var WEBURL = "http://10.1.4.155/API/";   //姹熶赴瀹㈡埛NEW
-    var WEBURL = "http://47.96.97.237/API/";   //鏅轰簯鏈嶅姟鍣�
+    //var WEBURL = "http://47.96.97.237/API/";   //鏅轰簯鏈嶅姟鍣�
     //var WEBURL = "http://183.129.128.86:9090/API/";   //鍑礉濂堢壒瀹㈡埛鏈嶅姟鍣�
     return WEBURL
 }
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 2400ba1..b218760 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -470,7 +470,7 @@
                                         <dd><a lay-href="妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapOutBillList.html">澶勭悊鍑哄簱鍗�</a></dd>
                                         <dd><a lay-href="妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_MouldScrapOutBillList.html">澶勭悊鍑哄簱鍗曠淮鎶�</a></dd>
                                         <dd><a lay-href="妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapInBillList.html">鎶ュ簾鍏ュ簱鍗�</a></dd>
-                                        <dd><a lay-href="妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_MouldScrapInBillList.html">鎶ュ簾鍏ュ簱鍗曠淮鎶�<a></dd>
+                                        <dd><a lay-href="妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_MouldScrapInBillList.html">鎶ュ簾鍏ュ簱鍗曠淮鎶�</a></dd>
                                         <dd><a lay-href="妯℃不鍏风鐞�/妯℃不鍏风鐞�/Sc_MouldOtherInBill.html">鍏朵粬鍏ュ簱鍗�</a></dd>
                                         <dd><a lay-href="妯℃不鍏风鐞�/妯℃不鍏风鐞�/Sc_MouldOtherInBillList.html">鍏朵粬鍏ュ簱鍗曠淮鎶�</a></dd>
                                         <dd><a lay-href="妯℃不鍏风鐞�/妯℃不鍏蜂粨搴撶鐞�/Sc_MouldOtherOutBill.html">鍏朵粬鍑哄簱鍗�</a></dd>
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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapInBillList.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapInBillList.html"
index 14e939a..8efebae 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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapInBillList.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapInBillList.html"
@@ -9,6 +9,10 @@
     <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/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
     <style type="text/css">
         input.layui-input.layui-unselect {
             padding-right: 0;
@@ -35,7 +39,7 @@
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鐘舵��</label>
                                     <div class="layui-input-block">
-                                        <select name="Status" lay-filter="Status" style="width:190px;">
+                                        <select name="HStatus" lay-filter="HStatus" style="width:190px;">
                                             <option value="-1" selected="selected">鍏ㄩ儴</option>
                                             <option value="0">鏈鏍�</option>
                                             <option value="1">宸插鏍�</option>
@@ -46,13 +50,13 @@
                                 <div class="layui-inline">
                                     <label class="layui-form-label">寮�濮嬫棩鏈�</label>
                                     <div class="layui-input-block">
-                                        <input type="date" class="layui-input" id="HDate" style="width:190px;">
+                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                     </div>
                                 </div>
                                 <div class="layui-inline">
                                     <label class="layui-form-label">缁撴潫鏃ユ湡</label>
                                     <div class="layui-input-block">
-                                        <input type="date" class="layui-input" id="HDate1" style="width:190px;">
+                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                     </div>
                                 </div>
                                 <div class="layui-inline">
@@ -74,7 +78,7 @@
                                     <div class="layui-inline">
                                         <label class="layui-form-label">閮ㄩ棬淇℃伅</label>
                                         <div class="layui-input-block">
-                                            <input type="text" class="layui-input" name="Dept" id="Dept" style="width:190px;">
+                                            <input type="text" class="layui-input" name="HDept" id="HDept" style="width:190px;">
                                         </div>
                                     </div>
                                 </div>
@@ -83,7 +87,6 @@
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
                         <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>
@@ -100,14 +103,7 @@
             </div>
         </div>
     </div>
-    <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>
-
-        var DataList;
-        var Name = "MouldScrapInHouseCellWidth";
         layui.config({
             base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
         }).extend({
@@ -122,500 +118,570 @@
                 , laypage = layui.laypage
                 , laydate = layui.laydate
                 , util = layui.util
-            //鏌ヨ鏉′欢
+            //鍏敤鍙橀噺
             var sWhere = "";
-            var columns = [
-                { type: 'checkbox', fixed: 'left' }
-                , { field: 'hmainid', title: '鍗曟嵁ID', width: 200, hide: true }
-                , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200, totalRowText: '鍚堣', templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
-                , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200 }
-                , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 200 }
-                , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true }
-                , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 200 }
-                , { field: '璐熻矗浜哄悕绉�', title: '璐熻矗浜哄悕绉�', width: 200 }
-                , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
-                , { field: '浠撳簱浠g爜', title: '浠撳簱浠g爜', width: 200 }
-                , { field: '浠撳簱鍚嶇О', title: '浠撳簱鍚嶇О', width: 200 }
-                , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true }
-                , { field: '楠屾敹鍛樹唬鐮�', title: '楠屾敹鍛樹唬鐮�', width: 200 }
-                , { field: '楠屾敹鍛樺悕绉�', title: '楠屾敹鍛樺悕绉�', width: 200 }
-                , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true }
-                , { field: '淇濈鍛樹唬鐮�', title: '淇濈鍛樹唬鐮�', width: 200 }
-                , { field: '淇濈鍛樺悕绉�', title: '淇濈鍛樺悕绉�', width: 200 }
-                , { field: 'HDeptID', title: 'HDeptID', 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: 200 }
-                , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
-                , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
-                , { field: '妯″叿浠g爜', title: '妯″叿浠g爜', width: 200 }
-                , { field: '妯″叿鍚嶇О', title: '妯″叿鍚嶇О', width: 200 }
-                , { field: 'HPropertyID', title: 'HPropertyID', width: 200, hide: true }
-                , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 200 }
-                , { field: '杈呭姪灞炴�у悕绉�', title: '杈呭姪灞炴�у悕绉�', width: 200 }
-                , { field: 'HSecUnitID', title: 'HSecUnitID', 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: 200, totalRow: true }
-                , { field: '鍗曚环', title: '鍗曚环', width: 200 }
-                , { field: '閲戦', title: '閲戦', width: 200 }
-                , { field: '璁捐瀵垮懡', title: '璁捐瀵垮懡', width: 200 }
-                , { field: '浣跨敤瀵垮懡', title: '浣跨敤瀵垮懡', width: 200 }
-                , { field: '鍓╀綑瀵垮懡', title: '鍓╀綑瀵垮懡', width: 200 }
-                , { field: 'HWHID1', title: 'HWHID1', width: 200, hide: true }
-                , { field: '鏀舵枡浠撳簱浠g爜', title: '鏀舵枡浠撳簱浠g爜', width: 200 }
-                , { field: '鏀舵枡浠撳簱鍚嶇О', title: '鏀舵枡浠撳簱鍚嶇О', width: 200 }
-                , { field: 'HSPID', title: 'HSPID', 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: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
-                , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                , { field: '淇敼浜�', title: '淇敼浜�', width: 200 }
-                , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
-                , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
-                , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
-                , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 200 }
-                , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
-                , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
-                , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
-                , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
-                , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
-            ];
-
-            var newColumns = [];
-            var colWidth = getColumnsWidth();
-            if (colWidth == "" || colWidth == []) {
-
-            }
-            else
-            {
-                $.each(columns, function (x, m) {
-                    m["width"] = colWidth[x];
-                });
-            }
-
-            var option = {
-                elem: '#mainTable'
-                , toolbar: '#toolbarDemo'
-                , page: true
-                , cellMinWidth: 120
-                , totalRow: true
-                , limit: 10
-                , cols: [columns]
-                , done: function (res, curr, count) {
-
-                    //鐒跺悗鎶婂�煎啓涓婂幓td[data-field="itemNo" 瀹氫箟鍦ㄥ摢涓垪鍚庢樉绀�
-                    var countQty = 0;
-                    for (var i = 0; i < DataList.length; i++) {
-                        countQty += parseFloat(DataList[i].瀹炴敹鏁伴噺);
-                    }
-                    this.elem.next().find('.layui-table-total td[data-field="瀹炴敹鏁伴噺"] .layui-table-cell').text(countQty);
-                }
-            };
-            var index = layer.load(0);
+            var option = [];
+            var DataList;
+            var Name = "MouldScrapInHouseCellWidth";
+            //鍒濆鍖栬〃鏍�
+            set_InitGrid();
 
             //澶村伐鍏锋爮浜嬩欢
             table.on('toolbar(mainTable)', function (obj) {
-                var checkStatus = table.checkStatus(obj.config.id);
                 switch (obj.event) {
-                    case 'btn-Add':
-                        //椤甸潰灞�-鑷畾涔�
-                        layer.open({
-                            type: 2,
-                            skin: 'layui-layer-rim', //鍔犱笂杈规
-                            title: '鏂板妯℃不鍏锋姤搴熷叆搴撳崟',
-                            closeBtn: 1,
-                            shift: 2,
-                            area: ['100%', '100%'],
-                            maxmin: true,
-                            content: '../妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapInBillList.html',
-                            end: function () {
-                                //鍒锋柊椤甸潰,
-                                location.reload();
-                            },
-                            success: function (layero, index) {
-
-                            }
-                        });
+                    //鏂板鎸夐挳
+                    case 'btn-Add':set_AddNew();
                         break;
-                    case 'btn-Edit':
-                        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: '缂栬緫妯℃不鍏锋姤搴熷叆搴撳崟'
-                                , closeBtn: 1
-                                , shade: 0.6 //閬僵閫忔槑搴�
-                                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                                , content: '../妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapInBillList.html?hID=' + hID
-                                , resize: false,
-                                end: function () {
-                                    //鍒锋柊椤甸潰,
-                                    location.reload();
-                                }
-                                , cancel: function () {
-                                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                                }
-                            })
-
-                        } else {
-                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
-                        }
-
+                    //缂栬緫鎸夐挳
+                    case 'btn-Edit':set_ShowBill();
                         break;
-                    case 'btn-Delete':
-                        var checkStatus = table.checkStatus('mainTable')
-                            , data = checkStatus.data;
-                        if (checkStatus.data.length === 1) {
-                            var InterID = data[0].hmainid.toString();
-                            //閫昏緫鍒犻櫎鏂规硶
-                            layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
-                                $.ajax({
-                                    type: "GET",
-                                    url: GetWEBURL() + "Sc_MouldScrapInHouseBill/DeltetMouldScrapInHouseBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                                    data: { "HInterID": InterID },
-                                    success: function (result) {
-                                        if (result.count == 1) {
-                                            layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
-                                                // 寰楀埌frame绱㈠紩
-                                                var index = layer.getFrameIndex(window.name);
-                                                //鍏抽棴褰撳墠frame
-                                                layer.close(index);
-                                                //淇敼涓哄姛鍚庡埛鏂扮晫闈�
-                                                window.location.reload();
-                                            });
-
-                                        } else {
-                                            layer.alert(result.code + result.Message, { icon: 5 });
-                                        }
-                                    }, error: function () {
-                                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
-                                    }
-                                });
-                            })
-                        }
-                        else {
-                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
-                        }
+                    //鍒犻櫎鎸夐挳
+                    case 'btn-Delete':set_DeleteBill();
                         break;
-
-                    case 'btn-Audit':
-                        var checkStatus = table.checkStatus('mainTable')
-                            , data = checkStatus.data;
-                        if (checkStatus.data.length === 1) {
-                            var InterID = data[0].hmainid.toString();
-                            //閫昏緫瀹℃牳鏂规硶
-                            $.ajax({
-                                type: "GET",
-                                url: GetWEBURL() + "/Sc_MouldScrapInHouseBill/MouldScrapInHouseAudit", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                                data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
-                                success: function (result) {
-                                    if (result.count == 1) {
-                                        layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
-                                            // 寰楀埌frame绱㈠紩
-                                            var index = layer.getFrameIndex(window.name);
-                                            //鍏抽棴褰撳墠frame
-                                            layer.close(index);
-                                            //淇敼涓哄姛鍚庡埛鏂扮晫闈�
-                                            $("#btnSearch").trigger('click');
-                                        });
-
-                                    } else {
-                                        layer.alert(result.code + result.Message, { icon: 5 });
-                                    }
-                                }, error: function () {
-                                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
-                                }
-                            });
-                        }
-                        else {
-                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
-                        }
+                    //瀹℃牳鎸夐挳
+                    case 'btn-Audit':set_CheckBill();
                         break;
-
-                    case 'btn-DeAudit':
-                        var checkStatus = table.checkStatus('mainTable')
-                            , data = checkStatus.data;
-                        if (checkStatus.data.length === 1) {
-                            var InterID = data[0].hmainid.toString();
-                            //閫昏緫瀹℃牳鏂规硶
-                            $.ajax({
-                                type: "GET",
-                                url: GetWEBURL() + "/Sc_MouldScrapInHouseBill/MouldScrapInHouseAudit", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                                data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] },
-                                success: function (result) {
-                                    if (result.count == 1) {
-                                        layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
-                                            // 寰楀埌frame绱㈠紩
-                                            var index = layer.getFrameIndex(window.name);
-                                            //鍏抽棴褰撳墠frame
-                                            layer.close(index);
-                                            //淇敼涓哄姛鍚庡埛鏂扮晫闈�
-                                            $("#btnSearch").trigger('click');
-                                        });
-
-                                    } else {
-                                        layer.alert(result.code + result.Message, { icon: 5 });
-                                    }
-                                }, error: function () {
-                                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
-                                }
-                            });
-                        }
-                        else {
-                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹弽瀹℃牳锛�');
-                        }
+                    //鍙嶅鏍告寜閽�
+                    case 'btn-DeAudit':set_AbandonCheck();
                         break;
-                    case 'btn-Print':
-                        var checkStatus = table.checkStatus('mainTable')
-                            , data = checkStatus.data;
-                        if (checkStatus.data.length === 1) {
-                            var InterID = data[0].hmainid.toString();
-                            layer.alert("鎴戞槸鎵撳嵃鎸夐挳锛佸崟鎹富ID鏄細" + InterID);
-                            //window.open("../鐢熶骇宸ュ簭绠$悊/宸ュ簭姹囨姤鍗�/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b");
-                            window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + InterID + "&Type=HDepartMent" + "&OpenTmp=b");
-                        }
-                        else {
-                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹弽瀹℃牳锛�');
-                        }
+                    //棰勮鎸夐挳
+                    case 'btn-Print':get_PrintReport();
                         break;
-                    case 'btn-Cell': //淇濆瓨鍒楀
-                        var arr = [];
-                        // 鍒楁暟
-                        var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
-                        for (var i = 0; i <= colNum; i++)
-                        {
-                            var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
-                            var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width();
-                            if (colName != "" && colName != null)
-                            {
-                                arr.push(colWidth == -1 ? 200 : colWidth);
-                            }
-                        }
-                        arr.unshift(40); //棣栦綅杩藉姞
-                        $.ajax({
-                            url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
-                            async: false,
-                            type: "POST",
-                            dataType: "json",
-                            data: { "myMap": JSON.stringify(arr), "Name": Name},
-                            success: function (data1) {
-                                if (data1.count == 1) {
-                                    layer.alert(data1.Message, { icon: 1 });
-                                } else {
-                                    layer.alert(data1.Message, { icon: 5 });
-                                }
-                            }, error: function (e) {
-                                layer.alert(e.Message, { icon: 5 });
-                            }
-                        });
-                        //璁剧疆璧嬪�煎垪瀹�
-                        var colWidth = getColumnsWidth();
-                        if (colWidth == "" || colWidth == []) {
-
-                        }
-                        else {
-                            $.each(columns, function (x, m) {
-                                m["width"] = colWidth[x];
-                            });
-                        }
-                        SearchLoad(sWhere, table, option);
+                    //淇濆瓨鍒楀鎸夐挳
+                    case 'btn-Cell': set_SaveGridColWidth();
                         break;
-                    case 'btn-RefreshCell':   //榛樿鍒楀
-                        var arr = [];
-                        // 鍒楁暟
-                        var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
-                        for (var i = 0; i <= colNum; i++) {
-                            var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
-                            if (colName != "" && colName != null) {
-                                arr.push(200);   //榛樿瀹藉害200
-                            }
-                        }
-                        arr.unshift(40); //棣栦綅杩藉姞
-
-                        $.ajax({
-                            url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
-                            async: false,
-                            type: "POST",
-                            dataType: "json",
-                            data: { "myMap": JSON.stringify(arr), "Name": Name },
-                            success: function (data1) {
-                                if (data1.count == 1) {
-                                    layer.alert(data1.Message, { icon: 1 });
-
-                                } else {
-                                    layer.alert(data1.Message, { icon: 5 });
-                                }
-                            }, error: function (e) {
-                                layer.alert(e.Message, { icon: 5 });
-                            }
-                        });
-                        //璁剧疆璧嬪�煎垪瀹�
-                        var colWidth = getColumnsWidth();
-                        if (colWidth == "" || colWidth == []) {
-
-                        }
-                        else {
-                            $.each(columns, function (x, m) {
-                                m["width"] = colWidth[x];
-                            });
-                        }
-                        SearchLoad(sWhere, table, option);
+                    //榛樿鍒楀鎸夐挳
+                    case 'btn-RefreshCell': set_DefaultGridColWidth();
                         break;
                 };
             });
 
             //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
-            $.ajax({
-                url: GetWEBURL() + '/Sc_MouldScrapInHouseBill/GetMouldScrapInHouseBill',
-                type: "GET",
-                data: { "sWhere": sWhere},
-                success: function (data1) {
-                    if (data1.count == 1) {
-                        DataList = data1.data;
-                        option.data = data1.data;
-                        table.render(option);
-
-                        layer.close(index);
-                    } else {
-                        layer.close(index);
-                        layer.alert(data1.code + data1.Message, { icon: 5 });
-                    }
-                }, error: function () {
-                    layer.close(index);
-                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
-                }
-            });
+            get_Display(sWhere);
 
             //閲嶇疆鎸夐挳
             form.on('submit(btnReSearch)', function (data) {
-                $('#Status').find("option[value='-1']").attr("selected", true);
-                $("#HDate").val("");//寮�濮嬫棩鏈�
-                $("#HDate1").val("");//缁撴潫鏃ユ湡
-                $("#HBillNo").val("");
-                $("#Dept").val("");
-                $("#Part").val("");
-                $("#btnSearch").click();
+                set_ClearQuery();
             });
 
             //鏌ヨ鎸夐挳
-            form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
-                SearchLoad(sWhere, table, option);
-
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery(table, option);
             });
 
-            //鐩戝惉琛屽弻鍑讳簨浠�
-            table.on('rowDouble(mainTable)', function (obj) {
-                layer.alert("鍙屽嚮浜嬩欢", { icon: 1 });
-            });
+            //蹇�熻繃婊�
+            function get_FastQuery(table, option) {
+                var HStatus = $("select[name='HStatus']").val();//鐘舵��
+                var HBeginDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
+                var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
+                var HBillNo = $("#HBillNo").val(); //鍗曟嵁鍙�
+                var HDept = $("#HDept").val();       //閮ㄩ棬淇℃伅
+                if (HStatus) {
+                    switch (HStatus) {
+                        case '-1':   //鍏ㄩ儴
+                            sWhere += "";
+                            break;
+                        case '0':    //鏈鏍�
+                            sWhere += " and 瀹℃牳浜�=''";
+                            break;
+                        case '1':    //宸插鏍�
+                            sWhere += " and 瀹℃牳浜�<>''";
+                            break;
+                        case '2':    //宸插叧闂�
+                            sWhere += " and 鍏抽棴浜�<>''";
+                        default:
+
+                    }
+                }
+                if (HBeginDate) {
+                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HBeginDate + "'";
+                }
+                if (HEndDate) {
+                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HEndDate + "'";
+                }
+                if (HBillNo) {
+                    sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+                }
+                if (HDept) {
+                    sWhere += " and 閮ㄩ棬鍚嶇О like '%" + HDept + "%'";
+                }
+                var index = layer.load(0);
+                get_Display(sWhere);
+                //璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+                sWhere = "";
+            }
+
+            //鑾峰彇鍒楀
+            function getColumnsWidth() {
+                var result = [];
+                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
+                //鑾峰彇鍒楀
+                $.ajax({
+                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidthList',
+                    async: false,
+                    type: "Get",
+                    dataType: "json",
+                    data: { "colNum": colNum, "Name": Name },
+                    success: function (data1) {
+                        if (data1.code == 1) {
+                            result = data1.data;
+                        }
+                        else if (data1.code == -1) {
+
+                        }
+                        else {
+                            layer.alert(data1.Message, { icon: 5 });
+                        }
+                    }, error: function (e) {
+                        layer.alert(e.Message, { icon: 5 });
+                    }
+                });
+
+                return result;
+            }
+
+            //鍔犺浇缃戞牸
+            function get_Display(sWhere) {
+                //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                var wait = layer.load();//閬僵
+                $.ajax({
+                    url: GetWEBURL() + '/Sc_MouldScrapInBill/get_Display',
+                    type: "GET",
+                    data: { "sWhere": sWhere },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            DataList = data1.data;
+                            option.data = data1.data;
+                            table.render(option);
+                            layer.close(wait);
+                        } else {
+                            layer.close(wait);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(wait);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+
+            //缂栬緫鍗曟嵁
+            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: '缂栬緫妯℃不鍏锋姤搴熷叆搴撳崟'
+                        , closeBtn: 1
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: '../妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapInBillList.html?hID=' + hID
+                        , resize: false,
+                        end: function () {
+                            get_FastQuery(table, option);
+                        }
+                        , cancel: function () {
+                            //$(".layui-btn").removeClass("layui-btn-disabled");
+                        }
+                    })
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+
+            //瀹℃牳
+            function set_CheckBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    var wait = layer.load();
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Sc_MouldScrapInBill/set_CheckBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                    // 寰楀埌frame绱㈠紩
+                                    var index = layer.getFrameIndex(window.name);
+                                    //鍏抽棴褰撳墠frame
+                                    layer.close(index);
+                                    //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                    get_FastQuery(table, option);
+                                });
+                            } else {
+                                layer.alert(result.Message, { icon: 5 });
+                            }
+                            layer.close(wait);
+                        }, error: function () {
+                            layer.close(wait);
+                            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        }
+                    });
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+                }
+            }
+
+            //鍙嶅鏍�
+            function set_AbandonCheck() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    var wait = layer.load();
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Sc_MouldScrapInBill/set_AbandonCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                    // 寰楀埌frame绱㈠紩
+                                    var index = layer.getFrameIndex(window.name);
+                                    //鍏抽棴褰撳墠frame
+                                    layer.close(index);
+                                    //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                    get_FastQuery(table, option);
+                                });
+
+                            } else {
+                                layer.alert(result.code + result.Message, { icon: 5 });
+                            }
+                            layer.close(wait);
+                        }, error: function () {
+                            layer.close(wait);
+                            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        }
+                    });
+                }
+                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();
+                    layer.alert("鎴戞槸鎵撳嵃鎸夐挳锛佸崟鎹富ID鏄細" + InterID);
+                    //window.open("../鐢熶骇宸ュ簭绠$悊/宸ュ簭姹囨姤鍗�/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b");
+                    window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + InterID + "&Type=HDepartMent" + "&OpenTmp=b");
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+                }
+            }
+
+            //鏂板
+            function set_AddNew() {
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '鏂板妯℃不鍏锋姤搴熷叆搴撳崟',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['100%', '100%'],
+                    maxmin: true,
+                    content: '../妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapInBillList.html',
+                    end: function () {
+                        //鍒锋柊椤甸潰,
+                        get_FastQuery(table, option);
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            }
+
+            //鍒犻櫎
+            function set_DeleteBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫鍒犻櫎鏂规硶
+                    layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+                        var wait = layer.load();
+                        $.ajax({
+                            type: "GET",
+                            url: GetWEBURL() + "Sc_MouldScrapInBill/set_DeleteBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            data: { "HInterID": InterID },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                        // 寰楀埌frame绱㈠紩
+                                        var index = layer.getFrameIndex(window.name);
+                                        //鍏抽棴褰撳墠frame
+                                        layer.close(index);
+                                        //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                        window.location.reload();
+                                    });
+
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                }
+                                layer.close(wait);
+                            }, error: function () {
+                                layer.close(wait);
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                            }
+                        });
+                    })
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+                }
+            }
+
+            //澶嶅埗鍗曟嵁
+            function set_CopyBill() {
+
+            }
+
+            //鍏抽棴鍗曟嵁
+            function set_CloseBill() {
+
+            }
+
+            //鍙嶅叧闂崟鎹�
+            function set_CancelCloseBill() {
+
+            }
+
+            //浣滃簾鍗曟嵁
+            function set_CancelltionBill() {
+
+            }
+
+            //鍙嶄綔搴�
+            function set_AbandonCancelltion() {
+
+            }
+
+            //铏氭嫙鑾峰彇閫変腑琛岋紝浣嗘槸鏃犳硶鑾峰彇閫変腑琛屾暟鎹�
+            //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');
+            //    } else {
+            //        obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');
+            //    }
+            //    layui.each(table.cache.userTable, function (i, l) {
+            //        if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+            //            l.LAY_CHECKED = flag;
+            //        }
+            //    });
+            //});
+            /** */
+
+            //鍒濆鍖栬〃鏍�
+            function set_InitGrid() {
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+                var columns = [
+                    { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }
+                    , { field: 'hmainid', title: '鍗曟嵁ID', width: 200, hide: true }
+                    , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200 }
+                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200 }
+                    , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 200 }
+                    , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true }
+                    , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 200 }
+                    , { field: '璐熻矗浜哄悕绉�', title: '璐熻矗浜哄悕绉�', width: 200 }
+                    , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
+                    , { field: '浠撳簱浠g爜', title: '浠撳簱浠g爜', width: 200 }
+                    , { field: '浠撳簱鍚嶇О', title: '浠撳簱鍚嶇О', width: 200 }
+                    , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true }
+                    , { field: '楠屾敹鍛樹唬鐮�', title: '楠屾敹鍛樹唬鐮�', width: 200 }
+                    , { field: '楠屾敹鍛樺悕绉�', title: '楠屾敹鍛樺悕绉�', width: 200 }
+                    , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true }
+                    , { field: '淇濈鍛樹唬鐮�', title: '淇濈鍛樹唬鐮�', width: 200 }
+                    , { field: '淇濈鍛樺悕绉�', title: '淇濈鍛樺悕绉�', width: 200 }
+                    , { field: 'HDeptID', title: 'HDeptID', 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: 200 }
+                    , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
+                    , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
+                    , { field: '妯″叿浠g爜', title: '妯″叿浠g爜', width: 200 }
+                    , { field: '妯″叿鍚嶇О', title: '妯″叿鍚嶇О', width: 200 }
+                    , { field: 'HPropertyID', title: 'HPropertyID', width: 200, hide: true }
+                    , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 200 }
+                    , { field: '杈呭姪灞炴�у悕绉�', title: '杈呭姪灞炴�у悕绉�', width: 200 }
+                    , { field: 'HSecUnitID', title: 'HSecUnitID', 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: 200, totalRow: true }
+                    , { field: '鍗曚环', title: '鍗曚环', width: 200 }
+                    , { field: '閲戦', title: '閲戦', width: 200, totalRow: true }
+                    , { field: '璁捐瀵垮懡', title: '璁捐瀵垮懡', width: 200 }
+                    , { field: '浣跨敤瀵垮懡', title: '浣跨敤瀵垮懡', width: 200 }
+                    , { field: '鍓╀綑瀵垮懡', title: '鍓╀綑瀵垮懡', width: 200 }
+                    , { field: 'HWHID1', title: 'HWHID1', width: 200, hide: true }
+                    , { field: '鏀舵枡浠撳簱浠g爜', title: '鏀舵枡浠撳簱浠g爜', width: 200 }
+                    , { field: '鏀舵枡浠撳簱鍚嶇О', title: '鏀舵枡浠撳簱鍚嶇О', width: 200 }
+                    , { field: 'HSPID', title: 'HSPID', 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: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                    , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
+                    , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                    , { field: '淇敼浜�', title: '淇敼浜�', width: 200 }
+                    , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                    , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
+                    , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                    , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
+                    , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                    , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
+                    , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 200 }
+                    , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
+                    , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
+                    , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
+                    , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
+                    , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
+                ];
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , page: true
+                    , cellMinWidth: 120
+                    , totalRow: true
+                    , limit: 10
+                    , height: 'full-50'
+                    , cols: [columns]
+                    , done: function (res, curr, count) {
+
+                    }
+                };
+                //璁剧疆鍒楀
+                var colWidth = getColumnsWidth();
+                if (colWidth == "" || colWidth == []) {
+
+                }
+                else {
+                    $.each(columns, function (x, m) {
+                        m["width"] = colWidth[x];
+                    });
+                }
+            }
+
+            //閲嶇疆杩囨护鏉′欢
+            function set_ClearQuery() {
+                $('#HStatus').find("option[value='-1']").attr("selected", true);
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HBillNo").val("");
+                $("#HDept").val("");
+            }
+
+            //淇濆瓨鍒楀
+            function set_SaveGridColWidth() {
+                var arr = [];
+                // 鍒楁暟
+                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
+                for (var i = 0; i <= colNum; i++) {
+                    var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
+                    var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width();
+                    if (colName != "" && colName != null) {
+                        arr.push(colWidth == -1 ? 200 : colWidth);
+                    }
+                }
+                arr.unshift(40); //棣栦綅杩藉姞
+                $.ajax({
+                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
+                    async: false,
+                    type: "POST",
+                    dataType: "json",
+                    data: { "myMap": JSON.stringify(arr), "Name": Name },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            layer.alert(data1.Message, { icon: 1 });
+                        } else {
+                            layer.alert(data1.Message, { icon: 5 });
+                        }
+                    }, error: function (e) {
+                        layer.alert(e.Message, { icon: 5 });
+                    }
+                });
+                //璁剧疆璧嬪�煎垪瀹�
+                var colWidth = getColumnsWidth();
+                if (colWidth == "" || colWidth == []) {
+
+                }
+                else {
+                    $.each(columns, function (x, m) {
+                        m["width"] = colWidth[x];
+                    });
+                }
+                get_FastQuery(table, option);
+            }
+
+            //榛樿鍒楀
+            function set_DefaultGridColWidth() {
+                var arr = [];
+                // 鍒楁暟
+                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
+                for (var i = 0; i <= colNum; i++) {
+                    var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
+                    if (colName != "" && colName != null) {
+                        arr.push(200);   //榛樿瀹藉害200
+                    }
+                }
+                arr.unshift(40); //棣栦綅杩藉姞
+                $.ajax({
+                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
+                    async: false,
+                    type: "POST",
+                    dataType: "json",
+                    data: { "myMap": JSON.stringify(arr), "Name": Name },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            layer.alert(data1.Message, { icon: 1 });
+
+                        } else {
+                            layer.alert(data1.Message, { icon: 5 });
+                        }
+                    }, error: function (e) {
+                        layer.alert(e.Message, { icon: 5 });
+                    }
+                });
+                //璁剧疆璧嬪�煎垪瀹�
+                var colWidth = getColumnsWidth();
+                if (colWidth == "" || colWidth == []) {
+
+                }
+                else {
+                    $.each(columns, function (x, m) {
+                        m["width"] = colWidth[x];
+                    });
+                }
+                get_FastQuery(table, option);
+            }
+
+
+
 
             //浠ヤ笂鏄痩ayui妯″潡
         });
-
-        function SearchLoad(sWhere,table,option) {
-            var Status = $("select[name='Status']").val();//鐘舵��
-            var HDate = $("#HDate").val();//寮�濮嬫棩鏈�
-            var HDate1 = $("#HDate1").val();//缁撴潫鏃ユ湡
-            var HBillNo = $("#HBillNo").val(); //鍗曟嵁鍙�
-            var Dept = $("#Dept").val();       //閮ㄩ棬淇℃伅
-            var Part = $("#Part").val();       //鐗╂枡淇℃伅
-            if (Status) {
-                switch (Status) {
-                    case '-1':   //鍏ㄩ儴
-                        sWhere += "";
-                        break;
-                    case '0':    //鏈鏍�
-                        sWhere += " and 瀹℃牳浜�=''";
-                        break;
-                    case '1':    //宸插鏍�
-                        sWhere += " and 瀹℃牳浜�<>''";
-                        break;
-                    case '2':    //宸插叧闂�
-                        sWhere += " and 鍏抽棴浜�<>''";
-                    default:
-
-                }
-            }
-            if (HDate) {
-                sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
-            }
-            if (HDate1) {
-                sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HDate1 + "'";
-            }
-            if (HBillNo) {
-                sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
-            }
-            if (Dept) {
-                sWhere += " and 閮ㄩ棬鍚嶇О like '%" + Dept + "%'";
-            }
-            var index = layer.load(0);
-            $.ajax({
-                url: GetWEBURL() + '/Sc_MouldScrapInHouseBill/GetMouldScrapInHouseBill',
-                type: "GET",
-                data: { "sWhere": sWhere },
-                success: function (data1) {
-                    if (data1.count == 1) {
-                        DataList = data1.data;
-                        option.data = data1.data;
-                        table.render(option);
-                        layer.close(index);
-                        layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
-                    } else {
-                        layer.close(index);
-                        layer.alert(data1.code + data1.Message, { icon: 5 });
-                    }
-                }, error: function () {
-                    layer.close(index);
-                    layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
-                }
-            });
-            //璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
-            sWhere = "";
-        }
-
-        function getColumnsWidth() {
-            var result = [];
-            var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
-            //鑾峰彇鍒楀
-            $.ajax({
-                url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidthList',
-                async: false,
-                type: "Get",
-                dataType: "json",
-                data: { "colNum": colNum, "Name": Name },
-                success: function (data1) {
-                    if (data1.code == 1) {
-                        result = data1.data;
-                    }
-                    else if (data1.code == -1)
-                    {
-
-                    }
-                    else {
-                        layer.alert(data1.Message, { icon: 5 });
-                    }
-                }, error: function (e) {
-                    layer.alert(e.Message, { icon: 5 });
-                }
-            });
-
-            return result;
-        }
     </script>
 
 </body>

--
Gitblit v1.9.1