refactor(shop): 重构店铺相关模型和界面组件
- 将店铺模型中的字段名从 shopName/shopAddress 更改为 name/address - 移除经纬度拆分字段 lng 和 lat,新增 location、district 和 points 字段 - 更新店铺编辑表单以匹配新的字段命名 - 在店铺列表中为店铺名称添加标签样式 - 修正配送员页面的列标题和数据显示逻辑 - 启用开发环境的 API URL 配置 - 修复双击编辑功能的调用问题
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
VITE_APP_NAME=后台管理(开发环境)
|
||||
#VITE_API_URL=http://127.0.0.1:9200/api
|
||||
VITE_API_URL=http://127.0.0.1:9200/api
|
||||
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
||||
|
||||
|
||||
|
||||
@@ -7,11 +7,9 @@ export interface ShopStore {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 店铺名称
|
||||
shopName?: string;
|
||||
// 门店横幅/图片
|
||||
shopBanner?: string;
|
||||
name?: string;
|
||||
// 门店地址
|
||||
shopAddress?: string;
|
||||
address?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 邮箱
|
||||
@@ -28,10 +26,12 @@ export interface ShopStore {
|
||||
region?: string;
|
||||
// 经度和纬度
|
||||
lngAndLat?: string;
|
||||
// 经度(部分接口可能拆分返回)
|
||||
lng?: string;
|
||||
// 纬度(部分接口可能拆分返回)
|
||||
lat?: string;
|
||||
// 位置
|
||||
location?:string;
|
||||
// 区域
|
||||
district?: string;
|
||||
// 轮廓
|
||||
points?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 状态
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
>待审核</a-tag
|
||||
>
|
||||
<a-tag v-if="record.applyStatus === 20" color="success"
|
||||
>转账成功</a-tag
|
||||
>审核通过</a-tag
|
||||
>
|
||||
<a-tag v-if="record.applyStatus === 30" color="error">用户取消</a-tag>
|
||||
<a-tag v-if="record.applyStatus === 40">已打款</a-tag>
|
||||
@@ -443,7 +443,7 @@
|
||||
},
|
||||
// 行双击事件
|
||||
onDblclick: () => {
|
||||
// openEdit(record);
|
||||
openEdit(record);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' }
|
||||
"
|
||||
>
|
||||
<a-form-item label="店铺名称" name="shopName">
|
||||
<a-form-item label="店铺名称" name="name">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入店铺名称"
|
||||
v-model:value="form.shopName"
|
||||
v-model:value="form.name"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="门店经理" name="managerName">
|
||||
@@ -49,11 +49,11 @@
|
||||
placeholder="请选择省/市/区"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="门店地址" name="shopAddress">
|
||||
<a-form-item label="门店地址" name="address">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入门店地址"
|
||||
v-model:value="form.shopAddress"
|
||||
v-model:value="form.address"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="经纬度" name="lngAndLat">
|
||||
@@ -66,6 +66,25 @@
|
||||
<a-button type="primary" @click="openUrl(`https://lbs.qq.com/getPoint/`)">获取经纬度</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
<a-form-item label="轮廓" name="points">
|
||||
<div class="flex">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请选取电子围栏的轮廓"
|
||||
v-model:value="form.points"
|
||||
/>
|
||||
</div>
|
||||
<template #extra>
|
||||
<p class="py-2">
|
||||
<a
|
||||
class="text-blue-500"
|
||||
href="https://lbs.qq.com/dev/console/cloud/placeCloud/datamanage?table_id=0q3W4MrK1-_6Xag7V1"
|
||||
target="_blank"
|
||||
>使用腾讯地图的工具绘制电子围栏</a
|
||||
>
|
||||
</p>
|
||||
</template>
|
||||
</a-form-item>
|
||||
<a-form-item label="备注" name="comments">
|
||||
<a-textarea
|
||||
:rows="4"
|
||||
@@ -132,8 +151,8 @@
|
||||
// 用户信息
|
||||
const form = reactive<ShopStore>({
|
||||
id: undefined,
|
||||
shopName: undefined,
|
||||
shopAddress: undefined,
|
||||
name: undefined,
|
||||
address: undefined,
|
||||
phone: undefined,
|
||||
email: undefined,
|
||||
managerName: undefined,
|
||||
@@ -142,6 +161,9 @@
|
||||
city: undefined,
|
||||
region: undefined,
|
||||
lngAndLat: undefined,
|
||||
location: undefined,
|
||||
district: undefined,
|
||||
points: undefined,
|
||||
userId: undefined,
|
||||
isDelete: undefined,
|
||||
tenantId: undefined,
|
||||
@@ -159,7 +181,7 @@
|
||||
|
||||
// 表单验证规则
|
||||
const rules = reactive({
|
||||
shopName: [
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
type: 'string',
|
||||
@@ -183,7 +205,7 @@
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
shopAddress: [
|
||||
address: [
|
||||
{
|
||||
required: true,
|
||||
type: 'string',
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
/>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'name'">
|
||||
<a-tag color="orange">{{ record.name }}</a-tag>
|
||||
</template>
|
||||
<template v-if="column.key === 'image'">
|
||||
<a-image :src="record.image" :width="50" />
|
||||
</template>
|
||||
@@ -49,7 +52,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { createVNode, ref, computed } from 'vue';
|
||||
import { createVNode, ref } from 'vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import type { EleProTable } from 'ele-admin-pro';
|
||||
@@ -100,16 +103,15 @@
|
||||
// 完整的列配置(包含所有字段)
|
||||
const columns = ref<ColumnItem[]>([
|
||||
{
|
||||
title: '店铺名称',
|
||||
dataIndex: 'shopName',
|
||||
key: 'shopName',
|
||||
ellipsis: true
|
||||
title: '店铺ID',
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '门店地址',
|
||||
dataIndex: 'shopAddress',
|
||||
key: 'shopAddress',
|
||||
ellipsis: true
|
||||
title: '店铺名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name'
|
||||
},
|
||||
// {
|
||||
// title: '手机号码',
|
||||
@@ -141,6 +143,12 @@
|
||||
key: 'region',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '门店地址',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
ellipsis: true
|
||||
},
|
||||
// {
|
||||
// title: '经度',
|
||||
// dataIndex: 'lng',
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
<template v-if="column.key === 'image'">
|
||||
<a-image :src="record.image" :width="50" />
|
||||
</template>
|
||||
<template v-if="column.key === 'storeName'">
|
||||
<a-tag v-if="record.storeName" color="orange">{{ record.storeName }}</a-tag>
|
||||
</template>
|
||||
<template v-if="column.key === 'status'">
|
||||
<a-tag v-if="record.status === 0" color="green">显示</a-tag>
|
||||
<a-tag v-if="record.status === 1" color="red">隐藏</a-tag>
|
||||
@@ -106,7 +109,12 @@
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
title: '所属门店',
|
||||
dataIndex: 'storeName',
|
||||
key: 'storeName'
|
||||
},
|
||||
{
|
||||
title: '配送员',
|
||||
dataIndex: 'realName',
|
||||
key: 'realName'
|
||||
},
|
||||
@@ -125,11 +133,6 @@
|
||||
dataIndex: 'idCardNo',
|
||||
key: 'idCardNo'
|
||||
},
|
||||
{
|
||||
title: '选择配送点',
|
||||
dataIndex: 'dealerId',
|
||||
key: 'dealerId'
|
||||
},
|
||||
// {
|
||||
// title: '状态',
|
||||
// dataIndex: 'status',
|
||||
|
||||
Reference in New Issue
Block a user