Compare commits
195 Commits
salary
...
d74161b8ce
| Author | SHA1 | Date | |
|---|---|---|---|
| d74161b8ce | |||
|
|
4735da7362 | ||
|
|
4b030babe2 | ||
|
|
3aaa26fdc2 | ||
|
|
78cd9f04bc | ||
|
|
dc3292982a | ||
| e8ec9bdc47 | |||
|
|
6726bd7756 | ||
|
|
a8bf678f2e | ||
|
|
3ec039050f | ||
|
|
6baa78a94f | ||
|
|
770d700ba1 | ||
|
|
039ab28c15 | ||
|
|
f75140e135 | ||
|
|
467e1eceb7 | ||
|
|
47bac0315f | ||
|
|
ce0da69b5f | ||
|
|
0d99fbac80 | ||
|
|
06681658fc | ||
| 6a07c0c711 | |||
|
|
3abe367954 | ||
| b3435a9a86 | |||
|
|
2eac9d0fc9 | ||
|
|
f7924d7cb1 | ||
|
|
6ac19b825e | ||
| 6d83198a9f | |||
|
|
e10fedb4dc | ||
|
|
f70cdfb074 | ||
| 29ee948cbb | |||
|
|
ac70a128c1 | ||
| f044dbbe7b | |||
|
|
21ff3718bd | ||
| 1c0f0651d8 | |||
|
|
1778ea9fb4 | ||
| b052af5507 | |||
|
|
e4ae5e275f | ||
| 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 | |||
|
|
f6ed6575c4 | ||
|
|
cab0b3f2eb | ||
|
|
f415e0cfce | ||
|
|
90f7513ca8 | ||
|
|
cad9fbb0e0 | ||
|
|
187c156e88 | ||
| 842e6ea24b | |||
| 6908183a36 | |||
|
|
fb466e207c | ||
|
|
8a857e03af | ||
|
|
7de4adeaad | ||
|
|
3e714a0bc8 | ||
| af9bcb7024 | |||
|
|
3678c5fcc4 | ||
| 5c6c3df4d0 | |||
| acdcc670de | |||
|
|
ecc89f47bb | ||
|
|
41e256aabb | ||
|
|
cc5648414e | ||
|
|
0555c0e42e | ||
|
|
7665389a8d | ||
|
|
0540513894 | ||
|
|
0673721ad7 | ||
|
|
71f6dacba4 | ||
|
|
735d638b49 | ||
|
|
f7980cf66a | ||
|
|
a72db9307d | ||
| 9472c5ea56 | |||
|
|
9ebd81cc2c | ||
| 4f150b0912 | |||
|
|
efe4cf000c | ||
|
|
fa526a8471 | ||
|
|
076f301920 | ||
| f76d6dce66 | |||
|
|
5eccb83e3f | ||
|
|
e25d507bd0 | ||
| dd4bdb0786 | |||
|
|
51f7a85542 | ||
|
|
baf325cda6 | ||
|
|
e3e5fa7eeb | ||
| 477a279867 | |||
| 45f4c4c8af | |||
|
|
2c5d239311 | ||
|
|
03d7c87934 | ||
|
|
42fec8b681 | ||
|
|
4bc0e006f0 | ||
|
|
230e4bf577 | ||
| c87637cc78 | |||
|
|
a01363dba2 | ||
|
|
31f3df9932 | ||
|
|
347069dbee | ||
|
|
57d6aa3a0e | ||
|
|
d6be0488c4 | ||
| a544840679 | |||
|
|
c2e4bfe609 | ||
| 247c6ed4a0 | |||
|
|
e6906818e8 | ||
|
|
004915e956 | ||
|
|
2cf95c4e5d | ||
|
|
db22a8ae8a | ||
| 769c901954 | |||
|
|
1be86c7699 | ||
|
|
a5e1a97d93 | ||
|
|
a3dc76e6a8 | ||
|
|
e60eb51f45 | ||
|
|
183794746b | ||
| 18bfc7d353 | |||
|
|
29f9dc5661 | ||
| fb6b341242 | |||
|
|
78d9f0649e | ||
| fea69da8ed | |||
|
|
22bc22c00a | ||
| 125f6f28ad | |||
|
|
925887f4c9 | ||
|
|
605151c5c8 | ||
|
|
feccb2a1fa | ||
| 39cddaa8e0 | |||
|
|
6922d1cb4c | ||
|
|
440dfe8747 | ||
|
|
48689642d8 | ||
| ffd15e2433 | |||
|
|
1e40357e51 | ||
|
|
60231e4005 | ||
|
|
252f23f96d | ||
|
|
904d76208d | ||
|
|
8d9c426773 | ||
|
|
2be616917e | ||
|
|
b2a7fa8dc4 | ||
|
|
98fc520e27 | ||
|
|
97b941055e | ||
|
|
ec14af1351 | ||
|
|
160f7c959e | ||
| 2bebd0480e | |||
|
|
cbfe115e88 | ||
|
|
a35a88d970 | ||
|
|
ed4522b043 | ||
|
|
e1285ed9c3 | ||
| 3036140859 |
12
.env.base
12
.env.base
@@ -4,11 +4,17 @@ VITE_NODE_ENV=development
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
||||
# VITE_BASE_URL='http://114.55.169.15:48080'
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
# VITE_BASE_URL='http://47.98.161.246:48080'
|
||||
#VITE_BASE_URL='http://114.215.207.150:48080'
|
||||
|
||||
# 小程序接口请求路劲
|
||||
VITE_APPLET_URL='https://cloud.ahduima.com'
|
||||
# 题库路径
|
||||
VITE_TIKU_URL = 'http://47.98.161.246'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
||||
# VITE_UPLOAD_URL='http://114.55.169.15:48080/admin-api/system/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
|
||||
2
.env.dev
2
.env.dev
@@ -7,7 +7,7 @@ VITE_DEV=false
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
|
||||
@@ -4,10 +4,11 @@ VITE_NODE_ENV=development
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
||||
#VITE_BASE_URL='http://47.98.161.246: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://47.98.161.246:48080/admin-api/system/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
|
||||
@@ -7,7 +7,7 @@ VITE_DEV=false
|
||||
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
|
||||
@@ -7,7 +7,7 @@ VITE_DEV=false
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
|
||||
@@ -7,7 +7,7 @@ VITE_DEV=false
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
|
||||
15
.vscode/extensions.json
vendored
15
.vscode/extensions.json
vendored
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"voorjaar.windicss-intellisense",
|
||||
"vscode-icons-team.vscode-icons",
|
||||
"davidanson.vscode-markdownlint",
|
||||
"stylelint.vscode-stylelint",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"vue.volar",
|
||||
"lokalise.i18n-ally",
|
||||
"mikestead.dotenv",
|
||||
"eamodio.gitlens",
|
||||
"antfu.iconify"
|
||||
]
|
||||
}
|
||||
16
.vscode/launch.json
vendored
16
.vscode/launch.json
vendored
@@ -1,16 +0,0 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "msedge",
|
||||
"request": "launch",
|
||||
"name": "Launch Edge against localhost",
|
||||
"url": "http://localhost",
|
||||
"webRoot": "${workspaceFolder}/src",
|
||||
"sourceMaps": true
|
||||
}
|
||||
]
|
||||
}
|
||||
54
.vscode/settings.json
vendored
54
.vscode/settings.json
vendored
@@ -1,54 +0,0 @@
|
||||
{
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"prettier.enable": true,
|
||||
"editor.formatOnType": true,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[css]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[scss]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"i18n-ally.localesPaths": ["src/locales"],
|
||||
"i18n-ally.keystyle": "nested",
|
||||
"i18n-ally.sortKeys": true,
|
||||
"i18n-ally.namespace": true,
|
||||
"i18n-ally.enabledParsers": ["ts"],
|
||||
"i18n-ally.sourceLanguage": "en",
|
||||
"i18n-ally.displayLanguage": "zh-CN",
|
||||
"i18n-ally.enabledFrameworks": ["vue", "react"],
|
||||
"god.tsconfig": "./tsconfig.json",
|
||||
"vue-i18n.i18nPaths": "src/locales",
|
||||
"explorer.fileNesting.enabled": true,
|
||||
"explorer.fileNesting.expand": false,
|
||||
"explorer.fileNesting.patterns": {
|
||||
"*.ts": "$(capture).test.ts, $(capture).test.tsx",
|
||||
"*.tsx": "$(capture).test.ts, $(capture).test.tsx",
|
||||
"*.env": "$(capture).env.*",
|
||||
"CHANGELOG.md": "CHANGELOG*",
|
||||
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc,.browserslistrc,vite.config.*,windi.*,tailwind.*,tsconfig.*,postcss*",
|
||||
".eslintrc.js": ".eslintignore,.eslintrc-*,.prettierignore,.stylelintignore,.commitlintrc.js,.prettierrc.js,.stylelint*,stylelint*,prettier.*,.editorconfig"
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,7 @@
|
||||
"min-dash": "^4.1.1",
|
||||
"mitt": "^3.0.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"or": "^0.2.0",
|
||||
"pinia": "^2.1.3",
|
||||
"qrcode": "^1.5.3",
|
||||
"qs": "^6.11.2",
|
||||
@@ -69,6 +70,7 @@
|
||||
"vue": "3.3.4",
|
||||
"vue-amap": "^0.5.10",
|
||||
"vue-dompurify-html": "^5.0.1",
|
||||
"vue-draggable-plus": "^0.5.3",
|
||||
"vue-i18n": "9.2.2",
|
||||
"vue-router": "^4.2.1",
|
||||
"vue-types": "^5.0.3",
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
import { isDark } from '@/utils/is'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import routerSearch from '@/components/RouterSearch/index.vue'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const { getPrefixCls } = useDesign()
|
||||
const prefixCls = getPrefixCls('app')
|
||||
const appStore = useAppStore()
|
||||
const currentSize = computed(() => appStore.getCurrentSize)
|
||||
const greyMode = computed(() => appStore.getGreyMode)
|
||||
const { wsCache } = useCache()
|
||||
|
||||
// 根据浏览器当前主题设置系统主题色
|
||||
const setDefaultTheme = () => {
|
||||
let isDarkTheme = wsCache.get(CACHE_KEY.IS_DARK)
|
||||
let isDarkTheme = cache.local.get(CACHE_KEY.IS_DARK)
|
||||
if (isDarkTheme === null) {
|
||||
isDarkTheme = isDark()
|
||||
}
|
||||
|
||||
30
src/api/clue/extraFee.js
Normal file
30
src/api/clue/extraFee.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获得列表
|
||||
export const getExtraFeePage = (params) => {
|
||||
return request.get({ url: '/admin-api/crm/extra-pay/page', params })
|
||||
}
|
||||
|
||||
// 创建
|
||||
export const createExtraFee = (data) => {
|
||||
return request.post({ url: '/admin-api/crm/extra-pay/create', data, isSubmitForm: true })
|
||||
}
|
||||
|
||||
// 更新
|
||||
export const updateExtraFee = (data) => {
|
||||
return request.put({ url: '/admin-api/crm/extra-pay/update', data })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteExtraFee = (id) => {
|
||||
return request.delete({ url: `/admin-api/crm/extra-pay/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得
|
||||
export const getExtraFee = (id) => {
|
||||
return request.get({ url: `/admin-api/crm/extra-pay/get?id=${id}` })
|
||||
}
|
||||
|
||||
export const getExtraFeeSimpleList = async () => {
|
||||
return await request.get({ url: '/admin-api/crm/extra-pay/simple-list' })
|
||||
}
|
||||
@@ -6,8 +6,8 @@ export const getSimpleClueList = async () => {
|
||||
}
|
||||
|
||||
// 查询列表
|
||||
export const getCluePage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-clue/page', params })
|
||||
export const getCluePage = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sch-clue/page', data })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
@@ -58,3 +58,7 @@ export const getPublicClue = async (data) => {
|
||||
export const getFollowUserList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-clue/get-follow-user', params })
|
||||
}
|
||||
|
||||
export const batchUpdateFollowUser = async (data) => {
|
||||
return await request.put({ url: '/admin-api/crm/sch-clue/batchUpdateFollowUser', data })
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ export const getPaymentList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/list', params })
|
||||
}
|
||||
|
||||
// 查询(精简)列表
|
||||
// 查询列表
|
||||
export const getPaymentPage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/page', params })
|
||||
}
|
||||
@@ -37,3 +37,16 @@ export const cancelApplyPayment = async (data) => {
|
||||
export const getPaymentDetail = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/get', params })
|
||||
}
|
||||
|
||||
// 撤销
|
||||
export const updateApplyPayment = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/sign-pay-record/updateRecordMoney',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 导出
|
||||
export const exportPayment = async (params) => {
|
||||
return await request.download({ url: '/admin-api/crm/sign-pay-record/export-excel', params })
|
||||
}
|
||||
|
||||
@@ -24,3 +24,8 @@ export const getMallSettleDetail = async (id) => {
|
||||
export const batchSaveSettle = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign-settlement/batch/save', data })
|
||||
}
|
||||
|
||||
// 修改结算
|
||||
export const updateSettle = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign-settlement/update/money', data })
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询列表
|
||||
export const getSignPage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign/page', params })
|
||||
export const getSignPage = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign/page', data })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
@@ -29,3 +29,35 @@ export const signAddPay = async (data) => {
|
||||
export const getSignExtraPayList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign/extra-pay/get', params })
|
||||
}
|
||||
|
||||
// 安装状态修改
|
||||
export const updateInstallStatus = (signIdList, installStatus) => {
|
||||
const data = {
|
||||
signIdList,
|
||||
installStatus
|
||||
}
|
||||
return request.post({ url: '/admin-api/crm/sign/install-status/batchSave', data: data })
|
||||
}
|
||||
|
||||
// 修改生产状态
|
||||
export const updateProduceStatus = (data) => {
|
||||
return request.put({ url: '/admin-api/crm/sign-prodcut/update', data: data })
|
||||
}
|
||||
|
||||
export const updateProduceSort = (data) => {
|
||||
return request.post({ url: '/admin-api/crm/sign-prodcut/adjust/sort', data: data })
|
||||
}
|
||||
|
||||
export const getSignProfit = (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 })
|
||||
}
|
||||
42
src/api/kpi/index.js
Normal file
42
src/api/kpi/index.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 创建
|
||||
export const createKpi = (data) => {
|
||||
return request.post({
|
||||
url: '/admin-api/oa/examine-configuration/create',
|
||||
data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export const updateKpi = (data) => {
|
||||
return request.put({ url: '/admin-api/oa/examine-configuration/update', data })
|
||||
}
|
||||
|
||||
// 修改状态
|
||||
export const updateKpiStatus = (data) => {
|
||||
return request.put({ url: '/admin-api/oa/examine-configuration/status/update', data })
|
||||
}
|
||||
|
||||
// 分页
|
||||
export const getKpiPage = (params) => {
|
||||
return request.get({ url: '/admin-api/oa/examine-configuration/page', params })
|
||||
}
|
||||
|
||||
// 详情
|
||||
export const getKpiDetail = (id) => {
|
||||
return request.get({ url: '/admin-api/oa/examine-configuration/get', params: { id } })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteKpi = (id) => {
|
||||
return request.delete({ url: '/admin-api/oa/examine-configuration/delete', params: { id } })
|
||||
}
|
||||
|
||||
//
|
||||
export const getKpiEmployees = () => {
|
||||
return request.get({
|
||||
url: '/admin-api/oa/employee/examinedEmployees'
|
||||
})
|
||||
}
|
||||
41
src/api/kpi/score.js
Normal file
41
src/api/kpi/score.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 打分数据
|
||||
export const getKpiEmployees = (params) => {
|
||||
return request.get({ url: '/admin-api/oa/examine-score/getExamineUserExamineScore', params })
|
||||
}
|
||||
|
||||
// 保存考勤打分数据
|
||||
export const saveKpiScore = (data) => {
|
||||
return request.put({ url: '/admin-api/oa/examine-score/update', data })
|
||||
}
|
||||
|
||||
// 删除考核项
|
||||
export const deleteKpiItem = (params) => {
|
||||
return request.delete({ url: '/admin-api/oa/examine-score/delete', params })
|
||||
}
|
||||
|
||||
// 考评分页数据
|
||||
export const getScorePage = (params) => {
|
||||
return request.get({ url: '/admin-api/oa/examine-period/page', params })
|
||||
}
|
||||
|
||||
// 封存
|
||||
export const saveScoreRecord = (params) => {
|
||||
return request.get({ url: '/admin-api/oa/examine-period/confirm', params })
|
||||
}
|
||||
|
||||
// 查询周期是否已封存
|
||||
export const getKpiPeriodStatus = (params) => {
|
||||
return request.get({ url: '/admin-api/oa/examine-period/getExaminePeriodByPeriod', params })
|
||||
}
|
||||
|
||||
// 查询考核记录
|
||||
export const getScoreRecord = (data) => {
|
||||
return request.post({ url: '/admin-api/oa/examine-result/periodPage', data })
|
||||
}
|
||||
|
||||
// 查详情
|
||||
export const getScoreDetail = (params) => {
|
||||
return request.get({ url: '/admin-api/oa/examine-result/detail', params })
|
||||
}
|
||||
@@ -71,3 +71,10 @@ export const getAppInfo = (instanceId: number) => {
|
||||
url: '/admin-api/system/serviceInstance/getInstanceInfo?instanceId=' + instanceId
|
||||
})
|
||||
}
|
||||
|
||||
export const bindWx = (data: any) => {
|
||||
return request.post({
|
||||
url: '/admin-api/system/user/bind/wx',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
33
src/api/school/setting/area.js
Normal file
33
src/api/school/setting/area.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import request from '@/config/axios'
|
||||
// 查询列表
|
||||
export const getAreaPage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/area/page', params })
|
||||
}
|
||||
|
||||
export const getAreaSimpleList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/area/simple-list', params })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getArea = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/area/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createArea = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/area/create',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export const updateArea = async (params) => {
|
||||
return await request.put({ url: '/admin-api/crm/area/update', data: params })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteArea = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/area/delete?id=' + id })
|
||||
}
|
||||
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 })
|
||||
}
|
||||
@@ -41,3 +41,13 @@ export const updateDept = async (params: DeptVO) => {
|
||||
export const deleteDept = async (id: number) => {
|
||||
return await request.delete({ url: '/admin-api/system/dept/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 获取部门业务指标
|
||||
export const getDeptTarget = async (deptId: number) => {
|
||||
return await request.get({ url: '/admin-api/crm/dept-target/get', params: { deptId } })
|
||||
}
|
||||
|
||||
// 更新部门业务指标
|
||||
export const updateDeptTarget = async (data: any) => {
|
||||
return await request.put({ url: '/admin-api/crm/dept-target/save', data, isSubmitForm: true })
|
||||
}
|
||||
|
||||
@@ -44,6 +44,11 @@ export const deleteDictData = (id: number) => {
|
||||
}
|
||||
|
||||
// 导出字典类型数据
|
||||
export const exportDictData = (params) => {
|
||||
export const exportDictData = (params: any) => {
|
||||
return request.get({ url: '/admin-api/crm/dict-data/export', params })
|
||||
}
|
||||
|
||||
// 获取通用字典数据
|
||||
export const getGeneralSysDictData = (dictType: string) => {
|
||||
return request.get({ url: '/admin-api/system/dict-data/get-by-type', params: { dictType } })
|
||||
}
|
||||
|
||||
@@ -17,7 +17,10 @@ export interface MenuVO {
|
||||
alwaysShow?: boolean
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 获取服务列表
|
||||
export const getServiceAppList = () => {
|
||||
return request.get({ url: '/admin-api/system/service/list' })
|
||||
}
|
||||
// 查询菜单(精简)列表
|
||||
export const getSimpleMenusList = () => {
|
||||
return request.get({ url: '/admin-api/system/menu/list-all-simple' })
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import request from '@/config/axios'
|
||||
import qs from 'qs'
|
||||
|
||||
export interface NotifyMessageVO {
|
||||
id: number
|
||||
@@ -16,35 +15,39 @@ export interface NotifyMessageVO {
|
||||
}
|
||||
|
||||
// 查询站内信消息列表
|
||||
export const getNotifyMessagePage = async (params: PageParam) => {
|
||||
export const getNotifyMessagePage = async (params: any) => {
|
||||
return await request.get({ url: '/admin-api/system/notify-message/page', params })
|
||||
}
|
||||
|
||||
// 获得我的站内信分页
|
||||
export const getMyNotifyMessagePage = async (params: PageParam) => {
|
||||
export const getMyNotifyMessagePage = async (params: any) => {
|
||||
return await request.get({ url: '/admin-api/system/notify-message/my-page', params })
|
||||
}
|
||||
|
||||
// 批量标记已读
|
||||
export const updateNotifyMessageRead = async (ids) => {
|
||||
export const updateNotifyMessageRead = async (data: any) => {
|
||||
return await request.put({
|
||||
url:
|
||||
'/admin-api/system/notify-message/update-read?' +
|
||||
qs.stringify({ ids: ids }, { indices: false })
|
||||
url: '/admin-api/system/notify-message/update-read?',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 标记所有站内信为已读
|
||||
export const updateAllNotifyMessageRead = async () => {
|
||||
return await request.put({ url: '/admin-api/system/notify-message/update-all-read' })
|
||||
export const updateAllNotifyMessageRead = async (data: any) => {
|
||||
return await request.put({ url: '/admin-api/system/notify-message/update-all-read', data })
|
||||
}
|
||||
|
||||
// 获取当前用户的最新站内信列表
|
||||
export const getUnreadNotifyMessageList = async () => {
|
||||
return await request.get({ url: '/admin-api/system/notify-message/get-unread-list' })
|
||||
export const getUnreadNotifyMessageList = async (params: any) => {
|
||||
return await request.get({ url: '/admin-api/system/notify-message/get-unread-list', params })
|
||||
}
|
||||
|
||||
// 获得当前用户的未读站内信数量
|
||||
export const getUnreadNotifyMessageCount = async () => {
|
||||
return await request.get({ url: '/admin-api/system/notify-message/get-unread-count' })
|
||||
export const getUnreadNotifyMessageCount = async (params: any) => {
|
||||
return await request.get({ url: '/admin-api/system/notify-message/get-unread-count', params })
|
||||
}
|
||||
|
||||
// 获取详情
|
||||
export const getNotifyMessageDetail = async (id: number) => {
|
||||
return await request.get({ url: '/admin-api/system/notify-message/get', params: { id } })
|
||||
}
|
||||
|
||||
25
src/api/system/role/daliyReport.js
Normal file
25
src/api/system/role/daliyReport.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获取角色快报配置
|
||||
export const getRoleDaliyReport = async (roleId) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/system/role-message-setting/get',
|
||||
params: { roleId }
|
||||
})
|
||||
}
|
||||
|
||||
// 保存角色每日快报配置
|
||||
export const updateRoleDaliyReport = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/system/role-message-setting/save',
|
||||
data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 获取每日快报发送内容
|
||||
export const getDaliyReportContent = async () => {
|
||||
return await request.get({
|
||||
url: '/admin-api/system/message-item/list-all-simple'
|
||||
})
|
||||
}
|
||||
@@ -12,9 +12,11 @@ export interface UserVO {
|
||||
avatar: string
|
||||
loginIp: string
|
||||
status: number
|
||||
hireStatus: number
|
||||
remark: string
|
||||
loginDate: 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 = {
|
||||
id,
|
||||
status
|
||||
status,
|
||||
retireDate,
|
||||
hireStatus
|
||||
}
|
||||
return request.put({ url: '/admin-api/system/user/update-status', data: data })
|
||||
}
|
||||
@@ -74,3 +83,18 @@ export const updateUserStatus = (id: number, status: number) => {
|
||||
export const getSimpleUserList = (): Promise<UserVO[]> => {
|
||||
return request.get({ url: '/admin-api/system/user/list-all-simple' })
|
||||
}
|
||||
|
||||
// 获取所有用户列表-无权限限制
|
||||
export const getAllUserList = (): Promise<UserVO[]> => {
|
||||
return request.get({ url: '/admin-api/system/user/no/permission/list-all-simple' })
|
||||
}
|
||||
|
||||
// 获取所有包括离职的用户
|
||||
export const getAllUserListWithHire = (): Promise<UserVO[]> => {
|
||||
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 })
|
||||
}
|
||||
|
||||
23
src/api/system/wechat/index.js
Normal file
23
src/api/system/wechat/index.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 更新
|
||||
export const updateWechatConfig = (data) => {
|
||||
return request.post({ url: '/admin-api/system/wx-robot-message-setting/save', data })
|
||||
}
|
||||
|
||||
// 更新发送时间
|
||||
export const updateWechatSendTime = (data) => {
|
||||
return request.put({ url: '/admin-api/system/wx-robot-message-setting/update-send-time', data })
|
||||
}
|
||||
// 更新微信群
|
||||
export const updateWechatGroup = (data) => {
|
||||
return request.put({ url: '/admin-api/system/wx-robot-message-setting/update-wx-group', data })
|
||||
}
|
||||
|
||||
// 获得列表
|
||||
export const getWechatConfigList = (params) => {
|
||||
return request.get({
|
||||
url: '/admin-api/system/wx-robot-message-setting/list',
|
||||
params
|
||||
})
|
||||
}
|
||||
48
src/api/xjapplet/discount.js
Normal file
48
src/api/xjapplet/discount.js
Normal file
@@ -0,0 +1,48 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const getVipDiscountList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/member/discount/list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export const addVipDiscount = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/member/discount/add',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const updateVipDiscount = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/member/discount/update',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const deleteVipDiscount = async (id) => {
|
||||
return await request.delete({
|
||||
url: '/admin-api/applet/xunjia/member/discount/delete?discountId=' + id
|
||||
})
|
||||
}
|
||||
|
||||
export const getVipDiscountOptions = async () => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/member/discount/simple-list'
|
||||
})
|
||||
}
|
||||
|
||||
export const getUserDiscountList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/user/discount/list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export const giveUserDiscount = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/user/discount/send',
|
||||
data
|
||||
})
|
||||
}
|
||||
39
src/api/xjapplet/resell.js
Normal file
39
src/api/xjapplet/resell.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const getResellList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/distribution/list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export const addResell = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/distribution/add',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const updateResell = async (data) => {
|
||||
return await request.put({
|
||||
url: '/admin-api/applet/xunjia/distribution/update',
|
||||
data
|
||||
})
|
||||
}
|
||||
export const deleteResell = async (id) => {
|
||||
return await request.delete({
|
||||
url: '/admin-api/applet/xunjia/distribution/delete?distributionId=' + id
|
||||
})
|
||||
}
|
||||
export const getResellDetail = async (id) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/distribution/' + id
|
||||
})
|
||||
}
|
||||
|
||||
export const getResellSimpleList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/distribution/simple-list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
56
src/api/xjapplet/vip.js
Normal file
56
src/api/xjapplet/vip.js
Normal file
@@ -0,0 +1,56 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const getUserMemberList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/user/member/list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export const giveUserMember = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/user/member/add',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const getVipTypeList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/member/list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export const addVipType = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/member/add',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const updateVipType = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/member/update',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const deleteVipType = async (id) => {
|
||||
return await request.delete({
|
||||
url: '/admin-api/applet/xunjia/member/delete?memberId=' + id
|
||||
})
|
||||
}
|
||||
|
||||
export const getVipTypeOptions = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/member/simple-list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export const getRechargeRecords = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/pay/list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
67
src/api/xjapplet/vipdatabase.js
Normal file
67
src/api/xjapplet/vipdatabase.js
Normal file
@@ -0,0 +1,67 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const addJx = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/question/jx/add',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const getJxQuestionList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/question/jx/list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export const delJxData = async (id) => {
|
||||
return await request.delete({
|
||||
url: `/admin-api/applet/xunjia/question/jx/delete?id=${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export const addMj = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/secret/add',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const getMjList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/secret/list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export const delMj = async (secretId) => {
|
||||
return await request.delete({
|
||||
url: `/admin-api/applet/xunjia/secret/delete?secretId=${secretId}`
|
||||
})
|
||||
}
|
||||
|
||||
export const clearMj = async (secretId) => {
|
||||
return await request.delete({
|
||||
url: `/admin-api/applet/xunjia/secret/clear?secretId=${secretId}`
|
||||
})
|
||||
}
|
||||
|
||||
export const getMjQuestionList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/secret/question/list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export const addMjQuestion = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/secret/question/add',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const delMjQuestion = async (id) => {
|
||||
return await request.delete({
|
||||
url: `/admin-api/applet/xunjia/secret/question/delete?id=${id}`
|
||||
})
|
||||
}
|
||||
48
src/api/xjapplet/xjdatabase.js
Normal file
48
src/api/xjapplet/xjdatabase.js
Normal file
@@ -0,0 +1,48 @@
|
||||
import request from '@/config/axios'
|
||||
export const searchQuestion = async (param) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/question/list',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
export const updateQuestion = async (data) => {
|
||||
return await request.put({
|
||||
url: '/admin-api/applet/xunjia/question/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const addQuestion = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/question/add',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const deleteQuestion = async (id) => {
|
||||
return await request.delete({
|
||||
url: '/admin-api/applet/xunjia/question/delete?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
export const uploadFile = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/xunjia/question/upload',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const getQuestionSort = async (param) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/xunjia/question/sort/list',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
export const getMjList = async (params) => {
|
||||
return await request.get({
|
||||
url: 'http://localhost/tiku-api/tiku/xunjia/secret/list',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
BIN
src/assets/imgs/login2.gif
Normal file
BIN
src/assets/imgs/login2.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 309 KiB |
BIN
src/assets/imgs/shisong.jpg
Normal file
BIN
src/assets/imgs/shisong.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 192 KiB |
@@ -22,13 +22,13 @@ onMounted(() => {
|
||||
appStore.setCssVarTheme()
|
||||
})
|
||||
|
||||
const { width } = useWindowSize()
|
||||
const { width, height } = useWindowSize()
|
||||
|
||||
// 监听窗口变化
|
||||
watch(
|
||||
() => width.value,
|
||||
(width: number) => {
|
||||
if (width < 768) {
|
||||
if (width < 768 || height.value < 450) {
|
||||
!appStore.getMobile ? appStore.setMobile(true) : undefined
|
||||
setCssVar('--left-menu-min-width', '0')
|
||||
appStore.setCollapse(true)
|
||||
|
||||
@@ -67,6 +67,7 @@ const emit = defineEmits(['close'])
|
||||
destroy-on-close
|
||||
draggable
|
||||
lock-scroll
|
||||
append-to-body
|
||||
v-bind="getBindValue"
|
||||
@close="emit('close')"
|
||||
>
|
||||
@@ -75,13 +76,16 @@ const emit = defineEmits(['close'])
|
||||
<slot name="title">
|
||||
{{ title }}
|
||||
</slot>
|
||||
<Icon
|
||||
v-if="fullscreen"
|
||||
:icon="isFullscreen ? 'zmdi:fullscreen-exit' : 'zmdi:fullscreen'"
|
||||
class="mr-22px cursor-pointer is-hover mt-2px z-10"
|
||||
color="var(--el-color-info)"
|
||||
@click="toggleFull"
|
||||
/>
|
||||
<div class="flex items-center">
|
||||
<slot name="btn"></slot>
|
||||
<Icon
|
||||
v-if="fullscreen"
|
||||
:icon="isFullscreen ? 'zmdi:fullscreen-exit' : 'zmdi:fullscreen'"
|
||||
class="mr-22px cursor-pointer is-hover z-10"
|
||||
color="var(--el-color-info)"
|
||||
@click="toggleFull"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -24,7 +24,27 @@ const props = defineProps({
|
||||
default: () => undefined
|
||||
},
|
||||
readonly: propTypes.bool.def(false),
|
||||
modelValue: propTypes.string.def('')
|
||||
modelValue: propTypes.string.def(''),
|
||||
toolbarConfig: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
excludeKeys: [
|
||||
'insertVideo', // 网络视频
|
||||
'insertImage', // 网络图片
|
||||
'insertLink', // 链接
|
||||
'codeBlock', // 代码块
|
||||
'headerSelect', // 标题
|
||||
'blockquote', // 引用
|
||||
'fontFamily', // 字体
|
||||
'todo', // 代办
|
||||
'group-indent', // 缩进
|
||||
'emotion', // 表情
|
||||
'undo', // 撤销
|
||||
'redo', // 重做
|
||||
'fullScreen'
|
||||
]
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['change', 'update:modelValue'])
|
||||
@@ -212,24 +232,6 @@ const editorStyle = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
const toolbarConfig = ref({
|
||||
excludeKeys: [
|
||||
'insertVideo', // 网络视频
|
||||
'insertImage', // 网络图片
|
||||
'insertLink', // 链接
|
||||
'codeBlock', // 代码块
|
||||
'headerSelect', // 标题
|
||||
'blockquote', // 引用
|
||||
'fontFamily', // 字体
|
||||
'todo', // 代办
|
||||
'group-indent', // 缩进
|
||||
'emotion', // 表情
|
||||
'undo', // 撤销
|
||||
'redo', // 重做
|
||||
'fullScreen'
|
||||
]
|
||||
})
|
||||
|
||||
// 回调函数
|
||||
const handleChange = (editor: IDomEditor) => {
|
||||
emit('change', editor)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
v-model:page-size="pageSize"
|
||||
:small="small"
|
||||
:background="true"
|
||||
:page-sizes="[10, 20, 30, 50, 100]"
|
||||
:page-sizes="[10, 50, 100, 500, 1000]"
|
||||
:pager-count="pagerCount"
|
||||
:total="total"
|
||||
class="float-right mt-15px mb-15px"
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="flex">
|
||||
<el-table :data="tableObject.tableList" border style="flex: 1">
|
||||
<el-table
|
||||
:data="tableObject.tableList"
|
||||
:row-key="rowkey"
|
||||
:expand-row-keys="expandRowKeys"
|
||||
border
|
||||
style="flex: 1"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<slot></slot>
|
||||
</el-table>
|
||||
<el-button
|
||||
@@ -53,10 +60,12 @@ import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
tableObject: { type: Object, default: () => ({ tableList: [] }) },
|
||||
tableColumns: { type: Array, default: () => [] }
|
||||
tableColumns: { type: Array, default: () => [] },
|
||||
rowkey: { type: String, default: 'id' },
|
||||
expandRowKeys: { type: Array, default: () => [] }
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:tableObject', 'getList', 'getCheckedColumns'])
|
||||
const emit = defineEmits(['update:tableObject', 'getList', 'getCheckedColumns', 'selection-change'])
|
||||
const route = useRoute()
|
||||
|
||||
const pageNo = ref(props.tableObject?.pageNo || 1)
|
||||
@@ -110,6 +119,10 @@ function onDragEnd() {
|
||||
emitColumns()
|
||||
}
|
||||
|
||||
function handleSelectionChange(val) {
|
||||
emit('selection-change', val)
|
||||
}
|
||||
|
||||
// 勾选确认
|
||||
function confirm() {
|
||||
ClueCacheApi.setClueCache({
|
||||
|
||||
@@ -47,7 +47,7 @@ const props = defineProps({
|
||||
// fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']), // 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: propTypes.array.def([]),
|
||||
accept: propTypes.string.def('*'),
|
||||
fileSize: propTypes.number.def(5), // 大小限制(MB)
|
||||
fileSize: propTypes.number.def(100), // 大小限制(MB)
|
||||
limit: propTypes.number.def(5), // 数量限制
|
||||
autoUpload: propTypes.bool.def(true), // 自动上传
|
||||
drag: propTypes.bool.def(false), // 拖拽上传
|
||||
|
||||
@@ -20,7 +20,6 @@ import {
|
||||
import errorCode from './errorCode'
|
||||
|
||||
import { resetRouter } from '@/router'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const { result_code, base_url, request_timeout } = config
|
||||
@@ -133,6 +132,9 @@ service.interceptors.response.use(
|
||||
throw new Error()
|
||||
}
|
||||
const { t } = useI18n()
|
||||
// if (data.code === undefined) {
|
||||
// return response
|
||||
// }
|
||||
// 未设置状态码则默认成功状态
|
||||
const code = data.code || result_code
|
||||
// 二进制数据则直接返回
|
||||
@@ -206,6 +208,8 @@ service.interceptors.response.use(
|
||||
if (msg === '无效的刷新令牌') {
|
||||
// hard coding:忽略这个提示,直接登出
|
||||
console.log(msg)
|
||||
} else if (code == 18888) {
|
||||
return { data }
|
||||
} else {
|
||||
ElNotification.error({ title: msg })
|
||||
if (code == 403) {
|
||||
@@ -213,11 +217,10 @@ service.interceptors.response.use(
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 无访问权限,退出登录
|
||||
const { wsCache } = useCache()
|
||||
const tenantId = wsCache.get('TENANT_ID')
|
||||
const appId = wsCache.get('App_ID')
|
||||
const tenantId = cache.local.get('TENANT_ID')
|
||||
const appId = cache.local.get('App_ID')
|
||||
resetRouter() // 重置静态路由表
|
||||
wsCache.clear()
|
||||
cache.local.clear()
|
||||
removeToken()
|
||||
window.location.href = `/crm/login?tenantId=${tenantId}&appId=${appId}`
|
||||
})
|
||||
@@ -259,11 +262,10 @@ const handleAuthorized = () => {
|
||||
confirmButtonText: t('login.relogin'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const { wsCache } = useCache()
|
||||
const tenantId = wsCache.get('TENANT_ID')
|
||||
const appId = wsCache.get('App_ID')
|
||||
const tenantId = cache.local.get('TENANT_ID')
|
||||
const appId = cache.local.get('App_ID')
|
||||
resetRouter() // 重置静态路由表
|
||||
wsCache.clear()
|
||||
cache.local.clear()
|
||||
removeToken()
|
||||
isRelogin.show = false
|
||||
// 干掉token后再走一次路由让它过router.beforeEach的校验
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import type { App } from 'vue'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
export function hasPermi(app: App<Element>) {
|
||||
app.directive('hasPermi', (el, binding) => {
|
||||
const { wsCache } = useCache()
|
||||
const { value } = binding
|
||||
const all_permission = '*:*:*'
|
||||
const permissions = wsCache.get(CACHE_KEY.USER).permissions
|
||||
const permissions = cache.local.get(CACHE_KEY.USER)?.permissions || []
|
||||
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const permissionFlag = value
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import type { App } from 'vue'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
export function hasRole(app: App<Element>) {
|
||||
app.directive('hasRole', (el, binding) => {
|
||||
const { wsCache } = useCache()
|
||||
const { value } = binding
|
||||
const super_admin = 'admin'
|
||||
const roles = wsCache.get(CACHE_KEY.USER).roles
|
||||
const roles = cache.local.get(CACHE_KEY.USER).roles
|
||||
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const roleFlag = value
|
||||
|
||||
@@ -229,6 +229,7 @@ const filterFormSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): For
|
||||
value: defaultValue,
|
||||
...schemaItem.form,
|
||||
field: schemaItem.field,
|
||||
isRequired: schemaItem.isRequired,
|
||||
label: schemaItem.form?.label || schemaItem.label
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,12 @@ export const useMessage = () => {
|
||||
},
|
||||
// 成功消息
|
||||
success(content: string) {
|
||||
ElMessage.success(content)
|
||||
// ElMessage.success(content)
|
||||
ElMessage({
|
||||
message: content,
|
||||
duration: 1500,
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
// 警告消息
|
||||
warning(content: string) {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script lang="ts" name="Message" setup>
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import * as NotifyMessageApi from '@/api/system/notify/message'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const { push } = useRouter()
|
||||
const activeName = ref('notice')
|
||||
@@ -9,16 +12,21 @@ const list = ref<any[]>([]) // 消息列表
|
||||
|
||||
// 获得消息列表
|
||||
const getList = async () => {
|
||||
list.value = await NotifyMessageApi.getUnreadNotifyMessageList()
|
||||
const data = await NotifyMessageApi.getUnreadNotifyMessageList({
|
||||
roleId: userStore.getUser?.currentRole
|
||||
})
|
||||
list.value = data.list
|
||||
// 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除
|
||||
unreadCount.value = 0
|
||||
}
|
||||
|
||||
// 获得未读消息数
|
||||
const getUnreadCount = async () => {
|
||||
NotifyMessageApi.getUnreadNotifyMessageCount().then((data) => {
|
||||
unreadCount.value = data
|
||||
})
|
||||
NotifyMessageApi.getUnreadNotifyMessageCount({ roleId: userStore.getUser?.currentRole }).then(
|
||||
(data) => {
|
||||
unreadCount.value = data
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
// 跳转我的站内信
|
||||
@@ -34,9 +42,9 @@ onMounted(() => {
|
||||
// 首次加载小红点
|
||||
getUnreadCount()
|
||||
// 轮询刷新小红点
|
||||
// msgInterval.value = setInterval(() => {
|
||||
// getUnreadCount()
|
||||
// }, 1000 * 60 * 2)
|
||||
msgInterval.value = setInterval(() => {
|
||||
getUnreadCount()
|
||||
}, 1000 * 60 * 2)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
@@ -56,10 +64,9 @@ onUnmounted(() => {
|
||||
<div class="message-list">
|
||||
<template v-for="item in list" :key="item.id">
|
||||
<div class="message-item">
|
||||
<img alt="" class="message-icon" src="@/assets/imgs/avatar.gif" />
|
||||
<div class="message-content">
|
||||
<span class="message-title">
|
||||
{{ item.templateNickname }}:{{ item.templateContent }}
|
||||
{{ item.title }}
|
||||
</span>
|
||||
<span class="message-date">
|
||||
{{ formatDate(item.createTime) }}
|
||||
@@ -94,7 +101,7 @@ onUnmounted(() => {
|
||||
.message-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px 0;
|
||||
padding: 5px 0;
|
||||
border-bottom: 1px solid var(--el-border-color-light);
|
||||
|
||||
&:last-child {
|
||||
@@ -113,6 +120,7 @@ onUnmounted(() => {
|
||||
|
||||
.message-title {
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.message-date {
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
// import { ElMessage } from 'element-plus'
|
||||
// import { useClipboard, useCssVar } from '@vueuse/core'
|
||||
import { useCssVar } from '@vueuse/core'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
import { setCssVar, trim } from '@/utils'
|
||||
import { colorIsDark, hexToRGB, lighten } from '@/utils/color'
|
||||
@@ -195,10 +196,9 @@ watch(
|
||||
|
||||
// 清空缓存
|
||||
const clear = () => {
|
||||
const { wsCache } = useCache()
|
||||
wsCache.delete(CACHE_KEY.LAYOUT)
|
||||
wsCache.delete(CACHE_KEY.THEME)
|
||||
wsCache.delete(CACHE_KEY.IS_DARK)
|
||||
cache.local.delete(CACHE_KEY.LAYOUT)
|
||||
cache.local.delete(CACHE_KEY.THEME)
|
||||
cache.local.delete(CACHE_KEY.IS_DARK)
|
||||
window.location.reload()
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
<script lang="ts" name="UserInfo" setup>
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
import avatarImg from '@/assets/imgs/avatar.gif'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
import { getTenantId, getAppId } from '@/utils/auth'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
import { Setting } from '@/layout/components/Setting'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const { wsCache } = useCache()
|
||||
|
||||
const { push, replace } = useRouter()
|
||||
|
||||
const userStore = useUserStore()
|
||||
@@ -24,7 +23,7 @@ const { getPrefixCls } = useDesign()
|
||||
|
||||
const prefixCls = getPrefixCls('user-info')
|
||||
|
||||
const user = wsCache.get(CACHE_KEY.USER)
|
||||
const user = cache.local.get(CACHE_KEY.USER)
|
||||
|
||||
const avatar = user.user.avatar ? user.user.avatar : avatarImg
|
||||
|
||||
|
||||
@@ -1,67 +1,107 @@
|
||||
import router from './router'
|
||||
import { isRelogin } from '@/config/axios/service'
|
||||
import { getAccessToken } from '@/utils/auth'
|
||||
import { getAccessToken, removeToken } from '@/utils/auth'
|
||||
import { useTitle } from '@/hooks/web/useTitle'
|
||||
import { useNProgress } from '@/hooks/web/useNProgress'
|
||||
import { usePageLoading } from '@/hooks/web/usePageLoading'
|
||||
import { useDictStoreWithOut } from '@/store/modules/dict'
|
||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||
import { usePermissionStoreWithOut } from '@/store/modules/permission'
|
||||
import { getTenantId, getAppId } from '@/utils/auth'
|
||||
import { useAppStoreWithOut } from '@/store/modules/app'
|
||||
import { getTenantId, getAppId, setTenantId, setAppId } from '@/utils/auth'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const { start, done } = useNProgress()
|
||||
|
||||
const { loadStart, loadDone } = usePageLoading()
|
||||
// 路由不重定向白名单
|
||||
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/swagger']
|
||||
const whiteList = [
|
||||
'/login',
|
||||
'/mp-login',
|
||||
'/nm-detail',
|
||||
'/social-login',
|
||||
'/auth-redirect',
|
||||
'/bind',
|
||||
'/register',
|
||||
'/swagger'
|
||||
]
|
||||
|
||||
// 路由加载前
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
start()
|
||||
loadStart()
|
||||
if (getAccessToken()) {
|
||||
if (to.path === '/login') {
|
||||
next({ path: '/' })
|
||||
} else {
|
||||
// 获取所有字典
|
||||
const dictStore = useDictStoreWithOut()
|
||||
const userStore = useUserStoreWithOut()
|
||||
const permissionStore = usePermissionStoreWithOut()
|
||||
if (!dictStore.getIsSetDict) {
|
||||
await dictStore.setDictMap()
|
||||
}
|
||||
if (!userStore.getIsSetUser) {
|
||||
isRelogin.show = true
|
||||
await userStore.setUserInfoAction()
|
||||
isRelogin.show = false
|
||||
// 后端过滤菜单
|
||||
await permissionStore.generateRoutes()
|
||||
permissionStore.getAddRouters.forEach((route) => {
|
||||
router.addRoute(route) // 动态添加可访问路由表
|
||||
})
|
||||
const redirectPath = from.query.redirect || to.path
|
||||
const redirect = decodeURIComponent(redirectPath)
|
||||
const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect }
|
||||
next(nextData)
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
if (getAppId() && to.query?.appId && getAppId() != to.query?.appId) {
|
||||
removeToken()
|
||||
cache?.local?.delete('appInfo')
|
||||
cache?.local?.delete('roleRouters')
|
||||
cache?.local?.delete('user')
|
||||
cache?.local?.delete('App_ID')
|
||||
next(`/login?tenantId=${to.query?.tenantId}&appId=${to.query?.appId}`)
|
||||
} else {
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
} else {
|
||||
const tenantId = getTenantId()
|
||||
const appId = getAppId()
|
||||
if (tenantId && appId) {
|
||||
next(`/crm/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||
if (getAccessToken()) {
|
||||
if (to.path === '/login') {
|
||||
if (to.query?.tenantId && to.query?.appId) {
|
||||
setApp(to.query.tenantId, to.query.appId)
|
||||
await waitTime(1500)
|
||||
}
|
||||
next({ path: '/' })
|
||||
} else {
|
||||
next(`/crm/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||
// 获取所有字典
|
||||
const dictStore = useDictStoreWithOut()
|
||||
const userStore = useUserStoreWithOut()
|
||||
const permissionStore = usePermissionStoreWithOut()
|
||||
if (!dictStore.getIsSetDict) {
|
||||
await dictStore.setDictMap()
|
||||
}
|
||||
if (!userStore.getIsSetUser) {
|
||||
isRelogin.show = true
|
||||
await userStore.setUserInfoAction()
|
||||
isRelogin.show = false
|
||||
// 后端过滤菜单
|
||||
await permissionStore.generateRoutes()
|
||||
permissionStore.getAddRouters.forEach((route) => {
|
||||
router.addRoute(route) // 动态添加可访问路由表
|
||||
})
|
||||
const redirectPath = from.query.redirect || to.path
|
||||
const redirect = decodeURIComponent(redirectPath)
|
||||
const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect }
|
||||
next(nextData)
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
} else {
|
||||
const tenantId = getTenantId()
|
||||
const appId = getAppId()
|
||||
if (tenantId && appId) {
|
||||
next(`/crm/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||
} else {
|
||||
next(`/crm/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
async function waitTime(seconds) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve()
|
||||
}, seconds)
|
||||
})
|
||||
}
|
||||
|
||||
function setApp(tenantId, appId) {
|
||||
setTenantId(tenantId)
|
||||
|
||||
setAppId(appId)
|
||||
const appStore = useAppStoreWithOut()
|
||||
appStore.setAppInfo(appId)
|
||||
}
|
||||
|
||||
router.afterEach((to) => {
|
||||
useTitle(to?.meta?.title)
|
||||
done() // 结束Progress
|
||||
|
||||
8
src/plugins/cache/index.js
vendored
8
src/plugins/cache/index.js
vendored
@@ -26,7 +26,7 @@ const sessionCache = {
|
||||
let storage = storageStr ? JSON.parse(storageStr) : {}
|
||||
return storage[key]
|
||||
},
|
||||
remove(key) {
|
||||
delete(key) {
|
||||
if (!sessionStorage) {
|
||||
return null
|
||||
}
|
||||
@@ -62,7 +62,7 @@ const localCache = {
|
||||
let storage = storageStr ? JSON.parse(storageStr) : {}
|
||||
return storage[key]
|
||||
},
|
||||
remove(key) {
|
||||
delete(key) {
|
||||
if (!localStorage) {
|
||||
return null
|
||||
}
|
||||
@@ -73,6 +73,10 @@ const localCache = {
|
||||
let storage = storageStr ? JSON.parse(storageStr) : {}
|
||||
delete storage[key]
|
||||
localStorage.setItem(name, JSON.stringify(storage))
|
||||
},
|
||||
clear() {
|
||||
let storage = {}
|
||||
localStorage.setItem(name, JSON.stringify(storage))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/Home/index',
|
||||
name: '',
|
||||
@@ -59,6 +59,31 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
title: '首页',
|
||||
hidden: true
|
||||
}
|
||||
// children: [
|
||||
// {
|
||||
// path: '/index',
|
||||
// component: () => import('@/views/Home/Index.vue'),
|
||||
// name: 'Home',
|
||||
// meta: {
|
||||
// title: '首页',
|
||||
// icon: 'ep:home-filled',
|
||||
// noTagsView: true,
|
||||
// affix: true
|
||||
// // hidden: true
|
||||
// }
|
||||
// }
|
||||
// {
|
||||
// path: 'menu',
|
||||
// component: () => import('@/views/Basic/Menu/index.vue'),
|
||||
// name: 'Menu',
|
||||
// meta: {
|
||||
// affix: true,
|
||||
// noTagsView: true,
|
||||
// icon: 'ep:user',
|
||||
// title: '菜单管理'
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
},
|
||||
{
|
||||
path: '/swagger',
|
||||
@@ -106,7 +131,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
// {
|
||||
// path: '/dict',
|
||||
// component: Layout,
|
||||
@@ -130,7 +154,27 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
|
||||
// {
|
||||
// path: '/Basic',
|
||||
// component: Layout,
|
||||
// name: 'Basic',
|
||||
// redirect: '/Basic/menu',
|
||||
// meta: { title: '菜单管理' },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'menu',
|
||||
// component: () => import('@/views/Basic/Menu/index.vue'),
|
||||
// name: 'Menu',
|
||||
// meta: {
|
||||
// canTo: true,
|
||||
// hidden: true,
|
||||
// noTagsView: false,
|
||||
// icon: 'ep:user',
|
||||
// title: '菜单管理'
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/Login/Login.vue'),
|
||||
@@ -141,6 +185,16 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
noTagsView: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/mp-login',
|
||||
component: () => import('@/views/Login/MPLogin.vue'),
|
||||
name: 'MPLogin',
|
||||
meta: {
|
||||
hidden: true,
|
||||
title: '用户绑定',
|
||||
noTagsView: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/sso',
|
||||
component: () => import('@/views/Login/Login.vue'),
|
||||
@@ -151,6 +205,16 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
noTagsView: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/nm-detail',
|
||||
component: () => import('@/views/Profile/NotifyMessageDetail.vue'),
|
||||
name: 'NMDetail',
|
||||
meta: {
|
||||
hidden: true,
|
||||
title: '通知详情',
|
||||
noTagsView: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/403',
|
||||
component: () => import('@/views/Error/403.vue'),
|
||||
|
||||
@@ -2,13 +2,12 @@ import { defineStore } from 'pinia'
|
||||
import { store } from '../index'
|
||||
import { setCssVar, humpToUnderline } from '@/utils'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import { ElementPlusSize } from '@/types/elementPlus'
|
||||
import { LayoutType } from '@/types/layout'
|
||||
import { ThemeTypes } from '@/types/theme'
|
||||
import { getAppInfo } from '@/api/login'
|
||||
|
||||
const { wsCache } = useCache()
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
interface AppState {
|
||||
breadcrumb: boolean
|
||||
@@ -46,7 +45,7 @@ export const useAppStore = defineStore('app', {
|
||||
sizeMap: ['default', 'large', 'small'],
|
||||
mobile: false, // 是否是移动端
|
||||
title: import.meta.env.VITE_APP_TITLE, // 标题
|
||||
appInfo: wsCache.get('appInfo'),
|
||||
appInfo: cache.local.get('appInfo'),
|
||||
pageLoading: false, // 路由跳转loading
|
||||
|
||||
breadcrumb: true, // 面包屑
|
||||
@@ -64,12 +63,12 @@ export const useAppStore = defineStore('app', {
|
||||
fixedHeader: true, // 固定toolheader
|
||||
footer: false, // 显示页脚
|
||||
greyMode: false, // 是否开始灰色模式,用于特殊悼念日
|
||||
fixedMenu: wsCache.get('fixedMenu') || false, // 是否固定菜单
|
||||
fixedMenu: cache.local.get('fixedMenu') || false, // 是否固定菜单
|
||||
|
||||
layout: wsCache.get(CACHE_KEY.LAYOUT) || 'classic', // layout布局
|
||||
isDark: wsCache.get(CACHE_KEY.IS_DARK) || false, // 是否是暗黑模式
|
||||
currentSize: wsCache.get('default') || 'default', // 组件尺寸
|
||||
theme: wsCache.get(CACHE_KEY.THEME) || {
|
||||
layout: cache.local.get(CACHE_KEY.LAYOUT) || 'classic', // layout布局
|
||||
isDark: cache.local.get(CACHE_KEY.IS_DARK) || false, // 是否是暗黑模式
|
||||
currentSize: cache.local.get('default') || 'default', // 组件尺寸
|
||||
theme: cache.local.get(CACHE_KEY.THEME) || {
|
||||
// 主题色
|
||||
elColorPrimary: '#409eff',
|
||||
// 左侧菜单边框颜色
|
||||
@@ -225,7 +224,7 @@ export const useAppStore = defineStore('app', {
|
||||
this.greyMode = greyMode
|
||||
},
|
||||
setFixedMenu(fixedMenu: boolean) {
|
||||
wsCache.set('fixedMenu', fixedMenu)
|
||||
cache.local.set('fixedMenu', fixedMenu)
|
||||
this.fixedMenu = fixedMenu
|
||||
},
|
||||
setPageLoading(pageLoading: boolean) {
|
||||
@@ -237,7 +236,7 @@ export const useAppStore = defineStore('app', {
|
||||
return
|
||||
}
|
||||
this.layout = layout
|
||||
wsCache.set(CACHE_KEY.LAYOUT, this.layout)
|
||||
cache.local.set(CACHE_KEY.LAYOUT, this.layout)
|
||||
},
|
||||
setTitle(title: string) {
|
||||
this.title = title
|
||||
@@ -251,18 +250,18 @@ export const useAppStore = defineStore('app', {
|
||||
document.documentElement.classList.add('light')
|
||||
document.documentElement.classList.remove('dark')
|
||||
}
|
||||
wsCache.set(CACHE_KEY.IS_DARK, this.isDark)
|
||||
cache.local.set(CACHE_KEY.IS_DARK, this.isDark)
|
||||
},
|
||||
setCurrentSize(currentSize: ElementPlusSize) {
|
||||
this.currentSize = currentSize
|
||||
wsCache.set('currentSize', this.currentSize)
|
||||
cache.local.set('currentSize', this.currentSize)
|
||||
},
|
||||
setMobile(mobile: boolean) {
|
||||
this.mobile = mobile
|
||||
},
|
||||
setTheme(theme: ThemeTypes) {
|
||||
this.theme = Object.assign(this.theme, theme)
|
||||
wsCache.set(CACHE_KEY.THEME, this.theme)
|
||||
cache.local.set(CACHE_KEY.THEME, this.theme)
|
||||
},
|
||||
setCssVarTheme() {
|
||||
for (const key in this.theme) {
|
||||
@@ -274,7 +273,7 @@ export const useAppStore = defineStore('app', {
|
||||
},
|
||||
async setAppInfo(appId: number) {
|
||||
const appInfo = await getAppInfo(appId)
|
||||
wsCache.set('appInfo', appInfo)
|
||||
cache.local.set('appInfo', appInfo)
|
||||
this.appInfo = appInfo
|
||||
return appInfo
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ import { defineStore } from 'pinia'
|
||||
import { store } from '../index'
|
||||
// @ts-ignore
|
||||
import { DictDataVO } from '@/api/system/dict/types'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
const { wsCache } = useCache('sessionStorage')
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import cache from '@/plugins/cache'
|
||||
import { listSimpleDictData } from '@/api/system/dict/dict.data'
|
||||
|
||||
export interface DictValueType {
|
||||
@@ -28,7 +28,7 @@ export const useDictStore = defineStore('dict', {
|
||||
}),
|
||||
getters: {
|
||||
getDictMap(): Recordable {
|
||||
const dictMap = wsCache.get(CACHE_KEY.DICT_CACHE)
|
||||
const dictMap = cache.session.get(CACHE_KEY.DICT_CACHE)
|
||||
if (dictMap) {
|
||||
this.dictMap = dictMap
|
||||
}
|
||||
@@ -40,12 +40,12 @@ export const useDictStore = defineStore('dict', {
|
||||
},
|
||||
actions: {
|
||||
async setDictMap() {
|
||||
const dictMap = wsCache.get(CACHE_KEY.DICT_CACHE)
|
||||
const dictMap = cache.session.get(CACHE_KEY.DICT_CACHE)
|
||||
if (dictMap) {
|
||||
this.dictMap = dictMap
|
||||
this.isSetDict = true
|
||||
} else {
|
||||
const res = await listSimpleDictData()
|
||||
const res = (await listSimpleDictData()) || []
|
||||
// 设置数据
|
||||
const dictDataMap = new Map<string, any>()
|
||||
res.forEach((dictData: DictDataVO) => {
|
||||
@@ -64,7 +64,7 @@ export const useDictStore = defineStore('dict', {
|
||||
})
|
||||
this.dictMap = dictDataMap
|
||||
this.isSetDict = true
|
||||
wsCache.set(CACHE_KEY.DICT_CACHE, dictDataMap, { exp: 60 }) // 60 秒 过期
|
||||
cache.session.set(CACHE_KEY.DICT_CACHE, dictDataMap) // 60 秒 过期
|
||||
}
|
||||
},
|
||||
getDictByType(type: string) {
|
||||
@@ -74,8 +74,8 @@ export const useDictStore = defineStore('dict', {
|
||||
return this.dictMap[type]
|
||||
},
|
||||
async resetDict() {
|
||||
wsCache.delete(CACHE_KEY.DICT_CACHE)
|
||||
const res = await listSimpleDictData()
|
||||
cache.session.delete(CACHE_KEY.DICT_CACHE)
|
||||
const res = (await listSimpleDictData()) || []
|
||||
// 设置数据
|
||||
const dictDataMap = new Map<string, any>()
|
||||
res.forEach((dictData: DictDataVO) => {
|
||||
@@ -94,7 +94,7 @@ export const useDictStore = defineStore('dict', {
|
||||
})
|
||||
this.dictMap = dictDataMap
|
||||
this.isSetDict = true
|
||||
wsCache.set(CACHE_KEY.DICT_CACHE, dictDataMap, { exp: 60 }) // 60 秒 过期
|
||||
cache.session.set(CACHE_KEY.DICT_CACHE, dictDataMap) // 60 秒 过期
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -3,9 +3,8 @@ import { store } from '../index'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import remainingRouter from '@/router/modules/remaining'
|
||||
import { generateRoute, flatMultiLevelRoutes } from '@/utils/routerHelper'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
|
||||
const { wsCache } = useCache()
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
export interface PermissionState {
|
||||
routers: AppRouteRecordRaw[]
|
||||
@@ -34,8 +33,8 @@ export const usePermissionStore = defineStore('permission', {
|
||||
async generateRoutes(): Promise<unknown> {
|
||||
return new Promise<void>(async (resolve) => {
|
||||
let res: AppCustomRouteRecordRaw[] = []
|
||||
if (wsCache.get(CACHE_KEY.ROLE_ROUTERS)) {
|
||||
res = wsCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
|
||||
if (cache.local.get(CACHE_KEY.ROLE_ROUTERS)) {
|
||||
res = cache.local.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
|
||||
}
|
||||
const routerMap: AppRouteRecordRaw[] = generateRoute(res)
|
||||
// 动态路由,404一定要放到最后面
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { store } from '../index'
|
||||
import { defineStore } from 'pinia'
|
||||
import { getAccessToken, removeToken } from '@/utils/auth'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import { getInfo, loginOut } from '@/api/login'
|
||||
|
||||
const { wsCache } = useCache()
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
interface UserVO {
|
||||
id: number
|
||||
avatar: string
|
||||
nickname: string
|
||||
currentRole: number
|
||||
}
|
||||
interface UserInfoVO {
|
||||
permissions: string[]
|
||||
@@ -26,7 +26,8 @@ export const useUserStore = defineStore('admin-user', {
|
||||
user: {
|
||||
id: 0,
|
||||
avatar: '',
|
||||
nickname: ''
|
||||
nickname: '',
|
||||
currentRole: 0
|
||||
}
|
||||
}),
|
||||
getters: {
|
||||
@@ -49,21 +50,21 @@ export const useUserStore = defineStore('admin-user', {
|
||||
this.resetState()
|
||||
return null
|
||||
}
|
||||
let userInfo = wsCache.get(CACHE_KEY.USER)
|
||||
if (!userInfo) {
|
||||
let userInfo = cache.local.get(CACHE_KEY.USER)
|
||||
if (!userInfo || !userInfo?.menus || userInfo.menus.length == 0) {
|
||||
userInfo = await getInfo({})
|
||||
}
|
||||
this.permissions = userInfo.permissions
|
||||
this.roles = userInfo.roles
|
||||
this.user = userInfo.user
|
||||
this.isSetUser = true
|
||||
wsCache.set(CACHE_KEY.USER, userInfo)
|
||||
wsCache.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus)
|
||||
cache.local.set(CACHE_KEY.USER, userInfo)
|
||||
cache.local.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus)
|
||||
},
|
||||
async loginOut() {
|
||||
await loginOut()
|
||||
removeToken()
|
||||
wsCache.clear()
|
||||
// cache.local.clear()
|
||||
this.resetState()
|
||||
},
|
||||
resetState() {
|
||||
@@ -73,11 +74,12 @@ export const useUserStore = defineStore('admin-user', {
|
||||
this.user = {
|
||||
id: 0,
|
||||
avatar: '',
|
||||
nickname: ''
|
||||
nickname: '',
|
||||
currentRole: 0
|
||||
}
|
||||
},
|
||||
refresh() {
|
||||
wsCache.delete(CACHE_KEY.USER)
|
||||
cache.local.delete(CACHE_KEY.USER)
|
||||
this.resetState()
|
||||
window.location.href = ''
|
||||
}
|
||||
|
||||
@@ -69,3 +69,42 @@
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table {
|
||||
.caret-wrapper {
|
||||
width: 16px;
|
||||
}
|
||||
.sort-caret {
|
||||
left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table--default .cell {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.flex-radio{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
.el-radio__label {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 去除 Chrome、Safari、Edge、Opera 中的指示器 */
|
||||
.el-input__inner::-webkit-outer-spin-button,
|
||||
.el-input__inner::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 去除 Firefox 中的指示器 */
|
||||
.el-input__inner[type='number'] {
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import { TokenType } from '@/api/login/types'
|
||||
import { decrypt, encrypt } from '@/utils/jsencrypt'
|
||||
|
||||
const { wsCache } = useCache()
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const AccessTokenKey = 'ACCESS_TOKEN'
|
||||
const RefreshTokenKey = 'REFRESH_TOKEN'
|
||||
@@ -10,24 +8,34 @@ const RefreshTokenKey = 'REFRESH_TOKEN'
|
||||
// 获取token
|
||||
export const getAccessToken = () => {
|
||||
// 此处与TokenKey相同,此写法解决初始化时Cookies中不存在TokenKey报错
|
||||
return wsCache.get(AccessTokenKey) ? wsCache.get(AccessTokenKey) : wsCache.get('ACCESS_TOKEN')
|
||||
return localStorage.getItem(AccessTokenKey)
|
||||
? localStorage.getItem(AccessTokenKey)
|
||||
: localStorage.getItem('ACCESS_TOKEN')
|
||||
// return cache.local.get(AccessTokenKey)
|
||||
// ? cache.local.get(AccessTokenKey)
|
||||
// : cache.local.get('ACCESS_TOKEN')
|
||||
}
|
||||
|
||||
// 刷新token
|
||||
export const getRefreshToken = () => {
|
||||
return wsCache.get(RefreshTokenKey)
|
||||
return localStorage.getItem(RefreshTokenKey)
|
||||
// return cache.local.get(RefreshTokenKey)
|
||||
}
|
||||
|
||||
// 设置token
|
||||
export const setToken = (token: TokenType) => {
|
||||
wsCache.set(RefreshTokenKey, token.refreshToken, { exp: token.expiresTime })
|
||||
wsCache.set(AccessTokenKey, token.accessToken)
|
||||
localStorage.setItem(AccessTokenKey, token.accessToken)
|
||||
localStorage.setItem(RefreshTokenKey, token.refreshToken)
|
||||
// cache.local.set(RefreshTokenKey, token.refreshToken)
|
||||
// cache.local.set(AccessTokenKey, token.accessToken)
|
||||
}
|
||||
|
||||
// 删除token
|
||||
export const removeToken = () => {
|
||||
wsCache.delete(AccessTokenKey)
|
||||
wsCache.delete(RefreshTokenKey)
|
||||
localStorage.removeItem(AccessTokenKey)
|
||||
localStorage.removeItem(RefreshTokenKey)
|
||||
// cache.local.delete(AccessTokenKey)
|
||||
// cache.local.delete(RefreshTokenKey)
|
||||
}
|
||||
|
||||
/** 格式化token(jwt格式) */
|
||||
@@ -47,7 +55,7 @@ export type LoginFormType = {
|
||||
}
|
||||
|
||||
export const getLoginForm = () => {
|
||||
const loginForm: LoginFormType = wsCache.get(LoginFormKey)
|
||||
const loginForm: LoginFormType = cache.local.get(LoginFormKey)
|
||||
if (loginForm) {
|
||||
loginForm.password = decrypt(loginForm.password) as string
|
||||
}
|
||||
@@ -56,11 +64,11 @@ export const getLoginForm = () => {
|
||||
|
||||
export const setLoginForm = (loginForm: LoginFormType) => {
|
||||
loginForm.password = encrypt(loginForm.password) as string
|
||||
wsCache.set(LoginFormKey, loginForm, { exp: 30 * 24 * 60 * 60 })
|
||||
cache.local.set(LoginFormKey, loginForm)
|
||||
}
|
||||
|
||||
export const removeLoginForm = () => {
|
||||
wsCache.delete(LoginFormKey)
|
||||
cache.local.delete(LoginFormKey)
|
||||
}
|
||||
|
||||
// ========== 租户相关 ==========
|
||||
@@ -69,52 +77,52 @@ const TenantIdKey = 'TENANT_ID'
|
||||
const TenantNameKey = 'TENANT_NAME'
|
||||
|
||||
export const getTenantName = () => {
|
||||
return wsCache.get(TenantNameKey)
|
||||
return cache.local.get(TenantNameKey)
|
||||
}
|
||||
|
||||
export const setTenantName = (username: string) => {
|
||||
wsCache.set(TenantNameKey, username, { exp: 30 * 24 * 60 * 60 })
|
||||
cache.local.set(TenantNameKey, username)
|
||||
}
|
||||
|
||||
export const removeTenantName = () => {
|
||||
wsCache.delete(TenantNameKey)
|
||||
cache.local.delete(TenantNameKey)
|
||||
}
|
||||
|
||||
export const getTenantId = () => {
|
||||
return wsCache.get(TenantIdKey)
|
||||
return cache.local.get(TenantIdKey)
|
||||
}
|
||||
|
||||
export const setTenantId = (username: string) => {
|
||||
wsCache.set(TenantIdKey, username)
|
||||
cache.local.set(TenantIdKey, username)
|
||||
}
|
||||
|
||||
export const removeTenantId = () => {
|
||||
wsCache.delete(TenantIdKey)
|
||||
cache.local.delete(TenantIdKey)
|
||||
}
|
||||
|
||||
const AppIdKey = 'App_ID'
|
||||
const AppNameKey = 'App_NAME'
|
||||
|
||||
export const getAPPName = () => {
|
||||
return wsCache.get(AppNameKey)
|
||||
return cache.local.get(AppNameKey)
|
||||
}
|
||||
|
||||
export const setAppName = (name: string) => {
|
||||
wsCache.set(AppNameKey, name, { exp: 30 * 24 * 60 * 60 })
|
||||
cache.local.set(AppNameKey, name)
|
||||
}
|
||||
|
||||
export const removeAppName = () => {
|
||||
wsCache.delete(AppNameKey)
|
||||
cache.local.delete(AppNameKey)
|
||||
}
|
||||
|
||||
export const getAppId = () => {
|
||||
return wsCache.get(AppIdKey)
|
||||
return cache.local.get(AppIdKey)
|
||||
}
|
||||
|
||||
export const setAppId = (id: number) => {
|
||||
wsCache.set(AppIdKey, id)
|
||||
cache.local.set(AppIdKey, id)
|
||||
}
|
||||
|
||||
export const removeAppId = () => {
|
||||
wsCache.delete(AppIdKey)
|
||||
cache.local.delete(AppIdKey)
|
||||
}
|
||||
|
||||
@@ -74,13 +74,13 @@ export const SystemUserSocialTypeEnum = {
|
||||
type: 20,
|
||||
source: 'dingtalk',
|
||||
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'
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -213,7 +213,7 @@ export const fenToYuan = (amount: string | number): number => {
|
||||
export const removeNullField = (obj: Object) => {
|
||||
for (const key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
if (obj[key] === '') {
|
||||
if (obj[key] === '' || obj[key] === null || obj[key] == undefined) {
|
||||
delete obj[key]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
@@ -9,10 +10,9 @@ const { t } = useI18n() // 国际化
|
||||
*/
|
||||
export function checkPermi(value: string[]) {
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const { wsCache } = useCache()
|
||||
const permissionDatas = value
|
||||
const all_permission = '*:*:*'
|
||||
const permissions = wsCache.get(CACHE_KEY.USER).permissions
|
||||
const permissions = cache.local.get(CACHE_KEY.USER).permissions
|
||||
const hasPermission = permissions.some((permission) => {
|
||||
return all_permission === permission || permissionDatas.includes(permission)
|
||||
})
|
||||
@@ -30,10 +30,9 @@ export function checkPermi(value: string[]) {
|
||||
*/
|
||||
export function checkRole(value: string[]) {
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const { wsCache } = useCache()
|
||||
const permissionRoles = value
|
||||
const super_admin = 'admin'
|
||||
const roles = wsCache.get(CACHE_KEY.USER).roles
|
||||
const roles = cache.local.get(CACHE_KEY.USER).roles
|
||||
const hasRole = roles.some((role) => {
|
||||
return super_admin === role || permissionRoles.includes(role)
|
||||
})
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" name="SystemDeptForm" setup>
|
||||
<script name="SystemDeptForm" setup>
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
@@ -81,6 +81,7 @@ const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
@@ -92,7 +93,7 @@ const formData = ref({
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
remark: undefined
|
||||
})
|
||||
const formRules = reactive<any>({
|
||||
const formRules = reactive({
|
||||
parentId: [{ required: true, message: '上级部门不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '部门名称不能为空', trigger: 'blur' }],
|
||||
sort: [{ required: true, message: '显示排序不能为空', trigger: 'blur' }],
|
||||
@@ -104,10 +105,10 @@ const formRules = reactive<any>({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
const deptTree = ref() // 树形结构
|
||||
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||
const userList = ref([]) // 用户列表
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
const open = async (type, id) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
@@ -138,7 +139,7 @@ const submitForm = async () => {
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as DeptApi.DeptVO
|
||||
const data = formData.value
|
||||
if (formType.value === 'create') {
|
||||
await DeptApi.createDept(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
@@ -172,7 +173,7 @@ const resetForm = () => {
|
||||
const getTree = async () => {
|
||||
deptTree.value = []
|
||||
const data = await DeptApi.getSimpleDeptList()
|
||||
let dept: Tree = { id: 0, name: '顶级部门', children: [] }
|
||||
let dept = { id: 0, name: '顶级部门', children: [] }
|
||||
dept.children = handleTree(data)
|
||||
deptTree.value.push(dept)
|
||||
}
|
||||
|
||||
133
src/views/Basic/Dept/DialogTarget.vue
Normal file
133
src/views/Basic/Dept/DialogTarget.vue
Normal file
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle" width="800px">
|
||||
<el-form ref="formRef" :model="formData" label-width="130px">
|
||||
<el-form-item label="每日跟进指标数">
|
||||
<el-input-number v-model="formData.targetNum" :controls="false" style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="跟进指标生效日期">
|
||||
<el-date-picker
|
||||
v-model="formData.startDate"
|
||||
type="date"
|
||||
placeholder="选择日期时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</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.deptSignPriceTargetVOList" 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">
|
||||
<template #default="{ row }">
|
||||
<el-input-number
|
||||
v-model="row.monthTargetVOList[col - 1].targetPrice"
|
||||
size="small"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup name="DialogTarget">
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formData = ref({
|
||||
remark: undefined
|
||||
})
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (deptId) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = '业绩指标'
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (deptId) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await DeptApi.getDeptTarget(deptId)
|
||||
formData.value.deptId = deptId
|
||||
if (formData.value?.deptSignPriceTargetVOList) {
|
||||
formData.value.deptSignPriceTargetVOList.forEach((it) => {
|
||||
it.year = it.year + ''
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const formRef = ref() // 表单 Ref
|
||||
const submitForm = async () => {
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
await DeptApi.updateDeptTarget(formData.value)
|
||||
message.success('修改成功')
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
targetNum: undefined,
|
||||
startDate: undefined,
|
||||
deptSignPriceTargetVOList: []
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
||||
function handleAddPrice() {
|
||||
const obj = {
|
||||
year: undefined,
|
||||
monthTargetVOList: []
|
||||
}
|
||||
for (let i = 1; i <= 12; i++) {
|
||||
obj.monthTargetVOList.push({
|
||||
month: i,
|
||||
targetPrice: undefined
|
||||
})
|
||||
}
|
||||
if (!formData.value.deptSignPriceTargetVOList) {
|
||||
formData.value.deptSignPriceTargetVOList = []
|
||||
}
|
||||
formData.value.deptSignPriceTargetVOList.push(obj)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -21,11 +21,15 @@
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list" row-key="id" default-expand-all border>
|
||||
<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="status" label="状态" width="100" />
|
||||
<el-table-column prop="status" label="状态" width="100">
|
||||
<template #default="{ row }">
|
||||
{{ ['启用', '禁用'][row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="createTime" width="180" :formatter="dateFormatter" />
|
||||
<el-table-column label="操作" class-name="fixed-width" width="160">
|
||||
<el-table-column label="操作" class-name="fixed-width" width="240">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
@@ -35,6 +39,14 @@
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openTarget(scope.row.id)"
|
||||
v-hasPermi="['basic:dept:update']"
|
||||
>
|
||||
业绩指标
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@@ -49,11 +61,13 @@
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<DeptForm ref="formRef" @success="getList" />
|
||||
<DialogTarget ref="targetDialogRef" @success="getList" />
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemDept">
|
||||
import { handleTree } from '@/utils/tree'
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
import DeptForm from './DeptForm.vue'
|
||||
import DialogTarget from './DialogTarget.vue'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
@@ -93,6 +107,11 @@ const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
const targetDialogRef = ref()
|
||||
const openTarget = (id: number) => {
|
||||
targetDialogRef.value.open(id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-form :model="form" ref="formRef" label-width="auto">
|
||||
<el-form-item v-if="getConfig('usePhoneConfig')">
|
||||
<!-- <el-form-item v-if="getConfig('usePhoneConfig')">
|
||||
<template #label>
|
||||
<Tooltip
|
||||
v-if="getConfig('usePhoneConfig').remark"
|
||||
@@ -20,7 +20,7 @@
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item v-if="getConfig('showFollowConfig')">
|
||||
<template #label>
|
||||
<Tooltip
|
||||
|
||||
@@ -4,16 +4,19 @@
|
||||
<el-tab-pane label="线索管理" :name="0" v-if="checkPermi(['basic:setting:clue'])">
|
||||
<BSClue v-if="tabIndex == 0" />
|
||||
</el-tab-pane>
|
||||
<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" />
|
||||
</el-tab-pane>
|
||||
</el-tab-pane> -->
|
||||
<!-- <el-tab-pane label="微信机器人" :name="20">
|
||||
<BSSalerComission v-if="tabIndex == 20" />
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="GeneralSetting">
|
||||
import BSClue from './Comp/BSClue.vue'
|
||||
import BSSalerComission from './Comp/BSSalerComission.vue'
|
||||
// import BSSalerComission from './Comp/BSSalerComission.vue'
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
|
||||
const tabIndex = ref(0)
|
||||
|
||||
@@ -7,6 +7,16 @@
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="服务类型" prop="serviceId">
|
||||
<el-select v-model="formData.serviceId" placeholder="选择服务类型" filterable>
|
||||
<el-option
|
||||
v-for="item in props.appList"
|
||||
:key="item.serviceId"
|
||||
:label="item.serviceName"
|
||||
:value="item.serviceId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="上级菜单">
|
||||
<el-tree-select
|
||||
v-model="formData.parentId"
|
||||
@@ -106,14 +116,18 @@
|
||||
<script lang="ts" name="SystemMenuForm" setup>
|
||||
// import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import * as MenuApi from '@/api/system/menu'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import { CommonStatusEnum, SystemMenuTypeEnum } from '@/utils/constants'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const { wsCache } = useCache()
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const props = defineProps({
|
||||
appList: Object as any
|
||||
})
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
@@ -132,7 +146,8 @@ const formData = ref({
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
visible: true,
|
||||
keepAlive: true,
|
||||
alwaysShow: true
|
||||
alwaysShow: true,
|
||||
serviceId: undefined
|
||||
})
|
||||
const formRules = reactive({
|
||||
name: [{ required: true, message: '菜单名称不能为空', trigger: 'blur' }],
|
||||
@@ -203,7 +218,7 @@ const submitForm = async () => {
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
// 清空,从而触发刷新
|
||||
wsCache.delete(CACHE_KEY.ROLE_ROUTERS)
|
||||
cache.local.delete(CACHE_KEY.ROLE_ROUTERS)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +248,8 @@ const resetForm = () => {
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
visible: true,
|
||||
keepAlive: true,
|
||||
alwaysShow: true
|
||||
alwaysShow: true,
|
||||
serviceId: undefined
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
||||
@@ -62,6 +62,11 @@
|
||||
<el-table-column :show-overflow-tooltip="true" label="组件路径" prop="component" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="组件名称" prop="componentName" />
|
||||
<el-table-column label="状态" prop="status" width="80" />
|
||||
<el-table-column label="服务类型" prop="" width="100">
|
||||
<template #default="{ row }">
|
||||
{{ getServiceName(row.serviceId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="openForm('update', scope.row.id)">
|
||||
@@ -77,14 +82,14 @@
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<MenuForm ref="formRef" @success="getList" />
|
||||
<MenuForm ref="formRef" :appList="appList" @success="getList" />
|
||||
</template>
|
||||
<script lang="ts" name="SystemMenu" setup>
|
||||
<script lang="ts" name="Menu" setup>
|
||||
import { handleTree } from '@/utils/tree'
|
||||
import * as MenuApi from '@/api/system/menu'
|
||||
import MenuForm from './MenuForm.vue'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
const { wsCache } = useCache()
|
||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||
import cache from '@/plugins/cache'
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
@@ -140,7 +145,7 @@ const refreshMenu = async () => {
|
||||
try {
|
||||
await message.confirm('即将更新缓存刷新浏览器!', '刷新菜单缓存')
|
||||
// 清空,从而触发刷新
|
||||
wsCache.delete(CACHE_KEY.ROLE_ROUTERS)
|
||||
cache.local.delete(CACHE_KEY.ROLE_ROUTERS)
|
||||
// 刷新浏览器
|
||||
location.reload()
|
||||
} catch {}
|
||||
@@ -160,8 +165,20 @@ const handleDelete = async (id: number) => {
|
||||
} catch {}
|
||||
}
|
||||
|
||||
const appList = ref([] as any)
|
||||
const getOptions = () => {
|
||||
MenuApi.getServiceAppList().then((data) => {
|
||||
appList.value = data
|
||||
})
|
||||
}
|
||||
|
||||
function getServiceName(serviceId: any) {
|
||||
return appList.value.find((it: any) => it.serviceId == serviceId)?.serviceName
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getOptions()
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
||||
149
src/views/Basic/Role/Comp/ReportDaily.vue
Normal file
149
src/views/Basic/Role/Comp/ReportDaily.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<div class="pl-20px pr-20px">
|
||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" v-loading="formLoading">
|
||||
<el-form-item label="开启通知">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="0"> 开启 </el-radio>
|
||||
<el-radio :label="1"> 关闭 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="发送途径">
|
||||
<el-checkbox-group v-model="form.sendType">
|
||||
<el-checkbox v-for="(item, index) in sendTypeOptions" :key="index" :label="item.value">
|
||||
{{ item.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="发送时间">
|
||||
<el-time-picker
|
||||
v-model="form.sendTime"
|
||||
placeholder="任意时间点"
|
||||
format="HH:mm"
|
||||
value-format="HH:mm"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发送内容">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:data="contentOptions"
|
||||
:props="defaultProps"
|
||||
empty-text="加载中,请稍候"
|
||||
node-key="id"
|
||||
show-checkbox
|
||||
default-expand-all
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm"> 保 存 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ReportDaily">
|
||||
import * as DaliyReportApi from '@/api/system/role/daliyReport'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
import { getGeneralSysDictData } from '@/api/system/dict/dict.data'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const props = defineProps({
|
||||
roleId: {
|
||||
type: Number
|
||||
}
|
||||
})
|
||||
|
||||
const formLoading = ref(false)
|
||||
const form = ref({
|
||||
sendItem: []
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.roleId,
|
||||
() => {
|
||||
getReportInfo()
|
||||
}
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
|
||||
const formRef = ref()
|
||||
|
||||
const rules = {}
|
||||
|
||||
const contentOptions = ref([])
|
||||
|
||||
async function init() {
|
||||
getOptions()
|
||||
getReportInfo()
|
||||
}
|
||||
|
||||
const sendTypeOptions = ref([])
|
||||
const treeRef = ref()
|
||||
function getOptions() {
|
||||
getGeneralSysDictData('message_send_type').then((data) => {
|
||||
sendTypeOptions.value = data
|
||||
})
|
||||
DaliyReportApi.getDaliyReportContent().then((data) => {
|
||||
contentOptions.value = handleTree(data)
|
||||
})
|
||||
}
|
||||
|
||||
async function getReportInfo() {
|
||||
try {
|
||||
formLoading.value = true
|
||||
const data = await DaliyReportApi.getRoleDaliyReport(props.roleId)
|
||||
form.value = { ...data }
|
||||
|
||||
if (!form.value.sendType) {
|
||||
form.value.sendType = []
|
||||
}
|
||||
|
||||
if (!form.value.sendTime) {
|
||||
form.value.sendTime = '22:00'
|
||||
}
|
||||
|
||||
if (!form.value.sendItem) {
|
||||
form.value.sendItem = []
|
||||
}
|
||||
treeRef.value.setCheckedKeys([], false)
|
||||
// 设置选中
|
||||
form.value.sendItem.forEach((menuId) => {
|
||||
treeRef.value.setChecked(menuId, true, false)
|
||||
})
|
||||
formLoading.value = false
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 提交表单 */
|
||||
const submitForm = async () => {
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = {
|
||||
id: form.value.id,
|
||||
roleId: props.roleId,
|
||||
sendType: form.value.sendType,
|
||||
sendTime: form.value.sendTime,
|
||||
status: form.value.status,
|
||||
sendItem: [
|
||||
...treeRef.value.getCheckedKeys(false), // 获得当前选中节点
|
||||
...treeRef.value.getHalfCheckedKeys() // 获得半选中的父节点
|
||||
]
|
||||
}
|
||||
await DaliyReportApi.updateRoleDaliyReport(data)
|
||||
message.success('保存成功')
|
||||
getReportInfo()
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -9,6 +9,18 @@
|
||||
:label="col.label"
|
||||
: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>
|
||||
<Pagination
|
||||
v-model:limit="pageSize"
|
||||
|
||||
@@ -75,6 +75,13 @@
|
||||
@success="getList"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="每日快报" :name="4">
|
||||
<ReportDaily
|
||||
v-if="roleOperateIndex == 4"
|
||||
ref="reportDailyRef"
|
||||
:roleId="list[libraryIndex].id"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
@@ -86,6 +93,7 @@ import RoleForm from './RoleForm.vue'
|
||||
import RoleEmployee from './Comp/RoleEmployee.vue'
|
||||
import RoleAssignMenuForm from './RoleAssignMenuForm.vue'
|
||||
import RoleDataPermissionForm from './RoleDataPermissionForm.vue'
|
||||
import ReportDaily from './Comp/ReportDaily.vue'
|
||||
import * as RoleApi from '@/api/system/role'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
<template>
|
||||
<div class="head-container">
|
||||
<el-input v-model="deptName" class="mb-20px" clearable placeholder="请输入部门名称">
|
||||
<template #prefix>
|
||||
<Icon icon="ep:search" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
@@ -26,7 +19,6 @@ import { ElTree } from 'element-plus'
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
|
||||
const deptName = ref('')
|
||||
const deptList = ref<Tree[]>([]) // 树形结构
|
||||
const treeRef = ref<InstanceType<typeof ElTree>>()
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
v-loading="formLoading"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
@@ -85,6 +85,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<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-form-item label="入职日期" prop="hireDate">
|
||||
<el-date-picker
|
||||
@@ -97,6 +102,23 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
@@ -127,7 +149,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
const formData = ref<any>({
|
||||
nickname: '',
|
||||
deptId: '',
|
||||
mobile: '',
|
||||
@@ -139,7 +161,9 @@ const formData = ref({
|
||||
remark: '',
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
roleIds: [],
|
||||
hireDate: ''
|
||||
hireDate: '',
|
||||
isNewUserConfirm: false,
|
||||
wxAlias: ''
|
||||
})
|
||||
const formRules = ref<any>({
|
||||
username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }],
|
||||
@@ -192,8 +216,14 @@ const submitForm = async () => {
|
||||
try {
|
||||
const data = formData.value as unknown as UserApi.UserVO
|
||||
if (formType.value === 'create') {
|
||||
await UserApi.createUser(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
const resp = await UserApi.createUser(data)
|
||||
if (resp.code == 18888) {
|
||||
await message.confirm(resp.msg)
|
||||
formData.value.isNewUserConfirm = true
|
||||
submitForm()
|
||||
} else {
|
||||
message.success(t('common.createSuccess'))
|
||||
}
|
||||
} else {
|
||||
await UserApi.updateUser(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
@@ -220,8 +250,22 @@ const resetForm = () => {
|
||||
remark: '',
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
roleIds: [],
|
||||
hireDate: formatDate(new Date(), 'YYYY-MM-DD')
|
||||
hireDate: formatDate(new Date(), 'YYYY-MM-DD'),
|
||||
isNewUserConfirm: false,
|
||||
wxAlias: ''
|
||||
}
|
||||
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>
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
</el-col>
|
||||
<el-col :span="20" :xs="24">
|
||||
<!-- 搜索 -->
|
||||
<el-form :model="queryParams" ref="queryFormRef" inline label-width="68px">
|
||||
<el-form-item label="登录账号" prop="username">
|
||||
<el-form :model="queryParams" ref="queryFormRef" inline label-width="0">
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="queryParams.username"
|
||||
placeholder="请输入登录账号"
|
||||
v-model="queryParams.nickname"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="mobile">
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入手机号码"
|
||||
@@ -25,6 +25,12 @@
|
||||
class="!w-240px"
|
||||
/>
|
||||
</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-button @click="handleQuery" v-hasPermi="['basic:employee:search']">搜索</el-button>
|
||||
<el-button @click="resetQuery" v-hasPermi="['basic:employee:reset']">重置</el-button>
|
||||
@@ -39,29 +45,45 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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="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="状态" 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">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
v-model="scope.row.hireStatus"
|
||||
:active-value="0"
|
||||
:inactive-value="1"
|
||||
active-text="在职"
|
||||
inactive-text="离职"
|
||||
size="small"
|
||||
v-hasPermi="['basic:employee:update']"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
:formatter="dateFormatter"
|
||||
/>
|
||||
<el-table-column label="操作" width="260">
|
||||
<el-table-column label="启用状态" key="status" width="120">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
: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)"
|
||||
/>
|
||||
</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">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -114,12 +136,14 @@ const { t } = useI18n() // 国际化
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const total = ref(0) // 列表的总页数
|
||||
const list = ref([]) // 列表的数
|
||||
const queryParams = reactive({
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
username: undefined,
|
||||
nickname: undefined,
|
||||
mobile: undefined,
|
||||
deptId: undefined
|
||||
deptId: undefined,
|
||||
status: undefined
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
|
||||
@@ -127,7 +151,7 @@ const queryFormRef = ref() // 搜索的表单
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await UserApi.getUserPage(queryParams)
|
||||
const data = await UserApi.getUserPage(queryParams.value)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
@@ -137,19 +161,28 @@ const getList = async () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
queryParams.value.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields()
|
||||
queryParams.value = {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
username: undefined,
|
||||
nickname: undefined,
|
||||
mobile: undefined,
|
||||
deptId: undefined,
|
||||
status: undefined
|
||||
}
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 处理部门被点击 */
|
||||
const handleDeptNodeClick = async (row) => {
|
||||
queryParams.deptId = row.id
|
||||
queryParams.value.deptId = row.id
|
||||
await getList()
|
||||
}
|
||||
|
||||
@@ -159,14 +192,49 @@ const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 修改用户状态 */
|
||||
/** 修改在职状态 */
|
||||
const handleStatusChange = async (row: UserApi.UserVO) => {
|
||||
try {
|
||||
// 修改状态的二次确认
|
||||
const text = row.status === CommonStatusEnum.ENABLE ? '启用' : '停用'
|
||||
await message.confirm('确认要"' + text + '""' + row.username + '"用户吗?')
|
||||
const text = row.hireStatus === CommonStatusEnum.ENABLE ? '入职' : '离职'
|
||||
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()
|
||||
} 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>
|
||||
228
src/views/Basic/WxRobot/Setting.vue
Normal file
228
src/views/Basic/WxRobot/Setting.vue
Normal file
@@ -0,0 +1,228 @@
|
||||
<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="微信"> 微信 </el-checkbox>
|
||||
<el-checkbox label="微信群"> 微信群 </el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="群二维码" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-upload
|
||||
ref="rewardFile"
|
||||
action="#"
|
||||
:limit="1"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
:disabled="loading"
|
||||
:show-file-list="false"
|
||||
:before-upload="fileBeforeUpload"
|
||||
:http-request="(data) => rewardUpload(data, row.id)"
|
||||
>
|
||||
<el-button type="primary" size="small">
|
||||
<Icon icon="ep:upload" class="mr-5px" size="small" /> 点击上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<!-- <UploadImg v-model="row.wxQrCode" /> -->
|
||||
|
||||
<!-- <img :src="row.wxCode" width="80px" height="80px" alt="" /> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="微信群名称" prop="wxGroup" min-width="150" />
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<!-- <div>
|
||||
<el-button
|
||||
v-if="row.sendType.includes('微信群')"
|
||||
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.messageName}】发送时间`"
|
||||
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">
|
||||
import * as WechatApi from '@/api/system/wechat'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const loading = ref(false)
|
||||
const tableList = ref([])
|
||||
const columns = [
|
||||
{
|
||||
label: '消息名称',
|
||||
prop: 'messageName'
|
||||
},
|
||||
{
|
||||
label: '解释说明',
|
||||
prop: 'description'
|
||||
},
|
||||
{
|
||||
label: '发送频率',
|
||||
prop: 'sendFrequency'
|
||||
},
|
||||
{
|
||||
label: '发送时间',
|
||||
prop: 'sendTime'
|
||||
}
|
||||
]
|
||||
|
||||
onMounted(() => {
|
||||
getTableList()
|
||||
})
|
||||
|
||||
async function getTableList() {
|
||||
try {
|
||||
loading.value = true
|
||||
const list = await WechatApi.getWechatConfigList()
|
||||
tableList.value = list.map((it) => ({ ...it, sendType: it.sendType || [] }))
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
let timer = ref(null)
|
||||
const lastId = ref('')
|
||||
function rowChange(row) {
|
||||
try {
|
||||
lastId.value == row.id && clearTimeout(timer.value)
|
||||
timer.value = setTimeout(async () => {
|
||||
lastId.value = row.id
|
||||
await WechatApi.updateWechatGroup({
|
||||
id: row.id,
|
||||
sendType: row.sendType,
|
||||
wxGroup: row.wxGroup
|
||||
})
|
||||
// message.success('修改成功')
|
||||
}, 1500)
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
const showSendTime = ref(false)
|
||||
const sendTimeInfo = ref({})
|
||||
function changeSendTime(row) {
|
||||
showSendTime.value = true
|
||||
sendTimeInfo.value = { ...row }
|
||||
}
|
||||
|
||||
const formLoading = ref(false)
|
||||
|
||||
async function submitSendTime() {
|
||||
// 校验时间是否有效
|
||||
const arr = sendTimeInfo.value.sendTime ? 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 {
|
||||
try {
|
||||
formLoading.value = true
|
||||
await WechatApi.updateWechatSendTime({
|
||||
id: sendTimeInfo.value.id,
|
||||
sendTime: arr.join('、')
|
||||
})
|
||||
message.success('修改成功!')
|
||||
getTableList()
|
||||
showSendTime.value = false
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
} 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.length > 0 && arr.some((it) => !reg.test(it))) {
|
||||
message.error('请检查输入格式是否正确!!!')
|
||||
return
|
||||
} else {
|
||||
try {
|
||||
formLoading.value = true
|
||||
await WechatApi.updateWechatSendTime({
|
||||
id: sendTimeInfo.value.id,
|
||||
sendTime: arr.join('、')
|
||||
})
|
||||
message.success('修改成功!')
|
||||
getTableList()
|
||||
showSendTime.value = false
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const fileBeforeUpload = (file) => {
|
||||
let format = '.' + file.name.split('.')[1]
|
||||
if (!['.jpg', '.png', 'jpeg'].includes(format)) {
|
||||
message.error(`请上传指定格式".jpg,.jpeg,.png"文件`)
|
||||
return false
|
||||
}
|
||||
let isRightSize = file.size / 1024 / 1024 < 20
|
||||
if (!isRightSize) {
|
||||
message.error('文件大小超过 20MB')
|
||||
}
|
||||
return isRightSize
|
||||
}
|
||||
|
||||
const fd = ref(new FormData())
|
||||
|
||||
async function rewardUpload(data, id) {
|
||||
fd.value.append('file', data.file)
|
||||
fd.value.append('id', id)
|
||||
// 上传接口,成功后得到微信群名
|
||||
try {
|
||||
// 上传文件
|
||||
setTimeout(() => {
|
||||
getTableList()
|
||||
}, 2000)
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
</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>
|
||||
<el-tabs v-model="tabIndex" type="border-card">
|
||||
<el-tab-pane label="微信消息记录" :name="0">
|
||||
<!-- 搜索工作栏 -->
|
||||
<Search
|
||||
:schema="allSchemas.searchSchema"
|
||||
labelWidth="0"
|
||||
@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 label="微信消息记录" :name="0">
|
||||
<Record />
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="消息配置" :name="1">
|
||||
<Setting />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { allSchemas } from './index.data.js'
|
||||
<script setup name="WXBoot">
|
||||
// import Record from './Record.vue'
|
||||
import Setting from './Setting.vue'
|
||||
|
||||
const tabIndex = ref(0)
|
||||
|
||||
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('测试')
|
||||
}
|
||||
const tabIndex = ref(1)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.state" placeholder="审核状态" clearable>
|
||||
<el-select v-model="searchForm.state" placeholder="审核状态" clearable style="width: 120px">
|
||||
<el-option label="待审核" :value="1" />
|
||||
<el-option label="已撤销" :value="2" />
|
||||
<el-option label="已通过" :value="3" />
|
||||
@@ -16,7 +16,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
|
||||
<el-select
|
||||
v-model="searchForm.signUser"
|
||||
placeholder="登记人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
@@ -34,10 +40,17 @@
|
||||
range-separator="-"
|
||||
start-placeholder="成交日期"
|
||||
end-placeholder="成交日期"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.applyUser" placeholder="申请人" clearable filterable>
|
||||
<el-select
|
||||
v-model="searchForm.applyUser"
|
||||
placeholder="申请人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
@@ -55,12 +68,43 @@
|
||||
range-separator="-"
|
||||
start-placeholder="申请日期"
|
||||
end-placeholder="申请日期"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch">查询</el-button>
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
<el-button @click="batchAudit">批量审核</el-button>
|
||||
<el-date-picker
|
||||
v-model="searchForm.checkTime"
|
||||
type="daterange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
range-separator="-"
|
||||
start-placeholder="审核日期"
|
||||
end-placeholder="审核日期"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</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-button @click="handleSearch" v-hasPermi="['clue:order:after-sale-search']">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button @click="handleReset" v-hasPermi="['clue:order:after-sale-reset']">
|
||||
重置
|
||||
</el-button>
|
||||
<el-button @click="batchAudit" v-hasPermi="['clue:order:after-sale-batch-audit']">
|
||||
批量审核
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -72,10 +116,18 @@
|
||||
>
|
||||
<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="name" label="线索名称" min-width="200px" />
|
||||
<el-table-column prop="phone" label="联系方式" min-width="150px" />
|
||||
<el-table-column prop="name" 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="refundAmount" label="退款金额" min-width="90px" />
|
||||
<el-table-column prop="percentageDeductAmount" label="提成扣款" min-width="90px" />
|
||||
<el-table-column prop="isCompanyReceipts" label="是否公司收款" min-width="120px" />
|
||||
<el-table-column prop="isReturns" label="是否退货" min-width="90px" />
|
||||
<el-table-column prop="solution" label="解决方案" min-width="150px" />
|
||||
<el-table-column prop="signUserName" label="登记人" min-width="90px" />
|
||||
@@ -92,10 +144,23 @@
|
||||
min-width="120px"
|
||||
:formatter="dateFormatter"
|
||||
/>
|
||||
<el-table-column prop="checkUser" label="审核人" min-width="90" />
|
||||
<el-table-column
|
||||
prop="checkTime"
|
||||
label="审核时间"
|
||||
min-width="120px"
|
||||
:formatter="dateFormatter"
|
||||
/>
|
||||
<el-table-column prop="stateName" label="审核状态" fixed="right" min-width="90px" />
|
||||
<el-table-column label="操作" width="150px" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" style="padding: 0" text @click="handleDetail(row.id)">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="padding: 0"
|
||||
text
|
||||
v-hasPermi="['clue:order:after-sale-detail']"
|
||||
@click="handleDetail(row.id)"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -136,17 +201,21 @@
|
||||
<script setup name="AfterSales">
|
||||
import * as AfterSaleApi from '@/api/clue/afterSale'
|
||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||
import { getAreaSimpleList } from '@/api/school/setting/area'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
|
||||
import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue'
|
||||
import DialogAfterSaleDetail from './DialogAfterSaleDetail.vue'
|
||||
import DialogBatchAudit from './DialogBatchAudit.vue'
|
||||
|
||||
import { removeNullField } from '@/utils'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
|
||||
const afterSaleAuditDialog = ref()
|
||||
|
||||
const userStore = useUserStore()
|
||||
const appStore = useAppStore()
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const currentUserId = userStore.getUser.id
|
||||
@@ -159,6 +228,7 @@ const searchForm = ref({
|
||||
dealUser: undefined,
|
||||
createDate: [],
|
||||
createUser: undefined,
|
||||
checkTime: [],
|
||||
pageNo: 1,
|
||||
pageSize: 20
|
||||
})
|
||||
@@ -182,6 +252,7 @@ function handleReset() {
|
||||
dealUser: undefined,
|
||||
createDate: [],
|
||||
createUser: undefined,
|
||||
checkTime: [],
|
||||
pageNo: 1,
|
||||
pageSize: 20
|
||||
}
|
||||
@@ -191,7 +262,7 @@ const loading = ref(false)
|
||||
async function getList() {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await AfterSaleApi.getAfterSalePage(searchForm.value)
|
||||
const data = await AfterSaleApi.getAfterSalePage(removeNullField(searchForm.value))
|
||||
tableList.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
@@ -234,7 +305,12 @@ function handleAudit(row) {
|
||||
afterSaleAuditDialog.value.open(row)
|
||||
}
|
||||
|
||||
const areaOptions = ref([])
|
||||
function getOptions() {
|
||||
// 区域
|
||||
getAreaSimpleList().then((data) => {
|
||||
areaOptions.value = data
|
||||
})
|
||||
getUserOption().then((data) => {
|
||||
userOptions.value = data
|
||||
})
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||
import { getSimpleProductList } from '@/api/mall/product'
|
||||
import * as DeliveryApi from '@/api/clue/delivery'
|
||||
import { removeNullField } from '@/utils'
|
||||
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
// const message = useMessage() // 消息弹窗
|
||||
@@ -155,7 +156,7 @@ const loading = ref(false)
|
||||
async function getList() {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await DeliveryApi.getDeliveryPage(searchForm.value)
|
||||
const data = await DeliveryApi.getDeliveryPage(removeNullField(searchForm.value))
|
||||
tableList.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
|
||||
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>
|
||||
@@ -4,6 +4,7 @@
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column prop="reason" label="售后原因" />
|
||||
<el-table-column prop="refundAmount" label="退款金额" />
|
||||
<el-table-column prop="percentageDeductAmount" label="提成扣款" />
|
||||
<el-table-column prop="isReturns" label="是否退货" />
|
||||
<el-table-column prop="applyTime" label="申请日期" width="180px" />
|
||||
<el-table-column prop="stateName" label="审核状态" />
|
||||
@@ -13,35 +14,61 @@
|
||||
<el-button v-show="showAdd" class="mb-10px" type="primary" @click="handleAdd">
|
||||
新增售后
|
||||
</el-button>
|
||||
<el-form v-if="!showAdd" :model="form" ref="formRef" :rules="rules" label-width="80px">
|
||||
<el-form-item label="售后原因" prop="reason">
|
||||
<el-input v-model="form.reason" placeholder="请输入售后原因" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退款金额" prop="refundAmount">
|
||||
<el-input-number
|
||||
v-model="form.refundAmount"
|
||||
:min="0"
|
||||
:controls="false"
|
||||
placeholder="请输入金额"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否退货" prop="isReturns">
|
||||
<el-radio-group v-model="form.isReturns">
|
||||
<el-radio :label="true"> 退货 </el-radio>
|
||||
<el-radio :label="false"> 不退货 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="解决方案" prop="solution">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autoSize="{ minRows: 3 }"
|
||||
v-model="form.solution"
|
||||
placeholder="请输入退款原因"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<Editor v-model:modelValue="form.remark" />
|
||||
</el-form-item>
|
||||
<el-form v-if="!showAdd" :model="form" ref="formRef" :rules="rules" label-width="auto">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" :offset="0">
|
||||
<el-form-item label="售后原因" prop="reason">
|
||||
<el-input v-model="form.reason" placeholder="请输入售后原因" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="退款金额" prop="refundAmount">
|
||||
<el-input-number
|
||||
v-model="form.refundAmount"
|
||||
:min="0"
|
||||
:controls="false"
|
||||
placeholder="请输入金额"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="提成扣款金额" prop="percentageDeductAmount">
|
||||
<el-input-number
|
||||
v-model="form.percentageDeductAmount"
|
||||
:min="0"
|
||||
:controls="false"
|
||||
placeholder="请输入金额"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" :offset="0" v-if="appStore.getAppInfo?.instanceType == 2">
|
||||
<el-form-item label="是否退货" prop="isReturns">
|
||||
<el-radio-group v-model="form.isReturns">
|
||||
<el-radio :label="true"> 退货 </el-radio>
|
||||
<el-radio :label="false"> 不退货 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" :offset="0">
|
||||
<el-form-item label="解决方案" prop="solution">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autoSize="{ minRows: 3 }"
|
||||
v-model="form.solution"
|
||||
placeholder="请输入退款原因"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" :offset="0">
|
||||
<el-form-item label="备注">
|
||||
<Editor v-model:modelValue="form.remark" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item>
|
||||
<el-button :disabled="formLoading" type="primary" @click="onSubmit">保存</el-button>
|
||||
<el-button @click="showAdd = true">取消</el-button>
|
||||
@@ -52,7 +79,9 @@
|
||||
|
||||
<script setup name="DialogAfterSale">
|
||||
import { getAfterSalePage, createAfterSale } from '@/api/clue/afterSale'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
|
||||
const appStore = useAppStore()
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const show = ref(false)
|
||||
@@ -72,7 +101,8 @@ function open(signId) {
|
||||
const showAdd = ref(true)
|
||||
const form = ref({})
|
||||
const rules = {
|
||||
refundAmount: { required: true, message: '回款金额不可为空', trigger: 'blur' },
|
||||
percentageDeductAmount: { required: true, message: '提成扣款金额不可为空', trigger: 'blur' },
|
||||
refundAmount: { required: true, message: '退款金额不可为空', trigger: 'blur' },
|
||||
reason: { required: true, message: '售后原因不可为空', trigger: 'blur' },
|
||||
solution: { required: true, message: '解决方案不可为空', trigger: 'blur' }
|
||||
}
|
||||
@@ -91,6 +121,7 @@ function handleAdd() {
|
||||
solution: undefined,
|
||||
refundAmount: undefined,
|
||||
isReturns: false,
|
||||
percentageDeductAmount: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,39 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||
<Descriptions :data="orderInfo" :schema="schema" :columns="2" labelWidth="130px" />
|
||||
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-radio-group v-model="formData.state">
|
||||
<el-radio :label="3"> 通过 </el-radio>
|
||||
<el-radio :label="4"> 驳回 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<Editor v-model:modelValue="formData.remark" />
|
||||
</el-form-item>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
:rules="ruels"
|
||||
:model="formData"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-radio-group v-model="formData.state">
|
||||
<el-radio :label="3"> 通过 </el-radio>
|
||||
<el-radio :label="4"> 驳回 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="审核日期" prop="checkTime">
|
||||
<el-date-picker
|
||||
v-model="formData.checkTime"
|
||||
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">
|
||||
<Editor v-model:modelValue="formData.remark" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -20,6 +43,7 @@
|
||||
</template>
|
||||
<script name="DialogAfterSaleAudit" setup>
|
||||
import { auditAfterSale } from '@/api/clue/afterSale'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
@@ -63,6 +87,16 @@ const schema = [
|
||||
label: '退款金额',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'percentageDeductAmount',
|
||||
label: '提成扣款',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'isCompanyReceipts',
|
||||
label: '是否公司收款',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'isReturns',
|
||||
label: '是否退货',
|
||||
@@ -94,6 +128,10 @@ const formData = ref({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
const ruels = {
|
||||
checkTime: { required: true, message: '审核日期不可为空', trigger: 'blur,change' }
|
||||
}
|
||||
|
||||
const orderInfo = ref({})
|
||||
/** 打开弹窗 */
|
||||
const open = async (row) => {
|
||||
@@ -130,6 +168,7 @@ const resetForm = (signId) => {
|
||||
formData.value = {
|
||||
saleId: signId,
|
||||
state: 3,
|
||||
checkTime: formatDate(new Date()),
|
||||
remark: ''
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
|
||||
@@ -54,6 +54,16 @@ const applySchema = [
|
||||
label: '退款金额',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'percentageDeductAmount',
|
||||
label: '提成扣款',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'isCompanyReceipts',
|
||||
label: '是否公司收款',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'isReturns',
|
||||
label: '是否退货',
|
||||
|
||||
@@ -1,15 +1,38 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="600px">
|
||||
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-radio-group v-model="formData.state">
|
||||
<el-radio :label="3"> 通过 </el-radio>
|
||||
<el-radio :label="4"> 驳回 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<Editor v-model:modelValue="formData.remark" />
|
||||
</el-form-item>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
:rules="ruels"
|
||||
:model="formData"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-radio-group v-model="formData.state">
|
||||
<el-radio :label="3"> 通过 </el-radio>
|
||||
<el-radio :label="4"> 驳回 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="审核日期" prop="checkTime">
|
||||
<el-date-picker
|
||||
v-model="formData.checkTime"
|
||||
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">
|
||||
<Editor v-model:modelValue="formData.remark" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -20,6 +43,7 @@
|
||||
<script name="DialogAfterSaleAudit" setup>
|
||||
import { batchAuditAfterSale } from '@/api/clue/afterSale'
|
||||
import { batchAuditPayment } from '@/api/clue/payment'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
@@ -32,6 +56,10 @@ const formData = ref({
|
||||
remark: ''
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
const ruels = {
|
||||
checkTime: { required: true, message: '审核日期不可为空', trigger: 'blur,change' }
|
||||
}
|
||||
|
||||
const formType = ref('aftersale')
|
||||
const titleMap = {
|
||||
aftersale: '批量售后审核',
|
||||
@@ -79,6 +107,7 @@ const resetForm = (ids) => {
|
||||
formData.value = {
|
||||
payIds: ids,
|
||||
saleIds: ids,
|
||||
checkTime: formatDate(new Date()),
|
||||
state: 3,
|
||||
remark: ''
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
<el-select v-model="form.supplier" placeholder="选择供应商" filterable>
|
||||
<el-option
|
||||
v-for="item in supplierOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="item.id"
|
||||
:label="item.supplierName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -77,6 +77,32 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="其他支出">
|
||||
<el-select v-model="extraPay.extraPayType" placeholder="其他支出类型" filterable>
|
||||
<el-option
|
||||
v-for="item in extraPayOptions"
|
||||
:key="item.id"
|
||||
:label="item.extraPayName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="支出金额">
|
||||
<el-input-number v-model="extraPay.extraPayMoney" :controls="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" :offset="0">
|
||||
<el-form-item label="支出备注">
|
||||
<el-input v-model="extraPay.remark" placeholder="备注信息" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-table :data="inventoryList" @selection-change="handleSelectionChange">
|
||||
@@ -98,7 +124,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
<el-form-item label="备注">
|
||||
<el-form-item label="发货备注">
|
||||
<Editor v-model:modelValue="form.remark" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -115,16 +141,24 @@
|
||||
import { getSimpleWarehouseList, getRemainInventoryList } from '@/api/mall/warehouse'
|
||||
import { createDelivery } from '@/api/clue/delivery'
|
||||
import { getConfigList } from '@/api/system/set'
|
||||
import { getDictOptions } from '@/utils/dict'
|
||||
import { getSupplierSimpleList } from '@/api/school/setting/supplier'
|
||||
import { getExtraFeeSimpleList } from '@/api/clue/extraFee'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const warehouseOptions = ref([])
|
||||
const supplierOptions = getDictOptions('erp_supplier')
|
||||
const extraPayOptions = ref([])
|
||||
const supplierOptions = ref([])
|
||||
function getOptions() {
|
||||
getSupplierSimpleList().then((data) => {
|
||||
supplierOptions.value = data
|
||||
})
|
||||
getSimpleWarehouseList().then((data) => {
|
||||
warehouseOptions.value = data
|
||||
})
|
||||
getExtraFeeSimpleList().then((data) => {
|
||||
extraPayOptions.value = data
|
||||
})
|
||||
}
|
||||
|
||||
function getRemainInventory(signProductId) {
|
||||
@@ -144,6 +178,7 @@ defineExpose({
|
||||
})
|
||||
|
||||
const form = ref({})
|
||||
const extraPay = ref({})
|
||||
const rules = ref({
|
||||
supplier: { required: true, message: '供应商不可为空', trigger: 'change' },
|
||||
warehouseId: { required: true, message: '仓库不可为空', trigger: 'change' },
|
||||
@@ -164,6 +199,11 @@ function resetForm(row) {
|
||||
unitPrice: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
extraPay.value = {
|
||||
extraPayType: undefined,
|
||||
extraPayMoney: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
}
|
||||
|
||||
const emit = defineEmits(['success'])
|
||||
@@ -209,8 +249,11 @@ async function onSubmit() {
|
||||
unitPrice: form.value.unitPrice,
|
||||
warehouseId: form.value.warehouseId
|
||||
}
|
||||
if (extraPay.value.extraPayMoney) {
|
||||
params.purchaseOrder.extraPay = [extraPay.value]
|
||||
}
|
||||
} else {
|
||||
params.detailList = inventoryList.value
|
||||
params.detailList = deliveryArr.value
|
||||
}
|
||||
|
||||
await createDelivery(params)
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="item in extraPayOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="item.id"
|
||||
:label="item.extraPayName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
@@ -73,9 +73,9 @@
|
||||
|
||||
<script setup name="DialogExtraPay">
|
||||
import { signAddPay, getSignExtraPayList } from '@/api/clue/sign'
|
||||
import { getDictOptions } from '@/utils/dict'
|
||||
import * as ExtraFeeApi from '@/api/clue/extraFee'
|
||||
|
||||
const extraPayOptions = getDictOptions('extra_pay_type')
|
||||
const extraPayOptions = ref([])
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const show = ref(false)
|
||||
@@ -83,6 +83,7 @@ function open(id) {
|
||||
show.value = true
|
||||
resetForm(id)
|
||||
getFormList()
|
||||
getOptions()
|
||||
}
|
||||
defineExpose({
|
||||
open
|
||||
@@ -135,6 +136,12 @@ async function onSubmit() {
|
||||
function handleRemove(type, index) {
|
||||
form.value[type].splice(index, 1)
|
||||
}
|
||||
|
||||
function getOptions() {
|
||||
ExtraFeeApi.getExtraFeeSimpleList().then((data) => {
|
||||
extraPayOptions.value = data
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -1,16 +1,44 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||
<Descriptions :data="orderInfo" :schema="schema" :columns="2" labelWidth="130px" />
|
||||
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-radio-group v-model="formData.state">
|
||||
<el-radio :label="3"> 通过 </el-radio>
|
||||
<el-radio :label="4"> 驳回 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<Editor v-model:modelValue="formData.remark" />
|
||||
</el-form-item>
|
||||
<el-table :data="followList" size="small" border class="mt-10px mb-10px">
|
||||
<el-table-column prop="userName" label="跟进人" />
|
||||
<el-table-column prop="followTime" label="最新跟进时间" :formatter="dateFormatter" />
|
||||
<el-table-column prop="signSate" label="成交状态" />
|
||||
</el-table>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
:model="formData"
|
||||
:rules="ruels"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-radio-group v-model="formData.state">
|
||||
<el-radio :label="3"> 通过 </el-radio>
|
||||
<el-radio :label="4"> 驳回 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="审核日期" prop="checkTime">
|
||||
<el-date-picker
|
||||
v-model="formData.checkTime"
|
||||
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">
|
||||
<Editor v-model:modelValue="formData.remark" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -19,8 +47,10 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script name="DialogFeebackAudit" setup>
|
||||
import { auditPayment } from '@/api/clue/payment'
|
||||
|
||||
import { getFollowUserList } from '@/api/clue'
|
||||
import { auditPayment, getPaymentDetail } from '@/api/clue/payment'
|
||||
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||
import {} from '@/utils/formatTime'
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
@@ -82,6 +112,11 @@ const formData = ref({
|
||||
state: 3,
|
||||
remark: ''
|
||||
})
|
||||
|
||||
const ruels = {
|
||||
checkTime: { required: true, message: '审核日期不可为空', trigger: 'blur,change' }
|
||||
}
|
||||
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
const orderInfo = ref({})
|
||||
@@ -90,8 +125,10 @@ const open = async (row) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = '回款审核'
|
||||
resetForm(row.id)
|
||||
// 修改时,设置数据
|
||||
orderInfo.value = { ...row }
|
||||
// 设置数据
|
||||
orderInfo.value = await getPaymentDetail({ id: row.id })
|
||||
// 获取跟进信息
|
||||
getFollowInfo(row.clueId)
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
@@ -120,8 +157,17 @@ const resetForm = (signId) => {
|
||||
formData.value = {
|
||||
payId: signId,
|
||||
state: 3,
|
||||
checkTime: formatDate(new Date()),
|
||||
remark: ''
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
||||
const followList = ref([])
|
||||
|
||||
function getFollowInfo(id) {
|
||||
getFollowUserList({ id }).then((data) => {
|
||||
followList.value = data
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
:columns="2"
|
||||
labelWidth="130px"
|
||||
/>
|
||||
<el-table :data="followList" size="small" border class="mt-10px">
|
||||
<el-table-column prop="userName" label="跟进人" />
|
||||
<el-table-column prop="followTime" label="最新跟进时间" :formatter="dateFormatter" />
|
||||
<el-table-column prop="signSate" label="成交状态" />
|
||||
</el-table>
|
||||
<Descriptions
|
||||
title="审核详情"
|
||||
:data="orderInfo"
|
||||
@@ -18,110 +23,40 @@
|
||||
</template>
|
||||
<script name="DialogFeebackDetail" setup>
|
||||
import { getPaymentDetail } from '@/api/clue/payment'
|
||||
import { getFollowUserList } from '@/api/clue'
|
||||
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
import { schoolApplySchema, mallApplySchema, auditSchema, cancelSchema } from './feedbackSchema.js'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
|
||||
const appStore = useAppStore()
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
|
||||
const applySchema = [
|
||||
{
|
||||
field: 'name',
|
||||
label: '线索名称',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'phone',
|
||||
label: '联系方式',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'signUserName',
|
||||
label: '登记人',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'dealDate',
|
||||
label: '成交日期',
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'money',
|
||||
label: '回款金额',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'isPayoff',
|
||||
label: '是否结清',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'applyUserName',
|
||||
label: '申请人',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'applyTime',
|
||||
label: '申请时间',
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
label: '备注',
|
||||
span: 2,
|
||||
isEditor: true
|
||||
}
|
||||
]
|
||||
|
||||
const auditSchema = [
|
||||
{
|
||||
field: 'stateName',
|
||||
label: '审核状态',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'checkUser',
|
||||
label: '审核人',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'checkTime',
|
||||
label: '审核时间',
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'checkRemark',
|
||||
label: '备注',
|
||||
span: 3,
|
||||
isEditor: true
|
||||
}
|
||||
]
|
||||
|
||||
const cancelSchema = [
|
||||
{
|
||||
field: 'stateName',
|
||||
label: '审核状态',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'revokeTime',
|
||||
label: '撤销时间',
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
span: 1
|
||||
}
|
||||
]
|
||||
const applySchema = computed(() => {
|
||||
return appStore.getAppInfo?.instanceType == 1 ? schoolApplySchema : mallApplySchema
|
||||
})
|
||||
|
||||
const orderInfo = ref({})
|
||||
/** 打开弹窗 */
|
||||
const open = async (id) => {
|
||||
const open = async (row) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = '回款申请详情'
|
||||
try {
|
||||
orderInfo.value = await getPaymentDetail({ id })
|
||||
orderInfo.value = await getPaymentDetail({ id: row.id })
|
||||
getFollowInfo(row.clueId)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
const followList = ref([])
|
||||
|
||||
function getFollowInfo(id) {
|
||||
getFollowUserList({ id }).then((data) => {
|
||||
followList.value = data
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<Dialog title="成交详情" v-model="show" width="800px">
|
||||
<el-tabs v-model="tabName">
|
||||
<el-tab-pane label="线索信息" name="clueInfo">
|
||||
<el-tab-pane label="线索信息" name="clueInfo" v-if="checkPermi(['clue:pool:detail'])">
|
||||
<Descriptions :data="clueInfo" :schema="clueSchema" :columns="2" labelWidth="130px" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="成交信息" name="orderInfo">
|
||||
@@ -64,13 +64,22 @@
|
||||
<el-tab-pane label="回款记录" name="returnRecord">
|
||||
<el-table :data="returnRecordList" border stripe>
|
||||
<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="isPayoff" label="是否结清" />
|
||||
<el-table-column prop="stateName" label="审核状态" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="售后记录" name="afterSale">
|
||||
<el-tab-pane
|
||||
label="售后记录"
|
||||
name="afterSale"
|
||||
v-if="checkPermi(['clue:order:after-sale-list'])"
|
||||
>
|
||||
<el-table :data="aftersaleList" border stripe>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column prop="reason" label="售后原因" />
|
||||
@@ -183,11 +192,17 @@ function getFields() {
|
||||
})
|
||||
|
||||
getOrderFieldList().then((data) => {
|
||||
const arr = useCrudSchemas(data).allSchemas.detailSchema
|
||||
arr.forEach((it) => {
|
||||
const list = useCrudSchemas(data).allSchemas.detailSchema
|
||||
const arr = []
|
||||
list.forEach((it) => {
|
||||
if (it.label.includes('日期')) {
|
||||
it.dateFormat = 'YYYY-MM-DD'
|
||||
}
|
||||
if (it.field == 'receivedMoney') {
|
||||
checkPermi(['clue:order:return-list']) && arr.push(it)
|
||||
} else {
|
||||
arr.push(it)
|
||||
}
|
||||
})
|
||||
if (arr.length % 2 != 0) {
|
||||
arr.push({})
|
||||
|
||||
@@ -52,6 +52,13 @@
|
||||
<template #actionMore>
|
||||
<el-button @click="getTableList" v-hasPermi="['clue:order:search']"> 搜索 </el-button>
|
||||
<el-button @click="resetQuery" v-hasPermi="['clue:order:reset']"> 重置 </el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleBatchUpdateInstall"
|
||||
v-hasPermi="['clue:order:batch-update-install']"
|
||||
>
|
||||
批量修改安装状态
|
||||
</el-button>
|
||||
</template>
|
||||
</Search>
|
||||
</div>
|
||||
@@ -61,49 +68,98 @@
|
||||
class="mt-10px"
|
||||
v-model:tableObject="tableObject"
|
||||
:tableColumns="allSchemas.tableColumns"
|
||||
rowkey="signId"
|
||||
:expandRowKeys="expendRows"
|
||||
@get-list="getTableList"
|
||||
@get-checked-columns="getCheckedColumns"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="expand">
|
||||
<el-table-column type="selection" width="60" fixed="left" />
|
||||
<el-table-column type="expand" fixed="left">
|
||||
<template #default="{ row }">
|
||||
<div class="p-10px flex justify-center">
|
||||
<el-table :data="row.signProducts" stripe style="width: 900px">
|
||||
<el-table-column prop="productName" label="成交产品" />
|
||||
<el-table-column prop="specsName" label="产品规格" width="100px" />
|
||||
<el-table-column prop="signNum" label="成交数量" width="90px" />
|
||||
<el-table-column prop="remark" label="成交备注" />
|
||||
<el-table-column label="发货状态" prop="sendState" width="90px" />
|
||||
<el-table-column label="发货备注" width="100px">
|
||||
<template #default="scope">
|
||||
<el-popover
|
||||
placement="top"
|
||||
width="500px"
|
||||
trigger="click"
|
||||
v-if="scope.row.warehouseName && scope.row.sendRemark"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
||||
</template>
|
||||
<div v-dompurify-html="scope.row.sendRemark"></div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="mr-10px"
|
||||
link
|
||||
:disabled="scope.row.sendState == '已发货'"
|
||||
style="padding: 0; margin-left: 0"
|
||||
v-hasPermi="['clue:order:send']"
|
||||
@click="handleDelivery(scope.row)"
|
||||
>
|
||||
发货
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<VueDraggable
|
||||
target="tbody"
|
||||
v-model="row.signProducts"
|
||||
:animation="150"
|
||||
@end="onDragEnd"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table
|
||||
:data="row.signProducts"
|
||||
row-key="id"
|
||||
stripe
|
||||
style="width: 80%; margin: 0 auto"
|
||||
>
|
||||
<el-table-column prop="productName" label="成交产品" width="120px" />
|
||||
<el-table-column prop="specsName" label="产品规格" width="120px" />
|
||||
<el-table-column prop="signNum" label="成交数量" width="90px" />
|
||||
<el-table-column prop="remark" label="成交备注" width="100px" />
|
||||
<el-table-column label="生产状态" width="160px">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isProduced"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-text="已生产"
|
||||
inactive-text="待生产"
|
||||
:disabled="!checkPermi(['clue:order:update-produce'])"
|
||||
size="small"
|
||||
@change="handleChangeProdoce(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发货状态" prop="sendState" width="90px">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="scope.row.sendState == '待发货' ? 'danger' : 'success'"
|
||||
size="small"
|
||||
>
|
||||
{{ scope.row.sendState }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发货备注" width="100px">
|
||||
<template #default="scope">
|
||||
<el-popover
|
||||
placement="top"
|
||||
width="500px"
|
||||
trigger="click"
|
||||
v-if="scope.row.warehouseName && scope.row.sendRemark"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
||||
</template>
|
||||
<div v-dompurify-html="scope.row.sendRemark"></div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="mr-10px"
|
||||
link
|
||||
:disabled="scope.row.sendState == '已发货'"
|
||||
style="padding: 0; margin-left: 0"
|
||||
v-hasPermi="['clue:order:send']"
|
||||
@click="handleDelivery(scope.row)"
|
||||
>
|
||||
发货
|
||||
</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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</VueDraggable>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -115,17 +171,14 @@
|
||||
min-width="120px"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-popover
|
||||
placement="top"
|
||||
width="500px"
|
||||
trigger="click"
|
||||
v-if="item.field == 'remark' && row.remark"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
||||
</template>
|
||||
<div v-dompurify-html="row.remark"></div>
|
||||
</el-popover>
|
||||
<div v-if="item.field == 'remark' || item.form?.component == 'Editor'">
|
||||
<el-popover placement="top" width="500px" trigger="click" v-if="row[item.field]">
|
||||
<template #reference>
|
||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
||||
</template>
|
||||
<div v-dompurify-html="row[item.field]"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<span v-else-if="item.form?.component == 'DatePicker'">
|
||||
{{ formatDate(row[item.field]) }}
|
||||
</span>
|
||||
@@ -184,6 +237,16 @@
|
||||
>
|
||||
取消登记
|
||||
</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>
|
||||
</el-table-column>
|
||||
</SSTable>
|
||||
@@ -194,13 +257,14 @@
|
||||
<DialogAfterSale ref="afterSaleDialog" />
|
||||
<DialogExtraFee ref="extraFeeDialog" />
|
||||
<DialogDelivery ref="deliveryDialog" @success="getTableList" />
|
||||
<DialogAddProduct ref="addProductDialog" @success="getTableList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ClueOrderList">
|
||||
import { getSimpleFieldList } from '@/api/clue/orderField'
|
||||
import * as SignApi from '@/api/clue/sign'
|
||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
||||
import { getSimpleProductList } from '@/api/mall/product'
|
||||
|
||||
import DialogOrder from './DialogOrder.vue'
|
||||
@@ -208,16 +272,17 @@ import DialogFeeback from './DialogFeeback.vue'
|
||||
import DialogAfterSale from './DialogAfterSale.vue'
|
||||
import DialogExtraFee from './DialogExtraPay.vue'
|
||||
import DialogDelivery from './DialogDelivery.vue'
|
||||
import DialogAddProduct from './DialogAddProduct.vue'
|
||||
|
||||
import { removeNullField } from '@/utils'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { ElMessageBox, ElOption, ElSelect } from 'element-plus'
|
||||
import { VueDraggable } from 'vue-draggable-plus'
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
|
||||
const userOptions = ref([])
|
||||
const allUserOptions = ref([])
|
||||
onMounted(() => {
|
||||
getUserOption().then((data) => {
|
||||
userOptions.value = data
|
||||
getCurdSchemas()
|
||||
})
|
||||
getOptions()
|
||||
})
|
||||
|
||||
@@ -286,8 +351,10 @@ async function getCurdSchemas() {
|
||||
try {
|
||||
const data = await getSimpleFieldList()
|
||||
data.forEach((elem) => {
|
||||
if (elem.field == 'createUser') {
|
||||
if (['createUser'].includes(elem.field)) {
|
||||
elem.search.options = userOptions.value
|
||||
} else if (['convertPeople', 'receiver'].includes(elem.field)) {
|
||||
elem.search.options = allUserOptions.value
|
||||
}
|
||||
})
|
||||
allSchemas.value = useCrudSchemas(data).allSchemas
|
||||
@@ -343,16 +410,127 @@ function handleAddFee(row) {
|
||||
extraFeeDialog.value.open(row.signId)
|
||||
}
|
||||
|
||||
function getOptions() {
|
||||
async function getOptions() {
|
||||
// 产品
|
||||
getSimpleProductList().then((data) => {
|
||||
prodOptions.value = data
|
||||
})
|
||||
|
||||
userOptions.value = await getUserOption()
|
||||
allUserOptions.value = await getAllUserList()
|
||||
getCurdSchemas()
|
||||
}
|
||||
const deliveryDialog = ref()
|
||||
function handleDelivery(row) {
|
||||
deliveryDialog.value.open(row)
|
||||
}
|
||||
|
||||
const addProductDialog = ref()
|
||||
function handleAddProduct(row) {
|
||||
addProductDialog.value.open(row.signId, prodOptions.value)
|
||||
}
|
||||
|
||||
const batchIds = ref([])
|
||||
function handleSelectionChange(val) {
|
||||
batchIds.value = val.map((it) => it.signId)
|
||||
}
|
||||
|
||||
const selectedValue = ref(undefined)
|
||||
const installOptions = [
|
||||
{ label: '待安装', value: 1 },
|
||||
{ label: '已安装', value: 2 },
|
||||
{ label: '无需安装', value: 3 }
|
||||
]
|
||||
|
||||
const select = () =>
|
||||
h(
|
||||
ElSelect,
|
||||
{
|
||||
modelValue: selectedValue.value,
|
||||
placeholder: '新状态',
|
||||
'onUpdate:modelValue': (val) => {
|
||||
selectedValue.value = val
|
||||
}
|
||||
},
|
||||
() =>
|
||||
installOptions.map((item) => {
|
||||
return h(ElOption, { label: item.label, value: item.value })
|
||||
})
|
||||
)
|
||||
|
||||
function handleBatchUpdateInstall() {
|
||||
if (batchIds.value.length) {
|
||||
ElMessageBox({
|
||||
title: '是否确认修改安装状态?',
|
||||
message: select,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(async (action) => {
|
||||
// 处理用户点击确定或取消按钮后的逻辑
|
||||
if (action == 'confirm') {
|
||||
try {
|
||||
// 发起修改状态
|
||||
await SignApi.updateInstallStatus(batchIds.value, selectedValue.value)
|
||||
message.success('修改成功')
|
||||
// 刷新列表
|
||||
await getTableList()
|
||||
} catch (err) {
|
||||
// 取消后,进行恢复按钮
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
message.info('请选择表格行')
|
||||
}
|
||||
}
|
||||
|
||||
async function handleRemoveProduct(row) {
|
||||
try {
|
||||
// 修改状态的二次确认
|
||||
await message.confirm(`确认要删除${row.productName}吗?`)
|
||||
// 发起修改状态
|
||||
await SignApi.removeOrderProduct(row.id)
|
||||
message.success('删除成功')
|
||||
// 刷新列表
|
||||
getTableList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
async function handleChangeProdoce(row) {
|
||||
try {
|
||||
// 修改状态的二次确认
|
||||
await message.confirm('确认要修改生产状态吗?')
|
||||
// 发起修改状态
|
||||
await SignApi.updateProduceStatus({
|
||||
signId: row.signId,
|
||||
id: row.id,
|
||||
isProduced: row.isProduced
|
||||
})
|
||||
message.success('修改成功')
|
||||
// 刷新列表
|
||||
getTableList()
|
||||
} catch {
|
||||
// 取消后,进行恢复按钮
|
||||
row.isProduced = !row.isProduced
|
||||
}
|
||||
}
|
||||
|
||||
const expendRows = ref([])
|
||||
async function onDragEnd(ev) {
|
||||
try {
|
||||
expendRows.value = [ev.data.signId]
|
||||
const list = tableObject.value.tableList.find((it) => it.signId == ev.data.signId).signProducts
|
||||
await SignApi.updateProduceSort(list.map((it) => it.id))
|
||||
message.success('修改成功')
|
||||
// 刷新列表
|
||||
getTableList()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
getTableList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -2,22 +2,44 @@
|
||||
<div>
|
||||
<el-form :model="searchForm" label-width="0" inline>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
|
||||
<el-input
|
||||
v-model="searchForm.signId"
|
||||
placeholder="成交单号"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable style="width: 120px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.phone" placeholder="联系方式" clearable />
|
||||
<el-input
|
||||
v-model="searchForm.phone"
|
||||
placeholder="联系方式"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.settlementType" placeholder="结算类型" clearable filterable>
|
||||
<el-select
|
||||
v-model="searchForm.settlementType"
|
||||
placeholder="结算类型"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option label="货款" value="货款" />
|
||||
<el-option label="其他支出" value="其他支出" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
|
||||
<el-select
|
||||
v-model="searchForm.signUser"
|
||||
placeholder="登记人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
@@ -35,6 +57,19 @@
|
||||
range-separator="-"
|
||||
start-placeholder="成交日期"
|
||||
end-placeholder="成交日期"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="searchForm.createDate"
|
||||
type="daterange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
range-separator="-"
|
||||
start-placeholder="支出日期"
|
||||
end-placeholder="支出日期"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -44,6 +79,7 @@
|
||||
filterable
|
||||
clearable
|
||||
@change="searchForm.signSpecs = undefined"
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in prodOptions"
|
||||
@@ -60,6 +96,7 @@
|
||||
filterable
|
||||
clearable
|
||||
:disabled="!searchForm.signProduct"
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in specsOptions(searchForm.signProduct)"
|
||||
@@ -70,12 +107,18 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.supplier" placeholder="选择供应商" filterable clearable>
|
||||
<el-select
|
||||
v-model="searchForm.supplier"
|
||||
placeholder="选择供应商"
|
||||
filterable
|
||||
clearable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="item.id"
|
||||
:label="item.supplierName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -87,9 +130,11 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch">查询</el-button>
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
<el-button @click="batchSettle">批量结算</el-button>
|
||||
<el-button @click="handleSearch" v-hasPermi="['clue:order:settle-search']">查询</el-button>
|
||||
<el-button @click="handleReset" v-hasPermi="['clue:order:settle-reset']">重置</el-button>
|
||||
<el-button @click="batchSettle" v-hasPermi="['clue:order:settle-batch-audit']">
|
||||
批量结算
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -112,10 +157,38 @@
|
||||
<el-table-column prop="phone" label="联系方式" width="120px" />
|
||||
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
||||
<el-table-column prop="dealDate" label="成交日期" width="120px" :formatter="dateFormatter" />
|
||||
<el-table-column prop="createTime" label="支出日期" width="140px">
|
||||
<template #default="{ row, col }">
|
||||
<el-date-picker
|
||||
v-if="row.edit"
|
||||
v-model="row.createTime"
|
||||
type="date"
|
||||
size="small"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 110px"
|
||||
:clearable="false"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
<div v-else>{{ dateFormatter(row, col, row.createTime) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="signProduct" label="成交产品" min-width="150px" />
|
||||
<el-table-column prop="signSpecs" label="成交规格" min-width="150px" />
|
||||
<el-table-column prop="supplier" label="供应商" min-width="150px" />
|
||||
<el-table-column prop="settlementPrice" label="结算单价" min-width="150px" />
|
||||
<el-table-column prop="settlementPrice" label="结算单价" min-width="150px">
|
||||
<template #default="{ row }">
|
||||
<el-input-number
|
||||
v-if="row.edit"
|
||||
v-model="row.settlementPrice"
|
||||
size="small"
|
||||
:min="0"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<div v-else>{{ row.settlementPrice }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="settlementNum" label="结算数量" min-width="150px" />
|
||||
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" />
|
||||
<el-table-column label="费用备注" width="90px">
|
||||
@@ -136,6 +209,7 @@
|
||||
/>
|
||||
<el-table-column prop="settlementUserName" label="结算人" min-width="90px" />
|
||||
<el-table-column prop="settlementType" label="结算类型" width="90px" fixed="right" />
|
||||
<el-table-column prop="isCommissioned" label="提成状态" width="90px" fixed="right" />
|
||||
<el-table-column prop="settlementState" label="结算状态" width="90px" fixed="right" />
|
||||
<el-table-column label="结算备注" width="90px">
|
||||
<template #default="scope">
|
||||
@@ -147,6 +221,19 @@
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.settlementState == '待结算'"
|
||||
type="primary"
|
||||
text
|
||||
v-hasPermi="['clue:order:settle-update']"
|
||||
@click="handleUpdate(row)"
|
||||
>
|
||||
{{ row.edit ? '保存' : '修改' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<Pagination
|
||||
v-model:limit="searchForm.pageSize"
|
||||
@@ -180,7 +267,7 @@ import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||
import { getSimpleProductList } from '@/api/mall/product'
|
||||
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 { dateFormatter } from '@/utils/formatTime'
|
||||
|
||||
@@ -196,6 +283,7 @@ const searchForm = ref({
|
||||
phone: undefined,
|
||||
signUser: undefined,
|
||||
dealDate: [],
|
||||
createDate: [],
|
||||
signProduct: undefined,
|
||||
signSpecs: undefined,
|
||||
signId: undefined,
|
||||
@@ -212,6 +300,7 @@ function handleReset() {
|
||||
phone: undefined,
|
||||
signUser: undefined,
|
||||
dealDate: [],
|
||||
createDate: [],
|
||||
signProduct: undefined,
|
||||
signSpecs: undefined,
|
||||
signId: undefined,
|
||||
@@ -264,6 +353,28 @@ function getSummaries(param) {
|
||||
return sums
|
||||
}
|
||||
|
||||
async function handleUpdate(row) {
|
||||
if (row.edit) {
|
||||
// 删除的二次确认
|
||||
await message.confirm('是否确认修改结算数据?')
|
||||
// 保存
|
||||
SettleApi.updateSettle({
|
||||
settlementId: row.settlementId,
|
||||
settlementPrice: row.settlementPrice,
|
||||
createTime: row.createTime
|
||||
})
|
||||
.then(() => {
|
||||
message.success('修改成功')
|
||||
getList()
|
||||
})
|
||||
.finally(() => {
|
||||
row.edit = false
|
||||
})
|
||||
} else {
|
||||
row.edit = true
|
||||
}
|
||||
}
|
||||
|
||||
const selectList = ref([])
|
||||
function handleSelectionChange(val) {
|
||||
selectList.value = [...val]
|
||||
@@ -308,9 +419,12 @@ async function handleSaveSettle() {
|
||||
|
||||
const userOptions = ref([])
|
||||
const prodOptions = ref([])
|
||||
const supplierOptions = getDictOptions('erp_supplier')
|
||||
const supplierOptions = ref([])
|
||||
|
||||
function getOptions() {
|
||||
getSupplierSimpleList().then((data) => {
|
||||
supplierOptions.value = data
|
||||
})
|
||||
// 产品
|
||||
getSimpleProductList().then((data) => {
|
||||
prodOptions.value = data
|
||||
|
||||
@@ -89,24 +89,31 @@
|
||||
min-width="120px"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-popover
|
||||
placement="top"
|
||||
width="500px"
|
||||
trigger="click"
|
||||
v-if="item.form?.component == 'Editor' && row[item.field]"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
||||
</template>
|
||||
<div v-dompurify-html="row.remark"></div>
|
||||
</el-popover>
|
||||
<div v-if="item.field == 'remark' || item.form?.component == 'Editor'">
|
||||
<el-popover placement="top" width="500px" trigger="click" v-if="row[item.field]">
|
||||
<template #reference>
|
||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
||||
</template>
|
||||
<div v-dompurify-html="row[item.field]"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<span v-else-if="item.form?.component == 'DatePicker'">
|
||||
{{ formatDate(row[item.field]) }}
|
||||
</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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="240px" fixed="right">
|
||||
<el-table-column label="操作" width="170px" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -153,6 +160,7 @@
|
||||
type="primary"
|
||||
class="mr-10px"
|
||||
link
|
||||
:disabled="scope.row.isCommissioned != '未发放'"
|
||||
style="padding: 0; margin-left: 0"
|
||||
v-hasPermi="['clue:pool:enroll']"
|
||||
@click="cancelDeal(scope.row)"
|
||||
@@ -174,7 +182,7 @@
|
||||
<script setup name="ClueOrderList">
|
||||
import { getSimpleFieldList } from '@/api/clue/orderField'
|
||||
import * as SignApi from '@/api/clue/sign'
|
||||
import { getSimpleUserList as getUserOption } 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'
|
||||
|
||||
@@ -187,11 +195,8 @@ import { removeNullField } from '@/utils'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
|
||||
const userOptions = ref([])
|
||||
const allUserOptions = ref([])
|
||||
onMounted(() => {
|
||||
getUserOption().then((data) => {
|
||||
userOptions.value = data
|
||||
getCurdSchemas()
|
||||
})
|
||||
getOptions()
|
||||
})
|
||||
|
||||
@@ -246,6 +251,11 @@ async function getTableList() {
|
||||
pageNo: tableObject.value.pageNo,
|
||||
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))
|
||||
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams }))
|
||||
tableObject.value.total = data.total
|
||||
@@ -255,13 +265,17 @@ async function getTableList() {
|
||||
}
|
||||
|
||||
const loading = ref(true)
|
||||
const searchFieldList = ref([])
|
||||
async function getCurdSchemas() {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await getSimpleFieldList()
|
||||
searchFieldList.value = data.filter((it) => it.isCustom)
|
||||
data.forEach((elem) => {
|
||||
if (elem.field == 'createUser') {
|
||||
if (['createUser'].includes(elem.field)) {
|
||||
elem.search.options = userOptions.value
|
||||
} else if (['convertPeople', 'receiver'].includes(elem.field)) {
|
||||
elem.search.options = allUserOptions.value
|
||||
}
|
||||
})
|
||||
allSchemas.value = useCrudSchemas(data).allSchemas
|
||||
@@ -333,12 +347,15 @@ async function getClassTypeOptions() {
|
||||
classOptions.value = data
|
||||
}
|
||||
|
||||
function getOptions() {
|
||||
async function getOptions() {
|
||||
// 驾校
|
||||
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
|
||||
schoolOptions.value = data.schoolList
|
||||
allPlaceOptions.value = data.placeList
|
||||
})
|
||||
userOptions.value = await getUserOption()
|
||||
allUserOptions.value = await getAllUserList()
|
||||
getCurdSchemas()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -8,15 +8,127 @@
|
||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.state" placeholder="审核状态" clearable>
|
||||
<el-input v-model="searchForm.mobile" placeholder="联系方式" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.state" placeholder="审核状态" clearable style="width: 120px">
|
||||
<el-option label="待审核" :value="1" />
|
||||
<el-option label="已撤销" :value="2" />
|
||||
<el-option label="已通过" :value="3" />
|
||||
<el-option label="已驳回" :value="4" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
||||
<el-form-item>
|
||||
<el-select
|
||||
v-model="searchForm.receiver"
|
||||
placeholder="接待人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in allUserOptions"
|
||||
:key="item.id"
|
||||
:label="item.nickname"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</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-select
|
||||
v-model="searchForm.convertPeople"
|
||||
placeholder="转化人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in allUserOptions"
|
||||
:key="item.id"
|
||||
:label="item.nickname"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
|
||||
<el-select
|
||||
v-model="searchForm.signUser"
|
||||
placeholder="登记人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
@@ -34,10 +146,17 @@
|
||||
range-separator="-"
|
||||
start-placeholder="成交日期"
|
||||
end-placeholder="成交日期"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.applyUser" placeholder="申请人" clearable filterable>
|
||||
<el-select
|
||||
v-model="searchForm.applyUser"
|
||||
placeholder="申请人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
@@ -55,12 +174,28 @@
|
||||
range-separator="-"
|
||||
start-placeholder="申请日期"
|
||||
end-placeholder="申请日期"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch">查询</el-button>
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
<el-button @click="batchAudit">批量审核</el-button>
|
||||
<el-date-picker
|
||||
v-model="searchForm.checkTime"
|
||||
type="daterange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
range-separator="-"
|
||||
start-placeholder="审核日期"
|
||||
end-placeholder="审核日期"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<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="handleExport" v-hasPermi="['clue:order:return-export']">导出</el-button>
|
||||
<el-button @click="batchAudit" v-hasPermi="['clue:order:return-batch-audit']">
|
||||
批量审核
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -68,14 +203,115 @@
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
border
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<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="name" label="线索名称" min-width="200px" />
|
||||
<el-table-column prop="phone" label="联系方式" min-width="150px" />
|
||||
<el-table-column prop="money" label="回款金额" min-width="90" />
|
||||
<el-table-column prop="isPayoff" label="是否结清" min-width="90" />
|
||||
<el-table-column type="selection" width="60" :selectable="(row) => row.state == 1" />
|
||||
<el-table-column prop="signId" label="成交单号" min-width="120px" />
|
||||
<el-table-column prop="name" label="线索名称" width="120px" />
|
||||
<el-table-column prop="phone" label="联系方式" width="120px" />companyProfit
|
||||
<el-table-column prop="money" label="回款金额" min-width="120px">
|
||||
<template #default="{ row }">
|
||||
<el-input-number
|
||||
v-if="row.edit"
|
||||
v-model="row.money"
|
||||
size="small"
|
||||
:min="0"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<div v-else>{{ row.money }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||
prop="companyProfit"
|
||||
label="公司利润"
|
||||
min-width="120px"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-input-number
|
||||
v-if="row.edit"
|
||||
v-model="row.companyProfit"
|
||||
size="small"
|
||||
:min="0"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<div v-else>{{ row.companyProfit }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||
prop="personProfit"
|
||||
label="员工利润"
|
||||
min-width="120px"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-input-number
|
||||
v-if="row.edit"
|
||||
v-model="row.personProfit"
|
||||
size="small"
|
||||
:min="0"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<div v-else>{{ row.personProfit }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="signPrice" label="成交价" min-width="120" />
|
||||
<el-table-column prop="isPayoff" label="是否结清" min-width="90">
|
||||
<template #default="{ row }">
|
||||
<el-select v-if="row.edit" size="small" v-model="row.isPayoffValue">
|
||||
<el-option label="结清" :value="true" />
|
||||
<el-option label="未结清" :value="false" />
|
||||
</el-select>
|
||||
<div v-else>{{ row.isPayoff }}</div>
|
||||
</template>
|
||||
</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
|
||||
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||
prop="receiverName"
|
||||
label="接待人"
|
||||
min-width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
v-else-if="appStore.getAppInfo?.instanceType == 2"
|
||||
prop="convertPeopleName"
|
||||
label="转化人"
|
||||
min-width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||
prop="area"
|
||||
label="区域"
|
||||
min-width="90"
|
||||
/>
|
||||
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
||||
<el-table-column
|
||||
prop="dealDate"
|
||||
@@ -87,18 +323,48 @@
|
||||
<el-table-column
|
||||
prop="applyTime"
|
||||
label="申请时间"
|
||||
min-width="140px"
|
||||
:formatter="dateFormatter"
|
||||
>
|
||||
<template #default="{ row, col }">
|
||||
<el-date-picker
|
||||
v-if="row.edit"
|
||||
v-model="row.applyTime"
|
||||
type="date"
|
||||
size="small"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 110px"
|
||||
:clearable="false"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
<div v-else>{{ dateFormatter(row, col, row.applyTime) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="checkUser" label="审核人" min-width="90" />
|
||||
<el-table-column
|
||||
prop="checkTime"
|
||||
label="审核时间"
|
||||
min-width="120px"
|
||||
:formatter="dateFormatter"
|
||||
/>
|
||||
<el-table-column prop="stateName" label="审核状态" fixed="right" min-width="90" />
|
||||
<el-table-column label="操作" width="150px" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" style="padding: 0" text @click="handleDetail(row.id)">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="mr-10px"
|
||||
style="padding: 0; margin-left: 0"
|
||||
text
|
||||
v-hasPermi="['clue:order:return-detail']"
|
||||
@click="handleDetail(row)"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="padding: 0"
|
||||
class="mr-10px"
|
||||
style="padding: 0; margin-left: 0"
|
||||
text
|
||||
v-if="row.state == 1 && currentUserId == row.applyUser"
|
||||
v-hasPermi="['clue:order:return']"
|
||||
@@ -108,7 +374,19 @@
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="padding: 0"
|
||||
class="mr-10px"
|
||||
style="padding: 0; margin-left: 0"
|
||||
text
|
||||
v-if="row.state == 1"
|
||||
v-hasPermi="['clue:order:update-return-money']"
|
||||
@click="handleUpdate(row)"
|
||||
>
|
||||
<span>{{ row.edit ? '保存' : '修改金额' }}</span>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="mr-10px"
|
||||
style="padding: 0; margin-left: 0"
|
||||
text
|
||||
v-if="row.state == 1"
|
||||
v-hasPermi="['clue:order:return-audit']"
|
||||
@@ -134,17 +412,26 @@
|
||||
|
||||
<script setup name="Reback">
|
||||
import * as FeebackApi from '@/api/clue/payment'
|
||||
import { getSimpleUserList as getUserOption } 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 DialogFeebackAudit from './DialogFeebackAudit.vue'
|
||||
import DialogFeebackDetail from './DialogFeebackDetail.vue'
|
||||
import DialogBatchAudit from './DialogBatchAudit.vue'
|
||||
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import { removeNullField } from '@/utils'
|
||||
import download from '@/utils/download'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||
import { ElLoading } from 'element-plus'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const message = useMessage() // 消息弹窗
|
||||
const appStore = useAppStore()
|
||||
|
||||
const feebackDialog = ref()
|
||||
|
||||
@@ -158,11 +445,21 @@ const searchForm = ref({
|
||||
signUser: undefined,
|
||||
applyTime: [],
|
||||
applyUser: undefined,
|
||||
checkTime: [],
|
||||
phone: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 20
|
||||
})
|
||||
|
||||
const userOptions = 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 total = ref(0)
|
||||
@@ -175,29 +472,75 @@ function handleSearch() {
|
||||
function handleReset() {
|
||||
searchForm.value = {
|
||||
signId: undefined,
|
||||
receiver: undefined,
|
||||
convertPeople: undefined,
|
||||
name: undefined,
|
||||
dealDate: [],
|
||||
state: undefined,
|
||||
signUser: undefined,
|
||||
applyTime: [],
|
||||
applyUser: undefined,
|
||||
checkTime: [],
|
||||
mobile: undefined,
|
||||
signSchool: undefined,
|
||||
signPlace: undefined,
|
||||
signClass: undefined,
|
||||
area: undefined,
|
||||
pageNo: 1,
|
||||
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 loading = ref(false)
|
||||
async function getList() {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await FeebackApi.getPaymentPage(searchForm.value)
|
||||
const data = await FeebackApi.getPaymentPage(removeNullField(searchForm.value))
|
||||
tableList.value = data.list
|
||||
total.value = data.total
|
||||
totalInfo.value = data.totalData
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
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([])
|
||||
function handleSelectionChange(val) {
|
||||
batchIds.value = val.map((it) => it.id)
|
||||
@@ -206,15 +549,15 @@ function handleSelectionChange(val) {
|
||||
const batchAuditDialog = ref()
|
||||
function batchAudit() {
|
||||
if (batchIds.value.length) {
|
||||
batchAuditDialog.value.open('aftersale', batchIds.value)
|
||||
batchAuditDialog.value.open('feeback', batchIds.value)
|
||||
} else {
|
||||
message.info('请选择表格中需要审核的数据')
|
||||
}
|
||||
}
|
||||
|
||||
const feebackDetailDialog = ref()
|
||||
function handleDetail(id) {
|
||||
feebackDetailDialog.value.open(id)
|
||||
function handleDetail(row) {
|
||||
feebackDetailDialog.value.open(row)
|
||||
}
|
||||
async function handleCancel(id) {
|
||||
try {
|
||||
@@ -233,10 +576,71 @@ function handleAudit(row) {
|
||||
feebackDialog.value.open(row)
|
||||
}
|
||||
|
||||
const areaOptions = ref([])
|
||||
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) => {
|
||||
userOptions.value = data
|
||||
})
|
||||
getAllUserList().then((data) => {
|
||||
allUserOptions.value = data
|
||||
})
|
||||
}
|
||||
|
||||
function getSummaries(param) {
|
||||
const { columns } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
} else if (column.property == 'money') {
|
||||
sums[index] = totalInfo.value.totalMoney
|
||||
} else if (column.property == 'personProfit') {
|
||||
sums[index] = totalInfo.value.totalPersonProfit
|
||||
} else if (column.property == 'companyProfit') {
|
||||
sums[index] = totalInfo.value.totalCompanyProfit
|
||||
} else if (column.property == 'signPrice') {
|
||||
sums[index] = totalInfo.value.totalSignPrice
|
||||
} else {
|
||||
sums[index] = ''
|
||||
}
|
||||
})
|
||||
|
||||
return sums
|
||||
}
|
||||
|
||||
async function handleUpdate(row) {
|
||||
if (row.edit) {
|
||||
// 删除的二次确认
|
||||
await message.confirm('是否确认修改回款金额?')
|
||||
// 保存
|
||||
FeebackApi.updateApplyPayment({
|
||||
id: row.id,
|
||||
money: row.money,
|
||||
companyProfit: row.companyProfit,
|
||||
personProfit: row.personProfit,
|
||||
isPayoff: row.isPayoffValue,
|
||||
applyTime: formatDate(row.applyTime)
|
||||
})
|
||||
.then(() => {
|
||||
message.success('修改成功')
|
||||
getList()
|
||||
})
|
||||
.finally(() => {
|
||||
row.edit = false
|
||||
})
|
||||
} else {
|
||||
row.edit = true
|
||||
row.isPayoffValue = row.isPayoff == '结清'
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -2,22 +2,44 @@
|
||||
<div>
|
||||
<el-form :model="searchForm" label-width="0" inline>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
|
||||
<el-input
|
||||
v-model="searchForm.signId"
|
||||
placeholder="成交单号"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable style="width: 120px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.phone" placeholder="联系方式" clearable />
|
||||
<el-input
|
||||
v-model="searchForm.phone"
|
||||
placeholder="联系方式"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.settlementType" placeholder="结算类型" clearable filterable>
|
||||
<el-select
|
||||
v-model="searchForm.settlementType"
|
||||
placeholder="结算类型"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option label="报名费" value="报名费" />
|
||||
<el-option label="其他支出" value="其他支出" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
|
||||
<el-select
|
||||
v-model="searchForm.signUser"
|
||||
placeholder="登记人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
@@ -35,6 +57,19 @@
|
||||
range-separator="-"
|
||||
start-placeholder="成交日期"
|
||||
end-placeholder="成交日期"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="searchForm.createDate"
|
||||
type="daterange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
range-separator="-"
|
||||
start-placeholder="支出日期"
|
||||
end-placeholder="支出日期"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -44,6 +79,7 @@
|
||||
filterable
|
||||
clearable
|
||||
@change="changeSchool"
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in schoolOptions"
|
||||
@@ -61,6 +97,7 @@
|
||||
clearable
|
||||
:disabled="!searchForm.signSchool"
|
||||
@change="changePlace"
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in placeOptions"
|
||||
@@ -77,6 +114,7 @@
|
||||
placeholder="选择班型"
|
||||
filterable
|
||||
clearable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in classOptions"
|
||||
@@ -93,9 +131,11 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch">查询</el-button>
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
<el-button @click="batchSettle">批量结算</el-button>
|
||||
<el-button @click="handleSearch" v-hasPermi="['clue:order:settle-search']">查询</el-button>
|
||||
<el-button @click="handleReset" v-hasPermi="['clue:order:settle-reset']">重置</el-button>
|
||||
<el-button @click="batchSettle" v-hasPermi="['clue:order:settle-batch-audit']">
|
||||
批量结算
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -118,10 +158,38 @@
|
||||
<el-table-column prop="phone" label="联系方式" width="120px" />
|
||||
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
||||
<el-table-column prop="dealDate" label="成交日期" width="120px" :formatter="dateFormatter" />
|
||||
<el-table-column prop="createTime" label="支出日期" width="140px">
|
||||
<template #default="{ row, col }">
|
||||
<el-date-picker
|
||||
v-if="row.edit"
|
||||
v-model="row.createTime"
|
||||
type="date"
|
||||
size="small"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 110px"
|
||||
:clearable="false"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
<div v-else>{{ dateFormatter(row, col, row.createTime) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="signSchool" label="成交驾校" min-width="150px" />
|
||||
<el-table-column prop="signPlace" label="成交场地" min-width="150px" />
|
||||
<el-table-column prop="signClass" label="成交班型" min-width="150px" />
|
||||
<el-table-column prop="settlementPrice" label="结算单价" min-width="150px" />
|
||||
<el-table-column prop="settlementPrice" label="结算单价" min-width="150px">
|
||||
<template #default="{ row }">
|
||||
<el-input-number
|
||||
v-if="row.edit"
|
||||
v-model="row.settlementPrice"
|
||||
size="small"
|
||||
:min="0"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<div v-else>{{ row.settlementPrice }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="settlementNum" label="结算数量" min-width="150px" />
|
||||
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" />
|
||||
<el-table-column label="费用备注" width="90px">
|
||||
@@ -142,6 +210,7 @@
|
||||
/>
|
||||
<el-table-column prop="settlementUserName" label="结算人" min-width="90px" />
|
||||
<el-table-column prop="settlementType" label="结算类型" width="90px" fixed="right" />
|
||||
<el-table-column prop="isCommissioned" label="提成状态" width="90px" fixed="right" />
|
||||
<el-table-column prop="settlementState" label="结算状态" width="90px" fixed="right" />
|
||||
<el-table-column label="结算备注" width="90px">
|
||||
<template #default="scope">
|
||||
@@ -153,6 +222,19 @@
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.settlementState == '待结算'"
|
||||
type="primary"
|
||||
text
|
||||
v-hasPermi="['clue:order:settle-update']"
|
||||
@click="handleUpdate(row)"
|
||||
>
|
||||
{{ row.edit ? '保存' : '修改' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<Pagination
|
||||
v-model:limit="searchForm.pageSize"
|
||||
@@ -166,6 +248,16 @@
|
||||
<el-form-item label="结算金额">
|
||||
{{ settleAmount }}
|
||||
</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">
|
||||
<Editor v-model:modelValue="form.remark" />
|
||||
</el-form-item>
|
||||
@@ -188,7 +280,7 @@ import { getPlaceList } from '@/api/school/place'
|
||||
import { getClassTypeList } from '@/api/school/class'
|
||||
import * as SettleApi from '@/api/clue/settle'
|
||||
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||
import { removeNullField } from '@/utils/index'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
@@ -203,6 +295,7 @@ const searchForm = ref({
|
||||
phone: undefined,
|
||||
signUser: undefined,
|
||||
dealDate: [],
|
||||
createDate: [],
|
||||
signSchool: undefined,
|
||||
signPlace: undefined,
|
||||
signClass: undefined,
|
||||
@@ -219,6 +312,7 @@ function handleReset() {
|
||||
phone: undefined,
|
||||
signUser: undefined,
|
||||
dealDate: [],
|
||||
createDate: [],
|
||||
signSchool: undefined,
|
||||
signPlace: undefined,
|
||||
signClass: undefined,
|
||||
@@ -239,21 +333,41 @@ const loading = ref(false)
|
||||
const tableList = ref([])
|
||||
const total = ref(0)
|
||||
|
||||
const totalNum = ref(0)
|
||||
const totalAmount = ref(0)
|
||||
const totalInfo = ref({})
|
||||
async function getList() {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await SettleApi.getSchoolSettlePage(removeNullField(searchForm.value))
|
||||
tableList.value = data.list
|
||||
total.value = data.total
|
||||
totalNum.value = data.totalNum
|
||||
totalAmount.value = data.totalAmount
|
||||
totalInfo.value = data.totalData
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function handleUpdate(row) {
|
||||
if (row.edit) {
|
||||
// 删除的二次确认
|
||||
await message.confirm('是否确认修改结算数据?')
|
||||
// 保存
|
||||
SettleApi.updateSettle({
|
||||
settlementId: row.settlementId,
|
||||
settlementPrice: row.settlementPrice,
|
||||
createTime: row.createTime
|
||||
})
|
||||
.then(() => {
|
||||
message.success('修改成功')
|
||||
getList()
|
||||
})
|
||||
.finally(() => {
|
||||
row.edit = false
|
||||
})
|
||||
} else {
|
||||
row.edit = true
|
||||
}
|
||||
}
|
||||
|
||||
function getSummaries(param) {
|
||||
const { columns } = param
|
||||
const sums = []
|
||||
@@ -261,9 +375,9 @@ function getSummaries(param) {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
} else if (column.property == 'settlementNum') {
|
||||
sums[index] = totalNum.value
|
||||
sums[index] = totalInfo.value.totalNum
|
||||
} else if (column.property == 'settlementMoney') {
|
||||
sums[index] = totalAmount.value
|
||||
sums[index] = totalInfo.value.totalAmount
|
||||
} else {
|
||||
sums[index] = ''
|
||||
}
|
||||
@@ -291,6 +405,7 @@ function batchSettle() {
|
||||
showDailog.value = true
|
||||
form.value = {
|
||||
settlementIds: selectList.value.map((it) => it.settlementId),
|
||||
settlementDate: formatDate(new Date()),
|
||||
reamrk: undefined
|
||||
}
|
||||
settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0)
|
||||
|
||||
150
src/views/Clue/Order/Comp/feedbackSchema.js
Normal file
150
src/views/Clue/Order/Comp/feedbackSchema.js
Normal file
@@ -0,0 +1,150 @@
|
||||
export const schoolApplySchema = [
|
||||
{
|
||||
field: 'name',
|
||||
label: '线索名称',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'phone',
|
||||
label: '联系方式',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'signUserName',
|
||||
label: '登记人',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'dealDate',
|
||||
label: '成交日期',
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'money',
|
||||
label: '回款金额',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'signPrice',
|
||||
label: '成交价',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'companyProfit',
|
||||
label: '公司利润',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'personProfit',
|
||||
label: '员工利润',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'applyUserName',
|
||||
label: '申请人',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'applyTime',
|
||||
label: '申请时间',
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
label: '备注',
|
||||
span: 2,
|
||||
isEditor: true
|
||||
}
|
||||
]
|
||||
|
||||
export const mallApplySchema = [
|
||||
{
|
||||
field: 'name',
|
||||
label: '线索名称',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'phone',
|
||||
label: '联系方式',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'signUserName',
|
||||
label: '登记人',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'dealDate',
|
||||
label: '成交日期',
|
||||
dateFormat: 'YYYY-MM-DD',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'money',
|
||||
label: '回款金额',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'signPrice',
|
||||
label: '成交价',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'applyUserName',
|
||||
label: '申请人',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'applyTime',
|
||||
label: '申请时间',
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
label: '备注',
|
||||
span: 2,
|
||||
isEditor: true
|
||||
}
|
||||
]
|
||||
|
||||
export const auditSchema = [
|
||||
{
|
||||
field: 'stateName',
|
||||
label: '审核状态',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'checkUser',
|
||||
label: '审核人',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'checkTime',
|
||||
label: '审核时间',
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'checkRemark',
|
||||
label: '备注',
|
||||
span: 3,
|
||||
isEditor: true
|
||||
}
|
||||
]
|
||||
|
||||
export const cancelSchema = [
|
||||
{
|
||||
field: 'stateName',
|
||||
label: '审核状态',
|
||||
span: 1
|
||||
},
|
||||
{
|
||||
field: 'revokeTime',
|
||||
label: '撤销时间',
|
||||
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
span: 1
|
||||
}
|
||||
]
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user