feat(biz): 优化销售出库单功能并完善库存管理

This commit is contained in:
zxy 2026-05-19 15:30:58 +08:00
parent de339b5b2b
commit 83d18ec270
3 changed files with 15 additions and 13 deletions

View File

@ -2,6 +2,7 @@ package com.ningxia.yunxi.chemmes.module.biz.controller.admin.prostorageinventor
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@ -100,6 +101,7 @@ public class ProStorageInventoryRespVO {
@Schema(description = "最早入库日期") @Schema(description = "最早入库日期")
@ExcelProperty("最早入库日期") @ExcelProperty("最早入库日期")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate earStoreDate; private LocalDate earStoreDate;
@Schema(description = "生产计划id", example = "21309") @Schema(description = "生产计划id", example = "21309")

View File

@ -7,6 +7,8 @@ import com.ningxia.yunxi.chemmes.module.biz.controller.admin.prostorageinventory
import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.prostorageinventory.ProStorageInventoryDO; import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.prostorageinventory.ProStorageInventoryDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.math.BigDecimal;
/** /**
* 成品库存 Mapper * 成品库存 Mapper
* *
@ -31,15 +33,10 @@ public interface ProStorageInventoryMapper extends BaseMapperX<ProStorageInvento
.eqIfPresent(ProStorageInventoryDO::getLotNo, reqVO.getLotNo()) .eqIfPresent(ProStorageInventoryDO::getLotNo, reqVO.getLotNo())
.betweenIfPresent(ProStorageInventoryDO::getCreateTime, reqVO.getCreateTime()) .betweenIfPresent(ProStorageInventoryDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(ProStorageInventoryDO::getDescription, reqVO.getDescription()) .eqIfPresent(ProStorageInventoryDO::getDescription, reqVO.getDescription())
.eqIfPresent(ProStorageInventoryDO::getYardQty, reqVO.getYardQty())
.eqIfPresent(ProStorageInventoryDO::getUseQty, reqVO.getUseQty())
.eqIfPresent(ProStorageInventoryDO::getPreQty, reqVO.getPreQty())
.eqIfPresent(ProStorageInventoryDO::getPrice, reqVO.getPrice())
.eqIfPresent(ProStorageInventoryDO::getPackQty, reqVO.getPackQty())
.eqIfPresent(ProStorageInventoryDO::getBagSpec, reqVO.getBagSpec())
.betweenIfPresent(ProStorageInventoryDO::getEarStoreDate, reqVO.getEarStoreDate()) .betweenIfPresent(ProStorageInventoryDO::getEarStoreDate, reqVO.getEarStoreDate())
.eqIfPresent(ProStorageInventoryDO::getPlanId, reqVO.getPlanId()) .eqIfPresent(ProStorageInventoryDO::getPlanId, reqVO.getPlanId())
.eqIfPresent(ProStorageInventoryDO::getProNo, reqVO.getProNo()) .eqIfPresent(ProStorageInventoryDO::getProNo, reqVO.getProNo())
.gt(reqVO.getYardQty() != null && reqVO.getYardQty().compareTo(BigDecimal.ONE) == 0, ProStorageInventoryDO::getYardQty, 0)
.orderByDesc(ProStorageInventoryDO::getId)); .orderByDesc(ProStorageInventoryDO::getId));
} }

View File

@ -52,16 +52,16 @@
> >
<el-table-column type="selection" width="50px" align="center" /> <el-table-column type="selection" width="50px" align="center" />
<el-table-column label="序号" type="index" width="60px" align="center" /> <el-table-column label="序号" type="index" width="60px" align="center" />
<el-table-column label="仓库" align="center" prop="storeHouseName" width="120px" /> <el-table-column label="仓库" align="center" prop="storeHouseName" width="130px" />
<el-table-column label="库区" align="center" prop="storeAreaName" width="120px" /> <el-table-column label="库区" align="center" prop="storeAreaName" width="130px" />
<el-table-column label="批次号" align="center" prop="lotNo" width="120px" /> <el-table-column label="批次号" align="center" prop="lotNo" width="130px" />
<el-table-column label="库存袋数" align="center" prop="packQty" width="100px" /> <el-table-column label="库存袋数" align="center" prop="packQty" width="100px" />
<el-table-column label="单袋规格" align="center" prop="bagSpec" width="100px" /> <el-table-column label="单袋规格" align="center" prop="bagSpec" width="100px" />
<el-table-column label="库存数量" align="center" prop="yardQty" width="100px" /> <el-table-column label="库存数量" align="center" prop="yardQty" width="120px" />
<el-table-column label="最早入库日期" align="center" prop="earStoreDate" width="130px" /> <el-table-column label="最早入库日期" align="center" prop="earStoreDate" width="130px" />
<el-table-column label="产品编码" align="center" prop="matCode" width="120px" /> <el-table-column label="产品编码" align="center" prop="matCode" width="130px" />
<el-table-column label="产品名称" align="center" prop="matName" width="180px" /> <el-table-column label="产品名称" align="center" prop="matName" width="180px" />
<el-table-column label="规格型号" align="center" prop="spec" width="120px" /> <el-table-column label="规格型号" align="center" prop="spec" width="130px" />
<el-table-column label="单位" align="center" prop="unit" width="90px"> <el-table-column label="单位" align="center" prop="unit" width="90px">
<template #default="scope"> <template #default="scope">
{{ getUnitName(scope.row.unit) }} {{ getUnitName(scope.row.unit) }}
@ -133,6 +133,7 @@ const queryParams = reactive({
pageSize: 10, pageSize: 10,
storeHouseId: undefined, storeHouseId: undefined,
storeAreaId: undefined, storeAreaId: undefined,
yardQty: 1,
}) })
// store_type = '3' // store_type = '3'
@ -179,7 +180,7 @@ const getList = async () => {
loading.value = true loading.value = true
try { try {
const params: any = { const params: any = {
...queryParams ...queryParams,
} }
@ -228,6 +229,8 @@ const resetQuery = () => {
queryParams.storeAreaId = undefined queryParams.storeAreaId = undefined
queryParams.matName = undefined queryParams.matName = undefined
queryParams.spec = undefined queryParams.spec = undefined
queryParams.yardQty = 1
queryParams.pageNo = 1 queryParams.pageNo = 1
storeAreaList.value = [] storeAreaList.value = []
// //