jhz
2022-11-27 c7f03f53acf4e8186b688dbacf0860184cf0d073
其他出库扫码模块修改
6个文件已修改
3195 ■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 2524 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/仓存管理/仓库调拨/Kf_MoveStockBill_Fast.html 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/其他出库/Kf_OtherOutBill_Fast.html 620 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml
@@ -10,7 +10,7 @@
    <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <PublishProvider>FileSystem</PublishProvider>
    <PublishUrl>D:\网站发布\智云MESWMS\LAYUI</PublishUrl>
    <PublishUrl>E:\网页发布\WEBTM</PublishUrl>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <SiteUrlToLaunchAfterPublish />
  </PropertyGroup>
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
Diff too large
WebTM/WebTM.csproj.user
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <NameOfLastUsedPublishProfile>JFTM</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>E:\GIT仓库\ZYLMESTM\WebTM\Properties\PublishProfiles\JFTM.pubxml</NameOfLastUsedPublishProfile>
    <ProjectView>ProjectFiles</ProjectView>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>true</UseIISExpress>
WebTM/layuiadmin/Scripts/webConfig.js
@@ -5,6 +5,7 @@
    //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
    //var WEBURL = "http://localhost:8085/API/";   //zgq本地
    var WEBURL = "http://localhost:8080/API/";   //颜晓军本地配置
    //var WEBURL = "http://localhost/WEBAPI/";   //颜家台式机本地配置
    //var WEBURL = "http://localhost:8082/lubao";   //颜晓军本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //杨露本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //章紫柔本地配置
WebTM/views/²Ö´æ¹ÜÀí/²Ö¿âµ÷²¦/Kf_MoveStockBill_Fast.html
@@ -975,7 +975,7 @@
                GetMeesageBySourceBillNo();
            });
            //扫源码
            //扫描源单条码
            function GetMeesageBySourceBillNo(obj) {
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
@@ -985,8 +985,6 @@
                var HMaker = sessionStorage["HUserName"]
                var HFIFOWhID = $("#HFIFOWHID").val()
                var HStockOutOrgID = $("#HStockOutOrgID").val()//调出组织
                var sMouldManagerCtl = 'N'
                var sFIFOCtl = 'N'
                $.ajax({
                    url: GetWEBURL() + "/WEBSController/get_SourceBarCode_MoveStock_Json",
                    type: "GET",
@@ -1098,6 +1096,13 @@
                var HStockInOrgID = $("#HStockInOrgID").val()//调入组织
                var HStockOutOrgID = $("#HStockOutOrgID").val()//调出组织
                var HScanStyle = "";
                //判断条码是否为空  new
                if (sBarCode == '') {
                    playSound();
                    layer.msg("条码为空,不能扫描!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
                }
                if (HDeleteFlag == "*") {
                    if (sBarCode != "") {
@@ -1294,22 +1299,53 @@
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.confirm("确认要删除吗,删除后将不可恢复!", { title: "删除确认" }, function (index) {
                        var sInterID = $("#HInterID").val()
                        var sBillNo = $("#HBillNo").val()
                        var sMaterID = data[0].HMaterID
                        var sAuxPropID = data[0].HAuxPropID
                        var sMTONo = ''
                        var sSourceInterID = data[0].HSourceInterID
                        var sSourceEntryID = data[0].HSourceEntryID
                        var HBillType = '1207';
                        var HStockOutOrgID = $("#HStockOutOrgID").val()//调出组织
                        $.ajax(
                            {
                                type: "Get",
                                url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json",
                                async: true,
                                data: { "HInterID": HInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "HBillType": HBillType },
                                data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "HBillType": HBillType },
                                dataType: "json",
                                success: function (data) {
                                    if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                        //显示表体明细
                                        DisBillEntryList();
                                        $.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 });
WebTM/views/ÁìÁÏ·¢»õ/ÆäËû³ö¿â/Kf_OtherOutBill_Fast.html
@@ -49,13 +49,14 @@
                    </div>
                    <div class="layui-tab" lay-filter="tab-Kf_OtherOutBill">
                        <ul class="layui-tab-title" lay-filter="tab-all">
                            <li lay-id="1">源单信息</li>
                            <li lay-id="2">单据信息</li>
                            <li lay-id="3">物料清单</li>
                            <li lay-id="4">日志</li>
                            <li lay-id="1">选择源单</li>
                            <li lay-id="2">表头信息</li>
                            <li lay-id="3">明细信息</li>
                            <li lay-id="4" style="padding:1px;">下架信息</li>
                            <li lay-id="5">合计信息</li>
                        </ul>
                        <div class="layui-tab-content">
                            <!--源单信息-->
                            <!--选择源单-->
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form-item">
                                    <div class="layui-row">
@@ -65,6 +66,7 @@
                                        <div class="layui-col-xs8">
                                            <select name=" HBillType" id="HBillType">
                                                <option value="-1">手工录入</option>
                                                <option value="1242">出库申请单</option>
                                            </select>
                                        </div>
                                    </div>
@@ -97,8 +99,22 @@
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-row">
                                        <div class="layui-col-xs3">
                                            <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">
                                            <input type="hidden" name="HFIFOWHID" id="HFIFOWHID" lay-verify="HFIFOWHID" value="0" autocomplete="off" class="layui-input">
                                        </div>
                                        <div class="layui-col-xs3">
                                            <button type="button" id="HFIFOWHID-BT" lay-submit="" class="layui-btn" lay-filter="HFIFOWHID-BT">...</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--单据信息-->
                            <!--表头信息-->
                            <div class="layui-tab-item">
                                <div class="layui-form-item" style="padding:0px;margin:0px">
                                    <div class="layui-row">
@@ -196,11 +212,15 @@
                                    </div>
                                </div>
                            </div>
                            <!--物料清单-->
                            <!--明细信息-->
                            <div class="layui-tab-item">
                                <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table>
                            </div>
                            <!--日志-->
                            <!--下架信息-->
                            <div class="layui-tab-item">
                                <table class="layui-hide" id="FIFOlist-table" lay-filter="FIFOlist-table"></table>
                            </div>
                            <!--合计信息-->
                            <div class="layui-tab-item">
                                <div class="layui-row">
                                    <div class="layui-col-xs3">
@@ -254,6 +274,8 @@
                , table = layui.table
                , form = layui.form
                , element = layui.element;
            var HStockOrgID = sessionStorage["OrganizationID"]
            var HSourceFlag = sessionStorage["SourceFlag"];
            //表头初始化赋值(根据登录用户获取 é»˜è®¤ä»“库、部门、验收、保管、金蝶用户) new
@@ -308,6 +330,7 @@
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HBillType").val(d.data[0].HSourceBillType);
                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                        HSourceFlag = true;
                        //$("#HWHID").val(d.data[0].HWhID);
                        //$("#HKeeperID").val(d.data[0].HKeeperID);
                        //$("#HSecManagerID").val(d.data[0].HSecManagerID);
@@ -401,6 +424,22 @@
                    // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
                }
            });
            //选择先进先出仓库
            form.on('submit(HFIFOWHID-BT)', function () {//选择调出仓库
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '仓库列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_WarehouseListNew.html?Type=HFIFOWHID&HOrgID=' + HStockOrgID + '', 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
            form.on('submit(HWHID-BT)', function () {//选择仓库
                layer.open({
                    type: 2
@@ -409,10 +448,9 @@
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes']
                    , content: ['../../../views/Baseset/基础资料/Gy_WarehouseListNew.html?Type=HWHID&HOrgID=' + HStockOrgID + '', 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
@@ -542,13 +580,33 @@
                })
            });
            //退出按钮
            form.on('submit(Cancel)', function () {
                sessionStorage["SourceFlag"] = false;
                //parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
                layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
                    window.close();
                });
                var sInterID = $("#HInterID").val()
                var HBillType = '1206'
                $.ajax(
                    {
                        type: "Get",
                        url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json",
                        async: true,
                        data: { "HInterID": sInterID, "HBillType": HBillType },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
                            }
                            else {
                                layer.msg(data.Message, { icon: 2 });
                            }
                        },
                        error: function (err) {
                            layer.msg('错误' + err, {
                                icon: 5,
                                time: 20000
                            }, function () {
                            });
                        }
                    });
                parent.location.href = "../../../views/index.html"
            })
            form.on('submit(cmdModify)', function () {//编辑
@@ -573,62 +631,73 @@
            form.on('submit(cmdDelete)', function () {//删除
                var checkStatus = table.checkStatus('wl-table')
                    , data = checkStatus.data;
                // console.log(data);
                var sInterID = $('#HInterID').val()
                var sMaterID = data[0].HMaterID
                var sBillType = '1206'
                var sAuxPropID = data[0].HAuxPropID
                //var sMTONo = data[0].HMTONo
                var sMTONo = ''
                var sSourceInterID = data[0].HSourceInterID
                var sSourceEntryID = data[0].HSourceEntryID
                $.ajax(
                    {
                        type: "Get",
                        //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Delete_Json", //方法所在页面和方法名
                        url: GetWEBURL() + "/OtherOutBill/Delete_Json",
                        async: true,
                        data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                //layer.msg(data.Message, { icon: 1 });
                                table.render({
                                    elem: '#wl-table'
                                    , url: GetWEBURL() + '/OtherOutBill/DisBillEntryList_Webs_Json'
                                    , cellMinWidth: 80
                                    , toolbar: '#toolbarDemo'
                                    , where: { HBillID: sInterID, HBillType: '1206', sWhere: '' }
                                    , cols: [[
                                        { type: 'radio' }
                                        , { field: 'HQty', title: '重量', width: 150 }
                                        , { field: 'HAuxQty', title: '箱数', width: 150, totalRow: true }
                                        , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                                        , { field: 'HMaterName', title: '物料名称', width: 150 }
                                        , { field: 'HMaterModel', title: '规格型号', width: 100 }
                                        , { field: 'HSourceInterID', title: '源单主内码', width: 100 }
                                        , { field: 'HSourceEntryID', title: '源单子内码', width: 100 }
                                        , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                                        , { field: 'HBatchNo', title: '批次', width: 100 }
                                        , { field: 'HAuxPropID', title: '辅助属性', width: 100 }
                                        , { field: 'HMTONo', title: '计划跟踪号', width: 100 }
                                    ]]
                                    , height: 500
                                })
                            }
                            else {
                                layer.msg(data.Message, { icon: 2 });
                            }
                        },
                        error: function (err) {
                            layer.msg('错误' + err, {
                                icon: 5,
                                time: 20000
                            }, function () {
                                //do something
                if (checkStatus.data.length === 1) {
                    layer.confirm("确认要删除吗,删除后将不可恢复!", { title: "删除确认" }, function (index) {
                        var sInterID = $("#HInterID").val()
                        var sBillNo = $("#HBillNo").val()
                        var sMaterID = data[0].HMaterID
                        var sAuxPropID = data[0].HAuxPropID
                        var sMTONo = ''
                        var sSourceInterID = data[0].HSourceInterID
                        var sSourceEntryID = data[0].HSourceEntryID
                        var HBillType = '1206';
                        $.ajax(
                            {
                                type: "Get",
                                url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json",
                                async: 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": HStockOrgID },
                                            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 });
                                    }
                                },
                                error: function (err) {
                                    layer.msg('错误' + err, {
                                        icon: 5,
                                        time: 20000
                                    }, function () {
                                    });
                                }
                            });
                        }
                    });
                        layer.close(index)
                    })
                }
                else {
                    layer.msg('请选择一行记录,进行删除!');
                }
            });
@@ -673,21 +742,8 @@
                    //}
                }
            });
            //条形码回车方法
            $('#HBarCode').on('keydown', function (event) {
                var sQty = $("#HQty").val();
                if (sQty == "") {
                    sQty = 0;
                }
                if (event.keyCode == 13) {
                    GetMeesageByBarCode();
                }
            });
            //确定
            form.on('submit(QueDin)', function (data) {
                GetMeesageByBarCode();
            });
            //#region æ‰«ææºå•条码
            //扫源单
            $('#HSourceBillNo').on('keydown', function (event) {
@@ -695,32 +751,106 @@
                    GetMeesageBySourceBillNo();
                }
            });
            //确定
            form.on('submit(QueDin2)', function (data) {
                GetMeesageBySourceBillNo();
            });
            //扫描源单条码
            function GetMeesageBySourceBillNo(obj) {
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
                var HBillType = '1206'
                var HSourceBillNo = $('#HSourceBillNo').val()
                var HSourceBillType = $("#HBillType").val()
                var HMaker = sessionStorage["HUserName"]
                var HFIFOWhID = $("#HFIFOWHID").val()
                $.ajax({
                    url: GetWEBURL() + "/WEBSController/get_SourceBarCode_OtherOut_Json",
                    type: "GET",
                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "HMaker": HMaker, "HFIFOWhID": HFIFOWhID, "HOWNERID": HStockOrgID },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            playSound1();
                            HSourceFlag = true;
                            if (result.data.hDeptIDField != 0) {
                                $("#HDeptID").val(result.data.hDeptIDField);
                                $("#HDeptName").val(result.data.hDeptNameField);
                            }
                            $("#HSourceBillNo").val(result.data.hSourceBillNoField);
            table.render({
                elem: '#mx-table'
                // , url: 'http://localhost:8083/OtherOutBill/GetHBarCodeShowBillSub'
                //, toolbar: '#toolbarDemo'
                // , where: { sMsg: linterid, sMsg2: lentryid }
                , cols: [[
                    , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
                ]]
                , page: true
                , height: 500
                , done: function () {
                            $("#HBillType").attr("disabled", "disabled");
                            if (result.data.hMulSourceFlagField == 0) {
                                $("#HSourceBillNo").attr("readonly", "readonly");
                            }
                            layer.load(3);
                            element.tabChange('tab-Kf_OtherOutBill', '2');
                            $.ajax({
                                url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                                type: "GET",
                                data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
                                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();
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                        layer.closeAll("loading");
                    }
                });
            }
            //#endregion
            //#region æ‰«æç‰©æ–™æ¡ç 
            //条形码回车方法
            $('#HBarCode').on('keydown', function (event) {
                if (event.keyCode == 13) {
                    GetMeesageByBarCode();
                }
            });
            //确定
            form.on('submit(QueDin)', function (data) {
                GetMeesageByBarCode();
            });
            //扫条码
            function GetMeesageByBarCode(obj) {  //返回工作中心
                var sOldBarCode = $('#HBarCode').val()
                var HDeleteFlag = sOldBarCode.substring(0, 1);
                var sBarCode = sOldBarCode.slice(1);
                if (sBarCode == null) {
                    sBarCode = "";
                }
                var sInterID = $("#HInterID").val()
                var sBillType = '1206'
                var sBillNo = $("#HBillNo").val()
@@ -728,15 +858,22 @@
                var sHWHID = $("#HWHID").val();//仓库ID
                var sHSPID = $("#HStockPlaceID").val();//仓位ID
                var sQty = $("#HQty").val()
                var sHBillType = $("#HBillType").val()
                var sSourceBillNo = $("#HSourceBillNo").val()
                var sMouldManagerCtl = "N";  //是否启用器具管理
                var sFIFOCtl = "N";          //是否启用先进先出管理
                var HScanStyle = $("#HScanStyle").val();
                if (sQty == "") {
                    sQty = 0;
                }
                var sSourceBillNo = $("#HSourceBillNo").val()
                if (sSourceBillNo == null) {
                    sSourceBillNo = "";
                }
                var sHBillType = $("#HBillType").val()
                var HScanStyle = $("#HScanStyle").val();
                //判断条码是否为空  new
                if (sBarCode == '') {
                    playSound();
                    layer.msg("条码为空,不能扫描!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
                }
                if (HDeleteFlag == "*") {
                    if (sBarCode != "") {
                        $('#HBarCode').val("");
@@ -821,25 +958,17 @@
                        });
                }
                else {
                    var sBarCode = $('#HBarCode').val()
                    if (sBarCode == '') {
                        playSound();
                        layer.msg("条码为空,不能扫描!", { icon: 5, btn: ['确定'], time: 100000, offset: 't' });
                        return false;
                        }
                    if (sBarCode != "") {
                        $('#HBarCode').val("");
                    }
                    if (sQty != "") {
                        $('#HQty').val("");
                    }
                    sessionStorage["SourceFlag"] = false;
                    $.ajax({
                        url: GetWEBURL() + "/OtherOutBill/get_CheckTypeByBarCode_Out_Json",
                        url: GetWEBURL() + "/WEBSController/Get_BarCode_Json",
                        type: "GET",
                        data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"], "HScanStyle": HScanStyle },
                        data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": sBillType, "HBillNo": sBillNo, "HMaker": sMaker, "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sQty, "HRedBlueFlag": false, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockOrgID": HStockOrgID, "HScanStyle": HScanStyle, "HCustom1": "", "HCustom2": "" },
                        success: function (result) {
                            if (result.count == 1) {
                                if (result.data.HBarType == '仓库条码') {
@@ -882,77 +1011,34 @@
                                    element.tabChange('tab-Kf_OtherOutBill', '3');
                                }
                                else {
                                    if (sessionStorage["SourceFlag"] == "true") {
                                        element.tabChange('tab-Kf_OtherOutBill', '3');
                                    }
                                    else {
                                        //$("#HSupName").val(result.data.HSupName);
                                        //$("#HSupID").val(result.data.HSupID);
                                        //$("#HDeptName").val(result.data.HDeptName);
                                        //$("#HDeptID").val(result.data.HDeptID);
                                        //$("#HSourceBillNo").val(result.data.HSourceBillNo);
                                        sessionStorage["SourceFlag"] = true;
                                        //获取源单类型、源单单号
                                        if (result.data.HSourceBillType == "1206") {
                                            $("#HBillType").val("1206");
                                    if (!HSourceFlag) {
                                        $("#HBillType").val("手工录入");
                                        $("#HSourceBillNo").val("");
                                        }
                                        else if (result.data.HSourceBillType == "1601") {
                                            $("#HBillType").val("1601");
                                        }
                                        $("#HNote").val(";物料条码");
                                        element.tabChange('tab-Kf_OtherOutBill', '3');
                                        $("#HBillType").attr("disabled", "disabled");
                                        $("#HSourceBillNo").attr("readonly", "readonly");
                                    }
                                    HSourceFlag = true;
                                    element.tabChange('tab-Kf_OtherOutBill', '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() + '/OtherOutBill/DisBillEntryList_Webs_Json'
                                //    ,url: GetWEBURL() + '/MateOutBill/DisBillEntryList_Webs_New_Json1'
                                //    , toolbar: '#toolbarDemo'
                                //    //, where: { HBillID: sInterID, HBillType: '1206', sWhere: '' }
                                //    ,data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: '1206', sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl }
                                //    , cellMinWidth: 90
                                //    , cols: [[
                                //        { type: 'radio' }
                                //        , { field: 'HQty', title: '数量', width: 150 }
                                //        , { field: 'HQtyMust', title: '应收数量', width: 150 }
                                //        , { 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 }
                                //    ]]
                                //    // , data: [linterid]
                                //    // , page: true
                                //    , height: 500
                                //    , done: function () {
                                //        layer.closeAll("loading");
                                //    }
                                //});
                                $.ajax({
                                    url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
                                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                                    type: "GET",
                                    data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: '1206', sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
                                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": sBillType, "HStockOrgID": HStockOrgID },
                                    success: function (result) {
                                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                            listOption.data = result.data.list;
                                            listOption.data = result.data.Materlist;
                                            table.render(listOption);
                                            listOption1.data = result.data.list2;
                                            table.render(listOption1);
                                            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.list.length; i++) {
                                                count += result.data.list[i].HQty;
                                                count1 += result.data.list[i].HPieceQty;
                                            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);
@@ -964,12 +1050,11 @@
                                        layer.closeAll("loading");
                                    }
                                });
                                playSound1();
                            }
                            else {
                                // $("#verifycode").click();
                                //layer.msg(result.Message, { icon: 5 });
                                playSound();
                                layer.msg(result.Message, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                            layer.closeAll("loading");
                        }
@@ -977,52 +1062,82 @@
                }
            }
            //#endregion
            var listOption = {
                elem: '#wl-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                , limit: 3000
                , totalRow: true
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HQty', title: '重量', width: 150, totalRow: true }
                    , { field: 'HAuxQty', title: '箱数', width: 150, totalRow: true }
                    , { field: 'HQtyMust', title: '应发数量', width: 150 }
                    , { field: 'HQty', title: '数量', width: 150, totalRow: true }
                    , { field: 'HQtyMust', title: '应收数量', width: 150, totalRow: true }
                    , { 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: 'HAuxPropName', title: '辅助属性', width: 150 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    , { field: 'HBatchNo', title: '批次', width: 150 }
                    , { field: 'HPieceQty', title: '条码数量', width: 150 }
                    , { field: 'HBatchNo', title: '批次', width: 150, hide: true }
                    , { field: 'HPieceQty', title: '条码数量', width: 150, hide: 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 listOption1 = {
                elem: '#mx-table'
            var FIFOlistOption = {
                elem: '#FIFOlist-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                , limit: 3000
                , totalRow: true
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HQty', title: '数量', width: 150 }
                    , { field: 'HQtyMust', title: '应发数量', width: 150 }
                    , { field: 'HBarCode', title: '条码编号', width: 150 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                    { 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: 'HSourceInterID', title: '源单主内码', width: 150 }
                    //, { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    , { field: 'HBatchNo', title: '批次', width: 150 }
                    , { field: 'HAuxPropName', title: '辅助属性', width: 150 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            }
            //森楷列表显示
            //var listOption = {
            //    elem: '#wl-table'
            //    , toolbar: '#toolbarDemo'
            //    , cellMinWidth: 90
            //    , totalRow: true
            //    , cols: [[
            //        { type: 'radio' }
            //        , { field: 'HQty', title: '重量', width: 150, totalRow: true }
            //        , { field: 'HAuxQty', title: '箱数', width: 150, totalRow: true }
            //        , { field: 'HQtyMust', title: '应发数量', width: 150 }
            //        , { 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 }
            //        , { field: 'HPieceQty', title: '条码数量', width: 150 }
            //    ]]
            //    , height: 500
            //    , done: function () {
            //        layer.closeAll("loading");
            //    }
            //}
            function playSound() {
                var audio = document.getElementById("cs");
@@ -1031,68 +1146,73 @@
                var audio = document.getElementById("cs");
                audio.play();
            }
            //扫源单
            function GetMeesageBySourceBillNo(obj) {
                var HSourceBillNo = $('#HSourceBillNo').val()
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
                var sMouldManagerCtl = "N";  //是否启用器具管理
                var sFIFOCtl = "N";          //是否启用先进先出管理
                if (HSourceBillNo == "" || sInterID <= 0) {
                    layer.msg("源单号为空,或者内码不存在!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                //
                $.ajax({
                    //url: "http://61.130.49.162:9090/WMSAPI///OtherOutBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                    url: GetWEBURL() + "/OtherOutBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                    type: "GET",
                    data: { "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.load(3)
                            table.render({
                                elem: '#wl-table'
                                // , url: 'http://61.130.49.162:9090/WMSAPI///OtherOutBill/DisBillEntryList_Webs_Json'
                                , url: GetWEBURL() + '/MateOutBill/DisBillEntryList_Webs_New_Json1'
                                , toolbar: '#toolbarDemo'
                                , totalRow: true
                                , where: { HBillID: sInterID, HBillNo: sBillNo, HBillType: '1206', sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl }
                                , cols: [[
                                    { type: 'radio' }
                                    , { field: 'HQty', title: '重量', width: 150, totalRow: true}
                                    , { field: 'HAuxQty', title: '箱数', width: 150, totalRow: true }
                                    , { field: 'HQtyMust', title: '应收数量', width: 150 }
                                    , { 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 }
                                    , { field: 'HPieceQty', title: '条码数量', width: 150 }
                                ]]
                                // , data: [linterid]
                                // , page: true
                                , height: 500
                                , done: function () {
                                    layer.closeAll("loading");
                                }
                            });
                        }
                        else {
                            // $("#verifycode").click();
                            //layer.msg(result.Message, { icon: 5 });
                            layer.msg(result.Message, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                        layer.closeAll("loading");
                    }
                });
            }
            ////扫源单     åŽŸè°ƒç”¨æ–¹æ³•
            //function GetMeesageBySourceBillNo(obj) {
            //    var HSourceBillNo = $('#HSourceBillNo').val()
            //    var sInterID = $("#HInterID").val()
            //    var sBillNo = $("#HBillNo").val()
            //    var sMouldManagerCtl = "N";  //是否启用器具管理
            //    var sFIFOCtl = "N";          //是否启用先进先出管理
            //    if (HSourceBillNo == "" || sInterID <= 0) {
            //        layer.msg("源单号为空,或者内码不存在!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //        return;
            //    }
            //    //
            //    $.ajax({
            //        //url: "http://61.130.49.162:9090/WMSAPI///OtherOutBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
            //        url: GetWEBURL() + "/OtherOutBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
            //        type: "GET",
            //        data: { "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
            //        success: function (result) {
            //            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
            //                layer.load(3)
            //                table.render({
            //                    elem: '#wl-table'
            //                    // , url: 'http://61.130.49.162:9090/WMSAPI///OtherOutBill/DisBillEntryList_Webs_Json'
            //                    , url: GetWEBURL() + '/MateOutBill/DisBillEntryList_Webs_New_Json1'
            //                    , toolbar: '#toolbarDemo'
            //                    , totalRow: true
            //                    , where: { HBillID: sInterID, HBillNo: sBillNo, HBillType: '1206', sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl }
            //                    , cols: [[
            //                        { type: 'radio' }
            //                        , { field: 'HQty', title: '重量', width: 150, totalRow: true}
            //                        , { field: 'HAuxQty', title: '箱数', width: 150, totalRow: true }
            //                        , { field: 'HQtyMust', title: '应收数量', width: 150 }
            //                        , { 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 }
            //                        , { field: 'HPieceQty', title: '条码数量', width: 150 }
            //                    ]]
            //                    // , data: [linterid]
            //                    // , page: true
            //                    , height: 500
            //                    , done: function () {
            //                        layer.closeAll("loading");
            //                    }
            //                });
            //            }
            //            else {
            //                // $("#verifycode").click();
            //                //layer.msg(result.Message, { icon: 5 });
            //                layer.msg(result.Message, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
            //            }
            //            layer.closeAll("loading");
            //        }
            //    });
            //}
        });
        //以上为LayUi模块
        function GetHFIFOWHNAMEValue(obj)  //返回先进先出仓库
        {
            $("#HFIFOWHNAME").val(obj[0].HName);
            $("#HFIFOWHID").val(obj[0].HItemID);
        }
        function GetHWHValue(obj)  //返回仓库
        {
            $("#HWHNAME").val(obj[0].HName);