1
0
forked from erp-dev/erp

feat: payment order and receipt order

This commit is contained in:
2025-11-30 21:52:36 +08:00
parent ce1954ad58
commit 9006a530d1
12 changed files with 900 additions and 12 deletions

View File

@@ -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 | 返回体 |
|------|------|--------|