From 78fa06f859abd52bdbe80aa4c73365d845569825 Mon Sep 17 00:00:00 2001 From: doublekou <951513186@qq.com> Date: Thu, 21 Sep 2023 18:04:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/geopoliticalCustomers/types.ts | 2 ++ src/main.ts | 11 ++++++ .../geopoliticalCustomersModal.vue | 35 +++++++++++++++---- vite.config.ts | 4 +-- 4 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/api/geopoliticalCustomers/types.ts b/src/api/geopoliticalCustomers/types.ts index c101f5a..e6513c2 100644 --- a/src/api/geopoliticalCustomers/types.ts +++ b/src/api/geopoliticalCustomers/types.ts @@ -171,6 +171,8 @@ export interface CustomerDTO { customName?: string | undefined //客户联系方式 customNid?: string | undefined + //备注 + remark?: string | undefined address?: Array //省 economize?: string diff --git a/src/main.ts b/src/main.ts index b33c656..29bd74b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,6 +12,17 @@ import 'ant-design-vue/es/modal/style/index.less' import './styles/index.less' import App from './App.vue' import { enableI18n } from '@/config' +import { provincesAndCitiesAndAutonomousRegions } from '@/utils/geopolitical-customers' + +// 声明一个全局变量,将数据赋值给它 +declare global { + interface Window { + globalProvincesAndCitiesAndAutonomousRegions: any + } +} + +// 将数据赋值给全局变量 +window.globalProvincesAndCitiesAndAutonomousRegions = provincesAndCitiesAndAutonomousRegions const app = createApp(App) app.use(createPinia()) diff --git a/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue b/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue index f7dc121..94c21a9 100644 --- a/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue +++ b/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue @@ -63,6 +63,23 @@ :readonly="title === '详情' || title === '审核'" /> + + + { appointmentTimeOptions.value?.push({ value: item, label: item }) }) //省市区下拉框列表数据 - provincesAndCitiesAndAutonomousOptions.value = provincesAndCitiesAndAutonomousRegions + // provincesAndCitiesAndAutonomousOptions.value = provincesAndCitiesAndAutonomousRegions + provincesAndCitiesAndAutonomousOptions.value = window.globalProvincesAndCitiesAndAutonomousRegions }) //动态生成只读/禁用样式 @@ -528,6 +546,7 @@ const pagingQuery = () => { message.info('当前位置附近暂无相关门店') } else { const ids = formModel.customStoreEntities.map(item => item.storeId) + listData.value.length = 0 result.data && result.data.forEach((item: any) => { const disabled = ids.includes(Number(item.id)) @@ -728,10 +747,11 @@ const submitOperate = (type: string, status?: number) => { if (res.code === 200) { isSubmit.value = true registerVisible.value = false + handleSubmit() message.success('操作成功') - if (type === 'zc' || title.value === '审核') { - handleSubmit() - } + // if (type === 'zc' || title.value === '审核') { + + // } } } @@ -795,12 +815,13 @@ const formModel = reactive({ customId: undefined, customName: '', customNid: '', + remark: '', address: [], economize: '', market: '', distinguish: '', detailAddress: '', - radius: '', + radius: '5000', enrollStatus: 1, customStoreEntities: [] }) @@ -876,6 +897,7 @@ defineExpose({ customId, customName, customNid, + remark, economize, market, distinguish, @@ -887,6 +909,7 @@ defineExpose({ formModel.customId = customId formModel.customName = customName formModel.customNid = customNid + formModel.remark = remark formModel.address = [economize, market, distinguish] formModel.economize = economize formModel.market = market @@ -931,7 +954,7 @@ defineExpose({ }) //地图 -import { provincesAndCitiesAndAutonomousRegions } from '@/utils/geopolitical-customers' +// import { provincesAndCitiesAndAutonomousRegions } from '@/utils/geopolitical-customers' import type { ShowSearchType } from 'ant-design-vue/es/cascader' declare const AMap: any diff --git a/vite.config.ts b/vite.config.ts index c42433a..8d04afb 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -22,13 +22,13 @@ import { antdvStyleDeps } from './src/utils/resolvers' //项目 // const serverAddress = 'http://admin.ballcat.cn' //xy -// const serverAddress = 'http://172.18.0.225:8000' +const serverAddress = 'http://172.18.0.225:8000' //jt // const serverAddress = 'http://172.18.1.8:8000' //ts // const serverAddress = 'http://172.18.0.228:8000' //测试 -const serverAddress = 'http://39.100.77.21:8000' +// const serverAddress = 'http://39.100.77.21:8000' //线上ip // const serverAddress = 'http://175.27.212.74:80'