1
yusijie
2023-03-07 3b401deb561bc4fba4b8e16ceb065aeff8b1c031
WebTM/views/ÁìÁÏ·¢»õ/ÁìÁϳö¿â/Kf_MateOutBill_Fast.html
@@ -395,7 +395,7 @@
                , table = layui.table
                , form = layui.form
                , element = layui.element;
            //将session的值赋值给界面控件,session值来源与上一次数据选择
            $("#HWHID").val(sessionStorage["HWHID"]);
            $("#HWHNAME").val(sessionStorage["HWHName"]);
            $("#HStockPlaceID").val(sessionStorage["HSPID"]);
@@ -413,10 +413,10 @@
            $("#HMakerID").hide();
            $("#HBillerID").val(sessionStorage["HBillerID"]);
            $("#HBillerID").hide();
            var HSourceFlag = sessionStorage["SourceFlag"];
            var HSourceFlag = sessionStorage["SourceFlag"];//源单已标记
            //获取参数
            //获取参数(获取跳转过来的参数)
            function getUrlVars() {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
@@ -427,6 +427,8 @@
                }
                return vars;
            }
            var params = getUrlVars();
            var linterid = params[params[0]]; //从参数中获取 å•据内码
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
@@ -462,8 +464,7 @@
                //编辑加载数据
                var sInterID = $("#HInterID").val();
                table.render({
                    elem: '#wl-table'
                    //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
                    elem: '#wl-table'
                    , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
                    , toolbar: '#toolbarDemo'
                    , where: { HBillID: sInterID, HBillType: '1204', sWhere: '' }
@@ -488,8 +489,6 @@
                });
            }
            //动态加载源单类型列表 new
            //表头初始化赋值(根据登录用户获取 é»˜è®¤ä»“库、部门、验收、保管、金蝶用户) new
@@ -498,7 +497,7 @@
            //默认带入的仓库,如果启用仓位则仓位有效,如果没有启用则仓位灰度 new
            //判断是否新增
            //判断是否新增,如果是新增单据则获取最大单号和最大内码
            if (linterid == null || linterid == 0) {
                $("#HInterID").val("");
                $("#HBillNo").val("");
@@ -518,7 +517,7 @@
                RoadBillSub(linterid);
            }
            //选择仓库
            //选择仓库(事件)
            form.on('submit(HWHID-BT)', function () {
                layer.open({
                    type: 2
@@ -534,7 +533,8 @@
                    }
                })
            });
            //选择仓库
            //选择仓库(事件)
            form.on('submit(HFIFOWHID-BT)', function () {
                layer.open({
                    type: 2
@@ -550,7 +550,7 @@
                    }
                })
            });
            //选择仓位
            //选择仓位(事件)
            form.on('submit(HSpID-BT)', function () {
                layer.open({
                    type: 2
@@ -566,7 +566,7 @@
                    }
                })
            });
            //选择供应商
            //选择供应商(事件)
            form.on('submit(HSupID-BT)', function () {
                layer.open({
                    type: 2
@@ -583,39 +583,9 @@
                })
            });
            //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//弹窗类型
@@ -638,7 +608,7 @@
                    , btn2: function (index, layero) { }
                })
            });
            //选择发货
            //选择发货(事件)
            form.on('submit(HSecManagerID-BT)', function (data) {
                layer.open({
                    type: 2//弹窗类型
@@ -662,7 +632,7 @@
                })
            });
            //选择部门
            //选择部门(事件)
            form.on('submit(HDeptID-BT)', function () {
                layer.open({
                    type: 2
@@ -679,16 +649,17 @@
                })
            });
            //退出按钮(事件)
            form.on('submit(Cancel)', function () {
                sessionStorage["SourceFlag"] = false;
                //parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
                layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
                    window.history.back();
                    parent.location.href = "../../../views/index_Mobile.html";
                });
            })
            //编辑
            //编辑按钮(事件)
            form.on('submit(cmdModify)', function () {//编辑
                var sSubStr = table.cache['wl-table'];
                //if (AllowLoadData(sSubStr) != false) {//非空验证
@@ -708,34 +679,9 @@
                // }
            });
            //$('#HStockPlaceName').on('keydown', function (event) {      //扫仓位
            //    var HBarCode = $('#HStockPlaceName').val()
            //    if (event.keyCode == 13) {
            //        //判断文本框是否有数据    new
            //        $.ajax({
            //            url: GetWEBURL() + "/Web/GetSpName_Json",
            //            type: "GET",
            //            data: { "HBarCode": HBarCode },
            //            success: function (result) {
            //                if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
            //                    $("#HStockPlaceName").val(result.data[0].HName);
            //                    $("#HStockPlaceID").val(result.data[0].HItemID);
            //                    $("#HWHID").val(result.data[0].HWHID);
            //                    $("#HWHNAME").val(result.data[0].HWhName);
            //                    element.tabChange('tab-MateOutBill', '2');
            //                }
            //                else {
            //                    layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //                }
            //                layer.closeAll("loading");
            //            }
            //        });
            //    }
            //});
            //扫仓位
            //扫仓位条码事件
            $('#HStockPlaceName').on('keydown', function (event) {      //扫仓位
                var HBarCode = $('#HStockPlaceName').val()
                if (event.keyCode == 13) {
@@ -1019,7 +965,6 @@
                    data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] },
                    success: function (result) {
                        if (result.count == 1) {
                            if (result.data.HBarType == '仓库条码') {
                                $("#HWHNAME").val(result.data.HWhName);
                                $("#HWHID").val(result.data.HWhID);
@@ -1136,6 +1081,7 @@
                    }
                });
            }
            var listOption = {
                elem: '#wl-table'
                , toolbar: '#toolbarDemo'
@@ -1156,12 +1102,15 @@
                        , { 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");
                audio.play();
@@ -1194,7 +1143,7 @@
                        $("#HBillType").attr("disabled", "true");
                        element.tabChange('tab-MateOutBill', '2');
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            playSound1();
                            playSound1();//播放声音
                            layer.load(3)
                            $.ajax({
                                url: GetWEBURL() + '/MateOutBill/DisBillEntryList_Webs_New_Json1',
@@ -1269,10 +1218,10 @@
        function AllowLoadData(sSubStr) {  //非空验证
            //数字正则(包含小数)
            var reg = /^\d+(\.\d+)?$/;
            if (reg.test($("#HQty").val()) == false || $("#HQty").val() == '') {
                layer.msg("数量必须为数量或小数", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            //if (reg.test($("#HQty").val()) == false || $("#HQty").val() == '') {
            //    layer.msg("数量必须为数量或小数", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //    return false;
            //}
            //if ($("#HSourceBillNo").val() == '') {
            //    layer.msg("请先扫源单!", { icon: 5 });
            //    return false;