diff --git a/src/api/index.js b/src/api/index.js index 448cad7..1d6bca9 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,78 +1,69 @@ -import request from '@/utils/request' - -// 入/出库数量 -export const getMonthCount = () => { +import request from "@/utils/request"; +// 获取月统计、当前入库类型统计、物资类型统计接口 +export const getHomeState = (data) => { return request({ - url: '/stat/month/summary', - method: 'get' - }) -} + url: "/stat/home", + method: "post", + data: data, + }); +}; +// 入库类型统计 - 时间查询 +export const getInTypeByTime = (data) => { + return request({ + url: "/stat/inTypeByTime", + method: "post", + data: data, + }); +}; +// 出库类型统计 - 时间查询 +export const getOutTypeByTime = (data) => { + return request({ + url: "/stat/outTypeByTime", + method: "post", + data: data, + }); +}; +// 通知公告展示 +export const getNoticeList= () => { + return request({ + url: "/system/notice/list", + method: "get", + }); +}; // 预警 + 库龄统计(库龄超过30/60天统计) export const getAgeLong = () => { return request({ - url: '/stat/stockAge/stat', - method: 'get' - }) -} + url: "/stat/stockAge/stat", + method: "get", + }); +}; // 仓库使用率 export const getInventoryReview = () => { return request({ - url: '/stat/warehouse/slot', - method: 'get' - }) -} + url: "/stat/warehouse/slot", + method: "get", + }); +}; // 待办事项(应到未到统计) export const getWait = (params) => { return request({ - url: '/stat/todo', - method: 'get', - params - }) -} + url: "/stat/todo", + method: "get", + params, + }); +}; -// 当前入库类型统计(根据入库类型统计项目数,条目数,总金额) -export const getInStorage = () => { - return request({ - url: '/stat/type/summary', - method: 'get' - }) -} - -// 物资类型统计 -export const getGoodsType = () => { - return request({ - url: '/stat/stock/wlType', - method: 'get' - }) -} // 入/出库指标统计(天级出入库统计) export const getDailyInventory = (params) => { return request({ - url: '/stat/week/daily', - method: 'get', - params - }) -} + url: "/stat/week/daily", + method: "get", + params, + }); +}; -// 根据出库类型,自定义时间筛选统计入库情况 -export const getInventoryType = (params) => { - return request({ - url: '/stat/type/range', - method: 'get', - params - }) -} - -// 根据入库类型,自定义时间筛选统计出库情况 -export const getOutInventoryType = (params) => { - return request({ - url: '/stat/type/out/range', - method: 'get', - params - }) -} diff --git a/src/views/index.vue b/src/views/index.vue index 83fec86..9021328 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,34 +1,40 @@ - + 月项目数(入库) - - {{ countObj.inSummary.projectCount }} + + + + {{ countObj.monthInCount }} - + 月条目数(入库) - - {{ countObj.inSummary.itemCount }} + + + + {{ countObj.monthInProjectCount }} - + 月总金额(入库) - - {{ countObj.inSummary.amountHt }} + + + + {{ countObj.monthInAmount }} - + + 月项目数(出库) - - {{ countObj.outSummary.projectCount }} + + + + {{ countObj.monthOutCount }} - + 月条目数(出库) - - {{ countObj.outSummary.itemCount }} + + + + {{ countObj.monthOutProjectCount }} - + 月总金额(出库) - - {{ countObj.outSummary.amountHt }} + + + + {{ countObj.monthOutAmount }} - + @@ -114,7 +126,9 @@ 库龄统计 - + + + @@ -180,21 +194,21 @@ 9999 待盘点 --> - + - {{scope.row.type}} + {{ scope.row.type }} - - - + + + - + @@ -254,13 +268,17 @@ - + - {{ item.noticeTitle }} - 详情 + + {{ + item.noticeTitle }} + 详情 + - + @@ -273,15 +291,8 @@ 入库类型统计 - + 搜索 @@ -294,15 +305,8 @@ 出库类型统计 - + 搜索 @@ -311,22 +315,22 @@ - - - - - - - - - - - + - + @@ -397,41 +401,45 @@