1
0
forked from erp-dev/erp

fix: business cancel service merged

This commit is contained in:
2026-06-11 15:33:31 +08:00
parent 65564f772a
commit 80db7867f4
18 changed files with 574 additions and 125 deletions

View File

@@ -62,6 +62,8 @@
宽进仓将 `numbers` 换为 `quantity` + `num_of_rolls`。至少 1 条明细,否则返回 400。
> 创建成功201返回精简体`{"id", "human_id", "status", "message"}`,不包含 `items`、`total_amount` 等明细字段。需要完整结构请通过编辑PUT/PATCH或审批`review`)接口获取,二者返回完整序列化。
### 2.2 审批
`POST /purchase-orders/<id>/review/`,请求体 `{"action": "approve"}``{"action": "cancel"}`
@@ -99,11 +101,15 @@
销售单 `items` 字段同样支持 `empty_diff_percent``color``spec``batch_number``remarks` 等信息,用途与采购单一致;仓库模式决定使用 `numbers``quantity + num_of_rolls``consume_detail_ids`
顶层可选字段 `kind`(销售单类型):`1=大货``2=样板`。不传或传空时默认 `1`(大货);传入非法枚举值返回 400。
```json
{
"customer": 6,
"warehouse": 3,
"kind": 1,
"order_date": "2025-11-30",
"items": [
{
"product_id": 1001,
@@ -128,6 +134,8 @@
}
```
> 创建成功201返回精简体`{"id", "human_id", "status", "message"}`,不包含 `items`、`total_amount` 等明细字段。需要完整结构请通过编辑PUT/PATCH或审批`review`)接口获取,二者返回完整序列化。
### 3.2 审批
与采购单一致,但方向为出库: