feat: add dropship fulfillment producer chain

This commit is contained in:
2026-08-25 08:40:27 +08:00
parent c218bfad6b
commit 4839243f21
35 changed files with 389 additions and 53 deletions
@@ -250,6 +250,7 @@ function buildPayload(context, profile, master, productImageFileId) {
const referenceId = `REF-${context.marker}`.slice(0, 64)
const companyName = profile.tenantName || `订单验收客户-${context.marker}`
return {
fulfillmentType: String(context.context?.orderFulfillmentType || 'STANDARD').trim().toUpperCase(),
customerId: master.partner?.id ?? null,
customerName: master.partner?.partnerName ?? companyName,
transportMode: 'SEA', tradeTerm: 'FOB',
@@ -397,6 +398,7 @@ export async function run(context) {
if (!orderId) throw new Error('Client 订单创建失败,后续 Admin 链路停止')
context.createdResources.orders = {
marker: context.marker, tenantId, orderId, productImageFileId,
fulfillmentType: payload.fulfillmentType,
boxTypes: BOXES.map((box) => box.boxType), inboundId: null,
receivingWarehouseId: id(master.receiving.id),
destinationType: master.destinationType,