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>
@@ -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 () {
@@ -593,6 +649,7 @@
            }
            if (event.keyCode == 13) {
                if (sBarCode == '') {
                    playSound();
                    layer.msg("条码为空,不能扫描!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
                }
@@ -605,9 +662,10 @@
                $.ajax({ 
                    url: GetWEBURL() + "/MateOutBill/get_CheckTypeByBarCode_Json",
                    type: "GET",
                    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": 0 },
                    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)
@@ -636,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: "温馨提示" });
                        }
@@ -644,6 +703,17 @@
                });
            }
        });
        function playSound() {
            var audio = document.getElementById("cs");
            audio.play();
        }
        function playSound1() {
            var audio = document.getElementById("cs2");
            audio.play();
        }
        //扫源单号
        $('#HSourceBillNo').on('keydown', function (event) {
@@ -659,6 +729,7 @@
                    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');  //跳转页签
@@ -690,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: "温馨提示" });
                        }