From b9d981d46b016ccebd0f6ea30605ac61eb33bd3c Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Thu, 15 Oct 2026 10:07:32 +0800 Subject: [PATCH] fix(mobile-oa-h5): finish tagType wiring for market detail sections Co-authored-by: Cursor --- backend/app/services/market_payment.py | 4 ++-- mobile-oa-h5/src/market/components/MarketListCard.vue | 2 +- mobile-oa-h5/src/market/list-presenter.test.js | 1 + mobile-oa-h5/src/market/mobile-parity-ui.test.js | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/app/services/market_payment.py b/backend/app/services/market_payment.py index 6887db75..465225f3 100644 --- a/backend/app/services/market_payment.py +++ b/backend/app/services/market_payment.py @@ -222,7 +222,7 @@ def _payment_dict( progress = { 'yjq': '已缴清', 'bfyj': '部分已缴', - 'dfj': '待缴清', + 'dfj': '待缴费', }[progress_code] return { 'id': payment.id, @@ -1126,7 +1126,7 @@ def update_transfer( db, transfer_id=transfer_id, ctx=ctx, user_info=user_info ) if (row.pay_status or '') != 'dfj': - raise ValueError('仅待缴费草稿状态可编辑') + raise ValueError('仅已付款状态可编辑') values = _editable_fields(fields) if 'transferAttachments' in values: values['transferAttachments'] = validate_attachment_refs( diff --git a/mobile-oa-h5/src/market/components/MarketListCard.vue b/mobile-oa-h5/src/market/components/MarketListCard.vue index 16c1be8a..a5aa7774 100644 --- a/mobile-oa-h5/src/market/components/MarketListCard.vue +++ b/mobile-oa-h5/src/market/components/MarketListCard.vue @@ -119,7 +119,7 @@ field.label === '关联数' && field.value === '2')) assert.equal(manager.sampleBlocks[1].title, '样本 2 · S-2') assert.equal(manager.sampleBlocks[1].status, '科研捐赠') + assert.equal(manager.sampleBlocks[1].statusTone, 'warning') assert.equal(manager.sampleBlocks[1].fields.find((field) => field.label === '协议号').value, 'P-2') assert.equal(manager.sampleBlocks[1].fields.find((field) => field.label === '母亲姓名').value, '周雨桐') assert.equal(manager.sampleBlocks[1].fields.find((field) => field.label === '子女姓名').value, '宝宝乙') diff --git a/mobile-oa-h5/src/market/mobile-parity-ui.test.js b/mobile-oa-h5/src/market/mobile-parity-ui.test.js index 0e89c4e6..b6feff7b 100644 --- a/mobile-oa-h5/src/market/mobile-parity-ui.test.js +++ b/mobile-oa-h5/src/market/mobile-parity-ui.test.js @@ -185,6 +185,7 @@ test('freight list cards collapse sample blocks by default and allow expand', () assert.match(presenter, /sampleBlocks:\s*rows\.map\(freightSampleBlock\)/) assert.match(card, /card\.sampleBlocks/) + assert.match(card, /block\.statusTone \|\| resolveStatusTone\(block\.status\)/) assert.match(card, /samplesOpen/) assert.match(card, /关联样本(/) assert.match(card, /点击展开/) @@ -466,6 +467,7 @@ test('nested market detail cards use explicit labels instead of API property nam const detailSection = source('./components/MarketDetailSection.vue') assert.match(detailSection, /cards:/) + assert.match(detailSection, /field\.tagType \|\| 'primary'/) assert.doesNotMatch(detailSection, /function flattenFields/) })