fix(mobile-oa-h5): finish tagType wiring for market detail sections
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2b5f2f939c
commit
b9d981d46b
4 files changed
+6
-3
No files matched your search
@@ -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(
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
<van-tag
|
||||
v-if="block.status && block.status !== '—'"
|
||||
class="market-tag"
|
||||
:type="resolveStatusTone(block.status)"
|
||||
:type="block.statusTone || resolveStatusTone(block.status)"
|
||||
size="medium"
|
||||
round
|
||||
:title="block.status"
|
||||
|
||||
@@ -230,6 +230,7 @@ test('freight card shows the scope-safe visible count and collapsible sample blo
|
||||
assert.ok(manager.fields.some((field) => 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, '宝宝乙')
|
||||
|
||||
@@ -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/)
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user