feat(purchase): 采购页搜索区对齐出库记录版式

原顶部工具栏是裸 div + 状态单选,现改为 el-form :inline 版式,与出库记录 /
报废记录一致:

  状态      全部 / 待审批 / 已通过 / 已驳回 / 已完成 / 已完结
  搜索      [搜索类型下拉] + 关键词输入,500ms 防抖
  采购日期  日期范围选择
  按钮      查询 / 重置 / 新建采购申请

交互细节:
· 搜索类型切换、清空输入时立即查询(取消防抖等待);
· 「重置」恢复默认的「待审批」状态(该页默认视图),而非清成"全部"——
  与页面初始状态保持一致;
· 重置同时清空关键词、搜索类型、日期范围。

api/purchase.ts 的 getPurchaseList 补充新参数的类型定义。
This commit is contained in:
yueli
2026-09-10 17:41:29 +08:00
parent e93107458a
commit 6f2f077751
2 changed files with 120 additions and 18 deletions

View File

@ -46,10 +46,18 @@ export interface Approver {
}
// 获取采购申请列表
//
// 搜索参数语义与出库/报废记录保持一致:
// search_type: all / no(单号) / name(物料名称) / spec_model / requester(申请人)
// start_date / end_date: 按采购日期过滤
export function getPurchaseList(params: {
page?: number
limit?: number
status?: number
status?: number | ''
keyword?: string
search_type?: 'all' | 'no' | 'name' | 'spec_model' | 'requester'
start_date?: string
end_date?: string
}) {
return request({
url: '/purchase',