feat(shop): 完善运费模板配送区域功能
- 模板列表操作列新增“配送区域”跳转链接,调整操作列宽度为200 - 配送区域页根据路由参数设置页面标题并过滤对应模板数据 - 合并省市列为配送地区列,显示具体地区名称 - 移除配送区域页模板ID和计费方式列 - 搜索组件去除模板ID搜索框,保留新增与批量删除 - 编辑表单用级联选择组件替代省市输入,移除所属模板与计费方式字段 - 编辑表单支持配送地区回显及动态标签显示,保存时自动赋值模板ID和计费方式 - 加载地区数据建立ID到名称映射以支持地区展示
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
<a-space>
|
||||
<a @click="openEdit(record)">修改</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="goDetail(record)">配送区域</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm
|
||||
title="确定要删除此记录吗?"
|
||||
@confirm="remove(record)"
|
||||
@@ -56,6 +58,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { createVNode, ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import type { EleProTable } from 'ele-admin-pro';
|
||||
@@ -79,6 +82,7 @@
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
const router = useRouter();
|
||||
|
||||
// 表格选中数据
|
||||
const selection = ref<ShopExpressTemplate[]>([]);
|
||||
@@ -178,7 +182,7 @@
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 140,
|
||||
width: 200,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
hideInSetting: true
|
||||
@@ -197,6 +201,18 @@
|
||||
showEdit.value = true;
|
||||
};
|
||||
|
||||
/* 跳转到配送区域 */
|
||||
const goDetail = (row: ShopExpressTemplate) => {
|
||||
router.push({
|
||||
path: '/shop/shopExpressTemplateDetail',
|
||||
query: {
|
||||
templateId: String(row.id),
|
||||
title: row.title || '',
|
||||
type: String(row.type)
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* 删除单个 */
|
||||
const remove = (row: ShopExpressTemplate) => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
|
||||
Reference in New Issue
Block a user