From 4233327b6164162e7eca53c193e1c1e1e6065e2b Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Fri, 15 Nov 2024 14:09:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/accessory/inventory_statistics_list.js | 34 ++++++++++--------- page/accessory/inventory_statistics_list.html | 8 ++--- 2 files changed, 22 insertions(+), 20 deletions(-) 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

@@ -54,7 +54,7 @@

配件库存

-

+

0

@@ -68,7 +68,7 @@

配件价值

-

+

0

@@ -82,7 +82,7 @@

配件预警(库存为0)

-

200

+

0