调拨单
新增调拨单
curl -i -X POST --header "Authorization: Token token=<user_token>, uid=<uid>" \
http://example.com/api/storage_transfers.json
{
"status": {
"code": 200,
"message": "OK"
},
"storage_transfer": {
"id": 190
}
}
HTTP请求
POST api/storage_transfers.json
请求参数说明
参数名 | 是否必填 | 默认值 | 字段说明 |
---|---|---|---|
from_warehouse_id | 是 | 无 | 调出仓库ID |
to_warehouse_id | 是 | 无 | 调入仓库ID |
transferred_at | 是 | 无 | 调拨时间 |
total_quantity | 是 | 无 | 总数量 |
number | 否 | 无 | 编号,开启自动编号后可不填,关闭自动编号后必填 |
note | 否 | 无 | 备注 |
status | 是 | 无 | 状态,如果关闭审批,支持draft(草稿)、submitted(提交);如果开启审批,支持draft(草稿)、approving(提交审批) |
product_items_attributes[0][product_attr_group_id] | 是 | 无 | 产品属性组ID |
product_items_attributes[0][product_number] | 是 | 无 | 产品编号 |
product_items_attributes[0][product_unit_id] | 是 | 无 | 产品单位ID |
product_items_attributes[0][batch_number] | 否 | 无 | 批次号 |
product_items_attributes[0][produced_at] | 否 | 无 | 生产日期 |
product_items_attributes[0][expired_at] | 否 | 无 | 有效日期 |
product_items_attributes[0][attr_names] | 否 | 无 | 属性名称 |
product_items_attributes[0][product_id] | 是 | 无 | 产品ID |
product_items_attributes[0][name] | 是 | 无 | 产品名称 |
product_items_attributes[0][spec] | 否 | 无 | 规格 |
product_items_attributes[0][unit] | 否 | 无 | 单位 |
product_items_attributes[0][quantity] | 是 | 无 | 数量 |
product_items_attributes[0][note] | 否 | 无 | 备注 |
product_items_attributes[0][modified] | 是 | 无 | 最后一次修改的字段,包括quantity、price、price_with_tax、discount、deduction、amount、tax_rate、tax_amount、amount_with_tax |
product_items_attributes[0][serial_codes_attributes][0][identifier] | 否 | 无 | 序列号 |
product_items_attributes[0][serial_codes_attributes][0][product_attr_group_id] | 否 | 无 | 产品属性组ID |
product_items_attributes[0][serial_codes_attributes][0][warehouse_id] | 否 | 无 | 仓库ID |
product_items_attributes[0][serial_codes_attributes][0][category] | 否 | 无 | 类别 |
attachments_attributes[0][filename] | 否 | 无 | 附件名称 |
attachments_attributes[0][url] | 否 | 无 | 附件链接 |
- 返回字段说明
返回值字段 | 字段类型 | 字段说明 |
---|---|---|
id | string | ID |
文档更新时间: 2025-03-17 14:52 作者:姜河