From 02d03995b001bc77e909844529dca761e5dc654f Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期三, 11 八月 2021 14:25:08 +0800
Subject: [PATCH] 新增即时库存查询功能、扫码详情删除功能

---
 WebTM/views/领料发货/库存查询/KF_ICInventoryByMaterID.html  |  229 ++
 WebTM/views/验收入库/外购入库/Kf_POStockInBill_Fast.html    | 1457 ++++++++-------
 WebTM/views/领料发货/领料出库/Kf_MateOutBackBill_Fast.html  | 1156 ++++++------
 WebTM/views/验收入库/产品入库/Kf_ProductInBill_Fast.html    | 1034 +++++-----
 WebTM/views/领料发货/销售出库/Kf_SellOutBill_Fast.html      |  322 +-
 WebTM/views/仓库调拨/仓库调拨/Kf_MoveStockBill_Fast.html    | 1173 ++++++------
 WebTM/layuiadmin/Scripts/webConfig.js               |    5 
 WebTM/views/领料发货/领料出库/Kf_MateOutBill_Fast.html      |   30 
 WebTM/views/index.html                              |   74 
 WebTM/views/Baseset/基础资料/WMSBarCodeDetailsList.html |   69 
 WebTM/WebTM.csproj                                  |    1 
 11 files changed, 2,974 insertions(+), 2,576 deletions(-)

diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 1f343e9..e9013f4 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -420,6 +420,7 @@
     <Content Include="views\棰嗘枡鍙戣揣\濮斿鍑哄簱\Kf_EntrustOutBill_Fast.html" />
     <Content Include="views\棰嗘枡鍙戣揣\濮斿鍑哄簱\Kf_EntrustOutBackBill_FastList.html" />
     <Content Include="views\棰嗘枡鍙戣揣\濮斿鍑哄簱\Kf_EntrustOutBill_FastList.html" />
+    <Content Include="views\棰嗘枡鍙戣揣\搴撳瓨鏌ヨ\KF_ICInventoryByMaterID.html" />
     <Content Include="views\棰嗘枡鍙戣揣\閿�鍞嚭搴揬Kf_SellOutBackBill_FastList.html" />
     <Content Include="views\棰嗘枡鍙戣揣\閿�鍞嚭搴揬Kf_SellOutBill_FastList.html" />
     <Content Include="views\棰嗘枡鍙戣揣\閿�鍞嚭搴揬Kf_SellOutBackBill_Fast.html" />
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index e0be535..f79977e 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -1,10 +1,9 @@
 锘縡unction GetWEBURL() {
-    //var WEBURL = "http://61.130.49.162:9090/WMSAPI//";  //寮�灞卞缃�
+    var WEBURL = "http://61.130.49.162:9090/WMSAPI//";  //寮�灞卞缃�
     //var WEBURL = "http://192.168.16.80:8011/";          //鍔炲叕瀹ゆ湇鍔″櫒
     //var WEBURL = "http://192.168.235.1:8011/";          //闄堣埅
     //var WEBURL = "http://192.168.3.7:8011/";            //瀹堕噷鏃犵嚎
-    //var WEBURL = "http://localhost:8086/API";
-    var WEBURL = "http://localhost:8085/API/";   //zgq鏈湴
+    //var WEBURL = "http://localhost:8086/API";//zgq鏈湴
     //61.130.49.162:9090
     //WEBURL = "";
     return WEBURL
diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/WMSBarCodeDetailsList.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/WMSBarCodeDetailsList.html"
index 173854a..e3932a3 100644
--- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/WMSBarCodeDetailsList.html"
+++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/WMSBarCodeDetailsList.html"
@@ -72,6 +72,13 @@
             var params = getUrlVars();
             var HInterID = params[params[0]];
             var HBillType = params[params[1]];
+            var HMaterID = params[params[2]];
+            var HAuxPropID = params[params[3]];
+            var HMTONo = params[params[4]];
+            var HBatchNo = params[params[5]];
+            var HSourceInterID = params[params[6]];
+            var HSourceEntryID = params[params[7]];
+            var sWhere = params[params[8]];
             form.on('submit(FH)', function () {
                 var checkStatus = table.checkStatus('ck-table')
                     , data = checkStatus.data;
@@ -83,7 +90,7 @@
                 var index = parent.layer.getFrameIndex(window.name);
                 parent.layer.close(index);
             });
-            RoadQuery(HInterID, HBillType);
+            RoadQuery();
             table.render({
                 elem: '#mainTable'
                 // , url: '/demo/table/user/'
@@ -93,27 +100,28 @@
                 , height: 'full-1000'
                 , cols: [[
                     { type: 'radio' }
-                    , { field: 'HInterID', width: 150, title: 'HInterID', hide: true }//, hide: true
-                    , { field: 'HBillType', width: 150, title: '鍗曟嵁绫诲瀷' }
-                    , { field: 'HMaterID', width: 150, title: 'HMaterID', hide: true }
-                    , { field: 'HMaterNumber', width: 150, title: '浜у搧缂栫爜' }
-                    , { field: 'HMaterName', width: 150, title: '浜у搧鍚嶇О' }
-                    , { field: 'HMaterModel', width: 150, title: '瑙勬牸鍨嬪彿' }
-                    , { field: 'HQty', width: 150, title: '鏁伴噺' }
-                    , { field: 'HQtyMust', width: 150, title: '搴旀敹鏁伴噺' }
-                    , { field: 'HBatchNo', width: 150, title: '鎵规' }
-                    , { field: 'HPieceQty', width: 150, title: '浠舵暟' }
+                    , { field: 'HMTONo', width: 150, title: 'HMTONo' }//, hide: true
+                    , { field: 'HBatchNo', width: 150, title: 'HBatchNo' }
+                    , { field: 'HBarCode', width: 150, title: 'HBarCode' }
+                    , { field: 'HWHID', width: 150, title: 'HWHID' }
+                    , { field: 'HStockPlaceID', width: 150, title: 'HStockPlaceID' }
+                    , { field: 'HSCWHID', width: 150, title: 'HSCWHID' }
+                    , { field: 'HOutStockPlaceID', width: 150, title: 'HOutStockPlaceID' }
+                    , { field: 'HQty', width: 150, title: 'HQty' }
                     , { fixed: 'right', width: 70, title: '鎿嶄綔', toolbar: '#barDemo' }
                 ]]
                 //, page: true
             });
             ///鍔犺浇鏄剧ず鏁版嵁
-            function RoadQuery(HInterID, HBillType) {
+            function RoadQuery() {
                 $.ajax({
                     type: "get",
                     url: GetWEBURL() + "/Web/GetWMSBarCodeDetailsList",
                     async: true,
-                    data: { "HInterID": HInterID, "HBillType": HBillType },
+                    data: {
+                        "HInterID": HInterID, "HBillType": HBillType, "HMaterID": HMaterID, "HAuxPropID": HAuxPropID, "HMTONo": HMTONo
+                        , "HBatchNo": HBatchNo, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "sWhere": sWhere
+                    },
                     success: function (result) {
                         ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                         table.reload('mainTable', {
@@ -140,7 +148,10 @@
                         $.ajax({
                             url: GetWEBURL() + '/Web/DelCacheList',
                             type: "GET",
-                            data: { "sHitemID": data.HitemID },
+                            data: {
+                                "HInterID": HInterID, "HMaterID": HMaterID, "HAuxPropID": HAuxPropID, "HMTONo": HMTONo, "HBillType": HBillType
+                                ,"HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID
+                            },
                             success: function (data) {
                                 if (data.count == 1) {
                                     layer.close(index);
@@ -160,6 +171,36 @@
                 }
             });
             //浠ヤ笂涓簂ayui妯″潡
+
+
+            //#region 娴嬭瘯鏁版嵁(绮樿创鍒拌皟鐢ㄧ殑妯″潡涓�)
+            //var rowdata = [{
+            //    "HQty": "2", "HQtyMust": "3", "HMaterName": "4", "HMaterNumber": "5"
+            //    , "HMaterModel": "6"
+            //    , "HSourceInterID": "367", "HSourceEntryID": "7", "HSourceBillNo": "8", "HBatchNo": "9"
+            //}];
+            //var option = {
+            //    elem: '#wl-table'
+            //    , height: 'full-1000'
+            //    , cols: [[
+            //        { type: 'radio' }
+            //        , { field: 'HQty', title: '鏁伴噺', width: 80 }
+            //        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+            //        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 90 }
+            //        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 90 }
+            //        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 90 }
+            //        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 90 }
+            //        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 90 }
+            //        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 90 }
+            //        , { field: 'HBatchNo', title: '鎵规', width: 90 }
+            //        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+            //    ]]
+            //    //, page: true
+            //};
+            //option.data = rowdata;
+            //table.render(option);
+            //#endregion 娴嬭瘯鏁版嵁end
+
         });
     </script>
 </body>
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 68069d2..8a194b3 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -111,14 +111,14 @@
                     <cite>楠屾敹鍏ュ簱</cite>
                 </a>
                 <dl class="layui-nav-child">
-                    <dd class="layui-this"><a href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBill_Fast.html" target="main_self_frame">澶栬喘鍏ュ簱</a></dd>
-                    <dd class="layui-this"><a href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBill.html" target="main_self_frame">澶栬喘鍏ュ簱(绾㈠瓧)</a></dd>
-                    <dd class="layui-this"><a href="楠屾敹鍏ュ簱/濮斿鍏ュ簱/Kf_EntrustInBill_Fast.html" target="main_self_frame">濮斿鍏ュ簱</a></dd>
-                    <dd class="layui-this"><a href="楠屾敹鍏ュ簱/濮斿鍏ュ簱/Kf_EntrustInBackBill.html" target="main_self_frame">濮斿鍏ュ簱(绾㈠瓧)</a></dd>
-                    <dd class="layui-this"><a href="楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_Fast.html" target="main_self_frame">浜у搧鍏ュ簱</a></dd>
-                    <dd class="layui-this"><a href="楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBackBill.html" target="main_self_frame">浜у搧鍏ュ簱(绾㈠瓧)</a></dd>
-                    <dd class="layui-this"><a href="楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBill_Fast.html" target="main_self_frame">鍏朵粬鍏ュ簱</a></dd>
-                    <dd class="layui-this"><a href="楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBackBill_Fast.html" target="main_self_frame">鍏朵粬鍏ュ簱(绾㈠瓧)</a></dd>
+                    <dd><a href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBill_Fast.html" target="main_self_frame">澶栬喘鍏ュ簱</a></dd>
+                    <dd><a href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBill.html" target="main_self_frame">澶栬喘鍏ュ簱(绾㈠瓧)</a></dd>
+                    <dd><a href="楠屾敹鍏ュ簱/濮斿鍏ュ簱/Kf_EntrustInBill_Fast.html" target="main_self_frame">濮斿鍏ュ簱</a></dd>
+                    <dd><a href="楠屾敹鍏ュ簱/濮斿鍏ュ簱/Kf_EntrustInBackBill.html" target="main_self_frame">濮斿鍏ュ簱(绾㈠瓧)</a></dd>
+                    <dd><a href="楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_Fast.html" target="main_self_frame">浜у搧鍏ュ簱</a></dd>
+                    <dd><a href="楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBackBill.html" target="main_self_frame">浜у搧鍏ュ簱(绾㈠瓧)</a></dd>
+                    <dd><a href="楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBill_Fast.html" target="main_self_frame">鍏朵粬鍏ュ簱</a></dd>
+                    <dd><a href="楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBackBill_Fast.html" target="main_self_frame">鍏朵粬鍏ュ簱(绾㈠瓧)</a></dd>
                 </dl>
             </li>
               <li data-name="template" class="layui-nav-item">
@@ -127,7 +127,7 @@
                       <cite>鐢熶骇绠$悊</cite>
                   </a>
                       <dl class="layui-nav-child">
-                          <dd class="layui-this"><a href="缁勮鍗�/Sc_AssemblyBill_Fast.html" target="main_self_frame">缁勮鍗�</a></dd>
+                          <dd><a href="缁勮鍗�/Sc_AssemblyBill_Fast.html" target="main_self_frame">缁勮鍗�</a></dd>
                       </dl>
 <!--</a>-->
               </li>
@@ -137,19 +137,19 @@
                       <cite>棰嗘枡鍙戣揣</cite>
                   </a>
                   <dl class="layui-nav-child">
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBill_Fast.html" target="main_self_frame">棰嗘枡鍑哄簱</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBackBill_Fast.html" target="main_self_frame">棰嗘枡鍑哄簱(绾㈠瓧)</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBill_Fast.html" target="main_self_frame">棰嗘枡鍑哄簱</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBackBill_Fast.html" target="main_self_frame">棰嗘枡鍑哄簱(绾㈠瓧)</a></dd>
                       <!--<dd><a>棰嗘枡鏍稿</a></dd>-->
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/濮斿鍑哄簱/Kf_EntrustOutBill_Fast.html" target="main_self_frame">濮斿鍑哄簱</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/濮斿鍑哄簱/Kf_EntrustOutBackBill_Fast.html" target="main_self_frame">濮斿鍑哄簱(绾㈠瓧)</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/濮斿鍑哄簱/Kf_EntrustOutBill_Fast.html" target="main_self_frame">濮斿鍑哄簱</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/濮斿鍑哄簱/Kf_EntrustOutBackBill_Fast.html" target="main_self_frame">濮斿鍑哄簱(绾㈠瓧)</a></dd>
                       <!--<dd><a>濮斿鍑哄簱鏍稿</a></dd>-->
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBill_Fast.html" target="main_self_frame">閿�鍞嚭搴�</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBackBill_Fast.html" target="main_self_frame">閿�鍞嚭搴�(绾㈠瓧)</a></dd>
-                      <dd class ="layui-this"><a href="棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBill_Fast.html" target="main_self_frame">鍏朵粬鍑哄簱</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBackBill_Fast.html" target="main_self_frame">鍏朵粬鍑哄簱(绾㈠瓧)</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBill_Fast.html" target="main_self_frame">閿�鍞嚭搴�</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBackBill_Fast.html" target="main_self_frame">閿�鍞嚭搴�(绾㈠瓧)</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBill_Fast.html" target="main_self_frame">鍏朵粬鍑哄簱</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBackBill_Fast.html" target="main_self_frame">鍏朵粬鍑哄簱(绾㈠瓧)</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/搴撳瓨鏌ヨ/KF_ICInventoryByMaterID.html" target="main_self_frame">搴撳瓨鏌ヨ</a></dd>
                       <!--<dd><a lay-href="缁勮鍗�/Sc_AssemblyBill_Fast.html">缁勮鍗�</a></dd>-->
-                      
-                      <dd><a>鍙楁墭棰嗘枡</a></dd>
+                      <!--<dd><a>鍙楁墭棰嗘枡</a></dd>-->
                   </dl>
               </li>
               <li data-name="template" class="layui-nav-item">
@@ -158,23 +158,23 @@
                       <cite>缂撳瓨鍒楄〃</cite>
                   </a>
                   <dl class="layui-nav-child">
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBill_FastList.html" target="main_self_frame">棰嗘枡鍑哄簱鍗曠紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBill_FastList.html" target="main_self_frame">鍏朵粬鍑哄簱鍗曠紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/濮斿鍑哄簱/Kf_EntrustOutBill_FastList.html" target="main_self_frame">濮斿鍑哄簱鍗曠紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBill_FastList.html" target="main_self_frame">閿�鍞嚭搴撳崟缂撳瓨鍒楄〃</a></dd>
-                      <dd class="layui-this"><a href="楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_FastList.html" target="main_self_frame">浜у搧鍏ュ簱鍗曠紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBill_FastList.html" target="main_self_frame">鍏朵粬鍏ュ簱鍗曠紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBill_FastList.html" target="main_self_frame">澶栬喘鍏ュ簱鍗曠紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="楠屾敹鍏ュ簱/濮斿鍏ュ簱/Kf_EntrustInBill_FastList.html" target="main_self_frame">濮斿鍏ュ簱鍗曠紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="浠撳簱璋冩嫧/浠撳簱璋冩嫧/Kf_MoveStockBill_FastList.html" target="main_self_frame">璋冩嫧鍗曠紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBackBill_FastList.html" target="main_self_frame">棰嗘枡鍑哄簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBackBill_FastList.html" target="main_self_frame">鍏朵粬鍑哄簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/濮斿鍑哄簱/Kf_EntrustOutBackBill_FastList.html" target="main_self_frame">濮斿鍑哄簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBackBill_FastList.html" target="main_self_frame">閿�鍞嚭搴撳崟绾㈠瓧缂撳瓨鍒楄〃</a></dd>
-                      <dd class="layui-this"><a href="楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBackBillList.html" target="main_self_frame">浜у搧鍏ュ簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBackBill_FastList.html" target="main_self_frame">鍏朵粬鍏ュ簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBillList.html" target="main_self_frame">澶栬喘鍏ュ簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
-                      <dd class="layui-this"><a href="楠屾敹鍏ュ簱/濮斿鍏ュ簱/Kf_EntrustInBackBillList.html" target="main_self_frame">濮斿鍏ュ簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd> 
+                      <dd><a href="棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBill_FastList.html" target="main_self_frame">棰嗘枡鍑哄簱鍗曠紦瀛樺垪琛�</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBill_FastList.html" target="main_self_frame">鍏朵粬鍑哄簱鍗曠紦瀛樺垪琛�</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/濮斿鍑哄簱/Kf_EntrustOutBill_FastList.html" target="main_self_frame">濮斿鍑哄簱鍗曠紦瀛樺垪琛�</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBill_FastList.html" target="main_self_frame">閿�鍞嚭搴撳崟缂撳瓨鍒楄〃</a></dd>
+                      <dd><a href="楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_FastList.html" target="main_self_frame">浜у搧鍏ュ簱鍗曠紦瀛樺垪琛�</a></dd>
+                      <dd><a href="楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBill_FastList.html" target="main_self_frame">鍏朵粬鍏ュ簱鍗曠紦瀛樺垪琛�</a></dd>
+                      <dd><a href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBill_FastList.html" target="main_self_frame">澶栬喘鍏ュ簱鍗曠紦瀛樺垪琛�</a></dd>
+                      <dd><a href="楠屾敹鍏ュ簱/濮斿鍏ュ簱/Kf_EntrustInBill_FastList.html" target="main_self_frame">濮斿鍏ュ簱鍗曠紦瀛樺垪琛�</a></dd>
+                      <dd><a href="浠撳簱璋冩嫧/浠撳簱璋冩嫧/Kf_MoveStockBill_FastList.html" target="main_self_frame">璋冩嫧鍗曠紦瀛樺垪琛�</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/棰嗘枡鍑哄簱/Kf_MateOutBackBill_FastList.html" target="main_self_frame">棰嗘枡鍑哄簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/鍏朵粬鍑哄簱/Kf_OtherOutBackBill_FastList.html" target="main_self_frame">鍏朵粬鍑哄簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/濮斿鍑哄簱/Kf_EntrustOutBackBill_FastList.html" target="main_self_frame">濮斿鍑哄簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
+                      <dd><a href="棰嗘枡鍙戣揣/閿�鍞嚭搴�/Kf_SellOutBackBill_FastList.html" target="main_self_frame">閿�鍞嚭搴撳崟绾㈠瓧缂撳瓨鍒楄〃</a></dd>
+                      <dd><a href="楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBackBillList.html" target="main_self_frame">浜у搧鍏ュ簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
+                      <dd><a href="楠屾敹鍏ュ簱/鍏朵粬鍏ュ簱/Kf_OtherInBackBill_FastList.html" target="main_self_frame">鍏朵粬鍏ュ簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
+                      <dd><a href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBillList.html" target="main_self_frame">澶栬喘鍏ュ簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd>
+                      <dd><a href="楠屾敹鍏ュ簱/濮斿鍏ュ簱/Kf_EntrustInBackBillList.html" target="main_self_frame">濮斿鍏ュ簱鍗曠孩瀛楃紦瀛樺垪琛�</a></dd> 
                   </dl>
               </li>
               <!--<li data-name="template" class="layui-nav-item">
@@ -189,7 +189,7 @@
                       <cite>浠撳簱璋冩嫧</cite>
                   </a>
                   <dl class="layui-nav-child">
-                      <dd class="layui-this"><a href="浠撳簱璋冩嫧/浠撳簱璋冩嫧/Kf_MoveStockBill_Fast.html" target="main_self_frame">璋冩嫧鍗�</a></dd>
+                      <dd><a href="浠撳簱璋冩嫧/浠撳簱璋冩嫧/Kf_MoveStockBill_Fast.html" target="main_self_frame">璋冩嫧鍗�</a></dd>
                       <!--<dd><a>棰嗘枡璋冩嫧</a></dd>-->
                   </dl>
               </li>
diff --git "a/WebTM/views/\344\273\223\345\272\223\350\260\203\346\213\250/\344\273\223\345\272\223\350\260\203\346\213\250/Kf_MoveStockBill_Fast.html" "b/WebTM/views/\344\273\223\345\272\223\350\260\203\346\213\250/\344\273\223\345\272\223\350\260\203\346\213\250/Kf_MoveStockBill_Fast.html"
index b5010b6..a856f8c 100644
--- "a/WebTM/views/\344\273\223\345\272\223\350\260\203\346\213\250/\344\273\223\345\272\223\350\260\203\346\213\250/Kf_MoveStockBill_Fast.html"
+++ "b/WebTM/views/\344\273\223\345\272\223\350\260\203\346\213\250/\344\273\223\345\272\223\350\260\203\346\213\250/Kf_MoveStockBill_Fast.html"
@@ -1,13 +1,22 @@
 锘�<!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title>璋冩嫧鍗�</title>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
     <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
     <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <style>
+        .layui-table-fixed .layui-table-body {
+            height: auto !important;
+        }
+
+        .layui-table-fixed.layui-hide {
+            display: block !important;
+        }
+    </style>
 </head>
 <!--<style>
     @media screen and (max-width: 450px) {
@@ -47,6 +56,7 @@
                             <li lay-id="6">鍚堣淇℃伅</li>
                         </ul>
                         <div class="layui-tab-content">
+                            <!--閫夋嫨婧愬崟-->
                             <div class="layui-tab-item layui-show">
                                 <div class="layui-form-item">
                                     <div class="layui-row">
@@ -64,7 +74,7 @@
                                             </select>
                                             <!--<input type="text" name="cmbSourceType" id="cmbSourceType" lay-verify="cmbSourceType" autocomplete="off" class="layui-input">-->
                                         </div>
-                                     </div>
+                                    </div>
                                 </div>
                                 <div class="layui-form-item">
                                     <div class="layui-row">
@@ -74,7 +84,7 @@
                                         <div class="layui-col-xs8">
                                             <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input" disabled="disabled">
                                         </div>
-                                        </div>
+                                    </div>
                                 </div>
                                 <div class="layui-form-item">
                                     <div class="layui-row">
@@ -90,6 +100,7 @@
                                     </div>
                                 </div>
                             </div>
+                            <!--琛ㄥご淇℃伅-->
                             <div class="layui-tab-item">
                                 <div class="layui-form-item" style="padding:0px;margin:0px">
                                     <div class="layui-row">
@@ -212,6 +223,7 @@
                                     </div>
                                 </div>-->
                             </div>
+                            <!--鏄庣粏淇℃伅-->
                             <div class="layui-tab-item">
                                 <div class="layui-form-item" style="padding:0px;margin:0px">
                                     <div class="layui-row">
@@ -235,9 +247,11 @@
                                 </div>
                                 <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table>
                             </div>
+                            <!--搴撳瓨淇℃伅-->
                             <div class="layui-tab-item">
                                 <table class="layui-hide" id="mx-table" lay-filter="mx-table"></table>
                             </div>
+                            <!--姹囨�讳俊鎭�-->
                             <div class="layui-tab-item">
                                 <table class="layui-hide" id="fj-table-qd" lay-filter="fj-table-qd"></table>
                             </div>
@@ -267,247 +281,251 @@
     <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 type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>
+    </script>
     <script>
-    layui.config({
-        base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
-    }).extend({
-        index: 'lib/index' //涓诲叆鍙fā鍧�
-    }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
-        var $ = layui.$
-        , admin = layui.admin
-        , layer = layui.layer
-        , table = layui.table
-        , form = layui.form
-        , element = layui.element;
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index' //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element;
 
 
-        //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
-        //$("#HSCWHID").val(sessionStorage["HWHID"]);
-        //$("#HSCWHNAME").val(sessionStorage["HWHName"]);
-        //$("#HOutStockPlaceID").val(sessionStorage["HSPID"]);
-        //$("#HOutStockPlaceName").val(sessionStorage["HSPName"]);
-        //$("#HSupID").val(sessionStorage["HSupID"]);
-        //$("#HSupName").val(sessionStorage["HSupName"]);
-        $("#HDeptID").val(sessionStorage["HDeptID"]);
-        $("#HDeptName").val(sessionStorage["HDept"]);
-        $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
-        $("#HSecManager").val(sessionStorage["HSecManager"]);
-        $("#HKeeperID").val(sessionStorage["HKeeperID"]);
-        $("#HKeeper").val(sessionStorage["HKeeper"]);
-        $("#HMaker").val(sessionStorage["HUserName"]);
-        $("#HMaker").hide();
-        $("#HMakerID").hide();
-        $("#HBillerID").val(sessionStorage["HBillerID"]);
-        $("#HBillerID").hide();
+            //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
+            //$("#HSCWHID").val(sessionStorage["HWHID"]);
+            //$("#HSCWHNAME").val(sessionStorage["HWHName"]);
+            //$("#HOutStockPlaceID").val(sessionStorage["HSPID"]);
+            //$("#HOutStockPlaceName").val(sessionStorage["HSPName"]);
+            //$("#HSupID").val(sessionStorage["HSupID"]);
+            //$("#HSupName").val(sessionStorage["HSupName"]);
+            $("#HDeptID").val(sessionStorage["HDeptID"]);
+            $("#HDeptName").val(sessionStorage["HDept"]);
+            $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
+            $("#HSecManager").val(sessionStorage["HSecManager"]);
+            $("#HKeeperID").val(sessionStorage["HKeeperID"]);
+            $("#HKeeper").val(sessionStorage["HKeeper"]);
+            $("#HMaker").val(sessionStorage["HUserName"]);
+            $("#HMaker").hide();
+            $("#HMakerID").hide();
+            $("#HBillerID").val(sessionStorage["HBillerID"]);
+            $("#HBillerID").hide();
 
-        //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
+            //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
 
 
-        //鑾峰彇鍙傛暟
-        function getUrlVars() {
-            var vars = [], hash;
-            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
-            for (var i = 0; i < hashes.length; i++) {
-                hash = hashes[i].split('=');
-                vars.push(hash[0]);
-                vars[hash[0]] = hash[1];
-            }
-            return vars;
-        }
-        var params = getUrlVars();
-        var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
-        var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
-        
-        function  RoadBillMain(linterid)//鍔犺浇琛ㄥご
-        {
-            $.ajax({
-                url: GetWEBURL() + "/Web/GetPonderationBill",
-                type: "GET",
-                data: { "HInterID": linterid },
-                success: function (d) {
-                    // console.log(d.data);
-                    $("#HInterID").val(d.data[0].HInterID);
-                    $("#HBillNo").val(d.data[0].HBillNo);
-                    $("#HBillType").val(d.data[0].HSourceBillType);
-                    $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
-                    //$("#HWHID").val(d.data[0].HWhID);
-                    //$("#HKeeperID").val(d.data[0].HKeeperID);
-                    //$("#HSecManagerID").val(d.data[0].HSecManagerID);
-                    //$("#HDeptID").val(d.data[0].HDeptID);
-                    //$("#HBarCode").val(d.data[0].HBarCode);
-                    //$("#HQty").val(d.data[0].HQty);
+            //鑾峰彇鍙傛暟
+            function getUrlVars() {
+                var vars = [], hash;
+                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+                for (var i = 0; i < hashes.length; i++) {
+                    hash = hashes[i].split('=');
+                    vars.push(hash[0]);
+                    vars[hash[0]] = hash[1];
                 }
-            })
-        }
+                return vars;
+            }
+            var params = getUrlVars();
+            var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
+            var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
+
+            function RoadBillMain(linterid)//鍔犺浇琛ㄥご
+            {
+                $.ajax({
+                    url: GetWEBURL() + "/Web/GetPonderationBill",
+                    type: "GET",
+                    data: { "HInterID": linterid },
+                    success: function (d) {
+                        // console.log(d.data);
+                        $("#HInterID").val(d.data[0].HInterID);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                        $("#HBillType").val(d.data[0].HSourceBillType);
+                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
+                        //$("#HWHID").val(d.data[0].HWhID);
+                        //$("#HKeeperID").val(d.data[0].HKeeperID);
+                        //$("#HSecManagerID").val(d.data[0].HSecManagerID);
+                        //$("#HDeptID").val(d.data[0].HDeptID);
+                        //$("#HBarCode").val(d.data[0].HBarCode);
+                        //$("#HQty").val(d.data[0].HQty);
+                    }
+                })
+            }
 
 
-        function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
-        {
-            table.render({
-                elem: '#wl-table'
+            function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
+            {
+                table.render({
+                    elem: '#wl-table'
                     , url: GetWEBURL1() + '/MoveStockBill/DisBillEntryList_Webs_Json'
                     , toolbar: '#toolbarDemo'
                     , where: { HBillID: linterid, HBillType: '1207', sWhere: '' }
                     , cols: [[
                         { type: 'radio' }
-                    , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
-                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                    , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                    , { field: 'HMaterID', title: '鐗╂枡鍐呯爜', width: 150, hide: true }
-                    , { field: 'HAuxPropID', title: '', width: 150, hide: true }
-                    , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 150, hide: true }
-                    ]] 
+                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                        , { field: 'HMaterID', title: '鐗╂枡鍐呯爜', width: 150, hide: true }
+                        , { field: 'HAuxPropID', title: '', width: 150, hide: true }
+                        , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 150, hide: true }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                    ]]
                     , height: 500
                     , done: function () {
                         layer.closeAll("loading");
                     }
+                });
+            }
+
+            //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
+
+
+
+
+
+
+
+            //鍒ゆ柇鏄惁鏂板
+            if (linterid == null || linterid == 0) {
+                //鑾峰彇鏈�澶у崟鎹彿 new
+                $("#HInterID").val("");
+                $("#HBillNo").val("");
+                $.ajax({
+                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    type: "GET",
+                    data: { "HBillType": '1207' },
+                    success: function (d) {
+                        //console.log(d.data);
+                        $("#HInterID").val(d.data[0].HInterID);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                    }
+                });
+            }
+            else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+                RoadBillMain(linterid);
+                RoadBillSub(linterid);
+            }
+
+
+
+            form.on('submit(HWHID-BT)', function () {//閫夋嫨璋冨叆浠撳簱
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撳簱鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                    }
+                })
             });
-        }
-             
-        //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
-
-            
-
-            
-
-            
-
-        //鍒ゆ柇鏄惁鏂板
-        if (linterid == null || linterid == 0) {
-            //鑾峰彇鏈�澶у崟鎹彿 new
-            $("#HInterID").val("");
-            $("#HBillNo").val(""); 
-            $.ajax({
-                url: GetWEBURL() + "/Web/GetMAXNum",
-                type: "GET",
-                data: { "HBillType": '1207' },
-                success: function (d) {
-                    //console.log(d.data);
-                    $("#HInterID").val(d.data[0].HInterID);
-                    $("#HBillNo").val(d.data[0].HBillNo);
-                }
+            form.on('submit(HSpID-BT)', function () {//閫夋嫨璋冨叆浠撲綅
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撲綅鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + $("#HWHID").val() + '&Type=HSpID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                    }
+                })
             });
-        }
-        else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
-            RoadBillMain(linterid);
-            RoadBillSub(linterid);
-        }
-
-
-
-        form.on('submit(HWHID-BT)', function () {//閫夋嫨璋冨叆浠撳簱
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浠撳簱鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
-                , resize: false
-                , cancel: function () {
-                }
-            })
-        });
-        form.on('submit(HSpID-BT)', function () {//閫夋嫨璋冨叆浠撲綅
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浠撲綅鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + $("#HWHID").val() + '&Type=HSpID', 'yes']
-                , resize: false
-                , cancel: function () {
-                }
-            })
-        });
-        form.on('submit(HSCWHID-BT)', function () {//閫夋嫨璋冨嚭浠撳簱
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浠撳簱鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HSCWHID', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HOSpID-BT)', function () {//閫夋嫨璋冨嚭浠撲綅
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浠撲綅鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + $("#HSCWHID").val() + '&Type=HOSpID', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '淇濈鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
-            var sMainStr = JSON.stringify(data.field);
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '楠屾敹鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '閮ㄩ棬鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(cmdModify)', function () {//缂栬緫
-            var sSubStr = table.cache['wl-table'];
-            //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+            form.on('submit(HSCWHID-BT)', function () {//閫夋嫨璋冨嚭浠撳簱
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撳簱鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HSCWHID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HOSpID-BT)', function () {//閫夋嫨璋冨嚭浠撲綅
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撲綅鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + $("#HSCWHID").val() + '&Type=HOSpID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '淇濈鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
+                var sMainStr = JSON.stringify(data.field);
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '楠屾敹鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '閮ㄩ棬鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(cmdModify)', function () {//缂栬緫
+                var sSubStr = table.cache['wl-table'];
+                //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
                 layer.open({
                     type: 2
                     , area: ['100%', '100%']
@@ -521,154 +539,154 @@
                         //$(".layui-btn").removeClass("layui-btn-disabled");
                     }
                 })
-           // }
-        });
+                // }
+            });
 
-        form.on('submit(Delete)', function () {//鍒犻櫎
-            var checkStatus = table.checkStatus('wl-table')
-            , data = checkStatus.data;
-            var sInterID = $('#HInterID').val()
-            var sMaterID = data[0].HMaterID
-            var sBillType = '1207'
-            var sAuxPropID = data[0].HAuxPropID
-            //var sMTONo = data[0].HMTONo
-            var sMTONo = ''
-            var sSourceInterID = data[0].HSourceInterID
-            var sSourceEntryID = data[0].HSourceEntryID
-            $.ajax(
-               {
-                   type: "Get", 
-                   url: GetWEBURL() + "/MoveStock/Delete_Json",
-                   async: true,
-                   data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
-                   dataType: "json",
-                   success: function (data) {
-                       if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                           //layer.msg(data.Message, { icon: 1 });
-                           table.render({
-                               elem: '#wl-table'
-                         , url: GetWEBURL1() + '/MoveStockBill/DisBillEntryList_Webs_Json'
-                         , cellMinWidth: 80
-                         , toolbar: '#toolbarDemo'
-                         , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
-                         , cols: [[
-                                { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                                , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 100 }
-                                , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
-                                , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
-                                , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
-                         ]]
-                         , height: 500
-                           })
-                       }
-                       else {
-                           layer.msg(data.Message, { icon: 2 });
-                       }
-                   },
-                   error: function (err) {
-                       layer.msg('閿欒' + err, {
-                           icon: 5,
-                           time: 20000
-                       }, function () {
-                           //do something
-                       });
-                   }
-               });
-        });
-
-        form.on('submit(Cancel)', function () {
-            parent.location.href = "../../../views/index.html"
-            //window.close();//鍏抽棴褰撳墠椤�
-        })
-
-
-        form.on('submit(Saver)', function (data) {//鎻愪氦
-            //debugger;
-            var sMainStr = JSON.stringify(data.field);
-            var sSubStr = table.cache['wl-table'];
-            var sSourceType = $("#HBillType").val();
-            if (AllowLoadData(sSubStr, 'Saver') != false)//闈炵┖楠岃瘉
-            {
-                layer.load(3);
+            form.on('submit(Delete)', function () {//鍒犻櫎
+                var checkStatus = table.checkStatus('wl-table')
+                    , data = checkStatus.data;
+                var sInterID = $('#HInterID').val()
+                var sMaterID = data[0].HMaterID
+                var sBillType = '1207'
+                var sAuxPropID = data[0].HAuxPropID
+                //var sMTONo = data[0].HMTONo
+                var sMTONo = ''
+                var sSourceInterID = data[0].HSourceInterID
+                var sSourceEntryID = data[0].HSourceEntryID
                 $.ajax(
+                    {
+                        type: "Get",
+                        url: GetWEBURL() + "/MoveStock/Delete_Json",
+                        async: true,
+                        data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                //layer.msg(data.Message, { icon: 1 });
+                                table.render({
+                                    elem: '#wl-table'
+                                    , url: GetWEBURL1() + '/MoveStockBill/DisBillEntryList_Webs_Json'
+                                    , cellMinWidth: 80
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 80 }
+                                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 100 }
+                                        , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
+                                        , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+                                        , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
+                                    ]]
+                                    , height: 500
+                                })
+                            }
+                            else {
+                                layer.msg(data.Message, { icon: 2 });
+                            }
+                        },
+                        error: function (err) {
+                            layer.msg('閿欒' + err, {
+                                icon: 5,
+                                time: 20000
+                            }, function () {
+                                //do something
+                            });
+                        }
+                    });
+            });
+
+            form.on('submit(Cancel)', function () {
+                parent.location.href = "../../../views/index.html"
+                //window.close();//鍏抽棴褰撳墠椤�
+            })
+
+
+            form.on('submit(Saver)', function (data) {//鎻愪氦
+                //debugger;
+                var sMainStr = JSON.stringify(data.field);
+                var sSubStr = table.cache['wl-table'];
+                var sSourceType = $("#HBillType").val();
+                if (AllowLoadData(sSubStr, 'Saver') != false)//闈炵┖楠岃瘉
                 {
-                    type: "POST",
-                    url: GetWEBURL() + "/MoveStockBill/set_SaveMoveStockBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                    async: true,
-                    data: { "oMain": sMainStr },
-                    dataType: "json",
-                    success: function (data) {
-                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
-                        }
-                        else {
-                            layer.msg(data.Message, { icon: 5 });
-                        }
-                        layer.closeAll("loading");
-                        layui.form.render();
-                    },
-                    error: function (err) {
-                        layer.msg("閿欒:" + err, { icon: 5 });
+                    layer.load(3);
+                    $.ajax(
+                        {
+                            type: "POST",
+                            url: GetWEBURL() + "/MoveStockBill/set_SaveMoveStockBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            async: true,
+                            data: { "oMain": sMainStr },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                    layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
+                                }
+                                else {
+                                    layer.msg(data.Message, { icon: 5 });
+                                }
+                                layer.closeAll("loading");
+                                layui.form.render();
+                            },
+                            error: function (err) {
+                                layer.msg("閿欒:" + err, { icon: 5 });
+                            }
+                        });
+                    return false;
+                }
+            });
+            //鐩戝惉鎻愪氦
+            form.verify({
+                numberOrEmpty: function (value, item) {
+                    // if (value != '') {
+                    if (!/^\d+$/.test(value)) {
+                        return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
                     }
-                });
-                return false;
-            } 
-        });
-        //鐩戝惉鎻愪氦
-        form.verify({
-            numberOrEmpty: function (value, item) {
-                // if (value != '') {
-                if (!/^\d+$/.test(value)) {
-                    return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
+                    //}
                 }
-                //}
-            }
-        });
-        $('#HBarCode').on('keydown', function (event) {  //鎵潯鐮�
-            var sSubStr = table.cache['wl-table'];
-            var sBarCode = $('#HBarCode').val()
-            var sInterID = $("#HInterID").val()
-            var sBillNo = $("#HBillNo").val()
-            var sQty = $("#HQty").val()
-            var sHBillType = $("#HBillType").val()
-            var sHWHID = $("#HWHID").val()
-            var sHSPID = $("#HStockPlaceID").val()
-            var SCWhID = $("#HSCWHID").val()          
-            var SCSPID = $("#HOutStockPlaceID").val()
-            if (sQty == "") {
-                sQty = 0;
-            }
-            if (event.keyCode == 13) {
-                if (sBarCode != "") {
-                    $('#HBarCode').val("");
+            });
+            $('#HBarCode').on('keydown', function (event) {  //鎵潯鐮�
+                var sSubStr = table.cache['wl-table'];
+                var sBarCode = $('#HBarCode').val()
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var sQty = $("#HQty").val()
+                var sHBillType = $("#HBillType").val()
+                var sHWHID = $("#HWHID").val()
+                var sHSPID = $("#HStockPlaceID").val()
+                var SCWhID = $("#HSCWHID").val()
+                var SCSPID = $("#HOutStockPlaceID").val()
+                if (sQty == "") {
+                    sQty = 0;
                 }
-                if (sQty != "") {
-                    $('#HQty').val("");
-                }
-                if ($("#HWHNAME").val() == '') {
-                    layer.msg("璋冨叆浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
-                    return false;
-                }
-                if ($("#HSCWHNAME").val() == '') {
-                    layer.msg("璋冨嚭浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
-                    return false;
-                }
-                if ($("#HBillNo").val() == '') {
-                    layer.msg("閿欒鐨勫崟鎹彿!", { icon: 5 });
-                    return false;
-                }
-                if ($("#HInterID").val() == '') {
-                    layer.msg("閿欒鐨勫唴鐮�!", { icon: 5 });
-                    return false;
-                } 
+                if (event.keyCode == 13) {
+                    if (sBarCode != "") {
+                        $('#HBarCode').val("");
+                    }
+                    if (sQty != "") {
+                        $('#HQty').val("");
+                    }
+                    if ($("#HWHNAME").val() == '') {
+                        layer.msg("璋冨叆浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
+                        return false;
+                    }
+                    if ($("#HSCWHNAME").val() == '') {
+                        layer.msg("璋冨嚭浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
+                        return false;
+                    }
+                    if ($("#HBillNo").val() == '') {
+                        layer.msg("閿欒鐨勫崟鎹彿!", { icon: 5 });
+                        return false;
+                    }
+                    if ($("#HInterID").val() == '') {
+                        layer.msg("閿欒鐨勫唴鐮�!", { icon: 5 });
+                        return false;
+                    }
                     $.ajax({
                         url: GetWEBURL() + "/MoveStockBill/get_InfoByBarCode_Source_Json",
                         type: "GET",
@@ -684,19 +702,19 @@
                                     , toolbar: '#toolbarDemo'
                                     , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
                                     , cols: [[
-                                      { type: 'radio' }
-                                    , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
-                                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                                    , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                                    , { field: 'HMaterID', title: '鐗╂枡鍐呯爜', width: 150, hide: true }
-                                    , { field: 'HAuxPropID', title: '', width: 150, hide: true }
-                                    , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 150, hide: true }
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                        , { field: 'HMaterID', title: '鐗╂枡鍐呯爜', width: 150, hide: true }
+                                        , { field: 'HAuxPropID', title: '', width: 150, hide: true }
+                                        , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 150, hide: true }
                                     ]]
                                     // , data: [linterid]
                                     // , page: true
@@ -707,216 +725,237 @@
                                 });
                             }
                             else {
-                                           
+
                                 layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
                             }
                             layer.closeAll("loading");
                         }
                     });
-                } 
-        });
-        $('#HSourceBillNo').on('keydown', function (event) {      //鎵簮鍗�
-            var HSourceBillNo = $('#HSourceBillNo').val()
-            var sInterID = $("#HInterID").val()
-            var sBillNo = $("#HBillNo").val()
-            if (event.keyCode == 13) {
-                $.ajax({
-                    url: GetWEBURL() + "/MoveStockBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
-                    type: "GET",
-                    data: { "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
-                    success: function (result) {
-                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            layer.load(3);
-                            element.tabChange('tab-MoveStockBill', '2');
-                            table.render({
-                                elem: '#wl-table'
-                              , url: GetWEBURL() + '/MoveStockBill/DisBillEntryList_Webs_Json'
-                              , toolbar: '#toolbarDemo'
-                              , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
-                              , cols: [[
-                                  { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                                , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                              ]]
-                                // , data: [linterid]
-                                // , page: true
-                              , height: 500
-                              , done: function () {
-                                  layer.closeAll("loading");
-                              }
-                            });
+                }
+            });
+            $('#HSourceBillNo').on('keydown', function (event) {      //鎵簮鍗�
+                var HSourceBillNo = $('#HSourceBillNo').val()
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                if (event.keyCode == 13) {
+                    $.ajax({
+                        url: GetWEBURL() + "/MoveStockBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
+                        type: "GET",
+                        data: { "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                layer.load(3);
+                                element.tabChange('tab-MoveStockBill', '2');
+                                table.render({
+                                    elem: '#wl-table'
+                                    , url: GetWEBURL() + '/MoveStockBill/DisBillEntryList_Webs_Json'
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                                    ]]
+                                    // , data: [linterid]
+                                    // , page: true
+                                    , height: 500
+                                    , done: function () {
+                                        layer.closeAll("loading");
+                                    }
+                                });
+                            }
+                            else {
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            }
+                            layer.closeAll("loading");
                         }
-                        else {
-                            // $("#verifycode").click();
-                            //layer.msg(result.Message, { icon: 5 });
-                            layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                    });
+                    // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
+                }
+            });
+
+            table.render({
+                elem: '#mx-table'
+                // , url: GetWEBURL() + '/MoveStockBill/GetHBarCodeShowBillSub'
+                //, toolbar: '#toolbarDemo'
+                // , where: { sMsg: linterid, sMsg2: lentryid }
+                , cols: [[
+                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+                ]]
+                , page: true
+                , height: 500
+                , done: function () {
+                }
+            });
+
+
+
+            //琛屽唴浜嬩欢
+            table.on('tool(wl-table)', function (obj) {
+                var data = obj.data;
+                console.log(data.婧愬崟涓诲唴鐮�);
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'edit') {
+                    var _obj = obj;
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '鎵爜璇︽儏鍒楄〃'
+                        , content: ['../../../views/Baseset/鍩虹璧勬枡/WMSBarCodeDetailsList.html?HInterID=' + data.HSourceInterID + '&HBillType=3789', 'yes']
+                        , end: function () {
+
                         }
-                        layer.closeAll("loading");
-                    }
-                });
-               // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
-            }
-        });
+                    })
+                }
+            });
 
-        table.render({
-            elem: '#mx-table'
-            // , url: GetWEBURL() + '/MoveStockBill/GetHBarCodeShowBillSub'
-            //, toolbar: '#toolbarDemo'
-            // , where: { sMsg: linterid, sMsg2: lentryid }
-         , cols: [[
-           , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
-         ]]
-         , page: true
-         , height: 500
-         , done: function () {
-         }
         });
-    });
-    //娓呯┖琛ㄥご
-    //function f_ClearTitle() {
+        //娓呯┖琛ㄥご
+        //function f_ClearTitle() {
 
-    //    $("#HBarCode").val("");
-    //    $("#HSpName").val("");
-    //    $("#HSpID").val("0");
-    //    $("#HQty").val("0");
-    //    $("#HSourceBillNo").val("");
-    //    $("#HWHNAME").val("");
-    //    $("#HWHID").val("0");
-    //    $("#HSCWHNAME").val("");
-    //    $("#HSCWHID").val("0");
-    //    $("#HSupName").val("");
-    //    $("#HSupID").val("0");
-    //    $("#HKeeper").val("");
-    //    $("#HKeeperID").val("0");
-    //    $("#HSecManager").val("0");
-    //    $("#HSecManagerID").val("");
-    //    $("#HDeptName").val("");
-    //    $("#HDeptID").val("0");
-    //    $("#HBillNo").val("");
-    //    $("#HInterID").val("0");
-    //}
-    function GetHWHValue(obj)  //杩斿洖璋冨叆浠撳簱
-    {
-        $("#HWHNAME").val(obj[0].HName);
-        //sessionStorage["HWHID"] = obj[0].HItemID;
-        $("#HWHID").val(obj[0].HItemID);
-    }
-    function GetHSpValue(obj) {  //杩斿洖璋冨叆浠撲綅
-        $("#HStockPlaceName").val(obj[0].HName);
-        $("#HStockPlaceID").val(obj[0].HItemID);
-    }
-    function GetHSCWHNAMEValue(obj)  //杩斿洖璋冨嚭浠撳簱
-    {
-        $("#HSCWHNAME").val(obj[0].HName);
-        //sessionStorage["HSCWHNAME"] = obj[0].HItemID;
-        $("#HSCWHID").val(obj[0].HItemID);
-    }
-    function GetHOutStockPlaceIDValue(obj) {  //杩斿洖璋冨嚭浠撲綅
-        $("#HOutStockPlaceName").val(obj[0].HName);
-        $("#HOutStockPlaceID").val(obj[0].HItemID);
-    }
-    function GetHSupValue(obj) {  //杩斿洖渚涘簲鍟�
-        $("#HSupName").val(obj[0].HName);
-        $("#HSupID").val(obj[0].HItemID);
-    }
-    function GetHKeeperValue(obj) {  //杩斿洖淇濈
-        $("#HKeeper").val(obj[0].HName);
-        $("#HKeeperID").val(obj[0].HItemID);
-    }
-    function GetHSecManagerValue(obj) {  //杩斿洖楠屾敹
-        $("#HSecManager").val(obj[0].HName);
-        $("#HSecManagerID").val(obj[0].HItemID);
-    }
-    function GetHDeptNameValue(obj) {   //杩斿洖閮ㄩ棬
-        $("#HDeptName").val(obj[0].HName);
-        $("#HDeptID").val(obj[0].HItemID);
-    }
-    //function Get_CheckWhAndSP(sInterID, sHBillType, sBarCode, sHWHID, sHSPID) {   //杩斿洖閮ㄩ棬
-    //    $.ajax({ 
-    //        type: "GET",
-    //        data: { "sHInterID": sInterID, "sHBillType": sHBillType, "sBarCode": sBarCode, "sHWHID": sHWHID, "sHSPID": sHSPID },
-    //        success: function (result) {
-    //            if(result.count==1)
-    //            {
-    //               // layer.msg(result.Message, { icon: 1 });
-    //                return true;
-    //            }
-    //            else
-    //            {
-    //                layer.msg(result.Message, { icon: 5 });
-    //                return false;
-    //            }
-    //        }
-    //    })
-    //}
-    function AllowLoadData(sSubStr,bnt) {  //闈炵┖楠岃瘉
-        //if ($("#HSourceBillNo").val() == '') {
-        //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
-        //    return false;
+        //    $("#HBarCode").val("");
+        //    $("#HSpName").val("");
+        //    $("#HSpID").val("0");
+        //    $("#HQty").val("0");
+        //    $("#HSourceBillNo").val("");
+        //    $("#HWHNAME").val("");
+        //    $("#HWHID").val("0");
+        //    $("#HSCWHNAME").val("");
+        //    $("#HSCWHID").val("0");
+        //    $("#HSupName").val("");
+        //    $("#HSupID").val("0");
+        //    $("#HKeeper").val("");
+        //    $("#HKeeperID").val("0");
+        //    $("#HSecManager").val("0");
+        //    $("#HSecManagerID").val("");
+        //    $("#HDeptName").val("");
+        //    $("#HDeptID").val("0");
+        //    $("#HBillNo").val("");
+        //    $("#HInterID").val("0");
         //}
-        if($("#HDeptName").val()=='')
+        function GetHWHValue(obj)  //杩斿洖璋冨叆浠撳簱
         {
-            layer.msg("閮ㄩ棬娌℃湁閫夋嫨!", { icon: 5 });
-            return false;
+            $("#HWHNAME").val(obj[0].HName);
+            //sessionStorage["HWHID"] = obj[0].HItemID;
+            $("#HWHID").val(obj[0].HItemID);
         }
-        if ($("#HSecManager").val() == '') {
-            layer.msg("楠屾敹浜烘病鏈夐�夋嫨!", { icon: 5 });
-            return false;
+        function GetHSpValue(obj) {  //杩斿洖璋冨叆浠撲綅
+            $("#HStockPlaceName").val(obj[0].HName);
+            $("#HStockPlaceID").val(obj[0].HItemID);
         }
-        if ($("#HKeeper").val() == '') {
-            layer.msg("淇濈浜烘病鏈夐�夋嫨!", { icon: 5 });
-            return false;
-        }
-        if ($("#HSupName").val() == '') {
-            layer.msg("渚涘簲鍟嗘病鏈夐�夋嫨!", { icon: 5 });
-            return false;
-        }
-        if ($("#HWHNAME").val() == '') {
-            layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
-            return false;
-        }
-        if ($("#HBillNo").val() == '') {
-            layer.msg("閿欒鐨勫崟鎹彿!", { icon: 5 });
-            return false;
-        }
-        if ($("#HInterID").val() == '') {
-            layer.msg("閿欒鐨勫唴鐮�!", { icon: 5 });
-            return false;
-        }
-        if(sSubStr=='')
+        function GetHSCWHNAMEValue(obj)  //杩斿洖璋冨嚭浠撳簱
         {
-            layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5 });
-            return false;
+            $("#HSCWHNAME").val(obj[0].HName);
+            //sessionStorage["HSCWHNAME"] = obj[0].HItemID;
+            $("#HSCWHID").val(obj[0].HItemID);
         }
-        if (bnt == 'Saver') {
-            if (sSubStr != '') {
-                for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
-                    if (parseFloat(sSubStr[i].HQtyMust) > 0) {
-                        if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
-                            layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺锛�", { icon: 5 });
+        function GetHOutStockPlaceIDValue(obj) {  //杩斿洖璋冨嚭浠撲綅
+            $("#HOutStockPlaceName").val(obj[0].HName);
+            $("#HOutStockPlaceID").val(obj[0].HItemID);
+        }
+        function GetHSupValue(obj) {  //杩斿洖渚涘簲鍟�
+            $("#HSupName").val(obj[0].HName);
+            $("#HSupID").val(obj[0].HItemID);
+        }
+        function GetHKeeperValue(obj) {  //杩斿洖淇濈
+            $("#HKeeper").val(obj[0].HName);
+            $("#HKeeperID").val(obj[0].HItemID);
+        }
+        function GetHSecManagerValue(obj) {  //杩斿洖楠屾敹
+            $("#HSecManager").val(obj[0].HName);
+            $("#HSecManagerID").val(obj[0].HItemID);
+        }
+        function GetHDeptNameValue(obj) {   //杩斿洖閮ㄩ棬
+            $("#HDeptName").val(obj[0].HName);
+            $("#HDeptID").val(obj[0].HItemID);
+        }
+        //function Get_CheckWhAndSP(sInterID, sHBillType, sBarCode, sHWHID, sHSPID) {   //杩斿洖閮ㄩ棬
+        //    $.ajax({
+        //        type: "GET",
+        //        data: { "sHInterID": sInterID, "sHBillType": sHBillType, "sBarCode": sBarCode, "sHWHID": sHWHID, "sHSPID": sHSPID },
+        //        success: function (result) {
+        //            if(result.count==1)
+        //            {
+        //               // layer.msg(result.Message, { icon: 1 });
+        //                return true;
+        //            }
+        //            else
+        //            {
+        //                layer.msg(result.Message, { icon: 5 });
+        //                return false;
+        //            }
+        //        }
+        //    })
+        //}
+        function AllowLoadData(sSubStr, bnt) {  //闈炵┖楠岃瘉
+            //if ($("#HSourceBillNo").val() == '') {
+            //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
+            //    return false;
+            //}
+            if ($("#HDeptName").val() == '') {
+                layer.msg("閮ㄩ棬娌℃湁閫夋嫨!", { icon: 5 });
+                return false;
+            }
+            if ($("#HSecManager").val() == '') {
+                layer.msg("楠屾敹浜烘病鏈夐�夋嫨!", { icon: 5 });
+                return false;
+            }
+            if ($("#HKeeper").val() == '') {
+                layer.msg("淇濈浜烘病鏈夐�夋嫨!", { icon: 5 });
+                return false;
+            }
+            if ($("#HSupName").val() == '') {
+                layer.msg("渚涘簲鍟嗘病鏈夐�夋嫨!", { icon: 5 });
+                return false;
+            }
+            if ($("#HWHNAME").val() == '') {
+                layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
+                return false;
+            }
+            if ($("#HBillNo").val() == '') {
+                layer.msg("閿欒鐨勫崟鎹彿!", { icon: 5 });
+                return false;
+            }
+            if ($("#HInterID").val() == '') {
+                layer.msg("閿欒鐨勫唴鐮�!", { icon: 5 });
+                return false;
+            }
+            if (sSubStr == '') {
+                layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5 });
+                return false;
+            }
+            if (bnt == 'Saver') {
+                if (sSubStr != '') {
+                    for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
+                        if (parseFloat(sSubStr[i].HQtyMust) > 0) {
+                            if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
+                                layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺锛�", { icon: 5 });
+                                return false;
+                            }
+                        }
+                    }
+                    for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
+                        if (parseFloat(sSubStr[i].HQty) == 0) {
+                            layer.msg("澶栬喘鍏ュ簱璁板綍鏈壂鐮侊紒", { icon: 5 });
                             return false;
                         }
                     }
                 }
-                for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
-                    if (parseFloat(sSubStr[i].HQty) == 0) {
-                        layer.msg("澶栬喘鍏ュ簱璁板綍鏈壂鐮侊紒", { icon: 5 });
-                        return false;
-                    }
-                }
+            }
+            else {
+                return true;
             }
         }
-        else {
-            return true;
-        }
-    }
     </script>
 
 </body>
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\272\223\345\255\230\346\237\245\350\257\242/KF_ICInventoryByMaterID.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\272\223\345\255\230\346\237\245\350\257\242/KF_ICInventoryByMaterID.html"
new file mode 100644
index 0000000..bc264ca
--- /dev/null
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\272\223\345\255\230\346\237\245\350\257\242/KF_ICInventoryByMaterID.html"
@@ -0,0 +1,229 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>鐗╂枡搴撳瓨鏌ヨ</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+
+</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-inline">
+                                    <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鏉$爜</label>
+                                    <div class="layui-input-block" style="margin-left: 121px;">
+                                        <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">浠撳簱</label>
+                                    <div class="layui-input-block" style="margin-left: 77px;">
+                                        <input type="text" class="layui-input" name="HWHNAME" id="HWHNAME" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+                                        <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="HWHID-BT" id="HWHID-BT" style="padding: 0 10px;float: left;margin-right: 3px;">
+                                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                        </button>
+                                        <input type="hidden" name="HWHID" id="HWHID" value="0">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">浠撲綅</label>
+                                    <div class="layui-input-block" style="margin-left: 77px;">
+                                        <input type="text" class="layui-input" name="HSPName" id="HSPName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+                                        <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="HSpID-BT" id="HSpID-BT" style="padding: 0 10px;float: left;margin-right: 3px;">
+                                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                        </button>
+                                        <input type="hidden" name="HSPID" id="HSPID" value="0">
+                                    </div>
+                                </div>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch" style="padding:0 5px;margin-left: 210px;">鏌ヨ</button>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="Cancel" id="Cancel" style="padding:0 5px">閫�鍑�</button>
+                            </div>
+                        </div>
+                        <table class="" id="mainTable" lay-filter="mainTable"></table>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+    <script>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element
+                , laypage = layui.laypage
+                , laydate = layui.laydate
+                , util = layui.util
+            //鍏敤鍙橀噺
+            var option = [];
+            //鍒濆鍖栬〃鏍�
+            set_InitGrid();
+
+            $('#HBarCode').on('keydown', function (event) {
+                if (event.keyCode == 13) {
+                    get_FastQuery();
+                }
+            });
+
+            form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撳簱鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HSpID-BT)', function () {//閫夋嫨浠撲綅
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撲綅鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HSpID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            //閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                set_ClearQuery();
+            });
+
+            //鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery();
+            });
+
+
+            //鍒濆鍖栬〃鏍�
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , height: 'full-50'
+                    , page: true
+                    , cellMinWidth: 90
+                    , cols: [[
+                        { field: 'HQty', title: '鏁伴噺'}
+                        , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜' }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О' }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿' }
+                        , { field: 'HMaterID', title: '鐗╂枡ID',hide:true }
+                        , { field: 'HBatchNo', title: '鎵规鍙�' }
+                        , { field: 'HAuxPropName', title: '杈呭姪灞炴��' }
+                        , { field: 'HAuxPropId', title: '杈呭姪灞炴�D', hide: true }
+                        , { field: 'HWHName', title: '浠撳簱' }
+                        , { field: 'HWhID', title: '浠撳簱ID', hide: true }
+                        , { field: 'HSPName', title: '浠撲綅' }
+                        , { field: 'HSPID', title: '浠撲綅ID', hide: true }
+                    ]]
+                    , text: {
+                        none: '鏃犳暟鎹紒'
+                    }
+                };
+                option.data = [];
+                table.render(option);
+                set_ClearQuery();
+                //get_FastQuery();
+            }
+
+            //鍔犺浇缃戞牸
+            function get_Display(HBarCode, HWHID, HSPID, HOWNERID, sWhere) {
+                //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                var wait = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Web/Get_ICInventoryByMaterIDList',
+                    type: "GET",
+                    data: { "HBarCode": HBarCode, "HWHID": HWHID, "HSPID": HSPID, "HOWNERID": HOWNERID, "sWhere": sWhere },
+                    success: function (data1) {
+                        if (data1.count == 0) {
+                            option.data = [];
+                        } else {
+                            option.data = data1.data;
+                        }
+                        table.render(option);
+                        layer.close(wait);
+                    }, error: function () {
+                        layer.close(wait);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+
+            //蹇�熻繃婊�
+            function get_FastQuery() {
+                var HBarCode = $("#HBarCode").val();
+                var HWHID = $("#HWHID").val();
+                var HSPID = $("#HSPID").val();
+                var HOWNERID = 0;
+                var sWhere = "";
+                get_Display(HBarCode, HWHID, HSPID, HOWNERID, sWhere);
+            }
+
+            //閲嶇疆杩囨护鏉′欢
+            function set_ClearQuery() {
+                $("#HBarCode").val("");
+                $("#HWHNAME").val("");
+                $("#HWHID").val(0);
+                $("#HSPName").val("");
+                $("#HSPID").val(0);
+            }
+
+
+
+            //閫�鍑�
+            form.on('submit(Cancel)', function () {
+                parent.location.href = "../../../views/index.html"
+                //window.close();//鍏抽棴褰撳墠椤�
+            })
+
+
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+
+
+        function GetHWHValue(obj)  //杩斿洖浠撳簱
+        {
+            $("#HWHNAME").val(obj[0].HName);
+            $("#HWHID").val(obj[0].HItemID);
+        }
+        function GetHSpValue(obj) {  //杩斿洖浠撲綅
+            $("#HSPName").val(obj[0].HName);
+            $("#HSPID").val(obj[0].HItemID);
+        }
+
+
+    </script>
+
+</body>
+</html>
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html"
index 5d08d57..f635ac4 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html"
@@ -32,6 +32,15 @@
             }
         }
     </style>-->
+    <style>
+        .layui-table-fixed .layui-table-body {
+            height: auto !important;
+        }
+
+        .layui-table-fixed.layui-hide {
+            display: block !important;
+        }
+    </style>
 </head>
 
 <body>
@@ -60,7 +69,7 @@
                                                 <option value="1401">閿�鍞鍗�</option>
                                             </select>
                                         </div>
-                                        </div>
+                                    </div>
                                 </div>
                                 <div class="layui-form-item">
                                     <div class="layui-row">
@@ -70,7 +79,7 @@
                                         <div class="layui-col-xs8">
                                             <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input">
                                         </div>
-                                        </div>
+                                    </div>
                                 </div>
                             </div>
                             <div class="layui-tab-item">
@@ -239,6 +248,9 @@
     <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 type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>
+    </script>
     <script>
         layui.config({
             base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
@@ -246,11 +258,11 @@
             index: 'lib/index' //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
             var $ = layui.$
-            , admin = layui.admin
-            , layer = layui.layer
-            , table = layui.table
-            , form = layui.form
-            , element = layui.element;
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element;
 
 
             //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
@@ -290,10 +302,10 @@
             var params = getUrlVars();
             var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
             var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
-        
-            
 
-            function  RoadBillMain(linterid)//鍔犺浇琛ㄥご
+
+
+            function RoadBillMain(linterid)//鍔犺浇琛ㄥご
             {
                 $.ajax({
                     url: GetWEBURL() + "/Web/GetPonderationBill",
@@ -364,35 +376,36 @@
                     , where: { HBillID: linterid, HBillType: '1205', sWhere: '' }
                     , cols: [[
                         { type: 'radio' }
-                    , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
-                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
-                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
-                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
-                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                    , { field: 'HBatchNo', title: '鎵规', width: 100 }
-                    , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
-                    , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+                        , { field: 'HQty', title: '鏁伴噺', width: 80 }
+                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+                        , { field: 'HBatchNo', title: '鎵规', width: 100 }
+                        , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
+                        , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
                     ]]
                     , height: 500
                 })
             }
-             
+
             //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
 
-            
 
-            
 
-            
+
+
+
 
             //鍒ゆ柇鏄惁鏂板
             if (linterid == null || linterid == 0) {
                 //鑾峰彇鏈�澶у崟鎹彿 new
                 $("#HInterID").val("");
-                $("#HBillNo").val(""); 
+                $("#HBillNo").val("");
                 $.ajax({
                     url: GetWEBURL() + "/Web/GetMAXNum",
                     type: "GET",
@@ -404,7 +417,7 @@
                         //$("#HInterID").val('132522535');
                         //$("#HBillNo").val('421458026');
                     }
-                }); 
+                });
             }
             else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
                 RoadBillMain(linterid);
@@ -531,7 +544,7 @@
 
             form.on('submit(cmdDelete)', function () {//鍒犻櫎
                 var checkStatus = table.checkStatus('wl-table')
-                , data = checkStatus.data;
+                    , data = checkStatus.data;
                 // console.log(data);
                 var sInterID = $('#HInterID').val()
                 var sMaterID = data[0].HMaterID
@@ -542,52 +555,52 @@
                 var sSourceInterID = data[0].HSourceInterID
                 var sSourceEntryID = data[0].HSourceEntryID
                 $.ajax(
-                   {
-                       type: "Get",
-                       //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Delete_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                       url: GetWEBURL() + "/SellOut/Delete_Json",
-                       async: true,
-                       data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
-                       dataType: "json",
-                       success: function (data) {
-                           if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                               //layer.msg(data.Message, { icon: 1 });
-                               table.render({
-                                   elem: '#wl-table' 
-                                   , url: GetWEBURL1() + '/SellOut/DisBillEntryList_Webs_Json'
-                                   , cellMinWidth: 80
-                                   , toolbar: '#toolbarDemo'
-                                   , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
-                                   , cols: [[
-                                      { type: 'radio' }
-                                    , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
-                                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
-                                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
-                                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                                    , { field: 'HBatchNo', title: '鎵规', width: 100 }
-                                    , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
-                                    , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
-                                   ]]
+                    {
+                        type: "Get",
+                        //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Delete_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        url: GetWEBURL() + "/SellOut/Delete_Json",
+                        async: true,
+                        data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                //layer.msg(data.Message, { icon: 1 });
+                                table.render({
+                                    elem: '#wl-table'
+                                    , url: GetWEBURL1() + '/SellOut/DisBillEntryList_Webs_Json'
+                                    , cellMinWidth: 80
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 80 }
+                                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 100 }
+                                        , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
+                                        , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+                                    ]]
                                     , height: 500
-                               })
-                           }
-                           else {
-                               layer.msg(data.Message, { icon: 2 });
-                           }
-                       },
-                       error: function (err) {
-                           layer.msg('閿欒' + err, {
-                               icon: 5,
-                               time: 20000
-                           }, function () {
-                               //do something
-                           });
-                       }
-                   });
+                                })
+                            }
+                            else {
+                                layer.msg(data.Message, { icon: 2 });
+                            }
+                        },
+                        error: function (err) {
+                            layer.msg('閿欒' + err, {
+                                icon: 5,
+                                time: 20000
+                            }, function () {
+                                //do something
+                            });
+                        }
+                    });
             });
 
 
@@ -600,26 +613,26 @@
                 {
                     layer.load(3);
                     $.ajax(
-                    {
-                        type: "POST",
-                        // url: "http://61.130.49.162:9090/WMSAPI///SellOut/set_SaveSellOutBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                        url: GetWEBURL() + "/SellOut/set_SaveSellOutBill_Json",
-                        async: true,
-                        data: { "oMain": sMainStr  },
-                        dataType: "json",
-                        success: function (data) {
-                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
+                        {
+                            type: "POST",
+                            // url: "http://61.130.49.162:9090/WMSAPI///SellOut/set_SaveSellOutBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            url: GetWEBURL() + "/SellOut/set_SaveSellOutBill_Json",
+                            async: true,
+                            data: { "oMain": sMainStr },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                    layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
+                                }
+                                else {
+                                    layer.msg(data.Message, { icon: 5 });
+                                }
+                                layer.closeAll("loading");
+                            },
+                            error: function (err) {
+                                layer.msg("閿欒:" + err, { icon: 5 });
                             }
-                            else {
-                                layer.msg(data.Message, { icon: 5 });
-                            }
-                            layer.closeAll("loading");
-                        },
-                        error: function (err) {
-                            layer.msg("閿欒:" + err, { icon: 5 });
-                        }
-                    });
+                        });
                     return false;
                 }
             });
@@ -807,26 +820,27 @@
                                     elem: '#wl-table'
                                     //, url: 'http://61.130.49.162:9090/WMSAPI///SellOut/DisBillEntryList_Webs_Json'
                                     , url: GetWEBURL1() + '/SellOut/DisBillEntryList_Webs_Json'
-                              , toolbar: '#toolbarDemo'
-                              , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
-                              , cols: [[
-                                  { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                                , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                              ]]
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                                    ]]
                                     // , data: [linterid]
                                     // , page: true
-                              , height: 500
-                              , done: function () {
-                                  layer.closeAll("loading");
-                              }
+                                    , height: 500
+                                    , done: function () {
+                                        layer.closeAll("loading");
+                                    }
                                 });
                             }
                             else {
@@ -865,30 +879,31 @@
                                 sessionStorage["SourceFlag"] = true;
                                 element.tabChange('tab-SellOutBill', '2');
                                 layer.load(3);
-                                
+
                                 table.render({
                                     elem: '#wl-table'
                                     , url: GetWEBURL1() + '/SellOut/DisBillEntryList_Webs_Json'
-                                  , toolbar: '#toolbarDemo'
-                                  , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
-                                  , cols: [[
-                                      { type: 'radio' }
-                                    , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                                    , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
-                                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                                    , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                                  ]]
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                                    ]]
                                     // , data: [linterid]
                                     // , page: true
-                                  , height: 500
-                                  , done: function () {
-                                      layer.closeAll("loading");
-                                  }
+                                    , height: 500
+                                    , done: function () {
+                                        layer.closeAll("loading");
+                                    }
                                 });
                             }
                             else {
@@ -908,14 +923,35 @@
                 // , url: 'http://localhost:8083/Web/SellOut/GetHBarCodeShowBillSub'
                 //, toolbar: '#toolbarDemo'
                 // , where: { sMsg: linterid, sMsg2: lentryid }
-             , cols: [[
-               , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
-             ]]
-             , page: true
-             , height: 500
-             , done: function () {
-             }
+                , cols: [[
+                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+                ]]
+                , page: true
+                , height: 500
+                , done: function () {
+                }
             });
+
+
+            //琛屽唴浜嬩欢
+            table.on('tool(wl-table)', function (obj) {
+                var data = obj.data;
+                console.log(data.婧愬崟涓诲唴鐮�);
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'edit') {
+                    var _obj = obj;
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '鎵爜璇︽儏鍒楄〃'
+                        , content: ['../../../views/Baseset/鍩虹璧勬枡/WMSBarCodeDetailsList.html?HInterID=' + data.HSourceInterID + '&HBillType=3789', 'yes']
+                        , end: function () {
+
+                        }
+                    })
+                }
+            });
+
         });
         function GetHWHValue(obj)  //杩斿洖浠撳簱
         {
@@ -953,11 +989,11 @@
                 return false;
             }
             if ($("#HSecManager").val() == '') {
-                layer.msg("鍙戣揣浜烘病鏈夐�夋嫨锛�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
+                layer.msg("鍙戣揣浜烘病鏈夐�夋嫨锛�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
                 return false;
             }
             if ($("#HKeeper").val() == '') {
-                layer.msg("淇濈浜烘病鏈夐�夋嫨锛�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
+                layer.msg("淇濈浜烘病鏈夐�夋嫨锛�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
                 return false;
             }
             //if ($("#HSupName").val() == '') {
@@ -969,22 +1005,22 @@
             //    return false;
             //}
             if ($("#HBillNo").val() == '') {
-                layer.msg("閿欒鐨勫崟鎹彿锛�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
+                layer.msg("閿欒鐨勫崟鎹彿锛�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
                 return false;
             }
             if ($("#HInterID").val() == '') {
-                layer.msg("閿欒鐨勫唴鐮�!", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
+                layer.msg("閿欒鐨勫唴鐮�!", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
                 return false;
             }
             if (sSubStr == '') {
-                layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
+                layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
                 return false;
             }
             if (sSubStr != '') {
                 for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴斿彂鏁伴噺
                     if (parseFloat(sSubStr[i].HQtyMust) > 0) {
                         if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
-                            layer.msg("鏁伴噺涓嶈兘澶т簬搴斿彂鏁伴噺锛�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
+                            layer.msg("鏁伴噺涓嶈兘澶т簬搴斿彂鏁伴噺锛�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
                             return false;
                         }
                     }
@@ -995,7 +1031,7 @@
                     }
                 }
                 if (s == 0) {
-                    layer.msg("閿�鍞嚭搴撹褰曟湭鎵爜锛�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
+                    layer.msg("閿�鍞嚭搴撹褰曟湭鎵爜锛�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
                     return false;
                 }
             }
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBackBill_Fast.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBackBill_Fast.html"
index 4848659..491fdc6 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBackBill_Fast.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBackBill_Fast.html"
@@ -223,226 +223,229 @@
     <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 type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>
+    </script>
     <script>
-    layui.config({
-        base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
-    }).extend({
-        index: 'lib/index' //涓诲叆鍙fā鍧�
-    }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
-        var $ = layui.$
-        , admin = layui.admin
-        , layer = layui.layer
-        , table = layui.table
-        , form = layui.form
-        , element = layui.element;
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index' //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element;
 
 
-        //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
-        $("#HWHID").val(sessionStorage["HWHID"]);
-        $("#HWHNAME").val(sessionStorage["HWHName"]);
-        $("#HStockPlaceID").val(sessionStorage["HSPID"]);
-        $("#HStockPlaceName").val(sessionStorage["HSPName"]);
-        //$("#HSupID").val(sessionStorage["HSupID"]);
-        //$("#HSupName").val(sessionStorage["HSupName"]);
-        $("#HDeptID").val(sessionStorage["HDeptID"]);
-        $("#HDeptName").val(sessionStorage["HDept"]);
-        $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
-        $("#HSecManager").val(sessionStorage["HSecManager"]);
-        $("#HKeeperID").val(sessionStorage["HKeeperID"]);
-        $("#HKeeper").val(sessionStorage["HKeeper"]);
-        $("#HMaker").val(sessionStorage["HUserName"]);
-        $("#HMaker").hide();
-        $("#HMakerID").hide();
-        $("#HBillerID").val(sessionStorage["HBillerID"]);
-        $("#HBillerID").hide();
+            //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
+            $("#HWHID").val(sessionStorage["HWHID"]);
+            $("#HWHNAME").val(sessionStorage["HWHName"]);
+            $("#HStockPlaceID").val(sessionStorage["HSPID"]);
+            $("#HStockPlaceName").val(sessionStorage["HSPName"]);
+            //$("#HSupID").val(sessionStorage["HSupID"]);
+            //$("#HSupName").val(sessionStorage["HSupName"]);
+            $("#HDeptID").val(sessionStorage["HDeptID"]);
+            $("#HDeptName").val(sessionStorage["HDept"]);
+            $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
+            $("#HSecManager").val(sessionStorage["HSecManager"]);
+            $("#HKeeperID").val(sessionStorage["HKeeperID"]);
+            $("#HKeeper").val(sessionStorage["HKeeper"]);
+            $("#HMaker").val(sessionStorage["HUserName"]);
+            $("#HMaker").hide();
+            $("#HMakerID").hide();
+            $("#HBillerID").val(sessionStorage["HBillerID"]);
+            $("#HBillerID").hide();
 
-        //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
+            //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
 
 
-        //鑾峰彇鍙傛暟
-        function getUrlVars() {
-            var vars = [], hash;
-            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
-            for (var i = 0; i < hashes.length; i++) {
-                hash = hashes[i].split('=');
-                vars.push(hash[0]);
-                vars[hash[0]] = hash[1];
+            //鑾峰彇鍙傛暟
+            function getUrlVars() {
+                var vars = [], hash;
+                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+                for (var i = 0; i < hashes.length; i++) {
+                    hash = hashes[i].split('=');
+                    vars.push(hash[0]);
+                    vars[hash[0]] = hash[1];
+                }
+                return vars;
             }
-            return vars;
-        }
-        var params = getUrlVars();
-        var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
-        var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
-        
-        function  RoadBillMain(linterid)//鍔犺浇琛ㄥご
-        {
-            $.ajax({
-                url: GetWEBURL() + "/Web/GetPonderationBill",
-                type: "GET",
-                data: { "HInterID": linterid },
-                success: function (d) {
-                    // console.log(d.data);
-                    $("#HInterID").val(d.data[0].HInterID);
-                    $("#HBillNo").val(d.data[0].HBillNo);
-                    $("#HBillType").val(d.data[0].HSourceBillType);
-                    $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
-                    //$("#HWHID").val(d.data[0].HWhID);
-                    //$("#HKeeperID").val(d.data[0].HKeeperID);
-                    //$("#HSecManagerID").val(d.data[0].HSecManagerID);
-                    //$("#HDeptID").val(d.data[0].HDeptID);
-                    //$("#HBarCode").val(d.data[0].HBarCode);
-                    //$("#HQty").val(d.data[0].HQty);
-                }
-            })
-        }
+            var params = getUrlVars();
+            var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
+            var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
+
+            function RoadBillMain(linterid)//鍔犺浇琛ㄥご
+            {
+                $.ajax({
+                    url: GetWEBURL() + "/Web/GetPonderationBill",
+                    type: "GET",
+                    data: { "HInterID": linterid },
+                    success: function (d) {
+                        // console.log(d.data);
+                        $("#HInterID").val(d.data[0].HInterID);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                        $("#HBillType").val(d.data[0].HSourceBillType);
+                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
+                        //$("#HWHID").val(d.data[0].HWhID);
+                        //$("#HKeeperID").val(d.data[0].HKeeperID);
+                        //$("#HSecManagerID").val(d.data[0].HSecManagerID);
+                        //$("#HDeptID").val(d.data[0].HDeptID);
+                        //$("#HBarCode").val(d.data[0].HBarCode);
+                        //$("#HQty").val(d.data[0].HQty);
+                    }
+                })
+            }
 
 
-        function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
-        {
-            table.render({
-            elem: '#wl-table'
-                , url: GetWEBURL1() + '/MateOutBackBill/DisBillEntryListBack_Webs_Json'
-                , toolbar: '#toolbarDemo'
-                , where: { HBillID: linterid, HBillType: '1244', sWhere: '' }
-                , cols: [[
-                    { type: 'radio' }
-                , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
-                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                ]]
-            // , data: [linterid]
-            // , page: true
-                , height: 500
-                , done: function () {
-                    layer.closeAll("loading");
-                }
+            function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
+            {
+                table.render({
+                    elem: '#wl-table'
+                    , url: GetWEBURL1() + '/MateOutBackBill/DisBillEntryListBack_Webs_Json'
+                    , toolbar: '#toolbarDemo'
+                    , where: { HBillID: linterid, HBillType: '1244', sWhere: '' }
+                    , cols: [[
+                        { type: 'radio' }
+                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
+                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                    ]]
+                    // , data: [linterid]
+                    // , page: true
+                    , height: 500
+                    , done: function () {
+                        layer.closeAll("loading");
+                    }
+                });
+            }
+
+
+
+            //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
+
+            //鍒ゆ柇鏄惁鏂板
+            if (linterid == null || linterid == 0) {//鑾峰彇鏈�澶у崟鎹彿 new
+                $("#HInterID").val("");
+                $("#HBillNo").val("");
+                $.ajax({
+                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    type: "GET",
+                    data: { "HBillType": '1244' },
+                    success: function (d) {
+                        //console.log(d.data);
+                        $("#HInterID").val(d.data[0].HInterID);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                    }
+                });
+            }
+            else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+                RoadBillMain(linterid);
+                RoadBillSub(linterid);
+            }
+
+            form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撳簱鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
             });
-        }
-
-        
-
-        //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new 
-
-        //鍒ゆ柇鏄惁鏂板
-        if (linterid == null || linterid == 0) {//鑾峰彇鏈�澶у崟鎹彿 new
-            $("#HInterID").val("");
-            $("#HBillNo").val(""); 
-            $.ajax({
-                url: GetWEBURL() + "/Web/GetMAXNum",
-                type: "GET",
-                data: { "HBillType": '1244' },
-                success: function (d) {
-                    //console.log(d.data);
-                    $("#HInterID").val(d.data[0].HInterID);
-                    $("#HBillNo").val(d.data[0].HBillNo);
-                }
+            form.on('submit(HSpID-BT)', function () {//閫夋嫨浠撲綅
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撲綅鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"], 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
             });
-        }
-        else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
-            RoadBillMain(linterid);
-            RoadBillSub(linterid);
-        }
-
-        form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浠撳簱鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HSpID-BT)', function () {//閫夋嫨浠撲綅
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浠撲綅鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"], 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HSupID-BT)', function () {//閫夋嫨渚涘簲鍟�
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '渚涘簲鍟嗗垪琛�'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_SupplierList.html', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '棰嗘枡浜哄垪琛�'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
-            var sMainStr = JSON.stringify(data.field);
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '鍙戞枡浜哄垪琛�'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '閮ㄩ棬鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(cmdModify)', function () {//缂栬緫
-            var sSubStr = table.cache['wl-table'];
-            //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+            form.on('submit(HSupID-BT)', function () {//閫夋嫨渚涘簲鍟�
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '渚涘簲鍟嗗垪琛�'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_SupplierList.html', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '棰嗘枡浜哄垪琛�'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
+                var sMainStr = JSON.stringify(data.field);
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '鍙戞枡浜哄垪琛�'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '閮ㄩ棬鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(cmdModify)', function () {//缂栬緫
+                var sSubStr = table.cache['wl-table'];
+                //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
                 layer.open({
                     type: 2
                     , area: ['100%', '100%']
@@ -456,193 +459,169 @@
                         //$(".layui-btn").removeClass("layui-btn-disabled");
                     }
                 })
-           // }
-        });
+                // }
+            });
 
 
 
-        form.on('submit(cmdDelete)', function () {//鍒犻櫎
-            var checkStatus = table.checkStatus('wl-table')
-            , data = checkStatus.data;
-            // console.log(data);
-            var sInterID = $('#HInterID').val()
-            var sMaterID = data[0].HMaterID
-            var sBillType = '1244'
-            var sAuxPropID = data[0].HAuxPropID
-            //var sMTONo = data[0].HMTONo
-            var sMTONo = ''
-            var sSourceInterID = data[0].HSourceInterID
-            var sSourceEntryID = data[0].HSourceEntryID
-            $.ajax(
-               {
-                   type: "Get",
-                   url: GetWEBURL() + "/MateOutBill/Delete_Json",
-                   async: true,
-                   data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
-                   dataType: "json",
-                   success: function (data) {
-                       if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                           //layer.msg(data.Message, { icon: 1 });
-                           table.render({
-                               elem: '#wl-table'
-                              , url: GetWEBURL1() + '/MateOutBackBill/DisBillEntryListBack_Webs_Json'
-                              , toolbar: '#toolbarDemo'
-                              , where: { HBillID: sInterID, HBillType: '1244', sWhere: '' }
-                              , cols: [[
-                                  { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                                , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                              ]]
-                         , height: 500
-                           })
-                       }
-                       else {
-                           layer.msg(data.Message, { icon: 2 });
-                       }
-                   },
-                   error: function (err) {
-                       layer.msg('閿欒' + err, {
-                           icon: 5,
-                           time: 20000
-                       }, function () {
-                           //do something
-                       });
-                   }
-               });
-        });
-
-
-        form.on('submit(Cancel)', function () {
-            parent.location.href = "../../../views/index.html"
-            //window.close();//鍏抽棴褰撳墠椤�
-        })
-
-
-        form.on('submit(Saver)', function (data) {//鎻愪氦
-            //debugger;
-            var sMainStr = JSON.stringify(data.field);
-            var sSubStr = table.cache['wl-table'];
-            var sSourceType = $("#HBillType").val();
-            if (AllowLoadData(sSubStr) != false)//闈炵┖楠岃瘉
-            {
-                layer.load(3);
+            form.on('submit(cmdDelete)', function () {//鍒犻櫎
+                var checkStatus = table.checkStatus('wl-table')
+                    , data = checkStatus.data;
+                // console.log(data);
+                var sInterID = $('#HInterID').val()
+                var sMaterID = data[0].HMaterID
+                var sBillType = '1244'
+                var sAuxPropID = data[0].HAuxPropID
+                //var sMTONo = data[0].HMTONo
+                var sMTONo = ''
+                var sSourceInterID = data[0].HSourceInterID
+                var sSourceEntryID = data[0].HSourceEntryID
                 $.ajax(
+                    {
+                        type: "Get",
+                        url: GetWEBURL() + "/MateOutBill/Delete_Json",
+                        async: true,
+                        data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                //layer.msg(data.Message, { icon: 1 });
+                                table.render({
+                                    elem: '#wl-table'
+                                    , url: GetWEBURL1() + '/MateOutBackBill/DisBillEntryListBack_Webs_Json'
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1244', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                    ]]
+                                    , height: 500
+                                })
+                            }
+                            else {
+                                layer.msg(data.Message, { icon: 2 });
+                            }
+                        },
+                        error: function (err) {
+                            layer.msg('閿欒' + err, {
+                                icon: 5,
+                                time: 20000
+                            }, function () {
+                                //do something
+                            });
+                        }
+                    });
+            });
+
+
+            form.on('submit(Cancel)', function () {
+                parent.location.href = "../../../views/index.html"
+                //window.close();//鍏抽棴褰撳墠椤�
+            })
+
+
+            form.on('submit(Saver)', function (data) {//鎻愪氦
+                //debugger;
+                var sMainStr = JSON.stringify(data.field);
+                var sSubStr = table.cache['wl-table'];
+                var sSourceType = $("#HBillType").val();
+                if (AllowLoadData(sSubStr) != false)//闈炵┖楠岃瘉
                 {
-                    type: "POST", 
-                    url: GetWEBURL() + "/MateOut/set_SaveMateOutBackBill_Json",
-                    async: true,
-                    data: { "oMain": sMainStr  },
-                    dataType: "json",
-                    success: function (data) {
-                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
-                        }
-                        else {
-                            layer.msg(data.Message, { icon: 5 });
-                        }
-                        layer.closeAll("loading");
-                    },
-                    error: function (err) {
-                        layer.msg("閿欒:" + err, { icon: 5 });
-                    }
-                });
-                return false;
-            } 
-        });
-        //鐩戝惉鎻愪氦
-        form.verify({
-            numberOrEmpty: function (value, item) {
-                // if (value != '') {
-                if (!/^\d+$/.test(value)) {
-                    return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
-                }
-                //}
-            }
-        });
-        $('#HBarCode').on('keydown', function (event) {
-            var sBarCode = $('#HBarCode').val()
-            var sInterID = $("#HInterID").val()
-            var sBillNo = $("#HBillNo").val()
-            var sQty = $("#HQty").val()
-            var sHBillType = $("#HBillType").val()  //婧愬崟绫诲瀷
-            var sHWHID = $("#HWHID").val()
-            var sHSPID = $("#HStockPlaceID").val()
-            var sBillType = '1244'
-            var sSourceBillNo = $("#HSourceBillNo").val()
-            if (sQty == "") {
-                sQty = 0;
-            }
-          
-            if (event.keyCode == 13) {
-                if (sBarCode == '') {
-                    layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                    layer.load(3);
+                    $.ajax(
+                        {
+                            type: "POST",
+                            url: GetWEBURL() + "/MateOut/set_SaveMateOutBackBill_Json",
+                            async: true,
+                            data: { "oMain": sMainStr },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                    layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
+                                }
+                                else {
+                                    layer.msg(data.Message, { icon: 5 });
+                                }
+                                layer.closeAll("loading");
+                            },
+                            error: function (err) {
+                                layer.msg("閿欒:" + err, { icon: 5 });
+                            }
+                        });
                     return false;
                 }
-                if (sBarCode != "") {
-                    $('#HBarCode').val("");
+            });
+            //鐩戝惉鎻愪氦
+            form.verify({
+                numberOrEmpty: function (value, item) {
+                    // if (value != '') {
+                    if (!/^\d+$/.test(value)) {
+                        return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
+                    }
+                    //}
                 }
+            });
+            $('#HBarCode').on('keydown', function (event) {
+                var sBarCode = $('#HBarCode').val()
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var sQty = $("#HQty").val()
+                var sHBillType = $("#HBillType").val()  //婧愬崟绫诲瀷
+                var sHWHID = $("#HWHID").val()
+                var sHSPID = $("#HStockPlaceID").val()
+                var sBillType = '1244'
+                var sSourceBillNo = $("#HSourceBillNo").val()
                 if (sQty == "") {
                     sQty = 0;
                 }
-                $.ajax({
-                    url: GetWEBURL() + "/MateOutBackBill/get_CheckTypeByBarCode_All_Json",
-                    type: "GET",
-                    data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": true, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
-                    success: function (result) {
-                        if (result.count == 1) {
-                            if (result.data.HBarType == '浠撳簱鏉$爜') {
-                                $("#HWHNAME").val(result.data.HWhName);
-                                $("#HWHID").val(result.data.HWhID);
-                                $("#HStockPlaceName").val("");
-                                $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
-                                element.tabChange('tab-MateOutBackBill', '2');  //璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '浠撲綅鏉$爜') {
-                                $("#HStockPlaceName").val(result.data.HSPName);
-                                $("#HStockPlaceID").val(result.data.HSPID);
-                                $("#HWHNAME").val(result.data.HWhName);
-                                $("#HWHID").val(result.data.HWhID);
-                                $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
-                                element.tabChange('tab-MateOutBackBill', '2');//璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
-                                $("#HDeptName").val(result.data.HDeptName);
-                                $("#HDeptID").val(result.data.HDeptID);
-                                $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
-                                element.tabChange('tab-MateOutBackBill', '2');//璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '婧愬崟鏉$爜') {
-                                $("#HSupName").val(result.data.HSupName);
-                                $("#HSupID").val(result.data.HSupID);
-                                $("#HDeptName").val(result.data.HDeptName);
-                                $("#HDeptID").val(result.data.HDeptID);
-                                $("#HSourceBillNo").val(result.data.HSourceBillNo);
-                                sessionStorage["SourceFlag"] = true;
-                                //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
-                                if (result.data.HSourceBillType == "3720") {
-                                    $("#HBillType").val("3720");
+
+                if (event.keyCode == 13) {
+                    if (sBarCode == '') {
+                        layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                        return false;
+                    }
+                    if (sBarCode != "") {
+                        $('#HBarCode').val("");
+                    }
+                    if (sQty == "") {
+                        sQty = 0;
+                    }
+                    $.ajax({
+                        url: GetWEBURL() + "/MateOutBackBill/get_CheckTypeByBarCode_All_Json",
+                        type: "GET",
+                        data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": true, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                if (result.data.HBarType == '浠撳簱鏉$爜') {
+                                    $("#HWHNAME").val(result.data.HWhName);
+                                    $("#HWHID").val(result.data.HWhID);
+                                    $("#HStockPlaceName").val("");
+                                    $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+                                    element.tabChange('tab-MateOutBackBill', '2');  //璺宠浆椤电
                                 }
-                                else if (result.data.HSourceBillType == "1204") {
-                                    $("#HBillType").val("1204");
+                                else if (result.data.HBarType == '浠撲綅鏉$爜') {
+                                    $("#HStockPlaceName").val(result.data.HSPName);
+                                    $("#HStockPlaceID").val(result.data.HSPID);
+                                    $("#HWHNAME").val(result.data.HWhName);
+                                    $("#HWHID").val(result.data.HWhID);
+                                    $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+                                    element.tabChange('tab-MateOutBackBill', '2');//璺宠浆椤电
                                 }
-                                else {
-                                    $("#HBillType").val("鎵嬪伐褰曞叆");
+                                else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
+                                    $("#HDeptName").val(result.data.HDeptName);
+                                    $("#HDeptID").val(result.data.HDeptID);
+                                    $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+                                    element.tabChange('tab-MateOutBackBill', '2');//璺宠浆椤电
                                 }
-                                $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
-                                element.tabChange('tab-MateOutBackBill', '3');
-                            }
-                            else {
-                                if (sessionStorage["SourceFlag"] == "true") {
-                                    element.tabChange('tab-MateOutBackBill', '3');
-                                }
-                                else {
+                                else if (result.data.HBarType == '婧愬崟鏉$爜') {
                                     $("#HSupName").val(result.data.HSupName);
                                     $("#HSupID").val(result.data.HSupID);
                                     $("#HDeptName").val(result.data.HDeptName);
@@ -659,204 +638,245 @@
                                     else {
                                         $("#HBillType").val("鎵嬪伐褰曞叆");
                                     }
-                                    $("#HNote").val(";鐗╂枡鏉$爜");
+                                    $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
                                     element.tabChange('tab-MateOutBackBill', '3');
                                 }
+                                else {
+                                    if (sessionStorage["SourceFlag"] == "true") {
+                                        element.tabChange('tab-MateOutBackBill', '3');
+                                    }
+                                    else {
+                                        $("#HSupName").val(result.data.HSupName);
+                                        $("#HSupID").val(result.data.HSupID);
+                                        $("#HDeptName").val(result.data.HDeptName);
+                                        $("#HDeptID").val(result.data.HDeptID);
+                                        $("#HSourceBillNo").val(result.data.HSourceBillNo);
+                                        sessionStorage["SourceFlag"] = true;
+                                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                        if (result.data.HSourceBillType == "3720") {
+                                            $("#HBillType").val("3720");
+                                        }
+                                        else if (result.data.HSourceBillType == "1204") {
+                                            $("#HBillType").val("1204");
+                                        }
+                                        else {
+                                            $("#HBillType").val("鎵嬪伐褰曞叆");
+                                        }
+                                        $("#HNote").val(";鐗╂枡鏉$爜");
+                                        element.tabChange('tab-MateOutBackBill', '3');
+                                    }
+                                }
+                                layer.load(3)
+                                table.render({
+                                    elem: '#wl-table'
+                                    , url: GetWEBURL1() + '/MateOutBackBill/DisBillEntryListBack_Webs_Json'
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1244', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                                    ]]
+                                    // , data: [linterid]
+                                    // , page: true
+                                    , height: 500
+                                    , done: function () {
+                                        layer.closeAll("loading");
+                                    }
+                                });
                             }
-                            layer.load(3)
-                            table.render({
-                                elem: '#wl-table'
-                              , url: GetWEBURL1() + '/MateOutBackBill/DisBillEntryListBack_Webs_Json'
-                              , toolbar: '#toolbarDemo'
-                              , where: { HBillID: sInterID, HBillType: '1244', sWhere: '' }
-                              , cols: [[
-                                  { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                                , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                              ]]
-                                // , data: [linterid]
-                                // , page: true
-                              , height: 500
-                              , done: function () {
-                                  layer.closeAll("loading");
-                              }
-                            });
+                            else {
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            }
+                            layer.closeAll("loading");
                         }
-                        else {
-                            // $("#verifycode").click();
-                            //layer.msg(result.Message, { icon: 5 });
-                            layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                    });
+                }
+            });
+            $('#HSourceBillNo').on('keydown', function (event) {
+                var HSourceBillNo = $('#HSourceBillNo').val()
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var HSourceBillType = $("#HBillType").val()
+                if (event.keyCode == 13) {
+                    $.ajax({
+                        url: GetWEBURL() + "/MateOutBackBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
+                        type: "GET",
+                        data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
+                        success: function (result) {
+                            sessionStorage["SourceFlag"] = true;
+                            element.tabChange('tab-MateOutBackBill', '3');
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                layer.load(3)
+                                table.render({
+                                    elem: '#wl-table'
+                                    , url: GetWEBURL1() + '/MateOutBackBill/DisBillEntryListBack_Webs_Json'
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1244', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                    ]]
+                                    // , data: [linterid]
+                                    // , page: true
+                                    , height: 500
+                                    , done: function () {
+                                        layer.closeAll("loading");
+                                    }
+                                });
+                            }
+                            else {
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            }
+                            layer.closeAll("loading");
                         }
-                        layer.closeAll("loading");
-                    }
-                });
-            }
-        });
-        $('#HSourceBillNo').on('keydown', function (event) {
-            var HSourceBillNo = $('#HSourceBillNo').val()
-            var sInterID = $("#HInterID").val()
-            var sBillNo = $("#HBillNo").val()
-            var HSourceBillType = $("#HBillType").val()
-            if (event.keyCode == 13) {
-                $.ajax({ 
-                    url: GetWEBURL() + "/MateOutBackBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
-                    type: "GET",
-                    data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
-                    success: function (result) {
-                        sessionStorage["SourceFlag"] = true;
-                        element.tabChange('tab-MateOutBackBill', '3');
-                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            layer.load(3)
-                            table.render({
-                                elem: '#wl-table'
-                              , url: GetWEBURL1() + '/MateOutBackBill/DisBillEntryListBack_Webs_Json'
-                              , toolbar: '#toolbarDemo'
-                              , where: { HBillID: sInterID, HBillType: '1244', sWhere: '' }
-                              , cols: [[
-                                  { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                                , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                              ]]
-                                // , data: [linterid]
-                                // , page: true
-                              , height: 500
-                              , done: function () {
-                                  layer.closeAll("loading");
-                              }
-                            });
-                        }
-                        else {
-                            // $("#verifycode").click();
-                            //layer.msg(result.Message, { icon: 5 });
-                            layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
-                        }
-                        layer.closeAll("loading");
-                    }
-                });
-               // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
-            }
-        });
+                    });
+                    // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
+                }
+            });
 
-        table.render({
-            elem: '#mx-table'
-            // , url: 'http://61.130.49.162:9090/WMSAPI///GetHBarCodeShowBillSub'
-            //, toolbar: '#toolbarDemo'
-            // , where: { sMsg: linterid, sMsg2: lentryid }
-         , cols: [[
-           , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
-         ]]
-         , page: true
-         , height: 500
-         , done: function () {
-         }
+            table.render({
+                elem: '#mx-table'
+                // , url: 'http://61.130.49.162:9090/WMSAPI///GetHBarCodeShowBillSub'
+                //, toolbar: '#toolbarDemo'
+                // , where: { sMsg: linterid, sMsg2: lentryid }
+                , cols: [[
+                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+                ]]
+                , page: true
+                , height: 500
+                , done: function () {
+                }
+            });
+
+
+            //琛屽唴浜嬩欢
+            table.on('tool(wl-table)', function (obj) {
+                var data = obj.data;
+                //var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'edit') {
+                    var _obj = obj;
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '鎵爜璇︽儏鍒楄〃'
+                        , content: ['../../../views/Baseset/鍩虹璧勬枡/WMSBarCodeDetailsList.html?HInterID=' + data.HInterID + '&HBillType=' + data.HBillType + '&HMaterID=' + data.HMaterID + '&HAuxPropID=' + data.HAuxPropID + '&HMTONo=' + data.HMTONo + '&HBatchNo=' + data.HBatchNo + '&HSourceInterID=' + data.HSourceInterID + '&HSourceEntryID=' + data.HSourceEntryID + '&sWhere=', 'yes']
+                        , end: function () {
+
+                        }
+                    })
+                }
+            });
+
         });
-    });
-    function GetHWHValue(obj)  //杩斿洖浠撳簱
-    {
-        $("#HWHNAME").val(obj[0].HName);
-        sessionStorage["HWHID"] = obj[0].HItemID;
-        $("#HWHID").val(obj[0].HItemID);
-    }
-    function GetHSpValue(obj) {  //杩斿洖璋冨叆浠撲綅
-        $("#HStockPlaceName").val(obj[0].HName);
-        $("#HStockPlaceID").val(obj[0].HItemID);
-    }
-    function GetHSupValue(obj) {  //杩斿洖渚涘簲鍟�
-        $("#HSupName").val(obj[0].HName);
-        $("#HSupID").val(obj[0].HItemID);
-    }
-    function GetHKeeperValue(obj) {  //杩斿洖淇濈
-        $("#HKeeper").val(obj[0].HName);
-        $("#HKeeperID").val(obj[0].HItemID);
-    }
-    function GetHSecManagerValue(obj) {  //杩斿洖楠屾敹
-        $("#HSecManager").val(obj[0].HName);
-        $("#HSecManagerID").val(obj[0].HItemID);
-    }
-    function GetHDeptNameValue(obj) {   //杩斿洖閮ㄩ棬
-        $("#HDeptName").val(obj[0].HName);
-        $("#HDeptID").val(obj[0].HItemID);
-    }
-    function AllowLoadData(sSubStr) {  //闈炵┖楠岃瘉
-        //if ($("#HSourceBillNo").val() == '') {
-        //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
-        //    return false;
-        //}
-        //if($("#HDeptName").val()=='')
-        //{
-        //    layer.msg("閮ㄩ棬娌℃湁閫夋嫨!", { icon: 5 });
-        //    return false;
-        //}
-        //if ($("#HSecManager").val() == '') {
-        //    layer.msg("鍙戞枡浜烘病鏈夐�夋嫨!", { icon: 5 });
-        //    return false;
-        //}
-        //if ($("#HKeeper").val() == '') {
-        //    layer.msg("棰嗘枡浜烘病鏈夐�夋嫨!", { icon: 5 });
-        //    return false;
-        //}
-        //if ($("#HSupName").val() == '') {
-        //    layer.msg("渚涘簲鍟嗘病鏈夐�夋嫨!", { icon: 5 });
-        //    return false;
-        //}
-        //if ($("#HWHNAME").val() == '') {
-        //    layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
-        //    return false;
-        //}
-        if ($("#HBillNo").val() == '') {
-            layer.msg("閿欒鐨勫崟鎹彿!", { icon: 5 });
-            return false;
-        }
-        if ($("#HInterID").val() == '') {
-            layer.msg("閿欒鐨勫唴鐮�!", { icon: 5 });
-            return false;
-        }
-        if(sSubStr=='')
+        function GetHWHValue(obj)  //杩斿洖浠撳簱
         {
-            layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5 });
-            return false;
+            $("#HWHNAME").val(obj[0].HName);
+            sessionStorage["HWHID"] = obj[0].HItemID;
+            $("#HWHID").val(obj[0].HItemID);
         }
-        var s = 0;
-        if (sSubStr != '') {
-            for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
-                if (parseFloat(sSubStr[i].HQtyMust) > 0) {
-                    if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust))
-                    {
-                        layer.msg("鏁伴噺涓嶈兘澶т簬搴斿彂鏁伴噺锛�", { icon: 5 });
-                        return false;
-                    }
-                }
-            }
-            for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
-                if (parseFloat(sSubStr[i].HQty) > 0) {
-                    s = 1;
-                }
-            }
-            if (s == 0)
-            {
-                layer.msg("鐢熶骇棰嗘枡绾㈠瓧璁板綍鏈壂鐮侊紒", { icon: 5 });
+        function GetHSpValue(obj) {  //杩斿洖璋冨叆浠撲綅
+            $("#HStockPlaceName").val(obj[0].HName);
+            $("#HStockPlaceID").val(obj[0].HItemID);
+        }
+        function GetHSupValue(obj) {  //杩斿洖渚涘簲鍟�
+            $("#HSupName").val(obj[0].HName);
+            $("#HSupID").val(obj[0].HItemID);
+        }
+        function GetHKeeperValue(obj) {  //杩斿洖淇濈
+            $("#HKeeper").val(obj[0].HName);
+            $("#HKeeperID").val(obj[0].HItemID);
+        }
+        function GetHSecManagerValue(obj) {  //杩斿洖楠屾敹
+            $("#HSecManager").val(obj[0].HName);
+            $("#HSecManagerID").val(obj[0].HItemID);
+        }
+        function GetHDeptNameValue(obj) {   //杩斿洖閮ㄩ棬
+            $("#HDeptName").val(obj[0].HName);
+            $("#HDeptID").val(obj[0].HItemID);
+        }
+        function AllowLoadData(sSubStr) {  //闈炵┖楠岃瘉
+            //if ($("#HSourceBillNo").val() == '') {
+            //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
+            //    return false;
+            //}
+            //if($("#HDeptName").val()=='')
+            //{
+            //    layer.msg("閮ㄩ棬娌℃湁閫夋嫨!", { icon: 5 });
+            //    return false;
+            //}
+            //if ($("#HSecManager").val() == '') {
+            //    layer.msg("鍙戞枡浜烘病鏈夐�夋嫨!", { icon: 5 });
+            //    return false;
+            //}
+            //if ($("#HKeeper").val() == '') {
+            //    layer.msg("棰嗘枡浜烘病鏈夐�夋嫨!", { icon: 5 });
+            //    return false;
+            //}
+            //if ($("#HSupName").val() == '') {
+            //    layer.msg("渚涘簲鍟嗘病鏈夐�夋嫨!", { icon: 5 });
+            //    return false;
+            //}
+            //if ($("#HWHNAME").val() == '') {
+            //    layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
+            //    return false;
+            //}
+            if ($("#HBillNo").val() == '') {
+                layer.msg("閿欒鐨勫崟鎹彿!", { icon: 5 });
                 return false;
             }
+            if ($("#HInterID").val() == '') {
+                layer.msg("閿欒鐨勫唴鐮�!", { icon: 5 });
+                return false;
+            }
+            if (sSubStr == '') {
+                layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5 });
+                return false;
+            }
+            var s = 0;
+            if (sSubStr != '') {
+                for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
+                    if (parseFloat(sSubStr[i].HQtyMust) > 0) {
+                        if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
+                            layer.msg("鏁伴噺涓嶈兘澶т簬搴斿彂鏁伴噺锛�", { icon: 5 });
+                            return false;
+                        }
+                    }
+                }
+                for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
+                    if (parseFloat(sSubStr[i].HQty) > 0) {
+                        s = 1;
+                    }
+                }
+                if (s == 0) {
+                    layer.msg("鐢熶骇棰嗘枡绾㈠瓧璁板綍鏈壂鐮侊紒", { icon: 5 });
+                    return false;
+                }
+            }
+            else {
+                return true;
+            }
         }
-        else
-        {
-            return true;
-        }
-    }
     </script>
 
 </body>
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html"
index 49ea27b..5df1b15 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html"
@@ -822,34 +822,6 @@
             });
 
 
-            //娴嬭瘯鏁版嵁begin
-            var rowdata = [{
-                "HSNO": "1", "HQty": "2", "HQtyMust": "3", "HMaterName": "4", "HMaterNumber": "5"
-                , "HMaterModel": "6"
-                , "HSourceInterID": "367", "HSourceEntryID": "7", "HSourceBillNo": "8", "HBatchNo": "9"
-            }];
-            var option = {
-                elem: '#wl-table'
-                , height: 'full-1000'
-                , cols: [[
-                    { type: 'radio' }
-                    , { field: 'HSNO', title: '搴忓彿', width: 60 }
-                    , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 90 }
-                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 90 }
-                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 90 }
-                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 90 }
-                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 90 }
-                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 90 }
-                    , { field: 'HBatchNo', title: '鎵规', width: 90 }
-                    , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
-                ]]
-                //, page: true
-            };
-            option.data = rowdata;
-            table.render(option);
-            //娴嬭瘯鏁版嵁end
 
             //琛屽唴浜嬩欢
             table.on('tool(wl-table)', function (obj) {
@@ -860,7 +832,7 @@
                     var _obj = obj;
                     layer.open({
                         type: 2
-                        , area: ['90%', '90%']
+                        , area: ['100%', '100%']
                         , title: '鎵爜璇︽儏鍒楄〃'
                         , content: ['../../../views/Baseset/鍩虹璧勬枡/WMSBarCodeDetailsList.html?HInterID=' + data.HSourceInterID + '&HBillType=3789', 'yes']
                         , end: function () {
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
index 9cb2119..fddcb54 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
@@ -1,13 +1,22 @@
 锘�<!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title>浜у搧鍏ュ簱</title>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
     <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
     <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <style>
+        .layui-table-fixed .layui-table-body {
+            height: auto !important;
+        }
+
+        .layui-table-fixed.layui-hide {
+            display: block !important;
+        }
+    </style>
 </head>
 <!--<style>
     @media screen and (max-width: 450px) {
@@ -59,8 +68,8 @@
                                             </select>
                                             <!--<input type="text" name="cmbSourceType" id="cmbSourceType" lay-verify="cmbSourceType" autocomplete="off" class="layui-input">-->
                                         </div>
-                                        </div>
                                     </div>
+                                </div>
                                 <div class="layui-form-item">
                                     <div class="layui-row">
                                         <div class="layui-col-xs4">
@@ -69,7 +78,7 @@
                                         <div class="layui-col-xs8">
                                             <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input">
                                         </div>
-                                        </div>
+                                    </div>
                                 </div>
                             </div>
                             <div class="layui-tab-item">
@@ -224,6 +233,9 @@
     <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 type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>
+    </script>
     <script>
         layui.config({
             base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
@@ -231,11 +243,11 @@
             index: 'lib/index' //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
             var $ = layui.$
-            , admin = layui.admin
-            , layer = layui.layer
-            , table = layui.table
-            , form = layui.form
-            , element = layui.element;
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element;
             //娓呯┖鐣岄潰  new
 
             //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
@@ -273,8 +285,8 @@
             var params = getUrlVars();
             var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
             var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
-        
-            function  RoadBillMain(linterid)//鍔犺浇琛ㄥご
+
+            function RoadBillMain(linterid)//鍔犺浇琛ㄥご
             {
                 $.ajax({
                     url: GetWEBURL() + "/Web/GetPonderationBill",
@@ -306,37 +318,38 @@
                     , toolbar: '#toolbarDemo'
                     , where: { HBillID: linterid, HBillType: '1202', sWhere: '' }
                     , cols: [[
-                            { type: 'radio' }
-                            , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                            , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                            , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                            , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
-                            , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
-                            , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
-                            , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
-                            , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                            , { field: 'HBatchNo', title: '鎵规', width: 100 }
-                            , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
-                            , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
-                            , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
+                        { type: 'radio' }
+                        , { field: 'HQty', title: '鏁伴噺', width: 80 }
+                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+                        , { field: 'HBatchNo', title: '鎵规', width: 100 }
+                        , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
+                        , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+                        , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
                     ]]
                     , height: 500
                 })
             }
-             
+
             //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
 
-            
 
-            
 
-            
+
+
+
 
             //鍒ゆ柇鏄惁鏂板
             if (linterid == null || linterid == 0) {
                 //鑾峰彇鏈�澶у崟鎹彿 new
                 $("#HInterID").val("");
-                $("#HBillNo").val(""); 
+                $("#HBillNo").val("");
                 $.ajax({
                     url: GetWEBURL() + "/Web/GetMAXNum",
                     type: "GET",
@@ -347,109 +360,107 @@
                         $("#HBillNo").val(d.data[0].HBillNo);
                     }
                 });
-            } 
+            }
             else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
                 RoadBillMain(linterid);
                 RoadBillSub(linterid);
             }
 
 
-        //杩涘叆鐗╂枡鏄庣粏椤电銆佹潯鐮佹 鍏夋爣鐒︾偣   new
-        if (1 == 2)
-        {
-            element.tabChange('tab-ProductlnBill', '3');
-            var pFocus = $("#HBarCode");
-            pFocus.focus();
-            pFocus.select();
-        }
-        else
-        {
-            element.tabChange('tab-ProductlnBill', '1');
-            var pFocus = $("#HSourceBillNo");
-            pFocus.focus();
-            pFocus.select();
-        }
-        //
-        //
-        form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浠撳簱鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HSPID-BT)', function () {//閫夋嫨浠撲綅
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浠撲綅鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HSpID', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '淇濈鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
-            var sMainStr = JSON.stringify(data.field);
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '楠屾敹鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '閮ㄩ棬鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(cmdModify)', function () {//缂栬緫
-            var sSubStr = table.cache['wl-table'];
-            //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+            //杩涘叆鐗╂枡鏄庣粏椤电銆佹潯鐮佹 鍏夋爣鐒︾偣   new
+            if (1 == 2) {
+                element.tabChange('tab-ProductlnBill', '3');
+                var pFocus = $("#HBarCode");
+                pFocus.focus();
+                pFocus.select();
+            }
+            else {
+                element.tabChange('tab-ProductlnBill', '1');
+                var pFocus = $("#HSourceBillNo");
+                pFocus.focus();
+                pFocus.select();
+            }
+            //
+            //
+            form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撳簱鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HSPID-BT)', function () {//閫夋嫨浠撲綅
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撲綅鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HSpID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '淇濈鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
+                var sMainStr = JSON.stringify(data.field);
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '楠屾敹鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '閮ㄩ棬鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(cmdModify)', function () {//缂栬緫
+                var sSubStr = table.cache['wl-table'];
+                //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
                 layer.open({
                     type: 2
                     , area: ['100%', '100%']
@@ -463,198 +474,176 @@
                         //$(".layui-btn").removeClass("layui-btn-disabled");
                     }
                 })
-           // }
-        });
+                // }
+            });
 
-        form.on('submit(Cancel)', function () {
-            parent.location.href = "../../../views/index.html"
-            //window.close();//鍏抽棴褰撳墠椤�
-        })
+            form.on('submit(Cancel)', function () {
+                parent.location.href = "../../../views/index.html"
+                //window.close();//鍏抽棴褰撳墠椤�
+            })
 
-        form.on('submit(cmdDelete)', function () {//鍒犻櫎
-            var checkStatus = table.checkStatus('wl-table')
-            , data = checkStatus.data;
-            var sInterID = $('#HInterID').val()
-            var sMaterID = data[0].HMaterID
-            var sBillType = '1202'
-            var sAuxPropID = data[0].HAuxPropID
-            //var sMTONo = data[0].HMTONo
-            var sMTONo = ''
-            var sSourceInterID = data[0].HSourceInterID
-            var sSourceEntryID = data[0].HSourceEntryID
-            $.ajax(
-               {
-                   type: "Get",
-                   //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/Delete_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                   url: GetWEBURL() + "/ProductIn/Delete_Json",
-                   async: true,
-                   data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
-                   dataType: "json",
-                   success: function (data) {
-                       if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                           //layer.msg(data.Message, { icon: 1 });
-                           table.render({
-                               elem: '#wl-table'
-                               //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Mate_Webs_Json'
-                         , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
-                         , cellMinWidth: 80
-                         , toolbar: '#toolbarDemo'
-                         , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
-                         , cols: [[
-                                { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                                , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 100 }
-                                , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
-                                , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
-                                , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
-                         ]]
-                         , height: 500
-                           })
-                       }
-                       else {
-                           layer.msg(data.Message, { icon: 2 });
-                       }
-                   },
-                   error: function (err) {
-                       layer.msg('閿欒' + err, {
-                           icon: 5,
-                           time: 20000
-                       }, function () {
-                           //do something
-                       });
-                   }
-               });
-        });
-
-
-        form.on('submit(Saver)', function (data) {//鎻愪氦
-            //debugger;
-            var sMainStr = JSON.stringify(data.field);
-            var sSubStr = table.cache['wl-table'];
-            var sSourceType = $("#HBillType").val();
-            if (AllowLoadData(sSubStr) != false)//闈炵┖楠岃瘉
-            {
-                layer.load(3);
+            form.on('submit(cmdDelete)', function () {//鍒犻櫎
+                var checkStatus = table.checkStatus('wl-table')
+                    , data = checkStatus.data;
+                var sInterID = $('#HInterID').val()
+                var sMaterID = data[0].HMaterID
+                var sBillType = '1202'
+                var sAuxPropID = data[0].HAuxPropID
+                //var sMTONo = data[0].HMTONo
+                var sMTONo = ''
+                var sSourceInterID = data[0].HSourceInterID
+                var sSourceEntryID = data[0].HSourceEntryID
                 $.ajax(
-                {
-                    type: "POST",
-                    //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/set_SaveProductInBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                    url: GetWEBURL() + "/ProductIn/set_SaveProductInBill_Json",
-                    async: true,
-                    data: { "oMain": sMainStr  },
-                    dataType: "json",
-                    success: function (data) {
-                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
-                        }
-                        else {
-                            layer.msg(data.Message, { icon: 5 });
-                        }
-                        layer.closeAll("loading");
-                    },
-                    error: function (err) {
-                        layer.msg("閿欒:" + err, { icon: 5 });
-                    }
-                });
-                return false;
-            } 
-        });
-        //鐩戝惉鎻愪氦
-        form.verify({
-            numberOrEmpty: function (value, item) {
-                // if (value != '') {
-                if (!/^\d+$/.test(value)) {
-                    return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
-                }
-                //}
-            }
-        });
-        $('#HBarCode').on('keydown', function (event) {  //鎵潯鐮�
-            var sSubStr = table.cache['wl-table'];
-            var sBarCode = $('#HBarCode').val()
-            var sInterID = $("#HInterID").val()
-            var sBillNo = $("#HBillNo").val()
-            var sQty = $("#HQty").val()
-            var sHBillType = $("#HBillType").val()  //婧愬崟绫诲瀷
-            var sBillType = '1202'
-            var sHWHID = $("#HWHID").val()
-            var sHSPID = $("#HStockPlaceID").val()
-            var sSourceBillNo = $("#HSourceBillNo").val()
-            if (sQty == "") {
-                sQty = 0;
-            }
-            if (event.keyCode == 13) {
-                //鍒ゆ柇鏉$爜鏄惁涓虹┖  new
-                if (sBarCode == '') {
-                    layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
-                    return false;
-                }
-                if (sBarCode != "") {
-                    $('#HBarCode').val("");
-                }
-                if (sQty != "") {
-                    $('#HQty').val("");
-                }
-
-                //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
-                $.ajax({
-                    //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/get_CheckTypeByBarCode_Json",
-                    url: GetWEBURL() + "/ProductIn/get_CheckTypeByBarCode_Json",
-                    type: "GET",
-                    data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
-                    success: function (result) {
-                        if (result.count == 1) {
-                            if (result.data.HBarType == '浠撳簱鏉$爜') {
-                                $("#HWHNAME").val(result.data.HWhName);
-                                $("#HWHID").val(result.data.HWhID);
-                                $("#HStockPlaceName").val("");
-                                $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
-                                element.tabChange('tab-ProductlnBill', '2');  //璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '浠撲綅鏉$爜') {
-                                $("#HStockPlaceName").val(result.data.HSPName);
-                                $("#HStockPlaceID").val(result.data.HSPID);
-                                $("#HWHNAME").val(result.data.HWhName);
-                                $("#HWHID").val(result.data.HWhID);
-                                $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
-                                element.tabChange('tab-ProductlnBill', '2');//璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
-                                $("#HDeptName").val(result.data.HDeptName);
-                                $("#HDeptID").val(result.data.HDeptID);
-                                $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
-                                element.tabChange('tab-ProductlnBill', '2');//璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '婧愬崟鏉$爜') {
-                                $("#HSupName").val(result.data.HSupName);
-                                $("#HSupID").val(result.data.HSupID);
-                                $("#HDeptName").val(result.data.HDeptName);
-                                $("#HDeptID").val(result.data.HDeptID);
-                                $("#HSourceBillNo").val(result.data.HSourceBillNo);
-                                sessionStorage["SourceFlag"] = true;
-                                //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
-                                if (result.data.HSourceBillType == "3710") {
-                                    $("#HBillType").val("3710");
-
-                                }
-                                else {
-                                    $("#HBillType").val("-1");
-                                }
-                                $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
-                                element.tabChange('tab-ProductlnBill', '3');
+                    {
+                        type: "Get",
+                        //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/Delete_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        url: GetWEBURL() + "/ProductIn/Delete_Json",
+                        async: true,
+                        data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                //layer.msg(data.Message, { icon: 1 });
+                                table.render({
+                                    elem: '#wl-table'
+                                    //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Mate_Webs_Json'
+                                    , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
+                                    , cellMinWidth: 80
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 80 }
+                                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 100 }
+                                        , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
+                                        , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+                                        , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
+                                    ]]
+                                    , height: 500
+                                })
                             }
                             else {
-                                if (sessionStorage["SourceFlag"] == "true") {
-                                    element.tabChange('tab-ProductlnBill', '3');
+                                layer.msg(data.Message, { icon: 2 });
+                            }
+                        },
+                        error: function (err) {
+                            layer.msg('閿欒' + err, {
+                                icon: 5,
+                                time: 20000
+                            }, function () {
+                                //do something
+                            });
+                        }
+                    });
+            });
+
+
+            form.on('submit(Saver)', function (data) {//鎻愪氦
+                //debugger;
+                var sMainStr = JSON.stringify(data.field);
+                var sSubStr = table.cache['wl-table'];
+                var sSourceType = $("#HBillType").val();
+                if (AllowLoadData(sSubStr) != false)//闈炵┖楠岃瘉
+                {
+                    layer.load(3);
+                    $.ajax(
+                        {
+                            type: "POST",
+                            //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/set_SaveProductInBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            url: GetWEBURL() + "/ProductIn/set_SaveProductInBill_Json",
+                            async: true,
+                            data: { "oMain": sMainStr },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                    layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
                                 }
                                 else {
+                                    layer.msg(data.Message, { icon: 5 });
+                                }
+                                layer.closeAll("loading");
+                            },
+                            error: function (err) {
+                                layer.msg("閿欒:" + err, { icon: 5 });
+                            }
+                        });
+                    return false;
+                }
+            });
+            //鐩戝惉鎻愪氦
+            form.verify({
+                numberOrEmpty: function (value, item) {
+                    // if (value != '') {
+                    if (!/^\d+$/.test(value)) {
+                        return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
+                    }
+                    //}
+                }
+            });
+            $('#HBarCode').on('keydown', function (event) {  //鎵潯鐮�
+                var sSubStr = table.cache['wl-table'];
+                var sBarCode = $('#HBarCode').val()
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var sQty = $("#HQty").val()
+                var sHBillType = $("#HBillType").val()  //婧愬崟绫诲瀷
+                var sBillType = '1202'
+                var sHWHID = $("#HWHID").val()
+                var sHSPID = $("#HStockPlaceID").val()
+                var sSourceBillNo = $("#HSourceBillNo").val()
+                if (sQty == "") {
+                    sQty = 0;
+                }
+                if (event.keyCode == 13) {
+                    //鍒ゆ柇鏉$爜鏄惁涓虹┖  new
+                    if (sBarCode == '') {
+                        layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                        return false;
+                    }
+                    if (sBarCode != "") {
+                        $('#HBarCode').val("");
+                    }
+                    if (sQty != "") {
+                        $('#HQty').val("");
+                    }
+
+                    //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
+                    $.ajax({
+                        //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/get_CheckTypeByBarCode_Json",
+                        url: GetWEBURL() + "/ProductIn/get_CheckTypeByBarCode_Json",
+                        type: "GET",
+                        data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                if (result.data.HBarType == '浠撳簱鏉$爜') {
+                                    $("#HWHNAME").val(result.data.HWhName);
+                                    $("#HWHID").val(result.data.HWhID);
+                                    $("#HStockPlaceName").val("");
+                                    $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+                                    element.tabChange('tab-ProductlnBill', '2');  //璺宠浆椤电
+                                }
+                                else if (result.data.HBarType == '浠撲綅鏉$爜') {
+                                    $("#HStockPlaceName").val(result.data.HSPName);
+                                    $("#HStockPlaceID").val(result.data.HSPID);
+                                    $("#HWHNAME").val(result.data.HWhName);
+                                    $("#HWHID").val(result.data.HWhID);
+                                    $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+                                    element.tabChange('tab-ProductlnBill', '2');//璺宠浆椤电
+                                }
+                                else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
+                                    $("#HDeptName").val(result.data.HDeptName);
+                                    $("#HDeptID").val(result.data.HDeptID);
+                                    $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+                                    element.tabChange('tab-ProductlnBill', '2');//璺宠浆椤电
+                                }
+                                else if (result.data.HBarType == '婧愬崟鏉$爜') {
                                     $("#HSupName").val(result.data.HSupName);
                                     $("#HSupID").val(result.data.HSupID);
                                     $("#HDeptName").val(result.data.HDeptName);
@@ -666,217 +655,258 @@
                                         $("#HBillType").val("3710");
 
                                     }
-
                                     else {
                                         $("#HBillType").val("-1");
                                     }
-                                    $("#HNote").val(";鐗╂枡鏉$爜");
+                                    $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
                                     element.tabChange('tab-ProductlnBill', '3');
                                 }
+                                else {
+                                    if (sessionStorage["SourceFlag"] == "true") {
+                                        element.tabChange('tab-ProductlnBill', '3');
+                                    }
+                                    else {
+                                        $("#HSupName").val(result.data.HSupName);
+                                        $("#HSupID").val(result.data.HSupID);
+                                        $("#HDeptName").val(result.data.HDeptName);
+                                        $("#HDeptID").val(result.data.HDeptID);
+                                        $("#HSourceBillNo").val(result.data.HSourceBillNo);
+                                        sessionStorage["SourceFlag"] = true;
+                                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                        if (result.data.HSourceBillType == "3710") {
+                                            $("#HBillType").val("3710");
+
+                                        }
+
+                                        else {
+                                            $("#HBillType").val("-1");
+                                        }
+                                        $("#HNote").val(";鐗╂枡鏉$爜");
+                                        element.tabChange('tab-ProductlnBill', '3');
+                                    }
+                                }
+                                //$("#HSupID").val(result.data.HSupID);
+                                //$("#HSupName").val(result.data.HSupName);
+                                //$("#HDeptID").val(result.data.HDeptID);
+                                //$("#HDeptName").val(result.data.HDeptName);
+                                layer.load(3)
+                                table.render({
+                                    elem: '#wl-table'
+                                    //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+                                    , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                                    ]]
+                                    // , data: [linterid]
+                                    // , page: true
+                                    , height: 500
+                                    , done: function () {
+                                        layer.closeAll("loading");
+                                    }
+                                });
                             }
-                            //$("#HSupID").val(result.data.HSupID);
-                            //$("#HSupName").val(result.data.HSupName);
-                            //$("#HDeptID").val(result.data.HDeptID);
-                            //$("#HDeptName").val(result.data.HDeptName);
-                            layer.load(3)
-                            table.render({
-                                elem: '#wl-table'
-                                //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
-                          , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
-                          , toolbar: '#toolbarDemo'
-                          , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
-                          , cols: [[
-                               { type: 'radio' }
-                            , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                            , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
-                            , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                            , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                            , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                            , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                            , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                            , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                            , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                          ]]
-                                // , data: [linterid]
-                                // , page: true
-                          , height: 500
-                          , done: function () {
-                              layer.closeAll("loading");
-                          }
-                            });
+                            else {
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            }
+                            layer.closeAll("loading");
                         }
-                        else {
-                            // $("#verifycode").click();
-                            //layer.msg(result.Message, { icon: 5 });
-                            layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
-                        }
-                        layer.closeAll("loading");
-                    }
-                });
-            }
-            //else
-            //{
-            //    layer.msg(result.Message, { icon: 5 });
-            //}
-            //layer.closeAll("loading");
-            //}
-        });
-        $('#HSourceBillNo').on('keydown', function (event) {   //鎵簮鍗�
-            var HSourceBillNo = $('#HSourceBillNo').val()
-            var sInterID = $("#HInterID").val()
-            var sBillNo = $("#HBillNo").val()
-            var HSourceBillType = $("#HBillType").val()
-            if (event.keyCode == 13) {
-                //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
-                if (HSourceBillNo == "" || sInterID <= 0) {
-                    layer.msg("婧愬崟鍙蜂负绌猴紝鎴栬�呭唴鐮佷笉瀛樺湪锛�", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
-                    return;
+                    });
                 }
-                //
-                $.ajax({
-                    //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/set_SavePonderationBillMain_Temp_Source_Fast_Json",
-                    url: GetWEBURL() + "/ProductIn/set_SavePonderationBillMain_Temp_Source_Fast_Json",
-                    type: "GET",
-                    data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
-                    success: function (result) {
-                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            sessionStorage["SourceFlag"] = true;
-                            layer.load(3)
-                            element.tabChange('tab-ProductlnBill', '2');
-                            table.render({
-                                elem: '#wl-table'
-                                //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
-                              , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
-                              , toolbar: '#toolbarDemo'
-                              , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
-                              , cols: [[
-                                  { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                                , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                              ]]
-                                // , data: [linterid]
-                                // , page: true
-                              , height: 500
-                              , done: function () {
-                                  layer.closeAll("loading");
-                              }
-                            });
-                        }
-                        else {
-                            // $("#verifycode").click();
-                            //layer.msg(result.Message, { icon: 5 });
-                            layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
-                        }
-                        layer.closeAll("loading");
+                //else
+                //{
+                //    layer.msg(result.Message, { icon: 5 });
+                //}
+                //layer.closeAll("loading");
+                //}
+            });
+            $('#HSourceBillNo').on('keydown', function (event) {   //鎵簮鍗�
+                var HSourceBillNo = $('#HSourceBillNo').val()
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var HSourceBillType = $("#HBillType").val()
+                if (event.keyCode == 13) {
+                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                    if (HSourceBillNo == "" || sInterID <= 0) {
+                        layer.msg("婧愬崟鍙蜂负绌猴紝鎴栬�呭唴鐮佷笉瀛樺湪锛�", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                        return;
                     }
-                });
-               // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
-            }
+                    //
+                    $.ajax({
+                        //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/set_SavePonderationBillMain_Temp_Source_Fast_Json",
+                        url: GetWEBURL() + "/ProductIn/set_SavePonderationBillMain_Temp_Source_Fast_Json",
+                        type: "GET",
+                        data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                sessionStorage["SourceFlag"] = true;
+                                layer.load(3)
+                                element.tabChange('tab-ProductlnBill', '2');
+                                table.render({
+                                    elem: '#wl-table'
+                                    //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+                                    , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                                    ]]
+                                    // , data: [linterid]
+                                    // , page: true
+                                    , height: 500
+                                    , done: function () {
+                                        layer.closeAll("loading");
+                                    }
+                                });
+                            }
+                            else {
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                    // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
+                }
+            });
+            //鍒锋柊鏄庣粏椤电
+            table.render({
+                elem: '#mx-table'
+                // , url: 'http://61.130.49.162:9090/WMSAPI///Web/GetHBarCodeShowBillSub'
+                //, toolbar: '#toolbarDemo'
+                // , where: { sMsg: linterid, sMsg2: lentryid }
+                , cols: [[
+                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+                ]]
+                , page: true
+                , height: 500
+                , done: function () {
+                }
+            });
+
+
+            //琛屽唴浜嬩欢
+            table.on('tool(wl-table)', function (obj) {
+                var data = obj.data;
+                console.log(data.婧愬崟涓诲唴鐮�);
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'edit') {
+                    var _obj = obj;
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '鎵爜璇︽儏鍒楄〃'
+                        , content: ['../../../views/Baseset/鍩虹璧勬枡/WMSBarCodeDetailsList.html?HInterID=' + data.HSourceInterID + '&HBillType=3789', 'yes']
+                        , end: function () {
+
+                        }
+                    })
+                }
+            });
+
         });
-        //鍒锋柊鏄庣粏椤电
-        table.render({
-            elem: '#mx-table'
-            // , url: 'http://61.130.49.162:9090/WMSAPI///Web/GetHBarCodeShowBillSub'
-            //, toolbar: '#toolbarDemo'
-            // , where: { sMsg: linterid, sMsg2: lentryid }
-         , cols: [[
-           , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
-         ]]
-         , page: true
-         , height: 500
-         , done: function () {
-         }
-        });
-    });
-    function GetHWHValue(obj)  //杩斿洖璋冨叆浠撳簱
-    {
-        $("#HWHNAME").val(obj[0].HName);
-        sessionStorage["HWHID"] = obj[0].HItemID;
-        $("#HWHID").val(obj[0].HItemID);
-    }
-    function GetHSpValue(obj) {  //杩斿洖璋冨叆浠撲綅
-        $("#HStockPlaceName").val(obj[0].HName);
-        $("#HStockPlaceID").val(obj[0].HItemID);
-    }
-    function GetHKeeperValue(obj) {  //杩斿洖淇濈
-        $("#HKeeper").val(obj[0].HName);
-        $("#HKeeperID").val(obj[0].HItemID);
-    }
-    function GetHSecManagerValue(obj) {  //杩斿洖楠屾敹
-        $("#HSecManager").val(obj[0].HName);
-        $("#HSecManagerID").val(obj[0].HItemID);
-    }
-    function GetHDeptNameValue(obj) {   //杩斿洖閮ㄩ棬
-        $("#HDeptName").val(obj[0].HName);
-        $("#HDeptID").val(obj[0].HItemID);
-    }
-    function AllowLoadData(sSubStr) {  //闈炵┖楠岃瘉
-        //if ($("#HSourceBillNo").val() == '') {
-        //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
-        //    return false;
-        //}
-        if($("#HDeptName").val()=='')
+        function GetHWHValue(obj)  //杩斿洖璋冨叆浠撳簱
         {
-            layer.msg("閮ㄩ棬娌℃湁閫夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
-            return false;
+            $("#HWHNAME").val(obj[0].HName);
+            sessionStorage["HWHID"] = obj[0].HItemID;
+            $("#HWHID").val(obj[0].HItemID);
         }
-        if ($("#HSecManager").val() == '') {
-            layer.msg("楠屾敹浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-            return false;
+        function GetHSpValue(obj) {  //杩斿洖璋冨叆浠撲綅
+            $("#HStockPlaceName").val(obj[0].HName);
+            $("#HStockPlaceID").val(obj[0].HItemID);
         }
-        if ($("#HKeeper").val() == '') {
-            layer.msg("淇濈浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-            return false;
+        function GetHKeeperValue(obj) {  //杩斿洖淇濈
+            $("#HKeeper").val(obj[0].HName);
+            $("#HKeeperID").val(obj[0].HItemID);
         }
-        //if ($("#HWHNAME").val() == '') {
-        //    layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
-        //    return false;
-        //}
-        if ($("#HBillNo").val() == '') {
-            layer.msg("閿欒鐨勫崟鎹彿", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-            return false;
+        function GetHSecManagerValue(obj) {  //杩斿洖楠屾敹
+            $("#HSecManager").val(obj[0].HName);
+            $("#HSecManagerID").val(obj[0].HItemID);
         }
-        if ($("#HInterID").val() == '') {
-            layer.msg("閿欒鐨勫唴鐮�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-            return false;
+        function GetHDeptNameValue(obj) {   //杩斿洖閮ㄩ棬
+            $("#HDeptName").val(obj[0].HName);
+            $("#HDeptID").val(obj[0].HItemID);
         }
-        if(sSubStr=='')
-        {
-            layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-            return false;
-        }
-        if (sSubStr != '') {
-            for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
-                if (parseFloat(sSubStr[i].HQtyMust) > 0) {
-                    if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust))
-                    {
-                        layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-                        return false;
-                    }
-                }
-            }
-            for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
-                if (parseFloat(sSubStr[i].HQty) > 0) {
-                    s = 1;
-                }
-            }
-            if (s == 0) {
-                layer.msg("浜у搧鍏ュ簱璁板綍鏈壂鐮�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
+        function AllowLoadData(sSubStr) {  //闈炵┖楠岃瘉
+            //if ($("#HSourceBillNo").val() == '') {
+            //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
+            //    return false;
+            //}
+            if ($("#HDeptName").val() == '') {
+                layer.msg("閮ㄩ棬娌℃湁閫夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
                 return false;
             }
+            if ($("#HSecManager").val() == '') {
+                layer.msg("楠屾敹浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            if ($("#HKeeper").val() == '') {
+                layer.msg("淇濈浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            //if ($("#HWHNAME").val() == '') {
+            //    layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
+            //    return false;
+            //}
+            if ($("#HBillNo").val() == '') {
+                layer.msg("閿欒鐨勫崟鎹彿", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            if ($("#HInterID").val() == '') {
+                layer.msg("閿欒鐨勫唴鐮�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            if (sSubStr == '') {
+                layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            if (sSubStr != '') {
+                for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
+                    if (parseFloat(sSubStr[i].HQtyMust) > 0) {
+                        if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
+                            layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                            return false;
+                        }
+                    }
+                }
+                for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
+                    if (parseFloat(sSubStr[i].HQty) > 0) {
+                        s = 1;
+                    }
+                }
+                if (s == 0) {
+                    layer.msg("浜у搧鍏ュ簱璁板綍鏈壂鐮�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                    return false;
+                }
+            }
+            else {
+                return true;
+            }
         }
-        else
-        {
-            return true;
-        }
-    }
     </script>
 
 </body>
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_Fast.html"
index 3a49356..1ed79ae 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_Fast.html"
@@ -1,13 +1,22 @@
 锘�<!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title>澶栬喘鍏ュ簱</title>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
     <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
     <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <style>
+        .layui-table-fixed .layui-table-body {
+            height: auto !important;
+        }
+
+        .layui-table-fixed.layui-hide {
+            display: block !important;
+        }
+    </style>
 </head>
 <body>
     <div class="layui-fluid">
@@ -253,292 +262,294 @@
     <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 type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>
+    </script>
     <script>
-    layui.config({
-        base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
-    }).extend({
-        index: 'lib/index' //涓诲叆鍙fā鍧�
-    }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
-        var $ = layui.$
-        , admin = layui.admin
-        , layer = layui.layer
-        , table = layui.table
-        , form = layui.form
-        , element = layui.element;
-        //娓呯┖鐣岄潰  new
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index' //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element;
+            //娓呯┖鐣岄潰  new
 
 
-        //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
-        $("#HWHID").val(sessionStorage["HWHID"]);
-        $("#HWHNAME").val(sessionStorage["HWHName"]);
-        $("#HStockPlaceID").val(sessionStorage["HSPID"]);
-        $("#HStockPlaceName").val(sessionStorage["HSPName"]);
-        //$("#HSupID").val(sessionStorage["HSupID"]);
-        //$("#HSupName").val(sessionStorage["HSupName"]);
-        $("#HDeptID").val(sessionStorage["HDeptID"]);
-        $("#HDeptName").val(sessionStorage["HDept"]);
-        $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
-        $("#HSecManager").val(sessionStorage["HSecManager"]);
-        $("#HKeeperID").val(sessionStorage["HKeeperID"]);
-        $("#HKeeper").val(sessionStorage["HKeeper"]);
-        $("#HMaker").val(sessionStorage["HUserName"]);
-        $("#HMaker").hide();
-        $("#HMakerID").hide();
-        $("#HBillerID").val(sessionStorage["HBillerID"]);
-        $("#HBillerID").hide();
-        //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
+            //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
+            $("#HWHID").val(sessionStorage["HWHID"]);
+            $("#HWHNAME").val(sessionStorage["HWHName"]);
+            $("#HStockPlaceID").val(sessionStorage["HSPID"]);
+            $("#HStockPlaceName").val(sessionStorage["HSPName"]);
+            //$("#HSupID").val(sessionStorage["HSupID"]);
+            //$("#HSupName").val(sessionStorage["HSupName"]);
+            $("#HDeptID").val(sessionStorage["HDeptID"]);
+            $("#HDeptName").val(sessionStorage["HDept"]);
+            $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
+            $("#HSecManager").val(sessionStorage["HSecManager"]);
+            $("#HKeeperID").val(sessionStorage["HKeeperID"]);
+            $("#HKeeper").val(sessionStorage["HKeeper"]);
+            $("#HMaker").val(sessionStorage["HUserName"]);
+            $("#HMaker").hide();
+            $("#HMakerID").hide();
+            $("#HBillerID").val(sessionStorage["HBillerID"]);
+            $("#HBillerID").hide();
+            //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
 
 
-        //鑾峰彇鍙傛暟
-        function getUrlVars() {
-            var vars = [], hash;
-            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
-            for (var i = 0; i < hashes.length; i++) {
-                hash = hashes[i].split('=');
-                vars.push(hash[0]);
-                vars[hash[0]] = hash[1];
-            }
-            return vars;
-        }
-        var params = getUrlVars();
-        var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
-        var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
-        
-        function  RoadBillMain(linterid)//鍔犺浇琛ㄥご
-        {
-            $.ajax({
-                url: GetWEBURL() + "/Web/GetPonderationBill",
-                type: "GET",
-                data: { "HInterID": linterid },
-                success: function (d) {
-                    // console.log(d.data);
-                    $("#HInterID").val(d.data[0].HInterID);
-                    $("#HBillNo").val(d.data[0].HBillNo);
-                    $("#HBillType").val(d.data[0].HSourceBillType);
-                    $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
-                    //$("#HWHID").val(d.data[0].HWhID);
-                    //$("#HKeeperID").val(d.data[0].HKeeperID);
-                    //$("#HSecManagerID").val(d.data[0].HSecManagerID);
-                    //$("#HDeptID").val(d.data[0].HDeptID);
-                    //$("#HBarCode").val(d.data[0].HBarCode);
-                    //$("#HQty").val(d.data[0].HQty);
-                    RoadSup();
+            //鑾峰彇鍙傛暟
+            function getUrlVars() {
+                var vars = [], hash;
+                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+                for (var i = 0; i < hashes.length; i++) {
+                    hash = hashes[i].split('=');
+                    vars.push(hash[0]);
+                    vars[hash[0]] = hash[1];
                 }
-            })
-        }
-
-        function RoadSup()//鏍规嵁婧愬崟绫诲瀷鍙婃簮鍗曞彿 鍔犺浇渚涘簲鍟�
-        {
-            //var sInterID = $("#HInterID").val()
-            var HSourceBillNo = $('#HSourceBillNo').val()
-            var sInterID = $("#HInterID").val()
-            var sBillNo = $("#HBillNo").val()
-            var HSourceBillType = $("#HBillType").val()
-            //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
-            if (HSourceBillNo == "" || sInterID <= 0) {
-                layer.msg($('#HSourceBillNo').val(), { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
-                return;
+                return vars;
             }
-            else {
+            var params = getUrlVars();
+            var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
+            var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
+
+            function RoadBillMain(linterid)//鍔犺浇琛ㄥご
+            {
                 $.ajax({
-                    url: GetWEBURL() + "/POStockInBill/get_GetCg_POOrderBillList",
+                    url: GetWEBURL() + "/Web/GetPonderationBill",
                     type: "GET",
-                    data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
-                    success: function (result) {
-                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            $("#HSupID").val(result.data[0].HSupID);
-                            $("#HSupName").val(result.data[0].HSupName);
-                            $("#HDeptID").val(result.data[0].HDeptID);
-                            $("#HDeptName").val(result.data[0].HDeptName);
-                            sessionStorage["SourceFlag"] = true;
-                            element.tabChange('tab-POStockInBill', '2');
-                            layer.load(3);
+                    data: { "HInterID": linterid },
+                    success: function (d) {
+                        // console.log(d.data);
+                        $("#HInterID").val(d.data[0].HInterID);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                        $("#HBillType").val(d.data[0].HSourceBillType);
+                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
+                        //$("#HWHID").val(d.data[0].HWhID);
+                        //$("#HKeeperID").val(d.data[0].HKeeperID);
+                        //$("#HSecManagerID").val(d.data[0].HSecManagerID);
+                        //$("#HDeptID").val(d.data[0].HDeptID);
+                        //$("#HBarCode").val(d.data[0].HBarCode);
+                        //$("#HQty").val(d.data[0].HQty);
+                        RoadSup();
+                    }
+                })
+            }
+
+            function RoadSup()//鏍规嵁婧愬崟绫诲瀷鍙婃簮鍗曞彿 鍔犺浇渚涘簲鍟�
+            {
+                //var sInterID = $("#HInterID").val()
+                var HSourceBillNo = $('#HSourceBillNo').val()
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var HSourceBillType = $("#HBillType").val()
+                //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                if (HSourceBillNo == "" || sInterID <= 0) {
+                    layer.msg($('#HSourceBillNo').val(), { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                    return;
+                }
+                else {
+                    $.ajax({
+                        url: GetWEBURL() + "/POStockInBill/get_GetCg_POOrderBillList",
+                        type: "GET",
+                        data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HSupID").val(result.data[0].HSupID);
+                                $("#HSupName").val(result.data[0].HSupName);
+                                $("#HDeptID").val(result.data[0].HDeptID);
+                                $("#HDeptName").val(result.data[0].HDeptName);
+                                sessionStorage["SourceFlag"] = true;
+                                element.tabChange('tab-POStockInBill', '2');
+                                layer.load(3);
+                            }
+                            else {
+                                layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            }
+                            layer.closeAll("loading");
                         }
-                        else {
-                            layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
-                        }
+                    });
+                }
+            }
+
+            function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
+            {
+                table.render({
+                    elem: '#wl-table'
+                    , url: GetWEBURL1() + '/POStockInBill/DisBillEntryList_Webs_Json'
+                    , where: { HBillID: linterid, HBillType: '1201', sWhere: '' }
+                    , cols: [[
+                        { type: 'radio' }
+                        , { field: 'HQty', title: '鏁伴噺', sort: true }
+                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', sort: true }
+                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', sort: true }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', sort: true }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', sort: true }
+                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', sort: true }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', sort: true }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', sort: true }
+                        , { field: 'HBatchNo', title: '鎵规', sort: true }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                    ]]
+                    , height: 500
+                    , done: function () {
                         layer.closeAll("loading");
                     }
                 });
             }
-        }
 
-        function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
-        {
-            table.render({
-                elem: '#wl-table' 
-                , url: GetWEBURL1() + '/POStockInBill/DisBillEntryList_Webs_Json' 
-                , where: { HBillID: linterid, HBillType: '1201', sWhere: '' }
-                , cols: [[
-                    { type: 'radio' }
-                , { field: 'HQty', title: '鏁伴噺', sort: true }
-                , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', sort: true }
-                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', sort: true }
-                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', sort: true }
-                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', sort: true }
-                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', sort: true }
-                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', sort: true }
-                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', sort: true }
-                , { field: 'HBatchNo', title: '鎵规', sort: true }
-                ]] 
-                , height: 500
-                , done: function () {
-                    layer.closeAll("loading");
-                }
+            //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
+
+
+
+
+
+
+
+            //鍒ゆ柇鏄惁鏂板
+            if (linterid == null || linterid == 0) {
+                //鑾峰彇鏈�澶у崟鎹彿 new
+                $("#HInterID").val("");
+                $("#HBillNo").val("");
+                $.ajax({
+                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    //url: GetWEBURL() + "/Web/UpdatePOInStockBillPrintQty", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    type: "GET",
+                    data: { "HBillType": '1201' },
+                    success: function (d) {
+                        //console.log(d.data);
+                        $("#HInterID").val(d.data[0].HInterID);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                    }
+                });
+            }
+            else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+                RoadBillMain(linterid);
+                RoadBillSub(linterid);
+            }
+            //濡傛灉淇敼鍒欒蛋涓嬮潰 new
+
+
+
+
+            //杩涘叆鐗╂枡鏄庣粏椤电銆佹潯鐮佹 鍏夋爣鐒︾偣   new
+            if (1 == 2) {
+                element.tabChange('tab-POStockInBill', '3');
+                var pFocus = $("#HBarCode");
+                pFocus.focus();
+                pFocus.select();
+            }
+            else {
+                element.tabChange('tab-POStockInBill', '1');
+                var pFocus = $("#HSourceBillNo");
+                pFocus.focus();
+                pFocus.select();
+            }
+            //
+            //
+            form.on('submit(HWHID-BT)', function () {//閫夋嫨璋冨叆浠撳簱
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撳簱鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
             });
-        } 
-             
-        //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
-
-            
-
-            
-
-            
-
-        //鍒ゆ柇鏄惁鏂板
-        if (linterid == null || linterid == 0) {
-            //鑾峰彇鏈�澶у崟鎹彿 new
-            $("#HInterID").val("");
-            $("#HBillNo").val(""); 
-            $.ajax({ 
-                url: GetWEBURL() + "/Web/GetMAXNum",
-                //url: GetWEBURL() + "/Web/UpdatePOInStockBillPrintQty", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                type: "GET",
-                data: { "HBillType": '1201' },
-                success: function (d) {
-                    //console.log(d.data);
-                    $("#HInterID").val(d.data[0].HInterID);
-                    $("#HBillNo").val(d.data[0].HBillNo);
-                }
+            form.on('submit(HSpID-BT)', function () {//閫夋嫨璋冨叆浠撲綅
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撲綅鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HSpID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
             });
-        }
-        else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
-            RoadBillMain(linterid);
-            RoadBillSub(linterid);
-        }
-        //濡傛灉淇敼鍒欒蛋涓嬮潰 new
+            form.on('submit(HSupID-BT)', function () {//閫夋嫨渚涘簲鍟�
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '渚涘簲鍟嗗垪琛�'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_SupplierList.html', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '淇濈鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
+                var sMainStr = JSON.stringify(data.field);
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '楠屾敹鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+            form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '閮ㄩ棬鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
 
+            form.on('submit(Cancel)', function () {
+                parent.location.href = "../../../views/index.html"
+                //window.close();//鍏抽棴褰撳墠椤�
+            })
 
-
-
-        //杩涘叆鐗╂枡鏄庣粏椤电銆佹潯鐮佹 鍏夋爣鐒︾偣   new
-        if (1 == 2)
-        {
-            element.tabChange('tab-POStockInBill', '3');
-            var pFocus = $("#HBarCode");
-            pFocus.focus();
-            pFocus.select();
-        }
-        else
-        {
-            element.tabChange('tab-POStockInBill', '1');
-            var pFocus = $("#HSourceBillNo");
-            pFocus.focus();
-            pFocus.select();
-        }
-        //
-        //
-        form.on('submit(HWHID-BT)', function () {//閫夋嫨璋冨叆浠撳簱
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浠撳簱鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HSpID-BT)', function () {//閫夋嫨璋冨叆浠撲綅
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浠撲綅鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HSpID', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HSupID-BT)', function () {//閫夋嫨渚涘簲鍟�
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '渚涘簲鍟嗗垪琛�'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_SupplierList.html', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '淇濈鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
-            var sMainStr = JSON.stringify(data.field);
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '楠屾敹鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '閮ㄩ棬鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-
-        form.on('submit(Cancel)', function () {
-            parent.location.href = "../../../views/index.html"
-            //window.close();//鍏抽棴褰撳墠椤�
-        })
-
-        form.on('submit(cmdModify)', function () {//缂栬緫
-            var sSubStr = table.cache['wl-table'];
-            //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+            form.on('submit(cmdModify)', function () {//缂栬緫
+                var sSubStr = table.cache['wl-table'];
+                //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
                 layer.open({
                     type: 2
                     , area: ['100%', '100%']
@@ -552,473 +563,493 @@
                         //$(".layui-btn").removeClass("layui-btn-disabled");
                     }
                 })
-           // }
-        });
+                // }
+            });
 
-        form.on('submit(cmdDelete)', function () {//鍒犻櫎
-            var checkStatus = table.checkStatus('wl-table')
-            , data = checkStatus.data;
-           // console.log(data);
-            var sInterID = $('#HInterID').val()
-            var sMaterID = data[0].HMaterID   
-            var sBillType = '1201'
-            var sAuxPropID = data[0].HAuxPropID
-            //var sMTONo = data[0].HMTONo
-            var sMTONo = ''
-            var sSourceInterID = data[0].HSourceInterID
-            var sSourceEntryID = data[0].HSourceEntryID
-            $.ajax(
-               {
-                   type: "Get",
-                   //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Delete_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                   url: GetWEBURL() + "/POStockInBill/Delete_Json",
-                   async: true,
-                   data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
-                   dataType: "json",
-                   success: function (data) {
-                       if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                           //layer.msg(data.Message, { icon: 1 });
-                           table.render({
-                               elem: '#wl-table'
-                               //, url: 'http://61.130.49.162:9090/WMSAPI///POStockInBill/DisBillEntryList_Mate_Webs_Json'
-                               //, url: GetWEBURL1() + '/POStockInBill/DisBillEntryList_Mate_Webs_Json'
-                               , url: GetWEBURL1() + '/POStockInBill/DisBillEntryList_Webs_Json'   
-                               , cellMinWidth: 80
-                               , toolbar: '#toolbarDemo'
-                               , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
-                               , cols: [[
-                                  { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                                , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 100 }
-                                , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
-                                , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
-                         ]]
-                         , height: 500
-                           })
-                       }
-                       else {
-                           layer.msg(data.Message, { icon: 2 });
-                       }
-                   },
-                   error: function (err) {
-                       layer.msg('閿欒' + err, {
-                           icon: 5,
-                           time: 20000
-                       }, function () {
-                           //do something
-                       });
-                   }
-               });
-        });
-
-
-        form.on('submit(Saver)', function (data) {//鎻愪氦
-            //debugger;
-            var sMainStr = JSON.stringify(data.field);
-            var sSubStr = table.cache['wl-table'];
-            var sSourceType = $("#HBillType").val();
-            if (AllowLoadData(sSubStr, 'Saver') != false)//闈炵┖楠岃瘉
-            {
-                layer.load(3);
+            form.on('submit(cmdDelete)', function () {//鍒犻櫎
+                var checkStatus = table.checkStatus('wl-table')
+                    , data = checkStatus.data;
+                // console.log(data);
+                var sInterID = $('#HInterID').val()
+                var sMaterID = data[0].HMaterID
+                var sBillType = '1201'
+                var sAuxPropID = data[0].HAuxPropID
+                //var sMTONo = data[0].HMTONo
+                var sMTONo = ''
+                var sSourceInterID = data[0].HSourceInterID
+                var sSourceEntryID = data[0].HSourceEntryID
                 $.ajax(
+                    {
+                        type: "Get",
+                        //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Delete_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        url: GetWEBURL() + "/POStockInBill/Delete_Json",
+                        async: true,
+                        data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                //layer.msg(data.Message, { icon: 1 });
+                                table.render({
+                                    elem: '#wl-table'
+                                    //, url: 'http://61.130.49.162:9090/WMSAPI///POStockInBill/DisBillEntryList_Mate_Webs_Json'
+                                    //, url: GetWEBURL1() + '/POStockInBill/DisBillEntryList_Mate_Webs_Json'
+                                    , url: GetWEBURL1() + '/POStockInBill/DisBillEntryList_Webs_Json'
+                                    , cellMinWidth: 80
+                                    , toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', width: 80 }
+                                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+                                        , { field: 'HBatchNo', title: '鎵规', width: 100 }
+                                        , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
+                                        , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+                                    ]]
+                                    , height: 500
+                                })
+                            }
+                            else {
+                                layer.msg(data.Message, { icon: 2 });
+                            }
+                        },
+                        error: function (err) {
+                            layer.msg('閿欒' + err, {
+                                icon: 5,
+                                time: 20000
+                            }, function () {
+                                //do something
+                            });
+                        }
+                    });
+            });
+
+
+            form.on('submit(Saver)', function (data) {//鎻愪氦
+                //debugger;
+                var sMainStr = JSON.stringify(data.field);
+                var sSubStr = table.cache['wl-table'];
+                var sSourceType = $("#HBillType").val();
+                if (AllowLoadData(sSubStr, 'Saver') != false)//闈炵┖楠岃瘉
                 {
-                    type: "POST",
-                    //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/set_SavePOStockInBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                    url: GetWEBURL() + "/POStockInBill/set_SavePOStockInBill_Json",
-                    async: true,
-                    data: { "oMain": sMainStr},
-                    dataType: "json",
-                    success: function (data) {
-                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            sessionStorage["SourceFlag"] = false;  
-                            layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
-                        }
-                        else {
-                            layer.msg(data.Message, { icon: 5 });
-                        }
-                        layer.closeAll("loading");
-                        layui.form.render();
-                    },
-                    error: function (err) {
-                        layer.msg("閿欒:" + err, { icon: 5 });
-                    }
-                });
-                return false;
-            } 
-        });
-        //鐩戝惉鎻愪氦
-        form.verify({
-            numberOrEmpty: function (value, item) {
-                // if (value != '') {
-                if (!/^\d+$/.test(value)) {
-                    return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
-                }
-                //}
-            }
-        });
-        $('#HBarCode').on('keydown', function (event) {  //鎵潯鐮�
-            var sSubStr = table.cache['wl-table'];
-            var sBarCode = $('#HBarCode').val()
-            var sInterID = $("#HInterID").val()
-            var sBillNo = $("#HBillNo").val()
-            var sQty = $("#HQty").val()
-            var sHBillType = $("#HBillType").val()  //婧愬崟绫诲瀷
-            var sBillType = '1201'
-            var sHWHID = $("#HWHID").val()
-            var sHSPID = $("#HStockPlaceID").val()
-            var sSourceBillNo = $("#HSourceBillNo").val()
-            if (sQty == "") {
-                sQty = 0;
-            }
-            if (event.keyCode == 13) {
-                //鍒ゆ柇鏉$爜鏄惁涓虹┖  new
-                if (sBarCode == '') { 
-                    layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                    layer.load(3);
+                    $.ajax(
+                        {
+                            type: "POST",
+                            //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/set_SavePOStockInBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            url: GetWEBURL() + "/POStockInBill/set_SavePOStockInBill_Json",
+                            async: true,
+                            data: { "oMain": sMainStr },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                    sessionStorage["SourceFlag"] = false;
+                                    layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
+                                }
+                                else {
+                                    layer.msg(data.Message, { icon: 5 });
+                                }
+                                layer.closeAll("loading");
+                                layui.form.render();
+                            },
+                            error: function (err) {
+                                layer.msg("閿欒:" + err, { icon: 5 });
+                            }
+                        });
                     return false;
                 }
-                if (sBarCode != "") {
-                    $('#HBarCode').val("");
+            });
+            //鐩戝惉鎻愪氦
+            form.verify({
+                numberOrEmpty: function (value, item) {
+                    // if (value != '') {
+                    if (!/^\d+$/.test(value)) {
+                        return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
+                    }
+                    //}
                 }
-                if (sQty != "") {
-                    $('#HQty').val("");
+            });
+            $('#HBarCode').on('keydown', function (event) {  //鎵潯鐮�
+                var sSubStr = table.cache['wl-table'];
+                var sBarCode = $('#HBarCode').val()
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var sQty = $("#HQty").val()
+                var sHBillType = $("#HBillType").val()  //婧愬崟绫诲瀷
+                var sBillType = '1201'
+                var sHWHID = $("#HWHID").val()
+                var sHSPID = $("#HStockPlaceID").val()
+                var sSourceBillNo = $("#HSourceBillNo").val()
+                if (sQty == "") {
+                    sQty = 0;
                 }
-                  //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
-                                $.ajax({
-                                    url: GetWEBURL() + "/POStockInBill/get_CheckTypeByBarCode_Json",
-                                    type: "GET",
-                                    data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
-                                    success: function (result) {
-                                        if (result.count == 1) {
-                                            if (result.data.HBarType == '浠撳簱鏉$爜') {
-                                                $("#HWHNAME").val(result.data.HWhName);
-                                                $("#HWHID").val(result.data.HWhID);
-                                                $("#HStockPlaceName").val("");
-                                                $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
-                                                element.tabChange('tab-POStockInBill', '2');  //璺宠浆椤电
-                                            }
-                                            else if (result.data.HBarType == '浠撲綅鏉$爜') {
-                                                $("#HStockPlaceName").val(result.data.HSPName);
-                                                $("#HStockPlaceID").val(result.data.HSPID);
-                                                $("#HWHNAME").val(result.data.HWhName);
-                                                $("#HWHID").val(result.data.HWhID);
-                                                $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
-                                                element.tabChange('tab-POStockInBill', '2');//璺宠浆椤电
-                                            }
-                                            else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
-                                                $("#HDeptName").val(result.data.HDeptName);
-                                                $("#HDeptID").val(result.data.HDeptID);
-                                                $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
-                                                element.tabChange('tab-POStockInBill', '2');//璺宠浆椤电
-                                            }
-                                            else if (result.data.HBarType == '婧愬崟鏉$爜') {
-                                                $("#HSupName").val(result.data.HSupName);
-                                                $("#HSupID").val(result.data.HSupID);
-                                                $("#HDeptName").val(result.data.HDeptName);
-                                                $("#HDeptID").val(result.data.HDeptID);
-                                                $("#HSourceBillNo").val(result.data.HSourceBillNo);
-                                                sessionStorage["SourceFlag"] = true;
-                                                //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
-                                                if (result.data.HSourceBillType == "1102") {
-                                                    $("#HBillType").val("1102");
+                if (event.keyCode == 13) {
+                    //鍒ゆ柇鏉$爜鏄惁涓虹┖  new
+                    if (sBarCode == '') {
+                        layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                        return false;
+                    }
+                    if (sBarCode != "") {
+                        $('#HBarCode').val("");
+                    }
+                    if (sQty != "") {
+                        $('#HQty').val("");
+                    }
+                    //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
+                    $.ajax({
+                        url: GetWEBURL() + "/POStockInBill/get_CheckTypeByBarCode_Json",
+                        type: "GET",
+                        data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                if (result.data.HBarType == '浠撳簱鏉$爜') {
+                                    $("#HWHNAME").val(result.data.HWhName);
+                                    $("#HWHID").val(result.data.HWhID);
+                                    $("#HStockPlaceName").val("");
+                                    $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+                                    element.tabChange('tab-POStockInBill', '2');  //璺宠浆椤电
+                                }
+                                else if (result.data.HBarType == '浠撲綅鏉$爜') {
+                                    $("#HStockPlaceName").val(result.data.HSPName);
+                                    $("#HStockPlaceID").val(result.data.HSPID);
+                                    $("#HWHNAME").val(result.data.HWhName);
+                                    $("#HWHID").val(result.data.HWhID);
+                                    $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+                                    element.tabChange('tab-POStockInBill', '2');//璺宠浆椤电
+                                }
+                                else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
+                                    $("#HDeptName").val(result.data.HDeptName);
+                                    $("#HDeptID").val(result.data.HDeptID);
+                                    $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+                                    element.tabChange('tab-POStockInBill', '2');//璺宠浆椤电
+                                }
+                                else if (result.data.HBarType == '婧愬崟鏉$爜') {
+                                    $("#HSupName").val(result.data.HSupName);
+                                    $("#HSupID").val(result.data.HSupID);
+                                    $("#HDeptName").val(result.data.HDeptName);
+                                    $("#HDeptID").val(result.data.HDeptID);
+                                    $("#HSourceBillNo").val(result.data.HSourceBillNo);
+                                    sessionStorage["SourceFlag"] = true;
+                                    //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                    if (result.data.HSourceBillType == "1102") {
+                                        $("#HBillType").val("1102");
 
-                                                }
-                                                else if (result.data.HSourceBillType == "1103") {
-                                                    $("#HBillType").val("1103");
-                                                }
-                                                else {
-                                                    $("#HBillType").val("鎵嬪伐褰曞叆");
-                                                }
-                                                $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
-                                                element.tabChange('tab-POStockInBill', '3');
-                                            }
-                                            else {
-                                                if (sessionStorage["SourceFlag"] == "true") {
-                                                    element.tabChange('tab-POStockInBill', '3');
-                                                }
-                                                else
-                                                {
-                                                    $("#HSupName").val(result.data.HSupName);
-                                                    $("#HSupID").val(result.data.HSupID);
-                                                    $("#HDeptName").val(result.data.HDeptName);
-                                                    $("#HDeptID").val(result.data.HDeptID);
-                                                    $("#HSourceBillNo").val(result.data.HSourceBillNo);
-                                                    sessionStorage["SourceFlag"] = true;
-                                                    //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
-                                                    if (result.data.HSourceBillType == "1102") {
-                                                        $("#HBillType").val("1102");
+                                    }
+                                    else if (result.data.HSourceBillType == "1103") {
+                                        $("#HBillType").val("1103");
+                                    }
+                                    else {
+                                        $("#HBillType").val("鎵嬪伐褰曞叆");
+                                    }
+                                    $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
+                                    element.tabChange('tab-POStockInBill', '3');
+                                }
+                                else {
+                                    if (sessionStorage["SourceFlag"] == "true") {
+                                        element.tabChange('tab-POStockInBill', '3');
+                                    }
+                                    else {
+                                        $("#HSupName").val(result.data.HSupName);
+                                        $("#HSupID").val(result.data.HSupID);
+                                        $("#HDeptName").val(result.data.HDeptName);
+                                        $("#HDeptID").val(result.data.HDeptID);
+                                        $("#HSourceBillNo").val(result.data.HSourceBillNo);
+                                        sessionStorage["SourceFlag"] = true;
+                                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                        if (result.data.HSourceBillType == "1102") {
+                                            $("#HBillType").val("1102");
 
-                                                    }
-                                                    else if (result.data.HSourceBillType == "1103") {
-                                                        $("#HBillType").val("1103");
-                                                    }
-                                                    else {
-                                                        $("#HBillType").val("鎵嬪伐褰曞叆");
-                                                    }
-                                                    $("#HNote").val(";鐗╂枡鏉$爜");
-                                                    element.tabChange('tab-POStockInBill', '3');
-                                                }
-                                            }
-                                            //$("#HSupID").val(result.data.HSupID);
-                                            //$("#HSupName").val(result.data.HSupName);
-                                            //$("#HDeptID").val(result.data.HDeptID);
-                                            //$("#HDeptName").val(result.data.HDeptName);
-                                            layer.load(3)
-                                            table.render({
-                                                    elem: '#wl-table' 
-                                                  , url: GetWEBURL1() + '/POStockInBill/DisBillEntryList_Webs_Json' 
-                                                  , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
-                                                  , cols: [[
-                                                      { type: 'radio' }
-                                                    , { field: 'HQty', title: '鏁伴噺', sort: true }
-                                                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', sort: true }
-                                                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', sort: true }
-                                                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', sort: true }
-                                                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', sort: true }
-                                                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', sort: true }
-                                                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', sort: true }
-                                                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', sort: true }
-                                                    , { field: 'HBatchNo', title: '鎵规', sort: true }
-                                                  ]] 
-                                                  , height: 500
-                                                  , done: function () {
-                                                      layer.closeAll("loading");
-                                                  }
-                                            });
+                                        }
+                                        else if (result.data.HSourceBillType == "1103") {
+                                            $("#HBillType").val("1103");
                                         }
                                         else {
-                                            // $("#verifycode").click();
-                                            //layer.msg(result.Message, { icon: 5 });
-                                            layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                                            $("#HBillType").val("鎵嬪伐褰曞叆");
                                         }
+                                        $("#HNote").val(";鐗╂枡鏉$爜");
+                                        element.tabChange('tab-POStockInBill', '3');
+                                    }
+                                }
+                                //$("#HSupID").val(result.data.HSupID);
+                                //$("#HSupName").val(result.data.HSupName);
+                                //$("#HDeptID").val(result.data.HDeptID);
+                                //$("#HDeptName").val(result.data.HDeptName);
+                                layer.load(3)
+                                table.render({
+                                    elem: '#wl-table'
+                                    , url: GetWEBURL1() + '/POStockInBill/DisBillEntryList_Webs_Json'
+                                    , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', sort: true }
+                                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', sort: true }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', sort: true }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', sort: true }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', sort: true }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', sort: true }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', sort: true }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', sort: true }
+                                        , { field: 'HBatchNo', title: '鎵规', sort: true }
+                                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                                    ]]
+                                    , height: 500
+                                    , done: function () {
                                         layer.closeAll("loading");
                                     }
                                 });
                             }
-                            //else
-                            //{
-                            //    layer.msg(result.Message, { icon: 5 });
-                            //}
-                            //layer.closeAll("loading");
-            //}
-        });
-        $('#HSourceBillNo').on('keydown', function (event) {      //鎵簮鍗�
-            var HSourceBillNo = $('#HSourceBillNo').val()
-            var sInterID = $("#HInterID").val()
-            var sBillNo = $("#HBillNo").val()
-            var HSourceBillType = $("#HBillType").val()
-            if (event.keyCode == 13) {
-                //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
-                if (HSourceBillNo == "" || sInterID <= 0) {
-                    layer.msg("婧愬崟鍙蜂负绌猴紝鎴栬�呭唴鐮佷笉瀛樺湪锛�", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
-                    return;
+                            else {
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
                 }
-                //
-                $.ajax({
-                    //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
-                    url: GetWEBURL() + "/POStockInBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
-                    type: "GET",
-                    data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
-                    success: function (result) {
-                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            $("#HSupID").val(result.data[0].HSupID);
-                            $("#HSupName").val(result.data[0].HSupName);
-                            $("#HDeptID").val(result.data[0].HDeptID);
-                            $("#HDeptName").val(result.data[0].HDeptName);
-                            sessionStorage["SourceFlag"] = true;
-                            layer.load(3);
-                            element.tabChange('tab-POStockInBill', '2');
-                            table.render({
-                                elem: '#wl-table'
-                                , cellMinWidth: 80
-                              //, url: 'http://61.130.49.162:9090/WMSAPI///POStockInBill/DisBillEntryList_Webs_Json'
-                               , url: GetWEBURL1() + '/POStockInBill/DisBillEntryList_Webs_Json'
-                              //, toolbar: '#toolbarDemo'
-                              , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
-                              , cols: [[
-                                  { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', sort: true }
-                                , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', sort: true }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', sort: true }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', sort: true }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', sort: true }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', sort: true }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', sort: true }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', sort: true }
-                                , { field: 'HBatchNo', title: '鎵规'}
-                              ]]
-                                // , data: [linterid]
-                                // , page: true
-                              , height: 500
-                              , done: function () {
-                                  layer.closeAll("loading");
-                              }
-                            });
-                        }
-                        else {
-                            // $("#verifycode").click();
-                            //layer.msg(result.Message, { icon: 5 });
-                            layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
-                        }
-                        layer.closeAll("loading");
-                    }
-                });
-               // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
-            }
-        });
-        //鍒锋柊鏄庣粏椤电
-        table.render({
-            elem: '#mx-table'
-            // , url: 'http://localhost:8083/POStockInBill/GetHBarCodeShowBillSub'
-            //, toolbar: '#toolbarDemo'
-            // , where: { sMsg: linterid, sMsg2: lentryid }
-         , cols: [[
-           , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
-         ]]
-         , page: true
-         , height: 500
-         , done: function () {
-         }
-        });
-    });
-    //娓呯┖琛ㄥご
-    //function f_ClearTitle() {
-
-    //    $("#HBarCode").val("");
-    //    $("#HSpName").val("");
-    //    $("#HSpID").val("0");
-    //    $("#HQty").val("0");
-    //    $("#HSourceBillNo").val("");
-    //    $("#HWHNAME").val("");
-    //    $("#HWHID").val("0");
-    //    $("#HSCWHNAME").val("");
-    //    $("#HSCWHID").val("0");
-    //    $("#HSupName").val("");
-    //    $("#HSupID").val("0");
-    //    $("#HKeeper").val("");
-    //    $("#HKeeperID").val("0");
-    //    $("#HSecManager").val("0");
-    //    $("#HSecManagerID").val("");
-    //    $("#HDeptName").val("");
-    //    $("#HDeptID").val("0");
-    //    $("#HBillNo").val("");
-    //    $("#HInterID").val("0");
-    //}
-    function GetHWHValue(obj)  //杩斿洖璋冨叆浠撳簱
-    {
-        $("#HWHNAME").val(obj[0].HName);
-        sessionStorage["HWHID"] = obj[0].HItemID;
-        $("#HWHID").val(obj[0].HItemID);
-    }
-    function GetHSpValue(obj) {  //杩斿洖璋冨叆浠撲綅
-        $("#HStockPlaceName").val(obj[0].HName);
-        $("#HStockPlaceID").val(obj[0].HItemID);
-    }
-    function GetHSupValue(obj) {  //杩斿洖渚涘簲鍟�
-        $("#HSupName").val(obj[0].HName);
-        $("#HSupID").val(obj[0].HItemID);
-    }
-    function GetHKeeperValue(obj) {  //杩斿洖淇濈
-        $("#HKeeper").val(obj[0].HName);
-        $("#HKeeperID").val(obj[0].HItemID);
-    }
-    function GetHSecManagerValue(obj) {  //杩斿洖楠屾敹
-        $("#HSecManager").val(obj[0].HName);
-        $("#HSecManagerID").val(obj[0].HItemID);
-    }
-    function GetHDeptNameValue(obj) {   //杩斿洖閮ㄩ棬
-        $("#HDeptName").val(obj[0].HName);
-        $("#HDeptID").val(obj[0].HItemID);
-    }
-    //function Get_CheckWhAndSP(sInterID, sHBillType, sBarCode, sHWHID, sHSPID) {   //杩斿洖閮ㄩ棬
-    //    $.ajax({
-    //        url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Get_CheckWhAndSP_Josn",
-    //        type: "GET",
-    //        data: { "sHInterID": sInterID, "sHBillType": sHBillType, "sBarCode": sBarCode, "sHWHID": sHWHID, "sHSPID": sHSPID },
-    //        success: function (result) {
-    //            if(result.count==1)
-    //            {
-    //               // layer.msg(result.Message, { icon: 1 });
-    //                return true;
-    //            }
-    //            else
-    //            {
-    //                layer.msg(result.Message, { icon: 5 });
-    //                return false;
-    //            }
-    //        }
-    //    })
-    //}
-    function AllowLoadData(sSubStr,bnt) {  //闈炵┖楠岃瘉
-        //if ($("#HSourceBillNo").val() == '') {
-        //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
-        //    return false;
-        //}
-        if($("#HDeptName").val()=='')
-        {
-            layer.msg("閮ㄩ棬娌℃湁閫夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
-            return false;
-        }
-        if ($("#HSecManager").val() == '') {
-            layer.msg("楠屾敹浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-            return false;
-        }
-        if ($("#HKeeper").val() == '') {
-            layer.msg("淇濈浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-            return false;
-        }
-        //if ($("#HSupName").val() == '') {
-        //    layer.msg("渚涘簲鍟嗘病鏈夐�夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-        //    return false;
-        //}
-        //if ($("#HWHNAME").val() == '') {
-        //    layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
-        //    return false;
-        //}
-        if ($("#HBillNo").val() == '') {
-            layer.msg("閿欒鐨勫崟鎹彿", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-            return false;
-        }
-        if ($("#HInterID").val() == '') {
-            layer.msg("閿欒鐨勫唴鐮�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-            return false;
-        }
-        if(sSubStr=='')
-        {
-            layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-            return false;
-        }
-        if (bnt == 'Saver') {
-            if (sSubStr != '') {
-                //for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
-                //    if (parseFloat(sSubStr[i].HQtyMust) > 0) {
-                //        if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
-                //            layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-                //            return false;
-                //        }
-                //    }
+                //else
+                //{
+                //    layer.msg(result.Message, { icon: 5 });
                 //}
-                for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
-                    if (parseFloat(sSubStr[i].HQty) > 0) {
-                        s = 1;
+                //layer.closeAll("loading");
+                //}
+            });
+            $('#HSourceBillNo').on('keydown', function (event) {      //鎵簮鍗�
+                var HSourceBillNo = $('#HSourceBillNo').val()
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var HSourceBillType = $("#HBillType").val()
+                if (event.keyCode == 13) {
+                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                    if (HSourceBillNo == "" || sInterID <= 0) {
+                        layer.msg("婧愬崟鍙蜂负绌猴紝鎴栬�呭唴鐮佷笉瀛樺湪锛�", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                        return;
+                    }
+                    //
+                    $.ajax({
+                        //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
+                        url: GetWEBURL() + "/POStockInBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
+                        type: "GET",
+                        data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HSupID").val(result.data[0].HSupID);
+                                $("#HSupName").val(result.data[0].HSupName);
+                                $("#HDeptID").val(result.data[0].HDeptID);
+                                $("#HDeptName").val(result.data[0].HDeptName);
+                                sessionStorage["SourceFlag"] = true;
+                                layer.load(3);
+                                element.tabChange('tab-POStockInBill', '2');
+                                table.render({
+                                    elem: '#wl-table'
+                                    , cellMinWidth: 80
+                                    //, url: 'http://61.130.49.162:9090/WMSAPI///POStockInBill/DisBillEntryList_Webs_Json'
+                                    , url: GetWEBURL1() + '/POStockInBill/DisBillEntryList_Webs_Json'
+                                    //, toolbar: '#toolbarDemo'
+                                    , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
+                                    , cols: [[
+                                        { type: 'radio' }
+                                        , { field: 'HQty', title: '鏁伴噺', sort: true }
+                                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', sort: true }
+                                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', sort: true }
+                                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', sort: true }
+                                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', sort: true }
+                                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', sort: true }
+                                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', sort: true }
+                                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', sort: true }
+                                        , { field: 'HBatchNo', title: '鎵规' }
+                                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                                    ]]
+                                    // , data: [linterid]
+                                    // , page: true
+                                    , height: 500
+                                    , done: function () {
+                                        layer.closeAll("loading");
+                                    }
+                                });
+                            }
+                            else {
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                    // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
+                }
+            });
+            //鍒锋柊鏄庣粏椤电
+            table.render({
+                elem: '#mx-table'
+                // , url: 'http://localhost:8083/POStockInBill/GetHBarCodeShowBillSub'
+                //, toolbar: '#toolbarDemo'
+                // , where: { sMsg: linterid, sMsg2: lentryid }
+                , cols: [[
+                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+                ]]
+                , page: true
+                , height: 500
+                , done: function () {
+                }
+            });
+
+
+            //琛屽唴浜嬩欢
+            table.on('tool(wl-table)', function (obj) {
+                var data = obj.data;
+                console.log(data.婧愬崟涓诲唴鐮�);
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'edit') {
+                    var _obj = obj;
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '鎵爜璇︽儏鍒楄〃'
+                        , content: ['../../../views/Baseset/鍩虹璧勬枡/WMSBarCodeDetailsList.html?HInterID=' + data.HSourceInterID + '&HBillType=3789', 'yes']
+                        , end: function () {
+
+                        }
+                    })
+                }
+            });
+
+        });
+        //娓呯┖琛ㄥご
+        //function f_ClearTitle() {
+
+        //    $("#HBarCode").val("");
+        //    $("#HSpName").val("");
+        //    $("#HSpID").val("0");
+        //    $("#HQty").val("0");
+        //    $("#HSourceBillNo").val("");
+        //    $("#HWHNAME").val("");
+        //    $("#HWHID").val("0");
+        //    $("#HSCWHNAME").val("");
+        //    $("#HSCWHID").val("0");
+        //    $("#HSupName").val("");
+        //    $("#HSupID").val("0");
+        //    $("#HKeeper").val("");
+        //    $("#HKeeperID").val("0");
+        //    $("#HSecManager").val("0");
+        //    $("#HSecManagerID").val("");
+        //    $("#HDeptName").val("");
+        //    $("#HDeptID").val("0");
+        //    $("#HBillNo").val("");
+        //    $("#HInterID").val("0");
+        //}
+        function GetHWHValue(obj)  //杩斿洖璋冨叆浠撳簱
+        {
+            $("#HWHNAME").val(obj[0].HName);
+            sessionStorage["HWHID"] = obj[0].HItemID;
+            $("#HWHID").val(obj[0].HItemID);
+        }
+        function GetHSpValue(obj) {  //杩斿洖璋冨叆浠撲綅
+            $("#HStockPlaceName").val(obj[0].HName);
+            $("#HStockPlaceID").val(obj[0].HItemID);
+        }
+        function GetHSupValue(obj) {  //杩斿洖渚涘簲鍟�
+            $("#HSupName").val(obj[0].HName);
+            $("#HSupID").val(obj[0].HItemID);
+        }
+        function GetHKeeperValue(obj) {  //杩斿洖淇濈
+            $("#HKeeper").val(obj[0].HName);
+            $("#HKeeperID").val(obj[0].HItemID);
+        }
+        function GetHSecManagerValue(obj) {  //杩斿洖楠屾敹
+            $("#HSecManager").val(obj[0].HName);
+            $("#HSecManagerID").val(obj[0].HItemID);
+        }
+        function GetHDeptNameValue(obj) {   //杩斿洖閮ㄩ棬
+            $("#HDeptName").val(obj[0].HName);
+            $("#HDeptID").val(obj[0].HItemID);
+        }
+        //function Get_CheckWhAndSP(sInterID, sHBillType, sBarCode, sHWHID, sHSPID) {   //杩斿洖閮ㄩ棬
+        //    $.ajax({
+        //        url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Get_CheckWhAndSP_Josn",
+        //        type: "GET",
+        //        data: { "sHInterID": sInterID, "sHBillType": sHBillType, "sBarCode": sBarCode, "sHWHID": sHWHID, "sHSPID": sHSPID },
+        //        success: function (result) {
+        //            if(result.count==1)
+        //            {
+        //               // layer.msg(result.Message, { icon: 1 });
+        //                return true;
+        //            }
+        //            else
+        //            {
+        //                layer.msg(result.Message, { icon: 5 });
+        //                return false;
+        //            }
+        //        }
+        //    })
+        //}
+        function AllowLoadData(sSubStr, bnt) {  //闈炵┖楠岃瘉
+            //if ($("#HSourceBillNo").val() == '') {
+            //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
+            //    return false;
+            //}
+            if ($("#HDeptName").val() == '') {
+                layer.msg("閮ㄩ棬娌℃湁閫夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            if ($("#HSecManager").val() == '') {
+                layer.msg("楠屾敹浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            if ($("#HKeeper").val() == '') {
+                layer.msg("淇濈浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            //if ($("#HSupName").val() == '') {
+            //    layer.msg("渚涘簲鍟嗘病鏈夐�夋嫨", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+            //    return false;
+            //}
+            //if ($("#HWHNAME").val() == '') {
+            //    layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
+            //    return false;
+            //}
+            if ($("#HBillNo").val() == '') {
+                layer.msg("閿欒鐨勫崟鎹彿", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            if ($("#HInterID").val() == '') {
+                layer.msg("閿欒鐨勫唴鐮�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            if (sSubStr == '') {
+                layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                return false;
+            }
+            if (bnt == 'Saver') {
+                if (sSubStr != '') {
+                    //for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
+                    //    if (parseFloat(sSubStr[i].HQtyMust) > 0) {
+                    //        if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
+                    //            layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                    //            return false;
+                    //        }
+                    //    }
+                    //}
+                    for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
+                        if (parseFloat(sSubStr[i].HQty) > 0) {
+                            s = 1;
+                        }
+                    }
+                    if (s == 0) {
+                        layer.msg("澶栬喘鍏ュ簱璁板綍鏈壂鐮�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                        return false;
                     }
                 }
-                if (s == 0) {
-                    layer.msg("澶栬喘鍏ュ簱璁板綍鏈壂鐮�", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); 
-                    return false;
-                }
+            }
+            else {
+                return true;
             }
         }
-        else {
-            return true;
-        }
-    }
     </script>
 
 </body>

--
Gitblit v1.9.1