ming #1

Merged
liufumingren merged 558 commits from ming into main 2026-11-18 16:13:25 +08:00
Showing only changes of commit d18da89925 - Show all commits

View File

@ -638,17 +638,9 @@ class InboundDirectLogService extends Service {
return { code: 400, message: '入库单已绑定收货单且状态为 CREATED,请先审核后再进行上架操作', data: null };
}
// PENDING 状态校验
if (entryOrder.order_status === 'PENDING') {
if (!hasReceivingBindings) {
return { code: 400, message: '入库单未绑定收货单,无法上架', data: null };
}
for (const item of items) {
if (!item.receiving_detail_id) {
return { code: 400, message: '随机入库需要选定收货单明细提交,缺少 receiving_detail_id', data: null };
}
}
}
// PENDING 状态:允许导入。items 可传 receiving_detail_id 走绑定模式(预占收货明细),
// 也可不传走非绑定模式(数量受计划数量限制),不再强制绑定收货单、不再强制传收货单 ID;
// 绑定模式下的 space_id/明细可用数量等校验由 _addSingleItem 统一处理。
// 批量模式下用事务包裹,任一失败整批回退
const useTransaction = isBatch;