feat(shopGoodsCategory): 新增商品分类编辑弹窗“链接地址”字段
- 在分类标识下方添加“链接地址”输入项,支持清除和占位提示 - 新增字段绑定到表单数据的path属性,确保表单数据同步更新 - 重置表单时初始化path字段为undefined,保证新增分类时清空该字段 - 修改仅限前端界面,后端数据库已有path字段,无需额外迁移
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# 2026-08-14 工作日志
|
||||
|
||||
## 修复商品分类层级(10409 → 10421)
|
||||
|
||||
- 问题:guilixu-admin 后台 `/shop/shopGoodsCategory` 页面中,10409「二级分类」与 10421「特别专区」显示为同级。
|
||||
- 原因:前端按 `parentId` 渲染树形层级,说明 10409 的 `parent_id` 不是 10421(实际可能为 0)。
|
||||
- 处理:
|
||||
- 确认后端表为 `shop_goods_category`(guilixu-java / db_guilixu),关键字段 `category_id`、`parent_id`。
|
||||
- 生成修复 SQL:`fix-category-parent-10409.sql`,将 10409 的 `parent_id` 更新为 10421。
|
||||
- 同时提供了后台 UI 的临时操作方式:编辑 10409 把上级分类改为 10421。
|
||||
- 文件:`/Users/gxwebsoft/VUE/guilixu-admin/fix-category-parent-10409.sql`
|
||||
|
||||
## 商品分类编辑弹窗新增「链接地址」字段
|
||||
|
||||
- 需求:在 `shopGoodsCategoryEdit.vue` 的「分类标识」下方新增「链接地址」输入项,存到 `path` 字段。
|
||||
- 改动:`src/views/shop/shopGoodsCategory/components/shopGoodsCategoryEdit.vue`
|
||||
- 在「分类标识」form-item 之后新增「链接地址」项,绑定 `form.path`(form 已有该字段,无需改 model/后端)。
|
||||
- 重置逻辑 Object.assign 补上 `path: undefined`,保证新增时清空。
|
||||
- 注意:仅前端 UI 改动,后端表 `shop_goods_category.path` 字段已存在,无需迁移。
|
||||
@@ -90,6 +90,14 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="链接地址" name="path">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="可选,如:/pages/goods/list?categoryId=1"
|
||||
v-model:value="form.path"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="状态" name="status">
|
||||
<a-radio-group v-model:value="form.status">
|
||||
<a-radio :value="0">正常</a-radio>
|
||||
@@ -286,6 +294,7 @@
|
||||
image: undefined,
|
||||
adImage: undefined,
|
||||
parentId: undefined,
|
||||
path: undefined,
|
||||
sortNumber: 100,
|
||||
comments: undefined,
|
||||
status: 0
|
||||
|
||||
Reference in New Issue
Block a user