Compare commits
81 Commits
dev-cjl
...
f7e81fad0e
| Author | SHA1 | Date | |
|---|---|---|---|
| f7e81fad0e | |||
|
|
df3a4b9f46 | ||
|
|
fc22c16cb1 | ||
| c6b6602181 | |||
|
|
9b7543f65f | ||
| f2cea1585d | |||
|
|
1d1f1762f8 | ||
| 32bda88a41 | |||
|
|
ffc7691b47 | ||
|
|
c01fea9c5b | ||
|
|
beb12193b3 | ||
|
|
b09ba1547c | ||
|
|
72341a96a5 | ||
| 6d866b7e7c | |||
|
|
9cdfa01d33 | ||
|
|
af84640a4b | ||
|
|
15179707d9 | ||
|
|
fe4270178f | ||
| bbecf28819 | |||
|
|
cd22e26589 | ||
| 5740ca00d1 | |||
| 206315c642 | |||
|
|
b475af8dd3 | ||
|
|
3022106428 | ||
|
|
d4641eacb5 | ||
|
|
d3b4a360dd | ||
| b9a3424d98 | |||
|
|
91a509d49d | ||
|
|
7e771a89e4 | ||
|
|
24e540f151 | ||
| 16cb210988 | |||
|
|
0ef7703f7d | ||
| bc3c4f2ebc | |||
|
|
fa39fd8492 | ||
|
|
b8bc124162 | ||
|
|
e1036fd2c3 | ||
|
|
014bb14170 | ||
| 6ba54c8bcd | |||
|
|
eaaceb9595 | ||
| acccadd43a | |||
|
|
1ab365efae | ||
| 0f04d7e80c | |||
|
|
f74ed7e62d | ||
| 02af7babc4 | |||
|
|
8fc9dd449b | ||
| 505139cfe2 | |||
|
|
9c7ba2fb87 | ||
| 6246d46d53 | |||
|
|
2406bcb8e4 | ||
|
|
41c20623d4 | ||
|
|
a8ea0e4b26 | ||
| 98a5d374a4 | |||
|
|
8de29b754a | ||
|
|
5f63709c2f | ||
| dd049320f6 | |||
|
|
a89bd1b59c | ||
| 696e96a0c0 | |||
|
|
4daf01a21b | ||
|
|
83d04e7333 | ||
| ee770b9e60 | |||
| a81d21dd3b | |||
| 6908183a36 | |||
| af9bcb7024 | |||
| 5c6c3df4d0 | |||
| acdcc670de | |||
| 9472c5ea56 | |||
| 4f150b0912 | |||
| f76d6dce66 | |||
| dd4bdb0786 | |||
| 477a279867 | |||
| c87637cc78 | |||
| a544840679 | |||
| 247c6ed4a0 | |||
| 769c901954 | |||
| 18bfc7d353 | |||
| fb6b341242 | |||
| fea69da8ed | |||
| 125f6f28ad | |||
| 39cddaa8e0 | |||
| ffd15e2433 | |||
| 2bebd0480e |
@@ -4,8 +4,8 @@ VITE_NODE_ENV=development
|
|||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
# VITE_BASE_URL='http://114.55.169.15:48080'
|
#VITE_BASE_URL='http://114.55.169.15:48080'
|
||||||
|
|
||||||
# 上传路径
|
# 上传路径
|
||||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ VITE_NODE_ENV=development
|
|||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
#VITE_BASE_URL='http://118.31.23.45:48080'
|
||||||
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
# 上传路径
|
# 上传路径
|
||||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
"min-dash": "^4.1.1",
|
"min-dash": "^4.1.1",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
|
"or": "^0.2.0",
|
||||||
"pinia": "^2.1.3",
|
"pinia": "^2.1.3",
|
||||||
"qrcode": "^1.5.3",
|
"qrcode": "^1.5.3",
|
||||||
"qs": "^6.11.2",
|
"qs": "^6.11.2",
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
"vue": "3.3.4",
|
"vue": "3.3.4",
|
||||||
"vue-amap": "^0.5.10",
|
"vue-amap": "^0.5.10",
|
||||||
"vue-dompurify-html": "^5.0.1",
|
"vue-dompurify-html": "^5.0.1",
|
||||||
|
"vue-draggable-plus": "^0.5.3",
|
||||||
"vue-i18n": "9.2.2",
|
"vue-i18n": "9.2.2",
|
||||||
"vue-router": "^4.2.1",
|
"vue-router": "^4.2.1",
|
||||||
"vue-types": "^5.0.3",
|
"vue-types": "^5.0.3",
|
||||||
|
|||||||
@@ -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 })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情
|
// 查询详情
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export const getPaymentList = async (params) => {
|
|||||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/list', params })
|
return await request.get({ url: '/admin-api/crm/sign-pay-record/list', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询(精简)列表
|
// 查询列表
|
||||||
export const getPaymentPage = async (params) => {
|
export const getPaymentPage = async (params) => {
|
||||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/page', params })
|
return await request.get({ url: '/admin-api/crm/sign-pay-record/page', params })
|
||||||
}
|
}
|
||||||
@@ -45,3 +45,8 @@ export const updateApplyPayment = async (data) => {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出
|
||||||
|
export const exportPayment = async (params) => {
|
||||||
|
return await request.download({ url: '/admin-api/crm/sign-pay-record/export-excel', params })
|
||||||
|
}
|
||||||
|
|||||||
@@ -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 })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情
|
// 查询详情
|
||||||
@@ -51,3 +51,13 @@ export const updateProduceSort = (data) => {
|
|||||||
export const getSignProfit = (params) => {
|
export const getSignProfit = (params) => {
|
||||||
return request.get({ url: '/admin-api/crm/sign/profit', params })
|
return request.get({ url: '/admin-api/crm/sign/profit', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 新增产品
|
||||||
|
export const addOrderProduct = (data) => {
|
||||||
|
return request.post({ url: '/admin-api/crm/sign-prodcut/create', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增产品
|
||||||
|
export const removeOrderProduct = (id) => {
|
||||||
|
return request.delete({ url: '/admin-api/crm/sign-prodcut/delete?id=' + id })
|
||||||
|
}
|
||||||
|
|||||||
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/reportSaler.js
Normal file
8
src/api/home/reportSaler.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/sale/report/detail', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getList = async (data) => {
|
||||||
|
return await request.post({ url: '/admin-api/crm/sch-clue/sale/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 })
|
||||||
|
}
|
||||||
33
src/api/school/setting/supplier.js
Normal file
33
src/api/school/setting/supplier.js
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
// 查询列表
|
||||||
|
export const getSupplierPage = async (params) => {
|
||||||
|
return await request.get({ url: '/admin-api/crm/erp-supplier/page', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getSupplierSimpleList = async (params) => {
|
||||||
|
return await request.get({ url: '/admin-api/crm/erp-supplier/simple-list', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询详情
|
||||||
|
export const getSupplier = async (id) => {
|
||||||
|
return await request.get({ url: '/admin-api/crm/erp-supplier/get?id=' + id })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export const createSupplier = async (data) => {
|
||||||
|
return await request.post({
|
||||||
|
url: '/admin-api/crm/erp-supplier/create',
|
||||||
|
data: data,
|
||||||
|
isSubmitForm: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export const updateSupplier = async (params) => {
|
||||||
|
return await request.put({ url: '/admin-api/crm/erp-supplier/update', data: params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export const deleteSupplier = async (id) => {
|
||||||
|
return await request.delete({ url: '/admin-api/crm/erp-supplier/delete?id=' + id })
|
||||||
|
}
|
||||||
@@ -12,9 +12,11 @@ export interface UserVO {
|
|||||||
avatar: string
|
avatar: string
|
||||||
loginIp: string
|
loginIp: string
|
||||||
status: number
|
status: number
|
||||||
|
hireStatus: number
|
||||||
remark: string
|
remark: string
|
||||||
loginDate: Date
|
loginDate: Date
|
||||||
createTime: Date
|
createTime: Date
|
||||||
|
retireDate: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询用户管理列表
|
// 查询用户管理列表
|
||||||
@@ -62,10 +64,17 @@ export const resetUserPwd = (id: number, password: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 用户状态修改
|
// 用户状态修改
|
||||||
export const updateUserStatus = (id: number, status: number) => {
|
export const updateUserStatus = (
|
||||||
|
id: number,
|
||||||
|
status: number,
|
||||||
|
retireDate: string,
|
||||||
|
hireStatus: number
|
||||||
|
) => {
|
||||||
const data = {
|
const data = {
|
||||||
id,
|
id,
|
||||||
status
|
status,
|
||||||
|
retireDate,
|
||||||
|
hireStatus
|
||||||
}
|
}
|
||||||
return request.put({ url: '/admin-api/system/user/update-status', data: data })
|
return request.put({ url: '/admin-api/system/user/update-status', data: data })
|
||||||
}
|
}
|
||||||
@@ -84,3 +93,8 @@ export const getAllUserList = (): Promise<UserVO[]> => {
|
|||||||
export const getAllUserListWithHire = (): Promise<UserVO[]> => {
|
export const getAllUserListWithHire = (): Promise<UserVO[]> => {
|
||||||
return request.get({ url: '/admin-api/system/user/no/permission/list-all' })
|
return request.get({ url: '/admin-api/system/user/no/permission/list-all' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取钉钉id
|
||||||
|
export const getDDIdByPhone = (params) => {
|
||||||
|
return request.get({ url: '/admin-api/system/user/getDingTalkUserIdByMobile', 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), // 拖拽上传
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -45,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: [
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -69,3 +69,16 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-table {
|
||||||
|
.caret-wrapper {
|
||||||
|
width: 16px;
|
||||||
|
}
|
||||||
|
.sort-caret {
|
||||||
|
left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table--default .cell {
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -74,13 +74,13 @@ export const SystemUserSocialTypeEnum = {
|
|||||||
type: 20,
|
type: 20,
|
||||||
source: 'dingtalk',
|
source: 'dingtalk',
|
||||||
img: 'https://s1.ax1x.com/2022/05/22/OzMDRs.png'
|
img: 'https://s1.ax1x.com/2022/05/22/OzMDRs.png'
|
||||||
},
|
|
||||||
WECHAT_ENTERPRISE: {
|
|
||||||
title: '企业微信',
|
|
||||||
type: 30,
|
|
||||||
source: 'wechat_enterprise',
|
|
||||||
img: 'https://s1.ax1x.com/2022/05/22/OzMrzn.png'
|
|
||||||
}
|
}
|
||||||
|
// WECHAT_ENTERPRISE: {
|
||||||
|
// title: '企业微信',
|
||||||
|
// type: 30,
|
||||||
|
// source: 'wechat_enterprise',
|
||||||
|
// img: 'https://s1.ax1x.com/2022/05/22/OzMrzn.png'
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<el-table v-loading="loading" :data="list" row-key="id" default-expand-all border>
|
<el-table v-loading="loading" :data="list" row-key="id" default-expand-all border>
|
||||||
<el-table-column prop="name" label="部门名称" />
|
<el-table-column prop="name" label="部门名称" />
|
||||||
<el-table-column prop="leader" label="负责人" width="120" />
|
<el-table-column prop="leaderUserName" 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 }">
|
<template #default="{ row }">
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
<!-- <el-tab-pane label="销售提成" :name="10" v-if="checkPermi(['basic:setting:comission'])">
|
<!-- <el-tab-pane label="销售提成" :name="10" v-if="checkPermi(['basic:setting:comission'])">
|
||||||
<BSSalerComission v-if="tabIndex == 10" />
|
<BSSalerComission v-if="tabIndex == 10" />
|
||||||
</el-tab-pane> -->
|
</el-tab-pane> -->
|
||||||
|
<!-- <el-tab-pane label="微信机器人" :name="20">
|
||||||
|
<BSSalerComission v-if="tabIndex == 20" />
|
||||||
|
</el-tab-pane> -->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<MenuForm ref="formRef" :appList="appList" @success="getList" />
|
<MenuForm ref="formRef" :appList="appList" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" name="SystemMenu" setup>
|
<script lang="ts" name="Menu" setup>
|
||||||
import { handleTree } from '@/utils/tree'
|
import { handleTree } from '@/utils/tree'
|
||||||
import * as MenuApi from '@/api/system/menu'
|
import * as MenuApi from '@/api/system/menu'
|
||||||
import MenuForm from './MenuForm.vue'
|
import MenuForm from './MenuForm.vue'
|
||||||
|
|||||||
@@ -9,6 +9,18 @@
|
|||||||
:label="col.label"
|
:label="col.label"
|
||||||
:width="col.width"
|
:width="col.width"
|
||||||
/>
|
/>
|
||||||
|
<el-table-column label="状态" key="status">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.status"
|
||||||
|
:active-value="0"
|
||||||
|
active-text="在职"
|
||||||
|
inactive-text="离职"
|
||||||
|
:inactive-value="1"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<Pagination
|
<Pagination
|
||||||
v-model:limit="pageSize"
|
v-model:limit="pageSize"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="80px"
|
label-width="100px"
|
||||||
>
|
>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -85,6 +85,11 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="微信号" prop="wxAlias">
|
||||||
|
<el-input v-model="formData.wxAlias" placeholder="请输入微信号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="入职日期" prop="hireDate">
|
<el-form-item label="入职日期" prop="hireDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -97,6 +102,23 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="钉钉手机号">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.ddPhone"
|
||||||
|
placeholder="请输入钉钉手机号"
|
||||||
|
clearable
|
||||||
|
@blur="getDDId"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="钉钉Id" prop="dingUserId">
|
||||||
|
<el-input v-model="formData.dingUserId" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
@@ -127,7 +149,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
|
|||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref<any>({
|
||||||
nickname: '',
|
nickname: '',
|
||||||
deptId: '',
|
deptId: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
@@ -140,7 +162,8 @@ const formData = ref({
|
|||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
roleIds: [],
|
roleIds: [],
|
||||||
hireDate: '',
|
hireDate: '',
|
||||||
isNewUserConfirm: false
|
isNewUserConfirm: false,
|
||||||
|
wxAlias: ''
|
||||||
})
|
})
|
||||||
const formRules = ref<any>({
|
const formRules = ref<any>({
|
||||||
username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }],
|
username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }],
|
||||||
@@ -228,8 +251,21 @@ const resetForm = () => {
|
|||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
roleIds: [],
|
roleIds: [],
|
||||||
hireDate: formatDate(new Date(), 'YYYY-MM-DD'),
|
hireDate: formatDate(new Date(), 'YYYY-MM-DD'),
|
||||||
isNewUserConfirm: false
|
isNewUserConfirm: false,
|
||||||
|
wxAlias: ''
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getDDId() {
|
||||||
|
try {
|
||||||
|
if (!formData.value.ddPhone) {
|
||||||
|
formData.value.dingUserId = undefined
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const data = await UserApi.getDDIdByPhone({ mobile: formData.value.ddPhone })
|
||||||
|
formData.value.dingUserId = data
|
||||||
|
} finally {
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -39,29 +45,45 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="用户编号" key="id" prop="id" />
|
<el-table-column label="用户编号" key="id" prop="id" width="100" />
|
||||||
<el-table-column label="登录账号" prop="username" />
|
<el-table-column label="登录账号" prop="username" />
|
||||||
<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" width="100" />
|
||||||
<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="微信号" prop="wxAlias" min-width="80" />
|
||||||
|
<el-table-column label="钉钉号" prop="dingUserId" min-width="80" />
|
||||||
|
<el-table-column label="在职状态" key="hireStatus" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.hireStatus"
|
||||||
:active-value="0"
|
:active-value="0"
|
||||||
:inactive-value="1"
|
:inactive-value="1"
|
||||||
|
active-text="在职"
|
||||||
|
inactive-text="离职"
|
||||||
|
size="small"
|
||||||
v-hasPermi="['basic:employee:update']"
|
v-hasPermi="['basic:employee:update']"
|
||||||
@change="handleStatusChange(scope.row)"
|
@change="handleStatusChange(scope.row)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="启用状态" key="status" width="120">
|
||||||
label="创建时间"
|
<template #default="scope">
|
||||||
prop="createTime"
|
<el-switch
|
||||||
width="180"
|
v-model="scope.row.status"
|
||||||
:formatter="dateFormatter"
|
:active-value="0"
|
||||||
|
:inactive-value="1"
|
||||||
|
active-text="启用"
|
||||||
|
inactive-text="禁用"
|
||||||
|
size="small"
|
||||||
|
:disabled="scope.row.hireStatus == 1"
|
||||||
|
v-hasPermi="['basic:employee:update']"
|
||||||
|
@change="handleUseChange(scope.row)"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" width="260">
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="入职日期" prop="hireDate" width="120" :formatter="dateFormatter" />
|
||||||
|
<el-table-column label="离职日期" prop="" width="120" :formatter="dateFormatter" />
|
||||||
|
<el-table-column label="操作" width="180" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -114,13 +136,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 +151,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 +161,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()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,14 +192,49 @@ const openForm = (type: string, id?: number) => {
|
|||||||
formRef.value.open(type, id)
|
formRef.value.open(type, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改用户状态 */
|
/** 修改在职状态 */
|
||||||
const handleStatusChange = async (row: UserApi.UserVO) => {
|
const handleStatusChange = async (row: UserApi.UserVO) => {
|
||||||
try {
|
try {
|
||||||
// 修改状态的二次确认
|
// 修改状态的二次确认
|
||||||
const text = row.status === CommonStatusEnum.ENABLE ? '启用' : '停用'
|
const text = row.hireStatus === CommonStatusEnum.ENABLE ? '入职' : '离职'
|
||||||
await message.confirm('确认要"' + text + '""' + row.username + '"用户吗?')
|
let result = { value: '' }
|
||||||
|
if (text == '入职') {
|
||||||
|
await message.confirm('确认要"' + text + '""' + row.nickname + '"吗?')
|
||||||
|
} else {
|
||||||
|
result = await message.prompt(
|
||||||
|
'请输入年月日,如2024-01-01',
|
||||||
|
'确认要"' + text + '""' + row.nickname + '"用户吗?'
|
||||||
|
)
|
||||||
|
const regex = /^\d{4}-\d{2}-\d{2}$/
|
||||||
|
|
||||||
|
if (!regex.test(result.value)) {
|
||||||
|
message.error('请输入离职日期')
|
||||||
|
throw new Error()
|
||||||
|
}
|
||||||
|
}
|
||||||
// 发起修改状态
|
// 发起修改状态
|
||||||
await UserApi.updateUserStatus(row.id, row.status)
|
await UserApi.updateUserStatus(row.id, row.status, result.value, row.hireStatus)
|
||||||
|
message.success('修改成功')
|
||||||
|
// 刷新列表
|
||||||
|
await getList()
|
||||||
|
} catch {
|
||||||
|
// 取消后,进行恢复按钮
|
||||||
|
row.hireStatus =
|
||||||
|
row.hireStatus === CommonStatusEnum.ENABLE
|
||||||
|
? CommonStatusEnum.DISABLE
|
||||||
|
: CommonStatusEnum.ENABLE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改启用状态
|
||||||
|
const handleUseChange = async (row: UserApi.UserVO) => {
|
||||||
|
try {
|
||||||
|
// 修改状态的二次确认
|
||||||
|
const text = row.status === CommonStatusEnum.ENABLE ? '启用' : '禁用'
|
||||||
|
await message.confirm('确认要"' + text + '""' + row.nickname + '"吗?')
|
||||||
|
// 发起修改状态
|
||||||
|
await UserApi.updateUserStatus(row.id, row.status, row.retireDate, row.hireStatus)
|
||||||
|
message.success('修改成功')
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await getList()
|
await getList()
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
7
src/views/Basic/WxRobot/Record.vue
Normal file
7
src/views/Basic/WxRobot/Record.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<div> record </div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="WXRecord"></script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
178
src/views/Basic/WxRobot/Setting.vue
Normal file
178
src/views/Basic/WxRobot/Setting.vue
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-table v-loading="loading" :data="tableList" border stripe>
|
||||||
|
<el-table-column v-for="col in columns" :prop="col.prop" :key="col.prop" :label="col.label" />
|
||||||
|
<el-table-column label="发送方式" min-width="150">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-checkbox-group v-model="row.sendType" size="small" @change="rowChange(row)">
|
||||||
|
<el-checkbox :label="1"> 微信 </el-checkbox>
|
||||||
|
<el-checkbox :label="2"> 微信群 </el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="微信群名称" min-width="150">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span v-if="!row.edit">{{ row.wxGroup }}</span>
|
||||||
|
<el-input v-else v-model="row.wxGroup" size="small" clearable @blur="rowChange(row)" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="群二维码" width="90">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<img :src="row.wxCode" width="80px" height="80px" alt="" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="100">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" style="padding: 5px 0" text @click="row.edit = true">
|
||||||
|
修改群名称
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<div v-if="['每日', '每月'].includes(row.sendFrequency)">
|
||||||
|
<el-button type="primary" style="padding: 5px 0" text @click="changeSendTime(row)">
|
||||||
|
修改发送时间
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<Dialog :title="`修改【${sendTimeInfo.name}】发送时间`" v-model="showSendTime" width="500px">
|
||||||
|
<el-text type="danger">
|
||||||
|
<span v-if="sendTimeInfo.sendFrequency == '每日'">
|
||||||
|
请按照时间格式输入,多个时间以“、”分割,如09:00、15:00、18:00
|
||||||
|
</span>
|
||||||
|
<span v-else-if="sendTimeInfo.sendFrequency == '每月'">
|
||||||
|
请按照"日期-时间"格式输入,多个日期以“、”分割,如26-18:00、28-14:00、30-15:00、30-18:00
|
||||||
|
</span>
|
||||||
|
</el-text>
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
class="mt-20px mb-20px"
|
||||||
|
:autosize="{ minRows: 3 }"
|
||||||
|
v-model="sendTimeInfo.sendTime"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
<template #footer>
|
||||||
|
<el-button :disabled="formLoading" type="primary" @click="submitSendTime">确 定</el-button>
|
||||||
|
<el-button @click="showSendTime = false">取 消</el-button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="WXSetting">
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const tableList = ref([
|
||||||
|
{
|
||||||
|
name: '分配通知',
|
||||||
|
sendType: [],
|
||||||
|
sendFrequency: '每次',
|
||||||
|
sendTime: '触发时立刻发送',
|
||||||
|
remark: '线索分配给除本人之外的用户时,通知对方注意接收'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '发货通知',
|
||||||
|
sendType: [],
|
||||||
|
sendFrequency: '每次',
|
||||||
|
sendTime: '触发时立刻发送',
|
||||||
|
remark: '攀尼下单后,点击发货,发送发货模板到微信/群'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '审核失败通知',
|
||||||
|
sendType: [],
|
||||||
|
sendFrequency: '每次',
|
||||||
|
sendTime: '触发时立刻发送',
|
||||||
|
remark: 'crm中的回款、售后等审核失败,通知申请人'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '喜报',
|
||||||
|
sendType: [],
|
||||||
|
sendFrequency: '每次',
|
||||||
|
sendTime: '触发时立刻发送',
|
||||||
|
remark: '销售成交登记时,发送喜报到微信/群',
|
||||||
|
wxGroup: '寻驾'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '周业绩排名',
|
||||||
|
sendType: [],
|
||||||
|
sendFrequency: '每日',
|
||||||
|
sendTime: '10:00、15:00、18:00',
|
||||||
|
remark: '发送业绩排名到微信/群',
|
||||||
|
wxGroup: '爱顽熊'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '月业绩排名',
|
||||||
|
sendType: [],
|
||||||
|
sendFrequency: '每月',
|
||||||
|
sendTime: '26-18:00、28-14:00、30-15:00、30-18:00',
|
||||||
|
remark: '发送业绩排名到微信/群'
|
||||||
|
}
|
||||||
|
// {
|
||||||
|
// name: '周报',
|
||||||
|
// sendType: [],
|
||||||
|
// sendFrequency: '触发时立刻发送'
|
||||||
|
// }
|
||||||
|
])
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
label: '消息名称',
|
||||||
|
prop: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '解释说明',
|
||||||
|
prop: 'remark'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '发送频率',
|
||||||
|
prop: 'sendFrequency'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '发送时间',
|
||||||
|
prop: 'sendTime'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
async function rowChange(row) {
|
||||||
|
try {
|
||||||
|
console.log(row)
|
||||||
|
} finally {
|
||||||
|
row.edit = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const showSendTime = ref(false)
|
||||||
|
const sendTimeInfo = ref({})
|
||||||
|
function changeSendTime(row) {
|
||||||
|
showSendTime.value = true
|
||||||
|
sendTimeInfo.value = row
|
||||||
|
}
|
||||||
|
|
||||||
|
function submitSendTime() {
|
||||||
|
// 校验时间是否有效
|
||||||
|
const arr = sendTimeInfo.value.sendTime.split('、')
|
||||||
|
if (sendTimeInfo.value.sendFrequency == '每日') {
|
||||||
|
// 正则校验是否HH:MM
|
||||||
|
if (arr.some((it) => !/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/.test(it))) {
|
||||||
|
message.error('请检查输入格式是否正确!!!')
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
message.success('校验成功!')
|
||||||
|
}
|
||||||
|
} else if (sendTimeInfo.value.sendFrequency == '每月') {
|
||||||
|
// 正则校验是否【1-31】-HH:MM
|
||||||
|
const reg = /^([1-9]|[1-2]\d|3[01])-([01]?[0-9]|2[0-3]):[0-5][0-9]$/
|
||||||
|
if (arr.some((it) => !reg.test(it))) {
|
||||||
|
message.error('请检查输入格式是否正确!!!')
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
message.success('校验成功!')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
// import { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
|
||||||
|
|
||||||
const statusOptions = [
|
|
||||||
{ label: '发送成功', value: 1 },
|
|
||||||
{ label: '发送失败', value: 2 },
|
|
||||||
{ label: '排队中', value: 3 },
|
|
||||||
{ label: '微信端卡住', value: 4 }
|
|
||||||
]
|
|
||||||
|
|
||||||
// CrudSchema:https://doc.iocoder.cn/vue3/crud-schema/
|
|
||||||
const crudSchemas = reactive([
|
|
||||||
{
|
|
||||||
label: '发送对象',
|
|
||||||
field: 'sendUser',
|
|
||||||
isSearch: true,
|
|
||||||
isTable: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '发送内容',
|
|
||||||
field: 'content',
|
|
||||||
isSearch: false,
|
|
||||||
isTable: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '发送状态',
|
|
||||||
field: 'status',
|
|
||||||
isSearch: true,
|
|
||||||
isTable: true,
|
|
||||||
search: {
|
|
||||||
component: 'Select',
|
|
||||||
api: () => statusOptions,
|
|
||||||
componentProps: {
|
|
||||||
optionsAlias: {
|
|
||||||
labelField: 'label',
|
|
||||||
valueField: 'value'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '发送时间',
|
|
||||||
field: 'createTime',
|
|
||||||
isSearch: true,
|
|
||||||
isTable: true,
|
|
||||||
formatter: dateFormatter,
|
|
||||||
detail: {
|
|
||||||
dateFormat: 'YYYY-MM-DD'
|
|
||||||
},
|
|
||||||
search: {
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
type: 'daterange',
|
|
||||||
format: 'YYYY-MM-DD',
|
|
||||||
valueFormat: 'YYYY-MM-DD',
|
|
||||||
startPlaceholder: '发送时间',
|
|
||||||
endPlaceholder: '发送时间'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
])
|
|
||||||
export const { allSchemas } = useCrudSchemas(crudSchemas)
|
|
||||||
@@ -1,77 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs v-model="tabIndex" type="border-card">
|
<el-tabs v-model="tabIndex" type="border-card">
|
||||||
<el-tab-pane label="微信消息记录" :name="0">
|
<!-- <el-tab-pane label="微信消息记录" :name="0">
|
||||||
<!-- 搜索工作栏 -->
|
<Record />
|
||||||
<Search
|
</el-tab-pane> -->
|
||||||
:schema="allSchemas.searchSchema"
|
<el-tab-pane label="消息配置" :name="1">
|
||||||
labelWidth="0"
|
<Setting />
|
||||||
@search="setSearchParams"
|
|
||||||
@reset="setSearchParams"
|
|
||||||
/>
|
|
||||||
<!-- 列表 -->
|
|
||||||
<SSTable
|
|
||||||
class="mt-20px"
|
|
||||||
v-model:tableObject="tableObject"
|
|
||||||
:tableColumns="allSchemas.tableColumns"
|
|
||||||
@get-list="getTableList"
|
|
||||||
>
|
|
||||||
<el-table-column
|
|
||||||
v-for="item in allSchemas.tableColumns"
|
|
||||||
:key="item.field"
|
|
||||||
:prop="item.field"
|
|
||||||
:label="item.label"
|
|
||||||
:fixed="item.fixed"
|
|
||||||
min-width="150px"
|
|
||||||
showOverflowTooltip
|
|
||||||
/>
|
|
||||||
<el-table-column label="操作" width="150px" fixed="right">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-button type="primary" link @click="sendMsg(row)">再次发送</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</SSTable>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup name="WXBoot">
|
||||||
import { allSchemas } from './index.data.js'
|
// import Record from './Record.vue'
|
||||||
|
import Setting from './Setting.vue'
|
||||||
|
|
||||||
const tabIndex = ref(0)
|
const tabIndex = ref(1)
|
||||||
|
|
||||||
const tableObject = ref({
|
|
||||||
tableList: [],
|
|
||||||
loading: false,
|
|
||||||
total: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
currentPage: 1
|
|
||||||
})
|
|
||||||
|
|
||||||
function setSearchParams() {
|
|
||||||
tableObject.value.tableList = [
|
|
||||||
{
|
|
||||||
sendUser: '测试',
|
|
||||||
content: '您今日有10条待跟进的线索',
|
|
||||||
status: '发送成功',
|
|
||||||
createTime: '2024-04-25 12:00:00'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
function getTableList() {
|
|
||||||
tableObject.value.tableList = [
|
|
||||||
{
|
|
||||||
sendUser: '测试',
|
|
||||||
content: '您今日有10条待跟进的线索',
|
|
||||||
status: '发送成功',
|
|
||||||
createTime: '2024-04-25 12:00:00'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
function sendMsg() {
|
|
||||||
console.log('测试')
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
@@ -83,6 +83,18 @@
|
|||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
|
<el-form-item>
|
||||||
|
<el-select v-model="searchForm.area" placeholder="选择区域" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in areaOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleSearch" v-hasPermi="['clue:order:after-sale-search']">
|
<el-button @click="handleSearch" v-hasPermi="['clue:order:after-sale-search']">
|
||||||
查询
|
查询
|
||||||
@@ -104,8 +116,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" />
|
||||||
@@ -183,6 +201,7 @@
|
|||||||
<script setup name="AfterSales">
|
<script setup name="AfterSales">
|
||||||
import * as AfterSaleApi from '@/api/clue/afterSale'
|
import * as AfterSaleApi from '@/api/clue/afterSale'
|
||||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||||
|
import { getAreaSimpleList } from '@/api/school/setting/area'
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
|
||||||
import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue'
|
import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue'
|
||||||
@@ -191,10 +210,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
|
||||||
@@ -284,7 +305,12 @@ function handleAudit(row) {
|
|||||||
afterSaleAuditDialog.value.open(row)
|
afterSaleAuditDialog.value.open(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const areaOptions = ref([])
|
||||||
function getOptions() {
|
function getOptions() {
|
||||||
|
// 区域
|
||||||
|
getAreaSimpleList().then((data) => {
|
||||||
|
areaOptions.value = data
|
||||||
|
})
|
||||||
getUserOption().then((data) => {
|
getUserOption().then((data) => {
|
||||||
userOptions.value = data
|
userOptions.value = data
|
||||||
})
|
})
|
||||||
|
|||||||
130
src/views/Clue/Order/Comp/DialogAddProduct.vue
Normal file
130
src/views/Clue/Order/Comp/DialogAddProduct.vue
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog title="添加产品" v-model="show" width="800px">
|
||||||
|
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="成交产品" prop="productId">
|
||||||
|
<el-select
|
||||||
|
v-model="form.productId"
|
||||||
|
placeholder="选择成交产品"
|
||||||
|
filterable
|
||||||
|
@change="form.specsId = undefined"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in prodOptions"
|
||||||
|
:key="item.productId"
|
||||||
|
:label="item.productName"
|
||||||
|
:value="item.productId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="产品规格" prop="specsId">
|
||||||
|
<el-select
|
||||||
|
v-model="form.specsId"
|
||||||
|
placeholder="选择规格"
|
||||||
|
filterable
|
||||||
|
:disabled="!form.productId"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in specsOptions(form.productId)"
|
||||||
|
:key="item.specsId"
|
||||||
|
:label="item.specsName"
|
||||||
|
:value="item.specsId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="成交数量" prop="signNum">
|
||||||
|
<el-input-number v-model="form.signNum" :min="1" :controls="false" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="生产状态" prop="isProduced">
|
||||||
|
<el-radio-group v-model="form.isProduced">
|
||||||
|
<el-radio :label="0">待生产</el-radio>
|
||||||
|
<el-radio :label="1">已生产</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" :offset="0">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:autoSize="{ minRows: 3 }"
|
||||||
|
v-model="form.remark"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span>
|
||||||
|
<el-button @click="show = false">取 消</el-button>
|
||||||
|
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="DialogProduct">
|
||||||
|
import { addOrderProduct } from '@/api/clue/sign'
|
||||||
|
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
|
const specsOptions = computed({
|
||||||
|
get() {
|
||||||
|
return (prodId) => {
|
||||||
|
if (prodId) {
|
||||||
|
return prodOptions.value.find((it) => it.productId == prodId).productSpecList
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const show = ref(false)
|
||||||
|
const form = ref({})
|
||||||
|
const rules = {
|
||||||
|
productId: { required: true, message: '成交产品不可为空', trigger: 'change' },
|
||||||
|
specsId: { required: true, message: '产品规格不可为空', trigger: 'change' },
|
||||||
|
signNum: { required: true, message: '成交数量不可为空', trigger: 'blur' }
|
||||||
|
}
|
||||||
|
|
||||||
|
const prodOptions = ref([])
|
||||||
|
|
||||||
|
function open(signId, arr) {
|
||||||
|
prodOptions.value = arr
|
||||||
|
form.value.signId = signId
|
||||||
|
form.value.isProduced = 0
|
||||||
|
show.value = true
|
||||||
|
}
|
||||||
|
defineExpose({ open })
|
||||||
|
|
||||||
|
const emit = defineEmits(['success'])
|
||||||
|
const formRef = ref()
|
||||||
|
const formLoading = ref(false)
|
||||||
|
async function handleSave() {
|
||||||
|
// 校验表单
|
||||||
|
if (!formRef.value) return
|
||||||
|
const valid = await formRef.value.validate()
|
||||||
|
if (!valid) return
|
||||||
|
|
||||||
|
// 提交请求
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
await addOrderProduct(form.value)
|
||||||
|
message.success('新增成功!')
|
||||||
|
show.value = false
|
||||||
|
// 发送操作成功的事件
|
||||||
|
emit('success')
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -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)
|
||||||
|
|||||||
@@ -28,9 +28,9 @@
|
|||||||
<el-select v-model="form.supplier" placeholder="选择供应商" filterable>
|
<el-select v-model="form.supplier" placeholder="选择供应商" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supplierOptions"
|
v-for="item in supplierOptions"
|
||||||
:key="item.value"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.supplierName"
|
||||||
:value="item.value"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -141,15 +141,18 @@
|
|||||||
import { getSimpleWarehouseList, getRemainInventoryList } from '@/api/mall/warehouse'
|
import { getSimpleWarehouseList, getRemainInventoryList } from '@/api/mall/warehouse'
|
||||||
import { createDelivery } from '@/api/clue/delivery'
|
import { createDelivery } from '@/api/clue/delivery'
|
||||||
import { getConfigList } from '@/api/system/set'
|
import { getConfigList } from '@/api/system/set'
|
||||||
import { getDictOptions } from '@/utils/dict'
|
import { getSupplierSimpleList } from '@/api/school/setting/supplier'
|
||||||
import { getExtraFeeSimpleList } from '@/api/clue/extraFee'
|
import { getExtraFeeSimpleList } from '@/api/clue/extraFee'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const warehouseOptions = ref([])
|
const warehouseOptions = ref([])
|
||||||
const extraPayOptions = ref([])
|
const extraPayOptions = ref([])
|
||||||
const supplierOptions = getDictOptions('erp_supplier')
|
const supplierOptions = ref([])
|
||||||
function getOptions() {
|
function getOptions() {
|
||||||
|
getSupplierSimpleList().then((data) => {
|
||||||
|
supplierOptions.value = data
|
||||||
|
})
|
||||||
getSimpleWarehouseList().then((data) => {
|
getSimpleWarehouseList().then((data) => {
|
||||||
warehouseOptions.value = data
|
warehouseOptions.value = data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -61,14 +61,15 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane
|
<el-tab-pane label="回款记录" name="returnRecord">
|
||||||
label="回款记录"
|
|
||||||
name="returnRecord"
|
|
||||||
v-if="checkPermi(['clue:order:return-list'])"
|
|
||||||
>
|
|
||||||
<el-table :data="returnRecordList" border stripe>
|
<el-table :data="returnRecordList" border stripe>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column prop="money" label="回款金额" />
|
<el-table-column
|
||||||
|
v-if="checkPermi(['clue:order:return-list'])"
|
||||||
|
prop="money"
|
||||||
|
label="回款金额"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="personProfit" label="员工利润" />
|
||||||
<el-table-column prop="applyTime" label="申请日期" />
|
<el-table-column prop="applyTime" label="申请日期" />
|
||||||
<el-table-column prop="isPayoff" label="是否结清" />
|
<el-table-column prop="isPayoff" label="是否结清" />
|
||||||
<el-table-column prop="stateName" label="审核状态" />
|
<el-table-column prop="stateName" label="审核状态" />
|
||||||
|
|||||||
@@ -74,8 +74,8 @@
|
|||||||
@get-checked-columns="getCheckedColumns"
|
@get-checked-columns="getCheckedColumns"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="60" />
|
<el-table-column type="selection" width="60" fixed="left" />
|
||||||
<el-table-column type="expand">
|
<el-table-column type="expand" fixed="left">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="p-10px flex justify-center">
|
<div class="p-10px flex justify-center">
|
||||||
<VueDraggable
|
<VueDraggable
|
||||||
@@ -91,8 +91,8 @@
|
|||||||
stripe
|
stripe
|
||||||
style="width: 80%; margin: 0 auto"
|
style="width: 80%; margin: 0 auto"
|
||||||
>
|
>
|
||||||
<el-table-column prop="productName" label="成交产品" />
|
<el-table-column prop="productName" label="成交产品" width="120px" />
|
||||||
<el-table-column prop="specsName" label="产品规格" />
|
<el-table-column prop="specsName" label="产品规格" width="120px" />
|
||||||
<el-table-column prop="signNum" label="成交数量" width="90px" />
|
<el-table-column prop="signNum" label="成交数量" width="90px" />
|
||||||
<el-table-column prop="remark" label="成交备注" width="100px" />
|
<el-table-column prop="remark" label="成交备注" width="100px" />
|
||||||
<el-table-column label="生产状态" width="160px">
|
<el-table-column label="生产状态" width="160px">
|
||||||
@@ -147,6 +147,15 @@
|
|||||||
>
|
>
|
||||||
发货
|
发货
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
link
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
|
v-hasPermi="['clue:order:remove-product']"
|
||||||
|
@click="handleRemoveProduct(scope.row)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -228,6 +237,16 @@
|
|||||||
>
|
>
|
||||||
取消登记
|
取消登记
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
class="mr-10px"
|
||||||
|
link
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
|
v-hasPermi="['clue:order:add-product']"
|
||||||
|
@click="handleAddProduct(scope.row)"
|
||||||
|
>
|
||||||
|
添加产品
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</SSTable>
|
</SSTable>
|
||||||
@@ -238,6 +257,7 @@
|
|||||||
<DialogAfterSale ref="afterSaleDialog" />
|
<DialogAfterSale ref="afterSaleDialog" />
|
||||||
<DialogExtraFee ref="extraFeeDialog" />
|
<DialogExtraFee ref="extraFeeDialog" />
|
||||||
<DialogDelivery ref="deliveryDialog" @success="getTableList" />
|
<DialogDelivery ref="deliveryDialog" @success="getTableList" />
|
||||||
|
<DialogAddProduct ref="addProductDialog" @success="getTableList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -252,6 +272,7 @@ import DialogFeeback from './DialogFeeback.vue'
|
|||||||
import DialogAfterSale from './DialogAfterSale.vue'
|
import DialogAfterSale from './DialogAfterSale.vue'
|
||||||
import DialogExtraFee from './DialogExtraPay.vue'
|
import DialogExtraFee from './DialogExtraPay.vue'
|
||||||
import DialogDelivery from './DialogDelivery.vue'
|
import DialogDelivery from './DialogDelivery.vue'
|
||||||
|
import DialogAddProduct from './DialogAddProduct.vue'
|
||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
@@ -404,6 +425,11 @@ function handleDelivery(row) {
|
|||||||
deliveryDialog.value.open(row)
|
deliveryDialog.value.open(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const addProductDialog = ref()
|
||||||
|
function handleAddProduct(row) {
|
||||||
|
addProductDialog.value.open(row.signId, prodOptions.value)
|
||||||
|
}
|
||||||
|
|
||||||
const batchIds = ref([])
|
const batchIds = ref([])
|
||||||
function handleSelectionChange(val) {
|
function handleSelectionChange(val) {
|
||||||
batchIds.value = val.map((it) => it.signId)
|
batchIds.value = val.map((it) => it.signId)
|
||||||
@@ -460,6 +486,18 @@ function handleBatchUpdateInstall() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function handleRemoveProduct(row) {
|
||||||
|
try {
|
||||||
|
// 修改状态的二次确认
|
||||||
|
await message.confirm(`确认要删除${row.productName}吗?`)
|
||||||
|
// 发起修改状态
|
||||||
|
await SignApi.removeOrderProduct(row.id)
|
||||||
|
message.success('删除成功')
|
||||||
|
// 刷新列表
|
||||||
|
getTableList()
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
|
||||||
async function handleChangeProdoce(row) {
|
async function handleChangeProdoce(row) {
|
||||||
try {
|
try {
|
||||||
// 修改状态的二次确认
|
// 修改状态的二次确认
|
||||||
|
|||||||
@@ -116,9 +116,9 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supplierOptions"
|
v-for="item in supplierOptions"
|
||||||
:key="item.value"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.supplierName"
|
||||||
:value="item.value"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -267,7 +267,7 @@ import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
|||||||
import { getSimpleProductList } from '@/api/mall/product'
|
import { getSimpleProductList } from '@/api/mall/product'
|
||||||
import * as SettleApi from '@/api/clue/settle'
|
import * as SettleApi from '@/api/clue/settle'
|
||||||
|
|
||||||
import { getDictOptions } from '@/utils/dict'
|
import { getSupplierSimpleList } from '@/api/school/setting/supplier'
|
||||||
import { removeNullField } from '@/utils/index'
|
import { removeNullField } from '@/utils/index'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
|
||||||
@@ -419,9 +419,12 @@ async function handleSaveSettle() {
|
|||||||
|
|
||||||
const userOptions = ref([])
|
const userOptions = ref([])
|
||||||
const prodOptions = ref([])
|
const prodOptions = ref([])
|
||||||
const supplierOptions = getDictOptions('erp_supplier')
|
const supplierOptions = ref([])
|
||||||
|
|
||||||
function getOptions() {
|
function getOptions() {
|
||||||
|
getSupplierSimpleList().then((data) => {
|
||||||
|
supplierOptions.value = data
|
||||||
|
})
|
||||||
// 产品
|
// 产品
|
||||||
getSimpleProductList().then((data) => {
|
getSimpleProductList().then((data) => {
|
||||||
prodOptions.value = data
|
prodOptions.value = data
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
<el-option label="已驳回" :value="4" />
|
<el-option label="已驳回" :value="4" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="appStore.getAppInfo?.instanceType == 1">
|
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
|
<el-form-item>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchForm.receiver"
|
v-model="searchForm.receiver"
|
||||||
placeholder="接待人"
|
placeholder="接待人"
|
||||||
@@ -34,6 +35,76 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.signSchool"
|
||||||
|
placeholder="选择驾校"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
@change="changeSchool"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in schoolOptions"
|
||||||
|
:key="item.schoolId"
|
||||||
|
:label="item.schoolName"
|
||||||
|
:value="item.schoolId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.signPlace"
|
||||||
|
placeholder="选择场地"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
:disabled="!searchForm.signSchool"
|
||||||
|
@change="changePlace"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in placeOptions"
|
||||||
|
:key="item.placeId"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.placeId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.signClass"
|
||||||
|
:disabled="!searchForm.signPlace"
|
||||||
|
placeholder="选择班型"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in classOptions"
|
||||||
|
:key="item.typeId"
|
||||||
|
:label="item.typeName"
|
||||||
|
:value="item.typeId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select v-model="searchForm.licenseType" placeholder="驾照类型" filterable clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in getDictOptions(DICT_TYPE.LINCENSE_TYPE)"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select v-model="searchForm.area" placeholder="选择区域" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in areaOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
<el-form-item v-else-if="appStore.getAppInfo?.instanceType == 2">
|
<el-form-item v-else-if="appStore.getAppInfo?.instanceType == 2">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchForm.convertPeople"
|
v-model="searchForm.convertPeople"
|
||||||
@@ -121,6 +192,7 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleSearch" v-hasPermi="['clue:order:return-search']">查询</el-button>
|
<el-button @click="handleSearch" v-hasPermi="['clue:order:return-search']">查询</el-button>
|
||||||
<el-button @click="handleReset" v-hasPermi="['clue:order:return-reset']">重置</el-button>
|
<el-button @click="handleReset" v-hasPermi="['clue:order:return-reset']">重置</el-button>
|
||||||
|
<el-button @click="handleExport" v-hasPermi="['clue:order:return-export']">导出</el-button>
|
||||||
<el-button @click="batchAudit" v-hasPermi="['clue:order:return-batch-audit']">
|
<el-button @click="batchAudit" v-hasPermi="['clue:order:return-batch-audit']">
|
||||||
批量审核
|
批量审核
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -136,7 +208,7 @@
|
|||||||
@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="150px" />
|
<el-table-column prop="signId" label="成交单号" min-width="120px" />
|
||||||
<el-table-column prop="name" label="线索名称" width="120px" />
|
<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">
|
||||||
@@ -188,7 +260,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">
|
||||||
@@ -198,6 +270,30 @@
|
|||||||
<div v-else>{{ row.isPayoff }}</div>
|
<div v-else>{{ row.isPayoff }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="signSchool"
|
||||||
|
label="报名驾校"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="signPlace"
|
||||||
|
label="报名场地"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="signClass"
|
||||||
|
label="报名班型"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="licenseType"
|
||||||
|
label="驾照类型"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="appStore.getAppInfo?.instanceType == 1"
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
prop="receiverName"
|
prop="receiverName"
|
||||||
@@ -253,11 +349,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)"
|
||||||
@@ -266,7 +363,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']"
|
||||||
@@ -276,7 +374,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']"
|
||||||
@@ -286,7 +385,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']"
|
||||||
@@ -313,6 +413,10 @@
|
|||||||
<script setup name="Reback">
|
<script setup name="Reback">
|
||||||
import * as FeebackApi from '@/api/clue/payment'
|
import * as FeebackApi from '@/api/clue/payment'
|
||||||
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
||||||
|
import { getPlaceList } from '@/api/school/place'
|
||||||
|
import { getClassTypeList } from '@/api/school/class'
|
||||||
|
import { getAreaSimpleList } from '@/api/school/setting/area'
|
||||||
|
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
|
||||||
import DialogFeebackAudit from './DialogFeebackAudit.vue'
|
import DialogFeebackAudit from './DialogFeebackAudit.vue'
|
||||||
@@ -320,8 +424,10 @@ import DialogFeebackDetail from './DialogFeebackDetail.vue'
|
|||||||
import DialogBatchAudit from './DialogBatchAudit.vue'
|
import DialogBatchAudit from './DialogBatchAudit.vue'
|
||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
|
import download from '@/utils/download'
|
||||||
import { useAppStore } from '@/store/modules/app'
|
import { useAppStore } from '@/store/modules/app'
|
||||||
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||||
|
import { ElLoading } from 'element-plus'
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
@@ -348,6 +454,13 @@ const searchForm = ref({
|
|||||||
const userOptions = ref([])
|
const userOptions = ref([])
|
||||||
const allUserOptions = ref([])
|
const allUserOptions = ref([])
|
||||||
|
|
||||||
|
const schoolOptions = ref([])
|
||||||
|
const allPlaceOptions = ref([])
|
||||||
|
|
||||||
|
const placeOptions = computed(() => {
|
||||||
|
return allPlaceOptions.value.filter((it) => it.schoolId == searchForm.value.signSchool)
|
||||||
|
})
|
||||||
|
|
||||||
const tableList = ref([])
|
const tableList = ref([])
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
|
|
||||||
@@ -369,11 +482,31 @@ function handleReset() {
|
|||||||
applyUser: undefined,
|
applyUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
mobile: undefined,
|
mobile: undefined,
|
||||||
|
signSchool: undefined,
|
||||||
|
signPlace: undefined,
|
||||||
|
signClass: undefined,
|
||||||
|
area: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeSchool() {
|
||||||
|
searchForm.value.signPlace = undefined
|
||||||
|
searchForm.value.signClass = undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
function changePlace() {
|
||||||
|
searchForm.value.signClass = undefined
|
||||||
|
getClassTypeOptions()
|
||||||
|
}
|
||||||
|
|
||||||
|
const classOptions = ref([])
|
||||||
|
async function getClassTypeOptions() {
|
||||||
|
const data = await getClassTypeList({ placeId: searchForm.value.signPlace, status: 0 })
|
||||||
|
classOptions.value = data
|
||||||
|
}
|
||||||
|
|
||||||
const totalInfo = ref({})
|
const totalInfo = ref({})
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
async function getList() {
|
async function getList() {
|
||||||
@@ -388,6 +521,26 @@ async function getList() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function handleExport() {
|
||||||
|
try {
|
||||||
|
ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '正在导出数据,请稍后...',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
})
|
||||||
|
const params = removeNullField(searchForm.value)
|
||||||
|
delete params.pageNo
|
||||||
|
delete params.pageSize
|
||||||
|
const data = await FeebackApi.exportPayment(params)
|
||||||
|
download.excel(data, `汇款记录表${new Date().getTime()}.xls`)
|
||||||
|
} finally {
|
||||||
|
setTimeout(() => {
|
||||||
|
const loadingInstance = ElLoading.service()
|
||||||
|
loadingInstance.close()
|
||||||
|
}, 400)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const batchIds = ref([])
|
const batchIds = ref([])
|
||||||
function handleSelectionChange(val) {
|
function handleSelectionChange(val) {
|
||||||
batchIds.value = val.map((it) => it.id)
|
batchIds.value = val.map((it) => it.id)
|
||||||
@@ -396,7 +549,7 @@ function handleSelectionChange(val) {
|
|||||||
const batchAuditDialog = ref()
|
const batchAuditDialog = ref()
|
||||||
function batchAudit() {
|
function batchAudit() {
|
||||||
if (batchIds.value.length) {
|
if (batchIds.value.length) {
|
||||||
batchAuditDialog.value.open('aftersale', batchIds.value)
|
batchAuditDialog.value.open('feeback', batchIds.value)
|
||||||
} else {
|
} else {
|
||||||
message.info('请选择表格中需要审核的数据')
|
message.info('请选择表格中需要审核的数据')
|
||||||
}
|
}
|
||||||
@@ -423,7 +576,17 @@ function handleAudit(row) {
|
|||||||
feebackDialog.value.open(row)
|
feebackDialog.value.open(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const areaOptions = ref([])
|
||||||
function getOptions() {
|
function getOptions() {
|
||||||
|
// 驾校
|
||||||
|
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
|
||||||
|
schoolOptions.value = data.schoolList
|
||||||
|
allPlaceOptions.value = data.placeList
|
||||||
|
})
|
||||||
|
// 区域
|
||||||
|
getAreaSimpleList().then((data) => {
|
||||||
|
areaOptions.value = data
|
||||||
|
})
|
||||||
getUserOption().then((data) => {
|
getUserOption().then((data) => {
|
||||||
userOptions.value = data
|
userOptions.value = data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -248,6 +248,16 @@
|
|||||||
<el-form-item label="结算金额">
|
<el-form-item label="结算金额">
|
||||||
{{ settleAmount }}
|
{{ settleAmount }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="结算日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.settlementDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="结算备注" prop="remark">
|
<el-form-item label="结算备注" prop="remark">
|
||||||
<Editor v-model:modelValue="form.remark" />
|
<Editor v-model:modelValue="form.remark" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -270,7 +280,7 @@ import { getPlaceList } from '@/api/school/place'
|
|||||||
import { getClassTypeList } from '@/api/school/class'
|
import { getClassTypeList } from '@/api/school/class'
|
||||||
import * as SettleApi from '@/api/clue/settle'
|
import * as SettleApi from '@/api/clue/settle'
|
||||||
|
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||||
import { removeNullField } from '@/utils/index'
|
import { removeNullField } from '@/utils/index'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
@@ -395,6 +405,7 @@ function batchSettle() {
|
|||||||
showDailog.value = true
|
showDailog.value = true
|
||||||
form.value = {
|
form.value = {
|
||||||
settlementIds: selectList.value.map((it) => it.settlementId),
|
settlementIds: selectList.value.map((it) => it.settlementId),
|
||||||
|
settlementDate: formatDate(new Date()),
|
||||||
reamrk: undefined
|
reamrk: undefined
|
||||||
}
|
}
|
||||||
settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0)
|
settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0)
|
||||||
|
|||||||
@@ -92,6 +92,9 @@
|
|||||||
快速新增
|
快速新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="item.field == 'intentionStateName'">
|
||||||
|
<DictTag type="intention_state" :value="row.intentionState + ''" />
|
||||||
|
</div>
|
||||||
<div v-else-if="item.field == 'contact'">
|
<div v-else-if="item.field == 'contact'">
|
||||||
<span>{{ row[item.field] }}</span>
|
<span>{{ row[item.field] }}</span>
|
||||||
<Icon class="ml-5px" icon="ep:phone" @click="makeCall(row.contact)" />
|
<Icon class="ml-5px" icon="ep:phone" @click="makeCall(row.contact)" />
|
||||||
@@ -228,11 +231,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 +295,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
|
||||||
|
|||||||
@@ -7,21 +7,64 @@
|
|||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
>
|
>
|
||||||
<el-form-item v-if="formData.parentSource" label="上级来源">
|
<el-row :gutter="20">
|
||||||
|
<el-col v-if="formData.parentSource" :span="12" :offset="0">
|
||||||
|
<el-form-item label="上级来源">
|
||||||
<el-input v-model="formData.parentSource" disabled />
|
<el-input v-model="formData.parentSource" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="来源名称" prop="sourceName">
|
<el-form-item label="来源名称" prop="sourceName">
|
||||||
<el-input v-model="formData.sourceName" placeholder="请输入来源名称" />
|
<el-input v-model="formData.sourceName" placeholder="请输入来源名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input v-model="formData.sort" placeholder="请输入排序" type="number" :min="0" />
|
<el-input v-model="formData.sort" placeholder="请输入排序" type="number" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-radio-group v-model="formData.status">
|
<el-radio-group v-model="formData.status">
|
||||||
<el-radio :label="0"> 启用 </el-radio>
|
<el-radio :label="0"> 启用 </el-radio>
|
||||||
<el-radio :label="1"> 禁用 </el-radio>
|
<el-radio :label="1"> 禁用 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="开户费用" prop="accountFee">
|
||||||
|
<el-input-number
|
||||||
|
v-model="formData.accountFee"
|
||||||
|
:controls="false"
|
||||||
|
style="width: 100%"
|
||||||
|
:min="0"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="开户日期" prop="accountStartTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.accountStartTime"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="到期日期" prop="accountEndTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.accountEndTime"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="24" :offset="0">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input
|
<el-input
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@@ -30,7 +73,64 @@
|
|||||||
:autosize="{ minRows: 4, maxRows: 8 }"
|
:autosize="{ minRows: 4, maxRows: 8 }"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
<el-divider direction="horizontal" content-position="left">线索成本</el-divider>
|
||||||
|
|
||||||
|
<el-button class="mb-10px" type="primary" @click="handleAddPrice"> 添加年份 </el-button>
|
||||||
|
<el-table :data="formData.sourceCostVOS" border>
|
||||||
|
<el-table-column label="年份" width="120">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="row.year"
|
||||||
|
type="year"
|
||||||
|
placeholder="选择年份"
|
||||||
|
size="small"
|
||||||
|
format="YYYY"
|
||||||
|
value-format="YYYY"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-for="col in 12" :key="col" :label="`${col}月`" width="100px">
|
||||||
|
<el-table-column label="充值">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.monthData[col - 1].rechargeFee"
|
||||||
|
size="small"
|
||||||
|
:min="0"
|
||||||
|
:controls="false"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="消耗">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.monthData[col - 1].consumeFee"
|
||||||
|
size="small"
|
||||||
|
:controls="false"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="线索数">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.monthData[col - 1].clueNum"
|
||||||
|
size="small"
|
||||||
|
:controls="false"
|
||||||
|
style="width: 100%"
|
||||||
|
:min="0"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
@@ -49,6 +149,7 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
|
|||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
sourceName: '',
|
sourceName: '',
|
||||||
|
accountFee: undefined,
|
||||||
sort: 1,
|
sort: 1,
|
||||||
remark: ''
|
remark: ''
|
||||||
})
|
})
|
||||||
@@ -111,8 +212,29 @@ const resetForm = () => {
|
|||||||
sourceName: '',
|
sourceName: '',
|
||||||
status: 0,
|
status: 0,
|
||||||
sort: 1,
|
sort: 1,
|
||||||
remark: ''
|
remark: '',
|
||||||
|
costModel: 0,
|
||||||
|
sourceCostVOS: []
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleAddPrice() {
|
||||||
|
const obj = {
|
||||||
|
year: undefined,
|
||||||
|
monthData: []
|
||||||
|
}
|
||||||
|
for (let i = 1; i <= 12; i++) {
|
||||||
|
obj.monthData.push({
|
||||||
|
month: i,
|
||||||
|
consumeFee: 0,
|
||||||
|
rechargeFee: 0,
|
||||||
|
clueNum: 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!formData.value.sourceCostVOS) {
|
||||||
|
formData.value.sourceCostVOS = []
|
||||||
|
}
|
||||||
|
formData.value.sourceCostVOS.push(obj)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
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,112 @@
|
|||||||
<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" fixed="left" />
|
||||||
|
<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) {
|
||||||
|
return (
|
||||||
|
Number(pre.monthClueSignRateReportList[idx].rate) -
|
||||||
|
Number(cur.monthClueSignRateReportList[idx].rate)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
62
src/views/Home/Comp/BarSalerClueReport.vue
Normal file
62
src/views/Home/Comp/BarSalerClueReport.vue
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<template>
|
||||||
|
<Echart :options="optionsData" :width="400" :height="200" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="BarSalerClueReport">
|
||||||
|
import { set } from 'lodash-es'
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
nextTick(() => {
|
||||||
|
getReportData()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const optionsData = ref({})
|
||||||
|
|
||||||
|
const getReportData = async () => {
|
||||||
|
// const data = await HomeApi.getClueSignSignRate()
|
||||||
|
set(optionsData, 'radiusAxis', {
|
||||||
|
type: 'category',
|
||||||
|
data: ['宝典', '一点通', '抖音', '小红书'],
|
||||||
|
z: 10
|
||||||
|
})
|
||||||
|
set(optionsData, 'series', [
|
||||||
|
{
|
||||||
|
type: 'bar',
|
||||||
|
data: [1, 2, 3, 4],
|
||||||
|
coordinateSystem: 'polar',
|
||||||
|
name: '高意向A',
|
||||||
|
stack: 'a',
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'bar',
|
||||||
|
data: [2, 4, 6, 8],
|
||||||
|
coordinateSystem: 'polar',
|
||||||
|
name: '中意向B',
|
||||||
|
stack: 'a',
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'bar',
|
||||||
|
data: [1, 2, 3, 4],
|
||||||
|
coordinateSystem: 'polar',
|
||||||
|
name: '低意向C',
|
||||||
|
stack: 'a',
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
getReportData
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<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>
|
||||||
402
src/views/Home/Comp/DialogSalerReportDetail.vue
Normal file
402
src/views/Home/Comp/DialogSalerReportDetail.vue
Normal file
@@ -0,0 +1,402 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="1000px">
|
||||||
|
<el-form :model="searchForm" label-width="0" inline>
|
||||||
|
<el-form-item>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.consultTime"
|
||||||
|
type="daterange"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
start-placeholder="选择日期"
|
||||||
|
end-placeholder="选择日期"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-tree-select
|
||||||
|
v-model="searchForm.sourceId"
|
||||||
|
:data="props.sourceOptions"
|
||||||
|
:props="defaultProps"
|
||||||
|
check-strictly
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
node-key="sourceId"
|
||||||
|
placeholder="请选择渠道"
|
||||||
|
@change="sourceChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.licenseTypeList"
|
||||||
|
placeholder="选择驾照类型"
|
||||||
|
clearable
|
||||||
|
multiple
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in props.licenseTypeOptions"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleSearch">查询</el-button>
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-tabs v-model="showPane" class="pb-10px">
|
||||||
|
<el-tab-pane label="详细数据" :name="1">
|
||||||
|
<el-table v-loading="loading" :data="tableList" border stripe>
|
||||||
|
<el-table-column prop="sourceName" label="渠道名称" width="100" fixed="left" />
|
||||||
|
<el-table-column prop="newClueNumber" label="新线索数" sortable min-width="100" />
|
||||||
|
<el-table-column prop="signNumber" label="成交数" sortable min-width="100" />
|
||||||
|
<el-table-column
|
||||||
|
prop="signRate"
|
||||||
|
label="成交率"
|
||||||
|
sortable
|
||||||
|
min-width="100"
|
||||||
|
:formatter="(row) => row.signRate + '%'"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="averageSignPeriod" label="成交周期" sortable min-width="100" />
|
||||||
|
<el-table-column
|
||||||
|
prop="grossProfitOfSingleSign"
|
||||||
|
label="毛利/单"
|
||||||
|
sortable
|
||||||
|
min-width="100"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="payPriceOfSingleSign" label="支出/单" sortable min-width="100" />
|
||||||
|
<el-table-column prop="costOfSingleClue" label="线索成本/条" sortable min-width="100" />
|
||||||
|
<el-table-column
|
||||||
|
prop="netProfitOfSingleSign"
|
||||||
|
label="净利润/单"
|
||||||
|
sortable
|
||||||
|
min-width="100"
|
||||||
|
/>
|
||||||
|
<el-table-column label="总线索成本" prop="clueCostTotal" sortable min-width="100" />
|
||||||
|
<el-table-column label="总支出" prop="payPriceTotal" sortable min-width="100" />
|
||||||
|
<el-table-column label="总利润" prop="profitTotal" sortable min-width="100" />
|
||||||
|
</el-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="图表展示" :name="2" lazy>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24" :offset="0">
|
||||||
|
<el-checkbox-group v-model="showChannel" @change="setReportData">
|
||||||
|
<el-checkbox v-for="(item, index) in channelArr" :key="index" :label="item" />
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-skeleton :loading="loading" animated>
|
||||||
|
<Echart :options="echart1Option" width="100%" :height="400" />
|
||||||
|
</el-skeleton>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0" v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
|
<Echart :options="echart2Option" width="100%" :height="400" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" :offset="0">
|
||||||
|
<Echart :options="echart3Option" width="100%" :height="400" />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="DialogSalerReportDetail">
|
||||||
|
import { set } from 'lodash-es'
|
||||||
|
import * as reportApi from '@/api/home/reportSaler'
|
||||||
|
import { getIntDictOptions } from '@/utils/dict'
|
||||||
|
import { removeNullField } from '@/utils'
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
|
const appStore = useAppStore()
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
licenseTypeOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
sourceOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const defaultProps = {
|
||||||
|
children: 'children',
|
||||||
|
label: 'sourceName',
|
||||||
|
value: 'sourceId',
|
||||||
|
isLeaf: 'leaf'
|
||||||
|
}
|
||||||
|
|
||||||
|
const showChannel = ref([])
|
||||||
|
const intentionOptions = getIntDictOptions('intention_state')
|
||||||
|
|
||||||
|
const channelArr = computed(() => {
|
||||||
|
if (searchForm.value.sourceId) {
|
||||||
|
let arr =
|
||||||
|
props.sourceOptions.find((it) => it.sourceId == searchForm.value.sourceId)?.children || []
|
||||||
|
return arr.map((it) => it.sourceName)
|
||||||
|
} else {
|
||||||
|
return props.sourceOptions.map((it) => it.sourceName)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
|
const loading = ref(false)
|
||||||
|
const searchForm = ref({})
|
||||||
|
|
||||||
|
const showPane = ref(1)
|
||||||
|
|
||||||
|
function handleReset() {
|
||||||
|
searchForm.value = {
|
||||||
|
nickname: undefined,
|
||||||
|
consultTime: [`${year}-${month}-01`, formatDate(new Date())],
|
||||||
|
licenseTypeList: [],
|
||||||
|
sourceId: undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 打开弹窗 */
|
||||||
|
const open = async (info, queryInfo) => {
|
||||||
|
showPane.value = 1
|
||||||
|
dialogVisible.value = true
|
||||||
|
dialogTitle.value = info.nickname
|
||||||
|
searchForm.value = { ...queryInfo }
|
||||||
|
searchForm.value.userId = info.userId
|
||||||
|
|
||||||
|
sourceChange()
|
||||||
|
}
|
||||||
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
|
const tableList = ref([])
|
||||||
|
|
||||||
|
async function handleSearch() {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const params = { ...searchForm.value }
|
||||||
|
const data = await reportApi.getInfo(removeNullField(params))
|
||||||
|
tableList.value = data.sourceDetailVOList
|
||||||
|
setReportData(data)
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function sourceChange() {
|
||||||
|
handleSearch()
|
||||||
|
showChannel.value = channelArr.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const echart1Option = ref({
|
||||||
|
title: {
|
||||||
|
text: '线索分布图'
|
||||||
|
},
|
||||||
|
radiusAxis: {},
|
||||||
|
angleAxis: {},
|
||||||
|
tooltip: {
|
||||||
|
show: true,
|
||||||
|
formatter: '{b0}-{a}: {c}'
|
||||||
|
},
|
||||||
|
polar: {},
|
||||||
|
legend: {
|
||||||
|
show: true,
|
||||||
|
type: 'scroll',
|
||||||
|
left: 100
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const echart2Option = ref({
|
||||||
|
title: {
|
||||||
|
text: '成交分布图'
|
||||||
|
},
|
||||||
|
radiusAxis: {},
|
||||||
|
angleAxis: {},
|
||||||
|
tooltip: {
|
||||||
|
show: true,
|
||||||
|
formatter: '{b0}-{a}: {c}'
|
||||||
|
},
|
||||||
|
polar: {},
|
||||||
|
legend: {
|
||||||
|
show: true,
|
||||||
|
type: 'scroll',
|
||||||
|
left: 100
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const echart3Option = ref({
|
||||||
|
title: {
|
||||||
|
text: '销售雷达图'
|
||||||
|
},
|
||||||
|
radar: {
|
||||||
|
indicator: [
|
||||||
|
{ name: '成交周期' },
|
||||||
|
{ name: '毛利/单' },
|
||||||
|
{ name: '支出/单' },
|
||||||
|
{ name: '线索成本/条' },
|
||||||
|
{ name: '净利润/单' },
|
||||||
|
{ name: '成交率' }
|
||||||
|
// { name: '线索总成本' },
|
||||||
|
// { name: '总支出' },
|
||||||
|
// { name: '总利润' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
show: true,
|
||||||
|
right: '10px',
|
||||||
|
orient: 'vertical'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const setReportData = async (data) => {
|
||||||
|
// const data = await HomeApi.getClueSignSignRate()
|
||||||
|
|
||||||
|
const channelClueArr = showChannel.value.sort((pre, cur) => {
|
||||||
|
const preArr = tableList.value.find((it) => it.sourceName == pre).clueIntentionNumVOList || []
|
||||||
|
const curArr = tableList.value.find((it) => it.sourceName == cur).clueIntentionNumVOList || []
|
||||||
|
const preCount = preArr.reduce((preVal, curVal) => preVal + curVal.intentionNum, 0)
|
||||||
|
const curCount = curArr.reduce((preVal, curVal) => preVal + curVal.intentionNum, 0)
|
||||||
|
return preCount - curCount
|
||||||
|
})
|
||||||
|
|
||||||
|
const arr1 = intentionOptions.map((intention) => {
|
||||||
|
const list = []
|
||||||
|
channelClueArr.map((item) => {
|
||||||
|
const row = tableList.value.find((it) => item == it.sourceName)
|
||||||
|
if (row) {
|
||||||
|
list.push(
|
||||||
|
row.clueIntentionNumVOList.find((it) => it.intentionState == intention.value).intentionNum
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return {
|
||||||
|
type: 'bar',
|
||||||
|
data: list,
|
||||||
|
coordinateSystem: 'polar',
|
||||||
|
name: intention.label,
|
||||||
|
stack: 'a',
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'middle'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const channelSignArr = showChannel.value.sort((pre, cur) => {
|
||||||
|
const preArr = tableList.value.find((it) => it.sourceName == pre).signLicenseTypeNumVOList || []
|
||||||
|
const curArr = tableList.value.find((it) => it.sourceName == cur).signLicenseTypeNumVOList || []
|
||||||
|
const preCount = preArr.reduce((preVal, curVal) => preVal + curVal.licenseTypeNum, 0)
|
||||||
|
const curCount = curArr.reduce((preVal, curVal) => preVal + curVal.licenseTypeNum, 0)
|
||||||
|
return preCount - curCount
|
||||||
|
})
|
||||||
|
const arr2 = props.licenseTypeOptions.map((cartype) => {
|
||||||
|
const list = []
|
||||||
|
channelClueArr.map((item) => {
|
||||||
|
const row = tableList.value.find((it) => item == it.sourceName)
|
||||||
|
if (row) {
|
||||||
|
list.push(
|
||||||
|
row.signLicenseTypeNumVOList.find((it) => it.licenseType == cartype.label).licenseTypeNum
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return {
|
||||||
|
type: 'bar',
|
||||||
|
data: list,
|
||||||
|
coordinateSystem: 'polar',
|
||||||
|
name: cartype.label,
|
||||||
|
stack: 'a',
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'middle'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
set(echart1Option.value, 'radiusAxis', {
|
||||||
|
type: 'category',
|
||||||
|
data: channelClueArr,
|
||||||
|
axisLabel: {
|
||||||
|
margin: 5,
|
||||||
|
fontSize: 10,
|
||||||
|
interval: 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
set(echart1Option.value, 'series', arr1)
|
||||||
|
|
||||||
|
set(echart2Option.value, 'radiusAxis', {
|
||||||
|
type: 'category',
|
||||||
|
data: channelSignArr,
|
||||||
|
axisLabel: {
|
||||||
|
margin: 5,
|
||||||
|
fontSize: 10,
|
||||||
|
interval: 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
set(echart2Option.value, 'series', arr2)
|
||||||
|
const { personDetail, averageDetail } = data
|
||||||
|
set(echart3Option.value, 'series', [
|
||||||
|
{
|
||||||
|
type: 'radar',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
value: [
|
||||||
|
averageDetail.averageSignPeriod,
|
||||||
|
averageDetail.grossProfitOfSingleSign,
|
||||||
|
averageDetail.payPriceOfSingleSign,
|
||||||
|
averageDetail.costOfSingleClue,
|
||||||
|
averageDetail.netProfitOfSingleSign,
|
||||||
|
averageDetail.signRate
|
||||||
|
// averageDetail.clueCostTotal,
|
||||||
|
// averageDetail.payPriceTotal,
|
||||||
|
// averageDetail.profitTotal
|
||||||
|
],
|
||||||
|
name: '平均水平',
|
||||||
|
lineStyle: {
|
||||||
|
type: 'dashed'
|
||||||
|
},
|
||||||
|
areaStyle: {
|
||||||
|
color: 'rgba(0, 191, 255, 0.6)'
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: [
|
||||||
|
personDetail.averageSignPeriod,
|
||||||
|
personDetail.grossProfitOfSingleSign,
|
||||||
|
personDetail.payPriceOfSingleSign,
|
||||||
|
personDetail.costOfSingleClue,
|
||||||
|
personDetail.netProfitOfSingleSign,
|
||||||
|
personDetail.signRate
|
||||||
|
// personDetail.clueCostTotal,
|
||||||
|
// personDetail.payPriceTotal,
|
||||||
|
// personDetail.profitTotal
|
||||||
|
],
|
||||||
|
name: dialogTitle.value,
|
||||||
|
areaStyle: {
|
||||||
|
color: 'rgba(255, 145, 124, 0.4)'
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
])
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
162
src/views/Home/Comp/SignListCard.vue
Normal file
162
src/views/Home/Comp/SignListCard.vue
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
<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 label="成交" align="center">
|
||||||
|
<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>
|
||||||
|
<el-table-column label="利润" align="center">
|
||||||
|
<el-table-column prop="profit">
|
||||||
|
<template #header> <Tooltip message="公司利润" /> <span>利润</span> </template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="profitSequentialGrowth" label="环比" :formatter="parseRate" />
|
||||||
|
<el-table-column prop="profitSamePeriodCompareGrowth" label="同比" :formatter="parseRate" />
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column prop="notReceivedMoney">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="回款列表中未审核的公司利润" /> <span>未到账</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="receivedMoney">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="回款列表中已审核的公司利润" /> <span>已到账</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="waitSettleMoney" label="待结算金额" />
|
||||||
|
<el-table-column prop="settledMoney" label="已结算金额" />
|
||||||
|
<el-table-column prop="refundAmount" label="已退款金额" />
|
||||||
|
<el-table-column prop="remainMoney">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="已到账金额-已结算金额-已退款金额" /> <span>结余</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</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)
|
||||||
|
.toFixed(2)
|
||||||
|
}
|
||||||
|
} 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,16 +107,17 @@
|
|||||||
</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>
|
||||||
<el-skeleton :loading="loading" animated>
|
<el-skeleton :loading="loading" animated>
|
||||||
<el-table :data="signList" size="small">
|
<el-table :data="signList" size="small">
|
||||||
<el-table-column type="index" />
|
<el-table-column type="index" width="40" />
|
||||||
<el-table-column prop="username" label="姓名" width="100" />
|
<el-table-column prop="username" label="姓名" width="80" />
|
||||||
<el-table-column prop="followNum" label="成交数量" width="70" />
|
<el-table-column prop="followNum" label="成交数量" width="90" sortable />
|
||||||
<el-table-column prop="deptName" label="所属组织" />
|
<el-table-column prop="signPrice" label="成交额" min-width="90" sortable />
|
||||||
|
<el-table-column prop="deptName" label="所属组织" width="150" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -142,12 +143,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)
|
||||||
|
|
||||||
|
|||||||
248
src/views/Home/SalesReport.vue
Normal file
248
src/views/Home/SalesReport.vue
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
<template>
|
||||||
|
<ContentWrap>
|
||||||
|
<el-form :model="searchForm" label-width="0" inline>
|
||||||
|
<el-form-item>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.consultTime"
|
||||||
|
type="daterange"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
start-placeholder="选择日期"
|
||||||
|
end-placeholder="选择日期"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.nickname" placeholder="销售姓名" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-tree-select
|
||||||
|
v-model="searchForm.sourceId"
|
||||||
|
:data="sourceOptions"
|
||||||
|
:props="defaultProps"
|
||||||
|
check-strictly
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
node-key="sourceId"
|
||||||
|
placeholder="请选择渠道"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.licenseTypeList"
|
||||||
|
placeholder="选择驾照类型"
|
||||||
|
clearable
|
||||||
|
multiple
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in licenseTypeOptions"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</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
|
||||||
|
show-summary
|
||||||
|
:summary-method="getSummaries"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="60" fixed="left" align="center" />
|
||||||
|
<el-table-column prop="nickname" label="姓名" width="80" fixed="left">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="primary" style="padding: 0" text @click="handleDetail(row)">{{
|
||||||
|
row.nickname
|
||||||
|
}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="newClueNumber" sortable min-width="100">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="咨询日期在所选周期内的线索总数" />
|
||||||
|
<span>新线索数</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="成交数" prop="signNumber" sortable min-width="100">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="成交日期在所选周期内的成交数" />
|
||||||
|
<span>成交数</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="成交率"
|
||||||
|
prop="signRate"
|
||||||
|
sortable
|
||||||
|
min-width="100"
|
||||||
|
:formatter="(row) => row.signRate + '%'"
|
||||||
|
/>
|
||||||
|
<el-table-column label="跟进数/日" prop="dayFollowNumber" sortable min-width="100" />
|
||||||
|
<el-table-column label="成交数/日" prop="daySignNumber" sortable min-width="100" />
|
||||||
|
<el-table-column label="平均成交周期" prop="averageSignPeriod" sortable min-width="100">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="平均每条成交的线索,从咨询开始到成交所需要的天数" />
|
||||||
|
<span>平均成交周期</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="grossProfitOfSingleSign" sortable min-width="100">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip
|
||||||
|
message="平均每笔成交订单的公司利润【按照登记,不按审核到账】=总公司利润/总成交数"
|
||||||
|
/>
|
||||||
|
<span>毛利/单</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="payPriceOfSingleSign" sortable min-width="100">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip
|
||||||
|
message="平均每笔成交订单的额外支出(返费等)【按照登记,不按审核到账】=总支出/总成交数"
|
||||||
|
/>
|
||||||
|
<span>支出/单</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="costOfSingleClue" sortable min-width="100">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="平均每条线索的成本=总线索成本/新线索条数" />
|
||||||
|
<span>线索成本/条</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="netProfitOfSingleSign" sortable min-width="100">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="=(总公司利润-总支出-总线索成本)/总成交数" />
|
||||||
|
<span>净利润/单</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总线索成本" prop="clueCostTotal" sortable min-width="100" />
|
||||||
|
<el-table-column label="总支出" prop="payPriceTotal" sortable min-width="100" />
|
||||||
|
<el-table-column label="总利润" prop="profitTotal" sortable min-width="100" />
|
||||||
|
<el-table-column prop="efficiency" sortable min-width="100">
|
||||||
|
<template #header>
|
||||||
|
<Tooltip message="=总利润/(总成本+总支出)" />
|
||||||
|
<span>能效</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="撞单数" prop="repeatClueNum" sortable min-width="100" />
|
||||||
|
<el-table-column label="撞单成交数" prop="repeatClueSignNum" sortable min-width="100" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<DialogSalerReportDetail
|
||||||
|
:licenseTypeOptions="licenseTypeOptions"
|
||||||
|
:source-options="sourceOptions"
|
||||||
|
ref="SalerDetailDialog"
|
||||||
|
/>
|
||||||
|
</ContentWrap>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="SalesReport">
|
||||||
|
import DialogSalerReportDetail from './Comp/DialogSalerReportDetail.vue'
|
||||||
|
|
||||||
|
import * as reportApi from '@/api/home/reportSaler'
|
||||||
|
import { getSimpleSourceList as getResourceOptions } from '@/api/clue/source'
|
||||||
|
|
||||||
|
import { removeNullField } from '@/utils'
|
||||||
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
import { handleTree } from '@/utils/tree'
|
||||||
|
import { getIntDictOptions } from '@/utils/dict'
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
|
|
||||||
|
const appStore = useAppStore()
|
||||||
|
onMounted(() => {
|
||||||
|
getOptions()
|
||||||
|
handleReset()
|
||||||
|
handleSearch()
|
||||||
|
})
|
||||||
|
|
||||||
|
const defaultProps = {
|
||||||
|
children: 'children',
|
||||||
|
label: 'sourceName',
|
||||||
|
value: 'sourceId',
|
||||||
|
isLeaf: 'leaf'
|
||||||
|
}
|
||||||
|
|
||||||
|
const sourceOptions = ref([])
|
||||||
|
const licenseTypeOptions = ref([])
|
||||||
|
|
||||||
|
const searchForm = ref({})
|
||||||
|
|
||||||
|
function handleReset() {
|
||||||
|
const year = new Date().getFullYear()
|
||||||
|
const month = new Date().getMonth() + 1
|
||||||
|
searchForm.value = {
|
||||||
|
nickname: undefined,
|
||||||
|
consultTime: [`${year}-${month}-01`, formatDate(new Date())],
|
||||||
|
licenseTypeList: [],
|
||||||
|
sourceId: undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const tableList = ref([])
|
||||||
|
const avgData = ref({})
|
||||||
|
async function handleSearch() {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await reportApi.getList(removeNullField(searchForm.value))
|
||||||
|
tableList.value = data.personDataVOList
|
||||||
|
avgData.value = data.averageDataVO
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSummaries({ columns, data }) {
|
||||||
|
const sums = []
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index == 0) {
|
||||||
|
sums[index] = '统计'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const doubleSumsColumns = [
|
||||||
|
'newClueNumber',
|
||||||
|
'signNumber',
|
||||||
|
'clueCostTotal',
|
||||||
|
'payPriceTotal',
|
||||||
|
'profitTotal'
|
||||||
|
]
|
||||||
|
if (column.property in avgData.value) {
|
||||||
|
sums[index] = `均值: ${avgData.value[column.property]}`
|
||||||
|
} else if (doubleSumsColumns.includes(column.property)) {
|
||||||
|
const values = data.map((item) => Number(item[column.property]))
|
||||||
|
let sum = values.reduce((prev, curr) => prev + curr, 0)
|
||||||
|
let avg = sum / values.length
|
||||||
|
if (['newClueNumber', 'signNumber'].includes(column.property)) {
|
||||||
|
avg = Math.floor(avg)
|
||||||
|
} else {
|
||||||
|
sum = sum.toFixed(2)
|
||||||
|
avg = avg.toFixed(2)
|
||||||
|
}
|
||||||
|
sums[index] = h('div', {}, [h('div', {}, `合计:${sum}`), h('div', {}, `均值:${avg}`)])
|
||||||
|
} else {
|
||||||
|
sums[index] = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return sums
|
||||||
|
}
|
||||||
|
|
||||||
|
const SalerDetailDialog = ref()
|
||||||
|
function handleDetail(info) {
|
||||||
|
SalerDetailDialog.value.open(info, searchForm.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOptions() {
|
||||||
|
getResourceOptions().then((data) => {
|
||||||
|
sourceOptions.value = handleTree(data, 'sourceId')
|
||||||
|
})
|
||||||
|
licenseTypeOptions.value = getIntDictOptions('license_type')
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
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>
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="500px">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
@@ -7,11 +7,17 @@
|
|||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
>
|
>
|
||||||
<el-form-item label="名称" prop="label">
|
<el-form-item label="名称" prop="supplierName">
|
||||||
<el-input v-model="formData.label" placeholder="请输入供应商名称" />
|
<el-input v-model="formData.supplierName" placeholder="请输入供应商名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="微信群" prop="wechatGroup">
|
||||||
<el-input v-model="formData.sort" placeholder="请输入排序" type="number" :min="0" />
|
<el-input v-model="formData.wechatGroup" placeholder="请输入微信群" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="formData.status">
|
||||||
|
<el-radio :label="0"> 启用 </el-radio>
|
||||||
|
<el-radio :label="1"> 禁用 </el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -29,7 +35,7 @@
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
<script name="DialogSupplier" setup>
|
<script name="DialogSupplier" setup>
|
||||||
import * as dictApi from '@/api/system/dict/dict.data'
|
import * as SupplierApi from '@/api/school/setting/supplier'
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
@@ -38,12 +44,12 @@ const dialogTitle = ref('') // 弹窗的标题
|
|||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
label: '',
|
supplierName: '',
|
||||||
sort: 1,
|
wechatGroup: 1,
|
||||||
remark: ''
|
remark: ''
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
label: [{ required: true, message: '名称不能为空', trigger: 'blur' }]
|
supplierName: [{ required: true, message: '名称不能为空', trigger: 'blur' }]
|
||||||
})
|
})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
@@ -57,7 +63,7 @@ const open = async (type, id) => {
|
|||||||
if (id) {
|
if (id) {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
formData.value = await dictApi.getDictData(id)
|
formData.value = await SupplierApi.getSupplier(id)
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
@@ -75,14 +81,11 @@ const submitForm = async () => {
|
|||||||
// 提交请求
|
// 提交请求
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
if (!formData.value.value) {
|
|
||||||
formData.value.value = formData.value.label
|
|
||||||
}
|
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
await dictApi.createDictData(formData.value)
|
await SupplierApi.createSupplier(formData.value)
|
||||||
message.success(t('common.createSuccess'))
|
message.success(t('common.createSuccess'))
|
||||||
} else {
|
} else {
|
||||||
await dictApi.updateDictData(formData.value)
|
await SupplierApi.updateSupplier(formData.value)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
@@ -96,10 +99,9 @@ const submitForm = async () => {
|
|||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
label: '',
|
supplierName: '',
|
||||||
sort: 1,
|
wechatGroup: '',
|
||||||
status: 0,
|
status: 0,
|
||||||
dictType: 'erp_supplier',
|
|
||||||
remark: ''
|
remark: ''
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<el-form ref="queryForm" :model="searchForm" label-width="0" inline>
|
<el-form ref="queryForm" :model="searchForm" label-width="0" inline>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchForm.name"
|
v-model="searchForm.supplierName"
|
||||||
placeholder="请输入名称"
|
placeholder="请输入名称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
@@ -16,8 +16,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-loading="loading" :data="tableList">
|
<el-table v-loading="loading" :data="tableList">
|
||||||
<el-table-column prop="label" label="供应商名称" />
|
<el-table-column prop="supplierName" label="供应商名称" />
|
||||||
<el-table-column prop="sort" label="排序" width="100px" />
|
<el-table-column prop="wechatGroup" label="微信群名称" />
|
||||||
|
<el-table-column label="状态" min-width="150" prop="status">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="remark" label="备注" />
|
<el-table-column prop="remark" label="备注" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
@@ -46,16 +51,16 @@
|
|||||||
<script setup name="SupplierSet">
|
<script setup name="SupplierSet">
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import DialogSupplier from './DialogSupplier.vue'
|
import DialogSupplier from './DialogSupplier.vue'
|
||||||
import * as dictApi from '@/api/system/dict/dict.data'
|
import * as SupplierApi from '@/api/school/setting/supplier'
|
||||||
|
import { DICT_TYPE } from '@/utils/dict'
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
label: '',
|
supplierName: '',
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
pageNo: 1,
|
pageNo: 1
|
||||||
dictType: 'erp_supplier'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
@@ -69,10 +74,9 @@ function handleQuery() {
|
|||||||
}
|
}
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
searchForm.value = {
|
searchForm.value = {
|
||||||
label: '',
|
supplierName: '',
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
pageNo: 1,
|
pageNo: 1
|
||||||
dictType: 'erp_supplier'
|
|
||||||
}
|
}
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
@@ -80,7 +84,7 @@ function resetQuery() {
|
|||||||
async function getList() {
|
async function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await dictApi.getDictDataPage(searchForm.value)
|
const data = await SupplierApi.getSupplierPage(searchForm.value)
|
||||||
tableList.value = data.list
|
tableList.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
@@ -97,7 +101,7 @@ async function handleDelete(id) {
|
|||||||
// 删除的二次确认
|
// 删除的二次确认
|
||||||
await message.delConfirm()
|
await message.delConfirm()
|
||||||
// 发起删除
|
// 发起删除
|
||||||
await dictApi.deleteDictData(id)
|
await SupplierApi.deleteSupplier(id)
|
||||||
message.success(t('common.delSuccess'))
|
message.success(t('common.delSuccess'))
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await getList()
|
await getList()
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<el-table v-loading="loading" class="mt-20px" :data="tableList" border>
|
<el-table v-loading="loading" class="mt-20px" :data="tableList" border>
|
||||||
<el-table-column type="expand" width="30">
|
<el-table-column type="expand" width="30" fixed="left">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="pl-100px pr-100px">
|
<div class="pl-100px pr-100px">
|
||||||
<el-table :data="row.productSpecList">
|
<el-table :data="row.productSpecList">
|
||||||
@@ -71,16 +71,16 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column key="productId" label="产品编码" prop="productId" />
|
<el-table-column key="productId" label="产品编码" prop="productId" />
|
||||||
<el-table-column show-overflow-tooltip label="产品名称" min-width="200" prop="productName" />
|
<el-table-column show-overflow-tooltip label="产品名称" min-width="100" prop="productName" />
|
||||||
<el-table-column label="分类" min-width="90" prop="productCategoryName" />
|
<el-table-column label="分类" width="90" prop="productCategoryName" />
|
||||||
<el-table-column label="品牌" min-width="90" prop="productBrandName" />
|
<el-table-column label="品牌" width="90" prop="productBrandName" />
|
||||||
<el-table-column label="商品图" min-width="80">
|
<el-table-column label="商品图" min-width="80">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-image :src="row.mainImage" @click="imagePreview(row.mainImage)" class="w-30px h-30px" />
|
<el-image :src="row.mainImage" @click="imagePreview(row.mainImage)" class="w-30px h-30px" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="简介" min-width="70" prop="productIntro" />
|
<el-table-column label="简介" min-width="200" prop="productIntro" />
|
||||||
<el-table-column :formatter="dateFormatter" label="创建时间" prop="createTime" width="180" />
|
<el-table-column :formatter="dateFormatter" label="创建时间" prop="createTime" width="120" />
|
||||||
<el-table-column v-for="item in diyFieldList" :key="item.clueParamId" :label="item.label">
|
<el-table-column v-for="item in diyFieldList" :key="item.clueParamId" :label="item.label">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div v-if="item.component == 'DatePicker'">
|
<div v-if="item.component == 'DatePicker'">
|
||||||
|
|||||||
@@ -37,9 +37,9 @@
|
|||||||
<el-select v-model="queryParams.supplier" placeholder="供应商" clearable filterable>
|
<el-select v-model="queryParams.supplier" placeholder="供应商" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in opts.supplier"
|
v-for="item in opts.supplier"
|
||||||
:key="item.value"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.supplierName"
|
||||||
:value="item.value"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -135,7 +135,7 @@ import { allSchemas } from './index.data.js'
|
|||||||
import DialogAdd from './Comp/DialogAdd.vue'
|
import DialogAdd from './Comp/DialogAdd.vue'
|
||||||
import DialogAudit from './Comp/DialogAudit.vue'
|
import DialogAudit from './Comp/DialogAudit.vue'
|
||||||
import * as PurchaseApi from '@/api/mall/purchase'
|
import * as PurchaseApi from '@/api/mall/purchase'
|
||||||
import { getDictOptions } from '@/utils/dict'
|
import { getSupplierSimpleList } from '@/api/school/setting/supplier'
|
||||||
|
|
||||||
const creatPurchase = ref()
|
const creatPurchase = ref()
|
||||||
const auditPurchase = ref()
|
const auditPurchase = ref()
|
||||||
@@ -164,7 +164,9 @@ function getOptions() {
|
|||||||
ProductApi.getSimpleProductList().then((data) => {
|
ProductApi.getSimpleProductList().then((data) => {
|
||||||
opts.value.product = data
|
opts.value.product = data
|
||||||
})
|
})
|
||||||
opts.value.supplier = getDictOptions('erp_supplier')
|
getSupplierSimpleList().then((data) => {
|
||||||
|
opts.value.supplier = data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeProd(val) {
|
function changeProd(val) {
|
||||||
|
|||||||
@@ -22,16 +22,16 @@
|
|||||||
<el-tab-pane :label="t('profile.info.resetPwd')" name="resetPwd">
|
<el-tab-pane :label="t('profile.info.resetPwd')" name="resetPwd">
|
||||||
<ResetPwd />
|
<ResetPwd />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="t('profile.info.userSocial')" name="userSocial">
|
<!-- <el-tab-pane :label="t('profile.info.userSocial')" name="userSocial">
|
||||||
<UserSocial />
|
<UserSocial />
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="Profile">
|
<script setup lang="ts" name="Profile">
|
||||||
import { BasicInfo, ProfileUser, ResetPwd, UserSocial } from './components/'
|
import { BasicInfo, ProfileUser, ResetPwd } from './components/'
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
const activeName = ref('basicInfo')
|
const activeName = ref('basicInfo')
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<ContentWrap style="max-width: 1000px; margin: 0 auto">
|
<ContentWrap style="max-width: 1000px; margin: 0 auto; overflow-x: auto">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class="mb-10px" style="font-size: 24px; letter-spacing: 2px">
|
<div class="mb-10px" style="font-size: 24px; letter-spacing: 2px">
|
||||||
{{ info.title }}
|
{{ info.title }}
|
||||||
@@ -82,6 +82,8 @@ onMounted(() => {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
min-width: 44px;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
:deep(.el-card__body) {
|
:deep(.el-card__body) {
|
||||||
padding: 20px 10px;
|
padding: 20px 10px;
|
||||||
|
|||||||
@@ -26,14 +26,14 @@ const { t } = useI18n()
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
const rules = reactive<FormRules>({
|
const rules = reactive<FormRules>({
|
||||||
nickname: [{ required: true, message: t('profile.rules.nickname'), trigger: 'blur' }],
|
nickname: [{ required: true, message: t('profile.rules.nickname'), trigger: 'blur' }],
|
||||||
email: [
|
// email: [
|
||||||
{ required: true, message: t('profile.rules.mail'), trigger: 'blur' },
|
// { required: true, message: t('profile.rules.mail'), trigger: 'blur' },
|
||||||
{
|
// {
|
||||||
type: 'email',
|
// type: 'email',
|
||||||
message: t('profile.rules.truemail'),
|
// message: t('profile.rules.truemail'),
|
||||||
trigger: ['blur', 'change']
|
// trigger: ['blur', 'change']
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
mobile: [
|
mobile: [
|
||||||
{ required: true, message: t('profile.rules.phone'), trigger: 'blur' },
|
{ required: true, message: t('profile.rules.phone'), trigger: 'blur' },
|
||||||
{
|
{
|
||||||
@@ -59,6 +59,11 @@ const schema = reactive<FormSchema[]>([
|
|||||||
label: t('profile.user.email'),
|
label: t('profile.user.email'),
|
||||||
component: 'Input'
|
component: 'Input'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'wxAlias',
|
||||||
|
label: '微信号',
|
||||||
|
component: 'Input'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'sex',
|
field: 'sex',
|
||||||
label: t('profile.user.sex'),
|
label: t('profile.user.sex'),
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ const bindSocial = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const bind = (row) => {
|
const bind = (row) => {
|
||||||
message.info('暂未开放,敬请期待')
|
// message.info('暂未开放,敬请期待')
|
||||||
return
|
// return
|
||||||
const redirectUri = location.origin + '/user/profile?type=' + row.type
|
const redirectUri = location.origin + '/user/profile?type=' + row.type
|
||||||
// 进行跳转
|
// 进行跳转
|
||||||
socialAuthRedirect(row.type, encodeURIComponent(redirectUri)).then((res) => {
|
socialAuthRedirect(row.type, encodeURIComponent(redirectUri)).then((res) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user