fix(借库扫码出库): items 字段名 stock_id → id 修复 400 + dispatch_borrow docstring 补全 sku 字段说明
This commit is contained in:
@ -281,7 +281,14 @@ def dispatch_borrow():
|
||||
执行借库扣减
|
||||
请求体: {
|
||||
approval_id: int, // 关联的审批单ID
|
||||
items: [...], // 扫码选中的库存物品(含 id, source_table, out_quantity)
|
||||
items: [ // 扫码选中的库存物品
|
||||
{
|
||||
id: int, // 库存主键(按 source_table 路由到 StockBuy/StockSemi/StockProduct)
|
||||
source_table: str, // 'stock_buy' | 'stock_semi' | 'stock_product'
|
||||
sku: str, // 用于按 (source_table, sku) 与审批单做超额交叉校验
|
||||
out_quantity: float
|
||||
}
|
||||
],
|
||||
borrower_name: str,
|
||||
signature_path: str,
|
||||
remark: str,
|
||||
|
||||
@ -556,7 +556,7 @@ const submitForm = async () => {
|
||||
if (isNaN(safeQty) || safeQty <= 0) safeQty = 1
|
||||
|
||||
return {
|
||||
stock_id: item.id || 0,
|
||||
id: item.id || 0,
|
||||
source_table: item.source_table || '',
|
||||
sku: item.sku ? String(item.sku) : (item.barcode ? String(item.barcode) : 'NO_SKU'),
|
||||
barcode: item.barcode ? String(item.barcode) : '',
|
||||
|
||||
Reference in New Issue
Block a user