From c9d68e6a1c908f08ccd647e20179952e09bf9c95 Mon Sep 17 00:00:00 2001 From: wersd <1523826083@qq.com> Date: Mon, 2 Jun 2025 18:12:50 +0800 Subject: [PATCH] =?UTF-8?q?crm=20=E5=9C=BA=E5=9C=B0=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.test | 4 +- src/api/crm/stationsite/index.ts | 59 ++++ src/utils/dict.ts | 2 + .../crm/contact/components/ContactList.vue | 21 ++ .../contact/detail/ContactDetailsHeader.vue | 25 +- .../crm/contact/detail/ContactDetailsInfo.vue | 29 +- src/views/crm/contact/detail/index.vue | 8 +- .../crm/customer/components/FileForm.vue | 4 +- .../customer/detail/CustomerDetailsHeader.vue | 25 +- src/views/crm/customer/detail/index.vue | 11 +- src/views/crm/customer/index.vue | 61 ++-- src/views/crm/followup/index.vue | 31 +- src/views/crm/stationsite/StationSiteForm.vue | 282 ++++++++++++++++++ src/views/crm/stationsite/index.vue | 222 ++++++++++++++ 14 files changed, 688 insertions(+), 96 deletions(-) create mode 100644 src/api/crm/stationsite/index.ts create mode 100644 src/views/crm/stationsite/StationSiteForm.vue create mode 100644 src/views/crm/stationsite/index.vue diff --git a/.env.test b/.env.test index 2252e146d..b4bef42a8 100644 --- a/.env.test +++ b/.env.test @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://localhost:48080' +VITE_BASE_URL='http://www.woyaoshouchong.asia:48080' # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务 -VITE_UPLOAD_TYPE=server +VITE_UPLOAD_TYPE=client # 接口地址 VITE_API_URL=/admin-api diff --git a/src/api/crm/stationsite/index.ts b/src/api/crm/stationsite/index.ts new file mode 100644 index 000000000..634c38160 --- /dev/null +++ b/src/api/crm/stationsite/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +// 场地信息 VO +export interface StationSiteVO { + id: number // 主键ID + name: string // 场地名称 + areaId: number // 地区 + areaName?: string // 地区 + detailAddress?: string // 地址 + locationLng: number // 定位经度 + locationLat: number // 定位纬度 + estimatedPiles: number // 可建充电桩数 + siteType: number // 场地类型 + siteStatus: number // 场地状态 + ownerId: number // 关联的业主方 + managementId: number // 关联的物管方 + recommenderName: string // 推荐人姓名 + recommenderContact: string // 推荐人联系方式 + picUrls?: string // 图片 + fileUrls?: string // 附件 + parkingSpaces: number // 车位数 + rentPrice: number // 租金价格 + creator: string // 填报人 + creatorName?: string // 填报人名称 + params: string // 参数 +} + +// 场地信息 API +export const StationSiteApi = { + // 查询场地信息分页 + getStationSitePage: async (params: any) => { + return await request.get({ url: `/crm/station-site/page`, params }) + }, + + // 查询场地信息详情 + getStationSite: async (id: number) => { + return await request.get({ url: `/crm/station-site/get?id=` + id }) + }, + + // 新增场地信息 + createStationSite: async (data: StationSiteVO) => { + return await request.post({ url: `/crm/station-site/create`, data }) + }, + + // 修改场地信息 + updateStationSite: async (data: StationSiteVO) => { + return await request.put({ url: `/crm/station-site/update`, data }) + }, + + // 删除场地信息 + deleteStationSite: async (id: number) => { + return await request.delete({ url: `/crm/station-site/delete?id=` + id }) + }, + + // 导出场地信息 Excel + exportStationSite: async (params) => { + return await request.download({ url: `/crm/station-site/export-excel`, params }) + }, +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 2f4325921..02ee1ddb4 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -212,6 +212,8 @@ export enum DICT_TYPE { CRM_PERMISSION_LEVEL = 'crm_permission_level', // CRM 数据权限的级别 CRM_PRODUCT_UNIT = 'crm_product_unit', // CRM 产品单位 CRM_FOLLOW_UP_TYPE = 'crm_follow_up_type', // CRM 跟进方式 + CRM_STATION_SITE_STATUS = 'crm_station_site_status', // CRM 场地状态 + CRM_STATION_SITE_TYPE = 'crm_station_site_type', // CRM 场地类型 // ========== ERP - 企业资源计划模块 ========== ERP_AUDIT_STATUS = 'erp_audit_status', // ERP 审批状态 diff --git a/src/views/crm/contact/components/ContactList.vue b/src/views/crm/contact/components/ContactList.vue index 716028a84..4d91c222e 100644 --- a/src/views/crm/contact/components/ContactList.vue +++ b/src/views/crm/contact/components/ContactList.vue @@ -48,6 +48,12 @@ + + + { handleQuery() } +/** 编辑操作 */ +const openFormEdit = (id: number) => { + formRef.value.open('update', id, props.customerId, props.businessId) +} + +/** 删除操作 */ +const handleDelete = async (id: number) => { + try { + await message.delConfirm() + await ContactApi.deleteContact(id) + message.success('删除成功') + getList() + } catch {} +} + /** 监听打开的 bizId + bizType,从而加载最新的列表 */ watch( () => [props.bizId, props.bizType], diff --git a/src/views/crm/contact/detail/ContactDetailsHeader.vue b/src/views/crm/contact/detail/ContactDetailsHeader.vue index 12fb3bc8d..90a770f8f 100644 --- a/src/views/crm/contact/detail/ContactDetailsHeader.vue +++ b/src/views/crm/contact/detail/ContactDetailsHeader.vue @@ -15,19 +15,32 @@ - - {{ contact.customerName }} - {{ contact.post }} - {{ contact.mobile }} - - {{ formatDate(contact.createTime) }} + + {{ contact.customerName }} + {{ contact.post }} + {{ contact.mobile }} + {{ contact.telephone }} + {{ contact.email }} + {{ contact.qq }} + {{ contact.wechat }} + + {{ contact.areaName }} {{ contact.detailAddress }} + {{ contact.post }} + + + + + + + {{ contact.remark }} diff --git a/src/views/crm/contact/detail/ContactDetailsInfo.vue b/src/views/crm/contact/detail/ContactDetailsInfo.vue index 9e8bfff19..6aeb7b08e 100644 --- a/src/views/crm/contact/detail/ContactDetailsInfo.vue +++ b/src/views/crm/contact/detail/ContactDetailsInfo.vue @@ -6,28 +6,25 @@ 基本信息 - {{ contact.name }} - {{ contact.customerName }} - {{ contact.mobile }} - {{ contact.telephone }} - {{ contact.email }} - {{ contact.qq }} - {{ contact.wechat }} - + {{ contact.name }} + {{ contact.customerName }} + {{ contact.mobile }} + {{ contact.telephone }} + {{ contact.email }} + {{ contact.qq }} + {{ contact.wechat }} + {{ contact.areaName }} {{ contact.detailAddress }} - {{ contact.post }} - {{ contact.parentName }} - + {{ contact.post }} + {{ contact.parentName }} + - + - - {{ formatDate(contact.contactNextTime) }} - - {{ contact.remark }} + {{ contact.remark }} diff --git a/src/views/crm/contact/detail/index.vue b/src/views/crm/contact/detail/index.vue index d6401f8dc..d0a0ed245 100644 --- a/src/views/crm/contact/detail/index.vue +++ b/src/views/crm/contact/detail/index.vue @@ -9,12 +9,12 @@ - + + diff --git a/src/views/crm/customer/components/FileForm.vue b/src/views/crm/customer/components/FileForm.vue index d7e41f97c..d5aa4cca2 100644 --- a/src/views/crm/customer/components/FileForm.vue +++ b/src/views/crm/customer/components/FileForm.vue @@ -13,14 +13,14 @@ :on-exceed="handleExceed" :on-success="submitFormSuccess" :http-request="httpRequest" - accept=".jpg, .png, .gif, .txt, .doc, .docx, .xls" + accept=".jpg, .png, .gif, .pdf, .txt, .doc, .docx, .xls" drag >
将文件拖到此处,或 点击上传
diff --git a/src/views/crm/customer/detail/CustomerDetailsHeader.vue b/src/views/crm/customer/detail/CustomerDetailsHeader.vue index b1e376f0a..9a9d71189 100644 --- a/src/views/crm/customer/detail/CustomerDetailsHeader.vue +++ b/src/views/crm/customer/detail/CustomerDetailsHeader.vue @@ -5,7 +5,7 @@ - {{ customer.name }} + {{ customer.name }} @@ -16,27 +16,24 @@ - - - {{ customer.dealStatus ? '已成交' : '未成交' }} + + + - {{ customer.ownerUserName }} - + {{ customer.ownerUserName }} + {{ formatDate(customer.createTime) }} - - {{ customer.name }} - - + {{ customer.areaName }} {{ customer.detailAddress }} - + - - {{ formatDate(customer.contactNextTime) }} + + {{ formatDate(customer.contactNextTime, 'YYYY-MM-DD') }} - {{ customer.remark }} + {{ customer.remark }} diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index d25207e85..f64d1fa0d 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -36,9 +36,9 @@ - + @@ -54,12 +54,13 @@ - - - + + + +
diff --git a/src/views/crm/customer/index.vue b/src/views/crm/customer/index.vue index 59d7896d3..e574b9176 100644 --- a/src/views/crm/customer/index.vue +++ b/src/views/crm/customer/index.vue @@ -11,16 +11,27 @@ + + + @@ -32,21 +43,10 @@ /> - - - @@ -101,38 +101,33 @@ :show-overflow-tooltip="true" :stripe="true" > - - - - + - - + + + + + - + - + @@ -146,13 +141,13 @@ width="180px" > - +
- 跟进人:{{ item.creatorName }} + 跟进方式: +
-
+ 跟进人:{{ item.creatorName }} +
删除 diff --git a/src/views/crm/stationsite/StationSiteForm.vue b/src/views/crm/stationsite/StationSiteForm.vue new file mode 100644 index 000000000..43c704158 --- /dev/null +++ b/src/views/crm/stationsite/StationSiteForm.vue @@ -0,0 +1,282 @@ + + \ No newline at end of file diff --git a/src/views/crm/stationsite/index.vue b/src/views/crm/stationsite/index.vue new file mode 100644 index 000000000..0c47bb583 --- /dev/null +++ b/src/views/crm/stationsite/index.vue @@ -0,0 +1,222 @@ + + + \ No newline at end of file