From 1b5293c8ca79ce81b0ce5de7f4a89cc96aee6cb3 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期二, 16 十二月 2025 10:12:15 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_checkSN.html          |   78 +
 WebTM/views/工资管理/阶梯工价系数/Gy_SteppedPriceCoefficientBillEdit.html              | 1170 ++++++++++++++++
 WebTM/views/模治具管理/模治具管理/Gy_BarCodeBillList.html                              |   49 
 WebTM/views/grf/香囊模板JSON.grf                                                 |   87 +
 WebTM/views/车间管理/单品过站_小卫/Cj_SachetBarCodePrint.html                          |   14 
 WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_batchKeyElement.html  |   80 +
 WebTM/views/工资管理/阶梯工价系数/Gy_SteppedPriceCoefficientBillList.html              | 1637 +++++++++++++++++++++++
 WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_batch.html            |   79 +
 WebTM/views/项目管理/工作任务/PM_WorkTaskBillList.html                               |    8 
 WebTM/views/基础资料/公用基础资料/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.cs             |   17 
 WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_KeyElement_Sec.html   |   77 +
 WebTM/views/质量管理/首件检验单/QC_Add_Edit_FirstPieceCheckBill.html                  |  283 +--
 WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_checkPackage_Sec.html |   78 +
 WebTM/views/基础资料/公用基础资料/HBarPlanPrint.html                                   |    3 
 WebTM/views/基础资料/公用基础资料/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.designer.cs    |   26 
 WebTM/views/基础资料/基础资料/Gy_CarTypeList.html                                    |   52 
 WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_UnbindList.html       |   11 
 WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_generateSNCode.html   |  134 +
 WebTM/views/车间管理/单品过站_小卫/Cj_SaveSNByICMO.html                                |  258 +++
 WebTM/views/生产管理/制造周期报表/Sc_ProductionCycleBillList.html                      |    4 
 WebTM/views/车间管理/单品过站_小卫/Cj_BlueToothBarCodePrint.html                       |   56 
 WebTM/views/基础资料/基础资料/Gy_ConkReasonEdit.html                                 |    2 
 WebTM/views/基础资料/基础资料/Gy_RepairEdit.html                                     |    3 
 WebTM/layuiadmin/Scripts/webConfig.js                                        |    4 
 WebTM/views/基础资料/生产基础资料/Add_Edit_Gy_BadReason.html                           |    8 
 WebTM/WebTM.csproj                                                           |   11 
 WebTM/views/基础资料/公用基础资料/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx                |   29 
 27 files changed, 4,077 insertions(+), 181 deletions(-)

diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index a46bba9..ccc5081 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -472,6 +472,7 @@
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_MaterialPackingRelation_Edit.html" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_ItemMoney.html" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Cg_ContractTransportBillList.html" />
+    <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill_MiddleBox.aspx" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Sc_ProcessExchangeBillList_stock.aspx" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlzuotuo_xiaowei.aspx" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill_XinDa.aspx" />
@@ -624,6 +625,8 @@
     <Content Include="views\宸ヨ祫绠$悊\宸ヨ祫杩愮畻\Pay_SalaryCalculate_New.html" />
     <Content Include="views\宸ヨ祫绠$悊\鎶�鑳借�冩牳\HR_EmployeeSkillExamBill.html" />
     <Content Include="views\宸ヨ祫绠$悊\鎶�鑳借�冩牳\HR_EmployeeSkillExamBillList.html" />
+    <Content Include="views\宸ヨ祫绠$悊\闃舵宸ヤ环绯绘暟\Gy_SteppedPriceCoefficientBillEdit.html" />
+    <Content Include="views\宸ヨ祫绠$悊\闃舵宸ヤ环绯绘暟\Gy_SteppedPriceCoefficientBillList.html" />
     <Content Include="views\搴旀敹绠$悊\鎶ヨ〃鍒嗘瀽\Xs_CusShouGongChaoBaoSumReport.html" />
     <Content Include="views\搴旀敹绠$悊\鎶ヨ〃鍒嗘瀽\Xs_CusShouGongChaoBaoReport.html" />
     <Content Include="views\搴旀敹绠$悊\鎶ヨ〃鍒嗘瀽\Kf_SellOutEntryReport_YP.html" />
@@ -937,6 +940,7 @@
     <Content Include="views\杞﹂棿绠$悊\鍏抽敭浠剁粦瀹歕Sc_KeyElementBindingList.html" />
     <Content Include="views\杞﹂棿绠$悊\鍏抽敭浠剁粦瀹歕Sc_KeyElementBinding.html" />
     <Content Include="views\杞﹂棿绠$悊\鍗曞搧杩囩珯\SingleItemTransitList.html" />
+    <Content Include="views\杞﹂棿绠$悊\鍗曞搧杩囩珯_灏忓崼\Cj_SaveSNByICMO.html" />
     <Content Include="views\杞﹂棿绠$悊\鍗曞搧杩囩珯_灏忓崼\Cj_ProcessItemStationPlatform_generateSNCode.html" />
     <Content Include="views\杞﹂棿绠$悊\鍗曞搧杩囩珯_灏忓崼\Cj_ProcessItemStationPlatform_checkSN.html" />
     <Content Include="views\杞﹂棿绠$悊\鍗曞搧杩囩珯_灏忓崼\Cj_ProcessItemStationPlatform_generateCaseCode.html" />
@@ -2690,6 +2694,13 @@
     <Compile Include="App_Data\MssqlReportData.cs" />
     <Compile Include="App_Data\ReportData.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.cs">
+      <DependentUpon>xmlLBM_HGy_BarCodeBill_MiddleBox.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.designer.cs">
+      <DependentUpon>xmlLBM_HGy_BarCodeBill_MiddleBox.aspx</DependentUpon>
+    </Compile>
     <Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Sc_ProcessExchangeBillList_stock.aspx.cs">
       <DependentUpon>xmlLBM_Sc_ProcessExchangeBillList_stock.aspx</DependentUpon>
       <SubType>ASPXCodeBehind</SubType>
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index 1ffb39a..cc9d22f 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -7,12 +7,14 @@
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //鏉ㄤ箰鏈湴閰嶇疆
    /*  var WEBURL = "http://localhost:8082/API/";    //鏉滆春鏈湴閰嶇疆*/
     //var WEBURL = "http://localhost:8082/API/";    //寮犵憺骞挎湰鍦伴厤缃�
+    var WEBURL = "http://localhost:8080/API/";    //鐜嬩华鏈湴閰嶇疆
     //var WEBURL = "http://localhost:81/API/"    //缈佹稕娑涙湰鍦伴厤缃�
+    var WEBURL = "http://localhost:81/API/"    //缈佹稕娑涙湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //鏉ㄤ箰鏈湴閰嶇疆
     //var WEBURL = "http://47.96.97.237/API/";          //鏅轰簯鏈嶅姟鍣�
     /*var WEBURL = "http://localhost:8082/LuBaoAPI/";*/  //浣欐�濇澃鏈湴閰嶇疆
     //var WEBURL = "http://localhost:81/API/";            // 闄堥晲鍝叉湰鍦伴厤缃�*/
-     var WEBURL = "http://localhost:8082/LuBaoAPI/";  //鏉庢灄淇婃湰鍦伴厤缃�
+    // var WEBURL = "http://localhost:8082/LuBaoAPI/";  //鏉庢灄淇婃湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8088/ARAPI/";      //浣欐�濇澃鏈湴閰嶇疆(瀹夌憺)
     //var WEBURL = "http://61.164.86.218:8099/ABAPI/";  //濂ラ偊
     //var WEBURL = "http://10.1.4.155/API/";            //姹熶赴瀹㈡埛NEW
diff --git "a/WebTM/views/grf/\351\246\231\345\233\212\346\250\241\346\235\277JSON.grf" "b/WebTM/views/grf/\351\246\231\345\233\212\346\250\241\346\235\277JSON.grf"
new file mode 100644
index 0000000..4676ca3
--- /dev/null
+++ "b/WebTM/views/grf/\351\246\231\345\233\212\346\250\241\346\235\277JSON.grf"
@@ -0,0 +1,87 @@
+锘縶
+	"Version":"6.8.2.5",
+	"Font":{
+		"Name":"瀹嬩綋",
+		"Size":105000,
+		"Weight":400,
+		"Charset":134
+	},
+	"Printer":{
+		"Size":256,
+		"Width":4.7,
+		"Height":2.8,
+		"LeftMargin":0,
+		"TopMargin":0,
+		"RightMargin":0,
+		"BottomMargin":0
+	},
+	"DetailGrid":{
+		"CenterView":true,
+		"Recordset":{
+			"Field":[
+				{
+					"Name":"鏂欏彿"
+				},
+				{
+					"Name":"鐗╂枡浠g爜"
+				},
+				{
+					"Name":"鐗╂枡鍚嶇О"
+				},
+				{
+					"Name":"鎵瑰彿"
+				},
+				{
+					"Name":"鏁伴噺"
+				},
+				{
+					"Name":"渚涘簲鍟�"
+				},
+				{
+					"Name":"婧愬崟鍙�"
+				},
+				{
+					"Name":"鏉$爜缂栧彿"
+				}
+			]
+		},
+		"Column":[
+			{
+				"Name":"Column1",
+				"Width":4.70958
+			}
+		],
+		"ColumnContent":{
+			"Height":2.59292,
+			"ColumnContentCell":[
+				{
+					"Column":"Column1",
+					"FreeCell":true,
+					"Control":[
+						{
+							"Type":"Barcode",
+							"Name":"Barcode1",
+							"Left":0.608542,
+							"Top":0.79375,
+							"Width":3.20146,
+							"Height":1.00542,
+							"BarcodeType":"Code128Auto",
+							"Text":"[#鏉$爜缂栧彿#]"
+						}
+					]
+				}
+			]
+		},
+		"ColumnTitle":{
+			"Height":0,
+			"ColumnTitleCell":[
+				{
+					"GroupTitle":false,
+					"Column":"Column1",
+					"TextAlign":"MiddleCenter",
+					"Text":"Column1"
+				}
+			]
+		}
+	}
+}
\ No newline at end of file
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/HBarPlanPrint.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/HBarPlanPrint.html"
index 3981cde..bfbddd6 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/HBarPlanPrint.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/HBarPlanPrint.html"
@@ -170,6 +170,9 @@
             case "HGy_BarCodeBill_JiaNan_BarCode_Pack"://鏉$爜鎵撳嵃_杩﹀崡
                 CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_HGy_BarCodeBill.aspx?linterid=" + value, true, "");
                 break;
+            case "HGy_BarCodeBill_MiddleBox"://涓鏉$爜鎵撳嵃锛堝皬鍗級
+                CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_HGy_BarCodeBill_MiddleBox.aspx?linterid=" + value, true, "");
+                break;
             case "HIcmoBill"://鐢熶骇璁㈠崟鎵撳嵃
                 CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_Sc_ICMOBillList.aspx?linterid=" + value, true, "");
                 break;
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/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx" "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/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx"
new file mode 100644
index 0000000..ff969a7
--- /dev/null
+++ "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/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx"
@@ -0,0 +1,29 @@
+锘�<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.cs" Inherits="WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡.xmlLBM_HGy_BarCodeBill_MiddleBox" %>
+
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <title></title>
+    <script runat="server"> 
+        protected void Page_Load(object sender, EventArgs e)
+        {
+            //鈽呯壒鍒彁绀衡槄锛�
+            //涓嶅悓鐨勬暟鎹簱搴旇閫夌敤涓嶅悓鐨勬姤琛╔ML鏁版嵁鐢熸垚绫伙紝SQL Server鏁版嵁搴撶敤SqlXMLReportData锛孫racle鏁版嵁搴撶敤OracleXMLReportData
+            //OledbXMLReportData閫傚悎浜嶢ccess绛夋湰鍦版暟鎹簱锛屼负浜嗘紨绀烘柟渚匡紝杩欓噷浠嶨rid++Report鐨凙ccess渚嬪瓙鏁版嵁搴撲腑鑾峰彇鎶ヨ〃鏁版嵁
+
+            //OledbXMLReportData.GenOneRecordset(this, "select * from Customers order by CustomerID");
+            //SqlXMLReportData.GenOneRecordset(this, "select * from h_v_Kf_POStockInBillList_K3 where hmainid=1781");
+            //SqlXMLReportData.GenOneRecordset(this, "select * from h_v_IF_BarCodeBillList where hmainid in(" + Request.Params["linterid"]+ ") order by hmainid desc");
+            SqlXMLReportData.GenOneRecordset(this, "exec h_p_Gy_GetCaseCodeInfo '" + Request.Params["linterid"]+ "'");
+        }
+</script>
+</head>
+<body>
+    <form id="form1" runat="server">
+        <div>
+        </div>
+    </form>
+</body>
+</html>
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/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.cs" "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/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.cs"
new file mode 100644
index 0000000..831cba6
--- /dev/null
+++ "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/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.cs"
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡
+{
+    public partial class xmlLBM_HGy_BarCodeBill_MiddleBox : System.Web.UI.Page
+    {
+        //protected void Page_Load(object sender, EventArgs e)
+        //{
+
+        //}
+    }
+}
\ No newline at end of file
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/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.designer.cs" "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/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.designer.cs"
new file mode 100644
index 0000000..64bd080
--- /dev/null
+++ "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/xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.designer.cs"
@@ -0,0 +1,26 @@
+锘�//------------------------------------------------------------------------------
+// <鑷姩鐢熸垚>
+//     姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
+//
+//     瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉
+//     閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆�
+// </鑷姩鐢熸垚>
+//------------------------------------------------------------------------------
+
+namespace WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡
+{
+
+
+    public partial class xmlLBM_HGy_BarCodeBill_MiddleBox
+    {
+
+        /// <summary>
+        /// form1 鎺т欢銆�
+        /// </summary>
+        /// <remarks>
+        /// 鑷姩鐢熸垚鐨勫瓧娈点��
+        /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲��
+        /// </remarks>
+        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+    }
+}
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_CarTypeList.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_CarTypeList.html"
index d523607..030217a 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_CarTypeList.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_CarTypeList.html"
@@ -43,8 +43,20 @@
                                         <input type="text" class="layui-input" name="HName" id="HName">
                                     </div>
                                 </div>
+<<<<<<< HEAD
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">缁勭粐鍚嶇О</label>
+                                    <div class="layui-input-block" style="width: 185px;">
+                                        <select name="HUSEORGID" id="HUSEORGID" lay-verify="HUSEORGID">
+                                            <!-- 鍔ㄦ�佹覆鏌撶粍缁� -->
+                                        </select>
+                                    </div>
+                                </div>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+=======
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit=""
                                     lay-filter="btnSearch" id="btnSearch">
+>>>>>>> cf4a059eee9a05b9b181e9970167f9726379c004
                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                 </button>
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit=""
@@ -125,7 +137,7 @@
                 , form = layui.form
                 , element = layui.element
                 , laypage = layui.laypage
-                , laydate = layui.laydate
+                , laydate = layui.laydate;
             var sWhere = "";
             var option = [];
             var HModName = "Gy_CarTypeList";
@@ -272,11 +284,34 @@
             function set_ClearBill() {
                 //鍒濆鍖栬〃鏍�
                 set_InitGrid();
+                //鍒濆鍖栫粍缁�
+                Organ();
                 //鏌ヨ
                 get_FastQuery();
             }
+            //#endregion//#region 鑾峰彇缁勭粐
+            function Organ() {
+                //鑾峰彇鐧诲綍椤电粍缁囧垪
+                $.ajax({
+                    type: "get",
+                    async: false,
+                    url: GetWEBURL() + "/Web/GetOrganizations",
+                    success: function (result) {
+                        var Organization = "";
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            var data = result.data;
+                            for (var i = 0; i < data.length; i++) {
+                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+                            }
+                            $("#HUSEORGID").append(Organization);
+                            $("#HUSEORGID").val(sessionStorage["OrganizationID"])
+                            form.render('select');
+                        }
+                        layer.closeAll("loading");
+                    }
+                })
+            }
             //#endregion
-
             //#region 鍒濆鍖栬〃鏍�
             function set_InitGrid() {
                 option = {
@@ -297,7 +332,11 @@
                 $.ajax({
                     url: GetWEBURL() + '/Gy_CarType/list',
                     type: "GET",
-                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                    data: {
+                        "sWhere": sWhere,
+                        "user": sessionStorage["HUserName"],
+                        "Organization": $("#HUSEORGID").val() // 鏂板缁勭粐鍙傛暟
+                    },
                     success: function (data1) {
                         if (data1.count == 1) {
                             var data = [];
@@ -372,6 +411,7 @@
             function get_FastQuery() {
                 var HNumber = $("#HNumber").val();
                 var HName = $("#HName").val();
+                var HUSEORGID = $("#HUSEORGID").val();
                 var ColName = $("#ColName").val();//澶嶉�夋
                 var Comparator = $("#Comparator").val()
                 var ColContent = $("#ColContent").val();
@@ -403,6 +443,10 @@
                 if (HName) {
                     sWhere += " and 杞﹀瀷鍚嶇О like '%" + HName + "%'";
                 }
+                if (HUSEORGID && HUSEORGID != "0") {
+                    sWhere += " and HUSEORGID = " + HUSEORGID;
+                }
+
                 sWhere += addSWhereByOpenType();
                 get_Display(sWhere);
                 sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
@@ -413,6 +457,7 @@
             function set_ClearQuery() {
                 $("#HNumber").val("");
                 $("#HName").val("");
+                $("#HUSEORGID").val(sessionStorage["OrganizationID"]);
                 $("#ColContent").val("");
                 $("#ColName").val("0");
                 $("#Comparator").val("0");
@@ -421,6 +466,7 @@
             }
             //#endregion
 
+
             //#region 鏂板
             function set_AddNew() {
                 layer.open({
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonEdit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonEdit.html"
index d83d1f5..b1bde88 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonEdit.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonEdit.html"
@@ -228,11 +228,13 @@
             //鍒ゆ柇鎿嶄綔绫诲瀷
             if (OperationType == 1) {//鏃犳簮鍗�
                 set_AddFNew();
+                $('#audit-btn').addClass("layui-btn-disabled").attr("disabled", true);
             }
             else if (OperationType == 2) {//澶嶅埗
                 set_AddFNew();
                 //澶嶅埗鐘舵�佹椂锛屾牴鎹唴鐮侊紝鑾峰彇淇℃伅骞跺啓鍏ョ晫闈�
                 set_EditForm(linterid);
+                $('#audit-btn').addClass("layui-btn-disabled").attr("disabled", true);
             }
             else if (OperationType == 3) {//缂栬緫
                 set_EditFromGrid();
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairEdit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairEdit.html"
index a7be3a7..17b10ae 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairEdit.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairEdit.html"
@@ -264,7 +264,7 @@
             if (OperationType == 1) {   //鏂板
                 linterid = 0;
                 $("#HMakeEmp").val(sessionStorage["HUserName"]);
-
+                $('#audit-btn').addClass("layui-btn-disabled").attr("disabled", true);
             } else if (OperationType == 2) {
                 RoadBillMain(linterid);
                 $("#HMakeEmp").val(sessionStorage["HUserName"]);
@@ -277,6 +277,7 @@
                 $("#HCheckTime").val("");
                 $("#HNumber").val("");
                 $("#HItemID").val(0);
+                $('#audit-btn').addClass("layui-btn-disabled").attr("disabled", true);
             } else if (OperationType == 3) {
                 RoadBillMain(linterid);
             }
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_BadReason.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_BadReason.html"
index c5a3460..283f2fc 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_BadReason.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_BadReason.html"
@@ -241,12 +241,14 @@
             //#region 杩涘叆椤甸潰鍗冲姞杞�
             //鍒ゆ柇鎿嶄綔绫诲瀷
             if (OperationType == 1) {//鏃犳簮鍗�
-                set_AddFNew();              
+                set_AddFNew();
+                $('#add-btn1').addClass("layui-btn-disabled").attr("disabled", true);
             }
             else if (OperationType == 2) {//澶嶅埗
                 set_AddFNew();
                 //澶嶅埗鐘舵�佹椂锛屾牴鎹唴鐮侊紝鑾峰彇淇℃伅骞跺啓鍏ョ晫闈�
                 set_EditForm(linterid);
+                $('#add-btn1').addClass("layui-btn-disabled").attr("disabled", true);
             }
             else if (OperationType == 3) {//缂栬緫
                 set_EditFromGrid();
@@ -474,9 +476,9 @@
                     success: function (result) {
                         if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
                             var data = result.data.h_v_IF_Edit_BadReasonList[0];
-                            $("#HNumber").val(data.涓嶈壇缂洪櫡浠g爜);//浠g爜
+                            $("#HNumber").val(data.涓嶈壇鍘熷洜浠g爜);//浠g爜
                             $("#HItemID").val(OperationType == 2 ? 0 : data.HItemID);//浠g爜ID
-                            $("#HName").val(data.涓嶈壇缂洪櫡鍚嶇О);//鍚嶇О
+                            $("#HName").val(data.涓嶈壇鍘熷洜鍚嶇О);//鍚嶇О
                             $("#HHelpCode").val(data.鍔╄浠g爜);//鍔╄浠g爜
                             $("#HDeptNumber").val(data.閮ㄩ棬浠g爜);//榛樿閮ㄩ棬浠g爜
                             $("#HDeptName").val(data.閮ㄩ棬鍚嶇О);//榛樿閮ㄩ棬
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\351\230\266\346\242\257\345\267\245\344\273\267\347\263\273\346\225\260/Gy_SteppedPriceCoefficientBillEdit.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\351\230\266\346\242\257\345\267\245\344\273\267\347\263\273\346\225\260/Gy_SteppedPriceCoefficientBillEdit.html"
new file mode 100644
index 0000000..0f981f5
--- /dev/null
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\351\230\266\346\242\257\345\267\245\344\273\267\347\263\273\346\225\260/Gy_SteppedPriceCoefficientBillEdit.html"
@@ -0,0 +1,1170 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <title>闃舵宸ヤ环绯绘暟鍗�</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
+</head>
+<body>
+    <div class="layui-fluid" style="padding: 0;">
+        <div class="layui-card" style="padding: 2px;background-color: #efefef;">
+            <div class="layui-card-body" style="padding: 1px;">
+                <form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
+                    <div style="padding: 2px;">
+                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">淇濆瓨</button>
+                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">閫�鍑�</button>
+                    </div>
+                    <div class="layui-tab" lay-filter="tab-Gy_SteppedPriceCoefficientBill">
+                        <h1 style="text-align: center; padding: 10px 0;"><b>闃舵宸ヤ环绯绘暟鍗�</b></h1>
+                        <ul class="layui-tab-title" lay-filter="tab-all">
+                            <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
+                            <li lay-id="2" style="padding:1px;">鍏朵粬淇℃伅</li>
+                        </ul>
+                        <div class="layui-tab-content">
+                            <!--鍩烘湰淇℃伅-->
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-form-item" style="padding-top: 10px;">
+                                    <div class="layui-row">
+                                        <div class="layui-inline" style="width:500px;">
+                                            <label class="layui-form-label" style="width: 85px;">鍗曟嵁鍙�<label style="color:red"> * </label></label>
+                                            <div class="layui-input-block" style="margin-left: 120px; width: 180px;">
+                                                <input type="text" class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline" style="width:500px;">
+                                            <label class="layui-form-label" style="width: 85px;">鏃ユ湡<label style="color:red"> * </label></label>
+                                            <div class="layui-input-block" style="margin-left: 120px; width:180px;">
+                                                <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 80px;">
+                                            </div>
+                                        </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">宸ュ簭<label style="color:red"> * </label></label>
+                                                <div class="layui-input-block" style="margin-left: 77px;">
+                                                    <input type="text" class="layui-input" lay-verify="HProcID" name="HProcID" id="HProcID" style="background-color:#efefef4d;width: 60%;display: inline-block;" placeholder="鐐瑰嚮鎼滅储閫夋嫨宸ュ簭" readonly>
+                                                    <input type="hidden" name="HProcName" id="HProcName">
+                                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHProc" id="btnSearchHProc" style="padding: 0 10px;float: right;margin-right: 3px;">
+                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                    </button>
+                                                </div>
+                                           </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline" style="width:500px;">
+                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">璐熻矗浜�<label style="color:red"> * </label></label>
+                                            <div class="layui-input-block" style="margin-left: 77px; width: 270px;">
+                                                <input type="text" class="layui-input" lay-verify="HEmpName" name="HEmpName" id="HEmpName" style="background-color: #efefef4d; width: 180px; display: inline-block;" readonly>
+                                                <input type="hidden" name="HEmpID" id="HEmpID" lay-verify="HEmpID" value="0">
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHEmp" id="btnSearchHEmp" style="padding: 0 10px;float: right;margin-right: 3px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline" style="width:500px;">
+                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">閮ㄩ棬<label style="color:red"> * </label></label>
+                                            <div class="layui-input-block" style="margin-left: 77px; width: 270px;">
+                                                <input type="text" class="layui-input" lay-verify="HDeptName" name="HDeptName" id="HDeptName" style="background-color: #efefef4d; width: 180px; display: inline-block;" readonly>
+                                                <input type="hidden" name="HDeptID" id="HDeptID" lay-verify="HDeptID" value="0">
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHDept" id="btnSearchHDept" style="padding: 0 10px;float: right;margin-right: 3px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">缁勭粐<label style="color:red"> * </label></label>
+                                            <div class="layui-input-block" style="margin-left: 110px; width: 501px;">
+                                                <select name="HStockOrgID" id="HStockOrgID" lay-verify="HStockOrgID">
+                                                </select>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline" style="width:1500px;">
+                                            <label class="layui-form-label" style="width: 85px;">澶囨敞</label>
+                                            <div class="layui-input-block" style="margin-left: 120px; width: 800px;">
+                                                <input type="text" class="layui-input" lay-verify="HRemark" name="HRemark" id="HRemark" style="width:1185px;">
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                            <!--鍏朵粬淇℃伅-->
+                            <div class="layui-tab-item">
+                                <div class="layui-form-item">
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍒跺崟浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">淇敼浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">瀹℃牳浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍒跺崟鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">淇敼鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">瀹℃牳鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍏抽棴浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">浣滃簾浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">閫�鍥炰汉</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HBacker" id="HBacker" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">浣滃簾鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">閫�鍥炴棩鏈�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HBackDate" id="HBackDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">閫�鍥炲師鍥�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HBackRemark" id="HBackRemark" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                    <script type="text/html" id="toolbarDemo">
+                        <div class="layui-btn-container">
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                        </div>
+                    </script>
+                </form>
+            </div>
+        </div>
+    </div>
+    <!--瀛愯〃锛氬垹闄�-->
+    <script type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </script>
+    <script>
+        layui.config({
+            base: '../../../layuiadmin/'
+        }).extend({
+            index: 'lib/index'
+        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element;
+
+            var HModName = "Gy_SteppedPriceCoefficientBill";
+            var HStockOrgID = sessionStorage["OrganizationID"];
+
+            var HModuleType = "GYST";
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
+            $("h1").html('<b>' + HPageTitle + '</b>');
+
+            var option = {};
+            var params = getUrlVars();
+            var OperationType = params["OperationType"];
+            var linterid = params["linterid"];
+            var originalProcessID = ""; // 淇濆瓨鍘熷宸ュ簭ID锛岀敤浜庣紪杈戞椂姣旇緝
+
+            if (sessionStorage.login != "login") {
+                layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+                    icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+                }, function () { window.location.href = "../../user/login.html"; });
+            }
+
+            if (!OperationType || OperationType == "1") {
+                OperationType = 1;
+                createBillNo();
+                $("#HMaker").val(sessionStorage["HUserName"]);
+                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+                get_InitGrid();
+            }
+            else if (OperationType == "3") {
+                if (!linterid || linterid === "0") {
+                    layer.msg("鏃犳晥鐨勫崟鎹甀D", { icon: 5 });
+                    return;
+                }
+                get_InitGrid();
+                RoadBillMain(linterid);
+            } else {
+                layer.msg("鏈煡鐨勬搷浣滅被鍨�: " + OperationType, { icon: 5 });
+            }
+
+            DisPlay_HideColumn();
+
+            form.on('submit(btnSearchHProc)', function () {
+                get_checkSearchHProc();
+            });
+
+            form.on('submit(btnSearchHEmp)', function () {
+                get_checkSearchHEmp();
+            });
+
+            form.on('submit(btnSearchHDept)', function () {
+                get_checkSearchHDept();
+            });
+
+            form.on('submit(btnSearchHStockOrg)', function () {
+                get_checkSearchHStockOrg();
+            });
+
+            form.on('submit(btnSave)', function (data) {
+                // 鏂板鏃朵篃瑕佽繘琛岄樁姊獙璇�
+                if (OperationType == 1) { // 鏂板妯″紡
+                    // 鍦ㄤ繚瀛樺墠寮哄埗妫�鏌ラ樁姊繛缁��
+                    if (!checkStepNonOverlap(true)) {
+                        return false; // 楠岃瘉涓嶉�氳繃锛岄樆姝繚瀛�
+                    }
+                }
+
+                if (AllowLoadData(data)) {
+                    set_AddNew(data);
+                }
+            });
+
+            form.on('submit(btnEdit)', function (data) {
+                if (params[1] != null) {
+                    Pub_Close(1);
+                } else if (params[1] == null) {
+                    Pub_Close(2);
+                }
+            });
+
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                var NewRow = {
+                    "RowID": (table.cache["mainTable"].length + 1) * 10
+                    , "HSeq": table.cache["mainTable"].length + 1
+                    , "HMinQty": "0"
+                    , "HMaxQty": "0"
+                    , "HPriceCoefficient": "1.0"
+                    , "HMaxPrice": "0"
+                    , "HRemark": ""
+                    , "HStockOrgID": $("#HStockOrgID").val()
+                };
+
+                switch (obj.event) {
+                    case 'btn-AddLine':
+                        table.cache["mainTable"].push(NewRow);
+                        option.data = table.cache["mainTable"];
+                        table.render(option);
+                        updateSeq();
+                        setTimeout(function () {
+                            checkStepNonOverlap();
+                        }, 100);
+                        break;
+                    case 'btn-CopyLine':
+                        if (data.length <= 0) {
+                            layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                        }
+                        else if (data.length > 1) {
+                            layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                        }
+                        else {
+                            var copyrow = JSON.parse(JSON.stringify(data[0]));
+                            copyrow.RowID = (table.cache["mainTable"].length + 1) * 10;
+                            copyrow.HSeq = table.cache["mainTable"].length + 1;
+                            table.cache["mainTable"].push(copyrow);
+                            option.data = table.cache["mainTable"];
+                            table.render(option);
+                            updateSeq();
+                            setTimeout(function () {
+                                checkStepNonOverlap();
+                            }, 100);
+                        }
+                        break;
+                    case 'set_HideColumn':
+                        get_HideColumn();
+                        break;
+                }
+            });
+
+            table.on('tool(mainTable)', function (obj) {
+                set_GridDelete(obj);
+            });
+
+            table.on('edit(mainTable)', function (obj) {
+                var oldText = $(this).prev().text();
+                var value = obj.value
+                    , data = obj.data
+                    , field = obj.field;
+                var ref = /^\d+(\.\d+)?$/;
+                var refInt = /^\d+$/;
+
+                switch (field) {
+                    case "HSeq":
+                        if (!refInt.test(value) || value <= 0) {
+                            obj.update({ HSeq: oldText });
+                            layer.msg("搴忓彿蹇呴』涓烘鏁存暟锛�");
+                        } else {
+                            updateSeq();
+                        }
+                        break;
+                    case "HMinQty":
+                        if (!refInt.test(value) || value < 0) {
+                            obj.update({ HMinQty: oldText });
+                            layer.msg("鏈�灏忔暟閲忓繀椤讳负闈炶礋鏁存暟锛�");
+                        } else {
+                            checkStepNonOverlap();
+                        }
+                        break;
+                    case "HMaxQty":
+                        if (!refInt.test(value) || value < 0) {
+                            obj.update({ HMaxQty: oldText });
+                            layer.msg("鏈�澶ф暟閲忓繀椤讳负闈炶礋鏁存暟锛�");
+                        } else {
+                            checkStepNonOverlap();
+                        }
+                        break;
+                    case "HPriceCoefficient":
+                        if (!ref.test(value) || value <= 0) {
+                            obj.update({ HPriceCoefficient: oldText });
+                            layer.msg("宸ヤ环绯绘暟蹇呴』涓烘鏁帮紒");
+                        }
+                        break;
+                    case "HMaxPrice":
+                        if (!ref.test(value) || value < 0) {
+                            obj.update({ HMaxPrice: oldText });
+                            layer.msg("鏈�澶у伐浠峰繀椤讳负闈炶礋鏁帮紒");
+                        }
+                        break;
+                }
+            });
+
+            function getUrlVars() {
+                var vars = [], hash;
+                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+                for (var i = 0; i < hashes.length; i++) {
+                    hash = hashes[i].split('=');
+                    vars.push(hash[0]);
+                    vars[hash[0]] = hash[1];
+                }
+                return vars;
+            }
+
+            function createBillNo() {
+                $.ajax({
+                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    type: "GET",
+                    data: { "HBillType": '3341' },
+                    success: function (d) {
+                        if (d && d.data && d.data.length > 0) {
+                            var hInterID = d.data[0].HInterID || "0";
+                            var hBillNo = d.data[0].HBillNo || "";
+
+                            if (!hInterID || hInterID === "0" || hInterID === "") {
+                                hInterID = new Date().getTime().toString();
+                                hBillNo = "JTCF" + Format(new Date(), "yyyyMMddHHmmss");
+                            }
+
+                            $("#HInterID").val(hInterID);
+                            $("#HBillNo").val(hBillNo);
+                            $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+                            $("#HMaker").val(sessionStorage["HUserName"] || "admin");
+                            $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd HH:mm:ss"));
+                        } else {
+                            var timestamp = new Date().getTime();
+                            $("#HInterID").val(timestamp);
+                            $("#HBillNo").val("JTCF" + Format(new Date(), "yyyyMMddHHmmss"));
+                            $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+                        }
+                    },
+                    error: function () {
+                        var timestamp = new Date().getTime();
+                        $("#HInterID").val(timestamp);
+                        $("#HBillNo").val("JTCF" + Format(new Date(), "yyyyMMddHHmmss"));
+                        $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+                    }
+                });
+            }
+
+            function Organ() {
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/Web/GetOrganizations",
+                    async: false,
+                    success: function (result) {
+                        var Organization = "";
+                        if (result.count == 1) {
+                            var data = result.data;
+                            for (var i = 0; i < data.length; i++) {
+                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+                            }
+                            $("#HStockOrgID").append(Organization);
+                            $("#HStockOrgID").val(HStockOrgID)
+                            form.render('select');
+                        }
+                        layer.closeAll("loading");
+                    },
+                    complete: function (XHR, TS) { XHR = null }
+                })
+            }
+
+            Organ();
+
+            function get_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , limit: 50
+                    , totalRow: true
+                    , cellMinWidth: 120
+                    , height: 400
+                    , cols: [[
+                        { type: 'checkbox', totalRowText: '鍚堣' }
+                        , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+                        , { field: 'RowID', title: '琛屽彿', hide: true, style: 'background-color: #f9f9f9;' }
+                        , { field: 'HSeq', title: '闃舵搴忓彿', edit: 'text', sort: true }
+                        , { field: 'HMinQty', title: '鏈�灏忔暟閲�', edit: 'text', totalRow: true }
+                        , { field: 'HMaxQty', title: '鏈�澶ф暟閲�', edit: 'text', totalRow: true }
+                        , { field: 'HPriceCoefficient', title: '宸ヤ环绯绘暟', edit: 'text' }
+                        , { field: 'HMaxPrice', title: '鏈�澶у伐浠�', edit: 'text', totalRow: true }
+                        , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+                        , { field: 'HStockOrgID', title: '缁勭粐ID', hide: true }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+                    ]]
+                };
+
+                if (OperationType == 1) {
+                    var rowdata = [{
+                        "RowID": 10
+                        , "HSeq": 1
+                        , "HMinQty": "0"
+                        , "HMaxQty": "0"
+                        , "HPriceCoefficient": "1.0"
+                        , "HMaxPrice": "0"
+                        , "HRemark": ""
+                        , "HStockOrgID": "0"
+                    }];
+                    option.data = rowdata;
+                }
+
+                table.render(option);
+            }
+
+            function RoadBillMain(linterid) {
+                var index = layer.load(1, { shade: [0.1, '#fff'] });
+
+                $.ajax({
+                    url: GetWEBURL() + "/Gy_SteppedPriceCoefficientBill/editInit",
+                    type: "GET",
+                    data: {
+                        "HInterID": linterid,
+                        "user": sessionStorage["HUserName"] || "admin"
+                    },
+                    timeout: 10000,
+                    success: function (result) {
+                        layer.close(index);
+
+                        console.log("=== API杩斿洖鏁版嵁 ===");
+                        console.log("瀹屾暣鍝嶅簲:", result);
+
+                        if (result && result.code == "1" && result.data) {
+                            console.log("data.Main:", result.data.Main);
+                            console.log("data.Sub:", result.data.Sub);
+
+                            // 妫�鏌ヤ富琛ㄦ暟鎹�
+                            if (result.data.Main && result.data.Main.length > 0) {
+                                var mainData = result.data.Main[0];
+                                console.log("涓昏〃瀛楁鍒楄〃:");
+                                for (var key in mainData) {
+                                    console.log(key + ":", mainData[key]);
+                                }
+
+                                // 鐗瑰埆妫�鏌ュ伐搴忕浉鍏冲瓧娈�
+                                console.log("HProcID:", mainData.HProcID);
+                                console.log("HProcName:", mainData.HProcName);
+                            }
+
+                            processEditData(result.data);
+                        } else {
+                            var errorMsg = result ? (result.Message || result.msg || "API杩斿洖鏍煎紡閿欒") : "API杩斿洖涓虹┖";
+                            console.error("API杩斿洖閿欒:", errorMsg);
+                            layer.msg("鏁版嵁鍔犺浇澶辫触锛�" + errorMsg, { icon: 2 });
+                        }
+                    },
+                    error: function (xhr, status, error) {
+                        layer.close(index);
+                        console.error("API璇锋眰澶辫触:", status, error);
+                        console.log("HTTP鐘舵�佺爜:", xhr.status);
+                        console.log("鍝嶅簲鏂囨湰:", xhr.responseText);
+
+                        if (xhr.status === 404) {
+                            layer.msg("鎺ュ彛涓嶅瓨鍦紝璇锋鏌RL", { icon: 5 });
+                        } else if (xhr.status === 500) {
+                            layer.msg("鏈嶅姟鍣ㄥ唴閮ㄩ敊璇�", { icon: 5 });
+                        } else {
+                            layer.msg("缃戠粶閿欒锛岃妫�鏌ヨ繛鎺�", { icon: 5 });
+                        }
+                    }
+                });
+            }
+
+            function processEditData(data) {
+                if (data.Main && data.Main.length > 0) {
+                    var mainData = data.Main[0];
+
+                    var formData = {
+                        "HInterID": mainData.HInterID || "0",
+                        "HBillNo": mainData.HBillNo || "",
+                        "HRemark": mainData.HRemark || "",
+                        "HProcID": mainData.HProcID || "0",
+                        "HProcName": mainData.HProcName || "",
+                        "HEmpID": mainData.HEmpID || "0",
+                        "HEmpName": mainData.HEmpName || "",
+                        "HDeptID": mainData.HDeptID || "0",
+                        "HDeptName": mainData.HDeptName || "",
+                        "HStockOrgID": mainData.HStockOrgID || "0",
+                        "HMaker": mainData.HMaker || "",
+                        "HUpDater": mainData.HUpDater || "",
+                        "HChecker": mainData.HChecker || "",
+                        "HCloseMan": mainData.HCloseMan || "",
+                        "HDeleteMan": mainData.HDeleteMan || "",
+                        "HBacker": mainData.HBacker || "",
+                        "HBackRemark": mainData.HBackRemark || ""
+                    };
+
+                    // 淇濆瓨鍘熷宸ュ簭ID锛堢敤浜庣紪杈戞椂姣旇緝鏄惁淇敼浜嗗伐搴忥級
+                    originalProcessID = formData.HProcID;
+
+                    try {
+                        if (mainData.HDate) {
+                            var hDate = new Date(mainData.HDate);
+                            formData.HDate = hDate.toISOString().split('T')[0];
+                        }
+
+                        if (mainData.HMakeDate) {
+                            var makeDate = new Date(mainData.HMakeDate);
+                            formData.HMakeDate = formatDateTime(makeDate);
+                        }
+
+                        if (mainData.HUpDateDate) {
+                            var updateDate = new Date(mainData.HUpDateDate);
+                            formData.HUpDateDate = formatDateTime(updateDate);
+                        }
+
+                        if (mainData.HCheckDate) {
+                            var checkDate = new Date(mainData.HCheckDate);
+                            formData.HCheckDate = formatDateTime(checkDate);
+                        }
+
+                        if (mainData.HCloseDate) {
+                            var closeDate = new Date(mainData.HCloseDate);
+                            formData.HCloseDate = formatDateTime(closeDate);
+                        }
+
+                        if (mainData.HDeleteDate) {
+                            var deleteDate = new Date(mainData.HDeleteDate);
+                            formData.HDeleteDate = formatDateTime(deleteDate);
+                        }
+
+                        if (mainData.HBackDate) {
+                            var backDate = new Date(mainData.HBackDate);
+                            formData.HBackDate = formatDateTime(backDate);
+                        }
+                    } catch (e) {
+                        if (mainData.HDate) formData.HDate = mainData.HDate.toString().split(' ')[0];
+                        if (mainData.HMakeDate) formData.HMakeDate = mainData.HMakeDate.toString();
+                        if (mainData.HUpDateDate) formData.HUpDateDate = mainData.HUpDateDate.toString();
+                        if (mainData.HCheckDate) formData.HCheckDate = mainData.HCheckDate.toString();
+                        if (mainData.HCloseDate) formData.HCloseDate = mainData.HCloseDate.toString();
+                        if (mainData.HDeleteDate) formData.HDeleteDate = mainData.HDeleteDate.toString();
+                        if (mainData.HBackDate) formData.HBackDate = mainData.HBackDate.toString();
+                    }
+
+                    layui.form.val("formData", formData);
+
+                    if (formData.HStockOrgID && formData.HStockOrgID !== "0") {
+                        $("#HStockOrgID").val(formData.HStockOrgID);
+                        form.render('select');
+                    }
+
+                    if (mainData.HChecker || mainData.HBillStatus == 2) {
+                        $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);
+                        layer.msg("鍗曟嵁宸插鏍革紝涓嶈兘缂栬緫", { icon: 2 });
+                    } else {
+                        $('#btnSave').removeClass("layui-btn-disabled").attr("disabled", false);
+                    }
+                } else {
+                    layer.msg("鏈幏鍙栧埌涓昏〃鏁版嵁", { icon: 2 });
+                }
+
+                if (data.Sub && data.Sub.length > 0) {
+                    var subTableData = [];
+                    for (var i = 0; i < data.Sub.length; i++) {
+                        var subItem = data.Sub[i];
+                        var rowItem = {
+                            "RowID": subItem.RowID || (i + 1) * 10,
+                            "HSeq": subItem.HSeq || (i + 1),
+                            "HMinQty": subItem.HMinQty || "0",
+                            "HMaxQty": subItem.HMaxQty || "0",
+                            "HPriceCoefficient": subItem.HPriceCoefficient || "1.0",
+                            "HMaxPrice": subItem.HMaxPrice || "0",
+                            "HRemark": subItem.HRemark || "",
+                            "HStockOrgID": subItem.HStockOrgID || $("#HStockOrgID").val() || "0"
+                        };
+                        subTableData.push(rowItem);
+                    }
+
+                    option.data = subTableData;
+                    table.render(option);
+
+                    setTimeout(function () {
+                        table.reload('mainTable', {
+                            data: subTableData
+                        });
+                    }, 100);
+
+                    layer.msg("宸插姞杞�" + subTableData.length + "琛岄樁姊暟鎹�", { icon: 1 });
+                } else {
+                    option.data = [];
+                    table.render(option);
+                }
+            }
+
+            function formatDateTime(date) {
+                if (!date) return "";
+                try {
+                    if (typeof date === 'string') {
+                        date = new Date(date);
+                    }
+                    return date.getFullYear() + "-" +
+                        (date.getMonth() + 1).toString().padStart(2, '0') + "-" +
+                        date.getDate().toString().padStart(2, '0') + " " +
+                        date.getHours().toString().padStart(2, '0') + ":" +
+                        date.getMinutes().toString().padStart(2, '0') + ":" +
+                        date.getSeconds().toString().padStart(2, '0');
+                } catch (e) {
+                    return date.toString();
+                }
+            }
+
+            // ================ 鏂板锛氬伐搴忓敮涓�鎬ф鏌ュ嚱鏁� ================
+            function checkProcessUnique() {
+                var processID = $("#HProcID").val();
+                var currentBillID = $("#HInterID").val();
+                var processName = $("#HProcName").val() || "璇ュ伐搴�";
+
+                if (processID === "0" || !processID) {
+                    return true;
+                }
+
+                // 缂栬緫妯″紡锛氬鏋滃伐搴廔D娌℃湁鍙樺寲锛屽垯鍏佽
+                if (OperationType == 3 && currentBillID && currentBillID !== "0") {
+                    if (originalProcessID && originalProcessID === processID) {
+                        return true; // 宸ュ簭娌′慨鏀癸紝鍏佽淇濆瓨
+                    }
+                }
+
+                var index = layer.load(1, { shade: [0.1, '#fff'] });
+                var isUnique = true;
+
+                $.ajax({
+                    url: GetWEBURL() + "/Gy_SteppedPriceCoefficientBill/CheckProcessUnique",
+                    type: "POST",
+                    async: false,
+                    contentType: "application/json",
+                    data: JSON.stringify({
+                        "HProcID": processID,
+                        "HStockOrgID": $("#HStockOrgID").val(),
+                        "ExcludeID": currentBillID || "0",
+                        "user": sessionStorage["HUserName"] || "admin"
+                    }),
+                    success: function (result) {
+                        layer.close(index);
+                        if (result && result.code == "1") {
+                            if (result.data && result.data.exists) {
+                                isUnique = false;
+                                var existingBillNo = result.data.billNo || "";
+
+                                if (existingBillNo) {
+                                    layer.msg(processID + "宸插湪鍗曟嵁[" + existingBillNo + "]涓娇鐢紝涓�涓伐搴忓彧鑳藉搴斾竴鏉¢樁姊伐浠风郴鏁版暟鎹�!", {
+                                        icon: 5,
+                                        time: 5000
+                                    });
+                                } else {
+                                    layer.msg(processID + "宸插瓨鍦ㄥ叾浠栧崟鎹腑锛屼竴涓伐搴忓彧鑳藉搴斾竴鏉¢樁姊伐浠风郴鏁版暟鎹�!", {
+                                        icon: 5,
+                                        time: 5000
+                                    });
+                                }
+                            }
+                        } else {
+                            layer.msg("宸ュ簭鍞竴鎬ф鏌ュけ璐ワ紝璇风◢鍚庨噸璇�", { icon: 3 });
+                        }
+                    },
+                    error: function () {
+                        layer.close(index);
+                        layer.msg("宸ュ簭鍞竴鎬ф鏌ユ湇鍔℃殏鏃朵笉鍙敤", { icon: 3 });
+                        // 涓轰簡涓嶉樆濉炵敤鎴凤紝杩欓噷杩斿洖true锛屼絾鐢熶骇鐜搴旇鏍规嵁闇�姹傝皟鏁�
+                        isUnique = true;
+                    }
+                });
+
+                return isUnique;
+            }
+
+            function set_AddNew(data) {
+                if (window.isSaving) {
+                    layer.msg("姝e湪淇濆瓨锛岃绋嶅��...", { icon: 0 });
+                    return;
+                }
+                window.isSaving = true;
+
+                var originalText = $('#btnSave').text();
+                $('#btnSave').text('淇濆瓨涓�...').addClass("layui-btn-disabled").attr("disabled", true);
+
+                var tableMain = {
+                    "HInterID": $("#HInterID").val() || "0",
+                    "HYear": new Date($("#HDate").val()).getFullYear(),
+                    "HPeriod": new Date($("#HDate").val()).getMonth() + 1,
+                    "HBillType": "GYSTPRICECOEFF",
+                    "HBillSubType": "",
+                    "HDate": $("#HDate").val() || Format(new Date(), "yyyy-MM-dd"),
+                    "HBillNo": $("#HBillNo").val() || "",
+                    "HBillStatus": 1,
+                    "HRemark": $("#HRemark").val() || "",
+                    "HProcID": $("#HProcID").val() || "0",
+                    "HEmpID": $("#HEmpID").val() || "0",
+                    "HDeptID": $("#HDeptID").val() || "0",
+                    "HStockOrgID": $("#HStockOrgID").val() || "0",
+                    "HMaker": sessionStorage["HUserName"] || "admin",
+                    "HMakeDate": Format(new Date(), "yyyy-MM-dd HH:mm:ss")
+                };
+
+                var tableSub = [];
+                var tableCache = table.cache["mainTable"];
+
+                if (tableCache && tableCache.length > 0) {
+                    for (var i = 0; i < tableCache.length; i++) {
+                        var row = tableCache[i];
+                        if (row && row != "") {
+                            var subItem = {
+                                "HSeq": row["HSeq"] || (i + 1),
+                                "HMinQty": row["HMinQty"] || "0",
+                                "HMaxQty": row["HMaxQty"] || "0",
+                                "HPriceCoefficient": row["HPriceCoefficient"] || "1.0",
+                                "HMaxPrice": row["HMaxPrice"] || "0",
+                                "HRemark": row["HRemark"] || "",
+                                "HStockOrgID": row["HStockOrgID"] || $("#HStockOrgID").val() || "0"
+                            };
+                            tableSub.push(subItem);
+                        }
+                    }
+                }
+
+                tableMain.SubItems = tableSub;
+
+                var requestData = {
+                    "oMain": JSON.stringify(tableMain) + ";" + (sessionStorage["HUserName"] || "admin")
+                };
+
+                var index = layer.load(2, { time: 0 });
+
+                $.ajax({
+                    type: "POST",
+                    url: GetWEBURL() + "/Gy_SteppedPriceCoefficientBill/ModifyByID",
+                    contentType: "application/json",
+                    data: JSON.stringify(requestData),
+                    dataType: "json",
+                    timeout: 30000,
+                    success: function (result) {
+                        layer.close(index);
+                        window.isSaving = false;
+                        $('#btnSave').text(originalText).removeClass("layui-btn-disabled").attr("disabled", false);
+
+                        if (result.code == "1") {
+                            layer.msg("淇濆瓨鎴愬姛锛�", { icon: 1, time: 2000 });
+                            $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);
+
+                            if (OperationType == 1) {
+                                OperationType = 3;
+                            }
+                        } else {
+                            layer.msg("宸ュ簭鏈�夋嫨");
+                        }
+                    },
+                    error: function (xhr, status, error) {
+                        layer.close(index);
+                        window.isSaving = false;
+                        $('#btnSave').text(originalText).removeClass("layui-btn-disabled").attr("disabled", false);
+
+                        var errorMsg = "璇锋眰澶辫触锛�<br>";
+                        if (status === "timeout") {
+                            errorMsg += "璇锋眰瓒呮椂";
+                        } else {
+                            errorMsg += "閿欒浠g爜: " + xhr.status + "<br>閿欒淇℃伅: " + error;
+                        }
+
+                        layer.msg(errorMsg, { icon: 5, time: 5000 });
+                    }
+                });
+            }
+
+            function AllowLoadData(data) {
+                var temp;
+                var ref = /^\d+(\.\d+)?$/;
+                var refInt = /^\d+$/;
+
+                // 琛ㄥご鏁版嵁妫�楠�
+                if ($("#HBillNo").val() == "") {
+                    layer.msg("鍗曟嵁鍙蜂笉鑳戒负绌�!");
+                    return false;
+                }
+                if ($("#HDate").val() == "") {
+                    layer.msg("鏃ユ湡涓嶈兘涓虹┖!");
+                    return false;
+                }
+                if ($("#HProcID").val() == "0") {
+                    layer.msg("宸ュ簭鏈�夋嫨!");
+                    return false;
+                }
+                if ($("#HStockOrgID").val() == "0") {
+                    layer.msg("缁勭粐鏈�夋嫨!");
+                    return false;
+                }
+
+                // 鏂板锛氭鏌ュ伐搴忔槸鍚﹀凡瀛樺湪
+                if (!checkProcessUnique()) {
+                    return false;
+                }
+
+                // 瀛愯〃鏁版嵁妫�楠�
+                var tableData = table.cache["mainTable"];
+                if (!tableData || tableData.length == 0) {
+                    layer.msg("璇疯嚦灏戞坊鍔犱竴鏉¢樁姊暟鎹�!");
+                    return false;
+                }
+
+                var validRows = 0;
+                for (var i = 0; i < tableData.length; i++) {
+                    if (tableData[i] && tableData[i] != "") {
+                        validRows++;
+                        var rowData = tableData[i];
+
+                        temp = rowData["HMinQty"];
+                        if (temp == "" || !refInt.test(temp) || parseInt(temp) < 0) {
+                            layer.msg("绗�" + (i + 1) + "琛�:鏈�灏忔暟閲忓繀椤讳负闈炶礋鏁存暟!");
+                            return false;
+                        }
+
+                        temp = rowData["HMaxQty"];
+                        if (temp == "" || !refInt.test(temp) || parseInt(temp) < 0) {
+                            layer.msg("绗�" + (i + 1) + "琛�:鏈�澶ф暟閲忓繀椤讳负闈炶礋鏁存暟!");
+                            return false;
+                        }
+
+                        if (parseInt(rowData["HMinQty"]) > parseInt(rowData["HMaxQty"])) {
+                            layer.msg("绗�" + (i + 1) + "琛�:鏈�灏忔暟閲忎笉鑳藉ぇ浜庢渶澶ф暟閲�!");
+                            return false;
+                        }
+
+                        temp = rowData["HPriceCoefficient"];
+                        if (temp == "" || !ref.test(temp) || parseFloat(temp) <= 0) {
+                            layer.msg("绗�" + (i + 1) + "琛�:宸ヤ环绯绘暟蹇呴』涓烘鏁�!");
+                            return false;
+                        }
+
+                        temp = rowData["HMaxPrice"];
+                        if (temp == "" || !ref.test(temp) || parseFloat(temp) < 0) {
+                            layer.msg("绗�" + (i + 1) + "琛�:鏈�澶у伐浠峰繀椤讳负闈炶礋鏁�!");
+                            return false;
+                        }
+                    }
+                }
+
+                if (validRows === 0) {
+                    layer.msg("璇疯嚦灏戞坊鍔犱竴鏉℃湁鏁堢殑闃舵鏁版嵁!");
+                    return false;
+                }
+
+                if (!checkStepNonOverlap(true)) {
+                    return false;
+                }
+
+                return true;
+            }
+
+            function checkStepNonOverlap(isValidation) {
+                var tableData = table.cache["mainTable"];
+                if (!tableData || tableData.length <= 1) return true;
+
+                var validData = [];
+                for (var i = 0; i < tableData.length; i++) {
+                    if (tableData[i] && tableData[i] != "") {
+                        var minQty = parseInt(tableData[i]["HMinQty"]);
+                        var maxQty = parseInt(tableData[i]["HMaxQty"]);
+
+                        if (minQty > maxQty) {
+                            if (isValidation) {
+                                layer.msg("绗�" + tableData[i]["HSeq"] + "闃�:鏈�灏忔暟閲忎笉鑳藉ぇ浜庢渶澶ф暟閲�!");
+                                return false;
+                            } else {
+                                layer.msg("绗�" + tableData[i]["HSeq"] + "闃�:鏈�灏忔暟閲忎笉鑳藉ぇ浜庢渶澶ф暟閲�!", { icon: 2 });
+                                return false;
+                            }
+                        }
+                        validData.push(tableData[i]);
+                    }
+                }
+
+                if (validData.length <= 1) return true;
+
+                validData.sort(function (a, b) {
+                    return parseInt(a.HMinQty) - parseInt(b.HMinQty);
+                });
+
+                for (var i = 1; i < validData.length; i++) {
+                    var prevMin = parseInt(validData[i - 1]["HMinQty"]);
+                    var prevMax = parseInt(validData[i - 1]["HMaxQty"]);
+                    var currMin = parseInt(validData[i]["HMinQty"]);
+                    var currMax = parseInt(validData[i]["HMaxQty"]);
+
+                    if (currMin <= prevMax) {
+                        if (isValidation) {
+                            layer.msg("绗�" + validData[i]["HSeq"] + "闃朵笌绗�" + validData[i - 1]["HSeq"] + "闃�:闃舵鑼冨洿閲嶅彔!");
+                            return false;
+                        } else {
+                            layer.msg("绗�" + validData[i]["HSeq"] + "闃朵笌绗�" + validData[i - 1]["HSeq"] + "闃�:闃舵鑼冨洿閲嶅彔!");
+                        }
+                    }
+                }
+                return true;
+            }
+
+            function updateSeq() {
+                var tableData = table.cache["mainTable"];
+                if (!tableData) return;
+
+                var seq = 1;
+                for (var i = 0; i < tableData.length; i++) {
+                    if (tableData[i] && tableData[i] != "") {
+                        tableData[i].HSeq = seq;
+                        seq++;
+                    }
+                }
+                option.data = tableData;
+                table.render(option);
+            }
+
+            function set_GridDelete(obj) {
+                if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+                        var oldData = table.cache["mainTable"];
+                        if (oldData && obj.tr.data('index') < oldData.length) {
+                            oldData.splice(obj.tr.data('index'), 1)
+                            option.data = oldData;
+                            table.render(option);
+                            updateSeq();
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+
+            function get_HideColumn() {
+                var colName = "";
+                var contentUrl = "";
+                for (var i = 1; i < option.cols[0].length - 1; i++) {
+                    colName += option.cols[0][i]["title"] + ",";
+                }
+                var urlStr = window.document.location.pathname;
+                var urlLen = urlStr.split('/');
+                for (var i = 0; i < urlLen.length - 4; i++) {
+                    contentUrl += "../";
+                }
+                colName = encodeURI(colName.substring(0, colName.length - 1));
+
+                contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim"
+                    , title: "闅愯棌鍒楄缃�"
+                    , closeBtn: 1
+                    , shift: 2
+                    , area: ["50%", "90%"]
+                    , maxmin: true
+                    , content: [contentUrl, "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        DisPlay_HideColumn();
+                        layer.close(index);
+                    }
+                });
+            }
+
+            function DisPlay_HideColumn() {
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                    type: "GET",
+                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                    async: false,
+                    success: function (data1) {
+                        if (data1.data.length != 0) {
+                            var dataCol = [];
+                            var titleData = ["琛屽彿", "缁勭粐ID"];
+
+                            dataCol = data1.data[0].HGridString.split(',');
+
+                            for (var i = 0; i < option.cols[0].length - 2; i++) {
+                                var dataCols = dataCol[i].split('|');
+                                if (dataCols[1] == 1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+                                if (dataCols[3] > 0) {
+                                    option.cols[0][i + 1]["width"] = dataCols[3];
+                                }
+                                if (data1.data[0].HFontSize != 0) {
+                                    option.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;";
+                                } else {
+                                    option.cols[0][i + 1]["style"] += "font-size:100%";
+                                }
+                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+                                    option.cols[0][i + 1]["hide"] = false;
+                                }
+                                switch (dataCols[2]) {
+                                    case "L":
+                                        option.cols[0][i + 1]["align"] = "left";
+                                        break;
+                                    case "M":
+                                        option.cols[0][i + 1]["align"] = "center";
+                                        break;
+                                    case "R":
+                                        option.cols[0][i + 1]["align"] = "right";
+                                        break;
+                                }
+                            }
+
+                            for (var i = 1; i < option.cols[0].length - 1; i++) {
+                                if (option.cols[0][i]["fixed"] != null) {
+                                    option.cols[0][i]["fixed"] = null;
+                                }
+                                else {
+                                    break;
+                                }
+                            }
+                            if (data1.data[0].HFixCols != 0) {
+                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
+                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+                                        data1.data[0].HFixCols += 1;
+                                    }
+                                    option.cols[0][i + 1]["fixed"] = "left";
+                                }
+                            }
+                            table.render(option);
+                        } else {
+                            table.render(option);
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+        });
+
+        function get_checkSearchHProc() {
+            layer.open({
+                type: 2
+                , skin: 'layui-layer-rim'
+                , area: ['90%', '90%']
+                , title: '宸ュ簭鍒楄〃'
+                , shift: 2
+                , content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html?Type=2&excludeUsed=true']
+                , btn: ['纭畾', '鍙栨秷']
+                , btn1: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index];
+                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
+                    if (checkStatus.data.length === 0) {
+                        return layer.msg('璇烽�夋嫨鏁版嵁');
+                    }
+
+                    var selectedProcessID = checkStatus.data[0].HItemID;
+                    var selectedProcessName = checkStatus.data[0].宸ュ簭鍚嶇О;
+
+                    // 鍦ㄥ脊绐椾腑閫夋嫨宸ュ簭鍚庯紝鐩存帴璁剧疆锛屼繚瀛樻椂鍐嶆鏌�
+                    $("#HProcID").val(selectedProcessID);
+                    $("#HProcName").val(selectedProcessName);
+                    layer.close(index);
+                }
+                , btn2: function (index, layero) { }
+                , end: function () { }
+            })
+        }
+    </script>
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\351\230\266\346\242\257\345\267\245\344\273\267\347\263\273\346\225\260/Gy_SteppedPriceCoefficientBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\351\230\266\346\242\257\345\267\245\344\273\267\347\263\273\346\225\260/Gy_SteppedPriceCoefficientBillList.html"
new file mode 100644
index 0000000..e0383ab
--- /dev/null
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\351\230\266\346\242\257\345\267\245\344\273\267\347\263\273\346\225\260/Gy_SteppedPriceCoefficientBillList.html"
@@ -0,0 +1,1637 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>闃舵宸ヤ环绯绘暟鍗曞垪琛�</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <!--寮曠敤layui鏍峰紡鏂囦欢-->
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <!--寮曠敤layui js鏂囦欢-->
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/HideButton.js"></script>
+    <script src="../../../layuiadmin/soulTable.slim.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
+
+    <style type="text/css">
+        input.layui-input.layui-unselect {
+            padding-right: 0;
+        }
+    </style>
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <div class="layui-colla-title layui-inline">
+                                    <div class="layui-inline">
+                                        <span>鏇村</span>
+                                    </div>
+                                </div>
+                                <!-- 鍒跺崟鏃ユ湡锛堝垱寤烘椂闂达級杩囨护 -->
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" id="HMakeDate_Begin" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" id="HMakeDate_End" style="width:190px;">
+                                    </div>
+                                </div>
+                                <!-- 鍗曟嵁鍙锋煡璇� -->
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo">
+                                    </div>
+                                </div>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                </button>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                                <!--鏄剧ず褰撳墠杩囨护鏂规-->
+                                <div class="layui-inline" style="margin-left:5px;">
+                                    <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
+                                </div>
+                                <div class="layui-colla-content" style="padding: 6px; margin-left: 6%;">
+                                    <!-- 楂樼骇杩囨护鏉′欢淇濇寔涓嶅彉 -->
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName" id="ColName" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent1" id="ColContent1">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent2" id="ColContent2">
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <div id="page" style="position: relative; bottom: 0;"></div>
+                        <script type="text/html" id="toolbarDemo">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Add" id="btn_Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Edit" id="btn_Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-print" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Delete" id="btn_Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Refresh" id="btn_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Audit" id="btn_Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_DeAudit" id="btn_DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Close" id="btn_Close"><i class="layui-icon layui-icon-radio"></i>鍏抽棴</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_DeClose" id="btn_DeClose"><i class="layui-icon layui-icon-circle"></i>鍙嶅叧闂�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Drop" id="btn_Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_DeDrop" id="btn_DeDrop"><i class="layui-icon layui-icon-circle"></i>鍙嶄綔搴�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Exit" id="btn_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_HideColumn" id="btn_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_HideButton" id="btn_HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_SaveScheme" id="btn_SaveScheme"><i class="layui-icon layui-icon-template"></i>淇濆瓨鏂规</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_ReadScheme" id="btn_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
+                            </div>
+                        </script>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+    <script>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate', 'soulTable'], function () {
+            //#region 鍏叡鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element
+                , laypage = layui.laypage
+                , laydate = layui.laydate
+                , soulTable = layui.soulTable
+            var HModName = "Gy_SteppedPriceCoefficientBillList";
+            var HBillType = "GYSTPRICECOEFF";
+            var HMaker = sessionStorage["HUserName"]
+            var HStockOrgID = sessionStorage["OrganizationID"]  //缁勭粐ID
+            var sWhere = "";
+            var ins;                //鐢ㄤ簬瀵煎嚭excel
+            var option = [];
+            var page = 1;//鍒嗛〉鏁版嵁
+            var size = 50;
+            var columns = "";
+            var titleData = [];     //涓嶉渶瑕佹樉绀虹殑瀛楁
+            //#endregion
+
+            //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HBillType) == "" ? document.title : get_PageTitle(HBillType);
+            //#endregion
+
+            //#region 銆愯繃婊ゆ柟妗堛��
+
+            //杩囨护鏉′欢鐨刢lass绫�
+            var HClassTag = "ForFilteringSchemes";
+            //妯″潡鍚嶇О锛堜腑鏂囩増锛� 姣忎釜妯″潡椤甸潰閮介渶瑕佷慨鏀�
+            window.HModuleName = "闃舵宸ヤ环绯绘暟鍗曞垪琛�";
+            //鏄惁宸茬粡閫夋嫨浜嗚繃婊ゆ柟妗堬紙鍏ㄥ眬鍙橀噺锛�
+            window.HDefaultFilter = "";
+            //閫夋嫨鐨勮繃婊ゆ柟妗堝唴鐮侊紙鍏ㄥ眬鍙橀噺锛�
+            window.HInterID_Choose = 0;
+
+            //#endregion
+
+            //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+            //#region 鍒濆鍖栫晫闈�
+
+            set_ClearBill();
+
+            function set_ClearBill() {
+                // 鍒濆鍖栧埗鍗曟棩鏈熻寖鍥达紙鏈�杩�30澶╋級
+                var endDate = new Date();
+                var startDate = new Date(endDate - 1000 * 60 * 60 * 24 * 30);
+
+                $("#HMakeDate_Begin").val(Pub_Format(startDate, "yyyy-MM-dd"));
+                $("#HMakeDate_End").val(Pub_Format(endDate, "yyyy-MM-dd"));
+
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规
+                get_DefaultModule();
+            }
+            //#endregion
+
+            //#region 鍒濆鍖栬〃鏍兼柟娉�
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , page: false
+                    , totalRow: true
+                    , height: 'full-50'
+                    , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
+                    , done: function (res, curr, count) {
+                        soulTable.render(this);
+                    }
+
+                };
+                optionPage = {
+                    elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
+                    count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
+                    limit: 50,
+                    limits: [50, 500, 5000, 50000],
+                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+                    jump: function (obj, first) {
+                        //棣栨涓嶆墽琛�
+                        if (!first) {
+                            //do something
+                            page = obj.curr;
+                            size = obj.limit;
+                            get_FastQuery();
+                        }
+                    }
+                }
+                laypage.render(optionPage);
+            }
+            //#endregion
+
+            //#region 鐐瑰嚮琛岄�変腑楂樹寒
+            table.on('row(mainTable)', function (obj) {
+                //閫変腑琛屾敼鍙橀鑹�
+                var flag = !obj.tr.find(':checkbox:first').prop('checked');
+                obj.tr.find(':checkbox').prop('checked', flag);
+                if (flag) {
+                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //璁剧疆澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+                } else {
+                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+                }
+                //mainTable 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+                layui.each(table.cache.mainTable, function (i, l) {
+                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+                        l.LAY_CHECKED = flag;
+                    }
+                });
+            })
+            //#endregion
+
+            table.on('tool(mainTable)', function (obj) {
+                var data = obj.data;
+                if (obj.event == '鍗曟嵁鍙�') {
+                    // 瀹夊叏鑾峰彇HInterID
+                    var HInterID = data.HInterID ? data.HInterID.toString() : "";
+                    var HBillNo = data.HBillNo || "";
+
+                    if (!HInterID || HInterID === "0") {
+                        HInterID = data.hmainid ? data.hmainid.toString() : "";
+                    }
+
+                    console.log("鐐瑰嚮鍗曟嵁鍙�:", HBillNo, "HInterID:", HInterID);
+
+                    if (HInterID && HInterID !== "0") {
+                        layer.open({
+                            type: 2,
+                            area: ['100%', '100%'],
+                            title: HPageTitle + ' - 缂栬緫锛�' + HBillNo + '锛�',
+                            shift: 0,
+                            content: '../../宸ヨ祫绠$悊/闃舵宸ヤ环绯绘暟/Gy_SteppedPriceCoefficientBillEdit.html?OperationType=3&linterid=' + HInterID + '&HSouceBillType=',
+                            btn: ['纭畾'],
+                            end: function (index, layero, that) {
+                                $("#btnSearch").trigger('click');
+                            }
+                        });
+                    } else {
+                        console.error("鏃犳硶鑾峰彇鏈夋晥鐨凥InterID瀛楁锛屾暟鎹�:", data);
+                        layer.msg("鏃犳硶鎵撳紑鍗曟嵁锛屽崟鎹甀D鏃犳晥", { icon: 5 });
+                    }
+                }
+            });
+
+            //#region 鏄剧ず鍒楁暟鎹�
+            function DisPlay_HideColumn() {
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                    type: "GET",
+                    async: false,
+                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.data.length != 0) {
+                            var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+                            var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+                            newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
+                            dataCol = data1.data[0].HGridString.split(',');
+                            //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+                            if (dataCol.length == option.cols[0].length - 1) {
+                                //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+                                for (var j = 0; j < option.cols[0].length - 1; j++) {
+                                    for (var i = 0; i < option.cols[0].length - 1; i++) {
+                                        var dataCols = dataCol[j].split('|');
+                                        //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+                                        if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+                                            //闅愯棌鍒�
+                                            if (dataCols[1] == 1) {
+                                                option.cols[0][i + 1]["hide"] = true;
+                                            }
+                                            //璁剧疆鍒楀
+                                            if (dataCols[3] > 0) {
+                                                option.cols[0][i + 1]["width"] = dataCols[3];
+                                            }
+                                            //璁剧疆鍐呭瀛椾綋澶у皬
+                                            if (data1.data[0].HFontSize != 0) {
+                                                option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                                            } else {
+                                                option.cols[0][i + 1]["style"] = "font-size:100%";
+                                            }
+                                            //鏄剧ず鍒�
+                                            if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+                                                option.cols[0][i + 1]["hide"] = false;
+                                            }
+                                            //缁熻鍒�
+                                            if (dataCols[6] == 1) {
+                                                option.cols[0][i + 1]["totalRow"] = true;
+                                            }
+                                            //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                                            switch (dataCols[2]) {
+                                                case "L":
+                                                    option.cols[0][i + 1]["align"] = "left";
+                                                    break;
+                                                case "M":
+                                                    option.cols[0][i + 1]["align"] = "center";
+                                                    break;
+                                                case "R":
+                                                    option.cols[0][i + 1]["align"] = "right";
+                                                    break;
+                                            }
+                                            //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+                                            if (dataCols[4] != null && dataCols[4] != "") {
+                                                option.cols[0][i + 1]["title"] = dataCols[4];
+                                            }
+                                            newCols[0].push(option.cols[0][i + 1]);
+                                        }
+                                    }
+                                }
+                                //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+                                if (dataCol.length == newCols[0].length - 1) {
+                                    option.cols = newCols;
+                                    //鍙栨秷鍐荤粨鍒�
+                                    for (var i = 1; i < option.cols[0].length - 1; i++) {
+                                        if (option.cols[0][i]["fixed"] != null) {
+                                            option.cols[0][i]["fixed"] = null;
+                                        }
+                                        else {
+                                            break;
+                                        }
+                                    }
+                                    //鍐荤粨鍒�
+                                    if (data1.data[0].HFixCols != 0) {
+                                        for (var i = 0; i < data1.data[0].HFixCols; i++) {
+                                            if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+                                                data1.data[0].HFixCols += 1;
+                                            }
+                                            option.cols[0][i + 1]["fixed"] = "left";
+                                        }
+                                    }
+                                }
+                            }
+                            ins=table.render(option);
+
+                        } else {
+                            ins=table.render(option);
+
+                        }
+                        //鍒锋柊鎸夐挳鏄剧ず
+                        var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                        Display_HideButton(btns, HBillType, HModName, HMaker);
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                })
+            }
+            //#endregion
+
+            //#endregion
+
+            //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
+
+            //#region 宸ュ叿鏍忎簨浠�
+            table.on('toolbar(mainTable)', function (obj) {
+                switch (obj.event) {
+                    //瀵煎嚭鎸夐挳
+                    case 'btn_Export': btn_Export();
+                        break;
+                    //鏂板鎸夐挳
+                    case 'btn_Add': btn_Add();
+                        break;
+                    //缂栬緫鎸夐挳
+                    case 'btn_Edit': btn_Edit();
+                        break;
+                    //鎵撳嵃
+                    case 'btn-print':
+                        get_PrintReport();
+                        break;
+                    //鍒犻櫎鎸夐挳
+                    case 'btn_Delete': btn_Delete();
+                        break;
+                    //鍒锋柊鎸夐挳
+                    case 'btn_Refresh': btn_Refresh();
+                        break;
+                    //瀹℃牳鎸夐挳      锛�1:瀹℃牳銆�2:鍙嶅鏍革級
+                    case 'btn_Audit': set_CheckBill(1);
+                        break;
+                    //鍙嶅鏍告寜閽�
+                    case 'btn_DeAudit': set_CheckBill(2);
+                        break;
+                    //鍏抽棴鎸夐挳        锛�1:鍏抽棴銆�2:鍙嶅叧闂級
+                    case 'btn_Close': set_CloseBill(1);
+                        break;
+                    //鍙嶅叧闂寜閽�
+                    case 'btn_DeClose': set_CloseBill(2);
+                        break;
+                    //浣滃簾鎸夐挳        锛�1:浣滃簾銆�2:鍙嶄綔搴燂級
+                    case 'btn_Drop': set_DropBill(1);
+                        break;
+                    //鍙嶄綔搴熸寜閽�
+                    case 'btn_DeDrop': set_DropBill(2);
+                        break;
+                    //閫�鍑烘寜閽�
+                    case 'btn_Exit': Pub_Close(2);
+                        break;
+                    //鍒楄缃�
+                    case 'btn_HideColumn': get_HideColumn();
+                        break;
+                    //鎸夐挳璁剧疆
+                    case 'btn_HideButton':
+                        var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+                        get_HideButton(btns, HBillType, HModName, HMaker);
+                        break;
+                    //淇濆瓨鏂规
+                    case 'btn_SaveScheme': set_SaveScheme();
+                        break;
+                    //璇诲彇鏂规
+                    case 'btn_ReadScheme': set_ReadScheme();
+                        break;
+                };
+            });
+            //#endregion
+
+            //#region 瀵煎嚭Execel
+            //#region 瀵煎嚭Execel
+            function btn_Export() {
+                var data;
+                //璁剧疆sWhere
+                var ajaxLoad = layer.load();
+
+                // 浣跨敤鍒跺崟鏃ユ湡浣滀负鍒涘缓鏃堕棿杩囨护
+                var HMakeDate_Begin = $("#HMakeDate_Begin").val();  // 寮�濮嬪埗鍗曟棩鏈�
+                var HMakeDate_End = $("#HMakeDate_End").val();      // 缁撴潫鍒跺崟鏃ユ湡
+                var HBillNo = $("#HBillNo").val();                  // 鍗曟嵁鍙�
+
+                var ColName = $("#ColName").val();
+                var Comparator = $("#Comparator").val()
+                var ColContent = $("#ColContent").val();
+
+                var ColName1 = $("#ColName1").val();
+                var Comparator1 = $("#Comparator1").val()
+                var ColContent1 = $("#ColContent1").val();
+                var ColName2 = $("#ColName2").val();
+                var Comparator2 = $("#Comparator2").val()
+                var ColContent2 = $("#ColContent2").val();
+
+                // 娓呯┖涔嬪墠鐨勬潯浠�
+                sWhere = "";
+
+                // 淇锛氱‘淇濆湪杩愮畻绗﹀拰鍊间箣闂存湁绌烘牸
+                if (ColName && ColName != 0 && Comparator && Comparator != 0 && ColContent) {
+                    var com = "";
+                    switch (Comparator) {
+                        case "7":
+                            com = "like '%" + ColContent + "%'";
+                            break;
+                        case "8":
+                            com = "like '%" + ColContent + "'";
+                            break;
+                        case "9":
+                            com = "like '" + ColContent + "%'";
+                            break;
+                        case "10":
+                            com = "not like '%" + ColContent + "%'";
+                            break;
+                        default:
+                            // 鍏抽敭淇锛氬湪杩愮畻绗﹀拰鍊间箣闂存坊鍔犵┖鏍�
+                            com = Comparator + " '" + ColContent + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName + " " + com;
+                }
+
+                if (ColName1 && ColName1 != 0 && Comparator1 && Comparator1 != 0 && ColContent1) {
+                    var com1 = "";
+                    switch (Comparator1) {
+                        case "7":
+                            com1 = "like '%" + ColContent1 + "%'";
+                            break;
+                        case "8":
+                            com1 = "like '%" + ColContent1 + "'";
+                            break;
+                        case "9":
+                            com1 = "like '" + ColContent1 + "%'";
+                            break;
+                        case "10":
+                            com1 = "not like '%" + ColContent1 + "%'";
+                            break;
+                        default:
+                            com1 = Comparator1 + " '" + ColContent1 + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName1 + " " + com1;
+                }
+
+                if (ColName2 && ColName2 != 0 && Comparator2 && Comparator2 != 0 && ColContent2) {
+                    var com2 = "";
+                    switch (Comparator2) {
+                        case "7":
+                            com2 = "like '%" + ColContent2 + "%'";
+                            break;
+                        case "8":
+                            com2 = "like '%" + ColContent2 + "'";
+                            break;
+                        case "9":
+                            com2 = "like '" + ColContent2 + "%'";
+                            break;
+                        case "10":
+                            com2 = "not like '%" + ColContent2 + "%'";
+                            break;
+                        default:
+                            com2 = Comparator2 + " '" + ColContent2 + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName2 + " " + com2;
+                }
+
+                // 鍒跺崟鏃ユ湡锛堝垱寤烘椂闂达級鑼冨洿鏌ヨ
+                if (HMakeDate_Begin) {
+                    sWhere += " and HMakeDate >= '" + HMakeDate_Begin + "'";
+                }
+                if (HMakeDate_End) {
+                    sWhere += " and HMakeDate <= '" + HMakeDate_End + "'";
+                }
+
+                // 鍗曟嵁鍙锋煡璇�
+                if (HBillNo) {
+                    sWhere += " and HBillNo like '%" + HBillNo + "%'";
+                }
+
+                console.log("瀵煎嚭鏌ヨ鏉′欢:", sWhere);
+
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + '/Gy_SteppedPriceCoefficientBillController/GetGy_SteppedPriceCoefficientBillList_Json',
+                    async: false,
+                    data: { "sWhere": sWhere, "HMaker": HMaker },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            data = data1.data
+                            layer.close(ajaxLoad);
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.Message, { icon: 5 });
+                        }
+                    },
+                    error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+
+                // 娓呯┖鏉′欢
+                sWhere = "";
+
+                // 澶勭悊鏁版嵁
+                if (data) {
+                    data.forEach((item) => {
+                        for (let itemobj in item) {
+                            if (item[itemobj] == null) {
+                                item[itemobj] = "";
+                            }
+                            if (item[itemobj] && item[itemobj].length > 0) {
+                                item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, '');
+                            }
+                        }
+                    });
+
+                    table.exportFile(ins.config.id, data, "xls");
+                }
+            }
+
+            //#endregion
+
+            //#region 鏂板
+            function btn_Add() {
+                layer.open({
+                    type: 2
+                    , skin: 'layui-layer-rim'   //鍔犱笂杈规
+                    , area: ['100%', '100%']
+                    , title: HPageTitle + '- 鏂板'
+                    , shift: 0  //寮瑰嚭鍔ㄧ敾
+                    , content: '../../宸ヨ祫绠$悊/闃舵宸ヤ环绯绘暟/Gy_SteppedPriceCoefficientBillEdit.html?OperationType=1&linterid=0&HSouceBillType='
+                    , btn: ['纭畾'],
+                    // 鎸夐挳1 鐨勫洖璋�
+                    end: function (index, layero, that) {
+                        //鍒锋柊椤甸潰
+                        $("#btnSearch").trigger('click');
+                    }
+                })
+            }
+            //#endregion
+
+            //#region 缂栬緫
+            function btn_Edit() {
+                var checkStatus = table.checkStatus('mainTable');
+                var data = checkStatus.data;
+
+                console.log("缂栬緫鎸夐挳鐐瑰嚮锛岄�変腑鏁版嵁:", data);
+
+                if (data && data.length === 1) {
+                    // 瀹夊叏鍦拌幏鍙栧瓧娈靛�硷紝娣诲姞绌哄�兼鏌�
+                    var HInterID = data[0].HInterID ? data[0].HInterID.toString() : "";
+                    var HBillNo = data[0].HBillNo ? data[0].HBillNo.toString() : "";
+
+                    // 濡傛灉HInterID涓虹┖锛屽皾璇曚粠鍏朵粬瀛楁鑾峰彇
+                    if (!HInterID || HInterID === "0") {
+                        // 灏濊瘯鍏朵粬鍙兘鐨勫瓧娈靛悕
+                        HInterID = data[0].hmainid ? data[0].hmainid.toString() : "";
+                        HInterID = data[0].hMainID ? data[0].hMainID.toString() : HInterID;
+                    }
+
+                    console.log("鎻愬彇鐨凥InterID:", HInterID, "HBillNo:", HBillNo);
+
+                    if (!HInterID || HInterID === "0") {
+                        layer.msg("鏃犳硶鑾峰彇鍗曟嵁ID鎴朓D鏃犳晥", { icon: 5 });
+                        console.error("鏃犳硶鑾峰彇鏈夋晥鐨勫崟鎹甀D锛屾暟鎹璞�:", data[0]);
+                        return;
+                    }
+
+                    // 淇璺緞闂锛氱‘淇濅娇鐢ㄦ纭殑璺緞
+                    // 娉ㄦ剰锛氶敊璇俊鎭腑鐨勮矾寰勫寘鍚腑鏂囩紪鐮侊紝闇�瑕佺‘淇濊矾寰勬纭�
+                    layer.open({
+                        type: 2,
+                        area: ['100%', '100%'],
+                        title: HPageTitle + ' - 缂栬緫锛�' + HBillNo + '锛�',
+                        shift: 0,
+                        // 娉ㄦ剰锛氱‘淇濊矾寰勬纭紝浠庨敊璇俊鎭湅鍙兘鏄矾寰勯棶棰�
+                        content: '../../宸ヨ祫绠$悊/闃舵宸ヤ环绯绘暟/Gy_SteppedPriceCoefficientBillEdit.html?OperationType=3&linterid=' + HInterID + '&HSouceBillType=',
+                        btn: ['纭畾'],
+                        end: function (index, layero, that) {
+                            // 鍒锋柊椤甸潰
+                            $("#btnSearch").trigger('click');
+                        },
+                        success: function (layero, index) {
+                            console.log("缂栬緫椤甸潰鎵撳紑鎴愬姛锛孒InterID:", HInterID);
+                        },
+                        error: function (xhr, status, error) {
+                            console.error("鎵撳紑缂栬緫椤甸潰澶辫触:", error);
+                            layer.msg("鎵撳紑缂栬緫椤甸潰澶辫触锛岃妫�鏌ヨ矾寰勯厤缃�", { icon: 5 });
+                        }
+                    });
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+            //#endregion
+
+            //#region 鍒犻櫎
+            // 鏇挎崲鍘焍tn_Delete鏂规硶
+            function btn_Delete() {
+                var checkStatus = table.checkStatus('mainTable'),
+                    data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var HInterID = data[0].HInterID || data[0].hmainid;
+                    var HBillNo = data[0].HBillNo || '';
+                    if (!HInterID) {
+                        layer.msg('鍗曟嵁ID鏃犳晥锛�', { icon: 5 });
+                        return;
+                    }
+                    layer.confirm("纭瑕佸垹闄ら�変腑琛屾暟鎹紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�", { title: "鍒犻櫎纭" }, function (index) {
+                        var wait = layer.load();
+                        $.ajax({
+                            type: "GET",
+                            url: GetWEBURL() + "/Gy_SteppedPriceCoefficientBill/delete",
+                            async: false,
+                            data: { "HInterID": HInterID, "user": HMaker },
+                            success: function (result) {
+                                layer.close(wait);
+                                if (result.code === "1") {
+                                    layer.msg("鍗曟嵁鍙凤細" + HBillNo + " 鍒犻櫎鎴愬姛锛�", { time: 1000, icon: 1 }, function () {
+                                        $("#btnSearch").trigger('click');
+                                    });
+                                } else {
+                                    layer.msg(result.Message || "鍒犻櫎澶辫触", { icon: 2 });
+                                }
+                            },
+                            error: function (xhr, status, error) {
+                                layer.close(wait);
+                                layer.msg('鍒犻櫎澶辫触锛�' + error, { icon: 5 });
+                            }
+                        });
+                    })
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+                }
+            }
+            //#endregion
+
+            //#region 鍒锋柊
+            function btn_Refresh() {
+                get_FastQuery();
+            }
+            //#endregion
+
+            //#region 闅愯棌鍒楄缃�
+            function Display_HideButton(btns, HBillType, HModName, HMaker) {
+                // 绀轰緥閫昏緫锛氭牴鎹潈闄愭樉绀�/闅愯棌鎸夐挳
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_ButtonPermission/GetButtonPermission',
+                    type: 'GET',
+                    data: { HBillType: HBillType, HModName: HModName, UserName: HMaker },
+                    success: function (data) {
+                        if (data.code === "1" && data.data) {
+                            var permission = data.data;
+                            for (var i = 0; i < btns.length; i++) {
+                                var btnId = btns[i].id;
+                                if (permission[btnId] === "0") {
+                                    btns[i].style.display = "none";
+                                } else {
+                                    btns[i].style.display = "inline-block";
+                                }
+                            }
+                        }
+                    }
+                });
+            }
+
+            // 閫�鍑烘寜閽柟娉�
+            function Pub_Close(type) {
+                if (type === 2) {
+                    var index = parent.layer.getFrameIndex(window.name);
+                    parent.layer.close(index);
+                }
+            }
+            //#endregion
+
+            //#region 鎵撳嵃鍔熻兘
+            function get_PrintReport() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                if (checkStatus.data.length === 0) {
+                    return layer.msg('璇烽�夋嫨鏁版嵁鎵撳嵃锛�');
+                }
+                else {
+                    var hmainid = [];
+                    for (var i = 0; i < checkStatus.data.length; i++) {
+                        hmainid.push((data[i].hmainid * (10 ** 8)) + data[i].hsubid)
+                    }
+
+                    layer.open({
+                        type: 2
+                        , area: ['50%', '50%']
+                        , title: '鎵撳嵃妯$増閫夋嫨'
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + hmainid.toString() + '&MyMsg=' + hmainid.toString() + '&Type=Gy_SteppedPriceCoefficientBillList', 'yes']
+                        , resize: false
+                    })
+                }
+            }
+            //#endregion
+
+            //#region  瀹℃牳锛坣um=1锛�/鍙嶅鏍革紙num=2锛�
+            function set_CheckBill(num) {
+                var checkStatus = table.checkStatus('mainTable'),
+                    data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    // 缁熶竴浣跨敤HInterID锛屽吋瀹筯mainid
+                    var HInterID = data[0].HInterID || data[0].hmainid;
+                    if (!HInterID) {
+                        layer.msg('鍗曟嵁ID鏃犳晥锛�', { icon: 5 });
+                        return;
+                    }
+                    // 杞崲鍙傛暟锛氬鏍�=0锛屽弽瀹℃牳=1
+                    var IsAudit = num === 1 ? 0 : 1;
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Gy_SteppedPriceCoefficientBill/Audit",
+                        async: false,
+                        data: {
+                            "HInterID": HInterID,
+                            "IsAudit": IsAudit,
+                            "CurUserName": HMaker
+                        },
+                        success: function (result) {
+                            if (result.code === "1") {
+                                layer.msg(result.Message || (num === 1 ? "瀹℃牳鎴愬姛" : "鍙嶅鏍告垚鍔�"), { time: 1000, icon: 1 }, function () {
+                                    $("#btnSearch").trigger('click');
+                                });
+                            } else {
+                                layer.msg(result.Message || "鎿嶄綔澶辫触", { icon: 2 });
+                            }
+                        },
+                        error: function () {
+                            layer.msg('鎺ュ彛璇锋眰澶辫触锛�', { icon: 5 });
+                        }
+                    });
+                } else {
+                    layer.msg(num === 1 ? '璇烽�夋嫨涓�琛屾暟鎹鏍革紒' : '璇烽�夋嫨涓�琛屾暟鎹弽瀹℃牳锛�');
+                }
+            }
+            //#endregion
+
+            //#region 鍏抽棴锛坣um=1锛�/鍙嶅叧闂紙num=2锛�
+            // 鏇挎崲鍘焥et_CloseBill鏂规硶
+            function set_CloseBill(num) {
+                var checkStatus = table.checkStatus('mainTable'),
+                    data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var HInterID = data[0].HInterID || data[0].hmainid;
+                    if (!HInterID) {
+                        layer.msg('鍗曟嵁ID鏃犳晥锛�', { icon: 5 });
+                        return;
+                    }
+                    // 杞崲鍙傛暟锛氬叧闂�=0锛屽弽鍏抽棴=1
+                    var IsClose = num === 1 ? 0 : 1;
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Gy_SteppedPriceCoefficientBill/CloseGy_SteppedPriceCoefficientBill",
+                        async: false,
+                        data: {
+                            "HInterID": HInterID,
+                            "IsAudit": IsClose,  // 鏀� IsClose 涓� IsAudit
+                            "user": HMaker        // 鏀� CurUserName 涓� user
+                        },
+                        success: function (result) {
+                            if (result.code === "1") {
+                                layer.msg(result.Message || (num === 1 ? "鍏抽棴鎴愬姛" : "鍙嶅叧闂垚鍔�"), { time: 1000, icon: 1 }, function () {
+                                    $("#btnSearch").trigger('click');
+                                });
+                            } else {
+                                layer.msg(result.Message || "鎿嶄綔澶辫触", { icon: 2 });
+                            }
+                        },
+                        error: function () {
+                            layer.msg('鎺ュ彛璇锋眰澶辫触锛�', { icon: 5 });
+                        }
+                    });
+                } else {
+                    layer.msg(num === 1 ? '璇烽�夋嫨涓�琛屾暟鎹叧闂紒' : '璇烽�夋嫨涓�琛屾暟鎹弽鍏抽棴锛�');
+                }
+            }
+            //#endregion
+
+            //#region 浣滃簾锛坣um=1锛�/鍙嶄綔搴燂紙num=2锛�
+            function set_DropBill(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var HInterID = data[0].hmainid.toString();
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Gy_SteppedPriceCoefficientBill/DropGy_SteppedPriceCoefficientBill",
+                        async: false,
+                        data: {
+                            "HInterID": HInterID,
+                            "IsAudit": IsClose,  // 鏀� IsClose 涓� IsAudit
+                            "user": HMaker        // 鏀� CurUserName 涓� user
+                        },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                    // 寰楀埌frame绱㈠紩
+                                    var index = layer.getFrameIndex(window.name);
+                                    //鍏抽棴褰撳墠frame
+                                    layer.close(index);
+                                    //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                    $("#btnSearch").trigger('click');
+                                });
+
+                            } else {
+                                layer.msg(result.Message, { icon: 2, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                        }, error: function () {
+                            layer.msg('閿欒' + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        }
+                    });
+                }
+                else {
+                    if (num == 1) {
+                        layer.msg('璇烽�夋嫨涓�琛屾暟鎹綔搴燂紒');
+                    }
+                    else {
+                        layer.msg('璇烽�夋嫨涓�琛屾暟鎹弽浣滃簾锛�');
+                    }
+                }
+            }
+            //#endregion
+
+            //#region 閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                //娓呯┖杩囨护鏉′欢
+                set_ClearQuery();
+            });
+
+            //閲嶇疆杩囨护鏉′欢
+            function set_ClearQuery() {
+                // 閲嶇疆鍒跺崟鏃ユ湡鑼冨洿锛堟渶杩�30澶╋級
+                var endDate = new Date();
+                var startDate = new Date(endDate - 1000 * 60 * 60 * 24 * 30);
+
+                $("#HMakeDate_Begin").val(Pub_Format(startDate, "yyyy-MM-dd"));
+                $("#HMakeDate_End").val(Pub_Format(endDate, "yyyy-MM-dd"));
+
+                $("#HBillNo").val("");//鍗曟嵁鍙�
+                $("#ColContent").val("");
+                $("#ColName").val("0");
+                $("#Comparator").val("0");
+                $("#ColContent2").val("");
+                $("#ColName2").val("0");
+                $("#Comparator2").val("0");
+                $("#ColContent1").val("");
+                $("#ColName1").val("0");
+                $("#Comparator1").val("0");
+                form.render('select');
+                sWhere = "";
+            }
+
+            //#endregion
+
+            //#region 鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                if (page != 1) {
+                    $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+                } else {
+                    get_FastQuery();
+                }
+            });
+
+            //蹇�熸煡璇�
+            //蹇�熸煡璇�
+            function get_FastQuery() {
+                // 浣跨敤鍒跺崟鏃ユ湡浣滀负鍒涘缓鏃堕棿杩囨护
+                var HMakeDate_Begin = $("#HMakeDate_Begin").val();  // 寮�濮嬪埗鍗曟棩鏈�
+                var HMakeDate_End = $("#HMakeDate_End").val();      // 缁撴潫鍒跺崟鏃ユ湡
+                var HBillNo = $("#HBillNo").val();                  // 鍗曟嵁鍙�
+
+                console.log("=== 鏌ヨ鍙傛暟 ===");
+                console.log("HMakeDate_Begin:", HMakeDate_Begin);
+                console.log("HMakeDate_End:", HMakeDate_End);
+                console.log("HBillNo:", HBillNo);
+
+                // 娓呯┖涔嬪墠鐨勬潯浠�
+                sWhere = "";
+
+                // 鏋勫缓鏉′欢鏁扮粍锛堥伩鍏嶅紑澶存湁"and"鐨勯棶棰橈級
+                var conditions = [];
+
+                // 鍒跺崟鏃ユ湡锛堝垱寤烘椂闂达級鑼冨洿鏌ヨ - 浣跨敤姝g‘鐨凷QL鏍煎紡
+                if (HMakeDate_Begin && HMakeDate_Begin.trim() !== '') {
+                    conditions.push("CONVERT(date, HMakeDate) >= '" + HMakeDate_Begin + "'");
+                }
+                if (HMakeDate_End && HMakeDate_End.trim() !== '') {
+                    conditions.push("CONVERT(date, HMakeDate) <= '" + HMakeDate_End + "'");
+                }
+
+                // 鍗曟嵁鍙锋煡璇�
+                if (HBillNo && HBillNo.trim() !== '') {
+                    conditions.push("HBillNo like '%" + HBillNo + "%'");
+                }
+
+                // 灏嗘潯浠剁粍鍚堟垚SQL璇彞
+                if (conditions.length > 0) {
+                    sWhere = conditions.join(" and ");
+                } else {
+                    sWhere = "1=1";  // 濡傛灉娌℃湁鏉′欢锛屼娇鐢�1=1纭繚璇硶姝g‘
+                }
+
+                console.log("鐢熸垚鐨勬煡璇㈡潯浠�:", sWhere);
+
+                // 璋冪敤鏌ヨ鏂规硶
+                get_DisplayPage(sWhere);
+            }
+            //#endregion
+
+            //#region 鍒嗛〉鏌ヨ
+            function get_DisplayPage(sWhere) {
+                console.log("=== 寮�濮嬫煡璇� ===");
+                console.log("鏌ヨ鏉′欢:", sWhere);
+                console.log("椤电爜:", page, "姣忛〉鏁伴噺:", size);
+                console.log("褰撳墠鐢ㄦ埛:", sessionStorage["HUserName"]);
+
+                var ajaxLoad = layer.load();
+
+                // 娴嬭瘯涓嶅悓鐨凙PI绔偣
+                var apiUrl = GetWEBURL() + '/Gy_SteppedPriceCoefficientBill/list';
+                console.log("璋冪敤API:", apiUrl);
+
+                $.ajax({
+                    url: apiUrl,
+                    type: "GET",
+                    data: {
+                        "sWhere": sWhere,
+                        "user": sessionStorage["HUserName"],
+                        "page": page,
+                        "size": size
+                    },
+                    dataType: "json",
+                    success: function (data1) {
+                        layer.close(ajaxLoad);
+
+                        console.log("=== 澶勭悊琛ㄦ牸鏁版嵁 ===");
+                        console.log("API杩斿洖鏁版嵁:", data1);
+
+                        if (data1.code == "1") {
+                            var tableData = data1.data || [];
+                            var totalCount = data1.total || tableData.length;
+
+                            console.log("琛ㄦ牸鏁版嵁閲�:", tableData.length);
+
+                            // 纭繚鏁版嵁鏄暟缁勬牸寮�
+                            if (!Array.isArray(tableData)) {
+                                tableData = [];
+                                console.warn("琛ㄦ牸鏁版嵁涓嶆槸鏁扮粍鏍煎紡锛屽凡杞崲涓虹┖鏁扮粍");
+                            }
+
+                            // 妫�鏌ユ槸鍚﹀凡缁忓垵濮嬪寲浜嗚〃鏍奸厤缃�
+                            if (!option.cols || !Array.isArray(option.cols)) {
+                                console.log("鍒濆鍖栬〃鏍煎垪閰嶇疆...");
+
+                                // 瀹氫箟鍒楅厤缃�
+                                option.cols = [[
+                                    // 澶嶉�夋鍒�
+                                    { type: 'checkbox', fixed: 'left', width: 50 },
+
+                                    // 鍗曟嵁鍙凤紙閾炬帴鍒扮紪杈戯級
+                                    {
+                                        field: 'HBillNo',
+                                        title: '鍗曟嵁鍙�',
+                                        width: 180,
+                                        fixed: 'left',
+                                        event: '鍗曟嵁鍙�',
+                                        style: 'cursor: pointer;',
+                                        templet: function (d) {
+                                            return '<span style="color: blue; cursor: pointer;">' + (d.HBillNo || '') + '</span>';
+                                        }
+                                    },
+
+                                    // 鍗曟嵁鏃ユ湡
+                                    {
+                                        field: 'HDate',
+                                        title: '鍗曟嵁鏃ユ湡',
+                                        width: 150,
+                                        templet: function (d) {
+                                            if (!d.HDate) return '';
+                                            try {
+                                                var date = new Date(d.HDate);
+                                                return layui.util.toDateString(date, 'yyyy-MM-dd');
+                                            } catch (e) {
+                                                return d.HDate;
+                                            }
+                                        }
+                                    },
+
+                                    // 骞村害
+                                    { field: 'HYear', title: '骞�', width: 80, align: 'center' },
+
+                                    // 鏈熼棿
+                                    { field: 'HPeriod', title: '鏈�', width: 80, align: 'center' },
+
+                                    // 鍗曟嵁鐘舵��
+                                    // 鍗曟嵁鐘舵�佹樉绀猴紙鏍规嵁鎮ㄦ彁渚涚殑鐘舵�佸畾涔夛級
+                                    {
+                                        field: 'HBillStatus',
+                                        title: '鐘舵��',
+                                        width: 100,
+                                        align: 'center',
+                                        templet: function (d) {
+                                            var status = d.HBillStatus;
+                                            switch (status.toString()) {
+                                                case '1':
+                                                    return '<span>鏈鏍�</span>';
+                                                case '2':
+                                                    return '<span>宸插鏍�</span>';
+                                                case '3':
+                                                    return '<span>宸插叧闂�</span>';
+                                                case '4':
+                                                    return '<span>宸蹭綔搴�</span>';
+                                                case '5':
+                                                    return '<span>瀹℃牳閫�鍥�</span>';
+                                                case '6':
+                                                    return '<span>瀹℃牳涓�</span>';
+                                                default:
+                                                    return '<span >鐘舵��' + status + '</span>';
+                                            }
+                                        }
+                                    },
+
+                                    // 瀛愯〃缁熻淇℃伅
+                                    {
+                                        field: 'SubCount',
+                                        title: '搴忓彿鍚堣',
+                                        width: 90,
+                                        align: 'center',
+                                        totalRow: true
+                                    },
+
+                                    {
+                                        field: 'TotalMinQty',
+                                        title: '鏈�灏忔暟閲忓悎璁�',
+                                        width: 120,
+                                        align: 'right',
+                                        totalRow: true
+                                    },
+
+                                    {
+                                        field: 'TotalMaxQty',
+                                        title: '鏈�澶ф暟閲忓悎璁�',
+                                        width: 120,
+                                        align: 'right',
+                                        totalRow: true
+                                    },
+
+                                    {
+                                        field: 'TotalCoefficient',
+                                        title: '宸ヤ环绯绘暟鍚堣',
+                                        width: 100,
+                                        align: 'right',
+                                        totalRow: true
+                                    },
+
+                                    {
+                                        field: 'TotalMaxPrice',
+                                        title: '鏈�澶у伐浠峰悎璁�',
+                                        width: 120,
+                                        align: 'right',
+                                        totalRow: true
+                                    },
+
+                                    // 澶囨敞
+                                    { field: 'HRemark', title: '澶囨敞', width: 200 },
+
+                                    // 鍒跺崟浜�
+                                    { field: 'HMaker', title: '鍒跺崟浜�', width: 100 },
+
+                                    // 鍒跺崟鏃ユ湡
+                                    {
+                                        field: 'HMakeDate',
+                                        title: '鍒跺崟鏃ユ湡',
+                                        width: 160,
+                                        templet: function (d) {
+                                            if (!d.HMakeDate) return '';
+                                            try {
+                                                var date = new Date(d.HMakeDate);
+                                                return layui.util.toDateString(date, 'yyyy-MM-dd HH:mm:ss');
+                                            } catch (e) {
+                                                return d.HMakeDate;
+                                            }
+                                        }
+                                    },
+
+                                    // 瀹℃牳浜�
+                                    { field: 'HChecker', title: '瀹℃牳浜�', width: 100 },
+
+                                    // 瀹℃牳鏃ユ湡
+                                    {
+                                        field: 'HCheckDate',
+                                        title: '瀹℃牳鏃ユ湡',
+                                        width: 160,
+                                        templet: function (d) {
+                                            if (!d.HCheckDate) return '';
+                                            try {
+                                                var date = new Date(d.HCheckDate);
+                                                return layui.util.toDateString(date, 'yyyy-MM-dd HH:mm:ss');
+                                            } catch (e) {
+                                                return d.HCheckDate;
+                                            }
+                                        }
+                                    },
+
+                                    // 闅愯棌瀛楁
+                                    { field: 'HInterID', title: '鍐呯爜', width: 100, hide: true },
+                                    { field: 'RowNum', title: '琛屽彿', width: 80, hide: true },
+                                    { field: 'HUpDater', title: '鏇存柊浜�', width: 100, hide: true },
+                                    { field: 'HUpDateDate', title: '鏇存柊鏃ユ湡', width: 160, hide: true },
+                                    { field: 'HCloseMan', title: '鍏抽棴浜�', width: 100, hide: true },
+                                    { field: 'HCloseDate', title: '鍏抽棴鏃ユ湡', width: 160, hide: true },
+                                    { field: 'HProcID', title: '宸ュ簭ID', width: 100, hide: true },
+                                    { field: 'HEmpID', title: '鍛樺伐ID', width: 100, hide: true },
+                                    { field: 'HDeptID', title: '閮ㄩ棬ID', width: 100, hide: true },
+                                    { field: 'HStockOrgID', title: '缁勭粐ID', width: 100, hide: true }
+                                ]];
+                            }
+
+                            // 璁剧疆鍏朵粬蹇呰鐨勮〃鏍奸厤缃�
+                            option.data = tableData;
+                            option.limit = size;
+
+                            console.log("琛ㄦ牸閰嶇疆:", option);
+
+                            try {
+                                // 濡傛灉琛ㄦ牸宸茬粡娓叉煋杩囷紝鍒欓噸杞芥暟鎹�
+                                if (window.tableIns) {
+                                    window.tableIns.reload({
+                                        data: tableData,
+                                        limit: size
+                                    });
+                                    console.log("琛ㄦ牸鏁版嵁閲嶈浇瀹屾垚");
+                                } else {
+                                    // 棣栨娓叉煋琛ㄦ牸
+                                    window.tableIns = table.render(option);
+                                    console.log("琛ㄦ牸棣栨娓叉煋瀹屾垚");
+                                }
+                            } catch (error) {
+                                console.error("琛ㄦ牸娓叉煋閿欒:", error);
+                                layer.msg("琛ㄦ牸娓叉煋澶辫触: " + error.message, { icon: 5 });
+                            }
+
+                            // 鏇存柊鍒嗛〉淇℃伅
+                            try {
+                                laypage.render({
+                                    elem: 'page',
+                                    count: totalCount,
+                                    limit: size,
+                                    curr: page,
+                                    limits: [50, 500, 5000, 50000],
+                                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+                                    jump: function (obj, first) {
+                                        if (!first) {
+                                            page = obj.curr;
+                                            size = obj.limit;
+                                            get_FastQuery();
+                                        }
+                                    }
+                                });
+                                console.log("鍒嗛〉娓叉煋瀹屾垚锛屾�昏褰曟暟:", totalCount);
+                            } catch (error) {
+                                console.error("鍒嗛〉娓叉煋閿欒:", error);
+                            }
+
+                            // 鍒锋柊鍒楄繃婊や笅鎷夋
+                            setTimeout(function () {
+                                try {
+                                    ColFilter();
+                                } catch (error) {
+                                    console.error("鍒楄繃婊ゅ埛鏂伴敊璇�:", error);
+                                }
+                            }, 100);
+
+                        } else {
+                            layer.msg(data1.message || "鏌ヨ澶辫触", { icon: 5 });
+                            console.error("鏌ヨ澶辫触:", data1);
+                        }
+                    },
+                    error: function (xhr, status, error) {
+                        layer.close(ajaxLoad);
+                        layer.msg("鏌ヨ澶辫触: " + error, { icon: 5 });
+                        console.error("AJAX璇锋眰澶辫触:", error);
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 鍒楁槑鏄剧ず涓嬫媺妗�
+            function ColFilter() {
+                var Organization = '<option  value="0" selected="selected" ></option>';
+                for (var i = 1; i < option.cols[0].length; i++) {
+                    if (option.cols[0][i].hide != true) {
+                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
+                    }
+                }
+                $("#ColName").empty();
+                $("#ColName").append(Organization);
+                $("#ColName1").empty();
+                $("#ColName1").append(Organization);
+                $("#ColName2").empty();
+                $("#ColName2").append(Organization);
+                form.render('select');
+            }
+            //#endregion
+
+            //#region 鍒楄缃�
+            function get_HideColumn() {
+                var colName = "";
+                var contentUrl = "";
+                for (var i = 1; i < option.cols[0].length; i++) {
+                    colName += option.cols[0][i]["field"] + ",";
+                }
+                var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+                var urlLen = urlStr.split('/');
+                for (var i = 0; i < urlLen.length - 4; i++) {
+                    contentUrl += "../";
+                }
+                colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+                contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName;
+
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim" //鍔犱笂杈规
+                    , title: "闅愯棌鍒楄缃�"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["50%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: [contentUrl, "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                        layer.close(index);//鍏抽棴寮圭獥
+                    }
+                })
+            }
+
+            //#endregion
+
+            //#region 銆愯繃婊ゆ柟妗堛��
+
+            //鑾峰彇褰撳墠鐢ㄦ埛鐨勯粯璁よ繃婊ゆ柟妗�
+            function get_DefaultModule() {
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+                    type: "GET",
+                    data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            //褰撳墠鐢ㄦ埛璁剧疆鏈夐粯璁ょ殑杩囨护鏂规
+                            var data = data1.data;
+                            //褰撳墠閫夋嫨鐨勮繃婊ゆ柟妗�
+                            HInterID_Choose = data[0].hmainid;
+                            //杩囨护鏂规鍐呯爜
+                            HInterID = data[0].hmainid
+                            //杩囨护鏂规鍚嶇О
+                            HDefaultFilter = data[0].鏂规鍚嶇О
+                            //杩囨护鏂规鐨勫娉紙鏂规淇℃伅鎻忚堪锛�
+                            var HRemark = data[0].澶囨敞
+                            //鏄剧ず鍑哄綋鍓嶇殑榛樿杩囨护鏂规
+                            document.getElementById("HFilterScheme_Now").style.display = "block";
+                            document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + HRemark + ")" + '</span>';
+                            //鎶婅繃婊ゆ潯浠跺�煎洖鍐欏埌椤甸潰涓�
+                            for (let i = 0; i < data.length; i++) {
+                                $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+                                if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+                                    $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+                                }
+                            }
+                            //鎵ц鏌ヨ鏂规硶
+                            get_FastQuery()
+                            form.render("select");
+                        } else {
+                            //褰撳墠鐢ㄦ埛娌℃湁璁剧疆榛樿鐨勮繃婊ゆ柟妗�
+                            //闅愯棌鏄剧ず杩囨护鏂规鐨勬爣绛句俊鎭�
+                            document.getElementById("HFilterScheme_Now").style.display = "none";
+                            //鎵ц鏌ヨ鏂规硶
+                            get_FastQuery()
+                            form.render("select");
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+
+            //淇濆瓨鏂规
+            function set_SaveScheme() {
+                var index = layer.open()
+                //鍒ゆ柇鐢ㄦ埛鏄惁鐐瑰嚮浜嗗彸涓婅鐨�"鍙夊彿"鍏抽棴寮圭獥椤甸潰
+                var HIsClose_Manual = false;
+                //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+                var Filter = document.getElementsByClassName(HClassTag);
+
+                var HFilterIdList = "";//杩囨护鏉′欢
+                var HFilterIdLists = "";//鎷兼帴澶氫釜杩囨护鏉′欢
+                var HValue = "";//杩囨护鍊�
+                var HElement_type = "";//杩囨护鏍囩绫诲瀷
+
+                for (var i = 0; i < Filter.length; i++) {
+                    HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+                    HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+                    HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+                    HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+                }
+
+                //鍘婚櫎鏈熬閫楀彿
+                HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+                HValue = HValue.substring(0, HValue.length - 1);
+                HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+                //褰撳墠椤甸潰涓婃病鏈夐�夋嫨杩囨护鏂规锛岃繘鍏ユ柊澧炴柟娉�
+                if (HDefaultFilter == "") {
+                    layer.open({
+                        type: 2
+                        , area: ['40%', '80%']
+                        , title: '杩囨护鏂规'
+                        , shift: 0//寮瑰嚭鍔ㄧ敾
+                        , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+                        , cancel: function () {
+                            // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+                            HIsClose_Manual = true;
+                        }
+                        , end: function () {
+                            if (HIsClose_Manual != true) {
+                                get_FastQuery();
+                                //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+                                document.getElementById("HFilterScheme_Now").style.display = "block";
+                                document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+                            }
+                        }
+                    })
+                    layer.close(index)
+                } else {
+                    //褰撳墠椤甸潰宸叉湁杩囨护鏂规锛岀敤鎴烽�夋嫨 鏂板鎴栬�呯紪杈�
+                    layer.confirm('褰撳墠宸查�夋嫨杩囨护鏂规锛屾槸鍚︿慨鏀癸紵璇烽�夋嫨瀵瑰簲鎿嶄綔', {
+                        title: "鎿嶄綔鎻愮ず",
+                        icon: 0,
+                        btn: ['鏂板鏂规', '淇濆瓨淇敼褰撳墠鏂规', '鍙栨秷']
+                    }, function (index, layero) {
+                        //鏂板
+                        layer.open({
+                            type: 2
+                            , area: ['40%', '80%']
+                            , title: '杩囨护鏂规'
+                            , shift: 0//寮瑰嚭鍔ㄧ敾
+                            , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+                            , end: function () {
+                                get_FastQuery()
+                                //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+                                document.getElementById("HFilterScheme_Now").style.display = "block";
+                                document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+                            }
+                        })
+                        layer.close(index)
+                    }, function (index) {
+                        //缂栬緫
+                        var Filter_Edit = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+                        HFilterIdList = "";
+                        HFilterIdLists = "";
+                        HValue = "";
+                        HElement_type = "";
+                        for (var i = 0; i < Filter_Edit.length; i++) {
+                            HFilterIdList = Filter_Edit[i].id; //杩囨护鏉′欢ID
+                            HFilterIdLists += Filter_Edit[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+                            HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+                            HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+                        }
+                        //鍘婚櫎鏈熬閫楀彿
+                        HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+                        HValue = HValue.substring(0, HValue.length - 1);
+                        HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+                        var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3;
+
+                        //淇敼
+                        $.ajax({
+                            type: "POST",
+                            url: GetWEBURL() + "/Xt_FastICScheme/save", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            async: true,
+                            data: { "oMain": sMainSub },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                    layer.msg(data.Message, { time: 1 * 1000, icon: 1 });
+                                }
+                                else {
+
+                                }
+                                layer.closeAll("loading");
+                            },
+                            error: function (err) {
+
+
+                            }
+                        });
+                        layer.close(index)
+                    }, function (index) {
+                        //鍙栨秷
+                        layer.alert('鍙栨秷')
+                        layer.close(index)
+                    });
+                }
+
+            }
+
+            //璇诲彇鏂规
+            function set_ReadScheme() {
+                var HIsClose_Manual = false;
+                var Filter = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+
+                var HFilterIdList = "";
+                var HFilterIdLists = "";
+                var HValue = "";
+                var HElement_type = "";
+                for (var i = 0; i < Filter.length; i++) {
+                    HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+                    HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+                    HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+                    HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+                }
+                //鍘婚櫎鏈熬閫楀彿
+                HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+                HValue = HValue.substring(0, HValue.length - 1);
+                HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+                layer.open({
+                    type: 2
+                    , area: ['80%', '80%']
+                    , title: '杩囨护鏂规鍒楄〃'
+                    , shift: 0//寮瑰嚭鍔ㄧ敾
+                    , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName
+                    , cancel: function () {
+                        // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+                        HIsClose_Manual = true;
+                    }
+                    , end: function () {
+                        if (HIsClose_Manual != true) {
+                            get_FastQuery()
+                            form.render("select");
+                        }
+                    }
+                })
+            }
+
+            //#endregion
+
+            //#endregion
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+        //#region 銆愯繃婊ゆ柟妗堣繑鍥炴暟鎹��
+        function HFilterScheme(obj)  //杩斿洖杩囨护鏂规
+        {
+            var HInterID = obj[0].hmainid;
+            HInterID_Choose = obj[0].hmainid;
+            $.ajax({
+                url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+                type: "GET",
+                data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": HInterID, "Type": "Select" },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        var data = data1.data;
+                        //璧嬪�艰繃婊ゆ柟妗堝悕绉�
+                        HDefaultFilter = data[0].鏂规鍚嶇О
+                        var HRemark = data[0].澶囨敞
+                        //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+                        document.getElementById("HFilterScheme_Now").style.display = "block";
+                        document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + HRemark + ")" + '</span>';
+                        HInterID = data[0].hmainid
+                        //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢
+                        for (let i = 0; i < data.length; i++) {
+                            $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+                            if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+                                $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+                            }
+                        }
+
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); 
+                }
+            });
+        }
+        //#endregion
+    </script>
+
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
index b733cda..0a856dc 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
@@ -230,6 +230,7 @@
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-reload" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-view" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-print" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-print-zx" lay-event="btn-print-zx"><i class="layui-icon layui-icon-print"></i>涓鏍囩鎵撳嵃</button>
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_Drop" id="set_Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_DeDrop" id="set_DeDrop"><i class="layui-icon layui-icon-radio"></i>鍙嶄綔搴�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Delete" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
@@ -376,6 +377,9 @@
                             }
                         });
                         break;
+                    case 'btn-print-zx':
+                        PrintZX();
+                        break;
                     //鍒锋柊
                     case 'btn-reload':
                         $("#HBarCode").val("");
@@ -463,6 +467,8 @@
 
             //#region 鏌ヨ鎸夐挳
             form.on('submit(btnSearch)', function (data) {
+                page = 1;
+                optionPage.curr = 1;
                 get_FastQuery();
                 //initFunction(1, HModName, sessionStorage["HTranSlate"]);
             });
@@ -571,7 +577,7 @@
                             page = obj.curr;
                             size = obj.limit;
                             // 鍋囪鎸夐挳鏈変竴涓狪D涓�"myButton"
-                            $("#btnSearch").trigger("click");
+                            get_FastQuery();
                         }
                     }
                 }
@@ -816,6 +822,47 @@
             }
             //#endregion
 
+            //#region
+            function PrintZX() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                var ModRightName = 'Gy_BarCodeBillList_Print';
+                $.ajax({
+                    url: GetWEBURL() + '/Gy_BarCodeBillList/GetBarCodeBillPermission',
+                    type: "GET",
+                    async: false,
+                    data: { "user": sessionStorage["HUserName"] },
+                    success: function (res) {
+                        if (res.data == 1) {
+                            if (checkStatus.data.length > 0) {
+                                var rows = '';
+                                for (var i = 0; i < data.length; i++) {
+                                    rows += data[i].涓鐮�.toString() + ',';
+                                }
+                                rows = rows.substring(rows.length - 1, 0);
+                                layer.open({
+                                    type: 2
+                                    , area: ['40%', '80%']
+                                    , title: '鎵撳嵃妯$増閫夋嫨'
+                                    , shade: 0.6 //閬僵閫忔槑搴�
+                                    , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                                    , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + rows + '&MyMsg=' + rows + '&Type=HGy_BarCodeBill_MiddleBox', 'yes']
+                                    , resize: false
+                                })
+                            }
+                            else {
+                                layer.msg(get_MessageError('[0000-1-016]璇烽�夋嫨鏁版嵁鎵撳嵃锛�', sessionStorage["HTranSlate"]));
+                            }
+                        }
+                        else {
+                            layer.alert(get_MessageError("鏃犳墦鍗版潈闄�!", sessionStorage["HTranSlate"]), { icon: 5 });
+                        }
+                    }
+                });
+            }
+            //#endregion
+
             //#endregion
             //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
             function get_Display(sWhere) {
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\210\266\351\200\240\345\221\250\346\234\237\346\212\245\350\241\250/Sc_ProductionCycleBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\210\266\351\200\240\345\221\250\346\234\237\346\212\245\350\241\250/Sc_ProductionCycleBillList.html"
index 906b85a..2887155 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\210\266\351\200\240\345\221\250\346\234\237\346\212\245\350\241\250/Sc_ProductionCycleBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\210\266\351\200\240\345\221\250\346\234\237\346\212\245\350\241\250/Sc_ProductionCycleBillList.html"
@@ -644,6 +644,10 @@
                             //缁欑┖鐨勬暟缁勮祴鍊�
                             for (var key in data1.list) {
                                 data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                                var patrn = new RegExp(/^h/i);
+                                if (patrn.test(data1.list[key].ColmCols)) {
+                                    titleData[key] = data1.list[key].ColmCols;
+                                }
                             }
                             //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
                             col.push({ type: 'checkbox', fixed: 'left' });
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html"
index 1d9b87b..be164ef 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html"
@@ -1716,23 +1716,12 @@
             //#endregion
 
             //淇濆瓨
-            async function set_SaveBill(data) {
+            function set_SaveBill(data) {
                 //璧嬪�兼渶鍚庝竴涓�変腑琛岀殑鏁版嵁缁檕ption.data
                 //Assignment(LastIndex, LastIndex);
                 //淇濆瓨鏈�鍚庝竴娆$偣鍑昏鐨勬楠屽��
+                set_SaveValue($("#HEntryID").val());
 
-                try {
-                    var rownum = $("#HEntryID").val();
-
-                    rowFun = table.cache["mainTable"][rownum-1].HAnalysisMethod;
-                    if (rowFun == "")
-                        throw error
-                     set_SaveValue($("#HEntryID").val(), rowFun);
-                } catch (error) {
-                   
-                    layer.msg('鐢ㄦ埛鍙栨秷浜嗘楠屽�间繚瀛�');
-                    return;
-                }
                 if ($("#HICMOQty").val() == "" || $("#HICMOQty").val() <= 0) {
                     layer.msg("浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return;
@@ -1839,6 +1828,7 @@
                     }
                 });
             }
+            
 
             //缂栬緫鏃跺姞杞借〃澶�
             function RoadBillMain(linterid) {
@@ -3177,9 +3167,9 @@
                 var table_value = table.cache['ValueTable'];
 
                 if (OperationType == 3) {
-                    set_SaveValue(Number(nowindex) + Number(1), rowFun);
+                    set_SaveValue(Number(nowindex) + Number(1));
                 } else {
-                    set_SaveValue(dataindex + 1, rowFun);
+                    set_SaveValue(dataindex + 1);
                 }
                 //璧嬪�间笌鍥炴樉
                 if ($("#HSampleSchemeID").val() != "0") {
@@ -4254,145 +4244,144 @@
                 set_SaveBill(data);
             });
             //妫�楠屽�间繚瀛� - 杩斿洖Promise
-            function set_SaveValue(dataindex, rowFun) {
-                return new Promise((resolve, reject) => {
-                    var hasEmptyRow = false;
-                    var emptyRowNumbers = [];
+            //function set_SaveValue(dataindex, rowFun) {
+            //    return new Promise((resolve, reject) => {
+            //        var hasEmptyRow = false;
+            //        var emptyRowNumbers = [];
 
-                    for (let i = 0; i < table.cache['ValueTable'].length; i++) {
-                        var row = table.cache['ValueTable'][i];
-                        if (rowFun == 2) {
-                            if (
-                                (!row.HInSpectValue || row.HInSpectValue === "")) {
-                                hasEmptyRow = true;
-                                emptyRowNumbers.push(i + 1);
-                            }
-                        }
-                    }
-                    if ($("#HSampleSchemeID").val()!=0) {
-                        if (hasEmptyRow) {
-                            var confirmMsg = "妫�楠屽�艰〃鏍间腑瀛樺湪绌鸿锛堢 " + emptyRowNumbers.join(", ") + " 琛岋級锛屾槸鍚︾户缁繚瀛橈紵";
-                            layer.confirm(confirmMsg, {
-                                icon: 3,
-                                title: '鎻愮ず',
-                                btn: ['纭淇濆瓨', '鍙栨秷淇濆瓨']
-                            }, function (index) {
-
-                                layer.close(index);
-                                proceedWithSave(dataindex).then(resolve).catch(reject);
-                            }, function (index) {
-                                ////鑾峰彇涓婃鎵�鍦ㄨ涓嬫爣
-                                //var dataindex = $("#HEntryID").val() - 1;
-                                layer.close(index);
-                                //EchoValue();
-                                layer.msg('宸插彇娑堜繚瀛橈紝璇峰畬鍠勬暟鎹悗閲嶆柊鎿嶄綔', { icon: 2 });
-                                //reject(new Error('鐢ㄦ埛鍙栨秷浜嗕繚瀛�'));
-                            });
-                        } else {
-
-                            proceedWithSave(dataindex).then(resolve).catch(reject);
-                        }
-                    }
-
-                });
-            }
-
-
-            function proceedWithSave(dataindex) {
-                return new Promise((resolve, reject) => {
-                    if (OperationType == 3) {
-                        EchoValue();
-                    }
-
-                    
-                    for (let i = 0; i < table.cache['ValueTable'].length; i++) {
-                        if (table.cache['ValueTable'][i].HInSpectValueB == "" || table.cache['ValueTable'][i].HInSpectValueB == null) {
-                            table.cache['ValueTable'][i].HInSpectValueB = 0
-                        }
-                        if (table.cache['ValueTable'][i].HInSpectValueT == "" || table.cache['ValueTable'][i].HInSpectValueT == null) {
-                            table.cache['ValueTable'][i].HInSpectValueT = 0
-                        }
-                        if (table.cache['ValueTable'][i].HInSpectValue == "" || table.cache['ValueTable'][i].HInSpectValue == null) {
-                            table.cache['ValueTable'][i].HInSpectValue = 0
-                        }
-                    }
-
-                    var sValueTable = JSON.stringify(table.cache['ValueTable']);
-                    var HInterID = $("#HInterID").val();
-                    var HEntryID = dataindex;
-                    var msg = sValueTable + ";" + HInterID + ";" + HEntryID
-
-                    var index = layer.load();
-                    $.ajax({
-                        type: "POST",
-                        url: GetWEBURL() + "/QC_FirstPieceCheckBill/set_SaveValue",
-                        async: true,
-                        data: { "msg": msg },
-                        dataType: "json",
-                        success: function (data) {
-                            layer.close(index);
-                            if (data.count == 1) {
-                                layer.msg('妫�楠屽�间繚瀛樻垚鍔�', { icon: 1 });
-                                resolve(); // 鎴愬姛鏃秗esolve
-                            } else {
-                                layer.msg("妫�楠屽�间繚瀛橀敊璇紒" + data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                                reject(new Error("妫�楠屽�间繚瀛橀敊璇細" + data.Message));
-                            }
-                        },
-                        error: function (err) {
-                            layer.close(index);
-                            layer.msg("妫�楠屽�间繚瀛橀敊璇�:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                            reject(new Error("妫�楠屽�间繚瀛橀敊璇細" + err));
-                        }
-                    });
-                });
-            }
-            //妫�楠屽�间繚瀛�
-            //function set_SaveValue(dataindex) {
-            //    if (OperationType == 3) {
-            //        EchoValue();
-            //    }
-            //    for (let i = 0; i < table.cache['ValueTable'].length; i++) {
-            //        if (table.cache['ValueTable'][i].HInSpectValueB == "" || table.cache['ValueTable'][i].HInSpectValueB == null) {
-            //            table.cache['ValueTable'][i].HInSpectValueB = 0
-            //        }
-            //        if (table.cache['ValueTable'][i].HInSpectValueT == "" || table.cache['ValueTable'][i].HInSpectValueT == null) {
-            //            table.cache['ValueTable'][i].HInSpectValueT = 0
-            //        }
-            //        if (table.cache['ValueTable'][i].HInSpectValue == "" || table.cache['ValueTable'][i].HInSpectValue == null) {
-            //            table.cache['ValueTable'][i].HInSpectValue = 0
-            //        }
-            //    }
-
-            //    var sValueTable = JSON.stringify(table.cache['ValueTable']);
-            //    var HInterID = $("#HInterID").val();
-            //    var HEntryID = dataindex;
-            //    var msg = sValueTable + ";" + HInterID + ";" + HEntryID
-
-            //    var index = layer.load();
-            //    $.ajax({
-            //        type: "POST",
-            //        url: GetWEBURL() + "/QC_FirstPieceCheckBill/set_SaveValue",
-            //        async: false,
-            //        data: { "msg": msg },
-            //        dataType: "json",
-            //        success: function (data) {
-            //            if (data.count == 1) {
-            //                layer.close(index);
-            //                //$('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);//淇濆瓨鎸夐挳
+            //        for (let i = 0; i < table.cache['ValueTable'].length; i++) {
+            //            var row = table.cache['ValueTable'][i];
+            //            if (rowFun == 2) {
+            //                if (
+            //                    (!row.HInSpectValue || row.HInSpectValue === "")) {
+            //                    hasEmptyRow = true;
+            //                    emptyRowNumbers.push(i + 1);
+            //                }
             //            }
-            //            else {
+            //        }
+
+
+            //        if (hasEmptyRow) {
+            //            var confirmMsg = "妫�楠屽�艰〃鏍间腑瀛樺湪绌鸿锛堢 " + emptyRowNumbers.join(", ") + " 琛岋級锛屾槸鍚︾户缁繚瀛橈紵";
+            //            layer.confirm(confirmMsg, {
+            //                icon: 3,
+            //                title: '鎻愮ず',
+            //                btn: ['纭淇濆瓨', '鍙栨秷淇濆瓨']
+            //            }, function (index) {
+
             //                layer.close(index);
-            //                layer.msg("妫�楠屽�间繚瀛橀敊璇紒" + data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-            //            }
-            //        },
-            //        error: function (err) {
-            //            layer.close(index);
-            //            layer.msg("妫�楠屽�间繚瀛橀敊璇�:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+            //                proceedWithSave(dataindex).then(resolve).catch(reject);
+            //            }, function (index) {
+            //                ////鑾峰彇涓婃鎵�鍦ㄨ涓嬫爣
+            //                //var dataindex = $("#HEntryID").val() - 1;
+            //                layer.close(index);
+            //                //EchoValue();
+            //                layer.msg('宸插彇娑堜繚瀛橈紝璇峰畬鍠勬暟鎹悗閲嶆柊鎿嶄綔', { icon: 2 });
+            //                //reject(new Error('鐢ㄦ埛鍙栨秷浜嗕繚瀛�'));
+            //            });
+            //        } else {
+
+            //            proceedWithSave(dataindex).then(resolve).catch(reject);
             //        }
             //    });
             //}
 
+
+            //function proceedWithSave(dataindex) {
+            //    return new Promise((resolve, reject) => {
+            //        if (OperationType == 3) {
+            //            EchoValue();
+            //        }
+
+                    
+            //        for (let i = 0; i < table.cache['ValueTable'].length; i++) {
+            //            if (table.cache['ValueTable'][i].HInSpectValueB == "" || table.cache['ValueTable'][i].HInSpectValueB == null) {
+            //                table.cache['ValueTable'][i].HInSpectValueB = 0
+            //            }
+            //            if (table.cache['ValueTable'][i].HInSpectValueT == "" || table.cache['ValueTable'][i].HInSpectValueT == null) {
+            //                table.cache['ValueTable'][i].HInSpectValueT = 0
+            //            }
+            //            if (table.cache['ValueTable'][i].HInSpectValue == "" || table.cache['ValueTable'][i].HInSpectValue == null) {
+            //                table.cache['ValueTable'][i].HInSpectValue = 0
+            //            }
+            //        }
+
+            //        var sValueTable = JSON.stringify(table.cache['ValueTable']);
+            //        var HInterID = $("#HInterID").val();
+            //        var HEntryID = dataindex;
+            //        var msg = sValueTable + ";" + HInterID + ";" + HEntryID
+
+            //        var index = layer.load();
+            //        $.ajax({
+            //            type: "POST",
+            //            url: GetWEBURL() + "/QC_FirstPieceCheckBill/set_SaveValue",
+            //            async: true,
+            //            data: { "msg": msg },
+            //            dataType: "json",
+            //            success: function (data) {
+            //                layer.close(index);
+            //                if (data.count == 1) {
+            //                    layer.msg('妫�楠屽�间繚瀛樻垚鍔�', { icon: 1 });
+            //                    resolve(); // 鎴愬姛鏃秗esolve
+            //                } else {
+            //                    layer.msg("妫�楠屽�间繚瀛橀敊璇紒" + data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+            //                    reject(new Error("妫�楠屽�间繚瀛橀敊璇細" + data.Message));
+            //                }
+            //            },
+            //            error: function (err) {
+            //                layer.close(index);
+            //                layer.msg("妫�楠屽�间繚瀛橀敊璇�:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+            //                reject(new Error("妫�楠屽�间繚瀛橀敊璇細" + err));
+            //            }
+            //        });
+            //    });
+            //}
+            //妫�楠屽�间繚瀛�
+            function set_SaveValue(dataindex) {
+                if (OperationType == 3) {
+                    EchoValue();
+                }
+                for (let i = 0; i < table.cache['ValueTable'].length; i++) {
+                    if (table.cache['ValueTable'][i].HInSpectValueB == "" || table.cache['ValueTable'][i].HInSpectValueB == null) {
+                        table.cache['ValueTable'][i].HInSpectValueB = 0
+                    }
+                    if (table.cache['ValueTable'][i].HInSpectValueT == "" || table.cache['ValueTable'][i].HInSpectValueT == null) {
+                        table.cache['ValueTable'][i].HInSpectValueT = 0
+                    }
+                    if (table.cache['ValueTable'][i].HInSpectValue == "" || table.cache['ValueTable'][i].HInSpectValue == null) {
+                        table.cache['ValueTable'][i].HInSpectValue = 0
+                    }
+                }
+
+                var sValueTable = JSON.stringify(table.cache['ValueTable']);
+                var HInterID = $("#HInterID").val();
+                var HEntryID = dataindex;
+                var msg = sValueTable + ";" + HInterID + ";" + HEntryID
+
+                var index = layer.load();
+                $.ajax({
+                    type: "POST",
+                    url: GetWEBURL() + "/QC_FirstPieceCheckBill/set_SaveValue",
+                    async: false,
+                    data: { "msg": msg },
+                    dataType: "json",
+                    success: function (data) {
+                        if (data.count == 1) {
+                            layer.close(index);
+                            //$('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);//淇濆瓨鎸夐挳
+                        }
+                        else {
+                            layer.close(index);
+                            layer.msg("妫�楠屽�间繚瀛橀敊璇紒" + data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        }
+                    },
+                    error: function (err) {
+                        layer.close(index);
+                        layer.msg("妫�楠屽�间繚瀛橀敊璇�:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    }
+                });
+            }
+
             //鏍规嵁鐢熶骇璧勬簮鎴栬�� 宸ュ簭 鏌ヨ鐢熶骇宸ュ崟淇℃伅
             function get_ICMOBillStatusList() {
                 var sWhere = "";
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_BlueToothBarCodePrint.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_BlueToothBarCodePrint.html"
index f51e635..9cff162 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_BlueToothBarCodePrint.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_BlueToothBarCodePrint.html"
@@ -56,6 +56,15 @@
                                                 <input type="text" class="layui-input" name="HBarCode" lay-verify="HBarCode" autocomplete="off" placeholder="璇烽敭鍏ュ悗鍥炶溅" id="HBarCode" style="width: 500px;">
                                             </div>
                                             <div class="layui-inline">
+                                                <label class="layui-form-label">妯℃澘鍚嶇О</label>
+                                                <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                                    <select name="HPrintTemplate" id="HPrintTemplate" class="ForFilteringSchemes" lay-filter="HPrintTemplate"
+                                                            lay-verify="HPrintTemplate">
+                                                        <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+                                                    </select>
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
                                                 <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐗╂枡浠g爜*</label>
                                                 <div class="layui-input-block" style="margin-left: 77px;">
                                                     <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" style="width: 60%;display: inline-block;">
@@ -83,7 +92,7 @@
                                                     <input class="layui-input" name="HMaker" id="HMaker" autocomplete="off" style="background-color: #efefef4d;" readonly>
                                                 </div>
                                             </div>
-                                            
+
                                         </div>
                                     </div>
                                 </div>
@@ -152,7 +161,20 @@
             //#endregion                     
 
             //#region 鐐瑰嚮浜嬩欢锛屽寘鎷琽n鍜宖orm浜嬩欢
-            
+
+            form.on('select(HPrintTemplate)', function (data) {
+                // 2. 鑾峰彇閫変腑鐨勫��
+                const selectedValue = data.value;
+
+                // 3. 淇濆瓨鍒� localStorage锛堥敭鍚嶄负 "BlueToothselectedTemplate"锛�
+                localStorage.setItem('BlueToothselectedTemplate', selectedValue);
+
+                // 濡傛灉闇�瑕佷細璇濈骇瀛樺偍锛堟祻瑙堝櫒鍏抽棴鍚庢竻闄わ級锛屾敼鐢� sessionStorage锛�
+                // sessionStorage.setItem('selectedTemplate', selectedValue);
+
+                console.log('宸蹭繚瀛橀�夋嫨鐨勬ā鏉�:', selectedValue);
+            });
+
             //#region 鐐瑰嚮琛岄�変腑楂樹寒
             table.on('row(mainTable)', function (obj) {
                 //閫変腑琛屾敼鍙橀鑹�
@@ -215,6 +237,7 @@
 
             //鍒濆鍖栨潯鐮佷俊鎭〃鏍�
             function set_InitGrid() {
+                getTem();//鑾峰彇鎵撳嵃妯℃澘
                 columns = [
                     { type: 'checkbox', fixed: 'left' }
                     , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 75 }
@@ -239,7 +262,30 @@
                 option.data=[[]]
                 table.render(option);              
             }
-                    
+            //#region 鑾峰彇鎵撳嵃妯℃澘
+            function getTem() {
+                //鑾峰彇鐧诲綍椤电粍缁囧垪
+                $.ajax({
+                    type: "get",
+                    async: false,
+                    url: GetWEBURL() + "/Open_PrintTem/GetOpenTmpList_Json",
+                    data: { "HNumber": "HGy_BarCodeBill" },
+                    success: function (result) {
+                        var template = "";
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            var data = result.data;
+                            for (var i = 0; i < data.length; i++) {
+                                template += '<option  style="color:blue;" value="' + data[i].HName + '">' + data[i].HName + '</option>';
+                            }
+                            $("#HPrintTemplate").append(template);
+                            $("#HPrintTemplate").val(localStorage.getItem('BlueToothselectedTemplate'))
+                            form.render('select');
+                        }
+                        layer.closeAll("loading");
+                    }
+                })
+            }
+            //#endregion
               
 
             //鏉$爜鐢熸垚
@@ -283,7 +329,7 @@
 
             //鎵归噺鎵撳嵃
             function dy_PL(HBarCode) {
-                var sWhere = "select HBarCode 鏉$爜缂栧彿 from Gy_BarCodeBill where HBarCode = '" + HBarCode+"'"
+                var sWhere = "select Top 1 * from h_v_IF_BarCodeBillList with(nolock) where 鏉$爜缂栧彿 = '" + HBarCode+"'"
 
                 $.ajax({
                     type: "GET",
@@ -304,7 +350,7 @@
                                     type: "print",//鎵撳嵃妯″紡
                                     //type: "preview",//棰勮妯″紡
                                     showOptionDlg: false, //濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
-                                    report: urlAddRandomNo("../../grf/钃濈墮鏉$爜鏍囩_灏忓崼.grf"),
+                                    report: urlAddRandomNo("../../grf/" + $("#HPrintTemplate").val() + ".grf"),
                                     data: Customer
                                 };
 
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_KeyElement_Sec.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_KeyElement_Sec.html"
index 1db25ea..6c73f8b 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_KeyElement_Sec.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_KeyElement_Sec.html"
@@ -80,6 +80,12 @@
                                             </div>
                                         </div>
                                         <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;" id="">鏍¢獙骞存湀:</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCheckDate" lay-verify="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;"placeholder="璇疯緭鍏ュ勾鏈堟牸寮忓2501锛堝叡鍥涗綅鍓嶄袱浣嶄唬琛ㄥ勾浠藉悗涓や綅浠h〃鏈堜唤锛�">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline" style="display:none">
                                             <label class="layui-form-label" style="width: 85px;">杩芥函鍗曞彿</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#EDEDED;" readonly>
@@ -294,6 +300,7 @@
         var option = [];
         var option2 = [];
         var rowarr = [];//鍏抽敭浠舵竻鍗�
+        var previousHBarCode = "";
         //#endregion
 
         //#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -341,6 +348,9 @@
                 if ($('#HProcExchBillNo').val() == "") {
                     $('#HBarCode_SN').val("");
                     return layer.alert("璇峰厛閫夋嫨娴佽浆鍗�")
+                }
+                if (!checkHSNAndDate(HBarCode_SN)) {
+                    return
                 }
 
 
@@ -708,7 +718,74 @@
             });
             return result;
         }
+        //鏍¢獙 浜у搧鍜屽勾鏈�
+        function checkHSNAndDate(HBarCode) {
+            // 1. 鏍¢獙HBarCode闀垮害
+            if (!HBarCode || HBarCode.length < 20) {
+                layer.confirm("HBarCode闀垮害涓嶈冻20浣�");
+                return false;
+            }
 
+            // 2. 瑙f瀽HBarCode鐨勫勾鏈堟棩
+            const yearLastDigit = HBarCode[12]; // 绗�13浣嶏紙绱㈠紩12锛夛紝骞翠唤鏈�鍚庝竴浣�
+            const monthCode = HBarCode[13].toUpperCase(); // 绗�14浣嶏紝鏈堜唤锛圢-Z锛�
+
+
+            // 璁$畻骞翠唤锛堝亣璁惧綋鍓嶄笘绾紝濡�2020-2029锛�
+
+            const year = yearLastDigit;
+
+            // 璁$畻鏈堜唤锛圢=1, ..., Z=12锛�
+            const validChars = "NPQRSTUVWXYZ";
+            if (!validChars.includes(monthCode)) {
+                layer.confirm("瀛楃蹇呴』鏄� N, P-Z 涔嬩竴锛堣烦杩� O锛�");
+                return false;
+            }
+
+            // 璁$畻鏈堜唤锛歂=1, P=2, ..., Z=12
+            const month = validChars.indexOf(monthCode) + 1;
+
+
+            // 3. 鑾峰彇杈撳叆妗嗙殑骞存湀锛堟牸寮廚NMM锛屽2307琛ㄧず2023骞�7鏈堬級
+            const checkDateInput = document.getElementById("HCheckDate");
+            if (!checkDateInput) {
+                layer.confirm("鎵句笉鍒癏CheckDate杈撳叆妗�");
+                return false;
+            }
+            const inputValue = checkDateInput.value.trim();
+            if (!/^\d{4}$/.test(inputValue)) {
+                layer.confirm("杈撳叆妗嗘牸寮忛敊璇紙蹇呴』鏄疦NMM锛屽2307锛�");
+                return false;
+            }
+            const inputYear = inputValue.substring(1, 2); // NN锛堝23锛�
+            const inputMonth = parseInt(inputValue.substring(2, 4), 10); // MM锛堝07锛�
+
+            // 4. 鏍¢獙骞存湀鏄惁涓�鑷�
+            if (year !== inputYear || month !== inputMonth) {
+                layer.confirm(
+                    `骞存湀涓嶅尮閰嶏細HBarCode=${year}骞�${month}鏈堬紝杈撳叆妗�=${inputYear}骞�${inputMonth}鏈坄
+                );
+                return false;
+            }
+
+            // 5. 鏍¢獙鍓嶄簲浣嶆槸鍚︿笌涓婁竴娆′竴鑷�
+            const currentFirstFive = HBarCode.substring(0, 5);
+            if (previousHBarCode) {
+                const previousFirstFive = previousHBarCode.substring(0, 5);
+                if (currentFirstFive !== previousFirstFive) {
+                    layer.confirm(
+                        `鍓嶄簲浣嶄笉涓�鑷达細褰撳墠=${currentFirstFive}锛屼笂涓�娆�=${previousFirstFive}`
+                    );
+                    return false;
+                }
+            }
+
+            // 6. 鏇存柊涓婁竴娆$殑HBarCode
+            previousHBarCode = HBarCode;
+            $("#HCheckDate").prop("readonly", true);
+            console.log("鏍¢獙閫氳繃");
+            return true;
+        }
 
 
         //鍔犺浇鍘嗗彶杩囩珯娓呭崟淇℃伅
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_UnbindList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_UnbindList.html"
index e016948..7644b85 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_UnbindList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_UnbindList.html"
@@ -500,16 +500,19 @@
                     sWhere += " and " + ColName2 + " " + com2;
                 }
                 if (HICMOBillNo) {
-                    sWhere += " and 鐢熶骇璁㈠崟鍙� like '%" + HICMOBillNo + "%'";
+                    sWhere += " and 宸ュ崟缂栧彿 like '%" + HICMOBillNo + "%'";
                 }
+
                 if (HBarcode_SN) {
                     sWhere += " and DSN like '%" + HBarcode_SN + "%'";
                 }
                 if (HBarcode_ZB) {
-                    sWhere += "and  绠″埗搴忓彿 like 'P%' and 绠″埗搴忓彿 like '%XXX' and 绠″埗搴忓彿='" + HBarcode_ZB+"'";
+                    sWhere += "and  鏍堟澘鐮� like '%" + HBarcode_ZB + "%'";
+
                 }
                 if (HBarcode_ZX) {
-                    sWhere += "and 绠″埗搴忓彿 like 'MZXH%' and 绠″埗搴忓彿='" + HBarcode_ZX+"'";
+                    sWhere += "and  涓鐮� like '%" + HBarcode_ZX + "%'";
+
                 }
 
                 get_Display(sWhere);
@@ -550,7 +553,7 @@
                             item[itemobj] = "";
                         }
                         if (item[itemobj].length > 0) {  // 鍋囪瀛楁鍚嶄负field
-                            item[itemobj] = item[itemobj].toString().replaceALL(/[\r\n]+/g, '');  // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
+                            item[itemobj] = item[itemobj].toString().replace(/[\r\n]+/g, '').replace(/[\r\n]+/g, '').replace(/[\r\n]+/g, '');  // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
                         }
                     }
                 });
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batch.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batch.html"
index 592e0af..0e1bccf 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batch.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batch.html"
@@ -55,6 +55,12 @@
                                             </div>
                                         </div>
                                         <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;" id="">鏍¢獙骞存湀:</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCheckDate" lay-verify="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" placeholder="璇疯緭鍏ュ勾鏈堟牸寮忓2501锛堝叡鍥涗綅鍓嶄袱浣嶄唬琛ㄥ勾浠藉悗涓や綅浠h〃鏈堜唤锛�">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline" style="display:none">
                                             <label class="layui-form-label" style="width: 85px;" id="">褰撳墠鎵规:</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HBatchNo" lay-verify="HBatchNo" id="HBatchNo" style="background-color:#efefef4d;" readonly>
@@ -237,6 +243,7 @@
         var params = get_UrlVars();
         var HModName = "Cj_ProcessItemStationPlatform_batch";
         var option = [];
+        var previousHBarCode = "";
         //#endregion
 
         //#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -281,6 +288,9 @@
                 if ($("#HBarCode_Batch").val() == "" || $("#HBarCode_Batch").val() == null) {
                     layer.msg("鏈壂鎵规鐮佽鍏堟壂鐮�");
                     $("#HBarCode_Batch").focus();
+                    return
+                }
+                if (!checkHSNAndDate(HBarCode_SN)) {
                     return
                 }
                 if (HBarCode_SN) {
@@ -530,6 +540,75 @@
             });
         }
 
+        //鏍¢獙 浜у搧鍜屽勾鏈�
+        function checkHSNAndDate(HBarCode) {
+            // 1. 鏍¢獙HBarCode闀垮害
+            if (!HBarCode || HBarCode.length < 20) {
+                layer.confirm("HBarCode闀垮害涓嶈冻20浣�");
+                return false;
+            }
+
+            // 2. 瑙f瀽HBarCode鐨勫勾鏈堟棩
+            const yearLastDigit = HBarCode[12]; // 绗�13浣嶏紙绱㈠紩12锛夛紝骞翠唤鏈�鍚庝竴浣�
+            const monthCode = HBarCode[13].toUpperCase(); // 绗�14浣嶏紝鏈堜唤锛圢-Z锛�
+
+
+            // 璁$畻骞翠唤锛堝亣璁惧綋鍓嶄笘绾紝濡�2020-2029锛�
+
+            const year = yearLastDigit;
+
+            // 璁$畻鏈堜唤锛圢=1, ..., Z=12锛�
+            const validChars = "NPQRSTUVWXYZ";
+            if (!validChars.includes(monthCode)) {
+                layer.confirm("瀛楃蹇呴』鏄� N, P-Z 涔嬩竴锛堣烦杩� O锛�");
+                return false;
+            }
+
+            // 璁$畻鏈堜唤锛歂=1, P=2, ..., Z=12
+            const month = validChars.indexOf(monthCode) + 1;
+
+
+            // 3. 鑾峰彇杈撳叆妗嗙殑骞存湀锛堟牸寮廚NMM锛屽2307琛ㄧず2023骞�7鏈堬級
+            const checkDateInput = document.getElementById("HCheckDate");
+            if (!checkDateInput) {
+                layer.confirm("鎵句笉鍒癏CheckDate杈撳叆妗�");
+                return false;
+            }
+            const inputValue = checkDateInput.value.trim();
+            if (!/^\d{4}$/.test(inputValue)) {
+                layer.confirm("杈撳叆妗嗘牸寮忛敊璇紙蹇呴』鏄疦NMM锛屽2307锛�");
+                return false;
+            }
+            const inputYear = inputValue.substring(1, 2); // NN锛堝23锛�
+            const inputMonth = parseInt(inputValue.substring(2, 4), 10); // MM锛堝07锛�
+
+            // 4. 鏍¢獙骞存湀鏄惁涓�鑷�
+            if (year !== inputYear || month !== inputMonth) {
+                layer.confirm(
+                    `骞存湀涓嶅尮閰嶏細HBarCode=${year}骞�${month}鏈堬紝杈撳叆妗�=${inputYear}骞�${inputMonth}鏈坄
+                );
+                return false;
+            }
+
+            // 5. 鏍¢獙鍓嶄簲浣嶆槸鍚︿笌涓婁竴娆′竴鑷�
+            const currentFirstFive = HBarCode.substring(0, 5);
+            if (previousHBarCode) {
+                const previousFirstFive = previousHBarCode.substring(0, 5);
+                if (currentFirstFive !== previousFirstFive) {
+                    layer.confirm(
+                        `鍓嶄簲浣嶄笉涓�鑷达細褰撳墠=${currentFirstFive}锛屼笂涓�娆�=${previousFirstFive}`
+                    );
+                    return false;
+                }
+            }
+
+            // 6. 鏇存柊涓婁竴娆$殑HBarCode
+            previousHBarCode = HBarCode;
+            $("#HCheckDate").prop("readonly", true);
+            console.log("鏍¢獙閫氳繃");
+            return true;
+        }
+
         //鍒犻櫎鍗曟嵁
         function btn_Delete() {
             var checkStatus = table.checkStatus('mainTable')
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batchKeyElement.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batchKeyElement.html"
index e2ad4b3..2a0bb08 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batchKeyElement.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batchKeyElement.html"
@@ -64,11 +64,17 @@
                                                 <input type="text" class="layui-input" name="HBarCode_BatchSec" lay-verify="HBarCode_BatchSec" id="HBarCode_BatchSec" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
-                                        <div class="layui-inline">
+                                        <div class="layui-inline" style="display: none">
                                             <label class="layui-form-label" style="width: 85px;">杩芥函鍗曞彿</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#EDEDED;" readonly>
                                                 <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;" id="">鏍¢獙骞存湀:</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCheckDate" lay-verify="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;"placeholder="璇疯緭鍏ュ勾鏈堟牸寮忓2501锛堝叡鍥涗綅鍓嶄袱浣嶄唬琛ㄥ勾浠藉悗涓や綅浠h〃鏈堜唤锛�">
                                             </div>
                                         </div>
                                         <!--<div class="layui-inline">
@@ -288,6 +294,7 @@
         var HModName2 = "Cj_ProcessItemStationPlatform_batchKeyElement2";
         var option = [];
         var option2 = [];
+        var previousHBarCode = "";
         //#endregion
 
         //#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -365,6 +372,9 @@
                 if ($("#HBarCode_Batch").val() == "" || $("#HBarCode_Batch").val() == null) {
                     layer.msg("鏈壂鎵规鐮佽鍏堟壂鐮�");
                     $("#HBarCode_Batch").focus();
+                    return
+                }
+                if (!checkHSNAndDate(HBarCode_SN)) {
                     return
                 }
                 if (HBarCode_SN) {
@@ -862,6 +872,74 @@
         }
         //#endregion
 
+        //鏍¢獙 浜у搧鍜屽勾鏈�
+        function checkHSNAndDate(HBarCode) {
+             // 1. 鏍¢獙HBarCode闀垮害
+            if (!HBarCode || HBarCode.length < 20) {
+                layer.confirm("HBarCode闀垮害涓嶈冻20浣�");
+                return false;
+            }
+
+            // 2. 瑙f瀽HBarCode鐨勫勾鏈堟棩
+            const yearLastDigit = HBarCode[12]; // 绗�13浣嶏紙绱㈠紩12锛夛紝骞翠唤鏈�鍚庝竴浣�
+            const monthCode = HBarCode[13].toUpperCase(); // 绗�14浣嶏紝鏈堜唤锛圢-Z锛�
+            
+
+            // 璁$畻骞翠唤锛堝亣璁惧綋鍓嶄笘绾紝濡�2020-2029锛�
+            
+            const year = yearLastDigit;
+
+            // 璁$畻鏈堜唤锛圢=1, ..., Z=12锛�
+            const validChars = "NPQRSTUVWXYZ";
+            if (!validChars.includes(monthCode)) {
+                layer.confirm("瀛楃蹇呴』鏄� N, P-Z 涔嬩竴锛堣烦杩� O锛�");
+                return false;
+            }
+
+            // 璁$畻鏈堜唤锛歂=1, P=2, ..., Z=12
+            const month = validChars.indexOf(monthCode) + 1;
+            
+
+            // 3. 鑾峰彇杈撳叆妗嗙殑骞存湀锛堟牸寮廚NMM锛屽2307琛ㄧず2023骞�7鏈堬級
+            const checkDateInput = document.getElementById("HCheckDate");
+            if (!checkDateInput) {
+                layer.confirm("鎵句笉鍒癏CheckDate杈撳叆妗�");
+                return false;
+            }
+            const inputValue = checkDateInput.value.trim();
+            if (!/^\d{4}$/.test(inputValue)) {
+                layer.confirm("杈撳叆妗嗘牸寮忛敊璇紙蹇呴』鏄疦NMM锛屽2307锛�");
+                return false;
+            }
+            const inputYear = inputValue.substring(1, 2); // NN锛堝23锛�
+            const inputMonth = parseInt(inputValue.substring(2, 4), 10); // MM锛堝07锛�
+
+            // 4. 鏍¢獙骞存湀鏄惁涓�鑷�
+            if (year !== inputYear || month !== inputMonth) {
+                layer.confirm(
+                    `骞存湀涓嶅尮閰嶏細HBarCode=${year}骞�${month}鏈堬紝杈撳叆妗�=${inputYear}骞�${inputMonth}鏈坄
+                );
+                return false;
+            }
+
+            // 5. 鏍¢獙鍓嶄簲浣嶆槸鍚︿笌涓婁竴娆′竴鑷�
+            const currentFirstFive = HBarCode.substring(0, 5);
+            if (previousHBarCode) {
+                const previousFirstFive = previousHBarCode.substring(0, 5);
+                if (currentFirstFive !== previousFirstFive) {
+                    layer.confirm(
+                        `鍓嶄簲浣嶄笉涓�鑷达細褰撳墠=${currentFirstFive}锛屼笂涓�娆�=${previousFirstFive}`
+                    );
+                    return false;
+                }
+            }
+
+            // 6. 鏇存柊涓婁竴娆$殑HBarCode
+            previousHBarCode = HBarCode;
+            $("#HCheckDate").prop("readonly", true);
+            console.log("鏍¢獙閫氳繃");
+            return true;
+        }
 
         function get_Display(sWhere = '') {
             var ajaxLoad = layer.load();
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_checkPackage_Sec.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_checkPackage_Sec.html"
index c13cdd8..8f616bc 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_checkPackage_Sec.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_checkPackage_Sec.html"
@@ -80,6 +80,12 @@
                                             </div>
                                         </div>
                                         <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;" id="">鏍¢獙骞存湀:</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCheckDate" lay-verify="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;"placeholder="璇疯緭鍏ュ勾鏈堟牸寮忓2501锛堝叡鍥涗綅鍓嶄袱浣嶄唬琛ㄥ勾浠藉悗涓や綅浠h〃鏈堜唤锛�">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline" style="display:none">
                                             <label class="layui-form-label" style="width: 85px;">杩芥函鍗曞彿</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#EDEDED;" readonly>
@@ -294,6 +300,7 @@
         var option = [];
         var option2 = [];
         var rowarr = [];//鍏抽敭浠舵竻鍗�
+        var previousHBarCode = "";
         //#endregion
 
         //#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -342,7 +349,9 @@
                     $('#HBarCode_SN').val("");
                     return layer.alert("璇峰厛閫夋嫨娴佽浆鍗�")
                 }
-
+                if (!checkHSNAndDate(HBarCode_SN)) {
+                    return
+                }
 
                 if (HBarCode_SN) {
                     txtHBarCodeSN_KeyDown(HBarCode_SN);
@@ -709,7 +718,74 @@
             return result;
         }
 
+        //鏍¢獙 浜у搧鍜屽勾鏈�
+        function checkHSNAndDate(HBarCode) {
+            // 1. 鏍¢獙HBarCode闀垮害
+            if (!HBarCode || HBarCode.length < 20) {
+                layer.confirm("HBarCode闀垮害涓嶈冻20浣�");
+                return false;
+            }
 
+            // 2. 瑙f瀽HBarCode鐨勫勾鏈堟棩
+            const yearLastDigit = HBarCode[12]; // 绗�13浣嶏紙绱㈠紩12锛夛紝骞翠唤鏈�鍚庝竴浣�
+            const monthCode = HBarCode[13].toUpperCase(); // 绗�14浣嶏紝鏈堜唤锛圢-Z锛�
+
+
+            // 璁$畻骞翠唤锛堝亣璁惧綋鍓嶄笘绾紝濡�2020-2029锛�
+
+            const year = yearLastDigit;
+
+            // 璁$畻鏈堜唤锛圢=1, ..., Z=12锛�
+            const validChars = "NPQRSTUVWXYZ";
+            if (!validChars.includes(monthCode)) {
+                layer.confirm("瀛楃蹇呴』鏄� N, P-Z 涔嬩竴锛堣烦杩� O锛�");
+                return false;
+            }
+
+            // 璁$畻鏈堜唤锛歂=1, P=2, ..., Z=12
+            const month = validChars.indexOf(monthCode) + 1;
+
+
+            // 3. 鑾峰彇杈撳叆妗嗙殑骞存湀锛堟牸寮廚NMM锛屽2307琛ㄧず2023骞�7鏈堬級
+            const checkDateInput = document.getElementById("HCheckDate");
+            if (!checkDateInput) {
+                layer.confirm("鎵句笉鍒癏CheckDate杈撳叆妗�");
+                return false;
+            }
+            const inputValue = checkDateInput.value.trim();
+            if (!/^\d{4}$/.test(inputValue)) {
+                layer.confirm("杈撳叆妗嗘牸寮忛敊璇紙蹇呴』鏄疦NMM锛屽2307锛�");
+                return false;
+            }
+            const inputYear = inputValue.substring(1, 2); // NN锛堝23锛�
+            const inputMonth = parseInt(inputValue.substring(2, 4), 10); // MM锛堝07锛�
+
+            // 4. 鏍¢獙骞存湀鏄惁涓�鑷�
+            if (year !== inputYear || month !== inputMonth) {
+                layer.confirm(
+                    `骞存湀涓嶅尮閰嶏細HBarCode=${year}骞�${month}鏈堬紝杈撳叆妗�=${inputYear}骞�${inputMonth}鏈坄
+                );
+                return false;
+            }
+
+            // 5. 鏍¢獙鍓嶄簲浣嶆槸鍚︿笌涓婁竴娆′竴鑷�
+            const currentFirstFive = HBarCode.substring(0, 5);
+            if (previousHBarCode) {
+                const previousFirstFive = previousHBarCode.substring(0, 5);
+                if (currentFirstFive !== previousFirstFive) {
+                    layer.confirm(
+                        `鍓嶄簲浣嶄笉涓�鑷达細褰撳墠=${currentFirstFive}锛屼笂涓�娆�=${previousFirstFive}`
+                    );
+                    return false;
+                }
+            }
+
+            // 6. 鏇存柊涓婁竴娆$殑HBarCode
+            previousHBarCode = HBarCode;
+            $("#HCheckDate").prop("readonly", true);
+            console.log("鏍¢獙閫氳繃");
+            return true;
+        }
 
         //鍔犺浇鍘嗗彶杩囩珯娓呭崟淇℃伅
         function get_Display(sWhere = '') {
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_checkSN.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_checkSN.html"
index 8c7b775..61a9b79 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_checkSN.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_checkSN.html"
@@ -86,6 +86,12 @@
                                                 <input type="text" class="layui-input" name="HSNNo" lay-verify="HSNNo" id="HSNNo" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;" id="">鏍¢獙骞存湀:</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCheckDate" lay-verify="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;"placeholder="璇疯緭鍏ュ勾鏈堟牸寮忓2501锛堝叡鍥涗綅鍓嶄袱浣嶄唬琛ㄥ勾浠藉悗涓や綅浠h〃鏈堜唤锛�">
+                                            </div>
+                                        </div>
                                         <!--<div class="layui-inline">
                                             <label class="layui-form-label" style="width: 85px; color: red; ">鎵撳嵃妯℃澘</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
@@ -273,6 +279,7 @@
         var HModName = "Cj_ProcessItemStationPlatform_checkSN";
         //var HModName2 = "Cj_ProcessItemStationPlatform_batch2";
         var option = [];
+        var previousHBarCode = "";
         //var option2 = [];
         //#endregion
 
@@ -304,6 +311,9 @@
         $('#HBarCode_SN').on('keydown', function (event) {
             var HBarCode = $('#HBarCode_SN').val();
             if (event.keyCode == 13) {
+                if (!checkHSNAndDate(HBarCode)) {
+                    return
+                }
                 //濡傛灉闀洉鐮佷笉涓虹┖
                 if (HBarCode) {
                     txtHBarCode_KeyDown(HBarCode);
@@ -563,6 +573,74 @@
             });
         }
 
+        //鏍¢獙 浜у搧鍜屽勾鏈�
+        function checkHSNAndDate(HBarCode) {
+            // 1. 鏍¢獙HBarCode闀垮害
+            if (!HBarCode || HBarCode.length < 20) {
+                layer.confirm("HBarCode闀垮害涓嶈冻20浣�");
+                return false;
+            }
+
+            // 2. 瑙f瀽HBarCode鐨勫勾鏈堟棩
+            const yearLastDigit = HBarCode[12]; // 绗�13浣嶏紙绱㈠紩12锛夛紝骞翠唤鏈�鍚庝竴浣�
+            const monthCode = HBarCode[13].toUpperCase(); // 绗�14浣嶏紝鏈堜唤锛圢-Z锛�
+
+
+            // 璁$畻骞翠唤锛堝亣璁惧綋鍓嶄笘绾紝濡�2020-2029锛�
+
+            const year = yearLastDigit;
+
+            // 璁$畻鏈堜唤锛圢=1, ..., Z=12锛�
+            const validChars = "NPQRSTUVWXYZ";
+            if (!validChars.includes(monthCode)) {
+                layer.confirm("瀛楃蹇呴』鏄� N, P-Z 涔嬩竴锛堣烦杩� O锛�");
+                return false;
+            }
+
+            // 璁$畻鏈堜唤锛歂=1, P=2, ..., Z=12
+            const month = validChars.indexOf(monthCode) + 1;
+
+
+            // 3. 鑾峰彇杈撳叆妗嗙殑骞存湀锛堟牸寮廚NMM锛屽2307琛ㄧず2023骞�7鏈堬級
+            const checkDateInput = document.getElementById("HCheckDate");
+            if (!checkDateInput) {
+                layer.confirm("鎵句笉鍒癏CheckDate杈撳叆妗�");
+                return false;
+            }
+            const inputValue = checkDateInput.value.trim();
+            if (!/^\d{4}$/.test(inputValue)) {
+                layer.confirm("杈撳叆妗嗘牸寮忛敊璇紙蹇呴』鏄疦NMM锛屽2307锛�");
+                return false;
+            }
+            const inputYear = inputValue.substring(1, 2); // NN锛堝23锛�
+            const inputMonth = parseInt(inputValue.substring(2, 4), 10); // MM锛堝07锛�
+
+            // 4. 鏍¢獙骞存湀鏄惁涓�鑷�
+            if (year !== inputYear || month !== inputMonth) {
+                layer.confirm(
+                    `骞存湀涓嶅尮閰嶏細HBarCode=${year}骞�${month}鏈堬紝杈撳叆妗�=${inputYear}骞�${inputMonth}鏈坄
+                );
+                return false;
+            }
+
+            // 5. 鏍¢獙鍓嶄簲浣嶆槸鍚︿笌涓婁竴娆′竴鑷�
+            const currentFirstFive = HBarCode.substring(0, 5);
+            if (previousHBarCode) {
+                const previousFirstFive = previousHBarCode.substring(0, 5);
+                if (currentFirstFive !== previousFirstFive) {
+                    layer.confirm(
+                        `鍓嶄簲浣嶄笉涓�鑷达細褰撳墠=${currentFirstFive}锛屼笂涓�娆�=${previousFirstFive}`
+                    );
+                    return false;
+                }
+            }
+
+            // 6. 鏇存柊涓婁竴娆$殑HBarCode
+            previousHBarCode = HBarCode;
+            $("#HCheckDate").prop("readonly", true);
+            console.log("鏍¢獙閫氳繃");
+            return true;
+        }
 
         //鍔犺浇缃戞牸鏍规嵁缁戝畾宸ュ簭鍜岀敓浜ц祫婧�
         function get_Display(sWhere = '') {
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_generateSNCode.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_generateSNCode.html"
index 5af4327..5f01e8f 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_generateSNCode.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_generateSNCode.html"
@@ -84,11 +84,17 @@
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px; color: red; ">鎵撳嵃妯℃澘</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="">鏍¢獙骞存湀:</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
-                                                <select name="HPrintTemplate" id="HPrintTemplate" lay-filter="HPrintTemplate" >
-                                                    <option>褰╃洅鏍囩妯℃澘</option>
-                                                    <option>鎵撳嵃妯℃澘2</option>
+                                                <input type="text" class="layui-input" name="HCheckDate" lay-verify="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" placeholder="璇疯緭鍏ュ勾鏈堟牸寮忓2501锛堝叡鍥涗綅鍓嶄袱浣嶄唬琛ㄥ勾浠藉悗涓や綅浠h〃鏈堜唤锛�">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">妯℃澘鍚嶇О</label>
+                                            <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                                <select name="HPrintTemplate" id="HPrintTemplate" class="ForFilteringSchemes" lay-filter="HPrintTemplate"
+                                                        lay-verify="HPrintTemplate">
+                                                    <!--鍔ㄦ�佹覆鏌撶粍缁�-->
                                                 </select>
                                             </div>
                                         </div>
@@ -270,6 +276,7 @@
         var HModName = "Cj_ProcessItemStationPlatform_generateSN";
         //var HModName2 = "Cj_ProcessItemStationPlatform_batch2";
         var option = [];
+        var previousHBarCode = "";
         //var option2 = [];
         //#endregion
 
@@ -282,6 +289,21 @@
         //#endregion
 
         //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+
+        form.on('select(HPrintTemplate)', function (data) {
+            // 2. 鑾峰彇閫変腑鐨勫��
+            const selectedValue = data.value;
+
+            // 3. 淇濆瓨鍒� localStorage锛堥敭鍚嶄负 "BlueToothselectedTemplate"锛�
+            localStorage.setItem('SNselectedTemplate', selectedValue);
+
+            // 濡傛灉闇�瑕佷細璇濈骇瀛樺偍锛堟祻瑙堝櫒鍏抽棴鍚庢竻闄わ級锛屾敼鐢� sessionStorage锛�
+            // sessionStorage.setItem('selectedTemplate', selectedValue);
+
+            console.log('宸蹭繚瀛橀�夋嫨鐨勬ā鏉�:', selectedValue);
+        });
+
         //澶村伐鍏锋爮浜嬩欢
         table.on('toolbar(mainTable)', function (obj) {
             switch (obj.event) {
@@ -313,6 +335,10 @@
             if (event.keyCode == 13) {
                 var HBarCode = $('#HBarCode_SN').val();
                 if (event.keyCode == 13) {
+
+                    if (!checkHSNAndDate(HBarCode)) {
+                        return
+                    }
                     //濡傛灉闀洉鐮佷笉涓虹┖
                     if (HBarCode) {
                         txtHBarCode_KeyDown(HBarCode);
@@ -366,6 +392,31 @@
 
         //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
 
+        //#region 鑾峰彇鎵撳嵃妯℃澘
+        function getTem() {
+            //鑾峰彇鐧诲綍椤电粍缁囧垪
+            $.ajax({
+                type: "get",
+                async: false,
+                url: GetWEBURL() + "/Open_PrintTem/GetOpenTmpList_Json",
+                data: { "HNumber": "HGy_BarCodeBill" },
+                success: function (result) {
+                    var template = "";
+                    if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                        var data = result.data;
+                        for (var i = 0; i < data.length; i++) {
+                            template += '<option  style="color:blue;" value="' + data[i].HName + '">' + data[i].HName + '</option>';
+                        }
+                        $("#HPrintTemplate").append(template);
+                        $("#HPrintTemplate").val(localStorage.getItem('SNselectedTemplate'))
+                        form.render('select');
+                    }
+                    layer.closeAll("loading");
+                }
+            })
+        }
+            //#endregion
+
         //鍒濆鍖栫晫闈�
         function set_ClearBill() {
             //杩涘叆椤甸潰榛樿鍏夋爣鍦ㄦ祦杞崱涓�
@@ -379,6 +430,8 @@
             set_InitGrid();
             //
             get_Display();
+
+            getTem();
         }
 
         //#region 閫氳繃鐧诲綍鐢ㄦ埛鑾峰彇榛樿鍊�
@@ -424,7 +477,7 @@
                 , totalRow: true
                 , cellMinWidth: 120
                 , data: []
-                , height: 400
+                , height: 550
                 , limit: 10
                 , cols: [[
                     { type: 'numbers', title: '搴忓彿' }
@@ -542,7 +595,7 @@
 
         //鎵归噺鎵撳嵃
         function dy_PL(HBarCode) {
-            var sWhere = "select HBarCode 鏉$爜缂栧彿 from Gy_BarCodeBill where HBarCode = '" + HBarCode + "'"
+            var sWhere = "select Top 1 * from h_v_IF_BarCodeBillList with(nolock) where 鏉$爜缂栧彿 = '" + HBarCode + "'"
 
             $.ajax({
                 type: "GET",
@@ -590,6 +643,75 @@
 
         }
 
+        //鏍¢獙 浜у搧鍜屽勾鏈�
+        function checkHSNAndDate(HBarCode) {
+            // 1. 鏍¢獙HBarCode闀垮害
+            if (!HBarCode || HBarCode.length < 20) {
+                layer.confirm("HBarCode闀垮害涓嶈冻20浣�");
+                return false;
+            }
+
+            // 2. 瑙f瀽HBarCode鐨勫勾鏈堟棩
+            const yearLastDigit = HBarCode[12]; // 绗�13浣嶏紙绱㈠紩12锛夛紝骞翠唤鏈�鍚庝竴浣�
+            const monthCode = HBarCode[13].toUpperCase(); // 绗�14浣嶏紝鏈堜唤锛圢-Z锛�
+
+
+            // 璁$畻骞翠唤锛堝亣璁惧綋鍓嶄笘绾紝濡�2020-2029锛�
+
+            const year = yearLastDigit;
+
+            // 璁$畻鏈堜唤锛圢=1, ..., Z=12锛�
+            const validChars = "NPQRSTUVWXYZ";
+            if (!validChars.includes(monthCode)) {
+                layer.confirm("瀛楃蹇呴』鏄� N, P-Z 涔嬩竴锛堣烦杩� O锛�");
+                return false;
+            }
+
+            // 璁$畻鏈堜唤锛歂=1, P=2, ..., Z=12
+            const month = validChars.indexOf(monthCode) + 1;
+
+
+            // 3. 鑾峰彇杈撳叆妗嗙殑骞存湀锛堟牸寮廚NMM锛屽2307琛ㄧず2023骞�7鏈堬級
+            const checkDateInput = document.getElementById("HCheckDate");
+            if (!checkDateInput) {
+                layer.confirm("鎵句笉鍒癏CheckDate杈撳叆妗�");
+                return false;
+            }
+            const inputValue = checkDateInput.value.trim();
+            if (!/^\d{4}$/.test(inputValue)) {
+                layer.confirm("杈撳叆妗嗘牸寮忛敊璇紙蹇呴』鏄疦NMM锛屽2307锛�");
+                return false;
+            }
+            const inputYear = inputValue.substring(1, 2); // NN锛堝23锛�
+            const inputMonth = parseInt(inputValue.substring(2, 4), 10); // MM锛堝07锛�
+
+            // 4. 鏍¢獙骞存湀鏄惁涓�鑷�
+            if (year !== inputYear || month !== inputMonth) {
+                layer.confirm(
+                    `骞存湀涓嶅尮閰嶏細HBarCode=${year}骞�${month}鏈堬紝杈撳叆妗�=${inputYear}骞�${inputMonth}鏈坄
+                );
+                return false;
+            }
+
+            // 5. 鏍¢獙鍓嶄簲浣嶆槸鍚︿笌涓婁竴娆′竴鑷�
+            const currentFirstFive = HBarCode.substring(0, 5);
+            if (previousHBarCode) {
+                const previousFirstFive = previousHBarCode.substring(0, 5);
+                if (currentFirstFive !== previousFirstFive) {
+                    layer.confirm(
+                        `鍓嶄簲浣嶄笉涓�鑷达細褰撳墠=${currentFirstFive}锛屼笂涓�娆�=${previousFirstFive}`
+                    );
+                    return false;
+                }
+            }
+
+            // 6. 鏇存柊涓婁竴娆$殑HBarCode
+            previousHBarCode = HBarCode;
+            $("#HCheckDate").prop("readonly", true);
+            console.log("鏍¢獙閫氳繃");
+            return true;
+        }
+
         //鍔犺浇缃戞牸鏍规嵁缁戝畾宸ュ簭鍜岀敓浜ц祫婧�
         function get_Display(sWhere = '') {
             var ajaxLoad = layer.load();
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SachetBarCodePrint.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SachetBarCodePrint.html"
index 756a870..05f91da 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SachetBarCodePrint.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SachetBarCodePrint.html"
@@ -14,6 +14,7 @@
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
     <script src="../../../layuiadmin/PubCustom.js"></script>
     <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+    <script src="../../../layuiadmin/grwebapp.js"></script>
     <style type="text/css">
 
         /*begin 姝ゆ牱寮忕敤浜庢秷闄よ鍏冪礌涓竷灞�瀹藉害涓嶅鐨勯棶棰�*/
@@ -378,8 +379,8 @@
             }
 
             function dy_PL(rest) {
-                var HInterID = rest[num].HBarCodeID.toString();
-                var sWhere = "select cast( b.娴佹按鍙� as float) 娴佹按鍙�,鐢熶骇璁㈠崟鍙�,a.閿�鍞鍗曞彿,a.鐢熶骇鏁伴噺,a.娴佽浆鍗℃暟閲�,a.浜у搧浠g爜,a.鍗曟嵁鍙�,case when ISNULL(a.鐢熶骇瑙勬牸,'')='' then a.浜у搧瑙勬牸 else a.鐢熶骇瑙勬牸 end 浜у搧瑙勬牸,a.浜у搧鍚嶇О,a.鏃ユ湡,a.鍗曟嵁鍙�,b.宸ュ簭浠g爜,b.宸ュ簭鍚嶇О,a.鎵瑰彿,b.宸ヨ壓宸ヤ綔涓績,b.宸ヨ壓宸ヨ壓鍙傛暟,a.鐢熶骇杞﹂棿,b.宸ユ鍚嶇О,b.鐢熶骇璁㈠崟鏁伴噺 from h_v_Sc_ProcessExchangeBillQuery a left join h_v_Sc_ProcessExchangeBillQuerySub b on a.hmainid=b.hmainid   where b.hmainid in(" + HInterID + ") and b.宸ュ簭浠g爜 != '9999' order by cast(b.娴佹按鍙� as int)"
+                var HItemID = rest[num].HBarCodeID.toString();
+                var sWhere = "select top 1 HBarCode 鏉$爜缂栧彿,isnull(ms.HCusRelationNumber,'') SKU from Gy_BarCodeBill a with(nolock) left join Gy_Material m with(nolock) on a.HMaterID = m.HItemID left join Gy_MateNumRelation_Sec ms with(nolock) on m.HMASTERID = ms.HMaterID where a.HItemID = " + HItemID
 
                 $.ajax({
                     type: "GET",
@@ -390,6 +391,11 @@
                         if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
 
                             if (data.data.length != 0) {
+                                if (data.data[0].SKU == "") {
+                                    layer.msg("鐗╂枡SKU鏈淮鎶わ紝璇疯仈绯荤鐞嗗憳纭锛�");
+                                    return;
+                                }
+
                                 var dataPrint = [];
                                 for (var i = 0; i < data.data.length; i++) {
                                     dataPrint.push(data.data[i])
@@ -403,11 +409,11 @@
                                     type: "print",//鎵撳嵃妯″紡
                                     //type: "preview",//棰勮妯″紡
                                     showOptionDlg: false, //濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
-                                    report: urlAddRandomNo("../../grf/娴佽浆鍗SON.grf"),
+                                    report: urlAddRandomNo("../../grf/棣欏泭妯℃澘JSON.grf"),
                                     data: Customer
                                 };
 
-                                console.log(data.data[0].鍗曟嵁鍙�);
+                                console.log("鎵撳嵃棣欏泭鏉$爜锛�" + data.data[0].鏉$爜缂栧彿);
                                 //var args = {
                                 //    report: urlAddRandomNo("../../grf/cs10.grf"),
                                 //    data: Customer
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SaveSNByICMO.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SaveSNByICMO.html"
new file mode 100644
index 0000000..ac69aba
--- /dev/null
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SaveSNByICMO.html"
@@ -0,0 +1,258 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <title>闀洉鐮佷笂浼�</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+    <script src="../../../layuiadmin/grwebapp.js"></script>
+    <style type="text/css">
+
+        /*begin 姝ゆ牱寮忕敤浜庢秷闄よ鍏冪礌涓竷灞�瀹藉害涓嶅鐨勯棶棰�*/
+        .layui-form-item .layui-inline {
+            margin-top: 5px;
+            margin-bottom: 5px;
+            margin-right: 0px;
+        }
+        /*end*/
+        .layui-table-cell .layui-form-checkbox[lay-skin="primary"] {
+            margin-left: 35%;
+        }
+
+        .layui-input-block {
+            margin-left: 0px;
+        }
+    </style>
+</head>
+<body>
+    <div id="layout1" class="layui-fluid">
+        <div class="layui-row layui-col-space15">
+            <div class="layui-col-md12">
+                <div class="layui-card">
+                    <form id="form0" class="layui-form" lay-filter="component-form-group" action="">
+                        <div class="layui-card-header">
+                            <div class="layui-input-block">
+                                <!--<button type="button" class="layui-btn" id="ToolPrint" lay-submit="" lay-filter="ToolPrint">棰勮鎵撳嵃</button>-->
+                                <button type="button" class="layui-btn" id="ToolExit" lay-submit="" lay-filter="ToolExit">閫�鍑�</button>
+                                <button type="button" class="layui-btn" id="save" lay-submit="" lay-filter="save">鎻愪氦</button>
+                            </div>
+                        </div>
+                        <div class="layui-card-body">
+                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
+                                <h1 style="text-align:center;"><b>闀洉鐮佷笂浼�</b></h1>
+                                <div class="layui-tab-content">
+                                    <div class="layui-tab-item layui-show">
+                                        <div class="layui-form-item">
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">SN鍓嶇紑</label>
+                                                <div class="layui-input-inline">
+                                                    <input class="layui-input" name="HSN" id="HSN" autocomplete="off" style="background-color: #efefef4d;" >
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">浠诲姟鍗曞彿<label style="color:red"> * </label></label>
+                                                <div class="layui-input-block" style="margin-left: 77px;">
+                                                    <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;">
+                                                    <input type="hidden" class="layui-input" name="HICMOInterID" id="HICMOInterID" value="0" style="background-color:#efefef4d;" readonly>
+                                                    <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" value="0">
+                                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchICMOBill" id="btnSearchICMOBill" style="padding: 0 10px;float: right;margin-right: 3px;">
+                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                    </button>
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">寮�濮嬪簭鍙�</label>
+                                                <div class="layui-input-inline">
+                                                    <input class="layui-input" name="HBeginNo" id="HBeginNo" autocomplete="off" style="background-color: #efefef4d;" >
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">缁撴潫搴忓彿</label>
+                                                <div class="layui-input-inline">
+                                                    <input class="layui-input" name="HEndNo" id="HEndNo" autocomplete="off" style="background-color: #efefef4d;" >
+                                                </div>
+                                            </div>
+                                            
+
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        
+                        <script type="text/html" id="xuhao">
+                            {{d.LAY_TABLE_INDEX+1}}
+                        </script>                        
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+    <script type="text/html" id="barDemo">
+        <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </script>
+    <script>
+        //鑾峰彇鍙傛暟
+        var params = get_UrlVars();
+        if (typeof (params[params[0]]) == "undefined") {
+            var OperationType = 1;//鎿嶄綔绫诲瀷
+            var closeType = 2;  //鍏抽棴绫诲瀷
+        } else {
+            debugger;
+            var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
+            var linterid = params[params[1]];//婧愬崟id
+            var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
+            var closeType = params[params[3]];  //鍏抽棴绫诲瀷
+        }
+
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index' //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+            //#region 鍏叡鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , laydate = layui.laydate
+                , element = layui.element;
+            //鏌ヨ鏉′欢
+            var option = [];
+       
+            //#endregion 
+
+              
+            //#region 杩涘叆椤甸潰鏃㈠姞杞�
+
+            //#endregion                     
+
+            //#region 鐐瑰嚮浜嬩欢锛屽寘鎷琽n鍜宖orm浜嬩欢
+
+
+            //琛ㄥご淇℃伅鐢熶骇浠诲姟鍗曞脊绐�
+            form.on('submit(btnSearchICMOBill)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '鐢熶骇浠诲姟鍗曞垪琛�',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['90%', '90%'],
+                    maxmin: true,
+                    content: ['../../鐢熶骇绠$悊/鐢熶骇浠诲姟鍗�/Sc_ICMOBillList.html?openType=2', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HICMOInterID").val(checkStatus.data[0].hmainid);
+                        $("#HICMOEntryID").val(checkStatus.data[0].HEntryID);
+                        $("#HICMOBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);
+                        $("#HMaterNumber").val(checkStatus.data[0].浜у搧浠g爜);
+                        $("#HMaterName").val(checkStatus.data[0].浜у搧鍚嶇О);
+                        $("#HMaterID").val(checkStatus.data[0].HMaterID);
+                        $("#HICMOQty").val(checkStatus.data[0].鐢熶骇浠诲姟鍗曟暟閲�);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+
+          
+            //閫�鍑�
+            form.on('submit(ToolExit)', function (data) {
+                if (linterid == undefined) {
+                    //鍏抽棴椤电
+                    Pub_Close(2);
+                }
+                else {
+                    //鍏抽棴椤电
+                    Pub_Close(1);
+                }
+            });
+            form.on('submit(save)', function (data) {
+                SaveSNByICMO();
+            });
+
+            //#endregion
+
+            //#region 姝ら〉闈㈡墍鏈夋柟娉�
+
+           
+            //鏉$爜鐢熸垚
+            function SaveSNByICMO() {
+
+                var HBillNo = $("#HICMOBillNo").val();
+                var HSN = $("#HSN").val();
+                var HBeginNo = $("#HBeginNo").val();
+                var HEndNo = $("#HEndNo").val();
+                if (HBillNo == "" || HSN == "" || HBeginNo == "" || HEndNo == "") {
+                    
+                    layer.alert("璇锋鏌ヤ俊鎭�");
+                    return
+                }
+                var wait = layer.load();
+                $.ajax(
+                    {
+                        type: "GET",
+                        url: GetWEBURL() + "/Sc_BarCode/SaveSNByICMO_XW", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        async: true,
+                        data: { "HBillNo": HBillNo, "HSN": HSN, "HBeginNo": HBeginNo, "HEndNo": HEndNo, "HCount": HEndNo - HBeginNo+1, "HMachineCode": "PC" },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                layer.close(wait);
+                                layer.alert(result.Message, { icon: 5 });
+                            }
+                            else {
+                                layer.close(wait);
+                                layer.alert(result.Message, { icon: 5 });
+                            }
+                        },
+                        error: function (err) {
+                            layer.close(wait);
+                            layer.alert(err.responseText, { icon: 5 });
+                        }
+                    });
+            }
+            //#endregion
+        });
+
+        function GetMaterValue(obj) {
+            //鑾峰彇鏁版嵁
+            $("#HMaterID").val(obj[0].HItemID);//鐗╂枡id
+            $("#HMaterName").val(obj[0].鐗╂枡鍚嶇О);//鐗╂枡鍚嶇О
+            $("#HMaterNumber").val(obj[0].鐗╂枡浠g爜);//鐗╂枡浠g爜
+            $("#HMaterModel").val(obj[0].瑙勬牸鍨嬪彿);//瑙勬牸鍨嬪彿
+            if ($("#HName").val() == "") {
+                $("#HName").val(obj[0].鐗╂枡浠g爜);
+            }
+        }
+    </script>
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillList.html" "b/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillList.html"
index af7417c..354848c 100644
--- "a/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillList.html"
+++ "b/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillList.html"
@@ -655,10 +655,10 @@
             //#region 蹇�熻繃婊�
             function get_FastQuery(number) {
                 //鑾峰彇鐧诲綍璐︽埛瀵瑰簲鑱屽憳鍚嶇О
-                var HUserName = getHEmpByHUserName();
-                if (HUserName != "" && HUserName != null) {
-                    sWhere += " and (娲惧崟浜� = '" + HUserName + "' or 鎺ュ崟浜� = '" + HUserName + "' or 鎶勯�佷汉 like '%" + HUserName + "%') ";
-                }
+                //var HUserName = getHEmpByHUserName();
+                //if (HUserName != "" && HUserName != null) {
+                //    sWhere += " and (娲惧崟浜� = '" + HUserName + "' or 鎺ュ崟浜� = '" + HUserName + "' or 鎶勯�佷汉 like '%" + HUserName + "%') ";
+                //}
 
                 var HOrgID = "";
                 var HBillNo = $("#HBillNo").val();  //鍗曟嵁鍙�

--
Gitblit v1.9.1