fix(mobile-oa-h5): slim payment list card fields to a two-column grid
Drop protocol number, storage years, and discount amount; remove wide spans so summary fields sit two per row. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
6eafec3fa9
commit
82b8a9c1b2
3 files changed
+13
-8
No files matched your search
@@ -223,13 +223,10 @@ function paymentCard(item) {
|
||||
subtitle: text(item.sampleCode),
|
||||
status: progress,
|
||||
fields: [
|
||||
field('协议号', item.protocolNo, { wide: true }),
|
||||
field('姓名', item.motherName), field('手机号', item.motherPhone),
|
||||
field('样本编码', item.sampleCode, { wide: true }), field('签署日期', item.signDate),
|
||||
field('存储年限', item.storageYears), field('存储项目', item.sampleTypeName, { wide: true }),
|
||||
field('合同总额', money(item.contractAmount), { money: true }),
|
||||
field('样本编码', item.sampleCode), field('签署日期', item.signDate),
|
||||
field('存储项目', item.sampleTypeName), field('合同总额', money(item.contractAmount), { money: true }),
|
||||
field('缴费方式', label(PAY_MODE_LABELS, item.payMode), { tag: true }),
|
||||
field('优惠金额', money(item.discountAmount), { money: true }),
|
||||
field('应收总额', money(item.receivableAmount), { money: true })
|
||||
],
|
||||
periodBlocks: periods.map(paymentPeriodBlock),
|
||||
|
||||
@@ -134,9 +134,12 @@ test('payment card formats summary totals and progress', () => {
|
||||
assert.equal(card.status, '部分已缴')
|
||||
assert.equal(card.subtitle, 'S-1')
|
||||
assert.ok(card.fields.some((field) => field.label === '样本编码' && field.value === 'S-1'))
|
||||
assert.ok(card.fields.some((field) => field.label === '协议号' && field.value === 'P-1'))
|
||||
assert.ok(card.fields.some((field) => field.label === '签署日期' && field.value === '2026-10-01'))
|
||||
assert.ok(card.fields.some((field) => field.label === '存储项目' && field.value === '脐带血'))
|
||||
assert.ok(!card.fields.some((field) => field.label === '协议号'))
|
||||
assert.ok(!card.fields.some((field) => field.label === '存储年限'))
|
||||
assert.ok(!card.fields.some((field) => field.label === '优惠金额'))
|
||||
assert.ok(card.fields.every((field) => !field.wide))
|
||||
assert.ok(!card.fields.some((field) => String(field.label).includes('第1期')))
|
||||
assert.equal(card.periodBlocks.length, 1)
|
||||
assert.equal(card.periodBlocks[0].scheduleNo, 1)
|
||||
|
||||
@@ -440,11 +440,16 @@ test('payment detail presents every web field and nested transfer field with Chi
|
||||
test('payment cards reproduce the Web Excel columns and operation labels', () => {
|
||||
const presenter = source('./list-presenter.js')
|
||||
const card = source('./components/MarketListCard.vue')
|
||||
const paymentCardSource = presenter.match(/function paymentCard\([\s\S]*?\n\}\n\nfunction freightSampleBlock/)?.[0] || ''
|
||||
assert.ok(paymentCardSource.includes("field('姓名'"))
|
||||
for (const label of [
|
||||
'姓名', '手机号', '样本编码', '签署日期', '存储年限', '存储项目', '合同总额',
|
||||
'缴费方式', '优惠金额', '应收总额', '应缴费时间',
|
||||
'姓名', '手机号', '样本编码', '签署日期', '存储项目', '合同总额',
|
||||
'缴费方式', '应收总额', '应缴费时间',
|
||||
'已缴费时间', '欠缴费金额', '累计实缴', '待缴金额', '备注'
|
||||
]) assert.match(presenter, new RegExp(label))
|
||||
assert.doesNotMatch(paymentCardSource, /field\('协议号'/)
|
||||
assert.doesNotMatch(paymentCardSource, /field\('存储年限'/)
|
||||
assert.doesNotMatch(paymentCardSource, /field\('优惠金额'/)
|
||||
assert.match(presenter, /periodBlocks:/)
|
||||
assert.match(presenter, /footerFields:/)
|
||||
assert.match(card, /应缴费金额/)
|
||||
|
||||
Reference in new issue
Block a user