diff --git a/.env.base b/.env.base index fdb26d85..cf433822 100644 --- a/.env.base +++ b/.env.base @@ -4,10 +4,10 @@ NODE_ENV=development VITE_DEV=true # 请求路径 -VITE_BASE_URL='http://localhost:48080' +VITE_BASE_URL='http://127.0.0.1:48080' # 上传路径 -VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://127.0.0.1:48080/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH=/dev-api diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts new file mode 100644 index 00000000..8af2a697 --- /dev/null +++ b/src/api/crm/business/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface BusinessVO { + id: number + name: string + statusTypeId: number + statusId: number + contactNextTime: Date + customerId: number + dealTime: Date + price: number + discountPercent: number + productPrice: number + remark: string + ownerUserId: number + roUserIds: string + rwUserIds: string + endStatus: number + endRemark: string + contactLastTime: Date + followUpStatus: number +} + +// 查询 CRM 商机列表 +export const getBusinessPage = async (params) => { + return await request.get({ url: `/crm/business/page`, params }) +} + +// 查询 CRM 商机列表,基于指定客户 +export const getBusinessPageByCustomer = async (params) => { + return await request.get({ url: `/crm/business/page-by-customer`, params }) +} + +// 查询 CRM 商机详情 +export const getBusiness = async (id: number) => { + return await request.get({ url: `/crm/business/get?id=` + id }) +} + +// 新增 CRM 商机 +export const createBusiness = async (data: BusinessVO) => { + return await request.post({ url: `/crm/business/create`, data }) +} + +// 修改 CRM 商机 +export const updateBusiness = async (data: BusinessVO) => { + return await request.put({ url: `/crm/business/update`, data }) +} + +// 删除 CRM 商机 +export const deleteBusiness = async (id: number) => { + return await request.delete({ url: `/crm/business/delete?id=` + id }) +} + +// 导出 CRM 商机 Excel +export const exportBusiness = async (params) => { + return await request.download({ url: `/crm/business/export-excel`, params }) +} diff --git a/src/api/crm/businessStatusType/index.ts b/src/api/crm/businessStatusType/index.ts new file mode 100644 index 00000000..cc4b46aa --- /dev/null +++ b/src/api/crm/businessStatusType/index.ts @@ -0,0 +1,48 @@ +import request from '@/config/axios' + +export interface BusinessStatusTypeVO { + id: number + name: string + deptIds: number[] + status: boolean +} + +// 查询商机状态类型列表 +export const getBusinessStatusTypePage = async (params) => { + return await request.get({ url: `/crm/business-status-type/page`, params }) +} + +// 查询商机状态类型详情 +export const getBusinessStatusType = async (id: number) => { + return await request.get({ url: `/crm/business-status-type/get?id=` + id }) +} + +// 新增商机状态类型 +export const createBusinessStatusType = async (data: BusinessStatusTypeVO) => { + return await request.post({ url: `/crm/business-status-type/create`, data }) +} + +// 修改商机状态类型 +export const updateBusinessStatusType = async (data: BusinessStatusTypeVO) => { + return await request.put({ url: `/crm/business-status-type/update`, data }) +} + +// 删除商机状态类型 +export const deleteBusinessStatusType = async (id: number) => { + return await request.delete({ url: `/crm/business-status-type/delete?id=` + id }) +} + +// 导出商机状态类型 Excel +export const exportBusinessStatusType = async (params) => { + return await request.download({ url: `/crm/business-status-type/export-excel`, params }) +} + +// 获取商机状态类型信息列表 +export const getBusinessStatusTypeList = async () => { + return await request.get({ url: `/crm/business-status-type/get-simple-list` }) +} + +// 根据类型ID获取商机状态信息列表 +export const getBusinessStatusListByTypeId = async (typeId: number) => { + return await request.get({ url: `/crm/business-status-type/get-status-list?typeId=` + typeId }) +} diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts index 6ac5a01d..f983cb12 100644 --- a/src/api/crm/contact/index.ts +++ b/src/api/crm/contact/index.ts @@ -1,10 +1,3 @@ -/* - * @Author: zyna - * @Date: 2023-11-05 13:34:41 - * @LastEditTime: 2023-11-11 16:20:19 - * @FilePath: \yudao-ui-admin-vue3\src\api\crm\contact\index.ts - * @Description: - */ import request from '@/config/axios' export interface ContactVO { @@ -22,44 +15,53 @@ export interface ContactVO { id: number parentId: number qq: number - webchat: string + wechat: string sex: number - policyMakers: boolean + master: boolean creatorName: string updateTime?: Date createTime?: Date customerName: string + areaName: string + ownerUserName: string } -// 查询crm联系人列表 +// 查询 CRM 联系人列表 export const getContactPage = async (params) => { return await request.get({ url: `/crm/contact/page`, params }) } -// 查询crm联系人详情 +// 查询 CRM 联系人列表,基于指定客户 +export const getContactPageByCustomer = async (params: any) => { + return await request.get({ url: `/crm/contact/page-by-customer`, params }) +} + +// 查询 CRM 联系人详情 export const getContact = async (id: number) => { return await request.get({ url: `/crm/contact/get?id=` + id }) } -// 新增crm联系人 +// 新增 CRM 联系人 export const createContact = async (data: ContactVO) => { return await request.post({ url: `/crm/contact/create`, data }) } -// 修改crm联系人 +// 修改 CRM 联系人 export const updateContact = async (data: ContactVO) => { return await request.put({ url: `/crm/contact/update`, data }) } -// 删除crm联系人 +// 删除 CRM 联系人 export const deleteContact = async (id: number) => { return await request.delete({ url: `/crm/contact/delete?id=` + id }) } -// 导出crm联系人 Excel +// 导出 CRM 联系人 Excel export const exportContact = async (params) => { return await request.download({ url: `/crm/contact/export-excel`, params }) } -export const simpleAlllist = async () => { - return await request.get({ url: `/crm/contact/simpleAlllist` }) + +// 获得 CRM 联系人列表(精简) +export const getSimpleContactList = async () => { + return await request.get({ url: `/crm/contact/simple-all-list` }) } diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts index bf438323..3498e843 100644 --- a/src/api/crm/contract/index.ts +++ b/src/api/crm/contract/index.ts @@ -22,32 +22,37 @@ export interface ContractVO { remark: string } -// 查询合同列表 +// 查询 CRM 合同列表 export const getContractPage = async (params) => { return await request.get({ url: `/crm/contract/page`, params }) } -// 查询合同详情 +// 查询 CRM 联系人列表,基于指定客户 +export const getContractPageByCustomer = async (params: any) => { + return await request.get({ url: `/crm/contract/page-by-customer`, params }) +} + +// 查询 CRM 合同详情 export const getContract = async (id: number) => { return await request.get({ url: `/crm/contract/get?id=` + id }) } -// 新增合同 +// 新增 CRM 合同 export const createContract = async (data: ContractVO) => { return await request.post({ url: `/crm/contract/create`, data }) } -// 修改合同 +// 修改 CRM 合同 export const updateContract = async (data: ContractVO) => { return await request.put({ url: `/crm/contract/update`, data }) } -// 删除合同 +// 删除 CRM 合同 export const deleteContract = async (id: number) => { return await request.delete({ url: `/crm/contract/delete?id=` + id }) } -// 导出合同 Excel +// 导出 CRM 合同 Excel export const exportContract = async (params) => { return await request.download({ url: `/crm/contract/export-excel`, params }) } diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index 59260cbc..5ef43950 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -62,3 +62,8 @@ export const deleteCustomer = async (id: number) => { export const exportCustomer = async (params) => { return await request.download({ url: `/crm/customer/export-excel`, params }) } + +// 客户列表 +export const queryAllList = async () => { + return await request.get({ url: `/crm/customer/query-all-list` }) +} diff --git a/src/api/crm/customerLimitConfig/index.ts b/src/api/crm/customerLimitConfig/index.ts index 22fde3ea..86776326 100644 --- a/src/api/crm/customerLimitConfig/index.ts +++ b/src/api/crm/customerLimitConfig/index.ts @@ -9,6 +9,20 @@ export interface CustomerLimitConfigVO { dealCountEnabled?: boolean } +/** + * 客户限制配置类型 + */ +export enum LimitConfType { + /** + * 拥有客户数限制 + */ + CUSTOMER_QUANTITY_LIMIT = 1, + /** + * 锁定客户数限制 + */ + CUSTOMER_LOCK_LIMIT = 2 +} + // 查询客户限制配置列表 export const getCustomerLimitConfigPage = async (params) => { return await request.get({ url: `/crm/customer-limit-config/page`, params }) diff --git a/src/api/crm/customerPoolConf/index.ts b/src/api/crm/customerPoolConfig/index.ts similarity index 67% rename from src/api/crm/customerPoolConf/index.ts rename to src/api/crm/customerPoolConfig/index.ts index 8234ba36..3cd8ef28 100644 --- a/src/api/crm/customerPoolConf/index.ts +++ b/src/api/crm/customerPoolConfig/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import { ConfigVO } from '@/api/infra/config' export interface CustomerPoolConfigVO { enabled?: boolean @@ -14,6 +15,6 @@ export const getCustomerPoolConfig = async () => { } // 更新客户公海规则设置 -export const updateCustomerPoolConfig = async (data: ConfigVO) => { - return await request.put({ url: `/crm/customer-pool-config/update`, data }) +export const saveCustomerPoolConfig = async (data: ConfigVO) => { + return await request.put({ url: `/crm/customer-pool-config/save`, data }) } diff --git a/src/api/crm/permission/index.ts b/src/api/crm/permission/index.ts index 1292f29a..c221b089 100644 --- a/src/api/crm/permission/index.ts +++ b/src/api/crm/permission/index.ts @@ -6,42 +6,66 @@ export interface PermissionVO { bizType: number | undefined // Crm 类型 bizId: number | undefined // Crm 类型数据编号 level: number | undefined // 权限级别 - deptName?: string // 部门名称 // 岗位名称数组 TODO @puhui999:数组? + deptName?: string // 部门名称 nickname?: string // 用户昵称 - postNames?: string // 岗位名称数组 TODO @puhui999:数组? + postNames?: string[] // 岗位名称数组 createTime?: Date } -// 查询团队成员列表 +/** + * CRM 业务类型枚举 + * + * @author HUIHUI + */ +export enum BizTypeEnum { + CRM_LEADS = 1, // 线索 + CRM_CUSTOMER = 2, // 客户 + CRM_CONTACT = 3, // 联系人 + CRM_BUSINESS = 5, // 商机 + CRM_CONTRACT = 6 // 合同 +} + +/** + * CRM 数据权限级别枚举 + */ +export enum PermissionLevelEnum { + OWNER = 1, // 负责人 + READ = 2, // 只读 + WRITE = 3 // 读写 +} + +// 获得数据权限列表(查询团队成员列表) export const getPermissionList = async (params) => { return await request.get({ url: `/crm/permission/list`, params }) } -// 新增团队成员 +// 创建数据权限(新增团队成员) export const createPermission = async (data: PermissionVO) => { - return await request.post({ url: `/crm/permission/add`, data }) + return await request.post({ url: `/crm/permission/create`, data }) } -// 修改团队成员权限级别 +// 编辑数据权限(修改团队成员权限级别) export const updatePermission = async (data) => { return await request.put({ url: `/crm/permission/update`, data }) } -// 删除团队成员 -export const deletePermission = async (params) => { +// 删除数据权限(删除团队成员) +export const deletePermissionBatch = async (params) => { return await request.delete({ url: '/crm/permission/delete', params }) } -// 退出团队 -export const quitTeam = async (id) => { +// 删除自己的数据权限(退出团队) +export const deleteSelfPermission = async (id) => { return await request.delete({ url: '/crm/permission/quit-team?id=' + id }) } +// TODO @puhui999:调整下位置 // 领取公海数据 export const receive = async (data: { bizType: number; bizId: number }) => { return await request.put({ url: `/crm/permission/receive`, data }) } +// TODO @puhui999:调整下位置 // 数据放入公海 export const putPool = async (data: { bizType: number; bizId: number }) => { return await request.put({ url: `/crm/permission/put-pool`, data }) diff --git a/src/api/mall/product/favorite.ts b/src/api/mall/product/favorite.ts new file mode 100644 index 00000000..3834eed0 --- /dev/null +++ b/src/api/mall/product/favorite.ts @@ -0,0 +1,12 @@ +import request from '@/config/axios' + +export interface Favorite { + id?: number + userId?: string // 用户编号 + spuId?: number | null // 商品 SPU 编号 +} + +// 获得 ProductFavorite 列表 +export const getFavoritePage = (params: PageParam) => { + return request.get({ url: '/product/favorite/page', params }) +} diff --git a/src/api/mp/user/index.ts b/src/api/mp/user/index.ts index d954e9eb..b89acc7d 100644 --- a/src/api/mp/user/index.ts +++ b/src/api/mp/user/index.ts @@ -26,6 +26,6 @@ export const getUserPage = (query) => { // 同步公众号粉丝 export const syncUser = (accountId) => { return request.post({ - url: '/mp/tag/sync?accountId=' + accountId + url: '/mp/user/sync?accountId=' + accountId }) } diff --git a/src/api/system/notice/index.ts b/src/api/system/notice/index.ts index 62bf5259..f6434697 100644 --- a/src/api/system/notice/index.ts +++ b/src/api/system/notice/index.ts @@ -35,3 +35,8 @@ export const updateNotice = (data: NoticeVO) => { export const deleteNotice = (id: number) => { return request.delete({ url: '/system/notice/delete?id=' + id }) } + +// 推送公告 +export const pushNotice = (id: number) => { + return request.post({ url: '/system/notice/push?id=' + id }) +} diff --git a/src/api/system/sms/smsLog/index.ts b/src/api/system/sms/smsLog/index.ts index 3d54fac1..f9891716 100644 --- a/src/api/system/sms/smsLog/index.ts +++ b/src/api/system/sms/smsLog/index.ts @@ -15,8 +15,6 @@ export interface SmsLogVO { userType: number | null sendStatus: number | null sendTime: Date | null - sendCode: number | null - sendMsg: string apiSendCode: string apiSendMsg: string apiRequestId: string diff --git a/src/components/RouterSearch/index.vue b/src/components/RouterSearch/index.vue index c12385af..2499dafe 100644 --- a/src/components/RouterSearch/index.vue +++ b/src/components/RouterSearch/index.vue @@ -1,5 +1,5 @@ - + + + + + + + diff --git a/src/views/crm/business/components/BusinessList.vue b/src/views/crm/business/components/BusinessList.vue new file mode 100644 index 00000000..31411e84 --- /dev/null +++ b/src/views/crm/business/components/BusinessList.vue @@ -0,0 +1,107 @@ + + + + + + 创建商机 + + + + + + + + + + {{ scope.row.name }} + + + + + + + + + + + + + + + + diff --git a/src/views/crm/business/index.vue b/src/views/crm/business/index.vue new file mode 100644 index 00000000..c1c63fa1 --- /dev/null +++ b/src/views/crm/business/index.vue @@ -0,0 +1,207 @@ + + + + + + + + + 搜索 + 重置 + + 新增 + + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 删除 + + + + + + + + + + + + + diff --git a/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue b/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue new file mode 100644 index 00000000..edf41966 --- /dev/null +++ b/src/views/crm/businessStatusType/BusinessStatusTypeForm.vue @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + 状态{{ scope.$index + 1 }} + + + + + + + + + + + + + + + 添加 + + 删除 + + + + + + + + 确 定 + 取 消 + + + + diff --git a/src/views/crm/businessStatusType/index.vue b/src/views/crm/businessStatusType/index.vue new file mode 100644 index 00000000..7b2725f3 --- /dev/null +++ b/src/views/crm/businessStatusType/index.vue @@ -0,0 +1,171 @@ + + + + + + 搜索 + 重置 + + 新增 + + + 导出 + + + + + + + + + + + + + + + + 编辑 + + + 删除 + + + + + + + + + + + + + diff --git a/src/views/crm/clue/ClueForm.vue b/src/views/crm/clue/ClueForm.vue index 4321f952..1b2637c9 100644 --- a/src/views/crm/clue/ClueForm.vue +++ b/src/views/crm/clue/ClueForm.vue @@ -10,9 +10,16 @@ - + - + + + diff --git a/src/views/crm/components/index.ts b/src/views/crm/components/index.ts deleted file mode 100644 index c25feef3..00000000 --- a/src/views/crm/components/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import CrmTeam from './CrmTeamList.vue' - -enum CrmBizTypeEnum { - CRM_LEADS = 1, // 线索 - CRM_CUSTOMER = 2, // 客户 - CRM_CONTACTS = 3, // 联系人 - CRM_BUSINESS = 5, // 商机 - CRM_CONTRACT = 6 // 合同 -} - -enum CrmPermissionLevelEnum { - OWNER = 1, // 负责人 - READ = 2, // 读 - WRITE = 3 // 写 -} - -export { CrmTeam, CrmBizTypeEnum, CrmPermissionLevelEnum } diff --git a/src/views/crm/customerLimitConfig/CustomerLimitConfigForm.vue b/src/views/crm/config/customerLimitConfig/CustomerLimitConfigForm.vue similarity index 98% rename from src/views/crm/customerLimitConfig/CustomerLimitConfigForm.vue rename to src/views/crm/config/customerLimitConfig/CustomerLimitConfigForm.vue index 880106f0..e7dee69f 100644 --- a/src/views/crm/customerLimitConfig/CustomerLimitConfigForm.vue +++ b/src/views/crm/config/customerLimitConfig/CustomerLimitConfigForm.vue @@ -57,11 +57,11 @@ diff --git a/src/views/crm/customerPoolConf/index.vue b/src/views/crm/config/customerPoolConfig/index.vue similarity index 70% rename from src/views/crm/customerPoolConf/index.vue rename to src/views/crm/config/customerPoolConfig/index.vue index 5fa98711..c7db3301 100644 --- a/src/views/crm/customerPoolConf/index.vue +++ b/src/views/crm/config/customerPoolConfig/index.vue @@ -23,7 +23,7 @@ - + 不启用 启用 @@ -36,7 +36,11 @@ 天未成交 - + 不提醒 提醒 @@ -52,11 +56,10 @@ diff --git a/src/views/crm/contact/components/ContactList.vue b/src/views/crm/contact/components/ContactList.vue new file mode 100644 index 00000000..8aa40960 --- /dev/null +++ b/src/views/crm/contact/components/ContactList.vue @@ -0,0 +1,111 @@ + + + + + + 创建联系人 + + + + + + + + + + {{ scope.row.name }} + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/crm/contact/detail/ContactDetails.vue b/src/views/crm/contact/detail/ContactDetails.vue index 9cf586b2..6b31a30c 100644 --- a/src/views/crm/contact/detail/ContactDetails.vue +++ b/src/views/crm/contact/detail/ContactDetails.vue @@ -8,7 +8,7 @@ {{ contact.name }} - + {{ contact.customerName }} @@ -24,14 +24,17 @@ {{ contact.qq }} - {{ contact.webchat }} - - - {{ contact.address }} + {{ contact.wechat }} {{ contact.nextTime ? formatDate(contact.nextTime) : '空' }} + + {{ contact.areaName }} + + + {{ contact.address }} + @@ -46,7 +49,7 @@ - {{ gotOwnerUser(contact.ownerUserId) }} + {{ contact.ownerUserName }} {{ contact.creatorName }} @@ -66,29 +69,9 @@ import * as ContactApi from '@/api/crm/contact' import { DICT_TYPE } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' -import * as UserApi from '@/api/system/user' const { contact } = defineProps<{ contact: ContactApi.ContactVO }>() // 展示的折叠面板 const activeNames = ref(['basicInfo', 'systemInfo']) -const gotOwnerUser = (owerUserId: string) => { - let ownerName = '' - if (owerUserId !== null && owerUserId != undefined) { - owerUserId.split(',').forEach((item: string, index: number) => { - if (index != 0) { - ownerName = - ownerName + ',' + userList.value.find((user: { id: any }) => user.id == item)?.nickname - } else { - ownerName = userList.value.find((user: { id: any }) => user.id == item)?.nickname || '' - } - }) - } - return ownerName -} -const userList = ref([]) // 用户列表 -/** 初始化 **/ -onMounted(async () => { - userList.value = await UserApi.getSimpleUserList() -}) diff --git a/src/views/crm/contact/detail/index.vue b/src/views/crm/contact/detail/index.vue index 03bbb4e6..6a6e71bf 100644 --- a/src/views/crm/contact/detail/index.vue +++ b/src/views/crm/contact/detail/index.vue @@ -46,7 +46,7 @@ - + {{ contact.customerName }} @@ -63,33 +63,18 @@ - + - 活动 - 邮件 - 工商信息 - - - 客户 - 客户 - - - 团队成员 - 团队成员 - + 跟进记录 商机 - - 合同 - 合同 + 附件 + + + 操作记录 + 操作记录 - - 回款 - 回款 - - 回访 - 发票 @@ -105,10 +90,10 @@ import ContactBasicInfo from '@/views/crm/contact/detail/ContactBasicInfo.vue' import ContactDetails from '@/views/crm/contact/detail/ContactDetails.vue' import ContactForm from '@/views/crm/contact/ContactForm.vue' import { formatDate } from '@/utils/formatTime' -import * as CustomerApi from '@/api/crm/customer' // TODO 芋艿:后面在 review 么? -defineOptions({ name: 'ContactDetail' }) +defineOptions({ name: 'CrmContactDetail' }) + const { delView } = useTagsViewStore() // 视图操作 const route = useRoute() const { currentRoute } = useRouter() // 路由 diff --git a/src/views/crm/contact/index.vue b/src/views/crm/contact/index.vue index d81b0449..70ba4b8c 100644 --- a/src/views/crm/contact/index.vue +++ b/src/views/crm/contact/index.vue @@ -1,7 +1,6 @@ - - - + + clearable + > + + - + - 搜索 - 重置 + 搜索 + 重置 新增 @@ -97,32 +104,28 @@ - {{ - scope.row.name - }} + + {{ scope.row.name }} + - + - + - - - - - - {{ allContactList.find((contact) => contact.id === scope.row.parentId)?.name }} + + - + - {{ gotOwnerUser(scope.row.ownerUserId) }} + {{ scope.row.ownerUserName }} @@ -211,7 +214,6 @@ import download from '@/utils/download' import * as ContactApi from '@/api/crm/contact' import ContactForm from './ContactForm.vue' import { DICT_TYPE } from '@/utils/dict' -import * as UserApi from '@/api/system/user' import * as CustomerApi from '@/api/crm/customer' defineOptions({ name: 'CrmContact' }) @@ -222,6 +224,7 @@ const { t } = useI18n() // 国际化 const loading = ref(true) // 列表的加载中 const total = ref(0) // 列表的总页数 const list = ref([]) // 列表的数据 +const customerList = ref([]) // 客户列表 const queryParams = reactive({ pageNo: 1, pageSize: 10, @@ -239,13 +242,12 @@ const queryParams = reactive({ name: null, post: null, qq: null, - webchat: null, + wechat: null, sex: null, policyMakers: null }) const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 -const userList = ref([]) // 用户列表 /** 查询列表 */ const getList = async () => { @@ -305,35 +307,15 @@ const handleExport = async () => { } } -// TODO @zyna:这个负责人的读取,放在后端好点 -const gotOwnerUser = (owerUserId: string) => { - let ownerName = '' - if (owerUserId !== null) { - owerUserId.split(',').forEach((item: string, index: number) => { - if (index != 0) { - ownerName = - ownerName + ',' + userList.value.find((user: { id: any }) => user.id == item)?.nickname - } else { - ownerName = userList.value.find((user: { id: any }) => user.id == item)?.nickname || '' - } - }) - } - return ownerName -} - /** 打开客户详情 */ const { push } = useRouter() const openDetail = (id: number) => { push({ name: 'CrmContactDetail', params: { id } }) } -// TODO @zyna:这个上级的读取,放在后端读取,更合适;因为可能数据量比较大 -const allContactList = ref([]) //所有联系人列表 -const allCustomerList = ref([]) //客户列表 /** 初始化 **/ onMounted(async () => { await getList() - userList.value = await UserApi.getSimpleUserList() - allContactList.value = await ContactApi.simpleAlllist() + customerList.value = await CustomerApi.queryAllList() }) diff --git a/src/views/crm/contract/components/ContractList.vue b/src/views/crm/contract/components/ContractList.vue new file mode 100644 index 00000000..8a45ea7b --- /dev/null +++ b/src/views/crm/contract/components/ContractList.vue @@ -0,0 +1,132 @@ + + + + + + 创建合同 + + + + + + + + + + {{ scope.row.name }} + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/crm/contract/contract.data.ts b/src/views/crm/contract/contract.data.ts deleted file mode 100644 index 07458c24..00000000 --- a/src/views/crm/contract/contract.data.ts +++ /dev/null @@ -1,228 +0,0 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' - -// 表单校验 -export const rules = reactive({ - name: [required] -}) - -// TODO @dbh52:不使用 crud 模式哈,使用标准的 ep 代码哈;主要后续 crud schema 可能会改 -// CrudSchema https://doc.iocoder.cn/vue3/crud-schema/ -const crudSchemas = reactive([ - { - label: '合同编号', - field: 'id', - isForm: false - }, - { - label: '合同名称', - field: 'name', - isSearch: true - }, - { - label: '客户编号', - field: 'customerId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '商机编号', - field: 'businessId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '工作流编号', - field: 'processInstanceId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '下单日期', - field: 'orderDate', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - } - }, - { - label: '负责人的用户编号', - field: 'ownerUserId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - isForm: false - }, - { - label: '合同编号', - field: 'no', - isSearch: true - }, - { - label: '开始时间', - field: 'startTime', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - } - }, - { - label: '结束时间', - field: 'endTime', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - } - }, - { - label: '合同金额', - field: 'price', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '整单折扣', - field: 'discountPercent', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '产品总金额', - field: 'productPrice', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '只读权限的用户编号数组', - field: 'roUserIds', - isSearch: true - }, - { - label: '读写权限的用户编号数组', - field: 'rwUserIds', - isSearch: true - }, - { - label: '联系人编号', - field: 'contactId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '备注', - field: 'remark', - isSearch: true - }, - { - label: '公司签约人', - field: 'signUserId', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '最后跟进时间', - field: 'contactLastTime', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - } - }, - { - label: '操作', - field: 'action', - isForm: false - } -]) -export const { allSchemas } = useCrudSchemas(crudSchemas) diff --git a/src/views/crm/contract/index.vue b/src/views/crm/contract/index.vue index 1670c418..26ff403a 100644 --- a/src/views/crm/contract/index.vue +++ b/src/views/crm/contract/index.vue @@ -8,44 +8,6 @@ :inline="true" label-width="68px" > - - - - - - - - - - - - + + + 搜索 重置 @@ -75,6 +46,7 @@ + @@ -125,7 +97,6 @@ width="180px" /> - - diff --git a/src/views/crm/customer/detail/CustomerDetailsHeader.vue b/src/views/crm/customer/detail/CustomerDetailsHeader.vue new file mode 100644 index 00000000..dd4f7f25 --- /dev/null +++ b/src/views/crm/customer/detail/CustomerDetailsHeader.vue @@ -0,0 +1,57 @@ + + + + + + + + {{ customer.name }} + + + + + + + 编辑 + + 更改成交状态 + + + + + + + + + + {{ customer.dealStatus ? '已成交' : '未成交' }} + + {{ customer.ownerUserName }} + + + + {{ customer.mobile }} + + + + + + + diff --git a/src/views/crm/customer/detail/CustomerDetails.vue b/src/views/crm/customer/detail/CustomerDetailsInfo.vue similarity index 59% rename from src/views/crm/customer/detail/CustomerDetails.vue rename to src/views/crm/customer/detail/CustomerDetailsInfo.vue index 67beae94..20bfd5b8 100644 --- a/src/views/crm/customer/detail/CustomerDetails.vue +++ b/src/views/crm/customer/detail/CustomerDetailsInfo.vue @@ -18,29 +18,15 @@ - - {{ customer.mobile }} - - - {{ customer.telephone }} - - - {{ customer.email }} - - - {{ customer.qq }} - - - {{ customer.wechat }} - - - {{ customer.website }} - - - {{ customer.areaName }} - - - {{ customer.detailAddress }} + {{ customer.mobile }} + {{ customer.telephone }} + {{ customer.email }} + {{ customer.qq }} + {{ customer.wechat }} + {{ customer.website }} + {{ customer.areaName }} + {{ customer.detailAddress }} {{ @@ -52,12 +38,8 @@ - - {{ customer.description }} - - - {{ customer.remark }} - + {{ customer.description }} + {{ customer.remark }} @@ -65,12 +47,8 @@ 系统信息 - - {{ customer.ownerUserName }} - - - {{ customer.creatorName }} - + {{ customer.ownerUserName }} + {{ customer.creatorName }} {{ customer.createTime ? formatDate(customer.createTime) : '空' }} @@ -87,9 +65,10 @@ import * as CustomerApi from '@/api/crm/customer' import { DICT_TYPE } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' -const { customer } = defineProps<{ customer: CustomerApi.CustomerVO }>() +const { customer } = defineProps<{ + customer: CustomerApi.CustomerVO // 客户明细 +}>() -// 展示的折叠面板 -const activeNames = ref(['basicInfo', 'systemInfo']) +const activeNames = ref(['basicInfo', 'systemInfo']) // 展示的折叠面板 diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index 392a5d35..6de6f170 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -1,129 +1,48 @@ - - - - - - - - - - - 编辑 - - 更改成交状态 - - - - - - 创建任务 - - - - 发送邮件 - - - - 创建联系人 - - - - 创建商机 - - - - 创建合同 - - - - 创建回款 - - - - 添加团队成员 - - - - - - - - - - {{ customer.dealStatus ? '已成交' : '未成交' }} - - - {{ customer.ownerUserName }} - - - - - - {{ customer.mobile }} - - - + - + - 活动 - 邮件 - 工商信息 - 客户关系 - + TODO 待开发 - 联系人 - 联系人 + - 团队成员 - 团队成员 + + + + - 商机 - 合同 - 合同 + - - 回款 - 回款 - - 回访 - 发票 + TODO待开发 + TODO 待开发 - - - - - diff --git a/src/views/crm/customer/index.vue b/src/views/crm/customer/index.vue index dea7e617..edad31b1 100644 --- a/src/views/crm/customer/index.vue +++ b/src/views/crm/customer/index.vue @@ -72,17 +72,10 @@ - - - 搜索 - - - - 重置 - + 搜索 + 重置 - - 新增 + 新增 - - 导出 + 导出 @@ -102,7 +94,13 @@ - + + + + {{ scope.row.name }} + + + @@ -121,7 +119,7 @@ - + - 详情 - - @@ -198,7 +193,6 @@ import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import * as CustomerApi from '@/api/crm/customer' import CustomerForm from './CustomerForm.vue' -import { CrmBizTypeEnum, CrmTeam } from '@/views/crm/components' defineOptions({ name: 'CrmCustomer' }) @@ -211,11 +205,12 @@ const list = ref([]) // 列表的数据 const queryParams = reactive({ pageNo: 1, pageSize: 10, - name: null, - mobile: null, - industryId: null, - level: null, - source: null + pool: false, + name: '', + mobile: '', + industryId: undefined, + level: undefined, + source: undefined }) const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 @@ -241,6 +236,7 @@ const handleQuery = () => { /** 重置按钮操作 */ const resetQuery = () => { queryFormRef.value.resetFields() + queryParams.pool = false handleQuery() } diff --git a/src/views/crm/customerLimitConfig/customerLimitConf.ts b/src/views/crm/customerLimitConfig/customerLimitConf.ts deleted file mode 100644 index 1336e137..00000000 --- a/src/views/crm/customerLimitConfig/customerLimitConf.ts +++ /dev/null @@ -1,14 +0,0 @@ -// TODO 可以挪到它对应的 api.ts 文件里哈 -/** - * 客户限制配置类型 - */ -export enum LimitConfType { - /** - * 拥有客户数限制 - */ - CUSTOMER_QUANTITY_LIMIT = 1, - /** - * 锁定客户数限制 - */ - CUSTOMER_LOCK_LIMIT = 2 -} diff --git a/src/views/crm/customerLimitConfig/index.vue b/src/views/crm/customerLimitConfig/index.vue deleted file mode 100644 index 1bccf4d3..00000000 --- a/src/views/crm/customerLimitConfig/index.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/views/crm/components/CrmPermissionForm.vue b/src/views/crm/permission/components/PermissionForm.vue similarity index 86% rename from src/views/crm/components/CrmPermissionForm.vue rename to src/views/crm/permission/components/PermissionForm.vue index 838aa68d..5af376cf 100644 --- a/src/views/crm/components/CrmPermissionForm.vue +++ b/src/views/crm/permission/components/PermissionForm.vue @@ -19,11 +19,17 @@ - - 只读 - 读写 + + + {{ dict.label }} + + + 确 定 @@ -34,7 +40,8 @@ diff --git a/src/views/crm/receivable/index.vue b/src/views/crm/receivable/index.vue index ac1def09..58d7423b 100644 --- a/src/views/crm/receivable/index.vue +++ b/src/views/crm/receivable/index.vue @@ -52,7 +52,7 @@ class="!w-240px" > - + diff --git a/src/views/crm/receivablePlan/index.vue b/src/views/crm/receivablePlan/index.vue index 2a18b931..2d0cf612 100644 --- a/src/views/crm/receivablePlan/index.vue +++ b/src/views/crm/receivablePlan/index.vue @@ -49,7 +49,7 @@ class="!w-240px" > - + diff --git a/src/views/infra/webSocket/index.vue b/src/views/infra/webSocket/index.vue index ce6db798..0f609213 100644 --- a/src/views/infra/webSocket/index.vue +++ b/src/views/infra/webSocket/index.vue @@ -1,5 +1,6 @@ + @@ -11,28 +12,38 @@ {{ status }} - - 服务地址 + 服务地址 - + {{ getIsOpen ? '关闭连接' : '开启连接' }} - 设置 + 消息输入框 - + + + + + 发送 + @@ -41,13 +52,13 @@ - + 收到消息: - {{ formatDate(item.time) }} + {{ formatDate(msg.time) }} - {{ item.res }} + {{ msg.text }} @@ -57,62 +68,113 @@ diff --git a/src/views/member/user/detail/UserFavoriteList.vue b/src/views/member/user/detail/UserFavoriteList.vue new file mode 100644 index 00000000..afab9a08 --- /dev/null +++ b/src/views/member/user/detail/UserFavoriteList.vue @@ -0,0 +1,96 @@ + + + + + + + + + + + + + {{ floatToFixed2(row.price) }}元 + + + + + + + + + + + + + + + diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue index 1bac010e..6237cca6 100644 --- a/src/views/member/user/detail/index.vue +++ b/src/views/member/user/detail/index.vue @@ -48,7 +48,9 @@ 售后管理(WIP) - 收藏记录(WIP) + + + @@ -76,6 +78,7 @@ import UserExperienceRecordList from './UserExperienceRecordList.vue' import UserOrderList from './UserOrderList.vue' import UserPointList from './UserPointList.vue' import UserSignList from './UserSignList.vue' +import UserFavoriteList from './UserFavoriteList.vue' import { CardTitle } from '@/components/Card/index' import { ElMessage } from 'element-plus' diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index dc776d3a..f482f91c 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -87,6 +87,9 @@ > 删除 + + 推送 + @@ -168,6 +171,17 @@ const handleDelete = async (id: number) => { } catch {} } +/** 推送按钮操作 */ +const handlePush = async (id: number) => { + try { + // 推送的二次确认 + await message.confirm('是否推送所选中通知?') + // 发起推送 + await NoticeApi.pushNotice(id) + message.success(t('推送成功')) + } catch {} +} + /** 初始化 **/ onMounted(() => { getList() diff --git a/src/views/system/sms/log/SmsLogDetail.vue b/src/views/system/sms/log/SmsLogDetail.vue index 34c5e58e..b0d22c2d 100644 --- a/src/views/system/sms/log/SmsLogDetail.vue +++ b/src/views/system/sms/log/SmsLogDetail.vue @@ -37,9 +37,6 @@ {{ formatDate(detailData.sendTime) }} - - {{ detailData.sendCode }} | {{ detailData.sendMsg }} - {{ detailData.apiSendCode }} | {{ detailData.apiSendMsg }}
设置
消息输入框