Compare commits
27 Commits
0555c0e42e
...
dev-report
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f74ed7e62d | ||
|
|
8fc9dd449b | ||
|
|
9c7ba2fb87 | ||
|
|
2406bcb8e4 | ||
|
|
41c20623d4 | ||
|
|
a8ea0e4b26 | ||
|
|
8de29b754a | ||
|
|
5f63709c2f | ||
|
|
a89bd1b59c | ||
|
|
4daf01a21b | ||
|
|
83d04e7333 | ||
| a81d21dd3b | |||
|
|
f6ed6575c4 | ||
|
|
cab0b3f2eb | ||
|
|
f415e0cfce | ||
|
|
90f7513ca8 | ||
|
|
cad9fbb0e0 | ||
|
|
187c156e88 | ||
| 842e6ea24b | |||
|
|
fb466e207c | ||
|
|
8a857e03af | ||
|
|
7de4adeaad | ||
|
|
3e714a0bc8 | ||
|
|
3678c5fcc4 | ||
|
|
ecc89f47bb | ||
|
|
41e256aabb | ||
|
|
cc5648414e |
@@ -6,8 +6,8 @@ export const getSimpleClueList = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询列表
|
// 查询列表
|
||||||
export const getCluePage = async (params) => {
|
export const getCluePage = async (data) => {
|
||||||
return await request.get({ url: '/admin-api/crm/sch-clue/page', params })
|
return await request.post({ url: '/admin-api/crm/sch-clue/page', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情
|
// 查询详情
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// 查询列表
|
// 查询列表
|
||||||
export const getSignPage = async (params) => {
|
export const getSignPage = async (data) => {
|
||||||
return await request.get({ url: '/admin-api/crm/sign/page', params })
|
return await request.post({ url: '/admin-api/crm/sign/page', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情
|
// 查询详情
|
||||||
|
|||||||
8
src/api/home/reportChannel.js
Normal file
8
src/api/home/reportChannel.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
export const getList = async (data) => {
|
||||||
|
return await request.post({ url: '/admin-api/crm/sch-clue/clueQuality/report', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getPeriodList = async (data) => {
|
||||||
|
return await request.post({ url: '/admin-api/crm/sch-clue/clueQuality/period/report', data })
|
||||||
|
}
|
||||||
8
src/api/home/reportSignDetail.js
Normal file
8
src/api/home/reportSignDetail.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
export const getInfo = async (data) => {
|
||||||
|
return await request.post({ url: '/admin-api/crm/sch-clue/signData/report/one', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getList = async (data) => {
|
||||||
|
return await request.post({ url: '/admin-api/crm/sch-clue/signData/report/two', data })
|
||||||
|
}
|
||||||
4
src/api/home/reportSignRate.js
Normal file
4
src/api/home/reportSignRate.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
export const getList = async (data) => {
|
||||||
|
return await request.post({ url: '/admin-api/crm/sch-clue/signRate/report', data })
|
||||||
|
}
|
||||||
@@ -71,3 +71,10 @@ export const getAppInfo = (instanceId: number) => {
|
|||||||
url: '/admin-api/system/serviceInstance/getInstanceInfo?instanceId=' + instanceId
|
url: '/admin-api/system/serviceInstance/getInstanceInfo?instanceId=' + instanceId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const bindWx = (data: any) => {
|
||||||
|
return request.post({
|
||||||
|
url: '/admin-api/system/user/bind/wx',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ export interface NotifyMessageVO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询站内信消息列表
|
// 查询站内信消息列表
|
||||||
export const getNotifyMessagePage = async (params: PageParam) => {
|
export const getNotifyMessagePage = async (params: any) => {
|
||||||
return await request.get({ url: '/admin-api/system/notify-message/page', params })
|
return await request.get({ url: '/admin-api/system/notify-message/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得我的站内信分页
|
// 获得我的站内信分页
|
||||||
export const getMyNotifyMessagePage = async (params: PageParam) => {
|
export const getMyNotifyMessagePage = async (params: any) => {
|
||||||
return await request.get({ url: '/admin-api/system/notify-message/my-page', params })
|
return await request.get({ url: '/admin-api/system/notify-message/my-page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ onMounted(() => {
|
|||||||
appStore.setCssVarTheme()
|
appStore.setCssVarTheme()
|
||||||
})
|
})
|
||||||
|
|
||||||
const { width } = useWindowSize()
|
const { width, height } = useWindowSize()
|
||||||
|
|
||||||
// 监听窗口变化
|
// 监听窗口变化
|
||||||
watch(
|
watch(
|
||||||
() => width.value,
|
() => width.value,
|
||||||
(width: number) => {
|
(width: number) => {
|
||||||
if (width < 768) {
|
if (width < 768 || height.value < 450) {
|
||||||
!appStore.getMobile ? appStore.setMobile(true) : undefined
|
!appStore.getMobile ? appStore.setMobile(true) : undefined
|
||||||
setCssVar('--left-menu-min-width', '0')
|
setCssVar('--left-menu-min-width', '0')
|
||||||
appStore.setCollapse(true)
|
appStore.setCollapse(true)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const props = defineProps({
|
|||||||
// fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']), // 文件类型, 例如['png', 'jpg', 'jpeg']
|
// fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']), // 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||||
fileType: propTypes.array.def([]),
|
fileType: propTypes.array.def([]),
|
||||||
accept: propTypes.string.def('*'),
|
accept: propTypes.string.def('*'),
|
||||||
fileSize: propTypes.number.def(5), // 大小限制(MB)
|
fileSize: propTypes.number.def(100), // 大小限制(MB)
|
||||||
limit: propTypes.number.def(5), // 数量限制
|
limit: propTypes.number.def(5), // 数量限制
|
||||||
autoUpload: propTypes.bool.def(true), // 自动上传
|
autoUpload: propTypes.bool.def(true), // 自动上传
|
||||||
drag: propTypes.bool.def(false), // 拖拽上传
|
drag: propTypes.bool.def(false), // 拖拽上传
|
||||||
|
|||||||
@@ -205,6 +205,8 @@ service.interceptors.response.use(
|
|||||||
if (msg === '无效的刷新令牌') {
|
if (msg === '无效的刷新令牌') {
|
||||||
// hard coding:忽略这个提示,直接登出
|
// hard coding:忽略这个提示,直接登出
|
||||||
console.log(msg)
|
console.log(msg)
|
||||||
|
} else if (code == 18888) {
|
||||||
|
return { data }
|
||||||
} else {
|
} else {
|
||||||
ElNotification.error({ title: msg })
|
ElNotification.error({ title: msg })
|
||||||
if (code == 403) {
|
if (code == 403) {
|
||||||
|
|||||||
@@ -13,7 +13,12 @@ export const useMessage = () => {
|
|||||||
},
|
},
|
||||||
// 成功消息
|
// 成功消息
|
||||||
success(content: string) {
|
success(content: string) {
|
||||||
ElMessage.success(content)
|
// ElMessage.success(content)
|
||||||
|
ElMessage({
|
||||||
|
message: content,
|
||||||
|
duration: 1500,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 警告消息
|
// 警告消息
|
||||||
warning(content: string) {
|
warning(content: string) {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ onUnmounted(() => {
|
|||||||
.message-item {
|
.message-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0;
|
padding: 5px 0;
|
||||||
border-bottom: 1px solid var(--el-border-color-light);
|
border-bottom: 1px solid var(--el-border-color-light);
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ const { loadStart, loadDone } = usePageLoading()
|
|||||||
const whiteList = [
|
const whiteList = [
|
||||||
'/login',
|
'/login',
|
||||||
'/mp-login',
|
'/mp-login',
|
||||||
|
'/nm-detail',
|
||||||
'/social-login',
|
'/social-login',
|
||||||
'/auth-redirect',
|
'/auth-redirect',
|
||||||
'/bind',
|
'/bind',
|
||||||
@@ -44,7 +45,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
const dictStore = useDictStoreWithOut()
|
const dictStore = useDictStoreWithOut()
|
||||||
const userStore = useUserStoreWithOut()
|
const userStore = useUserStoreWithOut()
|
||||||
const permissionStore = usePermissionStoreWithOut()
|
const permissionStore = usePermissionStoreWithOut()
|
||||||
if (!dictStore.getIsSetDict) {
|
if (!dictStore.getIsSetDict && to.path != '/nm-detail') {
|
||||||
await dictStore.setDictMap()
|
await dictStore.setDictMap()
|
||||||
}
|
}
|
||||||
if (!userStore.getIsSetUser) {
|
if (!userStore.getIsSetUser) {
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// path: '/dict',
|
// path: '/dict',
|
||||||
// component: Layout,
|
// component: Layout,
|
||||||
@@ -134,7 +133,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
// path: '/Basic',
|
// path: '/Basic',
|
||||||
// component: Layout,
|
// component: Layout,
|
||||||
// name: 'Basic',
|
// name: 'Basic',
|
||||||
// meta: {},
|
// meta: { title: '菜单管理' },
|
||||||
// redirect: '/Basic/menu',
|
// redirect: '/Basic/menu',
|
||||||
// children: [
|
// children: [
|
||||||
// {
|
// {
|
||||||
@@ -181,6 +180,16 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
noTagsView: true
|
noTagsView: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/nm-detail',
|
||||||
|
component: () => import('@/views/Profile/NotifyMessageDetail.vue'),
|
||||||
|
name: 'NMDetail',
|
||||||
|
meta: {
|
||||||
|
hidden: true,
|
||||||
|
title: '通知详情',
|
||||||
|
noTagsView: true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/403',
|
path: '/403',
|
||||||
component: () => import('@/views/Error/403.vue'),
|
component: () => import('@/views/Error/403.vue'),
|
||||||
|
|||||||
@@ -23,7 +23,11 @@
|
|||||||
<el-table-column prop="name" label="部门名称" />
|
<el-table-column prop="name" label="部门名称" />
|
||||||
<el-table-column prop="leader" label="负责人" width="120" />
|
<el-table-column prop="leader" label="负责人" width="120" />
|
||||||
<el-table-column prop="sort" label="排序" width="200" />
|
<el-table-column prop="sort" label="排序" width="200" />
|
||||||
<el-table-column prop="status" label="状态" width="100" />
|
<el-table-column prop="status" label="状态" width="100">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ ['启用', '禁用'][row.status] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="createTime" width="180" :formatter="dateFormatter" />
|
<el-table-column label="创建时间" prop="createTime" width="180" :formatter="dateFormatter" />
|
||||||
<el-table-column label="操作" class-name="fixed-width" width="240">
|
<el-table-column label="操作" class-name="fixed-width" width="240">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" v-loading="formLoading">
|
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" v-loading="formLoading">
|
||||||
<el-form-item label="开启通知">
|
<el-form-item label="开启通知">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio :label="1"> 开启 </el-radio>
|
<el-radio :label="0"> 开启 </el-radio>
|
||||||
<el-radio :label="0"> 关闭 </el-radio>
|
<el-radio :label="1"> 关闭 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="head-container">
|
|
||||||
<el-input v-model="deptName" class="mb-20px" clearable placeholder="请输入部门名称">
|
|
||||||
<template #prefix>
|
|
||||||
<Icon icon="ep:search" />
|
|
||||||
</template>
|
|
||||||
</el-input>
|
|
||||||
</div>
|
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-tree
|
<el-tree
|
||||||
ref="treeRef"
|
ref="treeRef"
|
||||||
@@ -26,7 +19,6 @@ import { ElTree } from 'element-plus'
|
|||||||
import * as DeptApi from '@/api/system/dept'
|
import * as DeptApi from '@/api/system/dept'
|
||||||
import { defaultProps, handleTree } from '@/utils/tree'
|
import { defaultProps, handleTree } from '@/utils/tree'
|
||||||
|
|
||||||
const deptName = ref('')
|
|
||||||
const deptList = ref<Tree[]>([]) // 树形结构
|
const deptList = ref<Tree[]>([]) // 树形结构
|
||||||
const treeRef = ref<InstanceType<typeof ElTree>>()
|
const treeRef = ref<InstanceType<typeof ElTree>>()
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,8 @@ const formData = ref({
|
|||||||
remark: '',
|
remark: '',
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
roleIds: [],
|
roleIds: [],
|
||||||
hireDate: ''
|
hireDate: '',
|
||||||
|
isNewUserConfirm: false
|
||||||
})
|
})
|
||||||
const formRules = ref<any>({
|
const formRules = ref<any>({
|
||||||
username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }],
|
username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }],
|
||||||
@@ -192,8 +193,14 @@ const submitForm = async () => {
|
|||||||
try {
|
try {
|
||||||
const data = formData.value as unknown as UserApi.UserVO
|
const data = formData.value as unknown as UserApi.UserVO
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
await UserApi.createUser(data)
|
const resp = await UserApi.createUser(data)
|
||||||
message.success(t('common.createSuccess'))
|
if (resp.code == 18888) {
|
||||||
|
await message.confirm(resp.msg)
|
||||||
|
formData.value.isNewUserConfirm = true
|
||||||
|
submitForm()
|
||||||
|
} else {
|
||||||
|
message.success(t('common.createSuccess'))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
await UserApi.updateUser(data)
|
await UserApi.updateUser(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
@@ -220,7 +227,8 @@ const resetForm = () => {
|
|||||||
remark: '',
|
remark: '',
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
roleIds: [],
|
roleIds: [],
|
||||||
hireDate: formatDate(new Date(), 'YYYY-MM-DD')
|
hireDate: formatDate(new Date(), 'YYYY-MM-DD'),
|
||||||
|
isNewUserConfirm: false
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="20" :xs="24">
|
<el-col :span="20" :xs="24">
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<el-form :model="queryParams" ref="queryFormRef" inline label-width="68px">
|
<el-form :model="queryParams" ref="queryFormRef" inline label-width="0">
|
||||||
<el-form-item label="姓名" prop="nickname">
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.nickname"
|
v-model="queryParams.nickname"
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机号码" prop="mobile">
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.mobile"
|
v-model="queryParams.mobile"
|
||||||
placeholder="请输入手机号码"
|
placeholder="请输入手机号码"
|
||||||
@@ -25,6 +25,12 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-radio-group v-model="queryParams.status" @change="handleQuery">
|
||||||
|
<el-radio :label="0"> 在职 </el-radio>
|
||||||
|
<el-radio :label="1"> 离职 </el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery" v-hasPermi="['basic:employee:search']">搜索</el-button>
|
<el-button @click="handleQuery" v-hasPermi="['basic:employee:search']">搜索</el-button>
|
||||||
<el-button @click="resetQuery" v-hasPermi="['basic:employee:reset']">重置</el-button>
|
<el-button @click="resetQuery" v-hasPermi="['basic:employee:reset']">重置</el-button>
|
||||||
@@ -44,12 +50,14 @@
|
|||||||
<el-table-column label="用户姓名" prop="nickname" />
|
<el-table-column label="用户姓名" prop="nickname" />
|
||||||
<el-table-column label="部门" key="deptName" prop="deptName" />
|
<el-table-column label="部门" key="deptName" prop="deptName" />
|
||||||
<el-table-column label="手机号码" prop="mobile" width="120" />
|
<el-table-column label="手机号码" prop="mobile" width="120" />
|
||||||
<el-table-column label="状态" key="status">
|
<el-table-column label="状态" key="status" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
:active-value="0"
|
:active-value="0"
|
||||||
:inactive-value="1"
|
:inactive-value="1"
|
||||||
|
active-text="在职"
|
||||||
|
inactive-text="离职"
|
||||||
v-hasPermi="['basic:employee:update']"
|
v-hasPermi="['basic:employee:update']"
|
||||||
@change="handleStatusChange(scope.row)"
|
@change="handleStatusChange(scope.row)"
|
||||||
/>
|
/>
|
||||||
@@ -61,7 +69,7 @@
|
|||||||
width="180"
|
width="180"
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" width="260">
|
<el-table-column label="操作" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -114,13 +122,14 @@ const { t } = useI18n() // 国际化
|
|||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
const list = ref([]) // 列表的数
|
const list = ref([]) // 列表的数
|
||||||
const queryParams = reactive({
|
const queryParams = ref({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
username: undefined,
|
username: undefined,
|
||||||
nickname: undefined,
|
nickname: undefined,
|
||||||
mobile: undefined,
|
mobile: undefined,
|
||||||
deptId: undefined
|
deptId: undefined,
|
||||||
|
status: undefined
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
||||||
@@ -128,7 +137,7 @@ const queryFormRef = ref() // 搜索的表单
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await UserApi.getUserPage(queryParams)
|
const data = await UserApi.getUserPage(queryParams.value)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
@@ -138,19 +147,28 @@ const getList = async () => {
|
|||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.pageNo = 1
|
queryParams.value.pageNo = 1
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
queryFormRef.value?.resetFields()
|
queryFormRef.value?.resetFields()
|
||||||
|
queryParams.value = {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
username: undefined,
|
||||||
|
nickname: undefined,
|
||||||
|
mobile: undefined,
|
||||||
|
deptId: undefined,
|
||||||
|
status: undefined
|
||||||
|
}
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理部门被点击 */
|
/** 处理部门被点击 */
|
||||||
const handleDeptNodeClick = async (row) => {
|
const handleDeptNodeClick = async (row) => {
|
||||||
queryParams.deptId = row.id
|
queryParams.value.deptId = row.id
|
||||||
await getList()
|
await getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,8 +104,14 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" :selectable="(row) => row.state == 1" />
|
<el-table-column type="selection" width="55" :selectable="(row) => row.state == 1" />
|
||||||
<el-table-column prop="signId" label="成交单号" min-width="150px" />
|
<el-table-column prop="signId" label="成交单号" min-width="150px" />
|
||||||
<el-table-column prop="name" label="线索名称" min-width="200px" />
|
<el-table-column prop="name" label="线索名称" min-width="150px" />
|
||||||
<el-table-column prop="phone" label="联系方式" min-width="150px" />
|
<el-table-column prop="phone" label="联系方式" min-width="120px" />
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="area"
|
||||||
|
label="区域"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
<el-table-column prop="reason" label="售后原因" min-width="150px" />
|
<el-table-column prop="reason" label="售后原因" min-width="150px" />
|
||||||
<el-table-column prop="refundAmount" label="退款金额" min-width="90px" />
|
<el-table-column prop="refundAmount" label="退款金额" min-width="90px" />
|
||||||
<el-table-column prop="percentageDeductAmount" label="提成扣款" min-width="90px" />
|
<el-table-column prop="percentageDeductAmount" label="提成扣款" min-width="90px" />
|
||||||
@@ -191,10 +197,12 @@ import DialogBatchAudit from './DialogBatchAudit.vue'
|
|||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
|
|
||||||
const afterSaleAuditDialog = ref()
|
const afterSaleAuditDialog = ref()
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
const appStore = useAppStore()
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const currentUserId = userStore.getUser.id
|
const currentUserId = userStore.getUser.id
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="24" :offset="0">
|
<el-col :span="24" :offset="0" v-if="appStore.getAppInfo?.instanceType == 2">
|
||||||
<el-form-item label="是否退货" prop="isReturns">
|
<el-form-item label="是否退货" prop="isReturns">
|
||||||
<el-radio-group v-model="form.isReturns">
|
<el-radio-group v-model="form.isReturns">
|
||||||
<el-radio :label="true"> 退货 </el-radio>
|
<el-radio :label="true"> 退货 </el-radio>
|
||||||
@@ -79,7 +79,9 @@
|
|||||||
|
|
||||||
<script setup name="DialogAfterSale">
|
<script setup name="DialogAfterSale">
|
||||||
import { getAfterSalePage, createAfterSale } from '@/api/clue/afterSale'
|
import { getAfterSalePage, createAfterSale } from '@/api/clue/afterSale'
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
|
|
||||||
|
const appStore = useAppStore()
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
|
|||||||
@@ -100,10 +100,20 @@
|
|||||||
<span v-else-if="item.form?.component == 'DatePicker'">
|
<span v-else-if="item.form?.component == 'DatePicker'">
|
||||||
{{ formatDate(row[item.field]) }}
|
{{ formatDate(row[item.field]) }}
|
||||||
</span>
|
</span>
|
||||||
|
<div v-else-if="item.form?.component == 'UploadImg'">
|
||||||
|
<el-image
|
||||||
|
v-if="row[item.field]"
|
||||||
|
:src="row[item.field]"
|
||||||
|
preview-teleported
|
||||||
|
:lazy="true"
|
||||||
|
:preview-src-list="[row[item.field]]"
|
||||||
|
/>
|
||||||
|
<!-- <img v-if="row[item.field]" :src="row[item.field]" style="width: 100%; height: 100%" /> -->
|
||||||
|
</div>
|
||||||
<span v-else>{{ row[item.field] }}</span>
|
<span v-else>{{ row[item.field] }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="240px" fixed="right">
|
<el-table-column label="操作" width="170px" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -150,6 +160,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
class="mr-10px"
|
class="mr-10px"
|
||||||
link
|
link
|
||||||
|
:disabled="scope.row.isCommissioned != '未发放'"
|
||||||
style="padding: 0; margin-left: 0"
|
style="padding: 0; margin-left: 0"
|
||||||
v-hasPermi="['clue:pool:enroll']"
|
v-hasPermi="['clue:pool:enroll']"
|
||||||
@click="cancelDeal(scope.row)"
|
@click="cancelDeal(scope.row)"
|
||||||
@@ -240,6 +251,11 @@ async function getTableList() {
|
|||||||
pageNo: tableObject.value.pageNo,
|
pageNo: tableObject.value.pageNo,
|
||||||
pageSize: tableObject.value.pageSize
|
pageSize: tableObject.value.pageSize
|
||||||
}
|
}
|
||||||
|
searchFieldList.value.map((it) => {
|
||||||
|
if (params[it.field]) {
|
||||||
|
params.diyParams[it.field] = params[it.field]
|
||||||
|
}
|
||||||
|
})
|
||||||
const data = await SignApi.getSignPage(removeNullField(params))
|
const data = await SignApi.getSignPage(removeNullField(params))
|
||||||
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams }))
|
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams }))
|
||||||
tableObject.value.total = data.total
|
tableObject.value.total = data.total
|
||||||
@@ -249,10 +265,12 @@ async function getTableList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
|
const searchFieldList = ref([])
|
||||||
async function getCurdSchemas() {
|
async function getCurdSchemas() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await getSimpleFieldList()
|
const data = await getSimpleFieldList()
|
||||||
|
searchFieldList.value = data.filter((it) => it.isCustom)
|
||||||
data.forEach((elem) => {
|
data.forEach((elem) => {
|
||||||
if (['createUser'].includes(elem.field)) {
|
if (['createUser'].includes(elem.field)) {
|
||||||
elem.search.options = userOptions.value
|
elem.search.options = userOptions.value
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.mobile" placeholder="联系方式" clearable />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="searchForm.state" placeholder="审核状态" clearable style="width: 120px">
|
<el-select v-model="searchForm.state" placeholder="审核状态" clearable style="width: 120px">
|
||||||
<el-option label="待审核" :value="1" />
|
<el-option label="待审核" :value="1" />
|
||||||
@@ -133,8 +136,8 @@
|
|||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="60" :selectable="(row) => row.state == 1" />
|
<el-table-column type="selection" width="60" :selectable="(row) => row.state == 1" />
|
||||||
<el-table-column prop="signId" label="成交单号" min-width="180px" />
|
<el-table-column prop="signId" label="成交单号" min-width="120px" />
|
||||||
<el-table-column prop="name" label="线索名称" width="150px" />
|
<el-table-column prop="name" label="线索名称" width="120px" />
|
||||||
<el-table-column prop="phone" label="联系方式" width="120px" />companyProfit
|
<el-table-column prop="phone" label="联系方式" width="120px" />companyProfit
|
||||||
<el-table-column prop="money" label="回款金额" min-width="120px">
|
<el-table-column prop="money" label="回款金额" min-width="120px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -185,7 +188,7 @@
|
|||||||
<div v-else>{{ row.personProfit }}</div>
|
<div v-else>{{ row.personProfit }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="signPrice" label="成交价" min-width="90" />
|
<el-table-column prop="signPrice" label="成交价" min-width="120" />
|
||||||
<el-table-column prop="isPayoff" label="是否结清" min-width="90">
|
<el-table-column prop="isPayoff" label="是否结清" min-width="90">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-select v-if="row.edit" size="small" v-model="row.isPayoffValue">
|
<el-select v-if="row.edit" size="small" v-model="row.isPayoffValue">
|
||||||
@@ -207,6 +210,12 @@
|
|||||||
label="转化人"
|
label="转化人"
|
||||||
min-width="90"
|
min-width="90"
|
||||||
/>
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="area"
|
||||||
|
label="区域"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="dealDate"
|
prop="dealDate"
|
||||||
@@ -244,11 +253,12 @@
|
|||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
/>
|
/>
|
||||||
<el-table-column prop="stateName" label="审核状态" fixed="right" min-width="90" />
|
<el-table-column prop="stateName" label="审核状态" fixed="right" min-width="90" />
|
||||||
<el-table-column label="操作" width="220px" fixed="right">
|
<el-table-column label="操作" width="150px" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
style="padding: 0"
|
class="mr-10px"
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
text
|
text
|
||||||
v-hasPermi="['clue:order:return-detail']"
|
v-hasPermi="['clue:order:return-detail']"
|
||||||
@click="handleDetail(row)"
|
@click="handleDetail(row)"
|
||||||
@@ -257,7 +267,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
style="padding: 0"
|
class="mr-10px"
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
text
|
text
|
||||||
v-if="row.state == 1 && currentUserId == row.applyUser"
|
v-if="row.state == 1 && currentUserId == row.applyUser"
|
||||||
v-hasPermi="['clue:order:return']"
|
v-hasPermi="['clue:order:return']"
|
||||||
@@ -267,7 +278,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
style="padding: 0"
|
class="mr-10px"
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
text
|
text
|
||||||
v-if="row.state == 1"
|
v-if="row.state == 1"
|
||||||
v-hasPermi="['clue:order:update-return-money']"
|
v-hasPermi="['clue:order:update-return-money']"
|
||||||
@@ -277,7 +289,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
style="padding: 0"
|
class="mr-10px"
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
text
|
text
|
||||||
v-if="row.state == 1"
|
v-if="row.state == 1"
|
||||||
v-hasPermi="['clue:order:return-audit']"
|
v-hasPermi="['clue:order:return-audit']"
|
||||||
@@ -312,7 +325,7 @@ import DialogBatchAudit from './DialogBatchAudit.vue'
|
|||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
import { useAppStore } from '@/store/modules/app'
|
import { useAppStore } from '@/store/modules/app'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
@@ -331,6 +344,7 @@ const searchForm = ref({
|
|||||||
applyTime: [],
|
applyTime: [],
|
||||||
applyUser: undefined,
|
applyUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
|
phone: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
})
|
})
|
||||||
@@ -358,6 +372,7 @@ function handleReset() {
|
|||||||
applyTime: [],
|
applyTime: [],
|
||||||
applyUser: undefined,
|
applyUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
|
mobile: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
}
|
}
|
||||||
@@ -454,7 +469,7 @@ async function handleUpdate(row) {
|
|||||||
companyProfit: row.companyProfit,
|
companyProfit: row.companyProfit,
|
||||||
personProfit: row.personProfit,
|
personProfit: row.personProfit,
|
||||||
isPayoff: row.isPayoffValue,
|
isPayoff: row.isPayoffValue,
|
||||||
applyTime: row.applyTime
|
applyTime: formatDate(row.applyTime)
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
message.success('修改成功')
|
message.success('修改成功')
|
||||||
|
|||||||
@@ -228,11 +228,13 @@ const followRef = ref()
|
|||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
|
|
||||||
const allSchemas = ref({})
|
const allSchemas = ref({})
|
||||||
|
const searchFieldList = ref([])
|
||||||
|
|
||||||
async function getCurdSchemas() {
|
async function getCurdSchemas() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await getSimpleFieldList()
|
const data = await getSimpleFieldList()
|
||||||
|
searchFieldList.value = data.filter((it) => it.isCustom)
|
||||||
data.forEach((elem) => {
|
data.forEach((elem) => {
|
||||||
if (['followUser', 'convertPeople'].includes(elem.field)) {
|
if (['followUser', 'convertPeople'].includes(elem.field)) {
|
||||||
elem.search.options = userOptions.value
|
elem.search.options = userOptions.value
|
||||||
@@ -290,12 +292,18 @@ async function getTableList() {
|
|||||||
getSearchCount()
|
getSearchCount()
|
||||||
try {
|
try {
|
||||||
const queryParams = await searchRef.value.getFormModel()
|
const queryParams = await searchRef.value.getFormModel()
|
||||||
const params = {
|
let params = {
|
||||||
...queryParams,
|
...queryParams,
|
||||||
pageNo: tableObject.value.pageNo,
|
pageNo: tableObject.value.pageNo,
|
||||||
pageSize: tableObject.value.pageSize,
|
pageSize: tableObject.value.pageSize,
|
||||||
queryType: queryType.value
|
queryType: queryType.value,
|
||||||
|
diyParams: {}
|
||||||
}
|
}
|
||||||
|
searchFieldList.value.map((it) => {
|
||||||
|
if (params[it.field]) {
|
||||||
|
params.diyParams[it.field] = params[it.field]
|
||||||
|
}
|
||||||
|
})
|
||||||
const data = await ClueApi.getCluePage(removeNullField(params))
|
const data = await ClueApi.getCluePage(removeNullField(params))
|
||||||
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams }))
|
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams }))
|
||||||
tableObject.value.total = data.total
|
tableObject.value.total = data.total
|
||||||
|
|||||||
35
src/views/Home/ChannelReport.vue
Normal file
35
src/views/Home/ChannelReport.vue
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-tabs v-model="tabName" type="border-card" tab-position="top">
|
||||||
|
<el-tab-pane label="月度统计" name="monthly">
|
||||||
|
<ChannelMonthly :sourceOptions="sourceOptions" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="周期统计" name="period">
|
||||||
|
<ChannelPeriod :sourceOptions="sourceOptions" />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="ChannelReport">
|
||||||
|
import ChannelMonthly from './Comp/ChannelMonthly.vue'
|
||||||
|
import ChannelPeriod from './Comp/ChannelPeriod.vue'
|
||||||
|
import { getSimpleSourceList } from '@/api/clue/source'
|
||||||
|
import { handleTree } from '@/utils/tree'
|
||||||
|
|
||||||
|
const tabName = ref('monthly')
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getOptions()
|
||||||
|
})
|
||||||
|
|
||||||
|
const sourceOptions = ref([])
|
||||||
|
|
||||||
|
function getOptions() {
|
||||||
|
getSimpleSourceList().then((data) => {
|
||||||
|
sourceOptions.value = handleTree(data, 'sourceId')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -1,7 +1,114 @@
|
|||||||
<template>
|
<template>
|
||||||
<div> 成交率 </div>
|
<div>
|
||||||
|
<ContentWrap>
|
||||||
|
<el-form :model="searchForm" label-width="0" inline>
|
||||||
|
<el-form-item>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.year"
|
||||||
|
type="year"
|
||||||
|
format="YYYY"
|
||||||
|
value-format="YYYY"
|
||||||
|
placeholder="选择年"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.nickname" placeholder="销售姓名" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleSearch">查询</el-button>
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="tableList" border stripe>
|
||||||
|
<el-table-column type="index" width="50" fixed="left" />
|
||||||
|
<el-table-column prop="nickname" label="姓名" width="80" />
|
||||||
|
<el-table-column
|
||||||
|
v-for="(item, index) in new Date().getMonth() + 1"
|
||||||
|
:key="index"
|
||||||
|
:label="item + '月'"
|
||||||
|
sortable
|
||||||
|
min-width="150"
|
||||||
|
:sort-method="(pre, cur) => monthSort(pre, cur, index)"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span>{{ (row.monthClueSignRateReportList[index].rate * 100).toFixed(2) }}%</span>
|
||||||
|
<span>({{ row.monthClueSignRateReportList[index].clueSignNum }}/</span>
|
||||||
|
<span>{{ row.monthClueSignRateReportList[index].followClueNum }})</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="总成交率"
|
||||||
|
prop="totalRate"
|
||||||
|
min-width="150"
|
||||||
|
fixed="right"
|
||||||
|
sortable
|
||||||
|
:sort-method="totalSort"
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
</ContentWrap>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="CloseRate"></script>
|
<script setup name="CloseRate">
|
||||||
|
import * as reportApi from '@/api/home/reportSignRate'
|
||||||
|
import { removeNullField } from '@/utils'
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
handleReset()
|
||||||
|
handleSearch()
|
||||||
|
})
|
||||||
|
|
||||||
|
const searchForm = ref({})
|
||||||
|
|
||||||
|
function handleReset() {
|
||||||
|
searchForm.value = {
|
||||||
|
nickname: undefined,
|
||||||
|
year: new Date().getFullYear() + ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const tableList = ref([])
|
||||||
|
async function handleSearch() {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await reportApi.getList(removeNullField(searchForm.value))
|
||||||
|
tableList.value = data.map((item) => {
|
||||||
|
const count = item.monthClueSignRateReportList.reduce(
|
||||||
|
(pre, cur) => {
|
||||||
|
return {
|
||||||
|
signCount: pre.signCount + cur.clueSignNum,
|
||||||
|
clueCount: pre.clueCount + cur.followClueNum
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ signCount: 0, clueCount: 0 }
|
||||||
|
)
|
||||||
|
const rate = count.clueCount > 0 ? ((count.signCount * 100) / count.clueCount).toFixed(2) : 0
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
totalRate: `${rate}%(${count.signCount}/${count.clueCount})`,
|
||||||
|
totalRateNum: rate
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function totalSort(pre, cur) {
|
||||||
|
return Number(pre.totalRateNum) - Number(cur.totalRateNum)
|
||||||
|
}
|
||||||
|
|
||||||
|
function monthSort(pre, cur, idx) {
|
||||||
|
console.log(idx)
|
||||||
|
|
||||||
|
return (
|
||||||
|
Number(pre.monthClueSignRateReportList[idx].rate) -
|
||||||
|
Number(cur.monthClueSignRateReportList[idx].rate)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
147
src/views/Home/Comp/ChannelMonthly.vue
Normal file
147
src/views/Home/Comp/ChannelMonthly.vue
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
<template>
|
||||||
|
<ContentWrap>
|
||||||
|
<el-form :model="searchForm" label-width="0" inline>
|
||||||
|
<el-form-item>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.period"
|
||||||
|
type="month"
|
||||||
|
format="YYYY-MM"
|
||||||
|
value-format="YYYY-MM"
|
||||||
|
placeholder="选择年月"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-tree-select
|
||||||
|
v-model="searchForm.sourceId"
|
||||||
|
:data="props.sourceOptions"
|
||||||
|
:props="defaultProps"
|
||||||
|
check-strictly
|
||||||
|
node-key="sourceId"
|
||||||
|
placeholder="请选择渠道"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleSearch">查询</el-button>
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableList"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
:summary-method="getSummaries"
|
||||||
|
show-summary
|
||||||
|
>
|
||||||
|
<el-table-column prop="sourceName" label="渠道名称" />
|
||||||
|
<el-table-column prop="newClueSignNum" label="新线索当月成交数" sortable>
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="当月咨询且当月成交的线索数" /> <span>新线索当月成交数</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="newClueNum" label="新线索总数" sortable>
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="当月咨询的线索数" /> <span>新线索总数</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="rate" label="新线索当月成交率" sortable :formatter="parseRate" />
|
||||||
|
<el-table-column prop="reallyClueSignNum" sortable>
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="成交日期在本月的线索数" /> <span>当月总成交数</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</ContentWrap>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="ChannelMonthly">
|
||||||
|
import * as reportApi from '@/api/home/reportChannel'
|
||||||
|
import { removeNullField } from '@/utils'
|
||||||
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
sourceOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const defaultProps = {
|
||||||
|
children: 'children',
|
||||||
|
label: 'sourceName',
|
||||||
|
value: 'sourceId',
|
||||||
|
isLeaf: 'leaf'
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getOptions()
|
||||||
|
handleReset()
|
||||||
|
handleSearch()
|
||||||
|
})
|
||||||
|
|
||||||
|
const searchForm = ref({})
|
||||||
|
|
||||||
|
function handleReset() {
|
||||||
|
searchForm.value = {
|
||||||
|
sourceId: undefined,
|
||||||
|
period: formatDate(new Date(), 'YYYY-MM')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOptions() {}
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const tableList = ref([])
|
||||||
|
async function handleSearch() {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await reportApi.getList(removeNullField(searchForm.value))
|
||||||
|
tableList.value = data
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseRate(row) {
|
||||||
|
return Number(row.rate * 100).toFixed(2) + '%'
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSummaries({ columns, data }) {
|
||||||
|
let sums = []
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index == 0) {
|
||||||
|
sums[index] = '合计'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const values = data.map((item) => Number(item[column.property]))
|
||||||
|
if (!values.every((value) => Number.isNaN(value))) {
|
||||||
|
if (column.property == 'rate') {
|
||||||
|
const sum = data.reduce(
|
||||||
|
(pre, cur) => ({
|
||||||
|
clueNum: pre.clueNum + cur.newClueNum,
|
||||||
|
signNum: pre.signNum + cur.newClueSignNum
|
||||||
|
}),
|
||||||
|
{ clueNum: 0, signNum: 0 }
|
||||||
|
)
|
||||||
|
sums[index] = sum.clueNum > 0 ? ((sum.signNum * 100) / sum.clueNum).toFixed(2) + '%' : 0
|
||||||
|
} else {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr)
|
||||||
|
if (!Number.isNaN(value)) {
|
||||||
|
return prev + curr
|
||||||
|
} else {
|
||||||
|
return prev
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sums[index] = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return sums
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
169
src/views/Home/Comp/ChannelPeriod.vue
Normal file
169
src/views/Home/Comp/ChannelPeriod.vue
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
<template>
|
||||||
|
<ContentWrap>
|
||||||
|
<el-form ref="searchRef" :model="searchForm" :rules="searchRules" label-width="100px" inline>
|
||||||
|
<el-form-item label="咨询日期" prop="consultDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.consultDate"
|
||||||
|
type="daterange"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
start-placeholder="选择日期"
|
||||||
|
end-placeholder="选择日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成交周期" prop="periodNumber">
|
||||||
|
<el-input-number
|
||||||
|
v-model="searchForm.periodNumber"
|
||||||
|
:min="1"
|
||||||
|
:controls="false"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="渠道来源" prop="sourceId">
|
||||||
|
<el-tree-select
|
||||||
|
v-model="searchForm.sourceId"
|
||||||
|
:data="props.sourceOptions"
|
||||||
|
:props="defaultProps"
|
||||||
|
check-strictly
|
||||||
|
node-key="sourceId"
|
||||||
|
placeholder="请选择渠道"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleSearch">查询</el-button>
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableList"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
:summary-method="getSummaries"
|
||||||
|
show-summary
|
||||||
|
>
|
||||||
|
<el-table-column prop="sourceName" label="渠道名称" />
|
||||||
|
<el-table-column prop="newClueSignNum" label="新线索成交数" sortable>
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="咨询日期在查询范围内,且在所查成交周期内成交的线索数" />
|
||||||
|
<span>新线索成交数</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="newClueNum" label="新线索总数" sortable>
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="咨询日期在查询范围内,咨询的线索数" /> <span>新线索总数</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="rate" label="新线索成交率" sortable :formatter="parseRate" />
|
||||||
|
</el-table>
|
||||||
|
</ContentWrap>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="ChannelPeriod">
|
||||||
|
import { getPeriodList } from '@/api/home/reportChannel'
|
||||||
|
import { removeNullField } from '@/utils'
|
||||||
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
sourceOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const defaultProps = {
|
||||||
|
children: 'children',
|
||||||
|
label: 'sourceName',
|
||||||
|
value: 'sourceId',
|
||||||
|
isLeaf: 'leaf'
|
||||||
|
}
|
||||||
|
|
||||||
|
const searchRef = ref()
|
||||||
|
|
||||||
|
const searchRules = {
|
||||||
|
// consultDate: { required: true, type: 'array', message: '请选择咨询日期', trigger: 'change,blur' },
|
||||||
|
periodNumber: { required: true, message: '请输入成交周期', trigger: 'blur' }
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getOptions()
|
||||||
|
handleReset()
|
||||||
|
handleSearch()
|
||||||
|
})
|
||||||
|
|
||||||
|
const searchForm = ref({})
|
||||||
|
|
||||||
|
function handleReset() {
|
||||||
|
const date = new Date()
|
||||||
|
date.setDate(1)
|
||||||
|
searchForm.value = {
|
||||||
|
sourceId: undefined,
|
||||||
|
periodNumber: 30,
|
||||||
|
consultDate: [formatDate(date), formatDate(new Date())]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOptions() {}
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const tableList = ref([])
|
||||||
|
async function handleSearch() {
|
||||||
|
try {
|
||||||
|
const valid = await searchRef.value.validate()
|
||||||
|
if (!valid) return
|
||||||
|
loading.value = true
|
||||||
|
const params = { ...searchForm.value }
|
||||||
|
if (params.consultDate && params.consultDate.length) {
|
||||||
|
params.startDateTime = params.consultDate[0]
|
||||||
|
params.endDateTime = params.consultDate[1]
|
||||||
|
}
|
||||||
|
const data = await getPeriodList(removeNullField(params))
|
||||||
|
tableList.value = data
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseRate(row) {
|
||||||
|
return Number(row.rate * 100).toFixed(2) + '%'
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSummaries({ columns, data }) {
|
||||||
|
let sums = []
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index == 0) {
|
||||||
|
sums[index] = '合计'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const values = data.map((item) => Number(item[column.property]))
|
||||||
|
if (!values.every((value) => Number.isNaN(value))) {
|
||||||
|
if (column.property == 'rate') {
|
||||||
|
const sum = data.reduce(
|
||||||
|
(pre, cur) => ({
|
||||||
|
clueNum: pre.clueNum + cur.newClueNum,
|
||||||
|
signNum: pre.signNum + cur.newClueSignNum
|
||||||
|
}),
|
||||||
|
{ clueNum: 0, signNum: 0 }
|
||||||
|
)
|
||||||
|
sums[index] = sum.clueNum > 0 ? ((sum.signNum * 100) / sum.clueNum).toFixed(2) + '%' : 0
|
||||||
|
} else {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr)
|
||||||
|
if (!Number.isNaN(value)) {
|
||||||
|
return prev + curr
|
||||||
|
} else {
|
||||||
|
return prev
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sums[index] = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return sums
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
149
src/views/Home/Comp/SignListCard.vue
Normal file
149
src/views/Home/Comp/SignListCard.vue
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
<template>
|
||||||
|
<ContentWrap>
|
||||||
|
<el-form :model="searchForm" label-width="0" inline>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select v-model="searchForm.detailType" :clearable="false" filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in detailTypeOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="searchForm.detailType == 1">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.month"
|
||||||
|
type="month"
|
||||||
|
format="YYYY-MM"
|
||||||
|
value-format="YYYY-MM"
|
||||||
|
placeholder="选择年月"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="[2, 3].includes(searchForm.detailType)">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.year"
|
||||||
|
type="year"
|
||||||
|
format="YYYY"
|
||||||
|
value-format="YYYY"
|
||||||
|
placeholder="选择年"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleSearch">查询</el-button>
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table :data="tableList" border stripe show-summary :summary-method="getSummaries">
|
||||||
|
<el-table-column label="周期" prop="period" width="110px" />
|
||||||
|
<el-table-column prop="signNumber" label="成交数" />
|
||||||
|
<el-table-column prop="signPrice" label="成交额" />
|
||||||
|
<el-table-column
|
||||||
|
prop="signPriceSequentialGrowth"
|
||||||
|
label="成交额环比增长"
|
||||||
|
:formatter="parseRate"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="signPriceSamePeriodCompareGrowth"
|
||||||
|
label="成交额同比增长"
|
||||||
|
:formatter="parseRate"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="profit" label="利润" />
|
||||||
|
<el-table-column prop="profitSequentialGrowth" label="利润环比增长" :formatter="parseRate" />
|
||||||
|
<el-table-column
|
||||||
|
prop="profitSamePeriodCompareGrowth"
|
||||||
|
label="利润同比增长"
|
||||||
|
:formatter="parseRate"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="notReceivedMoney" label="未到账金额" />
|
||||||
|
<el-table-column prop="receivedMoney" label="已到账金额" />
|
||||||
|
<el-table-column prop="waitSettleMoney" label="待结算金额" />
|
||||||
|
<el-table-column prop="settledMoney" label="已结算金额" />
|
||||||
|
<el-table-column prop="refundAmount" label="已退款金额" />
|
||||||
|
<el-table-column prop="remainMoney" label="结余" />
|
||||||
|
</el-table>
|
||||||
|
</ContentWrap>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="SignListCard">
|
||||||
|
import { getList } from '@/api/home/reportSignDetail'
|
||||||
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
import { removeNullField } from '@/utils'
|
||||||
|
|
||||||
|
const detailTypeOptions = [
|
||||||
|
{ label: '日明细', value: 1 },
|
||||||
|
{ label: '月明细', value: 2 },
|
||||||
|
{ label: '季明细', value: 3 },
|
||||||
|
{ label: '年明细', value: 4 }
|
||||||
|
]
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
handleReset()
|
||||||
|
handleSearch()
|
||||||
|
})
|
||||||
|
|
||||||
|
const searchForm = ref({})
|
||||||
|
|
||||||
|
function handleReset() {
|
||||||
|
searchForm.value = {
|
||||||
|
detailType: 2,
|
||||||
|
month: formatDate(new Date(), 'YYYY-MM'),
|
||||||
|
year: new Date().getFullYear() + ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const loading = ref(false)
|
||||||
|
const tableList = ref([])
|
||||||
|
async function handleSearch() {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
let params = { detailType: searchForm.value.detailType }
|
||||||
|
if (params.detailType == 1) {
|
||||||
|
const d = new Date(searchForm.value.month)
|
||||||
|
params.month = d.getMonth() + 1
|
||||||
|
params.year = d.getFullYear()
|
||||||
|
} else if ([2, 3].includes(params.detailType)) {
|
||||||
|
params.year = searchForm.value.year
|
||||||
|
}
|
||||||
|
const data = await getList(removeNullField(params))
|
||||||
|
tableList.value = data
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseRate(row, column) {
|
||||||
|
return Number(row[column.property] * 100).toFixed(2) + '%'
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSummaries({ columns, data }) {
|
||||||
|
let sums = []
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index == 0) {
|
||||||
|
sums[index] = '合计'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const values = data.map((item) => Number(item[column.property]))
|
||||||
|
if (!values.every((value) => Number.isNaN(value))) {
|
||||||
|
if (column.property.includes('Growth')) {
|
||||||
|
sums[index] = ''
|
||||||
|
} else {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr)
|
||||||
|
if (!Number.isNaN(value)) {
|
||||||
|
return prev + curr
|
||||||
|
} else {
|
||||||
|
return prev
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sums[index] = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return sums
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
195
src/views/Home/Comp/SignTotalCard.vue
Normal file
195
src/views/Home/Comp/SignTotalCard.vue
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
<template>
|
||||||
|
<ContentWrap>
|
||||||
|
<div class="flex items-center">
|
||||||
|
<span class="mr-20px">成交概况</span>
|
||||||
|
<el-dropdown>
|
||||||
|
<el-button size="small"
|
||||||
|
>{{ periodTypeOptions[periodType] }} <Icon icon="ep:arrow-down"
|
||||||
|
/></el-button>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-for="(item, index) in periodTypeOptions"
|
||||||
|
:key="index"
|
||||||
|
@click="handleSearchTotalInfo(index)"
|
||||||
|
>
|
||||||
|
{{ item }}
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
|
<el-row :gutter="20" v-loading="infoLoading">
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<div class="statistic-card">
|
||||||
|
<el-statistic :value="totalData.signNumber" title="成交数" />
|
||||||
|
<div
|
||||||
|
class="statistic-footer"
|
||||||
|
:class="periodType != 4 ? 'justify-between' : 'justify-center'"
|
||||||
|
>
|
||||||
|
<div class="footer-item">
|
||||||
|
<span>环比</span>
|
||||||
|
<span :class="getColor(totalData.signNumberSequentialGrowth)">
|
||||||
|
{{ totalData.signNumberSequentialGrowth }}%
|
||||||
|
<Icon class="ml-2px" :icon="getIcon(totalData.signNumberSequentialGrowth)" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="footer-item" v-if="periodType != 4">
|
||||||
|
<span>同比</span>
|
||||||
|
<span :class="getColor(totalData.signNumberPeriodCompareGrowth)">
|
||||||
|
{{ totalData.signNumberPeriodCompareGrowth }}%
|
||||||
|
<Icon class="ml-2px" :icon="getIcon(totalData.signNumberPeriodCompareGrowth)" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<div class="statistic-card">
|
||||||
|
<el-statistic :value="totalData.signPrice" title="成交额" :precision="2" />
|
||||||
|
<div
|
||||||
|
class="statistic-footer"
|
||||||
|
:class="periodType != 4 ? 'justify-between' : 'justify-center'"
|
||||||
|
>
|
||||||
|
<div class="footer-item">
|
||||||
|
<span>环比</span>
|
||||||
|
<span :class="getColor(totalData.signPriceSequentialGrowth)">
|
||||||
|
{{ totalData.signPriceSequentialGrowth }}%
|
||||||
|
<Icon class="ml-2px" :icon="getIcon(totalData.signPriceSequentialGrowth)" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="footer-item" v-if="periodType != 4">
|
||||||
|
<span>同比</span>
|
||||||
|
<span :class="getColor(totalData.signPriceSamePeriodCompareGrowth)">
|
||||||
|
{{ totalData.signPriceSamePeriodCompareGrowth }}%
|
||||||
|
<Icon class="ml-2px" :icon="getIcon(totalData.signPriceSamePeriodCompareGrowth)" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<div class="statistic-card">
|
||||||
|
<el-statistic :value="totalData.profit" title="利润" :precision="2" />
|
||||||
|
<div
|
||||||
|
class="statistic-footer"
|
||||||
|
:class="periodType != 4 ? 'justify-between' : 'justify-center'"
|
||||||
|
>
|
||||||
|
<div class="footer-item">
|
||||||
|
<span>环比</span>
|
||||||
|
<span :class="getColor(totalData.profitSequentialGrowth)">
|
||||||
|
{{ totalData.profitSequentialGrowth }}%
|
||||||
|
<Icon class="ml-2px" :icon="getIcon(totalData.profitSequentialGrowth)" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="footer-item" v-if="periodType != 4">
|
||||||
|
<span>同比</span>
|
||||||
|
<span :class="getColor(totalData.profitSamePeriodCompareGrowth)">
|
||||||
|
{{ totalData.profitSamePeriodCompareGrowth }}%
|
||||||
|
<Icon class="ml-2px" :icon="getIcon(totalData.profitSamePeriodCompareGrowth)" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</ContentWrap>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="SignTotalCard">
|
||||||
|
import { getInfo } from '@/api/home/reportSignDetail'
|
||||||
|
|
||||||
|
const periodTypeOptions = ['本日', '本周', '本月', '本季', '本年']
|
||||||
|
|
||||||
|
const periodType = ref(2)
|
||||||
|
const totalData = ref({})
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
handleSearchTotalInfo(2)
|
||||||
|
})
|
||||||
|
|
||||||
|
const infoLoading = ref(false)
|
||||||
|
async function handleSearchTotalInfo(index) {
|
||||||
|
periodType.value = index
|
||||||
|
infoLoading.value = true
|
||||||
|
try {
|
||||||
|
const data = await getInfo({ periodType: periodType.value + 1 })
|
||||||
|
totalData.value = data
|
||||||
|
} finally {
|
||||||
|
infoLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getIcon(val) {
|
||||||
|
if (val > 0) {
|
||||||
|
return 'ep:caret-top'
|
||||||
|
} else if (val < 0) {
|
||||||
|
return 'ep:caret-bottom'
|
||||||
|
} else {
|
||||||
|
return 'ep:minus'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getColor(val) {
|
||||||
|
if (val > 0) {
|
||||||
|
return 'green'
|
||||||
|
} else if (val < 0) {
|
||||||
|
return 'red'
|
||||||
|
} else {
|
||||||
|
return 'gley'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-col {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
:global(h2#card-usage ~ .example .example-showcase) {
|
||||||
|
background-color: var(--el-fill-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-statistic {
|
||||||
|
--el-statistic-content-font-size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statistic-card {
|
||||||
|
height: 100%;
|
||||||
|
// padding: 20px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: var(--el-bg-color-overlay);
|
||||||
|
}
|
||||||
|
|
||||||
|
.statistic-footer {
|
||||||
|
margin: 16px auto 0;
|
||||||
|
display: flex;
|
||||||
|
// justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--el-text-color-regular);
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statistic-footer .footer-item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statistic-footer .footer-item span:last-child {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.green {
|
||||||
|
color: var(--el-color-success);
|
||||||
|
}
|
||||||
|
.gley {
|
||||||
|
color: var(--el-color-info);
|
||||||
|
}
|
||||||
|
.red {
|
||||||
|
color: var(--el-color-error);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -67,8 +67,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="mt-10px flex">
|
<div class="mt-10px flex" style="flex-wrap: wrap">
|
||||||
<el-card shadow="never" class="flex-1">
|
<el-card shadow="never" :class="mobile ? 'w-full mb-10px' : 'flex-1'">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<span>成交率</span>
|
<span>成交率</span>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never" class="ml-10px">
|
<el-card shadow="never" :class="mobile ? 'flex-1' : 'ml-10px'">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
<span>跟进榜Top10</span>
|
<span>跟进榜Top10</span>
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never" class="ml-10px">
|
<el-card shadow="never" :class="mobile ? 'flex-1 ml-10px' : 'ml-10px'">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex justify-between"> 本月成交榜Top10 </div>
|
<div class="flex justify-between"> 本月成交榜Top10 </div>
|
||||||
</template>
|
</template>
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<el-table-column type="index" />
|
<el-table-column type="index" />
|
||||||
<el-table-column prop="username" label="姓名" width="100" />
|
<el-table-column prop="username" label="姓名" width="100" />
|
||||||
<el-table-column prop="followNum" label="成交数量" width="70" />
|
<el-table-column prop="followNum" label="成交数量" width="70" />
|
||||||
<el-table-column prop="deptName" label="所属组织" />
|
<el-table-column prop="deptName" label="所属组织" width="150" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -142,12 +142,15 @@ import { useUserStore } from '@/store/modules/user'
|
|||||||
import avatarImg from '@/assets/imgs/avatar.gif'
|
import avatarImg from '@/assets/imgs/avatar.gif'
|
||||||
import { lineOptions } from './echarts-data'
|
import { lineOptions } from './echarts-data'
|
||||||
import * as HomeApi from '@/api/home/index'
|
import * as HomeApi from '@/api/home/index'
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
const appStore = useAppStore()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const avatar = userStore.getUser.avatar ? userStore.getUser.avatar : avatarImg
|
const avatar = userStore.getUser.avatar ? userStore.getUser.avatar : avatarImg
|
||||||
const username = userStore.getUser.nickname
|
const username = userStore.getUser.nickname
|
||||||
|
const mobile = appStore.getMobile
|
||||||
|
|
||||||
const followDate = ref(1)
|
const followDate = ref(1)
|
||||||
|
|
||||||
|
|||||||
13
src/views/Home/SignReport.vue
Normal file
13
src/views/Home/SignReport.vue
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<SignTotalCard />
|
||||||
|
<SignListCard />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="SignReport">
|
||||||
|
import SignTotalCard from './Comp/SignTotalCard.vue'
|
||||||
|
import SignListCard from './Comp/SignListCard.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div> </div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup></script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
@@ -9,12 +9,17 @@
|
|||||||
<el-input v-model="form.password" placeholder="请输入密码" show-password type="password" />
|
<el-input v-model="form.password" placeholder="请输入密码" show-password type="password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button type="primary" class="w-full" @click="onSubmit">授权登陆</el-button>
|
<el-button type="primary" :disabled="formLoading" class="w-full" @click="onSubmit">
|
||||||
<div v-if="form.code">code: {{ form.code }}</div>
|
授权登陆
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="MPLogin">
|
<script setup name="MPLogin">
|
||||||
|
import { bindWx } from '@/api/login'
|
||||||
|
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
code: undefined,
|
code: undefined,
|
||||||
username: undefined,
|
username: undefined,
|
||||||
@@ -38,13 +43,29 @@ const params = ref({
|
|||||||
scope: 'snsapi_base' // snsapi_base 静默授权获取 open id ;snsapi_userinfo 需要用户授权,获取详细信息
|
scope: 'snsapi_base' // snsapi_base 静默授权获取 open id ;snsapi_userinfo 需要用户授权,获取详细信息
|
||||||
// state:'code', // a-zA-Z0-9的参数值,最多128字节
|
// state:'code', // a-zA-Z0-9的参数值,最多128字节
|
||||||
})
|
})
|
||||||
function onSubmit() {
|
|
||||||
|
const formLoading = ref(false)
|
||||||
|
async function onSubmit() {
|
||||||
// 这些需要判断没有 code 情况拉起授权登陆,有就结束放在重复拉起授权登陆
|
// 这些需要判断没有 code 情况拉起授权登陆,有就结束放在重复拉起授权登陆
|
||||||
if (!form.value.code) {
|
if (!form.value.code) {
|
||||||
const access_url = WX_AUTH_URL + `${new URLSearchParams(params.value)}` + REDIRECT
|
const access_url = WX_AUTH_URL + `${new URLSearchParams(params.value)}` + REDIRECT
|
||||||
location.href = access_url
|
location.href = access_url
|
||||||
} else {
|
} else {
|
||||||
alert(`授权成功!`)
|
// 校验表单
|
||||||
|
if (!formRef.value) return
|
||||||
|
const valid = await formRef.value.validate()
|
||||||
|
if (!valid) return
|
||||||
|
// 提交请求
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
await bindWx(form.value)
|
||||||
|
message.success('绑定成功')
|
||||||
|
window.close()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
@row-dblclick="handleDetail"
|
@row-dblclick="handleDetail"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" :selectable="selectable" reserve-selection width="60px" />
|
<el-table-column type="selection" :selectable="selectable" reserve-selection width="60px" />
|
||||||
<el-table-column label="类型" align="left" prop="messageType" width="200px" />
|
<el-table-column label="类型" align="left" prop="messageTypeName" width="200px" />
|
||||||
<el-table-column label="标题" align="left" prop="title" />
|
<el-table-column label="标题" align="left" prop="title" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="时间"
|
label="时间"
|
||||||
@@ -80,6 +80,8 @@ import * as NotifyMessageApi from '@/api/system/notify/message'
|
|||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
import { getGeneralSysDictData } from '@/api/system/dict/dict.data'
|
import { getGeneralSysDictData } from '@/api/system/dict/dict.data'
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const message = useMessage() // 消息
|
const message = useMessage() // 消息
|
||||||
|
|
||||||
@@ -98,7 +100,10 @@ const queryFormRef = ref() // 搜索的表单
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await NotifyMessageApi.getNotifyMessagePage(queryParams)
|
const data = await NotifyMessageApi.getMyNotifyMessagePage({
|
||||||
|
...queryParams,
|
||||||
|
roleId: userStore.getUser?.currentRole
|
||||||
|
})
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
@@ -117,15 +122,28 @@ const handleQuery = () => {
|
|||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDetail(row: any) {
|
async function handleDetail(row: any) {
|
||||||
if (!row.readStatus) {
|
if (!row.readStatus) {
|
||||||
handleReadOne(row.id)
|
await handleReadOne(row.id)
|
||||||
}
|
}
|
||||||
|
const url = router.resolve({
|
||||||
|
path: '/nm-detail',
|
||||||
|
query: { id: row.id }
|
||||||
|
})
|
||||||
|
window.open(url.href, '_blank')
|
||||||
}
|
}
|
||||||
|
|
||||||
const tableRef = ref() // 表格的 Ref
|
const tableRef = ref() // 表格的 Ref
|
||||||
const selectedIds = ref<number[]>([]) // 表格的选中 ID 数组
|
const selectedIds = ref<number[]>([]) // 表格的选中 ID 数组
|
||||||
|
|
||||||
|
/** 标记一条站内信已读 */
|
||||||
|
const handleReadOne = async (id: number) => {
|
||||||
|
await NotifyMessageApi.updateNotifyMessageRead({
|
||||||
|
ids: [id]
|
||||||
|
})
|
||||||
|
await getList()
|
||||||
|
}
|
||||||
|
|
||||||
/** 标记全部站内信已读 **/
|
/** 标记全部站内信已读 **/
|
||||||
const handleUpdateAll = async () => {
|
const handleUpdateAll = async () => {
|
||||||
await NotifyMessageApi.updateAllNotifyMessageRead({
|
await NotifyMessageApi.updateAllNotifyMessageRead({
|
||||||
@@ -150,15 +168,6 @@ const handleUpdateList = async () => {
|
|||||||
await getList()
|
await getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 标记一条站内信已读 */
|
|
||||||
const handleReadOne = async (id: number) => {
|
|
||||||
await NotifyMessageApi.updateNotifyMessageRead({
|
|
||||||
ids: [id],
|
|
||||||
roleId: userStore.getUser?.currentRole
|
|
||||||
})
|
|
||||||
await getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 当表格选择项发生变化时会触发该事件 */
|
/** 当表格选择项发生变化时会触发该事件 */
|
||||||
const handleSelectionChange = (array: NotifyMessageApi.NotifyMessageVO[]) => {
|
const handleSelectionChange = (array: NotifyMessageApi.NotifyMessageVO[]) => {
|
||||||
selectedIds.value = []
|
selectedIds.value = []
|
||||||
|
|||||||
91
src/views/Profile/NotifyMessageDetail.vue
Normal file
91
src/views/Profile/NotifyMessageDetail.vue
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: riverQiu
|
||||||
|
* @Date: 2024-09-11 18:42:37
|
||||||
|
* @LastEditors: riverQiu
|
||||||
|
* @LastEditTime: 2024-09-11 19:03:23
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<ContentWrap style="max-width: 1000px; margin: 0 auto; overflow-x: auto">
|
||||||
|
<div class="text-center">
|
||||||
|
<div class="mb-10px" style="font-size: 24px; letter-spacing: 2px">
|
||||||
|
{{ info.title }}
|
||||||
|
</div>
|
||||||
|
<el-text>
|
||||||
|
{{ formatDate(info.createTime, 'YYYY-MM-DD hh:mm:ss') }}
|
||||||
|
</el-text>
|
||||||
|
</div>
|
||||||
|
<el-divider direction="horizontal" />
|
||||||
|
|
||||||
|
<div v-dompurify-html="info.content"></div>
|
||||||
|
</ContentWrap>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="NMDetail">
|
||||||
|
import { getNotifyMessageDetail, updateNotifyMessageRead } from '@/api/system/notify/message'
|
||||||
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const info = ref({})
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
getNotifyMessageDetail(route.query.id).then((data) => {
|
||||||
|
info.value = data
|
||||||
|
if (!data.readStatus) {
|
||||||
|
handleReadOne(data.id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 标记一条站内信已读 */
|
||||||
|
const handleReadOne = async (id) => {
|
||||||
|
await updateNotifyMessageRead({
|
||||||
|
ids: [id]
|
||||||
|
// roleId: userStore.getUser?.currentRole
|
||||||
|
})
|
||||||
|
await getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
init()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.container {
|
||||||
|
padding: 20px;
|
||||||
|
max-height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
:deep(p) {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
:deep(table) {
|
||||||
|
margin-top: 10px;
|
||||||
|
border-collapse: separate;
|
||||||
|
text-indent: initial;
|
||||||
|
border-spacing: 1px;
|
||||||
|
text-align: left;
|
||||||
|
border-width: 1px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
:deep(th) {
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: left;
|
||||||
|
border-width: 1px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
:deep(td) {
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: left;
|
||||||
|
border-width: 1px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
min-width: 44px;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
:deep(.el-card__body) {
|
||||||
|
padding: 20px 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user