From baa980a58e7fa79fcab8a610f8d02a48c1b3e8ad Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期五, 10 五月 2024 17:39:14 +0800
Subject: [PATCH] 1.发货通知单,销售出库单 选单后,给子表 仓库 赋值 2.销售订单列表 增加子表 仓库ID与名称字段 已隐藏

---
 WebTM/views/验收入库/委外入库/Kf_EntrustInBillList.html |  804 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 601 insertions(+), 203 deletions(-)

diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBillList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBillList.html"
index 01e925a..900931f 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBillList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBillList.html"
@@ -1,14 +1,22 @@
 锘�<!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<title>濮斿鍏ュ簱鍗曞垪琛�</title>
+    <meta http-equiv="Content-Type" content="text/html; 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, 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/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 src="../../../layuiadmin/HideButton.js"></script>
+    <script src="../../../layuiadmin/soulTable.slim.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
     <style type="text/css">
         input.layui-input.layui-unselect {
             padding-right: 0;
@@ -28,64 +36,95 @@
                                         <span>鏇村</span>
                                     </div>
                                 </div>
-                                <!--<div class="layui-inline">
-                                    <label class="layui-form-label">鍗曟嵁绫诲瀷</label>
+                                <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>
+                                        <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="HEndDate" style="width:190px;">
                                     </div>
                                 </div>
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鍗曟嵁鍙�</label>
                                     <div class="layui-input-block">
-                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
+                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="width:190px;">
                                     </div>
                                 </div>
-                                <div class="layui-inline">
-                                    <label class="layui-form-label">鍒跺崟浜�</label>
-                                    <div class="layui-input-block">
-                                        <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
-                                    </div>
-                                </div>-->
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                 </button>
-                                <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>-->
-                                <!--<div class="layui-colla-content">
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                                <div class="layui-colla-content">
                                     <div class="layui-inline">
-                                        <div class="layui-inline">
-                                            <span>鍏朵粬鏉′欢></span>
-                                        </div>
-                                    </div>
-                                    <div class="layui-inline">
-                                        <label class="layui-form-label">寮�濮嬫椂闂�</label>
+                                        <label class="layui-form-label">閮ㄩ棬</label>
                                         <div class="layui-input-block">
-                                            <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
+                                            <input type="text" class="layui-input" name="HDeptID" id="HDeptID" style="width:190px;">
                                         </div>
                                     </div>
                                     <div class="layui-inline">
-                                        <label class="layui-form-label">缁撴潫鏃堕棿</label>
+                                        <label class="layui-form-label">鐗╂枡浠g爜</label>
                                         <div class="layui-input-block">
-                                            <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
+                                            <input type="text" class="layui-input" name="MaterialCode" id="MaterialCode" style="width:190px;">
                                         </div>
                                     </div>
-                                </div>-->
+                                    <!--<hr />-->
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">鐗╂枡鍚嶇О</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input" name="MaterialName" id="MaterialName" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">瑙勬牸鍨嬪彿</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input" name="SpecificationModel" id="SpecificationModel" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">婧愬崟鍗曞彿</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input" name="HSourceBillNo" id="HSourceBillNo" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">浠撳簱</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input" name="Warehouse" id="Warehouse" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">鍒跺崟浜�</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input" name="Hmaker" id="Hmaker" style="width:190px;">
+                                        </div>
+                                    </div>
+                                </div>
                             </div>
                         </div>
                         <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-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;" id="btn-Add" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Edit" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Delete" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="get_Refresh" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Audit" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-DeAudit" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close" id="Close"><i class="layui-icon layui-icon-radio"></i>鍏抽棴</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeClose" id="DeClose"><i class="layui-icon layui-icon-radio"></i>鍙嶅叧闂�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Drop" id="Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeDrop" id="DeDrop"><i class="layui-icon layui-icon-radio"></i>鍙嶄綔搴�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-view" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-print" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></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>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-BarCodeDetail" lay-event="btn-BarCodeDetail"><i class="layui-icon layui-icon-form"></i>鏉$爜鏄庣粏</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="get_Exit" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
                             </div>
                         </script>
                     </form>
@@ -93,16 +132,15 @@
             </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>
         layui.config({
             base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
         }).extend({
             index: 'lib/index', //涓诲叆鍙fā鍧�
-        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+
+            //#region 鍏叡鍙橀噺
             var $ = layui.$
                 , admin = layui.admin
                 , layer = layui.layer
@@ -112,190 +150,550 @@
                 , laypage = layui.laypage
                 , laydate = layui.laydate
                 , util = layui.util
+                , soulTable = layui.soulTable
             //鏌ヨ鏉′欢
             var sWhere = "";
+            var option = [];
 
-            var option = {
-                elem: '#mainTable'
-                //, toolbar: '#toolbarDemo'
-                , height: 'full-50'
-                , page: true
-                , cellMinWidth: 90
-                , cols: [[
-                    { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
-                    , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160 }
-                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
-                    , { field: 'hsupid', title: 'hsupid', width: 160, hide: true }
-                    , { field: '鍔犲伐鍗曚綅浠g爜', title: '鍔犲伐鍗曚綅浠g爜', width: 200 }
-                    , { field: '鍔犲伐鍗曚綅鍚嶇О', title: '鍔犲伐鍗曚綅鍚嶇О', width: 200 }
-                    , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
-                    , { field: '涓氬姟鍛樹唬鐮�', title: '涓氬姟鍛樹唬鐮�', width: 200 }
-                    , { field: '涓氬姟鍛�', title: '涓氬姟鍛�', width: 200 }
-                    , { field: 'hmanagerid', title: 'hmanagerid', width: 200, hide: true }
-                    , { field: '涓荤浠g爜', title: '涓荤浠g爜', width: 160 }
-                    , { field: '涓荤', title: '涓荤', width: 160}
-                    , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 160, 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: 115 }
-                    , { field: '鎽樿', title: '鎽樿', width: 115 }
-                    , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 200 }
-                    , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 200 }
-                    , { field: '绾㈣摑鍗曟爣璁�', title: '绾㈣摑鍗曟爣璁�', width: 115 }
-                    , { 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: 115 }
-                    , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200  }
-                    , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
-                    , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200 }
-                    , { field: 'hsubid', title: 'hsubid', width: 115, hide: true }
-                    , { field: 'hmaterid', title: 'hmaterid', 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: '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: 200 }
-                    , { field: '閲戦', title: '閲戦', width: 200 }
-                    , { field: 'hwhid', title: 'hwhid', 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: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
-                    , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200 }
-                    , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
-                    , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
-                    , { field: '閲囪喘璁㈠崟涓籌D', title: '閲囪喘璁㈠崟涓籌D', width: 200, hide: true }
-                    , { field: '閲囪喘璁㈠崟瀛怚D', title: '閲囪喘璁㈠崟瀛怚D', width: 200, hide: true }
-                    , { field: '閲囪喘璁㈠崟鍙�', title: '閲囪喘璁㈠崟鍙�', width: 200 }
-                    , { field: '閿�鍞鍗曚富ID', title: '閿�鍞鍗曚富ID', width: 200, hide: true }
-                    , { field: '閿�鍞鍗曞瓙ID', title: '閿�鍞鍗曞瓙ID', width: 200, hide: true }
-                    , { field: '閿�鍞鍗曞彿', title: '閿�鍞鍗曞彿', width: 200 }
-                    , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
-                    , { field: 'HBillType', title: 'HBillType', width: 200, hide: true }
-                ]]
-            };
+            //#endregion
 
-            var index = layer.load(0);
-            //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
-            $.ajax({
-                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
-                url: GetWEBURL() + '/Kf_EntrustInBill/GetEntrustInBill',
-                type: "GET",
-                data: { "sWhere": sWhere},
-                success: function (data1) {
-                    if (data1.count == 1) {
-                        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 });
-                }
+            //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+        //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            var HModuleType = "1210";
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
+            //#endregion 
+            var HModName = "Kf_EntrustInBillList";
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+            //#endregion
+
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+            //#region 澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                switch (obj.event) {
+                    //鏂板
+                    case 'set_AddNew': set_AddNew();
+                        break;
+                    //缂栬緫
+                    case 'set_ShowBill': set_ShowBill();
+                        break;
+                    //鍒犻櫎
+                    case 'set_DeleteBill': set_DeleteBill();
+                        break;
+                    //瀹℃牳鎸夐挳
+                    case 'btn-Audit':
+                        set_CheckBill(1);
+                        break;
+                    //鍙嶅鏍告寜閽�
+                    case 'btn-DeAudit':
+                        set_CheckBill(2);
+                        break;
+                    //鍏抽棴鎸夐挳        锛�1:鍏抽棴銆�2:鍙嶅叧闂級
+                    case 'btn-Close':
+                        set_CloseBill(1);
+                        break;
+                    //鍙嶅叧闂寜閽�
+                    case 'btn-DeClose':
+                        set_CloseBill(2);
+                        break;
+                    //浣滃簾鎸夐挳        锛�1:浣滃簾銆�2:鍙嶄綔搴燂級
+                    case 'btn-Drop':
+                        set_DropBill(1);
+                        break;
+                    //鍙嶄綔搴熸寜閽�
+                    case 'btn-DeDrop':
+                        set_DropBill(2);
+                        break;
+                    //鍏抽棴
+                    case 'set_CloseBill': set_CloseBill();
+                        break;
+                    //鍒楄缃�
+                    case 'set_HideColumn': get_HideColumn();
+                        break;
+                    case 'btn-BarCodeDetail': get_BarCodeDetail();
+                        break;
+                    //鎸夐挳璁剧疆
+                    case 'set_HideButton':
+                        var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                        var HBillType = "1210";
+                        get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+                        break;
+                };
             });
 
-            //閲嶇疆鎸夐挳
-            //form.on('submit(btnReSearch)', function (data) {
-            //    $("#HBillType").val("");//鍗曟嵁绫诲瀷
-            //    $("#HBillNo").val("");//鍗曟嵁鍙�
-            //    $("#HSourceBillNo").val("");//婧愬崟鍙�
-            //    $("#HCreateBy").val("");//鍒跺崟浜�
-            //    $("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
-            //    $("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
-            //    $("#btnSearch").click();
-            //});
-
+        //#endregion
             //鏌ヨ鎸夐挳
-            form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
-                //var HBillType = $("#HBillType").val();//鍗曟嵁绫诲瀷
-                //var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
-                //var HCreateBy = $("#HCreateBy").val();//鍒跺崟浜�
-                //var BenginHCreateDate = $("#BenginHCreateDate").val();//寮�濮嬪埗鍗曟椂闂�
-                //var EndHCreateDate = $("#EndHCreateDate").val();//缁撴潫鍒跺崟鏃堕棿
-                //if (HBillNo) {
-                //    sWhere += " and HBillNo like '%" + HBillNo + "%'";
-                //}
-                //if (HCreateBy) {
-                //    sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
-                //}
-                //if (BenginHCreateDate) {
-                //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
-                //}
-                //if (EndHCreateDate) {
-                //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
-                //}
-                var index = layer.load(0);
-                $.ajax({
-                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
-                    url: GetWEBURL1() + '/Kf_EntrustInBill/GetEntrustInBill',
-                    type: "GET",
-                    data: { "sWhere": sWhere},
-                    success: function (data1) {
-                        if (data1.count == 1) {
-                            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 = "";
-                //$("#HBillType").val("");//鍗曟嵁绫诲瀷
-                //$("#HBillNo").val("");//鍗曟嵁鍙�
-                //$("#HSourceBillNo").val("");//婧愬崟鍙�
-                //$("#HCreateBy").val("");//鍒跺崟浜�
-                //$("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
-                //$("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery();
+            });
+            // 閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                //娓呯┖杩囨护鏉′欢
+                set_ClearQuery();
             });
 
             //鐩戝惉琛屽弻鍑讳簨浠�
             table.on('rowDouble(mainTable)', function (obj) {
                 layer.alert("鍙屽嚮浜嬩欢", { icon: 1 });
             });
+             //#endregion
+
+            //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+            // 鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鏌ヨ
+                get_Display(sWhere);
+                //鍒濆鍖栨棩鏈�
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+            }
+
+            //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+            function get_Display(sWhere) {
+                var index = layer.load();
+                $.ajax({ 
+                    url: GetWEBURL() + '/Kf_EntrustInBill/GetEntrustInBill',
+                    type: "GET",
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            option.data = data1.data;
+                            table.render(option);
+                            layer.close(index);
+
+                            //鍒锋柊鎸夐挳鏄剧ず
+                            var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                            var HBillType = "1210";
+                            Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+                        } else {
+                            layer.close(index);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(index);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+                DisPlay_HideColumn();
+            }
+            //闅愯棌鍒楄缃�
+            function get_HideColumn() {
+                var colName = "";
+                for (var i = 1; i < option.cols[0].length - 1; i++) {
+                    colName += option.cols[0][i]["title"] + ",";
+                }
+
+                colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim" //鍔犱笂杈规
+                    , title: "闅愯棌鍒楄缃�"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["50%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                        layer.close(index);//鍏抽棴寮圭獥
+                    }
+                })
+            }
 
 
-            //laydate.render({
-            //    elem: '#HDate'
-            //    , type: 'datetime'
-            //    , trigger: 'click'
-            //    , format:'yyyy-MM-dd HH:mm'
-            //});
+            //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
+            function set_CheckBill(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Kf_EntrustInBill/AuditKf_EntrustInBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "Type": num, "user": 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('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+                }
+            }
+            //#endregion
+
+            //#region 鍙嶅叧闂�/鍏抽棴鏁版嵁
+            function set_CloseBill(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Kf_EntrustInBill/CloseKf_EntrustInBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "Type": num, "user": 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('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+                }
+            }
+            //#endregion
+
+            //#region 鍙嶄綔搴�/浣滃簾鏁版嵁
+            function set_DropBill(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Kf_EntrustInBill/DropKf_EntrustInBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "Type": num, "user": 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('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+                }
+            }
+            //#endregion
 
 
-            //浠ヤ笂鏄痩ayui妯″潡
-        });
+            //鏉$爜鏄庣粏
+            function get_BarCodeDetail() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var HInterID = data[0].hmainid;
+                    var HBillType = '1210';
+                    var HBillNo = data[0]["鍗曟嵁鍙�"];
+                    //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+                    layer.open({
+                        type: 2
+                        , area: ['90%', '90%']
+                        , title: '濮斿鍏ュ簱鍗曟潯鐮佹槑缁�'
+                        , closeBtn: 1
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: '../../鏉$爜鏄庣粏/Kf_BarCodeDetailQuery.html?HInterID=' + HInterID + '&HBillType=' + HBillType + '&HBillNo=' + HBillNo
+                        , resize: false
+                        , btn: ["纭畾", "鍙栨秷"]
+                        , end: function () {
+                            //鍒锋柊椤甸潰,
+                            //location.reload();
+                        }
+                        , cancel: function () {
+                            //$(".layui-btn").removeClass("layui-btn-disabled");
+                        }
+                    })
+
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+
+            //鏄剧ず鍒楁暟鎹�
+            function DisPlay_HideColumn() {
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                    type: "GET",
+                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.data.length != 0) {
 
 
+                            var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+                            var titleData = ["HMaterID", "HUnitID", "HICMOEmpID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
 
+                            dataCol = data1.data[0].HGridString.split(',');
+
+                            for (var i = 0; i < option.cols[0].length - 2; i++) {
+                                var dataCols = dataCol[i].split('|');
+                                //闅愯棌鍒�
+                                if (dataCols[1] == 1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+                                //璁剧疆鍒楀
+                                if (dataCols[3] > 0) {
+                                    option.cols[0][i + 1]["width"] = dataCols[3];
+                                }
+                                //璁剧疆鍐呭瀛椾綋澶у皬
+                                if (data1.data[0].HFontSize != 0) {
+                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                                } else {
+                                    option.cols[0][i + 1]["style"] = "font-size:100%";
+                                }
+                                //璁剧疆鍒楀
+                                //if (data1.data[0].HColumnWidth != 0) {
+                                //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+                                //} else {
+                                //    option.cols[0][i + 1]["width"] = "";
+                                //}
+                                //鏄剧ず鍒�
+                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+                                    option.cols[0][i + 1]["hide"] = false;
+                                }
+                                //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                                switch (dataCols[2]) {
+                                    case "L":
+                                        option.cols[0][i + 1]["align"] = "left";
+                                        break;
+                                    case "M":
+                                        option.cols[0][i + 1]["align"] = "center";
+                                        break;
+                                    case "R":
+                                        option.cols[0][i + 1]["align"] = "right";
+                                        break;
+                                }
+                            }
+
+                            //鍙栨秷鍐荤粨鍒�
+                            for (var i = 1; i < option.cols[0].length - 1; i++) {
+                                if (option.cols[0][i]["fixed"] != null) {
+                                    option.cols[0][i]["fixed"] = null;
+                                }
+                                else {
+                                    break;
+                                }
+                            }
+                            //鍐荤粨鍒�
+                            if (data1.data[0].HFixCols != 0) {
+                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
+                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+                                        data1.data[0].HFixCols += 1;
+                                    }
+                                    option.cols[0][i + 1]["fixed"] = "left";
+                                }
+                            }
+                            table.render(option);
+                        } else {
+                            table.render(option);
+                        }
+
+                        //鍒锋柊鎸夐挳鏄剧ず
+                        var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                        var HBillType = "1210";
+                        Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                })
+            }
+
+            // 鍒濆鍖栬〃鏍兼柟娉�
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , height: 'full-50'
+                    , page: true
+                    , totalRow: true
+                    , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
+                    , done: function (res, curr, count) {
+                        soulTable.render(this);
+                    }
+                    , cols: [[
+                        { type: 'checkbox', fixed: 'left' }
+                        , { field: 'hmainid', title: '鍗曟嵁ID', hide: true, sort: true }
+                        , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, sort: true }
+                        , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160, sort: true }
+                        , { field: 'hsupid', title: 'hsupid', width: 160, hide: true, sort: true }
+                        , { field: '鍔犲伐鍗曚綅浠g爜', title: '鍔犲伐鍗曚綅浠g爜', width: 200, sort: true }
+                        , { field: '鍔犲伐鍗曚綅鍚嶇О', title: '鍔犲伐鍗曚綅鍚嶇О', width: 200, sort: true }
+                        , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true, sort: true }
+                        , { field: '涓氬姟鍛樹唬鐮�', title: '涓氬姟鍛樹唬鐮�', width: 200, sort: true }
+                        , { field: '涓氬姟鍛�', title: '涓氬姟鍛�', width: 200, sort: true }
+                        , { field: 'hmanagerid', title: 'hmanagerid', width: 200, hide: true, sort: true }
+                        , { field: '涓荤浠g爜', title: '涓荤浠g爜', width: 160, sort: true }
+                        , { field: '涓荤', title: '涓荤', width: 160, sort: true }
+                        , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 160, hide: true, sort: true }
+                        , { field: '楠屾敹鍛樹唬鐮�', title: '楠屾敹鍛樹唬鐮�', width: 200, sort: true }
+                        , { field: '楠屾敹鍛�', title: '楠屾敹鍛�', width: 200, sort: true }
+                        , { field: 'hkeeperid', title: 'hkeeperid', width: 200, hide: true, sort: true }
+                        , { field: '淇濈鍛樹唬鐮�', title: '淇濈鍛樹唬鐮�', width: 200, sort: true }
+                        , { field: '淇濈鍛�', title: '淇濈鍛�', width: 200, sort: true }
+                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true }
+                        , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', 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, sort: true }
+                        , { field: '绾㈣摑鍗曟爣璁�', title: '绾㈣摑鍗曟爣璁�', width: 115, sort: true }
+                        , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 200, sort: true }
+                        , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, sort: true }
+                        , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200, sort: true }
+                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, sort: true }
+                        , { field: '淇敼浜�', title: '淇敼浜�', width: 200, sort: true }
+                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, sort: true }
+                        , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 115, 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: 115, hide: true, sort: true }
+                        , { field: 'hmaterid', title: 'hmaterid', 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: 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: 200, sort: true }
+                        , { field: '閲戦', title: '閲戦', width: 200, sort: true }
+                        , { field: 'hwhid', title: 'hwhid', 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: 200, sort: true }
+                        , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true, sort: true }
+                        , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, sort: true }
+                        , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200, sort: true }
+                        , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200, sort: true }
+                        , { field: '閲囪喘璁㈠崟涓籌D', title: '閲囪喘璁㈠崟涓籌D', width: 200, hide: true, sort: true }
+                        , { field: '閲囪喘璁㈠崟瀛怚D', title: '閲囪喘璁㈠崟瀛怚D', width: 200, hide: true, sort: true }
+                        , { field: '閲囪喘璁㈠崟鍙�', title: '閲囪喘璁㈠崟鍙�', width: 200, sort: true }
+                        , { field: '閿�鍞鍗曚富ID', title: '閿�鍞鍗曚富ID', width: 200, hide: true, sort: true }
+                        , { field: '閿�鍞鍗曞瓙ID', title: '閿�鍞鍗曞瓙ID', width: 200, hide: true, sort: true }
+                        , { field: '閿�鍞鍗曞彿', title: '閿�鍞鍗曞彿', width: 200, sort: true }
+                        , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200, sort: true }
+                        , { field: 'HBillType', title: 'HBillType', width: 200, hide: true, sort: true }
+                    ]]
+                };
+            }
+            // 蹇�熻繃婊�
+            function get_FastQuery() {
+                var HDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
+                var HDate1 = $("#HEndDate").val();//缁撴潫鏃ユ湡
+                var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
+                var HDeptID = $("#HDeptID").val();//閮ㄩ棬
+                var MaterialCode = $("#MaterialCode").val();//鐗╂枡浠g爜
+                var MaterialName = $("#MaterialName").val();//鐗╂枡鍚嶇О
+                var SpecificationModel = $("#SpecificationModel").val();//瑙勬牸鍨嬪彿
+                var HSourceBillNo = $("#HSourceBillNo").val();//婧愬崟鍗曞彿
+                var Warehouse = $("#Warehouse").val();//浠撳簱
+                var Hmaker = $("#Hmaker").val();//鍒跺崟浜�
+
+                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 (HDeptID) {
+                    sWhere += " and 閮ㄩ棬 like '%" + HDeptID + "%'";
+                }
+                if (MaterialCode) {
+                    sWhere += " and 鐗╂枡浠g爜 like '%" + MaterialCode + "%'";
+                }
+                if (MaterialName) {
+                    sWhere += " and 鐗╂枡鍚嶇О like '%" + MaterialName + "%'";
+                }
+                if (SpecificationModel) {
+                    sWhere += " and 瑙勬牸鍨嬪彿 like '%" + SpecificationModel + "%'";
+                }
+                if (HSourceBillNo) {
+                    sWhere += " and 婧愬崟鍗曞彿 like '%" + HSourceBillNo + "%'";
+                }
+                if (Warehouse) {
+                    sWhere += " and 鍙戣揣浠撳簱 like '%" + Warehouse + "%'";
+                }
+                if (Hmaker) {
+                    sWhere += " and 鍒跺崟浜� like '%" + Hmaker + "%'";
+                }
+
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+            // 閲嶇疆杩囨护鏉′欢
+            function set_ClearQuery() {
+                $("#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("");//鍗曟嵁鍙�
+                $("#HDeptID").val();//閮ㄩ棬
+                $("#MaterialCode").val();//鐗╂枡浠g爜
+                $("#MaterialName").val();//鐗╂枡鍚嶇О
+                $("#SpecificationModel").val();//瑙勬牸鍨嬪彿
+                $("#HSourceBillNo").val();//婧愬崟鍗曞彿
+                $("#Warehouse").val();//浠撳簱
+                $("#Hmaker").val();//鍒跺崟浜�
+                sWhere = "";
+            }
+
+            //#endregion
+
+              //浠ヤ笂鏄痩ayui妯″潡
+
+        })
 
     </script>
-
 </body>
 </html>

--
Gitblit v1.9.1