From 44178ad4def665fe10f64dbdd557b970ea0a7e77 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 13 八月 2024 14:22:13 +0800
Subject: [PATCH] 采购销售双击小数点后位数bug修复

---
 WebTM/WebTM.csproj.user                                       |    4 
 WebTM/views/销售管理/退货通知单/Xs_SeOutStockBackBill.html             |  152 +++++
 WebTM/views/领料发货/销售出库/Kf_SellOutBill.html                     |   63 -
 WebTM/views/采购管理/收料通知单/Add_Edit_Cg_POInStockBillList.html     |  170 ++++-
 WebTM/views/销售管理/销售订单/Add_Edit_Xs_SeOrderBillList.html        |  106 +++
 WebTM/Properties/PublishProfiles/JFTM.pubxml.user             |  147 +++--
 WebTM/views/采购管理/采购合同/Add_Edit_Cg_ContractBillList.html       |   67 ++
 WebTM/views/基础资料/公用基础资料/Gy_Material.html                      |    2 
 WebTM/views/采购管理/退料通知单/Add_Edit_Cg_POInStockBackBillList.html |  201 ++++--
 WebTM/views/验收入库/外购入库/Kf_POStockInBackBill_Add_Up.html        |   26 
 WebTM/views/采购管理/报价单/Sup_QuotePriceBillEdit.html              |   36 +
 WebTM/views/销售管理/应收单/Xs_ReceivableBill.html                   |  236 +++++--
 WebTM/views/采购管理/应付单/Cg_PayableBill.html                      |  174 +++--
 WebTM/views/销售管理/销售合同/Add_Edit_Xs_ContractBillList.html       |   67 ++
 WebTM/views/采购管理/采购订单/Cg_POOrderBillEdit.html                 |  200 ++++--
 WebTM/views/验收入库/外购入库/Add_Edit_Kf_POStockInBillList.html      |   56 +
 16 files changed, 1,214 insertions(+), 493 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index ef8a755..b28534c 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -18,10 +18,10 @@
       <publishTime>01/28/2016 14:22:24</publishTime>
     </File>
     <File Include="bin/WebTM.dll">
-      <publishTime>08/05/2024 16:48:08</publishTime>
+      <publishTime>08/12/2024 15:35:16</publishTime>
     </File>
     <File Include="bin/WebTM.pdb">
-      <publishTime>08/05/2024 16:48:08</publishTime>
+      <publishTime>08/12/2024 15:35:16</publishTime>
     </File>
     <File Include="HtmlPage1.html">
       <publishTime>04/15/2024 13:00:47</publishTime>
@@ -735,7 +735,7 @@
       <publishTime>04/15/2024 13:00:47</publishTime>
     </File>
     <File Include="layuiadmin/Scripts/webConfig.js">
-      <publishTime>08/01/2024 11:23:53</publishTime>
+      <publishTime>08/09/2024 16:30:07</publishTime>
     </File>
     <File Include="layuiadmin/Scripts/webConfig2.js">
       <publishTime>07/11/2024 15:00:06</publishTime>
@@ -2142,7 +2142,7 @@
       <publishTime>06/06/2024 14:26:48</publishTime>
     </File>
     <File Include="views/WMS鎵爜妯″潡/閿�鍞嚭搴�/Kf_SellOutBill_QiaoYi_PDA.html">
-      <publishTime>06/06/2024 14:26:48</publishTime>
+      <publishTime>08/07/2024 16:22:17</publishTime>
     </File>
     <File Include="views/涓嶈壇姹囨姤/Xs_SeOrderPickUp.html">
       <publishTime>04/15/2024 13:00:47</publishTime>
@@ -2391,7 +2391,7 @@
       <publishTime>05/17/2024 08:07:20</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Add_Edit_Gy_Material.html">
-      <publishTime>08/01/2024 15:55:41</publishTime>
+      <publishTime>08/08/2024 10:56:40</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Add_Edit_Gy_MouldType.html">
       <publishTime>05/24/2024 13:33:59</publishTime>
@@ -3522,7 +3522,7 @@
       <publishTime>04/15/2024 13:00:48</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html">
-      <publishTime>07/15/2024 13:51:41</publishTime>
+      <publishTime>08/09/2024 16:47:02</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier_Edit.html">
       <publishTime>08/02/2024 10:08:21</publishTime>
@@ -3534,7 +3534,7 @@
       <publishTime>08/02/2024 10:08:21</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/閿�鍞熀纭�璧勬枡/Gy_Customer.html">
-      <publishTime>07/15/2024 13:47:05</publishTime>
+      <publishTime>08/09/2024 17:06:26</publishTime>
     </File>
     <File Include="views/鍩虹璧勬枡/閿�鍞熀纭�璧勬枡/Gy_Customer_Edit.html">
       <publishTime>06/11/2024 16:57:01</publishTime>
@@ -4497,7 +4497,7 @@
       <publishTime>04/28/2024 08:36:23</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/寮傚父鍙嶉鍗�/Sc_Add_MESExecptFeedBackBillList.html">
-      <publishTime>07/26/2024 16:22:06</publishTime>
+      <publishTime>08/07/2024 16:22:17</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/寮傚父鍙嶉鍗�/Sc_MESExecptFeedBackBillList.html">
       <publishTime>07/09/2024 16:31:47</publishTime>
@@ -4557,7 +4557,7 @@
       <publishTime>04/15/2024 13:00:48</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鎶ュ伐鍙板伐搴�/寮�宸�/Sc_Add_MESBeginStepWorkBillList.html">
-      <publishTime>04/15/2024 13:00:48</publishTime>
+      <publishTime>08/07/2024 16:22:17</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鎶ュ伐鍙板伐搴�/寮�宸�/Sc_MESBeginStepWorkBillList.html">
       <publishTime>07/09/2024 16:31:47</publishTime>
@@ -4710,7 +4710,7 @@
       <publishTime>04/15/2024 13:00:48</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.html">
-      <publishTime>05/24/2024 13:34:00</publishTime>
+      <publishTime>08/07/2024 16:22:17</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_MESBeginWorkBillList.html">
       <publishTime>04/15/2024 13:00:48</publishTime>
@@ -4725,7 +4725,7 @@
       <publishTime>04/15/2024 13:00:48</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.html">
-      <publishTime>05/24/2024 13:34:00</publishTime>
+      <publishTime>08/07/2024 16:22:17</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_MESBeginWorkBillList.html">
       <publishTime>04/15/2024 13:00:48</publishTime>
@@ -4750,6 +4750,9 @@
     </File>
     <File Include="views/鐢熶骇绠$悊/鐢熶骇鎶ヨ〃/Sc_ProdOrderPickingStatusReport.html">
       <publishTime>07/09/2024 16:31:47</publishTime>
+    </File>
+    <File Include="views/鐢熶骇绠$悊/鐢熶骇鎶ヨ〃/Sc_ProductionInProgressReport.html">
+      <publishTime>08/09/2024 16:29:53</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/鐢熶骇鎶ヨ〃/Sc_QualityReportBillDay.html">
       <publishTime>06/25/2024 12:20:51</publishTime>
@@ -5082,7 +5085,7 @@
       <publishTime>04/15/2024 13:00:48</publishTime>
     </File>
     <File Include="views/璁″垝绠$悊/宸ヨ壓璺嚎/Gy_MaterialTechParamBillMain.html">
-      <publishTime>07/19/2024 11:04:59</publishTime>
+      <publishTime>08/12/2024 15:34:13</publishTime>
     </File>
     <File Include="views/璁″垝绠$悊/宸ヨ壓璺嚎/Gy_MaterialTechParamBillMainList.html">
       <publishTime>07/12/2024 09:54:49</publishTime>
@@ -5295,7 +5298,7 @@
       <publishTime>07/09/2024 16:31:47</publishTime>
     </File>
     <File Include="views/璁惧绠$悊/璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛�/SB_EquipICMOTechParamBillEdit.html">
-      <publishTime>08/01/2024 11:23:40</publishTime>
+      <publishTime>08/12/2024 15:34:13</publishTime>
     </File>
     <File Include="views/璁惧绠$悊/璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛�/SB_EquipICMOTechParamBillList.html">
       <publishTime>06/21/2024 16:12:46</publishTime>
@@ -5547,7 +5550,7 @@
       <publishTime>04/15/2024 13:00:48</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/寮傚父鍙嶉/OA_ErrMsgBackSelfQuery.html">
-      <publishTime>07/04/2024 15:59:00</publishTime>
+      <publishTime>08/07/2024 16:22:17</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/寮傚父鍙嶉/OA_ErrMsgBackSignBillList_PDA.html">
       <publishTime>04/15/2024 13:00:48</publishTime>
@@ -5588,6 +5591,27 @@
     <File Include="views/璐ㄩ噺绠$悊/妫�楠屾柟妗堝崟/QC_CheckProjectList.html">
       <publishTime>07/26/2024 16:22:06</publishTime>
     </File>
+    <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_BadProductsReport.html">
+      <publishTime>08/07/2024 16:22:17</publishTime>
+    </File>
+    <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_ErrManagerLedgerReport.html">
+      <publishTime>08/07/2024 16:22:17</publishTime>
+    </File>
+    <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_ErrManagerLedgerReport_EquipTop3Issue.html">
+      <publishTime>08/09/2024 16:29:53</publishTime>
+    </File>
+    <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_ErrManagerLedgerReport_Issue.html">
+      <publishTime>08/09/2024 16:29:53</publishTime>
+    </File>
+    <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_ErrManagerLedgerReport_Source.html">
+      <publishTime>08/09/2024 16:29:53</publishTime>
+    </File>
+    <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_ErrManagerLedgerReport_SourceOfTheProblem.html">
+      <publishTime>08/09/2024 16:29:53</publishTime>
+    </File>
+    <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_ErrMsgBackBillList.html">
+      <publishTime>08/07/2024 16:22:17</publishTime>
+    </File>
     <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_FirstPassRateReport.html">
       <publishTime>04/15/2024 13:00:48</publishTime>
     </File>
@@ -5604,10 +5628,10 @@
       <publishTime>08/05/2024 15:04:16</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_ProcessPerformanceFirstPass.html">
-      <publishTime>08/01/2024 11:23:40</publishTime>
+      <publishTime>08/09/2024 16:29:53</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_ProcessPerformancePass.html">
-      <publishTime>08/05/2024 15:04:16</publishTime>
+      <publishTime>08/09/2024 16:29:53</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_ProdBadReasonStatistics.html">
       <publishTime>04/15/2024 13:00:48</publishTime>
@@ -5645,11 +5669,14 @@
     <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_RegistrationForTestingReport.html">
       <publishTime>08/05/2024 15:04:16</publishTime>
     </File>
+    <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/QC_TechnologyParameterClass.html">
+      <publishTime>08/12/2024 15:34:13</publishTime>
+    </File>
     <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/SB_TechnologyParameterList.html">
-      <publishTime>08/01/2024 11:23:40</publishTime>
+      <publishTime>08/12/2024 15:34:13</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鎶ヨ〃/Sc_StationOutBil_HProc.html">
-      <publishTime>08/01/2024 11:23:40</publishTime>
+      <publishTime>08/09/2024 16:29:53</publishTime>
     </File>
     <File Include="views/璐ㄩ噺绠$悊/璐ㄩ噺鏈堝害鐩爣鍗�/QC_MonthTarGetBill.html">
       <publishTime>07/26/2024 08:27:30</publishTime>
@@ -5910,7 +5937,7 @@
       <publishTime>04/15/2024 13:00:49</publishTime>
     </File>
     <File Include="views/杞﹂棿绠$悊/宸ュ簭鍑虹珯姹囨姤鍗�/Cj_StationOutBill.html">
-      <publishTime>07/30/2024 14:00:31</publishTime>
+      <publishTime>08/07/2024 16:22:17</publishTime>
     </File>
     <File Include="views/杞﹂棿绠$悊/宸ュ簭鍑虹珯姹囨姤鍗�/Cj_StationOutBillList.html">
       <publishTime>07/26/2024 16:22:06</publishTime>
@@ -5922,13 +5949,13 @@
       <publishTime>05/24/2024 13:34:00</publishTime>
     </File>
     <File Include="views/杞﹂棿绠$悊/宸ュ簭鍑虹珯姹囨姤鍗�/Cj_StationOutBill_CurrentWork.html">
-      <publishTime>08/05/2024 15:04:16</publishTime>
+      <publishTime>08/07/2024 16:22:17</publishTime>
     </File>
     <File Include="views/杞﹂棿绠$悊/宸ュ簭鍑虹珯姹囨姤鍗�/Cj_StationOutBill_CodingReport.html">
       <publishTime>05/24/2024 13:34:00</publishTime>
     </File>
     <File Include="views/杞﹂棿绠$悊/宸ュ簭鍑虹珯姹囨姤鍗�/Cj_StationOutBill_CurrentWork.html">
-      <publishTime>08/05/2024 15:04:16</publishTime>
+      <publishTime>08/07/2024 16:22:17</publishTime>
     </File>
     <File Include="views/杞﹂棿绠$悊/宸ュ簭鍑虹珯姹囨姤鍗�/Cj_StationOutBill_QiaoYi.html">
       <publishTime>04/15/2024 13:00:49</publishTime>
@@ -6321,10 +6348,10 @@
       <publishTime>07/10/2024 16:06:15</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/浠樻鍗�/YF_PayMentBill.html">
-      <publishTime>07/29/2024 11:10:32</publishTime>
+      <publishTime>08/07/2024 15:49:13</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/浠樻鍗�/YF_PayMentBillList.html">
-      <publishTime>07/18/2024 16:18:16</publishTime>
+      <publishTime>08/06/2024 13:27:46</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/鍏朵粬搴斾粯鍗�/YF_PayMentOtherBillMain.html">
       <publishTime>05/17/2024 08:07:20</publishTime>
@@ -6342,10 +6369,10 @@
       <publishTime>07/18/2024 15:09:02</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/搴斾粯鍗�/Cg_PayableBill.html">
-      <publishTime>07/30/2024 10:18:16</publishTime>
+      <publishTime>08/12/2024 13:19:58</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/搴斾粯鍗�/Cg_PayableBillList.html">
-      <publishTime>07/26/2024 17:01:48</publishTime>
+      <publishTime>08/06/2024 13:26:46</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/搴斾粯閫�娆惧崟/YF_PayMentBackBill.html">
       <publishTime>04/15/2024 13:00:49</publishTime>
@@ -6354,31 +6381,31 @@
       <publishTime>07/18/2024 16:14:27</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/鎶ヤ环鍗�/Sup_QuotePriceBillEdit.html">
-      <publishTime>07/23/2024 13:57:26</publishTime>
+      <publishTime>08/12/2024 13:42:45</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/鎶ヤ环鍗�/Sup_QuotePriceBillList.html">
       <publishTime>07/18/2024 16:37:42</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Add_Edit_Cg_POInStockBillList.html">
-      <publishTime>07/23/2024 11:05:41</publishTime>
+      <publishTime>08/12/2024 10:37:12</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBillList.html">
-      <publishTime>07/18/2024 15:34:20</publishTime>
+      <publishTime>08/06/2024 13:26:10</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/璇环鍗�/Sup_AskPriceBillEdit.html">
-      <publishTime>07/23/2024 13:55:30</publishTime>
+      <publishTime>08/09/2024 13:07:10</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/璇环鍗�/Sup_AskPriceBillList.html">
       <publishTime>07/18/2024 16:31:00</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Add_Edit_Cg_POInStockBackBillList.html">
-      <publishTime>07/23/2024 13:13:15</publishTime>
+      <publishTime>08/12/2024 10:46:21</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Cg_POInStockBackBillList.html">
       <publishTime>07/18/2024 15:35:56</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘鍚堝悓/Add_Edit_Cg_ContractBillList.html">
-      <publishTime>07/25/2024 14:09:39</publishTime>
+      <publishTime>08/12/2024 13:29:52</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘鍚堝悓/Cg_ContractBillList.html">
       <publishTime>07/18/2024 16:35:38</publishTime>
@@ -6402,19 +6429,19 @@
       <publishTime>07/09/2024 16:31:47</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘鐢宠鍗�/Cg_PORequestBill.html">
-      <publishTime>07/23/2024 13:18:24</publishTime>
+      <publishTime>08/12/2024 11:20:31</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘鐢宠鍗�/Cg_PORequestBillList.html">
       <publishTime>07/18/2024 16:08:55</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillCheckQuery.html">
-      <publishTime>07/03/2024 08:54:13</publishTime>
+      <publishTime>08/07/2024 09:10:40</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillEdit.html">
-      <publishTime>07/23/2024 11:05:27</publishTime>
+      <publishTime>08/12/2024 15:07:41</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList.html">
-      <publishTime>08/05/2024 14:46:06</publishTime>
+      <publishTime>08/07/2024 14:28:34</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList1111.html">
       <publishTime>10/19/2021 16:08:25</publishTime>
@@ -6444,7 +6471,7 @@
       <publishTime>03/11/2024 09:08:12</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鍏朵粬搴旀敹鍗�/YS_ReceiveOtherBillMain.html">
-      <publishTime>04/28/2024 08:42:16</publishTime>
+      <publishTime>08/12/2024 15:29:57</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鍏朵粬搴旀敹鍗�/YS_ReceiveOtherBillMain.htmlList.html">
       <publishTime>03/12/2024 12:06:32</publishTime>
@@ -6456,10 +6483,10 @@
       <publishTime>07/09/2024 16:31:47</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Add_Edit_Xs_SeOutStockBillList.html">
-      <publishTime>07/23/2024 14:03:12</publishTime>
+      <publishTime>08/12/2024 14:30:05</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Xs_SeOutStockBillList.html">
-      <publishTime>07/19/2024 08:26:47</publishTime>
+      <publishTime>08/07/2024 11:13:44</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/搴斾粯閫�娆惧崟/YF_PayMentBackBill.html">
       <publishTime>11/17/2023 14:59:01</publishTime>
@@ -6468,10 +6495,10 @@
       <publishTime>11/17/2023 14:59:01</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/搴旀敹鍗�/Xs_ReceivableBill.html">
-      <publishTime>07/30/2024 13:41:42</publishTime>
+      <publishTime>08/12/2024 15:26:36</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/搴旀敹鍗�/Xs_ReceivableBillList.html">
-      <publishTime>07/19/2024 08:54:51</publishTime>
+      <publishTime>08/07/2024 14:29:21</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/搴旀敹閫�娆惧崟/YS_ReceiveBackBill.html">
       <publishTime>05/17/2024 08:07:20</publishTime>
@@ -6483,7 +6510,7 @@
       <publishTime>05/17/2024 08:07:20</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鏀舵鍗�/YS_ReceiveBillList.html">
-      <publishTime>07/19/2024 08:33:23</publishTime>
+      <publishTime>08/07/2024 14:48:42</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鐗规壒鐢宠鍗�/Xs_ExceptiveCheckRequestBill.html">
       <publishTime>05/17/2024 08:07:20</publishTime>
@@ -6495,13 +6522,13 @@
       <publishTime>12/27/2021 13:54:32</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閫�璐ч�氱煡鍗�/Xs_SeOutStockBackBill.html">
-      <publishTime>07/23/2024 14:04:42</publishTime>
+      <publishTime>08/09/2024 14:18:12</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閫�璐ч�氱煡鍗�/Xs_SeOutStockBackBillList.html">
       <publishTime>07/19/2024 08:27:30</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞悎鍚�/Add_Edit_Xs_ContractBillList.html">
-      <publishTime>07/23/2024 14:13:18</publishTime>
+      <publishTime>08/12/2024 15:14:18</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞悎鍚�/Xs_ContractBillList.html">
       <publishTime>07/19/2024 08:31:26</publishTime>
@@ -6537,46 +6564,46 @@
       <publishTime>04/15/2024 13:00:49</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞鍗�/Add_Edit_Xs_SeOrderBillList.html">
-      <publishTime>07/23/2024 13:59:44</publishTime>
+      <publishTime>08/12/2024 14:24:21</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBillDyColList.html">
       <publishTime>04/15/2024 13:00:49</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBillList.html">
-      <publishTime>08/01/2024 11:23:40</publishTime>
+      <publishTime>08/07/2024 10:51:31</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/濮斿璁㈠崟/WW_EntrustOrderBillList.html">
       <publishTime>07/18/2024 15:09:02</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBillList.html">
-      <publishTime>07/18/2024 15:34:20</publishTime>
+      <publishTime>08/06/2024 13:26:10</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Cg_POInStockBackBillList.html">
       <publishTime>07/18/2024 15:35:56</publishTime>
     </File>
     <File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList.html">
-      <publishTime>08/05/2024 14:46:06</publishTime>
+      <publishTime>08/07/2024 14:28:34</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Xs_SeOutStockBillList.html">
-      <publishTime>07/19/2024 08:26:47</publishTime>
+      <publishTime>08/07/2024 11:13:44</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閫�璐ч�氱煡鍗�/Xs_SeOutStockBackBillList.html">
       <publishTime>07/19/2024 08:27:30</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBillList.html">
-      <publishTime>08/01/2024 11:23:40</publishTime>
+      <publishTime>08/07/2024 10:51:31</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBill_LookDown.html">
       <publishTime>04/15/2024 13:00:49</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞鍗曞彉鏇村崟/Xs_SeOrderChangeBill.html">
-      <publishTime>07/23/2024 14:18:10</publishTime>
+      <publishTime>08/12/2024 15:18:58</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞鍗曞彉鏇村崟/Xs_SeOrderChangeBillList.html">
       <publishTime>07/19/2024 08:50:10</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞皟浠峰崟/Xs_SellOutChangeBill.html">
-      <publishTime>07/23/2024 14:28:42</publishTime>
+      <publishTime>08/12/2024 15:32:17</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/閿�鍞皟浠峰崟/Xs_SellOutChangeBillList.html">
       <publishTime>07/19/2024 09:03:23</publishTime>
@@ -6840,16 +6867,16 @@
       <publishTime>04/15/2024 13:00:49</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBill.html">
-      <publishTime>07/23/2024 11:05:20</publishTime>
+      <publishTime>08/12/2024 15:07:32</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBill.html">
-      <publishTime>07/23/2024 11:05:20</publishTime>
+      <publishTime>08/12/2024 15:07:32</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBillList.html">
-      <publishTime>08/01/2024 11:23:40</publishTime>
+      <publishTime>08/07/2024 13:26:11</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBillList.html">
-      <publishTime>08/01/2024 11:23:40</publishTime>
+      <publishTime>08/07/2024 13:26:11</publishTime>
     </File>
     <File Include="views/棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBillList_BarCodeNote.html">
       <publishTime>04/28/2024 08:42:17</publishTime>
@@ -6981,7 +7008,7 @@
       <publishTime>03/07/2024 09:59:11</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Add_Edit_Kf_POStockInBillList.html">
-      <publishTime>07/23/2024 11:05:15</publishTime>
+      <publishTime>08/12/2024 11:04:23</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBill.html">
       <publishTime>04/15/2024 13:00:49</publishTime>
@@ -6990,13 +7017,13 @@
       <publishTime>07/18/2024 16:02:58</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBill_Add_Up.html">
-      <publishTime>07/23/2024 11:05:01</publishTime>
+      <publishTime>08/12/2024 11:14:56</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBillList.html">
-      <publishTime>07/18/2024 15:39:51</publishTime>
+      <publishTime>08/06/2024 13:28:53</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBillList.html">
-      <publishTime>07/18/2024 15:39:51</publishTime>
+      <publishTime>08/06/2024 13:28:53</publishTime>
     </File>
     <File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBill_Fast.html">
       <publishTime>04/15/2024 13:00:49</publishTime>
@@ -7038,7 +7065,7 @@
       <publishTime>06/06/2024 13:46:09</publishTime>
     </File>
     <File Include="Web.config">
-      <publishTime>08/05/2024 16:48:10</publishTime>
+      <publishTime>08/12/2024 15:36:56</publishTime>
     </File>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/WebTM/WebTM.csproj.user b/WebTM/WebTM.csproj.user
index 005e8c8..147597a 100644
--- a/WebTM/WebTM.csproj.user
+++ b/WebTM/WebTM.csproj.user
@@ -1,9 +1,9 @@
 锘�<?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <NameOfLastUsedPublishProfile>D:\鏅轰簯杩堟�漒MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
+    <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-LayUI\WebTM\Properties\PublishProfiles\JFTM.pubxml</NameOfLastUsedPublishProfile>
     <ProjectView>ProjectFiles</ProjectView>
-    <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
+    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
     <UseIISExpress>true</UseIISExpress>
     <Use64BitIISExpress />
     <IISExpressSSLPort />
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Material.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Material.html"
index 173bc0c..2a97da9 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Material.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Material.html"
@@ -152,7 +152,7 @@
                     </form>
                     <div class="layui-row" style="padding:10px 0">
                         <div class="layui-col-xs3 layui-inline" style="border: solid 1.5px #e0d6d64d;">
-                            <div id="TreeTable" class="demo-tree demo-tree-box" style="width:99.5%;height:calc(50vh);"></div>
+                            <div id="TreeTable" class="demo-tree demo-tree-box" style="width:99.5%;height:calc(50vh);overflow-y:auto"></div>
                             <div style="width:99.5%;height:calc(35vh);position: relative;">
                                 <!--//杞挱鍥�-->
                                 <div class="layui-carousel" id="test1" style="position:absolute;">
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 4ab62df..349b56a 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"
@@ -1239,15 +1239,17 @@
                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                         var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
                         var HExRate = $("#HExRate").val();                      //姹囩巼
-                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));      //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));      //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
 
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
                             HQty: HQty
@@ -1292,6 +1294,8 @@
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                         HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                         HRelTaxPrice = Number(HPrice.toFixed(HPriceDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
                             HQty: HQty
@@ -1339,6 +1343,8 @@
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                         HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                         HRelTaxPrice = Number(HPrice.toFixed(HPriceDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
                             HTaxRate: HTaxRate * 100
@@ -1373,18 +1379,18 @@
                         var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HPrice = obj.data.HPrice * 1;
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                         var HDiscountRate = obj.data.HDiscountRate * 1;     //鎶樻墸鐜�
-                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(4));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
 
                         //鏁板瓧绮惧害
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
-                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                         HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                         HRelTaxPrice = Number(HPrice.toFixed(HPriceDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
                             HTaxRate: HTaxRate * 100
@@ -1429,9 +1435,11 @@
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
-                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
-                        HRelTaxPrice = Number(HPrice.toFixed(HPriceDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({                    //鏇存柊琛ㄦ牸鏁版嵁                鏂规硶鏄瀵硅薄鎻愪緵鐨勪竴涓柟娉曪紝鐢ㄤ簬鏇存柊鍏跺唴閮ㄧ姸鎬佹垨涓庝箣鍏宠仈鐨勬暟鎹簮
                             HQty: HQty                               //鏇存柊HQty瀛楁锛孒Qty
@@ -1975,7 +1983,7 @@
                     if (event.key == "F7") {
                         //鐗╂枡
                         if (obj.event == "HMaterID") {
-                                var HOrgID = $("#HOrgID").val();
+                            var HOrgID = $("#HOrgID").val();  //鑾峰彇id="HOrgID"鐨勫厓绱犱腑鑾峰彇鍏跺�硷紝骞跺皢璇ュ�煎瓨鍌ㄥ湪鍙橀噺HOrgID涓�
                             layer.open({
                                 type: 2
                                 , skin: "layui-layer-rim" //鍔犱笂杈规
@@ -1997,60 +2005,74 @@
                                     OptionData = checkStatus.data[0];
                                     layer.close(index);//鍏抽棴寮圭獥
                                 }
-                               , end: function () {
-                                   //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
-                                   var HSupID = $("#HSupID").val();
-                                   if (HSupID != 0) {
-                                       $.ajax({
-                                           url: GetWEBURL() + "/Gy_Supplier/xg",
-                                           //url: "http://localhost:12761/Gy_Supplier/xg",
-                                           type: "GET",
-                                           data: {
-                                               "HInterID": HSupID
-                                           },
-                                           success: function (d) {
-                                               var HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�) * 0.01;
-                                               var HExRate = $("#HExRate").val();                      //姹囩巼
-                                               //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                                               var HQty = obj.data.HQty * 1;                           //鏁伴噺
-                                               var HPrice = obj.data.HPrice * 1;               //鍗曚环
-                                               var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                               var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                                               var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
-                                               var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
-                                               var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
-                                               var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(4));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
-                                               var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
-                                               obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
-                                                   "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
-                                                   , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
-                                                   , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
-                                                   , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
-                                                   , "HUnitID": OptionData.HUnitID
-                                                   , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
-                                                   , "HTaxRate": HTaxRate * 100
-                                                   , HQty: HQty                               //鏇存柊HQty瀛楁锛孒Qty
-                                                   , HPrice: HPrice                         //鏇存柊HPrice瀛楁锛孒Price
-                                                   , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
-                                                   , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
-                                                   , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
-                                                   , HTaxPrice, HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
-                                                   , HRelTaxPrice: HRelTaxPrice            //鏇存柊HRelTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐RelTaxPrice
-                                                   , HlineTotalBB: HlineTotalBB              //鏇存柊HlineTotalBB瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotalBB
-                                               })
-                                           }
-                                       });
-                                   } else {
-                                       obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
-                                           "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
-                                           , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
-                                           , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
-                                           , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
-                                           , "HUnitID": OptionData.HUnitID
-                                           , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
-                                       })
-                                   }
-                            }
+                                , end: function () {
+                                    //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+                                    var HSupID = $("#HSupID").val();
+                                    if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                        var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                        var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                        var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                        var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
+                                        $.ajax({
+                                            url: GetWEBURL() + "/Gy_Supplier/xg",
+                                            //url: "http://localhost:12761/Gy_Supplier/xg",
+                                            type: "GET",
+                                            data: {
+                                                "HInterID": HSupID
+                                            },
+                                            success: function (d) {
+                                                var HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�) * 0.01;
+                                                var HExRate = $("#HExRate").val();                      //姹囩巼
+                                                //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                                                var HQty = obj.data.HQty * 1;                           //鏁伴噺
+                                                var HPrice = obj.data.HPrice * 1;               //鍗曚环
+                                                var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                                                var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                                                var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+                                                var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                                var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
+                                                var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                                                var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+
+                                                //鏁板瓧绮惧害
+                                                HQty = Number(HQty.toFixed(HQtyDec));
+                                                HPrice = Number(HPrice.toFixed(HPriceDec));
+                                                HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                                HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                                HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                                HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                                                HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                                                HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
+                                                obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
+                                                    "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
+                                                    , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+                                                    , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+                                                    , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+                                                    , "HUnitID": OptionData.HUnitID
+                                                    , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+                                                    , "HTaxRate": HTaxRate * 100
+                                                    , HQty: HQty                               //鏇存柊HQty瀛楁锛孒Qty
+                                                    , HPrice: HPrice                         //鏇存柊HPrice瀛楁锛孒Price
+                                                    , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
+                                                    , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
+                                                    , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
+                                                    , HTaxPrice, HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
+                                                    , HRelTaxPrice: HRelTaxPrice            //鏇存柊HRelTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐RelTaxPrice
+                                                    , HlineTotalBB: HlineTotalBB              //鏇存柊HlineTotalBB瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotalBB
+                                                })
+                                            }
+                                        });
+                                    } else if (typeof (OptionData.HItemID) != "undefined") {
+                                        obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
+                                            "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
+                                            , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+                                            , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+                                            , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+                                            , "HUnitID": OptionData.HUnitID
+                                            , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+                                        })
+                                    }
+                                }
                             })
                         }
                         //璁¢噺鍗曚綅
@@ -2122,7 +2144,11 @@
                         , end: function () {
                             //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                             var HSupID = $("#HSupID").val();
-                            if (HSupID != 0) {
+                            if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                 $.ajax({
                                     url: GetWEBURL() + "/Gy_Supplier/xg",
                                     //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -2137,12 +2163,22 @@
                                         var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
-                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                                         var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
-                                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(4));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
-                                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+
+                                        //鏁板瓧绮惧害
+                                        HQty = Number(HQty.toFixed(HQtyDec));
+                                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                                         obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                             "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                             , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -2162,7 +2198,7 @@
                                         })
                                     }
                                 });
-                            } else {
+                            } else if (typeof (OptionData.HItemID) != "undefined"){
                                 obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                     "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                     , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\212\245\344\273\267\345\215\225/Sup_QuotePriceBillEdit.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\212\245\344\273\267\345\215\225/Sup_QuotePriceBillEdit.html"
index c5f4c20..794aae0 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\212\245\344\273\267\345\215\225/Sup_QuotePriceBillEdit.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\212\245\344\273\267\345\215\225/Sup_QuotePriceBillEdit.html"
@@ -431,7 +431,11 @@
                             end: function () {
                                 //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                                 var HSupID = $("#HSupID").val();
-                                if (HSupID != 0) {
+                                if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                    var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                    var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                    var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                    var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                     $.ajax({
                                         url: GetWEBURL() + "/Gy_Supplier/xg",
                                         //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -448,6 +452,13 @@
                                             var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
                                             var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
                                             var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                            //鏁板瓧绮惧害
+                                            HQty = Number(HQty.toFixed(HQtyDec));
+                                            HPrice = Number(HPrice.toFixed(HPriceDec));
+                                            HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                            HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                            HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                            HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                                             obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                                 "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                                 , "鐗╂枡浠g爜": OptionData.HNumber
@@ -465,7 +476,7 @@
                                             })
                                         }
                                     });
-                                } else {
+                                } else if (typeof (OptionData.HItemID) != "undefined") {
                                     obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                         "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                         , "鐗╂枡浠g爜": OptionData.HNumber
@@ -517,7 +528,7 @@
                 }
             })
             //#endregion
-
+            //鍙屽嚮
             $('.layui-table-box tbody td[data-field="HMaterNumber"]').off('dblclick').on('dblclick', function () {
                 layer.open({
                     type: 2,
@@ -545,7 +556,11 @@
                     end: function () {
                         //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                         var HSupID = $("#HSupID").val();
-                        if (HSupID != 0) {
+                        if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                            var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                            var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                            var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                            var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                             $.ajax({
                                 url: GetWEBURL() + "/Gy_Supplier/xg",
                                 //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -562,6 +577,13 @@
                                     var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
                                     var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
                                     var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                    //鏁板瓧绮惧害
+                                    HQty = Number(HQty.toFixed(HQtyDec));
+                                    HPrice = Number(HPrice.toFixed(HPriceDec));
+                                    HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                    HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                    HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                    HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                                     obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                         "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                         , "鐗╂枡浠g爜": OptionData.HNumber
@@ -579,7 +601,7 @@
                                     })
                                 }
                             });
-                        } else {
+                        } else if (typeof (OptionData.HItemID) != "undefined"){
                             obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                 "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                 , "鐗╂枡浠g爜": OptionData.HNumber
@@ -637,6 +659,7 @@
                     HQty = Number(HQty.toFixed(HQtyDec));
                     HPrice = Number(HPrice.toFixed(HPriceDec));
                     HMoney = Number(HMoney.toFixed(HMoneyDec));
+                    HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                     HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                     obj.update({     //鏇存柊琛ㄦ牸鏁版嵁                鏂规硶鏄瀵硅薄鎻愪緵鐨勪竴涓柟娉曪紝鐢ㄤ簬鏇存柊鍏跺唴閮ㄧ姸鎬佹垨涓庝箣鍏宠仈鐨勬暟鎹簮
@@ -677,6 +700,7 @@
                     HQty = Number(HQty.toFixed(HQtyDec));
                     HPrice = Number(HPrice.toFixed(HPriceDec));
                     HMoney = Number(HMoney.toFixed(HMoneyDec));
+                    HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                     HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                     HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
@@ -719,6 +743,7 @@
                     HQty = Number(HQty.toFixed(HQtyDec));
                     HPrice = Number(HPrice.toFixed(HPriceDec));
                     HMoney = Number(HMoney.toFixed(HMoneyDec));
+                    HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                     HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                     HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
@@ -758,6 +783,7 @@
                     HQty = Number(HQty.toFixed(HQtyDec));
                     HPrice = Number(HPrice.toFixed(HPriceDec));
                     HMoney = Number(HMoney.toFixed(HMoneyDec));
+                    HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                     HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                     HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
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 a9a56ce..7428fe3 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"
@@ -620,12 +620,17 @@
                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                         var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
-                            HQty: Number(HQty.toFixed(HQtyDec))
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
                             , HTaxMoney: HTaxMoney
                         });
                         table.render(option)
@@ -648,15 +653,20 @@
                         var HPrice = value * 1;
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                         var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(HPriceDec));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HTaxPrice = Number(HPrice * (1 + HTaxRate));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                         var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
-
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
-                            HQty: Number(HQty.toFixed(HQtyDec))
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
                             , HTaxMoney: HTaxMoney
                             , HTaxPrice, HTaxPrice
                         });
@@ -681,16 +691,22 @@
                         var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HPrice = obj.data.HPrice * 1;
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(HPriceDec));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                         var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
-
+                        //鏁板瓧绮惧害
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
                             HTaxRate: HTaxRate * 100
-                            , HQty: Number(HQty.toFixed(HQtyDec))
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))
+                            , HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
                             , HTaxMoney: HTaxMoney
                             , HTaxPrice: HTaxPrice
                         });
@@ -715,17 +731,22 @@
                         var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HPrice = obj.data.HPrice * 1;
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(HPriceDec));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                         var HDiscountRate = obj.data.HDiscountRate * 1;     //鎶樻墸鐜�
 
-
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
                             HTaxRate: HTaxRate * 100
-                            , HQty: Number(HQty.toFixed(HQtyDec))
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))
+                            , HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
                             , HTaxMoney: HTaxMoney
                             , HTaxPrice: HTaxPrice
                             , HDiscountRate: HDiscountRate
@@ -750,11 +771,16 @@
                         var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HTaxPrice = value * 1;                    //鍚◣鍗曚环
                         var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
-                        var HPrice = Number((HTaxPrice / (1 + HTaxRate)).toFixed(4));                         //鍗曚环 = 鍚◣鍗曚环/(1+绋庣巼)
+                        var HPrice = Number((HTaxPrice / (1 + HTaxRate)));                         //鍗曚环 = 鍚◣鍗曚环/(1+绋庣巼)
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                         var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
-
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({                    //鏇存柊琛ㄦ牸鏁版嵁                鏂规硶鏄瀵硅薄鎻愪緵鐨勪竴涓柟娉曪紝鐢ㄤ簬鏇存柊鍏跺唴閮ㄧ姸鎬佹垨涓庝箣鍏宠仈鐨勬暟鎹簮
                              HQty: Number(HQty.toFixed(HQtyDec))
@@ -1564,26 +1590,24 @@
                     if (event.key == "F7") {
                         //鐗╂枡
                         if (obj.event == "HMaterID") {
-                           var HOrgID = $("#HOrgID").val();
-                            layer.open({
-                                type: 2
+                            var HOrgID = $("#HOrgID").val();  //鑾峰彇id="HOrgID"鐨勫厓绱犱腑鑾峰彇鍏跺�硷紝骞跺皢璇ュ�煎瓨鍌ㄥ湪鍙橀噺HOrgID涓�
+                            layer.open({  //鎵撳紑灞�
+                                type: 2         // //琛ㄧず寮瑰嚭灞傜殑鍐呭鏄竴涓� iframe       绫诲瀷涓�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) {
+                                , 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("璇烽�夋嫨涓�鏉℃暟鎹�");
-                                    //}
-                                    OptionData = checkStatus.data[0];
+                                    OptionData = checkStatus.data[0];  //鎶婇�変腑鏁版嵁鐨勭涓�鏉¤祴鍊肩粰OptionData鍙橀噺
+                                    var TaxRate = getHTaxRateByHSupID();
                                     if (checkStatus.data.length > 1) {
                                         var rowIndex = $(obj.tr).attr("data-index") * 1;
                                         for (var i = 0; i < checkStatus.data.length; i++) {
@@ -1599,9 +1623,6 @@
 
                                                 table.render(option);
                                             }
-
-
-
                                             var HMaterID = checkStatus.data[i].HItemID;
                                             var resultData = getMaterialByMaterID(HMaterID);
                                             option.data[rowIndex + i].HMaterID = resultData.HMaterID;
@@ -1610,6 +1631,7 @@
                                             option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
                                             option.data[rowIndex + i].HUnitID = resultData.HUnitID;
                                             option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
+                                            option.data[rowIndex + i].HTaxRate = TaxRate;
                                             ////鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                             //obj.update({
                                             //    "HMaterID": checkStatus.data[0].HItemID
@@ -1623,17 +1645,21 @@
                                         }
                                         table.render(option);
                                     }
-                                    layer.closeAll();
+                                    layer.closeAll();  //鍏抽棴鎵�鏈夐�氳繃layer
                                     //layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                                 }
-                                , btn2: function (index, layero) {
+                                , btn2: function (index, layero) {   //褰撶偣鍑烩�滃彇娑堚�濇寜閽椂浼氳璋冪敤
                                     //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
                                     //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
                                 },
                                 end: function () {
                                     //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                                     var HSupID = $("#HSupID").val();
-                                    if (HSupID != 0) {
+                                    if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                        var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                        var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                        var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                        var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                         $.ajax({
                                             url: GetWEBURL() + "/Gy_Supplier/xg",
                                             //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1647,8 +1673,14 @@
                                                 var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                                 var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                                 var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                                var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                                                var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                                var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                                                var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                                //鏁板瓧绮惧害
+                                                HQty = Number(HQty.toFixed(HQtyDec));
+                                                HPrice = Number(HPrice.toFixed(HPriceDec));
+                                                HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                                HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                                HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                                                 obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                                     "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                                     , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1665,7 +1697,7 @@
                                                 })
                                             }
                                         });
-                                    } else {
+                                    } else if (typeof (OptionData.HItemID) != "undefined") {
                                         obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                             "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                             , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1675,8 +1707,9 @@
                                             , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
                                         })
                                     }
+
                                 }
-                                });
+                            });
                         }
                         //璁¢噺鍗曚綅
                         if (obj.event == "HUnitID") {
@@ -1843,6 +1876,7 @@
                             var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
 
                             OptionData = checkStatus.data[0];  //鎶婇�変腑鏁版嵁鐨勭涓�鏉¤祴鍊肩粰OptionData鍙橀噺
+                            var TaxRate = getHTaxRateByHSupID();
                             if (checkStatus.data.length > 1) {
                                 var rowIndex = $(obj.tr).attr("data-index") * 1;
                                 for (var i = 0; i < checkStatus.data.length; i++) {
@@ -1858,9 +1892,6 @@
 
                                         table.render(option);
                                     }
-
-
-
                                     var HMaterID = checkStatus.data[i].HItemID;
                                     var resultData = getMaterialByMaterID(HMaterID);
                                     option.data[rowIndex + i].HMaterID = resultData.HMaterID;
@@ -1869,6 +1900,7 @@
                                     option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
                                     option.data[rowIndex + i].HUnitID = resultData.HUnitID;
                                     option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
+                                    option.data[rowIndex + i].HTaxRate = TaxRate;
                                     ////鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                     //obj.update({
                                     //    "HMaterID": checkStatus.data[0].HItemID
@@ -1892,7 +1924,11 @@
                         end: function () {
                             //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                             var HSupID = $("#HSupID").val();
-                            if (HSupID != 0) {
+                            if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                 $.ajax({
                                     url: GetWEBURL() + "/Gy_Supplier/xg",
                                     //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1906,8 +1942,14 @@
                                         var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                        //鏁板瓧绮惧害
+                                        HQty = Number(HQty.toFixed(HQtyDec));
+                                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                                         obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                             "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                             , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1924,7 +1966,7 @@
                                         })
                                     }
                                 });
-                            } else {
+                            } else if (typeof (OptionData.HItemID) != "undefined"){
                                 obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                     "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                     , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -2169,6 +2211,30 @@
             }
             //#endregion
 
+            //#region 閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+            function getHTaxRateByHSupID() {
+                var HTaxRate;
+                //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+                var HSupID = $("#HSupID").val();
+                if (HSupID != 0) {
+                    $.ajax({
+                        url: GetWEBURL() + "/Gy_Supplier/xg",
+                        type: "GET",
+                        async: false,
+                        data: {
+                            "HInterID": HSupID
+                        },
+                        success: function (d) {
+                            HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�);
+                        }
+                    });
+                } else {
+                    HTaxRate = 0;
+                }
+                return HTaxRate;
+            }
+            //#endregion
+
           //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢噰璐鍗曟暟鎹�
             function getPushSource_POOrderBillInit(HSourceInterID, HSourceEntryID) {
                 var res = "none";
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 6b157cd..68bb4a4 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"
@@ -781,12 +781,16 @@
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                         var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
                         var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
-                            HQty: Number(HQty.toFixed(HQtyDec))
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney:HMoney
                             , HTaxMoney: HTaxMoney
                         });
                         table.render(option)
@@ -810,12 +814,16 @@
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                         var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
                         var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
-                            HQty: Number(HQty.toFixed(HQtyDec))
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
                             , HTaxMoney: HTaxMoney
                         });
                         table.render(option)
@@ -840,13 +848,17 @@
                         var HPrice = obj.data.HPrice * 1;
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                         var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
                             HTaxRate: HTaxRate * 100
-                            , HQty: Number(HQty.toFixed(HQtyDec))
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))
+                            , HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
                             , HTaxMoney: HTaxMoney
                         });
                         break;
@@ -1345,26 +1357,25 @@
                     if (event.key == "F7") {
                         //鐗╂枡
                         if (obj.event == "HMaterID") {
-                            var HOrgID = $("#HOrgID").val();
-                            layer.open({
-                                type: 2
+                            var HOrgID = $("#HOrgID").val();  //鑾峰彇id="HOrgID"鐨勫厓绱犱腑鑾峰彇鍏跺�硷紝骞跺皢璇ュ�煎瓨鍌ㄥ湪鍙橀噺HOrgID涓�
+                            layer.open({  //鎵撳紑灞�
+                                type: 2         // //琛ㄧず寮瑰嚭灞傜殑鍐呭鏄竴涓� iframe       绫诲瀷涓�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) {
+                                , 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("璇烽�夋嫨涓�鏉℃暟鎹�");
-                                    //}
-                                    OptionData = checkStatus.data[0];
+                                    OptionData = checkStatus.data[0];  //鎶婇�変腑鏁版嵁鐨勭涓�鏉¤祴鍊肩粰OptionData鍙橀噺
+                                    var TaxRate = getHTaxRateByHSupID();
+                                    //閫変腑澶氳鏃�
                                     if (checkStatus.data.length > 1) {
                                         var rowIndex = $(obj.tr).attr("data-index") * 1;
                                         for (var i = 0; i < checkStatus.data.length; i++) {
@@ -1391,62 +1402,71 @@
                                             option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
                                             option.data[rowIndex + i].HUnitID = resultData.HUnitID;
                                             option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
-
+                                            option.data[rowIndex + i].HTaxRate = TaxRate;
 
                                         }
                                         table.render(option);
                                     }
-                                    
-                                    layer.closeAll();
+                                    layer.closeAll();  //鍏抽棴鎵�鏈夐�氳繃layer
                                     //layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                                 }
-                                , btn2: function (index, layero) {
+                                , btn2: function (index, layero) {   //褰撶偣鍑烩�滃彇娑堚�濇寜閽椂浼氳璋冪敤
                                     //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
                                     //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
                                 },
-                                 end: function () {
-                                     //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
-                                     var HSupID = $("#HSupID").val();
-                                     if (HSupID != 0) {
-                                         $.ajax({
-                                             url: GetWEBURL() + "/Gy_Supplier/xg",
-                                             //url: "http://localhost:12761/Gy_Supplier/xg",
-                                             type: "GET",
-                                             data: {
-                                                 "HInterID": HSupID
-                                             },
-                                             success: function (d) {
-                                                 var HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�) * 0.01;
-                                                 //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                                                 var HQty = obj.data.HQty * 1;                           //鏁伴噺
-                                                 var HPrice = obj.data.HPrice * 1;               //鍗曚环
-                                                 var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                                 var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                                                 obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
-                                                     "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
-                                                     , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
-                                                     , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
-                                                     , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
-                                                     , "HUnitID": OptionData.HUnitID
-                                                     , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
-                                                     , "HTaxRate": HTaxRate * 100
-                                                     , HQty: HQty                               //鏇存柊HQty瀛楁锛孒Qty
-                                                     , HPrice: HPrice                         //鏇存柊HPrice瀛楁锛孒Price
-                                                     , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
-                                                     , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
-                                                 })
-                                             }
-                                         });
-                                     } else {
-                                         obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
-                                             "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
-                                             , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
-                                             , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
-                                             , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
-                                             , "HUnitID": OptionData.HUnitID
-                                             , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
-                                         })
-                                     }
+                                end: function () {
+                                    //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+                                    var HSupID = $("#HSupID").val();
+                                    if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                        var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                        var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                        var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                        var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
+                                        $.ajax({
+                                            url: GetWEBURL() + "/Gy_Supplier/xg",
+                                            //url: "http://localhost:12761/Gy_Supplier/xg",
+                                            type: "GET",
+                                            data: {
+                                                "HInterID": HSupID
+                                            },
+                                            success: function (d) {
+                                                var HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�) * 0.01;
+                                                //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                                                var HQty = obj.data.HQty * 1;                           //鏁伴噺
+                                                var HPrice = obj.data.HPrice * 1;               //鍗曚环
+                                                var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                                                var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                                                //鏁板瓧绮惧害
+                                                HQty = Number(HQty.toFixed(HQtyDec));
+                                                HPrice = Number(HPrice.toFixed(HPriceDec));
+                                                HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                                HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                                obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
+                                                    "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
+                                                    , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+                                                    , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+                                                    , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+                                                    , "HUnitID": OptionData.HUnitID
+                                                    , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+                                                    , "HTaxRate": HTaxRate * 100
+                                                    , HQty: HQty                               //鏇存柊HQty瀛楁锛孒Qty
+                                                    , HPrice: HPrice                         //鏇存柊HPrice瀛楁锛孒Price
+                                                    , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
+                                                    , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
+                                                })
+                                            }
+                                        });
+                                    } else if (typeof (OptionData.HItemID) != "undefined") {
+                                        obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
+                                            "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
+                                            , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+                                            , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+                                            , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+                                            , "HUnitID": OptionData.HUnitID
+                                            , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+                                        })
+                                    }
+
                                 }
                             });
                         }
@@ -1614,6 +1634,7 @@
                             var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
 
                             OptionData = checkStatus.data[0];  //鎶婇�変腑鏁版嵁鐨勭涓�鏉¤祴鍊肩粰OptionData鍙橀噺
+                            var TaxRate = getHTaxRateByHSupID();
                             //閫変腑澶氳鏃�
                             if (checkStatus.data.length > 1) {
                                 var rowIndex = $(obj.tr).attr("data-index") * 1;
@@ -1641,7 +1662,7 @@
                                     option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
                                     option.data[rowIndex + i].HUnitID = resultData.HUnitID;
                                     option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
-
+                                    option.data[rowIndex + i].HTaxRate = TaxRate;
 
                                 }
                                 table.render(option);
@@ -1656,7 +1677,11 @@
                         end: function () {
                             //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                             var HSupID = $("#HSupID").val();
-                            if (HSupID != 0) {
+                            if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                 $.ajax({
                                     url: GetWEBURL() + "/Gy_Supplier/xg",
                                     //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1670,7 +1695,12 @@
                                         var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                                        //鏁板瓧绮惧害
+                                        HQty = Number(HQty.toFixed(HQtyDec));
+                                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                                         obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                             "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                             , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1686,7 +1716,7 @@
                                         })
                                     }
                                 });
-                            } else {
+                            } else if (typeof (OptionData.HItemID) != "undefined"){
                                 obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                     "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                     , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1881,6 +1911,31 @@
                 })
             }
             //#endregion
+
+            //#region 閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+            function getHTaxRateByHSupID() {
+                var HTaxRate;
+                //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+                var HSupID = $("#HSupID").val();
+                if (HSupID != 0) {
+                    $.ajax({
+                        url: GetWEBURL() + "/Gy_Supplier/xg",
+                        type: "GET",
+                        async: false,
+                        data: {
+                            "HInterID": HSupID
+                        },
+                        success: function (d) {
+                            HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�);
+                        }
+                    });
+                } else {
+                    HTaxRate = 0;
+                }
+                return HTaxRate;
+            }
+            //#endregion
+
          //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢噰璐鍗曟暟鎹�
             function getPushSource_POOrderBillInit(HSourceInterID, HSourceEntryID) {
                 var res = "none";
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html"
index 56c7066..d78a18c 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html"
@@ -609,13 +609,14 @@
                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                         var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
                         var HExRate = $("#HExRate").val();                      //姹囩巼
                         //鏁板瓧绮惧害
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({             //鏇存柊琛ㄦ牸鏁版嵁                鏂规硶鏄瀵硅薄鎻愪緵鐨勪竴涓柟娉曪紝鐢ㄤ簬鏇存柊鍏跺唴閮ㄧ姸鎬佹垨涓庝箣鍏宠仈鐨勬暟鎹簮
@@ -652,6 +653,7 @@
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
@@ -691,6 +693,7 @@
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
@@ -1110,6 +1113,7 @@
                                     //    return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                                     //}
                                     OptionData = checkStatus.data[0];
+                                    var TaxRate = getHTaxRateByHSupID();
                                     if (checkStatus.data.length > 1) {
                                         var rowIndex = $(obj.tr).attr("data-index") * 1;
                                         for (var i = 0; i < checkStatus.data.length; i++) {
@@ -1133,7 +1137,7 @@
                                             option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
                                             option.data[rowIndex + i].HUnitID = resultData.HUnitID;
                                             option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
-
+                                            option.data[rowIndex + i].HTaxRate = TaxRate;
                                         }
                                         table.render(option);
                                     }
@@ -1147,7 +1151,11 @@
                                 end: function () {
                                     //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                                     var HSupID = $("#HSupID").val();
-                                    if (HSupID != 0) {
+                                    if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                        var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                        var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                        var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                        var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                         $.ajax({
                                             url: GetWEBURL() + "/Gy_Supplier/xg",
                                             //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1161,8 +1169,14 @@
                                                 var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                                 var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                                 var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                                var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                                                var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                                                 var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+                                                //鏁板瓧绮惧害
+                                                HQty = Number(HQty.toFixed(HQtyDec));
+                                                HPrice = Number(HPrice.toFixed(HPriceDec));
+                                                HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                                HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                                HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                                                 obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                                     "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                                     , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1179,7 +1193,7 @@
                                                 })
                                             }
                                         });
-                                    } else {
+                                    } else if (typeof (OptionData.HItemID) != "undefined") {
                                         obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                             "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                             , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1289,6 +1303,7 @@
                             //    return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                             //}
                             OptionData = checkStatus.data[0];
+                            var TaxRate = getHTaxRateByHSupID();
                             if (checkStatus.data.length > 1) {
                                 var rowIndex = $(obj.tr).attr("data-index") * 1;
                                 for (var i = 0; i < checkStatus.data.length; i++) {
@@ -1312,7 +1327,7 @@
                                     option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
                                     option.data[rowIndex + i].HUnitID = resultData.HUnitID;
                                     option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
-
+                                    option.data[rowIndex + i].HTaxRate = TaxRate;
                                 }
                                 table.render(option);
                             }
@@ -1326,7 +1341,11 @@
                         end: function () {
                             //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                             var HSupID = $("#HSupID").val();
-                            if (HSupID != 0) {
+                            if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                 $.ajax({
                                     url: GetWEBURL() + "/Gy_Supplier/xg",
                                     //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1340,8 +1359,14 @@
                                         var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+                                        //鏁板瓧绮惧害
+                                        HQty = Number(HQty.toFixed(HQtyDec));
+                                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                                         obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                             "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                             , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1358,7 +1383,7 @@
                                         })
                                     }
                                 });
-                            } else {
+                            } else if (typeof (OptionData.HItemID) != "undefined") {
                                 obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                     "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                     , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1573,6 +1598,30 @@
             }
             //#endregion
 
+            //#region 閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+            function getHTaxRateByHSupID() {
+                var HTaxRate;
+                //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+                var HSupID = $("#HSupID").val();
+                if (HSupID != 0) {
+                    $.ajax({
+                        url: GetWEBURL() + "/Gy_Supplier/xg",
+                        type: "GET",
+                        async: false,
+                        data: {
+                            "HInterID": HSupID
+                        },
+                        success: function (d) {
+                            HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�);
+                        }
+                    });
+                } else {
+                    HTaxRate = 0;
+                }
+                return HTaxRate;
+            }
+            //#endregion
+
             //#region 淇濆瓨鍚庢祻瑙堟柟娉�
             function ReRoadBillMain() {
                 location.replace('Add_Edit_Cg_POInStockBillList.html?OperationType=4&linterid=' + linterid + '&HSouceBillType=');
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 1a565dd..6d884bc 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"
@@ -650,16 +650,22 @@
                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                         var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
                         var HExRate = $("#HExRate").val();                      //姹囩巼
-                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));      //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
-
+                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));      //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({     //鏇存柊琛ㄦ牸鏁版嵁                鏂规硶鏄瀵硅薄鎻愪緵鐨勪竴涓柟娉曪紝鐢ㄤ簬鏇存柊鍏跺唴閮ㄧ姸鎬佹垨涓庝箣鍏宠仈鐨勬暟鎹簮
-                            HQty: Number(HQty.toFixed(HQtyDec))                            //鏇存柊HQty瀛楁锛屽叾鍊兼潵鑷彉閲廐Qty
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))                             //鏇存柊HPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐Price
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))                         //鏇存柊HMoney瀛楁锛屽叾鍊兼潵鑷彉閲廐Money
+                            HQty: HQty                 //鏇存柊HQty瀛楁锛屽叾鍊兼潵鑷彉閲廐Qty
+                            , HPrice: HPrice                           //鏇存柊HPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐Price
+                            , HMoney: HMoney                       //鏇存柊HMoney瀛楁锛屽叾鍊兼潵鑷彉閲廐Money
                             , HTaxMoney: HTaxMoney                       //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
                             , HlineTotal: HlineTotal                         //鏇存柊HlineTotal瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotal
                             , HlineTotalBB: HlineTotalBB                     //鏇存柊HlineTotalBB瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotalBB
@@ -685,19 +691,27 @@
                         var HPrice = value * 1;
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                         var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
-                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(HPriceDec));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                         var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
-                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(HPriceDec));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
                         var HExRate = $("#HExRate").val();                      //姹囩巼
-                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
-
+                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({                    //鏇存柊琛ㄦ牸鏁版嵁                鏂规硶鏄瀵硅薄鎻愪緵鐨勪竴涓柟娉曪紝鐢ㄤ簬鏇存柊鍏跺唴閮ㄧ姸鎬佹垨涓庝箣鍏宠仈鐨勬暟鎹簮
-                            HQty: Number(HQty.toFixed(HQtyDec))                                //鏇存柊HQty瀛楁锛孒Qty
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))                       //鏇存柊HPrice瀛楁锛孒Price
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))                      //鏇存柊HMoney瀛楁锛孒Money
+                            HQty: HQty                          //鏇存柊HQty瀛楁锛孒Qty
+                            , HPrice: HPrice                     //鏇存柊HPrice瀛楁锛孒Price
+                            , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
                             , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
                             , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
                             , HTaxPrice, HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
@@ -725,20 +739,28 @@
                         var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HPrice = obj.data.HPrice * 1;                   //鍗曚环
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(HPriceDec));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
                         var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
-                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(HPriceDec));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
                         var HExRate = $("#HExRate").val();                       //姹囩巼
-                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));       //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
-
+                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));       //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({   //鏇存柊琛ㄦ牸鏁版嵁
                             HTaxRate: HTaxRate * 100
-                            , HQty: Number(HQty.toFixed(HQtyDec))
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))
+                            , HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
                             , HTaxMoney: HTaxMoney
                             , HTaxPrice: HTaxPrice
                             , HlineTotal: HlineTotal
@@ -767,25 +789,30 @@
                         var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HPrice = obj.data.HPrice * 1;
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(HPriceDec));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                         var HDiscountRate = obj.data.HDiscountRate * 1;     //鎶樻墸鐜�
-                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(HPriceDec));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
-
+                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
                             HTaxRate: HTaxRate * 100                //灏咹TaxRate灞炴�х殑鍊间箻浠�100锛屽苟鏇存柊涓烘柊鐨勫��    绋庣巼涔�100  浠庡皬鏁扮被鍨嬪彉涓烘暣鏁版垨娴偣鍨�      
-                            , HQty: Number(HQty.toFixed(HQtyDec))                   //鏇存柊HQty瀛楁锛岋紝鍏跺�兼潵鑷彉閲廐Qty
-                            , HPrice: Number(HPrice.toFixed(HPriceDec))                 //鏇存柊HPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐Price
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))                        //鏇存柊HMoney瀛楁锛屽叾鍊兼潵鑷彉閲廐Money
+                            , HQty: HQty                //鏇存柊HQty瀛楁锛岋紝鍏跺�兼潵鑷彉閲廐Qty
+                            , HPrice: HPrice                 //鏇存柊HPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐Price
+                            , HMoney: HMoney                       //鏇存柊HMoney瀛楁锛屽叾鍊兼潵鑷彉閲廐Money
                             , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛屽叾鍊兼潵鑷彉閲廐TaxMoney
                             , HTaxPrice: HTaxPrice                  //鏇存柊HTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐TaxPrice
                             , HDiscountRate: HDiscountRate                  //鏇存柊HDiscountRate瀛楁锛屽叾鍊兼潵鑷彉閲廐DiscountRate
                             , HRelTaxPrice: HRelTaxPrice                  //鏇存柊HRelTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐RelTaxPrice
                         });
                         break;
-                        
                     case "HTaxPrice":                                         //鍚◣鍗曚环
                         //鏁版嵁鏍煎紡鏍¢獙  
                         temp = value + "";     //淇敼鍚庣殑鍊� 杞负瀛楃涓� 璧嬪�肩粰  鍙橀噺temp
@@ -804,23 +831,31 @@
                         var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HTaxPrice = value * 1;                    //鍚◣鍗曚环
                         var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
-                        var HPrice = Number((HTaxPrice / (1 + HTaxRate)).toFixed(HPriceDec));                         //鍗曚环 = 鍚◣鍗曚环/(1+绋庣巼)
+                        var HPrice = Number((HTaxPrice / (1 + HTaxRate)));                         //鍗曚环 = 鍚◣鍗曚环/(1+绋庣巼)
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
                         var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
-                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(HPriceDec));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
                         var HExRate = $("#HExRate").val();                      //姹囩巼
-                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
-
+                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({                    //鏇存柊琛ㄦ牸鏁版嵁                鏂规硶鏄瀵硅薄鎻愪緵鐨勪竴涓柟娉曪紝鐢ㄤ簬鏇存柊鍏跺唴閮ㄧ姸鎬佹垨涓庝箣鍏宠仈鐨勬暟鎹簮
-                            HQty: Number(HQty.toFixed(HQtyDec))                                //鏇存柊HQty瀛楁锛孒Qty
+                            HQty: HQty                               //鏇存柊HQty瀛楁锛孒Qty
                             , HPrice: HPrice                         //鏇存柊HPrice瀛楁锛孒Price
-                            , HMoney: Number(HMoney.toFixed(HMoneyDec))                        //鏇存柊HMoney瀛楁锛孒Money
+                            , HMoney: HMoney                       //鏇存柊HMoney瀛楁锛孒Money
                             , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
                             , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
-                            , HTaxPrice :Number(HTaxPrice.toFixed(HPriceDec))                    //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
+                            , HTaxPrice :HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
                             , HRelTaxPrice: HRelTaxPrice            //鏇存柊HRelTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐RelTaxPrice
                             , HlineTotalBB: HlineTotalBB              //鏇存柊HlineTotalBB瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotalBB
                         });
@@ -1194,7 +1229,6 @@
                         //鐗╂枡
                         if (obj.event == "HMaterID") {//鍒ゆ柇浼犲叆鐨刼bj瀵硅薄鐨別vent灞炴�ф槸鍚︾瓑浜庡瓧绗︿覆"HMaterID"
                             var HOrgID = $("#HOrgID").val();  //鑾峰彇id="HOrgID"鐨勫厓绱犱腑鑾峰彇鍏跺�硷紝骞跺皢璇ュ�煎瓨鍌ㄥ湪鍙橀噺HOrgID涓�
-
                             layer.open({  //鎵撳紑灞�
                                 type: 2         // //琛ㄧず寮瑰嚭灞傜殑鍐呭鏄竴涓� iframe       绫诲瀷涓�2
                                 , skin: "layui-layer-rim" //鍔犱笂杈规
@@ -1209,8 +1243,8 @@
                                     //鎸夐挳涓�  鐨勫洖璋�
                                     var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
                                     var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
-
                                     OptionData = checkStatus.data[0];  //鎶婇�変腑鏁版嵁鐨勭涓�鏉¤祴鍊肩粰OptionData鍙橀噺
+                                    var TaxRate = getHTaxRateByHSupID();
                                     //閫変腑澶氳鏃�
                                     if (checkStatus.data.length > 1) {
                                         var rowIndex = $(obj.tr).attr("data-index") * 1;  //attr("data-index")鐢ㄤ簬鑾峰彇璇r鍏冪礌涓奷ata-index灞炴�х殑鍊�*1杞崲绫诲瀷鐒跺悗璧嬪�肩粰rowIndex
@@ -1226,9 +1260,6 @@
 
                                                 table.render(option);//娓叉煋鐣岄潰
                                             }
-
-
-
                                             var HMaterID = checkStatus.data[i].HItemID; //checkStatus.data鏁扮粍涓殑褰撳墠鍏冪礌锛堢储寮曚负i锛変腑鑾峰彇HItemID灞炴�х殑鍊� 骞惰祴鍊肩粰HMaterID
                                             var resultData = getMaterialByMaterID(HMaterID);  //浣跨敤HMaterID浣滀负鍙傛暟鏉ヨ皟鐢╣etMaterialByMaterID鍑芥暟鏉ヨ幏鍙栬鐗╂枡鐨勮缁嗕俊鎭�
                                             option.data[rowIndex + i].HMaterID = resultData.HMaterID;  //灏唎ption.data鏁扮粍涓搴旇鐨凥MaterID灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID
@@ -1238,6 +1269,7 @@
                                             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 = 1;  //灏嗗搴旇鐨凥Qty灞炴�э紙鍙兘浠h〃鏁伴噺锛夎缃负1銆傝繖琛ㄧず瀵逛簬姣忎釜閫変腑鐨勭墿鏂欙紝鍏堕粯璁ゆ暟閲忚璁剧疆涓�1
+                                            option.data[rowIndex + i].HTaxRate = TaxRate;
                                         }
                                         table.render(option); //閲嶆柊娓叉煋琛ㄦ牸浠ユ樉绀烘洿鏂板悗鐨勬暟鎹�
                                     }
@@ -1252,7 +1284,11 @@
                                 end: function () {
                                     //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                                     var HSupID = $("#HSupID").val();
-                                    if (HSupID != 0) {
+                                    if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                        var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                        var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                        var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                        var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                         $.ajax({
                                             url: GetWEBURL() + "/Gy_Supplier/xg",
                                             //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1267,12 +1303,21 @@
                                                 var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                                 var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                                 var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                                var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                                                var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                                                 var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
-                                                var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                                var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                                                 var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
-                                                var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(4));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
-                                                var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                                                var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                                                var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                                                //鏁板瓧绮惧害
+                                                HQty = Number(HQty.toFixed(HQtyDec));
+                                                HPrice = Number(HPrice.toFixed(HPriceDec));
+                                                HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                                HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                                HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                                HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                                                HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                                                HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                                                 obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                                     "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                                     , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1400,8 +1445,8 @@
                             //鎸夐挳涓�  鐨勫洖璋�
                             var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
                             var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
-
                             OptionData = checkStatus.data[0];  //鎶婇�変腑鏁版嵁鐨勭涓�鏉¤祴鍊肩粰OptionData鍙橀噺
+                            var TaxRate = getHTaxRateByHSupID();
                             //閫変腑澶氳鏃�
                             if (checkStatus.data.length > 1) {
                                 var rowIndex = $(obj.tr).attr("data-index") * 1;  //attr("data-index")鐢ㄤ簬鑾峰彇璇r鍏冪礌涓奷ata-index灞炴�х殑鍊�*1杞崲绫诲瀷鐒跺悗璧嬪�肩粰rowIndex
@@ -1417,9 +1462,6 @@
 
                                         table.render(option);//娓叉煋鐣岄潰
                                     }
-
-
-
                                     var HMaterID = checkStatus.data[i].HItemID; //checkStatus.data鏁扮粍涓殑褰撳墠鍏冪礌锛堢储寮曚负i锛変腑鑾峰彇HItemID灞炴�х殑鍊� 骞惰祴鍊肩粰HMaterID
                                     var resultData = getMaterialByMaterID(HMaterID);  //浣跨敤HMaterID浣滀负鍙傛暟鏉ヨ皟鐢╣etMaterialByMaterID鍑芥暟鏉ヨ幏鍙栬鐗╂枡鐨勮缁嗕俊鎭�
                                     option.data[rowIndex + i].HMaterID = resultData.HMaterID;  //灏唎ption.data鏁扮粍涓搴旇鐨凥MaterID灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID
@@ -1429,8 +1471,11 @@
                                     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 = 1;  //灏嗗搴旇鐨凥Qty灞炴�э紙鍙兘浠h〃鏁伴噺锛夎缃负1銆傝繖琛ㄧず瀵逛簬姣忎釜閫変腑鐨勭墿鏂欙紝鍏堕粯璁ゆ暟閲忚璁剧疆涓�1
+                                    option.data[rowIndex + i].HTaxRate = TaxRate;
                                 }
+                                table.render(option); //閲嶆柊娓叉煋琛ㄦ牸浠ユ樉绀烘洿鏂板悗鐨勬暟鎹�
                             }
+
                             layer.closeAll();  //鍏抽棴鎵�鏈夐�氳繃layer
                             //layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                         }
@@ -1441,7 +1486,11 @@
                         end: function () {
                             //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                             var HSupID = $("#HSupID").val();
-                            if (HSupID != 0) {
+                            if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                 $.ajax({
                                     url: GetWEBURL() + "/Gy_Supplier/xg",
                                     //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1450,18 +1499,27 @@
                                         "HInterID": HSupID
                                     },
                                     success: function (d) {
-                                        var HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�)*0.01;
+                                        var HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�) * 0.01;
                                         var HExRate = $("#HExRate").val();                      //姹囩巼
                                         //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
                                         var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
-                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                                         var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
-                                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(4));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
-                                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                                        //鏁板瓧绮惧害
+                                        HQty = Number(HQty.toFixed(HQtyDec));
+                                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                                         obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                             "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                             , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1469,7 +1527,7 @@
                                             , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
                                             , "HUnitID": OptionData.HUnitID
                                             , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
-                                            , "HTaxRate": HTaxRate*100
+                                            , "HTaxRate": HTaxRate * 100
                                             , HQty: HQty                               //鏇存柊HQty瀛楁锛孒Qty
                                             , HPrice: HPrice                         //鏇存柊HPrice瀛楁锛孒Price
                                             , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
@@ -1491,7 +1549,6 @@
                                     , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
                                 })
                             }
-                           
                         }
                     });
                 });
@@ -1802,6 +1859,29 @@
             }
             //#endregion
 
+            //#region 閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+            function getHTaxRateByHSupID() {
+                var HTaxRate;
+                //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+                var HSupID = $("#HSupID").val();
+                if (HSupID != 0) {
+                    $.ajax({
+                        url: GetWEBURL() + "/Gy_Supplier/xg",
+                        type: "GET",
+                        async: false,
+                        data: {
+                            "HInterID": HSupID
+                        },
+                        success: function (d) {
+                            HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�);
+                        }
+                    });
+                } else {
+                    HTaxRate = 0;
+                }
+                return HTaxRate;
+            }
+            //#endregion
             
             //#region 淇濆瓨鍚庢祻瑙堟柟娉�
             function ReRoadBillMain() {
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\272\224\346\224\266\345\215\225/Xs_ReceivableBill.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\272\224\346\224\266\345\215\225/Xs_ReceivableBill.html"
index d29324c..c863cf9 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\272\224\346\224\266\345\215\225/Xs_ReceivableBill.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\272\224\346\224\266\345\215\225/Xs_ReceivableBill.html"
@@ -696,33 +696,41 @@
                             return;
                         }
 
-
                         //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                        var HQty = value * 1;                           //鏁伴噺
-                        var HPrice = obj.data.HPrice * 1;               //鍗曚环
-                        var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼
-                        /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
-                        var HTaxPrice = HPrice * (1 + HTaxRate);        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
-                        /*var HRelTaxPrice = HTaxPrice * HDiscountRate;   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
-                        //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
+                        var HQty = value * 1;                   //鏁伴噺
+                        var HPrice = obj.data.HPrice * 1;
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = HMoney * (1 + HTaxRate);            //浠风◣鍚堣=閲戦 * (1 + 绋庣巼)
-
+                        var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
+                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                        var HExRate = $("#HExRate").val();                      //姹囩巼
+                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                        var HMoneyBB = HMoney * HExRate;
                         //鏁板瓧绮惧害
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
-                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
-                        HTaxMoney = dealDoubleToFixed(HTaxMoney, 2);
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HMoneyBB = Number(HMoneyBB.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
-                            HQty: HQty
-                            , HPrice: HPrice
-                            , HTaxRate: HTaxRate * 100
-                            , HTaxPrice: HTaxPrice
-                            , HMoney: HMoney
-                            , HTaxMoney: HTaxMoney
+                            HQty: HQty                          //鏇存柊HQty瀛楁锛孒Qty
+                            , HPrice: HPrice                     //鏇存柊HPrice瀛楁锛孒Price
+                            , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
+                            , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
+                            , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
+                            , HTaxPrice, HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
+                            , HRelTaxPrice: HRelTaxPrice            //鏇存柊HRelTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐RelTaxPrice
+                            , HlineTotalBB: HlineTotalBB              //鏇存柊HlineTotalBB瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotalBB
+                            , HMoneyBB: HMoneyBB
                         });
                         table.render(option);
                         break;
@@ -744,29 +752,39 @@
                         //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
                         var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HPrice = value * 1;                         //鍗曚环
-                        var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼
-                        /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
-                        var HTaxPrice = HPrice * (1 + HTaxRate);        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
-                        /*var HRelTaxPrice = HTaxPrice * HDiscountRate;   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
-                        //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = HMoney * (1 + HTaxRate);            //浠风◣鍚堣=閲戦 * (1 + 绋庣巼)
+                        var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
+                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                        var HExRate = $("#HExRate").val();                      //姹囩巼
+                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                        var HMoneyBB = HMoney * HExRate;
 
                         //鏁板瓧绮惧害
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
-                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
-                        HTaxMoney = dealDoubleToFixed(HTaxMoney, 2);
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HMoneyBB = Number(HMoneyBB.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
-                            HQty: HQty
-                            , HPrice: HPrice
-                            , HTaxRate: HTaxRate * 100
-                            , HTaxPrice: HTaxPrice
-                            , HMoney: HMoney
-                            , HTaxMoney: HTaxMoney
+                            HQty: HQty                          //鏇存柊HQty瀛楁锛孒Qty
+                            , HPrice: HPrice                     //鏇存柊HPrice瀛楁锛孒Price
+                            , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
+                            , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
+                            , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
+                            , HTaxPrice, HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
+                            , HRelTaxPrice: HRelTaxPrice            //鏇存柊HRelTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐RelTaxPrice
+                            , HlineTotalBB: HlineTotalBB              //鏇存柊HlineTotalBB瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotalBB
+                            , HMoneyBB: HMoneyBB
                         });
                         table.render(option);
                         break;
@@ -789,32 +807,85 @@
                         var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                         var HTaxRate = value * 0.01;                       //绋庣巼
-                        /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
-                        var HTaxPrice = HPrice * (1 + HTaxRate);        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
-                        /*var HRelTaxPrice = HTaxPrice * HDiscountRate;   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
-                        //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = HMoney * (1 + HTaxRate);            //浠风◣鍚堣=閲戦 * (1 + 绋庣巼)
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
+                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                        var HExRate = $("#HExRate").val();                      //姹囩巼
+                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                        var HMoneyBB = HMoney * HExRate;
 
                         //鏁板瓧绮惧害
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
-                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
-                        HTaxMoney = dealDoubleToFixed(HTaxMoney, 2);
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HMoneyBB = Number(HMoneyBB.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
-                            HQty: HQty
-                            , HPrice: HPrice
-                            , HTaxRate: HTaxRate * 100
-                            , HTaxPrice: HTaxPrice
-                            , HMoney: HMoney
-                            , HTaxMoney: HTaxMoney
+                            HQty: HQty                          //鏇存柊HQty瀛楁锛孒Qty
+                            , HPrice: HPrice                     //鏇存柊HPrice瀛楁锛孒Price
+                            , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
+                            , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
+                            , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
+                            , HTaxPrice, HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
+                            , HRelTaxPrice: HRelTaxPrice            //鏇存柊HRelTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐RelTaxPrice
+                            , HlineTotalBB: HlineTotalBB              //鏇存柊HlineTotalBB瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotalBB
+                            , HMoneyBB: HMoneyBB
                         });
                         table.render(option);
                         break;
-                    case "HTaxPrice":                                                       //鏁伴噺
+                    case "HDiscountRate":                                                       //鏁伴噺
+                        //鏁版嵁鏍煎紡鏍¢獙
+                        temp = value + "";
+                        if (!ref.test(temp)) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HDiscountRate: oldText
+                            });
+                            table.render(option);
+                            layer.msg("鎶樻墸鐜囪杈撳叆涓嶅皬浜�0鐨勬暟瀛�!");
+                            return;
+                        }
+
+
+                        //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                        var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼 
+                        var HQty = obj.data.HQty * 1;                   //鏁伴噺
+                        var HPrice = obj.data.HPrice * 1;
+                        var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HDiscountRate = obj.data.HDiscountRate * 1;     //鎶樻墸鐜�
+                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+
+                        //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                        obj.update({
+                            HTaxRate: HTaxRate * 100                //灏咹TaxRate灞炴�х殑鍊间箻浠�100锛屽苟鏇存柊涓烘柊鐨勫��    绋庣巼涔�100  浠庡皬鏁扮被鍨嬪彉涓烘暣鏁版垨娴偣鍨�      
+                            , HQty: HQty                //鏇存柊HQty瀛楁锛岋紝鍏跺�兼潵鑷彉閲廐Qty
+                            , HPrice: HPrice                 //鏇存柊HPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐Price
+                            , HMoney: HMoney                       //鏇存柊HMoney瀛楁锛屽叾鍊兼潵鑷彉閲廐Money
+                            , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛屽叾鍊兼潵鑷彉閲廐TaxMoney
+                            , HTaxPrice: HTaxPrice                  //鏇存柊HTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐TaxPrice
+                            , HDiscountRate: HDiscountRate                  //鏇存柊HDiscountRate瀛楁锛屽叾鍊兼潵鑷彉閲廐DiscountRate
+                            , HRelTaxPrice: HRelTaxPrice                  //鏇存柊HRelTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐RelTaxPrice
+                        });
+                        break;
+                    case "HTaxPrice":                                                       //鍚◣鍗曚环
                         //鏁版嵁鏍煎紡鏍¢獙
                         temp = value + "";
                         if (!ref.test(temp)) {
@@ -828,33 +899,41 @@
                             return;
                         }
                         //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                        var HQty = obj.data.HQty * 1;                   //鏁伴噺
-                        var HTaxRate = obj.data.HTaxRate * 0.01;        //绋庣巼
+                        var HTaxRate = obj.data.HTaxRate * 0.01;                       //绋庣巼
                         var HTaxPrice = value * 1;                          //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                         var HPrice = HTaxPrice / (1 + HTaxRate);        //鍗曚环=鍚◣鍗曟嵁/(1+绋庣巼)
-
-                        /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
-
-                        /*var HRelTaxPrice = HTaxPrice * HDiscountRate;   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
-                        //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
+                        var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                        var HTaxMoney = HMoney * (1 + HTaxRate);            //浠风◣鍚堣=閲戦 * (1 + 绋庣巼)
+                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                        var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+                        var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
+                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                        var HExRate = $("#HExRate").val();                      //姹囩巼
+                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                        var HMoneyBB = HMoney * HExRate;
 
-                        //鏁板瓧绮惧害
+                        ///鏁板瓧绮惧害
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
-                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
-                        HTaxMoney = dealDoubleToFixed(HTaxMoney, 2);
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                        HMoneyBB = Number(HMoneyBB.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
-                            HQty: HQty
-                            , HPrice: HPrice
-                            , HTaxRate: HTaxRate * 100
-                            , HTaxPrice: HTaxPrice
-                            , HMoney: HMoney
-                            , HTaxMoney: HTaxMoney
+                            HQty: HQty                          //鏇存柊HQty瀛楁锛孒Qty
+                            , HPrice: HPrice                     //鏇存柊HPrice瀛楁锛孒Price
+                            , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
+                            , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
+                            , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
+                            , HTaxPrice, HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
+                            , HRelTaxPrice: HRelTaxPrice            //鏇存柊HRelTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐RelTaxPrice
+                            , HlineTotalBB: HlineTotalBB              //鏇存柊HlineTotalBB瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotalBB
+                            , HMoneyBB: HMoneyBB
                         });
                         table.render(option)
                         break;
@@ -1929,6 +2008,10 @@
                                         //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                                         var HSupID = $("#HCusID").val();
                                         if (HSupID != 0) {
+                                            var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                            var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                            var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                            var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                             $.ajax({
                                                 url: GetWEBURL() + "/Gy_Customer/xg",
                                                 //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1943,10 +2026,25 @@
                                                     var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                                     var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                                     var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                                    var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
+                                                    var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
                                                     var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
-                                                    var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
-                                                    var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                                                    var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                                    var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+                                                    var HDiscountRate = obj.data.HDiscountRate * 1;   //鎶樻墸鐜�
+                                                    var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+                                                    var HExRate = $("#HExRate").val();                      //姹囩巼
+                                                    var HMoneyBB = HMoney * HExRate;
+                                                    ///鏁板瓧绮惧害
+                                                    HQty = Number(HQty.toFixed(HQtyDec));
+                                                    HPrice = Number(HPrice.toFixed(HPriceDec));
+                                                    HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                                    HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                                    HMoneyBB = Number(HMoneyBB.toFixed(HMoneyDec));
+                                                    HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                                    HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+                                                    HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+                                                    HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
+
                                                     obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                                         "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                                         , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1955,13 +2053,15 @@
                                                         , "HUnitID": OptionData.HUnitID
                                                         , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
                                                         , "HTaxRate": HTaxRate * 100
-                                                        , HQty: HQty                               //鏇存柊HQty瀛楁锛孒Qty
-                                                        , HPrice: HPrice                         //鏇存柊HPrice瀛楁锛孒Price
+                                                        , HQty: HQty                          //鏇存柊HQty瀛楁锛孒Qty
+                                                        , HPrice: HPrice                     //鏇存柊HPrice瀛楁锛孒Price
                                                         , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
                                                         , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
                                                         , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
                                                         , HTaxPrice, HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
+                                                        , HRelTaxPrice: HRelTaxPrice            //鏇存柊HRelTaxPrice瀛楁锛屽叾鍊兼潵鑷彉閲廐RelTaxPrice
                                                         , HlineTotalBB: HlineTotalBB              //鏇存柊HlineTotalBB瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotalBB
+                                                        , HMoneyBB: HMoneyBB
                                                     })
                                                     OptionData = [];
                                                 }
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\200\200\350\264\247\351\200\232\347\237\245\345\215\225/Xs_SeOutStockBackBill.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\200\200\350\264\247\351\200\232\347\237\245\345\215\225/Xs_SeOutStockBackBill.html"
index 7e6285a..bb11eed 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\200\200\350\264\247\351\200\232\347\237\245\345\215\225/Xs_SeOutStockBackBill.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\200\200\350\264\247\351\200\232\347\237\245\345\215\225/Xs_SeOutStockBackBill.html"
@@ -538,14 +538,97 @@
                         }
                     });
                 }
-                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, '')));
-                    });
+                //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, '')));
+                //    });
+                //}
+            });
+
+            //#region 鐩戝惉鍗曞厓鏍肩紪杈�  鍗曞厓鏍肩紪杈戝悗 鍙樻洿
+            table.on('edit(mainTable)', function (obj) {
+                //鏁板�兼牸寮忔牎楠屽伐鍏�
+                var ref = /^\d+(\.\d+)?$/;          //闈炶礋鏁版鍒欒〃杈惧紡
+                var temp = "";
+                var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
+                // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
+                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 (!ref.test(temp)) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HQty: oldText
+                            });
+                            table.render(option);
+
+                            layer.msg("瀹炲彂鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+                            return;
+                        }
+
+
+                        //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                        var HQty = value * 1;                           //瀹炲彂鏁伴噺
+                        var HPrice = obj.data.HPrice * 1;               //鍗曚环
+                        var HMoney = HQty * HPrice;                     //閲戦=瀹炲彂鏁伴噺*鍗曚环
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                        obj.update({
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
+                        });
+                        table.render(option);
+                        break;
+                    case "HPrice":                                                       //鍗曚环
+                        //鏁版嵁鏍煎紡鏍¢獙
+                        temp = value + "";
+                        if (!ref.test(temp)) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HPrice: oldText
+                            });
+                            table.render(option);
+
+                            layer.msg("鍗曚环璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+                            return;
+                        }
+
+                        //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                        var HQty = obj.data.HQty * 1;                   //瀹炲彂鏁伴噺
+                        var HPrice = value * 1;                         //鍗曚环
+                        var HMoney = HQty * HPrice;                     //閲戦=瀹炲彂鏁伴噺*鍗曚环
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                        obj.update({
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
+                        });
+                        table.render(option);
+                        break;
+                    default:
                 }
             });
+            //#endregion
 
             //鍔ㄦ�佸脊鍑洪〉闈�
             function getSupType() {
@@ -877,6 +960,19 @@
                                     })
                                     layer.close(index);//鍏抽棴寮圭獥
                                 }
+                                , end: function () {
+                                    if (typeof (OptionData.HItemID) != "undefined") {
+                                        obj.update({
+                                            "HMaterID": OptionData.HItemID
+                                            , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+                                            , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+                                            , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+                                            , "HUnitID": OptionData.HUnitID
+                                            , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+                                        })
+                                    }
+
+                                }
                             })
                         }
                         //璁¢噺鍗曚綅
@@ -1010,6 +1106,19 @@
                                 , "璁¢噺鍗曚綅": checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О
                             })
                             layer.close(index);//鍏抽棴寮圭獥
+                        }
+                        , end: function () {
+                            if (typeof (OptionData.HItemID) != "undefined") {
+                                obj.update({
+                                    "HMaterID": OptionData.HItemID
+                                    , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+                                    , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+                                    , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+                                    , "HUnitID": OptionData.HUnitID
+                                    , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+                                })
+                            }
+                            
                         }
                     })
                 });
@@ -1335,6 +1444,32 @@
                 })
             }
 
+            //#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 淇濆瓨鍚庢祻瑙堟柟娉�
             function ReRoadBillMain() {
                 location.replace('Add_Edit_Xs_SeOutStockBillList.html?OperationType=4&linterid=' + linterid + '&HSouceBillType=');
@@ -1450,7 +1585,10 @@
         function GetHWHSubValue(data) {
             OptionData = data[0]
         }
-
+        //鍙屽嚮杩斿洖鐗╂枡
+        function GetGyMaterial(data) {
+            OptionData = data
+        }
         function GetHWHValue(obj)  //杩斿洖浠撳簱
         {
             $("#HWHName").val(obj[0].浠撳簱鍚嶇О);
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\345\220\210\345\220\214/Add_Edit_Xs_ContractBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\345\220\210\345\220\214/Add_Edit_Xs_ContractBillList.html"
index fcac126..2db280f 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\345\220\210\345\220\214/Add_Edit_Xs_ContractBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\345\220\210\345\220\214/Add_Edit_Xs_ContractBillList.html"
@@ -613,6 +613,7 @@
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
@@ -649,6 +650,7 @@
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
@@ -686,6 +688,7 @@
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
@@ -1026,6 +1029,8 @@
                                     //    return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                                     //}
                                     OptionData = checkStatus.data[0];
+                                    var TaxRate = getHTaxRateByHSupID();
+
                                     if (checkStatus.data.length > 1) {
                                         var rowIndex = $(obj.tr).attr("data-index") * 1;
                                         for (var i = 0; i < checkStatus.data.length; i++) {
@@ -1049,7 +1054,7 @@
                                             option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
                                             option.data[rowIndex + i].HUnitID = resultData.HUnitID;
                                             option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
-
+                                            option.data[rowIndex + i].HTaxRate = TaxRate;
                                         }
                                         table.render(option);
                                     }
@@ -1063,7 +1068,11 @@
                                 end: function () {
                                     //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                                     var HSupID = $("#HCusID").val();
-                                    if (HSupID != 0) {
+                                    if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                        var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                        var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                        var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                        var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                         $.ajax({
                                             url: GetWEBURL() + "/Gy_Customer/xg",
                                             //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1080,6 +1089,14 @@
                                                 var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                                                 var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
                                                 var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+
+                                                //鏁板瓧绮惧害
+                                                HQty = Number(HQty.toFixed(HQtyDec));
+                                                HPrice = Number(HPrice.toFixed(HPriceDec));
+                                                HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                                HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                                HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+
                                                 obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                                     "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                                     , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1096,7 +1113,7 @@
                                                 })
                                             }
                                         });
-                                    } else {
+                                    } else if (typeof (OptionData.HItemID) != "undefined") {
                                         obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                             "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                             , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1209,6 +1226,8 @@
                                 //    return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                                 //}
                                 OptionData = checkStatus.data[0];
+                                var TaxRate = getHTaxRateByHSupID();
+                                
                                 if (checkStatus.data.length > 1) {
                                     var rowIndex = $(obj.tr).attr("data-index") * 1;
                                     for (var i = 0; i < checkStatus.data.length; i++) {
@@ -1232,7 +1251,7 @@
                                         option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
                                         option.data[rowIndex + i].HUnitID = resultData.HUnitID;
                                         option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
-
+                                        option.data[rowIndex + i].HTaxRate = TaxRate;
                                     }
                                     table.render(option);
                                 }
@@ -1246,7 +1265,11 @@
                             end: function () {
                                 //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                                 var HSupID = $("#HCusID").val();
-                                if (HSupID != 0) {
+                                if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                    var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                    var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                    var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                    var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                     $.ajax({
                                         url: GetWEBURL() + "/Gy_Customer/xg",
                                         //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1263,6 +1286,14 @@
                                             var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
                                             var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
                                             var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+
+                                            //鏁板瓧绮惧害
+                                            HQty = Number(HQty.toFixed(HQtyDec));
+                                            HPrice = Number(HPrice.toFixed(HPriceDec));
+                                            HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                            HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                            HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+
                                             obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                                 "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                                 , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1279,7 +1310,7 @@
                                             })
                                         }
                                     });
-                                } else {
+                                } else if (typeof (OptionData.HItemID) != "undefined"){
                                     obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                         "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                         , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -1539,6 +1570,30 @@
             }
             //#endregion
 
+            //#region 閫氳繃瀹㈡埛id鑾峰彇绋庣巼
+            function getHTaxRateByHSupID() {
+                var HTaxRate;
+                //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+                var HSupID = $("#HCusID").val();
+                if (HSupID != 0) {
+                    $.ajax({
+                        url: GetWEBURL() + "/Gy_Customer/xg",
+                        type: "GET",
+                        async: false,
+                        data: {
+                            "HInterID": HSupID
+                        },
+                        success: function (d) {
+                            HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�);
+                        }
+                    });
+                } else {
+                    HTaxRate = 0;
+                }
+                return HTaxRate;
+            }
+            //#endregion
+
             //#region 淇濆瓨鍚庢祻瑙堟柟娉�
             function ReRoadBillMain() {
                 location.replace('Add_Edit_Xs_POInStockBillList.html?OperationType=4&linterid=' + linterid + '&HSouceBillType=');
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
index b282454..15c042c 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
@@ -2574,13 +2574,17 @@
                                     var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
 
                                     var rowIndex = $(obj.tr).attr("data-index") * 1;
+                                    var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                    var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                    var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                    var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                     for (var i = 0; i < checkStatus.data.length; i++) {
                                         if (rowIndex + i >= option.data.length) {
                                             var NewRow = {
                                                 "HMaterID": "0", "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": "0", "璁¢噺鍗曚綅": "", "HQty": "0", "HPrice": "0", "HTaxPrice": "0"
                                                 , "HMoney": "0", "HDiscountRate": "0", "HRelTaxPrice": "0", "HTaxRate": "0", "HTaxMoney": "0", "HlineTotal": "0", "HlineTotalBB": "0"
                                                 , "HDate": Format(new Date(), 'yyyy-MM-dd'), "HOutStockQty": "0", "HInvoiceQty": "0", "HRemark": "", "HCusMaterNumber": "",
-                                                "HCusModel": "","HCusMaterName": ""
+                                                "HCusModel": "", "HCusMaterName": ""
                                             }
                                             btnAddLine(NewRow);
                                         }
@@ -2603,8 +2607,8 @@
                                         }
 
                                         //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                                        var HQty = option.data[rowIndex + i].HQty;                  //鏁伴噺
-                                        var HPrice = option.data[rowIndex + i].HPrice;              //鍗曚环
+                                        var HQty = option.data[rowIndex + i].HQty * 1;                  //鏁伴噺
+                                        var HPrice = option.data[rowIndex + i].HPrice * 1;              //鍗曚环
                                         var HTaxRate = value * 0.01;                                //绋庣巼
                                         /*var HDiscountRate = obj.data.HDiscountRate * 1;           //鎶樻墸鐜�*/
                                         var HTaxPrice = HPrice * (1 + HTaxRate);                    //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
@@ -2613,7 +2617,13 @@
                                         var HMoney = HQty * HPrice;                                 //閲戦=鏁伴噺*鍗曚环
                                         var HTaxMoney = HMoney * HTaxRate;                          //绋庨=閲戦*绋庣巼
                                         var HlineTotal = HMoney + HTaxMoney;                        //浠风◣鍚堣=閲戦+绋庨
-
+                                        //鏁板瓧绮惧害
+                                        HQty = Number(HQty.toFixed(HQtyDec));
+                                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
 
                                         option.data[rowIndex + i].HMaterID = resultData.HItemID;
                                         option.data[rowIndex + i].鐗╂枡浠g爜 = resultData.鐗╂枡浠g爜;
@@ -2643,6 +2653,42 @@
                                 }
                                 , end: function () {
                                     if (typeof (HDataEmp.HItemID) != "undefined") {
+                                        var value = subHTaxRate;
+                                        //鏁板�兼牸寮忔牎楠屽伐鍏�
+                                        var ref = /^\d+(\.\d+)?$/;
+                                        //绋庣巼鏁版嵁鏍煎紡鏍¢獙锛岃嫢鏍规嵁瀹㈡埛鑾峰彇鐨勭◣鐜囦笉鍚堟硶锛屽垯浣跨敤璁板綍涓師鏈夌殑绋庣巼锛屽苟鎻愮ず
+                                        temp = value + "";
+                                        if (ref.test(temp)) {
+                                            var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                            var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                            var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                            var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
+                                            //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                                            var HQty = obj.data.HQty * 1;                           //鏁伴噺
+                                            var HPrice = obj.data.HPrice * 1;               //鍗曚环
+                                            var HTaxRate = value * 0.01;           //绋庣巼
+                                            var HTaxPrice = HPrice * (1 + HTaxRate);        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                            var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                                            var HTaxMoney = HMoney * HTaxRate;              //绋庨=閲戦*绋庣巼
+                                            var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+
+                                            //鏁板瓧绮惧害
+                                            HQty = Number(HQty.toFixed(HQtyDec));
+                                            HPrice = Number(HPrice.toFixed(HPriceDec));
+                                            HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                            HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                            HTaxPrice = Number(HPrice.toFixed(HPriceDec));
+
+                                            //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                            obj.update({
+                                                HQty: HQty
+                                                , HPrice: HPrice
+                                                , HTaxRate: HTaxRate * 100
+                                                , HTaxPrice: HTaxPrice
+                                                , HMoney: HMoney
+                                                , HlineTotal: HlineTotal
+                                            });
+                                        }
                                         //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                         obj.update({
                                             "HMaterID": HDataEmp.HItemID
@@ -3165,6 +3211,10 @@
                             var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
 
                             var rowIndex = $(obj.tr).attr("data-index") * 1;
+                            var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                            var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                            var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                            var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                             for (var i = 0; i < checkStatus.data.length; i++) {
                                 if (rowIndex + i >= option.data.length) {
                                     var NewRow = {
@@ -3194,8 +3244,8 @@
                                 }
 
                                 //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                                var HQty = option.data[rowIndex + i].HQty;                  //鏁伴噺
-                                var HPrice = option.data[rowIndex + i].HPrice;              //鍗曚环
+                                var HQty = option.data[rowIndex + i].HQty * 1;                  //鏁伴噺
+                                var HPrice = option.data[rowIndex + i].HPrice * 1;              //鍗曚环
                                 var HTaxRate = value * 0.01;                                //绋庣巼
                                 /*var HDiscountRate = obj.data.HDiscountRate * 1;           //鎶樻墸鐜�*/
                                 var HTaxPrice = HPrice * (1 + HTaxRate);                    //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
@@ -3204,7 +3254,13 @@
                                 var HMoney = HQty * HPrice;                                 //閲戦=鏁伴噺*鍗曚环
                                 var HTaxMoney = HMoney * HTaxRate;                          //绋庨=閲戦*绋庣巼
                                 var HlineTotal = HMoney + HTaxMoney;                        //浠风◣鍚堣=閲戦+绋庨
-
+                                //鏁板瓧绮惧害
+                                HQty = Number(HQty.toFixed(HQtyDec));
+                                HPrice = Number(HPrice.toFixed(HPriceDec));
+                                HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
 
                                 option.data[rowIndex + i].HMaterID = resultData.HItemID;
                                 option.data[rowIndex + i].鐗╂枡浠g爜 = resultData.鐗╂枡浠g爜;
@@ -3234,6 +3290,42 @@
                         }
                         , end: function () {
                             if (typeof (HDataEmp.HItemID) != "undefined") {
+                                var value = subHTaxRate;
+                                //鏁板�兼牸寮忔牎楠屽伐鍏�
+                                var ref = /^\d+(\.\d+)?$/;
+                                //绋庣巼鏁版嵁鏍煎紡鏍¢獙锛岃嫢鏍规嵁瀹㈡埛鑾峰彇鐨勭◣鐜囦笉鍚堟硶锛屽垯浣跨敤璁板綍涓師鏈夌殑绋庣巼锛屽苟鎻愮ず
+                                temp = value + "";
+                                if (ref.test(temp)) {
+                                    var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                    var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                    var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                    var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
+                                    //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                                    var HQty = obj.data.HQty * 1;                           //鏁伴噺
+                                    var HPrice = obj.data.HPrice * 1;               //鍗曚环
+                                    var HTaxRate = value * 0.01;           //绋庣巼
+                                    var HTaxPrice = HPrice * (1 + HTaxRate);        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                    var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                                    var HTaxMoney = HMoney * HTaxRate;              //绋庨=閲戦*绋庣巼
+                                    var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+
+                                    //鏁板瓧绮惧害
+                                    HQty = Number(HQty.toFixed(HQtyDec));
+                                    HPrice = Number(HPrice.toFixed(HPriceDec));
+                                    HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                    HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                    HTaxPrice = Number(HPrice.toFixed(HPriceDec));
+
+                                    //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                    obj.update({
+                                        HQty: HQty
+                                        , HPrice: HPrice
+                                        , HTaxRate: HTaxRate * 100
+                                        , HTaxPrice: HTaxPrice
+                                        , HMoney: HMoney
+                                        , HlineTotal: HlineTotal
+                                    });
+                                }
                                 //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                 obj.update({
                                     "HMaterID": HDataEmp.HItemID
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
index df60cf7..4ec1a08 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
@@ -2523,56 +2523,17 @@
                                 return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                             }
 
-                            var HSupID = $("#HSupID").val();
-                            if (HSupID != 0) {
-                                $.ajax({
-                                    url: GetWEBURL() + "/Gy_Customer/xg",
-                                    type: "GET",
-                                    data: {
-                                        "HInterID": HSupID
-                                    },
-                                    success: function (d) {
-                                        var HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�) * 0.01;
-                                        //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                                        var HQty = obj.data.HQty * 1;                           //鏁伴噺
-                                        var HPrice = obj.data.HPrice * 1;               //鍗曚环
-                                        var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                                        var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
-                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
-                                        obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
-                                            "HMaterID": checkStatus.data[0].HItemID
-                                            , "鐗╂枡浠g爜": checkStatus.data[0].鐗╂枡浠g爜
-                                            , "鐗╂枡鍚嶇О": checkStatus.data[0].鐗╂枡鍚嶇О
-                                            , "瑙勬牸鍨嬪彿": checkStatus.data[0].瑙勬牸鍨嬪彿
-                                            , "HUnitID": checkStatus.data[0].HUnitID
-                                            , "璁¢噺鍗曚綅": checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О
-                                            , "HTaxRate": HTaxRate * 100
-                                            , HQty: HQty                               //鏇存柊HQty瀛楁锛孒Qty
-                                            , HPrice: HPrice                         //鏇存柊HPrice瀛楁锛孒Price
-                                            , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
-                                            , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
-                                            , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
-                                            , HTaxPrice, HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
-                                        })
-                                    }
-                                });
-                            } else {
-                                obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
-                                    "HMaterID": checkStatus.data[0].HItemID
-                                    , "鐗╂枡浠g爜": checkStatus.data[0].鐗╂枡浠g爜
-                                    , "鐗╂枡鍚嶇О": checkStatus.data[0].鐗╂枡鍚嶇О
-                                    , "瑙勬牸鍨嬪彿": checkStatus.data[0].瑙勬牸鍨嬪彿
-                                    , "HUnitID": checkStatus.data[0].HUnitID
-                                    , "璁¢噺鍗曚綅": checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О
-                                })
-                            }
+                            HDataTemp = checkStatus.data[0];
 
                             layer.close(index);//鍏抽棴寮圭獥
                         }
                         , end: function () {
                             if (typeof (HDataTemp.HItemID) != "undefined") {
                                 //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+                                var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                 var HSupID = $("#HSupID").val();
                                 if (HSupID != 0) {
                                     $.ajax({
@@ -2588,9 +2549,14 @@
                                             var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                             var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                             var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                            var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                                            var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
-                                            var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                            var HTaxMoney = HMoney * (1 + HTaxRate);
+                                            var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                            //鏁板瓧绮惧害
+                                            HQty = Number(HQty.toFixed(HQtyDec));
+                                            HPrice = Number(HPrice.toFixed(HPriceDec));
+                                            HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                            HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                            HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                                             obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                                 "HMaterID": HDataTemp.HItemID
                                                 , "鐗╂枡浠g爜": HDataTemp.鐗╂枡浠g爜
@@ -2603,8 +2569,7 @@
                                                 , HPrice: HPrice                         //鏇存柊HPrice瀛楁锛孒Price
                                                 , HMoney: HMoney                      //鏇存柊HMoney瀛楁锛孒Money
                                                 , HTaxMoney: HTaxMoney                  //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
-                                                , HlineTotal: HlineTotal             //鏇存柊HlineTotal瀛楁锛孒lineTotal
-                                                , HTaxPrice, HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
+                                                , HTaxPrice: HTaxPrice                   //鏇存柊HTaxPrice瀛楁锛孒TaxPrice
                                             })
                                         }
                                     });
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 6e823f1..203e5a1 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"
@@ -700,7 +700,7 @@
 
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
-                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
 
@@ -742,7 +742,7 @@
 
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
-                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
 
@@ -783,7 +783,7 @@
 
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
-                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
 
@@ -799,7 +799,6 @@
                         });
                         table.render(option);
                         break;
-                        
                     case "HTaxRate":                                                       //鏁伴噺
                         //鏁版嵁鏍煎紡鏍¢獙
                         temp = value + "";
@@ -831,7 +830,7 @@
 
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
-                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
 
@@ -872,7 +871,7 @@
 
                         HQty = Number(HQty.toFixed(HQtyDec));
                         HPrice = Number(HPrice.toFixed(HPriceDec));
-                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                         HMoney = Number(HMoney.toFixed(HMoneyDec));
                         HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
@@ -1950,7 +1949,7 @@
                             //鎸夐挳涓�  鐨勫洖璋�
                             var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
                             var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
-
+                            var TaxRate = getHTaxRateByHSupID();
                             //if (checkStatus.data.length != 1) {
                             //    return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                             //}
@@ -1985,6 +1984,7 @@
                                     option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
                                     option.data[rowIndex + i].HUnitID = resultData.HUnitID;
                                     option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
+                                    option.data[rowIndex + i].HTaxRate = TaxRate;
                                     ////鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                     //obj.update({
                                     //    "HMaterID": checkStatus.data[0].HItemID
@@ -2009,7 +2009,11 @@
                         end: function () {
                             //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
                             var HSupID = $("#HSupID").val();
-                            if (HSupID != 0) {
+                            if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+                                var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                 $.ajax({
                                     url: GetWEBURL() + "/Gy_Supplier/xg",
                                     //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -2023,9 +2027,16 @@
                                         var HQty = obj.data.HQty * 1;                           //鏁伴噺
                                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
                                         var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
-                                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //绋庨=閲戦*绋庣巼
-                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                        var HTaxMoney = Number((HMoney * HTaxRate));         //绋庨=閲戦*绋庣巼
+                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
                                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+                                        //鏁板瓧绮惧害
+                                        HQty = Number(HQty.toFixed(HQtyDec));
+                                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                                         obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                             "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                             , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -2042,7 +2053,7 @@
                                         })
                                     }
                                 });
-                            } else {
+                            } else if (typeof (OptionData.HItemID) != "undefined"){
                                 obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
                                     "HMaterID": OptionData.HItemID             //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
                                     , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
@@ -2306,6 +2317,29 @@
             }
             //#endregion
 
+            //#region 閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+            function getHTaxRateByHSupID() {
+                var HTaxRate;
+                //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+                var HSupID = $("#HSupID").val();
+                if (HSupID != 0) {
+                    $.ajax({
+                        url: GetWEBURL() + "/Gy_Supplier/xg",
+                        type: "GET",
+                        async: false,
+                        data: {
+                            "HInterID": HSupID
+                        },
+                        success: function (d) {
+                            HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�);
+                        }
+                    });
+                } else {
+                    HTaxRate = 0;
+                }
+                return HTaxRate;
+            }
+            //#endregion
 
             //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曟敹鏂欓�氱煡鍗曟暟鎹�
             function getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID) {
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 efbd928..83eaf94 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"
@@ -597,6 +597,7 @@
                 //鏁板�兼牸寮忔牎楠屽伐鍏�
                 var ref = /^\d+(\.\d+)?$/;          //闈炶礋鏁版鍒欒〃杈惧紡
                 var temp = "";
+                console.log(obj)
                 var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
                 var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
                 var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
@@ -698,8 +699,9 @@
                             , HPrice: HPrice
                             , HMoney: HMoney
                         });
-                        break;
                         table.render(option);
+                        break;
+                        
                     default:
                 }
             });
@@ -1418,8 +1420,6 @@
                                                 table.render(option);
                                             }
 
-
-
                                             var HMaterID = checkStatus.data[i].HItemID;
                                             var resultData = getMaterialByMaterID(HMaterID);
                                             option.data[rowIndex + i].HMaterID = resultData.HMaterID;
@@ -1449,14 +1449,14 @@
                                     //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
                                 },
                                 end: function () {
-                                obj.update({
-                                     "HMaterID" :OptionData.HMaterID
-                                        ,"鐗╂枡浠g爜" : OptionData.鐗╂枡浠g爜
-                                       , "鐗╂枡鍚嶇О" :OptionData.鐗╂枡鍚嶇О
-                                        ,"瑙勬牸鍨嬪彿" : OptionData.瑙勬牸鍨嬪彿
-                                        ,"HUnitID" :OptionData.HUnitID
-                                        ,"璁¢噺鍗曚綅" : OptionData.璁¢噺鍗曚綅鍚嶇О
-                                })
+                                    obj.update({
+                                        "HMaterID": OptionData.HItemID
+                                        , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+                                        , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+                                        , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+                                        , "HUnitID": OptionData.HUnitID
+                                        , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+                                    })
                                 }
                             });
                         }
@@ -1610,8 +1610,6 @@
                                         table.render(option);
                                     }
 
-
-
                                     var HMaterID = checkStatus.data[i].HItemID;
                                     var resultData = getMaterialByMaterID(HMaterID);
                                     option.data[rowIndex + i].HMaterID = resultData.HMaterID;
@@ -1642,7 +1640,7 @@
                         },
                         end: function () {
                             obj.update({
-                                "HMaterID": OptionData.HMaterID
+                                "HMaterID": OptionData.HItemID
                                 , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
                                 , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
                                 , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿

--
Gitblit v1.9.1