diff --git a/scripts/admin-test-env-modules/phase4-overseas-wallet-and-pallet-cost-contract.test.mjs b/scripts/admin-test-env-modules/phase4-overseas-wallet-and-pallet-cost-contract.test.mjs index fab42cd5f..a71362c9c 100644 --- a/scripts/admin-test-env-modules/phase4-overseas-wallet-and-pallet-cost-contract.test.mjs +++ b/scripts/admin-test-env-modules/phase4-overseas-wallet-and-pallet-cost-contract.test.mjs @@ -29,6 +29,8 @@ test('钱包闭环覆盖充值、授信、采购冻结结算和换标结算释 'relabelPayload(context, warehouseId, suffix, 0.01)', ]) assert.ok(source.includes(token), token) assert.match(source, /actualBalance[\s\S]*frozenBalance[\s\S]*availableBalance[\s\S]*creditLimit[\s\S]*creditUsed[\s\S]*availableCredit/) + assert.match(source, /voucherFileId: id\(files\.find\(\(item\) => item\.category === 'VOUCHER'\)\?\.fileId\)/) + assert.doesNotMatch(source, /voucherFileId:\s*Number\(/) assert.doesNotMatch(source, /internal\/finance|jdbc|mysql|process\.env|https?:\/\//i) }) diff --git a/scripts/admin-test-env-modules/phase4-overseas-wallet-and-pallet-cost.mjs b/scripts/admin-test-env-modules/phase4-overseas-wallet-and-pallet-cost.mjs index 62313932d..3ec84cd13 100644 --- a/scripts/admin-test-env-modules/phase4-overseas-wallet-and-pallet-cost.mjs +++ b/scripts/admin-test-env-modules/phase4-overseas-wallet-and-pallet-cost.mjs @@ -138,7 +138,7 @@ async function procurementFlow(context, fixture, overseasToken) { const fee = await context.requestOverseas('POST', query(`${PROCUREMENT}/${encodeURIComponent(orderNo)}/fees`, { customerId }), { feeItemCode: 'PROCUREMENT_SERVICE', feeItemName: '采购服务费', amount: 0.01, - voucherFileId: Number(files[0].fileId), remark: context.marker, + voucherFileId: id(files.find((item) => item.category === 'VOUCHER')?.fileId), remark: context.marker, }) const feeNo = fee?.body?.data?.feeNo assert(context, '采购费用创建并开始钱包冻结', fee,