LocationNumMonitor.js 2.54 KB
//请求玻布仓库位数据
function LoadBB() {
    $.ajax({
        async: false,
        url: "/monitor/LocationNumMonitor/GetLocations",
        type: "post",
        data: { type: "YCL_WareCell" },
        dataType: "json",
        success: function (data) {
            Num = data.data
            $("#BB1").html(Num.EmptyNum)
            $("#BB2").html(Num.EmptyConNum)
            $("#BB3").html(Num.SomeNum)
            $("#BB4").html(Num.LockNum)
        }
    });
}
//请求外卖仓库位数据
function LoadPJ() {
    $.ajax({
        async: false,
        url: "/monitor/LocationNumMonitor/GetLocations",
        type: "post",
        data: { type: "PPJ_WareCell" },
        dataType: "json",
        success: function (data) {
            Num = data.data
            $("#PJ1").html(Num.EmptyNum)
            $("#PJ2").html(Num.EmptyConNum)
            $("#PJ3").html(Num.SomeNum)
            $("#PJ4").html(Num.LockNum)
        }
    });
}
//请求自用仓库位数据
function LoadPP() {
    $.ajax({
        async: false,
        url: "/monitor/LocationNumMonitor/GetLocations",
        type: "post",
        data: { type: "PPP_WareCell" },
        dataType: "json",
        success: function (data) {
            Num = data.data
            $("#PP1").html(Num.EmptyNum)
            $("#PP2").html(Num.EmptyConNum)
            $("#PP3").html(Num.SomeNum)
            $("#PP4").html(Num.LockNum)
        }
    });
}
//请求铜箔仓库位数据
function LoadTB() {
    $.ajax({
        async: false,
        url: "/monitor/LocationNumMonitor/GetLocations",
        type: "post",
        data: { type: "TB_WareCell" },
        dataType: "json",
        success: function (data) {
            Num = data.data
            $("#TB1").html(Num.EmptyNum)
            $("#TB2").html(Num.EmptyConNum)
            $("#TB3").html(Num.SomeNum)
            $("#TB4").html(Num.LockNum)
        }
    });
}
//请求成品仓库位数据
function LoadCP() {
    $.ajax({
        async: false,
        url: "/monitor/LocationNumMonitor/GetLocations",
        type: "post",
        data: { type: "CP_WareCell" },
        dataType: "json",
        success: function (data) {
            Num = data.data
            $("#CP1").html(Num.EmptyNum)
            $("#CP2").html(Num.EmptyConNum)
            $("#CP3").html(Num.SomeNum)
            $("#CP4").html(Num.LockNum)
        }
    });
}
function Loaddata() {
    LoadBB();
    LoadPJ();
    LoadPP();
    LoadTB();
    LoadCP();
}

//初始加载
$(document).ready(function () {
    Loaddata();
    window.setInterval("Loaddata()", 30000);
});