feat(client): 入库确认进价入口与「待定价」标注
入库单详情弹窗为已审核+含 0 价明细+管理员时显示「确认进价」, 逐行补填真实进价调后端;库存列表与入库明细 0 价/NULL 显示 「待定价」而非 ¥0.00。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -142,4 +142,17 @@ class StockInRepository {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// 确认进价:把指定明细的暂估 0 价补成真实进价(前向补偿成本与应付)。
|
||||
/// items 形如 [{'item_id': 1, 'unit_price': 50.0}]。
|
||||
Future<void> confirmCost(int id, List<Map<String, dynamic>> items) async {
|
||||
try {
|
||||
await _client.post('/stock-in/orders/$id/confirm-cost', data: {'items': items});
|
||||
} on DioException catch (e) {
|
||||
throw AppException(
|
||||
e.response?.data?['error'] as String? ?? '确认进价失败',
|
||||
statusCode: e.response?.statusCode,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user