fix(consignment): 未指定选项置于对接客服下拉末尾
This commit is contained in:
@@ -1130,7 +1130,7 @@ export default function ConsignmentInventoryPanel() {
|
|||||||
setContactSupporterIds(values)
|
setContactSupporterIds(values)
|
||||||
setPage(1)
|
setPage(1)
|
||||||
}}
|
}}
|
||||||
options={[{ label: '未指定', value: 0 }, ...contactSupporterOptions]}
|
options={[...contactSupporterOptions, { label: '未指定', value: 0 }]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Input.Search
|
<Input.Search
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ test('寄售仓库提供对接客服多选筛选,并与未指定取并集', ()
|
|||||||
source.includes('contactSupporterUnassigned: includeUnassignedContactSupporter || undefined'),
|
source.includes('contactSupporterUnassigned: includeUnassignedContactSupporter || undefined'),
|
||||||
)
|
)
|
||||||
assert.ok(source.includes("{ label: '未指定', value: 0 }"))
|
assert.ok(source.includes("{ label: '未指定', value: 0 }"))
|
||||||
|
// 「未指定」必须排在真实客服选项之后(下拉最下面)。
|
||||||
|
const contactOptionsIndex = source.indexOf('...contactSupporterOptions')
|
||||||
|
const unassignedOptionIndex = source.indexOf("{ label: '未指定', value: 0 }")
|
||||||
|
assert.ok(
|
||||||
|
contactOptionsIndex > 0 && unassignedOptionIndex > contactOptionsIndex,
|
||||||
|
'「未指定」应放在对接客服选项列表最下面',
|
||||||
|
)
|
||||||
// 对接客服筛选必须排在搜索框前面。
|
// 对接客服筛选必须排在搜索框前面。
|
||||||
const contactIndex = source.indexOf('placeholder="对接客服(可多选)"')
|
const contactIndex = source.indexOf('placeholder="对接客服(可多选)"')
|
||||||
const searchIndex = source.indexOf('placeholder="搜索物品名/编号/收购人/店铺/卖家"')
|
const searchIndex = source.indexOf('placeholder="搜索物品名/编号/收购人/店铺/卖家"')
|
||||||
|
|||||||
Reference in New Issue
Block a user