fix(sample): 样本状态问号仅已作废时展示
Web SampleStatusTag 仅在 sampleStatus=yzf 时显示问号;移动市场部回归断言非作废无 help(#134)。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
af02e2cdd2
commit
9fd1cc4370
2 files changed
+10
-8
No files matched your search
@@ -270,12 +270,12 @@ test('sample-coded list cards show sample status and a void reason affordance',
|
||||
}).fields.find((field) => field.label === '样本状态').value,
|
||||
'已入库'
|
||||
)
|
||||
assert.equal(
|
||||
buildMarketCard('payment-chase', 'specialist', {
|
||||
sampleCode: 'S-1', sampleStatus: 'jcz'
|
||||
}).fields.find((field) => field.label === '样本状态').value,
|
||||
'检测中'
|
||||
)
|
||||
const detecting = buildMarketCard('payment-chase', 'specialist', {
|
||||
sampleCode: 'S-1', sampleStatus: 'jcz'
|
||||
}).fields.find((field) => field.label === '样本状态')
|
||||
assert.equal(detecting.value, '检测中')
|
||||
assert.equal(detecting.helpTitle, undefined)
|
||||
assert.equal(detecting.helpText, undefined)
|
||||
|
||||
const voided = buildMarketCard('payment', 'specialist', {
|
||||
motherName: '作废客户',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<!-- 样本状态:标签 + 作废原因 -->
|
||||
<!-- 样本状态:标签;仅已作废时展示问号与作废原因 -->
|
||||
<template>
|
||||
<span class="sample-status-tag">
|
||||
<el-tag :type="tagType" size="small">{{ label }}</el-tag>
|
||||
<el-popover placement="top" trigger="click" :width="240">
|
||||
<el-popover v-if="voided" placement="top" trigger="click" :width="240">
|
||||
<template #reference>
|
||||
<button type="button" class="sample-status-tag__q" aria-label="作废原因" @click.stop>
|
||||
<el-icon><QuestionFilled /></el-icon>
|
||||
@@ -31,6 +31,8 @@
|
||||
const code = computed(() => String(props.status || '').trim())
|
||||
const label = computed(() => (code.value ? sampleStatusLabel(code.value) : '—'))
|
||||
const tagType = computed(() => (code.value ? sampleStatusTagType(code.value) : 'info'))
|
||||
/** 问号仅已作废(yzf)展示 */
|
||||
const voided = computed(() => code.value === 'yzf')
|
||||
const reasonText = computed(() => String(props.voidDesc || '').trim() || '暂无作废原因')
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user