feat(purchase): 采购单号改为 批次-批内序号 格式,显式体现同批

按用户原始逻辑还原并扩展:
- 单号格式: PUR-日期-时间-批次-批内序号
  例: PUR-20260831-1021-0001-0001(今日第1次采购的第1条)
- generate_request_no 支持 batch_seq 参数生成批次+批内序号
- 新增 GET /purchase/next-batch-seq 返回今日下一个批次号
- 前端提交时获取批次号,同批所有行共享,循环提交生成连续批内序号
- 批次识别: 单号去掉末尾 -批内序号 即为批次前缀
- 保留旧格式兼容(无 batch_seq 时回退 PUR-日期-时间-流水)
This commit is contained in:
yueli
2026-08-31 13:54:03 +08:00
parent f499346f74
commit 1000deda2f
4 changed files with 80 additions and 8 deletions

View File

@ -109,6 +109,14 @@ export function getPurchaseByBatch(batchKey: string) {
})
}
// 获取今日下一个采购批次号(提交一批时调用,同批所有行共享)
export function getNextBatchSeq() {
return request({
url: '/purchase/next-batch-seq',
method: 'get'
})
}
// 获取可选审批人列表
export function getPurchaseApprovers() {
return request({