forked from erp-dev/erp
feat: payment order and receipt order
This commit is contained in:
@@ -104,7 +104,41 @@
|
||||
|
||||
---
|
||||
|
||||
## 4. 错误示例
|
||||
## 4. 付款单(PaymentOrder)
|
||||
|
||||
### 4.1 列表
|
||||
- **GET** `/api/v1/payment-orders/`
|
||||
- 返回字段:`supplier_name`、`payment_date`、`amount`、`status` 等。
|
||||
|
||||
### 4.2 创建
|
||||
- **POST** `/api/v1/payment-orders/`
|
||||
|
||||
| 字段 | 类型 | 说明 |
|
||||
|------|------|------|
|
||||
| `supplier` | int | 供应商 ID |
|
||||
| `payment_date` | str (`YYYY-MM-DD`) | 付款日期 |
|
||||
| `amount` | decimal | 付款金额(必须 > 0) |
|
||||
| `remarks` | str | 可选 |
|
||||
|
||||
### 4.3 审批 / 作废
|
||||
- **POST** `/api/v1/payment-orders/<id>/review/`
|
||||
- `{"action": "approve"}` 或 `{"action": "cancel"}`
|
||||
|
||||
---
|
||||
|
||||
## 5. 收款单(ReceiptOrder)
|
||||
|
||||
接口与付款单类似,只是主体为 `customer`:
|
||||
|
||||
- **GET** `/api/v1/receipt-orders/`
|
||||
- **POST** `/api/v1/receipt-orders/`:需要 `customer`、`receipt_date`、`amount`
|
||||
- **POST** `/api/v1/receipt-orders/<id>/review/`
|
||||
|
||||
审批通过表示“确认收款”,作废则恢复为初始状态。
|
||||
|
||||
---
|
||||
|
||||
## 6. 错误示例
|
||||
|
||||
| 场景 | HTTP | 返回体 |
|
||||
|------|------|--------|
|
||||
|
||||
Reference in New Issue
Block a user