fix(jd-database): 归属快筛首屏文字改卡「全部」——placeholder 随默认档改词(2026-11-22 用户口径,补 0a769fa8 只改逻辑没改显示的漏改半边;el-select 对 '' 值显示 placeholder 故文案必须与默认档同词,挂载测试钉住灰字文案)
This commit is contained in:
@@ -128,7 +128,7 @@ const selectedGroupIdNum = computed(() => {
|
|||||||
const filterActive = computed(() => jdProductFilterActive(filter))
|
const filterActive = computed(() => jdProductFilterActive(filter))
|
||||||
|
|
||||||
/** 回显条芯片(v1.7 对齐原型):类目/分类/店铺/价格区间/同步区间/归属档,各带人话前缀;
|
/** 回显条芯片(v1.7 对齐原型):类目/分类/店铺/价格区间/同步区间/归属档,各带人话前缀;
|
||||||
* 归属三档只回显偏离出厂默认(未分类)的档位——默认档不是激活筛选。 */
|
* 归属三档只回显偏离出厂默认(全部)的档位——默认档不是激活筛选。 */
|
||||||
const activeFilterChips = computed(() => {
|
const activeFilterChips = computed(() => {
|
||||||
const chips: { key: string; label: string }[] = []
|
const chips: { key: string; label: string }[] = []
|
||||||
const keyword = (filter.keyword || '').trim()
|
const keyword = (filter.keyword || '').trim()
|
||||||
@@ -461,7 +461,7 @@ function apply(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 重置:筛选面回出厂空态(搜索词/类目/店铺/价格/日期随 filter 回空=侧栏高亮自动清,
|
/** 重置:筛选面回出厂空态(搜索词/类目/店铺/价格/日期随 filter 回空=侧栏高亮自动清,
|
||||||
* 归属三档回默认未分类档),回第一页重取;分组作用域(ownerGroupId)不在 filter 里,
|
* 归属三档回默认全部档('')),回第一页重取;分组作用域(ownerGroupId)不在 filter 里,
|
||||||
* 天然保留(AC-4)。 */
|
* 天然保留(AC-4)。 */
|
||||||
function reset(): void {
|
function reset(): void {
|
||||||
Object.assign(filter, createJdProductFilterState())
|
Object.assign(filter, createJdProductFilterState())
|
||||||
@@ -717,16 +717,20 @@ onMounted(async () => {
|
|||||||
</el-select>
|
</el-select>
|
||||||
<span v-else class="jd-group-locked" title="你的数据权限内只有这一个分组">{{ currentGroupName }}</span>
|
<span v-else class="jd-group-locked" title="你的数据权限内只有这一个分组">{{ currentGroupName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- 归属三档快筛(2026-11-17 用户口径「加个已分类和未分类的筛选」+同日收敛
|
<!-- 归属三档快筛(2026-11-17 用户口径「加个已分类和未分类的筛选」;2026-11-18
|
||||||
「默认卡在未分类上就行」;2026-11-18 用户口径「加个全部选项」恢复全量档):
|
「加个全部选项」恢复全量档;2026-11-21「默认改成全部」出厂默认卡 '';
|
||||||
|
2026-11-22「文字也要改一下 默认全部」placeholder 同步改「全部」):
|
||||||
已分类=当前分组下有分类(V203 归属表,与侧栏分类选中同形);三档下拉、
|
已分类=当前分组下有分类(V203 归属表,与侧栏分类选中同形);三档下拉、
|
||||||
出厂默认仍卡「未分类」(11-17 口径不动),「全部」(value='')选中即查当前
|
出厂默认=「全部」(value=''),首屏即查当前分组全部商品(序列化不下发
|
||||||
分组全部商品(序列化不下发 classified 参数,后端 required=false 跳过谓词);
|
classified 参数,后端 required=false 跳过谓词);选中即查(回第一页);
|
||||||
选中即查(回第一页);「重置」仍回未分类档。 -->
|
「重置」也回全部档。⚠ el-select 对 '' 值按空值处理(useSelect 的
|
||||||
|
hasModelValue 把 '' 算空)⇒ 界面显示的是本 placeholder 而非「全部」选项的
|
||||||
|
label,placeholder 文案必须与默认档同词「全部」;写回「未分类」=首屏
|
||||||
|
灰字撒谎(逻辑已查全量、界面谎称卡未分类)。 -->
|
||||||
<el-select
|
<el-select
|
||||||
v-model="filter.classified"
|
v-model="filter.classified"
|
||||||
class="admin-filter"
|
class="admin-filter"
|
||||||
placeholder="未分类"
|
placeholder="全部"
|
||||||
aria-label="筛选分类状态"
|
aria-label="筛选分类状态"
|
||||||
@change="apply"
|
@change="apply"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -513,6 +513,13 @@ describe('归属三档快筛(三档,2026-11-21 用户口径默认改卡「
|
|||||||
it('下拉三档且首屏就卡「全部」(首取不带 classified 键=后端跳过谓词查全量)', async () => {
|
it('下拉三档且首屏就卡「全部」(首取不带 classified 键=后端跳过谓词查全量)', async () => {
|
||||||
const wrapper = await mountWith({ items: [item(1)], total: 1, page: 1, pageSize: 50 })
|
const wrapper = await mountWith({ items: [item(1)], total: 1, page: 1, pageSize: 50 })
|
||||||
expect(optionLabels(wrapper, '筛选分类状态')).toEqual(['全部', '已分类', '未分类'])
|
expect(optionLabels(wrapper, '筛选分类状态')).toEqual(['全部', '已分类', '未分类'])
|
||||||
|
// 首屏可见文案(2026-11-22 用户口径「文字也要改一下 默认全部」):'' 值被 el-select
|
||||||
|
// 按空值处理(useSelect.hasModelValue 把 '' 算空)⇒ 界面显示的是 placeholder 灰字,
|
||||||
|
// 不是「全部」选项的 label——placeholder 必须与默认档同词「全部」;写「未分类」=
|
||||||
|
// 逻辑已查全量、界面却谎称卡在未分类(0a769fa8 后的漏改半边)。
|
||||||
|
const placeholderEl = selectByLabel(wrapper, '筛选分类状态').find('.el-select__placeholder')
|
||||||
|
expect(placeholderEl.exists(), '归属快筛缺 placeholder 节点').toBe(true)
|
||||||
|
expect(placeholderEl.text()).toBe('全部')
|
||||||
expect(jdApi.fetchJdProductList.mock.calls[0][0]).not.toHaveProperty('classified',
|
expect(jdApi.fetchJdProductList.mock.calls[0][0]).not.toHaveProperty('classified',
|
||||||
'首屏默认档=全部——2026-11-21 用户口径「默认改成全部」(推翻 11-17 卡未分类)')
|
'首屏默认档=全部——2026-11-21 用户口径「默认改成全部」(推翻 11-17 卡未分类)')
|
||||||
wrapper.unmount()
|
wrapper.unmount()
|
||||||
@@ -1381,16 +1388,16 @@ describe('首屏作用域同源与静默降级(Phase 0 黄金测试)', () =>
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 店铺名单接线(v1.7 F6,2026-11-21 拍板「完整对齐」):侧栏点店铺行→列表按
|
/** 店铺名单接线(v1.7 F6,2026-11-21 拍板「完整对齐」;2026-11-22 铺开形态——名单
|
||||||
|
* 直接可见,挂载助手不再需要点开折叠箭头):侧栏点店铺行→列表按
|
||||||
* group_id+shop_name 成对过滤;行内改名/移除与分类行删除走对应 API;添加店铺弹窗
|
* group_id+shop_name 成对过滤;行内改名/移除与分类行删除走对应 API;添加店铺弹窗
|
||||||
* 开合与批量提交。API 全部 mock(端点形状在 jd-product-api 与后端 controller 对撞)。 */
|
* 开合与批量提交。API 全部 mock(端点形状在 jd-product-api 与后端 controller 对撞)。 */
|
||||||
describe('店铺名单接线(v1.7:点店铺过滤+名单维护+添加店铺弹窗)', () => {
|
describe('店铺名单接线(v1.7:点店铺过滤+名单维护+添加店铺弹窗)', () => {
|
||||||
/** 挂载带名单的页面并展开裙装的名单。 */
|
/** 挂载带名单的页面(铺开形态:名单首屏直接可见)。 */
|
||||||
async function mountWithShops(): Promise<VueWrapper<Element>> {
|
async function mountWithShops(): Promise<VueWrapper<Element>> {
|
||||||
jdApi.fetchJdProductGroups.mockResolvedValue(GROUPS)
|
jdApi.fetchJdProductGroups.mockResolvedValue(GROUPS)
|
||||||
const wrapper = await mountWith({ items: [item(1)], total: 1, page: 1, pageSize: 50 })
|
const wrapper = await mountWith({ items: [item(1)], total: 1, page: 1, pageSize: 50 })
|
||||||
await pickSideTab(wrapper, '店铺分类')
|
await pickSideTab(wrapper, '店铺分类')
|
||||||
await sideCustom(wrapper).get('[aria-label="展开或收起 裙装 的店铺名单"]').trigger('click')
|
|
||||||
await flushPromises()
|
await flushPromises()
|
||||||
return wrapper
|
return wrapper
|
||||||
}
|
}
|
||||||
@@ -1510,10 +1517,9 @@ describe('店铺名单接线(v1.7:点店铺过滤+名单维护+添加店
|
|||||||
jdApi.fetchJdProductGroups.mockResolvedValue(GROUPS)
|
jdApi.fetchJdProductGroups.mockResolvedValue(GROUPS)
|
||||||
const wrapper = await mountWith({ items: [item(1)], total: 1, page: 1, pageSize: 50 })
|
const wrapper = await mountWith({ items: [item(1)], total: 1, page: 1, pageSize: 50 })
|
||||||
await pickSideTab(wrapper, '店铺分类')
|
await pickSideTab(wrapper, '店铺分类')
|
||||||
await sideCustom(wrapper).get('[aria-label="展开或收起 裙装 的店铺名单"]').trigger('click')
|
|
||||||
await flushPromises()
|
await flushPromises()
|
||||||
const custom = sideCustom(wrapper)
|
const custom = sideCustom(wrapper)
|
||||||
expect(custom.findAll('.jd-side-shop')).toHaveLength(2, '店铺行照常可见(读面)')
|
expect(custom.findAll('.jd-side-shop')).toHaveLength(2, '店铺行照常可见(读面,铺开态)')
|
||||||
expect(custom.find('.jd-side-shop-add').exists()).toBe(false, '只读档无添加店铺入口')
|
expect(custom.find('.jd-side-shop-add').exists()).toBe(false, '只读档无添加店铺入口')
|
||||||
expect(custom.find('[aria-label="改名店铺 绿屿街道店"]').exists()).toBe(false)
|
expect(custom.find('[aria-label="改名店铺 绿屿街道店"]').exists()).toBe(false)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user