From 2d2d672e5bdc7e6ea4e7658030229cb3b67ec89a Mon Sep 17 00:00:00 2001
From: 杨乐 <yang.le.192@qq.com>
Date: 星期一, 14 二月 2022 17:18:06 +0800
Subject: [PATCH] 无数据的情况下去掉提示,直接显示无数据的列表,且带出操作工具栏

---
 WebTM/views/验收入库/产品入库/Kf_ProductInBill_Fast.html |  765 ++++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 529 insertions(+), 236 deletions(-)

diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
index 4e3c566..c7a365b 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
@@ -21,7 +21,7 @@
                     <div class="layui-form-item" style="padding:15px;margin:0px">
                         <div class="layui-row">
                             <div class="layui-col-xs3">
-                                <label class="layui-form-label" style="width:40px;padding-left:0px;">鏉$爜</label>
+                                <label class="layui-form-label" style="width:60px;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">
@@ -44,11 +44,14 @@
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">鍗曟嵁绫诲瀷</label>
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <input type="text" value="鐢熶骇姹囨姤鍗�" name="HBillTypeCHN" id="HBillTypeCHN" lay-verify="HBillTypeCHN" autocomplete="off" class="layui-input" readonly>
-                                            <input type="hidden" value="3711" name="HBillType" id="HBillType" lay-verify="HBillType" autocomplete="off" class="layui-input">
+                                            <input type="text" value="鐢熶骇璁㈠崟" name="HBillTypeCHN" id="HBillTypeCHN" lay-verify="HBillTypeCHN" autocomplete="off" class="layui-input" readonly>
+                                            <input type="hidden" value="3710" name="HBillType" id="HBillType" lay-verify="HBillType" autocomplete="off" class="layui-input">
+                                            <!--<input type="text" value="鐢熶骇姹囨姤鍗�" name="HBillTypeCHN" id="HBillTypeCHN" lay-verify="HBillTypeCHN" autocomplete="off" class="layui-input" readonly>
+                            <input type=-->
+                                            <!--"hidden" value="3711" name="HBillType" id="HBillType" lay-verify="HBillType" autocomplete="off" class="layui-input">-->
                                             <!--<select name="HBillType" id="HBillType">
-                                                <option value="3711">鐢熶骇姹囨姤鍗�</option>
-                                            </select>-->
+                                <option value="3711">鐢熶骇姹囨姤鍗�</option>
+                            </select>-->
                                         </div>
                                     </div>
                                 </div>
@@ -70,7 +73,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">
+                                            <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input" readonly>
                                             <input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -84,11 +87,11 @@
                                             <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">
-                                            <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" lay-verify="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HStockPlaceName" id="HStockPlaceName" autocomplete="off" class="layui-input">
+                                            <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
-                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HSpID-BT">...</button>
+                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HSpID-BT" style="display:none">...</button>
                                         </div>
                                     </div>
                                 </div>
@@ -210,8 +213,18 @@
                     <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px">
                         <button type="button" lay-submit="" class="layui-btn" lay-filter="Saver">鎻愪氦</button>
                         <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">缂栬緫</button>
-                        <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">鍒犻櫎</button>
+                        <!-- <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">鍒犻櫎</button>-->
                         <button type="button" lay-submit="" class="layui-btn" lay-filter="Cancel">閫�鍑�</button>
+                    </div>
+                    <div id="" style="display:none;">
+                        <audio id="cs" hidden controls>
+                            <source src="../../video/jingbao.wav" type="audio/ogg">
+                        </audio>
+                    </div>
+                    <div id="" style="display:none;">
+                        <audio id="cs2" hidden controls>
+                            <source src="../../video/success.wav" type="audio/ogg">
+                        </audio>
                     </div>
                 </form>
             </div>
@@ -233,6 +246,11 @@
             , table = layui.table
             , form = layui.form
             , element = layui.element;
+
+
+            var option = [];
+
+
             //娓呯┖鐣岄潰  new
 
             //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
@@ -253,9 +271,49 @@
             $("#HMakerID").hide();
             $("#HBillerID").val(sessionStorage["HBillerID"]);
             $("#HBillerID").hide();
+            var HSourceFlag = sessionStorage["SourceFlag"];
             //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
 
             $("#HBarCode").focus();
+
+
+
+            //鍒濆鍖栨槑缁嗚〃鏍�
+            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: '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: false
+                    , cellMinWidth: 120
+                    , height: 500
+                    , cols: [columns]
+                    , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+                    , done: function (res, curr, count) {
+                    }
+                };
+            }
 
             //鑾峰彇鍙傛暟
             function getUrlVars() {
@@ -268,6 +326,14 @@
                 }
                 return vars;
             }
+
+            //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+            if (sessionStorage.login != "login") {
+                layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+                    icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+                }, function () { window.location.href = "../../user/login.html"; });
+            }
+
             var params = getUrlVars();
             var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
             var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
@@ -282,14 +348,13 @@
                         // console.log(d.data);
                         $("#HInterID").val(d.data[0].HInterID);
                         $("#HBillNo").val(d.data[0].HBillNo);
-                        //$("#HBillType").val(d.data[0].HSourceBillType);
+                        $("#HBillType").val(d.data[0].HSourceBillType);
                         $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                         //$("#HWHID").val(d.data[0].HWhID);
+                        //$("#HStockPlaceID").val(d.data[0].HSPID);
                         //$("#HKeeperID").val(d.data[0].HKeeperID);
                         //$("#HSecManagerID").val(d.data[0].HSecManagerID);
-                        //$("#HDeptID").val(d.data[0].HDeptID);
-                        //$("#HBarCode").val(d.data[0].HBarCode);
-                        //$("#HQty").val(d.data[0].HQty);
+                        HSourceFlag = true;
                     }
                 })
             }
@@ -297,29 +362,35 @@
 
             function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
             {
+                $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
+                //缂栬緫鍔犺浇鏁版嵁
+                var sInterID = $("#HInterID").val();
                 table.render({
                     elem: '#wl-table'
-                    , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
-                    , cellMinWidth: 80
+                    //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+                    , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
                     , toolbar: '#toolbarDemo'
-                    , where: { HBillID: linterid, HBillType: '1202', sWhere: '' }
+                    , defaultToolbar: []
+                    , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
                     , cols: [[
-                            { type: 'radio' }
-                            , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                            , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                            , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                            , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
-                            , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
-                            , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
-                            , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
-                            , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                            , { field: 'HBatchNo', title: '鎵规', width: 100 }
-                            , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
-                            , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
-                            , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
+                          { type: 'radio' }
+                        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
                     ]]
+                    // , data: [linterid]
+                    // , page: true
                     , height: 500
-                })
+                    , done: function () {
+                        layer.closeAll("loading");
+                    }
+                });
             }
              
             //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
@@ -343,6 +414,7 @@
                         //console.log(d.data);
                         $("#HInterID").val(d.data[0].HInterID);
                         $("#HBillNo").val(d.data[0].HBillNo);
+                        set_InitGrid();
                     }
                 });
             } 
@@ -369,6 +441,8 @@
         //}
         //
         //
+
+        //閫夋嫨浠撳簱
         form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
             layer.open({
                 type: 2
@@ -384,6 +458,8 @@
                 }
             })
         });
+
+        //閫夋嫨浠撲綅
         form.on('submit(HSpID-BT)', function () {//閫夋嫨浠撲綅
             layer.open({
                 type: 2
@@ -399,37 +475,89 @@
                 }
             })
         });
-        form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '淇濈鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
-            var sMainStr = JSON.stringify(data.field);
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '楠屾敹鍒楄〃'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
-                , resize: false
-                , cancel: function () {
-                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
+
+        //閫夋嫨淇濈
+        //form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
+        //    layer.open({
+        //        type: 2
+        //        , area: ['100%', '100%']
+        //        , title: '淇濈鍒楄〃'
+        //        , shade: 0.6 //閬僵閫忔槑搴�
+        //        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+        //        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+        //        , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
+        //        , resize: false
+        //        , cancel: function () {
+        //            //$(".layui-btn").removeClass("layui-btn-disabled");
+        //        }
+        //    })
+        //});
+            form.on('submit(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) {//閫夋嫨楠屾敹
+        //    var sMainStr = JSON.stringify(data.field);
+        //    layer.open({
+        //        type: 2
+        //        , area: ['100%', '100%']
+        //        , title: '楠屾敹鍒楄〃'
+        //        , shade: 0.6 //閬僵閫忔槑搴�
+        //        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+        //        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+        //        , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
+        //        , resize: false
+        //        , cancel: function () {
+        //            //$(".layui-btn").removeClass("layui-btn-disabled");
+        //        }
+        //    })
+        //});
+
+            form.on('submit(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
@@ -445,6 +573,8 @@
                 }
             })
         });
+
+        //缂栬緫
         form.on('submit(cmdModify)', function () {//缂栬緫
             var sSubStr = table.cache['wl-table'];
             //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
@@ -465,7 +595,7 @@
         });
 
         form.on('submit(Cancel)', function () {
-            sessionStorage["SourceFlag"] = false;
+            //sessionStorage["SourceFlag"] = false;
             parent.location.href = "../../../views/index.html"
             //window.close();//鍏抽棴褰撳墠椤�
         })
@@ -482,39 +612,68 @@
             var sMTONo = ''
             var sSourceInterID = data[0].HSourceInterID
             var sSourceEntryID = data[0].HSourceEntryID
+            var HBillNo = $("#HBillNo").val()
+            var sMouldManagerCtl = 'N'
+            var sFIFOCtl = 'N'
             $.ajax(
                {
                    type: "Get",
                    //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/Delete_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                   url: GetWEBURL() + "/ProductIn/Delete_Json",
+                    url: GetWEBURL() + "/ProductIn/Delete_Json_AN",
                    async: true,
                    data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+                         //  table.render({
+                         //      elem: '#wl-table'
+                         //      //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Mate_Webs_Json'
+                         //      , url: GetWEBURL() + '/ProductIn/DisPlayBarCodeList_Json'
+                         //, cellMinWidth: 80
+                         //, toolbar: '#toolbarDemo'
+                         //      , where: { HBillID: sInterID, HBillNo: HBillNo, HBillType: '1202', sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl}
+                         //, cols: [[
+                         //       { type: 'radio' }
+                         //       , { field: 'HQty', title: '鏁伴噺', width: 80 }
+                         //       , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+                         //       , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                         //       , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                         //       , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                         //       , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
+                         //       , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
+                         //       , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+                         //       , { field: 'HBatchNo', title: '鎵规', width: 100 }
+                         //       , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
+                         //       , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+                         //       , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
+                         //]]
+                         //, height: 500
+                         //  })
                            table.render({
                                elem: '#wl-table'
-                               //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Mate_Webs_Json'
-                         , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
-                         , cellMinWidth: 80
-                         , toolbar: '#toolbarDemo'
-                         , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
-                         , cols: [[
-                                { type: 'radio' }
-                                , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                                , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
-                                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
-                                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 100 }
-                                , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
-                                , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
-                                , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
-                         ]]
-                         , height: 500
+                               //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+                               , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+                               , toolbar: '#toolbarDemo'
+                               , defaultToolbar: []
+                               , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
+                               , cols: [[
+                                   { type: 'radio' }
+                                   , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                   , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                                   , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                   , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                   , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                   , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                   , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                   , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                   , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                               ]]
+                               // , data: [linterid]
+                               // , page: true
+                               , height: 500
+                               , done: function () {
+                                   layer.closeAll("loading");
+                               }
                            })
                        }
                        else {
@@ -530,6 +689,18 @@
         //鎻愪氦
         form.on('submit(Saver)', function (data) {//鎻愪氦
             //debugger;
+            if ($("#HExplanation").val() == "") {
+                if ($("#HWHNAME").val() == "瀹藉箙鎴愬搧浠揘EW" || $("#HWHNAME").val() == "鏍锋湰浠揘EW") {
+                    $("#HWHNAME").val("");
+                    $("#HWHID").val("");
+                    layer.msg("璇锋壂MES搴撲綅鐮侊紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return;
+                }
+                else
+                {
+                    $("#HExplanation").val($("#HWHNAME").val());
+                }
+            }
             var sMainStr = JSON.stringify(data.field);
             var sSubStr = table.cache['wl-table'];
             //var sSourceType = $("#HBillType").val();
@@ -581,161 +752,239 @@
         });
 
         //鎵潯鐮�
-        $('#HBarCode').on('keydown', function (event) {  //鎵潯鐮�
-            var sSubStr = table.cache['wl-table'];
-            var sBarCode = $('#HBarCode').val()
-            var sInterID = $("#HInterID").val()
-            var sBillNo = $("#HBillNo").val()
-            var sQty = $("#HQty").val()
-            var sHBillType = $("#HBillType").val()  //婧愬崟绫诲瀷
-            var sBillType = '1202'
-            var sHWHID = $("#HWHID").val()
-            var sHSPID = $("#HStockPlaceID").val()
-            var sSourceBillNo = $("#HSourceBillNo").val()
-            //var Flag = sessionStorage["SourceFlag"];
-            if (sQty == "") {
-                sQty = 0;
-            }
-            if (event.keyCode == 13) {
-                //鍒ゆ柇鏉$爜鏄惁涓虹┖  new
-                if (sBarCode == '') {
-                    layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                    return false;
-                }
-                if (sBarCode != "") {
-                    $('#HBarCode').val("");
-                }
-                if (sQty != "") {
-                    $('#HQty').val("");
-                }
-                if (sHWHID == "184154")
+            $('#HBarCode').on('keydown', function (event) {  //鎵潯鐮�
+                var sOldBarCode = $('#HBarCode').val()
+                var HDeleteFlag = sOldBarCode.substring(0, 1);
+                var sBarCode = sOldBarCode.slice(1);
+                var sSubStr = table.cache['wl-table'];
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var sQty = $("#HQty").val()
+                var sHBillType = $("#HBillType").val()  //婧愬崟绫诲瀷
+                var sBillType = '1202'
+                var sHWHID = $("#HWHID").val()
+                var sHSPID = $("#HStockPlaceID").val()
+                var sSourceBillNo = $("#HSourceBillNo").val()
+                if (event.keyCode == 13) {
+                if (HDeleteFlag == "*")
                 {
-                    if (sHSPID == "0")
-                    {
-                        layer.msg("浠撲綅涓虹┖锛岃閫夋嫨浠撲綅锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                        return false;
+                    if (sBarCode != "") {
+                        $('#HBarCode').val("");
                     }
-                }
-                //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
-                $.ajax({
-                    //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/get_CheckTypeByBarCode_Json",
-                    url: GetWEBURL() + "/ProductIn/get_CheckTypeByBarCode_Json",
-                    type: "GET",
-                    data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
-                    success: function (result) {
-                        debugger;
-                        if (result.count == 1) {
-                            if (result.data.HBarType == '浠撳簱鏉$爜') {
-                                $("#HWHNAME").val(result.data.HWhName);
-                                $("#HWHID").val(result.data.HWhID);
-                                $("#HStockPlaceName").val("");
-                                $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
-                                element.tabChange('tab-ProductlnBill', '2');  //璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '浠撲綅鏉$爜') {
-                                $("#HStockPlaceName").val(result.data.HSPName);
-                                $("#HStockPlaceID").val(result.data.HSPID);
-                                $("#HWHNAME").val(result.data.HWhName);
-                                $("#HWHID").val(result.data.HWhID);
-                                $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
-                                element.tabChange('tab-ProductlnBill', '2');//璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
-                                $("#HDeptName").val(result.data.HDeptName);
-                                $("#HDeptID").val(result.data.HDeptID);
-                                $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
-                                element.tabChange('tab-ProductlnBill', '2');//璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '婧愬崟鏉$爜') {
-                                $("#HSupName").val(result.data.HSupName);
-                                $("#HSupID").val(result.data.HSupID);
-                                $("#HDeptName").val(result.data.HDeptName);
-                                $("#HDeptID").val(result.data.HDeptID);
-                                $("#HSourceBillNo").val(result.data.HSourceBillNo);
-                                sessionStorage["SourceFlag"] = true;
-                                //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
-                                //if (result.data.HSourceBillType == "3711") {
-                                //    $("#HBillType").val("3711");
-                                //}
-                                //else {
-                                //    $("#HBillType").val("-1");
-                                //}
-                                $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
-                                element.tabChange('tab-ProductlnBill', '3');
-                            }
-                            else {
-                                if (sessionStorage["SourceFlag"] == "true") {
-                                    element.tabChange('tab-ProductlnBill', '3');
+                    var sBarCode = sOldBarCode.slice(1);
+                    $.ajax(
+                        {
+                            type: "Get",
+                            url: GetWEBURL() + "/ProductIn/Delete_Json",
+                            async: true,
+                            data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": sBillType, "HBarCode": sBarCode},
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+                                    table.render({
+                                        elem: '#wl-table'
+                                        //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+                                        , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+                                        , toolbar: '#toolbarDemo'
+                                        , defaultToolbar: []
+                                        , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
+                                        , cols: [[
+                                            { type: 'radio' }
+                                            , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                            , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                                            , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                            , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                            , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                            , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                            , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                            , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                            , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                        ]]
+                                        // , data: [linterid]
+                                        // , page: true
+                                        , height: 500
+                                        , done: function () {
+                                            layer.closeAll("loading");
+                                        }
+                                    })
                                 }
                                 else {
-                                    $("#HSupName").val(result.data.HSupName);
-                                    $("#HSupID").val(result.data.HSupID);
-                                    //$("#HDeptName").val(result.data.HDept);
-                                    //$("#HDeptID").val(result.data.HDeptID);
-                                    $("#HSourceBillNo").val(result.data.HSourceBillNo);
-                                    sessionStorage["SourceFlag"] = true;
-                                    //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
-                                    //if (result.data.HSourceBillType == "3711") {
-                                    //    $("#HBillType").val("3711");
-
-                                    //}
-
-                                    //else {
-                                    //    $("#HBillType").val("-1");
-                                    //}
-                                    $("#HNote").val(";鐗╂枡鏉$爜");
-                                    element.tabChange('tab-ProductlnBill', '3');
+                                    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: "娓╅Θ鎻愮ず" });
                             }
-                            //$("#HSupID").val(result.data.HSupID);
-                            //$("#HSupName").val(result.data.HSupName);
-                            //$("#HDeptID").val(result.data.HDeptID);
-                            //$("#HDeptName").val(result.data.HDeptName);
-                            layer.load(3)
-                            table.render({
-                                elem: '#wl-table'
-                                //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
-                          , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
-                          , toolbar: '#toolbarDemo'
-                          , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
-                          , cols: [[
-                               { type: 'radio' }
-                            , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                            , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
-                            , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                            , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                            , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                            , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
-                            , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
-                            , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                            , { field: 'HBatchNo', title: '鎵规', width: 150 }
-                          ]]
-                                // , data: [linterid]
-                                // , page: true
-                          , height: 500
-                          , done: function () {
-                              layer.closeAll("loading");
-                          }
-                            });
-                        }
-                        else {
-                            layer.msg(result.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: "娓╅Θ鎻愮ず" });
-                        console.log(err);
+                        });
+                }
+                else {
+                    var sBarCode = $('#HBarCode').val()
+                    //var Flag = sessionStorage["SourceFlag"];
+                    if (sQty == "") {
+                        sQty = 0;
                     }
-                });
+                    //鍒ゆ柇鏉$爜鏄惁涓虹┖  new
+                    if (sBarCode == '') {
+                            playSound();
+                            layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            return false;
+                        }
+                        if (sBarCode != "") {
+                            $('#HBarCode').val("");
+                        }
+                        if (sQty != "") {
+                            $('#HQty').val("");
+                        }
+                        if (sHWHID == "184154") {
+                            if (sHSPID == "0") {
+                                layer.msg("浠撲綅涓虹┖锛岃閫夋嫨浠撲綅锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                return false;
+                            }
+                        }
+                        //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
+                        $.ajax({
+                            //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/get_CheckTypeByBarCode_Json",
+                            url: GetWEBURL() + "/ProductIn/get_CheckTypeByBarCode_Json",
+                            type: "GET",
+                            data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] },
+                            success: function (result) {
+                                //debugger;
+                                playSound1();
+                                if (result.count == 1) {
+                                    if (result.data.HBarType == '浠撳簱鏉$爜') {
+                                        $("#HWHNAME").val(result.data.HWhName);
+                                        $("#HWHID").val(result.data.HWhID);
+                                        $("#HStockPlaceName").val("");
+                                        $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+                                        element.tabChange('tab-ProductlnBill', '2');  //璺宠浆椤电
+                                    }
+                                    else if (result.data.HBarType == '浠撲綅鏉$爜') {
+                                        $("#HStockPlaceName").val(result.data.HSPName);
+                                        $("#HStockPlaceID").val(result.data.HSPID);
+                                        $("#HWHNAME").val(result.data.HWhName);
+                                        $("#HWHID").val(result.data.HWhID);
+                                        $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+                                        element.tabChange('tab-ProductlnBill', '2');//璺宠浆椤电
+                                    }
+                                    else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
+                                        $("#HDeptName").val(result.data.HDeptName);
+                                        $("#HDeptID").val(result.data.HDeptID);
+                                        $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+                                        element.tabChange('tab-ProductlnBill', '2');//璺宠浆椤电
+                                    }
+                                    else if (result.data.HBarType == '婧愬崟鏉$爜') {
+                                        $("#HSupName").val(result.data.HSupName);
+                                        $("#HSupID").val(result.data.HSupID);
+                                        $("#HDeptName").val(result.data.HDeptName);
+                                        $("#HDeptID").val(result.data.HDeptID);
+                                        $("#HSourceBillNo").val(result.data.HSourceBillNo);
+                                        HSourceFlag = true;
+                                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                        //if (result.data.HSourceBillType == "3711") {
+                                        //    $("#HBillType").val("3711");
+                                        //}
+                                        //else {
+                                        //    $("#HBillType").val("-1");
+                                        //}
+                                        $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
+                                        element.tabChange('tab-ProductlnBill', '3');
+                                    }
+                                    else {
+                                        if (HSourceFlag == "true") {
+                                            element.tabChange('tab-ProductlnBill', '3');
+                                        }
+                                        else {
+                                            $("#HSupName").val(result.data.HSupName);
+                                            $("#HSupID").val(result.data.HSupID);
+                                            //$("#HDeptName").val(result.data.HDept);
+                                            //$("#HDeptID").val(result.data.HDeptID);
+                                            $("#HSourceBillNo").val(result.data.HSourceBillNo);
+                                            HSourceFlag = true;
+                                            //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                            //if (result.data.HSourceBillType == "3711") {
+                                            //    $("#HBillType").val("3711");
+
+                                            //}
+
+                                            //else {
+                                            //    $("#HBillType").val("-1");
+                                            //}
+                                            $("#HNote").val(";鐗╂枡鏉$爜");
+                                            element.tabChange('tab-ProductlnBill', '3');
+                                        }
+                                    }
+                                    //$("#HSupID").val(result.data.HSupID);
+                                    //$("#HSupName").val(result.data.HSupName);
+                                    //$("#HDeptID").val(result.data.HDeptID);
+                                    //$("#HDeptName").val(result.data.HDeptName);
+                                    layer.load(3)
+                                    table.render({
+                                        elem: '#wl-table'
+                                        //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+                                        , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+                                        , toolbar: '#toolbarDemo'
+                                        , defaultToolbar: []
+                                        , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
+                                        , cols: [[
+                                            { type: 'radio' }
+                                            , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                            , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                                            , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                                            , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                            , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                                            , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                                            , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                                            , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                                            , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                        ]]
+                                        // , data: [linterid]
+                                        // , page: true
+                                        , height: 500
+                                        , done: function () {
+                                            layer.closeAll("loading");
+                                        }
+                                    });
+                                }
+                                else {
+                                    playSound();
+                                    layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                }
+                                layer.closeAll("loading");
+                            },
+                            error: function (err) {
+                                playSound();
+                                layer.msg("鎺ュ彛璇锋眰寮傚父:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                console.log(err);
+                            }
+                        });
+                    }
+                }
+            });
+
+
+            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();
             }
-            //else
-            //{
-            //    layer.msg(result.Message, { icon: 5 });
-            //}
-            //layer.closeAll("loading");
-            //}
-        });
+
+            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();
+            }
+
+        //鎵簮鍗�
         $('#HSourceBillNo').on('keydown', function (event) {   //鎵簮鍗�
             var HSourceBillNo = $('#HSourceBillNo').val()
             var sInterID = $("#HInterID").val()
@@ -755,14 +1004,15 @@
                     data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                     success: function (result) {
                         if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            sessionStorage["SourceFlag"] = true;
+                            HSourceFlag = true;
                             layer.load(3)
                             element.tabChange('tab-ProductlnBill', '2');
                             table.render({
                                 elem: '#wl-table'
                                 //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
-                              , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
-                              , toolbar: '#toolbarDemo'
+                              , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+                                , toolbar: '#toolbarDemo'
+                                , defaultToolbar: []
                               , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
                               , cols: [[
                                   { type: 'radio' }
@@ -793,12 +1043,13 @@
             }
         });
 
+        //鎵粨浣�
         $('#HStockPlaceName').on('keydown', function (event) {      //鎵粨浣�
             var HBarCode = $('#HStockPlaceName').val()
             if (event.keyCode == 13) {
                 //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
                 $.ajax({
-                    url: GetWEBURL() + "/Web/GetSpName_Json",
+                    url: GetWEBURL() + "/LookingFor/getSpName_Json",
                     type: "GET",
                     data: { "HBarCode": HBarCode },
                     success: function (result) {
@@ -819,6 +1070,48 @@
                 });
             }
         });
+
+        //鎵玀ES浠撲綅
+        $('#HMESSPName').on('keydown', function (event) {      //鎵粨浣�
+            var HBarCode = $('#HMESSPName').val();
+            if (event.keyCode == 13) {
+                //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                $.ajax({
+                    url: GetWEBURL() + "/LookingFor/getSpName_Json",
+                    type: "GET",
+                    data: { "HBarCode": HBarCode },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            $("#HMESSPID").val(result.data[0].HWHID);
+                            $("#HMESSPName").val(result.data[0].HWhName + "-" + result.data[0].HName);
+                            $("#HExplanation").val(result.data[0].HName + "-" + result.data[0].HWhName);
+                            $.ajax({
+                                url: GetWEBURL() + "/LookingFor/GetSpNameMES_Json",
+                                type: "GET",
+                                data: { "HERPWHID": result.data[0].HWHID },
+                                success: function (result) {
+                                    if (result.count == 1) {
+                                        $("#HWHID").val(result.data[0].HMESWHID);
+                                        $("#HWHNAME").val(result.data[0].HMESWHNAME);
+                                        $("#HMESSPName").attr("readonly", "readonly");//MES浠撲綅鍙HExplanation
+                                        $("#HMESSPName").css("background-color", "#efefef4d");
+                                    }
+                                    else {
+                                        layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                    }
+                                    layer.closeAll("loading");
+                                }
+                            });
+                        }
+                        else {
+                            layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        }
+                        layer.closeAll("loading");
+                    }
+                });
+            }
+        });
+
         //鍒锋柊鏄庣粏椤电
         table.render({
             elem: '#mx-table'

--
Gitblit v1.9.1