diff --git a/src/api/foodManage/index.js b/src/api/foodManage/index.js index c0f15fcf..feb5659a 100644 --- a/src/api/foodManage/index.js +++ b/src/api/foodManage/index.js @@ -1,5 +1,19 @@ import request from '@/utils/request' +// 首页数据总览 +export function getIndexDataApi(data) { + return request({ + url: '/smart-canteen/ims_report_inventory_base/getIndexData', + method: 'get', + headers: { + //"merchant-id":"378915229716713472", + }, + params:data + }) +} + + + // 实时查询供应商评分-排名 export function supplierScorePageApi(data) { return request({ @@ -20,10 +34,3 @@ export function supplierScorePageApi(data) { - - - - - - - diff --git a/src/api/foodManage/stockReport.js b/src/api/foodManage/stockReport.js index 67cdf819..67707497 100644 --- a/src/api/foodManage/stockReport.js +++ b/src/api/foodManage/stockReport.js @@ -25,10 +25,10 @@ export function stockExpireWarningPageApi(data) { }) } -//查询出入库明细 -export function stockInoutWarningPageApi(data) { +//出入库流水 +export function stockInoutFlowingPageApi(data) { return request({ - url: '/smart-canteen/api/v1/drpinventory/inout/warning', + url: '/smart-canteen/ims_report_inventory_base/out_into/flowing/page', method: 'get', headers: { //"merchant-id":"378915229716713472", @@ -36,3 +36,14 @@ export function stockInoutWarningPageApi(data) { params:data }) } +//出入库统计 +export function stockInoutStatisticsPageApi(data) { + return request({ + url: '/smart-canteen/ims_report_inventory_base/out_into/statistics/page', + method: 'get', + headers: { + //"merchant-id":"378915229716713472", + }, + params:data + }) +} \ No newline at end of file diff --git a/src/views/foodManage/dashboard/PanelGroup.vue b/src/views/foodManage/dashboard/PanelGroup.vue index c642fa7f..45eeb57d 100644 --- a/src/views/foodManage/dashboard/PanelGroup.vue +++ b/src/views/foodManage/dashboard/PanelGroup.vue @@ -11,7 +11,7 @@
- 同比昨日 +{{item.rate}}% + 同比上次 +{{item.rate}}%
@@ -19,7 +19,7 @@
- 同比昨日 {{item.rate}}% + 同比上次 {{item.rate}}%
diff --git a/src/views/foodManage/index.vue b/src/views/foodManage/index.vue index e1a6d2c2..0c6f0c38 100644 --- a/src/views/foodManage/index.vue +++ b/src/views/foodManage/index.vue @@ -4,8 +4,8 @@

数据总览

- - + +
@@ -76,6 +76,7 @@ import { getDataScreeningModelApi, getProportionOfOrderTypesApi } from "@/api/index"; import { + getIndexDataApi, supplierScorePageApi } from "@/api/foodManage/index"; @@ -148,7 +149,7 @@ export default { } }, mounted(){ - // this.getTopData() + this.getTopData() this.InitEChartsOne() this.InitEChartsTwo() this.InitEChartsThree() @@ -173,10 +174,51 @@ export default { }, handleTabClick(){ console.log(this.activeName) + this.getTopData() }, getTopData(){ - getDataScreeningModelApi({}).then((response) => { - this.topAreaOptions = response.data.data; + getIndexDataApi({type:this.activeName}).then((response) => { + this.topAreaOptions = [ + { + "num": response.data.totalOrderAmount.thisNum, + "rate": response.data.totalOrderAmount.percent, + "name": "采购订单总额(元)" + },{ + "num": response.data.totalOrderNum.thisNum, + "rate": response.data.totalOrderNum.percent, + "name": "采购订单数量(个)" + }, + { + "num": response.data.unFinshOrderNum.thisNum, + "rate": response.data.unFinshOrderNum.percent, + "name": "未验收完成采购订单数(个)" + }, + { + "num": response.data.totalOrderGoodsNum.thisNum, + "rate": response.data.totalOrderGoodsNum.percent, + "name": "采购订单货品总数" + }, + { + "num": response.data.storeNum.thisNum, + "rate": response.data.storeNum.percent, + "name": "入库货品数量" + }, + { + "num": response.data.outboundNum.thisNum, + "rate": response.data.outboundNum.percent, + "name": "出库货品数量" + }, + { + "num": response.data.storeAmount.thisNum, + "rate": response.data.storeAmount.percent, + "name": "入库总金额(元)" + }, + { + "num": response.data.outboundAmount.thisNum, + "rate": response.data.outboundAmount.percent, + "name": "出库总金额(元)" + } + ]; }); }, InitEChartsOne() { diff --git a/src/views/foodManage/stockReport/inoutDetails/index.vue b/src/views/foodManage/stockReport/inoutDetails/index.vue index 3271cc2b..c3220a34 100644 --- a/src/views/foodManage/stockReport/inoutDetails/index.vue +++ b/src/views/foodManage/stockReport/inoutDetails/index.vue @@ -44,16 +44,26 @@ - - - + + + - - - - + + + + + + @@ -113,13 +123,25 @@ - - - - - - - + + + + + + + + + + + + + import { systemAreaTreeApi } from "@/api/base/stall"; import { drpWareHousePageApi } from "@/api/foodManage/stockManage"; -import { stockInoutWarningPageApi } from "@/api/foodManage/stockReport"; +import { stockInoutFlowingPageApi,stockInoutStatisticsPageApi } from "@/api/foodManage/stockReport"; export default { name: "", @@ -277,13 +299,13 @@ export default { "materialName": this.queryParams.materialName, } if(this.dateRange&&this.dateRange.length>0){ - param.startDateTime=this.formatDateTime(this.dateRange[0]) - param.endDateTime=this.formatDateTime(this.dateRange[1]) + param.startDate=this.formatDateTime(this.dateRange[0]) + param.endDate=this.formatDateTime(this.dateRange[1]) }else{ - param.startDateTime=undefined; - param.endDateTime=undefined; + param.startDate=undefined; + param.endDate=undefined; } - stockInoutWarningPageApi(param).then(response => { + stockInoutFlowingPageApi(param).then(response => { this.tableListData = response.rows; this.total = Number(response.total); this.loading = false; @@ -306,11 +328,11 @@ export default { let param = { "pageNum": this.queryParams2.pageNum, "pageSize": this.queryParams2.pageSize, - "areaId": this.queryParams2.areaId, - "warehouseId": this.queryParams2.warehouseId, + "areaIdList": [this.queryParams2.areaId], + "warehouseIdList": [this.queryParams2.warehouseId], "materialName": this.queryParams2.materialName } - stockInoutWarningPageApi(param).then(response => { + stockInoutStatisticsPageApi(param).then(response => { this.tableListData2 = response.rows; this.total2 = Number(response.total); this.loading = false;