修复财务支付记录展示

This commit is contained in:
czl231
2026-08-16 23:55:50 +08:00
parent 27a4e62a43
commit 64248973ee
8 changed files with 267 additions and 3 deletions

View File

@@ -112,6 +112,25 @@ assertIncludes(
'钱包关系必须提供按归属类型生成的可读摘要',
);
// 财务支付记录必须使用本领域的支付状态与渠道,不得复用支付订单状态。
const financePaymentDefinition = resources.match(
/define\('fin_payment',[\s\S]*?\n\s*\]\),/,
)?.[0];
if (!financePaymentDefinition) throw new Error('无法读取财务支付记录资源定义');
for (const contract of [
"relation('ec_order_identity', '/ec_order'",
"listRelationNameOnly: true",
"f('product_summary', { emptyText: '商品信息缺失' })",
"{ label: '已支付', value: 35 }",
"{ label: '余额支付', value: 'wallet' }",
"{ label: '支付宝', value: 'alipay' }",
"{ label: '微信支付', value: 'wechat' }",
]) {
if (!financePaymentDefinition.includes(contract)) {
throw new Error(`财务支付记录缺少中文展示契约:${contract}`);
}
}
// 购物车关联列必须展示用户和商品名称UUID仅作为复制与排障信息保留。
const cartDefinition = resources.match(
/define\('ec_cart',[\s\S]*?\n\s*\]\),/,