From 2a850bf24f8e1d1bfb97876ff2322eec88433851 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 07 八月 2024 16:22:30 +0800
Subject: [PATCH] 1

---
 WebTM/views/质量管理/异常反馈/OA_ErrMsgBackSelfQuery.html              |   43 
 WebTM/views/生产管理/报工台工序/开工/Sc_Add_MESBeginStepWorkBillList.html |  425 +++++++
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill.html                |  132 +
 WebTM/views/WMS扫码模块/销售出库/Kf_SellOutBill_QiaoYi_PDA.html        |   12 
 WebTM/views/质量管理/质量报表/QC_BadProductsReport.html                |  674 ++++++++++++
 WebTM/views/质量管理/质量报表/QC_ErrMsgBackBillList.html               |  674 ++++++++++++
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill_CurrentWork.html    |   60 +
 WebTM/layuiadmin/Scripts/webConfig.js                          |    6 
 WebTM/views/生产管理/异常反馈单/Sc_Add_MESExecptFeedBackBillList.html   |   11 
 WebTM/views/质量管理/质量报表/QC_ErrManagerLedgerReport.html           |  704 +++++++++++++
 WebTM/WebTM.csproj                                             |    3 
 WebTM/views/生产管理/生产开工单/Sc_Add_MESBeginWorkBillList.html        |  375 ++++++
 12 files changed, 3,019 insertions(+), 100 deletions(-)

diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index be7f460..454a3bb 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -449,10 +449,13 @@
     <Content Include="views\璐ㄩ噺绠$悊\妫�楠屽彇鏍疯繕鏍峰崟\QC_BackSampleCheckBillMainList.html" />
     <Content Include="views\璐ㄩ噺绠$悊\妫�楠屽彇鏍疯繕鏍峰崟\QC_TakeSampleCheckBillMainList.html" />
     <Content Include="views\璐ㄩ噺绠$悊\妫�楠屽彇鏍疯繕鏍峰崟\QC_Add_TakeSampleCheckBill.html" />
+    <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_ErrMsgBackBillList.html" />
+    <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_BadProductsReport.html" />
     <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_InspectionFormReport.html" />
     <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_MoistureContentDataLedger.html" />
     <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_PerformanceScrapLedger.html" />
     <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_ProcessPerformancePass.html" />
+    <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_ErrManagerLedgerReport.html" />
     <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_QualityStatisticsDailyReport.html" />
     <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_RegistrationForTestingReport.html" />
     <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_MoistureContentDataLedger.html" />
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index 2752599..ba4cfc4 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -3,14 +3,14 @@
     //var WEBURL = "http://192.168.16.80:8011/";          //鍔炲叕瀹ゆ湇鍔″櫒
     //var WEBURL = "http://localhost:8081/SWEAPI/";       //ch鏈湴*/
     //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
-    /*var WEBURL = "http://localhost/API/";             //棰滄檽鍐涙湰鍦伴厤缃�*/
+    var WEBURL = "http://localhost/API/";             //棰滄檽鍐涙湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //鏉ㄤ箰鏈湴閰嶇疆
     /*var WEBURL = "http://localhost:8082/API/";    //鏉滆春鏈湴閰嶇疆*/
     //var WEBURL = "http://localhost:81/API/";    //鐜嬪浆鏈湴閰嶇疆
     /*var WEBURL = "http://localhost:8083/API/";  //闄堥洴闈欐湰鍦伴厤缃�*/
-    var WEBURL = "http://localhost:81/API/"    //缈佹稕娑涙湰鍦伴厤缃�
+    //var WEBURL = "http://localhost:81/API/"    //缈佹稕娑涙湰鍦伴厤缃�
     /*var WEBURL = "http://localhost:8082/API/";    *//*//寮犵憺骞挎湰鍦伴厤缃�*/
-    /*var WEBURL = "http://localhost:8082/LuBaoAPI/";*/    //浣欐�濇澃鏈湴閰嶇疆
+    //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //浣欐�濇澃鏈湴閰嶇疆
     //var WEBURL = "http://localhost:8088/ARAPI/";    //浣欐�濇澃鏈湴閰嶇疆(瀹夌憺)
     //var WEBURL = "http://10.1.4.155/API/";   //姹熶赴瀹㈡埛NEW
    /* var WEBURL = "http://47.96.97.237/API/";   //鏅轰簯鏈嶅姟鍣�*/
diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_QiaoYi_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_QiaoYi_PDA.html"
index fabb874..8545d60 100644
--- "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_QiaoYi_PDA.html"
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_QiaoYi_PDA.html"
@@ -14,6 +14,7 @@
     <script src="../../../layuiadmin/Scripts/json2.js"></script>
     <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
     <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
     <style>
         .layui-col-xs8 {
@@ -245,6 +246,7 @@
                             <!--<button type="button" lay-submit="" lay-filter="cmdModify" class="layui-btn" id="cmdModify">缂栬緫</button>-->
                             <button type="button" lay-submit="" lay-filter="cmdDelete" class="layui-btn" id="cmdDelete">娓呯┖</button>
                             <button type="button" lay-submit="" lay-filter="cmdCancel" class="layui-btn" id="cmdCancel">閫�鍑�</button>
+                            <button type="button" lay-submit="" lay-filter="cmdRefresh" class="layui-btn" id="cmdRefresh">鍒锋柊</button>
                         </div>
                     </div>
 
@@ -1079,6 +1081,16 @@
 
             //#endregion
 
+            //#region 鍒锋柊
+
+            form.on('submit(cmdRefresh)', function () {
+                //鍒锋柊琛ㄤ綋鏄庣粏
+                DisBillEntryList();
+                element.tabChange('tab-Kf_SellOutBill_QiaoYi_PDA', '2');
+            })
+
+            //#endregion
+
             //#region 鎵嬪伐鎶勫寘
 
             form.on('submit(cmdChaoBao)', function () {
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_Add_MESExecptFeedBackBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_Add_MESExecptFeedBackBillList.html"
index 96361e9..85d9a71 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_Add_MESExecptFeedBackBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_Add_MESExecptFeedBackBillList.html"
@@ -344,6 +344,17 @@
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
+                                                        <label class="layui-form-label">褰卞搷闈㈢▼搴�:</label>
+                                                        <div class="layui-input-inline">
+                                                            <select name="HErrLev" lay-filter="HErrLev" id="HErrLev">
+                                                                <option value="鍋滅嚎" selected="selected">鍋滅嚎</option>
+                                                                <option value="鎵归噺涓嶈壇">鎵归噺涓嶈壇</option>
+                                                                <option value="鍋跺彂涓嶈壇">鍋跺彂涓嶈壇</option>
+                                                                <option value="鏃犳硶鍒ゆ柇">鏃犳硶鍒ゆ柇</option>
+                                                            </select>
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
                                                         <label class="layui-form-label">婧愬崟鍗曞彿:</label>
                                                         <div class="layui-input-inline">
                                                             <input class="layui-input" name="HMainSourceBillNo" lay-verify="HMainSourceBillNo" id="HMainSourceBillNo" disabled autocomplete="off">
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\345\274\200\345\267\245/Sc_Add_MESBeginStepWorkBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\345\274\200\345\267\245/Sc_Add_MESBeginStepWorkBillList.html"
index 3d77f62..07be9b5 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\345\274\200\345\267\245/Sc_Add_MESBeginStepWorkBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\345\274\200\345\267\245/Sc_Add_MESBeginStepWorkBillList.html"
@@ -92,7 +92,7 @@
                                 <button type="button" id="VerIfySaver" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="VerIfySaver">瀹℃牳</button>
                                 <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
                             </div>
-                    
+
                         </div>
                         <div class="layui-card-body">
                             <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
@@ -103,7 +103,7 @@
                                             <li class="layui-this">鍩烘湰淇℃伅</li>
                                             <li>鍒跺崟淇℃伅</li>
                                         </ul>
-                                        <div class="layui-tab-content" style="height: 700px;">
+                                        <div class="layui-tab-content" style="height: 400px;">
                                             <div class="layui-tab-item layui-show">
                                                 <div class="layui-form-item">
                                                     <div class="layui-inline">
@@ -156,7 +156,7 @@
                                                     <div class="layui-inline">
                                                         <label class="layui-form-label">寮�宸ユ椂闂�:</label>
                                                         <div class="layui-input-inline">
-                                                            <input class="layui-input" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+                                                            <input class="layui-input" name="HBeginWorkTime" id="HBeginWorkTime" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
@@ -334,13 +334,37 @@
                                         </div>
                                     </div>
                                 </div>
+                                <div class="layui-tab" lay-filter="tab-POStockInBill">
+                                    <ul class="layui-tab-title" lay-filter="tab-all">
+                                        <li lay-id="1" style="padding:1px;" class="layui-this">璁″垝鍗�</li>
+                                    </ul>
+                                    <div class="layui-tab-content">
+                                        <!--瀛愯〃-->
+                                        <div class="layui-tab-item layui-show">
+                                            <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                                            <script type="text/html" id="toolbarDemo">
+                                                <div class="layui-btn-container">
+                                                    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                                                    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+                                                </div>
+                                            </script>
+                                        </div>
+                                    </div>
+                                </div>
                             </div>
+
                         </div>
                     </form>
                 </div>
             </div>
         </div>
     </div>
+
+    <!--鍒犻櫎-->
+    <script type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </script>
+
     <script>
         //鑾峰彇鍙傛暟
         var HBillType = "";  //鍗曟嵁绫诲瀷
@@ -379,7 +403,7 @@
         }).extend({
             index: 'lib/index' //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
-             //#region 鍏敤鍙橀噺
+            //#region 鍏敤鍙橀噺
             var $ = layui.$
                 , admin = layui.admin
                 , layer = layui.layer
@@ -391,6 +415,8 @@
 
             //鍒濆鍖栬〃鍗曟彃浠�
             set_InitFrom();
+            //鍏ㄥ眬鍙橀噺
+            window.OptionData = [];
 
             //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
             var HModuleType = "3787";
@@ -401,13 +427,18 @@
 
             //鍒ゆ柇鎿嶄綔绫诲瀷
             if (OperationType == 1) {//鏃犳簮鍗�
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_AddFNew();
             }
             else if (OperationType == 2) {//鏈夋簮鍗�
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_AddNew();
             }
             else if (OperationType == 3) {//缂栬緫
-          
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_EditFromGrid();
             }
             else {
@@ -418,7 +449,7 @@
             function set_InitFrom() {
                 //鏃ユ湡鏃堕棿閫夋嫨鍣�
                 laydate.render({
-                    elem: '#HBeginDate'
+                    elem: '#HBeginWorkTime'
                     , type: 'datetime'
                 });
                 laydate.render({
@@ -452,22 +483,21 @@
             }
 
             //鏃犳簮鍗曟柊澧�
-            function set_AddFNew()
-            {
+            function set_AddFNew() {
                 refSav = "Add";
                 //鍔犳簮鍗曠被鍨嬪尯鍒�(鍙互鍐欎笉鍚岀殑鏂规硶)
                 $("#HMainSourceEntryID").focus();
                 //鍒濆鍩烘湰淇℃伅璧嬪��
                 $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //鍗曟嵁鏃ユ湡
-                $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
+                $("#HBeginWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
                 $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //鍒跺崟鏃ユ湡
                 $("#HMaker").val(sessionStorage["HUserName"]);     //鍒跺崟浜�
-               
+
                 $('#HMaterCode').attr("disabled", false);
                 $('#HMaterCode').attr("readonly", true);
                 $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", false);
-                $('#HMaterName').attr("readonly", true); 
-                $('#HMaterSpec').attr("readonly", true); 
+                $('#HMaterName').attr("readonly", true);
+                $('#HMaterSpec').attr("readonly", true);
                 $('#HSourceName').attr("disabled", false);
                 $('#HSourceName').attr("readonly", true);
                 $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
@@ -501,7 +531,7 @@
                             success: function (result) {
                                 var data = result.data.h_v_IF_ICMOBillList[0];
                                 if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                    form.val("component-form-group", { 
+                                    form.val("component-form-group", {
                                         "HMaterID": data.HMaterID
                                         , "HMaterCode": data.浜у搧浠g爜
                                         , "HMaterName": data.浜у搧鍚嶇О
@@ -541,7 +571,7 @@
                 refSav = "Add";
                 //鍒濆鍩烘湰淇℃伅璧嬪��
                 $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //鍗曟嵁鏃ユ湡
-                $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
+                $("#HBeginWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
                 $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //鍒跺崟鏃ユ湡
                 $("#HMaker").val(sessionStorage["HUserName"]);     //鍒跺崟浜�
 
@@ -551,7 +581,7 @@
                 $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMaterName').attr("disabled", true);
                 $('#HMaterSpec').attr("disabled", true);
-                $('#HBeginDate').attr("disabled", true);
+                $('#HBeginWorkTime').attr("disabled", true);
                 $('#HSourceName').attr("disabled", true);
                 $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMainSourceBillNo').attr("disabled", true);
@@ -606,16 +636,15 @@
                         }
                     });
             }
-           
+
             //缂栬緫
-            function set_EditFromGrid()
-            {
+            function set_EditFromGrid() {
                 refSav = "Update";
                 $('#HMaterCode').attr("disabled", true);
                 $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMaterName').attr("disabled", true);
                 $('#HMaterSpec').attr("disabled", true);
-                $('#HBeginDate').attr("disabled", true);
+                $('#HBeginWorkTime').attr("disabled", true);
                 $('#HSourceName').attr("disabled", true);
                 $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMainSourceBillNo').attr("disabled", true);
@@ -633,9 +662,9 @@
                         "HID": linterid
                     },
                     success: function (result) {
-
                         if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            var data = result.data.h_v_Sc_MESBeginWorkBillList_NEW[0];
+                            var data = result.data.h_v_Sc_MESBeginWorkBillList_Edit[0];
+                            var tableSub = result.data.h_v_Sc_MESBeginWorkBillList_Edit;
                             form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
                                 "HInterID": data.hmainid
                                 , "HBillNo": data.鍗曟嵁鍙�
@@ -646,7 +675,7 @@
                                 , "HMaterCode": data.浜у搧浠g爜
                                 , "HMaterName": data.浜у搧鍚嶇О
                                 , "HMaterSpec": data.瑙勬牸鍨嬪彿
-                                , "HBeginDate": data.寮�宸ユ椂闂�
+                                , "HBeginWorkTime": data.寮�宸ユ椂闂�
                                 , "HSourceID": data.HSourceID              //璧勬簮ID
                                 , "HSourceName": data.璧勬簮鍚嶇О             //璧勬簮鍚嶇О
                                 , "HEmpID": data.HEmpID                   //鎿嶄綔鍛業D
@@ -676,6 +705,20 @@
 
                             });
 
+                            //瀛愯〃  璧嬪��
+                            var rowdata = [];
+                            for (var i = 0; i < tableSub.length; i++) {
+                                rowdata.push(
+                                    {
+                                        "HRelationBillInterID": tableSub[i].HRelationBillInterID, "HRelationBillEntryID": tableSub[i].HRelationBillEntryID, "HRelationBillNo": tableSub[i].HRelationBillNo, "HRelationBillType": tableSub[i].HRelationBillType,
+                                        "HICMOInterID": tableSub[i].鐢熶骇璁㈠崟鍐呯爜, "HICMOEntryID": tableSub[i].鐢熶骇璁㈠崟瀛愬唴鐮�, "HICMOBillNo": tableSub[i].鐢熶骇璁㈠崟, "HRemark": tableSub[i].澶囨敞,
+                                        "HProcExchInterID": tableSub[i].HProcExchInterID, "HProcExchEntryID": tableSub[i].HProcExchEntryID, "HProcExchBillNo": tableSub[i].HProcExchBillNo,
+                                        "HMaterID": tableSub[i].HMaterID, "HMaterName": tableSub[i].浜у搧鍚嶇О, "HProcID": tableSub[i].HProcID, "HProcName": tableSub[i].宸ュ簭鍚嶇О,
+                                    }
+                                )
+                            }
+                            option.data = rowdata;
+                            table.render(option);
                         } else {
                             layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
                         }
@@ -684,7 +727,7 @@
                     }
                 });
             }
-       
+
 
             //鍒ゆ柇鏄惁鏂板
             if (linterid == null || linterid == 0) {
@@ -709,7 +752,7 @@
                 $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
             }
 
-              //鑾峰彇涓嬫媺閫変腑鍊�
+            //鑾峰彇涓嬫媺閫変腑鍊�
             form.on('select(SourceType)', function (data) {
                 Sctag = data.value;
                 form.render('select');
@@ -751,9 +794,20 @@
 
             //淇濆瓨鎻愪氦
             form.on('submit(Saver)', function (data) {
-                
+
+                //鑾峰彇瀛愯〃鏁版嵁
+                var num = [];
+                for (var i = 0; i < table.cache["mainTable"].length; i++) {
+                    if (table.cache["mainTable"][i] != "") {
+                        table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
+                        num.push(table.cache["mainTable"][i])
+                    }
+                }
+
+                //瀛愯〃鏁版嵁搴忓垪鍖�
+                var sSubStr = JSON.stringify(num);
                 var sMainStr = JSON.stringify(data.field);
-                var sMainSub = sMainStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
+                var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
                 if (!AllowLoadData())//鏁版嵁楠岃瘉
                 {
                     return false;
@@ -830,8 +884,7 @@
             });
 
             //瀹℃牳鎻愪氦
-            function SaveVerify()
-            {
+            function SaveVerify() {
                 var InterID = $("#HInterID").val();
                 if (!AllowLoadData())//鏁版嵁楠岃瘉
                 {
@@ -859,7 +912,7 @@
                     }
                 })
             }
-           
+
 
             //閫�鍑�
             form.on('submit(Exit)', function (data) {
@@ -1062,6 +1115,293 @@
                 });
             });
 
+            //#region 瀛愯〃锛氬ご宸ュ叿鏍忎簨浠�
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                //鏂板琛岃〃鏍兼暟鎹�
+                var NewRow =
+                {
+                    "HMaterID": "0"
+                    , "HMaterName": ""
+                    , "HProcID": "0"
+                    , "HProcName": ""
+                    , "HRelationBillInterID": "0"
+                    , "HRelationBillEntryID": "0"
+                    , "HRelationBillType": ""
+                    , "HRelationBillNo": ""
+                    , "HICMOInterID": "0"
+                    , "HICMOEntryID": "0"
+                    , "HICMOBillNo": ""
+                    , "HProcExchInterID": "0"
+                    , "HProcExchEntryID": "0"
+                    , "HProcExchBillNo": ""
+                    , "HRemark": ""
+                    , "HSourceInterID": "0"
+                    , "HSourceEntryID": "0"
+                    , "HSourceBillNo": ""
+                    , "HSourceBillType": ""
+                };
+                switch (obj.event) {
+                    case 'btn-AddLine':
+                        table.cache["mainTable"].push(NewRow);
+                        option.data = table.cache["mainTable"];
+                        table.render(option);
+
+                        break;
+                    case 'btn-CopyLine':
+                        var copydata = JSON.stringify(data);
+                        if (data.length <= 0) {
+                            layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                        }
+                        else if (data.length > 1) {
+                            layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                        }
+                        else {
+                            var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+                            var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+                            table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+                            option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+                        }
+                        break;
+                    //涓婁竴琛�
+                    case 'btn_up':
+                        btn_up(data);
+                        break;
+                    //涓嬩竴琛�
+                    case 'btn_under':
+                        btn_under(data);
+                        break;
+                }
+            });
+            //#endregion
+
+            //#region 瀛愯〃锛氳鍐呬簨浠�
+            table.on('tool(mainTable)', function (obj) {
+                set_GridDelete(obj);   //琛屽唴鍒犻櫎
+                set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+
+            });
+            //#endregion
+
+            //#region 璁″垝琛ㄥ垵濮嬪寲
+            function get_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , limit: 100
+                    , totalRow: true
+                    , cellMinWidth: 120
+                    , height: 400
+                    , cols: [[
+                        { type: 'checkbox', totalRowText: '鍚堣琛�' }
+                        , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HRelationBillInterID', title: '鍏宠仈鍓骇璁″垝鍗曞唴鐮�', hide: true }
+                        , { field: 'HRelationBillEntryID', title: '鍏宠仈鍓骇璁″垝鍗曞瓙鍐呯爜', hide: true }
+                        , { field: 'HRelationBillType', title: '鍏宠仈鍓骇璁″垝鍗曠被鍨�', hide: true }
+                        , { field: 'HRelationBillNo', title: '鍏宠仈鍓骇璁″垝鍗�', edit: 'text', event: "HRelationBillNo" }
+                        , { field: 'HMaterID', title: 'HMaterID', event: "HMaterID", hide: true }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HProcID', title: 'HProcID', edit: 'text', hide: true }
+                        , { field: 'HProcName', title: '宸ュ簭鍚嶇О', edit: 'text', event: "HProcID" }
+                        , { field: 'HICMOInterID', title: '鐢熶骇璁㈠崟鍐呯爜', hide: true }
+                        , { field: 'HICMOEntryID', title: '鐢熶骇璁㈠崟瀛愬唴鐮�', hide: true }
+                        , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟鍙�', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HProcExchInterID', title: '宸ュ簭娴佽浆鍗″唴鐮�', hide: true }
+                        , { field: 'HProcExchEntryID', title: '宸ュ簭娴佽浆鍗″瓙鍐呯爜', hide: true }
+                        , { field: 'HProcExchBillNo', title: '宸ュ簭娴佽浆鍗″彿', templet: "#HProcExchInterID" }
+                        , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+                        , { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', hide: true }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', hide: true }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', hide: true }
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', hide: true }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+                    ]]
+                }
+
+                var rowdata = [
+                    {
+                        "HMaterID": "0"
+                        , "HMaterName": ""
+                        , "HProcID": "0"
+                        , "HProcName": ""
+                        , "HRelationBillInterID": "0"
+                        , "HRelationBillEntryID": "0"
+                        , "HRelationBillType": ""
+                        , "HRelationBillNo": ""
+                        , "HICMOInterID": "0"
+                        , "HICMOEntryID": "0"
+                        , "HICMOBillNo": ""
+                        , "HProcExchInterID": "0"
+                        , "HProcExchEntryID": "0"
+                        , "HProcExchBillNo": ""
+                        , "HRemark": ""
+                        , "HSourceInterID": "0"
+                        , "HSourceEntryID": "0"
+                        , "HSourceBillNo": ""
+                        , "HSourceBillType": ""
+                    }
+                ];
+                option.data = rowdata;
+                table.render(option);
+                form.render('select');
+            }
+            //#endregion
+
+
+            //#region 瀛愯〃锛氬垹闄ゆ寚瀹氳
+            function set_GridDelete(obj) {
+                var data = obj.data;
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+                        console.log("绱㈠紩涓�:" + rowIndex);
+                        if (rowIndex === '0') {
+                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                        } else {
+                            var oldData = table.cache["mainTable"];
+                            oldData.splice(obj.tr.data('index'), 1)
+                            option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option);
+                            for (var i = 0; i < oldData.length; i++) {
+                                $('#HICMOBillNo' + (i + 1)).find("option[value='" + oldData[i].HICMOBillNo + "']").attr("selected", true);
+                            }
+                            form.render('select');
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+            //#endregion
+
+            //#region 瀛愯〃锛氬揩鎹烽敭(F7)鎵撳紑寮圭獥
+            function set_GridCellCheck(obj) {
+                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+                    if (event.key == "F7") {
+                        if (obj.event == "HRelationBillNo") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim"                           //鍔犱笂杈规
+                                , title: "鍓骇璁″垝鍗�"                             //鏍囬
+                                , closeBtn: 1                                       //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2                                          //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"]                              //绐椾綋澶у皬
+                                , maxmin: true                                      //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../../views/Baseset/鍩虹璧勬枡/Sc_ProcessExchangeBillListView.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("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                    }
+                                    if ($("#HMaterName").val() == checkStatus.data[0].浜у搧 && $("#HProcName").val() == checkStatus.data[0].宸ュ簭) {
+                                        obj.update({
+                                            "HProcExchInterID": checkStatus.data[0].hmainid
+                                            , "HProcExchEntryID": checkStatus.data[0].hsubid
+                                            , "HProcExchBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HRelationBillInterID": checkStatus.data[0].hmainid
+                                            , "HRelationBillEntryID": checkStatus.data[0].hsubid
+                                            , "HRelationBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HICMOInterID": checkStatus.data[0].hicmointerid
+                                            , "HICMOEntryID": checkStatus.data[0].HICMOEntryID
+                                            , "HICMOBillNo": checkStatus.data[0].鐢熶骇璁㈠崟鍙�
+                                            , "HMaterID": checkStatus.data[0].HMaterID
+                                            , "HMaterName": checkStatus.data[0].浜у搧
+                                            , "HProcID": checkStatus.data[0].HProcID
+                                            , "HProcName": checkStatus.data[0].宸ュ簭
+                                            , "HSourceInterID": checkStatus.data[0].hmainid
+                                            , "HSourceEntryID": checkStatus.data[0].hsubid
+                                            , "HSourceBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HSourceBillType": 3772
+
+                                        })
+                                    }
+                                    else {
+                                        return layer.msg("閫夋嫨鍓骇璁″垝鍗曠殑鐗╂枡涓庡伐搴�,璺熷綋鍓嶅伐鍗曚笉鍖归厤");
+                                    }
+
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , btn2: function (index, layero) { }
+                                , end: function () {
+                                    if ($("#HMaterName").val() == OptionData[0].浜у搧 && $("#HProcName").val() == OptionData[0].宸ュ簭) {
+                                        obj.update({
+                                            "HProcExchInterID": OptionData[0].hmainid
+                                            , "HProcExchEntryID": OptionData[0].hsubid
+                                            , "HProcExchBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HRelationBillInterID": OptionData[0].hmainid
+                                            , "HRelationBillEntryID": OptionData[0].hsubid
+                                            , "HRelationBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HICMOInterID": OptionData[0].hicmointerid
+                                            , "HICMOEntryID": OptionData[0].HICMOEntryID
+                                            , "HICMOBillNo": OptionData[0].鐢熶骇璁㈠崟鍙�
+                                            , "HMaterID": OptionData[0].HMaterID
+                                            , "HMaterName": OptionData[0].浜у搧
+                                            , "HProcID": OptionData[0].HProcID
+                                            , "HProcName": OptionData[0].宸ュ簭
+                                            , "HSourceInterID": OptionData[0].hmainid
+                                            , "HSourceEntryID": OptionData[0].hsubid
+                                            , "HSourceBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HSourceBillType": 3772
+
+                                        })
+                                    } else {
+                                        return layer.msg("閫夋嫨鍓骇璁″垝鍗曠殑鐗╂枡涓庡伐搴�,璺熷綋鍓嶅伐鍗曚笉鍖归厤");
+                                    }
+
+                                    OptionData = [];
+                                }
+                            })
+                        }
+                        if (obj.event == "HProcID") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim"                           //鍔犱笂杈规
+                                , title: "鍓骇璁″垝鍗�"                             //鏍囬
+                                , closeBtn: 1                                       //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2                                          //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"]                              //绐椾綋澶у皬
+                                , maxmin: true                                      //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../../views/鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.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("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                    }
+                                    if ($("#HProcName").val() == checkStatus.data[0].宸ュ簭鍚嶇О) {
+                                        obj.update({
+                                            "HProcID": checkStatus.data[0].HItemID
+                                            , "HProcName": checkStatus.data[0].宸ュ簭鍚嶇О
+
+                                        })
+                                    } else {
+                                        return layer.msg("閫夋嫨鐨勫伐搴�,璺熷綋鍓嶅伐鍗曠殑宸ュ簭涓嶅尮閰�");
+                                    }
+
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , btn2: function (index, layero) { }
+                                , end: function () {
+
+                                }
+                            })
+                        }
+                        obj.event = "";
+                        return false;
+                    }
+                })
+            }
+            //#endregion
+
 
             //浠ヤ笂涓簂ayui妯″潡
         });
@@ -1080,7 +1420,7 @@
                 layer.msg("浜у搧缂栫爜涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return Result = false;
             }
-            if ($("#HBeginDate").val() == '' || $("#HBeginDate").val() == null) {
+            if ($("#HBeginWorkTime").val() == '' || $("#HBeginWorkTime").val() == null) {
                 layer.msg("寮�宸ユ椂闂翠笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return Result = false;
             }
@@ -1107,6 +1447,27 @@
                     return Result = false;
                 }
             }
+            //#region 瀛愯〃 鏁版嵁妫�楠�
+
+            for (var i = 0; i < option.data.length; i++) {
+
+                if (typeof option.data[i] !== 'object' || option.data[i] === null || Array.isArray(option.data[i])) {
+                    continue; // 璺宠繃闈炲璞¢」锛堝绌烘暟缁勶級
+                }
+
+                if (option.data[i]["HRelationBillNo"] == "") {
+                    layer.msg("绗�" + i + "琛岋細鍓骇璁″垝鍗曟湭閫夋嫨锛�");
+                    return false;
+                }
+
+                if (option.data[i]["HProcID"] == "0") {
+                    layer.msg("绗�" + i + "琛岋細宸ュ簭鏈�夋嫨锛�");
+                    return false;
+                }
+
+
+            }
+            //#endregion
             return Result;
         }
 
@@ -1136,6 +1497,10 @@
             $("#HDeptName").val(obj[0].閮ㄩ棬鍚嶇О);
             $("#HDeptID").val(obj[0].HItemID);
         }
+        //娴佽浆鍗�
+        function GetProcExValue(obj) {
+            OptionData = obj;
+        }
     </script>
 </body>
 </html>
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
index 2a87db1..f19dc61 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
@@ -101,7 +101,7 @@
                                             <li class="layui-this">鍩烘湰淇℃伅</li>
                                             <li>鍒跺崟淇℃伅</li>
                                         </ul>
-                                        <div class="layui-tab-content" style="height: 700px;">
+                                        <div class="layui-tab-content" style="height: 400px;">
                                             <div class="layui-tab-item layui-show">
                                                 <div class="layui-form-item">
                                                     <div class="layui-inline">
@@ -109,7 +109,7 @@
                                                         <div class="layui-input-inline">
                                                             <input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" disabled autocomplete="off">
                                                             <input id="HInterID" name="HInterID" type="hidden" />
-                                                           
+
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
@@ -154,7 +154,7 @@
                                                     <div class="layui-inline">
                                                         <label class="layui-form-label">寮�宸ユ椂闂�:</label>
                                                         <div class="layui-input-inline">
-                                                            <input class="layui-input" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+                                                            <input class="layui-input" name="HBeginWorkTime" id="HBeginWorkTime" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
@@ -310,6 +310,23 @@
                                         </div>
                                     </div>
                                 </div>
+                                <div class="layui-tab" lay-filter="tab-POStockInBill">
+                                    <ul class="layui-tab-title" lay-filter="tab-all">
+                                        <li lay-id="1" style="padding:1px;" class="layui-this">璁″垝鍗�</li>
+                                    </ul>
+                                    <div class="layui-tab-content">
+                                        <!--瀛愯〃-->
+                                        <div class="layui-tab-item layui-show">
+                                            <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                                            <script type="text/html" id="toolbarDemo">
+                                                <div class="layui-btn-container">
+                                                    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                                                    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+                                                </div>
+                                            </script>
+                                        </div>
+                                    </div>
+                                </div>
                             </div>
                         </div>
                     </form>
@@ -370,6 +387,8 @@
                 $("#HEmpName").val(sessionStorage["HEmpName"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鎿嶄綔鍛�
                 $("#HGroupID").val(sessionStorage["HGroupID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鐝粍ID
                 $("#HGroupName").val(sessionStorage["HGroup"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鐝粍
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_AddFNew();
             }
             else if (OperationType == 2) {//鏈夋簮鍗�
@@ -377,10 +396,13 @@
                 $("#HEmpName").val(sessionStorage["HEmpName"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鎿嶄綔鍛�
                 $("#HGroupID").val(sessionStorage["HGroupID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鐝粍ID
                 $("#HGroupName").val(sessionStorage["HGroup"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鐝粍
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_AddNew();
             }
             else if (OperationType == 3) {//缂栬緫
-          
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_EditFromGrid();
             }
             else {
@@ -391,7 +413,7 @@
             function set_InitFrom() {
                 //鏃ユ湡鏃堕棿閫夋嫨鍣�
                 laydate.render({
-                    elem: '#HBeginDate'
+                    elem: '#HBeginWorkTime'
                     , type: 'datetime'
                 });
                 laydate.render({
@@ -431,12 +453,14 @@
 
             }
 
+
+
             //鏈夋簮鍗曟柊澧�
             function set_AddNew() {
                 refSav = "Add";
                 //鍒濆鍩烘湰淇℃伅璧嬪��
                 $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //鍗曟嵁鏃ユ湡
-                $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
+                $("#HBeginWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
                 $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //鍒跺崟鏃ユ湡
                 $("#HMaker").val(sessionStorage["HUserName"]);     //鍒跺崟浜�
 
@@ -446,7 +470,7 @@
                 $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMaterName').attr("disabled", true);
                 $('#HMaterSpec').attr("disabled", true);
-                $('#HBeginDate').attr("disabled", true);
+                $('#HBeginWorkTime').attr("disabled", true);
                 $('#HSourceName').attr("disabled", true);
                 $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMainSourceBillNo').attr("disabled", true);
@@ -510,7 +534,7 @@
                 $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMaterName').attr("disabled", true);
                 $('#HMaterSpec').attr("disabled", true);
-                $('#HBeginDate').attr("disabled", true);
+                $('#HBeginWorkTime').attr("disabled", true);
                 $('#HSourceName').attr("disabled", true);
                 $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMainSourceBillNo').attr("disabled", true);
@@ -530,18 +554,19 @@
                     success: function (result) {
 
                         if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            var data = result.data.h_v_Sc_MESBeginWorkBillList_NEW[0];
+                            var data = result.data.h_v_Sc_MESBeginWorkBillList_Edit[0];
+                            var tableSub = result.data.h_v_Sc_MESBeginWorkBillList_Edit;
                             form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
                                 "HInterID": data.hmainid
                                 , "HBillNo": data.鍗曟嵁鍙�
-                                , "HDate": formatDate(data.鏃ユ湡)
+                                , "HDate": Format(data.鏃ユ湡)
                                 , "HProcID": data.HProcID
                                 , "HProcName": data.宸ュ簭鍚嶇О
                                 , "HMaterID": data.HMaterID
                                 , "HMaterCode": data.浜у搧浠g爜
                                 , "HMaterName": data.浜у搧鍚嶇О
                                 , "HMaterSpec": data.瑙勬牸鍨嬪彿
-                                , "HBeginDate": data.寮�宸ユ椂闂�
+                                , "HBeginWorkTime": Format(data.寮�宸ユ椂闂�)
                                 , "HSourceID": data.HSourceID              //璧勬簮ID
                                 , "HSourceName": data.璧勬簮鍚嶇О             //璧勬簮鍚嶇О
                                 , "HEmpID": data.HEmpID                   //鎿嶄綔鍛業D
@@ -570,6 +595,20 @@
                                 , "HDeleteDate": data.浣滃簾鏃ユ湡       //浣滃簾鏃ユ湡
 
                             });
+                            //瀛愯〃  璧嬪��
+                            var rowdata = [];
+                            for (var i = 0; i < tableSub.length; i++) {
+                                rowdata.push(
+                                    {
+                                        "HRelationBillInterID": tableSub[i].HRelationBillInterID, "HRelationBillEntryID": tableSub[i].HRelationBillEntryID, "HRelationBillNo": tableSub[i].HRelationBillNo, "HRelationBillType": tableSub[i].HRelationBillType,
+                                        "HICMOInterID": tableSub[i].鐢熶骇璁㈠崟鍐呯爜, "HICMOEntryID": tableSub[i].鐢熶骇璁㈠崟瀛愬唴鐮�, "HICMOBillNo": tableSub[i].鐢熶骇璁㈠崟, "HRemark": tableSub[i].澶囨敞,
+                                        "HProcExchInterID": tableSub[i].HProcExchInterID, "HProcExchEntryID": tableSub[i].HProcExchEntryID, "HProcExchBillNo": tableSub[i].HProcExchBillNo,
+                                        "HMaterID": tableSub[i].HMaterID, "HMaterName": tableSub[i].浜у搧鍚嶇О, "HProcID": tableSub[i].HProcID, "HProcName": tableSub[i].宸ュ簭鍚嶇О,
+                                    }
+                                )
+                            }
+                            option.data = rowdata;
+                            table.render(option);
 
                         } else {
                             layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
@@ -873,8 +912,294 @@
             });
 
 
-            //浠ヤ笂涓簂ayui妯″潡
-        });
+            //#region 瀛愯〃锛氬ご宸ュ叿鏍忎簨浠�
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                //鏂板琛岃〃鏍兼暟鎹�
+                var NewRow =
+                {
+                    "HMaterID": "0"
+                    , "HMaterName": ""
+                    , "HProcID": "0"
+                    , "HProcName": ""
+                    , "HRelationBillInterID": "0"
+                    , "HRelationBillEntryID": "0"
+                    , "HRelationBillType": ""
+                    , "HRelationBillNo": ""
+                    , "HICMOInterID": "0"
+                    , "HICMOEntryID": "0"
+                    , "HICMOBillNo": ""
+                    , "HProcExchInterID": "0"
+                    , "HProcExchEntryID": "0"
+                    , "HProcExchBillNo": ""
+                    , "HRemark": ""
+                    , "HSourceInterID": "0"
+                    , "HSourceEntryID": "0"
+                    , "HSourceBillNo": ""
+                    , "HSourceBillType": ""
+                };
+                switch (obj.event) {
+                    case 'btn-AddLine':
+                        table.cache["mainTable"].push(NewRow);
+                        option.data = table.cache["mainTable"];
+                        table.render(option);
+
+                        break;
+                    case 'btn-CopyLine':
+                        var copydata = JSON.stringify(data);
+                        if (data.length <= 0) {
+                            layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                        }
+                        else if (data.length > 1) {
+                            layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                        }
+                        else {
+                            var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+                            var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+                            table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+                            option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�                                                   
+                        }
+                        break;
+                    //涓婁竴琛�
+                    case 'btn_up':
+                        btn_up(data);
+                        break;
+                    //涓嬩竴琛�
+                    case 'btn_under':
+                        btn_under(data);
+                        break;
+                }
+            });
+            //#endregion
+
+            //#region 瀛愯〃锛氳鍐呬簨浠�
+            table.on('tool(mainTable)', function (obj) {
+                set_GridDelete(obj);   //琛屽唴鍒犻櫎
+                set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+
+            });
+            //#endregion
+
+            //#region 璁″垝琛ㄥ垵濮嬪寲
+            function get_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , limit: 100
+                    , totalRow: true
+                    , cellMinWidth: 120
+                    , height: 400
+                    , cols: [[
+                        { type: 'checkbox', totalRowText: '鍚堣琛�' }
+                        , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HRelationBillInterID', title: '鍏宠仈鍓骇璁″垝鍗曞唴鐮�', hide: true }
+                        , { field: 'HRelationBillEntryID', title: '鍏宠仈鍓骇璁″垝鍗曞瓙鍐呯爜', hide: true }
+                        , { field: 'HRelationBillType', title: '鍏宠仈鍓骇璁″垝鍗曠被鍨�', hide: true }
+                        , { field: 'HRelationBillNo', title: '鍏宠仈鍓骇璁″垝鍗�', edit: 'text', event: "HRelationBillNo" }
+                        , { field: 'HMaterID', title: 'HMaterID', event: "HMaterID", hide: true }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HProcID', title: 'HProcID', edit: 'text', hide: true }
+                        , { field: 'HProcName', title: '宸ュ簭鍚嶇О', edit: 'text', event: "HProcID" }
+                        , { field: 'HICMOInterID', title: '鐢熶骇璁㈠崟鍐呯爜', hide: true }
+                        , { field: 'HICMOEntryID', title: '鐢熶骇璁㈠崟瀛愬唴鐮�', hide: true }
+                        , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟鍙�', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HProcExchInterID', title: '宸ュ簭娴佽浆鍗″唴鐮�', hide: true }
+                        , { field: 'HProcExchEntryID', title: '宸ュ簭娴佽浆鍗″瓙鍐呯爜', hide: true }
+                        , { field: 'HProcExchBillNo', title: '宸ュ簭娴佽浆鍗″彿', templet: "#HProcExchInterID" }
+                        , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+                        , { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', hide: true }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', hide: true }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', hide: true }
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', hide: true }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+                    ]]
+                }
+
+                var rowdata = [
+                    {
+                        "HMaterID": "0"
+                        , "HMaterName": ""
+                        , "HProcID": "0"
+                        , "HProcName": ""
+                        , "HRelationBillInterID": "0"
+                        , "HRelationBillEntryID": "0"
+                        , "HRelationBillType": ""
+                        , "HRelationBillNo": ""
+                        , "HICMOInterID": "0"
+                        , "HICMOEntryID": "0"
+                        , "HICMOBillNo": ""
+                        , "HProcExchInterID": "0"
+                        , "HProcExchEntryID": "0"
+                        , "HProcExchBillNo": ""
+                        , "HRemark": ""
+                        , "HSourceInterID": "0"
+                        , "HSourceEntryID": "0"
+                        , "HSourceBillNo": ""
+                        , "HSourceBillType": ""
+                    }
+                ];
+                option.data = rowdata;
+                table.render(option);
+                form.render('select');
+            }
+            //#endregion
+
+
+            //#region 瀛愯〃锛氬垹闄ゆ寚瀹氳
+            function set_GridDelete(obj) {
+                var data = obj.data;
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+                        console.log("绱㈠紩涓�:" + rowIndex);
+                        if (rowIndex === '0') {
+                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                        } else {
+                            var oldData = table.cache["mainTable"];
+                            oldData.splice(obj.tr.data('index'), 1)
+                            option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option);
+                            for (var i = 0; i < oldData.length; i++) {
+                                $('#HICMOBillNo' + (i + 1)).find("option[value='" + oldData[i].HICMOBillNo + "']").attr("selected", true);
+                            }
+                            form.render('select');
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+            //#endregion
+
+            //#region 瀛愯〃锛氬揩鎹烽敭(F7)鎵撳紑寮圭獥
+            function set_GridCellCheck(obj) {
+                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+                    if (event.key == "F7") {
+                        if (obj.event == "HRelationBillNo") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim"                           //鍔犱笂杈规
+                                , title: "鍓骇璁″垝鍗�"                             //鏍囬
+                                , closeBtn: 1                                       //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2                                          //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"]                              //绐椾綋澶у皬
+                                , maxmin: true                                      //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../../views/Baseset/鍩虹璧勬枡/Sc_ProcessExchangeBillListView.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("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                    }
+                                    if ($("#HMaterName").val() == checkStatus.data[0].浜у搧 && $("#HProcName").val() == checkStatus.data[0].宸ュ簭) {
+                                        obj.update({
+                                            "HProcExchInterID": checkStatus.data[0].hmainid
+                                            , "HProcExchEntryID": checkStatus.data[0].hsubid
+                                            , "HProcExchBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HRelationBillInterID": checkStatus.data[0].hmainid
+                                            , "HRelationBillEntryID": checkStatus.data[0].hsubid
+                                            , "HRelationBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HICMOInterID": checkStatus.data[0].hicmointerid
+                                            , "HICMOEntryID": checkStatus.data[0].HICMOEntryID
+                                            , "HICMOBillNo": checkStatus.data[0].鐢熶骇璁㈠崟鍙�
+                                            , "HMaterID": checkStatus.data[0].HMaterID
+                                            , "HMaterName": checkStatus.data[0].浜у搧
+                                            , "HProcID": checkStatus.data[0].HProcID
+                                            , "HProcName": checkStatus.data[0].宸ュ簭
+                                            , "HSourceInterID": checkStatus.data[0].hmainid
+                                            , "HSourceEntryID": checkStatus.data[0].hsubid
+                                            , "HSourceBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HSourceBillType": 3772
+
+                                        })
+                                    }
+                                    else {
+                                        return layer.msg("閫夋嫨鍓骇璁″垝鍗曠殑鐗╂枡涓庡伐搴�,璺熷綋鍓嶅伐鍗曚笉鍖归厤");
+                                    }
+
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , btn2: function (index, layero) { }
+                                , end: function () {
+                                    if ($("#HMaterName").val() == OptionData[0].浜у搧 && $("#HProcName").val() == OptionData[0].宸ュ簭) {
+                                        obj.update({
+                                            "HProcExchInterID": OptionData[0].hmainid
+                                            , "HProcExchEntryID": OptionData[0].hsubid
+                                            , "HProcExchBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HRelationBillInterID": OptionData[0].hmainid
+                                            , "HRelationBillEntryID": OptionData[0].hsubid
+                                            , "HRelationBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HICMOInterID": OptionData[0].hicmointerid
+                                            , "HICMOEntryID": OptionData[0].HICMOEntryID
+                                            , "HICMOBillNo": OptionData[0].鐢熶骇璁㈠崟鍙�
+                                            , "HMaterID": OptionData[0].HMaterID
+                                            , "HMaterName": OptionData[0].浜у搧
+                                            , "HProcID": OptionData[0].HProcID
+                                            , "HProcName": OptionData[0].宸ュ簭
+                                            , "HSourceInterID": OptionData[0].hmainid
+                                            , "HSourceEntryID": OptionData[0].hsubid
+                                            , "HSourceBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HSourceBillType": 3772
+
+                                        })
+                                    } else {
+                                        return layer.msg("閫夋嫨鍓骇璁″垝鍗曠殑鐗╂枡涓庡伐搴�,璺熷綋鍓嶅伐鍗曚笉鍖归厤");
+                                    }
+
+                                    OptionData = [];
+                                }
+                            })
+                        }
+                        if (obj.event == "HProcID") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim"                           //鍔犱笂杈规
+                                , title: "鍓骇璁″垝鍗�"                             //鏍囬
+                                , closeBtn: 1                                       //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2                                          //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"]                              //绐椾綋澶у皬
+                                , maxmin: true                                      //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../../views/鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.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("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                    }
+                                    if ($("#HProcName").val() == checkStatus.data[0].宸ュ簭鍚嶇О) {
+                                        obj.update({
+                                            "HProcID": checkStatus.data[0].HItemID
+                                            , "HProcName": checkStatus.data[0].宸ュ簭鍚嶇О
+
+                                        })
+                                    } else {
+                                        return layer.msg("閫夋嫨鐨勫伐搴�,璺熷綋鍓嶅伐鍗曠殑宸ュ簭涓嶅尮閰�");
+                                    }
+
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , btn2: function (index, layero) { }
+                                , end: function () {
+
+                                }
+                            })
+                        }
+                        obj.event = "";
+                        return false;
+                    }
+                })
+            }
+            //#endregion
+
+        
 
         function AllowLoadData() {  //闈炵┖楠岃瘉
             var Result = true;
@@ -890,7 +1215,7 @@
                 layer.msg("浜у搧缂栫爜涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return Result = false;
             }
-            if ($("#HBeginDate").val() == '' || $("#HBeginDate").val() == null) {
+            if ($("#HBeginWorkTime").val() == '' || $("#HBeginWorkTime").val() == null) {
                 layer.msg("寮�宸ユ椂闂翠笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return Result = false;
             }
@@ -968,11 +1293,22 @@
                 }
             })
         }
-
+        //淇濆瓨
         function save(data) {
             var index = layer.load();
+            //鑾峰彇瀛愯〃鏁版嵁
+            var num = [];
+            for (var i = 0; i < table.cache["mainTable"].length; i++) {
+                if (table.cache["mainTable"][i] != "") {
+                    table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
+                    num.push(table.cache["mainTable"][i])
+                }
+            }
+
+            //瀛愯〃鏁版嵁搴忓垪鍖�
+            var sSubStr = JSON.stringify(num);
             var sMainStr = JSON.stringify(data.field);
-            var sMainSub = sMainStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
+            var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
             if (!AllowLoadData())//鏁版嵁楠岃瘉
             {
                 return false;
@@ -1024,7 +1360,8 @@
                 }
             })
         }
-
+            //浠ヤ笂涓簂ayui妯″潡
+        });
         function formatDate(date) {
             var d = new Date(date),
                 month = '' + (d.getMonth() + 1),
@@ -1051,6 +1388,10 @@
         function GetSwipeCardStart(obj) {
             OptionData[0] = obj;
         }
+        //娴佽浆鍗�
+        function GetProcExValue(obj) {
+            OptionData = obj;
+        }
     </script>
 </body>
 </html>
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210/OA_ErrMsgBackSelfQuery.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210/OA_ErrMsgBackSelfQuery.html"
index 84c7842..3ecc103 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210/OA_ErrMsgBackSelfQuery.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210/OA_ErrMsgBackSelfQuery.html"
@@ -48,6 +48,7 @@
                         </div>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-XTReception-in" id="btn-XTReception-in"><i class="layui-icon layui-icon-radio"></i>涓嬫帹寮傚父鍙嶉鎺ユ敹鍗�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-XTSign-in" id="btn-XTSign-in"><i class="layui-icon layui-icon-radio"></i>涓嬫帹寮傚父鍙嶉绛惧埌鍗�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-XTReceive" id="btn-XTReceive"><i class="layui-icon layui-icon-radio"></i>涓嬫帹寮傚父鍙嶉澶勭悊鍗�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-View" id="btn-View"><i class="layui-icon layui-icon-radio"></i>鏌ョ湅</button>
@@ -107,7 +108,7 @@
             var titleData = ["HInterID", "HEntryID", "HDeptID", "HRecDeptID", "HHandleEmpID","HErrMsgBackTypeID"];
             //鍒濆鍖栫晫闈�
             set_ClearBill();
-            //#endregion         
+            //#endregion
 
             //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
             function set_ClearBill() {
@@ -123,6 +124,9 @@
 
             table.on('toolbar(mainTable_receive)', function (obj) {
                 switch (obj.event) {
+                    //涓嬫帹寮傚父鍙嶉鎺ユ敹鍗�
+                    case 'btn-XTReception-in': XTReception();
+                        break;
                     //涓嬫帹寮傚父鍙嶉绛惧埌鍗�
                     case 'btn-XTSign-in': XTSign();
                         break;
@@ -146,13 +150,13 @@
                 };
             });
             table.on('toolbar(mainTable_copy)', function (obj) {
-                switch (obj.event) {                   
+                switch (obj.event) {
                     //鏌ョ湅
                     case 'btn-View2': View();
                         break;
                 };
             });
-         
+
 
             //鍒濆鍖栨帴鏀跺垪琛�
             function set_InitGrid_notStart() {
@@ -187,7 +191,7 @@
             //鍒濆鍖栨妱閫佸垪琛�
             function set_InitGrid_copy() {
                 option_copy = {
-                    elem: '#mainTable_copy'                  
+                    elem: '#mainTable_copy'
                     , page: false
                     , height: 500
                     , totalRow: true
@@ -195,7 +199,7 @@
                     , limit: Number.MAX_VALUE//榛樿鏄剧ず鍏ㄩ儴
                     , cols: []
                 };
-            }         
+            }
 
             //#region 鏌ヨ
             function get_Display(sWhere) {
@@ -279,7 +283,7 @@
                             }
                             table.render(option_copy);
 
-                          
+
 
                             //鍒锋柊鎸夐挳鏄剧ず
                             var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
@@ -320,6 +324,29 @@
             }
             //#endregion
 
+            //涓嬫帹寮傚父鍙嶉鎺ユ敹鍗�
+            function XTReception() {
+                var checkStatus = table.checkStatus('mainTable_receive')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var HInterID = data[0].HInterID.toString();
+                    var HEntryID = data[0].HEntryID.toString();
+                    layer.open({
+                        type: 2
+                        , skin: 'layui-layer-rim' //鍔犱笂杈规
+                        , area: ['100%', '100%']
+                        , title: '鏂板寮傚父鍙嶉绛惧埌鍗�'
+                        , shift: 0//寮瑰嚭鍔ㄧ敾
+                        , content: '../../鐢熶骇绠$悊/寮傚父鍙嶉鍗�/OA_ErrMsgBackReceiveBillMain.html?OperationType=2&linterid=' + HInterID + '&HEntryID=' + HEntryID + '&HSouceBillType=' + 4502 + ''
+                        , btn: [],
+                        end: function (index, layero, that) {
+                            //鍒锋柊椤甸潰
+                            $("#btnSearch").trigger('click');
+                        }
+                    })
+                }
+            }
+
             //涓嬫帹寮傚父鍙嶉澶勭悊鍗�
             function XTReceive() {
                 var checkStatus = table.checkStatus('mainTable_receive')
@@ -341,7 +368,7 @@
                         }
                     })
                 }
-            }      
+            }
 
             //涓嬫帹寮傚父鍙嶉绛惧埌鍗�
             function XTSign() {
@@ -429,7 +456,7 @@
             }
             //#endregion
 
-       
+
             // 鑾峰彇鏍囩
             function getActiveTab() {
                 var tabs = document.getElementsByClassName("layui-tab-title")[0].getElementsByTagName("li");
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_BadProductsReport.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_BadProductsReport.html"
new file mode 100644
index 0000000..8ef66db
--- /dev/null
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_BadProductsReport.html"
@@ -0,0 +1,674 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <title>涓嶈壇鍝佸彴璐�</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/HideButton.js"></script>
+    <script src="../../../layuiadmin/soulTable.slim.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
+    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <div class="layui-colla-title layui-inline">
+                                    <div class="layui-inline">
+                                        <span>鏇村</span>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鏃ユ湡闂撮殧</label>
+                                    <div class="layui-input-block">
+                                        <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鐗╂枡浠g爜</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber" style="width:215px;">
+                                    </div>
+                                </div>
+                                <div class="layui-row" style="margin-top:5px;margin-left:82px;margin-bottom:5px;">
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">瑙勬牸鍨嬪彿</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HMaterModel" id="HMaterModel" style="width:215px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">鍙戠幇宸ュ簭</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HProcessName" id="HProcessName" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">澶勭疆鏂瑰紡</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HDealingType" id="HDealingType" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">鐧昏浜�</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HSendManName" id="HSendManName" style="width:100px;">
+                                        </div>
+                                    </div>
+                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                    </button>
+                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                                </div>
+                                <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
+                                    <div class="layui-row" style="margin-top:10px;margin-left:5%;">
+
+                                    </div>
+                                    <div class="layui-row" style="margin-top: 10px; margin-bottom: 10px ">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style=" margin-top: 10px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+                                        </div>
+                                    </div>
+
+                                    <div class="layui-row" style=" margin-top: 10px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="layui-tab layui-tab-card">
+                            <div class="layui-tab-content">
+                                <div class="layui-tab-item layui-show">
+                                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                                </div>
+                            </div>
+                        </div>
+                        <script type="text/html" id="toolbarDemo">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                            </div>
+                        </script>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+</body>
+</html>
+<script>
+    layui.config({
+        base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+    }).extend({
+        index: 'lib/index', //涓诲叆鍙fā鍧�
+    }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+
+        //#region 鍏叡鍙橀噺
+        var $ = layui.$
+            , admin = layui.admin
+            , layer = layui.layer
+            , table = layui.table
+            , form = layui.form
+            , element = layui.element
+            , laypage = layui.laypage
+            , laydate = layui.laydate
+            , soulTable = layui.soulTable
+        var sWhere = "";
+        var option = [];
+        var HModName = "QC_BadProductsReport";
+        var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+        //#endregion
+
+        //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+        //鍒濆鍖栬〃鏍�
+        DisPlay_HideColumn();
+        //鍒濆鍖栫晫闈�
+        set_ClearBill();
+
+        //#endregion
+
+        //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+        // 澶村伐鍏锋爮浜嬩欢
+        table.on('toolbar(mainTable)', function (obj) {
+            switch (obj.event) {
+                //鍒楄缃�
+                case 'set_HideColumn': get_HideColumn();
+                    break;
+            };
+        });
+
+        //鏌ヨ鎸夐挳
+        form.on('submit(btnSearch)', function (data) {
+            get_FastQuery();
+        });
+
+        //閲嶇疆
+        form.on('submit(btnReSearch)', function (data) {
+            set_ClearQuery();
+        });
+
+        //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉
+        form.on('select(HInitTimeCycle)', function (data) {
+            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+            //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+            if (HInitTimeCycle != -1) {
+                $('#HBeginDate').prop('disabled', true);
+                $('#HEndDate').prop('disabled', true);
+
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+                //鎵ц鏌ヨ鏂规硶
+                get_FastQuery();
+            } else {
+                $('#HBeginDate').prop('disabled', false);
+                $('#HEndDate').prop('disabled', false);
+            }
+        });
+
+        //#endregion
+
+        //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+        // 鍒濆鍖栫晫闈�
+        function set_ClearBill() {
+            //鍒濆鍖栨棩鏈熼棿闅斻�佸紑濮嬫棩鏈熴�佺粨鏉熸棩鏈�
+            setSelect_HInitTimeCycle();
+            //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+            if (HInitTimeCycle != -1) {
+                $('#HBeginDate').prop('disabled', true);
+                $('#HEndDate').prop('disabled', true);
+            } else {
+                $('#HBeginDate').prop('disabled', false);
+                $('#HEndDate').prop('disabled', false);
+            }
+
+            //鏍规嵁鏃ユ湡闂撮殧璁剧疆寮�濮嬫椂闂翠笌缁撴潫鏃堕棿
+            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+            //鏌ヨ
+            get_FastQuery();
+        }
+
+        function set_InitGrid() {
+            option = {
+                elem: '#mainTable'
+                , toolbar: '#toolbarDemo'
+                , height: 'full-50'
+                , page: true
+                , totalRow: true
+                , limit: 500
+                , data:[]
+                , limits: [50, 500, 5000, 20000]
+                , cols: []
+            };
+            table.render(option);
+        }
+
+        // 鏌ヨ
+        function get_Display(sWhere) {
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/QC_CustomerAppealReport/QC_BadProductsReport',
+                type: "GET",
+                async: false,
+                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        var data = [];//鍒楀瓧娈垫暟鎹�
+                        var col = [];
+                        var totalArray = ["鏁伴噺", "鍏宠仈鏁伴噺", "鏈叧鑱旀暟閲�", "鎵撳嵃鏉$爜鏁伴噺", "鏈墦鍗版潯鐮佹暟閲�", "瀹炴敹鏁伴噺", "閲戦"];
+                        //缁欑┖鐨勬暟缁勮祴鍊�
+                        for (var key in data1.list) {
+                            data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                        }
+                        //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                        col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                        for (var i = 0; i < data.length; i++) {
+                            // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                            if ($.inArray(data[i].name, titleData) > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            else if ($.inArray(data[i].name, totalArray) > -1) { //璁$畻鍒�
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+                            } else if (data[i].name == '鍗曟嵁鍙�') {//娣诲姞瓒呴摼鎺�
+                                col.push({
+                                    field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '鍗曟嵁鍙�', templet: function (d) {
+                                        return '<span style="color: blue;">' + d.鍗曟嵁鍙� + '</span>'
+                                    }, style: 'cursor: pointer;'
+                                });
+                            } else {
+                                switch (data[i].Type) {
+                                    //int
+                                    case 'DateTime':
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + (data[i].name == "琛屽叧闂棩鏈�" ? "琛屽叧闂汉" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                }
+                            }
+                        }
+
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option = {
+                            elem: '#mainTable'
+                            , toolbar: '#toolbarDemo'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 'full-50'
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option);
+
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+
+                        if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                            ColFilter();
+                        }
+
+                        layer.close(ajaxLoad);
+                        //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        // 蹇�熻繃婊�
+        function get_FastQuery() {
+            var HBeginDate = $("#HBeginDate").val();
+            var HEndDate = $("#HEndDate").val();
+            var HMaterNumber = $("#HMaterNumber").val();
+            var HMaterModel = $("#HMaterModel").val();
+            var HProcessName = $("#HProcessName").val();
+            var HDealingType = $("#HDealingType").val();
+            var HSendManName = $("#HSendManName").val();
+
+            var ColName = $("#ColName").val();//澶嶉�夋
+            var Comparator = $("#Comparator").val()
+            var ColContent = $("#ColContent").val();
+            var ColName1 = $("#ColName1").val();//澶嶉�夋
+            var Comparator1 = $("#Comparator1").val()
+            var ColContent1 = $("#ColContent1").val();
+            var ColName2 = $("#ColName2").val();//澶嶉�夋
+            var Comparator2 = $("#Comparator2").val()
+            var ColContent2 = $("#ColContent2").val();
+
+            if (ColName != 0 && Comparator != 0) {
+                var com = "";
+                switch (Comparator) {
+                    case "7":
+                        com = "like''%" + ColContent + "%''";
+                        break;
+                    case "8":
+                        com = "like''%" + ColContent + "''";
+                        break;
+                    case "9":
+                        com = "like''" + ColContent + "%''";
+                        break;
+                    case "10":
+                        com = "not like''%" + ColContent + "%''";
+                        break;
+                    default:
+                        com = "" + Comparator + "''" + ColContent + "''";
+                        break;
+                }
+                sWhere += " and " + ColName + " " + com;
+            }
+            if (ColName1 != 0 && Comparator1 != 0) {
+                var com1 = "";
+                switch (Comparator1) {
+                    case "7":
+                        com1 = "like''%" + ColContent1 + "%''";
+                        break;
+                    case "8":
+                        com1 = "like''%" + ColContent1 + "''";
+                        break;
+                    case "9":
+                        com1 = "like''" + ColContent1 + "%''";
+                        break;
+                    case "10":
+                        com1 = "not like''%" + ColContent1 + "%''";
+                        break;
+                    default:
+                        com1 = "" + Comparator1 + "''" + ColContent1 + "''";
+                        break;
+                }
+                sWhere += " and " + ColName1 + " " + com1;
+            }
+            if (ColName2 != 0 && Comparator2 != 0) {
+                var com2 = "";
+                switch (Comparator2) {
+                    case "7":
+                        com2 = "like''%" + ColContent2 + "%''";
+                        break;
+                    case "8":
+                        com2 = "like''%" + ColContent2 + "''";
+                        break;
+                    case "9":
+                        com2 = "like''" + ColContent2 + "%''";
+                        break;
+                    case "10":
+                        com2 = "not like''%" + ColContent2 + "%''";
+                        break;
+                    default:
+                        com2 = "" + Comparator2 + "''" + ColContent2 + "''";
+                        break;
+                }
+                sWhere += " and " + ColName2 + " " + com2;
+            }
+
+            sWhere = {
+                HBeginDate: HBeginDate
+                , HEndDate: HEndDate
+                , HMaterNumber: HMaterNumber
+                , HMaterModel: HMaterModel
+                , HProcessName: HProcessName
+                , HDealingType: HDealingType
+                , HSendManName: HSendManName
+                , HCustomize: sWhere
+            }
+            set_InitGrid();
+            get_Display(JSON.stringify(sWhere));
+            sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+        }
+
+        function set_ClearQuery() {
+            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //寮�濮嬫棩鏈�
+            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));  //缁撴潫鏃ユ湡
+            $("#HMaterNumber").val("");
+            $("#HMaterModel").val("");
+            $("#HProcessName").val("");
+            $("#HDealingType").val("");
+            $("#HSendManName").val("");
+            $("#ColContent1").val("");
+            $("#ColName1").val("0");
+            $("#Comparator1").val("0");
+            $("#ColContent2").val("");
+            $("#ColName2").val("0");
+            $("#Comparator2").val("0");
+            $("#ColContent").val("");
+            $("#ColName").val("0");
+            $("#Comparator").val("0");
+            form.render('select');
+
+            sWhere = "";
+        }
+
+        //闅愯棌鍒楄缃�
+        function get_HideColumn() {
+            var colName = "";
+            var contentUrl = "";
+            for (var i = 1; i < option.cols[0].length - 1; i++) {
+                colName += option.cols[0][i]["title"] + ",";
+            }
+            var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+            var urlLen = urlStr.split('/');
+            for (var i = 0; i < urlLen.length - 4; i++) {
+                contentUrl += "../";
+            }
+            colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+            contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+            layer.open({
+                type: 2
+                , skin: "layui-layer-rim" //鍔犱笂杈规
+                , title: "闅愯棌鍒楄缃�"  //鏍囬
+                , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                , shift: 2 //寮瑰嚭鍔ㄧ敾
+                , area: ["50%", "90%"] //绐椾綋澶у皬
+                , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                , content: [contentUrl, "yes"]
+                , btn: ["纭畾", "鍙栨秷"]
+                , btn1: function (index, laero) {
+                    //鍒锋柊琛ㄦ牸鏁版嵁
+                    DisPlay_HideColumn();
+                    //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                    layer.close(index);//鍏抽棴寮圭獥
+                }
+            })
+        }
+
+        //鏄剧ず鍒楁暟鎹�
+        function DisPlay_HideColumn() {
+            $.ajax({
+                url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                type: "GET",
+                data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.data.length != 0) {
+
+
+                        var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+
+
+                        dataCol = data1.data[0].HGridString.split(',');
+
+                        for (var i = 0; i < option.cols[0].length - 2; i++) {
+                            var dataCols = dataCol[i].split('|');
+                            //闅愯棌鍒�
+                            if (dataCols[1] == 1) {
+                                option.cols[0][i + 1]["hide"] = true;
+                            }
+                            //璁剧疆鍒楀
+                            if (dataCols[3] > 0) {
+                                option.cols[0][i + 1]["width"] = dataCols[3];
+                            }
+                            //璁剧疆鍐呭瀛椾綋澶у皬
+                            if (data1.data[0].HFontSize != 0) {
+                                option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                            } else {
+                                option.cols[0][i + 1]["style"] = "font-size:100%";
+                            }
+                            //璁剧疆鍒楀
+                            //if (data1.data[0].HColumnWidth != 0) {
+                            //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+                            //} else {
+                            //    option.cols[0][i + 1]["width"] = "";
+                            //}
+                            //鏄剧ず鍒�
+                            if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+                                option.cols[0][i + 1]["hide"] = false;
+                            }
+                            //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                            switch (dataCols[2]) {
+                                case "L":
+                                    option.cols[0][i + 1]["align"] = "left";
+                                    break;
+                                case "M":
+                                    option.cols[0][i + 1]["align"] = "center";
+                                    break;
+                                case "R":
+                                    option.cols[0][i + 1]["align"] = "right";
+                                    break;
+                            }
+                        }
+
+                        //鍙栨秷鍐荤粨鍒�
+                        for (var i = 1; i < option.cols[0].length - 1; i++) {
+                            if (option.cols[0][i]["fixed"] != null) {
+                                option.cols[0][i]["fixed"] = null;
+                            }
+                            else {
+                                break;
+                            }
+                        }
+                        //鍐荤粨鍒�
+                        if (data1.data[0].HFixCols != 0) {
+                            for (var i = 0; i < data1.data[0].HFixCols; i++) {
+                                if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+                                    data1.data[0].HFixCols += 1;
+                                }
+                                option.cols[0][i + 1]["fixed"] = "left";
+                            }
+                        }
+                        table.render(option);
+                    } else {
+                        table.render(option);
+                    }
+                }, error: function () {
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            })
+        }
+
+        // 鍒楁槑鏄剧ず涓嬫媺妗�
+        function ColFilter() {
+            var Organization = '<option  value="0" selected="selected" ></option>';
+            for (var i = 1; i < option.cols[0].length; i++) {
+                if (option.cols[0][i].hide != true) {
+                    Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+                }
+            }
+            $("#ColName").empty();
+            $("#ColName").append(Organization);     $("#ColName1").empty();
+            $("#ColName1").append(Organization);     $("#ColName2").empty();
+            $("#ColName2").append(Organization);
+            form.render('select');
+        }
+
+        //#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃
+        function setSelect_HInitTimeCycle() {
+            var valueList = [0, 1, 2, 3, 4, 5, 6, 29];
+            var titleList = ["浠婂ぉ", "杩戜袱澶�", "杩戜笁澶�", "杩戝洓澶�", "杩戜簲澶�", "杩戝叚澶�", "杩戜竷澶�", "杩�30澶�"];
+
+            var HInitTimeCycle_ArrayList = '<option  value="-1" selected="selected" >浠绘剰闂撮殧</option>';
+            for (var i = 0; i < valueList.length; i++) {
+                HInitTimeCycle_ArrayList += '<option  style="color:blue;" value="' + valueList[i] + '">' + titleList[i] + '</option>';
+            }
+
+            $("#HInitTimeCycle").empty();
+            $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList);
+            form.render('select');
+
+            $("#HInitTimeCycle").val("29");
+        }
+            //#endregion
+
+        //#endregion
+
+        //浠ヤ笂鏄痩ayui妯″潡
+    });
+
+
+
+
+</script>
\ No newline at end of file
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ErrManagerLedgerReport.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ErrManagerLedgerReport.html"
new file mode 100644
index 0000000..ca90ccd
--- /dev/null
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ErrManagerLedgerReport.html"
@@ -0,0 +1,704 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <title>寮傚父绠$悊鍙拌处</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/HideButton.js"></script>
+    <script src="../../../layuiadmin/soulTable.slim.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
+    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <div class="layui-colla-title layui-inline">
+                                    <div class="layui-inline">
+                                        <span>鏇村</span>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鏃ユ湡闂撮殧</label>
+                                    <div class="layui-input-block">
+                                        <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">閮ㄩ棬</label>
+                                    <div class="layui-input-block" style="width: 190px;">
+                                        <select name="HDeptName" id="HDeptName" lay-verify="HDeptName">
+                                            <!--鍔ㄦ�佹覆鏌撻儴闂�-->
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-row" style="margin-top:5px;margin-left:82px;margin-bottom:5px;">
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">瑙勬牸鍨嬪彿</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HMaterModel" id="HMaterModel" style="width:215px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">鐢熶骇璧勬簮</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HSourceName" id="HSourceName" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">闂鏉ユ簮</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HProSource" id="HProSource" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">鐝</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HShiftsName" id="HShiftsName" style="width:128px;">
+                                        </div>
+                                    </div>
+                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                    </button>
+                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                                </div>
+                                <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
+                                    <div class="layui-row" style="margin-top:10px;margin-left:5%;">
+
+                                    </div>
+                                    <div class="layui-row" style="margin-top: 10px; margin-bottom: 10px ">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style=" margin-top: 10px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+                                        </div>
+                                    </div>
+
+                                    <div class="layui-row" style=" margin-top: 10px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="layui-tab layui-tab-card">
+                            <div class="layui-tab-content">
+                                <div class="layui-tab-item layui-show">
+                                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                                </div>
+                            </div>
+                        </div>
+                        <script type="text/html" id="toolbarDemo">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                            </div>
+                        </script>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+</body>
+</html>
+<script>
+    layui.config({
+        base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+    }).extend({
+        index: 'lib/index', //涓诲叆鍙fā鍧�
+    }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+
+        //#region 鍏叡鍙橀噺
+        var $ = layui.$
+            , admin = layui.admin
+            , layer = layui.layer
+            , table = layui.table
+            , form = layui.form
+            , element = layui.element
+            , laypage = layui.laypage
+            , laydate = layui.laydate
+            , soulTable = layui.soulTable
+        var sWhere = "";
+        var option = [];
+        var HModName = "QC_ErrManagerLedgerReport";
+        var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+        //#endregion
+
+        //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+        //鍒濆鍖栬〃鏍�
+        DisPlay_HideColumn();
+        //鍒濆鍖栫晫闈�
+        set_ClearBill();
+
+        //#endregion
+
+        //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+        // 澶村伐鍏锋爮浜嬩欢
+        table.on('toolbar(mainTable)', function (obj) {
+            switch (obj.event) {
+                //鍒楄缃�
+                case 'set_HideColumn': get_HideColumn();
+                    break;
+            };
+        });
+
+        //鏌ヨ鎸夐挳
+        form.on('submit(btnSearch)', function (data) {
+            get_FastQuery();
+        });
+
+        //閲嶇疆
+        form.on('submit(btnReSearch)', function (data) {
+            set_ClearQuery();
+        });
+
+        //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉
+        form.on('select(HInitTimeCycle)', function (data) {
+            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+            //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+            if (HInitTimeCycle != -1) {
+                $('#HBeginDate').prop('disabled', true);
+                $('#HEndDate').prop('disabled', true);
+
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+                //鎵ц鏌ヨ鏂规硶
+                get_FastQuery();
+            } else {
+                $('#HBeginDate').prop('disabled', false);
+                $('#HEndDate').prop('disabled', false);
+            }
+        });
+
+        //#endregion
+
+        //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+        // 鍒濆鍖栫晫闈�
+        function set_ClearBill() {
+            //鍒濆鍖栨棩鏈熼棿闅斻�佸紑濮嬫棩鏈熴�佺粨鏉熸棩鏈�
+            setSelect_HInitTimeCycle();
+            //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+            if (HInitTimeCycle != -1) {
+                $('#HBeginDate').prop('disabled', true);
+                $('#HEndDate').prop('disabled', true);
+            } else {
+                $('#HBeginDate').prop('disabled', false);
+                $('#HEndDate').prop('disabled', false);
+            }
+
+            //鏍规嵁鏃ユ湡闂撮殧璁剧疆寮�濮嬫椂闂翠笌缁撴潫鏃堕棿
+            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+            DeptName();
+            //鏌ヨ
+            get_FastQuery();
+        }
+
+        //鐢熶骇杞﹂棿
+        function DeptName() {
+            //鑾峰彇杞﹂棿鍒�
+            var HDeptName = '<option value="0" style="color:red;" selected>鍏ㄩ儴杞﹂棿</option>';
+            $.ajax({
+                type: "get",
+                url: GetWEBURL() + "/Sc_ICMOBill/GetHDeptList",
+                async: false,
+                data: { "HOrgID": sessionStorage["OrganizationID"] },
+                success: function (result) {
+                    if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                        var data = result.data;
+                        for (var i = 0; i < data.length; i++) {
+                            if (i == 0)
+                                HDeptName += '<option  style="color:blue;"  value="' + data[i].HItemID + '" >' + data[i].HName + '</option>';
+                            else
+                                HDeptName += '<option  style="color:blue;" value="' + data[i].HItemID + '">' + data[i].HName + '</option>';
+
+                        }
+                        $("#HDeptName").append(HDeptName);
+                        form.render('select');
+                    }
+                    layer.closeAll("loading");
+                }
+            })
+        }
+
+        function set_InitGrid() {
+            option = {
+                elem: '#mainTable'
+                , toolbar: '#toolbarDemo'
+                , height: 'full-50'
+                , page: true
+                , totalRow: true
+                , limit: 500
+                , data:[]
+                , limits: [50, 500, 5000, 20000]
+                , cols: []
+            };
+            table.render(option);
+        }
+
+        // 鏌ヨ
+        function get_Display(sWhere) {
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/QC_CustomerAppealReport/QC_ErrManagerLedgerReport',
+                type: "GET",
+                async: false,
+                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        var data = [];//鍒楀瓧娈垫暟鎹�
+                        var col = [];
+                        var totalArray = ["鏁伴噺", "鍏宠仈鏁伴噺", "鏈叧鑱旀暟閲�", "鎵撳嵃鏉$爜鏁伴噺", "鏈墦鍗版潯鐮佹暟閲�", "瀹炴敹鏁伴噺", "閲戦"];
+                        //缁欑┖鐨勬暟缁勮祴鍊�
+                        for (var key in data1.list) {
+                            data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                        }
+                        //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                        col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                        for (var i = 0; i < data.length; i++) {
+                            // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                            if ($.inArray(data[i].name, titleData) > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            else if ($.inArray(data[i].name, totalArray) > -1) { //璁$畻鍒�
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+                            } else if (data[i].name == '鍗曟嵁鍙�') {//娣诲姞瓒呴摼鎺�
+                                col.push({
+                                    field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '鍗曟嵁鍙�', templet: function (d) {
+                                        return '<span style="color: blue;">' + d.鍗曟嵁鍙� + '</span>'
+                                    }, style: 'cursor: pointer;'
+                                });
+                            } else {
+                                switch (data[i].Type) {
+                                    //int
+                                    case 'DateTime':
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + (data[i].name == "琛屽叧闂棩鏈�" ? "琛屽叧闂汉" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                }
+                            }
+                        }
+
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option = {
+                            elem: '#mainTable'
+                            , toolbar: '#toolbarDemo'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 'full-50'
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option);
+
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+
+                        if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                            ColFilter();
+                        }
+
+                        layer.close(ajaxLoad);
+                        //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        // 蹇�熻繃婊�
+        function get_FastQuery() {
+            var HBeginDate = $("#HBeginDate").val();
+            var HEndDate = $("#HEndDate").val();
+            var HDeptID = $("#HDeptName").val();
+            var HMaterModel = $("#HMaterModel").val();
+            var HSourceName = $("#HSourceName").val();
+            var HProSource = $("#HProSource").val();
+            var HShiftsName = $("#HShiftsName").val();
+
+            var ColName = $("#ColName").val();//澶嶉�夋
+            var Comparator = $("#Comparator").val()
+            var ColContent = $("#ColContent").val();
+            var ColName1 = $("#ColName1").val();//澶嶉�夋
+            var Comparator1 = $("#Comparator1").val()
+            var ColContent1 = $("#ColContent1").val();
+            var ColName2 = $("#ColName2").val();//澶嶉�夋
+            var Comparator2 = $("#Comparator2").val()
+            var ColContent2 = $("#ColContent2").val();
+
+            if (ColName != 0 && Comparator != 0) {
+                var com = "";
+                switch (Comparator) {
+                    case "7":
+                        com = "like''%" + ColContent + "%''";
+                        break;
+                    case "8":
+                        com = "like''%" + ColContent + "''";
+                        break;
+                    case "9":
+                        com = "like''" + ColContent + "%''";
+                        break;
+                    case "10":
+                        com = "not like''%" + ColContent + "%''";
+                        break;
+                    default:
+                        com = "" + Comparator + "''" + ColContent + "''";
+                        break;
+                }
+                sWhere += " and " + ColName + " " + com;
+            }
+            if (ColName1 != 0 && Comparator1 != 0) {
+                var com1 = "";
+                switch (Comparator1) {
+                    case "7":
+                        com1 = "like''%" + ColContent1 + "%''";
+                        break;
+                    case "8":
+                        com1 = "like''%" + ColContent1 + "''";
+                        break;
+                    case "9":
+                        com1 = "like''" + ColContent1 + "%''";
+                        break;
+                    case "10":
+                        com1 = "not like''%" + ColContent1 + "%''";
+                        break;
+                    default:
+                        com1 = "" + Comparator1 + "''" + ColContent1 + "''";
+                        break;
+                }
+                sWhere += " and " + ColName1 + " " + com1;
+            }
+            if (ColName2 != 0 && Comparator2 != 0) {
+                var com2 = "";
+                switch (Comparator2) {
+                    case "7":
+                        com2 = "like''%" + ColContent2 + "%''";
+                        break;
+                    case "8":
+                        com2 = "like''%" + ColContent2 + "''";
+                        break;
+                    case "9":
+                        com2 = "like''" + ColContent2 + "%''";
+                        break;
+                    case "10":
+                        com2 = "not like''%" + ColContent2 + "%''";
+                        break;
+                    default:
+                        com2 = "" + Comparator2 + "''" + ColContent2 + "''";
+                        break;
+                }
+                sWhere += " and " + ColName2 + " " + com2;
+            }
+
+            sWhere = {
+                HBeginDate: HBeginDate
+                , HEndDate: HEndDate
+                , HDeptID: HDeptID
+                , HMaterModel: HMaterModel
+                , HSourceName: HSourceName
+                , HProSource: HProSource
+                , HShiftsName: HShiftsName
+                , HCustomize: sWhere
+            }
+            set_InitGrid();
+            get_Display(JSON.stringify(sWhere));
+            sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+        }
+
+        function set_ClearQuery() {
+            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //寮�濮嬫棩鏈�
+            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));  //缁撴潫鏃ユ湡
+            $("#HDeptName").val("0");
+            $("#HMaterModel").val("");
+            $("#HSourceName").val("");
+            $("#HProSource").val("");
+            $("#HShiftsName").val("");
+            $("#ColContent1").val("");
+            $("#ColName1").val("0");
+            $("#Comparator1").val("0");
+            $("#ColContent2").val("");
+            $("#ColName2").val("0");
+            $("#Comparator2").val("0");
+            $("#ColContent").val("");
+            $("#ColName").val("0");
+            $("#Comparator").val("0");
+            form.render('select');
+
+            sWhere = "";
+        }
+
+        //闅愯棌鍒楄缃�
+        function get_HideColumn() {
+            var colName = "";
+            var contentUrl = "";
+            for (var i = 1; i < option.cols[0].length - 1; i++) {
+                colName += option.cols[0][i]["title"] + ",";
+            }
+            var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+            var urlLen = urlStr.split('/');
+            for (var i = 0; i < urlLen.length - 4; i++) {
+                contentUrl += "../";
+            }
+            colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+            contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+            layer.open({
+                type: 2
+                , skin: "layui-layer-rim" //鍔犱笂杈规
+                , title: "闅愯棌鍒楄缃�"  //鏍囬
+                , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                , shift: 2 //寮瑰嚭鍔ㄧ敾
+                , area: ["50%", "90%"] //绐椾綋澶у皬
+                , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                , content: [contentUrl, "yes"]
+                , btn: ["纭畾", "鍙栨秷"]
+                , btn1: function (index, laero) {
+                    //鍒锋柊琛ㄦ牸鏁版嵁
+                    DisPlay_HideColumn();
+                    //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                    layer.close(index);//鍏抽棴寮圭獥
+                }
+            })
+        }
+
+        //鏄剧ず鍒楁暟鎹�
+        function DisPlay_HideColumn() {
+            $.ajax({
+                url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                type: "GET",
+                data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.data.length != 0) {
+
+
+                        var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+
+
+                        dataCol = data1.data[0].HGridString.split(',');
+
+                        for (var i = 0; i < option.cols[0].length - 2; i++) {
+                            var dataCols = dataCol[i].split('|');
+                            //闅愯棌鍒�
+                            if (dataCols[1] == 1) {
+                                option.cols[0][i + 1]["hide"] = true;
+                            }
+                            //璁剧疆鍒楀
+                            if (dataCols[3] > 0) {
+                                option.cols[0][i + 1]["width"] = dataCols[3];
+                            }
+                            //璁剧疆鍐呭瀛椾綋澶у皬
+                            if (data1.data[0].HFontSize != 0) {
+                                option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                            } else {
+                                option.cols[0][i + 1]["style"] = "font-size:100%";
+                            }
+                            //璁剧疆鍒楀
+                            //if (data1.data[0].HColumnWidth != 0) {
+                            //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+                            //} else {
+                            //    option.cols[0][i + 1]["width"] = "";
+                            //}
+                            //鏄剧ず鍒�
+                            if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+                                option.cols[0][i + 1]["hide"] = false;
+                            }
+                            //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                            switch (dataCols[2]) {
+                                case "L":
+                                    option.cols[0][i + 1]["align"] = "left";
+                                    break;
+                                case "M":
+                                    option.cols[0][i + 1]["align"] = "center";
+                                    break;
+                                case "R":
+                                    option.cols[0][i + 1]["align"] = "right";
+                                    break;
+                            }
+                        }
+
+                        //鍙栨秷鍐荤粨鍒�
+                        for (var i = 1; i < option.cols[0].length - 1; i++) {
+                            if (option.cols[0][i]["fixed"] != null) {
+                                option.cols[0][i]["fixed"] = null;
+                            }
+                            else {
+                                break;
+                            }
+                        }
+                        //鍐荤粨鍒�
+                        if (data1.data[0].HFixCols != 0) {
+                            for (var i = 0; i < data1.data[0].HFixCols; i++) {
+                                if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+                                    data1.data[0].HFixCols += 1;
+                                }
+                                option.cols[0][i + 1]["fixed"] = "left";
+                            }
+                        }
+                        table.render(option);
+                    } else {
+                        table.render(option);
+                    }
+                }, error: function () {
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            })
+        }
+
+        // 鍒楁槑鏄剧ず涓嬫媺妗�
+        function ColFilter() {
+            var Organization = '<option  value="0" selected="selected" ></option>';
+            for (var i = 1; i < option.cols[0].length; i++) {
+                if (option.cols[0][i].hide != true) {
+                    Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+                }
+            }
+            $("#ColName").empty();
+            $("#ColName").append(Organization);     $("#ColName1").empty();
+            $("#ColName1").append(Organization);     $("#ColName2").empty();
+            $("#ColName2").append(Organization);
+            form.render('select');
+        }
+
+        //#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃
+        function setSelect_HInitTimeCycle() {
+            var valueList = [0, 1, 2, 3, 4, 5, 6, 29];
+            var titleList = ["浠婂ぉ", "杩戜袱澶�", "杩戜笁澶�", "杩戝洓澶�", "杩戜簲澶�", "杩戝叚澶�", "杩戜竷澶�", "杩�30澶�"];
+
+            var HInitTimeCycle_ArrayList = '<option  value="-1" selected="selected" >浠绘剰闂撮殧</option>';
+            for (var i = 0; i < valueList.length; i++) {
+                HInitTimeCycle_ArrayList += '<option  style="color:blue;" value="' + valueList[i] + '">' + titleList[i] + '</option>';
+            }
+
+            $("#HInitTimeCycle").empty();
+            $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList);
+            form.render('select');
+
+            $("#HInitTimeCycle").val("29");
+        }
+            //#endregion
+
+        //#endregion
+
+        //浠ヤ笂鏄痩ayui妯″潡
+    });
+
+
+
+
+</script>
\ No newline at end of file
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ErrMsgBackBillList.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ErrMsgBackBillList.html"
new file mode 100644
index 0000000..1e50ea0
--- /dev/null
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ErrMsgBackBillList.html"
@@ -0,0 +1,674 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <title>寮傚父绠$悊鍒嗘瀽鎶ヨ〃</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/HideButton.js"></script>
+    <script src="../../../layuiadmin/soulTable.slim.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
+    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <div class="layui-colla-title layui-inline">
+                                    <div class="layui-inline">
+                                        <span>鏇村</span>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鏃ユ湡闂撮殧</label>
+                                    <div class="layui-input-block">
+                                        <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">褰撳墠鐘舵��</label>
+                                    <div class="layui-input-block" style="width: 190px;">
+                                        <select name="HBillStatus" lay-filter="HBillStatus" id="HBillStatus">
+                                            <option value="" selected="selected">鍏ㄩ儴鐘舵��</option>
+                                            <option value="鍒涘缓">鍒涘缓</option>
+                                            <option value="宸插鏍�">宸插鏍�</option>
+                                            <option value="宸插叧闂�">宸插叧闂�</option>
+                                            <option value="宸叉帴鏀�">宸叉帴鏀�</option>
+                                            <option value="宸茬鍒�">宸茬鍒�</option>
+                                            <option value="宸插鐞�">宸插鐞�</option>
+                                            <option value="宸查獙鏀�">宸查獙鏀�</option>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-row" style="margin-top:5px;margin-left:82px;margin-bottom:5px;">
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">鍙戦�佷汉</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HSendMan" id="HSendMan" style="width:215px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">鎺ユ敹浜�</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HReceiveMan" id="HReceiveMan" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">鎶勯�佷汉</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input ForFilteringSchemes" name="HCopyMan" id="HCopyMan" style="width:190px;">
+                                        </div>
+                                    </div>                                   
+                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                    </button>
+                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                                </div>
+                                <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
+                                    <div class="layui-row" style="margin-top:10px;margin-left:5%;">
+
+                                    </div>
+                                    <div class="layui-row" style="margin-top: 10px; margin-bottom: 10px ">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style=" margin-top: 10px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+                                        </div>
+                                    </div>
+
+                                    <div class="layui-row" style=" margin-top: 10px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="layui-tab layui-tab-card">
+                            <div class="layui-tab-content">
+                                <div class="layui-tab-item layui-show">
+                                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                                </div>
+                            </div>
+                        </div>
+                        <script type="text/html" id="toolbarDemo">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                            </div>
+                        </script>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+</body>
+</html>
+<script>
+    layui.config({
+        base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+    }).extend({
+        index: 'lib/index', //涓诲叆鍙fā鍧�
+    }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+
+        //#region 鍏叡鍙橀噺
+        var $ = layui.$
+            , admin = layui.admin
+            , layer = layui.layer
+            , table = layui.table
+            , form = layui.form
+            , element = layui.element
+            , laypage = layui.laypage
+            , laydate = layui.laydate
+            , soulTable = layui.soulTable
+        var sWhere = "";
+        var option = [];
+        var HModName = "OA_ErrMsgBackBillList_Query";
+        var titleData = ["HInterID", "HErrMsgBackTypeID", "HDeptID", "HHandleEmpID"];//琛ㄤ笉闇�瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+        //#endregion
+
+        //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+        //鍒濆鍖栬〃鏍�
+        DisPlay_HideColumn();
+        //鍒濆鍖栫晫闈�
+        set_ClearBill();
+
+        //#endregion
+
+        //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+        // 澶村伐鍏锋爮浜嬩欢
+        table.on('toolbar(mainTable)', function (obj) {
+            switch (obj.event) {
+                //鍒楄缃�
+                case 'set_HideColumn': get_HideColumn();
+                    break;
+            };
+        });
+
+        //鏌ヨ鎸夐挳
+        form.on('submit(btnSearch)', function (data) {
+            get_FastQuery();
+        });
+
+        //閲嶇疆
+        form.on('submit(btnReSearch)', function (data) {
+            set_ClearQuery();
+        });
+
+        //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉
+        form.on('select(HInitTimeCycle)', function (data) {
+            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+            //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+            if (HInitTimeCycle != -1) {
+                $('#HBeginDate').prop('disabled', true);
+                $('#HEndDate').prop('disabled', true);
+
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+                //鎵ц鏌ヨ鏂规硶
+                get_FastQuery();
+            } else {
+                $('#HBeginDate').prop('disabled', false);
+                $('#HEndDate').prop('disabled', false);
+            }
+        });
+
+        //#endregion
+
+        //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+        // 鍒濆鍖栫晫闈�
+        function set_ClearBill() {
+            //鍒濆鍖栨棩鏈熼棿闅斻�佸紑濮嬫棩鏈熴�佺粨鏉熸棩鏈�
+            setSelect_HInitTimeCycle();
+            //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+            if (HInitTimeCycle != -1) {
+                $('#HBeginDate').prop('disabled', true);
+                $('#HEndDate').prop('disabled', true);
+            } else {
+                $('#HBeginDate').prop('disabled', false);
+                $('#HEndDate').prop('disabled', false);
+            }
+
+            //鏍规嵁鏃ユ湡闂撮殧璁剧疆寮�濮嬫椂闂翠笌缁撴潫鏃堕棿
+            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+            //鍒濆鍖栬〃
+            set_InitGrid();
+            //鏌ヨ
+            get_FastQuery();
+        }
+    
+        function set_InitGrid() {
+            option = {
+                elem: '#mainTable'
+                , toolbar: '#toolbarDemo'
+                , height: 'full-50'
+                , page: true
+                , totalRow: true
+                , limit: 500
+                , data:[]
+                , limits: [50, 500, 5000, 20000]
+                , cols: []
+            };
+            table.render(option);
+        }
+
+        // 鏌ヨ
+        function get_Display(sWhere) {
+
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/QC_CustomerAppealReport/getOA_ErrMsgBackBillList_Query',
+                type: "GET",
+                async: false,
+                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        var data = [];//鍒楀瓧娈垫暟鎹�
+                        var col = [];
+                        
+                        //缁欑┖鐨勬暟缁勮祴鍊�
+                        for (var key in data1.list) {
+                            data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                        }
+                        //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                        col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                        for (var i = 0; i < data.length; i++) {
+                            if ($.inArray(data[i].name, titleData) > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                           else {
+                                switch (data[i].Type) {
+                                    //int
+                                    case 'DateTime':
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + (data[i].name == "琛屽叧闂棩鏈�" ? "琛屽叧闂汉" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                }
+                            }
+                        }
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        option = {
+                            elem: '#mainTable'
+                            , toolbar: '#toolbarDemo'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 'full-50'
+                            , page: true
+                            , totalRow: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , done: function (res, curr, count) {
+                                soulTable.render(this);
+                            }
+                        }
+                        table.render(option);
+
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+
+                        if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                            ColFilter();
+                        }
+
+                        layer.close(ajaxLoad);
+                        //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        // 蹇�熻繃婊�
+        function get_FastQuery() {
+            var HBeginDate = $("#HBeginDate").val();
+            var HEndDate = $("#HEndDate").val();
+            var HBillStatus = $("#HBillStatus").val();
+            var HSendMan = $("#HSendMan").val();
+            var HReceiveMan = $("#HReceiveMan").val();
+            var HCopyMan = $("#HCopyMan").val();
+
+            var ColName = $("#ColName").val();//澶嶉�夋
+            var Comparator = $("#Comparator").val()
+            var ColContent = $("#ColContent").val();
+            var ColName1 = $("#ColName1").val();//澶嶉�夋
+            var Comparator1 = $("#Comparator1").val()
+            var ColContent1 = $("#ColContent1").val();
+            var ColName2 = $("#ColName2").val();//澶嶉�夋
+            var Comparator2 = $("#Comparator2").val()
+            var ColContent2 = $("#ColContent2").val();
+
+            if (ColName != 0 && Comparator != 0) {
+                var com = "";
+                switch (Comparator) {
+                    case "7":
+                        com = "like'%" + ColContent + "%'";
+                        break;
+                    case "8":
+                        com = "like'%" + ColContent + "'";
+                        break;
+                    case "9":
+                        com = "like'" + ColContent + "%'";
+                        break;
+                    case "10":
+                        com = "not like'%" + ColContent + "%'";
+                        break;
+                    default:
+                        com = "" + Comparator + "'" + ColContent + "'";
+                        break;
+                }
+                sWhere += " and " + ColName + " " + com;
+            }
+            if (ColName1 != 0 && Comparator1 != 0) {
+                var com1 = "";
+                switch (Comparator1) {
+                    case "7":
+                        com1 = "like'%" + ColContent1 + "%'";
+                        break;
+                    case "8":
+                        com1 = "like'%" + ColContent1 + "'";
+                        break;
+                    case "9":
+                        com1 = "like'" + ColContent1 + "%'";
+                        break;
+                    case "10":
+                        com1 = "not like'%" + ColContent1 + "%'";
+                        break;
+                    default:
+                        com1 = "" + Comparator1 + "'" + ColContent1 + "'";
+                        break;
+                }
+                sWhere += " and " + ColName1 + " " + com1;
+            }
+            if (ColName2 != 0 && Comparator2 != 0) {
+                var com2 = "";
+                switch (Comparator2) {
+                    case "7":
+                        com2 = "like'%" + ColContent2 + "%'";
+                        break;
+                    case "8":
+                        com2 = "like'%" + ColContent2 + "'";
+                        break;
+                    case "9":
+                        com2 = "like'" + ColContent2 + "%'";
+                        break;
+                    case "10":
+                        com2 = "not like'%" + ColContent2 + "%'";
+                        break;
+                    default:
+                        com2 = "" + Comparator2 + "'" + ColContent2 + "'";
+                        break;
+                }
+                sWhere += " and " + ColName2 + " " + com2;
+            }
+
+            if (HBeginDate) {
+                sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HBeginDate + "'";
+            }
+            if (HEndDate) {
+                sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HEndDate + "'";
+            }
+            if (HBillStatus) {
+                sWhere += " and 褰撳墠鐘舵�� like '%" + HBillStatus + "%'";
+            }
+            if (HSendMan) {
+                sWhere += " and 鍙戦�佷汉 like '%" + HSendMan + "%'";
+            }
+            if (HReceiveMan) {
+                sWhere += " and 鎺ユ敹浜� like '%" + HReceiveMan + "%'";
+            }
+            if (HCopyMan) {
+                sWhere += " and 鎶勯�佷汉 like '%" + HCopyMan + "%'";
+            }
+            get_Display(sWhere);
+            sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+        }
+
+        function set_ClearQuery() {
+            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //寮�濮嬫棩鏈�
+            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));  //缁撴潫鏃ユ湡          
+            $("#HBillStatus").val("");
+            $("#HSendMan").val("");
+            $("#HReceiveMan").val("");
+            $("#HCopyMan").val("");
+            $("#ColContent1").val("");
+            $("#ColName1").val("0");
+            $("#Comparator1").val("0");
+            $("#ColContent2").val("");
+            $("#ColName2").val("0");
+            $("#Comparator2").val("0");
+            $("#ColContent").val("");
+            $("#ColName").val("0");
+            $("#Comparator").val("0");
+            form.render('select');
+
+            sWhere = "";
+        }
+
+        //闅愯棌鍒楄缃�
+        function get_HideColumn() {
+            var colName = "";
+            var contentUrl = "";
+            for (var i = 1; i < option.cols[0].length - 1; i++) {
+                colName += option.cols[0][i]["title"] + ",";
+            }
+            var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+            var urlLen = urlStr.split('/');
+            for (var i = 0; i < urlLen.length - 4; i++) {
+                contentUrl += "../";
+            }
+            colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+            contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+            layer.open({
+                type: 2
+                , skin: "layui-layer-rim" //鍔犱笂杈规
+                , title: "闅愯棌鍒楄缃�"  //鏍囬
+                , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                , shift: 2 //寮瑰嚭鍔ㄧ敾
+                , area: ["50%", "90%"] //绐椾綋澶у皬
+                , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                , content: [contentUrl, "yes"]
+                , btn: ["纭畾", "鍙栨秷"]
+                , btn1: function (index, laero) {
+                    //鍒锋柊琛ㄦ牸鏁版嵁
+                    DisPlay_HideColumn();
+                    //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                    layer.close(index);//鍏抽棴寮圭獥
+                }
+            })
+        }
+
+        //鏄剧ず鍒楁暟鎹�
+        function DisPlay_HideColumn() {
+            $.ajax({
+                url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                type: "GET",
+                data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                success: function (data1) {
+                    if (data1.data.length != 0) {
+
+
+                        var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+
+
+                        dataCol = data1.data[0].HGridString.split(',');
+
+                        for (var i = 0; i < option.cols[0].length - 2; i++) {
+                            var dataCols = dataCol[i].split('|');
+                            //闅愯棌鍒�
+                            if (dataCols[1] == 1) {
+                                option.cols[0][i + 1]["hide"] = true;
+                            }
+                            //璁剧疆鍒楀
+                            if (dataCols[3] > 0) {
+                                option.cols[0][i + 1]["width"] = dataCols[3];
+                            }
+                            //璁剧疆鍐呭瀛椾綋澶у皬
+                            if (data1.data[0].HFontSize != 0) {
+                                option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                            } else {
+                                option.cols[0][i + 1]["style"] = "font-size:100%";
+                            }
+                            //璁剧疆鍒楀
+                            //if (data1.data[0].HColumnWidth != 0) {
+                            //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+                            //} else {
+                            //    option.cols[0][i + 1]["width"] = "";
+                            //}
+                            //鏄剧ず鍒�
+                            if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+                                option.cols[0][i + 1]["hide"] = false;
+                            }
+                            //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                            switch (dataCols[2]) {
+                                case "L":
+                                    option.cols[0][i + 1]["align"] = "left";
+                                    break;
+                                case "M":
+                                    option.cols[0][i + 1]["align"] = "center";
+                                    break;
+                                case "R":
+                                    option.cols[0][i + 1]["align"] = "right";
+                                    break;
+                            }
+                        }
+
+                        //鍙栨秷鍐荤粨鍒�
+                        for (var i = 1; i < option.cols[0].length - 1; i++) {
+                            if (option.cols[0][i]["fixed"] != null) {
+                                option.cols[0][i]["fixed"] = null;
+                            }
+                            else {
+                                break;
+                            }
+                        }
+                        //鍐荤粨鍒�
+                        if (data1.data[0].HFixCols != 0) {
+                            for (var i = 0; i < data1.data[0].HFixCols; i++) {
+                                if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+                                    data1.data[0].HFixCols += 1;
+                                }
+                                option.cols[0][i + 1]["fixed"] = "left";
+                            }
+                        }
+                        table.render(option);
+                    } else {
+                        table.render(option);
+                    }
+                }, error: function () {
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            })
+        }
+
+        // 鍒楁槑鏄剧ず涓嬫媺妗�
+        function ColFilter() {
+            var Organization = '<option  value="0" selected="selected" ></option>';
+            for (var i = 1; i < option.cols[0].length; i++) {
+                if (option.cols[0][i].hide != true) {
+                    Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+                }
+            }
+            $("#ColName").empty();
+            $("#ColName").append(Organization);     $("#ColName1").empty();
+            $("#ColName1").append(Organization);     $("#ColName2").empty();
+            $("#ColName2").append(Organization);
+            form.render('select');
+        }
+
+        //#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃
+        function setSelect_HInitTimeCycle() {
+            var valueList = [0, 1, 2, 3, 4, 5, 6, 29];
+            var titleList = ["浠婂ぉ", "杩戜袱澶�", "杩戜笁澶�", "杩戝洓澶�", "杩戜簲澶�", "杩戝叚澶�", "杩戜竷澶�", "杩�30澶�"];
+
+            var HInitTimeCycle_ArrayList = '<option  value="-1" selected="selected" >浠绘剰闂撮殧</option>';
+            for (var i = 0; i < valueList.length; i++) {
+                HInitTimeCycle_ArrayList += '<option  style="color:blue;" value="' + valueList[i] + '">' + titleList[i] + '</option>';
+            }
+
+            $("#HInitTimeCycle").empty();
+            $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList);
+            form.render('select');
+
+            $("#HInitTimeCycle").val("29");
+        }
+            //#endregion
+
+        //#endregion
+
+        //浠ヤ笂鏄痩ayui妯″潡
+    });
+
+
+
+
+</script>
\ No newline at end of file
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
index 5a3bb52..5e4bbd6 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
@@ -116,11 +116,11 @@
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs4 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>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
@@ -152,18 +152,19 @@
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" class="layui-input" name="HProcExchHinteID" id="HProcExchHinteID">
+                                                <input type="hidden" class="layui-input" name="HProcPlanEntryID" id="HProcPlanEntryID">
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs4 layui-inline">
-            <label class="layui-form-label">褰撳墠宸ュ簭</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="HProcName" id="HProcName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
-                <input type="hidden" name="HProcID" id="HProcID" value="0">
-                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="HSQProcID-BT" id="HSQProcID-BT" style="width: 40px; padding: 0 10px;">
-                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
-                </button>
-            </div>
-        </div>-->
+                                            <label class="layui-form-label">褰撳墠宸ュ簭</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HProcName" id="HProcName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+                                                <input type="hidden" name="HProcID" id="HProcID" value="0">
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="HSQProcID-BT" id="HSQProcID-BT" style="width: 40px; padding: 0 10px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                </button>
+                                            </div>
+                                        </div>-->
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">鏈嚭绔欐暟閲�</label>
                                             <div class="layui-input-block">
@@ -189,12 +190,12 @@
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs4 layui-inline">
-            <label class="layui-form-label">鏍哥畻宸ュ簭</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="HPayProcID" id="HPayProcID" style="background-color:#efefef4d;" readonly>
-                <input type="hidden" value="0" name="HPayProcID" id="HPayProcID">
-            </div>
-        </div>-->
+                                            <label class="layui-form-label">鏍哥畻宸ュ簭</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HPayProcID" id="HPayProcID" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" value="0" name="HPayProcID" id="HPayProcID">
+                                            </div>
+                                        </div>-->
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label"></label>
                                             <div class="layui-input-inline">
@@ -298,17 +299,17 @@
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs4 layui-inline">
-            <label class="layui-form-label">宸ユ椂</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="HWorkTimes" id="HWorkTimes" value="0">
-            </div>
-        </div>
-        <div class="layui-col-xs4 layui-inline">
-            <label class="layui-form-label">璁惧娓呭崟</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="HSourceNameList" id="HSourceNameList" 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="HWorkTimes" id="HWorkTimes" value="0">
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">璁惧娓呭崟</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HSourceNameList" id="HSourceNameList" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>-->
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
@@ -337,14 +338,36 @@
                                                 <input type="text" class="layui-input" value="0" name="HBackWorkByMaterQty" style="width:190px;" id="HBackWorkByMaterQty" onfocus="this.select();">
                                             </div>
                                         </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label" >妯″叿缂栧彿</label>
+                                            <div class="layui-input-block" >
+                                                <input type="text" class="layui-input" name="HMouldNo" id="HMouldNo" value="" style="width: 190px;" readonly>
+                                                <input type="hidden" class="layui-input" name="HMouldID" id="HMouldID" value="0">
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label" >妯″叿鍚嶇О</label>
+                                            <div class="layui-input-block" >
+                                                <input type="text" class="layui-input" name="HMouldName" id="HMouldName" value="" style="width: 190px;" readonly>
+                                            </div>
+                                        </div>
+
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label" >妯″叿鍨嬪彿</label>
+                                            <div class="layui-input-block" >
+                                                <input type="text" class="layui-input" name="HModel" id="HModel" value="" style="width: 190px;" readonly>
+                                            </div>
+                                        </div>
                                     </div>
                                     <div class="layui-row">
                                         <!--<div class="layui-col-xs8 layui-inline">
-            <label class="layui-form-label">澶囨敞</label>
-            <div class="layui-input-block">
-                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style=" width: 75%;">
-            </div>
-        </div>-->
+                                            <label class="layui-form-label">澶囨敞</label>
+                                            <div class="layui-input-block">
+                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style=" width: 75%;">
+                                            </div>
+                                        </div>-->
                                     </div>
                                 </div>
                             </div>
@@ -845,7 +868,7 @@
                 //绂佺敤宸ュ簾鏁伴噺锛屾枡搴熸暟閲忓瓧娈�
                 if ($("#HWasterQty").val() > 0) {
                     $("#HWasterQty_Work").attr("disabled", "disabled");
-                    $("#HWasterQty_Mater").attr("disabled", "disabled");                    
+                    $("#HWasterQty_Mater").attr("disabled", "disabled");
                     document.getElementById('HWasterQty_Work').style.backgroundColor = '#efefef4d';
                     document.getElementById('HWasterQty_Mater').style.backgroundColor = '#efefef4d';
                 } else {
@@ -912,6 +935,10 @@
                                 "HToCheckQty": data.鍙栨牱鏁伴噺,
                                 "HLossQty": data.閬楀け鏁伴噺,
                                 "HBackWorkByMaterQty": data.鏂欏簾杩斿伐鏁伴噺,
+                                "HMouldID": data.HMouldID,
+                                "HMouldNo": data.妯″叿缂栫爜,
+                                "HMouldName": data.妯″叿鍚嶇О,
+                                "HModel": data.妯″叿鍨嬪彿,
                             });
                             if (data.鏄惁瀹℃牳 == "true") {
                                 $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);//瀹℃牳鎸夐挳绂佺敤
@@ -1091,6 +1118,7 @@
                                         "lngBillKey": data.hmainid,
                                         "HProcExchBillNo": data.鍗曟嵁鍙�,
                                         "HProcExchHinteID": data.hmainid,
+                                        "HProcPlanEntryID": data.hsubid,
                                         "HICMOQty": data.浠诲姟鍗曟暟閲�,
                                         "HOrderProcNO": data.璁㈠崟璺熻釜鍙�,
                                         "HPRDOrgID": data.缁勭粐
@@ -1156,6 +1184,9 @@
                                         , height: 500
                                     }
                                     table.render(option)
+
+                                    getHModel($('#HProcExchHinteID').val(), $('#HProcPlanEntryID').val(), $('#HProcExchBillNo').val());
+
                                     break;
                             }
                             //layer.close(index);
@@ -2015,6 +2046,33 @@
                 });
             }
 
+            //鏍规嵁鏉″舰鐮佺殑鏌ュ嚭鐨勬祦杞崱涓诲瓙id+娴佽浆鍗� 鎵惧嚭瀵瑰簲鐨勬ā鍏�
+            function getHModel(HInterID, HEntryID, HBillNo) {
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/Cj_StationOutBill_CurrentWork/getHModelList",
+                    async: false,
+                    data: { "HInterID": HInterID, "HEntryID": HEntryID, "HBillNo": HBillNo },
+                    dataType: "json",
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            $("#HMouldID").val(data1.data[0]["HMouldID"]);
+                            $("#HMouldNo").val(data1.data[0]["妯″叿缂栫爜"]);
+                            $("#HMouldName").val(data1.data[0]["妯″叿鍚嶇О"]);
+                            $("#HModel").val(data1.data[0]["妯″叿鍨嬪彿"]);
+                        }
+                        else {
+                            layer.close(indexs);
+                            layer.msg(data1.Message);
+                        }
+                    },
+                    error: function (err) {
+                        layer.close(indexs);
+                        layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    }
+                });
+            }
+
             //姹囨姤
             function GetInStorage() {
                 var InterID = $("#HInterID").val();
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill_CurrentWork.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill_CurrentWork.html"
index 06ae8d3..f29538d 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill_CurrentWork.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill_CurrentWork.html"
@@ -23,8 +23,8 @@
             <div class="layui-card" style="padding: 1px">
                 <div class="layui-card-body" style="padding: 1px;">
                     <form class="layui-form" action="" lay-filter="component-form-group">
-                        <div style="width: 65%; height: calc(105vh); float: left; background-color: rgb(255 255 255) ">
-                            <div id="top" style="width:100%;height:calc(40vh);">
+                        <div style="width: 65%; height: calc(135vh); float: left; background-color: rgb(255 255 255) ">
+                            <div id="top" style="width:100%;height:calc(60vh);">
                                 <div id="top-left" style="width: 30%; height: calc(40vh); float: left;">
                                     <div class="layui-inline">
                                         <label class="layui-form-label" style="width: 30px;"><span style="font-weight:bolder">璁惧</span></label>
@@ -258,6 +258,29 @@
                                             </div>
                                         </div>
                                     </div>
+                                    <div class="layui-row" style="margin-bottom: 15px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 65px;">妯″叿缂栧彿</label>
+                                            <div class="layui-input-block" style="margin-left: 95px;">
+                                                <input type="text" class="layui-input" name="HMouldNo" id="HMouldNo" value="" style="width: 150px;" readonly>
+                                                <input type="hidden" class="layui-input" name="HMouldID" id="HMouldID" value="0">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 65px;">妯″叿鍚嶇О</label>
+                                            <div class="layui-input-block" style="margin-left: 95px;">
+                                                <input type="text" class="layui-input" name="HMouldName" id="HMouldName" value="" style="width: 150px;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style="margin-bottom: 15px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 65px;">妯″叿鍨嬪彿</label>
+                                            <div class="layui-input-block" style="margin-left: 95px;">
+                                                <input type="text" class="layui-input" name="HModel" id="HModel" value="" style="width: 150px;" readonly>
+                                            </div>
+                                        </div>                                       
+                                    </div>
                                 </div>
                             </div>
                             <div id="center" style="width: 100%; height: calc(55vh); margin-top: 1%;">
@@ -292,7 +315,7 @@
                                 </div>
                             </div>
                         </div>
-                        <div id="center-right-maintable" style="width: 34%; height: calc(105vh); float: left; margin-left: 0.2%; background-color: rgb(255 255 255) ">
+                        <div id="center-right-maintable" style="width: 34%; height: calc(135vh); float: left; margin-left: 0.2%; background-color: rgb(255 255 255) ">
                             <div class="layui-tab" lay-filter="tab-POStockInBill">
                                 <ul class="layui-tab-title" lay-filter="tab-all">
                                     <li lay-id="1" style="padding:1px;" class="layui-this">鎵爜璁板綍</li>
@@ -300,7 +323,7 @@
                                 <div class="layui-tab-content">
                                     <div class="layui-tab-item layui-show">
                                         <div class="layui-form-item">
-                                            <table class="" id="mainTable" style="width:100%;" lay-filter="mainTable"></table>
+                                            <table class="" id="mainTable" style="width:110%;" lay-filter="mainTable"></table>
                                         </div>
                                     </div>
                                 </div>
@@ -1073,7 +1096,7 @@
                         $("#HICMOQty").val(data1.data[0]["鐢熶骇鏁伴噺"]);
                         $("#HPlanQty").val(data1.data[0]["娴佽浆鍗℃暟閲�"]);
                         $("#HBarCode").val(HBarCode);
-
+                        getHModel(data1.data[0]["hmainid"], data1.data[0]["hsubid"], data1.data[0]["鍗曟嵁鍙�"]);
                     }
                     else {
                         layer.close(indexs);
@@ -1090,6 +1113,33 @@
             });
         }
 
+        //鏍规嵁鏉″舰鐮佺殑鏌ュ嚭鐨勬祦杞崱涓诲瓙id+娴佽浆鍗� 鎵惧嚭瀵瑰簲鐨勬ā鍏�
+        function getHModel(HInterID, HEntryID, HBillNo) {
+            $.ajax({
+                type: "GET",
+                url: GetWEBURL() + "/Cj_StationOutBill_CurrentWork/getHModelList",
+                async: false,
+                data: { "HInterID": HInterID, "HEntryID": HEntryID, "HBillNo": HBillNo},
+                dataType: "json",
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        $("#HMouldID").val(data1.data[0]["HMouldID"]);
+                        $("#HMouldNo").val(data1.data[0]["妯″叿缂栫爜"]);
+                        $("#HMouldName").val(data1.data[0]["妯″叿鍚嶇О"]);
+                        $("#HModel").val(data1.data[0]["妯″叿鍨嬪彿"]);                    
+                    }
+                    else {
+                        layer.close(indexs);
+                        layer.msg(data1.Message);
+                    }                   
+                },
+                error: function (err) {
+                    layer.close(indexs);
+                    layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                }
+            });
+        }
+
         //淇濆瓨
         function Saver(data) {
             if ($("#HProcExchBillNo").val() == "") {

--
Gitblit v1.9.1