From 47a91d24956b4692b9565e6ecacd7edf31042758 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 18 三月 2025 09:53:53 +0800
Subject: [PATCH] 1

---
 WebTM/views/基础资料/采购基础资料/Gy_Supplier_Edit.html                  |  318 ++
 WebTM/views/生产管理/日计划报表/JIT_FuHeFenXiReport.html                |  581 ++++
 WebTM/views/采购管理/收料通知单/Add_Edit_Cg_POInStockBillList.html      |  113 
 WebTM/Properties/PublishProfiles/JFTM.pubxml.user              |  101 
 WebTM/views/采购管理/退料通知单/Add_Edit_Cg_POInStockBackBillList.html  |   15 
 WebTM/views/验收入库/外购入库/Kf_POStockInBackBill_Add_Up.html         |  666 +++--
 WebTM/views/index_QiaoYi.html                                  |  374 +-
 WebTM/views/采购管理/付款单/YF_PayMentBill.html                       |    2 
 WebTM/views/质量管理/来料检验单/QC_POStockInCheckBillList.html          |    2 
 WebTM/views/生产管理/宝工排产/JIT_LockRequestBillList.html             |    2 
 WebTM/views/采购管理/采购订单/Cg_POOrderBillList.html                  |  187 +
 WebTM/views/验收入库/外购入库/Kf_POStockInBackBillList.html            |    2 
 WebTM/views/领料发货/领料出库/Kf_MateOutBillList.html                  |    3 
 WebTM/views/采购管理/收料通知单/Cg_POInStockBillList.html               |   24 
 WebTM/views/基础资料/采购基础资料/Gy_Supplier.html                       |    2 
 WebTM/views/采购管理/退料通知单/Cg_POInStockBackBillList.html           |   25 
 WebTM/views/领料发货/生产领料/Kf_ProductReceiveMaterialBillList.html   | 1517 ++++++++++++
 WebTM/views/质量管理/来料检验单/QC_Add_Edit_POStockInCheckBillList.html |  591 ++--
 WebTM/views/验收入库/外购入库/Kf_POStockInBillList.html                |   85 
 WebTM/views/采购管理/应付单/Cg_PayableBill.html                       |   20 
 WebTM/views/采购管理/采购订单/Cg_POOrderBillEdit.html                  |  324 +
 WebTM/views/领料发货/其他出库/Add_Edit_Kf_OtherOutBill.html            |   10 
 WebTM/views/验收入库/外购入库/Add_Edit_Kf_POStockInBillList.html       |  244 +
 WebTM/WebTM.csproj                                             |    3 
 WebTM/views/领料发货/生产领料/Kf_ProductReceiveMaterialBillEdit.html   | 1842 +++++++++++++++
 25 files changed, 5,851 insertions(+), 1,202 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index bf84a8c..0adf17e 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -798,7 +798,7 @@
       <publishTime>04/11/2023 16:34:42</publishTime>
     </File>
     <File Include="layuiadmin/Scripts/webConfig.js">
-      <publishTime>03/03/2025 08:47:22</publishTime>
+      <publishTime>03/03/2025 10:06:39</publishTime>
     </File>
     <File Include="layuiadmin/Scripts/webConfig2.js">
       <publishTime>07/15/2024 09:58:59</publishTime>
@@ -1707,7 +1707,7 @@
       <publishTime>10/11/2024 11:32:36</publishTime>
     </File>
     <File Include="views/index_QiaoYi.html">
-      <publishTime>11/07/2024 13:57:13</publishTime>
+      <publishTime>03/15/2025 15:46:25</publishTime>
     </File>
     <File Include="views/IpadIndex.html">
 <<<<<<< HEAD
@@ -2407,10 +2407,10 @@
       <publishTime>04/11/2023 16:34:43</publishTime>
     </File>
     <File Include="views/浠撳瓨绠$悊/浠撳簱璋冩嫧/Kf_MoveStockBillList.html">
-      <publishTime>11/26/2024 08:33:01</publishTime>
+      <publishTime>03/03/2025 10:06:04</publishTime>
     </File>
     <File Include="views/浠撳瓨绠$悊/浠撳簱璋冩嫧/Kf_MoveStockBillList.html">
-      <publishTime>11/26/2024 08:33:01</publishTime>
+      <publishTime>03/03/2025 10:06:04</publishTime>
     </File>
     <File Include="views/浠撳瓨绠$悊/浠撳簱璋冩嫧/Kf_MoveStockBill_CheckList_New.html">
       <publishTime>04/11/2023 16:34:43</publishTime>
@@ -2917,7 +2917,7 @@
       <publishTime>07/31/2024 13:38:19</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html">
-      <publishTime>12/31/2024 10:12:44</publishTime>
+      <publishTime>03/10/2025 08:09:59</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material_Excel.html">
       <publishTime>10/11/2024 11:32:36</publishTime>
@@ -3874,16 +3874,16 @@
       <publishTime>12/31/2024 10:12:44</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html">
-      <publishTime>01/10/2025 16:08:00</publishTime>
+      <publishTime>03/12/2025 16:23:05</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier_Edit.html">
-      <publishTime>12/31/2024 10:12:44</publishTime>
+      <publishTime>03/15/2025 15:33:21</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier_Edit.html">
-      <publishTime>12/31/2024 10:12:44</publishTime>
+      <publishTime>03/15/2025 15:33:21</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier_Edit.html">
-      <publishTime>12/31/2024 10:12:44</publishTime>
+      <publishTime>03/15/2025 15:33:21</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier_Excel.html">
       <publishTime>01/10/2025 16:08:00</publishTime>
@@ -4921,13 +4921,13 @@
       <publishTime>09/11/2024 21:05:00</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/瀹濆伐鎺掍骇/JIT_DayPlanPlatForm.html">
-      <publishTime>02/28/2025 09:16:49</publishTime>
+      <publishTime>03/11/2025 13:11:55</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/瀹濆伐鎺掍骇/JIT_LockRequestBill.html">
       <publishTime>02/20/2025 14:35:50</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/瀹濆伐鎺掍骇/JIT_LockRequestBillList.html">
-      <publishTime>02/20/2025 15:50:41</publishTime>
+      <publishTime>03/17/2025 21:56:35</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/瀹濆伐鎺掍骇/JIT_UnLockRequestBill.html">
       <publishTime>02/20/2025 16:29:20</publishTime>
@@ -5108,6 +5108,9 @@
     </File>
     <File Include="views/鐢熶骇绠$悊/鏃ヨ鍒掑熀纭�璧勬枡/JIT_NeedMaterPlanConfigBill_Add.html">
       <publishTime>02/26/2025 08:55:08</publishTime>
+    </File>
+    <File Include="views/鐢熶骇绠$悊/鏃ヨ鍒掓姤琛�/JIT_FuHeFenXiReport.html">
+      <publishTime>03/13/2025 14:42:31</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鏃ヨ鍒掓姤琛�/MaterialShorAnalysisReport.html">
       <publishTime>12/11/2024 22:26:36</publishTime>
@@ -5308,7 +5311,7 @@
       <publishTime>02/11/2025 09:07:34</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鐢熶骇璁″垝骞冲彴/JIT_DayPlanPlatFormImport.html">
-      <publishTime>12/18/2024 09:58:22</publishTime>
+      <publishTime>03/03/2025 10:06:04</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鐢熶骇璁″垝骞冲彴/JIT_DayPlanPlatForm_BCP.html">
       <publishTime>06/07/2024 15:42:08</publishTime>
@@ -5660,7 +5663,7 @@
       <publishTime>02/11/2025 13:09:20</publishTime>
     </File>
     <File Include="views/璁″垝绠$悊/宸ヨ壓璺嚎/Gy_RoutingBillListQuery.html">
-      <publishTime>02/11/2025 09:07:34</publishTime>
+      <publishTime>03/06/2025 09:45:44</publishTime>
     </File>
     <File Include="views/璁″垝绠$悊/宸ヨ壓璺嚎/Gy_RoutingBillList_His.html">
       <publishTime>02/11/2025 09:07:34</publishTime>
@@ -6191,13 +6194,13 @@
       <publishTime>04/11/2023 16:34:43</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/鏉ユ枡妫�楠屽崟/QC_Add_Edit_POStockInCheckBill.html">
-      <publishTime>04/11/2023 16:34:43</publishTime>
+      <publishTime>03/10/2025 10:15:11</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/鏉ユ枡妫�楠屽崟/QC_Add_Edit_POStockInCheckBillList.html">
-      <publishTime>04/09/2024 10:58:17</publishTime>
+      <publishTime>03/10/2025 14:17:34</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/鏉ユ枡妫�楠屽崟/QC_POStockInCheckBillList.html">
-      <publishTime>07/15/2024 09:58:59</publishTime>
+      <publishTime>03/10/2025 11:12:32</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/妫�楠屽彇鏍疯繕鏍峰崟/QC_Add_BackSampleCheckBill.html">
       <publishTime>12/31/2024 10:12:45</publishTime>
@@ -6469,10 +6472,10 @@
       <publishTime>04/09/2024 10:58:17</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/鏉ユ枡妫�楠屽崟/QC_Add_Edit_POStockInCheckBill.html">
-      <publishTime>04/11/2023 16:34:43</publishTime>
+      <publishTime>03/10/2025 10:15:11</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/鏉ユ枡妫�楠屽崟/QC_POStockInCheckBillList.html">
-      <publishTime>07/15/2024 09:58:59</publishTime>
+      <publishTime>03/10/2025 11:12:32</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/妫�楠屾柟妗堝崟/QC_Add_CheckProject.html">
       <publishTime>03/03/2025 08:46:28</publishTime>
@@ -7108,7 +7111,7 @@
       <publishTime>07/15/2024 09:58:59</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/浠樻鍗�/YF_PayMentBill.html">
-      <publishTime>12/05/2024 08:36:48</publishTime>
+      <publishTime>03/03/2025 11:01:35</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/浠樻鍗�/YF_PayMentBillList.html">
       <publishTime>12/11/2024 22:26:36</publishTime>
@@ -7132,7 +7135,7 @@
       <publishTime>07/31/2024 13:38:19</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/搴斾粯鍗�/Cg_PayableBill.html">
-      <publishTime>03/03/2025 08:46:28</publishTime>
+      <publishTime>03/03/2025 11:01:04</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/搴斾粯鍗�/Cg_PayableBillCheckQuery.html">
       <publishTime>12/11/2024 22:26:36</publishTime>
@@ -7156,10 +7159,10 @@
       <publishTime>07/31/2024 13:38:19</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Add_Edit_Cg_POInStockBillList.html">
-      <publishTime>03/03/2025 09:49:26</publishTime>
+      <publishTime>03/15/2025 13:03:42</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBillList.html">
-      <publishTime>03/03/2025 09:52:15</publishTime>
+      <publishTime>03/14/2025 16:51:25</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBillQuery.html">
       <publishTime>03/03/2025 08:46:28</publishTime>
@@ -7171,10 +7174,10 @@
       <publishTime>07/31/2024 13:38:19</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Add_Edit_Cg_POInStockBackBillList.html">
-      <publishTime>03/03/2025 08:46:28</publishTime>
+      <publishTime>03/14/2025 09:49:29</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Cg_POInStockBackBillList.html">
-      <publishTime>03/03/2025 08:46:28</publishTime>
+      <publishTime>03/14/2025 16:29:51</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘鍚堝悓/Add_Edit_Cg_ContractBillList.html">
       <publishTime>09/11/2024 21:05:00</publishTime>
@@ -7216,10 +7219,10 @@
       <publishTime>08/15/2024 14:53:23</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillEdit.html">
-      <publishTime>03/03/2025 09:22:17</publishTime>
+      <publishTime>03/15/2025 22:30:07</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList.html">
-      <publishTime>12/31/2024 10:12:45</publishTime>
+      <publishTime>03/15/2025 22:59:28</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList1111.html">
       <publishTime>10/19/2021 16:08:25</publishTime>
@@ -7228,10 +7231,10 @@
       <publishTime>12/05/2024 08:36:48</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘閫�鏂欏崟/Cg_PurchaseReturnList.html">
-      <publishTime>02/25/2024 21:38:07</publishTime>
+      <publishTime>03/05/2025 16:38:25</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘閫�鏂欏崟/Cg_PurchaseReturn_Add_Up.html">
-      <publishTime>02/02/2024 10:30:06</publishTime>
+      <publishTime>03/05/2025 16:37:59</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/浠樻鍗�/YF_PayMentBill.html">
       <publishTime>11/17/2023 14:59:01</publishTime>
@@ -7264,7 +7267,7 @@
       <publishTime>08/23/2024 15:33:37</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鍑洪棬纭鍗昣鏂�/Xs_OutDoorBill.html">
-      <publishTime>11/04/2024 09:10:32</publishTime>
+      <publishTime>03/17/2025 15:05:49</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鍑洪棬纭鍗昣鏂�/Xs_OutDoorBillList.html">
       <publishTime>10/18/2024 10:11:58</publishTime>
@@ -7375,13 +7378,13 @@
       <publishTime>07/31/2024 13:38:19</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBillList.html">
-      <publishTime>03/03/2025 09:52:15</publishTime>
+      <publishTime>03/14/2025 16:51:25</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Cg_POInStockBackBillList.html">
-      <publishTime>03/03/2025 08:46:28</publishTime>
+      <publishTime>03/14/2025 16:29:51</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList.html">
-      <publishTime>12/31/2024 10:12:45</publishTime>
+      <publishTime>03/15/2025 22:59:28</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Xs_SeOutStockBillList.html">
       <publishTime>12/31/2024 10:12:45</publishTime>
@@ -7606,10 +7609,10 @@
       <publishTime>07/15/2024 09:58:59</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Add_Edit_Kf_OtherOutBill.html">
-      <publishTime>07/31/2024 13:38:19</publishTime>
+      <publishTime>03/15/2025 09:37:18</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Add_Edit_Kf_OtherOutBill.html">
-      <publishTime>07/31/2024 13:38:19</publishTime>
+      <publishTime>03/15/2025 09:37:18</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBackBill_Fast.html">
       <publishTime>04/11/2023 16:34:43</publishTime>
@@ -7618,10 +7621,10 @@
       <publishTime>04/11/2023 16:34:43</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBillList.html">
-      <publishTime>07/31/2024 13:38:19</publishTime>
+      <publishTime>03/03/2025 10:06:04</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBillList.html">
-      <publishTime>07/31/2024 13:38:19</publishTime>
+      <publishTime>03/03/2025 10:06:04</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBill_Check.html">
       <publishTime>11/03/2023 21:45:51</publishTime>
@@ -7689,6 +7692,12 @@
     <File Include="views/棰嗘枡鍙戣揣/鐢熶骇琛ユ枡/Kf_MateReplenishOutBill_Check_New.html">
       <publishTime>11/03/2023 21:45:51</publishTime>
     </File>
+    <File Include="views/棰嗘枡鍙戣揣/鐢熶骇棰嗘枡/Kf_ProductReceiveMaterialBillEdit.html">
+      <publishTime>03/17/2025 17:05:33</publishTime>
+    </File>
+    <File Include="views/棰嗘枡鍙戣揣/鐢熶骇棰嗘枡/Kf_ProductReceiveMaterialBillList.html">
+      <publishTime>03/17/2025 16:59:10</publishTime>
+    </File>
     <File Include="views/棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBackBill_Fast.html">
       <publishTime>11/03/2023 21:45:51</publishTime>
     </File>
@@ -7741,13 +7750,13 @@
       <publishTime>08/16/2021 17:24:30</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBillLEdit.html">
-      <publishTime>03/03/2025 08:46:28</publishTime>
+      <publishTime>03/03/2025 10:06:04</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBillList.html">
-      <publishTime>09/13/2024 15:42:13</publishTime>
+      <publishTime>03/03/2025 11:38:17</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBillList.html">
-      <publishTime>09/13/2024 15:42:13</publishTime>
+      <publishTime>03/03/2025 11:38:17</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBill_CheckList_New.html">
       <publishTime>04/11/2023 16:34:43</publishTime>
@@ -7816,10 +7825,10 @@
       <publishTime>04/11/2023 16:34:43</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBillList.html">
-      <publishTime>07/31/2024 13:38:19</publishTime>
+      <publishTime>03/03/2025 10:06:04</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBillList.html">
-      <publishTime>07/31/2024 13:38:19</publishTime>
+      <publishTime>03/03/2025 10:06:04</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBill_Fast.html">
       <publishTime>08/21/2024 16:35:21</publishTime>
@@ -7840,22 +7849,22 @@
       <publishTime>03/07/2024 09:59:11</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Add_Edit_Kf_POStockInBillList.html">
-      <publishTime>01/10/2025 16:18:06</publishTime>
+      <publishTime>03/15/2025 13:54:24</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBill.html">
       <publishTime>11/03/2023 21:45:51</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBillList.html">
-      <publishTime>07/31/2024 13:38:19</publishTime>
+      <publishTime>03/13/2025 15:34:26</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBill_Add_Up.html">
-      <publishTime>03/03/2025 08:46:28</publishTime>
+      <publishTime>03/17/2025 10:25:47</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBillList.html">
-      <publishTime>12/31/2024 10:12:45</publishTime>
+      <publishTime>03/16/2025 00:06:03</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBillList.html">
-      <publishTime>12/31/2024 10:12:45</publishTime>
+      <publishTime>03/16/2025 00:06:03</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBillListQuery.html">
       <publishTime>12/05/2024 08:36:48</publishTime>
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index d569d24..c7be864 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -573,6 +573,7 @@
     <Content Include="views\鐢熶骇绠$悊\娆犳枡杩愮畻\JIT_MaterialLevelShorAnalysis.html" />
     <Content Include="views\鐢熶骇绠$悊\娆犳枡杩愮畻\JIT_MaterialLevelShorAnalysisDetailReport.html" />
     <Content Include="views\鐢熶骇绠$悊\娆犳枡杩愮畻\JIT_MaterialLevelShorAnalysisReport.html" />
+    <Content Include="views\鐢熶骇绠$悊\鏃ヨ鍒掓姤琛╘JIT_FuHeFenXiReport.html" />
     <Content Include="views\鐢熶骇绠$悊\鐝寮�鐝崟\Sc_ShiftsBeginInfoBillList.html" />
     <Content Include="views\鐢熶骇绠$悊\鐝寮�鐝崟\Sc_ShiftsBeginInfoBill_Add_Edit.html" />
     <Content Include="views\鐢熶骇绠$悊\鎻愭枡璁″垝\JIT_PickUpCalculate.html" />
@@ -2275,6 +2276,8 @@
     <Content Include="views\棰嗘枡鍙戣揣\鏀舵枡鍏ュ簱\Kf_ReciveBill_Fast_TK.html" />
     <Content Include="views\棰嗘枡鍙戣揣\鐢熶骇琛ユ枡\Kf_MateReplenishOutBill_Check_New.html" />
     <Content Include="views\棰嗘枡鍙戣揣\鐢熶骇琛ユ枡\Kf_MateReplenishOutBill_CheckList_New.html" />
+    <Content Include="views\棰嗘枡鍙戣揣\鐢熶骇棰嗘枡\Kf_ProductReceiveMaterialBillEdit.html" />
+    <Content Include="views\棰嗘枡鍙戣揣\鐢熶骇棰嗘枡\Kf_ProductReceiveMaterialBillList.html" />
     <Content Include="views\棰嗘枡鍙戣揣\閿�鍞嚭搴揬Kf_SellOutBillQuery.html" />
     <Content Include="views\棰嗘枡鍙戣揣\閿�鍞嚭搴揬Kf_SellOutBill.html" />
     <Content Include="views\棰嗘枡鍙戣揣\閿�鍞嚭搴揬Kf_SellOutBillList_LookDown.html" />
diff --git a/WebTM/views/index_QiaoYi.html b/WebTM/views/index_QiaoYi.html
index 61a61a0..98150f9 100644
--- a/WebTM/views/index_QiaoYi.html
+++ b/WebTM/views/index_QiaoYi.html
@@ -110,90 +110,96 @@
                         <span>LMES绠$悊绯荤粺</span>
                     </div>
                     <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
-                        <!-- 閲囪喘绠$悊 -->
-                        <!--<li data-name="set" class="layui-nav-item">
-        <a><i class="layui-icon layui-icon-cellphone"></i><cite>閲囪喘绠$悊</cite></a>
+                        <!--閲囪喘绠$悊-->
+                        <li data-name="set" class="layui-nav-item">
+                            <a><i class="layui-icon layui-icon-cellphone"></i><cite>閲囪喘绠$悊</cite></a>
+                            <dl class="layui-nav-child">
+                                <dd>
+                                    <a>閲囪喘璁㈠崟</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList.html">閲囪喘璁㈠崟缁存姢</a></dd>
+                                    </dl>
+                                </dd>
+                                <!--<dd>
+        <a>濮斿璁㈠崟</a>
         <dl class="layui-nav-child">
-            <dd>
-                <a>閲囪喘璁㈠崟</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList.html">閲囪喘璁㈠崟缁存姢</a></dd>
-                </dl>
-            </dd>
-            <dd>
-                <a>濮斿璁㈠崟</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="閲囪喘绠$悊/濮斿璁㈠崟/WW_EntrustOrderBillList.html">濮斿璁㈠崟缁存姢</a></dd>
-                    <dd><a lay-href="浠撳瓨绠$悊/濮斿鐢ㄦ枡鍗�/WW_PPBomBillList.html">濮斿鐢ㄦ枡鍗曠淮鎶�</a></dd>
-                </dl>
-            </dd>
-            <dd>
-                <a>鏀舵枡閫氱煡鍗�</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBillList.html">鏀舵枡閫氱煡鍗曠淮鎶�</a></dd>
-                    <dd><a lay-href="閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Add_Edit_Cg_POInStockBillList.html">鏀舵枡閫氱煡鍗�</a></dd>
-                </dl>
-            </dd>
-            <dd>
-                <a>閫�鏂欓�氱煡鍗�</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Cg_POInStockBackBillList.html">閫�鏂欓�氱煡鍗曠淮鎶�</a></dd>
-                    <dd><a lay-href="閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Add_Edit_Cg_POInStockBackBillList.html">閫�鏂欓�氱煡鍗�</a></dd>
-                </dl>
-            </dd>
-            <dd>
-                <a>閲囪喘鍏ュ簱鍗�</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBillList.html">閲囪喘鍏ュ簱鍗曠淮鎶�</a></dd>
-                    <dd><a lay-href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Add_Edit_Kf_POStockInBillList.html">閲囪喘鍏ュ簱鍗�</a></dd>
-                </dl>
-            </dd>
-            <dd>
-                <a>閲囪喘閫�鏂欏崟</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="閲囪喘绠$悊/閲囪喘閫�鏂欏崟/Cg_PurchaseReturnList.html">閲囪喘閫�鏂欏崟缁存姢</a></dd>
-                </dl>
-            </dd>
+            <dd><a lay-href="閲囪喘绠$悊/濮斿璁㈠崟/WW_EntrustOrderBillList.html">濮斿璁㈠崟缁存姢</a></dd>
+            <dd><a lay-href="浠撳瓨绠$悊/濮斿鐢ㄦ枡鍗�/WW_PPBomBillList.html">濮斿鐢ㄦ枡鍗曠淮鎶�</a></dd>
         </dl>
-    </li>-->
-                        <!-- 閿�鍞鐞� -->
-                        <!--<li data-name="set" class="layui-nav-item">
-        <a><i class="layui-icon layui-icon-circle"></i><cite>閿�鍞鐞�</cite></a>
-        <dl class="layui-nav-child">
-            <dd>
-                <a>閿�鍞鍗�</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBillList.html">閿�鍞鍗曠淮鎶�</a></dd>
-                    <dd><a lay-href="閿�鍞鐞�/閿�鍞鍗�/Add_Edit_Xs_SeOrderBillList.html">閿�鍞鍗�</a></dd>
-                </dl>
-            </dd>
-            <dd>
-                <a>鍙戣揣閫氱煡鍗�</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Xs_SeOutStockBillList.html">鍙戣揣閫氱煡鍗曠淮鎶�</a></dd>
-                    <dd><a lay-href="閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Add_Edit_Xs_SeOutStockBillList.html">鍙戣揣閫氱煡鍗�</a></dd>
-                </dl>
-            </dd>
-            <dd>
-                <a>閫�璐ч�氱煡鍗�</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="閿�鍞鐞�/閫�璐ч�氱煡鍗�/Xs_SeOutStockBackBillList.html">閫�璐ч�氱煡鍗曠淮鎶�</a></dd>
-                </dl>
-            </dd>
-            <dd>
-                <a>閿�鍞嚭搴撳崟</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBillList.html">閿�鍞嚭搴撳崟缁存姢</a></dd>
-                </dl>
-            </dd>
-            <dd>
-                <a>閿�鍞��璐у崟</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="閿�鍞鐞�/閿�鍞��璐у崟/Kf_ICStockBillMainList.html">閿�鍞��璐у崟缁存姢</a></dd>
-                </dl>
-            </dd>
-        </dl>
-    </li>-->
+    </dd>-->
+                                <dd>
+                                    <a>鏀舵枡閫氱煡鍗�</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBillList.html">鏀舵枡閫氱煡鍗曠淮鎶�</a></dd>
+                                        <!--<dd><a lay-href="閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Add_Edit_Cg_POInStockBillList.html">鏀舵枡閫氱煡鍗�</a></dd>-->
+                                    </dl>
+                                </dd>
+                                <dd>
+                                    <a>閫�鏂欓�氱煡鍗�</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Cg_POInStockBackBillList.html">閫�鏂欓�氱煡鍗曠淮鎶�</a></dd>
+                                        <!--<dd><a lay-href="閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Add_Edit_Cg_POInStockBackBillList.html">閫�鏂欓�氱煡鍗�</a></dd>-->
+                                    </dl>
+                                </dd>
+                                <dd>
+                                    <a>閲囪喘鍏ュ簱鍗�</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBillList.html">閲囪喘鍏ュ簱鍗曠淮鎶�</a></dd>
+                                        <!--<dd><a lay-href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Add_Edit_Kf_POStockInBillList.html">閲囪喘鍏ュ簱鍗�</a></dd>-->
+                                    </dl>
+                                </dd>
+                                <dd>
+                                    <a>閲囪喘閫�鏂欏崟</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBillList.html">閲囪喘閫�鏂欏崟缁存姢</a></dd>
+                                    </dl>
+                                </dd>
+                                <!--<dd>
+                                    <a>鏉ユ枡妫�楠屽崟</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="璐ㄩ噺绠$悊/鏉ユ枡妫�楠屽崟/QC_POStockInCheckBillList.html">鏉ユ枡妫�楠屽崟缁存姢</a></dd>
+                                    </dl>
+                                </dd>-->
+                            </dl>
+                        </li>
+                        <!--閿�鍞鐞�-->
+                        <li data-name="set" class="layui-nav-item">
+                            <a><i class="layui-icon layui-icon-circle"></i><cite>閿�鍞鐞�</cite></a>
+                            <dl class="layui-nav-child">
+                                <dd>
+                                    <a>閿�鍞鍗�</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBillList.html">閿�鍞鍗曠淮鎶�</a></dd>
+                                        <dd><a lay-href="閿�鍞鐞�/閿�鍞鍗�/Add_Edit_Xs_SeOrderBillList.html">閿�鍞鍗�</a></dd>
+                                    </dl>
+                                </dd>
+                                <dd>
+                                    <a>鍙戣揣閫氱煡鍗�</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Xs_SeOutStockBillList.html">鍙戣揣閫氱煡鍗曠淮鎶�</a></dd>
+                                        <dd><a lay-href="閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Add_Edit_Xs_SeOutStockBillList.html">鍙戣揣閫氱煡鍗�</a></dd>
+                                    </dl>
+                                </dd>
+                                <dd>
+                                    <a>閫�璐ч�氱煡鍗�</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="閿�鍞鐞�/閫�璐ч�氱煡鍗�/Xs_SeOutStockBackBillList.html">閫�璐ч�氱煡鍗曠淮鎶�</a></dd>
+                                    </dl>
+                                </dd>
+                                <dd>
+                                    <a>閿�鍞嚭搴撳崟</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBillList.html">閿�鍞嚭搴撳崟缁存姢</a></dd>
+                                    </dl>
+                                </dd>
+                                <dd>
+                                    <a>閿�鍞��璐у崟</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="閿�鍞鐞�/閿�鍞��璐у崟/Kf_ICStockBillMainList.html">閿�鍞��璐у崟缁存姢</a></dd>
+                                    </dl>
+                                </dd>
+                            </dl>
+                        </li>
                         <!-- 浠撳瓨绠$悊 -->
                         <li data-name="set" class="layui-nav-item">
                             <a><i class="layui-icon layui-icon-down"></i><cite>浠撳瓨绠$悊</cite></a>
@@ -629,11 +635,11 @@
                                     </dl>
                                 </dd>
                                 <!--<dd>
-        <a>搴旀敹鍗�</a>
-        <dl class="layui-nav-child">
-            <dd><a lay-href="閿�鍞鐞�/搴旀敹鍗�/Xs_ReceivableBillList.html">搴旀敹鍗曠淮鎶�</a></dd>
-        </dl>
-    </dd>-->
+                <a>搴旀敹鍗�</a>
+                <dl class="layui-nav-child">
+                    <dd><a lay-href="閿�鍞鐞�/搴旀敹鍗�/Xs_ReceivableBillList.html">搴旀敹鍗曠淮鎶�</a></dd>
+                </dl>
+            </dd>-->
                                 <dd>
                                     <a>鍏朵粬搴旀敹鍗�</a>
                                     <dl class="layui-nav-child">
@@ -704,36 +710,39 @@
                                         <!-- <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Pay_PeriodInfoSet.html">鏈堝害璁剧疆</a></dd> -->
                                         <dd><a lay-href="鍩虹璧勬枡/閿�鍞熀纭�璧勬枡/Gy_Customer.html">瀹㈡埛鍒楄〃</a></dd>
                                         <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_ProjectMoney.html">璐圭敤椤圭洰鍒楄〃</a></dd>
-                                        <!-- <dd><a lay-href="鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html">渚涘簲鍟嗗垪琛�</a></dd> -->
+                                        <dd><a lay-href="鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html">渚涘簲鍟嗗垪琛�</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_SupType.html">渚涘簲鍟嗗垎绫诲垪琛�</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_PoStockStyle.html">閲囪喘鏂瑰紡鍒楄〃</a></dd>
                                         <!-- <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_OrderLev.html">璁㈠崟绛夌骇</a></dd> -->
-                                        <!-- <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_OrderBackInfo.html">璁㈠崟鍙嶉鐘舵��</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_TechnologyParameterList.html">宸ヨ壓鍙傛暟鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_TechnologyParameterUnitList.html">宸ヨ壓鍙傛暟鍗曚綅鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_TechParamByProcList.html">宸ヨ壓鍙傛暟瀵瑰簲琛ㄥ垪琛�</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_PackType.html">鍖呰鏂瑰紡</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_ConkType.html">鏁呴殰绫诲埆</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_StockStatusList.html">搴撳瓨鐘舵�佸垪琛�</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_SupplierContactList.html">渚涜揣鏂硅仈绯讳汉鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_COMMONCONTACTList.html">鏀惰揣鏂硅仈绯讳汉鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_PaymentConditionList.html">浠樻鏉′欢鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_RecConditionList.html">鏀舵鏉′欢鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_TaxRateList.html">绋庣巼鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_RateTypeList.html">姹囩巼鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_CustLocationList.html">浜よ揣鍦扮偣鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_SettleStyle.html">缁撶畻鏂瑰紡鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MatePriceSup.html">閲囪喘浠锋牸鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_Operator.html">涓氬姟鍛樺垪琛�</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_Work.html">浣滀笟鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_Staff.html">鍛樺伐鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MouldStatus.html">鍣ㄥ叿鐘舵�佸垪琛�</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_EquipStatus.html">璁惧鐘舵�佸垪琛�</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_TaxMIX.html">绋庣粍鍚堝垪琛�</a></dd> -->
+                                        <!--<dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_OrderBackInfo.html">璁㈠崟鍙嶉鐘舵��</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_TechnologyParameterList.html">宸ヨ壓鍙傛暟鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_TechnologyParameterUnitList.html">宸ヨ壓鍙傛暟鍗曚綅鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_TechParamByProcList.html">宸ヨ壓鍙傛暟瀵瑰簲琛ㄥ垪琛�</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_PackType.html">鍖呰鏂瑰紡</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_ConkType.html">鏁呴殰绫诲埆</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_StockStatusList.html">搴撳瓨鐘舵�佸垪琛�</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_SupplierContactList.html">渚涜揣鏂硅仈绯讳汉鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_COMMONCONTACTList.html">鏀惰揣鏂硅仈绯讳汉鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_PaymentConditionList.html">浠樻鏉′欢鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_RecConditionList.html">鏀舵鏉′欢鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_TaxRateList.html">绋庣巼鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_RateTypeList.html">姹囩巼鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_CustLocationList.html">浜よ揣鍦扮偣鍒楄〃</a></dd>-->
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_SettleStyle.html">缁撶畻鏂瑰紡鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Currency.html">甯佸埆鍒楄〃</a></dd>
+                                        <!--<dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MatePriceSup.html">閲囪喘浠锋牸鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_Operator.html">涓氬姟鍛樺垪琛�</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_Work.html">浣滀笟鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_Staff.html">鍛樺伐鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MouldStatus.html">鍣ㄥ叿鐘舵�佸垪琛�</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_EquipStatus.html">璁惧鐘舵�佸垪琛�</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_TaxMIX.html">绋庣粍鍚堝垪琛�</a></dd>-->
                                     </dl>
                                     <!-- </dd>
-                <dd>
-                   <a>璁惧鍩虹璧勬枡</a>
-                   <dl class="layui-nav-child">
-                       <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_DotCheckEdit.html">鐐规椤圭洰</a></dd>-->
+    <dd>
+       <a>璁惧鍩虹璧勬枡</a>
+       <dl class="layui-nav-child">
+           <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_DotCheckEdit.html">鐐规椤圭洰</a></dd>-->
                                     <!-- <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_DotCheckList.html">鐐规椤圭洰缁存姢</a></dd> -->
                                     <!--<dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_RepairEdit.html">缁翠慨椤圭洰</a></dd>-->
                                     <!--  <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_RepairList.html">缁翠慨椤圭洰缁存姢</a></dd> -->
@@ -741,58 +750,58 @@
                                     <!-- <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_RepairCheckList.html">缁翠慨妫�楠岄」鐩淮鎶�</a></dd> -->
                                     <!--<dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MaintainEdit.html">淇濆吇椤圭洰</a></dd>-->
                                     <!-- <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MaintainList.html">淇濆吇椤圭洰缁存姢</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MateMould.html">浜у搧涓庡櫒鍏锋竻鍗�</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MateMouldList.html">浜у搧涓庡櫒鍏锋竻鍗曠淮鎶�</a></dd>
-                    </dl>
-                </dd> -->
+            <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MateMould.html">浜у搧涓庡櫒鍏锋竻鍗�</a></dd>
+            <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MateMouldList.html">浜у搧涓庡櫒鍏锋竻鍗曠淮鎶�</a></dd>
+        </dl>
+    </dd> -->
                                     <!-- <dd>
-                <a>鐢熶骇璧勬枡</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_WorkCenter.html">宸ヤ綔涓績鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html">宸ュ簭鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html">鐢熶骇璧勬簮鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_Group.html">鐢熶骇鐝粍鍒楄〃</a></dd>
-                   <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_BadReason.html">涓嶈壇鍘熷洜鍒楄〃</a></dd>
-                    <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_ConkReasonList.html">鏁呴殰鍘熷洜鍒楄〃</a></dd> -->
+    <a>鐢熶骇璧勬枡</a>
+    <dl class="layui-nav-child">
+        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_WorkCenter.html">宸ヤ綔涓績鍒楄〃</a></dd>
+        <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html">宸ュ簭鍒楄〃</a></dd>
+        <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html">鐢熶骇璧勬簮鍒楄〃</a></dd>
+        <dd><a lay-href="鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_Group.html">鐢熶骇鐝粍鍒楄〃</a></dd>
+       <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_BadReason.html">涓嶈壇鍘熷洜鍒楄〃</a></dd>
+        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_ConkReasonList.html">鏁呴殰鍘熷洜鍒楄〃</a></dd> -->
                                     <!-- <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_SOPBillList.html">浣滀笟鎸囧涔︾淮鎶�</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_SOPBillEdit.html">浣滀笟鎸囧涔︾紪杈�</a></dd>
-                        <dd><a href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_SOPBill.html" target="main_self_frame">浣滀笟鎸囧涔�</a></dd>
-                    </dl>
-                </dd> -->
+            <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_SOPBillEdit.html">浣滀笟鎸囧涔︾紪杈�</a></dd>
+            <dd><a href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_SOPBill.html" target="main_self_frame">浣滀笟鎸囧涔�</a></dd>
+        </dl>
+    </dd> -->
                                     <!-- <dd>
-                    <a>妫�楠岃祫鏂�</a>
-                    <dl class="layui-nav-child">
-                        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_CheckItem.html">妫�楠岄」鐩垪琛�</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_QCCheckClass.html">妫�楠岄」鐩垎绫诲垪琛�</a></dd>
-                    </dl>
-                </dd> -->
+        <a>妫�楠岃祫鏂�</a>
+        <dl class="layui-nav-child">
+            <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_CheckItem.html">妫�楠岄」鐩垪琛�</a></dd>
+            <dd><a lay-href="鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_QCCheckClass.html">妫�楠岄」鐩垎绫诲垪琛�</a></dd>
+        </dl>
+    </dd> -->
                                     <!-- <dd>
-                    <a>宸ヨ祫鍩虹璧勬枡</a>
-                    <dl class="layui-nav-child">
-                        <dd><a lay-href="鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_ProcPrice.html">宸ュ簭宸ヤ环璧勬枡</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_ProcPriceList.html">宸ュ簭宸ヤ环璧勬枡缁存姢</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_WorkDay.html">宸ヤ綔鏃ュ垪琛�</a></dd>
-                    </dl>
-                </dd> -->
+        <a>宸ヨ祫鍩虹璧勬枡</a>
+        <dl class="layui-nav-child">
+            <dd><a lay-href="鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_ProcPrice.html">宸ュ簭宸ヤ环璧勬枡</a></dd>
+            <dd><a lay-href="鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_ProcPriceList.html">宸ュ簭宸ヤ环璧勬枡缁存姢</a></dd>
+            <dd><a lay-href="鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_WorkDay.html">宸ヤ綔鏃ュ垪琛�</a></dd>
+        </dl>
+    </dd> -->
                                     <!-- <dd>
-                    <a>浜у搧璧勬枡</a>
-                    <dl class="layui-nav-child">
-                        <dd><a lay-href="鍩虹璧勬枡/浜у搧鍩虹璧勬枡/Gy_StdMinPickQty.html">渚涘簲鍟嗙墿鏂欒祫鏂�</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/浜у搧鍩虹璧勬枡/Gy_StdMinPickQtyList.html">渚涘簲鍟嗙墿鏂欒祫鏂欑淮鎶�</a></dd>
-                    </dl>
-                </dd> -->
+        <a>浜у搧璧勬枡</a>
+        <dl class="layui-nav-child">
+            <dd><a lay-href="鍩虹璧勬枡/浜у搧鍩虹璧勬枡/Gy_StdMinPickQty.html">渚涘簲鍟嗙墿鏂欒祫鏂�</a></dd>
+            <dd><a lay-href="鍩虹璧勬枡/浜у搧鍩虹璧勬枡/Gy_StdMinPickQtyList.html">渚涘簲鍟嗙墿鏂欒祫鏂欑淮鎶�</a></dd>
+        </dl>
+    </dd> -->
                                     <!--<dd>
-                    <a>鏁版嵁瀛楀吀</a>
-                    <dl class="layui-nav-child">
-                        <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_Table.html"> 鏁版嵁瀛楀吀(琛ㄧ粨鏋�)</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_TableList.html"> 鏁版嵁瀛楀吀(琛ㄧ粨鏋�)缁存姢</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_View.html"> 鏁版嵁瀛楀吀(瑙嗗浘)</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_ViewList.html"> 鏁版嵁瀛楀吀(瑙嗗浘)缁存姢</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_Proc.html"> 鏁版嵁瀛楀吀(瀛樺偍杩囩▼)</a></dd>
-                        <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_ProcList.html"> 鏁版嵁瀛楀吀(瀛樺偍杩囩▼)缁存姢</a></dd>
-                    </dl>
-                </dd>-->
-                            </dl>
+        <a>鏁版嵁瀛楀吀</a>
+        <dl class="layui-nav-child">
+            <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_Table.html"> 鏁版嵁瀛楀吀(琛ㄧ粨鏋�)</a></dd>
+            <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_TableList.html"> 鏁版嵁瀛楀吀(琛ㄧ粨鏋�)缁存姢</a></dd>
+            <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_View.html"> 鏁版嵁瀛楀吀(瑙嗗浘)</a></dd>
+            <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_ViewList.html"> 鏁版嵁瀛楀吀(瑙嗗浘)缁存姢</a></dd>
+            <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_Proc.html"> 鏁版嵁瀛楀吀(瀛樺偍杩囩▼)</a></dd>
+            <dd><a lay-href="鍩虹璧勬枡/鏁版嵁瀛楀吀/Xt_DataDictionary_ProcList.html"> 鏁版嵁瀛楀吀(瀛樺偍杩囩▼)缁存姢</a></dd>
+        </dl>
+    </dd>-->
+</dl>
                         </li>
                         <!-- 绯荤粺绠$悊 -->
                         <li data-name="set" class="layui-nav-item">
@@ -804,11 +813,11 @@
                                         <dd><a lay-href="绯荤粺绠$悊/鏃ュ織绠$悊/Xt_SystemLogList.html">绯荤粺涓婃満鏃ュ織鏌ヨ</a></dd>
                                         <dd><a lay-href="绯荤粺绠$悊/绯荤粺鍙傛暟绠$悊/Xt_SystemParameterList.html">绯荤粺鍙傛暟鏌ヨ</a></dd>
                                         <!--<dd><a lay-href="绯荤粺绠$悊/妯″潡绠$悊/Xt_XtgnbList.html">绯荤粺妯″潡淇℃伅鏌ヨ</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鍗曟嵁绫诲瀷/Xt_BillTypeList.html">绯荤粺鍗曟嵁绫诲瀷鏌ヨ</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/浼氳鏈熼棿/Xt_AccountPeriodList.html">浼氳鏈熼棿鏌ヨ</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鍏憡/GG_NoticeBillEdit.html">鍏憡淇℃伅</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鍏憡/GG_NoticeBillList.html">鍏憡淇℃伅缁存姢</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鍗曟嵁绫诲瀷/Xt_BillSubTypeList.html">绯荤粺鍗曟嵁瀛愮被鍨嬫煡璇�</a></dd>-->
+            <dd><a lay-href="绯荤粺绠$悊/鍗曟嵁绫诲瀷/Xt_BillTypeList.html">绯荤粺鍗曟嵁绫诲瀷鏌ヨ</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/浼氳鏈熼棿/Xt_AccountPeriodList.html">浼氳鏈熼棿鏌ヨ</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/鍏憡/GG_NoticeBillEdit.html">鍏憡淇℃伅</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/鍏憡/GG_NoticeBillList.html">鍏憡淇℃伅缁存姢</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/鍗曟嵁绫诲瀷/Xt_BillSubTypeList.html">绯荤粺鍗曟嵁瀛愮被鍨嬫煡璇�</a></dd>-->
                                     </dl>
                                 </dd>
                                 <dd>
@@ -817,30 +826,31 @@
                                         <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Xt_UserList.html">鐢ㄦ埛鍒楄〃</a></dd>
                                         <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Xt_UserGroupList.html">瑙掕壊鍒楄〃</a></dd>
                                         <!--<dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Xt_UserSuplies.html">鐢ㄦ埛鍏宠仈渚涘簲鍟�</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserByOrg.html">鐢ㄦ埛鍏宠仈缁勭粐</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserStock.html">鐢ㄦ埛鍏宠仈浠撳簱</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserByWorkStation.html">鐢ㄦ埛鍏宠仈宸ヤ綅</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserGroup.html">鐢ㄦ埛鍏宠仈鐝粍</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserDept.html">鐢ㄦ埛鍏宠仈閮ㄩ棬</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserEmployee.html">鐢ㄦ埛鍏宠仈鑱屽憳</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserByUser.html">鐢ㄦ埛鍏宠仈鐢ㄦ埛</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserMater.html">鐢ㄦ埛鍏宠仈鐗╂枡</a></dd>-->
+            <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserByOrg.html">鐢ㄦ埛鍏宠仈缁勭粐</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserStock.html">鐢ㄦ埛鍏宠仈浠撳簱</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserByWorkStation.html">鐢ㄦ埛鍏宠仈宸ヤ綅</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserGroup.html">鐢ㄦ埛鍏宠仈鐝粍</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserDept.html">鐢ㄦ埛鍏宠仈閮ㄩ棬</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserEmployee.html">鐢ㄦ埛鍏宠仈鑱屽憳</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserByUser.html">鐢ㄦ埛鍏宠仈鐢ㄦ埛</a></dd>
+            <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserMater.html">鐢ㄦ埛鍏宠仈鐗╂枡</a></dd>-->
                                         <!--<dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserCustomer.html">鐢ㄦ埛鍏宠仈瀹㈡埛</a></dd>-->
                                         <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserCustomerList.html">鐢ㄦ埛鍏宠仈瀹㈡埛缁存姢</a></dd>
+                                        <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Xt_UserSupliesList.html">鐢ㄦ埛鍏宠仈渚涘簲鍟嗙淮鎶�</a></dd>
                                         <dd><a lay-href="绯荤粺绠$悊/鐢ㄦ埛绠$悊/Gy_UserProcess.html">鐢ㄦ埛鍏宠仈宸ュ簭</a></dd>
                                         <!--<dd><a lay-href="">鏉冮檺鏌ヨn</a></dd>-->
                                         <dd><a lay-href="set/user/password.html">瀵嗙爜璁剧疆</a></dd>
                                     </dl>
                                 </dd>
-                                <!--<dd>
-                <a>澶氱骇瀹℃壒</a>
-                <dl class="layui-nav-child">
-                    <dd><a lay-href="绯荤粺绠$悊/澶氱骇瀹℃壒/瀹℃牳椤圭洰/Xt_CheckItemList.html">瀹℃牳椤圭洰鍒楄〃</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/澶氱骇瀹℃壒/瀹℃牳娴佺▼鍗�/Xt_CheckFlowList.html">瀹℃牳娴佺▼鍗曞垪琛�</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/澶氱骇瀹℃壒/瀹℃牳娴佺▼鍗�/Xt_CheckUserRight.html">瀹℃壒鐢ㄦ埛鏉冮檺璁剧疆</a></dd>
-                    <dd><a lay-href="绯荤粺绠$悊/缁勭粐鏋舵瀯璁剧疆/Gy_DutyList.html">缁勭粐鏋舵瀯鍒楄〃</a></dd>
-                </dl>
-            </dd>-->
+                                <dd>
+                                    <a>澶氱骇瀹℃壒</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="绯荤粺绠$悊/澶氱骇瀹℃壒/瀹℃牳椤圭洰/Xt_CheckItemList.html">瀹℃牳椤圭洰鍒楄〃</a></dd>
+                                        <dd><a lay-href="绯荤粺绠$悊/澶氱骇瀹℃壒/瀹℃牳娴佺▼鍗�/Xt_CheckFlowList.html">瀹℃牳娴佺▼鍗曞垪琛�</a></dd>
+                                        <dd><a lay-href="绯荤粺绠$悊/澶氱骇瀹℃壒/瀹℃牳娴佺▼鍗�/Xt_CheckUserRight.html">瀹℃壒鐢ㄦ埛鏉冮檺璁剧疆</a></dd>
+                                        <!--<dd><a lay-href="绯荤粺绠$悊/缁勭粐鏋舵瀯璁剧疆/Gy_DutyList.html">缁勭粐鏋舵瀯鍒楄〃</a></dd>-->
+                                    </dl>
+                                </dd>
                             </dl>
                         </li>
                     </ul>
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html"
index c58c4c6..fd8b24b 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html"
@@ -725,7 +725,7 @@
                             //async: true,
                             data: { "HItemID": checkStatus.data[0].HItemID, "User": sessionStorage["HUserName"], "ModRightNameDelete": ModRightNameDelete },
                             success: function (result) {
-                                if (result.count == 1) {
+                                if (result.code == 1) {
                                     layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                         // 寰楀埌frame绱㈠紩
                                         var index = layer.getFrameIndex(window.name);
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier_Edit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier_Edit.html"
index 33626be..0983259 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier_Edit.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier_Edit.html"
@@ -343,11 +343,24 @@
                     <input type="hidden" name="HMaker" id="HMaker"><!--鍒跺崟浜�-->
                     <div class="layui-tab" lay-filter="tab-POStockInBill">
                         <ul class="layui-tab-title" lay-filter="tab-all">
-                            <li lay-id="1" style="padding:1px;" class="layui-this">浠樻璁″垝</li>
+                            <li lay-id="1" style="padding:1px;" class="layui-this">鑱旂郴浜�</li>
+                            <li lay-id="2" style="padding:1px;">浠樻璁″垝</li>
                         </ul>
                         <div class="layui-tab-content">
-                            <!--瀛愯〃-->
+                            <!--鑱旂郴浜�-->
                             <div class="layui-tab-item layui-show">
+                                <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+                                <script type="text/html" id="toolbarDemo1">
+                                    <div class="layui-btn-container">
+                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Up"><i class="layui-icon layui-icon-form"></i>涓婄Щ</button>
+                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Under"><i class="layui-icon layui-icon-form"></i>涓嬬Щ</button>
+                                    </div>
+                                </script>
+                            </div>
+                            <!--浠樻璁″垝-->
+                            <div class="layui-tab-item">
                                 <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                                 <script type="text/html" id="toolbarDemo">
                                     <div class="layui-btn-container">
@@ -362,6 +375,11 @@
             </div>
         </div>
     </div>
+    <!--椤圭洰闃舵琛細鍒犻櫎-->
+    <script type="text/html" id="barDemo1">
+        <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </script>
     <!--椤圭洰闃舵琛細鍒犻櫎-->
     <script type="text/html" id="barDemo">
         <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
@@ -402,6 +420,7 @@
             //#endregion
 
             var option;
+            var option1;
             //#region 杩涘叆椤甸潰鏃㈠姞杞�
             $("#HCreator").val(sessionStorage["HUserName"]);//鍒涘缓浜�
             $("#HCreateOrg").val(sessionStorage["Organization"]);
@@ -444,8 +463,8 @@
 
 
             //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
-
-            //澶村伐鍏锋爮浜嬩欢
+            //#region 瀛愯〃鐩稿叧鏂规硶-浠樻璁″垝
+            //#region 澶村伐鍏锋爮浜嬩欢
             table.on('toolbar(mainTable)', function (obj) {
                 var checkStatus = table.checkStatus('mainTable')
                     , data = checkStatus.data;
@@ -487,6 +506,7 @@
 
                 }
             });
+            //#endregion
 
             //#region 瀛愯〃锛氳鍐呬簨浠�
             table.on('tool(mainTable)', function (obj) {
@@ -496,6 +516,166 @@
             });
             //#endregion
 
+            //#region 琛屽唴鍒犻櫎-璁″垝琛�
+            function set_GridDelete(obj) {
+                var data = obj.data;
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+                        console.log("绱㈠紩涓�:" + rowIndex);
+                        if (rowIndex === '0') {
+                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                        } else {
+                            var oldData = table.cache["mainTable"];
+                            oldData.splice(obj.tr.data('index'), 1)
+                            option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option);
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+            //#endregion
+            //#endregion
+
+            //#region 瀛愯〃鐩稿叧鏂规硶-鑱旂郴浜�
+            //#region 澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable1)', function (obj) {
+                var checkStatus = table.checkStatus('mainTable1')
+                    , data = checkStatus.data;
+                //鏂板琛岃〃鏍兼暟鎹�
+
+                var NewRow = {
+                    "HLinkMan": ""
+                    , "HLinkPhone": ""
+                    , "HRemark": ""
+                };
+                switch (obj.event) {
+                    case 'btn-AddLine':
+                        table.cache["mainTable1"].push(NewRow);
+                        option1.data = table.cache["mainTable1"];
+
+                        table.render(option1);
+                        //鍒锋柊澶嶉�夋
+                        //checkRefresh();
+                        break;
+                    case 'btn-CopyLine':
+                        var copydata = JSON.stringify(data);
+                        if (data.length <= 0) {
+                            layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                        }
+                        else if (data.length > 1) {
+                            layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                        }
+                        else {
+                            var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+                            var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+                            table.cache["mainTable1"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+                            option1.data = table.cache["mainTable1"];//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option1);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+                            //鍒锋柊澶嶉�夋
+                            //checkRefresh();
+                        }
+                        break;
+                    //涓婄Щ
+                    case 'btn-Up': btn_up1();
+                        break;
+                    //涓嬬Щ
+                    case 'btn-Under': btn_under1();
+                        break;
+                }
+            });
+           //#endregion
+
+            //#region 瀛愯〃锛氳鍐呬簨浠�
+            table.on('tool(mainTable1)', function (obj) {
+                set_GridDelete1(obj);   //琛屽唴鍒犻櫎
+                /*set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�*/
+            });
+            //#endregion
+
+            //#region 琛屽唴鍒犻櫎-鑱旂郴浜�
+            function set_GridDelete1(obj) {
+                var data = obj.data;
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+                        console.log("绱㈠紩涓�:" + rowIndex);
+                        if (rowIndex === '0') {
+                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                        } else {
+                            var oldData = table.cache["mainTable1"];
+                            oldData.splice(obj.tr.data('index'), 1)
+                            option1.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option1);
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+            //#endregion
+
+            //#region 涓婄Щ
+            function btn_up1() {
+                var checkStatus = table.checkStatus('mainTable1')
+                    , data = checkStatus.data;
+                if (data.length == 1) {
+                    var tables = [];
+                    //鑾峰彇琛ㄦ牸鐨勫叏閮ㄨ
+                    var rowList = table.cache['mainTable1'];
+                    for (var i = 0; i < rowList.length; i++) {          //閬嶅巻琛ㄦ牸鐨勮
+                        if (rowList[i].LAY_CHECKED == true) {           //鑾峰彇閫変腑琛岀殑浣嶇疆
+                            //濡傛灉鏄涓�琛屼笂绉伙紝鍒欏け璐ュ苟鎻愰啋
+                            if (i == 0) {
+                                layer.msg("绗竴琛屾暟鎹棤娉曚笂绉伙紒");
+                                return;
+                            }
+                            tables.push(option1.data[i - 1]);
+                            data[0].LAY_CHECKED = true;
+                            option1.data[i - 1] = data[0];
+                            option1.data[i] = tables[0];
+                            table.render(option1);
+                            break;
+                        }
+                    }
+                } else {
+                    layer.msg("璇烽�夋嫨涓�琛屾暟鎹紒");
+                }
+            }
+            //#endregion
+
+            //#region 涓嬬Щ
+            function btn_under1() {
+                var checkStatus = table.checkStatus('mainTable1')
+                    , data = checkStatus.data;
+                if (data.length == 1) {
+                    var tables = [];
+                    //鑾峰彇琛ㄦ牸鐨勫叏閮ㄨ
+                    var rowList = table.cache['mainTable1'];
+                    for (var i = 0; i < rowList.length; i++) {          //閬嶅巻琛ㄦ牸鐨勮
+                        if (rowList[i].LAY_CHECKED == true) {           //鑾峰彇閫変腑琛岀殑浣嶇疆
+                            //濡傛灉鏄渶鍚庝竴琛屼笅绉伙紝鍒欏け璐ュ苟鎻愰啋
+                            if (i == option1.data.length - 1) {
+                                layer.msg("鏈�鍚庝竴琛屾暟鎹棤娉曚笅绉伙紒");
+                                return;
+                            }
+
+                            tables.push(option1.data[i + 1]);
+                            data[0].LAY_CHECKED = true;
+                            option1.data[i + 1] = data[0];
+                            option1.data[i] = tables[0];
+                            table.render(option1);
+                            break;
+                        }
+                    }
+                } else {
+                    layer.msg("璇烽�夋嫨涓�琛屾暟鎹紒");
+                }
+            }
+            //#endregion
+            //#endregion
+
+            //#region 寮圭獥鐩戝惉
             //缁撶畻鏂瑰紡寮圭獥
             form.on('submit(btnSearchProc)', function () {
                 //椤甸潰灞�-鑷畾涔�
@@ -663,6 +843,18 @@
                 });
             });
 
+            //鍒涘缓缁勭粐
+            form.on('submit(HCreateOrgID_BT)', function () {
+                HCreateOrgID_BT();
+            });
+
+            //浣跨敤缁勭粐
+            form.on('submit(HUseOrgID_BT)', function () {
+                HUseOrgID_BT();
+            });
+            //#endregion 
+
+            //#region 鎿嶄綔鎸夐挳鐩戝惉
             //淇濆瓨
             form.on('submit(Saver)', function (data) {//鎻愪氦
                 var ModRightNameAdd = 'Gy_Supplier_Edit';
@@ -681,8 +873,19 @@
                 //瀛愯〃搴忓垪鍖�
                 var sSubStr = JSON.stringify(num);
 
+                //瀛愯〃
+                var num1 = [];
+                for (var i = 0; i < table.cache["mainTable1"].length; i++) {
+                    if (table.cache["mainTable1"][i] != "") {
+                        table.cache["mainTable1"][i].LAY_TABLE_INDEX = i;
+                        num1.push(table.cache["mainTable1"][i])
+                    }
+                }
+                //瀛愯〃搴忓垪鍖�
+                var sSubStr1 = JSON.stringify(num1);
+
                 var oMain = JSON.stringify(data.field)
-                var sBillModeify = oMain + ';' + sSubStr + ';' + linterid + ';' + user + ';' + ModRightNameAdd;
+                var sBillModeify = oMain + ';' + sSubStr + ';' + linterid + ';' + user + ';' + ModRightNameAdd + ';' + sSubStr1;
                 if (AllowLoadData()) {
                     if (OperationType == "3") {
                         $.ajax({
@@ -716,7 +919,7 @@
                             type: "POST",
                             url: GetWEBURL() + "/Gy_Supplier/AddBill",
                             async: true,
-                            data: { "oMain": oMain + ';' + sSubStr },
+                            data: { "oMain": oMain + ';' + sSubStr + ';' + sSubStr1},
                             dataType: "json",
                             success: function (data) {
                                 if (data.count == 1) {
@@ -769,16 +972,7 @@
                 window.location.reload();
                 $("#HCreator").val(sessionStorage["HUserName"]);//鍒涘缓浜�
             });
-
-            //鍒涘缓缁勭粐
-            form.on('submit(HCreateOrgID_BT)', function () {
-                HCreateOrgID_BT();
-            });
-
-            //浣跨敤缁勭粐
-            form.on('submit(HUseOrgID_BT)', function () {
-                HUseOrgID_BT();
-            });
+            //#endregion
             //#endregion
 
             //#region 姝ら〉闈㈡墍鏈夋柟娉�
@@ -795,7 +989,7 @@
             }
 
             //娴佹按鍙锋柊澧炶幏鍙栫紪鐮�
-            function setHNumber(TypeID){
+            function setHNumber(TypeID) {
                 var ajaxLoad = layer.load();
                 $.ajax({
                     url: GetWEBURL() + '/Gy_Supplier/getMaxNum',
@@ -823,7 +1017,7 @@
                 $.ajax({
                     url: GetWEBURL() + 'Gy_Currency/list1',
                     type: "GET",
-                    async:false,
+                    async: false,
                     data: { "sWhere": " and 璐у竵鍚嶇О = '浜烘皯甯�'", "user": sessionStorage["HUserName"] },
                     success: function (data1) {
                         if (data1.data != null) {
@@ -841,28 +1035,7 @@
                 });
             }
 
-            //#region 璁″垝琛�
-            function set_GridDelete(obj) {
-                var data = obj.data;
-                var rowIndex = $(obj.tr).attr("data-index");
-                if (obj.event === 'del') {
-                    layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
-                        console.log("绱㈠紩涓�:" + rowIndex);
-                        if (rowIndex === '0') {
-                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
-                        } else {
-                            var oldData = table.cache["mainTable"];
-                            oldData.splice(obj.tr.data('index'), 1)
-                            option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
-                            table.render(option);
-                            layer.close(index);
-                        }
-                    });
-                }
-            }
-            //#endregion
-
-            //#region 璁″垝琛ㄥ垵濮嬪寲
+            //#region 瀛愯〃鍒濆鍖�
             function get_InitGrid() {
                 option = {
                     elem: '#mainTable'
@@ -873,8 +1046,8 @@
                     , cols: [[
                         { type: 'checkbox', totalRowText: '鍚堣琛�' }
                         , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
-                        , { field: 'HPayType', title: '浠樻闃舵', edit: 'text' }     
-                        , { field: 'HPayRate', title: '浠樻姣斾緥% ', edit: 'text'}
+                        , { field: 'HPayType', title: '浠樻闃舵', edit: 'text' }
+                        , { field: 'HPayRate', title: '浠樻姣斾緥% ', edit: 'text' }
                         , { field: 'HPayTime', title: '缁撶畻鍛ㄦ湡', edit: 'text' }
                         , { field: 'HPayRemark', title: '澶囨敞璇存槑', edit: 'text' }
                         , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
@@ -883,7 +1056,7 @@
 
                 var rowdata = [
                     {
-                          "HPayType": ""
+                        "HPayType": ""
                         , "HPayRate": "0"
                         , "HPayTime": "0"
                         , "HPayRemark": ""
@@ -891,6 +1064,32 @@
                 ];
                 option.data = rowdata;
                 table.render(option);
+
+
+                option1 = {
+                    elem: '#mainTable1'
+                    , toolbar: '#toolbarDemo1'
+                    , totalRow: true
+                    , cellMinWidth: 120
+                    , height: 400
+                    , cols: [[
+                        { type: 'checkbox', totalRowText: '鍚堣琛�' }
+                        , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HLinkMan', title: '鑱旂郴浜�', edit: 'text' }
+                        , { field: 'HLinkPhone', title: '鑱旂郴鐢佃瘽 ', edit: 'text' }
+                        , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo1' }
+                    ]]
+                }
+                var rowdata1 = [
+                    {
+                        "HLinkMan": ""
+                        , "HLinkPhone": ""
+                        , "HRemark": ""
+                    }
+                ];
+                option1.data = rowdata1;
+                table.render(option1);
             }
             //#endregion
 
@@ -947,17 +1146,14 @@
 
                         option.data = d.list[0]["Gy_Supplier_PayPlan"];
                         table.render(option);
+
+                        option1.data = d.list[1]["Gy_Supplier_Link"];
+                        table.render(option1);
                         //table.reload(layTableId, {
                         //    data: ajaxReturnData
                         //});
                     }
                 });
-            }
-
-            //杩斿洖楠屾敹
-            function GetHSecManagerValue(obj) {
-                $("#HSecManager").val(obj[0].HName);
-                $("#HSecManagerID").val(obj[0].HItemID);
             }
 
             //鏁版嵁楠岃瘉
@@ -994,7 +1190,7 @@
                     layer.msg("璇疯緭鍏ヤ緵搴斿晢鍚嶇О", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return false;
                 }
-                 else {
+                else {
                     return true;
                 }
                 //var HTaxRate = $("#HTaxRate").val();
@@ -1096,23 +1292,31 @@
                     , btn2: function (index, layero) { }
                 })
             }
-
-           
             //#endregion
 
         });
-                //浠ヤ笂涓簂ayui妯″潡
-        function GetHPSStyleNameValue(obj)  //杩斿洖閲囪喘鏂瑰紡
-        {
-            $("#HPSStyleName").val(obj[0].閲囪喘鏂瑰紡鍚嶇О);
-            $("#HPSStyleID").val(obj[0].HItemID);
+        //浠ヤ笂涓簂ayui妯″潡
+
+        //杩斿洖楠屾敹
+        function GetHSecManagerValue(obj) {
+            $("#HSecManager").val(obj[0].HName);
+            $("#HSecManagerID").val(obj[0].HItemID);
         }
+
+            function GetHPSStyleNameValue(obj)  //杩斿洖閲囪喘鏂瑰紡
+            {
+                $("#HPSStyleName").val(obj[0].閲囪喘鏂瑰紡鍚嶇О);
+                $("#HPSStyleID").val(obj[0].HItemID);
+            }
+            //#endregion
+
         function GetSettleStyleValue (obj)  //缁撶畻鏂瑰紡
         {
             $("#HSSName").val(obj[0].缁撶畻鏂瑰紡鍚嶇О);
             $("#HSSID").val(obj[0].HItemID);
         }
 
+
     </script>
 
 
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\235\345\267\245\346\216\222\344\272\247/JIT_LockRequestBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\235\345\267\245\346\216\222\344\272\247/JIT_LockRequestBillList.html"
index 7c4b1c4..7881ee3 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\235\345\267\245\346\216\222\344\272\247/JIT_LockRequestBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\235\345\267\245\346\216\222\344\272\247/JIT_LockRequestBillList.html"
@@ -916,7 +916,7 @@
                     //閫昏緫瀹℃牳鏂规硶
                     $.ajax({
                         type: "GET",
-                        url: GetWEBURL() + "/JIT_LockRequestBill/AuditJIT_UnLockRequestBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        url: GetWEBURL() + "/JIT_LockRequestBill/AuditJIT_LockRequestBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
                         data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
                         success: function (result) {
                             if (result.count == 1) {
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\227\245\350\256\241\345\210\222\346\212\245\350\241\250/JIT_FuHeFenXiReport.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\227\245\350\256\241\345\210\222\346\212\245\350\241\250/JIT_FuHeFenXiReport.html"
new file mode 100644
index 0000000..a09d422
--- /dev/null
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\227\245\350\256\241\345\210\222\346\212\245\350\241\250/JIT_FuHeFenXiReport.html"
@@ -0,0 +1,581 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <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>
+    <style type="text/css">
+        input.layui-input.layui-unselect {
+            padding-right: 0;
+        }
+    </style>
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <div class="layui-colla-title layui-inline">
+                                    <div class="layui-inline">
+                                        <span>鏇村</span>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 85px;">宸ュ簭鍚嶇О</label>
+                                    <div class="layui-input-block" style="margin-left: 120px;">
+                                        <input type="text" class="layui-input" name="HProcTotalName" id="HProcTotalName">
+                                    </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" style="padding: 0px; margin-left: 6%;">
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
+                                        </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-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                            </div>
+                        </script>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+            //#region 鍏叡鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element
+                , laypage = layui.laypage
+                , laydate = layui.laydate
+            //鏌ヨ鏉′欢
+            var sWhere = "";
+            var option = [];
+            var HModName = "h_p_JIT_FuHeFenXiReport";
+            //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+            var titleData = [];
+
+            //#endregion
+
+
+            //#region 杩涘叆椤甸潰鏃㈠姞杞�
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+            //#endregion
+
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+            //#region 澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus(obj.config.id);
+                switch (obj.event) {
+                    //閫�鍑烘寜閽�
+                    case 'get_Exit': Pub_Close(2);
+                        break;
+                    //鍒楄缃�
+                    case 'set_HideColumn': get_HideColumn();
+                        break;
+                };
+            });
+            //#endregion
+
+            //#region 鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery();
+            });
+            //#endregion
+
+            //#region 閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                set_ClearQuery();
+            });
+            //#endregion
+            //#endregion
+
+            //#region 鐐瑰嚮琛岄�変腑楂樹寒
+            table.on('row(mainTable)', function (obj) {
+                //閫変腑琛屾敼鍙橀鑹�
+                var flag = !obj.tr.find(':checkbox:first').prop('checked');
+                obj.tr.find(':checkbox').prop('checked', flag);
+                if (flag) {
+                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //璁剧疆澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+                } else {
+                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+                }
+                //mainTable 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+                layui.each(table.cache.mainTable, function (i, l) {
+                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+                        l.LAY_CHECKED = flag;
+                    }
+                });
+            })
+            //#endregion
+
+            //#region 姝ら〉闈㈡墍鏈夋柟娉�
+            //#region 鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鏌ヨ
+                get_Display(sWhere);
+            }
+            //#endregion
+
+            //#region 鍒濆鍖栬〃鏍�
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , height: 'full-50'
+                    , page: true
+                    , limits: [50, 500, 5000, 20000]
+                    , limit: 50
+                    , cellMinWidth: 90
+
+                };
+            }
+            //#endregion
+
+            //#region 鏌ヨ
+            function get_Display(sWhere) {
+                var index = layer.load(0, { shade: false });
+                var ajaxLoad = layer.load();
+                //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                $.ajax({
+                   
+                    url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_FuHeFenXiReport',
+                    type: "GET",
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            var data = [];
+                            var col = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left' });
+                            for (var i = 0; i < data.length; i++) {
+                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+
+                            //鍔ㄦ�佹樉绀哄垪鍚�
+                            option = {
+                                elem: '#mainTable'
+                                , toolbar: '#toolbarDemo'
+                                , cols: [col]
+                                , data: data1.data
+                                , height: 'full-80'
+                                , page: true
+                                , limits: [50, 500, 5000, 20000]
+                                , limit: 50
+                                , cellMinWidth: 90
+                            }
+                            table.render(option);
+                            ////鍒锋柊鎸夐挳鏄剧ず
+                            //var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                            //var HBillType = "Gy_Post";
+                            //Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "" && $("#Comparator1").val() == 0 && $("#ColContent1").val() == "" && $("#Comparator2").val() == 0 && $("#ColContent2").val() == "") {
+                                ColFilter();
+                            }
+
+                            //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+                layer.close(index);
+            }
+            //#endregion
+
+            //#region 蹇�熸煡璇�
+            function get_FastQuery() {
+             
+                var HProcTotalName = $("#HProcTotalName").val();
+
+                var ColName = $("#ColName").val();//澶嶉�夋
+                var Comparator = $("#Comparator").val()
+                var ColContent = $("#ColContent").val();
+                var ColName1 = $("#ColName1").val();//澶嶉�夋
+                var Comparator1 = $("#Comparator1").val()
+                var ColContent1 = $("#ColContent1").val();
+                var ColName2 = $("#ColName2").val();//澶嶉�夋
+                var Comparator2 = $("#Comparator2").val()
+                var ColContent2 = $("#ColContent2").val();
+
+
+                if (ColName != 0 && Comparator != 0) {
+                    var com = "";
+                    switch (Comparator) {
+                        case "7":
+                            com = "like''%" + ColContent + "%''";
+                            break;
+                        case "8":
+                            com = "like''%" + ColContent + "''";
+                            break;
+                        case "9":
+                            com = "like''" + ColContent + "%''";
+                            break;
+                        case "10":
+                            com = "not like''%" + ColContent + "%''";
+                            break;
+                        default:
+                            com = "" + Comparator + "''" + ColContent + "''";
+                            break;
+                    }
+                    sWhere += " and " + ColName + " " + com;
+                }
+                if (ColName1 != 0 && Comparator1 != 0) {
+                    var com1 = "";
+                    switch (Comparator1) {
+                        case "7":
+                            com1 = "like''%" + ColContent1 + "%''";
+                            break;
+                        case "8":
+                            com1 = "like''%" + ColContent1 + "''";
+                            break;
+                        case "9":
+                            com1 = "like''" + ColContent1 + "%''";
+                            break;
+                        case "10":
+                            com1 = "not like''%" + ColContent1 + "%''";
+                            break;
+                        default:
+                            com1 = "" + Comparator1 + "''" + ColContent1 + "''";
+                            break;
+                    }
+                    sWhere += " and " + ColName1 + " " + com1;
+                }
+                if (ColName2 != 0 && Comparator2 != 0) {
+                    var com2 = "";
+                    switch (Comparator2) {
+                        case "7":
+                            com2 = "like''%" + ColContent2 + "%''";
+                            break;
+                        case "8":
+                            com2 = "like''%" + ColContent2 + "''";
+                            break;
+                        case "9":
+                            com2 = "like''" + ColContent2 + "%''";
+                            break;
+                        case "10":
+                            com2 = "not like''%" + ColContent2 + "%''";
+                            break;
+                        default:
+                            com2 = "" + Comparator + "''" + ColContent + "''";
+                            break;
+                    }
+                    sWhere += " and " + ColName2 + " " + com2;
+                }
+                
+                if (HProcTotalName) {
+                    sWhere += " and 宸ュ簭鍚嶇О like ''%" + HProcTotalName + "%''";
+                }
+
+               
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+            //#endregion
+
+            //#region 閲嶇疆蹇�熸煡璇�
+            function set_ClearQuery() {
+              
+                $("#HProcTotalName").val("");
+
+                $("#ColContent").val("");
+                $("#ColName").val("0");
+                $("#Comparator").val("0")
+                $("#ColContent1").val("");
+                $("#ColName1").val("0");
+                $("#Comparator1").val("0");
+                $("#ColContent2").val("");
+                $("#ColName2").val("0");
+                $("#Comparator2").val("0");;
+                form.render('select');
+               
+                $("#btnSearch").click();
+                sWhere = "";
+            }
+            //#endregion
+         
+            //#endregion
+
+      
+            //#region 闅愯棌鍒楄缃�
+            function get_HideColumn() {
+                var colName = "";
+                var contentUrl = "";
+                for (var i = 1; i < option.cols[0].length; i++) {
+                    colName += option.cols[0][i]["title"] + ",";
+                }
+                var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+                var urlLen = urlStr.split('/');
+                for (var i = 0; i < urlLen.length - 4; i++) {
+                    contentUrl += "../";
+                }
+                colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+                contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim" //鍔犱笂杈规
+                    , title: "闅愯棌鍒楄缃�"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["50%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: [contentUrl, "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                        layer.close(index);//鍏抽棴寮圭獥
+                    }
+                })
+            }
+            //#endregion
+
+            //#region 鏄剧ず鍒楁暟鎹�
+            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 = ["鍗曟嵁ID", "HMouldID", "hsubid", "HManagerID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+                            dataCol = data1.data[0].HGridString.split(',');
+
+                            for (var i = 0; i < option.cols[0].length - 1; 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);
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                })
+            }
+            //#endregion
+
+            //#region 鍒楁槑鏄剧ず涓嬫媺妗�
+            function ColFilter() {
+                var Organization = '<option  value="0" selected="selected" ></option>';
+                for (var i = 1; i < option.cols[0].length; i++) {
+                    if (option.cols[0][i].hide != true) {
+                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+                    }
+                }
+                $("#ColName").empty();
+                $("#ColName").append(Organization);
+                $("#ColName1").empty();
+                $("#ColName1").append(Organization);
+                $("#ColName2").empty();
+                $("#ColName2").append(Organization);
+                form.render('select');
+            }
+            //#endregion
+
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+    </script>
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\235\245\346\226\231\346\243\200\351\252\214\345\215\225/QC_Add_Edit_POStockInCheckBillList.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\235\245\346\226\231\346\243\200\351\252\214\345\215\225/QC_Add_Edit_POStockInCheckBillList.html"
index fafe2bd..705a9e8 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\235\245\346\226\231\346\243\200\351\252\214\345\215\225/QC_Add_Edit_POStockInCheckBillList.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\235\245\346\226\231\346\243\200\351\252\214\345\215\225/QC_Add_Edit_POStockInCheckBillList.html"
@@ -79,7 +79,7 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">浜у搧鍐呯爜</label>
+                                            <label class="layui-form-label">浜у搧鍚嶇О</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HMaterName" id="HMaterName" class="layui-input" value="" style="float:left;width:150px;">
                                                 <input type="hidden" name="HMaterID" id="HMaterID" class="layui-input" value="" style="float:left;width:150px;">
@@ -106,7 +106,7 @@
                                             <label class="layui-form-label">妫�楠屽憳</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HFirstCheckEmpName" id="HFirstCheckEmpName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HFirstCheckEmpID" id="HFirstCheckEmpID" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="hidden" name="HFirstCheckEmp" id="HFirstCheckEmp" class="layui-input" value="" style="float:left;width:150px;">
                                                 <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
@@ -291,6 +291,19 @@
                 , laydate = layui.laydate
                 , element = layui.element;
 
+            //#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+            if (sessionStorage.login != "login") {
+                layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+                    icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+                }, function () { window.location.href = "../../user/login.html"; });
+            }
+            //#endregion
+
+            //#region 鑾峰彇鍙傛暟
+            laydate.render({
+                elem: '#HDate'
+
+            });
             var params = get_UrlVars();
             if (typeof (params[params[0]]) == "undefined") {
                 var OperationType = 1;//鎿嶄綔绫诲瀷
@@ -302,17 +315,9 @@
                 var closeType = params[params[3]];  //鍏抽棴绫诲瀷
             }
             var hID = params[params[1]];//缂栬緫鏌ョ湅
-            //甯歌鐢ㄦ硶
-            laydate.render({
-                elem: '#HDate'
+            //#endregion
 
-            });
-            //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
-            //if (sessionStorage.login != "login") {
-            //    layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
-            //        icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
-            //    }, function () { window.location.href = "../../user/login.html"; });
-            //}
+            //鐩稿叧鍙橀噺
             var tableReload = table.reload;
             var option = {
                 elem: '#mainTable'
@@ -327,23 +332,33 @@
                     , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
                     , { field: 'HQCCheckClassID', title: 'HQCCheckClassID', edit: 'text', width: 100, hide: true, totalRow: true }
                     , { field: 'HQCCheckClassNumber', title: '妫�楠岄」鐩被鍒�', edit: 'text', event: "HQCCheckClassCheck", width: 100 }
-                    , { field: 'HQCCheckClassName', title: '妫�楠岄」鐩被鍒悕绉�', edit: 'text', width: 100, hide: true }
+                    , { field: 'HQCCheckClassName', title: '妫�楠岄」鐩被鍒悕绉�', edit: 'text', width: 100 }
                     , { field: 'HQCCheckItemID', title: 'HQCCheckItemID', edit: 'text', hide: true }
                     , { field: 'HQCCheckItemNumber', title: '妫�楠岄」鐩�', edit: 'text', event: "HQCCheckItemCheck", width: 100 }
-                    , { field: 'HQCCheckItemName', title: '妫�楠岄」鐩悕绉�', edit: 'text', width: 100, hide: true }
+                    , { field: 'HQCCheckItemName', title: '妫�楠岄」鐩悕绉�', edit: 'text', width: 100}
                     , { field: 'HQCRelValue', title: '妫�楠屾暟鎹�', edit: 'text' }
                     , { field: 'HResult', title: '鍒ゅ畾', edit: 'text', event: "" }
                     , { field: 'HQCStd', title: '妫�楠屾爣鍑�', edit: 'text', event: "" }
-                    , { field: 'HProcCheckEmpID', title: 'HProcCheckEmpID', edit: 'text', width: 100, hide: true }
+                    , { field: 'HProcCheckEmp', title: 'HProcCheckEmp', edit: 'text', width: 100, hide: true }
                     , { field: 'HProcCheckEmpName', title: '妫�娴嬪憳', edit: 'text', event: 'HProcCheckEmpCheck', width: 150 }
-                    , { field: 'HProcCheckEmpNumber', title: '妫�娴嬪憳浠g爜', edit: 'text', width: 100, hide: true }
-                    , { field: 'HProcCheckTime', title: '妫�娴嬫棩鏈�', event: "", edit: 'text' }
+                    //, { field: 'HProcCheckEmpNumber', title: '妫�娴嬪憳浠g爜', edit: 'text', width: 100, hide: true }
+                    , { field: 'HProcCheckTime', title: '妫�娴嬫棩鏈�', event: "HDate" }
                     , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
                     , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 150 }
                 ]]
             };
+
+            var date = new Date();
+            var day = date.getDate();
+            var month = date.getMonth() + 1;
+            var year = date.getFullYear();
+            var shijian = year + "-" + month + "-" + day;
+
+
             //鍒ゆ柇鏄惁鏂板
             if (OperationType == 1) {
+                createBillNo()
+
                 $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
                 $("#HMaker").val(sessionStorage["HUserName"]);
               
@@ -351,34 +366,187 @@
                 option.data = [{
                     "HQCCheckClassID": " ", "HQCCheckClassNumber": " ", "HQCCheckClassName": " ", "HQCCheckItemID": " ",
                     "HQCCheckItemNumber": " ", "HQCCheckItemName": " ", "HQCRelValue": "  ", "HResult": "   "
-                    , "HQCStd": 0, "HProcCheckEmpID": " ", "HProcCheckEmpNumber": " ", "HProcCheckEmpName": " ", "HProcCheckTime": "  ", "HRemark": "  "
+                    , "HQCStd": 0, "HProcCheckEmp": " ", "HProcCheckEmpNumber": " ", "HProcCheckEmpName": " ", "HProcCheckTime": "  ", "HRemark": "  "
                 }];
                 table.render(option);
             }
             else {
                 $("#HInterID").val(hID);//淇敼鏃朵富琛↖D
-                //缂栬緫鍔犺浇鏁版嵁
-                $.ajax({
-                    url: GetWEBURL() + '/QC_POStockInCheckBill/QC_POStockInCheckBillListProjectDetai',
-                    type: "GET",
-                    data: { "sqlWhere": "and HInterID=" + hID },
-                    success: function (result) {
-                        //console.log(result);
-                        //console.log('gouba' + result);
-                        if (result.count == 1) {
-                            option.data = result.data;
-                            table.render(option);
+                RoadBillMain(hID);
+                RoadBillSub(hID);
+            }
 
-                        } else {
-                            layer.alert(result.code + result.Message, { icon: 5 });
+
+            //#region 琛ㄥご淇℃伅浠撳簱寮圭獥
+            form.on('submit(HSupList)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '渚涘簲鍟嗗垪琛�',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html?Type=HSup', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
-                    }, error: function () {
-                        layer.close(index0);
-                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        $("#HSupName").val(checkStatus.data[0].渚涘簲鍟嗗悕绉�);
+                        $("#HSupID").val(checkStatus.data[0].HItemID);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
                     }
                 });
-            }
-            //澶村伐鍏锋爮浜嬩欢
+            });
+            //#endregion
+
+            //#region 琛ㄥご淇℃伅浜у搧鍐呯爜
+            form.on('submit(HMaterList)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '浜у搧鍐呯爜鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HMaterName").val(checkStatus.data[0].鐗╂枡鍚嶇О);
+                        $("#HMaterID").val(checkStatus.data[0].HItemID);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+            //#endregion
+
+            //#region 妫�楠屽憳寮圭獥
+            form.on('submit(HEmpList)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '妫�楠屽憳鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HEmp', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HFirstCheckEmpName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
+                        $("#HFirstCheckEmp").val(checkStatus.data[0].HItemID);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+            //#endregion
+
+            //#region 閫�鍑�
+            form.on('submit(Exit)', function (data) {
+                if (params[1] != null) {
+                    Pub_Close(1);
+                } else if (params[1] == null) {
+                    Pub_Close(2);
+                }
+            });
+            //#endregion
+
+            //#region 淇濆瓨
+            form.on('submit(Saver)', function (data) {
+                //debugger;
+                data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜�
+                var sMainStr = JSON.stringify(data.field);
+                var sSubStr = JSON.stringify(table.cache['mainTable']);
+                var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"];
+                if (!AllowLoadData(sSubStr))//鏁版嵁楠岃瘉
+                {
+                    return false;
+                }
+                $.ajax(
+                    {
+                        type: "POST",
+                        url: GetWEBURL() + "/QC_POStockInCheckBill/AddBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        async: true,
+                        data: { "msg": sMainSub },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                    $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
+                                    var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
+                                    parent.layer.close(index); //鍐嶆墽琛屽叧闂�
+                                });
+                            }
+                            else {
+
+                                f_alert(data.Message);
+                                console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
+                            }
+                            layer.closeAll("loading");
+                        },
+                        error: function (err) {
+
+                            f_alert("閿欒:" + err);
+                            console.log("Reason" + sMainStr);
+                        }
+                    });
+            });
+            //#endregion
+
+            //#region 澶村伐鍏锋爮浜嬩欢
             var rowid = 0;
             var rows = 0;
             table.on('toolbar(mainTable)', function (obj) {
@@ -388,7 +556,7 @@
                 var NewRow = {
                     "HQCCheckClassID": " ", "HQCCheckClassNumber": " ", "HQCCheckClassName": " ", "HQCCheckItemID": " ",
                     "HQCCheckItemNumber": " ", "HQCCheckItemName": " ", "HQCRelValue": "  ", "HResult": "   "
-                    , "HQCStd": 0, "HProcCheckEmpID": " ", "HProcCheckEmpNumber": " ", "HProcCheckEmpName": " ", "HProcCheckTime": "  ", "HRemark": "  " };
+                    , "HQCStd": 0, "HProcCheckEmp": " ", "HProcCheckEmpNumber": " ", "HProcCheckEmpName": " ", "HProcCheckTime": "  ", "HRemark": "  " };
                 switch (obj.event) {
                     case 'btn-AddLine':
                         //table.cache["mainTable"].push(AddRow[rows]);
@@ -418,7 +586,9 @@
                         break;
                 }
             });
-            //琛屽唴浜嬩欢
+            //#endregion
+
+            //#region 琛屽唴浜嬩欢
             table.on('tool(mainTable)', function (obj) {
                 var data = obj.data;
                 var rowIndex = $(obj.tr).attr("data-index");
@@ -543,7 +713,7 @@
                                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                                     obj.update({
                                         HProcCheckEmpName: checkStatus.data[0].鑱屽憳鍚嶇О
-                                        , HProcCheckEmpID: checkStatus.data[0].HItemID
+                                        , HProcCheckEmp: checkStatus.data[0].HItemID
                                         , HProcCheckEmpNumber: checkStatus.data[0].鑱屽憳浠g爜
                                     });
 
@@ -565,9 +735,26 @@
 
                     }
                 })
+
+                //璁剧疆 鍙戣揣鏃堕棿
+                if (obj.event == 'HDate') {
+                    var data = obj.data;
+                    var field = $(this).data('field');
+                    laydate.render({
+                        elem: this.firstChild
+                        , show: true //鐩存帴鏄剧ず
+                        , closeStop: this
+                        , done: function (nowDate) {
+                            //鏃堕棿閫夋嫨瀹屾垚锛岃鏁版嵁鏇存柊
+                            data[field] = nowDate;
+                            obj.update(data);
+                        }
+                    });
+                }
             });
+            //#endregion
            
-            //鐩戝惉鍗曞厓鏍肩紪杈�
+            //#region 鐩戝惉鍗曞厓鏍肩紪杈�
             table.on('edit(mainTable)', function (obj) {
                 // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
                 var oldText = $(this).prev().text();
@@ -630,12 +817,49 @@
                     default:
                 }
             });
+            //#endregion
+
+            //#region 鏃ユ湡澶勭悊
+            function formatDate(date) {
+                var d = new Date(date),
+                    month = '' + (d.getMonth() + 1),
+                    day = '' + d.getDate(),
+                    year = d.getFullYear();
+
+                if (month.length < 2) month = '0' + month;
+                if (day.length < 2) day = '0' + day;
+
+                return [year, month, day].join('-');
+            }
+            //#endregion
+
+            //#region 鐢熸垚鍗曟嵁鍙�
+            function createBillNo() {
+                //鑾峰彇鏈�澶у崟鎹彿 new
+                $("#HInterID").val("0");
+                $("#HBillNo").val("");
+                $.ajax({
+                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    type: "GET",
+                    data: { "HBillType": '7503' },
+                    success: function (d) {
+                        //console.log(d.data);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                        $("#HDate").val(shijian);
+                        $("#HInterID").val(d.data[0].HInterID);
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 缂栬緫鍒濆鍖�-琛ㄥご
             function RoadBillMain(hID)//鍔犺浇琛ㄥご
             {
                 //alert(hID);
                 //鏌ヨ妫�楠屾柟妗堝崟鏄惁瀛樺湪
                 $.ajax({
                     url: GetWEBURL() + "/QC_POStockInCheckBill/QC_POStockInCheckBillListCheckDetail",
+                    async: false,
                     type: "GET",
                     data: {
                         "HID": hID
@@ -650,13 +874,13 @@
                                 , "HDate": formatDate(data.鏃ユ湡)
                                 , "HSupID": data.HSupID
                                 , "HSupName": data.渚涘簲鍟嗗悕绉�
-                                , "HMater": data.浜у搧鍚嶇О
-                                , "HMaterID": data.浜у搧ID
-                                , "HMaterNumber": data.浜у搧鍐呯爜
+                                , "HMaterName": data.浜у搧鍚嶇О
+                                , "HMaterID": data.HMaterID
+                                , "HMaterName": data.浜у搧鍚嶇О
                                 , "HInStockQty": data.鍏ュ簱鏁伴噺
                                 , "HRightQty": data.鍚堟牸鏁伴噺
-                                , "HEmpName": data.妫�楠屽憳鍚嶇О
-                                , "HFirstCheckEmp": data.妫�楠屽憳
+                                , "HFirstCheckEmpName": data.妫�楠屽憳鍚嶇О
+                                , "HFirstCheckEmp": data.妫�楠屽憳鍐呯爜
                                 , "HCheckQty": data.鎶芥鏁伴噺
                                 , "HBadQty": data.涓嶅悎鏍兼暟閲�
                                 , "HSteelStoveNo": data.閽㈡潗鐐夊彿
@@ -670,220 +894,41 @@
                         } else {
                             layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
                         }
-                    }, error: function () {
+                    }, error: function (e) {
                         layer.alert("鍙戠敓閿欒!", { icon: 5 });
                     }
                 });
             }
+            //#endregion
 
-
-            var date = new Date();
-            var day = date.getDate();
-            var month = date.getMonth() + 1;
-            var year = date.getFullYear();
-            var shijian = year + "-" + month + "-" + day;
-
-            //鍒ゆ柇鏄惁鏂板
-            if (hID == null || hID == 0) {
-                //鑾峰彇鏈�澶у崟鎹彿 new
-                $("#HInterID").val("0");
-                $("#HBillNo").val("");
+            //#region 缂栬緫鍒濆鍖�-瀛愯〃
+            function RoadBillSub(hID)//鍔犺浇瀛愯〃
+            {
+                //缂栬緫鍔犺浇鏁版嵁
                 $.ajax({
-                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    url: GetWEBURL() + '/QC_POStockInCheckBill/QC_POStockInCheckBillListProjectDetai',
+                    async: false,
                     type: "GET",
-                    data: { "HBillType": '7503' },
-                    success: function (d) {
-                        //console.log(d.data);
-                        $("#HBillNo").val(d.data[0].HBillNo);
-                        $("#HDate").val(shijian);
-                        $("#HInterID").val(0);
+                    data: { "sqlWhere": "and HInterID=" + hID },
+                    success: function (result) {
+                        //console.log(result);
+                        //console.log('gouba' + result);
+                        if (result.count == 1) {
+                            option.data = result.data;
+                            table.render(option);
+
+                        } else {
+                            layer.alert(result.code + result.Message, { icon: 5 });
+                        }
+                    }, error: function (e) {
+                        layer.close(index0);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 });
             }
-            else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
-                RoadBillMain(hID);
-                /* RoadBillSub(linterid);*/
-            }
-
-            //琛ㄥご淇℃伅浠撳簱寮圭獥
-            form.on('submit(HSupList)', function () {
-                //椤甸潰灞�-鑷畾涔�
-                layer.open({
-                    type: 2,
-                    skin: 'layui-layer-rim', //鍔犱笂杈规
-                    title: '渚涘簲鍟嗗垪琛�',
-                    closeBtn: 1,
-                    shift: 2,
-                    area: ['80%', '80%'],
-                    maxmin: true,
-                    content: ['../../鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html?Type=HSup', 'yes'],
-                    btn: ['纭畾', '鍙栨秷']
-                    , btn1: function (index, layero) {
-
-                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
-                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
-                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
-                        if (checkStatus.data.length === 0) {
-                            return layer.msg('璇烽�夋嫨鏁版嵁');
-                        }
-                        $("#HSupName").val(checkStatus.data[0].渚涘簲鍟嗗悕绉�);
-                        $("#HSupID").val(checkStatus.data[0].HItemID);
-                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
-                    }
-                    , btn2: function (index, layero) {
-                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
-                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
-                    },
-                    end: function () {
-
-                    },
-                    success: function (layero, index) {
-
-                    }
-                });
-            });
-
-
-            //琛ㄥご淇℃伅浜у搧鍐呯爜
-            form.on('submit(HMaterList)', function () {
-                //椤甸潰灞�-鑷畾涔�
-                layer.open({
-                    type: 2,
-                    skin: 'layui-layer-rim', //鍔犱笂杈规
-                    title: '浜у搧鍐呯爜鍒楄〃',
-                    closeBtn: 1,
-                    shift: 2,
-                    area: ['80%', '80%'],
-                    maxmin: true,
-                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html', 'yes'],
-                    btn: ['纭畾', '鍙栨秷']
-                    , btn1: function (index, layero) {
-
-                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
-                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
-                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
-                        if (checkStatus.data.length === 0) {
-                            return layer.msg('璇烽�夋嫨鏁版嵁');
-                        }
-                        $("#HMaterName").val(checkStatus.data[0].鐗╂枡鍚嶇О);
-                        $("#HMaterID").val(checkStatus.data[0].HItemID);
-                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
-                    }
-                    , btn2: function (index, layero) {
-                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
-                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
-                    },
-                    end: function () {
-
-                    },
-                    success: function (layero, index) {
-
-                    }
-                });
-            });
-
-            //妫�楠屽憳寮圭獥
-            form.on('submit(HEmpList)', function () {
-                //椤甸潰灞�-鑷畾涔�
-                layer.open({
-                    type: 2,
-                    skin: 'layui-layer-rim', //鍔犱笂杈规
-                    title: '妫�楠屽憳鍒楄〃',
-                    closeBtn: 1,
-                    shift: 2,
-                    area: ['80%', '80%'],
-                    maxmin: true,
-                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HEmp', 'yes'],
-                    btn: ['纭畾', '鍙栨秷']
-                    , btn1: function (index, layero) {
-
-                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
-                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
-                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
-                        if (checkStatus.data.length === 0) {
-                            return layer.msg('璇烽�夋嫨鏁版嵁');
-                        }
-                        $("#HFirstCheckEmpName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
-                        $("#HFirstCheckEmpID").val(checkStatus.data[0].HItemID);
-                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
-                    }
-                    , btn2: function (index, layero) {
-                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
-                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
-                    },
-                    end: function () {
-
-                    },
-                    success: function (layero, index) {
-
-                    }
-                });
-            });
-
-            //閫�鍑�
-            form.on('submit(Exit)', function (data) {
-                if (OperationType == 1) {
-                    Pub_Close(closeType);//鐩存帴鏂板closeType鍊间负2锛屽垪琛ㄨ皟鏂板closeType鍊间粠鍒楄〃浼犻��
-                }
-                else if (OperationType == 3) {
-                    Pub_Close(closeType);
-                }
-                else {
-                    Pub_Close(2);
-                }
-            });
-            function formatDate(date) {
-                var d = new Date(date),
-                    month = '' + (d.getMonth() + 1),
-                    day = '' + d.getDate(),
-                    year = d.getFullYear();
-
-                if (month.length < 2) month = '0' + month;
-                if (day.length < 2) day = '0' + day;
-
-                return [year, month, day].join('-');
-            }
-
-            //淇濆瓨
-            form.on('submit(Saver)', function (data) {
-                //debugger;
-                data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜�
-                var sMainStr = JSON.stringify(data.field);
-                var sSubStr = JSON.stringify(table.cache['mainTable']);
-                var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"];
-                if (!AllowLoadData(sSubStr))//鏁版嵁楠岃瘉
-                {
-                    return false;
-                }
-                $.ajax(
-                    {
-                        type: "POST",
-                        url: GetWEBURL() + "/QC_POStockInCheckBill/AddBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                        async: true,
-                        data: { "msg": sMainSub },
-                        dataType: "json",
-                        success: function (data) {
-                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
-                                    $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
-                                    var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
-                                    parent.layer.close(index); //鍐嶆墽琛屽叧闂�
-                                });
-                            }
-                            else {
-
-                                f_alert(data.Message);
-                                console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
-                            }
-                            layer.closeAll("loading");
-                        },
-                        error: function (err) {
-
-                            f_alert("閿欒:" + err);
-                            console.log("Reason" + sMainStr);
-                        }
-                    });
-            });
+            //#endregion
+           
+            //#region 鏃犳晥浠g爜
             function f_alert(sMsg) {
                 layer.alert(sMsg, { icon: 5 });
 
@@ -898,13 +943,14 @@
                     //}
                 }
             });
-
-
+            //#endregion
         });
         //瀹氫箟鍏ㄥ眬鍙橀噺
         var HReasonName, ReasonID, EmpName, SQProcName,
             ProcID, ZRProcName, QRName
             ;
+        //#region 瀛愰〉闈㈣皟鐢ㄨ繑鍥炴暟鎹柟娉�
+        //杩斿洖涓嶈壇鍘熷洜
         function GetHReasonValue(obj)  //杩斿洖涓嶈壇鍘熷洜
         {
             HReasonName = obj[0].HName;
@@ -922,6 +968,7 @@
             $("#HProcID").val(obj[0].HItemID);
             $("#HProcNumber").val(obj[0].宸ュ簭浠g爜);
         }
+        //杩斿洖閮ㄩ棬
         function GetHDeptNameValue(obj) {  //杩斿洖閮ㄩ棬
             $("#HDepName").val(obj[0].HName);
             $("#HDeptID").val(obj[0].HItemID);
@@ -933,17 +980,36 @@
             $("#HUnitID").val(obj[0].HItemID);
             $("#HUnitNumber").val(obj[0].HNumber);
         }
-
+        //杩斿洖璐d换浜�
         function GetHKeeperValue(obj) {  //杩斿洖璐d换浜�
             EmpName = obj[0].HName;
         }
+        //杩斿洖璐d换宸ュ簭
         function GetHZRValue(obj) {   //杩斿洖璐d换宸ュ簭
             ZRProcName = obj[0].宸ュ簭;
         }
+        //杩斿洖涓嶈壇纭浜�
         function GetHWorkerValue(obj) {  //杩斿洖涓嶈壇纭浜�
             QRName = obj[0].HName;
         }
-        //闈炵┖楠岃瘉
+        //渚涘簲鍟�
+        function GetHSupNameValue(obj) {   //渚涘簲鍟�
+            $("#HSupName").val(obj[0].渚涘簲鍟嗗悕绉�);
+            $("#HSupID").val(obj[0].HItemID);
+        }
+        //鐗╂枡
+        function GetMaterValue(obj) {  //鐗╂枡
+            $("#HMaterName").val(obj[0].鐗╂枡鍚嶇О);
+            $("#HMaterID").val(obj[0].HItemID);
+        }
+        //璐ㄦ鍛�
+        function GetHEmpValue(obj) {  //璐ㄦ鍛�
+            $("#HFirstCheckEmpName").val(obj[0].鑱屽憳鍚嶇О);
+            $("#HFirstCheckEmp").val(obj[0].HItemID);
+        }
+        //#endregion
+
+        //#region 闈炵┖楠岃瘉
         function AllowLoadData(sSubStr) {
             var HStockStyle = $("#HStockStyle").val();
             var Result = true;
@@ -993,26 +1059,11 @@
             //    }
             //}
             /*else {*/
-               /* return Result = true;*/
+            /* return Result = true;*/
             //}
             return Result;
         }
-
-        function GetHSupNameValue(obj) {   //渚涘簲鍟�
-            $("#HSupName").val(obj[0].渚涘簲鍟嗗悕绉�);
-            $("#HSupID").val(obj[0].HItemID);
-        }
-
-        function GetMaterValue(obj) {  //鐗╂枡
-            $("#HMaterName").val(obj[0].鐗╂枡鍚嶇О);
-            $("#HMaterID").val(obj[0].HItemID);
-        }
-
-        function GetHEmpValue(obj) {  //璐ㄦ鍛�
-            $("#HFirstCheckEmpName").val(obj[0].鑱屽憳鍚嶇О);
-            $("#HFirstCheckEmpID").val(obj[0].HItemID);
-        }
-
+        //#endregion
     </script>
 </body>
 </html>
\ No newline at end of file
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\235\245\346\226\231\346\243\200\351\252\214\345\215\225/QC_POStockInCheckBillList.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\235\245\346\226\231\346\243\200\351\252\214\345\215\225/QC_POStockInCheckBillList.html"
index b372201..181392f 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\235\245\346\226\231\346\243\200\351\252\214\345\215\225/QC_POStockInCheckBillList.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\235\245\346\226\231\346\243\200\351\252\214\345\215\225/QC_POStockInCheckBillList.html"
@@ -463,7 +463,7 @@
                 var checkStatus = table.checkStatus('mainTable')
                     , data = checkStatus.data;
                 if (checkStatus.data.length === 1) {
-                    var linterid = data[0];
+                    var linterid = data[0].HInterID;
                     //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
                     layer.open({
                         type: 2
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\344\273\230\346\254\276\345\215\225/YF_PayMentBill.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\344\273\230\346\254\276\345\215\225/YF_PayMentBill.html"
index 0216901..c246a88 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\344\273\230\346\254\276\345\215\225/YF_PayMentBill.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\344\273\230\346\254\276\345\215\225/YF_PayMentBill.html"
@@ -1085,9 +1085,11 @@
                     , "HAccSupID": dataArray[0].HSupID
                     , "HAccSupName": dataArray[0].渚涘簲鍟�
                     , "HSumMoney": dataArray[0].閲戦
+                    , "HRelSumMoney": (dataArray[0].閲戦 * 1) * ($("#HDiscountRate").val()* 0.01)
                     , "HProjectID": dataArray[0].HProjectID
                     , "HProjectName": dataArray[0].椤圭洰鍚嶇О
                     , "HProjectNumber": dataArray[0].椤圭洰浠g爜
+                    , "HInvoiceBillNo": dataArray[0].鍙戠エ缂栧彿
                 });
 
                 //瀛愯〃  璧嬪��
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
index 868be3b..9255801 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
@@ -67,7 +67,7 @@
                                         <div class="layui-inline">
                                             <label class="layui-form-label">鍗曟嵁缂栧彿</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;">
+                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" name="HInterID" id="HInterID" value="0">
                                             </div>
                                         </div>
@@ -95,7 +95,7 @@
                                                 <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="0" style="float:left;width:150px;">
                                                 <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" class="layui-input" value="0" style="float:left;width:150px;">
                                                 <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="float: left; width: 150px; ">
+                                                <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="float: left; width: 150px; " readonly>
                                                 <button type="button" lay-submit="" class="layui-btn" lay-filter="HMainSource" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
@@ -2171,15 +2171,15 @@
                                 , "HInvoiceBillNo": data.鍙戠エ缂栧彿
 
                                 , "HMaker": data.鍒跺崟浜�
-                                , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(data.鍒跺崟鏃ユ湡), "yyyy-MM-dd HH:mm:ss")
+                                , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(data.鍒跺崟鏃ユ湡), "yyyy-MM-dd hh:mm:ss")
                                 , "HUpDater": data.淇敼浜�
-                                , "HUpDateDate": data.淇敼鏃ユ湡 == null ? "" : Format(new Date(data.淇敼鏃ユ湡), "yyyy-MM-dd HH:mm:ss")
+                                , "HUpDateDate": data.淇敼鏃ユ湡 == null ? "" : Format(new Date(data.淇敼鏃ユ湡), "yyyy-MM-dd hh:mm:ss")
                                 , "HChecker": data.瀹℃牳浜�
-                                , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(data.瀹℃牳鏃ユ湡), "yyyy-MM-dd HH:mm:ss")
+                                , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(data.瀹℃牳鏃ユ湡), "yyyy-MM-dd hh:mm:ss")
                                 , "HCloseMan": data.鍏抽棴浜�
-                                , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Format(new Date(data.鍏抽棴鏃ユ湡), "yyyy-MM-dd HH:mm:ss")
+                                , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Format(new Date(data.鍏抽棴鏃ユ湡), "yyyy-MM-dd hh:mm:ss")
                                 , "HDeleteMan": data.浣滃簾浜�
-                                , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd HH:mm:ss")
+                                , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd hh:mm:ss")
                             });
 
                             if (data.HMainSourceBillType != "") {
@@ -3379,9 +3379,9 @@
                     , "HEmpName": dataArray[0].涓氬姟鍛�
                     , "HSupID": dataArray[0].HSupID
                     , "HSupName": dataArray[0].渚涘簲鍟�
-                    //, "HCurID": dataArray[0].HCurID
-                    //, "HCurName": dataArray[0].甯佸埆
-                    //, "HExRate": dataArray[0].姹囩巼
+                    , "HCurID": dataArray[0].HCurID
+                    , "HCurName": dataArray[0].甯佸埆
+                    , "HExRate": dataArray[0].姹囩巼
                     , "HSSID": "0"
                     , "HSSName": ""
                     , "HPSStyleID": dataArray[0].HPSStyleID
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html"
index a7508e7..6b13129 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html"
@@ -77,39 +77,37 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">涓氬姟鍛�</label>
+                                            <label class="layui-form-label">涓氬姟鍛�<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;" readonly>
                                                 <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;display:none;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
                                             </div>
                                         </div>
-
                                     </div>
                                     <div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">閮ㄩ棬<label style="color:red"> * </label></label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;" readonly>
+                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;display:none;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
                                         <div class="layui-col-xs8 layui-inline">
                                             <label class="layui-form-label">渚涘簲鍟�<label style="color:red"> * </label></label>
-                                            <div class="layui-input-inline" style="width:750px">
-                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:700px;" readonly>
-                                                <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float: left; width: 700px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;">
+                                            <div class="layui-input-inline" style="width:800px">
+                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:750px;" readonly>
+                                                <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float: left; width: 750px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;display:none;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">浠撳簱<label style="color:red"> * </label></label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;" readonly>
-                                                <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HWHList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
@@ -117,7 +115,7 @@
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HCurName" id="HCurName" class="layui-input" value="" style="float:left;width:150px;" readonly>
                                                 <input type="hidden" name="HCurID" id="HCurID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HCurList" style="width:40px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HCurList" style="width:40px;display:none;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
                                             </div>
@@ -129,19 +127,32 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">閮ㄩ棬<label style="color:red"> * </label></label>
+                                            <label class="layui-form-label">鍙戠エ缂栧彿</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;" readonly>
-                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
+                                                <input class="layui-input" name="HInvoiceBillNo" id="HInvoiceBillNo" autocomplete="off" style="width:150px;">
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">浠撳簱<label style="color:red"> * </label></label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;" readonly>
+                                                <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HWHList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
                                             </div>
                                         </div>
-                                    </div>
-
-                                    <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">浜よ揣鍦扮偣</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HAddress" id="HAddress" autocomplete="off">
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
                                             <label class="layui-form-label">涓荤</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;" readonly>
@@ -151,7 +162,7 @@
                                                 </button>
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs4 layui-inline">
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
                                             <label class="layui-form-label">婧愬崟绫诲瀷</label>
                                             <div class="layui-input-inline">
                                                 <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType">
@@ -159,7 +170,7 @@
                                                 </select>
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs4 layui-inline">
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
                                             <label class="layui-form-label">閫夊崟鍙�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HSourceBillNo" id="HSourceBillNo" class="layui-input" value="" style="float:left;width:150px;" readonly>
@@ -171,27 +182,15 @@
                                         </div>
 
                                     </div>
-                                    <div class="layui-row">
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">浜よ揣鍦扮偣</label>
-                                            <div class="layui-input-inline">
-                                                <input class="layui-input" name="HAddress" id="HAddress" autocomplete="off">
-                                            </div>
-                                        </div>
-                                        <div class="layui-col-xs4 layui-inline">
+                                    <div class="layui-row" style="display:none;">
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
                                             <label class="layui-form-label">鍐呴儴鍗曟嵁鍙�</label>
                                             <div class="layui-input-inline">
                                                 <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off">
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">鍙戠エ缂栧彿</label>
-                                            <div class="layui-input-inline">
-                                                <input class="layui-input" name="HInvoiceBillNo" id="HInvoiceBillNo" autocomplete="off">
-                                            </div>
-                                        </div>
                                     </div>
-                                    <div class="layui-row">
+                                    <div class="layui-row" style="display:none;">
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">椤圭洰缂栫爜</label>
                                             <div class="layui-input-inline">
@@ -213,13 +212,13 @@
                                         <div class="layui-col-xs7 layui-inline">
                                             <label class="layui-form-label">澶囨敞</label>
                                             <div class="layui-input-block">
-                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off">
+                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style="width:800px;">
                                             </div>
                                         </div>
                                     </div>
                                     <div class="layui-inline">
-                                        <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
-                                        <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                        <label class="layui-form-label" style="width: 85px;">缁勭粐<label style="color:red"> * </label></label>
+                                        <div class="layui-input-block" style="margin-left: 120px; width: 800px;">
                                             <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
                                                 <!--鍔ㄦ�佹覆鏌撶粍缁�-->
                                             </select>
@@ -309,10 +308,10 @@
                     <table class="layui-hide" 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-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
-                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
-                            <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Inventory" id="get_Inventory"><i class="layui-icon layui-icon-form"></i>搴撳瓨鏌ヨ</button>
-                            <button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>鍑哄叆搴撹褰曟煡璇�</button>
+                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>-->
+                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>-->
+                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Inventory" id="get_Inventory"><i class="layui-icon layui-icon-form"></i>搴撳瓨鏌ヨ</button>-->
+                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>鍑哄叆搴撹褰曟煡璇�</button>-->
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
                         </div>
                     </script>
@@ -971,11 +970,11 @@
                         , { field: 'HSecUnitID', title: 'HSecUnitID', width: 100, hide: true }
                         , { field: '杈呭姪鍗曚綅', title: '杈呭姪鍗曚綅', width: 100, edit: 'text', event: "HSecUnitID" }//f7
                         , { field: 'HQty', title: '鏁伴噺', width: 100, edit: 'text', totalRow: true }
-                        , { field: 'HPrice', title: '鍗曚环', width: 100, edit: 'text' }
-                        , { field: 'HTaxPrice', title: '鍚◣鍗曚环', width: 100, edit: 'text' }
-                        , { field: 'HMoney', title: '閲戦', width: 100, edit: 'text', totalRow: true }
-                        , { field: 'HDiscountRate', title: '鎶樻墸鐜�', width: 100, edit: 'text' }
-                        , { field: 'HTaxRate', title: '绋庣巼', width: 100, edit: 'text' }
+                        , { field: 'HPrice', title: '鍗曚环', width: 100}
+                        , { field: 'HTaxPrice', title: '鍚◣鍗曚环', width: 100}
+                        , { field: 'HMoney', title: '閲戦', width: 100, totalRow: true }
+                        , { field: 'HDiscountRate', title: '鎶樻墸鐜�', width: 100}
+                        , { field: 'HTaxRate', title: '绋庣巼', width: 100}
                         , { field: 'HTaxMoney', title: '绋庨', width: 100, style: 'background-color:#efefef4d;'}
                         , { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
                         , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
@@ -1361,12 +1360,12 @@
                     return false;
                 }
 
-                if ($("#HDeptID").val() == "0") {
+                if ($("#HDeptID").val() == "0" || $("#HDeptID").val() == "" ) {
                     layer.msg("閮ㄩ棬鏈�夋嫨!");
                     return false;
                 }
 
-                if ($("#HEmpID").val() == "0") {
+                if ($("#HEmpID").val() == "0" || $("#HEmpID").val() == "") {
                     layer.msg("涓氬姟鍛樻湭閫夋嫨!");
                     return false;
                 }
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBillList.html"
index f1aa571..659bcee 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBillList.html"
@@ -65,6 +65,14 @@
                                     </div>
                                 </div>
                                 <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
+                                    <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                        <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
+                                            <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-inline" style="display:none;">
                                     <label class="layui-form-label">椤圭洰缂栧彿</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input ForFilteringSchemes" name="HProjectNumber" id="HProjectNumber" style="width:190px;">
@@ -75,21 +83,15 @@
                                 </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-inline">
+
+                                <div class="layui-inline" style="display:none;">
                                     <label class="layui-form-label">鍗曟嵁鍙�</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input ForFilteringSchemes" name="HBillno2" id="HBillno2" style="width:190px;">
                                     </div>
                                 </div>
-                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding:0 5px">閲嶆柊鍚屾</button>
-                                <div class="layui-inline">
-                                    <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
-                                    <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
-                                        <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
-                                            <!--鍔ㄦ�佹覆鏌撶粍缁�-->
-                                        </select>
-                                    </div>
-                                </div>
+                                <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding: 0 5px; display: none; ">閲嶆柊鍚屾</button>-->
+
                                 <div class="layui-row">
                                     <!--鏄剧ず褰撳墠杩囨护鏂规-->
                                     <div class="layui-inline" style="margin-left:5px;">
@@ -210,7 +212,7 @@
                         <div id="page" style="position: relative; bottom: 0;"></div>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>-->
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-PushPOStockInBills" id="btn-PushPOStockInBills"><i class="layui-icon layui-icon-delete"></i>澶氳涓嬫帹(閲囪喘鍏ュ簱鍗�)</button>
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html"
index e396a28..8a5d91e 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html"
@@ -884,14 +884,15 @@
                                 if (HSourceBillData == null) {
                                     layer.alert("淇濆瓨澶辫触!绗�" + (i + 1) + "琛岋細鏈煡璇㈠埌婧愬崟鍗曟嵁!", { icon: 5 });
                                     return;
-                                } else if (HSourceBillData.鐘舵�� != "宸插鏍�") {
-                                    var err = "淇濆瓨澶辫触!鍘熷洜锛氱" + (i + 1) + "琛�-婧愬崟鍗曟嵁鐘舵�佷负鈥�" + HSourceBillData.鐘舵�� + "鈥濓紝涓嶅厑璁镐繚瀛橈紒";
-                                    layer.alert(err, { icon: 5 });
-                                    return;
-                                } else if (HSourceBillData.琛岀姸鎬� == "宸插叧闂�") {
-                                    layer.alert("淇濆瓨澶辫触!绗�" + (i + 1) + "琛岋細璇ヨ璁板綍琛岀姸鎬佷负'宸插叧闂�'鐘舵��!", { icon: 5 });
-                                    return;
                                 }
+                                //else if (HSourceBillData.鐘舵�� != "宸插鏍�") {
+                                //    var err = "淇濆瓨澶辫触!鍘熷洜锛氱" + (i + 1) + "琛�-婧愬崟鍗曟嵁鐘舵�佷负鈥�" + HSourceBillData.鐘舵�� + "鈥濓紝涓嶅厑璁镐繚瀛橈紒";
+                                //    layer.alert(err, { icon: 5 });
+                                //    return;
+                                //} else if (HSourceBillData.琛岀姸鎬� == "宸插叧闂�") {
+                                //    layer.alert("淇濆瓨澶辫触!绗�" + (i + 1) + "琛岋細璇ヨ璁板綍琛岀姸鎬佷负'宸插叧闂�'鐘舵��!", { icon: 5 });
+                                //    return;
+                                //}
                             } else {
                                 return;
                             }
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBackBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBackBillList.html"
index 0c09571..1ef43e9 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBackBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBackBillList.html"
@@ -64,18 +64,6 @@
                                         <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo" style="width:190px;">
                                     </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-inline">
-                                    <label class="layui-form-label">鍗曟嵁鍙�</label>
-                                    <div class="layui-input-block">
-                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillno2" id="HBillno2" style="width:190px;">
-                                    </div>
-                                </div>
-                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding:0 5px">閲嶆柊鍚屾</button>
                                 <div class="layui-inline">
                                     <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
                                     <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
@@ -84,12 +72,23 @@
                                         </select>
                                     </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-row">
                                     <!--鏄剧ず褰撳墠杩囨护鏂规-->
                                     <div class="layui-inline" style="margin-left:5px;">
                                         <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
                                     </div>
                                 </div>
+                                <div class="layui-inline" style="display:none;">
+                                    <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillno2" id="HBillno2" style="width:190px;">
+                                    </div>
+                                </div>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding: 0 5px; display: none;">閲嶆柊鍚屾</button>
                                 <div class="layui-colla-content">
                                     <div class="layui-inline">
                                         <div class="layui-inline">
@@ -203,7 +202,7 @@
                         <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-Add" id="Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>-->
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillEdit.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillEdit.html"
index 0335409..eb6be31 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillEdit.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillEdit.html"
@@ -55,7 +55,7 @@
                         <h1 style="text-align: center; padding: 10px 0;"><b>閲囪喘璁㈠崟</b></h1>
                         <ul class="layui-tab-title" lay-filter="tab-all">
                             <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
-                            <li lay-id="2" style="padding:1px;">鍏朵粬淇℃伅</li>
+                            <li lay-id="2" style="padding:1px;display:none;">鍏朵粬淇℃伅</li>
                             <li lay-id="3" style="padding:1px;">鍒跺崟淇℃伅</li>
                         </ul>
                         <div class="layui-tab-content">
@@ -78,21 +78,25 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">渚涘簲鍟�<label style="color:red"> * </label></label>
-                                            <div class="layui-input-inline" style="width:440px">
-                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;" autocomplete="off">
-                                                <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;">
+                                            <label class="layui-form-label">缁撶畻鏃ユ湡</label>
+                                            <div class="layui-input-inline">
+                                                <input type="date" class="layui-input" name="HSSDate" id="HSSDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" style="float:left;width:150px;">
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
+                                            <label class="layui-form-label">涓荤</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;" readonly>
+                                                <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
                                             </div>
                                         </div>
-                                        
-
-                                    </div>
-                                    <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">閲囪喘鍛�</label>
+                                            <label class="layui-form-label">閲囪喘鍛�<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;" readonly>
                                                 <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;">
@@ -112,6 +116,37 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">渚涘簲鍟�<label style="color:red"> * </label></label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;" autocomplete="off">
+                                                <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <!--<div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">鑱旂郴浜�</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HLinkMan" id="HLinkMan" autocomplete="off">
+                                            </div>
+                                        </div>-->
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">鑱旂郴浜�</label>
+                                            <div class="layui-input-inline">
+                                                <select name="HLinkMan" id="HLinkMan" lay-filter="HLinkMan" style="width: 180px; ">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">鑱旂郴鐢佃瘽</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HLinkPhone" id="HLinkPhone" autocomplete="off">
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">閲囪喘鏂瑰紡</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HPSStyleName" id="HPSStyleName" class="layui-input" value="" style="float:left;width:150px;" readonly>
@@ -123,33 +158,7 @@
                                         </div>
 
                                     </div>
-                                    <div class="layui-row">
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">涓荤</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;" readonly>
-                                                <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">鑱旂郴浜�</label>
-                                            <div class="layui-input-inline">
-                                                <input class="layui-input" name="HLinkMan" id="HLinkMan" autocomplete="off">
-                                            </div>
-                                        </div>
-
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">鑱旂郴鐢佃瘽</label>
-                                            <div class="layui-input-inline">
-                                                <input class="layui-input" name="HLinkPhone" id="HLinkPhone" autocomplete="off">
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="layui-row">
-                                        
+                                    <div class="layui-row" style="display:none;">
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">椤圭洰缂栫爜</label>
                                             <div class="layui-input-inline">
@@ -169,36 +178,13 @@
                                     </div>
                                     <div class="layui-row" style="margin-top:10px;">
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">浠撳簱</label>
+                                            <label class="layui-form-label">缁撶畻鏂瑰紡</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
-                                                <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="0" style="float: left; width: 150px; background-color: #efefef4d;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="btnHWHID" style="width:40px;">
+                                                <input type="text" name="HSSName" id="HSSName" class="layui-input" value="" style="float:left;width:150px;" readonly>
+                                                <input type="hidden" name="HSSID" id="HSSID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSSList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="layui-row" style="margin-top:10px;">
-                                        <div class="layui-col-xs7 layui-inline">
-                                            <label class="layui-form-label">澶囨敞</label>
-                                            <div class="layui-input-block">
-                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off">
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-
-                            <!--鍏朵粬淇℃伅-->
-                            <div class="layui-tab-item">
-                                <div class="layui-form-item" style="padding-top: 10px;">
-                                    <div class="layui-row">
-                                        
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">杈呭姪瀛楁</label>
-                                            <div class="layui-input-inline">
-                                                <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-inline">
@@ -217,31 +203,30 @@
                                                 <input class="layui-input" name="HExRate" id="HExRate" autocomplete="off" value="0" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
-
                                     </div>
-                                    
-                                    <div class="layui-row">
-
+                                    <div class="layui-row" style="margin-top:10px;">
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">浠撳簱</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
+                                                <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="0" style="float: left; width: 150px; background-color: #efefef4d;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="btnHWHID" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">浜よ揣鍦扮偣</label>
                                             <div class="layui-input-inline">
                                                 <input class="layui-input" name="HAddress" id="HAddress" autocomplete="off">
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">缁撶畻鏂瑰紡</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HSSName" id="HSSName" class="layui-input" value="" style="float:left;width:150px;" readonly>
-                                                <input type="hidden" name="HSSID" id="HSSID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSSList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">缁撶畻鏃ユ湡</label>
-                                            <div class="layui-input-inline">
-                                                <input type="date" class="layui-input" name="HSSDate" id="HSSDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" style="float:left;width:150px;">
+                                    </div>
+                                    <div class="layui-row" style="margin-top:10px;">
+                                        <div class="layui-col-xs7 layui-inline">
+                                            <label class="layui-form-label">澶囨敞</label>
+                                            <div class="layui-input-block">
+                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off">
                                             </div>
                                         </div>
                                     </div>
@@ -252,6 +237,19 @@
                                                 <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
                                                     <!--鍔ㄦ�佹覆鏌撶粍缁�-->
                                                 </select>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                            <!--鍏朵粬淇℃伅-->
+                            <div class="layui-tab-item">
+                                <div class="layui-form-item" style="padding-top: 10px;">
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">杈呭姪瀛楁</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                     </div>
@@ -357,6 +355,8 @@
 
     <script>
 
+        var HLinkArrayList = []; //鑱旂郴浜烘竻鍗�
+
         //#region 鎶樺彔娉ㄩ噴
         //#endregion
         layui.config({
@@ -382,7 +382,9 @@
             var shijian = year + "-" + month + "-" + day;
             var allVal;
             var topScroll = 0;//璁板綍婊氬姩鏉$殑浣嶇疆
-            
+
+
+           
 
 
             //#endregion
@@ -452,7 +454,7 @@
                 $("#HInterID").val("0");                // 灏濊瘯鑾峰彇id 涓� HInterID鐨勫厓绱� 瀛楃涓蹭负鈥樷��0鈥樷�欑殑鍊�             灏� ID 涓� HInterID 鐨勫厓绱犵殑鍊艰缃负 "0"
                 $("#HBillNo").val("");                  // 灏濊瘯鑾峰彇id 涓� HBillNo鐨勫厓绱犵殑鍊煎厓绱犳竻绌猴紝鍗宠缃负绌哄瓧绗︿覆銆�
                 $.ajax({                            //寮傛璇锋眰
-                    url: GetWEBURL() + "/Web/GetMAXNum",//璇锋眰鍦板潃
+                    url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",//璇锋眰鍦板潃
                     type: "GET",                    //璇锋眰绫诲瀷
                     data: { "HBillType": '1102' },      //璇锋眰鍊� HBillType绫诲瀷  璁剧疆瀛楃涓蹭负1102   //璇锋眰鍙傛暟  hbillteyp  鍊间负1100
                     success: function (d) {  // 瀹氫箟褰撹姹傛垚鍔熸椂鐨勫洖璋冨嚱鏁般�傝繖涓嚱鏁版帴鍙椾竴涓弬鏁� d鍖呭惈浜嗘湇鍔″櫒鍝嶅簲鐨勬暟鎹�
@@ -466,7 +468,7 @@
                 //椤甸潰鍒濆鍖栧姞杞�
                 $("#HDeptID").val(sessionStorage["HDeptID"]);  // 鑾峰彇椤甸潰涓奍D涓�"HDeptID"鐨勫厓绱犵殑鍊艰缃负sessionStorage涓�"HDeptID"閿搴旂殑鍊�       
                 $("#HDeptName").val(sessionStorage["HDept"]);  // 鑾峰彇椤甸潰涓奍D涓�"HDeptName"鐨勫厓绱犵殑鍊艰缃负sessionStorage涓�"HDeptName"閿搴旂殑鍊�
-                $("#HEmpName").val(sessionStorage["HUserName"]);   // 鑾峰彇椤甸潰涓奍D涓�"HEmpName"鐨勫厓绱犵殑鍊艰缃负sessionStorage涓�"HEmpName"閿搴旂殑鍊�
+                $("#HEmpName").val(sessionStorage["HEmpName"]);   // 鑾峰彇椤甸潰涓奍D涓�"HEmpName"鐨勫厓绱犵殑鍊艰缃负sessionStorage涓�"HEmpName"閿搴旂殑鍊�
                 $("#HEmpID").val(sessionStorage["HEmpID"]);     // 鑾峰彇椤甸潰涓奍D涓�"HEmpID"鐨勫厓绱犵殑鍊艰缃负sessionStorage涓�"HEmpID"閿搴旂殑鍊�
              
                 //鏍规嵁褰撳墠鐧诲綍鐢ㄦ埛鐨勯儴闂� 鑾峰彇 涓荤
@@ -480,8 +482,10 @@
                             "sWhere": "and HItemID = '" + $("#HDeptID").val() + "'", "user": sessionStorage["HUserName"], "Organization": sessionStorage["Organization"]//瀹氫箟鐨勭被鍨嬫湁HItemID锛寀ser锛孫rganization
                         },
                         success: function (result) {    //璇锋眰鎴愬姛鏃剁殑鍥炶皟鍑芥暟
-                            $("#HManagerID").val(result.data[0].HEmpID);  // 灏� ID 涓� HManagerID 鐨勫厓绱犵殑鍊艰缃负鍝嶅簲鏁版嵁涓� data 鏁扮粍鐨勭涓�涓厓绱犵殑 HEmpID 灞炴�у�笺��
-                            $("#HManagerName").val(result.data[0].璐熻矗浜�); // 鏇存柊杩斿洖鏁版嵁绗竴涓璞$殑璐熻矗浜哄悕绉�
+                            if (result.code == "1") {
+                                $("#HManagerID").val(result.data[0].HEmpID);  // 灏� ID 涓� HManagerID 鐨勫厓绱犵殑鍊艰缃负鍝嶅簲鏁版嵁涓� data 鏁扮粍鐨勭涓�涓厓绱犵殑 HEmpID 灞炴�у�笺��
+                                $("#HManagerName").val(result.data[0].璐熻矗浜�); // 鏇存柊杩斿洖鏁版嵁绗竴涓璞$殑璐熻矗浜哄悕绉�
+                            }
                         }, error: function () {
                             layer.alert("鍙戠敓閿欒!", { icon: 5 });   //鎻愮ず鍙戠敓閿欒  璀︾ず鏍囧噯涓�5鐨勭被鍨�
                         }
@@ -496,7 +500,7 @@
             //#endregion
 
             var rowdata = [{
-                "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HWHID": 0, "HWHName": "", "HQty": "1", "HRemark": ""
+                "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HWHID": 0, "HWHName": "", "HQty": "0", "HRemark": ""
                 , "HPrice": "0", "HTaxPrice": "0", "HMoney": "0", "HDiscountRate": 1, "HRelTaxPrice": "0", "HTaxRate": 0, "HTaxMoney": "0", "HlineTotal": "0", "HlineTotalBB": "0", "HDate": Format(new Date, "yyyy- MM - dd"),
             }];  //瀹氫箟涓�涓寘鍚暟缁�  璁剧疆鍒濆鍖栧��  涓� 鈥�0鈥欙紝 绌猴紝鐘舵�佷负1  璁剧疆鏃堕棿绫诲瀷yyyy-mm-dd
 
@@ -509,7 +513,7 @@
                     , data = checkStatus.data;          //浠庨�変腑鐘舵�佷腑鎻愬彇鏁版嵁锛岃繖浜涙暟鎹槸琛ㄦ牸涓閫変腑鐨勮   
                 //鏂板琛岃〃鏍兼暟鎹�
                 var NewRow = {
-                    "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HWHID": 0, "HWHName": "", "HQty": "1", "HRemark": ""
+                    "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HWHID": 0, "HWHName": "", "HQty": "0", "HRemark": ""
                     , "HPrice": "0", "HTaxPrice": "0", "HMoney": "0", "HDiscountRate": "1", "HRelTaxPrice": "0", "HTaxRate":0, "HTaxMoney": "0", "HlineTotal": "0", "HlineTotalBB": "0", "HDate": Format(new Date, "yyyy- MM - dd")
                 };  ////瀹氫箟 NewRow鐨勫璞★紝瀹冨寘鍚簡鏂拌搴旇鏈夌殑鏁版嵁瀛楁  璁剧疆鍊间负绌烘垨榛樿鍊�
                 switch (obj.event) { // switch (obj.event)鐢ㄤ簬鏍规嵁obj.event鐨勫�兼潵鍐冲畾鎵ц鍝釜case鍧�
@@ -642,6 +646,21 @@
 
             //#endregion
 
+            //#region 鑱旂郴浜轰笅鎷夊垪琛ㄧ洃鍚�
+            form.on('select(HLinkMan)', function (data) {
+                var HLinkMan = $("#HLinkMan").val();
+                if (HLinkArrayList.length > 0) {
+                    for (var i = 0; i < HLinkArrayList.length; i++) {
+                        if (HLinkMan == HLinkArrayList[i].HLinkMan) {
+                            $("#HLinkPhone").val(HLinkArrayList[i].HLinkPhone);
+                            break;
+                        }
+                    }
+                } else {
+                    $("#HLinkPhone").val("");
+                }
+            });
+            //#endregion
 
             //#region 鐩戝惉鍗曞厓鏍肩紪杈�  鍗曞厓鏍肩紪杈戝悗 鍙樻洿
             table.on('edit(mainTable)', function (obj) {  //鐩戝惉mainTable琛ㄦ牸涓婄殑宸ュ叿鏍忎簨浠� 瑙﹀彂鍥炶皟鍑芥暟obj鍙傛暟
@@ -1171,10 +1190,17 @@
                                     }
                                 )
                             }
+
+                            //鏍规嵁渚涘簲鍟嗚幏鍙栬仈绯讳汉鍙婅仈绯荤數璇�
+                            getLinkManBySup_layui();
+                            $("#HLinkMan").val(data[0].鑱旂郴浜�);
+                            $("#HLinkPhone").val(data[0].鑱旂郴浜虹數璇�);
+
                             option.data = rowdata;  //灏嗘暟缁剅owdata璧嬪�� 缁檕ption.data鐨勫睘鎬�
                             table.render(option);       //娓叉煋琛ㄦ牸
                             form.render('select');  //鐢╢orm.render鏂规硶锛屽苟鎸囧畾'select'浣滀负鍙傛暟  涓虹‘璁ゆ暟鎹彉鍖栫浉鍏崇殑閫夋嫨妗嗛兘琚纭湴鏇存柊鎴栨覆鏌�
 
+                           
                             layer.close(ajaxLoad); //璋冪敤layer.close鏂规硶锛屽苟浼犲叆ajaxLoad浣滀负鍙傛暟鍏抽棴杩欎釜鍔犺浇灞�     琛ㄦ槑寮傛璇锋眰宸茬粡瀹屾垚骞朵笖鏁版嵁宸茬粡琚鐞�
                         } else {
                             layer.close(ajaxLoad); //鍏抽棴鍔犺浇灞�  鍦ㄥ紓姝ヨ姹傚け璐ユ垨杩斿洖浜嗛敊璇粨鏋滄椂鎵ц銆�
@@ -1190,7 +1216,29 @@
 
             //#region 淇濆瓨鏂规硶
             function set_SaveBill(data) { //set_SaveBill 鐨勫嚱鏁帮紝瀹冩帴鏀朵竴涓弬鏁� data
-
+                if ($("#HBillNo").val() == "") {
+                    layer.msg("鍗曟嵁鍙蜂笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
+                if ($("#HDate").val() == "") {
+                    layer.msg("鏃ユ湡涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
+                if ($("#HEmpID").val() == 0) {
+                    //鎻愮ず璇烽�夋嫨閲囪喘鍛橈紝璀︾ず鏍囧織涓�5锛岄�夋嫨鎸夐挳鍙婃寜閽悕绉� 锛屾椂闂翠负100绉�  锛宱ffset: 't'鍜宻kin: 'layui-layer-lan'鍒嗗埆鐢ㄤ簬璋冩暣娑堟伅妗嗙殑浣嶇疆鍜屾牱寮�  鏍囬涓衡�欐俯棣ㄦ彁绀衡��
+                    layer.msg("璇烽�夋嫨閲囪喘鍛橈紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
+                if ($("#HDeptID").val() == 0) {
+                    //鎻愮ず璇烽�夋嫨閲囪喘閮ㄩ棬锛岃绀烘爣蹇椾负5锛岄�夋嫨鎸夐挳鍙婃寜閽悕绉� 锛屾椂闂翠负100绉�  锛宱ffset: 't'鍜宻kin: 'layui-layer-lan'鍒嗗埆鐢ㄤ簬璋冩暣娑堟伅妗嗙殑浣嶇疆鍜屾牱寮�  鏍囬涓衡�欐俯棣ㄦ彁绀衡��
+                    layer.msg("璇烽�夋嫨閲囪喘閮ㄩ棬锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
+                if ($("#HSupID").val() == 0) {
+                    //鎻愮ず璇烽�夋嫨渚涘簲鍟嗭紝璀︾ず鏍囧織涓�5锛岄�夋嫨鎸夐挳鍙婃寜閽悕绉� 锛屾椂闂翠负100绉�  锛宱ffset: 't'鍜宻kin: 'layui-layer-lan'鍒嗗埆鐢ㄤ簬璋冩暣娑堟伅妗嗙殑浣嶇疆鍜屾牱寮�  鏍囬涓衡�欐俯棣ㄦ彁绀衡��
+                    layer.msg("璇烽�夋嫨渚涘簲鍟嗭紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
                 if ($("#HCurID").val() == 0) {  //妫�鏌ラ〉闈笂ID涓篐CurID鐨勫厓绱犵殑鍊兼槸鍚︿负0 濡傛灉涓�0  璇存槑鐢ㄦ埛娌℃湁閫夋嫨甯佸埆锛�
                     //鎻愮ず璇烽�夋嫨甯佸埆锛岃绀烘爣蹇椾负5锛岄�夋嫨鎸夐挳鍙婃寜閽悕绉� 锛屾椂闂翠负100绉�  锛宱ffset: 't'鍜宻kin: 'layui-layer-lan'鍒嗗埆鐢ㄤ簬璋冩暣娑堟伅妗嗙殑浣嶇疆鍜屾牱寮�  鏍囬涓衡�欐俯棣ㄦ彁绀衡��
                     layer.msg("璇烽�夋嫨甯佸埆锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); 
@@ -1199,21 +1247,6 @@
                 if ($("#HExRate").val() == 0) {
                      //鎻愮ず璇疯緭鍏ユ眹鐜囷紝璀︾ず鏍囧織涓�5锛岄�夋嫨鎸夐挳鍙婃寜閽悕绉� 锛屾椂闂翠负100绉�  锛宱ffset: 't'鍜宻kin: 'layui-layer-lan'鍒嗗埆鐢ㄤ簬璋冩暣娑堟伅妗嗙殑浣嶇疆鍜屾牱寮�  鏍囬涓衡�欐俯棣ㄦ彁绀衡��
                     layer.msg("璇疯緭鍏ユ眹鐜囷紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                    return;
-                }
-                //if ($("#HEmpID").val() == 0) {
-                //     //鎻愮ず璇烽�夋嫨閲囪喘鍛橈紝璀︾ず鏍囧織涓�5锛岄�夋嫨鎸夐挳鍙婃寜閽悕绉� 锛屾椂闂翠负100绉�  锛宱ffset: 't'鍜宻kin: 'layui-layer-lan'鍒嗗埆鐢ㄤ簬璋冩暣娑堟伅妗嗙殑浣嶇疆鍜屾牱寮�  鏍囬涓衡�欐俯棣ㄦ彁绀衡��
-                //    layer.msg("璇烽�夋嫨閲囪喘鍛橈紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                //    return;
-                //}
-                //if ($("#HDeptID").val() == 0) {
-                //     //鎻愮ず璇烽�夋嫨閲囪喘閮ㄩ棬锛岃绀烘爣蹇椾负5锛岄�夋嫨鎸夐挳鍙婃寜閽悕绉� 锛屾椂闂翠负100绉�  锛宱ffset: 't'鍜宻kin: 'layui-layer-lan'鍒嗗埆鐢ㄤ簬璋冩暣娑堟伅妗嗙殑浣嶇疆鍜屾牱寮�  鏍囬涓衡�欐俯棣ㄦ彁绀衡��
-                //    layer.msg("璇烽�夋嫨閲囪喘閮ㄩ棬锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                //    return;
-                //}
-                if ($("#HSupID").val() == 0) {
-                     //鎻愮ず璇烽�夋嫨渚涘簲鍟嗭紝璀︾ず鏍囧織涓�5锛岄�夋嫨鎸夐挳鍙婃寜閽悕绉� 锛屾椂闂翠负100绉�  锛宱ffset: 't'鍜宻kin: 'layui-layer-lan'鍒嗗埆鐢ㄤ簬璋冩暣娑堟伅妗嗙殑浣嶇疆鍜屾牱寮�  鏍囬涓衡�欐俯棣ㄦ彁绀衡��
-                    layer.msg("璇烽�夋嫨渚涘簲鍟嗭紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return;
                 }
                 //澶勭悊閲囪喘鏂瑰紡鍜岀粨绠楁柟寮忓�奸槻姝㈠悗绔痠nt杞瑂ting鎶ラ敊
@@ -1791,7 +1824,7 @@
                         option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel; //灏唎ption.data鏁扮粍涓搴旇鐨�  瑙勬牸鍨嬪彿  灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID
                         option.data[rowIndex + i].HUnitID = resultData.HUnitID; //灏唎ption.data鏁扮粍涓搴旇鐨� HUnitID 灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID
                         option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName; //灏唎ption.data鏁扮粍涓搴旇鐨� 璁¢噺鍗曚綅 灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID   鏇存柊璁¢噺鍗曚綅灞炴��
-                        option.data[rowIndex + i].HQty = option.data[rowIndex + i].HQty == "" ? 1 : option.data[rowIndex + i].HQty;  //灏嗗搴旇鐨凥Qty灞炴�э紙鍙兘浠h〃鏁伴噺锛夎缃负1銆傝繖琛ㄧず瀵逛簬姣忎釜閫変腑鐨勭墿鏂欙紝鍏堕粯璁ゆ暟閲忚璁剧疆涓�1
+                        option.data[rowIndex + i].HQty = option.data[rowIndex + i].HQty == "" ? 0 : option.data[rowIndex + i].HQty;  //灏嗗搴旇鐨凥Qty灞炴�э紙鍙兘浠h〃鏁伴噺锛夎缃负1銆傝繖琛ㄧず瀵逛簬姣忎釜閫変腑鐨勭墿鏂欙紝鍏堕粯璁ゆ暟閲忚璁剧疆涓�1
                         option.data[rowIndex + i].HTaxRate = TaxRate;
                     }
                     table.render(option); //閲嶆柊娓叉煋琛ㄦ牸浠ユ樉绀烘洿鏂板悗鐨勬暟鎹�
@@ -1871,6 +1904,8 @@
                         }
                         $("#HEmpName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
                         $("#HEmpID").val(checkStatus.data[0].HItemID);
+                        $("#HDeptID").val(checkStatus.data[0].HDeptID);
+                        $("#HDeptName").val(checkStatus.data[0].杞﹂棿鍚嶇О);
                         layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
                     , btn2: function (index, layero) { }
@@ -1878,7 +1913,7 @@
             }
             //渚涘簲鍟�
             function get_checkSup() {
-                var HOrgName = $(".layui-form-select input").val();
+                var HOrgName = sessionStorage["Organization"];
                 layer.open({
                     type: 2//寮圭獥绫诲瀷
                     , skin: 'layui-layer-rim' //鍔犱笂杈规
@@ -1910,6 +1945,10 @@
                             $("#HCurName").val("浜烘皯甯�");
                             $("#HExRate").val(1);
                         }
+
+                        //鏍规嵁渚涘簲鍟嗚幏鍙栬仈绯讳汉鍙婅仈绯荤數璇�
+                        getLinkManBySup_layui();
+
                         layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
                     , btn2: function (index, layero) { }
@@ -2188,7 +2227,19 @@
                 return HTaxRate;
             }
             //#endregion
-            
+
+            //#region 閫氳繃渚涘簲鍟嗚幏鍙栬仈绯讳汉娓呭崟
+            function getLinkManBySup_layui() {
+                getLinkManBySup();
+                form.render("select");
+            }
+
+            window.getLinkManBySup_layui1 = function () {
+                getLinkManBySup();
+                form.render("select");
+            }
+            //#endregion
+
             //#region 淇濆瓨鍚庢祻瑙堟柟娉�
             function ReRoadBillMain() {
                 location.replace('Add_Edit_Cg_POInStockBillList.html?OperationType=4&linterid=' + linterid + '&HSouceBillType=');
@@ -2324,6 +2375,8 @@
        {
            $("#HEmpName").val(obj[0].鑱屽憳鍚嶇О);
            $("#HEmpID").val(obj[0].HItemID);
+           $("#HDeptID").val(obj[0].HDeptID);
+           $("#HDeptName").val(obj[0].杞﹂棿鍚嶇О);
        }
 
        function GetHDeptNameValue(obj)  //杩斿洖閲囪喘閮ㄩ棬
@@ -2356,6 +2409,9 @@
            $("#HAddress").val(obj[0].鍦板尯);
            $("#HPSStyleName").val(obj[0].閲囪喘鏂瑰紡);
            $("#HPSStyleID").val(obj[0].HPSStyleID == null ? 0 : obj[0].HPSStyleID);
+
+           //鏍规嵁渚涘簲鍟嗚幏鍙栬仈绯讳汉鍙婅仈绯荤數璇�
+           window.getLinkManBySup_layui1();
         } 
 
         //鏃堕棿鏍煎紡
@@ -2415,6 +2471,56 @@
         function GetGyWarehouse(data) {
             OptionData = data[0]
         }
+
+
+        //#region 閫氳繃渚涘簲鍟嗚幏鍙栬仈绯讳汉娓呭崟
+        function getLinkManBySup() {
+            var HSupID = $("#HSupID").val();
+            if (HSupID != 0 && typeof (HSupID) != "undefined") {
+                $.ajax({
+                    url: GetWEBURL() + "/Gy_Supplier/xg",
+                    async: false,
+                    type: "GET",
+                    data: { "HInterID": HSupID },
+                    success: function (d) {
+                        if (d.code == "1") {
+                            HLinkArrayList = [];
+                            var data = d.list[1]["Gy_Supplier_Link"];
+                            for (var i = 0; i < data.length; i++) {
+                                if (data[i].HLinkMan != "") {
+                                    HLinkArrayList.push({
+                                        "HLinkMan": data[i].HLinkMan
+                                        , "HLinkPhone": data[i].HLinkPhone
+                                    })
+                                }
+                            }
+                        } else {
+                            layer.alert(d.code + d.Message, { icon: 5 });
+                        }
+                    }, error: function (e) {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!" + e.Message, { icon: 5 });
+                    }
+                });
+            } else {
+                HLinkArrayList = [];
+            }
+
+            var Organization = '';
+            Organization += '<option  style="color:blue;" value=""></option>';
+            for (var i = 0; i < HLinkArrayList.length; i++) {
+                Organization += '<option  style="color:blue;" value="' + HLinkArrayList[i].HLinkMan + '">' + HLinkArrayList[i].HLinkMan + '</option>';
+            }
+            $("#HLinkMan").empty();
+            $("#HLinkMan").append(Organization);
+            if (HLinkArrayList.length == 0) {
+                $("#HLinkMan").val("");
+                $("#HLinkPhone").val("");
+            } else {
+                $("#HLinkMan").val(HLinkArrayList[0].HLinkMan);
+                $("#HLinkPhone").val(HLinkArrayList[0].HLinkPhone);
+            }
+        }
+            //#endregion
     </script>
 </body>
 </html>     
\ No newline at end of file
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html"
index 7891763..47989c5 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html"
@@ -35,7 +35,7 @@
                                         <span>鏇村</span>
                                     </div>
                                 </div>
-                                <div class="layui-inline">
+                                <div class="layui-inline" style="display:none;">
                                     <label class="layui-form-label">鍒嗛厤鐘舵��</label>
                                     <div class="layui-input-block">
                                         <select name="HStatus" lay-filter="HStatus" style="width:190px;">
@@ -45,7 +45,7 @@
                                         </select>
                                     </div>
                                 </div>
-                                <div class="layui-inline">
+                                <div class="layui-inline" style="display:none;">
                                     <label class="layui-form-label">鍙戝竷鐘舵��</label>
                                     <div class="layui-input-block">
                                         <select name="HStatus2" lay-filter="HStatus2" style="width:190px;">
@@ -77,18 +77,9 @@
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鍗曟嵁鍙�</label>
                                     <div class="layui-input-block">
-                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillno2" id="HBillno2" style="width:190px;">
+                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo" style="width:190px;">
                                     </div>
                                 </div>
-                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding:0 5px">閲嶆柊鍚屾</button>
-
-                                <div class="layui-inline">
-                                    <label class="layui-form-label">椤圭洰缂栧彿</label>
-                                    <div class="layui-input-block">
-                                        <input type="text" class="layui-input ForFilteringSchemes" name="HProjectNumber" id="HProjectNumber" style="width:190px;">
-                                    </div>
-                                </div>
-
                                 <div class="layui-inline">
                                     <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
                                     <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
@@ -105,13 +96,26 @@
                                 <div class="layui-inline" style="margin-left:5px;">
                                     <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
                                 </div>
-                                <div class="layui-colla-content">
-                                    <div class="layui-inline">
-                                        <label class="layui-form-label">鍗曟嵁鍙�</label>
-                                        <div class="layui-input-block">
-                                            <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo" style="width:190px;">
-                                        </div>
+
+
+
+                                <div class="layui-inline" style="display:none;">
+                                    <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillno2" id="HBillno2" style="width:190px;">
                                     </div>
+                                </div>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding:0 5px;display:none;">閲嶆柊鍚屾</button>
+
+                                <div class="layui-inline" style="display:none;">
+                                    <label class="layui-form-label">椤圭洰缂栧彿</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input ForFilteringSchemes" name="HProjectNumber" id="HProjectNumber" style="width:190px;">
+                                    </div>
+                                </div>
+
+
+                                <div class="layui-colla-content">
                                     <div class="layui-inline">
                                         <label class="layui-form-label">涓氬姟鍛�</label>
                                         <div class="layui-input-block">
@@ -131,7 +135,7 @@
                 </select>
             </div>
         </div>-->
-                                    <div class="layui-inline">
+                                    <div class="layui-inline" style="display:none;">
                                         <label class="layui-form-label">鍗忓悓鐘舵��</label>
                                         <div class="layui-input-block">
                                             <select name="HXTStatus" lay-filter="HXTStatus" style="width:190px;">
@@ -147,7 +151,7 @@
                 <input type="text" class="layui-input" name="HXTFKStatus" id="HXTFKStatus" style="width:190px;">
             </div>
         </div>-->
-                                    <div class="layui-inline">
+                                    <div class="layui-inline" style="display:none;">
                                         <label class="layui-form-label">鐗╂枡缂栫爜</label>
                                         <div class="layui-input-block">
                                             <input type="text" class="layui-input ForFilteringSchemes" name="HMaterShortNumber" id="HMaterShortNumber" style="width:190px;">
@@ -159,7 +163,7 @@
                                             <input type="text" class="layui-input ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber" style="width:190px;">
                                         </div>
                                     </div>
-                                    <div class="layui-inline">
+                                    <div class="layui-inline" style="display:none;">
                                         <label class="layui-form-label">鏃х墿鏂欑紪鐮�</label>
                                         <div class="layui-input-block">
                                             <input type="text" class="layui-input ForFilteringSchemes" name="HOldMaterNumber" id="HOldMaterNumber" style="width:190px;">
@@ -177,7 +181,7 @@
                                             <input type="text" class="layui-input ForFilteringSchemes" name="HSupName" id="HSupName" style="width:190px;">
                                         </div>
                                     </div>
-                                    <div class="layui-inline">
+                                    <div class="layui-inline" style="display:none;">
                                         <label class="layui-form-label">鍙嶉鐘舵��</label>
                                         <div class="layui-input-block" style="width:190px;">
                                             <select name="HFeedback" lay-filter="HFeedback">
@@ -190,13 +194,15 @@
                                         </div>
                                     </div>
                                     <div class="layui-inline">
-                                        <label class="layui-form-label">瀹屾垚鐘舵��</label>
-                                        <div class="layui-input-block" style="width:190px;">
-                                            <select name="HFinishStatus" lay-filter="HFinishStatus">
-                                                <option value="" selected>鍏ㄩ儴</option>
-                                                <option value="鏈畬鎴�">鏈畬鎴�</option>
-                                                <option value="宸插畬鎴�">宸插畬鎴�</option>
-                                            </select>
+                                        <div class="layui-row" style="margin-top: 5px; display: none;">
+                                            <label class="layui-form-label">瀹屾垚鐘舵��</label>
+                                            <div class="layui-input-block" style="width:190px;">
+                                                <select name="HFinishStatus" lay-filter="HFinishStatus">
+                                                    <option value="" selected>鍏ㄩ儴</option>
+                                                    <option value="鏈畬鎴�">鏈畬鎴�</option>
+                                                    <option value="宸插畬鎴�">宸插畬鎴�</option>
+                                                </select>
+                                            </div>
                                         </div>
                                         <div class="layui-row" style="margin-top:5px">
                                             <div class="layui-inline">
@@ -1126,6 +1132,38 @@
                                     soulTable.render(this);
                                 }
                             }
+
+                            var result = data1.data;
+                            var temp = "";
+                            for (var i = 0; i < result.length; i++) {
+                                if (temp != result[i]["hmainid"]) {
+                                    temp = result[i]["hmainid"];
+                                } else {
+                                    result[i].鏃ユ湡 = null;
+                                    result[i].鍗曟嵁鍙� = "";
+                                    /*result[i].鐘舵�� = "";*/
+                                    result[i].绾㈣摑鍗曟爣璁� = "";
+                                    result[i].hsupid = "";
+                                    result[i].瀹㈡埛 = "";
+                                    result[i].HEmpID = "";
+                                    result[i].涓氬姟鍛� = "";
+                                    result[i].hmanagerid = "";
+                                    result[i].涓荤 = "";
+                                    result[i].hsecmanagerid = "";
+                                    result[i].鍙戣揣浜� = "";
+                                    result[i].hkeeperid = "";
+                                    result[i].淇濈鍛� = "";
+                                    result[i].HDeptID = "";
+                                    result[i].閮ㄩ棬 = "";
+                                    result[i].閿�鍞柟寮� = "";
+                                }
+                            }
+
+
+
+
+                            option.data = result;
+
                             table.render(option);
 
                             //鍒锋柊琛ㄦ牸鏁版嵁
@@ -1202,8 +1240,38 @@
                                 }
                             }
 
+                            var result = data1.data;
+                            var temp = "";
+                            for (var i = 0; i < result.length; i++) {
+                                if (temp != result[i]["hmainid"]) {
+                                    temp = result[i]["hmainid"];
+                                } else {
+                                    result[i].鏃ユ湡 = null;
+                                    result[i].鍗曟嵁鍙� = "";
+                                    result[i].鍗曟嵁绫诲瀷鍚嶇О = "";
+                                    ///*result[i].鐘舵�� = "";*/
+                                    //result[i].绾㈣摑鍗曟爣璁� = "";
+                                    //result[i].hsupid = "";
+                                    //result[i].瀹㈡埛 = "";
+                                    //result[i].HEmpID = "";
+                                    //result[i].涓氬姟鍛� = "";
+                                    //result[i].hmanagerid = "";
+                                    //result[i].涓荤 = "";
+                                    //result[i].hsecmanagerid = "";
+                                    //result[i].鍙戣揣浜� = "";
+                                    //result[i].hkeeperid = "";
+                                    //result[i].淇濈鍛� = "";
+                                    //result[i].HDeptID = "";
+                                    //result[i].閮ㄩ棬 = "";
+                                    //result[i].閿�鍞柟寮� = "";
+                                }
+                            }
+
+
+
+
+                            option.data = result;
                             option.cols = [col];
-                            option.data = data1.data;
                             laypage.render(optionPage);
                             //鍒锋柊琛ㄦ牸鏁版嵁
                             DisPlay_HideColumn();
@@ -1425,10 +1493,10 @@
                             return;
                         }
 
-                        if (data[i].瀹㈡埛 != HCusName) {
-                            layer.msg("涓嬫帹澶辫触!宸茬粡閫変腑鐨勮褰曚腑瀛樺湪涓嶅悓瀹㈡埛!");
-                            return;
-                        }
+                        //if (data[i].瀹㈡埛 != HCusName) {
+                        //    layer.msg("涓嬫帹澶辫触!宸茬粡閫変腑鐨勮褰曚腑瀛樺湪涓嶅悓瀹㈡埛!");
+                        //    return;
+                        //}
                         if (data[i].涓氬姟鍛� != HEmpName) {
                             layer.msg("涓嬫帹澶辫触!宸茬粡閫変腑鐨勮褰曚腑瀛樺湪涓嶅悓涓氬姟鍛�!");
                             return;
@@ -1616,17 +1684,17 @@
                             , "HSourceBillType": "1102"
                         }
                         dataArray.push(temp);
-                        if (data[i].鐘舵�� != "宸插鏍�") {
-                            var err = "涓嬫帹澶辫触!鍗曟嵁銆�" + data[i].鍗曟嵁鍙� + "銆戠殑鐘舵�佷负鈥�" + data[0].鐘舵�� + "鈥�,涓嶅厑璁镐笅鎺紒";
-                            layer.alert(err, { icon: 5 });
-                            return;
-                        }
+                        //if (data[i].鐘舵�� != "宸插鏍�") {
+                        //    var err = "涓嬫帹澶辫触!鍗曟嵁銆�" + data[i].鍗曟嵁鍙� + "銆戠殑鐘舵�佷负鈥�" + data[0].鐘舵�� + "鈥�,涓嶅厑璁镐笅鎺紒";
+                        //    layer.alert(err, { icon: 5 });
+                        //    return;
+                        //}
 
-                        if (data[i].琛岀姸鎬� != "" ) {
-                             var err = "涓嬫帹澶辫触!鍗曟嵁銆�" + data[i].鍗曟嵁鍙� + "銆戠殑鐘舵�佷负鈥�" + data[0].琛岀姸鎬� + "鈥�,涓嶅厑璁镐笅鎺紒";
-                            layer.alert(err, { icon: 5 });
-                            return;
-                        }
+                        //if (data[i].琛岀姸鎬� != "" ) {
+                        //     var err = "涓嬫帹澶辫触!鍗曟嵁銆�" + data[i].鍗曟嵁鍙� + "銆戠殑鐘舵�佷负鈥�" + data[0].琛岀姸鎬� + "鈥�,涓嶅厑璁镐笅鎺紒";
+                        //    layer.alert(err, { icon: 5 });
+                        //    return;
+                        //}
 
                         if (data[i].瀹㈡埛 != HCusName) {
                             layer.msg("涓嬫帹澶辫触!宸茬粡閫変腑鐨勮褰曚腑瀛樺湪涓嶅悓瀹㈡埛!");
@@ -2493,6 +2561,9 @@
 
                 }
 
+                ////鏍规嵁鐢ㄦ埛杩囨护鐢ㄦ埛鍏宠仈瀹㈡埛鐨勮褰�
+                //sWhere += getSWhereByHUser();
+
                 sWhere += addSWhereByOpenType();
                 //娣诲姞鏌ヨ鏉′欢锛屾牴鎹綋鍓嶇櫥褰曠敤鎴峰叧鑱旇亴鍛樿繑鍥炴暟鎹�
                 //sWhere += " and HUserID =" + sessionStorage["Czybm"]
@@ -2638,6 +2709,9 @@
                                 //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
                                 for (var j = 0; j < option.cols[0].length - 1; j++) {
                                     for (var i = 0; i < option.cols[0].length - 1; i++) {
+                                        if (i >= dataCol.length) {
+                                            continue;
+                                        }
                                         var dataCols = dataCol[j].split('|');
                                         //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
                                         if (option.cols[0][i + 1]["field"] == dataCols[5]) {
@@ -3047,6 +3121,31 @@
                 }
                 return addSWhere;
             }
+            //#endregion\
+
+            //#region 鏍规嵁鐢ㄦ埛鑾峰彇鐢ㄦ埛鍏宠仈瀹㈡埛鐨勮繃婊ゆ潯浠�
+            function getSWhereByHUser() {
+                var res = "";
+                $.ajax({
+                    type: "GET",
+                    async: false,
+                    url: GetWEBURL() + "/Cg_POOrderBill/getSupIDListByUser", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "CurUserID": sessionStorage["Czybm"], "CurUserName": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            res = result.data;
+                        } else {
+                            res = result.data;
+                            layer.alert(result.code + result.Message, { icon: 5 });
+                        }
+                    }, error: function (err) {
+                        res = " and 1 = 0";
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+                /*res = res.replace(/'/g, "''");*/
+                return res;
+            }
             //#endregion
 
             //浠ヤ笂鏄痩ayui妯″潡
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Add_Edit_Kf_OtherOutBill.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Add_Edit_Kf_OtherOutBill.html"
index 0bec116..728c0b0 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Add_Edit_Kf_OtherOutBill.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Add_Edit_Kf_OtherOutBill.html"
@@ -399,8 +399,8 @@
             //#endregion
 
             var rowdata = [{
-                "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HPropertyID": "0", "杈呭姪灞炴��": "","HSecUnitRate":"",   "HUnitID": 0, "璁¢噺鍗曚綅": "",   "HRemark": "",
-                "HQtyMust": "","HQty": "","HPrice": "0", "HMoney": "0",   "HWHID": 0, "鏀舵枡浠撳簱": "",
+                "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HPropertyID": "0", "杈呭姪灞炴��": "","HSecUnitRate":"0",   "HUnitID": 0, "璁¢噺鍗曚綅": "",   "HRemark": "",
+                "HQtyMust": "0","HQty": "0","HPrice": "0", "HMoney": "0",   "HWHID": 0, "鏀舵枡浠撳簱": "",
                 "HSPID": 0, "HSPGroupID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                 "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
                 "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, 
@@ -414,8 +414,8 @@
                     , data = checkStatus.data;
                 //鏂板琛岃〃鏍兼暟鎹�
                 var NewRow = {
-                    "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HPropertyID": "0", "杈呭姪灞炴��": "",  "HSecUnitRate": "",  "HUnitID": 0, "璁¢噺鍗曚綅": "", "HRemark": "",
-                    "HQtyMust": "", "HQty": "", "HPrice": "0", "HMoney": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
+                    "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HPropertyID": "0", "杈呭姪灞炴��": "",  "HSecUnitRate": "0",  "HUnitID": 0, "璁¢噺鍗曚綅": "", "HRemark": "",
+                    "HQtyMust": "0", "HQty": "0", "HPrice": "0", "HMoney": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
                     "HSPID": 0, "HSPGroupID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                     "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
                     "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
@@ -1427,7 +1427,7 @@
                             for (var i = 0; i < ProcessNumber.length; i++) {
                                 option.data.push({
                                     "HMaterID": checkStatus.data[j].HMaterID, "鐗╂枡浠g爜": checkStatus.data[j].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": checkStatus.data[j].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": checkStatus.data[j].瑙勬牸鍨嬪彿,
-                                    "   ": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅, "HQtyMust": "", "HQty": checkStatus.data[j].鏁伴噺, "HRemark": "",
+                                    "   ": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅, "HQtyMust": "0", "HQty": checkStatus.data[j].鏁伴噺, "HRemark": "",
                                     "HPrice": checkStatus.data[j].鍗曚环, "HMoney": checkStatus.data[j].閲戦,   "HWHID": checkStatus.data[j].HWHID, "鏀舵枡浠撳簱": checkStatus.data[j].鏀舵枡浠撳簱,
                                     "HSPID": checkStatus.data[j].HSPID, "浠撲綅鍚嶇О": checkStatus.data[j].浠撲綅鍚嶇О, "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                                     "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_ProductReceiveMaterialBillEdit.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_ProductReceiveMaterialBillEdit.html"
new file mode 100644
index 0000000..572c892
--- /dev/null
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_ProductReceiveMaterialBillEdit.html"
@@ -0,0 +1,1842 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <title>鐢熶骇棰嗘枡鍗曠紪杈�</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
+    <style type="text/css">
+        .layui-form-item .layui-inline {
+            margin-right: 0;
+        }
+
+        html {
+            background-color: white;
+            color: white;
+        }
+
+        .layui-table-cell {
+            overflow: visible !important;
+        }
+
+        td .layui-form-select {
+            margin-top: -10px;
+            margin-left: -15px;
+            margin-right: -15px;
+        }
+    </style>
+</head>
+<body>
+
+    <div class="layui-fluid" style="padding: 0;">
+        <div class="layui-card" style="padding: 15px;">
+            <div class="layui-card-body" style="padding: 1px;">
+                <form class="layui-form" lay-filter="component-form-group" action="">
+                    <div class="layui-card-header">
+                        <div class="layui-btn-group">
+                            <button type="button" id="set_SaveBill" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button>
+                            <!--<button type="button" id="set_CheckBill" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CheckBill">瀹℃牳</button>-->
+                            <!--<button type="button" id="btn-print" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn-print">鎵撳嵃</button>-->
+                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
+                        </div>
+                    </div>
+                    <div class="layui-tab" lay-filter="tab-POStockInBill">
+                        <h1 style="text-align: center; padding: 10px 0;"><b>鐢熶骇棰嗘枡鍗�</b></h1>
+                        <ul class="layui-tab-title" lay-filter="tab-all">
+                            <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
+                            <li lay-id="2" style="padding:1px;">鍏朵粬淇℃伅</li>
+                            <li lay-id="3" style="padding:1px;">鍒跺崟淇℃伅</li>
+                        </ul>
+                        <div class="layui-tab-content">
+                            <!--鍩烘湰淇℃伅-->
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-form-item" style="padding-top: 10px;">
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">鍗曟嵁缂栧彿</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;">
+                                                <input type="hidden" name="HInterID" id="HInterID" value="0">
+                                                <input type="hidden" name="HBillSubType" id="HBillSubType" value="">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">鏃ユ湡<label style="color:red"> * </label></label>
+                                            <div class="layui-input-block">
+                                                <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="width:190px;">
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">涓氬姟鍛�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="background-color: #efefef4d; float: left; width: 150px;" readonly>
+                                                <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">閮ㄩ棬</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="background-color: #efefef4d; float: left; width: 150px;" readonly>
+                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">浠撶</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">澶囨敞</label>
+                                            <div class="layui-input-block">
+                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style="width: 1135px;">
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+
+                            <!--鍏朵粬淇℃伅-->
+                            <div class="layui-tab-item">
+                                <div class="layui-form-item" style="padding-top: 10px;">
+                                    <div class="layui-row" style="margin-top:10px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">缁勭粐<label style="color:red"> * </label></label>
+                                            <div class="layui-input-block" style="margin-left: 120px; width: 501px;">
+                                                <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
+                                                    <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+                                                </select>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                            <!--鍒跺崟淇℃伅-->
+                            <div class="layui-tab-item">
+                                <div class="layui-form-item">
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍒跺崟浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">淇敼浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">瀹℃牳浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍒跺崟鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">淇敼鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">瀹℃牳鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍏抽棴浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">浣滃簾浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">浣滃簾鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+
+                    <table class="layui-hide" 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-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-InsertLine"><i class="layui-icon layui-icon-form"></i>鎻掑叆涓�琛�</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Up"><i class="layui-icon layui-icon-form"></i>涓婄Щ</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Under"><i class="layui-icon layui-icon-form"></i>涓嬬Щ</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Inventory" id="get_Inventory"><i class="layui-icon layui-icon-form"></i>搴撳瓨鏌ヨ</button>
+                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>鍑哄叆搴撹褰曟煡璇�</button>-->
+                        </div>
+                    </script>
+                    <script type="text/html" id="xuhao">
+                        {{d.LAY_TABLE_INDEX+1}}
+                    </script>
+                </form>
+            </div>
+        </div>
+    </div>
+    <script type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </script>
+
+    <script>
+        //#region 鏂囨湰妗嗚緭鍏ユ悳绱㈢浉鍏虫暟鎹�-鍙橀噺
+        var childPage = null;                       //鑾峰彇瀛愮獥鍙e璞★紝鐢ㄤ簬鎿嶄綔瀛愮獥鍙g殑鍙橀噺鍜屾柟娉�
+        var currRowIndex = 0;                       //鐢ㄤ簬瀹氫綅瀛愮獥鍙e綋鍓嶉�変腑鐨勮
+        var childData = null;                       //鐢ㄤ簬鑾峰彇瀛愮獥鍙h繑鍥炵殑鏁版嵁
+        //#endregion
+
+        //#region 鎶樺彔娉ㄩ噴
+        var HDataTemp = {};
+        //#endregion
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index' //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+
+            //#region 鍏敤鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element;
+
+            var allVal;
+            var HModName = "Kf_ProductReceiveMaterialBill";
+            var topScroll = 0;//璁板綍婊氬姩鏉$殑浣嶇疆
+            //璁板綍缁勭粐鐨勫��
+            var HOrgIDBar = 0;
+
+            //瀛愯〃娓叉煋鍙傛暟
+            window.option = {};
+            var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+            //#endregion
+
+
+            //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+            //#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+            get_LoginIs();
+            //#endregion
+
+            //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            var HModuleType = "1256";
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
+            $("h1").html('<b>' + HPageTitle + '</b>');
+            //#endregion
+
+            //#region 鑾峰彇椤甸潰璺宠浆鍙傛暟
+            var params = get_UrlVars();
+            if (typeof (params[params[0]]) == "undefined") {
+                var OperationType = 1;//鎿嶄綔绫诲瀷
+            } else {
+                var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
+                var linterid = params[params[1]];//婧愬崟id
+                var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
+            }
+            //#endregion
+
+            //鍒濆鍖栧瓙琛�
+            set_InitGrid();
+
+            //#region 鍒ゆ柇鎿嶄綔绫诲瀷骞跺垵濮嬪寲鐣岄潰
+            if (OperationType == 1) {                                                   //鏃犳簮鍗曟柊澧�
+                /* $("#HItemID").val(0);*/
+
+                //鐢熸垚鍗曟嵁鍙峰拰鍐呯爜
+                get_MAXNum();
+                //鏍规嵁鐢ㄦ埛鑾峰彇瀵瑰簲鑱屽憳銆侀儴闂ㄣ�侀攢鍞富绠�
+                getCzyglByUser();
+
+                //鍒濆鍖栨棩鏈熴�佸垱寤轰汉銆佸垱寤烘椂闂�
+                $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HMaker").val(sessionStorage["HUserName"]);
+                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
+            }
+            else if (OperationType == 3) {                                              //缂栬緫
+                //淇敼鏃朵富琛↖D
+                $("#HInterID").val(linterid);
+
+                //缂栬緫鐘舵�佹椂锛屾牴鎹唴鐮侊紝鑾峰彇淇℃伅骞跺啓鍏ョ晫闈�
+                RoadBillMain(linterid);
+            }
+            else if (OperationType == 4) {                     //涓嬫帹
+                setInit_PushBill();
+            }
+            else {
+                layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
+            }
+            //#endregion
+
+
+            DisPlay_HideColumn();
+
+            //鍒濆鍖栫粍缁�
+            Organ();
+            //#endregion
+
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+            //#region 琛ㄥご鎿嶄綔鎸夐挳
+            //#region 閫�鍑烘寜閽�
+            form.on('submit(Exit)', function () {
+                if (params[1] != null) {
+                    Pub_Close(1);
+                } else if (params[1] == null) {
+                    Pub_Close(2);
+                }
+            })
+            //#endregion
+
+            //#region 瀹℃牳鎸夐挳
+            form.on('submit(set_CheckBill)', function (data) {
+                set_CheckBill(0);
+            });
+            //#endregion
+
+            //#region 鎵撳嵃鎸夐挳
+            form.on('submit(btn-print)', function (data) {
+                get_PrintReport();
+            });
+            //#endregion
+
+            //#region 淇濆瓨鎸夐挳
+            form.on('submit(Saver)', function (data) {
+                if (AllowLoadData(data)) {
+                    set_SaveBill(data);
+                }
+            });
+            //#endregion
+            //#endregion
+
+            //#region 閫夋嫨寮圭獥浜嬩欢
+            //#region 閫夋嫨閮ㄩ棬鎸夐挳
+            form.on('submit(HDeptList)', function () {
+                get_checkDept();
+            });
+            //#endregion
+
+            //#region 閫夋嫨涓荤鎸夐挳
+            form.on('submit(HManagerList)', function () {
+                get_checkManager();
+            });
+            //#endregion
+
+            //#region 閫夋嫨涓氬姟鍛樻寜閽�
+            form.on('submit(HEmpList)', function () {
+                get_checkEmp();
+            });
+            //#endregion
+
+            //#region 閫夋嫨浠撶鎸夐挳
+            form.on('submit(HKeeperList)', function () {
+                get_checkKeeper();
+            });
+            //#endregion
+
+            //#endregion
+
+            //#region 澶嶉�夋鐘舵�佸彉鏇�
+            //#endregion
+
+            //#region 瀛愯〃鐩稿叧鐩戝惉
+            //#region 澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                //鏂板琛岃〃鏍兼暟鎹�
+                var NewRow = {
+                    "HMaterID": "0"
+                    , "鐗╂枡浠g爜": ""
+                    , "鐗╂枡鍚嶇О": ""
+                    , "瑙勬牸鍨嬪彿": ""
+                    , "HUnitID": "0"
+                    , "璁¢噺鍗曚綅": ""
+                    , "HQtyMust": "0"
+                    , "HQty": "0"
+                    , "HWHID": $("#HWHID").val()
+                    , "鍙戣揣浠撳簱": $("#HWHName").val()
+                    , "HRemark": ""
+                    , "HSourceInterID": "0"
+                    , "HSourceEntryID": "0"
+                    , "HSourceBillNo": ""
+                    , "HSourceBillType": ""
+                    , "HRelationQty": "0"
+                    , "HRelationMoney": "0"
+                    , 'HSPID': "0"
+                    , 'HSPName': ""
+                    , 'HSPGroupID': "0"
+                    , "HSPGroupName": ""
+                    , 'HSCWHID': "0"
+                    , 'HSCWHName': ""
+                    , 'HSCSPID': "0"
+                    , 'HSCSPName': ""
+                    , 'HBatchNo': ""
+                    , 'HPropertyID': "0"
+                    , 'HPropertyName': ""
+                    , 'HSecUnitID': "0"
+                    , 'HSecUnitName': ""
+                };
+
+                switch (obj.event) {
+                    //搴撳瓨鏌ヨ
+                    case 'get_Inventory': get_Inventory();
+                        break;
+                    //鍑哄叆搴撹褰曟煡璇�
+                    case 'get_InOutSum': get_InOutSum();
+                        break;
+                    //鏂板涓�琛�
+                    case 'btn-AddLine': btnAddLine(NewRow);
+                        break;
+                    //澶嶅埗涓�琛�
+                    case 'btn-CopyLine': btnCopyLine(data);
+                        break;
+                    //鎸囧畾浣嶇疆涓嬫彃鍏ヤ竴琛�
+                    case 'btn-InsertLine': btnInsertLine(NewRow)
+                        break;
+                    //涓婄Щ
+                    case 'btn-Up': btn_up();
+                        break;
+                    //涓嬬Щ
+                    case 'btn-Under': btn_under();
+                        break;
+                    //鍒楄缃�
+                    case 'set_HideColumn':
+                        get_HideColumn();
+                        break;
+                }
+            });
+            //#endregion
+
+            //#region 搴撳瓨鏌ヨ
+            function get_Inventory() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1 && data[0].HMaterID != 0) {
+                    var HMaterID = data[0].HMaterID.toString();
+                    //寮圭獥鏂规硶
+                    layer.open({
+                        type: 2//寮圭獥绫诲瀷
+                        , skin: 'layui-layer-rim' //鍔犱笂杈规
+                        , area: ['90%', '90%']//澶у皬
+                        , title: '搴撳瓨鏌ヨ鍒楄〃'//鏍囬
+                        , shift: 2//寮瑰嚭鍔ㄧ敾
+                        , content: ['../../浠撳瓨绠$悊/鏉$爜鎶ヨ〃/Kf_ICinventoryQueryReport.html?Type=1&HMaterID=' + HMaterID, 'yes']
+                        , btn: ['鍙栨秷']
+                        , btn1: function (index, layero) {
+                            layer.close(index);
+                        }
+                    })
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾湁鐗╂枡鏁版嵁鏌ヨ锛�');
+                }
+            }
+            //#endregion
+
+            //#region 鍑哄叆搴撹褰曟煡璇�
+            function get_InOutSum() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1 && data[0].HMaterID != 0) {
+                    var HMaterID = data[0].HMaterID.toString();
+                    layer.open({
+                        type: 2//寮圭獥绫诲瀷
+                        , skin: 'layui-layer-rim' //鍔犱笂杈规
+                        , area: ['90%', '90%']//澶у皬
+                        , title: '鍑哄叆搴撹褰曞垪琛�'//鏍囬
+                        , shift: 2//寮瑰嚭鍔ㄧ敾
+                        , content: ['../../浠撳瓨绠$悊/鏉$爜鎶ヨ〃/Kf_StockInOutSumQueryReport.html?Type=1&HMaterID=' + HMaterID, 'yes']
+                        , btn: ['鍙栨秷']
+                        , btn1: function (index, layero) {
+                            layer.close(index);
+                        }
+                    })
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾湁鐗╂枡鏁版嵁鏌ヨ锛�');
+                }
+            }
+            //#endregion
+
+            //#region 琛屽唴浜嬩欢
+            table.on('tool(mainTable)', function (obj) {
+                set_GridDelete(obj);   //琛屽唴鍒犻櫎
+                set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+
+                var data = obj.data;
+                if (obj.event == 'HDate') {
+                    var field = $(this).data('field');
+                    laydate.render({
+                        elem: this.firstChild
+                        , show: true //鐩存帴鏄剧ず
+                        , closeStop: this
+                        , done: function (nowDate) {
+                            //鏃堕棿閫夋嫨瀹屾垚锛岃鏁版嵁鏇存柊
+                            data[field] = nowDate;
+                            obj.update(data);
+                            //鍒锋柊澶嶉�夋
+                            //checkRefresh();
+                        }
+                    });
+                }
+                //else if (obj.event == 'HQtyMust' || obj.event == 'HQty' || obj.event == 'HQty_Full' || obj.event == 'HQty_Empty' || obj.event == 'HQty_Back' || obj.event == 'HPrice' || obj.event == 'HMoney' || obj.event == 'HCostPrice' || obj.event == 'HCostMoney' || obj.event == 'HSalePrice') {
+                //    $(obj.tr).find(".layui-table-edit").keyup(function () {
+                //        var $input = $(this), val = $input.val();
+                //        if (!val) val = "0";
+                //        $input.val(parseInt(val.replace(/[^\d*\.?\d*]/g, '')));
+                //    });
+                //}
+            });
+            //#endregion
+
+            //#region 鐩戝惉鍗曞厓鏍肩紪杈�  鍗曞厓鏍肩紪杈戝悗 鍙樻洿
+            table.on('edit(mainTable)', function (obj) {
+                //鏁板�兼牸寮忔牎楠屽伐鍏�
+                var ref = /^\d+(\.\d+)?$/;          //闈炶礋鏁版鍒欒〃杈惧紡
+                var ref1 = /^-?\d+(\.\d+)?$/;          //鍒ゆ柇瀛楃涓叉槸鍚︿负鏁板瓧(鍖呭惈鏁存暟銆佹诞鐐规暟)锛屾鍒欒〃杈惧紡
+                var temp = "";
+                var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                topScroll = $('#mainTable').next('.layui-table-view').find('.layui-table-body').scrollTop();//鑾峰彇婊氬姩鏉′綅缃�
+                // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
+                var oldText = $(this).prev().text();
+                var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
+                    , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊�
+                    , field = obj.field; //寰楀埌瀛楁
+                //layer.msg('[ID: ' + data.id + '] ' + field + ' 瀛楁鏇存敼涓猴細' + value);
+
+                switch (field) {
+                    case "HQty":                                                       //鏁伴噺
+                        //鏁版嵁鏍煎紡鏍¢獙
+                        temp = value + "";
+                        if (!ref1.test(temp)) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HQty: oldText
+                            });
+                            table.render(option);
+
+                            layer.msg("鏁伴噺璇疯緭鍏ヤ笉涓�0鐨勬暟瀛�!");
+                            return;
+                        } else if (temp * 1 == 0) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HQty: oldText
+                            });
+                            table.render(option);
+
+                            layer.msg("鏁伴噺璇疯緭鍏ヤ笉涓�0鐨勬暟瀛�!");
+                            return;
+                        }
+
+
+                        //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                        var HQty = value * 1;                           //鏁伴噺
+                        
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+
+                        //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                        obj.update({
+                            HQty: HQty
+                        });
+                        table.render(option);
+                        break;
+                    default:
+                }
+            });
+            //#endregion
+            //#endregion
+
+            //#endregion
+
+
+            //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
+
+            //#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+            function get_LoginIs() {
+                if (sessionStorage.login != "login") {
+                    layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+                        icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+                    }, function () { window.location.href = "../../user/login.html"; });
+                }
+            }
+            //#endregion
+
+            //#region 鑾峰彇鏈�澶у崟鎹彿
+            function get_MAXNum() {
+                $("#HInterID").val("0");
+                $("#HBillNo").val("");
+                $.ajax({
+                    url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
+                    type: "GET",
+                    data: { "HBillType": '1256' },
+                    success: function (d) {
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                        $("#HInterID").val(d.data[0].HInterID);
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
+            function getUrlVars_JSON() {
+                var datajson;
+                var str = window.location.search; //鑾峰彇閾炬帴涓紶閫掔殑鍙傛暟
+                var arr = str.substring(str.lastIndexOf("=") + 1);
+                datajson = $.parseJSON(decodeURI(arr));
+                return datajson;
+            }
+            //#endregion
+
+            //#region  鏃堕棿杞崲
+            function formatDate(date) {
+                var d = new Date(date),
+                    month = '' + (d.getMonth() + 1),
+                    day = '' + d.getDate(),
+                    year = d.getFullYear();
+
+                if (month.length < 2) {
+                    month = '0' + month;
+                }
+                if (day.length < 2) {
+                    day = '0' + day;
+                }
+
+                return [year, month, day].join('-');
+            }
+            //#endregion
+
+            //#region 鑾峰彇缁勭粐
+            function Organ() {
+                //鑾峰彇鐧诲綍椤电粍缁囧垪
+                var Organization = '';
+                $.ajax({
+                    type: "get",
+                    url: GetWEBURL() + "/Web/GetOrganizations",
+                    success: function (result) {
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            var data = result.data;
+                            for (var i = 0; i < data.length; i++) {
+                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+                            }
+                            $("#HOrgID").append(Organization);
+                            if (OperationType == 1 || OperationType == 4) {
+                                HOrgIDBar = sessionStorage["OrganizationID"];
+                            }
+                            $("#HOrgID").val(HOrgIDBar);
+                            form.render('select');
+                        }
+                        layer.closeAll("loading");
+                    }
+                })
+            }
+            //#endregion
+
+            //#region 鏍规嵁璐﹀彿鑾峰彇閮ㄩ棬銆佽亴鍛樸�佷富绠�
+            function getCzyglByUser() {
+                $.ajax({
+                    url: GetWEBURL() + "/Xs_SeOrderBill/getCzyglByUser",
+                    async: false,
+                    type: "GET",
+                    data: {
+                        "CurUserName": sessionStorage["HUserName"]
+                    },
+                    success: function (result) {
+                        if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            var data = result.data[0];
+
+                            $("#HEmpID").val(data.HEmpID);
+                            $("#HEmpName").val(data.HEmpName);
+                            $("#HDeptID").val(data.HDeptID);
+                            $("#HDeptName").val(data.HDeptName);
+                            //$("#HManagerID").val(data.HManagerID);
+                            //$("#HManagerName").val(data.HManagerName);
+                        } else {
+                            layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                        }
+                    }, error: function () {
+                        layer.alert("鍙戠敓閿欒!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 寮圭獥閫夋嫨鏂规硶
+            //#region 閫夋嫨閮ㄩ棬
+            function get_checkDept() {
+                layer.open({
+                    type: 2//寮圭獥绫诲瀷
+                    , skin: 'layui-layer-rim' //鍔犱笂杈规
+                    , area: ['90%', '90%']//澶у皬
+                    , title: '閮ㄩ棬鍒楄〃'//鏍囬
+                    , shift: 2//寮瑰嚭鍔ㄧ敾
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
+                    , btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HDeptName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О);
+                        $("#HDeptID").val(checkStatus.data[0].HItemID);
+                        layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) { }
+                })
+            }
+            //#endregion
+
+            //#region 閫夋嫨閿�鍞富绠�
+            function get_checkManager() {
+                layer.open({
+                    type: 2//寮圭獥绫诲瀷
+                    , skin: 'layui-layer-rim' //鍔犱笂杈规
+                    , area: ['90%', '90%']//澶у皬
+                    , title: '閿�鍞富绠″垪琛�'//鏍囬
+                    , shift: 2//寮瑰嚭鍔ㄧ敾
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HManager', 'yes']
+                    , btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HManagerName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
+                        $("#HManagerID").val(checkStatus.data[0].HItemID);
+                        layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) { }
+                })
+            }
+            //#endregion
+
+            //#region 閫夋嫨涓氬姟鍛樺憳
+            function get_checkEmp() {
+                layer.open({
+                    type: 2//寮圭獥绫诲瀷
+                    , skin: 'layui-layer-rim' //鍔犱笂杈规
+                    , area: ['90%', '90%']//澶у皬
+                    , title: '涓氬姟鍛樺憳鍒楄〃'//鏍囬
+                    , shift: 2//寮瑰嚭鍔ㄧ敾
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HEmp', 'yes']
+                    , btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HEmpName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
+                        $("#HEmpID").val(checkStatus.data[0].HItemID);
+                        layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) { }
+                })
+            }
+            //#endregion
+
+            //#region 閫夋嫨浠撶
+            function get_checkKeeper() {
+                layer.open({
+                    type: 2//寮圭獥绫诲瀷
+                    , skin: 'layui-layer-rim' //鍔犱笂杈规
+                    , area: ['90%', '90%']//澶у皬
+                    , title: '浠撶鍒楄〃'//鏍囬
+                    , shift: 2//寮瑰嚭鍔ㄧ敾
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
+                    , btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HKeeperName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
+                        $("#HKeeperID").val(checkStatus.data[0].HItemID);
+                        layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) { }
+                })
+            }
+            //#endregion
+            //#endregion
+
+            //#region 瀛愯〃鍒濆鍖�
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , totalRow: true
+                    , limit: 500
+                    , height: 500
+                    , loading: false
+                    , cols: [[ //瀛愯〃
+                        { type: 'checkbox', totalRowText: '鍚堣琛�' }
+                        , { type: 'numbers', title: '搴忓彿', width: 100 }
+                        , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
+                        , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
+                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100, style: 'background-color:#efefef4d;' }
+                        , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, edit: 'text', event: "HUnitID" }//f7
+                        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HQty', title: '瀹炲彂鏁伴噺', width: 100, totalRow: true, edit: 'text', event: "HQty" }
+                        , { field: 'HWHID', title: 'HWHID', width: 100, edit: 'text', hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: '鍙戣揣浠撳簱', title: '鍙戣揣浠撳簱', width: 100, edit: 'text', event: "HWHID" }
+                        , { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
+                        , { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HRelationQty', title: '鍏宠仈鏁伴噺', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HRelationMoney', title: '鍏宠仈閲戦', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSPID', title: 'HSPID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSPName', title: '浠撲綅', width: 100, hide: true }
+                        , { field: 'HSPGroupID', title: 'HSPGroupID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSPGroupName', title: '浠撲綅缁�', width: 100, hide: true }
+                        , { field: 'HSCWHID', title: 'HSCWHID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSCWHName', title: '璋冨嚭浠撳簱', width: 100, hide: true }
+                        , { field: 'HSCSPID', title: 'HSCSPID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSCSPName', title: '璋冨嚭浠撲綅', width: 100, hide: true }
+                        , { field: 'HBatchNo', title: '鎵规', width: 100, hide: true }
+                        , { field: 'HPropertyID', title: 'HPropertyID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HPropertyName', title: '杈呭姪灞炴��', width: 100, hide: true }
+                        , { field: 'HSecUnitID', title: 'HSecUnitID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSecUnitName', title: '杈呭姪璁¢噺鍗曚綅', width: 100, hide: true }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                    ]]
+                    , done: function (res, curr, count) {
+                        $(".layui-table-main").scrollTop(topScroll);
+                    }
+                }
+
+                var rowdata = [{
+                    "HMaterID": "0"
+                    , "鐗╂枡浠g爜": ""
+                    , "鐗╂枡鍚嶇О": ""
+                    , "瑙勬牸鍨嬪彿": ""
+                    , "HUnitID": "0"
+                    , "璁¢噺鍗曚綅": ""
+                    , "HQtyMust": "0"
+                    , "HQty": "0"
+                    , "HWHID": $("#HWHID").val()
+                    , "鍙戣揣浠撳簱": $("#HWHName").val()
+                    , "HRemark": ""
+                    , "HSourceInterID": "0"
+                    , "HSourceEntryID": "0"
+                    , "HSourceBillNo": ""
+                    , "HSourceBillType": ""
+                    , "HRelationQty": "0"
+                    , "HRelationMoney": "0"
+                    , 'HSPID': "0"
+                    , 'HSPName': ""
+                    , 'HSPGroupID': "0"
+                    , "HSPGroupName": ""
+                    , 'HSCWHID': "0"
+                    , 'HSCWHName': ""
+                    , 'HSCSPID': "0"
+                    , 'HSCSPName': ""
+                    , 'HBatchNo': ""
+                    , 'HPropertyID': "0"
+                    , 'HPropertyName': ""
+                    , 'HSecUnitID': "0"
+                    , 'HSecUnitName': ""
+                }];
+
+                option.data = rowdata;
+                table.render(option);
+            }
+            //#endregion
+
+            //#region 缂栬緫椤甸潰鍒濆鍖�
+            function RoadBillMain(linterid) {
+                //鏌ヨ妫�楠屾柟妗堝崟鏄惁瀛樺湪
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + "Kf_ProductReceiveMaterialBill/cx",
+                    async: false,
+                    type: "GET",
+                    data: {
+                        "HInterID": linterid
+                    },
+                    success: function (result) {
+                        if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            allVal = result.data[0];
+                            var data = result.data[0];
+                            HBillSubType = data.HBillSubType;
+                            //鏍规嵁瀹㈡埛甯﹀嚭鑱旂郴浜恒�佽仈绯荤數璇�
+                            getCustomerByCusID(data.HSupID);
+
+                            form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+                                "HBillNo": data.鍗曟嵁鍙�
+                                , "HDate": formatDate(data.鏃ユ湡)
+                                , "HDeptID": data.HDeptID
+                                , "HDeptName": data.閮ㄩ棬
+                                , "HEmpID": data.HEmpID
+                                , "HEmpName": data.涓氬姟鍛�
+                                //, "HManagerID": data.HManagerID
+                                //, "HManagerName": data.涓荤
+                                //, "BillType": data.HSourceBillType
+                                //, "HMainSourceInterID": data.HMainSourceInterID
+                                //, "HMainSourceEntryID": data.HMainSourceEntryID
+                                //, "HMainSourceBillNo": data.HMainSourceBillNo
+                                //, "HMainSourceBillType": data.HMainSourceBillType
+                                , "HKeeperID": data.HKeeperID
+                                , "HKeeperName": data.浠撶鍛�
+                                //, "HWHID": data.HWHID_Main
+                                //, "HWHName": data.涓昏〃浠撳簱
+                                , "HRemark": data.琛ㄥご澶囨敞
+
+                                , "HMaker": data.鍒跺崟浜�
+                                , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(data.鍒跺崟鏃ユ湡), "yyyy-MM-dd")
+                                , "HUpDater": data.淇敼浜�
+                                , "HUpDateDate": data.淇敼鏃ユ湡 == null ? "" : Format(new Date(data.淇敼鏃ユ湡), "yyyy-MM-dd")
+                                , "HChecker": data.瀹℃牳浜�
+                                , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(data.瀹℃牳鏃ユ湡), "yyyy-MM-dd")
+                                , "HCloseMan": data.鍏抽棴浜�
+                                , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Format(new Date(data.鍏抽棴鏃ユ湡), "yyyy-MM-dd")
+                                , "HDeleteMan": data.浣滃簾浜�
+                                , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd")
+                            });
+
+                            HOrgIDBar = data.HOrgID == null ? 0 : data.HOrgID;
+                            //瀛愯〃  璧嬪��
+                            var rowdata = [];
+                            for (let i = 0; i < result.data.length; i++) {
+                                rowdata.push(
+                                    {
+                                        "HMaterID": result.data[i].HMaterID
+                                        , "鐗╂枡浠g爜": result.data[i].鐗╂枡浠g爜
+                                        , "鐗╂枡鍚嶇О": result.data[i].鐗╂枡鍚嶇О
+                                        , "瑙勬牸鍨嬪彿": result.data[i].瑙勬牸鍨嬪彿
+                                        , "HUnitID": result.data[i].HUnitID
+                                        , "璁¢噺鍗曚綅": result.data[i].璁¢噺鍗曚綅
+                                        , "HQtyMust": dealDoubleToFixed(result.data[i].搴斿彂鏁伴噺, 1)
+                                        , "HQty": dealDoubleToFixed(result.data[i].鏁伴噺, 1)
+                                        , "HWHID": result.data[i].hwhid
+                                        , "鍙戣揣浠撳簱": result.data[i].鍙戣揣浠撳簱
+                                        , "HRemark": result.data[i].琛ㄤ綋澶囨敞
+
+                                        , "HSourceInterID": result.data[i].HSourceInterID
+                                        , "HSourceEntryID": result.data[i].HSourceEntryID
+                                        , "HSourceBillNo": result.data[i].婧愬崟鍗曞彿
+                                        , "HSourceBillType": result.data[i].HSourceBillType
+                                        , "HRelationQty": result.data[i].鍏宠仈鏁伴噺
+                                        , "HRelationMoney": result.data[i].鍏宠仈閲戦
+
+                                        , 'HSPID': result.data[i].HSPID
+                                        , 'HSPName': result.data[i].浠撲綅
+                                        , 'HSPGroupID': result.data[i].HSPGroupID
+                                        , "HSPGroupName": result.data[i].浠撲綅缁�
+                                        , 'HSCWHID': result.data[i].HSCWHID
+                                        , 'HSCWHName': result.data[i].璋冨嚭浠撳簱
+                                        , 'HSCSPID': result.data[i].HSCSPID
+                                        , 'HSCSPName': result.data[i].璋冨嚭浠撲綅
+                                        , 'HBatchNo': result.data[i].鎵规
+
+                                        , 'HPropertyID': result.data[i].HPropertyID
+                                        , 'HPropertyName': result.data[i].杈呭姪灞炴��
+                                        , 'HSecUnitID': result.data[i].HSecUnitID
+                                        , 'HSecUnitName': result.data[i].杈呭姪璁¢噺鍗曚綅
+                                    }
+                                )
+                            }
+                            option.data = rowdata;
+                            table.render(option);
+                            layer.close(ajaxLoad);
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鍙戠敓閿欒!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 淇濆瓨鏂规硶
+            function set_SaveBill(data) {
+                //璁板綍鎿嶄綔绫诲瀷
+                var refSav = "";
+                if (OperationType == 1 || OperationType == 4) {
+                    refSav = "Add";
+                }
+                if (OperationType == 3) {
+                    refSav = "Update";
+                }
+                //鑻ヤ负缂栬緫-淇濆瓨锛屽垯鏇存柊淇敼浜哄拰淇敼鏃堕棿
+                if (OperationType == 3) {
+                    data.field.HUpDater = sessionStorage["HUserName"];
+                    data.field.HUpDateDate = Format(new Date(), "yyyy-MM-dd");
+                    $("#HUpDater").val(sessionStorage["HUserName"]);
+                    $("#HUpDateDate").val(Format(new Date(), "yyyy-MM-dd"));
+                }
+
+                //搴忓垪鍖栬〃澶翠俊鎭拰瀛愯〃淇℃伅
+                var sMainStr = JSON.stringify(data.field);
+                var sSubStr = JSON.stringify(option.data);
+                //鎷兼帴鍙傛暟
+                var sMainSub = sMainStr + ';' + sSubStr + ';' + refSav + ";" + sessionStorage["HUserName"];
+
+                $.ajax({
+                    type: "POST",
+                    url: GetWEBURL() + "Kf_ProductReceiveMaterialBill/SaveKf_ProductReceiveMaterialBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    async: true,
+                    data: { "msg": sMainSub },
+                    dataType: "json",
+                    success: function (data) {
+                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            layer.msg(data.Message, { icon: 1 });
+                            $('#set_SaveBill').addClass("layui-btn-disabled").attr("disabled", true);
+                            if (data.Verify == "Y") //鑷姩瀹℃牳
+                            {
+                                $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
+                                set_CheckBill(0); //瀹℃牳
+                            }
+                            //淇濆瓨鍚庢祻瑙�
+                            //ReRoadBillMain();
+                        }
+                        else {
+                            layer.alert(data.Message, { icon: 5 });
+                        }
+                        layer.closeAll("loading");
+                    },
+                    error: function (err) {
+                        layer.alert("閿欒:" + err, { icon: 5 });
+                        console.log("Reason" + sMainStr);
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 鏁版嵁鏍¢獙
+            function AllowLoadData(data) {
+                //鏁板�兼牸寮忔牎楠屽伐鍏�
+                var ref = /^\d+(\.\d+)?$/;          //闈炶礋鏁版鍒欒〃杈惧紡
+                var ref1 = /^-?\d+(\.\d+)?$/;          //鍒ゆ柇瀛楃涓叉槸鍚︿负鏁板瓧(鍖呭惈鏁存暟銆佹诞鐐规暟)锛屾鍒欒〃杈惧紡
+                var temp = "";
+
+                //#region 琛ㄥご鏁版嵁妫�楠�
+                if ($("#HBillNo").val() == "") {
+                    layer.msg("鍗曟嵁鍙蜂笉鑳戒负绌�!");
+                    return false;
+                }
+
+                if ($("#HDate").val() == "") {
+                    layer.msg("鏃ユ湡涓嶈兘涓虹┖!");
+                    return false;
+                }
+
+                if ($("#HDeptID").val() == "0" || $("#HDeptID").val() == "") {
+                    layer.msg("閮ㄩ棬鏈�夋嫨!");
+                    return false;
+                }
+
+                if ($("#HEmpID").val() == "0" || $("#HEmpID").val() == "") {
+                    layer.msg("涓氬姟鍛樻湭閫夋嫨!");
+                    return false;
+                }
+
+                //if ($("#HKeeperID").val() == "0" || $("#HKeeperID").val() == "") {
+                //    layer.msg("浠撶鏈�夋嫨!");
+                //    return false;
+                //}
+                //#endregion
+
+                //#region 瀛愯〃 鏁版嵁妫�楠�
+                for (var i = 0; i < option.data.length; i++) {
+
+                    if (typeof option.data[i] !== 'object' || option.data[i] === null || Array.isArray(option.data[i])) {
+                        continue; // 璺宠繃闈炲璞¢」锛堝绌烘暟缁勶級
+                    }
+
+                    if (option.data[i]["HMaterID"] == "0") {
+                        layer.msg("绗�" + (i + 1) + "琛岋細鐗╂枡鏈�夋嫨锛�");
+                        return false;
+                    }
+
+                    if (option.data[i]["HUnitID"] == "0") {
+                        layer.msg("绗�" + (i + 1) + "琛岋細璁¢噺鍗曚綅鏈�夋嫨锛�");
+                        return false;
+                    }
+
+                    //瀹炲彂鏁伴噺鏍煎紡鏍¢獙
+                    temp = option.data[i]["HQty"] + "";
+                    if (!ref1.test(temp)) {
+                        layer.msg("绗�" + (i + 1) + "琛岋細瀹炲彂鏁伴噺璇疯緭鍏ヤ笉涓�0鐨勬暟瀛楋紒");
+                        return false;
+                    } else if (temp * 1 == 0) {
+                        layer.msg("绗�" + (i + 1) + "琛岋細瀹炲彂鏁伴噺璇疯緭鍏ヤ笉涓�0鐨勬暟瀛楋紒");
+                        return false;
+                    }
+
+                    //鍙戣揣浠撳簱闈炵┖楠岃瘉
+                    if (option.data[i]["HWHID"] == "0") {
+                        layer.msg("绗�" + (i + 1) + "琛岋細鍙戣揣浠撳簱鏈�夋嫨锛�");
+                        return false;
+                    }
+                }
+                //#endregion
+                return true;
+            }
+            //#endregion
+
+            //#region 琛屽唴蹇嵎閿瓫閫�
+            function set_GridCellCheck(obj) {
+                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+                    //#region 瀛愯〃鏂囨湰妗嗚緭鍏ュ悗妫�绱㈡暟鎹�
+                    if (event.key == "F7") {
+                        //鐗╂枡
+                        if (obj.event == "HMaterID") {
+                            var HOrgID = $("#HOrgID").val();
+
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim" //鍔犱笂杈规
+                                , title: "鐗╂枡鍒楄〃"  //鏍囬
+                                , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2 //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"] //绐椾綋澶у皬
+                                , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2&HOrgID=' + HOrgID, 'yes']
+                                , btn: ["纭畾", "鍙栨秷"]
+                                , btn1: function (index, laero) {
+                                    //鎸夐挳涓�  鐨勫洖璋�
+                                    var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+                                    var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+                                    if (checkStatus.data.length < 1) {
+                                        return layer.msg("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
+                                    }
+
+                                    if (checkStatus.data.length > 1) {
+                                        var rowIndex = $(obj.tr).attr("data-index") * 1;
+                                        for (var i = 0; i < checkStatus.data.length; i++) {
+                                            if (rowIndex + i >= option.data.length) {
+                                                var NewRow = {
+                                                    "HMaterID": "0"
+                                                    , "鐗╂枡浠g爜": ""
+                                                    , "鐗╂枡鍚嶇О": ""
+                                                    , "瑙勬牸鍨嬪彿": ""
+                                                    , "HUnitID": "0"
+                                                    , "璁¢噺鍗曚綅": ""
+                                                    , "HQtyMust": "0"
+                                                    , "HQty": "0"
+                                                    , "HWHID": $("#HWHID").val()
+                                                    , "鍙戣揣浠撳簱": $("#HWHName").val()
+                                                    , "HRemark": ""
+                                                    , "HSourceInterID": "0"
+                                                    , "HSourceEntryID": "0"
+                                                    , "HSourceBillNo": ""
+                                                    , "HSourceBillType": ""
+                                                    , "HRelationQty": "0"
+                                                    , "HRelationMoney": "0"
+                                                    , 'HSPID': "0"
+                                                    , 'HSPName': ""
+                                                    , 'HSPGroupID': "0"
+                                                    , "HSPGroupName": ""
+                                                    , 'HSCWHID': "0"
+                                                    , 'HSCWHName': ""
+                                                    , 'HSCSPID': "0"
+                                                    , 'HSCSPName': ""
+                                                    , 'HBatchNo': ""
+                                                    , 'HPropertyID': "0"
+                                                    , 'HPropertyName': ""
+                                                    , 'HSecUnitID': "0"
+                                                    , 'HSecUnitName': ""
+                                                };
+                                                table.cache["mainTable"].push(NewRow);
+                                                option.data = table.cache["mainTable"];
+                                                table.render(option);
+                                            }
+                                            option.data[rowIndex + i].HMaterID = checkStatus.data[i].HItemID;
+                                            option.data[rowIndex + i].鐗╂枡浠g爜 = checkStatus.data[i].鐗╂枡浠g爜;
+                                            option.data[rowIndex + i].鐗╂枡鍚嶇О = checkStatus.data[i].鐗╂枡鍚嶇О;
+                                            option.data[rowIndex + i].瑙勬牸鍨嬪彿 = checkStatus.data[i].瑙勬牸鍨嬪彿;
+                                            option.data[rowIndex + i].HUnitID = checkStatus.data[i].HUnitID;
+                                            option.data[rowIndex + i].璁¢噺鍗曚綅 = checkStatus.data[i].璁¢噺鍗曚綅鍚嶇О;
+                                        }
+                                        table.render(option);
+                                    } else {
+                                        HDataTemp = checkStatus.data[0];
+                                    }
+
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , end: function () {
+                                    if (typeof (HDataTemp.HItemID) != "undefined") {
+                                        obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
+                                            "HMaterID": HDataTemp.HItemID
+                                            , "鐗╂枡浠g爜": HDataTemp.鐗╂枡浠g爜
+                                            , "鐗╂枡鍚嶇О": HDataTemp.鐗╂枡鍚嶇О
+                                            , "瑙勬牸鍨嬪彿": HDataTemp.瑙勬牸鍨嬪彿
+                                            , "HUnitID": HDataTemp.HUnitID
+                                            , "璁¢噺鍗曚綅": HDataTemp.璁¢噺鍗曚綅鍚嶇О
+                                        })
+
+                                        HDataTemp = {};
+                                    }
+                                }
+                            })
+                        }
+                        //璁¢噺鍗曚綅
+                        if (obj.event == "HUnitID") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim" //鍔犱笂杈规
+                                , title: "璁¢噺鍗曚綅鍒楄〃"  //鏍囬
+                                , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2 //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"] //绐椾綋澶у皬
+                                , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Unit.html', 'yes']
+                                , btn: ["纭畾", "鍙栨秷"]
+                                , btn1: function (index, laero) {
+                                    //鎸夐挳涓�  鐨勫洖璋�
+                                    var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+                                    var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+                                    if (checkStatus.data.length != 1) {
+                                        return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                    }
+                                    //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                    obj.update({
+                                        "璁¢噺鍗曚綅": checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О
+                                        , "HUnitID": checkStatus.data[0].HItemID
+                                    })
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , end: function () {
+                                    if (typeof (HDataTemp.HItemID) != "undefined") {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            "HUnitID": HDataTemp.HItemID
+                                            , "璁¢噺鍗曚綅": HDataTemp.璁¢噺鍗曚綅鍚嶇О
+                                        })
+                                        HDataTemp = {};
+                                    }
+                                }
+                            })
+                        }
+                        //鍙戣揣浠撳簱
+                        if (obj.event == "HWHID") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim" //鍔犱笂杈规
+                                , title: "浠撳簱鍒楄〃"  //鏍囬
+                                , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2 //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"] //绐椾綋澶у皬
+                                , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Warehouse.html?type=HWHSub', 'yes']
+                                , btn: ["纭畾", "鍙栨秷"]
+                                , btn1: function (index, laero) {
+                                    //鎸夐挳涓�  鐨勫洖璋�
+                                    var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+                                    var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+                                    if (checkStatus.data.length != 1) {
+                                        return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                    }
+                                    //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                    obj.update({
+
+                                        "HWHID": checkStatus.data[0].HItemID,
+                                        "鍙戣揣浠撳簱": checkStatus.data[0].浠撳簱鍚嶇О
+                                    })
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , end: function () {
+                                    if (typeof (HDataTemp.HItemID) != "undefined") {
+                                        obj.update({
+                                            "HWHID": HDataTemp.HItemID
+                                            , "鍙戣揣浠撳簱": HDataTemp.浠撳簱鍚嶇О
+                                        })
+                                        HDataTemp = {};
+                                    }
+                                }
+                            })
+                        }
+                        obj.event = "";
+                        return false;
+                    }
+                })
+            }
+            //#endregion
+
+            //#region 琛屽唴鍒犻櫎
+            function set_GridDelete(obj) {
+                var data = obj.data;
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+                        console.log("绱㈠紩涓�:" + rowIndex);
+                        if (rowIndex === '0' && table.cache["mainTable"].length == 1) {
+                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                        } else {
+                            obj.del();//鍋囧垹闄�
+                            table.cache["mainTable"].splice(rowIndex, 1);  //鈶″交搴曠Щ闄ゅ厓绱狅紝浠庣紦瀛橀噷绉婚櫎杩欎竴琛�
+                            option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option);
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+            //#endregion
+
+            //#region 鍦ㄦ湯灏惧鍔犱竴琛�
+            function btnAddLine(NewRow) {
+                if (option.data.length > 0) {
+                    NewRow.HisStockGoods = option.data[0]["HisStockGoods"];
+                } else {
+                    NewRow.HisStockGoods = "false";
+                }
+
+
+                table.cache["mainTable"].push(NewRow);
+                option.data = table.cache["mainTable"];
+                table.render(option);
+
+                //鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
+                setSelectHisStockGoodsByTableRender();
+
+                //鏍规嵁鏄惁鍙栧簱瀛樿幏鍙栧畾閲戞瘮渚�
+                //setHEarnestRateByHisStockGoods();
+
+                //璁剧疆琛ㄥご鎵�闇�閲戦
+                set_HBillMoney($("#HEarnestRate").val() * 1);
+                //rows++;
+                layer.msg('澧炲姞涓�琛屾寜閽紒')
+            }
+            //#endregion
+
+            //#region 鍦ㄦ寚瀹氳涓嬫彃鍏ヤ竴琛�
+            function btnInsertLine(NewRow) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var tables = [];                                    //瀛樺偍鎻掑叆涓�琛屽悗鐨勮〃鏍兼暟鎹�
+                    //鑾峰彇琛ㄦ牸鐨勫叏閮ㄨ
+                    var rowList = table.cache['mainTable'];
+                    for (var i = 0; i < rowList.length; i++) {          //閬嶅巻琛ㄦ牸鐨勮
+                        tables.push(option.data[i]);
+                        if (rowList[i].LAY_CHECKED == true) {           //鑾峰彇閫変腑琛岀殑浣嶇疆
+                            tables.push(NewRow);
+                        }
+                    }
+                    option.data = tables;
+                    table.render(option);
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+            //#endregion
+
+            //#region 澶嶅埗涓�琛�
+            function btnCopyLine(data) {
+                var copydata = JSON.stringify(data);
+                if (data.length <= 0) {
+                    layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                }
+                else if (data.length > 1) {
+                    layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                }
+                else {
+                    var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+                    var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+                    table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+                    option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+                    //璁剧疆澶嶅埗寰楀埌鐨勮褰曠殑瀹為檯绉伴噸涓�0
+                    option.data[option.data.length - 1].HWeight = "0";
+
+                    table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+                }
+            }
+            //#endregion
+
+            //#region 涓婄Щ
+            function btn_up() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (data.length == 1) {
+                    var tables = [];
+                    //鑾峰彇琛ㄦ牸鐨勫叏閮ㄨ
+                    var rowList = table.cache['mainTable'];
+                    for (var i = 0; i < rowList.length; i++) {          //閬嶅巻琛ㄦ牸鐨勮
+                        if (rowList[i].LAY_CHECKED == true) {           //鑾峰彇閫変腑琛岀殑浣嶇疆
+                            //濡傛灉鏄涓�琛屼笂绉伙紝鍒欏け璐ュ苟鎻愰啋
+                            if (i == 0) {
+                                layer.msg("绗竴琛屾暟鎹棤娉曚笂绉伙紒");
+                                return;
+                            }
+                            tables.push(option.data[i - 1]);
+                            data[0].LAY_CHECKED = true;
+                            option.data[i - 1] = data[0];
+                            option.data[i] = tables[0];
+                            table.render(option);
+                            break;
+                        }
+                    }
+                } else {
+                    layer.msg("璇烽�夋嫨涓�琛屾暟鎹紒");
+                }
+            }
+            //#endregion
+
+            //#region 涓嬬Щ
+            function btn_under() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (data.length == 1) {
+                    var tables = [];
+                    //鑾峰彇琛ㄦ牸鐨勫叏閮ㄨ
+                    var rowList = table.cache['mainTable'];
+                    for (var i = 0; i < rowList.length; i++) {          //閬嶅巻琛ㄦ牸鐨勮
+                        if (rowList[i].LAY_CHECKED == true) {           //鑾峰彇閫変腑琛岀殑浣嶇疆
+                            //濡傛灉鏄渶鍚庝竴琛屼笅绉伙紝鍒欏け璐ュ苟鎻愰啋
+                            if (i == option.data.length - 1) {
+                                layer.msg("鏈�鍚庝竴琛屾暟鎹棤娉曚笅绉伙紒");
+                                return;
+                            }
+
+
+                            tables.push(option.data[i + 1]);
+                            data[0].LAY_CHECKED = true;
+                            option.data[i + 1] = data[0];
+                            option.data[i] = tables[0];
+                            table.render(option);
+                            break;
+                        }
+                    }
+                } else {
+                    layer.msg("璇烽�夋嫨涓�琛屾暟鎹紒");
+                }
+            }
+            //#endregion
+
+            //#region 瀛愯〃1锛氶殣钘忓垪璁剧疆
+            function get_HideColumn() {
+                var colName = "";
+                var contentUrl = "";
+                for (var i = 1; i < option.cols[0].length - 1; i++) {
+                    colName += option.cols[0][i]["title"] + ",";
+                }
+                var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+                var urlLen = urlStr.split('/');
+                for (var i = 0; i < urlLen.length - 4; i++) {
+                    contentUrl += "../";
+                }
+                colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+                contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim" //鍔犱笂杈规
+                    , title: "闅愯棌鍒楄缃�"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["50%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: [contentUrl, "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                        layer.close(index);//鍏抽棴寮圭獥
+                    }
+                })
+            }
+            //#endregion
+            //#region 瀛愯〃1锛氭樉绀哄垪鏁版嵁
+            function DisPlay_HideColumn() {
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                    async: false,
+                    type: "GET",
+                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                    async: false,
+                    success: function (data1) {
+                        if (data1.data.length != 0) {
+                            var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+                            //var titleData = ["HMaterID", "HUnitID", "HWHID", "婊¤溅閲嶉噺", "绌鸿溅閲嶉噺", "鍥炶溅閲嶉噺", "鎴愭湰鍗曚环", "鎴愭湰閲戦", "閿�鍞崟浠�", "閿�鍞鍗曞唴鐮�", "閿�鍞鍗曞瓙鍐呯爜", "閿�鍞鍗曞彿","婧愬崟鍐呯爜","婧愬崟瀛愬唴鐮�","婧愬崟鍙�","婧愬崟绫诲瀷","鍏宠仈鏁伴噺","鍏宠仈閲戦","HSPID","浠撲綅","HSPGroupID","浠撲綅缁�","HSCWHID","璋冨嚭浠撳簱","HSCSPID","璋冨嚭浠撲綅","鎵规","閲囪喘璁㈠崟鍐呯爜","閲囪喘璁㈠崟瀛愬唴鐮�","閲囪喘璁㈠崟鍙�","HPropertyID","杈呭姪灞炴��","HSecUnitID","杈呭姪璁¢噺鍗曚綅","鎹㈢畻鐜�","鍙戝姩鏈哄彿","鍦扮洏鍙�","鍑哄巶璇�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            ////titleData = [];
+
+                            dataCol = data1.data[0].HGridString.split(',');
+
+                            for (var i = 0; i < option.cols[0].length - 2; i++) {
+                                if (i > dataCol.length - 1) {
+                                    return;
+                                }
+                                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;
+                                }
+                                if ($.inArray(option.cols[0][i + 1]["title"], titleData) > -1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+
+                                //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                                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;
+                                }
+
+                                //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+                                if (dataCols[4] != null && dataCols[4] != "") {
+                                    option.cols[0][i + 1]["title"] = dataCols[4];
+                                }
+                            }
+
+                            //鍙栨秷鍐荤粨鍒�
+                            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);
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                })
+            }
+            //#endregion
+
+
+            //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
+            function set_CheckBill(num) {
+                var InterID = $("#HInterID").val();
+                //閫昏緫瀹℃牳鏂规硶
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/Kf_ProductReceiveMaterialBill/AuditKf_ProductReceiveMaterialBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "HInterID": InterID, "IsAudit": num, "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);
+                            });
+                            $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);
+                        } else {
+                            layer.alert(result.code + result.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 鎵撳嵃
+            function get_PrintReport() {
+                //#region 鍒ゆ柇婧愬崟鐘舵��
+                var HSourceBillData = "";
+                var HSourceBillData = getSourceBillStatus_SellOutBill();            //鑾峰彇婧愬崟鏁版嵁
+                if (HSourceBillData != "none") {
+                    if (HSourceBillData.length == 0) {
+                        layer.alert("鎵撳嵃澶辫触!鏈煡璇㈠埌鍗曟嵁淇℃伅!", { icon: 5 });
+                        return;
+                    } else if (HSourceBillData[0]["鐘舵��"] != "宸插鏍�") {
+                        layer.alert("鎵撳嵃澶辫触!鍗曟嵁鐘舵�佹湭涓�'宸插鏍�'鐘舵��!", { icon: 5 });
+                        return;
+                    }
+                } else {
+                    return;
+                }
+                //#endregion
+                var InterID = $("#HInterID").val();
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/Kf_SellOutBill/CheckSellOutBill_IsExist", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "HInterID": InterID },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            layer.open({
+                                type: 2
+                                , area: ['50%', '50%']
+                                , title: '鎵撳嵃妯$増閫夋嫨'
+                                , shade: 0.6 //閬僵閫忔槑搴�
+                                , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                                , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + InterID + '&MyMsg=' + InterID + '&Type=Kf_SellOutBillList', 'yes']
+                                , resize: false
+                            })
+                        } else {
+                            layer.alert(result.code + result.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 鏍规嵁鐗╂枡ID鑾峰彇绮惧害
+            function getDecByMaterID(HMaterID) {
+                var resultData = {};
+                $.ajax({  // 寮傛璇锋眰
+                    url: GetWEBURL() + "Gy_Material/getDecByID",  //璇锋眰鍦板潃
+                    async: false,   //鏄惁寮�鍚紓姝�
+                    type: "GET",   //璇锋眰绫诲瀷
+                    data: {   //瀹氫箟鍙戦�佸埌鏈嶅姟鍣ㄧ殑鏁版嵁
+                        "HMaterID": HMaterID     //  灏唄materid浣滀负璇锋眰鍙傛暟鍙戦��
+                    },
+                    success: function (result) {   // 褰撹姹傛垚鍔熸椂锛屾墽琛岃繖涓嚱鏁�
+                        if (result.code == 1) { // 濡傛灉鏈嶅姟鍣ㄨ繑鍥炵殑鏁版嵁涓殑`code瀛楁绛変簬1锛岃繖鍙兘琛ㄧず瀹℃牳鎿嶄綔鎴愬姛鎵ц
+                            var data = result.data; //澹版槑data鍙橀噺锛屽苟灏嗗叾璧嬪�间负result瀵硅薄涓殑data灞炴��
+                            resultData = data[0];   //灏哾ata鏁扮粍锛堟垨绫绘暟缁勫璞★級鐨勭涓�涓厓绱犺祴鍊肩粰鍙橀噺resultData
+                        }
+                        //else {
+                        //    layer.alert(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' }); //result.msg瀵硅薄锛屾彁绀哄脊绐� 绫诲瀷涓�5锛� 鎸夐挳锛屽拰鎸夐挳鐨勫悕绉颁负閫�鍑�  鏃堕棿 涓�100绉掞紝浠ュ強鍋忕Щ閲忥紙`offset: 't'
+                        //}
+                    }, error: function () {
+                        layer.alert("鍙戠敓閿欒!", { icon: 5 });  //鎻愮ず寮圭獥 鍙戠敓閿欒 锛岃绀烘爣蹇椾负5鐨�
+                    }
+                });
+                return resultData;
+            }
+            //#endregion
+
+            //#region 灏唘rl鍙傛暟涓殑涓枃涔辩爜閲嶆柊杞崲鎴愪腑鏂�
+            function getParams(key) {
+                var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
+                //濡傛灉鍦板潃鏍忎腑鍑虹幇涓枃鍒欒繘琛岀紪鐮�
+                var r = encodeURI(window.location.search).substr(1).match(reg);
+                if (r != null) {
+                    //灏嗕腑鏂囩紪鐮佺殑瀛楃閲嶆柊鍙樻垚涓枃
+                    return decodeURI(unescape(r[2]));
+                }
+                return "";
+            };
+            //#endregion
+            //#endregion
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+        // 鍩虹璧勬枡杩斿洖鏁版嵁
+        function GetHEmpValue(obj)  //杩斿洖涓氬姟鍛�
+        {
+            $("#HEmpName").val(obj[0].鑱屽憳鍚嶇О);
+            $("#HEmpID").val(obj[0].HItemID);
+        }
+
+        function GetHManagerValue(obj)  //杩斿洖涓荤
+        {
+            $("#HManagerName").val(obj[0].鑱屽憳鍚嶇О);
+            $("#HManagerID").val(obj[0].HItemID);
+        }
+
+        function GetHDeptNameValue(obj)  //杩斿洖閮ㄩ棬
+        {
+            $("#HDeptName").val(obj[0].閮ㄩ棬鍚嶇О);
+            $("#HDeptID").val(obj[0].HItemID);
+        }
+
+        //function GetHWHValue(obj)  //杩斿洖浠撳簱
+        //{
+        //    //$("#HWHName").val(obj[0].HName);
+        //    //$("#HWHID").val(obj[0].HItemID);
+        //}
+
+        function GetHKeeperValue(obj)  //杩斿洖淇濈鍛�
+        {
+            $("#HKeeperName").val(obj[0].鑱屽憳鍚嶇О);
+            $("#HKeeperID").val(obj[0].HItemID);
+        }
+
+
+        //function GetHSCWHNAMEValue(obj) { //杩斿洖鍑哄簱浠撳簱
+        //    $("#HWHName").val(obj[0].HName);
+        //    $("#HWHID").val(obj[0].HItemID);
+        //}
+
+
+        //鍙屽嚮杩斿洖浠撳簱
+        function GetHWHSubValue(data) {
+            OptionData = data[0]
+        }
+
+        function GetHWHValue(obj)  //杩斿洖浠撳簱
+        {
+            $("#HWHName").val(obj[0].浠撳簱鍚嶇О);
+            $("#HWHID").val(obj[0].HItemID);
+            if (option.data.length > 0) {
+                for (var i = 0; i < option.data.length; i++) {
+                    if (option.data[i]["HWHID"] == 0 || option.data[i]["鍙戣揣浠撳簱"] == undefined) {
+                        option.data[i]["HWHID"] = obj[0].HItemID;
+                        option.data[i]["鍙戣揣浠撳簱"] = obj[0].浠撳簱鍚嶇О;
+                    }
+                }
+            }
+            layui.table.render(option);
+        }
+
+        function GetGyMaterial(obj)           //鐗╂枡鍚嶇О
+        {
+            HDataTemp = obj;
+        }
+
+        function GetUnitValue(obj)           //璁¢噺鍗曚綅
+        {
+            HDataTemp = obj[0];
+        }
+
+        function GetHWHSubValue(obj)  //瀛愯〃鍙戣揣浠撳簱
+        {
+            HDataTemp = obj[0];
+        }
+
+
+        //#region 澶勭悊灏忔暟鏄剧ず浣嶆暟锛坉ata锛氶渶瑕佸鐞嗙殑鏁版嵁锛沶um锛氭暟鎹殑绫诲瀷(濡�1:鏁伴噺锛�2:閲戦锛�3:鍗曚环)锛�
+        function dealDoubleToFixed(data, num) {
+            //鐢ㄤ簬璁剧疆灏忔暟浣嶆暟
+            var dotLength = 0;
+
+            if (num == 1) {                                    //褰撴暟鎹负鏁伴噺鏃讹紝鏈�澶氫繚鐣�6浣嶅皬鏁�
+                //璁剧疆鏈�澶氫繚鐣�6浣嶅皬鏁�
+                dotLength = 6;
+            } else if (num == 2) {                             //褰撴暟鎹负閲戦鏃讹紝鏈�澶氫繚鐣�2浣嶅皬鏁�
+                //璁剧疆鏈�澶氫繚鐣�2浣嶅皬鏁�
+                dotLength = 2;
+            } else if (num == 3) {                             //褰撴暟鎹负鍗曚环鏃讹紝鏈�澶氫繚鐣�4浣嶅皬鏁�
+                //璁剧疆鏈�澶氫繚鐣�4浣嶅皬鏁�
+                dotLength = 4;
+            }
+
+            //鍒ゆ柇鏄惁瀛樺湪灏忔暟鐐瑰強鍏剁储寮曚綅缃�
+            data = data + "";
+            var index = data.indexOf(".");
+
+            //澶勭悊鏁版嵁骞惰繑鍥�
+            if (index < 0) {
+                return data * 1;
+            } else {
+                //鑾峰彇灏忔暟浣嶆暟
+                var length = data.length - index - 1;
+                if (length <= dotLength) {
+                    return data * 1;
+                } else {
+                    data = data * 1;
+                    return data.toFixed(dotLength);
+                }
+            }
+        }
+                //#endregion
+    </script>
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_ProductReceiveMaterialBillList.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_ProductReceiveMaterialBillList.html"
new file mode 100644
index 0000000..eb62960
--- /dev/null
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_ProductReceiveMaterialBillList.html"
@@ -0,0 +1,1517 @@
+锘�<!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 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>
+    <script src="../../../layuiadmin/SetColumn.js"></script>
+    <style type="text/css">
+        input.layui-input.layui-unselect {
+            padding-right: 0;
+        }
+    </style>
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <div class="layui-colla-title layui-inline">
+                                    <div class="layui-inline">
+                                        <span>鏇村</span>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鏃ユ湡闂撮殧</label>
+                                    <div class="layui-input-block">
+                                        <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" 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 ForFilteringSchemes" 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 ForFilteringSchemes" name="HBillNo" id="HBillNo" style="width:190px;">
+                                    </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-inline" style="margin-left:5px;">
+                                    <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
+                                </div>
+                                <div class="layui-colla-content">
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">鐗╂枡浠g爜</label>
+                                            <div class="layui-input-block">
+                                                <input type="text" class="layui-input ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber" 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 ForFilteringSchemes" name="HMaterName" id="HMaterName" style="width:190px;">
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName" id="ColName" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+                                        </div>
+                                    </div>
+
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <div id="page"></div>
+                        <script type="text/html" id="toolbarDemo">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_startCheckBill" id="set_startCheckBill"><i class="layui-icon layui-icon-form"></i>鍙戣捣瀹℃壒</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_CheckFlowInfo" id="get_CheckFlowInfo"><i class="layui-icon layui-icon-form"></i>鏌ョ湅瀹℃壒杩涘害</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill_Flow" id="CheckBill_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇瀹℃牳</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck_Flow" id="AbandonCheck_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇鍙嶅鏍�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_RejectCheck_Flow" id="RejectCheck_Flow"><i class="layui-icon layui-icon-form"></i>椹冲洖</button>
+                                <button type="button" class="layui-btn layui-btn-sm"   lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>鍏抽棴</button>
+                                <button type="button" class="layui-btn layui-btn-sm"   lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>鍙嶅叧闂�</button>
+                                <button type="button" class="layui-btn layui-btn-sm"   lay-event="set_Drop" id="set_Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>
+                                <button type="button" class="layui-btn layui-btn-sm"   lay-event="set_DeDrop" id="set_DeDrop"><i class="layui-icon layui-icon-radio"></i>鍙嶄綔搴�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" id="btn-print" lay-event="btn-print"><i class="layui-icon layui-icon-form"></i>鎵撳嵃</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>闅愯棌鍒楄缃�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+                                <!--<button type="button" class="layui-btn layui-btn-sm"   lay-event="btn-BarCodeDetail" id="btn-BarCodeDetail"><i class="layui-icon layui-icon-logout"></i>鏉$爜鏄庣粏</button>-->
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>淇濆瓨鏂规</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
+
+                            </div>
+                        </script>
+                    </form>
+                </div>
+            </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','soulTable'], function () {
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element
+                , laypage = layui.laypage
+                , laydate = layui.laydate
+                , util = layui.util
+                , soulTable = layui.soulTable
+
+            var Organization = sessionStorage["Organization"];
+
+            //鏌ヨ鏉′欢
+            var sWhere = "";
+            var option = [];
+            var optionPage = [];
+            var HModName = "Kf_ProductReceiveMaterialBillList";
+            var HBillType = "1256";
+            var HBillSubType = "";
+            var ins;                        //鐢ㄤ簬瀵煎嚭excel
+
+            var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+            //#endregion
+
+            //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            var HModuleType = "1256";
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
+            //#endregion
+            
+
+            //#region 銆愯繃婊ゆ柟妗堛��
+            //杩囨护鏉′欢鐨刢lass绫�
+            var HClassTag = "ForFilteringSchemes";
+            //妯″潡鍚嶇О锛堜腑鏂囩増锛� 姣忎釜妯″潡椤甸潰閮介渶瑕佷慨鏀�
+            window.HModuleName = "鐢熶骇棰嗘枡鍗曞垪琛�1";
+            //鏄惁宸茬粡閫夋嫨浜嗚繃婊ゆ柟妗堬紙鍏ㄥ眬鍙橀噺锛�
+            window.HDefaultFilter = "";
+            //閫夋嫨鐨勮繃婊ゆ柟妗堝唴鐮侊紙鍏ㄥ眬鍙橀噺锛�
+            window.HInterID_Choose = 0;
+            //#endregion
+
+            //#region 鍔犺浇椤甸潰
+            set_ClearBill();
+            //#endregion
+
+            //#region 浜嬩欢鐩戝惉
+            //#region 閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                //娓呯┖杩囨护鏉′欢
+                set_ClearQuery();
+                optionPage.curr = 1;
+                get_FastQuery(table, option);
+
+            });
+            //#endregion
+
+            //#region 鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                optionPage.curr = 1;
+                get_FastQuery(table, option);
+
+            });
+            //#endregion
+
+            //#endregion 杈撳叆妗嗗洖杞︾洃鍚�
+            $('input[type="text"]').on('keydown', function (event) {
+                if (event.keyCode == 13) {
+                    $("#btnSearch").click();
+                }
+            });
+            //#endregion
+
+            //#region 澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus(obj.config.id);
+                switch (obj.event) {
+                    //鏂板
+                    case 'btn-Add':
+                        set_AddNew();
+                        break;
+                    //缂栬緫
+                    case 'btn-Edit':
+                        set_ShowBill();
+                        break;
+                    //鍒犻櫎
+                    case 'btn-Delete':
+                        set_DeleteBill();
+                        break;
+                    //鍒锋柊
+                    case 'get_Refresh': get_Refresh();
+                        break;
+                    //瀹℃牳
+                    case 'set_CheckBill': set_CheckBill(0);
+                        break;
+                    //鍙嶅鏍�
+                    case 'set_AbandonCheck': set_CheckBill(1);
+                        break;
+                    //鍙戣捣瀹℃壒
+                    case 'set_startCheckBill': set_startCheckBill();
+                        break;
+                    //鏌ョ湅瀹℃壒杩涘害
+                    case 'get_CheckFlowInfo': get_CheckFlowInfo();
+                        break;
+                    //澶氱骇瀹℃牳
+                    case 'set_CheckBill_Flow': set_CheckBill_Flow(0);
+                        break;
+                    //澶氱骇鍙嶅鏍�
+                    case 'set_AbandonCheck_Flow': set_CheckBill_Flow(1);
+                        break;
+                    //椹冲洖
+                    case 'set_RejectCheck_Flow': set_RejectCheck_Flow();
+                        break;
+                    //鍏抽棴
+                    case 'set_CloseBill': set_CloseBill(0);
+                        break;
+                    //鍙嶅叧闂�
+                    case 'set_CancelCloseBill': set_CloseBill(1);
+                        break;
+                    //浣滃簾鎸夐挳
+                    case 'set_Drop': set_DropBill(0);
+                        break;
+                    //鍙嶄綔搴熸寜閽�
+                    case 'set_DeDrop': set_DropBill(1);
+                        break;
+                    //鎵撳嵃
+                    case 'btn-print': get_PrintReport();
+                        break;
+                    //瀵煎嚭excel
+                    case 'get_export':
+                        get_Export();
+                        break;
+                    //閫�鍑烘寜閽�
+                    case 'get_Exit': Pub_Close(2);
+                        break;
+                    //闅愯棌鍒楄缃�
+                    case 'HideColumn':
+                        get_HideColumn(HModName, sessionStorage["HUserName"], option, optionPage, get_FastQuery);
+                        break;
+                    //鎸夐挳璁剧疆
+                    case 'set_HideButton':
+                        var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                        get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+                        break;
+                    //淇濆瓨鏂规
+                    case 'set_SaveScheme': set_SaveScheme();
+                        break;
+                    //璇诲彇鏂规
+                    case 'set_ReadScheme': set_ReadScheme();
+                        break;
+                };
+            });
+            //#endregion
+
+            //#region 鐐瑰嚮琛岄�変腑楂樹寒
+            table.on('row(mainTable)', function (obj) {
+                //閫変腑琛屾敼鍙橀鑹�
+                var flag = !obj.tr.find(':checkbox:first').prop('checked');
+                obj.tr.find(':checkbox').prop('checked', flag);
+                if (flag) {
+                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //璁剧疆澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+                } else {
+                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+                }
+                //mainTable 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+                layui.each(table.cache.mainTable, function (i, l) {
+                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+                        l.LAY_CHECKED = flag;
+                    }
+                });
+            })
+            //#endregion
+
+            //#region 鎺掑簭鍚庨�夋嫨
+            table.on('sort(mainTable)', function (obj) { //娉細sort 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
+                table.reload('mainTable', {
+                    initSort: obj //璁板綍鍒濆鎺掑簭锛屽鏋滀笉璁剧殑璇濓紝灏嗘棤娉曟爣璁拌〃澶寸殑鎺掑簭鐘舵�併�� layui 2.1.1 鏂板鍙傛暟
+                    , where: { //璇锋眰鍙傛暟锛堟敞鎰忥細杩欓噷闈㈢殑鍙傛暟鍙换鎰忓畾涔夛紝骞堕潪涓嬮潰鍥哄畾鐨勬牸寮忥級
+                        field: obj.field //鎺掑簭瀛楁   鍦ㄦ帴鍙d綔涓哄弬鏁板瓧娈�  field order
+                        , order: obj.type //鎺掑簭鏂瑰紡   鍦ㄦ帴鍙d綔涓哄弬鏁板瓧娈�  field order
+                    }
+                });
+                option.data = layui.table.cache["mainTable"];
+                table.render(option);
+                //鍒锋柊鎸夐挳鏄剧ず
+                var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+            });
+            //#endregion
+
+            //#region 鍙屽嚮杩涘叆缂栬緫
+            table.on('rowDouble(mainTable)', function (obj) {
+                //閫変腑楂樹寒 鍙屽嚮琛�
+                obj.tr.find(':checkbox').prop('checked', true);
+                obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //璁剧疆澶嶉�夋閫変腑鏍峰紡
+                $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+                //mainTable 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+                layui.each(table.cache.mainTable, function (i, l) {
+                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+                        l.LAY_CHECKED = true;
+                    }
+                });
+
+                var hID = obj.data["hmainid"];
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '缂栬緫閿�鍞嚭搴撳崟'
+                    , closeBtn: 1
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: '../../棰嗘枡鍙戣揣/鐢熶骇棰嗘枡/Kf_ProductReceiveMaterialBillEdit.html?OperationType=3&linterid=' + hID + '&HSouceBillType=0&closeType=1'
+                    , resize: false,
+                    end: function () {
+                        //鍒锋柊椤甸潰,
+                        $("#btnSearch").trigger('click');
+                    }
+                    , cancel: function () {
+
+                    }
+                })
+            });
+            //#endregion
+
+            //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉
+            form.on('select(HInitTimeCycle)', function (data) {
+                var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+                //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+                if (HInitTimeCycle != -1) {
+                    //$('#HBeginDate').prop('disabled', true);
+                    //$('#HEndDate').prop('disabled', true);
+
+                    $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+                    $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+                    //鎵ц鏌ヨ鏂规硶
+                    get_FastQuery();
+                } else {
+                    $('#HBeginDate').prop('disabled', false);
+                    $('#HEndDate').prop('disabled', false);
+                }
+            });
+
+            //#endregion
+
+            //#region 椤甸潰鍏跺畠鏂规硶
+            //#region 鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                //鍒濆鍖栨棩鏈熼棿闅斻�佸紑濮嬫棩鏈熴�佺粨鏉熸棩鏈�
+                setSelect_HInitTimeCycle();
+                //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+                var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+                if (HInitTimeCycle != -1) {
+                    //$('#HBeginDate').prop('disabled', true);
+                    //$('#HEndDate').prop('disabled', true);
+                } else {
+                    $('#HBeginDate').prop('disabled', false);
+                    $('#HEndDate').prop('disabled', false);
+                }
+
+                //鏍规嵁鏃ユ湡闂撮殧璁剧疆寮�濮嬫椂闂翠笌缁撴潫鏃堕棿
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鍒濆鍖栭〉澶у皬
+                DisPlay_HideColumn_GetPageSize(HModName, sessionStorage["HUserName"], optionPage);
+                //鏌ヨ
+                get_FastQuery(table, option);
+                //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规
+                get_DefaultModule();
+            }
+            //#endregion
+
+            //#region 鍒濆鍖栬〃鏍兼柟娉�
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , totalRow: true
+                    , height: 'full-50'
+                    //, page: true
+                    , cellMinWidth: 90
+                    , limit: 50
+                    //, limits: [50, 500, 5000, 20000]
+                    , done: function (res, curr, count) {
+                        soulTable.render(this);
+                    }
+                    , cols: [[]]
+                };
+
+                optionPage = {
+                    elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
+                    count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
+                    limit: 50,
+                    limits: [50, 500, 5000, 50000],
+                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+                    jump: function (obj, first) {
+                        //console.log(obj)
+                        //obj鍖呭惈浜嗗綋鍓嶅垎椤电殑鎵�鏈夊弬鏁帮紝姣斿锛�
+                        //console.log(obj.curr); //寰楀埌褰撳墠椤碉紝浠ヤ究鍚戞湇鍔$璇锋眰瀵瑰簲椤电殑鏁版嵁銆�
+                        //console.log(obj.limit); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁�
+
+                        //棣栨涓嶆墽琛�
+                        if (!first) {
+                            //do something
+                            console.log(obj)
+                            get_FastQuery(table, option);
+                        }
+                    }
+                }
+                laypage.render(optionPage);
+            }
+            //#endregion
+            //#endregion  鐩戝惉缃戞牸琛ㄤ綋浜嬩欢
+
+            table.on('tool(mainTable)', function (obj) {
+                var data = obj.data;
+
+                //鍗曟嵁鍙疯秴閾炬帴
+                if (obj.event == '鍗曟嵁鍙�') {                  //妫�鏌� obj.event 鏄惁绛変簬瀛楃涓� '鍗曟嵁鍙�'銆傚鏋滅瓑浜庯紝鍒欐墽琛宨f寰幆
+                    var linterid = data.hmainid.toString();    //澹版槑鍙橀噺linterid 涓� data.hmainid
+                    //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+                    layer.open({                //浣跨敤 layer鐨刼pen鎵撳紑寮瑰嚭 灞�
+                        type: 2                         //琛ㄧず寮瑰嚭灞傜殑鍐呭鏄竴涓� iframe
+                        , area: ['100%', '100%']
+                        , title: '缂栬緫' + HPageTitle  //璁剧疆寮瑰嚭灞傜殑鍚嶅瓧鍜屽彉閲�
+                        , closeBtn: 1//鏄剧ず鍏抽棴鎸夐挳
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: '../../棰嗘枡鍙戣揣/鐢熶骇棰嗘枡/Kf_ProductReceiveMaterialBillEdit.html?OperationType=3&linterid='+linterid+'&HSouceBillType=0&closeType=1'  //璁剧疆 iframe 鐨� URL锛孶RL 涓寘鍚簡鏌ヨ鍙傛暟锛屾潵璋冪敤鎵�闇�瑕佺殑鍊�
+
+                        , resize: false,  //鏄惁鍏佽鐢ㄦ埛璋冩暣寮瑰嚭澶у皬
+                        end: function () {  //褰撳叧闂椂璋冪敤
+                            get_FastQuery(table, option);
+                        }
+                        , cancel: function () {  //鐐瑰嚮鍙栨秷鏃朵娇鐢ㄥ洖璋�
+                            //$(".layui-btn").removeClass("layui-btn-disabled");
+                        }
+                    })
+                }
+            });
+             //#endregion
+
+            //#region 杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+            function get_Display(sWhere) {
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Kf_ProductReceiveMaterialBill/list',
+                    async:false,
+                    type: "GET",
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            var data = [];//鍒楀瓧娈垫暟鎹�
+                            var col = [];
+                            var totalArray = ["鏁伴噺"];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {//寰簭閬嶅巻鏁扮粍
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                            for (var i = 0; i < data.length; i++) {//閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
+                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                                if ($.inArray(data[i].name, titleData) > -1) {//妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑  //璁$畻鍒�
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else if ($.inArray(data[i].name, totalArray) > -1 || (data[i].Type == "Decimal" || data[i].Type == "Int32")) { //璁$畻鍒�
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+                                } else if (data[i].name == '鍗曟嵁鍙�') {
+                                    col.push({
+                                        field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '鍗曟嵁鍙�'
+                                        , event: '鍗曟嵁鍙�', templet: function (d) {
+                                            return '<span style="color: blue;">' + d.鍗曟嵁鍙� + '</span>'
+                                        }, style: 'cursor: pointer;' });
+                                } else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+                            //鍔ㄦ�佹樉绀哄垪鍚�
+                            option = {
+                                elem: '#mainTable'
+                                , toolbar: '#toolbarDemo'
+                                , cols: [col]
+                                , data: data1.data
+                                , height: 800
+                                , page: true
+                                , totalRow: true
+                                , cellMinWidth: 90
+                                , limit: 50
+                                , limits: [50, 500, 5000, 20000]
+                                , done: function (res, curr, count) {
+                                    soulTable.render(this);
+                                }
+                            }
+
+                            var result = data1.data;
+                            //var temp = "";
+                            //for (var i = 0; i < result.length; i++) {
+                            //    if (temp != result[i]["hmainid"]) {
+                            //        temp = result[i]["hmainid"];
+                            //    } else {
+                            //        result[i].鏃ユ湡 = null;
+                            //        result[i].鍗曟嵁鍙� = "";
+                            //        /*result[i].鐘舵�� = "";*/
+                            //        result[i].绾㈣摑鍗曟爣璁� = "";
+                            //        result[i].hsupid = "";
+                            //        result[i].瀹㈡埛 = "";
+                            //        result[i].HEmpID = "";
+                            //        result[i].涓氬姟鍛� = "";
+                            //        result[i].hmanagerid = "";
+                            //        result[i].涓荤 = "";
+                            //        result[i].hsecmanagerid = "";
+                            //        result[i].鍙戣揣浜� = "";
+                            //        result[i].hkeeperid = "";
+                            //        result[i].淇濈鍛� = "";
+                            //        result[i].HDeptID = "";
+                            //        result[i].閮ㄩ棬 = "";
+                            //        result[i].閿�鍞柟寮� = "";
+                            //    }
+                            //}
+
+
+
+
+                            option.data = result;
+                            ins = table.render(option);
+                            layer.close(ajaxLoad);
+                            //DisPlay_HideColumn();
+                            //鍒锋柊鎸夐挳鏄剧ず
+                            var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                            Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                                ColFilter();
+                            }
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 鏌ヨ(涓昏〃)-鍒嗛〉
+            function get_DisplayPage(sWhere) {
+                var wait = layer.load();//閬僵
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Kf_SellOutBill/GetSellOutBillList_byPage',
+                    type: "GET",
+                    async: false,
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": Organization, "page": optionPage.curr, "size": optionPage.limit },
+                    success: function (data1) {
+                        option.limit = optionPage.limit;//鏀瑰彉琛ㄦ牸椤靛ぇ灏�
+                        if (data1.code == 1) {
+                            optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟
+                            var data = [];//鍒楀瓧娈垫暟鎹�
+                            var col = [];
+                            var totalArray = ["浠舵暟"];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {//寰簭閬嶅巻鏁扮粍
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                            for (var i = 0; i < data.length; i++) {//閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
+                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                                if ($.inArray(data[i].name, titleData) > -1) {//妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑  //璁$畻鍒�
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else if ($.inArray(data[i].name, totalArray) > -1 || (data[i].Type == "Decimal" || data[i].Type == "Int32")) { //璁$畻鍒�
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+                                } else if (data[i].name == '鍗曟嵁鍙�') {
+                                    col.push({
+                                        field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '鍗曟嵁鍙�'
+                                        , event: '鍗曟嵁鍙�', templet: function (d) {
+                                            return '<span style="color: blue;">' + d.鍗曟嵁鍙� + '</span>'
+                                        }, style: 'cursor: pointer;'
+                                    });
+                                } else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+                            option.cols = [col];
+                            option.data = data1.data;
+
+                            var result = data1.data;
+                            var temp = "";
+                            for (var i = 0; i < result.length; i++) {
+                                if (temp != result[i]["hmainid"]) {
+                                    temp = result[i]["hmainid"];
+                                } else {
+                                    result[i].鏃ユ湡 = null;
+                                    result[i].鍗曟嵁鍙� = "";
+                                    /*result[i].鐘舵�� = "";*/
+                                    result[i].绾㈣摑鍗曟爣璁� = "";
+                                    result[i].hsupid = "";
+                                    result[i].瀹㈡埛 = "";
+                                    result[i].HEmpID = "";
+                                    result[i].涓氬姟鍛� = "";
+                                    result[i].hmanagerid = "";
+                                    result[i].涓荤 = "";
+                                    result[i].hsecmanagerid = "";
+                                    result[i].鍙戣揣浜� = "";
+                                    result[i].hkeeperid = "";
+                                    result[i].淇濈鍛� = "";
+                                    result[i].HDeptID = "";
+                                    result[i].閮ㄩ棬 = "";
+                                    result[i].閿�鍞柟寮� = "";
+                                }
+                            }
+
+                            option.data = result;
+
+                            laypage.render(optionPage);
+                            //鍒楄缃�
+                            DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option);
+                            //琛ㄦ牸鍔犺浇蹇呴渶鍦ㄦ寜閽樉绀哄墠
+                            ins = table.render(option);
+                            //鍒锋柊鎸夐挳鏄剧ず
+                            var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                            Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                                ColFilter();
+                            }
+
+                            layer.close(ajaxLoad);
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                            /*layer.alert(data1.code + data1.Message, { icon: 5 });*/
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+
+                layer.close(wait);
+            }
+            //#endregion
+
+            //#region 蹇�熻繃婊�
+            function get_FastQuery(table, option) {
+                var HBeginDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
+                var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
+                var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
+                var HMaterNumber = $("#HMaterNumber").val();
+                var HMaterName = $("#HMaterName").val();
+                var ColName = $("#ColName").val();//澶嶉�夋
+                var Comparator = $("#Comparator").val()
+                var ColContent = $("#ColContent").val();
+                var ColName1 = $("#ColName1").val();//澶嶉�夋
+                var Comparator1 = $("#Comparator1").val()
+                var ColContent1 = $("#ColContent1").val();
+                var ColName2 = $("#ColName2").val();//澶嶉�夋
+                var Comparator2 = $("#Comparator2").val()
+                var ColContent2 = $("#ColContent2").val();
+
+                if (ColName != 0 && Comparator != 0) {
+                    var com = "";
+                    switch (Comparator) {
+                        case "7":
+                            com = "like'%" + ColContent + "%'";
+                            break;
+                        case "8":
+                            com = "like'%" + ColContent + "'";
+                            break;
+                        case "9":
+                            com = "like'" + ColContent + "%'";
+                            break;
+                        case "10":
+                            com = "not like'%" + ColContent + "%'";
+                            break;
+                        default:
+                            com = "" + Comparator + "'" + ColContent + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName + " " + com;
+                }
+                if (ColName1 != 0 && Comparator1 != 0) {
+                    var com1 = "";
+                    switch (Comparator1) {
+                        case "7":
+                            com1 = "like'%" + ColContent1 + "%'";
+                            break;
+                        case "8":
+                            com1 = "like'%" + ColContent1 + "'";
+                            break;
+                        case "9":
+                            com1 = "like'" + ColContent1 + "%'";
+                            break;
+                        case "10":
+                            com1 = "not like'%" + ColContent1 + "%'";
+                            break;
+                        default:
+                            com1 = "" + Comparator1 + "'" + ColContent1 + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName1 + " " + com1;
+                }
+                if (ColName2 != 0 && Comparator2 != 0) {
+                    var com2 = "";
+                    switch (Comparator2) {
+                        case "7":
+                            com2 = "like'%" + ColContent2 + "%'";
+                            break;
+                        case "8":
+                            com2 = "like'%" + ColContent2 + "'";
+                            break;
+                        case "9":
+                            com2 = "like'" + ColContent2 + "%'";
+                            break;
+                        case "10":
+                            com2 = "not like'%" + ColContent2 + "%'";
+                            break;
+                        default:
+                            com2 = "" + Comparator2 + "'" + ColContent2 + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName2 + " " + com2;
+                }
+                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 (HMaterNumber) {
+                    sWhere += " and 鐗╂枡浠g爜 like '%" + HMaterNumber + "%'";
+                }
+                if (HMaterName) {
+                    sWhere += " and 鐗╂枡鍚嶇О like '%" + HMaterName + "%'";
+                }
+
+                sWhere += addSWhereByOpenType();
+
+                get_Display(sWhere);
+                //get_DisplayPage(sWhere);
+
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+            //#endregion
+
+            //#region 閲嶇疆杩囨护鏉′欢
+            function set_ClearQuery() {
+                var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //寮�濮嬫棩鏈�
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));  //缁撴潫鏃ユ湡
+                $("#HBillNo").val("");//
+                $("#HMaterNumber").val("");
+                $("#HMaterName").val("");
+                $("#ColContent").val("");
+                $("#ColName").val("0");
+                $("#Comparator").val("0");
+                $("#ColContent1").val("");
+                $("#ColName1").val("0");
+                $("#Comparator1").val("0");
+                $("#ColContent2").val("");
+                $("#ColName2").val("0");
+                $("#Comparator2").val("0");
+                form.render('select');
+                sWhere = "";
+            }
+            //#endregion
+
+            //#region 鏂板
+            function set_AddNew() {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '鏂板' + HPageTitle,
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['100%', '100%'],
+                    maxmin: true,
+                    content: '../../棰嗘枡鍙戣揣/鐢熶骇棰嗘枡/Kf_ProductReceiveMaterialBillEdit.html?OperationType=1&linterid=0&HSouceBillType=0&closeType=1&HBillSubType=' + HBillSubType,
+                    end: function () {
+                        //鍒锋柊椤甸潰,
+                        $("#btnSearch").trigger('click');
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 缂栬緫
+            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: '缂栬緫' + HPageTitle
+                        , closeBtn: 1
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: '../../棰嗘枡鍙戣揣/鐢熶骇棰嗘枡/Kf_ProductReceiveMaterialBillEdit.html?OperationType=3&linterid=' + hID + '&HSouceBillType=0&closeType=1&HBillSubType=' + HBillSubType
+                        , resize: false,
+                        end: function () {
+                            //鍒锋柊椤甸潰,
+                            $("#btnSearch").trigger('click');
+                        }
+                        , cancel: function () {
+                            //$(".layui-btn").removeClass("layui-btn-disabled");
+                        }
+                    })
+
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+            //#endregion
+
+            //#region 鍒犻櫎
+            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) {
+                        if (data[0].鐘舵��=="鍒涘缓") {
+                            $.ajax({
+                                type: "GET",
+                                url: GetWEBURL() + "Kf_ProductReceiveMaterialBill/delete", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                                data: { "HInterID": InterID, "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.msg("閿欒:" + result.code + result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                    }
+                                }, error: function () {
+                                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                }
+                            });
+                        } else {
+                            layer.msg('姝ゆ潯鏁版嵁涓嶆槸鍒涘缓鐘舵��,鏃犳硶鍒犻櫎锛�');
+                        }
+
+                    })
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+                }
+            }
+            //#endregion
+
+            //#region 鍒锋柊
+            function get_Refresh() {
+                $("#btnSearch").trigger('click');
+            }
+            //#endregion
+
+            //#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_ProductReceiveMaterialBill/AuditKf_ProductReceiveMaterialBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.code == 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.msg("閿欒:" + result.code + result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                        }, 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_ProductReceiveMaterialBill/CloseKf_ProductReceiveMaterialBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "IsAudit": num, "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('璇烽�夋嫨涓�琛屾暟鎹叧闂紒');
+                }
+            }
+            //#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_ProductReceiveMaterialBill/DeleteKf_ProductReceiveMaterialBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "IsAudit": num, "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('璇烽�夋嫨涓�琛屾暟鎹綔搴燂紒');
+                }
+            }
+            //#endregion
+
+            //#region 鎵撳嵃
+            function get_PrintReport() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    if (data[0].鐘舵�� != "宸插鏍�") {
+                        layer.alert("鎵撳嵃澶辫触!鍘熷洜锛氬崟鎹姸鎬佷笉涓�'宸插鏍�'鐘舵��!!", { icon: 5 });
+                        return;
+                    }
+
+                    layer.open({
+                        type: 2
+                        , area: ['50%', '50%']
+                        , title: '鎵撳嵃妯$増閫夋嫨'
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=Kf_ProductReceiveMaterialBillList', 'yes']
+                        , resize: false
+                    })
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+                }
+            }
+            //#endregion
+
+            //#region 瀵煎嚭Execel
+            function get_Export() {
+                var ModRightNameCheck = "Kf_ProductReceiveMaterialBillList_ExportExcel";
+
+                //閫昏緫瀹℃牳鏂规硶
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            table.exportFile(ins.config.id, option.data, "xls");
+                        } else {
+                            layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 鍒楁槑鏄剧ず涓嬫媺妗�
+            function ColFilter() {
+                var Organization = '<option  value="0" selected="selected" ></option>';
+                for (var i = 1; i < option.cols[0].length; i++) {
+                    if (option.cols[0][i].hide != true) {
+                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
+                    }
+                }
+                $("#ColName").empty();
+                $("#ColName").append(Organization);
+                $("#ColName1").empty();
+                $("#ColName1").append(Organization);
+                $("#ColName2").empty();
+                $("#ColName2").append(Organization);
+                form.render('select');
+            }
+            //#endregion
+
+            //#region 鑾峰彇鍙傛暟
+            function getUrlVars() {
+                var vars = [], hash;
+                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+                for (var i = 0; i < hashes.length; i++) {
+                    hash = hashes[i].split('=');
+                    vars.push(hash[0]);
+                    vars[hash[0]] = hash[1];
+                }
+                return vars;
+            }
+            //#endregion
+
+            //#region 鍒ゆ柇鏄洿鎺ユ墦寮�椤甸潰杩樻槸鍏跺畠椤甸潰閫氳繃閫夋嫨鎸夐挳鎵撳紑锛屽苟鏄剧ず鐩稿簲鏁版嵁
+            function addSWhereByOpenType() {
+                //鑾峰彇鍙傛暟
+                var params = getUrlVars();
+                var openType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鎵撳紑鏂瑰紡  1鐩存帴鎵撳紑 2鍏跺畠椤甸潰閫氳繃閫夋嫨鎸夐挳鎵撳紑
+                var HOrgID = params[params[1]];
+                HBillSubType = getParams("HBillSubType");
+
+                var addSWhere = "";
+                return addSWhere;
+            }
+            //灏唘rl鍙傛暟涓殑涓枃涔辩爜閲嶆柊杞崲鎴愪腑鏂�
+            function getParams(key) {
+                var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
+                //濡傛灉鍦板潃鏍忎腑鍑虹幇涓枃鍒欒繘琛岀紪鐮�
+                var r = encodeURI(window.location.search).substr(1).match(reg);
+                if (r != null) {
+                    //灏嗕腑鏂囩紪鐮佺殑瀛楃閲嶆柊鍙樻垚涓枃
+                    return decodeURI(unescape(r[2]));
+                }
+                return "";
+            };
+            //#endregion
+
+            //#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃
+            function setSelect_HInitTimeCycle() {
+                var valueList = [0, 1, 2, 3, 4, 5, 6, 29];
+                var titleList = ["浠婂ぉ", "杩戜袱澶�", "杩戜笁澶�", "杩戝洓澶�", "杩戜簲澶�", "杩戝叚澶�", "杩戜竷澶�", "杩�30澶�"];
+
+                var HInitTimeCycle_ArrayList = '<option  value="-1" selected="selected" >浠绘剰闂撮殧</option>';
+                for (var i = 0; i < valueList.length; i++) {
+                    HInitTimeCycle_ArrayList += '<option  style="color:blue;" value="' + valueList[i] + '">' + titleList[i] + '</option>';
+                }
+
+                $("#HInitTimeCycle").empty();
+                $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList);
+                form.render('select');
+
+                $("#HInitTimeCycle").val("29");
+            }
+            //#endregion
+
+            //#region 銆愯繃婊ゆ柟妗堛��
+
+            //鑾峰彇褰撳墠鐢ㄦ埛鐨勯粯璁よ繃婊ゆ柟妗�
+            function get_DefaultModule() {
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+                    type: "GET",
+                    async: false,
+                    data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            //褰撳墠鐢ㄦ埛璁剧疆鏈夐粯璁ょ殑杩囨护鏂规
+                            var data = data1.data;
+                            //褰撳墠閫夋嫨鐨勮繃婊ゆ柟妗�
+                            HInterID_Choose = data[0].hmainid;
+                            //杩囨护鏂规鍐呯爜
+                            HInterID = data[0].hmainid
+                            //杩囨护鏂规鍚嶇О
+                            HDefaultFilter = data[0].鏂规鍚嶇О
+                            //杩囨护鏂规鐨勫娉紙鏂规淇℃伅鎻忚堪锛�
+                            var HRemark = data[0].澶囨敞
+                            //鏄剧ず鍑哄綋鍓嶇殑榛樿杩囨护鏂规
+                            document.getElementById("HFilterScheme_Now").style.display = "block";
+                            document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + HRemark + ")" + '</span>';
+                            //鎶婅繃婊ゆ潯浠跺�煎洖鍐欏埌椤甸潰涓�
+                            for (let i = 0; i < data.length; i++) {
+                                $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+                                if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+                                    $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+                                }
+                            }
+                            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+                            //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+                            if (HInitTimeCycle != -1) {
+                                //$('#HBeginDate').prop('disabled', true);
+                                //$('#HEndDate').prop('disabled', true);
+
+                                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+                                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+
+                                //鎵ц鏌ヨ鏂规硶
+                                get_FastQuery();
+                            } else {
+                                $('#HBeginDate').prop('disabled', false);
+                                $('#HEndDate').prop('disabled', false);
+                            }
+                            //鎵ц鏌ヨ鏂规硶
+                            get_FastQuery(table, option);
+                            form.render("select");
+                        } else {
+                            //褰撳墠鐢ㄦ埛娌℃湁璁剧疆榛樿鐨勮繃婊ゆ柟妗�
+                            //闅愯棌鏄剧ず杩囨护鏂规鐨勬爣绛句俊鎭�
+                            document.getElementById("HFilterScheme_Now").style.display = "none";
+                            //鎵ц鏌ヨ鏂规硶
+                            //get_FastQuery(table, option);
+                            //form.render("select");
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+
+            //淇濆瓨鏂规
+            function set_SaveScheme() {
+                var index = layer.open()
+                //鍒ゆ柇鐢ㄦ埛鏄惁鐐瑰嚮浜嗗彸涓婅鐨勨�滃弶鍙封�濆叧闂脊绐楅〉闈�
+                var HIsClose_Manual = false;
+                //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+                var Filter = document.getElementsByClassName(HClassTag);
+
+                var HFilterIdList = "";//杩囨护鏉′欢
+                var HFilterIdLists = "";//鎷兼帴澶氫釜杩囨护鏉′欢
+                var HValue = "";//杩囨护鍊�
+                var HElement_type = "";//杩囨护鏍囩绫诲瀷
+
+                for (var i = 0; i < Filter.length; i++) {
+                    HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+                    HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+                    HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+                    HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+                }
+
+                //鍘婚櫎鏈熬閫楀彿
+                HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+                HValue = HValue.substring(0, HValue.length - 1);
+                HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+                //褰撳墠椤甸潰涓婃病鏈夐�夋嫨杩囨护鏂规锛岃繘鍏ユ柊澧炴柟娉�
+                if (HDefaultFilter == "") {
+                    layer.open({
+                        type: 2
+                        , area: ['40%', '80%']
+                        , title: '杩囨护鏂规'
+                        , shift: 0//寮瑰嚭鍔ㄧ敾
+                        , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+                        , cancel: function () {
+                            // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+                            HIsClose_Manual = true;
+                        }
+                        , end: function () {
+                            if (HIsClose_Manual != true) {
+                                get_FastQuery(table, option);
+                                //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+                                document.getElementById("HFilterScheme_Now").style.display = "block";
+                                document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+                            }
+                        }
+                    })
+                    layer.close(index)
+                } else {
+                    //褰撳墠椤甸潰宸叉湁杩囨护鏂规锛岀敤鎴烽�夋嫨 鏂板鎴栬�呯紪杈�
+                    layer.confirm('褰撳墠宸查�夋嫨杩囨护鏂规锛屾槸鍚︿慨鏀癸紵璇烽�夋嫨瀵瑰簲鎿嶄綔', {
+                        title: "鎿嶄綔鎻愮ず",
+                        icon: 0,
+                        btn: ['鏂板鏂规', '淇濆瓨淇敼褰撳墠鏂规', '鍙栨秷']
+                    }, function (index, layero) {
+                        //鏂板
+                        layer.open({
+                            type: 2
+                            , area: ['40%', '80%']
+                            , title: '杩囨护鏂规'
+                            , shift: 0//寮瑰嚭鍔ㄧ敾
+                            , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+                            , end: function () {
+                                get_FastQuery(table, option);
+                                //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+                                document.getElementById("HFilterScheme_Now").style.display = "block";
+                                document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+                            }
+                        })
+                        layer.close(index)
+                    }, function (index) {
+                        //缂栬緫
+                        var Filter_Edit = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+                        HFilterIdList = "";
+                        HFilterIdLists = "";
+                        HValue = "";
+                        HElement_type = "";
+                        for (var i = 0; i < Filter_Edit.length; i++) {
+                            HFilterIdList = Filter_Edit[i].id; //杩囨护鏉′欢ID
+                            HFilterIdLists += Filter_Edit[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+                            HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+                            HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+                        }
+                        //鍘婚櫎鏈熬閫楀彿
+                        HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+                        HValue = HValue.substring(0, HValue.length - 1);
+                        HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+                        var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3;
+
+                        //淇敼
+                        $.ajax({
+                            type: "POST",
+                            url: GetWEBURL() + "/Xt_FastICScheme/save", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            async: true,
+                            data: { "oMain": sMainSub },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                    layer.msg(data.Message, { time: 1 * 1000, icon: 1 });
+                                }
+                                else {
+
+                                }
+                                layer.closeAll("loading");
+                            },
+                            error: function (err) {
+
+
+                            }
+                        });
+                        layer.close(index)
+                    }, function (index) {
+                        //鍙栨秷
+                        layer.alert('鍙栨秷')
+                        layer.close(index)
+                    });
+                }
+
+            }
+
+            //璇诲彇鏂规
+            function set_ReadScheme() {
+                var HIsClose_Manual = false;
+                var Filter = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+
+                var HFilterIdList = "";
+                var HFilterIdLists = "";
+                var HValue = "";
+                var HElement_type = "";
+                for (var i = 0; i < Filter.length; i++) {
+                    HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+                    HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+                    HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+                    HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+                }
+                //鍘婚櫎鏈熬閫楀彿
+                HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+                HValue = HValue.substring(0, HValue.length - 1);
+                HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+                layer.open({
+                    type: 2
+                    , area: ['80%', '80%']
+                    , title: '杩囨护鏂规鍒楄〃'
+                    , shift: 0//寮瑰嚭鍔ㄧ敾
+                    , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName
+                    , cancel: function () {
+                        // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+                        HIsClose_Manual = true;
+                    }
+                    , end: function () {
+                        if (HIsClose_Manual != true) {
+                            get_FastQuery(table, option);
+                            form.render("select");
+                        }
+                    }
+                })
+            }
+
+            //#endregion
+
+            //#endregion
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+        //#region 銆愯繃婊ゆ柟妗堣繑鍥炴暟鎹��
+        function HFilterScheme(obj)  //杩斿洖杩囨护鏂规
+        {
+            var HInterID = obj[0].hmainid;
+            HInterID_Choose = obj[0].hmainid;
+            $.ajax({
+                url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+                type: "GET",
+                data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": HInterID, "Type": "Select" },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        var data = data1.data;
+                        //璧嬪�艰繃婊ゆ柟妗堝悕绉�
+                        HDefaultFilter = data[0].鏂规鍚嶇О
+                        var HRemark = data[0].澶囨敞
+                        //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+                        document.getElementById("HFilterScheme_Now").style.display = "block";
+                        document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + HRemark + ")" + '</span>';
+                        HInterID = data[0].hmainid
+                        //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢
+                        for (let i = 0; i < data.length; i++) {
+                            $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+                            if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+                                $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+                            }
+                        }
+
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+        //#endregion
+    </script>
+
+</body>
+</html>
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillList.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillList.html"
index 67d08bd..e920c59 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillList.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillList.html"
@@ -1400,6 +1400,9 @@
                             dataCol = data1.data[0].HGridString.split(',');
 
                             for (var i = 0; i < option.cols[0].length - 1; i++) {
+                                if (i >= dataCol.length) {
+                                    continue;
+                                }
                                 var dataCols = dataCol[i].split('|');
                                 //闅愯棌鍒�
                                 if (dataCols[1] == 1) {
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
index 774ee20..5f0b40b 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
@@ -51,7 +51,7 @@
                         <div class="layui-btn-group">
                             <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button>
                             <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CheckBill">瀹℃牳</button>
-                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_SelectMainBill">閫夋暣鍗�</button>
+                            <!--<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_SelectMainBill">閫夋暣鍗�</button>-->
                             <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_PrintReport" disabled>鎵撳嵃</button>
                             <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
                         </div>
@@ -60,7 +60,7 @@
                         <h1 style="text-align: center; padding: 10px 0;"><b>閲囪喘鍏ュ簱鍗�</b></h1>
                         <ul class="layui-tab-title" lay-filter="tab-all">
                             <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
-                            <li lay-id="2" style="padding:1px;">鍏朵粬淇℃伅</li>
+                            <li lay-id="2" style="padding:1px;display:none;">鍏朵粬淇℃伅</li>
                             <li lay-id="3" style="padding:1px;">鍒跺崟淇℃伅</li>
                         </ul>
                         <div class="layui-tab-content">
@@ -71,7 +71,7 @@
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">鍗曟嵁鍙�<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;">
+                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" name="HInterID" id="HInterID" value="0">
                                                 <input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID" value=0>
                                                 <input type="hidden" name="HBillSubType" id="HBillSubType" value="">
@@ -80,25 +80,55 @@
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">鏃ユ湡<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
-                                                <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+                                                <input type="date" class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">涓氬姟鍛�<label style="color:red"> * </label></label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;" readonly>
+                                                <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;display:none;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">閮ㄩ棬<label style="color:red"> * </label></label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;" readonly>
+                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value=0 style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;display:none;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">渚涘簲鍟�<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;" readonly>
                                                 <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value=0 style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;display:none;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
                                             </div>
                                         </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">鍙戠エ缂栧彿</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HInvoiceBillNo" id="HInvoiceBillNo" autocomplete="off">
+                                            </div>
+                                        </div>
+
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">浠撳簱<label style="color:red"> * </label></label>
+                                            <label class="layui-form-label">浠撳簱</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;" readonly>
                                                 <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value=0 style="float:left;width:150px;">
                                                 <button type="button" lay-submit="" class="layui-btn" lay-filter="HWHList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
@@ -106,74 +136,32 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">楠屾敹鍛�</label>
+                                            <label class="layui-form-label">楠屾敹鍛�<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="text" name="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;" readonly>
                                                 <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value="0" style="float:left;width:150px;">
                                                 <button type="button" lay-submit="" class="layui-btn" lay-filter="HSecManagerList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">淇濈鍛�</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="layui-row">
-
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">涓氬姟鍛�</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">婧愬崟绫诲瀷</label>
-                                            <div class="layui-input-inline">
-                                                <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType">
-                                                    <!--鍔ㄦ�佹覆鏌撴簮鍗曠被鍨�-->
-                                                </select>
-                                            </div>
-                                        </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">閫夊崟鍙�</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HSourceBillNo" id="HSourceBillNo" class="layui-input" value="" style="float:left;width:150px;">
-
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                            <!--<label class="layui-form-label">閫夊崟鍙�</label>
+                                        <!--<label class="layui-form-label">閫夊崟鍙�</label>
         <div class="layui-input-inline">
             <input class="layui-input" name="Box2" id="Box2" autocomplete="off">
         </div>-->
-                                        </div>
                                     </div>
-                                    <div class="layui-row">
-
-                                        <div class="layui-col-xs4 layui-inline">
+                                    <div class="layui-row" style="display:none;">
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
                                             <label class="layui-form-label">璐熻矗浜�</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;" readonly>
                                                 <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value=0 style="float:left;width:150px;">
                                                 <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs4 layui-inline">
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
                                             <label class="layui-form-label">椤圭洰缂栫爜</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HProjectNumber" id="HProjectNumber" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
@@ -183,44 +171,68 @@
                                                 </button>
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs4 layui-inline">
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
                                             <label class="layui-form-label">椤圭洰鍚嶇О</label>
                                             <div class="layui-input-inline">
                                                 <input class="layui-input" name="HProjectName" id="HProjectName" style="background-color:#efefef4d;" readonly autocomplete="off">
                                             </div>
                                         </div>
-
                                     </div>
-                                    <div class="layui-row">
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">閮ㄩ棬<label style="color:red"> * </label></label>
+                                    <div class="layui-row" style="display:none;">
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
+                                            <label class="layui-form-label">淇濈鍛�</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value=0 style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
+                                                <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;" readonly>
+                                                <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
                                             </div>
                                         </div>
-                                        
-                                    </div>
-                                    <!--<div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
+                                            <label class="layui-form-label">婧愬崟绫诲瀷</label>
+                                            <div class="layui-input-inline">
+                                                <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType">
+                                                    <!--鍔ㄦ�佹覆鏌撴簮鍗曠被鍨�-->
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs4 layui-inline" style="display:none;">
+                                            <label class="layui-form-label">閫夊崟鍙�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HSourceBillNo" id="HSourceBillNo" class="layui-input" value="" style="float:left;width:150px;" readonly>
 
-                <div class="layui-col-xs7 layui-inline">
-                    <label class="layui-form-label">鎽樿</label>
-                    <div class="layui-input-block">
-                        <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off">
-                    </div>
-                </div>
-            </div>-->
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <!--<div class="layui-row">
+                                            <div class="layui-col-xs7 layui-inline">
+                                                <label class="layui-form-label">鎽樿</label>
+                                                <div class="layui-input-block">
+                                                    <input class="layui-input" name="hexplanation" id="hexplanation" autocomplete="off">
+                                                </div>
+                                            </div>
+                                        </div>-->
+                                    </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs7 layui-inline">
                                             <label class="layui-form-label">澶囨敞</label>
                                             <div class="layui-input-block">
-                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off">
+                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style="width:800px;">
                                             </div>
                                         </div>
-                                        
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">缁勭粐<label style="color:red"> * </label></label>
+                                            <div class="layui-input-block" style="margin-left: 120px; width: 800px;">
+                                                <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
+                                                    <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+                                                </select>
+                                            </div>
+                                        </div>
                                     </div>
                                 </div>
                             </div>
@@ -235,21 +247,9 @@
                                                 <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off">
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs4 layui-inline" style="margin-left: 135px;">
-                                            <label class="layui-form-label">鍙戠エ缂栧彿</label>
-                                            <div class="layui-input-inline">
-                                                <input class="layui-input" name="HInvoiceBillNo" id="HInvoiceBillNo" autocomplete="off">
-                                            </div>
-                                        </div>
+                                        
                                     </div>
-                                    <div class="layui-inline">
-                                        <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
-                                        <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
-                                            <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
-                                                <!--鍔ㄦ�佹覆鏌撶粍缁�-->
-                                            </select>
-                                        </div>
-                                    </div>
+                                    
                                 </div>
                             </div>
 
@@ -332,11 +332,11 @@
                     <table class="layui-hide" 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-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
-                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>-->
+                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>-->
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Inventory" id="get_Inventory"><i class="layui-icon layui-icon-form"></i>搴撳瓨鏌ヨ</button>
-                            <button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>鍑哄叆搴撹褰曟煡璇�</button>
+                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>鍑哄叆搴撹褰曟煡璇�</button>-->
                         </div>
                     </script>
                     <script type="text/html" id="xuhao">
@@ -462,11 +462,11 @@
             //#endregion
 
             var rowdata = [{
-                "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQtyMust": "0", "HQty": "", "HRemark": "",
+                "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQtyMust": "0", "HQty": "0", "HRemark": "",
                 "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
                 "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                 "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
-                "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
+                "HSourceBillNo": "", "HSourceBillType": "", "HSourceInterID": 0, "HSourceEntryID": 0,
                 "HTaxRate": 0, "HTaxPrice": 0, "HlineTotal": 0
             }];
           
@@ -480,7 +480,7 @@
                     "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
                     "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                     "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
-                    "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
+                    "HSourceBillNo": "", "HSourceBillType": "", "HSourceInterID": 0, "HSourceEntryID": 0,
                     "HTaxRate": 0, "HTaxPrice": 0, "HlineTotal": 0
                 };
                 switch (obj.event) {
@@ -1126,17 +1126,17 @@
                         , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100, style: 'background-color:#efefef4d;'}
                         , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true }
                         , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, edit: 'text', event: "HUnitID" }//f7
-                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true}
+                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, edit: 'text', totalRow: true}
                         , { field: 'HQty', title: '瀹炴敹鏁伴噺', width: 150, edit: 'text', totalRow: true}
-                        , { field: 'HPrice', title: '鍗曚环', width: 100, edit: 'text' }
-                        , { field: 'HMoney', title: '閲戦', width: 100, edit: 'text', totalRow: true }
-                        , { field: 'HOrderPrice', title: '閲囪喘閲戦', width: 100, edit: 'text', totalRow: true}
+                        , { field: 'HPrice', title: '鍗曚环', width: 100 }
+                        , { field: 'HMoney', title: '閲戦', width: 100, totalRow: true }
+                        , { field: 'HOrderPrice', title: '閲囪喘閲戦', width: 100, totalRow: true}
                         , { field: 'HWHID', title: 'HWHID', width: 100, hide: true }
                         , { field: '鏀舵枡浠撳簱', title: '鏀舵枡浠撳簱', width: 100, edit: 'text', event: "HWHID" }//f7
                         , { field: 'HSPID', title: 'HSPID', width: 100, hide: true }
                         , { field: '浠撲綅鍚嶇О', title: '浠撲綅鍚嶇О', width: 100, edit: 'text', event: "HSPID" }//f7
-                        , { field: 'HTaxRate', title: '绋庣巼', width: 100, edit: 'text' }
-                        , { field: 'HTaxPrice', title: '鍚◣鍗曚环', width: 100, edit: 'text' }
+                        , { field: 'HTaxRate', title: '绋庣巼', width: 100}
+                        , { field: 'HTaxPrice', title: '鍚◣鍗曚环', width: 100}
                         , { field: 'HlineTotal', title: '鍚◣閲戦', width: 100, style: 'background-color:#efefef4d;' }
                         , { field: 'HBatchNo', title: '鎵规', width: 150, edit: 'text' }
                         , { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
@@ -1199,6 +1199,8 @@
                                 , "HMaker": data.鍒跺崟浜�
                                 , "HChecker": data.瀹℃牳浜�
                                 , "HCloseMan": data.鍏抽棴浜�
+                                , "HUpDater": data.淇敼浜�
+                                , "HDeleteMan": data.浣滃簾浜�
                                 , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Pub_Format(data.鍒跺崟鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
                                 , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Pub_Format(data.瀹℃牳鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
                                 , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Pub_Format(data.鍏抽棴鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
@@ -3058,6 +3060,16 @@
                 var ref1 = /^-?\d+(\.\d+)?$/;          //鍒ゆ柇瀛楃涓叉槸鍚︿负鏁板瓧(鍖呭惈鏁存暟銆佹诞鐐规暟)锛屾鍒欒〃杈惧紡
                 var temp = "";
 
+                if ($("#HBillNo").val() == "") {
+                    layer.msg("鍗曟嵁鍙锋湭璁剧疆锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
+
+                if ($("#HDate").val() == "") {
+                    layer.msg("鏃ユ湡鏈缃紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
+
                 //if ($("#HWHID").val() == 0) {
                 //    layer.msg("璇烽�夋嫨浠撳簱锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 //    return;
@@ -3066,23 +3078,23 @@
                 //    layer.msg("璇烽�夋嫨璐熻矗浜猴紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 //    return;
                 //}
-                //if ($("#HEmpID").val() == 0) {
-                //    layer.msg("璇烽�夋嫨涓氬姟鍛橈紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                //    return;
-                //}
+                if ($("#HEmpID").val() == 0 || $("#HEmpID").val() == "" ) {
+                    layer.msg("璇烽�夋嫨涓氬姟鍛橈紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
                 //if ($("#HKeeperID").val() == 0) {
                 //    layer.msg("璇烽�夋嫨淇濈鍛橈紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 //    return;
                 //}
-                //if ($("#HSecManagerID").val() == 0) {
-                //    layer.msg("璇烽�夋嫨楠屾敹鍛橈紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                //    return;
-                //}
-                //if ($("#HDeptID").val() == 0) {
-                //    layer.msg("璇烽�夋嫨閮ㄩ棬锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                //    return;
-                //}
-                if ($("#HSupID").val() == 0) {
+                if ($("#HSecManagerID").val() == 0 || $("#HSecManagerID").val()=="") {
+                    layer.msg("璇烽�夋嫨楠屾敹鍛橈紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
+                if ($("#HDeptID").val() == 0 || $("#HDeptID").val() == "") {
+                    layer.msg("璇烽�夋嫨閮ㄩ棬锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
+                if ($("#HSupID").val() == 0 || $("#HSupID").val()=="") {
                     layer.msg("璇烽�夋嫨渚涘簲鍟嗭紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return;
                 }
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBillList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBillList.html"
index d38117e..7de0240 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBillList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBillList.html"
@@ -209,7 +209,7 @@
                         <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-Add" id="Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>-->
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
index 6feba38..c24734b 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
@@ -66,7 +66,7 @@
                                 <div class="layui-form-item" style="padding-top: 10px;">
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                            <label class="layui-form-label">鍗曟嵁鍙�<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" name="HInterID" id="HInterID" value="0">
@@ -74,43 +74,53 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">鏃ユ湡</label>
+                                            <label class="layui-form-label">鏃ユ湡<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
-                                                <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" style="background-color:#efefef4d;">
+                                                <input type="date" class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">鍐呴儴鍗曟嵁鍙�</label>
                                             <div class="layui-input-inline">
-                                                <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off">
+                                                <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete=" off" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
-
-
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">渚涘簲鍟�</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value=0 style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">涓氬姟鍛�</label>
+                                            <label class="layui-form-label">涓氬姟鍛�<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;">
                                                 <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value=0 style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;display:none;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">浠撳簱</label>
+                                            <label class="layui-form-label">閮ㄩ棬<label style="color:red"> * </label></label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value=0 style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;display:none;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">渚涘簲鍟�<label style="color:red"> * </label></label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value=0 style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;display:none;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">浠撳簱<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;">
                                                 <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value=0 style="float:left;width:150px;">
@@ -119,11 +129,8 @@
                                                 </button>
                                             </div>
                                         </div>
-
-                                    </div>
-                                    <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">楠屾敹鍛�</label>
+                                            <label class="layui-form-label">閫�鏂欏憳<label style="color:red"> * </label></label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;">
                                                 <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value=0 style="float:left;width:150px;">
@@ -132,46 +139,20 @@
                                                 </button>
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">淇濈鍛�</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value=0 style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                        <div class="layui-col-xs4 layui-inline">
-                                            <label class="layui-form-label">閮ㄩ棬</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value=0 style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
                                     </div>
-                                    <div class="layui-col-xs4 layui-inline">
-                                        <label class="layui-form-label">婧愬崟绫诲瀷</label>
+                                </div>
+                                <div class="layui-row" style="display:none;">
+                                    <div class="layui-col-xs4 layui-inline" style="display:none;">
+                                        <label class="layui-form-label">淇濈鍛�</label>
                                         <div class="layui-input-inline">
-                                            <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType">
-                                                <!--鍔ㄦ�佹覆鏌撴簮鍗曠被鍨�-->
-                                            </select>
-                                        </div>
-                                    </div>
-                                    <div class="layui-col-xs4 layui-inline">
-                                        <label class="layui-form-label">閫夊崟鍙�</label>
-                                        <div class="layui-input-inline">
-                                            <input type="text" name="" id="" class="layui-input" value="" style="float:left;width:150px;">
-
-                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;">
+                                            <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;">
+                                            <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value=0 style="float:left;width:150px;">
+                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;">
                                                 <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                             </button>
                                         </div>
                                     </div>
-                                    <div class="layui-col-xs4 layui-inline">
+                                    <div class="layui-col-xs4 layui-inline" style="display:none;">
                                         <label class="layui-form-label">璐熻矗浜�</label>
                                         <div class="layui-input-inline">
                                             <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;">
@@ -181,11 +162,24 @@
                                             </button>
                                         </div>
                                     </div>
+                                    <div class="layui-col-xs4 layui-inline" style="display:none;">
+                                        <label class="layui-form-label">婧愬崟绫诲瀷</label>
+                                        <div class="layui-input-inline">
+                                            <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType">
+                                                <!--鍔ㄦ�佹覆鏌撴簮鍗曠被鍨�-->
+                                            </select>
+                                        </div>
+                                    </div>
+                                    <div class="layui-col-xs4 layui-inline" style="display:none;">
+                                        <label class="layui-form-label">閫夊崟鍙�</label>
+                                        <div class="layui-input-inline">
+                                            <input type="text" name="" id="" class="layui-input" value="" style="float:left;width:150px;">
 
-
-                                </div>
-                                <div class="layui-row">
-
+                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;">
+                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                            </button>
+                                        </div>
+                                    </div>
                                     <div class="layui-col-xs7 layui-inline">
                                         <label class="layui-form-label">鎽樿</label>
                                         <div class="layui-input-block">
@@ -288,17 +282,17 @@
                         </div>
 
 
-                        
+
                     </div>
 
                     <table class="layui-hide" 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-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
-                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+                            <!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>-->
+                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>-->
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Inventory" id="get_Inventory"><i class="layui-icon layui-icon-form"></i>搴撳瓨鏌ヨ</button>
-                            <button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>鍑哄叆搴撹褰曟煡璇�</button>
+                            <!--  <button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>鍑哄叆搴撹褰曟煡璇�</button>-->
                         </div>
                     </script>
                     <script type="text/html" id="xuhao">
@@ -343,7 +337,7 @@
             //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
             get_LoginIs();
             //鑾峰彇缁勭粐
-            Organ() ;
+            Organ();
 
             //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
             var HModuleType = "1239";
@@ -354,8 +348,8 @@
 
             //鑾峰彇婧愬崟绫诲瀷
             HSourceBillType();
-           
-         //鑾峰彇椤甸潰璺宠浆鍙傛暟
+
+            //鑾峰彇椤甸潰璺宠浆鍙傛暟
             var params = get_UrlVars();
             if (typeof (params[params[0]]) == "undefined") {
                 OperationType = 1;//鎿嶄綔绫诲瀷
@@ -365,17 +359,17 @@
                 var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
             }
 
-           // 鍒濆鍖栫晫
+            // 鍒濆鍖栫晫
             set_InitGrid();
 
-        //#region 鑾峰彇鏈�澶у崟鎹彿
+            //#region 鑾峰彇鏈�澶у崟鎹彿
             function get_MAXNum() {
                 $("#HInterID").val("0");
                 $("#HBillNo").val("");
                 $.ajax({
                     url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
                     type: "GET",
-                    data: { "HBillType": '1103' },
+                    data: { "HBillType": '1239' },
                     success: function (d) {
                         $("#HBillNo").val(d.data[0].HBillNo);
                         $("#HInterID").val(d.data[0].HInterID);
@@ -384,9 +378,9 @@
             }
             //#endregion
 
-         //#region 鍒ゆ柇鎿嶄綔绫诲瀷骞跺垵濮嬪寲鐣岄潰
+            //#region 鍒ゆ柇鎿嶄綔绫诲瀷骞跺垵濮嬪寲鐣岄潰
             if (OperationType == 1) {                                                   //鏃犳簮鍗曟柊澧�
-               /* $("#HItemID").val(0);*/
+                /* $("#HItemID").val(0);*/
 
                 //鐢熸垚鍗曟嵁鍙峰拰鍐呯爜
                 get_MAXNum();
@@ -414,31 +408,31 @@
 
 
 
-            //鍒ゆ柇鏄惁鏂板
-            if (linterid == null || linterid == 0) {
-                //鑾峰彇鏈�澶у崟鎹彿 new
-                $("#HMaker").val(sessionStorage["HUserName"]);
-                $("#HInterID").val("0");
-                $("#HBillNo").val("");
-                $.ajax({
-                    url: GetWEBURL() + "/Web/GetMAXNum",
-                    type: "GET",
-                    data: { "HBillType": '1239' },
-                    success: function (d) {
-                        //console.log(d.data);
-                        $("#HBillNo").val(d.data[0].HBillNo);
-                        $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
-                        $("#HInterID").val(d.data[0].HInterID);
-                        $("#HSSDate").val(Format(new Date(), "yyyy-MM-dd")); //缁撶畻鏂瑰紡
-                    }
-                });
-            } else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
-                $("#HInterID").val(linterid);
-                RoadBillMain(linterid);
-            }
+            ////鍒ゆ柇鏄惁鏂板
+            //if (linterid == null || linterid == 0) {
+            //    //鑾峰彇鏈�澶у崟鎹彿 new
+            //    $("#HMaker").val(sessionStorage["HUserName"]);
+            //    $("#HInterID").val("0");
+            //    $("#HBillNo").val("");
+            //    $.ajax({
+            //        url: GetWEBURL() + "/Web/GetMAXNum",
+            //        type: "GET",
+            //        data: { "HBillType": '1239' },
+            //        success: function (d) {
+            //            //console.log(d.data);
+            //            $("#HBillNo").val(d.data[0].HBillNo);
+            //            $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+            //            $("#HInterID").val(d.data[0].HInterID);
+            //            $("#HSSDate").val(Format(new Date(), "yyyy-MM-dd")); //缁撶畻鏂瑰紡
+            //        }
+            //    });
+            //} else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+            //    $("#HInterID").val(linterid);
+            //    RoadBillMain(linterid);
+            //}
             //#endregion
             //#endregion
-          //鑾峰彇缁勭粐
+            //鑾峰彇缁勭粐
             function Organ() {
                 //鑾峰彇鐧诲綍椤电粍缁囧垪
                 $.ajax({
@@ -460,8 +454,8 @@
                 })
             }
             var rowdata = [{
-                "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "",  "HQty": "", "HRemark": "",
-                "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
+                "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
+                "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鍙戞枡浠撳簱": "",
                 "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                 "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
                 "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
@@ -477,7 +471,7 @@
                 //鏂板琛岃〃鏍兼暟鎹�
                 var NewRow = {
                     "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
-                    "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
+                    "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鍙戞枡浠撳簱": "",
                     "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                     "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
                     "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
@@ -622,6 +616,15 @@
 
                             layer.msg("鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
                             return;
+                        } else if (value * 1 > obj.data.HQtyMust * 1) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HQty: oldText
+                            });
+                            table.render(option);
+
+                            layer.msg("瀹為��鏁伴噺涓嶈兘澶т簬搴旈��鏁伴噺!");
+                            return;
                         }
 
 
@@ -640,7 +643,7 @@
                             , HPrice: HPrice
                             , HMoney: HMoney
                         });
-                         table.render(option);
+                        table.render(option);
                         break;
                     case "HPrice":                                         //鍗曚环
                         //鏁版嵁鏍煎紡鏍¢獙
@@ -680,7 +683,7 @@
                             obj.update({
                                 HMoney: oldText
                             });
-                             table.render(option);
+                            table.render(option);
 
                             layer.msg("閲戦璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
                             return;
@@ -702,7 +705,7 @@
                         });
                         table.render(option);
                         break;
-                        
+
                     default:
                 }
             });
@@ -772,7 +775,7 @@
             //#endregion
 
 
-            
+
             //鏃ユ湡鏍煎紡鍖�
             function formatDate(date) {
                 var d = new Date(date),
@@ -799,24 +802,24 @@
                     , totalRow: true
                     , cols: [[ //瀛愯〃
                         { type: 'checkbox', totalRowText: '鍚堣琛�' }
-                        , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100}
+                        , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100 }
                         , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
                         , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }//婧愬崟绫诲瀷
                         , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
                         , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }//婧愬崟瀛愬唴鐮�
                         , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
-                        , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
+                        , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, event: "HMaterID" }//f7
                         , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
-                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100, style: 'background-color:#efefef4d;'}
+                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100, style: 'background-color:#efefef4d;' }
                         , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true }
-                        , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, edit: 'text', event: "HUnitID" }//f7
-                        , { field: 'HQty', title: '瀹炴敹鏁伴噺', width: 150, edit: 'text', totalRow: true}
-                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, edit: 'text', totalRow: true}
-                        , { field: 'HPrice', title: '鍗曚环', width: 100, edit: 'text' }
-                        , { field: 'HMoney', title: '閲戦', width: 100, edit: 'text', totalRow: true }
-                        , { field: 'HOrderPrice', title: '閲囪喘閲戦', width: 100, edit: 'text', totalRow: true}
+                        , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, event: "HUnitID" }//f7
+                        , { field: 'HQty', title: '瀹為��鏁伴噺', width: 150, edit: 'text', totalRow: true }
+                        , { field: 'HQtyMust', title: '搴旈��鏁伴噺', width: 150, totalRow: true }
+                        , { field: 'HPrice', title: '鍗曚环', width: 100 }
+                        , { field: 'HMoney', title: '閲戦', width: 100, totalRow: true }
+                        , { field: 'HOrderPrice', title: '閲囪喘閲戦', width: 100, totalRow: true }
                         , { field: 'HWHID ', title: 'HWHID ', width: 100, hide: true }
-                        , { field: '鏀舵枡浠撳簱', title: '鏀舵枡浠撳簱', width: 100, edit: 'text', event: "HWHID" }//f7
+                        , { field: '鍙戞枡浠撳簱', title: '鍙戞枡浠撳簱', width: 100, edit: 'text', event: "HWHID" }//f7
                         , { field: 'HSPID', title: 'HSPID', width: 100, hide: true }
                         , { field: '浠撲綅鍚嶇О', title: '浠撲綅鍚嶇О', width: 100, edit: 'text', event: "HSPID" }//f7
                         , { field: 'HBatchNo', title: '鎵规', width: 150, edit: 'text' }
@@ -870,6 +873,8 @@
                                 , "HMaker": data.鍒跺崟浜�
                                 , "HChecker": data.瀹℃牳浜�
                                 , "HCloseMan": data.鍏抽棴浜�
+                                , "HUpDater": data.淇敼浜�
+                                , "HDeleteDate": data.浣滃簾浜�
                                 , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Pub_Format(data.鍒跺崟鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
                                 , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Pub_Format(data.瀹℃牳鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
                                 , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Pub_Format(data.鍏抽棴鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
@@ -884,7 +889,7 @@
                                 rowdata.push(
                                     {
                                         "HMaterID": subdata[i].HMaterID, "鐗╂枡浠g爜": subdata[i].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": subdata[i].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": subdata[i].瑙勬牸鍨嬪彿, "HUnitID": subdata[i].HUnitID, "璁¢噺鍗曚綅": subdata[i].璁¢噺鍗曚綅,
-                                        "HQty": subdata[i].瀹炴敹鏁伴噺, "HQtyMust": subdata[i].搴旀敹鏁伴噺,"HRemark": subdata[i].琛ㄤ綋澶囨敞, "HPrice": subdata[i].鍗曚环, "HMoney": subdata[i].閲戦, "HOrderPrice": subdata[i].閲囪喘閲戦, "HWHID": subdata[i].HWHID, "鏀舵枡浠撳簱": subdata[i].鏀舵枡浠撳簱, "HSPID": subdata[i].HSPID, "浠撲綅鍚嶇О": subdata[i].浠撲綅鍚嶇О,
+                                        "HQty": subdata[i].瀹炴敹鏁伴噺, "HQtyMust": subdata[i].搴旀敹鏁伴噺, "HRemark": subdata[i].琛ㄤ綋澶囨敞, "HPrice": subdata[i].鍗曚环, "HMoney": subdata[i].閲戦, "HOrderPrice": subdata[i].閲囪喘閲戦, "HWHID": subdata[i].HWHID, "鍙戞枡浠撳簱": subdata[i].鏀舵枡浠撳簱, "HSPID": subdata[i].HSPID, "浠撲綅鍚嶇О": subdata[i].浠撲綅鍚嶇О,
                                         "HBatchNo": subdata[i].鎵规,
                                         "HSourceBillNo": subdata[i].婧愬崟鍗曞彿,    //婧愬崟鍙�
                                         "HSourceBillType": subdata[i].婧愬崟绫诲瀷,   //婧愬崟绫诲瀷
@@ -922,11 +927,11 @@
                 }
             });
 
-           //#region 淇濆瓨鎸夐挳
+            //#region 淇濆瓨鎸夐挳
             form.on('submit(Saver)', function (data) {
                 //#region 鍒ゆ柇婧愬崟鐘舵��
                 if (OperationType == 1 || OperationType == 4) {
-                    
+
                     if ($("#HSourceBillType").val() == "1105") {
                         for (var i = 0; i < option.data.length; i++) {
                             var HSourceBillData = "";
@@ -947,6 +952,27 @@
                                 return;
                             }
                         }
+                    } else if ($("#HSourceBillType").val() == "1201") {
+                        for (var i = 0; i < option.data.length; i++) {
+                            var HSourceBillData = "";
+                            var HSourceBillData = getPushSource_POStockInBillInit(option.data[i].HSourceInterID, option.data[i].HSourceEntryID);            //鑾峰彇婧愬崟鏁版嵁
+                            if (HSourceBillData != "none") {
+                                if (HSourceBillData == null) {
+                                    layer.alert("淇濆瓨澶辫触!绗�" + (i + 1) + "琛岋細鏈煡璇㈠埌婧愬崟鍗曟嵁!", { icon: 5 });
+                                    return;
+                                }
+                                //else if (HSourceBillData.鐘舵�� != "宸插鏍�") {
+                                //    var err = "淇濆瓨澶辫触!鍘熷洜锛氱" + (i + 1) + "琛�-婧愬崟鍗曟嵁鐘舵�佷负鈥�" + HSourceBillData.鐘舵�� + "鈥濓紝涓嶅厑璁镐繚瀛橈紒";
+                                //    layer.alert(err, { icon: 5 });
+                                //    return;
+                                //} else if (HSourceBillData.琛岀姸鎬� == "宸插叧闂�") {
+                                //    layer.alert("淇濆瓨澶辫触!绗�" + (i + 1) + "琛岋細璇ヨ璁板綍琛岀姸鎬佷负'宸插叧闂�'鐘舵��!", { icon: 5 });
+                                //    return;
+                                //}
+                            } else {
+                                return;
+                            }
+                        }
                     }
                     else {
                         return layer.msg('褰撳墠涓嶆敮鎸佽婧愬崟锛侊紒');
@@ -955,25 +981,25 @@
                 //#endregion
 
                 //if (AllowLoadData(data)) {
-                    set_SaveBill(data);
+                set_SaveBill(data);
                 //}
             });
             //#endregion
-       
-        //#region 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
+
+            //#region 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
             function getUrlVars_JSON() {
                 var datajson;
                 var str = window.location.search; //鑾峰彇閾炬帴涓紶閫掔殑鍙傛暟
-                var arr = str.substring(str.lastIndexOf("=")+1);
+                var arr = str.substring(str.lastIndexOf("=") + 1);
                 datajson = $.parseJSON(decodeURI(arr));
                 return datajson;
             }
             //#endregion
 
 
-          //#region 涓嬫帹椤甸潰鍒濆鍖�
+            //#region 涓嬫帹椤甸潰鍒濆鍖�
             function setInit_PushBill() {
-                 //鐢熸垚鍗曟嵁鍙峰拰鍐呯爜
+                //鐢熸垚鍗曟嵁鍙峰拰鍐呯爜
                 get_MAXNum();
 
                 //鍒濆鍖栨棩鏈熴�佸埗鍗曚汉銆佸埗鍗曟棩鏈�
@@ -988,96 +1014,13 @@
                 //绂佺敤缁勭粐閫夐」
                 $("#HOrgID").attr("disabled", true);
 
-               //鑾峰彇
-                 var data = getUrlVars_JSON().data;
-                    var dataArray = [];
-                    for (var i = 0; i < data.length; i++) {
-                        var temp = getPushSource_POInStockBackInit(data[i].hmainid, data[i].hsubid);
-                        if (temp != "none") {
-                            dataArray.push(temp);
-                        } else {
-                            return;
-                    }
+                if (HSouceBillType == "1105") {
+                    setInit_PushBill_ByPOInStockBackBill();
+                } else if (HSouceBillType == "1201") {
+                    setInit_PushBill_ByPOStockInBillInit();
                 }
+            }
 
-
-                    form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
-                        "HMainSourceInterID": "0"
-                        , "HMainSourceEntryID": "0"
-                        , "HMainSourceBillNo": ""
-                        , "HMainSourceBillType": $("#BillType").val()
-
-                        , "HDeptID": dataArray[0].HDeptID
-                        , "HDeptName": dataArray[0].閮ㄩ棬
-                        , "HManagerID": dataArray[0].HManagerID
-                        , "HManagerName": dataArray[0].涓荤
-                        , "HWHID": dataArray[0].涓昏〃浠撳簱ID == null ? 0 : dataArray[0].涓昏〃浠撳簱ID
-                        , "HWHName": dataArray[0].涓昏〃浠撳簱
-                        , "HEmpID": dataArray[0].HEmpID
-                        , "HEmpName": dataArray[0].涓氬姟鍛�
-                        , "HSupID": dataArray[0].HSupID
-                        , "HSupName": dataArray[0].渚涘簲鍟�
-                        //, "HSecManagerID": dataArray[0].HSecManagerID
-                        //, "HSecManagerName": dataArray[0].楠屾敹鍛�
-                        //, "HKeeperID": dataArray[0].HKeeperID
-                        //, "HKeeperName": dataArray[0].淇濈鍛�
-                        , "HCurID": dataArray[0].HCurID
-                        , "HCurName": dataArray[0].甯佸埆
-                        , "HExRate": dataArray[0].姹囩巼
-                        , "HAddress": data.浜よ揣鍦扮偣
-                        , "HRemark": data.琛ㄥご澶囨敞
-                        , "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
-                    });
-
-                    //瀛愯〃  璧嬪��
-                    var rowdata = [];
-                    for (var i = 0; i < dataArray.length; i++) {
-                        rowdata.push(
-                            {
-                                "HMaterID": dataArray[i].HMaterID
-                                , "鐗╂枡浠g爜": dataArray[i].鐗╂枡浠g爜
-                                , "鐗╂枡鍚嶇О": dataArray[i].鐗╂枡鍚嶇О
-                                , "瑙勬牸鍨嬪彿": dataArray[i].瑙勬牸鍨嬪彿
-                                , "HUnitID": dataArray[i].HUnitID
-                                , "璁¢噺鍗曚綅": dataArray[i].璁¢噺鍗曚綅
-                                , "HWHID": dataArray[i].HWHID
-                                , "鏀舵枡浠撳簱": dataArray[i].鏀舵枡浠撳簱
-                                , "HSPID": dataArray[i].HSPID    
-                                , "浠撲綅鍚嶇О": dataArray[i].浠撲綅鍚嶇О
-                                , "HSecUnitID": dataArray[i].HSecUnitID
-                                , "杈呭姪鍗曚綅": dataArray[i].杈呭姪鍗曚綅
-                                , "HQty": dealDoubleToFixed(dataArray[i].鏁伴噺, 1)
-                                , "HQtyMust": dealDoubleToFixed(dataArray[i].鏁伴噺, 1)
-                                , "HPrice": dealDoubleToFixed(dataArray[i].鍗曚环, 3)
-                                , 'HDiscountRate': dataArray[i].鎶樻墸鐜�                                                    //
-                                , 'HRelTaxPrice': "0"
-                                , "HTaxRate": dataArray[i].绋庣巼
-                                , 'HTaxMoney': dataArray[i].绋庨                                                     //
-                                , "HMoney": dealDoubleToFixed(dataArray[i].閲戦, 2)
-                                , "HRemark": dataArray[i].琛ㄤ綋澶囨敞
-
-                                , "HSourceInterID": dataArray[i].hmainid
-                                , "HSourceEntryID": dataArray[i].hsubid
-                                , "HSourceBillNo": dataArray[i].鍗曟嵁鍙�
-                                , "HSourceBillType": dataArray[i].HBillType
-                                , "HRelationQty": "0"
-                                , "HRelationMoney": "0"
-
-                                , 'HPOOrderInterID': "0"
-                                , 'HPOOrderEntryID': "0"
-                                , 'HPOOrderBillNo': ""
-
-                                , 'HSeOrderTaxPrice': dealDoubleToFixed(dataArray[i].鍚◣鍗曚环, 3)
-                                , "HSeOrderInterID": dataArray[i].hmainid
-                                , "HSeOrderEntryID": dataArray[i].hsubid
-                                , "HSeOrderBillNo": dataArray[i].鍗曟嵁鍙�
-                            }
-                        );
-                    }
-                    option.data = rowdata;
-                    table.render(option);
-                }
-        
             //#endregion
 
             //#region 淇濆瓨鏂规硶
@@ -1103,10 +1046,10 @@
                 //    layer.msg("璇烽�夋嫨淇濈鍛橈紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 //    return;
                 //}
-                //if ($("#HSecManagerID").val() == 0) {
-                //    layer.msg("璇烽�夋嫨楠屾敹鍛橈紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                //    return;
-                //}
+                if ($("#HSecManagerID").val() == 0) {
+                    layer.msg("璇烽�夋嫨閫�鏂欏憳锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
 
 
                 var num = [];
@@ -1352,7 +1295,7 @@
             }
             //#endregion
 
-         //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
+            //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
             function set_CheckBill(num) {
                 var InterID = $("#HInterID").val();
                 //閫昏緫瀹℃牳鏂规硶
@@ -1411,7 +1354,7 @@
                                             if (rowIndex + i >= option.data.length) {
                                                 var NewRow = {
                                                     "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
-                                                    "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
+                                                    "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鍙戞枡浠撳簱": "",
                                                     "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                                                     "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
                                                     "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
@@ -1490,12 +1433,12 @@
                                     })
                                     layer.close(index);//鍏抽棴寮圭獥
                                 }
-                             , end: function () {
-                                obj.update({
-                                    "HUnitID": OptionData.HItemID
-                                    , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
-                                })
-                            }
+                                , end: function () {
+                                    obj.update({
+                                        "HUnitID": OptionData.HItemID
+                                        , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+                                    })
+                                }
                             })
                         }
                         //鏀舵枡浠撳簱
@@ -1520,17 +1463,17 @@
                                     }
                                     //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                     obj.update({
-                                        "鏀舵枡浠撳簱": checkStatus.data[0].浠撳簱鍚嶇О
+                                        "鍙戞枡浠撳簱": checkStatus.data[0].浠撳簱鍚嶇О
                                         , "HWHID": checkStatus.data[0].HItemID
                                     })
                                     layer.close(index);//鍏抽棴寮圭獥
                                 }
-                              , end: function () {
-                                obj.update({
-                                    "HWHID": OptionData.HItemID
-                                    , "鏀舵枡浠撳簱": OptionData.浠撳簱鍚嶇О
-                                })
-                            }
+                                , end: function () {
+                                    obj.update({
+                                        "HWHID": OptionData.HItemID
+                                        , "鍙戞枡浠撳簱": OptionData.浠撳簱鍚嶇О
+                                    })
+                                }
                             })
                         }
                         //浠撲綅
@@ -1560,12 +1503,12 @@
                                     })
                                     layer.close(index);//鍏抽棴寮圭獥
                                 }
-                             , end: function () {
-                                obj.update({
-                                    "HSPID": OptionData.HMainID
-                                    , "浠撲綅鍚嶇О": OptionData.浠撲綅鍚嶇О
-                                })
-                            }
+                                , end: function () {
+                                    obj.update({
+                                        "HSPID": OptionData.HMainID
+                                        , "浠撲綅鍚嶇О": OptionData.浠撲綅鍚嶇О
+                                    })
+                                }
                             })
                         }
                         obj.event = "";
@@ -1601,7 +1544,7 @@
                                     if (rowIndex + i >= option.data.length) {
                                         var NewRow = {
                                             "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
-                                            "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
+                                            "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鍙戞枡浠撳簱": "",
                                             "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                                             "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
                                             "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
@@ -1757,10 +1700,10 @@
                             for (var i = 0; i < ProcessNumber.length; i++) {
                                 option.data.push({
                                     "HMaterID": checkStatus.data[j].HMaterID, "鐗╂枡浠g爜": checkStatus.data[j].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": checkStatus.data[j].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": checkStatus.data[j].瑙勬牸鍨嬪彿,
-                                    "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅, 
+                                    "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅,
                                     "HQty": checkStatus.data[j].鏁伴噺 - checkStatus.data[j].鍏宠仈鏁伴噺, "HQtyMust": checkStatus.data[j].鏁伴噺 - checkStatus.data[j].鍏宠仈鏁伴噺, "HPrice": checkStatus.data[j].鍗曚环,
                                     "HMoney": (checkStatus.data[j].鏁伴噺 - checkStatus.data[j].鍏宠仈鏁伴噺) * Number(checkStatus.data[j].鍗曚环), "HTaxRate": checkStatus.data[j].绋庣巼, "HTaxMoney": checkStatus.data[j].绋庨, "HWHID": checkStatus.data[j].HWHID,
-                                    "鏀舵枡浠撳簱": checkStatus.data[j].鏀舵枡浠撳簱,"HSPID": checkStatus.data[j].HSPID,"浠撲綅鍚嶇О": checkStatus.data[j].浠撲綅鍚嶇О,"HSecUnitID": checkStatus.data[j].HSecUnitID,"杈呭姪鍗曚綅": checkStatus.data[j].杈呭姪鍗曚綅,
+                                    "鍙戞枡浠撳簱": checkStatus.data[j].鏀舵枡浠撳簱, "HSPID": checkStatus.data[j].HSPID, "浠撲綅鍚嶇О": checkStatus.data[j].浠撲綅鍚嶇О, "HSecUnitID": checkStatus.data[j].HSecUnitID, "杈呭姪鍗曚綅": checkStatus.data[j].杈呭姪鍗曚綅,
                                     "HSourceBillNo": checkStatus.data[j].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid
                                 })
                                 j++;
@@ -1773,7 +1716,7 @@
                 });
             });
 
-             //鍒ゆ柇鎵�閫夌潃涓庤〃鏍兼槸鍚︽湁閲嶅鏁版嵁
+            //鍒ゆ柇鎵�閫夌潃涓庤〃鏍兼槸鍚︽湁閲嶅鏁版嵁
             function checkDuplicateData(data) {
                 const duplicates = [];
 
@@ -1846,8 +1789,8 @@
             }
             //#endregion
 
-           
-          //#region 鑾峰彇婧愬崟绫诲瀷
+
+            //#region 鑾峰彇婧愬崟绫诲瀷
             function HSourceBillType() {
                 var HName = '閲囪喘閫�鏂欏崟';
                 //鑾峰彇鐧诲綍椤电粍缁囧垪
@@ -1871,11 +1814,216 @@
             }
             //#endregion
 
-         //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢��鏂欓�氱煡鍗曟暟鎹�
+            //#region 涓嬫帹椤甸潰鍒濆鍖�-閫�鏂欓�氱煡鍗�
+            function setInit_PushBill_ByPOInStockBackBill() {
+                //鑾峰彇
+                var data = getUrlVars_JSON().data;
+                var dataArray = [];
+                for (var i = 0; i < data.length; i++) {
+                    var temp = getPushSource_POInStockBackInit(data[i].hmainid, data[i].hsubid);
+                    if (temp != "none") {
+                        dataArray.push(temp);
+                    } else {
+                        return;
+                    }
+                }
+
+
+                form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+                    "HMainSourceInterID": "0"
+                    , "HMainSourceEntryID": "0"
+                    , "HMainSourceBillNo": ""
+                    , "HMainSourceBillType": $("#BillType").val()
+
+                    , "HDeptID": dataArray[0].HDeptID
+                    , "HDeptName": dataArray[0].閮ㄩ棬
+                    , "HManagerID": dataArray[0].HManagerID
+                    , "HManagerName": dataArray[0].涓荤
+                    , "HWHID": dataArray[0].涓昏〃浠撳簱ID == null ? 0 : dataArray[0].涓昏〃浠撳簱ID
+                    , "HWHName": dataArray[0].涓昏〃浠撳簱
+                    , "HEmpID": dataArray[0].HEmpID
+                    , "HEmpName": dataArray[0].涓氬姟鍛�
+                    , "HSupID": dataArray[0].HSupID
+                    , "HSupName": dataArray[0].渚涘簲鍟�
+                    //, "HSecManagerID": dataArray[0].HSecManagerID
+                    //, "HSecManagerName": dataArray[0].楠屾敹鍛�
+                    //, "HKeeperID": dataArray[0].HKeeperID
+                    //, "HKeeperName": dataArray[0].淇濈鍛�
+                    , "HCurID": dataArray[0].HCurID
+                    , "HCurName": dataArray[0].甯佸埆
+                    , "HExRate": dataArray[0].姹囩巼
+                    , "HAddress": data.浜よ揣鍦扮偣
+                    , "HRemark": data.琛ㄥご澶囨敞
+                    , "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
+                });
+
+                //瀛愯〃  璧嬪��
+                var rowdata = [];
+                for (var i = 0; i < dataArray.length; i++) {
+                    rowdata.push(
+                        {
+                            "HMaterID": dataArray[i].HMaterID
+                            , "鐗╂枡浠g爜": dataArray[i].鐗╂枡浠g爜
+                            , "鐗╂枡鍚嶇О": dataArray[i].鐗╂枡鍚嶇О
+                            , "瑙勬牸鍨嬪彿": dataArray[i].瑙勬牸鍨嬪彿
+                            , "HUnitID": dataArray[i].HUnitID
+                            , "璁¢噺鍗曚綅": dataArray[i].璁¢噺鍗曚綅
+                            , "HWHID": dataArray[i].HWHID
+                            , "鍙戞枡浠撳簱": dataArray[i].鏀舵枡浠撳簱
+                            , "HSPID": dataArray[i].HSPID
+                            , "浠撲綅鍚嶇О": dataArray[i].浠撲綅鍚嶇О
+                            , "HSecUnitID": dataArray[i].HSecUnitID
+                            , "杈呭姪鍗曚綅": dataArray[i].杈呭姪鍗曚綅
+                            , "HQty": dealDoubleToFixed(dataArray[i].鏁伴噺, 1)
+                            , "HQtyMust": dealDoubleToFixed(dataArray[i].鏁伴噺, 1)
+                            , "HPrice": dealDoubleToFixed(dataArray[i].鍗曚环, 3)
+                            , 'HDiscountRate': dataArray[i].鎶樻墸鐜�                                                    //
+                            , 'HRelTaxPrice': "0"
+                            , "HTaxRate": dataArray[i].绋庣巼
+                            , 'HTaxMoney': dataArray[i].绋庨                                                     //
+                            , "HMoney": dealDoubleToFixed(dataArray[i].閲戦, 2)
+                            , "HRemark": dataArray[i].琛ㄤ綋澶囨敞
+
+                            , "HSourceInterID": dataArray[i].hmainid
+                            , "HSourceEntryID": dataArray[i].hsubid
+                            , "HSourceBillNo": dataArray[i].鍗曟嵁鍙�
+                            , "HSourceBillType": dataArray[i].HBillType
+                            , "HRelationQty": "0"
+                            , "HRelationMoney": "0"
+
+                            , 'HPOOrderInterID': "0"
+                            , 'HPOOrderEntryID': "0"
+                            , 'HPOOrderBillNo': ""
+
+                            , 'HSeOrderTaxPrice': dealDoubleToFixed(dataArray[i].鍚◣鍗曚环, 3)
+                            , "HSeOrderInterID": dataArray[i].hmainid
+                            , "HSeOrderEntryID": dataArray[i].hsubid
+                            , "HSeOrderBillNo": dataArray[i].鍗曟嵁鍙�
+                        }
+                    );
+                }
+                option.data = rowdata;
+                table.render(option);
+            }
+            //#endregion
+
+            //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢��鏂欓�氱煡鍗曟暟鎹�
             function getPushSource_POInStockBackInit(HSourceInterID, HSourceEntryID) {
                 var res = "none";
                 $.ajax({
                     url: GetWEBURL() + "/Cg_POInStockBackBill/loadCg_POInStockBackBill_Push",
+                    async: false,
+                    type: "GET",
+                    data: {
+                        "HInterID": HSourceInterID
+                        , "HSubID": HSourceEntryID
+                    },
+                    success: function (result) {
+                        if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            res = result.data[0];
+                        } else {
+                            res = result.data;
+                            //layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                        }
+                    }, error: function () {
+                        res = "none";
+                        layer.alert("鍙戠敓閿欒!", { icon: 5 });
+                    }
+                });
+                return res;
+            }
+            //#endregion
+
+            //#region 涓嬫帹椤甸潰鍒濆鍖�-閲囪喘鍏ュ簱鍗�
+            function setInit_PushBill_ByPOStockInBillInit() {
+                //鑾峰彇
+                var data = getUrlVars_JSON().data;
+                var dataArray = [];
+                for (var i = 0; i < data.length; i++) {
+                    var temp = getPushSource_POStockInBillInit(data[i].hmainid, data[i].hsubid);
+                    if (temp != "none") {
+                        dataArray.push(temp);
+                    } else {
+                        return;
+                    }
+                }
+
+
+                form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+                    "HInnerBillNo": dataArray[0].鍐呴儴鍗曟嵁鍙�
+                    , "HSupID": dataArray[0].HSupID
+                    , "HSupName": dataArray[0].渚涘簲鍟�
+                    , "HEmpID": dataArray[0].HEmpID
+                    , "HEmpName": dataArray[0].涓氬姟鍛�
+                    , "HWHID": dataArray[0].涓昏〃浠撳簱ID
+                    , "HWHName": dataArray[0].涓昏〃浠撳簱
+                    //, "HSecManagerID": data.HSecManagerID
+                    //, "HSecManagerName": data.楠屾敹鍛�
+                    , "HKeeperID": dataArray[0].HKeeperID
+                    , "HKeeperName": dataArray[0].淇濈鍛�
+                    , "HDeptName": dataArray[0].閮ㄩ棬
+                    , "HDeptID": dataArray[0].HDeptID
+                    //, "HSourceBillType": data.婧愬崟绫诲瀷
+                    , "HManagerID": dataArray[0].HManagerID
+                    , "HManagerName": dataArray[0].璐熻矗浜�
+                    , "HExRate": dataArray[0].姹囩巼
+                    //, "Box2": ""
+                    //, "HExplanation": data.鎽樿
+                    //, "HRemark": data.琛ㄥご澶囨敞
+
+                    , "HSourceBillType": HSouceBillType
+                });
+
+                //瀛愯〃  璧嬪��
+                var rowdata = [];
+                for (var i = 0; i < dataArray.length; i++) {
+                    rowdata.push(
+                        {
+                            "HMaterID": dataArray[i].HMaterID
+                            , "鐗╂枡浠g爜": dataArray[i].鐗╂枡浠g爜
+                            , "鐗╂枡鍚嶇О": dataArray[i].鐗╂枡鍚嶇О
+                            , "瑙勬牸鍨嬪彿": dataArray[i].瑙勬牸鍨嬪彿
+                            , "HUnitID": dataArray[i].HUnitID
+                            , "璁¢噺鍗曚綅": dataArray[i].璁¢噺鍗曚綅
+
+
+                            , "HWHID": dataArray[i].HWHID
+                            , "鍙戞枡浠撳簱": dataArray[i].鏀舵枡浠撳簱
+                            , "HSPID": dataArray[i].HSPID
+                            , "浠撲綅鍚嶇О": dataArray[i].浠撲綅鍚嶇О
+                            //, "HSecUnitID": dataArray[i].HSecUnitID
+                            //, "杈呭姪鍗曚綅": dataArray[i].杈呭姪鍗曚綅
+
+
+                            , "HQty": dealDoubleToFixed(dataArray[i].瀹炴敹鏁伴噺, 1) - dealDoubleToFixed(dataArray[i].鍏宠仈鏁伴噺, 1)
+                            , "HQtyMust": dealDoubleToFixed(dataArray[i].瀹炴敹鏁伴噺, 1) - dealDoubleToFixed(dataArray[i].鍏宠仈鏁伴噺, 1)
+
+
+                            , "HPrice": dealDoubleToFixed(dataArray[i].鍗曚环, 3)
+                            , "HMoney": dealDoubleToFixed(dataArray[i].閲戦, 2)
+                            , "HOrderPrice": dataArray[i].閲囪喘閲戦
+                            , "HRemark": dataArray[i].琛ㄤ綋澶囨敞
+                            , "HBatchNo": dataArray[i].鎵规
+
+                            , "HSourceInterID": dataArray[i].hmainid
+                            , "HSourceEntryID": dataArray[i].hsubid
+                            , "HSourceBillNo": dataArray[i].鍗曟嵁鍙�
+                            , "HSourceBillType": dataArray[i].HBillType
+                            , "HRelationQty": "0"
+                            , "HRelationMoney": "0"
+                        }
+                    );
+                }
+                option.data = rowdata;
+                table.render(option);
+            }
+            //#endregion
+
+            //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢噰璐叆搴撳崟鏁版嵁
+            function getPushSource_POStockInBillInit(HSourceInterID, HSourceEntryID) {
+                var res = "none";
+                $.ajax({
+                    url: GetWEBURL() + "/Kf_POStockInBill/loadKf_POStockInBillEdit_Push",
                     async: false,
                     type: "GET",
                     data: {
@@ -2057,27 +2205,27 @@
         }
 
 
-         //鍙屽嚮杩斿洖鐗╂枡
-         function GetGyMaterial(data) {
-             OptionData = data
-         }
-           //鍙屽嚮杩斿洖璁¢噺鍗曚綅
-         function GetGyUnit(data) {
-             OptionData = data
-         }
+        //鍙屽嚮杩斿洖鐗╂枡
+        function GetGyMaterial(data) {
+            OptionData = data
+        }
+        //鍙屽嚮杩斿洖璁¢噺鍗曚綅
+        function GetGyUnit(data) {
+            OptionData = data
+        }
 
-           //鍙屽嚮杩斿洖鏀舵枡浠撳簱
-         function GetGyWarehouse(data) {
-             OptionData = data
-         } 
+        //鍙屽嚮杩斿洖鏀舵枡浠撳簱
+        function GetGyWarehouse(data) {
+            OptionData = data
+        }
 
 
         //鍙屽嚮杩斿洖鏀舵枡浠撲綅
-         function GetGyStockPlace(data) {
-             OptionData = data
-         } 
+        function GetGyStockPlace(data) {
+            OptionData = data
+        }
 
-           //#region 澶勭悊灏忔暟鏄剧ず浣嶆暟锛坉ata锛氶渶瑕佸鐞嗙殑鏁版嵁锛沶um锛氭暟鎹殑绫诲瀷(濡�1:鏁伴噺锛�2:閲戦锛�3:鍗曚环)锛�
+        //#region 澶勭悊灏忔暟鏄剧ず浣嶆暟锛坉ata锛氶渶瑕佸鐞嗙殑鏁版嵁锛沶um锛氭暟鎹殑绫诲瀷(濡�1:鏁伴噺锛�2:閲戦锛�3:鍗曚环)锛�
         function dealDoubleToFixed(data, num) {
             //鐢ㄤ簬璁剧疆灏忔暟浣嶆暟
             var dotLength = 0;
@@ -2111,7 +2259,7 @@
                 }
             }
         }
-            //#endregion
+                //#endregion
     </script>
 </body>
 </html>
\ No newline at end of file
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBillList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBillList.html"
index a3026b3..854b95b 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBillList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBillList.html"
@@ -59,23 +59,17 @@
                                     </div>
                                 </div>
                                 <div class="layui-inline">
-                                    <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
-                                    <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
-                                        <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
-                                            <!--鍔ㄦ�佹覆鏌撶粍缁�-->
-                                        </select>
-                                    </div>
-                                </div>
-                                <div class="layui-inline">
                                     <label class="layui-form-label">鍗曟嵁鍙�</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input ForFilteringSchemes" 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 ForFilteringSchemes" name="HProjectNumber" id="HProjectNumber" style="width:190px;">
+                                    <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
+                                    <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                        <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
+                                            <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+                                        </select>
                                     </div>
                                 </div>
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
@@ -88,6 +82,13 @@
                                         <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
                                     </div>
                                 </div>
+                                <div class="layui-inline" style="display:none;">
+                                    <label class="layui-form-label">椤圭洰缂栧彿</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input ForFilteringSchemes" name="HProjectNumber" id="HProjectNumber" style="width:190px;">
+                                    </div>
+                                </div>
+                                
                                 <div class="layui-colla-content">
                                     <div class="layui-inline">
                                         <div class="layui-inline">
@@ -202,13 +203,14 @@
                         <div id="page" style="position: relative; bottom: 0;"></div>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>-->
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="get_LookDown_PayableBill" id="get_LookDown_PayableBill"><i class="layui-icon layui-icon-refresh-3"></i>涓嬫煡(搴斾粯鍗�)</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-BarCodeDetail" id="BarCodeDetail"><i class="layui-icon layui-icon-form"></i>鏉$爜鏄庣粏</button>
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-PushPayableBills" id="btn-PushPayableBills"><i class="layui-icon layui-icon-delete"></i>澶氳涓嬫帹(搴斾粯鍗�)</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-PushPOStockInBackBills" id="btn-PushPOStockInBackBills"><i class="layui-icon layui-icon-delete"></i>澶氳涓嬫帹(閲囪喘閫�鏂欏崟)</button>
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_startCheckBill" id="set_startCheckBill"><i class="layui-icon layui-icon-form"></i>鍙戣捣瀹℃壒</button>
@@ -741,6 +743,10 @@
                     case 'btn-PushPayableBills':
                         set_PushPayableBills();
                         break;
+                    //澶氳涓嬫帹(閲囪喘閫�鏂欏崟)
+                    case 'btn-PushPOStockInBackBills':
+                        set_PushPOStockInBackBills();
+                        break;
                      //瀹℃牳
                     case 'set_CheckBill': set_CheckBill(0);
                         break;
@@ -1176,6 +1182,61 @@
             }
             //#endregion
 
+            //#region 澶氳涓嬫帹锛堥噰璐��鏂欏崟锛�
+            function set_PushPOStockInBackBills() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (data.length > 0) {
+                    var dataArray = [];
+                    var HCusName = data[0].渚涘簲鍟�;
+                    var HEmpName = data[0].涓氬姟鍛�;
+                    for (var i = 0; i < data.length; i++) {
+                        var temp = {
+                            "hmainid": data[i].hmainid
+                            , "hsubid": data[i].hsubid
+                            , "HBillStatus": data[i].鐘舵��
+                            , "HSourceBillType": "1201"
+                        }
+                        dataArray.push(temp);
+                        if (data[i].鐘舵�� != "宸插鏍�") {
+                            var err = "涓嬫帹澶辫触!鍗曟嵁銆�" + data[i].鍗曟嵁鍙� + "銆戠殑鐘舵�佷负鈥�" + data[0].鐘舵�� + "鈥�,涓嶅厑璁镐笅鎺紒";
+                            layer.alert(err, { icon: 5 });
+                            return;
+                        }
+
+                        if (data[i].渚涘簲鍟� != HCusName) {
+                            layer.msg("涓嬫帹澶辫触!宸茬粡閫変腑鐨勮褰曚腑瀛樺湪涓嶅悓渚涘簲鍟�!");
+                            return;
+                        }
+                        if (data[i].涓氬姟鍛� != HEmpName) {
+                            layer.msg("涓嬫帹澶辫触!宸茬粡閫変腑鐨勮褰曚腑瀛樺湪涓嶅悓涓氬姟鍛�!");
+                            return;
+                        }
+                    }
+
+                    var datajson = {
+                        "data": dataArray
+                    };
+
+                    var url = encodeURI('../../楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBill_Add_Up.html?OperationType=4&linterid=0&HSouceBillType=1201&res=' + JSON.stringify(datajson))
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '閲囪喘鍏ュ簱鍗�-澶氳涓嬫帹閲囪喘閫�鏂欏崟'
+                        , shift: 0//寮瑰嚭鍔ㄧ敾
+                        , content: url
+                        , btn: [],
+                        // 鎸夐挳1 鐨勫洖璋�
+                        end: function (index, layero, that) {
+                            //鍒锋柊椤甸潰
+                            $("#btnSearch").trigger('click');
+                        }
+                    })
+                } else {
+                    layer.msg('璇烽�夋嫨鏁版嵁涓嬫帹锛�');
+                }
+            }
+            //#endregion
 
             //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
             function set_CheckBill(num) {

--
Gitblit v1.9.1