forked from erp-dev/erp
fix: appversions
This commit is contained in:
@@ -159,6 +159,28 @@
|
||||
}
|
||||
```
|
||||
|
||||
### ShipmentPrintingJobSummary
|
||||
|
||||
出货单/送货单关联生产任务的精简 DTO,仅用于快速跳转生产任务详情。
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 123,
|
||||
"printing_order_id": 456,
|
||||
"external_order_id": "KD20453713",
|
||||
"customer_name": "客户A"
|
||||
}
|
||||
```
|
||||
|
||||
字段说明:
|
||||
|
||||
| 字段 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `id` | integer | `PrintingJob.id` |
|
||||
| `printing_order_id` | integer | 关联的 `PrintingOrder.id` |
|
||||
| `external_order_id` | string/null | 关联生产订单的外部订单编号 |
|
||||
| `customer_name` | string/null | 关联生产订单客户名称 |
|
||||
|
||||
`shipments` 内元素为送货单内出货单摘要:
|
||||
|
||||
```json
|
||||
@@ -166,6 +188,14 @@
|
||||
"id": 1,
|
||||
"customer": 10,
|
||||
"customer_name": "客户A",
|
||||
"address_id": 5,
|
||||
"address": "杭州市测试路 1 号",
|
||||
"contact_name": "张三",
|
||||
"contact_phone": "13800138000",
|
||||
"area": "华东",
|
||||
"coordinates": "120.1551,30.2741",
|
||||
"geo_coordinates": null,
|
||||
"extra": {"dock": "A"},
|
||||
"fabric": "面料信息",
|
||||
"order_description": "订单描述",
|
||||
"shipment_date": "2026-01-14",
|
||||
@@ -176,6 +206,8 @@
|
||||
}
|
||||
```
|
||||
|
||||
地址说明:送货单本身不保存地址;一个送货单可包含多个出货单,每个出货单可能有不同地址。送货单返回的 `shipments[]` 中地址字段均来自对应 `Shipment` 的地址快照字段,`address_id` 仅表示关联的客户地址 ID。
|
||||
|
||||
## 出货单接口
|
||||
|
||||
### 查询出货单列表
|
||||
@@ -314,6 +346,30 @@
|
||||
|
||||
响应:`200 Shipment`。
|
||||
|
||||
### 查询出货单关联生产任务
|
||||
|
||||
`GET /api/v1/shipment/shipments/{id}/printing-jobs/`
|
||||
|
||||
用于快速获取该出货单关联的生产任务列表,不返回销售品明细。
|
||||
|
||||
关联路径:`Shipment -> SalesItem.printing_job_id -> PrintingJob`。
|
||||
|
||||
查询参数:
|
||||
|
||||
| 参数 | 类型 | 必填 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| `limit` | integer | 否 | 分页大小 |
|
||||
| `offset` | integer | 否 | 分页偏移 |
|
||||
|
||||
响应:分页 `ShipmentPrintingJobSummary[]`。
|
||||
|
||||
说明:
|
||||
|
||||
- 仅统计未软删除销售品:`SalesItem.delete_at IS NULL`。
|
||||
- 相同 `printing_job_id` 会去重。
|
||||
- 默认按 `PrintingJob.id` 升序。
|
||||
- 如需销售品明细,调用 `GET /api/v1/shipment/shipments/{id}/`。
|
||||
|
||||
### 更新出货单
|
||||
|
||||
`PATCH /api/v1/shipment/shipments/{id}/`
|
||||
@@ -473,6 +529,31 @@
|
||||
|
||||
响应:`200 ShipmentDelivery`。
|
||||
|
||||
### 查询送货单关联生产任务
|
||||
|
||||
`GET /api/v1/shipment/deliveries/{id}/printing-jobs/`
|
||||
|
||||
用于快速获取该送货单下所有出货单关联的生产任务列表,不返回销售品明细。
|
||||
|
||||
关联路径:`ShipmentDelivery -> Shipments -> SalesItem.printing_job_id -> PrintingJob`。
|
||||
|
||||
查询参数:
|
||||
|
||||
| 参数 | 类型 | 必填 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| `limit` | integer | 否 | 分页大小 |
|
||||
| `offset` | integer | 否 | 分页偏移 |
|
||||
|
||||
响应:分页 `ShipmentPrintingJobSummary[]`。
|
||||
|
||||
说明:
|
||||
|
||||
- 仅统计未软删除销售品:`SalesItem.delete_at IS NULL`。
|
||||
- 同一个生产任务通过多个销售品或多个出货单关联时只返回一次。
|
||||
- 默认按 `PrintingJob.id` 升序。
|
||||
- 如需送货单内出货单摘要,调用 `GET /api/v1/shipment/deliveries/{id}/`。
|
||||
- 如需某个出货单的销售品明细,调用 `GET /api/v1/shipment/shipments/{shipment_id}/`。
|
||||
|
||||
### 更新送货单
|
||||
|
||||
`PATCH /api/v1/shipment/deliveries/{id}/`
|
||||
|
||||
Reference in New Issue
Block a user