From 5d978c4ac8a9f9af1b8904019e6f178723884aa6 Mon Sep 17 00:00:00 2001 From: zengqiyang <492393100@qq.com> Date: Thu, 17 Apr 2025 09:53:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc/.env.development | 2 +- pc/src/api/asset/inventory.js | 7 +- pc/src/api/bak/merchant/index.js | 7 + pc/src/api/bak/merchant/lead.js | 151 ++ pc/src/api/building.js | 8 + pc/src/api/finance.js | 80 + pc/src/api/merchant.js | 358 +++- pc/src/api/project.js | 11 +- pc/src/router/modules/finance.js | 6 + pc/src/utils/auth.js | 56 + pc/src/utils/request.js | 4 +- .../asset/inventory/components/AssetForm.vue | 24 +- pc/src/views/finance/chargeStandard/index.vue | 1097 +++++++++++ .../views/merchant/clue-management/index.vue | 1742 ++++++++++++++++- .../views/merchant/intent-customer/index.vue | 1583 ++++++++++++++- .../merchant/merchant-personnel/index.vue | 775 ++++---- .../views/merchant/tag-management/index.vue | 636 +++--- pc/src/views/project/building/index.vue | 110 +- pc/src/views/project/index.vue | 21 +- .../project/room/components/RoomForm.vue | 15 +- pc/src/views/project/room/index.vue | 15 +- pc/vue.config.js | 18 +- 22 files changed, 5806 insertions(+), 920 deletions(-) create mode 100644 pc/src/api/bak/merchant/index.js create mode 100644 pc/src/api/bak/merchant/lead.js create mode 100644 pc/src/utils/auth.js create mode 100644 pc/src/views/finance/chargeStandard/index.vue diff --git a/pc/.env.development b/pc/.env.development index 445b3c2..6a0355f 100644 --- a/pc/.env.development +++ b/pc/.env.development @@ -1,4 +1,4 @@ NODE_ENV = 'development' # 开发环境API地址 -VUE_APP_BASE_API = http://192.168.137.38:8080 \ No newline at end of file +VUE_APP_BASE_API = http://192.168.137.3:8080/api \ No newline at end of file diff --git a/pc/src/api/asset/inventory.js b/pc/src/api/asset/inventory.js index 11d5315..d868449 100644 --- a/pc/src/api/asset/inventory.js +++ b/pc/src/api/asset/inventory.js @@ -83,17 +83,16 @@ export function listAssetLocationTree() { // 获取公司列表 export function listCompanies() { return request({ - url: '/system/company/list', + url: '/admin/company/getAllCompanyDetails', method: 'get' }) } // 获取用户列表 -export function listUsers(query) { +export function listUsers() { return request({ - url: '/system/user/list', + url: '/v1/member/list', method: 'get', - params: query }) } diff --git a/pc/src/api/bak/merchant/index.js b/pc/src/api/bak/merchant/index.js new file mode 100644 index 0000000..68df39a --- /dev/null +++ b/pc/src/api/bak/merchant/index.js @@ -0,0 +1,7 @@ +// 导出所有子模块 +export * from './lead' + +// 未来可以添加其他子模块,如: +// export * from './team' +// export * from './personnel' +// 等等 \ No newline at end of file diff --git a/pc/src/api/bak/merchant/lead.js b/pc/src/api/bak/merchant/lead.js new file mode 100644 index 0000000..67f447c --- /dev/null +++ b/pc/src/api/bak/merchant/lead.js @@ -0,0 +1,151 @@ +import request from '@/utils/request' + +// 线索状态API +export function getLeadStatusList() { + return request({ + url: '/bizLead/status/list', + method: 'get' + }) +} + +export function getLeadStatusDetail(id) { + return request({ + url: `/bizLead/status/${id}`, + method: 'get' + }) +} + +export function addLeadStatus(data) { + return request({ + url: '/bizLead/status', + method: 'post', + data + }) +} + +export function updateLeadStatus(data) { + return request({ + url: '/bizLead/status', + method: 'put', + data + }) +} + +export function deleteLeadStatus(id, userId) { + return request({ + url: `/bizLead/status/${id}`, + method: 'delete', + params: { userId } + }) +} + +export function checkLeadStatusName(statusName) { + return request({ + url: '/bizLead/status/checkName', + method: 'get', + params: { statusName } + }) +} + +// 线索管理API +export function getLeadList(params) { + return request({ + url: '/bizLead/list', + method: 'get', + params + }) +} + +export function getMyLeadList(params) { + return request({ + url: '/bizLead/myLeads', + method: 'get', + params + }) +} + +export function getAllLeadList(params) { + return request({ + url: '/bizLead/allLeads', + method: 'get', + params + }) +} + +export function getPublicLeadList(params) { + return request({ + url: '/bizLead/publicLeads', + method: 'get', + params + }) +} + +export function getLeadDetail(id) { + return request({ + url: `/bizLead/${id}`, + method: 'get' + }) +} + +export function addLead(data) { + return request({ + url: '/bizLead', + method: 'post', + data + }) +} + +export function updateLead(data) { + return request({ + url: '/bizLead', + method: 'put', + data + }) +} + +export function changeLeadStatus(id, statusId, userId) { + return request({ + url: `/bizLead/${id}/status`, + method: 'put', + params: { statusId, userId } + }) +} + +export function changeLeadPersonnel(id, personnelId, userId) { + return request({ + url: `/bizLead/${id}/personnel`, + method: 'put', + params: { personnelId, userId } + }) +} + +export function checkLeadPhone(phone) { + return request({ + url: '/bizLead/checkPhone', + method: 'get', + params: { phone } + }) +} + +export function convertLeadToIntention(id, userId) { + return request({ + url: `/bizLead/${id}/convert`, + method: 'post', + params: { userId } + }) +} + +export function deleteLead(id, userId) { + return request({ + url: `/bizLead/${id}`, + method: 'delete', + params: { userId } + }) +} + +export function getLeadFollowHistory(leadId) { + return request({ + url: `/bizLead/${leadId}/followHistory`, + method: 'get' + }) +} \ No newline at end of file diff --git a/pc/src/api/building.js b/pc/src/api/building.js index a8d86be..73f6970 100644 --- a/pc/src/api/building.js +++ b/pc/src/api/building.js @@ -129,4 +129,12 @@ export function getFloorListByBuilding(buildingId) { url: `/room/floor/building/${buildingId}`, method: 'get' }) +} + +// 收支账号管理 +export function getAllAccounts() { + return request({ + url: `/admin/account/getAllAccounts`, + method: 'get' + }) } \ No newline at end of file diff --git a/pc/src/api/finance.js b/pc/src/api/finance.js index 3a17024..877f7ec 100644 --- a/pc/src/api/finance.js +++ b/pc/src/api/finance.js @@ -257,4 +257,84 @@ export function getBuildingList(projectId) { url: `/business/building/list/${projectId}`, method: 'get' }) +} + +/* 收费标准相关接口 */ + +// 分页查询收费标准列表 +export function getChargingStandardPage(query) { + return request({ + url: '/finance/charging-standard/page', + method: 'get', + params: query + }) +} + +// 根据ID查询收费标准详情 +export function getChargingStandardById(id) { + return request({ + url: `/finance/charging-standard/${id}`, + method: 'get' + }) +} + +// 新增收费标准 +export function addChargingStandard(data) { + return request({ + url: '/finance/charging-standard', + method: 'post', + data: data + }) +} + +// 修改收费标准 +export function updateChargingStandard(data) { + return request({ + url: '/finance/charging-standard', + method: 'put', + data: data + }) +} + +// 删除收费标准 +export function deleteChargingStandard(id) { + return request({ + url: `/finance/charging-standard/${id}`, + method: 'delete' + }) +} + +// 更新收费标准状态(立即失效) +export function updateChargingStandardStatus(id) { + return request({ + url: `/finance/charging-standard/${id}/updateStatus`, + method: 'put' + }) +} + +// 检查收费标准名称是否存在 +export function checkChargingStandardName(standardName, id) { + return request({ + url: '/finance/charging-standard/check-name', + method: 'get', + params: { standardName, id } + }) +} + +// 根据状态查询收费标准列表 +export function getChargingStandardListByStatus(status) { + return request({ + url: '/finance/charging-standard/list-by-status', + method: 'get', + params: { status } + }) +} + +// 获取费用类型树 +export function getFeeTypeTree(params) { + return request({ + url: '/feeForeign/categories', + method: 'get', + params + }) } \ No newline at end of file diff --git a/pc/src/api/merchant.js b/pc/src/api/merchant.js index b42ca97..bcc6bcd 100644 --- a/pc/src/api/merchant.js +++ b/pc/src/api/merchant.js @@ -3,15 +3,29 @@ import request from '@/utils/request' // 招商团队相关API export function getMerchantTeamList(params) { return request({ - url: '/business/team/list', + url: '/bizTeam/list', method: 'get', params }) } +export function getMerchantTeamDetail(id) { + return request({ + url: `/bizTeam/${id}`, + method: 'get' + }) +} +// 根据项目ID获取招商团队信息 +export function getMerchantTeamByProjectId(projectId) { + return request({ + url: `/bizTeam/project/${projectId}`, + method: 'get' + }) +} + export function addMerchantTeam(data) { return request({ - url: '/business/team', + url: '/bizTeam', method: 'post', data }) @@ -19,25 +33,41 @@ export function addMerchantTeam(data) { export function updateMerchantTeam(data) { return request({ - url: '/business/team', + url: '/bizTeam', method: 'put', data }) } -export function deleteMerchantTeam(id) { +export function deleteMerchantTeam(id, userId) { return request({ - url: `/business/team/${id}`, - method: 'delete' + url: `/bizTeam/${id}`, + method: 'delete', + params: { userId } + }) +} + +export function checkTeamName(params) { + return request({ + url: '/bizTeam/checkName', + method: 'get', + params + }) +} + +export function getProjectsList() { + return request({ + url: '/bizTeam/projects', + method: 'get' }) } // 招商人员相关API -export function getMerchantPersonnelList(params) { +export function getMerchantPersonnelList(data) { return request({ - url: '/business/personnel/list', - method: 'get', - params + url: '/bizPersonnel/queryAllPersonnel', + method: 'post', + data }) } @@ -57,16 +87,33 @@ export function getPersonnelDetail(id) { export function addMerchantPersonnel(data) { return request({ - url: '/business/personnel', + url: '/bizPersonnel', method: 'post', data }) } -export function removeMerchantPersonnel(id) { +export function batchAddMerchantPersonnel(data) { return request({ - url: `/business/personnel/${id}`, - method: 'delete' + url: '/bizPersonnel/batch', + method: 'post', + data + }) +} + +export function removeMerchantPersonnel(id, userId) { + return request({ + url: `/bizPersonnel/${id}`, + method: 'delete', + params: { userId } + }) +} + +export function checkMemberExists(params) { + return request({ + url: '/bizPersonnel/checkMember', + method: 'get', + params }) } @@ -252,4 +299,285 @@ export function checkTagName(params) { method: 'get', params }) -} \ No newline at end of file +} + +// 线索状态API +export function getLeadStatusList() { + return request({ + url: '/bizLead/status/list', + method: 'get' + }) +} + +export function getLeadStatusDetail(id) { + return request({ + url: `/bizLead/status/${id}`, + method: 'get' + }) +} + +export function addLeadStatus(data) { + return request({ + url: '/bizLead/status', + method: 'post', + data + }) +} + +export function updateLeadStatus(data) { + return request({ + url: '/bizLead/status', + method: 'put', + data + }) +} + +export function deleteLeadStatus(id, userId) { + return request({ + url: `/bizLead/status/${id}`, + method: 'delete', + params: { userId } + }) +} + +export function checkLeadStatusName(statusName) { + return request({ + url: '/bizLead/status/checkName', + method: 'get', + params: { statusName } + }) +} + +// 线索管理API +export function getLeadList(params) { + return request({ + url: '/bizLead/list', + method: 'get', + params + }) +} + +export function getMyLeadList(params) { + return request({ + url: '/bizLead/myLeads', + method: 'get', + params + }) +} + +export function getAllLeadList(params) { + return request({ + url: '/bizLead/allLeads', + method: 'get', + params + }) +} + +export function getPublicLeadList(params) { + return request({ + url: '/bizLead/publicLeads', + method: 'get', + params + }) +} + +export function getLeadDetail(id) { + return request({ + url: `/bizLead/${id}`, + method: 'get' + }) +} + +export function addLead(data) { + return request({ + url: '/bizLead', + method: 'post', + data + }) +} + +export function updateLead(data) { + return request({ + url: '/bizLead', + method: 'put', + data + }) +} + +export function changeLeadStatus(id, statusId, userId) { + return request({ + url: `/bizLead/${id}/status`, + method: 'put', + params: { statusId, userId } + }) +} + +export function changeLeadPersonnel(id, personnelId, userId) { + return request({ + url: `/bizLead/${id}/personnel`, + method: 'put', + params: { personnelId, userId } + }) +} + +export function checkLeadPhone(phone) { + return request({ + url: '/bizLead/checkPhone', + method: 'get', + params: { phone } + }) +} + +export function convertLeadToIntention(id, userId) { + return request({ + url: `/bizLead/${id}/convert`, + method: 'post', + params: { userId } + }) +} + +export function deleteLead(id, userId) { + return request({ + url: `/bizLead/${id}`, + method: 'delete', + params: { userId } + }) +} + +export function getLeadFollowHistory(leadId) { + return request({ + url: `/bizLead/${leadId}/followHistory`, + method: 'get' + }) +} + +// 意向客户相关API +export function getCustomerDetail(id) { + return request({ + url: `/bizCustomer/${id}`, + method: 'get' + }) +} + +export function createCustomer(data) { + return request({ + url: '/bizCustomer', + method: 'post', + data + }) +} + +export function updateCustomer(data) { + return request({ + url: '/bizCustomer', + method: 'put', + data + }) +} + +export function deleteCustomer(id) { + return request({ + url: `/bizCustomer/${id}`, + method: 'delete' + }) +} + +export function changeCustomerPersonnel(id, personnelId) { + return request({ + url: `/bizCustomer/personnel/${id}/${personnelId}`, + method: 'put' + }) +} + +export function changeCustomerStatus(id, statusId) { + return request({ + url: `/bizCustomer/status/${id}/${statusId}`, + method: 'put' + }) +} + +export function checkCustomerPhone(params) { + return request({ + url: '/bizCustomer/checkPhone', + method: 'get', + params + }) +} + +export function getMyCustomerList(data) { + return request({ + url: '/bizCustomer/myCustomer', + method: 'post', + data + }) +} + +export function getAllCustomerList(data) { + return request({ + url: '/bizCustomer/allCustomer', + method: 'post', + data + }) +} + +export function getPublicCustomerList(data) { + return request({ + url: '/bizCustomer/publicCustomer', + method: 'post', + data + }) +} + +export function followCustomer(data) { + return request({ + url: '/bizCustomer/follow', + method: 'post', + data + }) +} + +export function getCustomerFollowHistory(customerId) { + return request({ + url: `/bizCustomer/followHistory/${customerId}`, + method: 'get' + }) +} + +export function assignCustomer(id, params) { + return request({ + url: `/bizCustomer/${id}/assign`, + method: 'post', + params + }) +} + +export function returnCustomerToPublic(id, userId) { + return request({ + url: `/bizCustomer/returnToPublic/${id}`, + method: 'post', + params: { userId } + }) +} + +export function getCustomerTagGroups() { + return request({ + url: '/bizCustomer/tags/groups', + method: 'get' + }) +} + +export function saveCustomerTags(data) { + return request({ + url: '/bizCustomer/tags', + method: 'post', + data + }) +} + +// 获取客户状态列表 +export function getCustomerStatusList() { + return request({ + url: '/bizCustomer/status/list', + method: 'get' + }) +} diff --git a/pc/src/api/project.js b/pc/src/api/project.js index 37ba84d..b84c48e 100644 --- a/pc/src/api/project.js +++ b/pc/src/api/project.js @@ -58,4 +58,13 @@ export function getAllProjectStatistics() { url: '/room/project/statistics', method: 'get' }) -} \ No newline at end of file +} + +// 获取标签列表 +export function getTagByType(data) { + return request({ + url: '/admin/tag/getTagsByType', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/pc/src/router/modules/finance.js b/pc/src/router/modules/finance.js index e0769ee..7b569d3 100644 --- a/pc/src/router/modules/finance.js +++ b/pc/src/router/modules/finance.js @@ -18,6 +18,12 @@ export default { component: () => import('@/views/finance/receiptSetting/index.vue'), name: 'ReceiptSetting', meta: { title: '收据设置', icon: 'el-icon-document' } + }, + { + path: 'chargeStandard', + component: () => import('@/views/finance/chargeStandard/index.vue'), + name: 'ChargeStandard', + meta: { title: '收费标准', icon: 'el-icon-price-tag' } } ] } \ No newline at end of file diff --git a/pc/src/utils/auth.js b/pc/src/utils/auth.js new file mode 100644 index 0000000..92f056a --- /dev/null +++ b/pc/src/utils/auth.js @@ -0,0 +1,56 @@ +/** + * 用户鉴权相关工具方法 + */ + +/** + * 获取当前登录用户ID + * @returns {string} 用户ID + */ +export function getUserId() { + // 从本地存储中获取用户信息 + const userInfo = localStorage.getItem('userInfo') + if (userInfo) { + try { + const user = JSON.parse(userInfo) + return user.id || user.userId || '' + } catch (e) { + console.error('解析用户信息失败', e) + return '' + } + } + return '' +} + +/** + * 获取用户信息 + * @returns {Object} 用户信息对象 + */ +export function getUserInfo() { + const userInfo = localStorage.getItem('userInfo') + if (userInfo) { + try { + return JSON.parse(userInfo) + } catch (e) { + console.error('解析用户信息失败', e) + return {} + } + } + return {} +} + +/** + * 保存用户信息到本地存储 + * @param {Object} userInfo 用户信息对象 + */ +export function setUserInfo(userInfo) { + if (userInfo) { + localStorage.setItem('userInfo', JSON.stringify(userInfo)) + } +} + +/** + * 清除用户信息 + */ +export function clearUserInfo() { + localStorage.removeItem('userInfo') +} \ No newline at end of file diff --git a/pc/src/utils/request.js b/pc/src/utils/request.js index 29134d3..654f76d 100644 --- a/pc/src/utils/request.js +++ b/pc/src/utils/request.js @@ -4,8 +4,8 @@ import { API_SUCCESS_CODE } from './constants' // 创建axios实例 const service = axios.create({ - // baseURL: '/', // 修改为相对路径,使用代理 - baseURL: process.env.VUE_APP_BASE_API, // 使用环境变量中的接口地址 + baseURL: '/', // 修改为相对路径,使用代理 + // baseURL: process.env.VUE_APP_BASE_API, // 使用环境变量中的接口地址 timeout: 10000 // 请求超时时间 }) diff --git a/pc/src/views/asset/inventory/components/AssetForm.vue b/pc/src/views/asset/inventory/components/AssetForm.vue index aadddb9..2e56abb 100644 --- a/pc/src/views/asset/inventory/components/AssetForm.vue +++ b/pc/src/views/asset/inventory/components/AssetForm.vue @@ -39,7 +39,7 @@ @@ -51,7 +51,7 @@ @@ -226,7 +226,7 @@ import { getAsset, addAsset, updateAsset, listCompanies, listUsers, uploadAssetImage, checkAssetCode } from '@/api/asset/inventory' import { getClassificationTree } from '@/api/asset/classification' import { getLocationTree } from '@/api/asset/location' - +import { API_SUCCESS_CODE } from '@/utils/constants' export default { name: 'AssetForm', @@ -350,7 +350,7 @@ export default { getAssetDetail() { this.loading = true getAsset(this.assetId).then(response => { - if (response.code === '000000') { + if (response.code === API_SUCCESS_CODE) { this.form = response.data || {} // 如果有管理员,添加到选项中 @@ -371,7 +371,7 @@ export default { /** 获取资产分类树形选项 */ getClassificationOptions() { getClassificationTree({ status: '1' }).then(response => { - if (response.code === '000000') { + if (response.code === API_SUCCESS_CODE) { this.classificationOptions = this.processClassificationTree(response.data || []) } }) @@ -404,7 +404,7 @@ export default { /** 获取位置树选项 */ getLocationOptions() { getLocationTree().then(response => { - if (response.code === '000000') { + if (response.code === API_SUCCESS_CODE) { this.locationOptions = this.processLocationTree(response.data || []) } }) @@ -436,7 +436,7 @@ export default { /** 获取公司选项 */ getCompanyOptions() { listCompanies().then(response => { - if (response.code === '000000') { + if (response.code === API_SUCCESS_CODE) { this.companyOptions = response.data || [] } }).catch(() => { @@ -448,9 +448,9 @@ export default { /** 远程搜索管理员 */ remoteSearchAdmin(query) { this.adminLoading = true - listUsers({ name: query }).then(response => { + listUsers().then(response => { this.adminLoading = false - if (response.code === '000000') { + if (response.code === API_SUCCESS_CODE) { this.adminOptions = response.data || [] } }).catch(() => { @@ -471,7 +471,7 @@ export default { // 检查资产编码是否已存在 if (!this.isEdit) { checkAssetCode(this.form.code).then(response => { - if (response.code === '000000') { + if (response.code === API_SUCCESS_CODE) { if (!response.data) { this.$message.error('资产编码已存在,请更换其他编码') this.loading = false @@ -496,7 +496,7 @@ export default { saveAsset(formData) { const method = this.isEdit ? updateAsset : addAsset method(formData).then(response => { - if (response.code === '000000') { + if (response.code === API_SUCCESS_CODE) { this.$message.success(this.isEdit ? '修改成功' : '新增成功') this.$emit('refresh') this.$emit('close') @@ -530,7 +530,7 @@ export default { /** 图片上传成功回调 */ handleImageSuccess(response) { - if (response.code === '000000') { + if (response.code === API_SUCCESS_CODE) { this.form.imageUrl = response.data.url } else { this.$message.error(response.msg || '上传图片失败') diff --git a/pc/src/views/finance/chargeStandard/index.vue b/pc/src/views/finance/chargeStandard/index.vue new file mode 100644 index 0000000..487f0cb --- /dev/null +++ b/pc/src/views/finance/chargeStandard/index.vue @@ -0,0 +1,1097 @@ + + + + + \ No newline at end of file diff --git a/pc/src/views/merchant/clue-management/index.vue b/pc/src/views/merchant/clue-management/index.vue index ff17d85..a0c836d 100644 --- a/pc/src/views/merchant/clue-management/index.vue +++ b/pc/src/views/merchant/clue-management/index.vue @@ -1,23 +1,1536 @@ @@ -25,5 +1538,222 @@ export default { \ No newline at end of file + +::v-deep .el-input-number .el-input__inner { + text-align: left; +} + \ No newline at end of file diff --git a/pc/src/views/merchant/intent-customer/index.vue b/pc/src/views/merchant/intent-customer/index.vue index 53b525d..b7900b6 100644 --- a/pc/src/views/merchant/intent-customer/index.vue +++ b/pc/src/views/merchant/intent-customer/index.vue @@ -1,23 +1,1522 @@ @@ -25,5 +1524,77 @@ export default { \ No newline at end of file + \ No newline at end of file diff --git a/pc/src/views/merchant/merchant-personnel/index.vue b/pc/src/views/merchant/merchant-personnel/index.vue index 5935e24..0dd6442 100644 --- a/pc/src/views/merchant/merchant-personnel/index.vue +++ b/pc/src/views/merchant/merchant-personnel/index.vue @@ -26,10 +26,14 @@ - + + + - @@ -58,7 +62,12 @@ class="filter-item" /> - + 搜索 重置 @@ -68,9 +77,13 @@ - - - + + + + + diff --git a/pc/src/views/project/building/index.vue b/pc/src/views/project/building/index.vue index a5afb11..88fd531 100644 --- a/pc/src/views/project/building/index.vue +++ b/pc/src/views/project/building/index.vue @@ -296,9 +296,9 @@ :value="item.id">
{{ item.accountName }} - {{ item.company }} + {{ item.companyName }}
-
{{ item.bankAccount }}
+
{{ item.bankAccountNumber }}
@@ -311,12 +311,12 @@ - + - + @@ -324,7 +324,7 @@ - + @@ -340,13 +340,12 @@ - - - - - - - + @@ -552,12 +551,12 @@ - + - + @@ -565,7 +564,7 @@ - + @@ -663,8 +662,10 @@