refactor(shop): 重构分销商设置存储结构并优化数据处理逻辑
- 将单个设置对象改为按类型分组的映射结构,支持基础设置、分销商条件、结算等功能模块 - 新增 getBooleanFlag、getNumberFlag、pickEnumValue 等工具函数统一数据转换逻辑 - 实现 ensurePath 和 setWordValue 函数用于深层对象路径操作和文案配置 - 优化图片上传相关函数 getUploadUrl 和 toUploadFileList 的 URL 获取逻辑 - 将整体保存逻辑拆分为按设置类型分别保存的 saveSettingItem 方法 - 更新分销商类型显示,将"配送员"修改为"总分销商"以符合业务需求 - 调整精度控制从4位小数改为3位小数以匹配实际业务场景
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
<a-select v-model:value="form.type" placeholder="请选择类型">
|
||||
<a-select-option :value="0">分销商</a-select-option>
|
||||
<a-select-option :value="1">门店</a-select-option>
|
||||
<a-select-option :value="2">配送员</a-select-option>
|
||||
<a-select-option :value="2">总分销商</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -136,7 +136,7 @@
|
||||
class="ele-fluid"
|
||||
:min="0"
|
||||
:max="1"
|
||||
:precision="4"
|
||||
:precision="3"
|
||||
stringMode
|
||||
:disabled="true"
|
||||
placeholder="例如 0.007"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<template v-if="column.key === 'type'">
|
||||
<a-tag v-if="record.type === 0">分销商</a-tag>
|
||||
<a-tag v-if="record.type === 1" color="orange">门店</a-tag>
|
||||
<a-tag v-if="record.type === 2" color="purple">配送员</a-tag>
|
||||
<a-tag v-if="record.type === 2" color="purple">总分销商</a-tag>
|
||||
</template>
|
||||
<template v-if="column.key === 'qrcode'">
|
||||
<QrcodeOutlined :style="{fontSize: '24px'}" @click="openQrCode(record)" />
|
||||
|
||||
Reference in New Issue
Block a user