zzr99
2022-02-16 9bb36642205ada0adfbc79ec030cafe0f6bcd923
nothing
1个文件已修改
212 ■■■■■ 已修改文件
WebTM/views/验收入库/外购入库/Kf_POStockInBill_Fast.html 212 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Kf_POStockInBill_Fast.html
@@ -406,8 +406,7 @@
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            //加载表头
            function RoadBillMain(linterid)
            {
            function RoadBillMain(linterid) {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetPonderationBill",
                    type: "GET",
@@ -430,8 +429,7 @@
                })
            }
            //根据源单类型及源单号 åŠ è½½ä¾›åº”å•†
            function RoadSup()
            {
            function RoadSup() {
                //var sInterID = $("#HInterID").val()
                var HSourceBillNo = $('#HSourceBillNo').val()
                var sInterID = $("#HInterID").val()
@@ -466,8 +464,7 @@
                }
            }
            //加载表体
            function RoadBillSub(linterid)
            {
            function RoadBillSub(linterid) {
                table.render({
                    elem: '#wl-table'
                    , url: GetWEBURL() + '/POStockInBill/DisBillEntryList_Webs_Json'
@@ -834,7 +831,6 @@
                        return false;
                    }
                }
                  //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//非空验证
                                $.ajax({
                                    url: GetWEBURL() + "/POStockInBill/get_CheckTypeByBarCode_Json",
                                    type: "GET",
@@ -842,66 +838,6 @@
                                    success: function (result) {
                                        if (result.count == 1) {
                                            playSound1();
                                            if (result.data.HBarType == '仓库条码') {
                                                $("#HWHNAME").val(result.data.HWhName);
                                                $("#HWHID").val(result.data.HWhID);
                                                $("#HStockPlaceName").val("");
                                                $("#HNote").val(";一键扫码仓库条码");
                                                element.tabChange('tab-POStockInBill', '2');  //跳转页签
                                            }
                                            else if (result.data.HBarType == '仓位条码') {
                                                $("#HStockPlaceName").val(result.data.HSPName);
                                                $("#HStockPlaceID").val(result.data.HSPID);
                                                $("#HWHNAME").val(result.data.HWhName);
                                                $("#HWHID").val(result.data.HWhID);
                                                $("#HNote").val(";一键扫码仓位条码");
                                                element.tabChange('tab-POStockInBill', '2');//跳转页签
                                            }
                                            else if (result.data.HBarType == '部门条码') {
                                                $("#HDeptName").val(result.data.HDeptName);
                                                $("#HDeptID").val(result.data.HDeptID);
                                                $("#HNote").val(";一键扫码部门条码");
                                                element.tabChange('tab-POStockInBill', '2');//跳转页签
                                            }
                                            else if (result.data.HBarType == '源单条码') {
                                                $("#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 == "1102") {
                                                    $("#HBillType").val("1102");
                // var Flag = sessionStorage["SourceFlag"];
                if (sQty == "") {
                    sQty = 0;
                }
                if (event.keyCode == 13) {
                    //判断条码是否为空  new
                    if (sBarCode == '') {
                        layer.msg("条码为空,不能扫描!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return false;
                    }
                    if (sBarCode != "") {
                        $('#HBarCode').val("");
                    }
                    if (sQty != "") {
                        $('#HQty').val("");
                    }
                    if (sHWHID == "184154") {
                        if (sHSPID == "0") {
                            layer.msg("仓位为空,请选择仓位!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            return false;
                        }
                    }
                    //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//非空验证
                    $.ajax({
                        url: GetWEBURL() + "/POStockInBill/get_CheckTypeByBarCode_Json",
                        type: "GET",
                        data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": true, "sSourceBillNo": sSourceBillNo, "sSourceType": '1103', "HOWNERID": sessionStorage["OrganizationID"] },
                        success: function (result) {
                            if (result.count == 1) {
                                if (result.data.HBarType == '仓库条码') {
                                    $("#HWHNAME").val(result.data.HWhName);
                                    $("#HWHID").val(result.data.HWhID);
@@ -958,85 +894,17 @@
                                        //获取源单类型、源单单号
                                        if (result.data.hSourceBillTypeField == "1102") {
                                            $("#HBillType").val("1102");
                                                    }
                                                    else if (result.data.hSourceBillTypeField == "1103") {
                                                        $("#HBillType").val("1103");
                                                    }
                                                    else {
                                                        $("#HBillType").val("手工录入");
                                                    }
                                                    $("#HNote").val(";物料条码");
                                                    element.tabChange('tab-POStockInBill', '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() + '/POStockInBill/DisBillEntryList_Webs_Json'
                                                  , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
                                                  , cellMinWidth : 115
                                                  , cols: [[
                                                      { type: 'radio' }
                                                      , { field: 'HQty', title: '数量', sort: true, width:100 }
                                                      , { field: 'HQtyMust', title: '应收数量', sort: true, width: 100 }
                                                      , { field: 'HMaterNumber', title: '物料代码', sort: true, width: 200}
                                                      , { field: 'HMaterName', title: '物料名称', sort: true, width: 200}
                                                      , { field: 'HMaterModel', title: '规格型号', sort: true, width: 200}
                                                      , { field: 'HSourceInterID', title: '源单主内码', sort: true, width: 200}
                                                      , { field: 'HSourceEntryID', title: '源单子内码', sort: true, width: 200}
                                                      , { field: 'HSourceBillNo', title: '源单单号', sort: true, width: 200}
                                                      , { field: 'HBatchNo', title: '批次', sort: true, width: 200}
                                                  ]]
                                                  , height: 500
                                                  , done: function () {
                                                      layer.closeAll("loading");
                                                  }
                                            });
                                        }
                                        else {
                                            // $("#verifycode").click();
                                            //layer.msg(result.Message, { icon: 5 });
                                            playSound();
                                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                        }
                                        layer.closeAll("loading");
                                    },
                                    error: function (err) {
                                        playSound();
                                        layer.msg("接口请求异常:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                        console.log(err);
                                    }
                                });
                            }
                            //else
                            //{
                            //    layer.msg(result.Message, { icon: 5 });
                            //}
                            //layer.closeAll("loading");
            //}
        });
                                        }
                                        else if (result.data.hSourceBillTypeField == "1103") {
                                            $("#HBillType").val("1103");
                                        }
                                        else {
                                            $("#HBillType").val("手工录入");
                                        }
                                        $("#HNote").val(";物料条码");
                                        element.tabChange('tab-POStockInBill', '3');
                                    }
                                }
                                layer.load(3)
                                layer.load(3)
                                $.ajax({
                                    url: GetWEBURL() + '/MateOutBill/DisBillEntryList_Webs_New_Json1',
                                    type: "GET",
                                    data: { HBillID: sInterID, HBillType: '1204', sWhere: '' },
                                    data: { HBillID: sInterID, HBillType: '1201', sWhere: '' },
                                    success: function (result) {
                                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                            listOption.data = result.data.list;
@@ -1059,6 +927,7 @@
                                });
                            }
                            else {
                                playSound();
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                            layer.closeAll("loading");
@@ -1099,74 +968,7 @@
            audio.play();
        }
        //扫源单
        $('#HSourceBillNo').on('keydown', function (event) {      //扫源单
            var HSourceBillNo = $('#HSourceBillNo').val()
            var sInterID = $("#HInterID").val()
            var sBillNo = $("#HBillNo").val()
            var HSourceBillType = $("#HBillType").val()
            if (event.keyCode == 13) {
                //判断文本框是否有数据    new
                if (HSourceBillNo == "" || sInterID <= 0) {
                    playSound();
                    layer.msg("源单号为空,或者内码不存在!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                //
                $.ajax({
                    //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                    url: GetWEBURL() + "/POStockInBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                    type: "GET",
                    data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            playSound1();
                            $("#HSupID").val(result.data[0].HSupID);
                            $("#HSupName").val(result.data[0].HSupName);
                            //$("#HDeptID").val(result.data[0].HDeptID);
                            //$("#HDeptName").val(result.data[0].HDeptName);
                            sessionStorage["SourceFlag"] = true;
                            layer.load(3);
                            element.tabChange('tab-POStockInBill', '2');
                            table.render({
                                elem: '#wl-table'
                                , cellMinWidth: 80
                              //, url: 'http://61.130.49.162:9090/WMSAPI///POStockInBill/DisBillEntryList_Webs_Json'
                               , url: GetWEBURL() + '/POStockInBill/DisBillEntryList_Webs_Json'
                              //, toolbar: '#toolbarDemo'
                              , where: { HBillID: sInterID, HBillType: '1201', sWhere: '' }
                              , cols: [[
                                  { type: 'radio' }
                                  , { field: 'HQty', title: '数量', sort: true, width: 100}
                                  , { field: 'HQtyMust', title: '应收数量', sort: true, width: 100}
                                  , { field: 'HMaterNumber', title: '物料代码', sort: true, width: 200}
                                  , { field: 'HMaterName', title: '物料名称', sort: true, width: 200}
                                  , { field: 'HMaterModel', title: '规格型号', sort: true, width: 200}
                                  , { field: 'HSourceInterID', title: '源单主内码', sort: true, width: 200}
                                  , { field: 'HSourceEntryID', title: '源单子内码', sort: true, width: 200}
                                  , { field: 'HSourceBillNo', title: '源单单号', sort: true, width: 200}
                                , { field: 'HBatchNo', title: '批次'}
                              ]]
                                // , data: [linterid]
                                // , page: true
                              , height: 500
                              , done: function () {
                                  layer.closeAll("loading");
                              }
                            });
                        }
                        else {
                            // $("#verifycode").click();
                            //layer.msg(result.Message, { icon: 5 });
                            playSound();
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                        layer.closeAll("loading");
                    }
                });
               // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
            }
        });
            //扫源单
            $('#HSourceBillNo').on('keydown', function (event) {      //扫源单
                var HSourceBillNo = $('#HSourceBillNo').val()