merge: fix/test-fixture-junk-badge into develop

This commit is contained in:
yeuimu
2026-08-30 03:15:23 +08:00
4 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -1180,7 +1180,7 @@ onMounted(() => loadAll())
popper-class="cfg-pop-popper" popper-class="cfg-pop-popper"
> >
<template #reference> <template #reference>
<span class="cfg-badge" :title="`同款共 ${data.linkCount ?? data.configCount} 条链接 · ${data.configCount} 个官网配置`" @click.stop>{{ data.linkCount ? `${data.linkCount} 条链接 · ` : '' }}{{ data.configCount }} 个配置</span> <span class="cfg-badge" :title="`同款共 ${data.configCount} 个官网配置`" @click.stop>{{ data.configCount }} 个配置</span>
</template> </template>
<div class="cfg-pop-list"> <div class="cfg-pop-list">
<div v-for="c in (data.familyConfigs || [])" :key="c.goodId" class="cfg-pop-row"> <div v-for="c in (data.familyConfigs || [])" :key="c.goodId" class="cfg-pop-row">
@@ -153,6 +153,8 @@ describe('OriginGoodsService', () => {
expect(nodeB.configuredCount).toBeGreaterThanOrEqual(1); expect(nodeB.configuredCount).toBeGreaterThanOrEqual(1);
expect(nodeB.configuredCountries).toContain(`Tree Country ${stamp}`); expect(nodeB.configuredCountries).toContain(`Tree Country ${stamp}`);
} finally { } finally {
// 先删引用行,否则 good.delete 被外键限制挡住(错误被吞后分类/商品/国家全残留)
await prisma.goodOriginGood.deleteMany({ where: { goodId: good.id } }).catch(() => undefined);
await prisma.good.delete({ where: { id: good.id } }).catch(() => undefined); await prisma.good.delete({ where: { id: good.id } }).catch(() => undefined);
await prisma.country.delete({ where: { id: country.id } }).catch(() => undefined); await prisma.country.delete({ where: { id: country.id } }).catch(() => undefined);
await prisma.category.delete({ where: { id: cat.id } }).catch(() => undefined); await prisma.category.delete({ where: { id: cat.id } }).catch(() => undefined);
@@ -50,7 +50,8 @@ describe('TagGroupsService', () => {
it('updates group name and color', async () => { it('updates group name and color', async () => {
const name = `Upd ${Date.now()}`; const name = `Upd ${Date.now()}`;
createdNames.push(name); // 改名后的行也要纳入清理,否则 -v2 行会残留在共享开发库
createdNames.push(name, `${name}-v2`);
const g = await service.create({ groupName: name }); const g = await service.create({ groupName: name });
const updated = await service.update(g.id, { const updated = await service.update(g.id, {
groupName: `${name}-v2`, groupName: `${name}-v2`,
+2 -2
View File
@@ -174,8 +174,8 @@ curl -X POST /product-families/organize -H "$AUTH" # 后台「整理
拖拽到左侧分类/国家的路径同样被拦截(提示同款已配置、不允许重复配置); 拖拽到左侧分类/国家的路径同样被拦截(提示同款已配置、不允许重复配置);
- 族分组头部计数与「仅未配置」筛选同样按族语义(族已配置 → 计入已配置)。 - 族分组头部计数与「仅未配置」筛选同样按族语义(族已配置 → 计入已配置)。
- **左树一族一行**(国家/品类模式):同款多条配置只显示排序最前的一条,名称旁常显 - **左树一族一行**(国家/品类模式):同款多条配置只显示排序最前的一条,名称旁常显
N 条链接 · M 个配置」徽标(链接数=族成员数,配置数=该族官网商品数;单链接单配置也显示, 「M 个配置」徽标(M=该族官网商品数;单配置也显示,避免漏看),悬浮列出全部配置
避免漏看),悬浮列出全部配置(名称/国家·分类/打开),分组头部计数仍按全部商品统计。 (名称/国家·分类/打开),分组头部计数仍按全部商品统计。
- 人工改价/自动成族等族管理 API`/product-families/*`)保留,供脚本或后续界面使用; - 人工改价/自动成族等族管理 API`/product-families/*`)保留,供脚本或后续界面使用;
- 页面组件化:`GoodsView.vue` 拆出 `components/` 下的 GoodsEditDialog(编辑弹窗)、 - 页面组件化:`GoodsView.vue` 拆出 `components/` 下的 GoodsEditDialog(编辑弹窗)、
GoodsConfigDialog(配置弹窗)、CustomGoodDialog(自定义商品)、TagFilterPopover(标签筛选弹层)。 GoodsConfigDialog(配置弹窗)、CustomGoodDialog(自定义商品)、TagFilterPopover(标签筛选弹层)。