diff --git a/src/api/geopoliticalCustomers/index.ts b/src/api/geopoliticalCustomers/index.ts index 87dfbca..47270ca 100644 --- a/src/api/geopoliticalCustomers/index.ts +++ b/src/api/geopoliticalCustomers/index.ts @@ -106,7 +106,7 @@ export function getDetail(customId: customId) { * @param customerDto 客户信息传输对象 */ export function auditCustomer(customerDto: auditDTO) { - return httpClient.post>('/custom/audit', customerDto) + return httpClient.post>('/custom/reAudit', customerDto) } // export function auditCustomer(customerDto: CustomerDTO) { // return httpClient.get('/custom/audit', { @@ -126,11 +126,17 @@ export function getStoreData(pageParams: storePageParam) { * 任务审核 * */ -export function updateCustomerAudit(customId: number, status: number, salesmanType: number) { +export function updateCustomerAudit( + customId: number, + status: number, + salesmanType: number, + reviewUserId: undefined | number +) { return httpClient.post('/custom/audit', { customId, status, - salesmanType + salesmanType, + reviewUserId }) } /** @@ -142,3 +148,10 @@ export function getCustomDetails(id: number) { params: { id } }) } +/** + * 审核员下拉列表数据 + * + */ +export function selectedReviewerList() { + return httpClient.get('/system/user/review/list') +} diff --git a/src/api/geopoliticalCustomers/types.ts b/src/api/geopoliticalCustomers/types.ts index 9c63e55..ed5f96e 100644 --- a/src/api/geopoliticalCustomers/types.ts +++ b/src/api/geopoliticalCustomers/types.ts @@ -275,6 +275,8 @@ export interface FormReviewSearch { // salesmanType: string | undefined //编号 batchNo?: string + //备注 + remark?: string // 访问时间区间的开始值 startTime?: string // 访问时间区间的结束值 diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index b420e34..dfa998a 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -6,7 +6,8 @@ import type { SysUserPageParam, SysUserPageVO, SysUserPassDTO, - SysUserScope + SysUserScope, + SysUserChargeDTO } from '@/api/system/user/types' import type { SysUserStatus } from '@/api/system/user/types' import type { ApiResult } from '@/api/types' @@ -41,7 +42,7 @@ export function updateUser(userUpdateDto: SysUserDTO) { * 删除用户 * @param userId 用户id */ -export function deleteUser(userId: number) { +export function deleteUser(userId: number | undefined) { return httpClient.delete>(`/system/user/${userId}`) } @@ -61,7 +62,7 @@ export function updateUserStatus(userIds: number[], status: SysUserStatus) { * @param userId 用户id * @param fileObj 头像文件 */ -export function updateUserAvatar(userId: Key, fileObj: FileObject) { +export function updateUserAvatar(userId: Key | undefined, fileObj: FileObject) { const formData = new FormData() formData.append('file', fileObj.data, fileObj.name) formData.append('userId', userId + '') @@ -93,5 +94,10 @@ export function updateUserScope(userId: number, userScope: SysUserScope) { export function updateUserPassword(userId: number, data: SysUserPassDTO) { return httpClient.put>(`/system/user/pass/${userId}`, data) } - - +/** + * 充值 + * @param chargeDto 充值对象 + */ +export function chargeClue(chargeDto: SysUserChargeDTO) { + return httpClient.post>('/system/user/recharge', chargeDto) +} diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts index bb27f61..568708a 100644 --- a/src/api/system/user/types.ts +++ b/src/api/system/user/types.ts @@ -45,6 +45,7 @@ export type SysUserPageParam = SysUserQO & PageParam * 系统用户分页视图对象 */ export type SysUserPageVO = { + userId?: number id: number name: string labelList: Array @@ -248,3 +249,8 @@ export type clueStageDTO = { desc: clueStageState // stage?: objectState } +//充值 +export type SysUserChargeDTO = { + userId: number | undefined + rechargeClueNum: number | undefined +} diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index f8772da..ca262ff 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -134,6 +134,7 @@ const menuState = reactive<{ watchEffect(() => { const matchedRoutes = route.matched + console.log(matchedRoutes, 'matchedRoutes') menuState.selectedKeys = matchedRoutes.filter(x => x.path !== '/').map(x => x.path) menuState.matchMenuKeys = matchedRoutes.filter(x => x.path !== '/').map(x => x.path) }) diff --git a/src/layouts/RouterLayout.vue b/src/layouts/RouterLayout.vue index 0df99c7..d075f5c 100644 --- a/src/layouts/RouterLayout.vue +++ b/src/layouts/RouterLayout.vue @@ -24,6 +24,8 @@ const includeComponentNames = computed(() => [...multiTabStore.cachedComponentNa // 如果是路由布局,则使用 ComponentName 作为 key,避免被识别为不同的组件导致 keepAlive 异常 const getComponentKey = (Component: VNode, route: RouteLocationNormalizedLoaded) => { + // console.log(Component, 'Component') + // console.log(route, 'route') if (multiTabStore.contentLoading) return emptyNodeName if (Component) { const componentName = (Component.type as Component).name diff --git a/src/router/constant-routes.ts b/src/router/constant-routes.ts index 87d1d03..969fc89 100644 --- a/src/router/constant-routes.ts +++ b/src/router/constant-routes.ts @@ -65,13 +65,13 @@ const constantRoutes: RouteRecordRaw[] = [ // } // ] // }, - // { - // //个人中心 - // path: '/user/center', - // name: '个人中心', - // component: () => import('@/views/user/center/updateEmail.vue'), - // meta: { title: '个人中心', withoutLayout: true } - // }, + { + //个人中心 + path: '/user/center', + name: '个人中心', + component: () => import('@/views/system/userCenter/personCenter.vue'), + meta: { title: '个人中心', withoutLayout: true } + }, // { // // OAuth2 授权码登录处理页 // path: '/clueaccess/clueImport', diff --git a/src/router/dynamic-routes.ts b/src/router/dynamic-routes.ts index 8b0cd05..8aae5ac 100644 --- a/src/router/dynamic-routes.ts +++ b/src/router/dynamic-routes.ts @@ -24,7 +24,9 @@ export const generatorDynamicRouter = (userMenus: SysMenuRouterVO[]): RouteRecor const routes: RouteRecordRaw = { ...HOME_ROUTE } // 后端数据, 根级树数组, 根级 PID const menuTree = listToTree(userMenus, 0) as SysMenuRouterTree[] + routes.children = menuToRoutes(menuTree) + console.log('routes', routes) routes.children.push(buildNotFoundRoute('PageNotFound')) fillRedirect(routes) @@ -137,10 +139,10 @@ const getComponent = function (componentPath: string) { import.meta.env.DEV && console.warn( '在src/views/下找不到`' + - componentPath + - '.vue` 或 `' + - componentPath + - '.tsx`, 请自行创建!' + componentPath + + '.vue` 或 `' + + componentPath + + '.tsx`, 请自行创建!' ) viewModule = ExceptionComponentImport } diff --git a/src/router/guards.ts b/src/router/guards.ts index 05bcd2d..d8958c8 100644 --- a/src/router/guards.ts +++ b/src/router/guards.ts @@ -25,6 +25,7 @@ const routerGuards = (router: Router) => { const userMenus = await userStore.fetchUserMenus() if (userMenus) { const dynamicRouter = generatorDynamicRouter(userMenus) + router.addRoute(dynamicRouter) return to.fullPath } diff --git a/src/stores/user-store.ts b/src/stores/user-store.ts index 003257d..4cee0bf 100644 --- a/src/stores/user-store.ts +++ b/src/stores/user-store.ts @@ -29,6 +29,34 @@ export const useUserStore = defineStore('userStore', { actions: { async fetchUserMenus() { const { data } = await getLoginUserMenus() + data.push({ + path: 'usercenter', + hidden: 1, + icon: '', + id: 101000, + keepAlive: 1, + parentId: 100000, + remarks: '', + targetType: 1, + title: '个人中心', + type: 1, + uri: 'system/userCenter/personCenter' + }) + if (!data.some(obj => obj.path === 'system')) { + data.push({ + path: 'system', + hidden: 1, //0是显示,1是隐藏 + icon: 'setting', + id: 100000, + keepAlive: 0, + parentId: 0, + remarks: '', + targetType: 1, + title: '系统用户', + type: 0, + uri: '' + }) + } this.userMenus = data return data }, diff --git a/src/views/formReview/formReview.vue b/src/views/formReview/formReview.vue index a23154a..8032839 100644 --- a/src/views/formReview/formReview.vue +++ b/src/views/formReview/formReview.vue @@ -27,7 +27,7 @@ 编辑 - 分发 + 回单 - @@ -120,6 +120,10 @@ const columns: ProColumns[] = [ title: '联系方式', dataIndex: 'customNid' }, + { + title: '备注', + dataIndex: 'remark' + }, { title: '审核状态', dataIndex: 'enrollStatus', diff --git a/src/views/formReview/formReviewSearch.vue b/src/views/formReview/formReviewSearch.vue index 1ac29f0..a54ae84 100644 --- a/src/views/formReview/formReviewSearch.vue +++ b/src/views/formReview/formReviewSearch.vue @@ -7,6 +7,11 @@ + + + + + () const formModel = reactive({ - batchNo: '' + batchNo: '', + remark: '' }) const { resetFields } = useForm(formModel) diff --git a/src/views/geopoliticalCustomers/geopoliticalCustomers.vue b/src/views/geopoliticalCustomers/geopoliticalCustomers.vue index aec300b..b11a203 100644 --- a/src/views/geopoliticalCustomers/geopoliticalCustomers.vue +++ b/src/views/geopoliticalCustomers/geopoliticalCustomers.vue @@ -127,8 +127,10 @@ const columns: ProColumns[] = [ customRender: function ({ record }: any) { if (record.customType === 0) { return h('div', 'A型') - } else { + } else if (record.customType === 1) { return h('div', 'B型') + } else { + return h('div', '-') } } }, diff --git a/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue b/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue index 2880260..1a5f220 100644 --- a/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue +++ b/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue @@ -32,7 +32,7 @@ :rule="formRule" :label-col="{ sm: { span: 24 }, md: { span: 5 } }" :wrapper-col=" - title === '详情' || title === '分发' + title === '详情' || title === '回单' ? { sm: { span: 24 }, md: { span: 16 } } : { sm: { span: 24 }, md: { span: 19 } } " @@ -43,7 +43,7 @@ :rules="[{ required: true, message: '请输入称呼', trigger: 'blur' }]" :label-col="{ sm: { span: 24 }, md: { span: 5 } }" :wrapper-col=" - title === '详情' || title === '分发' + title === '详情' || title === '回单' ? { sm: { span: 24 }, md: { span: 9 } } : { sm: { span: 24 }, md: { span: 11 } } " @@ -52,7 +52,7 @@ v-model:value="formModel.customName" placeholder="请输入称呼" style="width: 65%" - :readonly="title === '详情' || title === '分发'" + :readonly="title === '详情' || title === '回单'" /> @@ -87,7 +87,7 @@ name="remark" :label-col="{ sm: { span: 24 }, md: { span: 5 } }" :wrapper-col=" - title === '详情' || title === '分发' + title === '详情' || title === '回单' ? { sm: { span: 24 }, md: { span: 19 } } : { sm: { span: 24 }, md: { span: 19 } } " @@ -95,8 +95,8 @@ @@ -112,7 +112,7 @@ required: activeKey === '1' || (activeKey === '2' && title === '编辑') || - (activeKey === '2' && title === '分发'), + (activeKey === '2' && title === '回单'), message: '请选择地址信息', trigger: ['blur', 'change'] } @@ -141,7 +141,7 @@ required: activeKey === '1' || (activeKey === '2' && title === '编辑') || - (activeKey === '2' && title === '分发'), + (activeKey === '2' && title === '回单'), message: '请输入小区名称', trigger: 'change' } @@ -179,7 +179,7 @@ required: activeKey === '1' || (activeKey === '2' && title === '编辑') || - (activeKey === '2' && title === '分发'), + (activeKey === '2' && title === '回单'), message: '请选择区域半径', trigger: 'blur' } @@ -188,7 +188,7 @@ - - - - - - - - - diff --git a/src/views/salesmanagement/salespersonList/salespersonList.vue b/src/views/salesmanagement/salespersonList/salespersonList.vue index 5f9cce5..b13bb3f 100644 --- a/src/views/salesmanagement/salespersonList/salespersonList.vue +++ b/src/views/salesmanagement/salespersonList/salespersonList.vue @@ -28,7 +28,8 @@ 改密 编辑 - 充值 + 充值 + @@ -39,7 +40,7 @@ - + - diff --git a/vite.config.ts b/vite.config.ts index 3d382a1..2ed5236 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -22,11 +22,11 @@ import { antdvStyleDeps } from './src/utils/resolvers' //项目 // export const serverAddress = 'http://admin.ballcat.cn' //xy -export const serverAddress = 'http://172.18.0.225:8000' +// export const serverAddress = 'http://172.18.0.225:8000' //jt // export const serverAddress = 'http://172.18.1.8:8000' //ts -// export const serverAddress = 'http://172.18.0.228:8000' +export const serverAddress = 'http://172.18.0.228:8000' //测试 // export const serverAddress = 'http://39.100.77.21:8000'