寄售仓库详情规格改为纯值展示
- 物品详情规格去掉字段名,0 璀璨省略 - 更新仓库详情展示测试
This commit is contained in:
@@ -69,7 +69,6 @@ import {
|
|||||||
CONSIGNMENT_SPEC_TAG_COLORS,
|
CONSIGNMENT_SPEC_TAG_COLORS,
|
||||||
resolveConsignmentDisplayItemName,
|
resolveConsignmentDisplayItemName,
|
||||||
resolveConsignmentSpecTagItems,
|
resolveConsignmentSpecTagItems,
|
||||||
resolveConsignmentSpecText,
|
|
||||||
resolveConsignmentSpecValueText,
|
resolveConsignmentSpecValueText,
|
||||||
} from '@/utils/consignment-spec-display'
|
} from '@/utils/consignment-spec-display'
|
||||||
import { CONSIGNMENT_SYSTEM_OPTIONS, CONSIGNMENT_ZONE_OPTIONS } from '@/utils/consignment-spec'
|
import { CONSIGNMENT_SYSTEM_OPTIONS, CONSIGNMENT_ZONE_OPTIONS } from '@/utils/consignment-spec'
|
||||||
@@ -1415,7 +1414,7 @@ export default function ConsignmentInventoryPanel() {
|
|||||||
)}
|
)}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="规格">
|
<Descriptions.Item label="规格">
|
||||||
{resolveConsignmentSpecText(viewingItem)}
|
{resolveConsignmentSpecValueText(viewingItem, { omitZeroBrilliance: true })}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="收购成本">
|
<Descriptions.Item label="收购成本">
|
||||||
<Text strong style={{ color: '#cf1322' }}>
|
<Text strong style={{ color: '#cf1322' }}>
|
||||||
|
|||||||
@@ -70,8 +70,12 @@ test('寄售仓库:列表/详情按模板渲染,编辑不再写死旧字段'
|
|||||||
'仓库列表规格标签悬浮显示字段名',
|
'仓库列表规格标签悬浮显示字段名',
|
||||||
)
|
)
|
||||||
assert.ok(
|
assert.ok(
|
||||||
page.includes('resolveConsignmentSpecText(viewingItem)'),
|
page.includes('resolveConsignmentSpecValueText(viewingItem, {'),
|
||||||
'仓库详情必须使用模板规格文本',
|
'仓库详情规格必须只显示值',
|
||||||
|
)
|
||||||
|
assert.ok(
|
||||||
|
!page.includes('resolveConsignmentSpecText(viewingItem)'),
|
||||||
|
'仓库详情不得再走带字段名的规格文本',
|
||||||
)
|
)
|
||||||
assert.ok(
|
assert.ok(
|
||||||
page.includes('{editingItem?.specs?.length ? null : ('),
|
page.includes('{editingItem?.specs?.length ? null : ('),
|
||||||
|
|||||||
Reference in New Issue
Block a user