forked from erp-dev/erp
fix: added delivery_id and delivery_isnull query param to shipment list api
This commit is contained in:
@@ -55,6 +55,7 @@ Authorization: <AGENT_ACCESS_KEY>
|
||||
"status_display": "待出货",
|
||||
"external_id": null,
|
||||
"geo_coordinates": {"lat": 23.1291, "lng": 113.2644},
|
||||
"delivery_id": null,
|
||||
"delivery": null,
|
||||
"sales_items": [
|
||||
{
|
||||
@@ -152,6 +153,7 @@ Authorization: <AGENT_ACCESS_KEY>
|
||||
说明:
|
||||
|
||||
- "未出货"定义:`delivery` 为空,即尚未关联送货单
|
||||
- `delivery_id` 始终返回送货单ID;未关联时为 `null`
|
||||
- 结果按 `created_at` 降序排列
|
||||
- 只返回 `merchant_id` 对应商户的数据
|
||||
- `sales_items` 包含该出货单的所有销售品(软删除的条目自动排除)
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
| offset | int | 偏移量 |
|
||||
| customer | int | 客户ID |
|
||||
| status | int | 状态(1=草稿(未发布), 2=已发布, 3=已取消, 4=已驳回, 5=已审核) |
|
||||
| delivery_id | int | 送货单ID。仅当传入具体ID时过滤;传 `null`、`None`、空字符串时不触发过滤 |
|
||||
| delivery_isnull | bool | 是否按送货单是否为空过滤。传 `true/1/yes` 仅返回 `delivery_id = null`;传 `false/0/no` 仅返回 `delivery_id != null` |
|
||||
| external_id | string | 外部订单号(精确匹配) |
|
||||
| shipment_date_from | string | 出货日期起始(YYYY-MM-DD) |
|
||||
| shipment_date_to | string | 出货日期结束(YYYY-MM-DD) |
|
||||
@@ -54,6 +56,7 @@
|
||||
"shipment_date": "2026-01-14",
|
||||
"status": 1,
|
||||
"status_display": "草稿(未发布)",
|
||||
"delivery_id": null,
|
||||
"status_modified_at": null,
|
||||
"cancelled_by_id": null,
|
||||
"cancelled_by_name": null,
|
||||
@@ -75,6 +78,8 @@
|
||||
说明:
|
||||
|
||||
- `sales_items` 现在返回的是带图片字段的销售品详情结构
|
||||
- `delivery_id` 始终返回送货单ID;未绑定送货单时为 `null`
|
||||
- `delivery_id=null` 不会触发过滤;如需按是否绑定送货单筛选,请使用 `delivery_isnull`
|
||||
- 若销售品关联的 `PrintingJob.product` 存在主图,则会返回 `product_image_url`
|
||||
- 若无关联图片,则 `product_image_url` 为 `null`
|
||||
- 若出货单已经被驳回,则其销售品会在驳回时被自动解绑,因此此处的 `sales_items` 会变为空数组
|
||||
@@ -93,6 +98,7 @@
|
||||
|
||||
说明:
|
||||
|
||||
- 详情响应同样始终包含 `delivery_id`;未绑定送货单时返回 `null`
|
||||
- 详情中的 `sales_items` 同样返回带 `product_image_url` 的销售品详情结构
|
||||
|
||||
---
|
||||
@@ -195,6 +201,7 @@
|
||||
"remark": "备注信息",
|
||||
"status": 1,
|
||||
"status_display": "草稿(未发布)",
|
||||
"delivery_id": null,
|
||||
"status_modified_at": null,
|
||||
"cancelled_by_id": null,
|
||||
"cancelled_by_name": null,
|
||||
@@ -220,6 +227,7 @@
|
||||
| customer | int | 客户ID |
|
||||
| customer_name | string | 客户名称 |
|
||||
| shipment_date | string | 出货日期 |
|
||||
| delivery_id | int/null | 关联送货单ID;未绑定时为 null |
|
||||
| address | string | 地址 |
|
||||
| contact_name | string | 联系人 |
|
||||
| contact_phone | string | 联系电话 |
|
||||
|
||||
Reference in New Issue
Block a user