库存统计
This commit is contained in:
parent
8ca5691202
commit
4233327b61
|
|
@ -10,8 +10,9 @@ layui.use(["form", "table"], function () {
|
|||
|
||||
// 数据概览
|
||||
function getStatistics() {
|
||||
let url = dataUrl + 'backstage/planOut/getStatistics';
|
||||
ajaxRequest(url, "POST", null, true, function () {
|
||||
let encryptedData = {};
|
||||
let url = dataUrl + 'backstage/statistic/getPaTypeStatistics?encryptedData=' + encodeURIComponent(JSON.stringify(encryptedData));
|
||||
ajaxRequest(url, "GET", null, true, function () {
|
||||
}, function (result) {
|
||||
console.log(result);
|
||||
if (result.code === 200) {
|
||||
|
|
@ -23,11 +24,10 @@ function getStatistics() {
|
|||
|
||||
// 数据概览赋值
|
||||
function setNum(obj) {
|
||||
$('#totalNum').html(obj.needNum);
|
||||
$('#dfhNum').html(obj.dfhNum);
|
||||
$('#fhNum').html(obj.fhNum);
|
||||
$('#overNum').html(obj.overNum);
|
||||
$('#noPlanNum').html(obj.noPlanNum);
|
||||
$('#warn').html(parseInt(obj.warn));
|
||||
$('#money').html(obj.money);
|
||||
$('#type').html(parseInt(obj.type));
|
||||
$('#kcNum').html(parseInt(obj.kcNum));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ function initTable() {
|
|||
authorization: sessionStorage.getItem("gz-token"),
|
||||
},
|
||||
height: "full-300",
|
||||
url: dataUrl + "backstage/planOut/getProPlanPage",
|
||||
url: dataUrl + "backstage/statistic/findByPage",
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'type': $('#type').val(),
|
||||
|
|
@ -109,42 +109,42 @@ function initTable() {
|
|||
},
|
||||
},
|
||||
{
|
||||
field: "proName",
|
||||
field: "type",
|
||||
width: '15%',
|
||||
title: "配件类型",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "planNum",
|
||||
field: "name",
|
||||
width: '15%',
|
||||
title: "配件名称",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "recordNum",
|
||||
field: "model",
|
||||
width: '15%',
|
||||
title: "规格型号 ",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "status",
|
||||
field: "unit",
|
||||
title: "计量单位",
|
||||
width: '15%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "lastDay",
|
||||
field: "num",
|
||||
width: '15%',
|
||||
title: "库存数量",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "progress",
|
||||
field: "price",
|
||||
width: '15%',
|
||||
title: "平均单价(元)",
|
||||
unresize: true,
|
||||
|
|
@ -165,9 +165,11 @@ function initTable() {
|
|||
// 导出
|
||||
function exportExcel() {
|
||||
let params = {
|
||||
'proName': $('#proName').val(),
|
||||
'type': $('#type').val(),
|
||||
'name': $('#name').val(),
|
||||
'model': $('#model').val(),
|
||||
'status': $('#status').val()
|
||||
}
|
||||
let url = dataUrl + "backstage/export/exportFhList";
|
||||
let url = dataUrl + "backstage/statistic/exportPaTypeList";
|
||||
exportExcelUtil(url, '机具公司发货数据', JSON.stringify(params));
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
<div class="layout num-title">
|
||||
<p>配件类型</p>
|
||||
<div class="layout">
|
||||
<p class="num-style" id="totalNum">0</p>
|
||||
<p class="num-style" id="type">0</p>
|
||||
<p class="unit-class">类</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
<div class="layout num-title">
|
||||
<p>配件库存</p>
|
||||
<div class="layout">
|
||||
<p class="num-style" id="dfhNum"></p>
|
||||
<p class="num-style" id="kcNum">0</p>
|
||||
<p class="unit-class">件</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
<div class="layout num-title">
|
||||
<p>配件价值</p>
|
||||
<div class="layout">
|
||||
<p class="num-style" id="fhNum"></p>
|
||||
<p class="num-style" id="money">0</p>
|
||||
<p class="unit-class">元</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
<div class="layout num-title">
|
||||
<p>配件预警(库存为0)</p>
|
||||
<div class="layout">
|
||||
<p class="num-style">200</p>
|
||||
<p class="num-style" id="warn">0</p>
|
||||
<p class="unit-class">类</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue