zzr99
2022-02-16 9bb36642205ada0adfbc79ec030cafe0f6bcd923
nothing
1个文件已修改
470 ■■■■ 已修改文件
WebTM/views/验收入库/外购入库/Kf_POStockInBill_Fast.html 470 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Kf_POStockInBill_Fast.html
@@ -406,8 +406,7 @@
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            //加载表头
            function RoadBillMain(linterid)
            {
            function RoadBillMain(linterid) {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetPonderationBill",
                    type: "GET",
@@ -430,8 +429,7 @@
                })
            }
            //根据源单类型及源单号 åŠ è½½ä¾›åº”å•†
            function RoadSup()
            {
            function RoadSup() {
                //var sInterID = $("#HInterID").val()
                var HSourceBillNo = $('#HSourceBillNo').val()
                var sInterID = $("#HInterID").val()
@@ -466,8 +464,7 @@
                }
            }
            //加载表体
            function RoadBillSub(linterid)
            {
            function RoadBillSub(linterid) {
                table.render({
                    elem: '#wl-table'
                    , url: GetWEBURL() + '/POStockInBill/DisBillEntryList_Webs_Json'
@@ -810,69 +807,6 @@
                var sHSPID = $("#HStockPlaceID").val()
                var sSourceBillNo = $("#HSourceBillNo").val()
           // var Flag = sessionStorage["SourceFlag"];
            if (sQty == "") {
                sQty = 0;
            }
            if (event.keyCode == 13) {
                //判断条码是否为空  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") {
                        playSound();
                        layer.msg("仓位为空,请选择仓位!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return false;
                    }
                }
                  //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//非空验证
                                $.ajax({
                                    url: GetWEBURL() + "/POStockInBill/get_CheckTypeByBarCode_Json",
                                    type: "GET",
                                    data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": true, "sSourceBillNo": sSourceBillNo, "sSourceType": '1103', "HOWNERID": sessionStorage["OrganizationID"] },
                                    success: function (result) {
                                        if (result.count == 1) {
                                            playSound1();
                                            if (result.data.HBarType == '仓库条码') {
                                                $("#HWHNAME").val(result.data.HWhName);
                                                $("#HWHID").val(result.data.HWhID);
                                                $("#HStockPlaceName").val("");
                                                $("#HNote").val(";一键扫码仓库条码");
                                                element.tabChange('tab-POStockInBill', '2');  //跳转页签
                                            }
                                            else if (result.data.HBarType == '仓位条码') {
                                                $("#HStockPlaceName").val(result.data.HSPName);
                                                $("#HStockPlaceID").val(result.data.HSPID);
                                                $("#HWHNAME").val(result.data.HWhName);
                                                $("#HWHID").val(result.data.HWhID);
                                                $("#HNote").val(";一键扫码仓位条码");
                                                element.tabChange('tab-POStockInBill', '2');//跳转页签
                                            }
                                            else if (result.data.HBarType == '部门条码') {
                                                $("#HDeptName").val(result.data.HDeptName);
                                                $("#HDeptID").val(result.data.HDeptID);
                                                $("#HNote").val(";一键扫码部门条码");
                                                element.tabChange('tab-POStockInBill', '2');//跳转页签
                                            }
                                            else if (result.data.HBarType == '源单条码') {
                                                $("#HSupName").val(result.data.HSupName);
                                                $("#HSupID").val(result.data.HSupID);
                                                $("#HDeptName").val(result.data.HDeptName);
                                                $("#HDeptID").val(result.data.HDeptID);
                                                $("#HSourceBillNo").val(result.data.HSourceBillNo);
                                                sessionStorage["SourceFlag"] = true;
                                                //获取源单类型、源单单号
                                                if (result.data.HSourceBillType == "1102") {
                                                    $("#HBillType").val("1102");
                // var Flag = sessionStorage["SourceFlag"];
                if (sQty == "") {
                    sQty = 0;
@@ -880,6 +814,7 @@
                if (event.keyCode == 13) {
                    //判断条码是否为空  new
                    if (sBarCode == '') {
                        playSound();
                        layer.msg("条码为空,不能扫描!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return false;
                    }
@@ -891,17 +826,18 @@
                    }
                    if (sHWHID == "184154") {
                        if (sHSPID == "0") {
                            playSound();
                            layer.msg("仓位为空,请选择仓位!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            return false;
                        }
                    }
                    //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//非空验证
                    $.ajax({
                        url: GetWEBURL() + "/POStockInBill/get_CheckTypeByBarCode_Json",
                        type: "GET",
                        data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": true, "sSourceBillNo": sSourceBillNo, "sSourceType": '1103', "HOWNERID": sessionStorage["OrganizationID"] },
                        success: function (result) {
                            if (result.count == 1) {
                                playSound1();
                                if (result.data.HBarType == '仓库条码') {
                                    $("#HWHNAME").val(result.data.HWhName);
                                    $("#HWHID").val(result.data.HWhID);
@@ -958,85 +894,17 @@
                                        //获取源单类型、源单单号
                                        if (result.data.hSourceBillTypeField == "1102") {
                                            $("#HBillType").val("1102");
                                                    }
                                                    else if (result.data.hSourceBillTypeField == "1103") {
                                                        $("#HBillType").val("1103");
                                                    }
                                                    else {
                                                        $("#HBillType").val("手工录入");
                                                    }
                                                    $("#HNote").val(";物料条码");
                                                    element.tabChange('tab-POStockInBill', '3');
                                                }
                                            }
                                            //$("#HSupID").val(result.data.HSupID);
                                            //$("#HSupName").val(result.data.HSupName);
                                            //$("#HDeptID").val(result.data.HDeptID);
                                            //$("#HDeptName").val(result.data.HDeptName);
                                            layer.load(3)
                                            table.render({
                                                    elem: '#wl-table'
                                                  , url: GetWEBURL() + '/POStockInBill/DisBillEntryList_Webs_Json'
                                                  , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
                                                  , cellMinWidth : 115
                                                  , cols: [[
                                                      { type: 'radio' }
                                                      , { field: 'HQty', title: '数量', sort: true, width:100 }
                                                      , { field: 'HQtyMust', title: '应收数量', sort: true, width: 100 }
                                                      , { field: 'HMaterNumber', title: '物料代码', sort: true, width: 200}
                                                      , { field: 'HMaterName', title: '物料名称', sort: true, width: 200}
                                                      , { field: 'HMaterModel', title: '规格型号', sort: true, width: 200}
                                                      , { field: 'HSourceInterID', title: '源单主内码', sort: true, width: 200}
                                                      , { field: 'HSourceEntryID', title: '源单子内码', sort: true, width: 200}
                                                      , { field: 'HSourceBillNo', title: '源单单号', sort: true, width: 200}
                                                      , { field: 'HBatchNo', title: '批次', sort: true, width: 200}
                                                  ]]
                                                  , height: 500
                                                  , done: function () {
                                                      layer.closeAll("loading");
                                                  }
                                            });
                                        }
                                        else {
                                            // $("#verifycode").click();
                                            //layer.msg(result.Message, { icon: 5 });
                                            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);
                                    }
                                });
                            }
                            //else
                            //{
                            //    layer.msg(result.Message, { icon: 5 });
                            //}
                            //layer.closeAll("loading");
            //}
        });
                                        }
                                        else if (result.data.hSourceBillTypeField == "1103") {
                                            $("#HBillType").val("1103");
                                        }
                                        else {
                                            $("#HBillType").val("手工录入");
                                        }
                                        $("#HNote").val(";物料条码");
                                        element.tabChange('tab-POStockInBill', '3');
                                    }
                                }
                                layer.load(3)
                                layer.load(3)
                                $.ajax({
                                    url: GetWEBURL() + '/MateOutBill/DisBillEntryList_Webs_New_Json1',
                                    type: "GET",
                                    data: { HBillID: sInterID, HBillType: '1204', sWhere: '' },
                                    data: { HBillID: sInterID, HBillType: '1201', sWhere: '' },
                                    success: function (result) {
                                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                            listOption.data = result.data.list;
@@ -1059,6 +927,7 @@
                                });
                            }
                            else {
                                playSound();
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                            layer.closeAll("loading");
@@ -1066,28 +935,28 @@
                    });
                }
            });
            var listOption = {
                elem: '#wl-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HSNO', title: '序号', width: 60 }
                    , { field: 'HQty', title: '数量', width: 80 }
                    , { field: 'HQtyMust', title: '应发数量', width: 80 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
                    , { field: 'HSourceInterID', title: '源单主内码', width: 150 }
                    , { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    , { field: 'HBatchNo', title: '批次', width: 150 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
        var listOption = {
            elem: '#wl-table'
            , toolbar: '#toolbarDemo'
            , cellMinWidth: 90
            , cols: [[
                { type: 'radio' }
                , { field: 'HSNO', title: '序号', width: 60 }
                , { field: 'HQty', title: '数量', width: 80 }
                , { field: 'HQtyMust', title: '应发数量', width: 80 }
                , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                , { field: 'HMaterName', title: '物料名称', width: 150 }
                , { field: 'HMaterModel', title: '规格型号', width: 150 }
                , { field: 'HSourceInterID', title: '源单主内码', width: 150 }
                , { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                , { field: 'HBatchNo', title: '批次', width: 150 }
            ]]
            , height: 500
            , done: function () {
                layer.closeAll("loading");
            }
        }
        function playSound() {
            var audio = document.getElementById("cs");
@@ -1099,6 +968,7 @@
            audio.play();
        }
        //扫源单
        $('#HSourceBillNo').on('keydown', function (event) {      //扫源单
            var HSourceBillNo = $('#HSourceBillNo').val()
@@ -1108,7 +978,6 @@
            if (event.keyCode == 13) {
                //判断文本框是否有数据    new
                if (HSourceBillNo == "" || sInterID <= 0) {
                    playSound();
                    layer.msg("源单号为空,或者内码不存在!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
@@ -1120,7 +989,6 @@
                    data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            playSound1();
                            $("#HSupID").val(result.data[0].HSupID);
                            $("#HSupName").val(result.data[0].HSupName);
                            //$("#HDeptID").val(result.data[0].HDeptID);
@@ -1131,193 +999,127 @@
                            table.render({
                                elem: '#wl-table'
                                , cellMinWidth: 80
                              //, url: 'http://61.130.49.162:9090/WMSAPI///POStockInBill/DisBillEntryList_Webs_Json'
                               , url: GetWEBURL() + '/POStockInBill/DisBillEntryList_Webs_Json'
                              //, toolbar: '#toolbarDemo'
                              , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
                              , cols: [[
                                  { type: 'radio' }
                                  , { field: 'HQty', title: '数量', sort: true, width: 100}
                                  , { field: 'HQtyMust', title: '应收数量', sort: true, width: 100}
                                  , { field: 'HMaterNumber', title: '物料代码', sort: true, width: 200}
                                  , { field: 'HMaterName', title: '物料名称', sort: true, width: 200}
                                  , { field: 'HMaterModel', title: '规格型号', sort: true, width: 200}
                                  , { field: 'HSourceInterID', title: '源单主内码', sort: true, width: 200}
                                  , { field: 'HSourceEntryID', title: '源单子内码', sort: true, width: 200}
                                  , { field: 'HSourceBillNo', title: '源单单号', sort: true, width: 200}
                                , { field: 'HBatchNo', title: '批次'}
                              ]]
                                //, url: 'http://61.130.49.162:9090/WMSAPI///POStockInBill/DisBillEntryList_Webs_Json'
                                , url: GetWEBURL() + '/POStockInBill/DisBillEntryList_Webs_Json'
                                //, toolbar: '#toolbarDemo'
                                , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
                                , cols: [[
                                    { type: 'radio' }
                                    , { field: 'HQty', title: '数量', sort: true, width: 100 }
                                    , { field: 'HQtyMust', title: '应收数量', sort: true, width: 100 }
                                    , { field: 'HMaterNumber', title: '物料代码', sort: true, width: 200 }
                                    , { field: 'HMaterName', title: '物料名称', sort: true, width: 200 }
                                    , { field: 'HMaterModel', title: '规格型号', sort: true, width: 200 }
                                    , { field: 'HSourceInterID', title: '源单主内码', sort: true, width: 200 }
                                    , { field: 'HSourceEntryID', title: '源单子内码', sort: true, width: 200 }
                                    , { field: 'HSourceBillNo', title: '源单单号', sort: true, width: 200 }
                                    , { field: 'HBatchNo', title: '批次' }
                                ]]
                                // , data: [linterid]
                                // , page: true
                              , height: 500
                              , done: function () {
                                  layer.closeAll("loading");
                              }
                                , height: 500
                                , done: function () {
                                    layer.closeAll("loading");
                                }
                            });
                        }
                        else {
                            // $("#verifycode").click();
                            //layer.msg(result.Message, { icon: 5 });
                            playSound();
                            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 });
                // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
            }
        });
            //扫源单
            $('#HSourceBillNo').on('keydown', function (event) {      //扫源单
                var HSourceBillNo = $('#HSourceBillNo').val()
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
                var HSourceBillType = $("#HBillType").val()
                if (event.keyCode == 13) {
                    //判断文本框是否有数据    new
                    if (HSourceBillNo == "" || sInterID <= 0) {
                        layer.msg("源单号为空,或者内码不存在!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return;
        //扫仓位
        $('#HStockPlaceName').on('keydown', function (event) {
            var HBarCode = $('#HStockPlaceName').val()
            if (event.keyCode == 13) {
                //判断文本框是否有数据    new
                $.ajax({
                    url: GetWEBURL() + "/LookingFor/getSpName_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].HWHID);
                            $("#HWHNAME").val(result.data[0].HWhName);
                            element.tabChange('tab-POStockInBill', '2');
                        }
                        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");
                    }
                    //
                    $.ajax({
                        //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                        url: GetWEBURL() + "/POStockInBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                        type: "GET",
                        data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                        success: function (result) {
                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                $("#HSupID").val(result.data[0].HSupID);
                                $("#HSupName").val(result.data[0].HSupName);
                                //$("#HDeptID").val(result.data[0].HDeptID);
                                //$("#HDeptName").val(result.data[0].HDeptName);
                                sessionStorage["SourceFlag"] = true;
                                layer.load(3);
                                element.tabChange('tab-POStockInBill', '2');
                                table.render({
                                    elem: '#wl-table'
                                    , cellMinWidth: 80
                                    //, url: 'http://61.130.49.162:9090/WMSAPI///POStockInBill/DisBillEntryList_Webs_Json'
                                    , url: GetWEBURL() + '/POStockInBill/DisBillEntryList_Webs_Json'
                                    //, toolbar: '#toolbarDemo'
                                    , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
                                    , cols: [[
                                        { type: 'radio' }
                                        , { field: 'HQty', title: '数量', sort: true, width: 100 }
                                        , { field: 'HQtyMust', title: '应收数量', sort: true, width: 100 }
                                        , { field: 'HMaterNumber', title: '物料代码', sort: true, width: 200 }
                                        , { field: 'HMaterName', title: '物料名称', sort: true, width: 200 }
                                        , { field: 'HMaterModel', title: '规格型号', sort: true, width: 200 }
                                        , { field: 'HSourceInterID', title: '源单主内码', sort: true, width: 200 }
                                        , { field: 'HSourceEntryID', title: '源单子内码', sort: true, width: 200 }
                                        , { field: 'HSourceBillNo', title: '源单单号', sort: true, width: 200 }
                                        , { field: 'HBatchNo', title: '批次' }
                                    ]]
                                    // , data: [linterid]
                                    // , page: true
                                    , height: 500
                                    , done: function () {
                                        layer.closeAll("loading");
                                    }
                                });
                            }
                            else {
                                // $("#verifycode").click();
                                //layer.msg(result.Message, { icon: 5 });
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                            layer.closeAll("loading");
                        }
                    });
                    // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
                }
            });
            //扫仓位
            $('#HStockPlaceName').on('keydown', function (event) {
                var HBarCode = $('#HStockPlaceName').val()
                if (event.keyCode == 13) {
                    //判断文本框是否有数据    new
                    $.ajax({
                        url: GetWEBURL() + "/LookingFor/getSpName_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].HWHID);
                                $("#HWHNAME").val(result.data[0].HWhName);
                                element.tabChange('tab-POStockInBill', '2');
                            }
                            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 });
                }
            });
            //刷新明细页签
            table.render({
                elem: '#mx-table'
                // , url: 'http://localhost:8083/POStockInBill/GetHBarCodeShowBillSub'
                //, toolbar: '#toolbarDemo'
                // , where: { sMsg: linterid, sMsg2: lentryid }
                , cols: [[
                    , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
                ]]
                , page: true
                , height: 500
                , done: function () {
                }
            });
            //扫MES仓位
            $('#HMESSPName').on('keydown', function (event) {      //扫仓位
                var HBarCode = $('#HMESSPName').val();
                if (event.keyCode == 13) {
                    $.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");
                        }
                    });
                }
            });
            //以上为layui模块
                });
                // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
            }
        });
        //刷新明细页签
        table.render({
            elem: '#mx-table'
            // , url: 'http://localhost:8083/POStockInBill/GetHBarCodeShowBillSub'
            //, toolbar: '#toolbarDemo'
            // , where: { sMsg: linterid, sMsg2: lentryid }
            , cols: [[
                , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
            ]]
            , page: true
            , height: 500
            , done: function () {
            }
        });
        //扫MES仓位
        $('#HMESSPName').on('keydown', function (event) {      //扫仓位
            var HBarCode = $('#HMESSPName').val();
            if (event.keyCode == 13) {
                $.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");
                    }
                });
            }
        });
                //以上为layui模块
            });
        function GetHWHValue(obj)  //返回调入仓库
        {