|
|
@ -1,4 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
$(() => {
|
|
|
|
$(() => {
|
|
|
|
let fun2 = () => {
|
|
|
|
let fun2 = () => {
|
|
|
|
//生产计划
|
|
|
|
//生产计划
|
|
|
@ -34,59 +33,60 @@ $(() => {
|
|
|
|
|
|
|
|
|
|
|
|
let fun = () => {
|
|
|
|
let fun = () => {
|
|
|
|
//当前库存统计
|
|
|
|
//当前库存统计
|
|
|
|
$.getJSON(`/storage/getStoreStatistics?ids=${ids}`, function (result) {
|
|
|
|
// $.getJSON(`/storage/getStoreStatistics?ids=${ids}`, function (result) {
|
|
|
|
multipleThreeDimensionalCylindrical(result, document.getElementById("theCurrentInventory"), 2);
|
|
|
|
// multipleThreeDimensionalCylindrical(result, document.getElementById("theCurrentInventory"), 2);
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
//库位参数
|
|
|
|
//库位参数
|
|
|
|
$.getJSON(`/storage/getParamJson?ids=${ids}`, function (result) {
|
|
|
|
$.getJSON(`/storage/getParamJson?ids=${ids}`, function (result) {
|
|
|
|
//单日出入库统计
|
|
|
|
//单日出入库统计
|
|
|
|
storageStatistics(result[0] == null ? 0 : result[0], result[1] == null ? 0 : result[1], result[2] == null ? 0 : result[2], result[3] == null ? 0 : result[3]);
|
|
|
|
storageStatistics(result[0] == null ? 0 : result[0], result[1] == null ? 0 : result[1], result[2] == null ? 0 : result[2], result[3] == null ? 0 : result[3]);
|
|
|
|
//当前库存统计
|
|
|
|
|
|
|
|
$.getJSON('/tankShell/getMaterialStoreJson', function (result) {
|
|
|
|
|
|
|
|
multipleThreeDimensionalCylindrical(result, document.getElementById("theCurrentInventory"));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//库位参数
|
|
|
|
})
|
|
|
|
$.getJSON(`/storage/getParamJson?ids=${ids}`, function (result) {
|
|
|
|
//当前库存统计
|
|
|
|
|
|
|
|
$.getJSON('/tankShell/getMaterialStoreJson', function (result) {
|
|
|
|
|
|
|
|
multipleThreeDimensionalCylindrical(result, document.getElementById("theCurrentInventory"));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//库位参数
|
|
|
|
|
|
|
|
$.getJSON(`/storage/getParamJson?ids=${ids}`, function (result) {
|
|
|
|
|
|
|
|
|
|
|
|
console.log(result);
|
|
|
|
console.log(result);
|
|
|
|
|
|
|
|
|
|
|
|
//单日出入库统计
|
|
|
|
//单日出入库统计
|
|
|
|
storageStatistics(result.inStoreLeftCount, result.outStoreLeftCount, result.inStoreRightCount, result.outStoreRightCount);
|
|
|
|
storageStatistics(result.inStoreLeftCount, result.outStoreLeftCount, result.inStoreRightCount, result.outStoreRightCount);
|
|
|
|
|
|
|
|
|
|
|
|
//库存统计
|
|
|
|
//库存统计
|
|
|
|
// $("#emptyLocation-left").text(result[4] == null ? 0 : result[4]);
|
|
|
|
// $("#emptyLocation-left").text(result[4] == null ? 0 : result[4]);
|
|
|
|
// $("#haveUsedLocation-left").text(result[6] == null ? 0 : result[5]);
|
|
|
|
// $("#haveUsedLocation-left").text(result[6] == null ? 0 : result[5]);
|
|
|
|
// $("#emptyLocation-right").text(result[5] == null ? 0 : result[6]);
|
|
|
|
// $("#emptyLocation-right").text(result[5] == null ? 0 : result[6]);
|
|
|
|
// $("#haveUsedLocation-right").text(result[7] == null ? 0 : result[7]);
|
|
|
|
// $("#haveUsedLocation-right").text(result[7] == null ? 0 : result[7]);
|
|
|
|
//库存统计
|
|
|
|
//库存统计
|
|
|
|
$("#emptyLocation-left").text(result.freeStoreLeftCount);
|
|
|
|
$("#emptyLocation-left").text(result.freeStoreLeftCount);
|
|
|
|
$("#haveUsedLocation-left").text(result.useStoreLeftCount);
|
|
|
|
$("#haveUsedLocation-left").text(result.useStoreLeftCount);
|
|
|
|
$("#emptyLocation-right").text(result.freeStoreRightCount);
|
|
|
|
$("#emptyLocation-right").text(result.freeStoreRightCount);
|
|
|
|
$("#haveUsedLocation-right").text(result.useStoreRightCount);
|
|
|
|
$("#haveUsedLocation-right").text(result.useStoreRightCount);
|
|
|
|
|
|
|
|
|
|
|
|
//库位占比
|
|
|
|
//库位占比
|
|
|
|
// $("#emptyLocationNumber").text(result[8] == null ? 0 : result[8]);
|
|
|
|
// $("#emptyLocationNumber").text(result[8] == null ? 0 : result[8]);
|
|
|
|
// $("#emptyLocationRatio").text(result[9] == null ? 0 : result[9]);
|
|
|
|
// $("#emptyLocationRatio").text(result[9] == null ? 0 : result[9]);
|
|
|
|
// $("#haveUsedLocationNumber").text(result[10] == null ? 0 : result[10]);
|
|
|
|
// $("#haveUsedLocationNumber").text(result[10] == null ? 0 : result[10]);
|
|
|
|
// $("#haveUsedLocationRatio").text(result[11] == null ? 0 : result[11]);
|
|
|
|
// $("#haveUsedLocationRatio").text(result[11] == null ? 0 : result[11]);
|
|
|
|
//库位占比
|
|
|
|
//库位占比
|
|
|
|
$("#emptyLocationNumber").text(result.freeStoreCount);
|
|
|
|
$("#emptyLocationNumber").text(result.freeStoreCount);
|
|
|
|
$("#emptyLocationRatio").text(GetPercent(result.freeStoreCount, 312));
|
|
|
|
$("#emptyLocationRatio").text(GetPercent(result.freeStoreCount, 312));
|
|
|
|
$("#haveUsedLocationNumber").text(result.useStoreCount);
|
|
|
|
$("#haveUsedLocationNumber").text(result.useStoreCount);
|
|
|
|
$("#haveUsedLocationRatio").text(GetPercent(result.useStoreCount, 312));
|
|
|
|
$("#haveUsedLocationRatio").text(GetPercent(result.useStoreCount, 312));
|
|
|
|
|
|
|
|
|
|
|
|
//百分比
|
|
|
|
//百分比
|
|
|
|
function GetPercent(num, total) {
|
|
|
|
function GetPercent(num, total) {
|
|
|
|
num = parseFloat(num);
|
|
|
|
num = parseFloat(num);
|
|
|
|
total = parseFloat(total);
|
|
|
|
total = parseFloat(total);
|
|
|
|
if (isNaN(num) || isNaN(total)) {
|
|
|
|
if (isNaN(num) || isNaN(total)) {
|
|
|
|
return "-";
|
|
|
|
return "-";
|
|
|
|
}
|
|
|
|
|
|
|
|
return total <= 0 ? "0%" : (Math.round(num / total * 10000) / 100.00) + "%";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return total <= 0 ? "0%" : (Math.round(num / total * 10000) / 100.00) + "%";
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
setTimeout(fun, 10000)
|
|
|
|
setTimeout(fun, 10000)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fun()
|
|
|
|
fun()
|
|
|
|