From ac5962f71fe0f4fd4e7e44fb74a02bba7ff816b4 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 18 六月 2024 12:14:16 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/views/仓存管理/仓库调拨/Kf_MoveStockBill_Fast.html | 1091 ++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 768 insertions(+), 323 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 4d1ebb0..7c4b846 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"
@@ -18,7 +18,7 @@
 <body>
     <div class="layui-fluid" style="padding:0">
         <div class="layui-card">
-            <div class="layui-card-body" style="padding: 5px; height:800px;">
+            <div class="layui-card-body" style="padding: 0px; height:800px;">
                 <form class="layui-form" action="" lay-filter="component-form-group">
                     <div style="background-color:#0085E8;">
                         <span style="color: white;"><i class="layui-icon layui-icon-form"></i>鐩存帴璋冩嫧鍗�</span>
@@ -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" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" 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>
@@ -52,8 +52,8 @@
                             <li lay-id="2" style="padding:1px;">琛ㄥご淇℃伅</li>
                             <li lay-id="3" style="padding:1px;">鏄庣粏淇℃伅</li>
                             <li lay-id="4" style="padding:1px;">涓嬫灦淇℃伅</li>
-                            <li lay-id="5" style="padding:1px;">搴撳瓨淇℃伅</li>
-                            <li lay-id="6" style="padding:1px;min-width: 35px;">姹囨��</li>
+                            <!--<li lay-id="5" style="padding:1px;">搴撳瓨淇℃伅</li>
+                            <li lay-id="6" style="padding:1px;min-width: 35px;">姹囨��</li>-->
                         </ul>
                         <div class="layui-tab-content">
                             <!--閫夋嫨婧愬崟-->
@@ -67,11 +67,11 @@
                                             <select name="HBillType" id="HBillType">
                                                 <option value="1402">鍙戣揣閫氱煡鍗�</option>
                                                 <option value="1243">璋冩嫧鐢宠鍗�</option>
-                                                <!--<option value="3720">鐢熶骇鐢ㄦ枡娓呭崟</option>-->
-                                                <!--<option value="1604">濮斿鐢ㄦ枡娓呭崟</option>-->
+                                                <option value="3720">鐢熶骇鐢ㄦ枡娓呭崟</option>
+                                                <option value="1604">濮斿鐢ㄦ枡娓呭崟</option>
                                                 <option value="1242">鍑哄簱鐢宠鍗�</option>
                                                 <option value="1214">鐢熶骇鍙戞枡閫氱煡鍗�</option>
-                                                <option value="-1">鎵嬪伐褰曞叆</option>
+                                                <option value="-1" selected>鎵嬪伐褰曞叆</option>
                                             </select>
                                             <!--<input type="text" name="cmbSourceType" id="cmbSourceType" lay-verify="cmbSourceType" autocomplete="off" class="layui-input">-->
                                         </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">
+                                            <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>
@@ -93,13 +93,13 @@
                                 <div class="layui-form-item" style="padding:0px;margin:0px;">
                                     <div class="layui-row">
                                         <div class="layui-col-xs3">
-                                            <label class="layui-form-label" style="width:60px;padding-left:0px;">鍏堣繘鍏堝嚭浠撳簱</label>
+                                            <label class="layui-form-label" style="width:60px;padding-left:0px;">鍏堣繘鍏堝嚭浠撳簱</label><!--鍏堣繘鍏堝嚭浠撳簱-->
                                         </div>
-                                        <div class="layui-col-xs6">
-                                            <input type="text" name="HFIFOWHNAME" id="HFIFOWHNAME" lay-verify="HFIFOWHNAME" autocomplete="off" class="layui-input">
+                                        <div class="layui-col-xs8">
+                                            <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-xs3">
+                                        <div class="layui-col-xs2">
                                             <button type="button" id="HFIFOWHID-BT" lay-submit="" class="layui-btn" lay-filter="HFIFOWHID-BT">...</button>
                                         </div>
                                     </div>
@@ -123,7 +123,7 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">鍗曟嵁绫诲瀷</label>
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <select name=" HBillSubType" id="HBillSubType">
+                                            <select name="HBillSubType" id="HBillSubType">
                                                 <!--鍔ㄦ�佹覆鏌撶粍缁�-->
                                             </select>
                                         </div>
@@ -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">
+                                            <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">
+                                            <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">
+                                            <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">
+                                            <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">
+                                            <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">
+                                            <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">
+                                            <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">
+                                            <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">
@@ -291,7 +291,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">璋冨嚭缁勭粐</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HStockOutOrgName" id="HStockOutOrgName" lay-verify="HStockOutOrgName" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HStockOutOrgName" id="HStockOutOrgName" lay-verify="HStockOutOrgName" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HStockOutOrgID" id="HStockOutOrgID" lay-verify="HStockOutOrgID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -305,7 +305,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">璋冨叆缁勭粐</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HStockInOrgName" id="HStockInOrgName" lay-verify="HStockInOrgName" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HStockInOrgName" id="HStockInOrgName" lay-verify="HStockInOrgName" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HStockInOrgID" id="HStockInOrgID" lay-verify="HStockInOrgID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -346,13 +346,13 @@
                                 <table class="layui-hide" id="FIFOlist-table" lay-filter="FIFOlist-table"></table>
                             </div>
                             <!--搴撳瓨淇℃伅-->
-                            <div class="layui-tab-item">
+                            <!--<div class="layui-tab-item">
                                 <table class="layui-hide" id="mx-table" lay-filter="mx-table"></table>
-                            </div>
+                            </div>-->
                             <!--姹囨��-->
-                            <div class="layui-tab-item">
+                            <!--<div class="layui-tab-item">
                                 <table class="layui-hide" id="fj-table-qd" lay-filter="fj-table-qd"></table>
-                            </div>
+                            </div>-->
                         </div>
                         <!--<div class="layui-form-item" style="margin-bottom: 20px;">
             <div class="layui-row">
@@ -410,7 +410,86 @@
                 , table = layui.table
                 , form = layui.form
                 , element = layui.element;
+            var HInterID = $('#HInterID').val()
+            var HBillNo = $('#HBillNo').val()
+            var HBillType = '1207'
+            var HMaker = sessionStorage["HUserName"]
+            var HSourceFlag = sessionStorage["SourceFlag"];
+            var OperationType = 0;//鎿嶄綔绫诲瀷
+            var option = [];
             $("#HSourceBillNo").focus();
+
+            var listOption = {
+                elem: '#wl-table'
+                , toolbar: '#toolbarDemo'
+                , cellMinWidth: 90
+                , limit: 3000
+                , totalRow: true
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    , { field: 'HAuxPropName', title: '杈呭姪灞炴��', width: 150 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                    //, { field: 'HBatchNo', title: '鎵规', width: 150, hide: true }
+                    , { field: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HMaterID', title: 'HMaterID', width: 150, hide: true }
+                    , { field: 'HAuxPropID', title: 'HAuxPropID', width: 150, hide: true }
+                    , { field: 'HSourceInterID', title: 'HSourceInterID', width: 150, hide: true }
+                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 150, hide: true }
+                    , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                ]]
+                , height: 500
+                , done: function () {
+                    layer.closeAll("loading");
+                }
+            }
+            var FIFOlistOption = {
+                elem: '#FIFOlist-table'
+                , toolbar: '#toolbarDemo'
+                , cellMinWidth: 90
+                , limit: 3000
+                , totalRow: true
+                , cols: [[
+                    { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HQtyMust', title: '涓嬫灦鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HWhName', title: '浠撳簱', width: 150 }
+                    , { field: 'HSPName', title: '浠撲綅', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                    , { field: 'HAuxPropName', title: '杈呭姪灞炴��', width: 150 }
+                ]]
+                , height: 500
+                , done: function () {
+                    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, totalRow: true }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                    , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                    , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                ]]
+                , height: 500
+                , done: function () {
+                    layer.closeAll("loading");
+                }
+            }
 
             //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
             //$("#HSCWHID").val(sessionStorage["HWHID"]);
@@ -438,16 +517,14 @@
             $("#HStockInOrgID").val(sessionStorage["OrganizationID"]);
             $("#HStockInOrgName").val(sessionStorage["Organization"]);
             $("#HBillSubType").val(sessionStorage["HBillSubType"]);
-            var HSourceFlag = sessionStorage["SourceFlag"];
 
-          
 
             //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
-            //if (sessionStorage.login != "login") {
-            //    layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
-            //        icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
-            //    }, function () { window.location.href = "../../user/login.html"; });
-            //}
+            if (sessionStorage.login != "login") {
+                layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+                    icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+                }, function () { window.location.href = "../../user/login.html"; });
+            }
 
             //鑾峰彇鍙傛暟
             function getUrlVars() {
@@ -460,16 +537,85 @@
                 }
                 return vars;
             }
+            //var params = getUrlVars();
+            //var HInterID_Temp = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
+            //var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷    
             var params = getUrlVars();
-            var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
-            var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
+            var OperationType = params[params[0]];  //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鏁版嵁绫诲瀷  1鏂板  2浠庣紦瀛樺垪琛ㄤ腑杩斿洖
+            var HInterID_Temp = params[params[1]];  //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鍗曟嵁ID
+            var HSourceBillType = params[params[2]]; //鐢ㄤ簬鍒ゆ柇婧愬崟绫诲瀷
 
-            function RoadBillMain(linterid)//鍔犺浇琛ㄥご
+
+            //鍒ゆ柇鏄惁鏂板
+            if (HInterID != 0) {
+                HSourceFlag = true;
+            }
+            //浠庣紦瀛樺垪琛ㄧ紪杈戝姛鑳借烦杞嚦鍗曟嵁妯″潡
+            else if (OperationType == 2) {
+                RoadBillMain(HInterID_Temp);
+                $("#HBarCode").select();
+                $("#HBarCode").focus();     //鑾峰彇鍏夋爣
+                //$('#QueDin2').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+                //document.getElementById("QueDin2").disabled = true;   //鎸夐挳鍙樹负涓嶅彲缂栬緫鐘舵��
+                //鏄剧ず琛ㄤ綋鏄庣粏
+                DisBillEntryList();
+                HSourceFlag = true;
+            }
+            else {
+                OperationType = 1;
+                //鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HBillType": HBillType },
+                    success: function (d) {
+                        if (d.count == 1) {
+                            $("#HInterID").val(d.data[0].HInterID);
+                            $("#HBillNo").val(d.data[0].HBillNo);
+                            HInterID = $('#HInterID').val()
+                            HBillNo = $('#HBillNo').val()
+                        }
+                        else {
+                            layer.msg(d.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                        }
+                    }
+                });
+
+                //鑾峰彇鍗曟嵁瀛愮被鍨�
+                var HBillSubType = '';
+                var HStockOutOrgID = $("#HStockOutOrgID").val()//璋冨嚭缁勭粐
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HBillType": '1207', "HStockOrgID": HStockOutOrgID },
+                    success: function (result) {
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            var data = result.data;
+                            for (var i = 0; i < data.length; i++) {
+                                HBillSubType += '<option value="' + data[i].HNumber + '">' + data[i].HName + '</option>';
+                            }
+                            $("#HBillSubType").append(HBillSubType);
+                            if (HSourceBillType == 1402) { //鍙戣揣閫氱煡鍗�
+                                $("#HBillSubType").val("ZJDB02_SYS"); //鍗曟嵁绫诲瀷榛樿涓哄瘎鍞�
+                            }
+                            form.render('select');
+                        }
+                        layer.closeAll("loading");
+                    }
+                })
+
+                HSourceFlag = false;
+            }
+
+            function RoadBillMain(HInterID_Temp)//鍔犺浇琛ㄥご
             {
                 $.ajax({
-                    url: GetWEBURL() + "/Web/GetPonderationBill",
                     type: "GET",
-                    data: { "HInterID": linterid },
+                    url: GetWEBURL() + "/Web/GetPonderationBill",
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HInterID": HInterID_Temp },
                     success: function (d) {
                         // console.log(d.data);
                         $("#HInterID").val(d.data[0].HInterID);
@@ -540,7 +686,7 @@
                             $("#HBillType").attr("readonly", "readonly");
                         }
                         $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
-                        $("#HSourceBillNo").attr("disabled","true");
+                        $("#HSourceBillNo").attr("disabled", "true");
                         //$("#HSourceBillNo").append.readonly = true;
                         HSourceFlag = true;
                         //$("#HWHID").val(d.data[0].HWhID);
@@ -555,8 +701,9 @@
                 var HBillSubType = '';
                 var HStockOutOrgID = $("#HStockOutOrgID").val()//璋冨嚭缁勭粐
                 $.ajax({
-                    url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
                     type: "GET",
+                    url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
                     data: { "HBillType": '1207', "HStockOrgID": HStockOutOrgID },
                     success: function (result) {
                         if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -573,14 +720,90 @@
             }
 
 
-            function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
+
+            ////鍒ゆ柇鏄惁鏂板
+            //if (HInterID_Temp == null || HInterID_Temp == 0) {
+            //    //鑾峰彇鏈�澶у崟鎹彿 new
+            //    $("#HInterID").val("");
+            //    $("#HBillNo").val("");
+            //    $.ajax({
+            //        url: GetWEBURL() + "/Web/GetMAXNumPDA",
+            //        type: "GET",
+            //        data: { "HBillType": '1207' },
+            //        success: function (d) {
+            //            //console.log(d.data);
+            //            $("#HInterID").val(d.data[0].HInterID);
+            //            $("#HBillNo").val(d.data[0].HBillNo);
+            //        }
+            //    });
+            //    //鑾峰彇鍗曟嵁瀛愮被鍨�
+            //    var HBillSubType = '';
+            //    var HStockOutOrgID = $("#HStockOutOrgID").val()//璋冨嚭缁勭粐
+            //    $.ajax({
+            //        url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
+            //        type: "GET",
+            //        data: { "HBillType": '1207', "HStockOrgID": HStockOutOrgID },
+            //        success: function (result) {
+            //            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+            //                var data = result.data;
+            //                for (var i = 0; i < data.length; i++) {
+            //                    HBillSubType += '<option value="' + data[i].HNumber + '">' + data[i].HName + '</option>';
+            //                }
+            //                $("#HBillSubType").append(HBillSubType);
+            //                if (HSourceBillType == 1402) { //鍙戣揣閫氱煡鍗�
+            //                    $("#HBillSubType").val("ZJDB02_SYS"); //鍗曟嵁绫诲瀷榛樿涓哄瘎鍞�
+            //                }
+            //                form.render('select');
+            //            }
+            //            layer.closeAll("loading");
+            //        }
+            //    })
+            //}
+            //else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+            //    RoadBillMain(HInterID_Temp);
+            //    RoadBillSub(HInterID_Temp);
+            //}
+
+            if (HSourceBillType == 1402) { //鍙戣揣閫氱煡鍗�
+                $("#HBillType").val(1402);
+               
+            } else if (HSourceBillType == 1243) { //璋冩嫧鐢宠鍗�
+                $("#HBillType").val(1243);
+
+            } else if (HSourceBillType == 1214) { //鐢熶骇鍙戞枡閫氱煡鍗�
+                $("#HBillType").val(1214);
+
+            } else if (HSourceBillType == 3720) { //鐢熶骇鐢ㄦ枡娓呭崟
+                $("#HBillType").val(3720);
+
+            } else if (HSourceBillType == 1604) { //濮斿鐢ㄦ枡娓呭崟
+                $("#HBillType").val(1604);
+
+            } else if (HSourceBillType == 1242) { //鍑哄簱鐢宠鍗�
+                $("#HBillType").val(1242);
+            } else {
+                $("#HBillType").val(-1);
+            }
+          
+             //鐩存帴璋冩嫧  鎵皟鍑轰粨搴�--璋冨叆浠撳簱--鏉$爜
+            if ($("#HBillType").val() == -1) {
+                element.tabChange('tab-MoveStockBill', '2');
+
+                $("#HSCWHNAME").focus();//璋冨嚭浠撳簱
+            }
+
+
+
+            function RoadBillSub(HInterID_Temp)//鍔犺浇琛ㄤ綋
             {
                 table.render({
                     elem: '#wl-table'
                     , url: GetWEBURL() + '/MoveStockBill/DisBillEntryList_Webs_Json'
-                    , toolbar: '#toolbarDemo'
+                    //, toolbar: '#toolbarDemo'
+                    , page: true
+                    , limit: 100
                     , defaultToolbar: []
-                    , where: { HBillID: linterid, HBillType: '1207', sWhere: '' }
+                    , where: { HBillID: HInterID_Temp, HBillType: '1207', sWhere: '' }
                     , cols: [[
                           { type: 'radio' }
                         , { field: 'HQty', title: '鏁伴噺', width: 150 }
@@ -602,49 +825,7 @@
                         layer.closeAll("loading");
                     }
                 });
-            }
-
-            //鍒ゆ柇鏄惁鏂板
-            if (linterid == null || linterid == 0) {
-                //鑾峰彇鏈�澶у崟鎹彿 new
-                $("#HInterID").val("");
-                $("#HBillNo").val("");
-                $.ajax({
-                    url: GetWEBURL() + "/Web/GetMAXNumPDA",
-                    type: "GET",
-                    data: { "HBillType": '1207' },
-                    success: function (d) {
-                        //console.log(d.data);
-                        $("#HInterID").val(d.data[0].HInterID);
-                        $("#HBillNo").val(d.data[0].HBillNo);
-                    }
-                });
-                //鑾峰彇鍗曟嵁瀛愮被鍨�
-                var HBillSubType = '';
-                var HStockOutOrgID = $("#HStockOutOrgID").val()//璋冨嚭缁勭粐
-                $.ajax({
-                    url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
-                    type: "GET",
-                    data: { "HBillType": '1207', "HStockOrgID": HStockOutOrgID },
-                    success: function (result) {
-                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            var data = result.data;
-                            for (var i = 0; i < data.length; i++) {
-                                HBillSubType += '<option value="' + data[i].HNumber + '">' + data[i].HName + '</option>';
-                            }
-                            $("#HBillSubType").append(HBillSubType);
-                            form.render('select');
-                        }
-                        layer.closeAll("loading");
-                    }
-                })
-            }
-            else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
-                RoadBillMain(linterid);
-                RoadBillSub(linterid);
-            }
-
-
+            }            
 
             //閫夋嫨鍏堣繘鍏堝嚭浠撳簱
             form.on('submit(HFIFOWHID-BT)', function () {//閫夋嫨璋冨嚭浠撳簱
@@ -923,21 +1104,46 @@
 
             //缂栬緫
             form.on('submit(cmdModify)', function () {//缂栬緫
-                var sSubStr = table.cache['wl-table'];
-                //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
-                layer.open({
-                    type: 2
-                    , area: ['100%', '100%']
-                    , title: '鏄庣粏鍒楄〃'
-                    , shade: 0.6 //閬僵閫忔槑搴�
-                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                    , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
-                    , resize: false
-                    , cancel: function () {
-                        //$(".layui-btn").removeClass("layui-btn-disabled");
-                    }
-                })
+                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('璇峰厛閫夋嫨涓�琛岃褰曪紝杩涜缂栬緫锛�');
+                }
+
+                //var sSubStr = table.cache['wl-table'];
+                ////if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+                //layer.open({
+                //    type: 2
+                //    , area: ['100%', '100%']
+                //    , title: '鏄庣粏鍒楄〃'
+                //    , shade: 0.6 //閬僵閫忔槑搴�
+                //    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                //    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                //    , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
+                //    , resize: false
+                //    , cancel: function () {
+                //        //$(".layui-btn").removeClass("layui-btn-disabled");
+                //    }
+                //})
                 // }
             });
 
@@ -966,7 +1172,9 @@
                                     elem: '#wl-table'
                                     , url: GetWEBURL() + '/MoveStockBill/DisBillEntryList_Webs_Json'
                                     , cellMinWidth: 80
-                                    , toolbar: '#toolbarDemo'
+                                    //, toolbar: '#toolbarDemo'
+                                    , page: true
+                                    , limit: 100
                                     , defaultToolbar: []
                                     , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
                                     , cols: [[
@@ -1005,7 +1213,7 @@
                     {
                         type: "Get",
                         url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json",
-                        async: true,
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
                         data: { "HInterID": sInterID, "HBillType": HBillType },
                         dataType: "json",
                         success: function (data) {
@@ -1041,19 +1249,23 @@
                         {
                             type: "POST",
                             url: GetWEBURL() + "/MoveStockBill/set_SaveMoveStockBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                            async: true,
+                            async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
                             data: { "oMain": sMainStr },
                             dataType: "json",
                             success: function (data) {
                                 if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
-                                    layer.confirm("鐢熸垚璋冩嫧鍗�" + data.Message + $("#HBillNo").val(), {
+                                    layer.confirm(data.Message, {
+                                    //layer.confirm("鐢熸垚璋冩嫧鍗�" + data.Message + $("#HBillNo").val(), {
                                         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 () { window.location.reload(); });//鏂板
+                                    }, function () {
+                                        //window.location.reload();
+                                        location.replace('Kf_MoveStockBill_Fast.html?OperationType=1&HInterID=0');
+                                    });//鏂板
                                 }
                                 else {
                                     layer.close(index);
@@ -1104,8 +1316,9 @@
                 var HFIFOWhID = $("#HFIFOWHID").val()
                 var HStockOutOrgID = $("#HStockOutOrgID").val()//璋冨嚭缁勭粐
                 $.ajax({
-                    url: GetWEBURL() + "/WEBSController/get_SourceBarCode_MoveStock_Json",
                     type: "GET",
+                    url: GetWEBURL() + "/WEBSController/get_SourceBarCode_MoveStock_Json",
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
                     data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "HMaker": HMaker, "HFIFOWhID": HFIFOWhID, "HOWNERID": HStockOutOrgID },
                     success: function (result) {
                         if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -1114,6 +1327,14 @@
                             if (result.data.hDeptIDField != 0) {
                                 $("#HDeptID").val(result.data.hDeptIDField);
                                 $("#HDeptName").val(result.data.hDeptNameField);
+                            }
+                            if (result.data.hWhIDField != 0) {
+                                $("#HWHID").val(result.data.hWhIDField);
+                                $("#HWHNAME").val(result.data.hWhNameField);
+                            }
+                            if (result.data.hSCWhIDField != 0) {
+                                $("#HSCWHID").val(result.data.hSCWhIDField);
+                                $("#HSCWHNAME").val(result.data.hSCWhNameField);
                             }
 
                             $("#HStockStyle").find("option:contains('" + result.data.hStockStyleField +"')").attr("selected", true);
@@ -1132,38 +1353,44 @@
                                 $("#HSourceBillNo").attr("readonly", "readonly");
                             }
                             layer.load(3);
-                            element.tabChange('tab-MoveStockBill', '3');
-                            //鎵簮鍗曟垚鍔熷悗锛屽厜鏍囨樉绀哄埌鏉$爜涓�
-                            $("#HBarCode").focus();
 
-                            $.ajax({
-                                url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
-                                type: "GET",
-                                data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
-                                success: function (result) {
-                                    if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                        listOption.data = result.data.Materlist;
-                                        table.render(listOption);
-                                        FIFOlistOption.data = result.data.FIFOlist;
-                                        table.render(FIFOlistOption);
+                            if (HSourceBillType == 1402 || HSourceBillType == 1214 || HSourceBillType == 1242) { //鍙戣揣閫氱煡鍗晐|鐢熶骇鍙戞枡閫氱煡鍗�
+                                element.tabChange('tab-MoveStockBill', '2');
+                                //鎵簮鍗曟垚鍔熷悗锛屽厜鏍囨樉绀哄埌璋冨嚭浠撳簱涓�
+                                $("#HSCWHNAME").focus();
+                            } 
 
-                                        //console.log(result.data.list2);
-                                        var count = 0;
-                                        var count1 = 0;
-                                        for (var i = 0; i < result.data.Materlist.length; i++) {
-                                            count += result.data.Materlist[i].HQty;
-                                            count1 += result.data.Materlist[i].HPieceQty;
-                                        }
-                                        $("#HSumQtys").val(count);
-                                        $("#HBarCodeQtys").val(count1);
-                                        //return;
-                                    }
-                                    else {
-                                        layer.msg(result.Message);
-                                    }
-                                    layer.closeAll("loading");
-                                }
-                            });
+                            //鏄剧ず琛ㄤ綋鏄庣粏
+                            DisBillEntryList();
+
+                            //$.ajax({
+                            //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                            //    type: "GET",
+                            //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
+                            //    success: function (result) {
+                            //        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            //            listOption.data = result.data.Materlist;
+                            //            table.render(listOption);
+                            //            FIFOlistOption.data = result.data.FIFOlist;
+                            //            table.render(FIFOlistOption);
+
+                            //            //console.log(result.data.list2);
+                            //            var count = 0;
+                            //            var count1 = 0;
+                            //            for (var i = 0; i < result.data.Materlist.length; i++) {
+                            //                count += result.data.Materlist[i].HQty;
+                            //                count1 += result.data.Materlist[i].HPieceQty;
+                            //            }
+                            //            $("#HSumQtys").val(count);
+                            //            $("#HBarCodeQtys").val(count1);
+                            //            //return;
+                            //        }
+                            //        else {
+                            //            layer.msg(result.Message);
+                            //        }
+                            //        layer.closeAll("loading");
+                            //    }
+                            //});
                         }
                         else {
                             playSound();
@@ -1232,42 +1459,47 @@
                     }
                     $.ajax(
                         {
-                            type: "Get",
+                            type: "GET",
                             url: GetWEBURL() + "/ProductIn/Delete_Json",
-                            async: true,
+                            async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
                             data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": '1207', "HBarCode": sBarCode },
                             dataType: "json",
                             success: function (data) {
                                 if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
-                                    $.ajax({
-                                        url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
-                                        type: "GET",
-                                        data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
-                                        success: function (result) {
-                                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                                listOption.data = result.data.Materlist;
-                                                table.render(listOption);
-                                                FIFOlistOption.data = result.data.FIFOlist;
-                                                table.render(FIFOlistOption);
+                                    //鏄剧ず琛ㄤ綋鏄庣粏
+                                    DisBillEntryList();
 
-                                                //console.log(result.data.list2);
-                                                var count = 0;
-                                                var count1 = 0;
-                                                for (var i = 0; i < result.data.Materlist.length; i++) {
-                                                    count += result.data.Materlist[i].HQty;
-                                                    count1 += result.data.Materlist[i].HPieceQty;
-                                                }
-                                                $("#HSumQtys").val(count);
-                                                $("#HBarCodeQtys").val(count1);
-                                                //return;
-                                            }
-                                            else {
-                                                layer.msg(result.Message);
-                                            }
-                                            layer.closeAll("loading");
-                                        }
-                                    });
+                                    //$.ajax({
+                                    //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                                    //    type: "GET",
+                                    //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
+                                    //    success: function (result) {
+                                    //        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                    //            listOption.data = result.data.Materlist;
+                                    //            table.render(listOption);
+                                    //            FIFOlistOption.data = result.data.FIFOlist;
+                                    //            table.render(FIFOlistOption);
+
+                                    //            //console.log(result.data.list2);
+                                    //            var count = 0;
+                                    //            var count1 = 0;
+                                    //            for (var i = 0; i < result.data.Materlist.length; i++) {
+                                    //                count += result.data.Materlist[i].HQty;
+                                    //                count1 += result.data.Materlist[i].HPieceQty;
+                                    //            }
+                                    //            $("#HSumQtys").val(count);
+                                    //            $("#HBarCodeQtys").val(count1);
+                                    //            //return;
+                                    //        }
+                                    //        else {
+                                    //            layer.msg(result.Message);
+                                    //        }
+                                    //        layer.closeAll("loading");
+                                    //    }
+                                    //});
                                     playSound1();
+                                    //娓呯┖鏁伴噺
+                                    $("#HQty").val("");
                                 }
                                 else {
                                     playSound();
@@ -1299,55 +1531,186 @@
                         $('#HQty').val("");
                     }
                     $.ajax({
-                        url: GetWEBURL() + "/WEBSController/get_BarCode_MoveStock_Json",
                         type: "GET",
+                        url: GetWEBURL() + "/WEBSController/get_BarCode_MoveStock_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
                         data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": HBillType, "HBillNo": sBillNo, "HMaker": sMaker, "HWhID": WhID, "HSPID": SPID, "HSCWHID": HSCWhID, "HSCSPID": HSCSPID, "HQty": sQty, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockInOrgID": HStockInOrgID, "HStockOutOrgID": HStockOutOrgID, "HScanStyle": HScanStyle },
                         success: function (result) {
                             if (result.count == 1) {
-                                if (HSourceFlag == "false") {
-                                    $("#HBillType").find("option:contains('鎵嬪伐褰曞叆')").attr("selected", true);
-                                    $("#HSourceBillNo").val("");
+                                if (result.data.hBarTypeField == '浠撳簱鏉$爜') {
+                                    $("#HSCWHNAME").val(result.data.hWhNameField);
+                                    $("#HSCWHID").val(result.data.hWhIDField);
+                                    $("#HOutStockPlaceName").val("");
+                                    $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+                                    element.tabChange('tab-MoveStockBill', '2');  //璺宠浆椤电
+                                    return;
+                                }
+                                else if (result.data.hBarTypeField == '浠撲綅鏉$爜') {
+                                    $("#HOutStockPlaceName").val(result.data.hSPNameField);
+                                    $("#HOutStockPlaceID").val(result.data.hSPIDField);
+                                    $("#HSCWHNAME").val(result.data.hWhNameField);
+                                    $("#HSCWHID").val(result.data.hWhIDField);
+                                    $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+                                    element.tabChange('tab-MoveStockBill', '2');//璺宠浆椤电
+                                    return;
+                                }
+                                else if (result.data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+                                    $("#HDeptName").val(result.data.hDeptNameField);
+                                    $("#HDeptID").val(result.data.hDeptIDField);
+                                    $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+                                    element.tabChange('tab-MoveStockBill', '2');//璺宠浆椤电
+                                    return;
+                                }
+                                else if (result.data.hBarTypeField == '婧愬崟鏉$爜') {
+                                    if (result.data.hDeptIDField != 0) {
+                                        $("#HDeptID").val(result.data.hDeptIDField);
+                                        $("#HDeptName").val(result.data.hDeptNameField);
+                                    }
+                                    if (result.data.hWhIDField != 0) {
+                                        $("#HWHID").val(result.data.hWhIDField);
+                                        $("#HWHNAME").val(result.data.hWhNameField);
+                                    }
+                                    if (result.data.hSCWhIDField != 0) {
+                                        $("#HSCWHID").val(result.data.hSCWhIDField);
+                                        $("#HSCWHNAME").val(result.data.hSCWhNameField);
+                                    }
+
+                                    $("#HStockStyle").find("option:contains('" + result.data.hStockStyleField + "')").attr("selected", true);
+                                    $("#HStockInOrgID").val(result.data.hStockInOrgIDField);
+                                    $("#HStockInOrgName").val(result.data.hStockInOrgNameField);
+                                    $("#HStockOutOrgID").val(result.data.hStockOutOrgIDField);
+                                    $("#HStockOutOrgName").val(result.data.hStockOutOrgNameField);
+                                    $("#HSourceBillNo").val(result.data.hSourceBillNoField);
+                                    HSourceFlag = true;
+                                    //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                    $("#HBillType").val(result.data.hSourceBillTypeField == null ? "1402" : result.data.hSourceBillTypeField);
+                                    if (result.data.hSourceBillTypeField == "1402") {
+                                        $("#HBillType").empty();
+                                        $("#HBillType").val("1402");
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鍙戣揣閫氱煡鍗�' + "</option>";
+                                        $("#HBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HBillType").attr("readonly", "readonly");
+                                    }
+                                    else if (result.data.hSourceBillTypeField == "1243") {
+                                        $("#HBillType").empty();
+                                        $("#HBillType").val("1243");
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '璋冩嫧鐢宠鍗�' + "</option>";
+                                        $("#HBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HBillType").attr("readonly", "readonly");
+                                    }
+                                    else if (result.data.hSourceBillTypeField == "3720") {
+                                        $("#HBillType").empty();
+                                        $("#HBillType").val("3720");
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鐢熶骇鐢ㄦ枡娓呭崟' + "</option>";
+                                        $("#HBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HBillType").attr("readonly", "readonly");
+                                    }
+                                    else if (result.data.hSourceBillTypeField == "1604") {
+                                        $("#HBillType").empty();
+                                        $("#HBillType").val("1604");
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '濮斿鐢ㄦ枡娓呭崟' + "</option>";
+                                        $("#HBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HBillType").attr("readonly", "readonly");
+                                    }
+                                    else if (result.data.hSourceBillTypeField == "1242") {
+                                        $("#HBillType").empty();
+                                        $("#HBillType").val("1242");
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鍑哄簱鐢宠鍗�' + "</option>";
+                                        $("#HBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HBillType").attr("readonly", "readonly");
+                                    }
+                                    else if (result.data.hSourceBillTypeField == "1214") {
+                                        $("#HBillType").empty();
+                                        $("#HBillType").val("1214");
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鐢熶骇鍙戞枡閫氱煡鍗�' + "</option>";
+                                        $("#HBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HBillType").attr("readonly", "readonly");
+                                    }
+                                    else {
+                                        //$("#HBillType").empty();
+                                        $("#HBillType").val("-1");
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鎵嬪伐褰曞叆' + "</option>";
+                                        $("#HBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HBillType").attr("readonly", "readonly");
+                                    }
 
                                     $("#HStockStyle").attr("disabled", "disabled");
                                     $("#HStockInOrgName").attr("readonly", "readonly");
                                     $("#HStockOutOrgName").attr("readonly", "readonly");
                                     $("#HBillType").attr("disabled", "disabled");
-                                    $("#HSourceBillNo").attr("readonly", "readonly");
                                     form.render('select');
+                                    if (result.data.hMulSourceFlagField == 0) {
+                                        $("#HSourceBillNo").attr("readonly", "readonly");
+                                    }
+                                    $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
+                                    element.tabChange('tab-MoveStockBill', '3');
                                 }
-                                HSourceFlag = true;
-                                element.tabChange('tab-MoveStockBill', '3');
+                                else {
+                                    if (HSourceFlag == "false") {
+                                        $("#HBillType").find("option:contains('鎵嬪伐褰曞叆')").attr("selected", true);
+                                        $("#HSourceBillNo").val("");
+
+                                        $("#HStockStyle").attr("disabled", "disabled");
+                                        $("#HStockInOrgName").attr("readonly", "readonly");
+                                        $("#HStockOutOrgName").attr("readonly", "readonly");
+                                        $("#HBillType").attr("disabled", "disabled");
+                                        $("#HSourceBillNo").attr("readonly", "readonly");
+                                        form.render('select');
+                                    }
+                                    HSourceFlag = true;
+                                    element.tabChange('tab-MoveStockBill', '3');
+                                }
 
                                 layer.load(3)
-                                $.ajax({
-                                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
-                                    type: "GET",
-                                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
-                                    success: function (result) {
-                                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                            listOption.data = result.data.Materlist;
-                                            table.render(listOption);
-                                            FIFOlistOption.data = result.data.FIFOlist;
-                                            table.render(FIFOlistOption);
 
-                                            //console.log(result.data.list2);
-                                            var count = 0;
-                                            var count1 = 0;
-                                            for (var i = 0; i < result.data.Materlist.length; i++) {
-                                                count += result.data.Materlist[i].HQty;
-                                                count1 += result.data.Materlist[i].HPieceQty;
-                                            }
-                                            $("#HSumQtys").val(count);
-                                            $("#HBarCodeQtys").val(count1);
-                                            //return;
-                                        }
-                                        else {
-                                            layer.msg(result.Message);
-                                        }
-                                        layer.closeAll("loading");
-                                    }
-                                });
+                                //鏄剧ず琛ㄤ綋鏄庣粏
+                                DisBillEntryList();
+
+                                //$.ajax({
+                                //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                                //    type: "GET",
+                                //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
+                                //    success: function (result) {
+                                //        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                //            listOption.data = result.data.Materlist;
+                                //            table.render(listOption);
+                                //            FIFOlistOption.data = result.data.FIFOlist;
+                                //            table.render(FIFOlistOption);
+
+                                //            //console.log(result.data.list2);
+                                //            var count = 0;
+                                //            var count1 = 0;
+                                //            for (var i = 0; i < result.data.Materlist.length; i++) {
+                                //                count += result.data.Materlist[i].HQty;
+                                //                count1 += result.data.Materlist[i].HPieceQty;
+                                //            }
+                                //            $("#HSumQtys").val(count);
+                                //            $("#HBarCodeQtys").val(count1);
+                                //            //return;
+                                //        }
+                                //        else {
+                                //            layer.msg(result.Message);
+                                //        }
+                                //        layer.closeAll("loading");
+                                //    }
+                                //});
                                 playSound1();
+                                //娓呯┖鏁伴噺
+                                $("#HQty").val("");
                             }
                             else {
                                 playSound();
@@ -1357,6 +1720,49 @@
                         }
                     });
                 }
+            }
+
+            //#endregion
+
+
+            //#region 鏄剧ず鐗╂枡鍒楄〃淇℃伅
+
+            function DisBillEntryList() {
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var HBillType = '1207'
+                var HStockOutOrgID = $("#HStockOutOrgID").val()//璋冨嚭缁勭粐
+
+                //鍒锋柊鍒楄〃淇℃伅
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
+                    success: function (result) {
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            listOption.data = result.data.Materlist;
+                            table.render(listOption);
+                            FIFOlistOption.data = result.data.FIFOlist;
+                            table.render(FIFOlistOption);
+
+                            //console.log(result.data.list2);
+                            var count = 0;
+                            var count1 = 0;
+                            for (var i = 0; i < result.data.Materlist.length; i++) {
+                                count += result.data.Materlist[i].HQty;
+                                count1 += result.data.Materlist[i].HPieceQty;
+                            }
+                            $("#HSumQtys").val(count);
+                            $("#HBarcodeQtys").val(count1);
+                            //return;
+                        }
+                        else {
+                            layer.msg(result.Message);
+                        }
+                        layer.closeAll("loading");
+                    }
+                });
             }
 
             //#endregion
@@ -1415,6 +1821,112 @@
                 }
             });
 
+            //鎵皟鍏ヤ粨搴�
+            $('#HWHNAME').on('keydown', function (event) {
+                var HBarCode = $('#HWHNAME').val()
+                if (event.keyCode == 13) {
+                    if (!HBarCode) {
+                        layer.msg('鏃犱粨搴撴潯鐮佷俊鎭紒');
+                        return;
+                    }
+                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                    $.ajax({
+                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
+                        type: "GET",
+                        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-POStockInBill', '2');
+                                //鎵皟鍏ヤ粨搴撴垚鍔熷悗锛屽厜鏍囨樉绀哄埌鏉$爜涓�
+                                $("#HBarCode").focus();
+                                if (HSourceBillType == 1402 || HSourceBillType == 1214) { //鍙戣揣閫氱煡鍗晐|鐢熶骇鍙戞枡閫氱煡鍗�
+                                    element.tabChange('tab-MoveStockBill', '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 });
+                }
+            });            
+
+            //鎵皟鍑轰粨搴�
+            $('#HSCWHNAME').on('keydown', function (event) {
+                var HBarCode = $('#HSCWHNAME').val()
+                if (event.keyCode == 13) {
+                    if (!HBarCode) {
+                        layer.msg('鏃犱粨搴撴潯鐮佷俊鎭紒');
+                        return;
+                    }
+                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                    $.ajax({
+                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
+                        type: "GET",
+                        data: { "HBarCode": HBarCode },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                //$("#HStockPlaceName").val(result.data[0].HName);
+                                //$("#HStockPlaceID").val(result.data[0].HItemID);
+                                $("#HSCWHID").val(result.data[0].HItemID);
+                                $("#HSCWHNAME").val(result.data[0].HName);
+                                //element.tabChange('tab-POStockInBill', '2');
+                                //鎵皟鍑轰粨搴撴垚鍔熷悗锛屽厜鏍囨樉绀哄埌璋冨叆浠撳簱涓�
+                                $("#HWHNAME").focus();
+                                if (HSourceBillType == 1402 || HSourceBillType == 1214) { //鍙戣揣閫氱煡鍗晐|鐢熶骇鍙戞枡閫氱煡鍗�
+                                    element.tabChange('tab-MoveStockBill', '2');
+                                    //鎵皟鍑轰粨搴撴垚鍔熷悗锛屽厜鏍囨樉绀哄埌璋冨叆浠撳簱涓�
+                                    $("#HWHNAME").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 });
+                }
+            });
+
+            //鎵弿鍏堣繘鍏堝嚭浠撳簱
+            $('#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");
+                        }
+                    });
+                }
+            });
 
             //#region 鍒犻櫎鍔熻兘鎺т欢
             form.on('submit(cmdDelete)', function () {//鍒犻櫎
@@ -1435,40 +1947,43 @@
                             {
                                 type: "Get",
                                 url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json",
-                                async: true,
+                                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) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
                                         //鏄剧ず琛ㄤ綋鏄庣粏
-                                        $.ajax({
-                                            url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
-                                            type: "GET",
-                                            data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
-                                            success: function (result) {
-                                                if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                                    listOption.data = result.data.Materlist;
-                                                    table.render(listOption);
-                                                    FIFOlistOption.data = result.data.FIFOlist;
-                                                    table.render(FIFOlistOption);
+                                        DisBillEntryList();
 
-                                                    //console.log(result.data.list2);
-                                                    var count = 0;
-                                                    var count1 = 0;
-                                                    for (var i = 0; i < result.data.Materlist.length; i++) {
-                                                        count += result.data.Materlist[i].HQty;
-                                                        count1 += result.data.Materlist[i].HPieceQty;
-                                                    }
-                                                    $("#HSumQtys").val(count);
-                                                    $("#HBarCodeQtys").val(count1);
-                                                    //return;
-                                                }
-                                                else {
-                                                    layer.msg(result.Message);
-                                                }
-                                                layer.closeAll("loading");
-                                            }
-                                        });
+                                        ////鏄剧ず琛ㄤ綋鏄庣粏
+                                        //$.ajax({
+                                        //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                                        //    type: "GET",
+                                        //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
+                                        //    success: function (result) {
+                                        //        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                        //            listOption.data = result.data.Materlist;
+                                        //            table.render(listOption);
+                                        //            FIFOlistOption.data = result.data.FIFOlist;
+                                        //            table.render(FIFOlistOption);
+
+                                        //            //console.log(result.data.list2);
+                                        //            var count = 0;
+                                        //            var count1 = 0;
+                                        //            for (var i = 0; i < result.data.Materlist.length; i++) {
+                                        //                count += result.data.Materlist[i].HQty;
+                                        //                count1 += result.data.Materlist[i].HPieceQty;
+                                        //            }
+                                        //            $("#HSumQtys").val(count);
+                                        //            $("#HBarCodeQtys").val(count1);
+                                        //            //return;
+                                        //        }
+                                        //        else {
+                                        //            layer.msg(result.Message);
+                                        //        }
+                                        //        layer.closeAll("loading");
+                                        //    }
+                                        //});
                                     }
                                     else {
                                         layer.msg(data.Message, { icon: 2 });
@@ -1495,11 +2010,12 @@
                 elem: '#mx-table'
                 // , url: GetWEBURL() + '/MoveStockBill/GetHBarCodeShowBillSub'
                 //, toolbar: '#toolbarDemo'
-                // , where: { sMsg: linterid, sMsg2: lentryid }
+                // , where: { sMsg: HInterID_Temp, sMsg2: lentryid }
                 , cols: [[
                     , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
                 ]]
                 , page: true
+                , limit: 100
                 , height: 500
                 , done: function () {
                 }
@@ -1548,77 +2064,6 @@
         });
 
 
-        var listOption = {
-            elem: '#wl-table'
-            , toolbar: '#toolbarDemo'
-            , cellMinWidth: 90
-            , limit: 3000
-            , totalRow: true
-            , cols: [[
-                { type: 'radio' }
-            , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
-            , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true}
-            , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-            , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-            , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-            , { field: 'HAuxPropName', title: '杈呭姪灞炴��', width: 150 }
-            , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-            //, { field: 'HBatchNo', title: '鎵规', width: 150, hide: true }
-                , { field: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150, totalRow: true }
-            , { field: 'HMaterID', title: 'HMaterID', width: 150, hide: true }
-            , { field: 'HAuxPropID', title: 'HAuxPropID', width: 150, hide: true }
-            , { field: 'HSourceInterID', title: 'HSourceInterID', width: 150, hide: true }
-            , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 150, hide: true }
-            , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
-            ]]
-            , height: 500
-            , done: function () {
-                layer.closeAll("loading");
-            }
-        }
-        var FIFOlistOption = {
-            elem: '#FIFOlist-table'
-            , toolbar: '#toolbarDemo'
-            , cellMinWidth: 90
-            , limit: 3000
-            , totalRow: true
-            , cols: [[
-                { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
-                , { field: 'HQtyMust', title: '涓嬫灦鏁伴噺', width: 150, totalRow: true }
-                , { field: 'HWhName', title: '浠撳簱', width: 150 }
-                , { field: 'HSPName', title: '浠撲綅', width: 150 }
-                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                , { field: 'HAuxPropName', title: '杈呭姪灞炴��', width: 150 }
-            ]]
-            , height: 500
-            , done: function () {
-                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, totalRow: true }
-                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
-            ]]
-            , height: 500
-            , done: function () {
-                layer.closeAll("loading");
-            }
-        }
 
         //浠ヤ笂涓簂ayui妯″潡
         
@@ -1735,27 +2180,27 @@
                 layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return false;
             }
-            if (bnt == 'Saver') {
-                if (!typeof (sSubStr) == "undefined") {
-                    for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
-                        if (parseFloat(sSubStr[i].HQtyMust) > 0) {
-                            if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
-                                layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                                return false;
-                            }
-                        }
-                    }
-                    //for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
-                    //    if (parseFloat(sSubStr[i].HQty) == 0) {
-                    //        layer.msg("澶栬喘鍏ュ簱璁板綍鏈壂鐮侊紒", { icon: 5 });
-                    //        return false;
-                    //    }
-                    //}
-                }
-            }
-            else {
-                return true;
-            }
+            //if (bnt == 'Saver') {
+            //    if (!typeof (sSubStr) == "undefined") {
+            //        for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
+            //            if (parseFloat(sSubStr[i].HQtyMust) > 0) {
+            //                if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
+            //                    layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+            //                    return false;
+            //                }
+            //            }
+            //        }
+            //        //for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
+            //        //    if (parseFloat(sSubStr[i].HQty) == 0) {
+            //        //        layer.msg("澶栬喘鍏ュ簱璁板綍鏈壂鐮侊紒", { icon: 5 });
+            //        //        return false;
+            //        //    }
+            //        //}
+            //    }
+            //}
+            //else {
+            //    return true;
+            //}
         }
         
     </script>

--
Gitblit v1.9.1