This commit is contained in:
2026-09-20 20:40:21 +08:00
parent 088c219c20
commit 2213647db4
4 changed files with 55 additions and 4 deletions
@@ -254,17 +254,19 @@ export async function run(context) {
const merchantToken = await loginMerchant(context, customerId)
if (!merchantToken) return
const beforeEdit = await platform(context, 'GET', '编辑车辆前读取服务端目的仓线路', `${DISPATCH_BASE}/${encodeURIComponent(dispatchNo)}`)
if (!success(beforeEdit.response) || beforeEdit.data?.dispatchNo !== dispatchNo) return
const updateBody = {
vehiclePlate: `DEV-${context.marker.slice(-8)}`.slice(0, 64),
driverName: `五期验收司机-${context.marker.slice(-6)}`,
driverPhone: '19900000000', carrierName: '五期开发验收车队',
route: `${context.marker}-PHASE5-ROUTE`, estimatedArrivalAt: new Date(Date.now() + 86_400_000).toISOString(),
estimatedArrivalAt: new Date(Date.now() + 86_400_000).toISOString(),
}
const updated = await platform(context, 'PUT', '补齐本轮排车车辆司机与线路',
`${DISPATCH_BASE}/${encodeURIComponent(dispatchNo)}`, updateBody)
context.assert(MODULE, '排车编辑字段完整回显', updated.response,
updated.data?.dispatchNo === dispatchNo && updated.data?.vehiclePlate === updateBody.vehiclePlate
&& updated.data?.driverName === updateBody.driverName && updated.data?.route === updateBody.route,
&& updated.data?.driverName === updateBody.driverName && updated.data?.route === beforeEdit.data.route,
trace(updated.response), OPTIONS)
if (!success(updated.response)) return