diff --git a/js/accessory/inventory_statistics_list.js b/js/accessory/inventory_statistics_list.js index c0d5f3c..9f53e25 100644 --- a/js/accessory/inventory_statistics_list.js +++ b/js/accessory/inventory_statistics_list.js @@ -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)); } \ No newline at end of file diff --git a/page/accessory/inventory_statistics_list.html b/page/accessory/inventory_statistics_list.html index 904db04..c9d0d47 100644 --- a/page/accessory/inventory_statistics_list.html +++ b/page/accessory/inventory_statistics_list.html @@ -40,7 +40,7 @@
配件类型
0
+0
类
配件库存
0
件
配件价值
0
元
配件预警(库存为0)
200
+0
类