From b98e50f48c720e4f608f19fc573032438ec5a812 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期三, 05 七月 2023 16:31:17 +0800
Subject: [PATCH] 销售出库、领料出库、直接调拨扫码模块整理、优化

---
 WebTM/views/仓存管理/仓库调拨/Kf_MoveStockBill_Fast.html |   24 
 WebTM/views/领料发货/销售出库/Kf_SellOutBill_Fast.html   | 1259 ++++++++++++++++++++++++++++-------------------------
 WebTM/views/领料发货/领料出库/Kf_MateOutBill_Fast.html   |   80 ++
 3 files changed, 733 insertions(+), 630 deletions(-)

diff --git "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Kf_MoveStockBill_Fast.html" "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Kf_MoveStockBill_Fast.html"
index 92c2a22..a64a4fa 100644
--- "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Kf_MoveStockBill_Fast.html"
+++ "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Kf_MoveStockBill_Fast.html"
@@ -29,7 +29,7 @@
                                 <label class="layui-form-label" style="width:40px;padding-left:0px;">鏉$爜</label>
                             </div>
                             <div class="layui-col-xs8">
-                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input">
+                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                             </div>
                             <div class="layui-col-xs2">
                                 <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin">纭畾</button>
@@ -41,7 +41,7 @@
                                     <label class="layui-form-label" style="width:40px;padding-left:0px;">鏁伴噺</label>
                                 </div>
                                 <div class="layui-col-xs8">
-                                    <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
+                                    <input type="text" name="HQty" id="HQty" lay-verify="HQty" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/)){if(!this.t_value>0){this.value=''}else{this.value=this.t_value;}}else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" autocomplete="off" class="layui-input" onfocus="this.select();">
                                 </div>
                             </div>
                         </div>
@@ -83,7 +83,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟鍙�</label>
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                         </div>
                                         <div class="layui-col-xs2">
                                             <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin2">纭畾</button>
@@ -96,7 +96,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">鍏堣繘鍏堝嚭浠撳簱</label><!--鍏堣繘鍏堝嚭浠撳簱-->
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <input type="text" name="HFIFOWHNAME" id="HFIFOWHNAME" lay-verify="HFIFOWHNAME" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HFIFOWHNAME" id="HFIFOWHNAME" lay-verify="HFIFOWHNAME" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HFIFOWHID" id="HFIFOWHID" lay-verify="HFIFOWHID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs2">
@@ -179,7 +179,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">璋冨叆浠撳簱</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -193,7 +193,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">璋冨叆浠撲綅</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" lay-verify="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -207,7 +207,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">璋冨嚭浠撳簱</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HSCWHNAME" id="HSCWHNAME" lay-verify="HSCWHNAME" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HSCWHNAME" id="HSCWHNAME" lay-verify="HSCWHNAME" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HSCWHID" id="HSCWHID" lay-verify="HSCWHID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -221,7 +221,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">璋冨嚭浠撲綅</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HOutStockPlaceName" id="HOutStockPlaceName" lay-verify="HOutStockPlaceName" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HOutStockPlaceName" id="HOutStockPlaceName" lay-verify="HOutStockPlaceName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HOutStockPlaceID" id="HOutStockPlaceID" lay-verify="HOutStockPlaceID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -235,7 +235,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">鐝粍</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HGroupName" id="HGroupName" lay-verify="HGroupName" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HGroupName" id="HGroupName" lay-verify="HGroupName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HGroupID" id="HGroupID" lay-verify="HGroupID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -249,7 +249,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">淇濈</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HKeeper" id="HKeeper" lay-verify="HKeeper" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HKeeper" id="HKeeper" lay-verify="HKeeper" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HKeeperID" id="HKeeperID" lay-verify="HKeeperID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -263,7 +263,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">楠屾敹</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HSecManager" id="HSecManager" lay-verify="HSecManager" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HSecManager" id="HSecManager" lay-verify="HSecManager" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HSecManagerID" id="HSecManagerID" lay-verify="HSecManagerID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -277,7 +277,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">閮ㄩ棬</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HDeptName" id="HDeptName" lay-verify="HDeptName" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HDeptName" id="HDeptName" lay-verify="HDeptName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HDeptID" id="HDeptID" lay-verify="HDeptID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
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 b79a4fc..b598f1d 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"
@@ -30,7 +30,7 @@
                                 <label class="layui-form-label" style="width:40px;padding-left:0px;">鏉$爜</label>
                             </div>
                             <div class="layui-col-xs8">
-                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input">
+                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                             </div>
                             <div class="layui-col-xs2">
                                 <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin">纭畾</button>
@@ -42,7 +42,7 @@
                                     <label class="layui-form-label" style="width:40px;padding-left:0px;">鏁伴噺</label>
                                 </div>
                                 <div class="layui-col-xs8">
-                                    <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
+                                    <input type="text" name="HQty" id="HQty" lay-verify="HQty" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/)){if(!this.t_value>0){this.value=''}else{this.value=this.t_value;}}else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" autocomplete="off" class="layui-input" onfocus="this.select();">
                                 </div>
                             </div>
                         </div>
@@ -78,7 +78,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟鍙�</label>
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                         </div>
                                         <div class="layui-col-xs2">
                                             <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin2">纭畾</button>
@@ -106,7 +106,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">鍏堣繘鍏堝嚭浠撳簱</label><!--鍏堣繘鍏堝嚭浠撳簱-->
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <input type="text" name="HFIFOWHNAME" id="HFIFOWHNAME" lay-verify="HFIFOWHNAME" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HFIFOWHNAME" id="HFIFOWHNAME" lay-verify="HFIFOWHNAME" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HFIFOWHID" id="HFIFOWHID" lay-verify="HFIFOWHID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs2">
@@ -133,7 +133,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">浠撳簱</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -147,7 +147,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">浠撲綅</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" lay-verify="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -161,7 +161,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">瀹㈡埛</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HSupName" id="HSupName" lay-verify="HSupName" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HSupName" id="HSupName" lay-verify="HSupName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HSupID" id="HSupID" lay-verify="HSupID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -175,7 +175,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">淇濈</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HKeeper" id="HKeeper" lay-verify="HKeeper" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HKeeper" id="HKeeper" lay-verify="HKeeper" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HKeeperID" id="HKeeperID" lay-verify="HKeeperID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -189,7 +189,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">鍙戣揣</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HSecManager" id="HSecManager" lay-verify="HSecManager" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HSecManager" id="HSecManager" lay-verify="HSecManager" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HSecManagerID" id="HSecManagerID" lay-verify="HSecManagerID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -215,7 +215,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">閮ㄩ棬</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HDeptName" id="HDeptName" lay-verify="HDeptName" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HDeptName" id="HDeptName" lay-verify="HDeptName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HDeptID" id="HDeptID" lay-verify="HDeptID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -347,26 +347,47 @@
             //鍏夋爣榛樿鍦ㄦ簮鍗曞彿浣嶇疆涓�
             $("#HSourceBillNo").focus();
 
-            //婧愬崟鎵捐揣鍒楄〃
-            var ZHOption = {
-                elem: '#zh-table'
-                //, toolbar: '#toolbarDemo'
-                , height: 'full-50'
-                , page: true
-                , limit: 100
-                , cellMinWidth: 90
-                , cols: [[
-                    { field: '鍦ㄥ簱鐘舵��', title: '鍦ㄥ簱鐘舵��', width: 180 }
-                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О' }
-                    , { field: '鎵规', title: '鎵规' }
-                    , { field: '鏁伴噺', title: '鏁伴噺' }
-                    , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜' }
-                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
-                ]]
-                , text: {
-                    none: '鏆傛棤鐩稿叧鏁版嵁锛岃鍏堟壂鎻忔簮鍗曞彿锛�'
-                }
-            };
+            //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
+            $("#HWHID").val(sessionStorage["HWHID"]);
+            $("#HWHNAME").val(sessionStorage["HWHName"]);
+            $("#HStockPlaceID").val(sessionStorage["HSPID"]);
+            $("#HStockPlaceName").val(sessionStorage["HSPName"]);
+            $("#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();
+            $("#HDate").val(formatDate(sessionStorage["HDate"]));
+
+            // 缂栬緫鑾峰彇琛ㄥご鏃舵椂闂存牸寮忕煫姝f柟寮�
+            function formatDate(date) {
+                var d = new Date(date),
+                    month = '' + (d.getMonth() + 1),
+                    day = '' + d.getDate(),
+                    year = d.getFullYear();
+
+                if (month.length < 2) month = '0' + month;
+                if (day.length < 2) day = '0' + day;
+
+                return [year, month, day].join('-');
+            }
+
+            //鍒濆鍖栬〃鍗曟彃浠�
+            set_InitFrom();
+
+            //鍒濆鍖栬〃鍗曟彃浠�
+            function set_InitFrom() {
+                //甯歌鐢ㄦ硶
+                laydate.render({
+                    elem: '#HDate'
+                });
+            }
 
             //鏄庣粏淇℃伅
             var listOption = {
@@ -419,110 +440,24 @@
                 }
             }
 
-            var listOption1 = {
-                elem: '#mx-table'
-                , toolbar: '#toolbarDemo'
-                , cellMinWidth: 90
-                , cols: [[
-                    { type: 'radio' }
-                    , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
-                    , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
-                    , { field: 'HBarCode', title: '鏉$爜缂栧彿', width: 150 }
-                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                    , { field: 'HBatchNo', title: '鎵瑰彿', width: 150 }
-                    //, { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                    //, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                ]]
-                , height: 500
-                , done: function () {
-                    layer.closeAll("loading");
-                }
-            }
-
-
-            //鍒濆鍔犺浇琛ㄦ牸
-            ZHOption.data = [];
-            table.render(ZHOption);
-
-            //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 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();
-            $("#HDate").val(formatDate(sessionStorage["HDate"]));
-
-            // 缂栬緫鑾峰彇琛ㄥご鏃舵椂闂存牸寮忕煫姝f柟寮�
-            function formatDate(date) {
-                var d = new Date(date),
-                    month = '' + (d.getMonth() + 1),
-                    day = '' + d.getDate(),
-                    year = d.getFullYear();
-
-                if (month.length < 2) month = '0' + month;
-                if (day.length < 2) day = '0' + day;
-
-                return [year, month, day].join('-');
-            }
-
-            //鍒濆鍖栨槑缁嗚〃鏍�
-            function set_InitGrid() {
-                columns = [
-                    { type: 'checkbox', fixed: 'left' }
-                    , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
-                    , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
-                    , { field: 'HAuxQty', 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: 'HInterID', title: '鍗曟嵁ID', width: 150, hide: true }
-                    , { field: 'HBilltype', title: '鍗曟嵁绫诲瀷', width: 150, hide: true }
-                    , { field: 'Hbarcode', title: '鏉$爜缂栧彿', width: 150, hide: true }
-                    , { field: 'HSCWHID', title: '璋冨嚭浠撳簱ID', width: 150, hide: true }
-                    , { field: 'HSCSPID', title: '璋冨嚭浠撲綅ID', width: 150, hide: true }
-                    , { field: 'HAuxPropID', title: '杈呭姪灞炴�D', width: 150, hide: true }
-                    , { field: 'HMTONo', title: 'MTO鍙�', width: 150, hide: true }
-                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 150, hide: true }
-                ];
-                option = {
-                    id: 'wl-table'
-                    , elem: '#wl-table'
-                    //, toolbar: '#toolbarDemo'
-                    , page: true
-                    , cellMinWidth: 120
-                    , height: 500
-                    , cols: [columns]
-                    , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
-                    , done: function (res, curr, count) {
-                    }
-                };
-            }
-
             //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
             if (sessionStorage.login != "login") {
                 layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
                     icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
                 }, function () { window.location.href = "../../user/login.html"; });
+            }
+
+            //澶辫触鎻愮ず闊�
+            function playSound() {
+                console.log("playSound");
+                var audio = document.getElementById("cs");
+                audio.play();
+            }
+            //鎴愬姛鎻愮ず闊�
+            function playSound_OK() {
+                console.log("playSound_OK");
+                var audio = document.getElementById("cs2");
+                audio.play();
             }
 
             //鑾峰彇鍙傛暟
@@ -544,16 +479,6 @@
             var HInterID_Temp = params[params[1]];  //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鍗曟嵁ID
 
 
-            //鍒濆鍖栬〃鍗曟彃浠�
-            set_InitFrom();
-
-            //鍒濆鍖栬〃鍗曟彃浠�
-            function set_InitFrom() {
-                //甯歌鐢ㄦ硶
-                laydate.render({
-                    elem: '#HDate'
-                });
-            }
 
             //鍒ゆ柇鏄惁鏂板
             if (HInterID != 0) {
@@ -596,17 +521,17 @@
 
             function RoadBillMain(HInterID_Temp)//鍔犺浇琛ㄥご
             {
+                layer.load(3)
                 $.ajax({
                     type: "GET",
-                    url: GetWEBURL() + "/Web/GetPonderationBill",
+                    url: GetWEBURL() + '/WEBSController/GetSourceBill_Temp_Json',
                     async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
-                    data: { "HInterID": HInterID_Temp },
+                    data: { "HInterID": HInterID_Temp, "HBillType": HBillType },
                     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 == null ? "1402" : d.data[0].HSourceBillType);
-                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                        //鑾峰彇婧愬崟绫诲瀷
                         if (d.data[0].HSourceBillType == "1402") {
                             $("#HBillType").empty();
                             $("#HBillType").val("1402");
@@ -626,60 +551,157 @@
                             $("#HBillType").attr("readonly", "readonly");
                         }
                         else {
-                            //$("#HBillType").val("-1");
+                            $("#HBillType").empty();
+                            $("#HBillType").val("-1");
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鎵嬪伐褰曞叆' + "</option>";
+                            $("#HBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HBillType").attr("readonly", "readonly");
                         }
-                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
-                        $("#HSourceBillNo").attr("disabled", "true");
-                        HSourceFlag = true;
-                        $("#HDeptID").val(d.data[0].HDeptID);
-                        $("#HDeptName").val(d.data[0].HDeptName);
-                        $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
 
-                        //$("#HWHID").val(d.data[0].HWhID);
-                        //$("#HStockPlaceID").val(d.data[0].HSPID);
-                        //$("#HKeeperID").val(d.data[0].HKeeperID);
-                        //$("#HSecManagerID").val(d.data[0].HSecManagerID);
-                        RoadSup();
+                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
+                        if (d.data[0].HMulSourceBill == 0) {
+                            $("#HSourceBillNo").attr("readonly", "readonly");
+                        }
+                        if (d.data[0].HDeptID != 0) {
+                            $("#HDeptID").val(d.data[0].HDeptID);
+                            $("#HDeptName").val(d.data[0].HDeptName);
+                        }
+                        $("#HSupID").val(d.data[0].HCusID);
+                        $("#HSupName").val(d.data[0].HCusName);
+                        $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
                     }
                 })
+                layer.closeAll("loading");
             }
 
-            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', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                    return;
+
+
+
+
+            //婧愬崟鎵捐揣鍒楄〃
+            var ZHOption = {
+                elem: '#zh-table'
+                //, toolbar: '#toolbarDemo'
+                , height: 'full-50'
+                , page: true
+                , limit: 100
+                , cellMinWidth: 90
+                , cols: [[
+                    { field: '鍦ㄥ簱鐘舵��', title: '鍦ㄥ簱鐘舵��', width: 180 }
+                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О' }
+                    , { field: '鎵规', title: '鎵规' }
+                    , { field: '鏁伴噺', title: '鏁伴噺' }
+                    , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜' }
+                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
+                ]]
+                , text: {
+                    none: '鏆傛棤鐩稿叧鏁版嵁锛岃鍏堟壂鎻忔簮鍗曞彿锛�'
                 }
-                else {
-                    $.ajax({
-                        type: "GET",
-                        url: GetWEBURL() + "/SellOut/get_GetXs_SeOutStockBillList",
-                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
-                        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-SellOutBill', '2');
-                                layer.load(3);
-                            }
-                            else {
-                                layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                            }
-                            layer.closeAll("loading");
-                        }
-                    });
+            };
+
+            var listOption1 = {
+                elem: '#mx-table'
+                , toolbar: '#toolbarDemo'
+                , cellMinWidth: 90
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
+                    , { field: 'HBarCode', title: '鏉$爜缂栧彿', width: 150 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    , { field: 'HBatchNo', title: '鎵瑰彿', width: 150 }
+                    //, { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                    //, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                ]]
+                , height: 500
+                , done: function () {
+                    layer.closeAll("loading");
                 }
             }
+
+            //鍒濆鍔犺浇琛ㄦ牸
+            ZHOption.data = [];
+            table.render(ZHOption);
+
+            //鍒濆鍖栨槑缁嗚〃鏍�
+            function set_InitGrid() {
+                columns = [
+                    { type: 'checkbox', fixed: 'left' }
+                    , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
+                    , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                    , { field: 'HAuxQty', 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: 'HInterID', title: '鍗曟嵁ID', width: 150, hide: true }
+                    , { field: 'HBilltype', title: '鍗曟嵁绫诲瀷', width: 150, hide: true }
+                    , { field: 'Hbarcode', title: '鏉$爜缂栧彿', width: 150, hide: true }
+                    , { field: 'HSCWHID', title: '璋冨嚭浠撳簱ID', width: 150, hide: true }
+                    , { field: 'HSCSPID', title: '璋冨嚭浠撲綅ID', width: 150, hide: true }
+                    , { field: 'HAuxPropID', title: '杈呭姪灞炴�D', width: 150, hide: true }
+                    , { field: 'HMTONo', title: 'MTO鍙�', width: 150, hide: true }
+                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 150, hide: true }
+                ];
+                option = {
+                    id: 'wl-table'
+                    , elem: '#wl-table'
+                    //, toolbar: '#toolbarDemo'
+                    , page: true
+                    , cellMinWidth: 120
+                    , height: 500
+                    , cols: [columns]
+                    , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+                    , done: function (res, curr, count) {
+                    }
+                };
+            }
+
+            //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', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+            //        return;
+            //    }
+            //    else {
+            //        $.ajax({
+            //            type: "GET",
+            //            url: GetWEBURL() + "/SellOut/get_GetXs_SeOutStockBillList",
+            //            async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+            //            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-SellOutBill', '2');
+            //                    layer.load(3);
+            //                }
+            //                else {
+            //                    layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+            //                }
+            //                layer.closeAll("loading");
+            //            }
+            //        });
+            //    }
+            //}
 
             //function RoadBillSub(HInterID_Temp)//鍔犺浇琛ㄤ綋
             //{
@@ -780,21 +802,6 @@
             //    //RoadBillSub(HInterID_Temp);
             //}
 
-
-            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_WarehouseListNew.html?Type=HWHID&HOrgID=' + HStockOrgID + '', 'yes']
-                    , resize: false
-                    , cancel: function () {
-                    }
-                })
-            });
             //form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
             //    layer.open({
             //        type: 2
@@ -810,52 +817,7 @@
             //        }
             //    })
             //});
-            form.on('submit(HFIFOWHID-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=HFIFOWHID', '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_CustomerList.html', 'yes']
-                    , resize: false
-                    , cancel: function () {
-                        //$(".layui-btn").removeClass("layui-btn-disabled");
-                    }
-                })
-            });
             //form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
             //    layer.open({
             //        type: 2
@@ -887,99 +849,6 @@
             //        }
             //    })
             //});
-            form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
-                layer.open({
-                    type: 2//寮圭獥绫诲瀷
-                    , skin: 'layui-layer-rim' //鍔犱笂杈规
-                    , area: ['90%', '90%']//澶у皬
-                    , title: '鑱屽憳鍒楄〃'//鏍囬
-                    , shift: 2//寮瑰嚭鍔ㄧ敾
-                    , content: ['../../PublicPage/UserInformation.html', 'yes']
-                    , btn: ['纭畾', '鍙栨秷']
-                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
-                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
-                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
-                        if (checkStatus.data.length === 0) {
-                            return layer.msg('璇烽�夋嫨鏁版嵁');
-                        }
-                        $("#HKeeper").val(checkStatus.data[0].HName);
-                        $("#HKeeperID").val(checkStatus.data[0].HItemID);
-                        layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
-                    }
-                    , btn2: function (index, layero) { }
-                })
-            });
-            form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨鍙戣揣
-                layer.open({
-                    type: 2//寮圭獥绫诲瀷
-                    , skin: 'layui-layer-rim' //鍔犱笂杈规
-                    , area: ['90%', '90%']//澶у皬
-                    , title: '鑱屽憳鍒楄〃'//鏍囬
-                    , shift: 2//寮瑰嚭鍔ㄧ敾
-                    , content: ['../../PublicPage/UserInformation.html', 'yes']
-                    , btn: ['纭畾', '鍙栨秷']
-                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
-                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
-                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
-                        if (checkStatus.data.length === 0) {
-                            return layer.msg('璇烽�夋嫨鏁版嵁');
-                        }
-                        $("#HSecManager").val(checkStatus.data[0].HName);
-                        $("#HSecManagerID").val(checkStatus.data[0].HItemID);
-                        layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
-                    }
-                    , btn2: function (index, layero) { }
-                })
-            });
-
-
-            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 () {
-                var sInterID = $("#HInterID").val()
-                var HBillType = '1205'
-                $.ajax(
-                    {
-                        type: "Get",
-                        url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json",
-                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
-                        data: { "HInterID": sInterID, "HBillType": HBillType },
-                        dataType: "json",
-                        success: function (data) {
-                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
-                            }
-                            else {
-                                layer.msg(data.Message, { icon: 2 });
-                            }
-                        },
-                        error: function (err) {
-                            layer.msg('閿欒' + err, {
-                                icon: 5,
-                                time: 20000
-                            }, function () {
-                            });
-                        }
-                    });
-                layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
-                    parent.location.href = "../../../views/index_Mobile.html";
-                });
-            })
-
 
             //缂栬緫
             //form.on('submit(cmdModify)', function () {//缂栬緫
@@ -1017,223 +886,6 @@
             //        layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
             //    }
             //})
-
-            form.on('submit(cmdModify)', function () {//缂栬緫
-                var checkStatus = table.checkStatus('wl-table')
-                    , data = checkStatus.data;
-                if (checkStatus.data.length === 1) {
-                layer.open({
-                    type: 2
-                    , area: ['100%', '100%']
-                    , title: '鏄庣粏鍒楄〃'
-                    , shade: 0.6 //閬僵閫忔槑搴�
-                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                    , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?HInterID=' + data[0].HInterID + '&HMaterID =' + data[0].HMaterID + '&HBillType =' + data[0].HBillType, 'yes']
-                    , resize: false
-                    , cancel: function () {
-                        //$(".layui-btn").removeClass("layui-btn-disabled");
-                    }
-                    , end: function () {
-                        //鏄剧ず琛ㄤ綋鏄庣粏
-                        DisBillEntryList();
-                    }
-                })
-                }
-                else {
-                    layer.msg('璇峰厛閫夋嫨涓�琛岃褰曪紝杩涜缂栬緫锛�');
-                }
-                // }
-            });
-
-            //鍒犻櫎鍔熻兘鎺т欢
-            form.on('submit(cmdDelete)', function () {//鍒犻櫎
-                var checkStatus = table.checkStatus('wl-table')
-                    , data = checkStatus.data;
-                if (checkStatus.data.length === 1) {
-                    layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗灏嗕笉鍙仮澶嶏紒", { title: "鍒犻櫎纭" }, function (index) {
-                        var sInterID = $("#HInterID").val()
-                        var sBillNo = $("#HBillNo").val()
-                        var sMaterID = data[0].HMaterID
-                        var sAuxPropID = data[0].HAuxPropID
-                        var sMTONo = ''
-                        var sSourceInterID = data[0].HSourceInterID
-                        var sSourceEntryID = data[0].HSourceEntryID
-                        var HBillType = '1205';
-                        var sHStockOrgID = sessionStorage["OrganizationID"]
-                        $.ajax(
-                            {
-                                type: "Get",
-                                url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json",
-                                async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
-                                data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "HBillType": HBillType },
-                                dataType: "json",
-                                success: function (data) {
-                                    if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                        //鏄剧ず琛ㄤ綋鏄庣粏
-                                        DisBillEntryList();
-                                    }
-                                    else {
-                                        layer.msg(data.Message, { icon: 2 });
-                                    }
-                                },
-                                error: function (err) {
-                                    layer.msg('閿欒' + err, {
-                                        icon: 5,
-                                        time: 20000
-                                    }, function () {
-                                    });
-                                }
-                            });
-                        layer.close(index)
-                    })
-                }
-                else {
-                    layer.msg('璇烽�夋嫨涓�琛岃褰曪紝杩涜鍒犻櫎锛�');
-                }
-            });
-
-
-            //鎻愪氦
-            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)//闈炵┖楠岃瘉
-                {
-                    //var flage = true;
-                    //for (var i = 0; i < sSubStr.length; i++) {
-                    //    if (sSubStr[i].HQty == 0) {
-                    //        flage = false;
-                    //    }
-                    //}
-                    //if (!flage) {
-                    //    layer.confirm('瀹為檯鎵弿鍗锋暟涓�0灏忎簬鎵捐揣鍗曟暟閲忥紒鏄惁缁х画鎻愪氦锛�', {
-                    //        btn: ['缁х画', '鍙栨秷'], skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず"
-                    //    }, function () {
-                    //        Saver(sMainStr);
-                    //    }, function () {
-                    //        layer.closeAll("loading");
-                    //    });
-                    //} else {
-                        Saver(sMainStr);
-                    //}
-
-                }
-            });
-            //鎻愪氦鏂规硶璋冪敤鐨刟jax
-            function Saver(sMainStr) {
-                layer.load(1);
-                $.ajax(
-                    {
-                        type: "POST",
-                        // url: "http://61.130.49.162:9090/WMSAPI///SellOut/set_SaveSellOutBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                        url: GetWEBURL() + "/SellOut/set_SaveSellOutBill_Json",
-                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
-                        data: { "oMain": sMainStr },
-                        dataType: "json",
-                        success: function (data) {
-                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
-                                layer.confirm(data.Message, {
-                                    icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板'],
-                                    btn2: function () {
-                                        //parent.layui.admin.events.closeThisTabs();鍏抽棴椤电
-                                        //window.close();//鍏抽棴椤甸潰锛屾祻瑙堝櫒鏈夋晥锛孭DA鏃犳晥
-                                        parent.location.href = "../../../views/index.html";
-                                    }//鍏抽棴
-                                }, function () {
-                                    //sessionStorage["SourceFlag"] = false;
-                                    //window.location.reload();
-                                    location.replace('Kf_SellOutBill_Fast.html?OperationType=1&HInterID=0');
-                                });//鏂板
-                            }
-                            else {
-                                layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                            }
-                            layer.closeAll("loading");
-                        },
-                        error: function (err) {
-                            layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                        }
-                    });
-            }
-
-            //鐩戝惉鎻愪氦
-            form.verify({
-                numberOrEmpty: function (value, item) {
-                    // if (value != '') {
-                    if (!/^\d+$/.test(value)) {
-                        return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
-
-                    }
-                    //}
-                }
-            });
-
-
-
-            $('#HStockPlaceName').on('keydown', function (event) {      //鎵粨浣�
-                var HBarCode = $('#HStockPlaceName').val()
-                if (event.keyCode == 13) {
-                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
-                    $.ajax({
-                        type: "GET",
-                        url: GetWEBURL() + "/LookingFor/getSpName_Json",
-                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
-                        data: { "HBarCode": HBarCode },
-                        success: function (result) {
-                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                $("#HStockPlaceName").val(result.data[0].HName);
-                                $("#HStockPlaceID").val(result.data[0].HItemID);
-                                $("#HWHID").val(result.data[0].HWHID);
-                                $("#HWHNAME").val(result.data[0].HWhName);
-                                element.tabChange('tab-SellOutBill', '2');
-                            }
-                            else {
-                                layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                            }
-                            layer.closeAll("loading");
-                        }
-                    });
-                }
-            });
-
-            //鎵粨搴�
-            $('#HWHNAME').on('keydown', function (event) {
-                var HBarCode = $('#HWHNAME').val()
-                if (event.keyCode == 13) {
-                    if (!HBarCode) {
-                        layer.msg('鏃犱粨搴撴潯鐮佷俊鎭紒');
-                        return;
-                    }
-                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
-                    $.ajax({
-                        type: "GET",
-                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
-                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
-                        data: { "HBarCode": HBarCode },
-                        success: function (result) {
-                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                //$("#HStockPlaceName").val(result.data[0].HName);
-                                //$("#HStockPlaceID").val(result.data[0].HItemID);
-                                $("#HWHID").val(result.data[0].HItemID);
-                                $("#HWHNAME").val(result.data[0].HName);
-                                element.tabChange('tab-SellOutBill', '3');
-                                //鎵簮鍗曟垚鍔熷悗锛屽厜鏍囨樉绀哄埌鏉$爜涓�
-                                $("#HBarCode").focus();
-                            }
-                            else {
-                                // $("#verifycode").click();
-                                //layer.msg(result.Message, { icon: 5 });
-                                layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                            }
-                            layer.closeAll("loading");
-                        }
-                    });
-                    // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
-                }
-            });
 
             ////鎵潯鐮�
             //$('#HBarCode').on('keydown', function (event) {
@@ -1310,7 +962,6 @@
             //    }
             //});
 
-
             //鍒锋柊鏄庣粏椤电
             table.render({
                 elem: '#mx-table'
@@ -1355,7 +1006,6 @@
             //    }
             //});
 
-
             //鎵簮鍗曟煡璐�
             function GetSellOutFindSP() {
                 var HSourceBillNo = $('#HSourceBillNo').val();
@@ -1382,9 +1032,448 @@
 
 
 
+            //#region 鍩虹璧勬枡閫夋嫨
+
+            //#region 鍏堣繘鍏堝嚭浠撳簱
+            //鎵弿鍏堣繘鍏堝嚭浠撳簱
+            $('#HFIFOWHNAME').on('keydown', function (event) {
+                var HBarCode = $('#HFIFOWHNAME').val()
+                if (event.keyCode == 13) {
+                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "HBarCode": HBarCode },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HFIFOWHID").val(result.data[0].HItemID);
+                                $("#HFIFOWHNAME").val(result.data[0].HName);
+                                element.tabChange('tab-SellOutBill', '1');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
+                                $("#HBarCode").focus();
+                            }
+                            else {
+                                layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                }
+            });
+
+            //閫夋嫨鍏堣繘鍏堝嚭浠撳簱
+            form.on('submit(HFIFOWHID-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=HFIFOWHID', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+
+            //#endregion
+
+            //#region 浠撳簱
+            //鎵粨搴�
+            $('#HWHNAME').on('keydown', function (event) {
+                var HBarCode = $('#HWHNAME').val()
+                if (event.keyCode == 13) {
+                    if (!HBarCode) {
+                        layer.msg('鏃犱粨搴撴潯鐮佷俊鎭紒');
+                        return;
+                    }
+                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "HBarCode": HBarCode },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                //$("#HStockPlaceName").val(result.data[0].HName);
+                                //$("#HStockPlaceID").val(result.data[0].HItemID);
+                                $("#HWHID").val(result.data[0].HItemID);
+                                $("#HWHNAME").val(result.data[0].HName);
+                                element.tabChange('tab-SellOutBill', '2');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
+                                $("#HBarCode").focus();
+                            }
+                            else {
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                    // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
+                }
+            });
+
+            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_WarehouseListNew.html?Type=HWHID&HOrgID=' + HStockOrgID + '', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                    }
+                })
+            });
+
+            //#endregion
+
+            //#region 浠撲綅
+            $('#HStockPlaceName').on('keydown', function (event) {      //鎵粨浣�
+                var HBarCode = $('#HStockPlaceName').val()
+                if (event.keyCode == 13) {
+                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/LookingFor/getSpName_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "HBarCode": HBarCode },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HStockPlaceName").val(result.data[0].HName);
+                                $("#HStockPlaceID").val(result.data[0].HItemID);
+                                $("#HWHID").val(result.data[0].HWHID);
+                                $("#HWHNAME").val(result.data[0].HWhName);
+                                element.tabChange('tab-SellOutBill', '2');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
+                                $("#HBarCode").focus();
+                            }
+                            else {
+                                layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                }
+            });
+
+            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");
+                    }
+                })
+            });
+
+            //#endregion
+
+            //#region 瀹㈡埛
+            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_CustomerList.html', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+
+            //#endregion
+
+            //#region 淇濈
+            form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
+                layer.open({
+                    type: 2//寮圭獥绫诲瀷
+                    , skin: 'layui-layer-rim' //鍔犱笂杈规
+                    , area: ['90%', '90%']//澶у皬
+                    , title: '鑱屽憳鍒楄〃'//鏍囬
+                    , shift: 2//寮瑰嚭鍔ㄧ敾
+                    , content: ['../../PublicPage/UserInformation.html', 'yes']
+                    , btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HKeeper").val(checkStatus.data[0].HName);
+                        $("#HKeeperID").val(checkStatus.data[0].HItemID);
+                        layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) { }
+                })
+            });
+
+            //#endregion
+
+            //#region 鍙戣揣
+            form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨鍙戣揣
+                layer.open({
+                    type: 2//寮圭獥绫诲瀷
+                    , skin: 'layui-layer-rim' //鍔犱笂杈规
+                    , area: ['90%', '90%']//澶у皬
+                    , title: '鑱屽憳鍒楄〃'//鏍囬
+                    , shift: 2//寮瑰嚭鍔ㄧ敾
+                    , content: ['../../PublicPage/UserInformation.html', 'yes']
+                    , btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HSecManager").val(checkStatus.data[0].HName);
+                        $("#HSecManagerID").val(checkStatus.data[0].HItemID);
+                        layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) { }
+                })
+            });
+
+            //#endregion
+
+            //#region 閮ㄩ棬
+            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");
+                    }
+                })
+            });
+            //#endregion
+
+            //#endregion
 
 
+            //#region 鍔熻兘鎺т欢
 
+            //#region 鎻愪氦
+
+            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)//闈炵┖楠岃瘉
+                {
+                    //var flage = true;
+                    //for (var i = 0; i < sSubStr.length; i++) {
+                    //    if (sSubStr[i].HQty == 0) {
+                    //        flage = false;
+                    //    }
+                    //}
+                    //if (!flage) {
+                    //    layer.confirm('瀹為檯鎵弿鍗锋暟涓�0灏忎簬鎵捐揣鍗曟暟閲忥紒鏄惁缁х画鎻愪氦锛�', {
+                    //        btn: ['缁х画', '鍙栨秷'], skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず"
+                    //    }, function () {
+                    //        Saver(sMainStr);
+                    //    }, function () {
+                    //        layer.closeAll("loading");
+                    //    });
+                    //} else {
+                    Saver(sMainStr);
+                    //}
+
+                }
+            });
+
+            //鎻愪氦鏂规硶璋冪敤鐨刟jax
+            function Saver(sMainStr) {
+                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: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "oMain": sMainStr },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+                                layer.confirm(data.Message, {
+                                    icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板'],
+                                    btn2: function () {
+                                        //parent.layui.admin.events.closeThisTabs();鍏抽棴椤电
+                                        //window.close();//鍏抽棴椤甸潰锛屾祻瑙堝櫒鏈夋晥锛孭DA鏃犳晥
+                                        parent.location.href = "../../../views/index.html";
+                                    }//鍏抽棴
+                                }, function () {
+                                    //sessionStorage["SourceFlag"] = false;
+                                    //window.location.reload();
+                                    location.replace('Kf_SellOutBill_Fast.html?OperationType=1&HInterID=0');
+                                });//鏂板
+                            }
+                            else {
+                                layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                        },
+                        error: function (err) {
+                            layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        }
+                    });
+                layer.closeAll("loading");
+            }
+
+            //鐩戝惉鎻愪氦
+            form.verify({
+                numberOrEmpty: function (value, item) {
+                    // if (value != '') {
+                    if (!/^\d+$/.test(value)) {
+                        return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
+
+                    }
+                    //}
+                }
+            });
+
+            //#endregion
+
+            //#region 缂栬緫
+
+            form.on('submit(cmdModify)', function () {//缂栬緫
+                var checkStatus = table.checkStatus('wl-table')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '鏄庣粏鍒楄〃'
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?HInterID=' + data[0].HInterID + '&HMaterID =' + data[0].HMaterID + '&HBillType =' + data[0].HBillType, 'yes']
+                        , resize: false
+                        , cancel: function () {
+                            //$(".layui-btn").removeClass("layui-btn-disabled");
+                        }
+                        , end: function () {
+                            //鏄剧ず琛ㄤ綋鏄庣粏
+                            DisBillEntryList();
+                        }
+                    })
+                }
+                else {
+                    layer.msg('璇峰厛閫夋嫨涓�琛岃褰曪紝杩涜缂栬緫锛�');
+                }
+            });
+
+            //#endregion
+
+            //#region 鍒犻櫎
+            //鍒犻櫎鍔熻兘鎺т欢
+            form.on('submit(cmdDelete)', function () {//鍒犻櫎
+                var checkStatus = table.checkStatus('wl-table')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗灏嗕笉鍙仮澶嶏紒", { title: "鍒犻櫎纭" }, function (index) {
+                        var sInterID = $("#HInterID").val()
+                        var sBillNo = $("#HBillNo").val()
+                        var sMaterID = data[0].HMaterID
+                        var sAuxPropID = data[0].HAuxPropID
+                        var sMTONo = ''
+                        var sSourceInterID = data[0].HSourceInterID
+                        var sSourceEntryID = data[0].HSourceEntryID
+                        var HBillType = '1205';
+                        var sHStockOrgID = sessionStorage["OrganizationID"]
+                        layer.load(3)
+                        $.ajax(
+                            {
+                                type: "Get",
+                                url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json",
+                                async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                                data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "HBillType": HBillType },
+                                dataType: "json",
+                                success: function (data) {
+                                    if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                        //鏄剧ず琛ㄤ綋鏄庣粏
+                                        DisBillEntryList();
+                                    }
+                                    else {
+                                        layer.msg(data.Message, { icon: 2 });
+                                    }
+                                },
+                                error: function (err) {
+                                    layer.msg('閿欒' + err, {
+                                        icon: 5,
+                                        time: 20000
+                                    }, function () {
+                                    });
+                                }
+                            });
+                        layer.close(index)
+                    })
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛岃褰曪紝杩涜鍒犻櫎锛�');
+                }
+            });
+
+            //#endregion
+
+            //#region 閫�鍑�
+            //閫�鍑烘寜閽�
+            form.on('submit(Cancel)', function () {
+                var sInterID = $("#HInterID").val()
+                var HBillType = '1205'
+                $.ajax(
+                    {
+                        type: "Get",
+                        url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "HInterID": sInterID, "HBillType": HBillType },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+                            }
+                            else {
+                                layer.msg(data.Message, { icon: 2 });
+                            }
+                        },
+                        error: function (err) {
+                            layer.msg('閿欒' + err, {
+                                icon: 5,
+                                time: 20000
+                            }, function () {
+                            });
+                        }
+                    });
+                layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
+                    parent.location.href = "../../../views/index_Mobile.html";
+                });
+            })
+
+            //#endregion
+
+            //#endregion
 
 
             //#region 鎵弿婧愬崟鏉$爜
@@ -1392,13 +1481,17 @@
             //鎵簮鍗�
             $('#HSourceBillNo').on('keydown', function (event) {
                 if (event.keyCode == 13) {
+                    layer.load(3)
                     GetMeesageBySourceBillNo();
+                    layer.closeAll("loading");
                 }
             });
 
             //纭畾
             form.on('submit(QueDin2)', function (data) {
+                layer.load(3)
                 GetMeesageBySourceBillNo();
+                layer.closeAll("loading");
             });
 
             //鎵弿婧愬崟鏉$爜
@@ -1411,6 +1504,7 @@
                 var HMaker = sessionStorage["HUserName"]
                 var sHStockOrgID = sessionStorage["OrganizationID"];
                 var HFIFOWhID = $("#HFIFOWHID").val()
+
                 $.ajax({
                     type: "GET",
                     url: GetWEBURL() + "/WEBSController/Get_SourceBarCode_SellOut_Json",
@@ -1418,7 +1512,7 @@
                     data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "HMaker": HMaker, "HFIFOWhID": HFIFOWhID, "HOWNERID": sHStockOrgID },
                     success: function (result) {
                         if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            playSound1();
+                            playSound_OK();
                             HSourceFlag = true;
                             $("#HSupName").val(result.data.hSupNameField);
                             $("#HSupID").val(result.data.hSupIDField);
@@ -1436,7 +1530,7 @@
                             layer.load(3);
                             element.tabChange('tab-SellOutBill', '2');
                             //鎵簮鍗曟垚鍔熷悗锛屽厜鏍囨樉绀哄埌浠撳簱涓�
-                            $("#HWHNAME").focus();
+                            $("#HBarCode").focus();
                             //鏄剧ず琛ㄤ綋鏄庣粏
                             DisBillEntryList();
                         }
@@ -1444,7 +1538,6 @@
                             playSound();
                             layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                         }
-                        layer.closeAll("loading");
                     }
                 });
             }
@@ -1554,13 +1647,17 @@
             //鎵潯鐮�
             $('#HBarCode').on('keydown', function (event) {
                 if (event.keyCode == 13) {
+                    layer.load(3)
                     GetMeesageByBarCode();
+                    layer.closeAll("loading");
                 }
             });
 
             //纭畾
             form.on('submit(QueDin)', function (data) {
+                layer.load(3)
                 GetMeesageByBarCode();
+                layer.closeAll("loading");
             });
 
             //鎵潯鐮�
@@ -1576,20 +1673,17 @@
                 var sHWHID = $("#HWHID").val();//浠撳簱ID
                 var sHSPID = $("#HStockPlaceID").val();//浠撲綅ID
                 var sQty = $("#HQty").val()//鏁伴噺
-                var sMouldManagerCtl = 'N'
-                var sFIFOCtl = 'N'
                 if (sQty == "") {
                     sQty = 0;
                 }
-                //var SourceFlag = sessionStorage["SourceFlag"];
                 var sSourceBillNo = $("#HSourceBillNo").val();//婧愬崟鍙�
                 var sHBillType = $("#HBillType").val()  //婧愬崟绫诲瀷-鍙戣揣閫氱煡鍗曪細1402锛岄攢鍞鍗�1401
                 var sBillType = '1205'
-
                 var HScanStyle = $("#HScanStyle").val();
 
                 if (HDeleteFlag == "*") {
                     if (sBarCode == "") {
+                        playSound();
                         layer.msg("璇锋壂鎻忚鍒犻櫎鐨勬潯鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                         return;
                     }
@@ -1605,7 +1699,7 @@
                             dataType: "json",
                             success: function (data) {
                                 if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
-                                    playSound1();
+                                    playSound_OK();
                                     //娓呯┖鏁伴噺
                                     $("#HQty").val("");
                                     //table.reload('wl-table', {
@@ -1648,7 +1742,6 @@
                                 else {
                                     playSound();
                                     layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-
                                 }
                             },
                             error: function (err) {
@@ -1721,10 +1814,8 @@
                 else {
                     var sBarCode = $('#HBarCode').val()
                     if (sBarCode == '') {
-                        //
                         playSound();
                         layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
-                        //11
                         return false;
                     }
                     if (sBarCode != "") {
@@ -1748,8 +1839,8 @@
                         //type: "GET",
                         //data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sMaker, "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"], "HScanStyle": HScanStyle },
                         success: function (result) {
-                            playSound1();
                             if (result.count == 1) {
+                                playSound_OK();
                                 if (result.data.hBarTypeField == '浠撳簱鏉$爜') {
                                     $("#HWHNAME").val(result.data.hWhNameField);
                                     $("#HWHID").val(result.data.hWhIDField);
@@ -1857,7 +1948,6 @@
                                 //        layer.closeAll("loading");
                                 //    }
                                 //});
-                                playSound1();
                                 //娓呯┖鏁伴噺
                                 $("#HQty").val("");
                             }
@@ -1865,7 +1955,6 @@
                                 playSound();
                                 layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                             }
-                            layer.closeAll("loading");
                         },
                         error: function (err) {
                             playSound();
@@ -1913,33 +2002,11 @@
                         else {
                             layer.msg(result.Message);
                         }
-                        layer.closeAll("loading");
                     }
                 });
             }
 
             //#endregion
-
-            function playSound() {
-                console.log("playSound");
-                //var audio = document.getElementById("cs");
-                //$("appendAut").html("");
-                //if (audio == null)
-                //$("appendAut").append('<audio id="cs" hidden controls> <source src = "../../video/jingbao.wav" type = "audio/ogg"> </audio >');
-                //$("appendAut").attr("src","../../video/jingbao.wav")
-                var audio = document.getElementById("cs");
-                audio.play();
-            }
-            function playSound1() {
-                console.log("playSound1");
-                //var audio = document.getElementById("cs");
-                //$("appendAut").html("");
-                //if (audio == null)
-                //$("appendAut").append('<audio id="cs" hidden controls> <source src = "../../video/success.wav" type = "audio/ogg"> </audio >');
-                //$("appendAut").attr("src", "../../video/success.wav")
-                var audio = document.getElementById("cs2");
-                audio.play();
-            }
 
 
         });
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 a53c816..501bb2d 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"
@@ -29,7 +29,7 @@
                                 <label class="layui-form-label" style="width:40px;padding-left:0px;">鏉$爜</label>
                             </div>
                             <div class="layui-col-xs8">
-                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input">
+                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                             </div>
                             <div class="layui-col-xs2">
                                 <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin">纭畾</button>
@@ -40,7 +40,7 @@
                                 <label class="layui-form-label" style="width:40px;padding-left:0px;">鏁伴噺</label>
                             </div>
                             <div class="layui-col-xs8">
-                                <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
+                                <input type="text" name="HQty" id="HQty" lay-verify="HQty" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/)){if(!this.t_value>0){this.value=''}else{this.value=this.t_value;}}else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" autocomplete="off" class="layui-input" onfocus="this.select();">
                             </div>
                         </div>
                     </div>
@@ -77,7 +77,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟鍙�</label>
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                         </div>
                                         <div class="layui-col-xs2">
                                             <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin2">纭畾</button>
@@ -104,7 +104,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">閰嶅鏁伴噺</label>
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <input type="text" name="HPTQty" id="HPTQty" lay-verify="HPTQty" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HPTQty" id="HPTQty" lay-verify="HPTQty" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/)){if(!this.t_value>0){this.value=''}else{this.value=this.t_value;}}else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" autocomplete="off" class="layui-input" onfocus="this.select();">
                                         </div>
                                     </div>
                                 </div>
@@ -114,7 +114,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">鍏堣繘鍏堝嚭浠撳簱</label><!--鍏堣繘鍏堝嚭浠撳簱-->
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <input type="text" name="HFIFOWHNAME" id="HFIFOWHNAME" lay-verify="HFIFOWHNAME" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HFIFOWHNAME" id="HFIFOWHNAME" lay-verify="HFIFOWHNAME" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HFIFOWHID" id="HFIFOWHID" lay-verify="HFIFOWHID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs2">
@@ -142,7 +142,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">浠撳簱</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -156,7 +156,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">浠撲綅</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" lay-verify="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -170,7 +170,7 @@
                                             <label class="layui-form-label" style="width:45px;padding-left:0px;">鍙戞枡浜�</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HKeeper" id="HKeeper" lay-verify="HKeeper" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HKeeper" id="HKeeper" lay-verify="HKeeper" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HKeeperID" id="HKeeperID" lay-verify="HKeeperID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -184,7 +184,7 @@
                                             <label class="layui-form-label" style="width:45px;padding-left:0px;">棰嗘枡浜�</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HSecManager" id="HSecManager" lay-verify="HSecManager" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HSecManager" id="HSecManager" lay-verify="HSecManager" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HSecManagerID" id="HSecManagerID" lay-verify="HSecManagerID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -210,7 +210,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">閮ㄩ棬</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HDeptName" id="HDeptName" lay-verify="HDeptName" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="text" name="HDeptName" id="HDeptName" lay-verify="HDeptName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HDeptID" id="HDeptID" lay-verify="HDeptID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -396,7 +396,7 @@
             //鍏夋爣榛樿鍦ㄦ簮鍗曞彿浣嶇疆涓�
             $("#HSourceBillNo").focus();
 
-            //琛ㄥご鍒濆鍖栬祴鍊硷紝灏唖ession鐨勫�艰祴鍊肩粰鐣岄潰鎺т欢锛宻ession鍊兼潵婧愪笌涓婁竴娆℃暟鎹�夋嫨
+            //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級
             $("#HWHID").val(sessionStorage["HWHID"]);
             $("#HWHNAME").val(sessionStorage["HWHName"]);
             $("#HStockPlaceID").val(sessionStorage["HSPID"]);
@@ -537,7 +537,7 @@
             var OperationType = params[params[0]];  //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鏁版嵁绫诲瀷  1鏂板  2浠庣紦瀛樺垪琛ㄤ腑杩斿洖
             var HInterID_Temp = params[params[1]];  //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鍗曟嵁ID
 
-            //鍒ゆ柇鏄惁鏂板
+            //鍒ゆ柇鏄惁鏂板锛岃幏鍙栨渶澶у崟鎹彿
             if (HInterID != 0) {
                 HSourceFlag = true;
             }
@@ -862,6 +862,32 @@
             //#region 鍩虹璧勬枡閫夋嫨
 
             //#region 鍏堣繘鍏堝嚭浠撳簱
+            //鎵弿鍏堣繘鍏堝嚭浠撳簱
+            $('#HFIFOWHNAME').on('keydown', function (event) {
+                var HBarCode = $('#HFIFOWHNAME').val()
+                if (event.keyCode == 13) {
+                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "HBarCode": HBarCode },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HFIFOWHID").val(result.data[0].HItemID);
+                                $("#HFIFOWHNAME").val(result.data[0].HName);
+                                element.tabChange('tab-MateOutBill', '1');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
+                                $("#HBarCode").focus();
+                            }
+                            else {
+                                layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                }
+            });
 
             //閫夋嫨鍏堣繘鍏堝嚭浠撳簱
             form.on('submit(HFIFOWHID-BT)', function () {//閫夋嫨璋冨嚭浠撳簱
@@ -893,8 +919,9 @@
                     }
                     //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
                     $.ajax({
-                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
                         type: "GET",
+                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
                         data: { "HBarCode": HBarCode },
                         success: function (result) {
                             if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -902,8 +929,8 @@
                                 //$("#HStockPlaceID").val(result.data[0].HItemID);
                                 $("#HWHID").val(result.data[0].HItemID);
                                 $("#HWHNAME").val(result.data[0].HName);
-                                element.tabChange('tab-MateOutBill', '3');
-                                //鎵簮鍗曟垚鍔熷悗锛屽厜鏍囨樉绀哄埌鏉$爜涓�
+                                element.tabChange('tab-MateOutBill', '2');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
                                 $("#HBarCode").focus();
                             }
                             else {
@@ -941,8 +968,9 @@
                 if (event.keyCode == 13) {
                     //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
                     $.ajax({
-                        url: GetWEBURL() + "/LookingFor/getSpName_Json",
                         type: "GET",
+                        url: GetWEBURL() + "/LookingFor/getSpName_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
                         data: { "HBarCode": HBarCode },
                         success: function (result) {
                             if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -950,7 +978,9 @@
                                 $("#HStockPlaceID").val(result.data[0].HItemID);
                                 $("#HWHID").val(result.data[0].HWHID);
                                 $("#HWHNAME").val(result.data[0].HWhName);
-                                element.tabChange('tab-ProductlnBill', '2');
+                                element.tabChange('tab-MateOutBill', '2');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
+                                $("#HBarCode").focus();
                             }
                             else {
                                 // $("#verifycode").click();
@@ -1092,12 +1122,12 @@
                                 else {
                                     layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                                 }
-                                layer.closeAll("loading");
                             },
                             error: function (err) {
                                 layer.msg("閿欒" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                             }
                         });
+                    layer.closeAll("loading");
                     return false;
                 }
             });
@@ -1182,6 +1212,7 @@
                         var sSourceEntryID = data[0].HSourceEntryID
                         var HBillType = '1204';
                         var sHStockOrgID = sessionStorage["OrganizationID"]
+                        layer.load(3)
                         $.ajax(
                             {
                                 type: "Get",
@@ -1327,13 +1358,17 @@
             //鎵簮鍗�
             $('#HSourceBillNo').on('keydown', function (event) {
                 if (event.keyCode == 13) {
+                    layer.load(3)
                     GetMeesageBySourceBillNo();
+                    layer.closeAll("loading");
                 }
             });
 
             //纭畾
             form.on('submit(QueDin2)', function (data) {
+                layer.load(3)
                 GetMeesageBySourceBillNo();
+                layer.closeAll("loading");
             });
 
             //鎵弿婧愬崟鏉$爜
@@ -1375,7 +1410,7 @@
                             layer.load(3);
                             element.tabChange('tab-MateOutBill', '2');
                             //鎵簮鍗曟垚鍔熷悗锛屽厜鏍囨樉绀哄埌浠撳簱涓�
-                            $("#HWHNAME").focus();
+                            $("#HBarCode").focus();
                             //鏄剧ず琛ㄤ綋鏄庣粏
                             DisBillEntryList();
                         }
@@ -1383,7 +1418,6 @@
                             playSound();
                             layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                         }
-                        layer.closeAll("loading");
                     }
                 });
             }
@@ -1467,12 +1501,16 @@
             //鎵潯鐮�
             $('#HBarCode').on('keydown', function (event) {
                 if (event.keyCode == 13) {
+                    layer.load(3)
                     GetMeesageByBarCode();
+                    layer.closeAll("loading");
                 }
             });
             //纭畾
             form.on('submit(QueDin)', function (data) {
+                layer.load(3)
                 GetMeesageByBarCode();
+                layer.closeAll("loading");
             });
 
             //鎵潯鐮�
@@ -1633,7 +1671,6 @@
                                 playSound();
                                 layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                             }
-                            layer.closeAll("loading");
                         },
                         error: function (err) {
                             playSound();
@@ -1861,7 +1898,6 @@
                         else {
                             layer.msg(result.Message);
                         }
-                        layer.closeAll("loading");
                     }
                 });
             }

--
Gitblit v1.9.1