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