diff --git a/docs/swagger.json b/docs/swagger.json index 069ef5ff..52a832ec 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -9206,7 +9206,8 @@ "type": "object", "required": [ "change_amount", - "raw_material_id" + "raw_material_id", + "source_type" ], "properties": { "change_amount": { @@ -9221,6 +9222,18 @@ "description": "备注", "type": "string", "maxLength": 255 + }, + "source_id": { + "description": "来源ID, 例如: 配方ID, 采购单ID等", + "type": "integer" + }, + "source_type": { + "description": "库存变动来源类型", + "allOf": [ + { + "$ref": "#/definitions/models.StockLogSourceType" + } + ] } } }, diff --git a/src/api/inventory.js b/src/api/inventory.js index a72c0614..8195a8cc 100644 --- a/src/api/inventory.js +++ b/src/api/inventory.js @@ -7,6 +7,8 @@ import { PaginationDTO, Response, StockLogSourceType } from '../enums'; * @typedef {object} StockAdjustmentRequest * @property {number} change_amount - 变动数量, 正数为入库, 负数为出库, 单位: g * @property {number} raw_material_id - 要调整的原料ID + * @property {StockLogSourceType} source_type - 库存变动来源类型 + * @property {number} [source_id] - 来源ID, 例如: 配方ID, 采购单ID等 * @property {string} [remarks] - 备注 */