From 8e27ec77ffd7b8e47b82c7f7010fe8c5e53df2f2 Mon Sep 17 00:00:00 2001 From: doublekou <951513186@qq.com> Date: Thu, 21 Sep 2023 16:50:07 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pro-components/table/Table.tsx | 1 + src/api/geopoliticalCustomers/types.ts | 4 ++++ src/api/salesmanagement/salespersonList/types.ts | 2 +- src/utils/page-utils.ts | 8 +++++--- src/views/formReview/formReview.vue | 10 +++++++++- .../geopoliticalCustomers/geopoliticalCustomers.vue | 10 +++++++++- .../qualityInspectionDistribution/inspectionIndex.vue | 10 +++++++++- .../salespersonList/salespersonListModal.vue | 5 +++++ vite.config.ts | 4 ++-- 9 files changed, 45 insertions(+), 9 deletions(-) diff --git a/pro-components/table/Table.tsx b/pro-components/table/Table.tsx index 39e8119..56b6fe0 100644 --- a/pro-components/table/Table.tsx +++ b/pro-components/table/Table.tsx @@ -380,6 +380,7 @@ const ProTable = defineComponent({ const fetchData = () => { if (!props.request) return undefined return async (pageParams?: Record) => { + console.log(pageParams, 'pageParams') const actionParams = { ...(pageParams || {}), ...formSearch, diff --git a/src/api/geopoliticalCustomers/types.ts b/src/api/geopoliticalCustomers/types.ts index 7f816d1..c101f5a 100644 --- a/src/api/geopoliticalCustomers/types.ts +++ b/src/api/geopoliticalCustomers/types.ts @@ -242,6 +242,7 @@ export type GeopoliticalCustomersRecord = { * 地缘获客搜索区域表单 */ export interface GeopoliticalCustomersSearch { + // salesmanType: number | undefined customName?: string customNid?: string enrollStatus?: string @@ -254,6 +255,9 @@ export interface GeopoliticalCustomersSearch { * 表单重审搜索区域表单 */ export interface FormReviewSearch { + //角色 + // salesmanType: string | undefined + //编号 batchNo?: string // 访问时间区间的开始值 startTime?: string diff --git a/src/api/salesmanagement/salespersonList/types.ts b/src/api/salesmanagement/salespersonList/types.ts index 9894826..6c6d2ba 100644 --- a/src/api/salesmanagement/salespersonList/types.ts +++ b/src/api/salesmanagement/salespersonList/types.ts @@ -54,7 +54,7 @@ export type SysUserDTO = { // 组织机构ID organizationId?: number // 角色标识列表 - roleCodes: string[] + roleCodes: any // desc: objectState // stage: objectState } diff --git a/src/utils/page-utils.ts b/src/utils/page-utils.ts index dc626b6..d4b1e12 100644 --- a/src/utils/page-utils.ts +++ b/src/utils/page-utils.ts @@ -8,10 +8,11 @@ export type MergePageParamFunction = ( keyword?: string }, sorter: Record, - filter: Record + filter: Record, + salesmanType?: number | undefined ) => Record -export const mergePageParam: MergePageParamFunction = (params, sorter, filter) => { +export const mergePageParam: MergePageParamFunction = (params, sorter, filter, salesmanType?) => { const sort = [] for (const key in sorter) { sort.push(sorter[key] === 'ascend' ? `${key},asc` : `${key},desc`) @@ -24,6 +25,7 @@ export const mergePageParam: MergePageParamFunction = (params, sorter, filter) = page: current, ...rest, ...filter, - sort + sort, + salesmanType } } diff --git a/src/views/formReview/formReview.vue b/src/views/formReview/formReview.vue index 756ffdf..548d1bf 100644 --- a/src/views/formReview/formReview.vue +++ b/src/views/formReview/formReview.vue @@ -54,6 +54,14 @@ import type { defineOptions({ name: 'FormReview' }) +//获取当前账号角色 +import { useUserStore } from '@/stores/user-store' +const { userInfo } = useUserStore() +const salesmanType = ref() +onMounted(() => { + salesmanType.value = userInfo?.salesmanType +}) + //底部表格 // 表格组件引用 const tableRef = ref() @@ -64,7 +72,7 @@ let searchParams: GeopoliticalCustomersPageParam = {} //远程加载表格数据 const tableRequest: TableRequest = (params, sorter, filter) => { - const pageParam = mergePageParam(params, sorter, filter) + const pageParam = mergePageParam(params, sorter, filter, salesmanType.value) return pageAccessLogs({ ...pageParam, ...searchParams }) } diff --git a/src/views/geopoliticalCustomers/geopoliticalCustomers.vue b/src/views/geopoliticalCustomers/geopoliticalCustomers.vue index e583828..4617021 100644 --- a/src/views/geopoliticalCustomers/geopoliticalCustomers.vue +++ b/src/views/geopoliticalCustomers/geopoliticalCustomers.vue @@ -55,6 +55,14 @@ import type { defineOptions({ name: 'GeopoliticalCustomers' }) +//获取当前账号角色 +import { useUserStore } from '@/stores/user-store' +const { userInfo } = useUserStore() +const salesmanType = ref() +onMounted(() => { + salesmanType.value = userInfo?.salesmanType +}) + //底部表格 // 表格组件引用 const tableRef = ref() @@ -65,7 +73,7 @@ let searchParams: GeopoliticalCustomersPageParam = {} //远程加载表格数据 const tableRequest: TableRequest = (params, sorter, filter) => { - const pageParam = mergePageParam(params, sorter, filter) + const pageParam = mergePageParam(params, sorter, filter, salesmanType.value) return pageAccessLogs({ ...pageParam, ...searchParams }) } diff --git a/src/views/qualityInspectionDistribution/inspectionIndex.vue b/src/views/qualityInspectionDistribution/inspectionIndex.vue index 5a106d9..347a960 100644 --- a/src/views/qualityInspectionDistribution/inspectionIndex.vue +++ b/src/views/qualityInspectionDistribution/inspectionIndex.vue @@ -53,6 +53,14 @@ import type { defineOptions({ name: 'GeopoliticalCustomers' }) +//获取当前账号角色 +import { useUserStore } from '@/stores/user-store' +const { userInfo } = useUserStore() +const salesmanType = ref() +onMounted(() => { + salesmanType.value = userInfo?.salesmanType +}) + //底部表格 // 表格组件引用 const tableRef = ref() @@ -63,7 +71,7 @@ let searchParams: GeopoliticalCustomersPageParam = {} //远程加载表格数据 const tableRequest: TableRequest = (params, sorter, filter) => { - const pageParam = mergePageParam(params, sorter, filter) + const pageParam = mergePageParam(params, sorter, filter, salesmanType.value) return pageAccessLogs({ ...pageParam, ...searchParams }) } diff --git a/src/views/salesmanagement/salespersonList/salespersonListModal.vue b/src/views/salesmanagement/salespersonList/salespersonListModal.vue index 1abc108..c891129 100644 --- a/src/views/salesmanagement/salespersonList/salespersonListModal.vue +++ b/src/views/salesmanagement/salespersonList/salespersonListModal.vue @@ -116,6 +116,11 @@ const { submitLoading, validateAndSubmit, resetFields, validateInfos } = useAdmi //表单提交处理 const handleSubmit = () => { console.log(formModel, 'formModel') + console.log() + if (typeof formModel.roleCodes === 'string') { + formModel.roleCodes = [formModel.roleCodes] + } + validateAndSubmit( { ...formModel, diff --git a/vite.config.ts b/vite.config.ts index 8d04afb..c42433a 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' 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 2/3] =?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' From b0799ff52c9345271baf967df918811aacafd340 Mon Sep 17 00:00:00 2001 From: doublekou <951513186@qq.com> Date: Fri, 22 Sep 2023 09:49:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=B1=BB=E5=9E=8B/=E4=BA=BA=E5=91=98=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/clueaccess/accessDetail/accessDetail.vue | 8 +------- src/views/clueaccess/importDetail/importDetail.vue | 8 +------- .../customerManagement/customerManagement.vue | 8 +------- .../distributionTaskManagement.vue | 8 +------- src/views/formReview/formReview.vue | 8 +------- .../geopoliticalCustomers.vue | 8 +------- .../salespersonList/salespersonList.vue | 2 +- src/views/shopManage/shopIndex.vue | 14 +++++++------- src/views/system/user/SysUserPage.vue | 4 ++-- vite.config.ts | 4 ++-- 10 files changed, 18 insertions(+), 54 deletions(-) diff --git a/src/views/clueaccess/accessDetail/accessDetail.vue b/src/views/clueaccess/accessDetail/accessDetail.vue index c08f34d..04a5f07 100644 --- a/src/views/clueaccess/accessDetail/accessDetail.vue +++ b/src/views/clueaccess/accessDetail/accessDetail.vue @@ -80,7 +80,7 @@
- 添加推送 + 添加推送
@@ -649,12 +649,6 @@ const resetForm = () => { .operationButtonArea { padding-bottom: 20px; } -.operationButton { - background-color: #f4f4f5; - border-radius: 5px; - color: #909399; - margin-right: 10px; -} .editable-row-operations a { margin-right: 8px; } diff --git a/src/views/clueaccess/importDetail/importDetail.vue b/src/views/clueaccess/importDetail/importDetail.vue index f350778..af7cc51 100644 --- a/src/views/clueaccess/importDetail/importDetail.vue +++ b/src/views/clueaccess/importDetail/importDetail.vue @@ -64,7 +64,7 @@
- 批量分发 + 批量分发
@@ -581,12 +581,6 @@ const distributionRulesChange = (data: any, selectedCompany: string[]) => { .operationButtonArea { padding-bottom: 20px; } -.operationButton { - background-color: #f4f4f5; - border-radius: 5px; - color: #909399; - margin-right: 10px; -} .editable-row-operations a { margin-right: 8px; } diff --git a/src/views/controlcenterstation/customerManagement/customerManagement.vue b/src/views/controlcenterstation/customerManagement/customerManagement.vue index 0165571..ded327c 100644 --- a/src/views/controlcenterstation/customerManagement/customerManagement.vue +++ b/src/views/controlcenterstation/customerManagement/customerManagement.vue @@ -8,7 +8,7 @@
- 分发配置 + 分发配置
@@ -239,12 +239,6 @@ const rowSelection = ref({ .operationButtonArea { padding-bottom: 20px; } -.operationButton { - background-color: #f4f4f5; - border-radius: 5px; - color: #909399; - margin-right: 10px; -} .editable-row-operations a { margin-right: 8px; } diff --git a/src/views/controlcenterstation/distributionTaskManagement/distributionTaskManagement.vue b/src/views/controlcenterstation/distributionTaskManagement/distributionTaskManagement.vue index c039548..2dcb42a 100644 --- a/src/views/controlcenterstation/distributionTaskManagement/distributionTaskManagement.vue +++ b/src/views/controlcenterstation/distributionTaskManagement/distributionTaskManagement.vue @@ -8,7 +8,7 @@
- 分发配置 + 分发配置
@@ -321,12 +321,6 @@ const cancel = (e: MouseEvent) => { .operationButtonArea { padding-bottom: 20px; } -.operationButton { - background-color: #f4f4f5; - border-radius: 5px; - color: #909399; - margin-right: 10px; -} .editable-row-operations a { margin-right: 8px; } diff --git a/src/views/formReview/formReview.vue b/src/views/formReview/formReview.vue index 548d1bf..86c6acc 100644 --- a/src/views/formReview/formReview.vue +++ b/src/views/formReview/formReview.vue @@ -8,7 +8,7 @@ @@ -156,12 +156,6 @@ const columns: ProColumns[] = [ // .operationButtonArea { // padding-bottom: 20px; // } -// .operationButton { -// background-color: #f4f4f5; -// border-radius: 5px; -// color: #909399; -// margin-right: 10px; -// } .editable-row-operations a { margin-right: 8px; } diff --git a/src/views/geopoliticalCustomers/geopoliticalCustomers.vue b/src/views/geopoliticalCustomers/geopoliticalCustomers.vue index 4617021..6a2139f 100644 --- a/src/views/geopoliticalCustomers/geopoliticalCustomers.vue +++ b/src/views/geopoliticalCustomers/geopoliticalCustomers.vue @@ -8,7 +8,7 @@
- 新建预约 + 新建预约
@@ -171,12 +171,6 @@ const columns: ProColumns[] = [ .operationButtonArea { padding-bottom: 20px; } -.operationButton { - background-color: #f4f4f5; - border-radius: 5px; - color: #909399; - margin-right: 10px; -} .editable-row-operations a { margin-right: 8px; } diff --git a/src/views/salesmanagement/salespersonList/salespersonList.vue b/src/views/salesmanagement/salespersonList/salespersonList.vue index 725e8d7..3a807ff 100644 --- a/src/views/salesmanagement/salespersonList/salespersonList.vue +++ b/src/views/salesmanagement/salespersonList/salespersonList.vue @@ -28,7 +28,7 @@ 改密 编辑 - + diff --git a/src/views/shopManage/shopIndex.vue b/src/views/shopManage/shopIndex.vue index 4906ac5..eab122b 100644 --- a/src/views/shopManage/shopIndex.vue +++ b/src/views/shopManage/shopIndex.vue @@ -8,7 +8,7 @@
- 新建店铺 + 新建店铺
@@ -192,12 +192,12 @@ const columns: ProColumns[] = [ .operationButtonArea { padding-bottom: 20px; } -.operationButton { - background-color: #f4f4f5; - border-radius: 5px; - color: #909399; - margin-right: 10px; -} +// .operationButton { +// background-color: #f4f4f5; +// border-radius: 5px; +// color: #909399; +// margin-right: 10px; +// } .editable-row-operations a { margin-right: 8px; } diff --git a/src/views/system/user/SysUserPage.vue b/src/views/system/user/SysUserPage.vue index 0816032..b94171c 100644 --- a/src/views/system/user/SysUserPage.vue +++ b/src/views/system/user/SysUserPage.vue @@ -72,9 +72,9 @@ 改密 - + diff --git a/vite.config.ts b/vite.config.ts index 8d04afb..c42433a 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'