zzr99
2022-08-08 f0719da71fc0caa65c724ca5392cc3295bf3a9c3
WebTM/views/ÑéÊÕÈë¿â/ÆäËûÈë¿â/Kf_OtherInBill_Fast.html
@@ -19,6 +19,9 @@
        <div class="layui-card" style="padding: 1px">
            <div class="layui-card-body" style="padding: 1px;">
                <form class="layui-form" action="" lay-filter="component-form-group">
                    <div style="background-color:#0085E8;">
                        <span style="color: white;"><i class="layui-icon layui-icon-form"></i>其他入库单</span>
                    </div>
                    <div class="layui-tab" lay-filter="tab-Kf_OtherInBill">
                        <ul class="layui-tab-title" lay-filter="tab-all">
                            <!-- <li lay-id="1">源单信息</li>-->
@@ -36,6 +39,7 @@
                                        </div>
                                        <div class="layui-col-xs8">
                                            <select name=" HBillType" id="HBillType">
                                                <option value="1241">入库申请单</option>
                                                <option value="-1">手工录入</option>
                                            </select>
                                        </div>
@@ -86,19 +90,19 @@
                                    </div>
                                </div>
                                <!--<div class="layui-form-item" style="padding:0px;margin:0px">
                                    <div class="layui-row">
                                        <div class="layui-col-xs3">
                                            <label class="layui-form-label" style="width:45px;padding-left:0px;">供应商</label>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <input type="text" name="HSupName" id="HSupName" lay-verify="HSupName" autocomplete="off" class="layui-input">
                                            <input type="hidden" name="HSupID" id="HSupID" lay-verify="HSupID" value="0" autocomplete="off" class="layui-input">
                                        </div>
                                        <div class="layui-col-xs3">
                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupID-BT">...</button>
                                        </div>
                                    </div>
                                </div>-->
                    <div class="layui-row">
                        <div class="layui-col-xs3">
                            <label class="layui-form-label" style="width:45px;padding-left:0px;">供应商</label>
                        </div>
                        <div class="layui-col-xs6">
                            <input type="text" name="HSupName" id="HSupName" lay-verify="HSupName" autocomplete="off" class="layui-input">
                            <input type="hidden" name="HSupID" id="HSupID" lay-verify="HSupID" value="0" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-col-xs3">
                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupID-BT">...</button>
                        </div>
                    </div>
                </div>-->
                                <div class="layui-form-item" style="padding:0px;margin:0px">
                                    <div class="layui-row">
                                        <div class="layui-col-xs3">
@@ -201,23 +205,15 @@
                                <table class="layui-hide" id="fj-table-qd" lay-filter="fj-table-qd"></table>
                            </div>
                        </div>
                        <div class="layui-form-item" style="margin-bottom: 20px;">
                            <div class="layui-row">
                                <div class="layui-col-xs3">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="Saver" id="Saver">提交</button>
                                </div>
                                <div class="layui-col-xs3">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">编辑</button>
                                </div>
                                <div class="layui-col-xs3">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">删除</button>
                                </div>
                                <div class="layui-col-xs3">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="Cancel">退出</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <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" id="Saver" 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="cmdRefresh">刷新</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>
                </form>
            </div>
        </div>
@@ -240,10 +236,10 @@
                , element = layui.element;
            //表头初始化赋值(根据登录用户获取 é»˜è®¤ä»“库、部门、验收、保管、金蝶用户) new
            $("#HWHID").val(sessionStorage["HWHID"]);
            $("#HWHNAME").val(sessionStorage["HWHName"]);
            $("#HStockPlaceID").val(sessionStorage["HSPID"]);
            $("#HStockPlaceName").val(sessionStorage["HSPName"]);
            //$("#HWHID").val(sessionStorage["HWHID"]);
            //$("#HWHNAME").val(sessionStorage["HWHName"]);
            //$("#HStockPlaceID").val(sessionStorage["HSPID"]);
            //$("#HStockPlaceName").val(sessionStorage["HSPName"]);
            //$("#HSupID").val(sessionStorage["HSupID"]);
            //$("#HSupName").val(sessionStorage["HSupName"]);
            $("#HDeptID").val(sessionStorage["HDeptID"]);
@@ -341,7 +337,7 @@
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    url: GetWEBURL() + "/Web/GetMAXNumPDA",
                    type: "GET",
                    data: { "HBillType": '1203' },
                    success: function (d) {
@@ -359,10 +355,10 @@
            //
            function Sub_ClearBill() {
                //表头初始化赋值(根据登录用户获取 é»˜è®¤ä»“库、部门、验收、保管、金蝶用户) new
                $("#HWHID").val(sessionStorage["HWHID"]);
                $("#HWHNAME").val(sessionStorage["HWHName"]);
                $("#HStockPlaceID").val(sessionStorage["HSPID"]);
                $("#HStockPlaceName").val(sessionStorage["HSPName"]);
                //$("#HWHID").val(sessionStorage["HWHID"]);
                //$("#HWHNAME").val(sessionStorage["HWHName"]);
                //$("#HStockPlaceID").val(sessionStorage["HSPID"]);
                //$("#HStockPlaceName").val(sessionStorage["HSPName"]);
                //$("#HSupID").val(sessionStorage["HSupID"]);
                //$("#HSupName").val(sessionStorage["HSupName"]);
                $("#HDeptID").val(sessionStorage["HDeptID"]);
@@ -423,6 +419,33 @@
                });
            }
            //
            form.on('submit(cmdRefresh)', function () {
                var sInterID = $("#HInterID").val()
                table.render({
                    elem: '#wl-table'
                    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
                    , toolbar: '#toolbarDemo'
                    , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
                    , 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 }
                    ]]
                    , height: 500
                    , done: function () {
                        layer.closeAll("loading");
                    }
                });
            });
            form.on('submit(HWHID-BT)', function () {//选择仓库
                layer.open({
@@ -567,12 +590,59 @@
            form.on('submit(Cancel)', function () {
                sessionStorage["SourceFlag"] = false;
                parent.location.href = "../../../views/index.html"
                //parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
                layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
                    window.close();
                });
            })
            //form.on('submit(cmdModify)', function () {//编辑
            //    var sSubStr = table.cache['wl-table'];
            //    //if (AllowLoadData(sSubStr) != false) {//非空验证
            //    layer.open({
            //        type: 2
            //        , area: ['100%', '100%']
            //        , title: '明细列表'
            //        , shade: 0.6 //遮罩透明度
            //        , maxmin: true //允许全屏最小化
            //        , anim: 0 //0-6的动画形式,-1不开启
            //        , content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
            //        , resize: false
            //        , cancel: function () {
            //            //$(".layui-btn").removeClass("layui-btn-disabled");
            //        }
            //    })
            //    // }
            //});
            //form.on('submit(cmdModify)', function () {//编辑
            //    //var sSubStr = table.cache['wl-table'];
            //    var checkStatus = table.checkStatus('wl-table')
            //        , data = checkStatus.data;
            //    //if (AllowLoadData(sSubStr) != false) {//非空验证
            //    layer.open({
            //        type: 2
            //        , area: ['100%', '100%']
            //        , title: '明细列表'
            //        , shade: 0.6 //遮罩透明度
            //        , maxmin: true //允许全屏最小化
            //        , anim: 0 //0-6的动画形式,-1不开启
            //        , content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?HInterID=' + data[0].HInterID + '&HMaterID =' + data[0].HMaterID + '& HAuxPropID = ' + data[0].HAuxPropID + '& HMTONo = ' + data[0].HMTONo + '& HSourceInterID = ' + data[0].HSourceInterID + '& HSourceEntryID = ' + data[0].HSourceEntryID + '& HQty = ' + data[0].HQtyMust + '& HBillType = ' + data[0].HBillType + '', 'yes']
            //        , resize: false
            //        , cancel: function () {
            //            //$(".layui-btn").removeClass("layui-btn-disabled");
            //        }
            //    })
            //    // }
            //});
            form.on('submit(cmdModify)', function () {//编辑
                var sSubStr = table.cache['wl-table'];
                //var sSubStr = table.cache['wl-table'];
                var checkStatus = table.checkStatus('wl-table')
                    , data = checkStatus.data;
                //if (AllowLoadData(sSubStr) != false) {//非空验证
                layer.open({
                    type: 2
@@ -581,74 +651,143 @@
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
                    , content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?HInterID=' + data[0].HInterID + '&HMaterID =' + data[0].HMaterID + '&HBillType =' + data[0].HBillType, 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                    , end: function () {
                        //刷新页面,
                        //location.reload();
                        var sInterID = $("#HInterID").val()
                        table.render({
                            elem: '#wl-table'
                            , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
                            , toolbar: '#toolbarDemo'
                            , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
                            , 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 }
                            ]]
                            , height: 500
                            , done: function () {
                                layer.closeAll("loading");
                            }
                        });
                    }
                })
                // }
            });
            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 = '1203'
                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() + "/OtherInBill/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) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                table.render({
                                    elem: '#wl-table'
                                    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
                                    , toolbar: '#toolbarDemo'
                                    , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
                                    , 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 }
                                    ]]
                                    , height: 500
                                    , done: function () {
                                        layer.closeAll("loading");
                                    }
                                });
                            }
                            else {
                                layer.msg(data.Message, { icon: 2 });
                            }
                        },
                        error: function (err) {
                            layer.msg('错误' + err, {
                                icon: 5,
                                time: 20000
                            }, function () {
                                //do something
                            });
                        }
                    });
                //var checkStatus = table.checkStatus('wl-table')
                //    , data = checkStatus.data;
                //// console.log(data);
                //var sInterID = $('#HInterID').val()
                //var sMaterID = data[0].HMaterID
                //var sBillType = '1203'
                //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() + "/OtherInBill/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) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                //                table.render({
                //                    elem: '#wl-table'
                //                    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
                //                    , toolbar: '#toolbarDemo'
                //                    , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
                //                    , 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 }
                //                    ]]
                //                    , height: 500
                //                    , done: function () {
                //                        layer.closeAll("loading");
                //                    }
                //                });
                //            }
                //            else {
                //                layer.msg(data.Message, { icon: 2 });
                //            }
                //        },
                //        error: function (err) {
                //            layer.msg('错误' + err, {
                //                icon: 5,
                //                time: 20000
                //            }, function () {
                //                //do something
                //            });
                //        }
                //    });
            });
            //form.on('submit(Saver)', function (data) {//提交
            //    //灰度提交按钮Saver
            //    document.getElementById("Saver").disabled = true;
            //    //debugger;
            //    data.field.HSTOCKORGID = sessionStorage["OrganizationID"];//组织
            //    var sMainStr = JSON.stringify(data.field);
            //    //var hOrgID = sessionStorage["OrganizationID"];
            //    var sMain = sMainStr;
            //    var sSubStr = table.cache['wl-table'];
            //    var sSourceType = $("#HBillType").val();
            //    $.ajax(
            //        {
            //            type: "POST",
            //            url: GetWEBURL() + "/OtherInStockBill/set_SaveOtherInStockBill_Json",
            //            //url: "http://localhost:12761/OtherInStockBill/set_SaveOtherInStockBill_Json", //方法所在页面和方法名
            //            async: true,
            //            data: { "oMain": sMain },
            //            dataType: "json",
            //            success: function (data) {
            //                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
            //                    layer.msg(data.Message , { icon: 1 });
            //                    //
            //                    //Sub_ClearBill();
            //                    //
            //                    //灰度提交按钮Saver
            //                    document.getElementById("Saver").disabled = false;
            //                }
            //                else {
            //                    layer.msg(data.Message, { icon: 5 });
            //                    //灰度提交按钮Saver
            //                    document.getElementById("Saver").disabled = false;
            //                }
            //                layer.closeAll("loading");
            //            },
            //            error: function (err) {
            //                layer.msg("错误:" + err, { icon: 5 });
            //                //灰度提交按钮Saver
            //                document.getElementById("Saver").disabled = false;
            //            }
            //        });
            //});
            form.on('submit(Saver)', function (data) {//提交
                //灰度提交按钮Saver
@@ -673,12 +812,14 @@
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                    layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
                                    //
                                    //Sub_ClearBill();
                                    //
                                    //灰度提交按钮Saver
                                    document.getElementById("Saver").disabled = false;
                                    layer.confirm("生成其他入库单" + data.Message + $("#HBillNo").val(), {
                                        icon: 1, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['新增'],
                                        btn2: function () {
                                            //parent.layui.admin.events.closeThisTabs();关闭页签
                                            //window.close();//关闭页面,浏览器有效,PDA无效
                                            parent.location.href = "../../../views/index.html"
                                        }//关闭
                                    }, function () { window.location.reload(); });//新增
                                }
                                else {
                                    layer.msg(data.Message, { icon: 5 });
@@ -727,6 +868,7 @@
                                $("#HStockPlaceName").val(result.data[0].HName);
                                $("#HWHID").val(result.data[0].HWHID);
                                $("#HWHNAME").val(result.data[0].HWhName);
                                $("#HStockPlaceID").val(result.data[0].HItemID);
                                element.tabChange('tab-POStockInBill', '2');
                            }
                            else {
@@ -792,6 +934,9 @@
                var sHSPID = $("#HStockPlaceID").val()
                var sSourceBillNo = $("#HSourceBillNo").val()
                var HOrgID = $("#HOrgID").val();//组织
                var sMouldManagerCtl = 'N'
                var sFIFOCtl = 'N'
                var HBillType = '1203'
                //判断条码是否为空  new
                if (sBarCode == '') {
                    playSound();
@@ -800,7 +945,7 @@
                }
                if (sBarCode != "") {
                    $('#HBarCode').val("");
                    sessionStorage["SourceFlag"] = false;
                    //sessionStorage["SourceFlag"] = false;
                }
                //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//非空验证
                $.ajax({
@@ -839,8 +984,8 @@
                                $("#HSourceBillNo").val(result.data.HSourceBillNo);
                                sessionStorage["SourceFlag"] = true;
                                //获取源单类型、源单单号
                                if (result.data.HSourceBillType == "1203") {
                                    $("#HBillType").val("1203");
                                if (result.data.HSourceBillType == "1241") {
                                    $("#HBillType").val("1241");
                                }
                                else {
@@ -861,8 +1006,8 @@
                                    //$("#HSourceBillNo").val(result.data.HSourceBillNo);
                                    sessionStorage["SourceFlag"] = true;
                                    //获取源单类型、源单单号
                                    if (result.data.HSourceBillType == "1203") {
                                        $("#HBillType").val("1203");
                                    if (result.data.HSourceBillType == "1241") {
                                        $("#HBillType").val("1241");
                                    }
                                    else if (result.data.HSourceBillType == "1601") {
@@ -877,26 +1022,56 @@
                            //$("#HDeptID").val(result.data.HDeptID);
                            //$("#HDeptName").val(result.data.HDeptName);
                            layer.load(3)
                            table.render({
                                elem: '#wl-table'
                                , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
                                , toolbar: '#toolbarDemo'
                                , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
                                , 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 }
                                ]]
                                , height: 500
                                , done: function () {
                            //table.render({
                            //    elem: '#wl-table'
                            //    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
                            //    , toolbar: '#toolbarDemo'
                            //    , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
                            //    , 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 }
                            //        , { field: 'HAuxPropID', title: '辅助属性', width: 150 }
                            //        , { field: 'HMTONo', title: 'MTO号', width: 150 }
                            //    ]]
                            //    , height: 500
                            //    , done: function () {
                            //        layer.closeAll("loading");
                            //    }
                            //});
                            $.ajax({
                                url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
                                type: "GET",
                                data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
                                success: function (result) {
                                    if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                        listOption.data = result.data.list;
                                        table.render(listOption);
                                        listOption1.data = result.data.list2;
                                        table.render(listOption1);
                                        //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;
                                        }
                                        $("#HSumQtys").val(count);
                                        $("#HBarCodeQtys").val(count1);
                                        //return;
                                    }
                                    else {
                                        layer.msg(result.Message);
                                    }
                                    layer.closeAll("loading");
                                }
                            });
@@ -911,21 +1086,74 @@
                });
            }
            function playSound() {
                var audio = document.getElementById("cs");
                if (audio == null)
                    $("body").append('<audio id="cs" hidden controls> <source src = "../../video/jingbao.wav" type = "audio/ogg"> </audio >');
                var audio = document.getElementById("cs");
                audio.play();
                //var audio = document.getElementById("cs");
                //if (audio == null)
                //    $("body").append('<audio id="cs" hidden controls> <source src = "../../video/jingbao.wav" type = "audio/ogg"> </audio >');
                //var audio = document.getElementById("cs");
                //audio.play();
            }
            function playSound1() {
                var audio = document.getElementById("cs2");
                audio.play();
                //var audio = document.getElementById("cs2");
                //audio.play();
            }
            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: '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");
                }
            }
            var listOption1 = {
                elem: '#mx-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HQty', title: '数量', width: 150 }
                    , { field: 'HQtyMust', title: '应收数量', width: 150 }
                    , { field: 'HBarCode', title: '条码编号', width: 150 }
                    , { field: 'HMaterNumber', 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 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            }
            //扫源单
            function GetMeesageBySourceBillNo(obj) {
                var HSourceBillNo = $('#HSourceBillNo').val()
                var sSourceBillNo = $('#HSourceBillNo').val()
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
                var HBillType = '1203'
                var sSourceType = $("#HBillType").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;
@@ -935,32 +1163,68 @@
                    //url: "http://61.130.49.162:9090/WMSAPI///OtherInStockBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                    url: GetWEBURL() + "/OtherInStockBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                    type: "GET",
                    data: { "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                    data: { "sInterID": sInterID, "sBillNo": sBillNo, "HBillType": HBillType, "sSourceBillNo": sSourceBillNo, "sSourceType": sSourceType, "sMaker": sessionStorage["HUserName"],"sHOWNERID": sessionStorage["OrganizationID"] },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            //$("#HDeptID").val(result.data[0].hDeptIDField);
                            //$("#HDeptName").val(result.data[0].hDeptNameField);
                            //$("#HWHID").val(result.data[0].HWHID);
                            //$("#HWHName").val(result.data[0].HWHName);
                            element.tabChange('tab-Kf_OtherInBill', '2');
                            playSound1();
                            HSourceFlag = true;
                            sessionStorage["SourceFlag"] = true;
                            layer.load(3)
                            table.render({
                                elem: '#wl-table'
                                //, url: 'http://61.130.49.162:9090/WMSAPI///OtherInStockBill/DisBillEntryList_Webs_Json'
                                , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
                                , toolbar: '#toolbarDemo'
                                , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
                                , 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 () {
                            //table.render({
                            //    elem: '#wl-table'
                            //    //, url: 'http://61.130.49.162:9090/WMSAPI///OtherInStockBill/DisBillEntryList_Webs_Json'
                            //    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
                            //    , toolbar: '#toolbarDemo'
                            //    , where: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl  }
                            //    , 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',
                                type: "GET",
                                data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
                                success: function (result) {
                                    if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                        listOption.data = result.data.list;
                                        table.render(listOption);
                                        listOption1.data = result.data.list2;
                                        table.render(listOption1);
                                        //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;
                                        }
                                        $("#HSumQtys").val(count);
                                        $("#HBarCodeQtys").val(count1);
                                        //return;
                                    }
                                    else {
                                        layer.msg(result.Message);
                                    }
                                    layer.closeAll("loading");
                                }
                            });
@@ -985,6 +1249,8 @@
        function GetHSpValue(obj) {  //返回调入仓位
            $("#HStockPlaceName").val(obj[0].HName);
            $("#HStockPlaceID").val(obj[0].HItemID);
            $("#HWHNAME").val(obj[0].HWhName);
            $("#HWHID").val(obj[0].HWHID);
        }
        //function GetHSupValue(obj) {  //返回供应商
        //    $("#HSupName").val(obj[0].HName);