test: use current order remarks contract

This commit is contained in:
2026-09-14 17:29:03 +08:00
parent 64bddb1f81
commit 4c048d0760
2 changed files with 15 additions and 3 deletions
+8 -3
View File
@@ -688,9 +688,14 @@ export async function run(context) {
`cargoes=${firstLegDetail?.cargoes?.length ?? 'n/a'}, history=${firstLegDetail?.statusHistory?.length ?? 'n/a'}`)
assertCargoContract(context, firstLegDetailResponse, firstLegDetail?.cargoes, payload)
const noteResponse = await context.request('POST',
`/api/platform/v1/orders/first-leg/${encodeURIComponent(orderId)}/internal-notes?tenantId=${encodeURIComponent(tenantId)}`,
{ content: `${context.marker} Admin 订单链路验收` })
const noteResponse = await context.request('PUT',
`/api/platform/v1/orders/first-leg/${encodeURIComponent(orderId)}/remarks?tenantId=${encodeURIComponent(tenantId)}`,
{
expectedVersion: Number(firstLegDetail?.order?.version),
internalRemark: `${context.marker} Admin 订单链路验收`,
warehouseRemark: firstLegDetail?.order?.warehouseRemark || null,
customerServiceRemark: firstLegDetail?.order?.customerServiceRemark || null,
})
context.apiSuccess(MODULE, 'Admin 为本轮订单添加内部备注', noteResponse)
const approveResponse = await context.request('POST',