YL
2022-02-15 400728b318589a0638de1b815c79a7320f760dbc
WebTM/views/ÁìÁÏ·¢»õ/ίÍâ³ö¿â/Kf_EntrustOutBill_Fast.html
@@ -174,8 +174,8 @@
                            </div>
                            <!--明细清单-->
                            <!--<div class="layui-tab-item">
                                <table class="layui-hide" id="mx-table" lay-filter="mx-table"></table>
                            </div>-->
                <table class="layui-hide" id="mx-table" lay-filter="mx-table"></table>
            </div>-->
                            <!--日志-->
                            <div class="layui-tab-item">
                                <textarea id="rizhi" style="height: 200px;width: 100%;margin-left: 1%;"></textarea>
@@ -189,7 +189,16 @@
                        <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">删除</button>
                        <button type="button" lay-submit="" class="layui-btn" lay-filter="Cancel">退出</button>
                    </div>
                    <div id="" style="display:none;">
                        <audio id="cs" hidden controls>
                            <source src="../../video/jingbao.wav" type="audio/ogg">
                        </audio>
                    </div>
                    <div id="" style="display:none;">
                        <audio id="cs2" hidden controls>
                            <source src="../../video/success.wav" type="audio/ogg">
                        </audio>
                    </div>
                </form>
            </div>
        </div>
@@ -198,7 +207,7 @@
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/timeFormat/timeFormat.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
@@ -421,40 +430,87 @@
            })
        });
        //选择保管
        ////选择保管
        //form.on('submit(HKeeperID-BT)', function () {//选择保管
        //    layer.open({
        //        type: 2
        //        , area: ['100%', '100%']
        //        , title: '发料人列表'
        //        , shade: 0.6 //遮罩透明度
        //        , maxmin: true //允许全屏最小化
        //        , anim: 0 //0-6的动画形式,-1不开启
        //        , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
        //        , resize: false
        //        , cancel: function () {
        //            //$(".layui-btn").removeClass("layui-btn-disabled");
        //        }
        //    })
        //});
        ////选择验收
        //form.on('submit(HSecManagerID-BT)', function (data) {//选择验收
        //    var sMainStr = JSON.stringify(data.field);
        //    layer.open({
        //        type: 2
        //        , area: ['100%', '100%']
        //        , title: '领料人列表'
        //        , shade: 0.6 //遮罩透明度
        //        , maxmin: true //允许全屏最小化
        //        , anim: 0 //0-6的动画形式,-1不开启
        //        , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HSecManager', 'yes']
        //        , resize: false
        //        , cancel: function () {
        //            //$(".layui-btn").removeClass("layui-btn-disabled");
        //        }
        //    })
        //});
        form.on('submit(HKeeperID-BT)', function () {//选择保管
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '发料人列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '职员列表'//标题
                , shift: 2//弹出动画
                , content: ['../../PublicPage/UserInformation.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    $("#HKeeper").val(checkStatus.data[0].HName);
                    $("#HKeeperID").val(checkStatus.data[0].HItemID);
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        });
        form.on('submit(HSecManagerID-BT)', function (data) {//选择发货
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '职员列表'//标题
                , shift: 2//弹出动画
                , content: ['../../PublicPage/UserInformation.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    $("#HSecManager").val(checkStatus.data[0].HName);
                    $("#HSecManagerID").val(checkStatus.data[0].HItemID);
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        });
        //选择验收
        form.on('submit(HSecManagerID-BT)', function (data) {//选择验收
            var sMainStr = JSON.stringify(data.field);
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '领料人列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HSecManager', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
        //选择部门
        form.on('submit(HDeptID-BT)', function () {
@@ -585,32 +641,15 @@
            var sQty = $("#HQty").val()
            var sWHID = $("#HWHID").val()
            var sSPID = $("#HSupID").val()
            //var Flag = sessionStorage["SourceFlag"];
            var sHBillType = $("#HBillType").val()
            var sSourceBillNo = $("#HSourceBillNo").val()
            var Flag = sessionStorage["SourceFlag"];
            if (sQty == "") {
                sQty = 0;
            }
            //if ($("#HDeptName").val() == '') {
            //    layer.msg("部门没有选择!", { icon: 5 });
            //    return false;
            //}
            //if ($("#HSecManager").val() == '') {
            //    layer.msg("领料人没有选择!", { icon: 5 });
            //    return false;
            //}
            //if ($("#HKeeper").val() == '') {
            //    layer.msg("发料人没有选择!", { icon: 5 });
            //    return false;
            //}
            //if ($("#HSupName").val() == '') {
            //    layer.msg("供应商没有选择!", { icon: 5 });
            //    return false;
            //}
            //if ($("#HWHNAME").val() == '') {
            //    layer.msg("仓库没有选择!", { icon: 5 });
            //    return false;
            //}
            if (event.keyCode == 13) {
                if (sBarCode == '') {
                    playSound();
                    layer.msg("条码为空,不能扫描!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
                }
@@ -621,11 +660,12 @@
                    $('#HQty').val("");
                }
                $.ajax({ 
                    url: GetWEBURL() + "/EntrustOut/get_InfoByBarCode_Source_Entrust_Json",
                    url: GetWEBURL() + "/MateOutBill/get_CheckTypeByBarCode_Json",
                    type: "GET",
                    data: { "sBarCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sQty": sQty, "sWHID": sWHID, "sSPID": sSPID },
                    data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": '1211', "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sWHID, "SPID": sSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": Flag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] },
                    success:function(result){
                        if (result.count == 1) {
                            playSound1();
                            $("#rizhi").val(RZ += Format(new Date(), "yyyy-MM-dd hh:mm:ss.S") + "扫条码,成功\n");
                            element.tabChange('tab-EntrustOutBill', '3');  //跳转页签
                            layer.load(3)
@@ -654,6 +694,7 @@
                            });
                        }
                        else {
                            playSound();
                            $("#rizhi").val(RZ += Format(new Date(), "yyyy-MM-dd hh:mm:ss.S") + "扫条码,失败\n");
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
@@ -663,20 +704,32 @@
            }
        });
        function playSound() {
            var audio = document.getElementById("cs");
            audio.play();
        }
        function playSound1() {
            var audio = document.getElementById("cs2");
            audio.play();
        }
        //扫源单号
        $('#HSourceBillNo').on('keydown', function (event) {
            var sSourceBillNo = $('#HSourceBillNo').val()
            var sNewInterID = $("#HInterID").val()
            var sNewBillNo = $("#HBillNo").val()
            var HSourceBillNo = $('#HSourceBillNo').val()
            var sInterID = $("#HInterID").val()
            var sBillNo = $("#HBillNo").val()
            var HSourceBillType = $("#HBillType").val();
            if (event.keyCode == 13) {
                $.ajax({
                    //url: "http://61.130.49.162:9090/WMSAPI///EntrustOut/set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json",
                    url: GetWEBURL() + "/EntrustOut/set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json",
                    type: "GET",
                    data: { "sNewInterID": sNewInterID, "sNewBillNo": sNewBillNo, "sSourceBillNo": sSourceBillNo, "HSourceBillType": HSourceBillType },
                    data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            playSound1();
                            $("#rizhi").val(RZ += Format(new Date(), "yyyy-MM-dd hh:mm:ss.S") + "扫源单号,成功\n");
                            sessionStorage["SourceFlag"] = true;
                            element.tabChange('tab-EntrustOutBill', '2');  //跳转页签
@@ -686,7 +739,7 @@
                                // , url: 'http://61.130.49.162:9090/WMSAPI///EntrustOut/DisBillEntryList_Entrust_Webs_Json'
                              , url: GetWEBURL() + '/EntrustOut/DisBillEntryList_Entrust_Webs_Json'
                              , toolbar: '#toolbarDemo'
                              , where: { HBillID: sNewInterID, HBillType: '1211', sWhere: '' }
                                , where: { HBillID: sInterID, HBillType: '1211', sWhere: '' }
                              , cols: [[
                                  { type: 'radio' }
                                , { field: 'HQty', title: '数量', width: 150 }
@@ -708,6 +761,7 @@
                            });
                        }
                        else {
                            playSound();
                            $("#rizhi").val(RZ += Format(new Date(), "yyyy-MM-dd hh:mm:ss.S") + "扫源单号,失败\n");
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }