feat(wms): 添加发货单时间范围查询功能

在基板面板中新增发货单时间范围选择器,并调整后端接口以支持格式化日期参数
This commit is contained in:
砂糖
2026-04-03 14:40:53 +08:00
parent 0d4d7f4235
commit b9da0d6d76
2 changed files with 13 additions and 2 deletions

View File

@@ -48,6 +48,11 @@
<MaterialSelect :hideType="hideType" :itemId.sync="queryParams.itemIds" :itemType.sync="queryParams.itemType" <MaterialSelect :hideType="hideType" :itemId.sync="queryParams.itemIds" :itemType.sync="queryParams.itemType"
:multiple="true" /> :multiple="true" />
<el-form-item label="发货单时间">
<el-date-picker v-if="showWaybill" v-model="queryParams.shipmentTime" type="daterange" value-format="yyyy-MM-dd HH:mm:ss"
range-separator="" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item>
<el-form-item v-if="editNext" label="显示流程图" prop="showProcessFlow"> <el-form-item v-if="editNext" label="显示流程图" prop="showProcessFlow">
<el-checkbox v-model="showProcessFlow" @change="handleShowProcessFlowChange"></el-checkbox> <el-checkbox v-model="showProcessFlow" @change="handleShowProcessFlowChange"></el-checkbox>
</el-form-item> </el-form-item>
@@ -1006,6 +1011,11 @@ export default {
// 如果没有设置itemType则设置为raw_material // 如果没有设置itemType则设置为raw_material
query.selectType = this.querys.materialType === '原料' ? 'raw_material' : 'product'; query.selectType = this.querys.materialType === '原料' ? 'raw_material' : 'product';
if (this.showWaybill) { if (this.showWaybill) {
const { shipmentTime, ...query } = {
...this.queryParams,
startTime: this.queryParams.shipmentTime?.[0],
endTime: this.queryParams.shipmentTime?.[1],
}
listBoundCoil(query).then(res => { listBoundCoil(query).then(res => {
this.materialCoilList = res.rows || []; this.materialCoilList = res.rows || [];
this.total = res.total; this.total = res.total;

View File

@@ -3,6 +3,7 @@ package com.klp.controller;
import java.util.List; import java.util.List;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.klp.domain.vo.WmsMaterialCoilBindVo; import com.klp.domain.vo.WmsMaterialCoilBindVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@@ -119,8 +120,8 @@ public class WmsDeliveryWaybillDetailController extends BaseController {
public TableDataInfo<WmsMaterialCoilBindVo> boundCoilList( public TableDataInfo<WmsMaterialCoilBindVo> boundCoilList(
WmsMaterialCoilBo bo, WmsMaterialCoilBo bo,
PageQuery pageQuery, PageQuery pageQuery,
@RequestParam(required = false) Date startTime, @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startTime,
@RequestParam(required = false) Date endTime) { @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime) {
List<Long> boundCoilIds; List<Long> boundCoilIds;
if (startTime != null || endTime != null) { if (startTime != null || endTime != null) {
boundCoilIds = iWmsDeliveryWaybillDetailService.getBoundCoilIdsByTimeRange(startTime, endTime); boundCoilIds = iWmsDeliveryWaybillDetailService.getBoundCoilIdsByTimeRange(startTime, endTime);