feat: 新增订单日期范围筛选、明细管理与分类接口

1. 为订单和订单明细BO新增签订、交货日期范围查询字段并配置日期格式化
2. 实现订单日期范围筛选逻辑,新增日期加一天工具方法处理带时间字段的范围查询
3. 重构订单明细列表查询逻辑,支持按合同号、需方、日期范围关联主表筛选
4. 新增通用分类管理接口与页面
5. 优化合同列表页面,新增详情编辑跳转与日期范围筛选
6. 新增订单明细全量查询与单订单明细编辑页面
This commit is contained in:
王文昊
2026-05-16 14:20:30 +08:00
parent dc9c4547fd
commit 52f92c1d69
10 changed files with 2104 additions and 40 deletions

View File

@@ -3,21 +3,43 @@
<!-- 筛选区和按钮操作区合并 -->
<div class="filter-section" style="padding: 10px; border-bottom: 1px solid #e4e7ed;">
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;">
<div style="display: flex; align-items: center; gap: 4px;">
<div style="display: flex; align-items: center; gap: 4px; flex-wrap: wrap;">
<el-input v-model="queryParams.keyword" placeholder="请输入关键字" clearable
@keyup.enter.native="handleQuery" />
@keyup.enter.native="handleQuery" style="width: 160px;" />
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">筛选</el-button>
<el-button icon="el-icon-sort" size="mini" @click="toggleMoreFilter"
:type="showMoreFilter ? 'primary' : 'default'">
<!-- {{ showMoreFilter ? '收起' : '更多' }} -->
</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="$emit('add')"></el-button>
</div>
<div style="font-size: 12px; color: #909399;">
<span style="color: #409eff; font-weight: bold;">{{ total }}</span> 条记录
</div>
</div>
<!-- 日期范围筛选行 -->
<div style="display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 4px;">
<div style="display: flex; align-items: center; gap: 4px; font-size: 13px; color: #606266;">
<span style="white-space: nowrap;">签订日期</span>
<el-date-picker clearable v-model="queryParams.signDateStart" type="date" value-format="yyyy-MM-dd"
placeholder="签订日期开始" style="width: 180px;" />
<span>~</span>
<el-date-picker clearable v-model="queryParams.signDateEnd" type="date" value-format="yyyy-MM-dd"
placeholder="签订日期结束" style="width: 180px;" />
</div>
<div style="display: flex; align-items: center; gap: 4px; font-size: 13px; color: #606266;">
<span style="white-space: nowrap;">交货日期</span>
<el-date-picker clearable v-model="queryParams.deliveryDateStart" type="date" value-format="yyyy-MM-dd"
placeholder="交货开始日期" style="width: 180px;" />
<span>~</span>
<el-date-picker clearable v-model="queryParams.deliveryDateEnd" type="date" value-format="yyyy-MM-dd"
placeholder="交货结束日期" style="width: 180px;" />
</div>
</div>
<!-- 更多筛选条件 -->
<div v-show="showMoreFilter" class="more-filter"
style="margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e4e7ed;">
style="margin-top: 8px; padding-top: 10px; border-top: 1px dashed #e4e7ed;">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="80px">
<el-form-item label="合同名称" prop="contractName">
<el-input v-model="queryParams.contractName" placeholder="请输入合同名称" clearable
@@ -37,16 +59,6 @@
<el-form-item label="需方" prop="customer">
<el-input v-model="queryParams.customer" placeholder="请输入需方" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="签订时间" prop="signTime">
<el-date-picker clearable v-model="queryParams.signTime" type="date" value-format="yyyy-MM-dd"
placeholder="请选择签订时间">
</el-date-picker>
</el-form-item>
<el-form-item label="交货日期" prop="deliveryDate">
<el-date-picker clearable v-model="queryParams.deliveryDate" type="date" value-format="yyyy-MM-dd"
placeholder="请选择交货日期">
</el-date-picker>
</el-form-item>
<el-form-item label="签订地点" prop="signLocation">
<el-input v-model="queryParams.signLocation" placeholder="请输入签订地点" clearable
@keyup.enter.native="handleQuery" />
@@ -107,6 +119,7 @@
<!-- 操作按钮独占一行 -->
<div style="display: flex; gap: 10px; padding-top: 8px; border-top: 1px dashed #f0f0f0;">
<el-button size="mini" type="text" :icon="row.isTop ? 'el-icon-top' : 'el-icon-s-operation'" @click.stop="handleToggleTop(row)">{{ row.isTop ? '取消置顶' : '置顶' }}</el-button>
<el-button size="mini" type="text" icon="el-icon-document" @click.stop="$emit('detailEdit', row)">详情编辑</el-button>
<el-button size="mini" type="text" icon="el-icon-download" @click.stop="handleExport(row)">导出</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="$emit('update', row)">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="$emit('delete', row)">删除</el-button>
@@ -155,8 +168,10 @@ export default {
contractCode: undefined,
supplier: undefined,
customer: undefined,
signTime: undefined,
deliveryDate: undefined,
signDateStart: undefined,
signDateEnd: undefined,
deliveryDateStart: undefined,
deliveryDateEnd: undefined,
signLocation: undefined,
status: undefined,
},
@@ -204,6 +219,10 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.$refs["queryForm"].resetFields();
this.queryParams.signDateStart = undefined;
this.queryParams.signDateEnd = undefined;
this.queryParams.deliveryDateStart = undefined;
this.queryParams.deliveryDateEnd = undefined;
this.handleQuery();
},