接口修改

This commit is contained in:
zzyuan 2025-07-18 15:16:22 +08:00
parent 24ff935bc8
commit cb2cae0b43
6 changed files with 48 additions and 42 deletions

View File

@ -23,7 +23,7 @@ export function getMaterialListApi(data) {
// 查询货品库存列表
export function getStockMaterialListApi(data) {
return request({
url: '/smart-canteen/ims/inventory/list',
url: '/smart-canteen/api/v1/drpinventory/list',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",

View File

@ -23,7 +23,7 @@ export function getMaterialListApi(data) {
// 查询货品库存列表
export function getStockMaterialListApi(data) {
return request({
url: '/smart-canteen/ims/inventory/list',
url: '/smart-canteen/api/v1/drpinventory/list',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",

View File

@ -88,7 +88,7 @@ export function supplierPageApi(data) {
// 查询货品库存列表
export function getStockMaterialListApi(data) {
return request({
url: '/smart-canteen/ims/inventory/list',
url: '/smart-canteen/api/v1/drpinventory/list',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",

View File

@ -77,9 +77,9 @@
<span>{{ (scope.row.price/100).toFixed(2)||"" }}</span>
</template>
</el-table-column> -->
<el-table-column label="账面总额(元)" align="center" prop="totalPrice" :show-overflow-tooltip="true" width="120">
<el-table-column label="账面总额(元)" align="center" prop="bookAmount" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<span>{{ scope.row.bookNum*(scope.row.price/100) }}</span>
<span>{{ (scope.row.bookAmount/100).toFixed(2)||"" }}</span>
</template>
</el-table-column>
<el-table-column label="实盘总额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
@ -403,8 +403,8 @@ export default {
"categoryIds": this.queryParams.materialTypeIds,
}
getCheckInventoryMaterialPageApi(param).then(response => {
this.tableListData = response.data;
// this.total = Number(response.total);
this.tableListData = response.rows;
this.total = Number(response.total);
this.loading = false;
});
},

View File

@ -21,7 +21,10 @@
</el-select>
</el-form-item>
<el-form-item label="货品名称" prop="materialName">
<el-input v-model="queryParams.materialName" placeholder="请输入货品名称" maxlength="20" clearable style="width: 240px"/>
<el-input v-model="queryParams.materialName" placeholder="请输入货品名称" maxlength="30" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="批次号" prop="intoCode">
<el-input v-model="queryParams.intoCode" placeholder="请输入批次号" maxlength="30" clearable style="width: 240px"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -43,18 +46,26 @@
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
<el-table-column label="当前库存数" align="center" prop="materialNum" :show-overflow-tooltip="true" />
<el-table-column label="最小库存" align="center" prop="minNum" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="最大库存" align="center" prop="maxNum" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="库存状态" align="center" prop="inventoryStatus" :show-overflow-tooltip="true" width="120">
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.inventoryStatus==1">正常</span>
<span v-if="scope.row.inventoryStatus==2">即将缺货</span>
<span v-if="scope.row.inventoryStatus==3">超额</span>
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
<el-table-column label="数据来源" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="批次号" align="center" prop="intoCode" :show-overflow-tooltip="true" />
<el-table-column label="当前批次库存数" align="center" prop="inventoryNum" :show-overflow-tooltip="true" />
<el-table-column label="当前批次总金额(元)" align="center" prop="totalMoney" :show-overflow-tooltip="true" />
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" />
<el-table-column label="保质期" align="center" prop="expireTime" :show-overflow-tooltip="true" />
<el-table-column label="过期状态" align="center" prop="expireState" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<span v-if="scope.row.expireState==1">过期</span>
<span v-if="scope.row.expireState==2">保质期内</span>
</template>
</el-table-column>
<el-table-column label="剩余天数" align="center" prop="expireDay" :show-overflow-tooltip="true" width="120"/>
</el-table>
<pagination
@ -185,6 +196,7 @@ export default {
"areaId": this.queryParams.areaId,
"warehouseId": this.queryParams.warehouseId,
"materialName": this.queryParams.materialName,
"intoCode": this.queryParams.intoCode,
}
stockExpireWarningPageApi(param).then(response => {
this.tableListData = response.rows;

View File

@ -21,10 +21,7 @@
</el-select>
</el-form-item>
<el-form-item label="货品名称" prop="materialName">
<el-input v-model="queryParams.materialName" placeholder="请输入货品名称" maxlength="30" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="批次号" prop="intoCode">
<el-input v-model="queryParams.intoCode" placeholder="请输入批次号" maxlength="30" clearable style="width: 240px"/>
<el-input v-model="queryParams.materialName" placeholder="请输入货品名称" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -46,26 +43,18 @@
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
<el-table-column label="数据来源" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="批次号" align="center" prop="intoCode" :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="supplierName" :show-overflow-tooltip="true" />
<el-table-column label="保质期" align="center" prop="expireTime" :show-overflow-tooltip="true" />
<el-table-column label="过期状态" align="center" prop="" :show-overflow-tooltip="true" width="120">
<!-- <template slot-scope="scope">
<span v-if="scope.row.inventoryStatus==1">过期</span>
<span v-if="scope.row.inventoryStatus==2">保质期内</span>
</template> -->
<el-table-column label="当前库存数" align="center" prop="materialNum" :show-overflow-tooltip="true" />
<el-table-column label="最小库存" align="center" prop="minNum" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="最大库存" align="center" prop="maxNum" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="库存状态" align="center" prop="inventoryStatus" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<span v-if="scope.row.inventoryStatus==1">正常</span>
<span v-if="scope.row.inventoryStatus==2">即将缺货</span>
<span v-if="scope.row.inventoryStatus==3">超额</span>
</template>
</el-table-column>
<el-table-column label="剩余天数" align="center" prop="maxNum" :show-overflow-tooltip="true" width="120"/>
</el-table>
<pagination
@ -196,10 +185,15 @@ export default {
"areaId": this.queryParams.areaId,
"warehouseId": this.queryParams.warehouseId,
"materialName": this.queryParams.materialName,
"intoCode": this.queryParams.intoCode,
}
stockInventoryWarningPageApi(param).then(response => {
this.tableListData = response.rows;
this.tableListData.forEach(item=>{
let arr = item.limitRange.split("~")
item.minNum = arr[0]
item.maxNum = arr[1]
})
this.total = Number(response.total);
this.loading = false;
});