fix(expressTemplate): 修正运费模板计费方式类型及删除报错
- 将运费模板和详情模型中的计费方式 type 从 string 改为 boolean 类型 - 修改相关页面中计费方式显示及选择控件为布尔值 true/false 表示按件/按重量 - 统一删除操作使用后端返回的主键 id 替代废弃的 shopExpressTemplateId - 修复删除运费模板时报错“参数格式错误: id 的值 'undefined' 无法转换为 Integer” - ele-modal 关闭按钮定位修复,兼容最大化按钮时的偏移问题 - 小程序端 checkout 运费模板接入,支持动态计算显示运费费用 - 优化编辑表单中首件/续件数量或重量的动态标签和占位提示逻辑
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
||||
<ele-pro-table
|
||||
ref="tableRef"
|
||||
row-key="shopExpressTemplateId"
|
||||
row-key="id"
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
:customRow="customRow"
|
||||
@@ -21,8 +21,8 @@
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'type'">
|
||||
<a-tag v-if="record.type === '0'" color="blue">按件</a-tag>
|
||||
<a-tag v-else-if="record.type === '1'" color="cyan">按重量</a-tag>
|
||||
<a-tag v-if="record.type === true" color="blue">按件</a-tag>
|
||||
<a-tag v-else-if="record.type === false" color="cyan">按重量</a-tag>
|
||||
<span v-else>{{ record.type }}</span>
|
||||
</template>
|
||||
<template v-if="column.key === 'status'">
|
||||
@@ -200,7 +200,7 @@
|
||||
/* 删除单个 */
|
||||
const remove = (row: ShopExpressTemplate) => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeShopExpressTemplate(row.shopExpressTemplateId)
|
||||
removeShopExpressTemplate(row.id)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
@@ -226,7 +226,7 @@
|
||||
onOk: () => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
removeBatchShopExpressTemplate(
|
||||
selection.value.map((d) => d.shopExpressTemplateId)
|
||||
selection.value.map((d) => d.id)
|
||||
)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
|
||||
Reference in New Issue
Block a user