接口对接

This commit is contained in:
zzyuan 2025-07-25 16:07:21 +08:00
parent de77702934
commit e7be67291b
5 changed files with 123 additions and 41 deletions

View File

@ -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) {

View File

@ -25,10 +25,21 @@ 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",
},
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",

View File

@ -11,7 +11,7 @@
<div>
<div style="display: flex;justify-content: space-between;width: 70%;" v-if="Number(item.rate)>=0">
<div style="font-size: 0.75rem;color: #07B78A;">
同比昨日 +{{item.rate}}
同比上次 +{{item.rate}}
</div>
<div>
<img src="@/assets/images/up.png" style="width: 18px;height: 18px;">
@ -19,7 +19,7 @@
</div>
<div style="display: flex;justify-content: space-between;width: 70%;" v-if="Number(item.rate)<0">
<div style="font-size: 0.75rem;color: #d81e06;">
同比昨日 {{item.rate}}
同比上次 {{item.rate}}
</div>
<div>
<img src="@/assets/images/down.png" style="width: 18px;height: 18px;">

View File

@ -4,8 +4,8 @@
<h3 style="font-weight: 600;">数据总览</h3>
<div style="background: #fff;">
<el-tabs v-model="activeName" @tab-click="handleTabClick" type="card">
<el-tab-pane label="本" name="1"></el-tab-pane>
<el-tab-pane label="本" name="2"></el-tab-pane>
<el-tab-pane label="本" name="1"></el-tab-pane>
<el-tab-pane label="本" name="2"></el-tab-pane>
<el-tab-pane label="累计" name="3"></el-tab-pane>
</el-tabs>
</div>
@ -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() {

View File

@ -44,16 +44,26 @@
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true" />
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" />
<el-table-column label="货品仓库" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="发生时间" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="发生人员" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
<el-table-column label="发生时间" align="center" prop="outDate" :show-overflow-tooltip="true" />
<el-table-column label="发生人员" align="center" prop="userId" :show-overflow-tooltip="true" />
<el-table-column label="数据来源" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="出入库类型" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="业务单据" align="center" prop="" :show-overflow-tooltip="true" width="180"/>
<el-table-column label="出入库数量" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="出入库金额(元)" align="center" prop="" width="130" :show-overflow-tooltip="true" >
<el-table-column label="出入库类型" align="center" prop="outType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<!-- <span>{{ (scope.row.lastOrderGoodsPrice/100).toFixed(2) }}</span> -->
<span v-if="scope.row.outType==1">领取出库</span>
<span v-if="scope.row.outType==2">报损出库</span>
<span v-if="scope.row.outType==3">退货出库</span>
<span v-if="scope.row.outType==4">调拨出库</span>
<span v-if="scope.row.outType==5">即入即出</span>
<span v-if="scope.row.outType==6">超市出库</span>
<span v-if="scope.row.outType==7">盘点出库</span>
</template>
</el-table-column>
<el-table-column label="业务单据" align="center" prop="recordId" :show-overflow-tooltip="true" width="180"/>
<el-table-column label="出入库数量" align="center" prop="outNum" :show-overflow-tooltip="true"/>
<el-table-column label="出入库金额(元)" align="center" prop="outAmount" width="130" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<span>{{ (scope.row.outAmount/100).toFixed(2) }}</span>
</template>
</el-table-column>
</el-table>
@ -113,13 +123,25 @@
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true" />
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" />
<el-table-column label="货品仓库" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="当前库存数量" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="当前库存总额" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="总入库数量" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="入库总额" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="总出库数量" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="出库总额" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
<el-table-column label="当前库存数量" align="center" prop="balanceCount" :show-overflow-tooltip="true" />
<el-table-column label="当前库存总额" align="center" prop="balanceAmount" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.balanceAmount/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="总入库数量" align="center" prop="intoNum" :show-overflow-tooltip="true" />
<el-table-column label="入库总额" align="center" prop="intoAmount" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.intoAmount/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="总出库数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
<el-table-column label="出库总额" align="center" prop="outAmount" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.outAmount/100).toFixed(2) }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total2>0"
@ -136,7 +158,7 @@
<script>
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;