Files
guilixu-admin/.workbuddy/memory/2026-07-08.md
赵忠林 ae8cb170dd feat(shop): 完善运费模板配送区域功能
- 模板列表操作列新增“配送区域”跳转链接,调整操作列宽度为200
- 配送区域页根据路由参数设置页面标题并过滤对应模板数据
- 合并省市列为配送地区列,显示具体地区名称
- 移除配送区域页模板ID和计费方式列
- 搜索组件去除模板ID搜索框,保留新增与批量删除
- 编辑表单用级联选择组件替代省市输入,移除所属模板与计费方式字段
- 编辑表单支持配送地区回显及动态标签显示,保存时自动赋值模板ID和计费方式
- 加载地区数据建立ID到名称映射以支持地区展示
2026-07-08 19:00:03 +08:00

32 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2026-07-08 工作日志
## 完善运费模板配送区域功能
### 改造内容
1. **模板列表页** (`shopExpressTemplate/index.vue`)
- 操作列增加"配送区域"链接,点击跳转到 `shopExpressTemplateDetail?templateId=xxx&title=xxx&type=xxx`
- 操作列宽度从 140 调整为 200
2. **配送区域页面** (`shopExpressTemplateDetail/index.vue`)
- 读取路由参数 `templateId`/`title`/`type`,页面标题显示"模板名称 - 配送区域"
- 数据源自动按 `templateId` 过滤
- 移除"所属模板ID"和"计费方式"列
- 省份/城市列合并为"配送地区"列,显示地区名称(通过 regions-data.json 建立 ID→名称映射
-`templateId``templateType` 给编辑组件
3. **搜索组件** (`shopExpressTemplateDetail/components/search.vue`)
- 移除模板ID搜索框仅保留添加/批量删除按钮
4. **编辑表单** (`shopExpressTemplateDetail/components/shopExpressTemplateDetailEdit.vue`)
-`RegionsSelect` 级联选择器provinceCity 模式)替换省份/城市的 `a-input-number`
- 移除"所属模板"下拉选择(由路由参数确定)
- 移除"计费方式"radio从父模板继承
- 标签根据 `templateType` 动态显示"首件数量"或"首重重量"
- 保存时自动填充 `templateId``type`
- 编辑回显时将 provinceId/cityId 数字转回字符串数组给级联选择器
### 技术要点
- `RegionsSelect` 组件位于 `src/components/RegionsSelect/`,数据源为 `public/json/regions-data.json`
- 级联选择器 value 是字符串数组(如 `["110000", "110100"]`),需与 model 的 number 类型互转
- 路由路径 `/shop/shopExpressTemplateDetail` 依赖后端菜单配置,如不一致需调整