forked from erp-dev/erp
fix: business cancel service merged
This commit is contained in:
@@ -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 审批
|
||||
|
||||
与采购单一致,但方向为出库:
|
||||
|
||||
Reference in New Issue
Block a user