From 3bd61bd433fb39fedecd33f8f7e8e0d4d059ce1d Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 19 八月 2025 18:11:28 +0800
Subject: [PATCH] 华远:报表折线图

---
 WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBill.html | 1071 +++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 702 insertions(+), 369 deletions(-)

diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html"
index bc8506a..0c75c29 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html"
@@ -14,6 +14,8 @@
     <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>
+    <script src="../../../layuiadmin/MESLanguage.js"></script>
     <style>
         .main-btn { /*澶撮儴涓绘寜閽�*/
             padding: 0 2px; /*璋冩暣鎸夐挳宸﹀彸绌洪殭澶у皬*/
@@ -44,7 +46,6 @@
         .layui-form-label {
             width: 25%;
         }
-
     </style>
 </head>
 <body>
@@ -55,18 +56,19 @@
                     <div class="layui-card-header">
                         <div class="layui-btn-group">
                             <button type="button" id="set_SaveBill" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">淇濆瓨</button>
-                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">閫�鍑�</button>
-                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn_print">鎵撳嵃</button>
+                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
+                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn_print" id="btn_print">鎵撳嵃</button>
                             <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">闅愯棌鍒楄缃�</button>
                         </div>
                     </div>
                     <div class="layui-tab" lay-filter="tab-POStockInBill">
+                        <h1 style="text-align:center;" id="BT_GXLZK"><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="5" style="padding:1px;">缇婃瘺淇℃伅</li>
-                            <li lay-id="2" style="padding:1px;">鍏朵粬淇℃伅</li>
-                            <li lay-id="3" style="padding:1px;">妫�绉荤エ淇℃伅</li>
-                            <li lay-id="4" style="padding:1px;">鍒跺崟淇℃伅</li>
+                                <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
+                                <li lay-id="2" style="padding:1px;">缇婃瘺淇℃伅</li>
+                                <li lay-id="3" style="padding:1px;">鍏朵粬淇℃伅</li>
+                                <li lay-id="4" style="padding:1px;">妫�绉荤エ淇℃伅</li>
+                                <li lay-id="5" style="padding:1px;">鍒跺崟淇℃伅</li>
                         </ul>
                         <div class="layui-tab-content">
                             <!--鍩烘湰淇℃伅-->
@@ -74,7 +76,7 @@
                                 <div class="layui-form-item" style="padding-top: 3px;">
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                            <label class="layui-form-label" id="BT_HBillNo">鍗曟嵁鍙�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" name="HInterID" id="HInterID" value="0">
@@ -82,113 +84,135 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鏃ユ湡</label>
+                                            <label class="layui-form-label" id="BT_HDate">鏃ユ湡</label>
                                             <div class="layui-input-inline">
-                                                <input type="datetime" class="layui-input" name="HDate" id="HDate">
+                                                <input type="datetime" class="layui-input" name="HDate" id="HDate" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鏌撹壊瑕佹眰</label>
+                                            <label class="layui-form-label" id="BT_HColorRemark">鏌撹壊瑕佹眰</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="HColorRemark" id="HColorRemark" >
+                                                <input type="text" class="layui-input" name="HColorRemark" id="HColorRemark" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" id="BT_HMainSourceBillSubType">閿�鍞鍗曠被鍨�</label>
+                                            <div class="layui-input-inline">
+                                                <select name="HMainSourceBillSubType" id="HMainSourceBillSubType" lay-filter="HMainSourceBillSubType" disabled="disabled" style="width: 180px; ">
+                                                    <option style="color:blue;" selected="selected" value=""></option>
+                                                    <option style="color:blue;" value="0">鏅�氬崟鎹�</option>
+                                                    <option style="color:blue;" value="1">杩斾慨鍗曟嵁</option>
+                                                </select>
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">璁㈠崟璺熻釜鍙�</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly>
-                    </div>
-                </div>-->
+                                            <label class="layui-form-label">璁㈠崟璺熻釜鍙�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>-->
                                         <!--<div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">鍥惧彿鐗堟湰</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HPicNumVer" id="HPicNumVer" style="background-color:#efefef4d;" readonly>
-                    </div>
-                </div>-->
+                                            <label class="layui-form-label">鍥惧彿鐗堟湰</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HPicNumVer" id="HPicNumVer" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>-->
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">浜у搧鍚嶇О</label>
+                                            <label class="layui-form-label" id="BT_HMaterName2">浜у搧鍚嶇О</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HMaterName2" id="HMaterName2" onmouseover="this.title=this.value" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
                                                 <input type="hidden" name="HMaterID2" id="HMaterID2" value="0">
                                                 <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater2" id="btnSearchMater2" style="width: 40px;">
-                            <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                        </button>-->
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>-->
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">浜у搧浠g爜</label>
+                                            <label class="layui-form-label" id="BT_HMaterNumber2">浜у搧浠g爜</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HMaterNumber2" id="HMaterNumber2" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">浜у搧瑙勬牸</label>
+                                            <label class="layui-form-label"  id="BT_HMaterModel2">浜у搧瑙勬牸</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="HMaterModel2" id="HMaterModel2" onmouseover="this.title=this.value" style="">
+                                                <input type="text" class="layui-input" name="HMaterModel2" id="HMaterModel2" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_HProjectNum">椤圭洰缂栧彿</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HProjectNum" id="HProjectNum">
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">鎬昏鍥惧彿</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HPicNumAssemble" id="HPicNumAssemble" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
-                    </div>
-                </div>-->
+                                            <label class="layui-form-label">鎬昏鍥惧彿</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HPicNumAssemble" id="HPicNumAssemble" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>-->
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鐢熶骇璁㈠崟鍙�</label>
+                                            <label class="layui-form-label" id="BT_HICMOBillNo">鐢熶骇璁㈠崟鍙�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" name="HICMOInterID" id="HICMOInterID" value="0">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">娴佽浆鍗℃暟閲�</label>
+                                            <label class="layui-form-label" id="BT_HQty">娴佽浆鍗℃暟閲�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HQty" id="HQty">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鍗曚綅</label>
+                                            <label class="layui-form-label" id="BT_HUnitName">鍗曚綅</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HUnitName" id="HUnitName" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" name="HUnitID" id="HUnitID" value="0">
                                             </div>
                                         </div>
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_HBatchNo">鎵规鍙�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HBatchNo" id="HBatchNo" value="">
+                                            </div>
+                                        </div>
                                         <!--<div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">鏉愯川</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HMaterTexture" id="HMaterTexture">
-                    </div>
-                </div>-->
+        <label class="layui-form-label">鏉愯川</label>
+        <div class="layui-input-inline">
+            <input type="text" class="layui-input" name="HMaterTexture" id="HMaterTexture">
+        </div>
+    </div>-->
                                     </div>
                                     <div class="layui-row">
                                         <!--<div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">璁″垝寮�宸ユ棩鏈�</label>
-                    <div class="layui-input-inline">
-                        <input type="date" class="layui-input" name="HPlanBeginDate" id="HPlanBeginDate" style="padding-left: 32px;">
-                    </div>
-                </div>
-                <div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">璁″垝瀹屽伐鏃ユ湡</label>
-                    <div class="layui-input-inline">
-                        <input type="date" class="layui-input" name="HPlanEndDate" id="HPlanEndDate" style="padding-left: 32px;">
-                    </div>
-                </div>-->
-
-                                        <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">閫夊崟鍙�</label>
+                                            <label class="layui-form-label">璁″垝寮�宸ユ棩鏈�</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="textBox2" id="textBox2" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
-                                                <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchICMOBill" id="btnSearchICMOBill" style="width: 40px;">
-                            <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                        </button>-->
+                                                <input type="date" class="layui-input" name="HPlanBeginDate" id="HPlanBeginDate" style="padding-left: 32px;">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">宸ヨ壓璺嚎</label>
+                                            <label class="layui-form-label">璁″垝瀹屽伐鏃ユ湡</label>
+                                            <div class="layui-input-inline">
+                                                <input type="date" class="layui-input" name="HPlanEndDate" id="HPlanEndDate" style="padding-left: 32px;">
+                                            </div>
+                                        </div>-->
+
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_textBox2">閫夊崟鍙�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="textBox2" id="textBox2" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
+                                                <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchICMOBill" id="btnSearchICMOBill" style="width: 40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>-->
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_RoutingBill">宸ヨ壓璺嚎</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="RoutingBill" id="RoutingBill" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
                                                 <input type="hidden" class="layui-input" name="HRoutingBillID" id="HRoutingBillID">
@@ -198,65 +222,76 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">骞呭</label>
+                                            <label class="layui-form-label" id="BT_HWidth">骞呭</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="HWidth" id="HWidth" style="float: left;" >
+                                                <input type="text" class="layui-input" name="HWidth" id="HWidth" style="background-color: #efefef4d; float: left;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HWidth_New">鐢熶骇骞呭</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HWidth_New" lay-verify="HWidth_New" id="HWidth_New" value="0" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
 
                                         <!--<div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">鎴愬搧缂栧彿</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HProductNum" id="HProductNum" onmouseover="this.title=this.value">
-                    </div>
-                </div>-->
+                                            <label class="layui-form-label">鎴愬搧缂栧彿</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HProductNum" id="HProductNum" onmouseover="this.title=this.value">
+                                            </div>
+                                        </div>-->
                                     </div>
 
                                     <div class="layui-row">
                                         <!--<div class="layui-col-xs6 layui-inline">
-                    <label class="layui-form-label" style="width:12.5%">澶囨敞</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="width:610px;">
-                    </div>
-                </div>
-                <div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">鏃ヨ鍒掑伐鍗曢�夊崟鍙�</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HWorkBillSortNo" id="HWorkBillSortNo" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
-                        <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchWorkBillSort" id="btnSearchWorkBillSort" style="width: 40px;">
-                            <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                        </button>
-                    </div>
-                </div>-->
+        <label class="layui-form-label" style="width:12.5%">澶囨敞</label>
+        <div class="layui-input-inline">
+            <input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="width:610px;">
+        </div>
+    </div>
+    <div class="layui-col-xs3 layui-inline">
+        <label class="layui-form-label">鏃ヨ鍒掑伐鍗曢�夊崟鍙�</label>
+        <div class="layui-input-inline">
+            <input type="text" class="layui-input" name="HWorkBillSortNo" id="HWorkBillSortNo" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchWorkBillSort" id="btnSearchWorkBillSort" style="width: 40px;">
+                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+            </button>
+        </div>
+    </div>-->
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">杈呮暟閲�</label>
+                                            <label class="layui-form-label" id="BT_HAuxQty">杈呮暟閲�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HAuxQty" id="HAuxQty" style="float: left;" value="0">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鎷嗗垎鍙�</label>
+                                            <label class="layui-form-label" id="BT_HSplitNo">鎷嗗垎鍙�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HSplitNo" id="HSplitNo" style="float: left;" value="0">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鍒嗙几鍙�</label>
+                                            <label class="layui-form-label" id="BT_HSplitColorQty">鍒嗙几鍙�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HSplitColorQty" id="HSplitColorQty" style="float: left;" value="0">
                                             </div>
                                         </div>
-
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_HMouldNum">妯$┐鍙�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HMouldNum" id="HMouldNum" style="float: left;" value="">
+                                            </div>
+                                        </div>
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鎷嗗垎鎬婚噺</label>
+                                            <label class="layui-form-label" id="BT_HSplitSumQty">鎷嗗垎鎬婚噺</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HSplitSumQty" id="HSplitSumQty" style="float: left;" value="0">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">杈呭姪鍗曚綅</label>
+                                            <label class="layui-form-label" id="BT_HAuxUnitName">杈呭姪鍗曚綅</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HAuxUnitName" id="HAuxUnitName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
                                                 <input type="hidden" class="layui-input" name="HAuxUnit" id="HAuxUnit" value="0">
@@ -266,50 +301,89 @@
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">琛ユ枡鍘熷洜</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HExplanation" id="HExplanation" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value">
-                    </div>
-                </div>-->
-                                        <!--<div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">琛ユ枡鏍囪</label>
-                    <div class="layui-input-block">
-                        <input type="checkbox" name="HBLFlag" id="HBLFlag" lay-skin="primary" title="" checked="">
-                    </div>
-                </div>-->
-                                        <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鍏嬮噸</label>
+                                            <label class="layui-form-label">琛ユ枡鍘熷洜</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="HWeight" id="HWeight" style="float: left;">
+                                                <input type="text" class="layui-input" name="HExplanation" id="HExplanation" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value">
+                                            </div>
+                                        </div>-->
+                                        <!--<div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label">琛ユ枡鏍囪</label>
+                                            <div class="layui-input-block">
+                                                <input type="checkbox" name="HBLFlag" id="HBLFlag" lay-skin="primary" title="" checked="">
+                                            </div>
+                                        </div>-->
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_HWeight">鍏嬮噸</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HWeight" id="HWeight" style="float: left;background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
-                                        
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HWeight_New">鐢熶骇鍏嬮噸</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HWeight_New" lay-verify="HWeight_New" id="HWeight_New" value="0" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">涓氬姟鍛�</label>
+                                            <label class="layui-form-label" id="BT_HEmpName">涓氬姟鍛�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HEmpName" id="HEmpName" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
                                                 <input type="hidden" class="layui-input" name="HEmpID" id="HEmpID">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">瀹㈡埛</label>
+                                            <label class="layui-form-label" id="BT_HCusNames">瀹㈡埛</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HCusNames" id="HCusNames" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
                                                 <input type="hidden" class="layui-input" name="HCusID" id="HCusID">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label"> 鏉愭枡瑙勬牸</label>
+                                            <label class="layui-form-label" id="BT_HMaterModel"> 鏉愭枡瑙勬牸</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HMaterModel" id="HMaterModel" style="float: left;">
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_HMateOutBatchNo">鍘熸枡鎵规</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HMateOutBatchNo" id="HMateOutBatchNo">
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_HName">璁㈠崟绛夌骇</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HName" id="HName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+                                                <input type="hidden" class="layui-input" name="HOrderLevID" id="HOrderLevID" value="0">
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnOrderID" id="btnOrderID" style="width: 40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_HAuxQty2">杈呮暟閲�2</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HAuxQty2" id="HAuxQty2" style="float: left;" value="0">
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_HAuxUnitName2">杈呭姪鍗曚綅2</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HAuxUnitName2" id="HAuxUnitName2" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+                                                <input type="hidden" class="layui-input" name="HAuxUnit2" id="HAuxUnit2" value="0">
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHAuxUnit2" id="btnHAuxUnit2" style="width: 40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
                                             </div>
                                         </div>
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs6 layui-inline">
-                                            <label class="layui-form-label" style="width:12.5%">澶囨敞</label>
+                                            <label class="layui-form-label" style="width:12.5%" id="BT_HRemark">澶囨敞</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="width: 610px;">
                                             </div>
@@ -317,15 +391,21 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs6 layui-inline">
-                                            <label class="layui-form-label" style="width:12.5%">鐧藉澂瑕佹眰</label>
+                                            <label class="layui-form-label" style="width:12.5%" id="BT_HRemark2">鐧藉澂瑕佹眰</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="HRemark2" id="HRemark2" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="width: 610px;">
+                                                <input type="text" class="layui-input" name="HRemark2" id="HRemark2" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="width: 610px; background-color: #efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HRemark_New">鐢熶骇瑙勬牸</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HRemark_New" lay-verify="HRemark_New" id="HRemark_New" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs6 layui-inline">
-                                            <label class="layui-form-label" style="width:12.5%">搴曢儴澶囨敞</label>
+                                            <label class="layui-form-label" style="width:12.5%" id="BT_HRemark3">搴曢儴澶囨敞</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HRemark3" id="HRemark3" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="width: 610px;">
                                             </div>
@@ -338,19 +418,19 @@
                                 <div class="layui-form-item">
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">姣涢珮</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HHeight">姣涢珮</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HHeight" id="HHeight">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">瀵告暟缁勭粐</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HInches">瀵告暟缁勭粐</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HInches" id="HInches">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍏ㄦ瘺闀�</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HAl1Long">鍏ㄦ瘺闀�</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HAl1Long" id="HAl1Long">
                                             </div>
@@ -358,19 +438,19 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍧竷瀵嗗害</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HDensity">鍧竷瀵嗗害</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HDensity" id="HDensity">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">姣涚罕鍚嶇О鍙婅鏍�</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HTela">姣涚罕鍚嶇О鍙婅鏍�</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HTela" id="HTela">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">搴曚笣</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HUnderTela">搴曚笣</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HUnderTela" id="HUnderTela">
                                             </div>
@@ -378,13 +458,13 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">瀹氬瀷娴嗘枡</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HSizing">瀹氬瀷娴嗘枡</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HSizing" id="HSizing">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">浜よ揣鏃ユ湡</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HSellDate">浜よ揣鏃ユ湡</label>
                                             <div class="layui-input-inline">
                                                 <input type="date" class="layui-input" name="HSellDate" id="HSellDate" style="padding-left: 32px;">
                                             </div>
@@ -397,7 +477,7 @@
                                 <div class="layui-form-item">
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鐢熶骇杞﹂棿</label>
+                                            <label class="layui-form-label" id="BT_HWorkShopName">鐢熶骇杞﹂棿</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HWorkShopName" id="HWorkShopName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
                                                 <input type="hidden" name="HWorkShopID" id="HWorkShopID" value="0">
@@ -406,15 +486,15 @@
                                                 </button>
                                             </div>
                                         </div>
-                                        <div class="layui-col-xs3 layui-inline">
+                                        <!--<div class="layui-col-xs3 layui-inline">
                                             <label class="layui-form-label">椤圭洰缂栧彿</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HProjectNum" id="HProjectNum" style="background-color:#efefef4d;" readonly>
                                             </div>
-                                        </div>
+                                        </div>-->
 
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">濮斿鍔犲伐鍗曚綅</label>
+                                            <label class="layui-form-label"  id="BT_HSupName">濮斿鍔犲伐鍗曚綅</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HSupName" id="HSupName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
                                                 <input type="hidden" name="HSupID" id="HSupID" value="0">
@@ -424,7 +504,7 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">璁㈠崟璺熻釜鍙�</label>
+                                            <label class="layui-form-label" id="BT_HOrderProcNO">璁㈠崟璺熻釜鍙�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly>
                                             </div>
@@ -432,7 +512,7 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">瀛愪欢鍚嶇О</label>
+                                            <label class="layui-form-label" id="BT_HMaterName">瀛愪欢鍚嶇О</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
                                                 <input type="hidden" name="HMaterID" id="HMaterID" value="0">
@@ -442,19 +522,19 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">瀛愪欢浠g爜</label>
+                                            <label class="layui-form-label" id="BT_HMaterNumber">瀛愪欢浠g爜</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">瀛愪欢瑙勬牸</label>
+                                            <label class="layui-form-label" id="BT_HMaterModel1">瀛愪欢瑙勬牸</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HMaterModel1" id="HMaterModel1" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鍥惧彿鐗堟湰</label>
+                                            <label class="layui-form-label" id="BT_HPicNumVer">鍥惧彿鐗堟湰</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HPicNumVer" id="HPicNumVer" style="background-color:#efefef4d;" readonly>
                                             </div>
@@ -462,26 +542,26 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鍗曚綅浠g爜</label>
+                                            <label class="layui-form-label" id="BT_HUnitNumber">鍗曚綅浠g爜</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HUnitNumber" id="HUnitNumber" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">涓昏鏉愭枡</label>
+                                            <label class="layui-form-label" id="BT_HMainMaterID">涓昏鏉愭枡</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HMainMaterID" id="HMainMaterID" value="0" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鐢熶骇鏁伴噺</label>
+                                            <label class="layui-form-label" id="BT_HPlanQty">鐢熶骇鏁伴噺</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HPlanQty" id="HPlanQty" value="0" style=" background-color: #efefef4d; width: 90px; float: left; margin-right: 4px;" readonly>
                                                 <input type="text" class="layui-input" name="HprocExQty" id="HprocExQty" style="background-color:#efefef4d; width: 90px;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鎬昏鍥惧彿</label>
+                                            <label class="layui-form-label" id="BT_HPicNumAssemble">鎬昏鍥惧彿</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HPicNumAssemble" id="HPicNumAssemble" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
                                             </div>
@@ -489,61 +569,56 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鍏抽敭鏉愭枡</label>
+                                            <label class="layui-form-label" id="BT_HKeyMaterID">鍏抽敭鏉愭枡</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HKeyMaterID" id="HKeyMaterID" value="0" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">HICMOEntryID</label>
+                                            <label class="layui-form-label" id="BT_HICMOEntryID">HICMOEntryID</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HICMOEntryID" id="HICMOEntryID" value="0" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
+                                       
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鍘熸枡鎵规</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="HMateOutBatchNo" id="HMateOutBatchNo" style="background-color:#efefef4d;" readonly>
-                                            </div>
-                                        </div>
-                                        <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鏉愯川</label>
+                                            <label class="layui-form-label" id="BT_HMaterTexture">鏉愯川</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HMaterTexture" id="HMaterTexture">
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">娴佽浆鍗$被鍨�</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HWorkTypeName" id="HWorkTypeName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
-                        <input type="hidden" name="HWorkTypeID" id="HWorkTypeID" value="0">
-                        <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHWorkType" id="btnSearchHWorkType" style="width: 40px;">
-                            <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                        </button>
-                    </div>
-                </div>-->
+                                            <label class="layui-form-label">娴佽浆鍗$被鍨�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HWorkTypeName" id="HWorkTypeName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+                                                <input type="hidden" name="HWorkTypeID" id="HWorkTypeID" value="0">
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHWorkType" id="btnSearchHWorkType" style="width: 40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>-->
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鐗堟湰</label>
+                                            <label class="layui-form-label" id="BT_HVerNum">鐗堟湰</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HVerNum" id="HVerNum" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">鐗堟湰</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HVerNum" id="HVerNum" style="background-color:#efefef4d;" readonly>
-                    </div>
-                </div>
-                <div class="layui-col-xs3 layui-inline">
-                    <label class="layui-form-label">鐗堟湰</label>
-                    <div class="layui-input-inline">
-                        <input type="text" class="layui-input" name="HVerNum" id="HVerNum" style="background-color:#efefef4d;" readonly>
-                    </div>
-                </div>-->
+                                            <label class="layui-form-label">鐗堟湰</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HVerNum" id="HVerNum" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鑺綋鐗╂枡浠g爜</label>
+                                            <label class="layui-form-label">鐗堟湰</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HVerNum" id="HVerNum" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>-->
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label" id="BT_HXTNumber">鑺綋鐗╂枡浠g爜</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HXTNumber" id="HXTNumber">
                                             </div>
@@ -552,25 +627,25 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">璁″垝寮�宸ユ棩鏈�</label>
+                                            <label class="layui-form-label" id="BT_HPlanBeginDate">璁″垝寮�宸ユ棩鏈�</label>
                                             <div class="layui-input-inline">
                                                 <input type="date" class="layui-input" name="HPlanBeginDate" id="HPlanBeginDate" style="padding-left: 32px;">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">璁″垝瀹屽伐鏃ユ湡</label>
+                                            <label class="layui-form-label" id="BT_HPlanEndDate">璁″垝瀹屽伐鏃ユ湡</label>
                                             <div class="layui-input-inline">
                                                 <input type="date" class="layui-input" name="HPlanEndDate" id="HPlanEndDate" style="padding-left: 32px;">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">琛ユ枡鍘熷洜</label>
+                                            <label class="layui-form-label" id="BT_HExplanation">琛ユ枡鍘熷洜</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HExplanation" id="HExplanation" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鑺綋瑙勬牸鍨嬪彿</label>
+                                            <label class="layui-form-label" id="BT_HXTModel">鑺綋瑙勬牸鍨嬪彿</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HXTModel" id="HXTModel">
                                             </div>
@@ -578,7 +653,7 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">妯″叿璁惧</label>
+                                            <label class="layui-form-label" id="BT_HEquipMentName">妯″叿璁惧</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HEquipMentName" id="HEquipMentName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
                                                 <input type="hidden" name="HEquipMentID" id="HEquipMentID" value="0">
@@ -587,10 +662,10 @@
                                                 </button>
                                             </div>
                                         </div>
-                                       
+
 
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">鏃ヨ鍒掑伐鍗曢�夊崟鍙�</label>
+                                            <label class="layui-form-label" id="BT_HWorkBillSortNo">鏃ヨ鍒掑伐鍗曢�夊崟鍙�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HWorkBillSortNo" id="HWorkBillSortNo" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
                                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchWorkBillSort" id="btnSearchWorkBillSort" style="width: 40px;">
@@ -599,7 +674,7 @@
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3 layui-inline">
-                                            <label class="layui-form-label">琛ユ枡鏍囪</label>
+                                            <label class="layui-form-label" id="BT_isHBLFlag">琛ユ枡鏍囪</label>
                                             <div class="layui-input-inline">
                                                 <input type="checkbox" name="isHBLFlag" id="isHBLFlag" value="false" lay-skin="primary" lay-filter="isHBLFlag">
                                                 <input type="hidden" name="HBLFlag" id="HBLFlag" value="false" lay-skin="primary" lay-filter="HBLFlag">
@@ -608,21 +683,27 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs6 layui-inline">
-                                            <label class="layui-form-label" style="width:12.5%">婧愬崟瀹㈡埛浠g爜</label>
+                                            <label class="layui-form-label" style="width:12.5%" id="BT_HCusNumber">婧愬崟瀹㈡埛浠g爜</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HCusNumber" id="HCusNumber" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="width:610px;">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs6 layui-inline">
-                                            <label class="layui-form-label" style="width:12.5%">鍖呰鏍囪瘑</label>
+                                            <label class="layui-form-label" style="width:12.5%" id="BT_HPickLabel">鍖呰鏍囪瘑</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HPickLabel" id="HPickLabel" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="width:610px;">
                                             </div>
                                         </div>
                                         <div class="layui-col-xs6 layui-inline">
-                                            <label class="layui-form-label" style="width:12.5%">鍖呰鏍囪瘑缂栫爜</label>
+                                            <label class="layui-form-label" style="width:12.5%" id="BT_HPickLabelNumber">鍖呰鏍囪瘑缂栫爜</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HPickLabelNumber" id="HPickLabelNumber" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="width:610px;">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HPlanOrderProcNo">璁㈠崟璺熻釜鍙�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HPlanOrderProcNo" id="HPlanOrderProcNo" value="" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
                                     </div>
@@ -633,21 +714,21 @@
                                 <div class="layui-form-item">
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">浜у搧CODE</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HProdMaterCode">浜у搧CODE</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HProdMaterCode" id="HProdMaterCode">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">閿�鍞鍗曞彿</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HSeOrderBillNo">閿�鍞鍗曞彿</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HSeOrderBillNo" id="HSeOrderBillNo">
                                                 <!--<input type="hidden" class="layui-input" name="HSeOrderEntryID" id="HSeOrderEntryID">
-                        <input type="hidden" class="layui-input" name="HSeOrderInterID" id="HSeOrderInterID">-->
+                                                <input type="hidden" class="layui-input" name="HSeOrderInterID" id="HSeOrderInterID">-->
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">瀹㈡埛绠�绉�</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HCusShortName">瀹㈡埛绠�绉�</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HCusShortName" id="HCusShortName">
                                             </div>
@@ -655,19 +736,19 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 115px;padding: 9px 0px;">瀹㈡埛瑕佹眰鏉愭枡鎴愬垎</label>
+                                            <label class="layui-form-label" style="width: 115px;padding: 9px 0px;" id="BT_HCusNeedMaterial">瀹㈡埛瑕佹眰鏉愭枡鎴愬垎</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HCusNeedMaterial" id="HCusNeedMaterial">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">棰勮鍑鸿揣鏃ユ湡</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HPlanSendGoodsDate">棰勮鍑鸿揣鏃ユ湡</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="date" class="layui-input" name="HPlanSendGoodsDate" id="HPlanSendGoodsDate" style="padding-left: 32px;">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">浜у搧鍚嶇О</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HProdMaterName">浜у搧鍚嶇О</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HProdMaterName" id="HProdMaterName">
                                             </div>
@@ -675,19 +756,19 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">瀹㈡埛鍚嶇О</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HCusName">瀹㈡埛鍚嶇О</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HCusName" id="HCusName">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鐢熶骇澶囨敞</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HWorkRemark">鐢熶骇澶囨敞</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HWorkRemark" id="HWorkRemark">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">閲嶈鎻愮ず</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HImportNote">閲嶈鎻愮ず</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HImportNote" id="HImportNote">
                                             </div>
@@ -695,19 +776,19 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍘熸潗鏂欑紪鍙稟</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMaterNumber_A">鍘熸潗鏂欑紪鍙稟</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HMaterNumber_A" id="HMaterNumber_A">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍘熸潗鏂欑紪鍙稡</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMaterNumber_B">鍘熸潗鏂欑紪鍙稡</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HMaterNumber_B" id="HMaterNumber_B">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍘熸潗鏂欑紪鍙稢</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMaterNumber_C">鍘熸潗鏂欑紪鍙稢</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HMaterNumber_C" id="HMaterNumber_C">
                                             </div>
@@ -715,19 +796,19 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍘熸潗鏂欑紪鍙稤</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMaterNumber_D">鍘熸潗鏂欑紪鍙稤</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HMaterNumber_D" id="HMaterNumber_D">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鐢熶骇绫诲瀷</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HProdType">鐢熶骇绫诲瀷</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HProdType" id="HProdType">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍘熸潗鏂欑畝绉�</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMaterShortName">鍘熸潗鏂欑畝绉�</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HMaterShortName" id="HMaterShortName">
                                             </div>
@@ -735,19 +816,19 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍘熸潗鏂欏唴鐮丄</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMaterIDA">鍘熸潗鏂欏唴鐮丄</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HMaterIDA" id="HMaterIDA">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍘熸潗鏂欏唴鐮丅</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMaterIDB">鍘熸潗鏂欏唴鐮丅</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HMaterIDB" id="HMaterIDB">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍘熸潗鏂欏唴鐮丆</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMaterIDC">鍘熸潗鏂欏唴鐮丆</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HMaterIDC" id="HMaterIDC">
                                             </div>
@@ -755,7 +836,7 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍘熸潗鏂欏唴鐮丏</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMaterIDD">鍘熸潗鏂欏唴鐮丏</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HMaterIDD" id="HMaterIDD">
                                             </div>
@@ -768,19 +849,19 @@
                                 <div class="layui-form-item">
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍒跺崟浜�</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMaker">鍒跺崟浜�</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>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HChecker">瀹℃牳浜�</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 class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍏抽棴浜�</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HCloseMan">鍏抽棴浜�</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>
@@ -788,19 +869,19 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍒跺崟鏃ユ湡</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HMakeDate">鍒跺崟鏃ユ湡</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>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HCheckDate">瀹℃牳鏃ユ湡</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 class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HCloseDate">鍏抽棴鏃ユ湡</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>
@@ -808,13 +889,13 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">淇敼浜�</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HUpDater">淇敼浜�</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>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HDeleteMan">浣滃簾浜�</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>
@@ -822,13 +903,13 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">淇敼鏃ユ湡</label>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HUpDateDate">淇敼鏃ユ湡</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>
+                                            <label class="layui-form-label" style="width: 85px;" id="BT_HDeleteDate">浣滃簾鏃ユ湡</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>
@@ -863,8 +944,8 @@
 
                     <script type="text/html" id="toolbarDemo">
                         <div class="layui-btn-container">
-                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
-                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine" id="BT_AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine" id="BT_CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
                         </div>
                     </script>
                     <input id="HItemID" name="HItemID" type="hidden" />
@@ -887,6 +968,14 @@
             <option value="true">鏄�</option>
         </select>
     </script>
+
+    <!--澶嶉�夋 SN杩囩珯鎺у埗-->
+    <script type="text/html" id="HSNCtrl">
+        <div class="layui-input-block" style="margin-left: 20px;">
+            <input type="checkbox" name="HSNCtrl" lay-filter="HSNCtrl" id="HSNCtrl{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+        </div>
+    </script>
+
     <script>
 
         layui.config({
@@ -923,10 +1012,18 @@
                 var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
                 var linterid = params[params[1]];//婧愬崟id
                 var HEntryID = params[params[2]];//婧愬崟瀛恑d
-                var HSouceBillType = params[params[3]];//婧愬崟绫诲瀷  鍦ㄧ被鍨� 5 宸ュ簭id 
+                var HSouceBillType = params[params[3]];//婧愬崟绫诲瀷  鍦ㄧ被鍨� 5 宸ュ簭id
+                var HproID = params[params[4]];//婧愬崟绫诲瀷  鍦ㄧ被鍨� 5 宸ュ簭id
             }
 
             //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+            //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            var HModuleType = "3772";
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
+            $("h1").html('<b>' + HPageTitle + '</b>');
+            //#endregion
 
             $("#HPlanBeginDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
             $("#HPlanEndDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
@@ -938,9 +1035,9 @@
             DisPlay_HideColumn();
 
             //鍒ゆ柇鎿嶄綔绫诲瀷
-            if (OperationType == 1 ) {//鏃犳簮鍗曟柊澧�   
+            if (OperationType == 1 ) {//鏃犳簮鍗曟柊澧�
                 $.ajax({
-                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    url: GetWEBURL() + "/Web/GetMAXNumPDA",
                     type: "GET",
                     data: { "HBillType": '3772' },
                     success: function (d) {
@@ -957,9 +1054,10 @@
                     "HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
                     "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
                     "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
-                    "HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
+                    "HQty": 0, "HSNCtrl": false, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
                     "HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
-                    "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
+                    "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": "",
+                    "HRoutingBillMainID": 0, "HRoutingBillEntryID": 0
                 }];
                 table.render(option);
             }
@@ -978,7 +1076,7 @@
                             layer.alert(result.Message, { icon: 5 });
                         } else {
                             $.ajax({
-                                url: GetWEBURL() + "/Web/GetMAXNum",
+                                url: GetWEBURL() + "/Web/GetMAXNumPDA",
                                 type: "GET",
                                 data: { "HBillType": '3772' },
                                 success: function (d) {
@@ -1010,9 +1108,10 @@
                                 "HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
                                 "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
                                 "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
-                                "HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
+                                "HQty": 0, "HSNCtrl": false, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
                                 "HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
-                                "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
+                                "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": "",
+                                "HRoutingBillMainID": 0, "HRoutingBillEntryID": 0
                             }];
                             table.render(option);
                         }
@@ -1022,10 +1121,11 @@
             }
             else if (OperationType == 3) {//缂栬緫
                 $("#HItemID").val(linterid);//淇敼鏃朵富琛↖D
+                $("#btnRoutingBill").addClass("layui-btn-disabled").attr("disabled", true);
                 set_EditFromGrid();
 
             }
-            else if (OperationType == 4) {//澶嶅埗 
+            else if (OperationType == 4) {//澶嶅埗
                 set_EditFromGrid();
                 $.ajax({
                     url: GetWEBURL() + "/Web/GetMAXNum",
@@ -1044,9 +1144,11 @@
             else if (OperationType == 5) {//5 鏂板瀛愭祦杞崱
                 $("#HMainSourceInterID").val(linterid);
                 $("#HMainSourceEntryID").val(HEntryID);
+                $("#btnRoutingBill").addClass("layui-btn-disabled").attr("disabled", true);
+
                 set_EditForm(linterid);
-               
-                var sWhere = "and HMaterID=" + btnHMaterID + " and HOrgID = " + sessionStorage["OrganizationID"] + " and HMainProcID=" + HSouceBillType;
+
+                var sWhere = "and HMaterID=" + btnHMaterID + " and HOrgID = " + sessionStorage["OrganizationID"] + " and HMainProcID=" + HproID +" and 榛樿宸ヨ壓='1'";
                 getRoutingBillList(sWhere);
                 $.ajax({
                     url: GetWEBURL() + "/Web/GetMAXNum",
@@ -1054,9 +1156,9 @@
                     async: false,
                     data: { "HBillType": '3772' },
                     success: function (d) {
-                        //console.log(d.data);
+                        var HBillNo = d.data[0].HBillNo.replace('GXLX', 'ZYK0');
                         $("#HInterID").val(d.data[0].HInterID);
-                        $("#HBillNo").val(d.data[0].HBillNo);
+                        $("#HBillNo").val(HBillNo);
                         $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
                         $("#HMaker").val(sessionStorage["HUserName"]);
                     }
@@ -1065,6 +1167,9 @@
             else {
                 layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
             }
+
+
+            initFunction(1,HModName, sessionStorage["HTranSlate"]);
             //#endregion
 
 
@@ -1073,7 +1178,7 @@
                 //琛ㄥご
                 columns = [ //琛ㄥご
                     { type: 'checkbox', totalRowText: '鍚堣琛�' }
-                    , { type: 'numbers', title: '搴忓彿', totalRow: true }
+                    , { type: 'numbers', title: '搴忓彿'}
                     , { field: 'HProcNo', title: '娴佹按鍙�', edit: 'text' }
                     , { field: 'HProcID', title: '宸ュ簭ID', hide: true }
                     , { field: 'HProcNumber', title: '宸ュ簭浠g爜', edit: 'text', event: "HProcCheck" }
@@ -1087,8 +1192,10 @@
                     , { field: 'HSupNumber', title: '渚涘簲鍟嗕唬鐮�', edit: 'text', event: "HSupCheck" }
                     , { field: 'HSupName', title: '渚涘簲鍟�' }
                     , { field: 'HSupFlag', title: '鏄惁濮斿', templet: '#HSupFlag' }
-                    , { field: 'HQty', title: '娴佽浆鍗℃暟閲�', edit: 'text' }
-
+                    , { field: 'HQty', title: '娴佽浆鍗℃暟閲�', totalRow: true, edit: 'text', width:120 }
+                    , { field: 'HSNCtrl', title: 'SN杩囩珯鎺у埗', templet: "#HSNCtrl", width: 120  }
+                    , { field: 'HRoutingBillMainID', title: '宸ヨ壓璺嚎ID', hide: true }
+                    , { field: 'HRoutingBillEntryID', title: '宸ヨ壓璺嚎瀛怚D', hide: true }
                     //, { field: 'HWorkRemark', title: '鍔犲伐璇存槑', edit: 'text' }
                     //, { field: 'HDeptID', title: '閮ㄩ棬ID', hide: true }
                     //, { field: 'HDeptNumber', title: '閮ㄩ棬浠g爜', edit: 'text', event: "HDeptCheck" }
@@ -1112,6 +1219,7 @@
                     , toolbar: '#toolbarDemo'
                     , page: false
                     //, cellMinWidth: 120
+                    , totalRow: true
                     , height: 400
                     , cols: [columns]
                     , limit: Number.MAX_VALUE//榛樿鏄剧ず鍏ㄩ儴
@@ -1147,9 +1255,10 @@
                     "HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
                     "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
                     "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
-                    "HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
+                    "HQty": 0, "HSNCtrl": false, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
                     "HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
-                    "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
+                    "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": "",
+                    "HRoutingBillMainID": 0, "HRoutingBillEntryID": 0
                 };
                 switch (obj.event) {
                     case 'btn-AddLine':
@@ -1158,16 +1267,22 @@
                         table.render(option);
                         for (var i = 1; i <= option.data.length; i++) {
                             $('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true);
+
+                            //SN杩囩珯鎺у埗
+                            if (option.data[i - 1].HSNCtrl) {
+                                $('#HSNCtrl' + i + '').attr("checked", true);
+                            }
                         }
                         form.render('select');
+                        form.render('checkbox');
                         break;
                     case 'btn-CopyLine':
                         var copydata = JSON.stringify(data);
                         if (data.length <= 0) {
-                            layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                            layer.msg(get_MessageError("[0000-2-001]璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒", sessionStorage["HTranSlate"]));
                         }
                         else if (data.length > 1) {
-                            layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                            layer.msg(get_MessageError("[0000-2-002]鍙兘閫夋嫨澶嶅埗涓�琛岋紒", sessionStorage["HTranSlate"]));
                         }
                         else {
                             var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
@@ -1177,11 +1292,19 @@
                             table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
                             for (var i = 1; i <= option.data.length; i++) {
                                 $('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true);
+
+                                //SN杩囩珯鎺у埗
+                                if (option.data[i - 1].HSNCtrl) {
+                                    $('#HSNCtrl' + i + '').attr("checked", true);
+                                }
+
                             }
                             form.render('select');
+                            form.render('checkbox');
                         }
                         break;
                 }
+                initFunction(1,HModName, sessionStorage["HTranSlate"]);
             });
 
             //琛屽唴浜嬩欢
@@ -1189,9 +1312,9 @@
                 var data = obj.data;
                 var rowIndex = $(obj.tr).attr("data-index");
                 if (obj.event === 'del') {
-                    layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+                    layer.confirm(get_MessageError('[0000-1-003]鐪熺殑鍒犻櫎琛屽悧锛�', sessionStorage["HTranSlate"]), function (index) {
                         if (rowIndex === '0') {
-                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                            layer.msg(get_MessageError('[0000-2-003]棣栬鏃犳硶鍒犻櫎锛侊紒锛�', sessionStorage["HTranSlate"]));
                         } else {
                             obj.del();
                             option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
@@ -1212,20 +1335,20 @@
                                 shift: 2,
                                 area: ['90%', '90%'],
                                 maxmin: true,
-                                content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_ProcList.html', 'yes'],
+                                content: ['../../../views/鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html', 'yes'],
                                 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('璇烽�夋嫨鏁版嵁');
-                                    }                                   
+                                        return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
+                                    }
                                     obj.update({
-                                        HProcName: checkStatus.data[0].宸ュ簭
+                                        HProcName: checkStatus.data[0].宸ュ簭鍚嶇О
                                         , HProcID: checkStatus.data[0].HItemID
                                         , HProcNumber: checkStatus.data[0].宸ュ簭浠g爜
-                                        , HCenterID: checkStatus.data[0].宸ヤ綔涓績ID
+                                        , HCenterID: checkStatus.data[0].HWorkCenterID
                                         , HCenterNumber: checkStatus.data[0].宸ヤ綔涓績浠g爜
                                         , HCenterName: checkStatus.data[0].宸ヤ綔涓績
                                         //, HDeptID: checkStatus.data[0].閮ㄩ棬ID
@@ -1251,17 +1374,17 @@
                                 shift: 2,
                                 area: ['90%', '90%'],
                                 maxmin: true,
-                                content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WorkCenterList.html', 'yes'],
+                                content: ['../../../views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_WorkCenter.html', 'yes'],
                                 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('璇烽�夋嫨鏁版嵁');
+                                        return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                                     }
                                     obj.update({
-                                        HCenterName: checkStatus.data[0].宸ヤ綔涓績
+                                        HCenterName: checkStatus.data[0].宸ヤ綔涓績鍚嶇О
                                         , HCenterID: checkStatus.data[0].HItemID
                                         , HCenterNumber: checkStatus.data[0].宸ヤ綔涓績浠g爜
                                     });
@@ -1290,7 +1413,7 @@
                                     var iframeWindow = window['layui-layer-iframe' + index];
                                     var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
                                     if (checkStatus.data.length === 0) {
-                                        return layer.msg('璇烽�夋嫨鏁版嵁');
+                                        return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                                     }
                                     obj.update({
                                         HSupName: checkStatus.data[0].渚涘簲鍟嗗悕绉�
@@ -1322,7 +1445,7 @@
                                     var iframeWindow = window['layui-layer-iframe' + index];
                                     var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
                                     if (checkStatus.data.length === 0) {
-                                        return layer.msg('璇烽�夋嫨鏁版嵁');
+                                        return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                                     }
                                     obj.update({
                                         HDeptName: checkStatus.data[0].閮ㄩ棬鍚嶇О
@@ -1365,18 +1488,41 @@
                 }
             });
 
-            $("#HQty").on("input", function (e) {
-                //鑾峰彇input杈撳叆鐨勫��
-                if (parseInt(e.delegateTarget.value)> parseInt($("#HPlanQty").val())) {
-                    return layer.msg("鎷嗗垎鏁伴噺涓嶈兘瓒呰繃鍙媶鍒嗘暟閲�!");
-                }
-                else {
-                    for (var i = 0; i < option.data.length; i++) {
-                        option.data[i]["HQty"] = e.delegateTarget.value;
+            $(document).ready(function () {
+                var currentValue = $("#HQty").val();                             // 瀛樺偍褰撳墠鍊肩殑鍙橀噺
+
+                $("#HQty").on("input", function (e) {
+                    var previousValue = currentValue; // 鍙樻洿鍓嶇殑鍊�
+                    currentValue = $(this).val(); // 鏇存柊褰撳墠鍊�
+
+                    //鑾峰彇input杈撳叆鐨勫��
+                    if (parseInt(e.delegateTarget.value) > parseInt($("#HPlanQty").val())) {
+                        $("#HQty").val(previousValue);
+                        currentValue = previousValue;
+                        return layer.msg(get_MessageError("[3772-2-004]鎷嗗垎鏁伴噺涓嶈兘瓒呰繃鍙媶鍒嗘暟閲�!", sessionStorage["HTranSlate"]));
                     }
-                }
-                table.render(option);
+                    else {
+                        for (var i = 0; i < option.data.length; i++) {
+                            option.data[i]["HQty"] = e.delegateTarget.value;
+                        }
+                    }
+                    table.render(option);
+
+                    for (var i = 0; i < option.data.length; i++) {
+                        $('#HSupFlag' + (i + 1)).find("option[value='" + (option.data[i].HSupFlag == "false" ? "false" : "true") + "']").attr("selected", true);
+
+                        if (option.data[i].HSNCtrl.toString() == "true") {
+                            $('#HSNCtrl' + (i + 1)).attr("checked", true);
+                        }
+                    }
+
+                    form.render('select');
+                    form.render('checkbox');
+
+                });
             });
+
+            
 
             //鐩戝惉鍗曞厓鏍肩紪杈�  鍗曞厓鏍肩紪杈戝悗 鍙樻洿
             table.on('edit(mainTable)', function (obj) {
@@ -1413,6 +1559,16 @@
                 get_btnHAuxUnit();
             });
 
+            //閫夋嫨杈呭姪鍗曚綅2鎸夐挳
+            form.on('submit(btnHAuxUnit2)', function () {
+                get_btnHAuxUnit2();
+            });
+
+            //閫夋嫨璁㈠崟绛夌骇鎸夐挳
+            form.on('submit(btnOrderID)', function () {
+                get_btnOrderID();
+            });
+
             //閫夋嫨浜у搧寮圭獥
             form.on('submit(btnSearchMater2)', function () {//浜у搧
                 layer.open({
@@ -1430,7 +1586,7 @@
                         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('璇烽�夋嫨鏁版嵁');
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                         }
                         $("#HMaterName2").val(checkStatus.data[0].HName);
                         $("#HMaterID2").val(checkStatus.data[0].HItemID);
@@ -1448,7 +1604,6 @@
                     }
                 })
             });
-
             //鎵撳嵃
             form.on('submit(btn_print)', function () {//浜у搧
 
@@ -1457,7 +1612,7 @@
                 $.ajax({
                     url: GetWEBURL() + '/LEMS/MES_Sc_ProcessExchangeBillQuery_Json',
                     type: "GET",
-                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "HBillSubType": HSouceBillType},
                     success: function (data1) {
                         if (data1.count == 1) {
                             var hinterid = "";
@@ -1495,22 +1650,22 @@
                                         }
                                     }, error: function () {
                                         layer.close(ajaxLoad);
-                                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                        layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
                                     }
                                 })
 
                             } else {
-                                layer.msg("璇峰厛淇濆瓨,鍦ㄨ繘琛屾墦鍗�!");
+                                layer.msg(get_MessageError("[3772-2-005]璇峰厛淇濆瓨,鍦ㄨ繘琛屾墦鍗�!", sessionStorage["HTranSlate"]));
                             }
                         } else {
                             layer.close(ajaxLoad);
                         }
                     }, error: function () {
                         layer.close(ajaxLoad);
-                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
                     }
                 });
-               
+
             });
 
             //閫夋嫨瀛愪欢寮圭獥PartInformation.html
@@ -1524,7 +1679,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../PublicPage/PartInformation.html', 'yes'],
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html', 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -1532,11 +1687,11 @@
                         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('璇烽�夋嫨鏁版嵁');
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                         }
-                        $("#HMaterModel1").val(checkStatus.data[0].HModel);
-                        $("#HMaterNumber").val(checkStatus.data[0].HNumber);
-                        $("#HMaterName").val(checkStatus.data[0].HName);
+                        $("#HMaterModel1").val(checkStatus.data[0].瑙勬牸鍨嬪彿);
+                        $("#HMaterNumber").val(checkStatus.data[0].鐗╂枡浠g爜);
+                        $("#HMaterName").val(checkStatus.data[0].鐗╂枡鍚嶇О);
                         $("#HMaterID").val(checkStatus.data[0].HItemID);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -1564,7 +1719,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../PublicPage/EqpInformation.html', 'yes'],
+                    content: ['../../璁惧绠$悊/璁惧妗f/Gy_EquipFileMainList.html', 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -1572,10 +1727,10 @@
                         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('璇烽�夋嫨鏁版嵁');
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                         }
-                        $("#HEquipMentName").val(checkStatus.data[0].HName);
-                        $("#HEquipMentID").val(checkStatus.data[0].HInterID);
+                        $("#HEquipMentName").val(checkStatus.data[0].璁惧鍚嶇О);
+                        $("#HEquipMentID").val(checkStatus.data[0].hmainid);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
                     , btn2: function (index, layero) {
@@ -1607,7 +1762,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../PublicPage/DeptInformation.html', 'yes'],
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -1615,9 +1770,9 @@
                         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('璇烽�夋嫨鏁版嵁');
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                         }
-                        $("#HWorkShopName").val(checkStatus.data[0].HName);
+                        $("#HWorkShopName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О);
                         $("#HWorkShopID").val(checkStatus.data[0].HItemID);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -1645,7 +1800,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../PublicPage/SupplierInformation.html', 'yes'],
+                    content: ['../../鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html', 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -1653,9 +1808,9 @@
                         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('璇烽�夋嫨鏁版嵁');
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                         }
-                        $("#HSupName").val(checkStatus.data[0].HName);
+                        $("#HSupName").val(checkStatus.data[0].渚涘簲鍟嗗悕绉�);
                         $("#HSupID").val(checkStatus.data[0].HItemID);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -1686,7 +1841,7 @@
                         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('璇烽�夋嫨鏁版嵁');
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                         }
 
                         GetICMOBillValue(checkStatus.data[0].hmainid, checkStatus.data[0].HEntryID)
@@ -1710,7 +1865,7 @@
                         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('璇烽�夋嫨鏁版嵁');
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                         }
                         $("#HWorkBillSortNo").val(checkStatus.data[0].鍗曟嵁鍙�);
                         GetICMOBillValue(checkStatus.data[0].婧愬崟涓诲唴鐮�, checkStatus.data[0].婧愬崟瀛愬唴鐮�)
@@ -1722,19 +1877,23 @@
 
             //閫夋嫨宸ヨ壓璺嚎
             form.on('submit(btnRoutingBill)', function () {
+                var HProID = 0;
+                if (OperationType == 5) {
+                    HProID = HproID;
+                }
                 layer.open({
                     type: 2//寮圭獥绫诲瀷
                     , skin: 'layui-layer-rim' //鍔犱笂杈规
                     , area: ['90%', '70%']//澶у皬
                     , title: '宸ヨ壓璺嚎鍒楄〃'//鏍囬
                     , shift: 2//寮瑰嚭鍔ㄧ敾
-                    , content: ['../../Baseset/鍩虹璧勬枡/Gy_RoutingBillList.html?HMaterID=' + btnHMaterID, 'yes']
+                    , content: ['../../璁″垝绠$悊/宸ヨ壓璺嚎/Gy_RoutingBillList.html?HMaterID=' + btnHMaterID + '&HProID=' + HProID, '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('璇烽�夋嫨鏁版嵁');
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                         }
                         getRoutingBill(checkStatus.data[0].鍗曟嵁鍙�);
 
@@ -1745,39 +1904,54 @@
             });
 
             function getRoutingBill(HBillNo) {
+                var HRoutType = "";
+                if (HSouceBillType == "3772") {
+                    HRoutType = "3301";
+                } else {
+                    HRoutType = "SUB";
+                }
                 $.ajax({
                     type: "get",
-                    url: GetWEBURL() + "LEMS/MES_Gy_RoutingBillList_Json",
+                    url: GetWEBURL() + "/LEMS/MES_Gy_RoutingBillList_Json",
                     async: true,
-                    data: { "sWhere": " and 鍗曟嵁鍙�='" + HBillNo + "'" + " and 宸ュ簭浠g爜 !='" + 9999 + "'", "user": sessionStorage["HUserName"] },
+                    data: { "sWhere": " and 鍗曟嵁鍙�='" + HBillNo + "'" + " and 宸ュ簭浠g爜 !='" + 9999 + "'", "user": sessionStorage["HUserName"], "HBillSubType": HRoutType },
                     success: function (result) {
                         var data = result.data;
-                            var Tablerow = [];
+                        var Tablerow = [];
 
-                            $("#RoutingBill").val(data[0].鍗曟嵁鍙�)
-                            $("#HRoutingBillID").val(data[0].hmainid)
+                        if (result.data.length == 0) {
+                            return layer.msg(get_MessageError("[3772-2-006]璇风粦瀹氬搴旂殑宸ヨ壓璺嚎!", sessionStorage["HTranSlate"]));
+                        }
 
-                            for (var i = 0; i < data.length; i++) {
-                                Tablerow.push({
-                                    "HProcNo": data[i].宸ュ簭鍙�, "HProcID": data[i].hprocid, "HProcNumber": data[i].宸ュ簭浠g爜, "HProcName": data[i].宸ュ簭, "HWorkRemark": data[i].琛ㄤ綋澶囨敞,
-                                    "HCenterID": data[i].HCenterID, "HCenterNumber": data[i].宸ヤ綔涓績浠g爜, "HCenterName": data[i].宸ヤ綔涓績鍚嶇О,
-                                    "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
-                                    "HSupID": data[i].HSupID, "HSupNumber": data[i].渚涘簲鍟嗕唬鐮�, "HSupName": data[i].渚涘簲鍟�, "HSupFlag": data[i].濮斿鏍囪 == 0 ? "false" : "true",
-                                    "HQty": HLZQty, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
-                                    "HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
-                                    "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": data[i].宸ヨ壓鍙傛暟, "HPicNum": data[i].鍥剧焊缂栧彿, "HProcCheckNote": data[i].鏈伐搴忕‘璁よ褰�,
-                                    "HRelationQty_OutBad":"0"
-                                });
+                        $("#RoutingBill").val(data[0].鍗曟嵁鍙�)
+                        $("#HRoutingBillID").val(data[0].hmainid)
+
+                        for (var i = 0; i < data.length; i++) {
+                            Tablerow.push({
+                                "HProcNo": data[i].宸ュ簭鍙�, "HProcID": data[i].HProcID, "HProcNumber": data[i].宸ュ簭浠g爜, "HProcName": data[i].宸ュ簭, "HWorkRemark": data[i].琛ㄤ綋澶囨敞,
+                                "HCenterID": data[i].HCenterID, "HCenterNumber": data[i].宸ヤ綔涓績浠g爜, "HCenterName": data[i].宸ヤ綔涓績鍚嶇О,
+                                "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
+                                "HSupID": data[i].HSupID, "HSupNumber": data[i].渚涘簲鍟嗕唬鐮�, "HSupName": data[i].渚涘簲鍟�, "HSupFlag": data[i].濮斿鏍囪 == 0 ? "false" : "true",
+                                "HQty": HLZQty, "HSNCtrl": data[i].SN杩囩珯鎺у埗 == 0 ? "false" : "true", "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
+                                "HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
+                                "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": data[i].宸ヨ壓鍙傛暟, "HPicNum": data[i].鍥剧焊缂栧彿, "HProcCheckNote": data[i].鏈伐搴忕‘璁よ褰�,
+                                "HRelationQty_OutBad": "0", "HRoutingBillMainID": data[i].hmainid, "HRoutingBillEntryID": data[i].hsubid
+                            });
+                        }
+                        option.data = Tablerow;
+                        table.render(option);
+                        for (var i = 0; i < data.length; i++) {
+                            $('#HSupFlag' + (i + 1)).find("option[value='" + (data[i].濮斿鏍囪 == "0" ? "false" : "true") + "']").attr("selected", true);
+
+                            if (data[i].SN杩囩珯鎺у埗) {
+                                $('#HSNCtrl' + (i + 1)).attr("checked", true);
                             }
-                            option.data = Tablerow;
-                            table.render(option);
-                            for (var i = 1; i <= data.length; i++) {
-                                $('#HSupFlag' + i + '').find("option[value='" + (data[i - 1].濮斿鏍囪 == "0" ? "false" : "true") + "']").attr("selected", true);
-                            }
-                            form.render('select');
+                        }
+                        form.render('select');
+                        form.render('checkbox');
                     },
                     error: function (result) {
-                        layer.close(index);
+                        //layer.close(index);
                         console.log(result);
                         //layer.msg('鑾峰彇閲囪喘璁㈠崟鍑虹幇寮傚父', { icon: 2, time: 2000 });
                     }
@@ -1788,95 +1962,98 @@
             //淇濆瓨鎻愪氦
             form.on('submit(btnSave)', function (data) {//鎻愪氦
                 if ($("#HICMOInterID").val() == 0) {
-                    layer.msg("璇烽�夋嫨浠诲姟鍗曪紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    layer.msg(get_MessageError("[3772-2-007]璇烽�夋嫨浠诲姟鍗曪紒", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"])});
                     return;
                 }
+                //if ($("#HBatchNo").val() == "" ) {
+                //    layer.msg("璇疯緭鍏ユ壒娆″彿锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                //    return;
+                //}
                 if ($("#HQty").val() == "" || $("#HQty").val() <= 0) {
-                    layer.msg("鍩烘湰淇℃伅涓祦杞崱鏁伴噺涓嶈兘涓虹┖涓斾笉鑳藉皬浜庣瓑浜�0锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    layer.msg(get_MessageError("[3772-2-010]鍩烘湰淇℃伅涓祦杞崱鏁伴噺涓嶈兘涓虹┖涓斾笉鑳藉皬浜庣瓑浜�0锛�", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                     return;
                 }
                 if (!$("#HPlanBeginDate").val()) {
-                    layer.msg("璇烽�夋嫨璁″垝寮�宸ユ棩鏈燂紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    layer.msg(get_MessageError("[3772-2-011]璇烽�夋嫨璁″垝寮�宸ユ棩鏈燂紒", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                     return;
                 }
                 if (!$("#HPlanEndDate").val()) {
-                    layer.msg("璇烽�夋嫨璁″垝瀹屽伐鏃ユ湡锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    layer.msg(get_MessageError("[3772-2-012]璇烽�夋嫨璁″垝瀹屽伐鏃ユ湡锛�", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                     return;
                 }
 
                 var HAuxQty = $('#HAuxQty').val();
                 if (HAuxQty.substring(HAuxQty.length - 1, HAuxQty.length) == ".") {
-                    layer.msg("杈呮暟閲忕殑缁撳熬涓嶈兘鏄�.锛�");
+                    layer.msg(get_MessageError("[3772-2-013]杈呮暟閲忕殑缁撳熬涓嶈兘鏄�.锛�", sessionStorage["HTranSlate"]));
                     return;
                 } else {
                     var ref = /^[0-9]+\.?[0-9]*$/;
                     if (!ref.test(HAuxQty)) {
-                        layer.msg("杈呮暟閲忚杈撴纭叆鏁板瓧锛�");
+                        layer.msg(get_MessageError("[3772-2-014]杈呮暟閲忚杈撴纭叆鏁板瓧锛�", sessionStorage["HTranSlate"]));
                         return;
                     }
                 }
 
                 var HWidth = $('#HWidth').val();
                 if (HWidth.substring(HWidth.length - 1, HWidth.length) == ".") {
-                    layer.msg("骞呭鐨勭粨灏句笉鑳芥槸.锛�");
+                    layer.msg(get_MessageError("[3772-2-015]骞呭鐨勭粨灏句笉鑳芥槸.锛�", sessionStorage["HTranSlate"]));
                     return;
                 } else {
                     var ref = /^[0-9]+$/;
                     if (!ref.test(HWidth)) {
-                        layer.msg("骞呭璇疯緭姝g‘鍏ユ暟瀛楋紒");
+                        layer.msg(get_MessageError("[3772-2-016]骞呭璇疯緭姝g‘鍏ユ暟瀛楋紒", sessionStorage["HTranSlate"]));
                         return;
                     }
                 }
 
                 var HWeight = $('#HWeight').val();
                 if (HWeight.substring(HWeight.length - 1, HWeight.length) == ".") {
-                    layer.msg("鍏嬮噸鐨勭粨灏句笉鑳芥槸.锛�");
+                    layer.msg(get_MessageError("[3772-2-017]鍏嬮噸鐨勭粨灏句笉鑳芥槸.锛�", sessionStorage["HTranSlate"]));
                     return;
                 } else {
                     var ref = /^[0-9]+$/;
                     if (!ref.test(HWeight)) {
-                        layer.msg("鍏嬮噸璇疯緭姝g‘鍏ユ暟瀛楋紒");
+                        layer.msg(get_MessageError("[3772-2-018]鍏嬮噸璇疯緭姝g‘鍏ユ暟瀛楋紒", sessionStorage["HTranSlate"]));
                         return;
                     }
                 }
 
                 var HSplitNo = $('#HSplitNo').val();
                 if (HSplitNo.substring(HSplitNo.length - 1, HSplitNo.length) == ".") {
-                    layer.msg("鎷嗗垎鍙风殑缁撳熬涓嶈兘鏄�.锛�");
+                    layer.msg(get_MessageError("[3772-2-019]鎷嗗垎鍙风殑缁撳熬涓嶈兘鏄�.锛�", sessionStorage["HTranSlate"]));
                     return;
                 } else {
                     var ref = /^[0-9]+$/;
                     if (!ref.test(HSplitNo)) {
-                        layer.msg("鎷嗗垎鍙疯杈撴纭叆鏁板瓧锛�");
+                        layer.msg(get_MessageError("[3772-2-020]鎷嗗垎鍙疯杈撴纭叆鏁板瓧锛�", sessionStorage["HTranSlate"]));
                         return;
                     }
                 }
 
                 var HSplitSumQty = $('#HSplitSumQty').val();
                 if (HSplitSumQty.substring(HSplitSumQty.length - 1, HSplitSumQty.length) == ".") {
-                    layer.msg("鎷嗗垎鎬婚噺鐨勭粨灏句笉鑳芥槸.锛�");
+                    layer.msg(get_MessageError("[3772-2-021]鎷嗗垎鎬婚噺鐨勭粨灏句笉鑳芥槸.锛�", sessionStorage["HTranSlate"]));
                     return;
                 } else {
                     var ref = /^[0-9]+$/;
                     if (!ref.test(HSplitSumQty)) {
-                        layer.msg("鎷嗗垎鎬婚噺璇疯緭姝g‘鍏ユ暟瀛楋紒");
+                        layer.msg(get_MessageError("[3772-2-022]鎷嗗垎鎬婚噺璇疯緭姝g‘鍏ユ暟瀛楋紒", sessionStorage["HTranSlate"]));
                         return;
                     }
                 }
 
                 var HSplitColorQty = $('#HSplitColorQty').val();
                 if (HSplitColorQty.substring(HSplitColorQty.length - 1, HSplitColorQty.length) == ".") {
-                    layer.msg("鍒嗙几鍙风殑缁撳熬涓嶈兘鏄�.锛�");
+                    layer.msg(get_MessageError("[3772-2-023]鍒嗙几鍙风殑缁撳熬涓嶈兘鏄�.锛�", sessionStorage["HTranSlate"]));
                     return;
                 } else {
                     var ref = /^[0-9]+$/;
                     if (!ref.test(HSplitColorQty)) {
-                        layer.msg("鍒嗙几鍙疯杈撴纭叆鏁板瓧锛�");
+                        layer.msg(get_MessageError("[3772-2-024]鍒嗙几鍙疯杈撴纭叆鏁板瓧锛�", sessionStorage["HTranSlate"]));
                         return;
                     }
                 }
 
-                
 
                 //鍒犻櫎瀛愯〃鏁版嵁鏃� 浼氬崰鐢ㄦ暟缁勭殑浣嶇疆,闇�瑕侀噸鏂版帓涓�涓嬮『搴�
                 var sSubTable = [];
@@ -1884,38 +2061,44 @@
                     if (table.cache["mainTable"][i] != "") {
                         table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
                         sSubTable.push(table.cache["mainTable"][i])
-                    }
+                    }                    
                 }
                 for (var i = 0; i < sSubTable.length; i++) {
                     if (!sSubTable[i].HProcNo) {
                         var indexRow = i + 1;
-                        layer.msg("绗�" + indexRow + "琛岋紝娴佹按鍙蜂笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        layer.msg(get_MessageError("[3772-2-025]绗�" + indexRow + "琛岋紝娴佹按鍙蜂笉鑳戒负绌猴紒", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                         return;
                     }
                     if (sSubTable[i].HProcNo == 0) {
                         var indexRow = i + 1;
-                        layer.msg("绗�" + indexRow + "琛岋紝娴佹按鍙蜂笉鑳戒负0锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        layer.msg(get_MessageError("[3772-2-026]绗�" + indexRow + "琛岋紝娴佹按鍙蜂笉鑳戒负0锛�", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                         return;
                     }
                     if (!sSubTable[i].HProcID) {
                         var indexRow = i + 1;
-                        layer.msg("绗�" + indexRow + "琛岋紝宸ュ簭涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        layer.msg(get_MessageError("[3772-2-027]绗�" + indexRow + "琛岋紝宸ュ簭涓嶈兘涓虹┖锛�", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                         return;
                     }
-                    if (!sSubTable[i].HCenterID) {
-                        var indexRow = i + 1;
-                        layer.msg("绗�" + indexRow + "琛岋紝宸ヤ綔涓績涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                        return;
-                    }
+                    //if (!sSubTable[i].HCenterID) {
+                    //    var indexRow = i + 1;
+                    //    layer.msg("绗�" + indexRow + "琛岋紝宸ヤ綔涓績涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    //    return;
+                    //}
                     if (sSubTable[i].HSupFlag == "true") {
                         if (!sSubTable[i].HSupID) {
                             var indexRow = i + 1;
-                            layer.msg("绗�" + indexRow + "琛岋紝渚涘簲鍟嗕笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            layer.msg(get_MessageError("[3772-2-028]绗�" + indexRow + "琛岋紝渚涘簲鍟嗕笉鑳戒负绌猴紒", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                             return;
                         }
                     }
                 }
                 data.field.HPRDORGID = sessionStorage["OrganizationID"];//缁勭粐
+
+                data.field.HMaterNumber2 = data.field.HMaterNumber2.replace("\"", "鈥�").replace(";", "锛�");
+                data.field.HMaterName2 = data.field.HMaterName2.replace("\"", "鈥�").replace(";", "锛�");
+                data.field.HMaterNumber = data.field.HMaterNumber.replace("\"", "鈥�").replace(";", "锛�");
+                data.field.HMaterName = data.field.HMaterName.replace("\"", "鈥�").replace(";", "锛�");
+              
                 //var HBLFlag = data.field.HBLFlag;
                 //HBLFlag == "on" ? data.field.HBLFlag = 'true' : data.field.HBLFlag = 'false';//灏嗘暟缁勫悎骞舵垚瀛楃涓�
                 var sMainStr = JSON.stringify(data.field);
@@ -1924,7 +2107,7 @@
                 if (OperationType == 3) {
                     flag = "xg";
                 }
-                var sMainSub = sMainStr + ';' + sSubStr + ";" + sessionStorage["HUserName"] + ";" + flag + ";" + OperationType;
+                var sMainSub = sMainStr + ';' + sSubStr + ";" + sessionStorage["HUserName"] + ";" + flag + ";" + HSouceBillType;
                 var index = layer.load();
 
                 $.ajax({
@@ -1934,19 +2117,25 @@
                     data: { "sMainSub": sMainSub },
                     dataType: "json",
                     success: function (data) {
-                        if (data.count == 1) {
+                        if (data.count == 1) {                        
+                            layer.msg(data.Message, { icon: 1 });
+                            $('#set_SaveBill').addClass("layui-btn-disabled").attr("disabled", true);
+                            if (data.Verify == "Y") //鑷姩瀹℃牳
+                            {
+                                $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
+                                set_CheckBill(1); //瀹℃牳
+                            }
                             layer.close(index);
-                            layer.msg("鎻愪氦鎴愬姛");
-                            $('#set_SaveBill').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: "娓╅Θ鎻愮ず" });
+                            layer.msg(data.Message, { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                         }
                     },
                     error: function (err) {
                         layer.close(index);
-                        layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        layer.msg("閿欒:" + err, { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                     }
                 });
             });
@@ -1977,13 +2166,14 @@
                     }
                 })
             }
-          
+
 
             //鏄剧ず鍒楁暟鎹�
             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) {
@@ -2051,7 +2241,7 @@
                             table.render(option);
                         }
                     }, error: function () {
-                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
                     }
                 })
             }
@@ -2075,16 +2265,18 @@
                 set_EditGrid(linterid);  //缂栬緫鑾峰彇琛ㄤ綋
                 get_DisplayHMainID(linterid);  //缂栬緫鑾峰彇琛ㄤ綋(鍣ㄥ叿娓呭崟)
                 get_Display3(linterid);  //缂栬緫鑾峰彇琛ㄤ綋(宸ヨ壓鍙傛暟娓呭崟)
-                option.data = [{
-                    "HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
-                    "HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
-                    "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
-                    "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
-                    "HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
-                    "HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
-                    "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
-                }];
-                table.render(option);
+
+                //option.data = [{
+                //    "HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
+                //    "HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
+                //    "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
+                //    "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
+                //    "HQty": 0, "HSNCtrl": "false", "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
+                //    "HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
+                //    "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": "",
+                //    "HRoutingBillMainID": 0, "HRoutingBillEntryID": 0,"HSourceID":0
+                //}];
+                //table.render(option);
             }
             //缂栬緫鑾峰彇琛ㄥご
             function set_EditForm(linterid) {
@@ -2103,6 +2295,7 @@
                                 "HBillNo": OperationType==4?"": data.鍗曟嵁鍙�
                                 , "HInterID": OperationType == 4 ? "" : data.hmainid
                                 , "HMainSourceBillNo": OperationType == 5 ? data.鍗曟嵁鍙� : ""
+                                , "HMainSourceBillSubType": data.HMainSourceBillSubType
                                 , "HPRDORGID": data.HPRDORGID
                                 , "HDate": formatDate(data.鏃ユ湡)
                                 , "HOrderProcNO": data.璁㈠崟璺熻釜鍙�
@@ -2127,10 +2320,20 @@
                                 , "HMaterModel": data.鏉愭枡瑙勬牸
                                 , "HWidth": data.骞呭
                                 , "HWeight": data.鍏嬮噸
+                                , "HBatchNo": data.鎵瑰彿
+
                                 , "HAuxQty": data.杈呮暟閲�
                                 , "HAuxUnit": data.HAuxUnit
                                 , "HAuxUnitName": data.杈呭姪鍗曚綅
-                                , "HSplitNo": data.鎷嗗垎鍙�
+
+                                , "HAuxQty2": data.杈呮暟閲�2
+                                , "HAuxUnit2": data.HAuxUnit2
+                                , "HAuxUnitName2": data.杈呭姪鍗曚綅2
+                                , "HMouldNum": data.妯$┐鍙�
+
+
+                                , "HName": data.璁㈠崟绛夌骇
+                                , "HSplitNo": data.鎷嗗垎鍙� == undefined ? 0 : data.鎷嗗垎鍙�
                                 , "HRemark2": data.鐧藉澂瑕佹眰
                                 , "HRemark3": data.搴曢儴澶囨敞
                                 , "HEmpID": data.HEmpID
@@ -2138,9 +2341,9 @@
                                 , "HCusID": data.HCusID
                                 , "HCusNames": data.瀹㈡埛
                                 , "HColorRemark": data.鏌撹壊瑕佹眰
-                                , "HSplitSumQty": data.鎷嗗垎鎬婚噺
-                                , "HSplitColorQty": data.鍒嗙几鍙�
-                               
+                                , "HSplitSumQty": data.鎷嗗垎鎬婚噺 == undefined ? 0 : data.鎷嗗垎鍙�
+                                , "HSplitColorQty": data.鍒嗙几鍙� == undefined ? 0 : data.鎷嗗垎鍙�
+
                                 , "HProjectNum": data.椤圭洰缂栧彿
                                 , "HVerNum": data.鐗堟湰
                                 , "HRemark": data.琛ㄥご澶囨敞
@@ -2156,7 +2359,7 @@
                                 , "HWorkShopID": data.HWorkShopID
                                 , "textBox2": data.浠诲姟鍗曞彿
                                 , "HWorkBillSortNo": data.鏃ヨ鍒掑伐鍗曞彿
-                                , "HSupName": data.濮斿鍔犲伐鍗曚綅
+                                , "HSupName": data.濮斿鍔犲伐鍗曚綅 == undefined ? 0 : data.鎷嗗垎鍙�
                                 , "HSupID": data.HSupID
                                 , "HMaterName": data.瀛愪欢鍚嶇О
                                 , "HMaterID": data.HMaterID
@@ -2192,6 +2395,7 @@
                                 , "HMaterIDC": data.鍘熸潗鏂欏唴鐮丆
                                 , "HMaterIDD": data.鍘熸潗鏂欏唴鐮丏
 
+                                , "HPlanOrderProcNo": data.HPlanOrderProcNo
 
                                 //缇婃瘺淇℃伅
                                 , "HHeight": data.姣涢珮
@@ -2203,6 +2407,9 @@
                                 , "HSizing": data.瀹氬瀷娴嗘枡
                                 , "HSellDate": data.浜よ揣鏃ユ湡
 
+                                , "HWidth_New": data.鐢熶骇骞呭
+                                , "HWeight_New": data.鐢熶骇鍏嬮噸
+                                , "HRemark_New": data.鐢熶骇瑙勬牸
 
                                 , "HMaker": data.鍒跺崟浜�
                                 , "HChecker": data.瀹℃牳浜�
@@ -2217,6 +2424,9 @@
                                 , "HPickLabel": data.鍖呰鏍囪瘑
                                 , "HPickLabelNumber": data.鍖呰鏍囪瘑缂栫爜
                             });
+                            if (data.HBillSubType == "SUB") {
+                                $("#btnRoutingBill").addClass("layui-btn-disabled").attr("disabled", true);
+                            }
                             btnHMaterID = data.HMaterID2;
                             HLZQty = data.娴佽浆鍗℃暟閲�;
                             $("#HBLFlag").val(data.琛ユ枡鏍囪 ? "true" : "false");
@@ -2224,10 +2434,10 @@
                             form.render("checkbox");
 
                         } else {
-                            layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            layer.alert(get_MessageError(result.msg, sessionStorage["HTranSlate"]), { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
                         }
                     }, error: function () {
-                        layer.alert("鍙戠敓閿欒!", { icon: 5 });
+                        layer.alert(get_MessageError("[0000-1-002]鍙戠敓閿欒!", sessionStorage["HTranSlate"]), { icon: 5 });
                     }
                 });
             }
@@ -2250,22 +2460,28 @@
                 $.ajax({
                     url: GetWEBURL() + 'Sc_ProcessExchangeBill/GetProcessExchangeBillSub',
                     type: "GET",
+                    async: false,
                     data: { "HInterID": linterid },
                     success: function (result) {
                         if (result.count == 1) {
                             option.data = result.data;
                             table.render(option);
-                            for (var i = 0; i < result.data.length; i++) {
-                                $('#HSupFlag' + (i + 1)).find("option[value='" + result.data[i].HSupFlag + "']").attr("selected", true);
+                            for (var i = 0; i < option.data.length; i++) {
+                                $('#HSupFlag' + (i + 1)).find("option[value='" + (option.data[i].HSupFlag == "false" ? "false" : "true") + "']").attr("selected", true);
+
+                                if (option.data[i].HSNCtrl) {
+                                    $('#HSNCtrl' + (i + 1)).attr("checked", true);
+                                }
                             }
                             form.render('select');
+                            form.render('checkbox');
 
                         } else {
-                            layer.alert(result.code + result.Message, { icon: 5 });
+                            layer.alert(get_MessageError(result.code + result.Message, sessionStorage["HTranSlate"]), { icon: 5 });
                         }
                     }, error: function () {
                         layer.close(index0);
-                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
                     }
                 });
             }
@@ -2278,17 +2494,42 @@
                     , area: ['90%', '90%']//澶у皬
                     , title: "璁¢噺鍗曚綅鍒楄〃"  //鏍囬
                     , shift: 2//寮瑰嚭鍔ㄧ敾
-                    , content: ['../../Baseset/鍩虹璧勬枡/Gy_UnitList.html', 'yes']
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Unit.html', 'yes']
                     , btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                         var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
                         var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
                         if (checkStatus.data.length === 0) {
-                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
                         }
                         //鑾峰彇鏁版嵁
                         $("#HAuxUnit").val(checkStatus.data[0].HItemID);
-                        $("#HAuxUnitName").val(checkStatus.data[0].HName);
+                        $("#HAuxUnitName").val(checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О);
+
+                        layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) { }
+                })
+            }
+            //杈呭姪鍗曚綅2
+            function get_btnHAuxUnit2() {
+                layer.open({
+                    type: 2//寮圭獥绫诲瀷
+                    , skin: 'layui-layer-rim' //鍔犱笂杈规
+                    , area: ['90%', '90%']//澶у皬
+                    , title: "璁¢噺鍗曚綅鍒楄〃"  //鏍囬
+                    , shift: 2//寮瑰嚭鍔ㄧ敾
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Unit.html', 'yes']
+                    , btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
+                        }
+                        //鑾峰彇鏁版嵁
+                        $("#HAuxUnit2").val(checkStatus.data[0].HItemID);
+                        $("#HAuxUnitName2").val(checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О);
 
                         layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -2296,12 +2537,45 @@
                 })
             }
 
+            //璁㈠崟绛夌骇
+            function get_btnOrderID() {
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim" //鍔犱笂杈规
+                    , title: "璁㈠崟绛夌骇鍒楄〃"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["90%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_OrderLev.html', 'yes']
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鎸夐挳涓�  鐨勫洖璋�
+                        var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+                        if (checkStatus.data.length != 1) {
+                            return layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨鏁版嵁', sessionStorage["HTranSlate"]));
+                        }
+                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                        $("#HName").val(checkStatus.data[0].璁㈠崟绛夌骇);
+                        $("#HOrderLevID ").val(checkStatus.data[0].HItemID);
+                        //obj.update({
+                        //    "璁㈠崟绛夌骇鍚嶇О": checkStatus.data[0].璁㈠崟绛夌骇
+                        //    //, "璁㈠崟绛夌骇浠g爜": checkStatus.data[0].璁㈠崟绛夌骇浠g爜
+                        //    , "HOrderLevID": checkStatus.data[0].HItemID
+                        //})
+                        layer.close(index);//鍏抽棴寮圭獥
+                    }
+                })
+            }
             //#region 鏌ヨ (鍣ㄥ叿娓呭崟)
             function get_DisplayHMainID(linterid) {
                 var ajaxLoad = layer.load();
                 $.ajax({
                     url: GetWEBURL() + '/Sc_ProcessExchangeBillList/QJQD',
                     type: "GET",
+                    async: false,
                     data: { "HProcExchHinteID": linterid },
                     success: function (data1) {
                         if (data1.count == 1) {
@@ -2349,7 +2623,7 @@
                         }
                     }, error: function () {
                         layer.close(ajaxLoad);
-                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
                     }
                 });
             }
@@ -2361,6 +2635,7 @@
                 $.ajax({
                     url: GetWEBURL() + '/Sc_ProcessExchangeBill/GetProcessExchangeBillSubTech',
                     type: "GET",
+                    async: false,
                     data: { "HInterID": linterid},
                     success: function (data1) {
                         if (data1.count == 1) {
@@ -2407,7 +2682,7 @@
                         }
                     }, error: function () {
                         layer.close(ajaxLoad);
-                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
                     }
                 });
             }
@@ -2425,6 +2700,7 @@
                             $("#HICMOInterID").val(data.hmainid);
                             $("#HICMOBillNo").val(data.鐢熶骇璁㈠崟鍙�);
                             $("#textBox2").val(data.鐢熶骇璁㈠崟鍙�);
+                            $("#HMainSourceBillSubType").val(data.HMainSourceBillSubType);
                             $("#HICMOEntryID").val(data.HEntryID);
                             $("#HOrderProcNO").val(data.璁㈠崟璺熻釜鍙�);
                             $("#HMaterID").val(data.hmaterid);
@@ -2435,7 +2711,7 @@
                             $("#HMaterNumber2").val(data.鐗╂枡浠g爜);
                             $("#HMaterModel").val(data.瑙勬牸鍨嬪彿);
                             $("#HMaterModel2").val(data.瑙勬牸鍨嬪彿);
-                            $("#HBatchNo").val(data.鎵瑰彿);
+                            $("#HBatchNo").val();
                             $("#HUnitID").val(data.hunitid);
                             $("#HUnitName").val(data.璁¢噺鍗曚綅鍚嶇О);
                             $("#HUnitNumber").val(data.璁¢噺鍗曚綅浠g爜);
@@ -2476,6 +2752,23 @@
                             $("#HCusNames").val(data.瀹㈡埛);
                             $("#HColorRemark").val(data.鏌撹壊瑕佹眰);
                             $("#HRemark3").val(data.搴曢儴澶囨敞);
+
+                            $("#HWidth_New").val(data.鐢熶骇骞呭);
+                            $("#HWeight_New").val(data.鐢熶骇鍏嬮噸);
+                            $("#HRemark_New").val(data.鐢熶骇瑙勬牸);
+
+
+                            $("#HHeight").val(data.姣涢珮);
+                            $("#HInches").val(data.瀵告暟缁勭粐);
+                            $("#HAl1Long").val(data.鍏ㄦ瘺闀�);
+                            $("#HDensity").val(data.鍧忓竷瀵嗗害);
+                            $("#HTela").val(data.姣涚罕鍚嶇О鍙婅鏍�);
+                            $("#HUnderTela").val(data.搴曚笣);
+                            $("#HSizing").val(data.瀹氬瀷娴嗘枡);
+
+
+                            $("#HPlanOrderProcNo").val(data.HPlanOrderProcNo);
+
                             $("#HBLFlag").val(result.data[0].HBLFlag == 0 ? false : true);
                             $("input[name='isHBLFlag']").prop("checked", result.data[0].HBLFlag);//true:閫変腑 false:涓嶉�変腑
                             form.render("checkbox");
@@ -2483,13 +2776,13 @@
 
                             HLZQty = data.娴佽浆鍗℃暟閲�;
 
-                            var sWhere = "and HMaterID=" + btnHMaterID + " and HOrgID = " + sessionStorage["OrganizationID"];
+                            var sWhere = "and HMaterID=" + btnHMaterID + " and HOrgID = " + sessionStorage["OrganizationID"] +" and 榛樿宸ヨ壓='1' and HMainProcID=0 ";
 
                             getRoutingBillList(sWhere);
-                            
+
                         }
                         else {
-                            layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            layer.msg(result.Message, { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                         }
                     }
                 })
@@ -2502,29 +2795,31 @@
             function getRoutingBillList(sWhere) {
                 $.ajax({
                     type: "get",
-                    url: GetWEBURL() + "LEMS/Gy_RoutingBillList",
+                    url: GetWEBURL() + "/LEMS/Gy_RoutingBillList",
                     async: false,
                     data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                     success: function (result) {
                         if (result.data.length != 0) {
                             var hbillno = result.data[0].鍗曟嵁鍙�
-                           
+
                             getRoutingBill(hbillno);
                         } else {
+                            layer.msg("娌℃湁榛樿宸ヨ壓璺嚎!");
                             option.data = [{
                                 "HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
                                 "HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
                                 "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
                                 "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
-                                "HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
+                                "HQty": 0, "HSNCtrl": false, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
                                 "HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
-                                "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
+                                "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": "",
+                                "HRoutingBillMainID": 0, "HRoutingBillEntryID": 0
                             }];
                             table.render(option);
                         }
                     },
                     error: function (result) {
-                        layer.close(index);
+                        //layer.close(index);
                         console.log(result);
                         //layer.msg('鑾峰彇閲囪喘璁㈠崟鍑虹幇寮傚父', { icon: 2, time: 2000 });
                     }
@@ -2540,13 +2835,18 @@
                         if (result.count == 1) {
                             option.data = result.data;
                             table.render(option);
-                            for (var i = 1; i <= option.data.length; i++) {
-                                $('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true);
+                            for (var i = 0; i < data.length; i++) {
+                                $('#HSupFlag' + (i + 1)).find("option[value='" + (data[i].濮斿鏍囪 == "0" ? "false" : "true") + "']").attr("selected", true);
+
+                                if (data[i].SN杩囩珯鎺у埗) {
+                                    $('#HSNCtrl' + (i + 1)).attr("checked", true);
+                                }
                             }
                             form.render('select');
+                            form.render('checkbox');
                         }
                         else {
-                            layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            layer.msg(result.Message, { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
                         }
                     }
                 })
@@ -2563,6 +2863,39 @@
                     }
                 });
             });
+
+            //SN杩囩珯鎺у埗
+            form.on('checkbox(HSNCtrl)', function (data) {
+                //鑾峰彇涓嬫媺妗嗛�変腑鐨勫��
+                var elem = data.othis.parents('tr');
+                var dataindex = elem.attr("data-index");
+                $.each(option.data, function (index, value) {
+                    if (value.LAY_TABLE_INDEX == dataindex) {
+                        value.HSNCtrl = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+                    }
+                });
+            });
+
+            function set_CheckBill(num) {
+                $.ajax({
+                    url: GetWEBURL() + '/Sc_ProcessExchangeBill/CheckSc_ProcessExchangeBill',
+                    type: "GET",
+                    data: { "HInterID": $("#HInterID").val(), "Type": num, "user": sessionStorage["HUserName"], "HBillSubType": "3772" },
+                    success: function (result) {
+                        if (result.count == 1) {                         
+                            layer.msg(result.Message, { icon: 1 });
+                            layer.close(wait);
+                        } else {
+                            layer.alert(result.code + result.Message, { icon: 5 });
+                            layer.close(wait);
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        layer.close(wait);
+                    }
+                });
+            }
+
             //浠ヤ笂涓簂ayui妯″潡
         });
 

--
Gitblit v1.9.1