Compare commits
146 Commits
9ebd81cc2c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 3fe10f075a | |||
| 980a8767f9 | |||
|
|
e3f139aeaf | ||
| 38bb85b090 | |||
|
|
b33e1e23b2 | ||
|
|
0266fdf2d4 | ||
|
|
cdb497977b | ||
|
|
666060f235 | ||
| 02f55ffcef | |||
|
|
93a1390eb9 | ||
|
|
3bbb2e5ecd | ||
|
|
14d0c3d20b | ||
|
|
c79ee47609 | ||
|
|
83abbc57b7 | ||
|
|
fec4bd5ee0 | ||
|
|
a8b5c18167 | ||
|
|
3a9a4a6d1c | ||
|
|
b78a26e0b9 | ||
|
|
7c0581f15f | ||
|
|
fa2ee0cd6a | ||
|
|
742e85ae65 | ||
|
|
1439a78d23 | ||
|
|
50f218b8f5 | ||
|
|
c41f0896e9 | ||
| 06d1f9e7c8 | |||
|
|
640c90b178 | ||
|
|
32ebe58d07 | ||
|
|
edc095cd48 | ||
|
|
98b64c9533 | ||
| 518d64bca4 | |||
|
|
21737cde3c | ||
|
|
e44b80966a | ||
|
|
36ce6fc87b | ||
|
|
4b0fa9fd7f | ||
|
|
ca95f6dcf3 | ||
|
|
b2a376cdf0 | ||
|
|
7df45d6703 | ||
|
|
cb2deeb142 | ||
|
|
831c343448 | ||
|
|
c0be75b6fd | ||
|
|
9b323b68f9 | ||
|
|
6ebe33e48c | ||
|
|
c34623287c | ||
|
|
240224823e | ||
|
|
e3ccfd9721 | ||
|
|
461d36dc5d | ||
|
|
65af79e9a1 | ||
|
|
07850f1233 | ||
|
|
7e54b14103 | ||
|
|
2add57162e | ||
|
|
be9a9d77be | ||
|
|
8f4da16e81 | ||
|
|
b4a5c36fb0 | ||
|
|
cd3a39fa47 | ||
|
|
126853ad45 | ||
|
|
4735da7362 | ||
|
|
4b030babe2 | ||
|
|
3aaa26fdc2 | ||
|
|
78cd9f04bc | ||
|
|
dc3292982a | ||
|
|
6726bd7756 | ||
|
|
a8bf678f2e | ||
|
|
3ec039050f | ||
|
|
6baa78a94f | ||
|
|
770d700ba1 | ||
|
|
039ab28c15 | ||
|
|
f75140e135 | ||
|
|
467e1eceb7 | ||
|
|
47bac0315f | ||
|
|
ce0da69b5f | ||
|
|
0d99fbac80 | ||
|
|
06681658fc | ||
|
|
3abe367954 | ||
|
|
2eac9d0fc9 | ||
|
|
f7924d7cb1 | ||
|
|
6ac19b825e | ||
|
|
e10fedb4dc | ||
|
|
f70cdfb074 | ||
|
|
ac70a128c1 | ||
|
|
21ff3718bd | ||
|
|
1778ea9fb4 | ||
|
|
e4ae5e275f | ||
|
|
df3a4b9f46 | ||
|
|
fc22c16cb1 | ||
|
|
9b7543f65f | ||
|
|
1d1f1762f8 | ||
|
|
ffc7691b47 | ||
|
|
c01fea9c5b | ||
|
|
beb12193b3 | ||
|
|
b09ba1547c | ||
|
|
72341a96a5 | ||
|
|
9cdfa01d33 | ||
|
|
af84640a4b | ||
|
|
15179707d9 | ||
|
|
fe4270178f | ||
|
|
cd22e26589 | ||
|
|
b475af8dd3 | ||
|
|
3022106428 | ||
|
|
d4641eacb5 | ||
|
|
d3b4a360dd | ||
|
|
91a509d49d | ||
|
|
7e771a89e4 | ||
|
|
24e540f151 | ||
|
|
0ef7703f7d | ||
|
|
fa39fd8492 | ||
|
|
b8bc124162 | ||
|
|
e1036fd2c3 | ||
|
|
014bb14170 | ||
|
|
eaaceb9595 | ||
|
|
1ab365efae | ||
| 0f04d7e80c | |||
|
|
f74ed7e62d | ||
|
|
8fc9dd449b | ||
|
|
9c7ba2fb87 | ||
|
|
2406bcb8e4 | ||
|
|
41c20623d4 | ||
|
|
a8ea0e4b26 | ||
|
|
8de29b754a | ||
|
|
5f63709c2f | ||
|
|
a89bd1b59c | ||
|
|
4daf01a21b | ||
|
|
83d04e7333 | ||
| a81d21dd3b | |||
|
|
f6ed6575c4 | ||
|
|
cab0b3f2eb | ||
|
|
f415e0cfce | ||
|
|
90f7513ca8 | ||
|
|
cad9fbb0e0 | ||
|
|
187c156e88 | ||
| 842e6ea24b | |||
|
|
fb466e207c | ||
|
|
8a857e03af | ||
|
|
7de4adeaad | ||
|
|
3e714a0bc8 | ||
|
|
3678c5fcc4 | ||
|
|
ecc89f47bb | ||
|
|
41e256aabb | ||
|
|
cc5648414e | ||
|
|
0555c0e42e | ||
|
|
7665389a8d | ||
|
|
0540513894 | ||
|
|
0673721ad7 | ||
|
|
71f6dacba4 | ||
|
|
735d638b49 | ||
|
|
f7980cf66a | ||
|
|
a72db9307d |
18
.env.base
18
.env.base
@@ -4,11 +4,23 @@ VITE_NODE_ENV=development
|
|||||||
VITE_DEV=true
|
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://114.55.169.15:48080'
|
# VITE_BASE_URL='http://114.215.207.150:48080'
|
||||||
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
|
# 高德地图key密钥
|
||||||
|
# 1寻驾
|
||||||
|
# VITE_AMAP_KEY=ec6b7ebe38f7ff27126f7088d87a9091
|
||||||
|
# 2莳松
|
||||||
|
VITE_AMAP_KEY=9233a9d4ffe95fb335e70834503460fa
|
||||||
|
|
||||||
|
# 小程序接口请求路劲
|
||||||
|
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'
|
# 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_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
|
VITE_API_BASEPATH=/crm-api
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ VITE_NODE_ENV=development
|
|||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
VITE_BASE_URL='http://47.98.161.246: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
|
VITE_API_BASEPATH=/crm-api
|
||||||
|
|||||||
5
.env.pro
5
.env.pro
@@ -5,6 +5,11 @@ VITE_DEV=false
|
|||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='/crm-api'
|
VITE_BASE_URL='/crm-api'
|
||||||
|
# 高德地图key密钥
|
||||||
|
# 1寻驾
|
||||||
|
# VITE_AMAP_KEY=ec6b7ebe38f7ff27126f7088d87a9091
|
||||||
|
# 2莳松
|
||||||
|
VITE_AMAP_KEY=9233a9d4ffe95fb335e70834503460fa
|
||||||
|
|
||||||
# 上传路径
|
# 上传路径
|
||||||
VITE_UPLOAD_URL='/crm-api/admin-api/system/file/upload'
|
VITE_UPLOAD_URL='/crm-api/admin-api/system/file/upload'
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ VITE_DEV=false
|
|||||||
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
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
|
VITE_API_BASEPATH=/crm-api
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ VITE_DEV=false
|
|||||||
VITE_BASE_URL='http://localhost: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
|
VITE_API_BASEPATH=/crm-api
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ VITE_DEV=false
|
|||||||
VITE_BASE_URL='http://localhost: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
|
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
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
57
.vscode/settings.json
vendored
57
.vscode/settings.json
vendored
@@ -1,54 +1,5 @@
|
|||||||
{
|
{
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"i18n-ally.localesPaths": [
|
||||||
"prettier.enable": true,
|
"src/locales"
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -141,7 +141,9 @@
|
|||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window._AMapSecurityConfig = {
|
window._AMapSecurityConfig = {
|
||||||
securityJsCode: 'f653df5a2c5f44ae68faaab6f6a6b8ab' // 你的密钥
|
// securityJsCode: 'f653df5a2c5f44ae68faaab6f6a6b8ab' // 你的密钥
|
||||||
|
// securityJsCode: '420463f2f8c849ab78b9d29548aff7d3' // 寻驾密钥
|
||||||
|
securityJsCode: 'ab6bcce5d153c4e5353b40e5b0ce6fee' // 莳松密钥
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
13
package.json
13
package.json
@@ -39,6 +39,7 @@
|
|||||||
"@vueuse/core": "^10.1.2",
|
"@vueuse/core": "^10.1.2",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.10",
|
"@wangeditor/editor-for-vue": "^5.1.10",
|
||||||
|
"@wangeditor/plugin-upload-attachment": "^1.1.0",
|
||||||
"@zxcvbn-ts/core": "^3.0.1",
|
"@zxcvbn-ts/core": "^3.0.1",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
@@ -51,8 +52,9 @@
|
|||||||
"diagram-js": "^11.6.0",
|
"diagram-js": "^11.6.0",
|
||||||
"echarts": "^5.4.2",
|
"echarts": "^5.4.2",
|
||||||
"echarts-wordcloud": "^2.1.0",
|
"echarts-wordcloud": "^2.1.0",
|
||||||
"element-plus": "2.3.4",
|
"element-plus": "2.9.4",
|
||||||
"fast-xml-parser": "^4.2.2",
|
"fast-xml-parser": "^4.2.2",
|
||||||
|
"file-saver": "^2.0.5",
|
||||||
"highlight.js": "^11.8.0",
|
"highlight.js": "^11.8.0",
|
||||||
"intro.js": "^7.0.1",
|
"intro.js": "^7.0.1",
|
||||||
"jsencrypt": "^3.3.2",
|
"jsencrypt": "^3.3.2",
|
||||||
@@ -65,16 +67,19 @@
|
|||||||
"qs": "^6.11.2",
|
"qs": "^6.11.2",
|
||||||
"steady-xml": "^0.1.0",
|
"steady-xml": "^0.1.0",
|
||||||
"url": "^0.11.0",
|
"url": "^0.11.0",
|
||||||
"video.js": "^8.3.0",
|
"video.js": "^7.0.0",
|
||||||
"vue": "3.3.4",
|
"vue": "3.3.4",
|
||||||
"vue-amap": "^0.5.10",
|
"vue-amap": "^0.5.10",
|
||||||
"vue-dompurify-html": "^5.0.1",
|
"vue-dompurify-html": "^5.0.1",
|
||||||
|
"vue-draggable-plus": "^0.6.0",
|
||||||
"vue-i18n": "9.2.2",
|
"vue-i18n": "9.2.2",
|
||||||
"vue-router": "^4.2.1",
|
"vue-router": "^4.2.1",
|
||||||
"vue-types": "^5.0.3",
|
"vue-types": "^5.0.3",
|
||||||
|
"vue3-tree-org": "^4.2.2",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"web-storage-cache": "^1.1.1",
|
"web-storage-cache": "^1.1.1",
|
||||||
"xe-utils": "^3.5.7",
|
"xe-utils": "^3.5.7",
|
||||||
|
"xlsx": "^0.18.5",
|
||||||
"xml-js": "^1.6.11"
|
"xml-js": "^1.6.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -110,7 +115,7 @@
|
|||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"rimraf": "^5.0.1",
|
"rimraf": "^5.0.1",
|
||||||
"rollup": "^3.22.0",
|
"rollup": "^3.22.0",
|
||||||
"sass": "^1.62.1",
|
"sass": "1.75.0",
|
||||||
"stylelint": "^15.6.2",
|
"stylelint": "^15.6.2",
|
||||||
"stylelint-config-html": "^1.1.0",
|
"stylelint-config-html": "^1.1.0",
|
||||||
"stylelint-config-recommended": "^12.0.0",
|
"stylelint-config-recommended": "^12.0.0",
|
||||||
@@ -121,7 +126,7 @@
|
|||||||
"unplugin-auto-import": "^0.16.0",
|
"unplugin-auto-import": "^0.16.0",
|
||||||
"unplugin-element-plus": "^0.7.1",
|
"unplugin-element-plus": "^0.7.1",
|
||||||
"unplugin-vue-components": "^0.24.1",
|
"unplugin-vue-components": "^0.24.1",
|
||||||
"vite": "4.3.8",
|
"vite": "^5.4.21",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
"vite-plugin-ejs": "^1.6.4",
|
"vite-plugin-ejs": "^1.6.4",
|
||||||
"vite-plugin-eslint": "^1.8.1",
|
"vite-plugin-eslint": "^1.8.1",
|
||||||
|
|||||||
@@ -37,3 +37,12 @@ export const cancelApplyAfterSale = async (data) => {
|
|||||||
export const getAfterSaleDetail = async (params) => {
|
export const getAfterSaleDetail = async (params) => {
|
||||||
return await request.get({ url: '/admin-api/crm/sign-after-sale/get', params })
|
return await request.get({ url: '/admin-api/crm/sign-after-sale/get', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导入
|
||||||
|
export const importAfterSales = async (data) => {
|
||||||
|
return await request.upload({ url: '/admin-api/crm/sign-after-sale/importAfterSales', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getAfterSalesTemplate = async () => {
|
||||||
|
return await request.get({ url: '/admin-api/crm/sign-after-sale/get-import-template' })
|
||||||
|
}
|
||||||
|
|||||||
50
src/api/clue/clueRemark.js
Normal file
50
src/api/clue/clueRemark.js
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
// 获得微信群列表
|
||||||
|
export const getWxGroupPage = (params) => {
|
||||||
|
return request.get({ url: '/admin-api/crm/wxgroup/page', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建微信群
|
||||||
|
export const createWxGroup = (data) => {
|
||||||
|
return request.post({ url: '/admin-api/crm/wxgroup/create', data, isSubmitForm: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新微信群
|
||||||
|
export const updateWxGroup = (data) => {
|
||||||
|
return request.put({ url: '/admin-api/crm/wxgroup/update', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除微信群
|
||||||
|
export const deleteWxGroup = (id) => {
|
||||||
|
return request.delete({ url: `/admin-api/crm/wxgroup?groupId=${id}` })
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getWxGroupSimpleList = async () => {
|
||||||
|
return await request.get({ url: '/admin-api/crm/wxgroup/simple-list' })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 报备
|
||||||
|
export const reportClue = (data) => {
|
||||||
|
return request.post({ url: '/admin-api/crm/clue-remark/remark/save', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 接待提交报名信息
|
||||||
|
export const registerClue = (data) => {
|
||||||
|
return request.post({ url: '/admin-api/crm/clue-remark/sign/save', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页查询报备信息
|
||||||
|
export const getClueRemarkPage = (data) => {
|
||||||
|
return request.post({ url: '/admin-api/crm/clue-remark/page', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 区域查询报备信息
|
||||||
|
export const getClueRemarkByRemarkId = (params) => {
|
||||||
|
return request.get({ url: `/admin-api/crm/clue-remark/sign/get`, params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 销售查询报备信息
|
||||||
|
export const getClueRemarkByClueId = (params) => {
|
||||||
|
return request.get({ url: `/admin-api/crm/clue-remark/remark/get`, params })
|
||||||
|
}
|
||||||
@@ -6,8 +6,8 @@ export const getSimpleClueList = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询列表
|
// 查询列表
|
||||||
export const getCluePage = async (params) => {
|
export const getCluePage = async (data) => {
|
||||||
return await request.get({ url: '/admin-api/crm/sch-clue/page', params })
|
return await request.post({ url: '/admin-api/crm/sch-clue/page', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情
|
// 查询详情
|
||||||
@@ -62,3 +62,12 @@ export const getFollowUserList = async (params) => {
|
|||||||
export const batchUpdateFollowUser = async (data) => {
|
export const batchUpdateFollowUser = async (data) => {
|
||||||
return await request.put({ url: '/admin-api/crm/sch-clue/batchUpdateFollowUser', data })
|
return await request.put({ url: '/admin-api/crm/sch-clue/batchUpdateFollowUser', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 自动分配线索新增
|
||||||
|
export const clueInput = async (data) => {
|
||||||
|
return await request.post({
|
||||||
|
url: '/out-api/out/clue/importClue/',
|
||||||
|
data,
|
||||||
|
isSubmitForm: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export const getPaymentList = async (params) => {
|
|||||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/list', params })
|
return await request.get({ url: '/admin-api/crm/sign-pay-record/list', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询(精简)列表
|
// 查询列表
|
||||||
export const getPaymentPage = async (params) => {
|
export const getPaymentPage = async (params) => {
|
||||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/page', params })
|
return await request.get({ url: '/admin-api/crm/sign-pay-record/page', params })
|
||||||
}
|
}
|
||||||
@@ -45,3 +45,8 @@ export const updateApplyPayment = async (data) => {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出
|
||||||
|
export const exportPayment = async (params) => {
|
||||||
|
return await request.download({ url: '/admin-api/crm/sign-pay-record/export-excel', params })
|
||||||
|
}
|
||||||
|
|||||||
@@ -24,3 +24,8 @@ export const getMallSettleDetail = async (id) => {
|
|||||||
export const batchSaveSettle = async (data) => {
|
export const batchSaveSettle = async (data) => {
|
||||||
return await request.post({ url: '/admin-api/crm/sign-settlement/batch/save', 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'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// 查询列表
|
// 查询列表
|
||||||
export const getSignPage = async (params) => {
|
export const getSignPage = async (data) => {
|
||||||
return await request.get({ url: '/admin-api/crm/sign/page', params })
|
return await request.post({ url: '/admin-api/crm/sign/page', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情
|
// 查询详情
|
||||||
@@ -51,3 +51,23 @@ export const updateProduceSort = (data) => {
|
|||||||
export const getSignProfit = (params) => {
|
export const getSignProfit = (params) => {
|
||||||
return request.get({ url: '/admin-api/crm/sign/profit', params })
|
return request.get({ url: '/admin-api/crm/sign/profit', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 新增产品
|
||||||
|
export const addOrderProduct = (data) => {
|
||||||
|
return request.post({ url: '/admin-api/crm/sign-prodcut/create', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增产品
|
||||||
|
export const removeOrderProduct = (id) => {
|
||||||
|
return request.delete({ url: '/admin-api/crm/sign-prodcut/delete?id=' + id })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询订单商品
|
||||||
|
export const getOrderProductList = (params) => {
|
||||||
|
return request.get({ url: '/admin-api/crm/sign-prodcut/list', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
export const createSignOnRemark = (data) => {
|
||||||
|
return request.post({ url: '/admin-api/crm/sign/xj-create', data })
|
||||||
|
}
|
||||||
|
|||||||
8
src/api/home/reportChannel.js
Normal file
8
src/api/home/reportChannel.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
export const getList = async (data) => {
|
||||||
|
return await request.post({ url: '/admin-api/crm/sch-clue/clueQuality/report', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getPeriodList = async (data) => {
|
||||||
|
return await request.post({ url: '/admin-api/crm/sch-clue/clueQuality/period/report', data })
|
||||||
|
}
|
||||||
8
src/api/home/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
|
url: '/admin-api/system/serviceInstance/getInstanceInfo?instanceId=' + instanceId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const bindWx = (data: any) => {
|
||||||
|
return request.post({
|
||||||
|
url: '/admin-api/system/user/bind/wx',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
38
src/api/okr/comment.js
Normal file
38
src/api/okr/comment.js
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export const createComment = (data) => {
|
||||||
|
return request.post({
|
||||||
|
url: '/admin-api/okr/comments/create',
|
||||||
|
data,
|
||||||
|
isSubmitForm: true
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页
|
||||||
|
export const getCommentPage = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/comments/page',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取评论类型
|
||||||
|
export const getCommentTypeOptions = () => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/dict-data/get-by-type',
|
||||||
|
params: { dictType: 'comment_type' }
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 点赞评论
|
||||||
|
export const likeComment = (commentId) => {
|
||||||
|
return request.put({
|
||||||
|
url: '/admin-api/okr/comments-likes/update',
|
||||||
|
data: { commentId }
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
61
src/api/okr/meeting.js
Normal file
61
src/api/okr/meeting.js
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
export const createMeeting = (data) => {
|
||||||
|
return request.post({
|
||||||
|
url: '/admin-api/okr/meeting/add',
|
||||||
|
data,
|
||||||
|
isSubmitForm: true
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export const updateMeeting = (data) => {
|
||||||
|
return request.put({
|
||||||
|
url: '/admin-api/okr/meeting/update',
|
||||||
|
data
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询详情
|
||||||
|
export const getMeetingDetail = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/meeting/get',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消会议
|
||||||
|
export const cancelMeeting = (data) => {
|
||||||
|
return request.put({
|
||||||
|
url: '/admin-api/okr/meeting/cancel',
|
||||||
|
data
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页查询
|
||||||
|
export const getMeetingPage = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/meeting/page',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 刷新微信群列表
|
||||||
|
export const refreshWxGroupList = () => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/system/wx/reFreshWeChatGroupList'
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取微信群聊列表
|
||||||
|
export const getWxGroupList = () => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/system/wx/getWeChatGroupList'
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
154
src/api/okr/okr.js
Normal file
154
src/api/okr/okr.js
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export const createOkrNode = (data) => {
|
||||||
|
return request.post({
|
||||||
|
url: '/admin-api/okr/node/add',
|
||||||
|
data,
|
||||||
|
isSubmitForm: true
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export const updateOkrNode = (data) => {
|
||||||
|
return request.put({
|
||||||
|
url: '/admin-api/okr/node/update',
|
||||||
|
data
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询详情
|
||||||
|
export const getOkrNodeDetail = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/get',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 我负责的 - 节点树
|
||||||
|
export const getMyNodeTree = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/my/list',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 我负责的 - okr列表
|
||||||
|
export const getMyOkrPage = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/my/object/list',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 全部目标 - 节点树
|
||||||
|
export const getAllNodeTree = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/all/list',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 全部目标 - okr列表
|
||||||
|
export const getAllOkrPage = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/all/object/list',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取节点操作历史
|
||||||
|
export const getOkrNodeHistory = (nodeId) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/record/list',
|
||||||
|
params: { nodeId }
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取系统默认的关键成果内容
|
||||||
|
export const getDefaultOkrOptions = () => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/dict-data/get-by-type',
|
||||||
|
params: { dictType: 'key_result_source' }
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新OKR进度
|
||||||
|
export const updateOkrProgress = (data) => {
|
||||||
|
return request.put({
|
||||||
|
url: '/admin-api/okr/node/progress/update',
|
||||||
|
data
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取目标关系树一级节点
|
||||||
|
export const getOkrRelationTree = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/first-node',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取目标关系树下级节点数据
|
||||||
|
export const getOkrRelationTreeChildren = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/node-tree',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取我的组员
|
||||||
|
export const getMyMemberList = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/my-members',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取我的组员节点树
|
||||||
|
export const getMySonNodeTree = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/member/node/list',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取我的组员OKR列表
|
||||||
|
export const getMySonOkrPage = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/member/objective/list',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取渠道
|
||||||
|
export const getChannelOptions = () => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/source'
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取统计表中的合计信息
|
||||||
|
export const getOkrStatisticsTotal = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/node/data/count',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
83
src/api/okr/wait.js
Normal file
83
src/api/okr/wait.js
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export const createWait = (data) => {
|
||||||
|
return request.post({
|
||||||
|
url: '/admin-api/okr/agent-work/create',
|
||||||
|
data,
|
||||||
|
isSubmitForm: true
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export const updateWait = (data) => {
|
||||||
|
return request.put({
|
||||||
|
url: '/admin-api/okr/agent-work/update',
|
||||||
|
data
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页
|
||||||
|
export const getWaitPage = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/agent-work/page',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
export const getWaitDetail = (id) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/agent-work/get',
|
||||||
|
params: { id }
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export const deleteWait = (id) => {
|
||||||
|
return request.delete({
|
||||||
|
url: '/admin-api/okr/agent-work/delete',
|
||||||
|
params: { id }
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 催办
|
||||||
|
export const urgeWait = (workId) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/agent-work/urge',
|
||||||
|
params: { workId }
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跟进待办
|
||||||
|
export const followWait = (data) => {
|
||||||
|
return request.post({
|
||||||
|
url: '/admin-api/okr/agent-work-follow/create',
|
||||||
|
data,
|
||||||
|
isSubmitForm: true
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询跟进记录
|
||||||
|
export const getFollowWaitPage = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/agent-work-follow/list',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getWaitCount = (params) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/agent-work/getAgentWorkNum',
|
||||||
|
params
|
||||||
|
// headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
36
src/api/pers/attendancePlan.js
Normal file
36
src/api/pers/attendancePlan.js
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export const createPlan = (data) => {
|
||||||
|
return request.post({ url: '/admin-api/oa/attendance-setting/create', data, isSubmitForm: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export const updatePlan = (data) => {
|
||||||
|
return request.put({ url: '/admin-api/oa/attendance-setting/update', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改状态
|
||||||
|
export const updatePlanStatus = (data) => {
|
||||||
|
return request.put({ url: '/admin-api/oa/attendance-setting/status/update', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页
|
||||||
|
export const getPlanPage = (params) => {
|
||||||
|
return request.get({ url: '/admin-api/oa/attendance-setting/page', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 列表
|
||||||
|
export const getPlanSimpleList = (params) => {
|
||||||
|
return request.get({ url: '/admin-api/oa/attendance-setting/simple-list', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
export const getPlanDetail = (id) => {
|
||||||
|
return request.get({ url: '/admin-api/oa/attendance-setting/get', params: { id } })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export const deletePlan = (id) => {
|
||||||
|
return request.delete({ url: '/admin-api/oa/attendance-setting/delete', params: { id } })
|
||||||
|
}
|
||||||
41
src/api/pers/employee.js
Normal file
41
src/api/pers/employee.js
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export const createEmployee = (data) => {
|
||||||
|
return request.post({ url: '/admin-api/oa/employee/create', data, isSubmitForm: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页
|
||||||
|
export const getEmployeeSimpleList = (params) => {
|
||||||
|
return request.get({ url: '/admin-api/oa/employee/list-all-simple', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export const updateEmployee = (data) => {
|
||||||
|
return request.put({ url: '/admin-api/oa/employee/update', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改状态
|
||||||
|
export const updateEmployeeStatus = (data) => {
|
||||||
|
return request.put({ url: '/admin-api/oa/employee/status/update', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页
|
||||||
|
export const getEmployeePage = (params) => {
|
||||||
|
return request.get({ url: '/admin-api/oa/employee/page', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
export const getEmployeeDetail = (id) => {
|
||||||
|
return request.get({ url: '/admin-api/oa/employee/get', params: { id } })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export const deleteEmployee = (id) => {
|
||||||
|
return request.delete({ url: '/admin-api/oa/employee/delete', params: { id } })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取钉钉id
|
||||||
|
export const getDingUserId = (params) => {
|
||||||
|
return request.get({ url: '/admin-api/oa/employee/getDingTalkUserIdByMobile', params })
|
||||||
|
}
|
||||||
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) => {
|
export const deleteDept = async (id: number) => {
|
||||||
return await request.delete({ url: '/admin-api/system/dept/delete?id=' + id })
|
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 })
|
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 } })
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
import qs from 'qs'
|
|
||||||
|
|
||||||
export interface NotifyMessageVO {
|
export interface NotifyMessageVO {
|
||||||
id: number
|
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 })
|
return await request.get({ url: '/admin-api/system/notify-message/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得我的站内信分页
|
// 获得我的站内信分页
|
||||||
export const getMyNotifyMessagePage = async (params: PageParam) => {
|
export const getMyNotifyMessagePage = async (params: any) => {
|
||||||
return await request.get({ url: '/admin-api/system/notify-message/my-page', params })
|
return await request.get({ url: '/admin-api/system/notify-message/my-page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 批量标记已读
|
// 批量标记已读
|
||||||
export const updateNotifyMessageRead = async (ids) => {
|
export const updateNotifyMessageRead = async (data: any) => {
|
||||||
return await request.put({
|
return await request.put({
|
||||||
url:
|
url: '/admin-api/system/notify-message/update-read?',
|
||||||
'/admin-api/system/notify-message/update-read?' +
|
data
|
||||||
qs.stringify({ ids: ids }, { indices: false })
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 标记所有站内信为已读
|
// 标记所有站内信为已读
|
||||||
export const updateAllNotifyMessageRead = async () => {
|
export const updateAllNotifyMessageRead = async (data: any) => {
|
||||||
return await request.put({ url: '/admin-api/system/notify-message/update-all-read' })
|
return await request.put({ url: '/admin-api/system/notify-message/update-all-read', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前用户的最新站内信列表
|
// 获取当前用户的最新站内信列表
|
||||||
export const getUnreadNotifyMessageList = async () => {
|
export const getUnreadNotifyMessageList = async (params: any) => {
|
||||||
return await request.get({ url: '/admin-api/system/notify-message/get-unread-list' })
|
return await request.get({ url: '/admin-api/system/notify-message/get-unread-list', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得当前用户的未读站内信数量
|
// 获得当前用户的未读站内信数量
|
||||||
export const getUnreadNotifyMessageCount = async () => {
|
export const getUnreadNotifyMessageCount = async (params: any) => {
|
||||||
return await request.get({ url: '/admin-api/system/notify-message/get-unread-count' })
|
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
|
avatar: string
|
||||||
loginIp: string
|
loginIp: string
|
||||||
status: number
|
status: number
|
||||||
|
hireStatus: number
|
||||||
remark: string
|
remark: string
|
||||||
loginDate: Date
|
loginDate: Date
|
||||||
createTime: Date
|
createTime: Date
|
||||||
|
retireDate: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询用户管理列表
|
// 查询用户管理列表
|
||||||
@@ -62,10 +64,17 @@ export const resetUserPwd = (id: number, password: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 用户状态修改
|
// 用户状态修改
|
||||||
export const updateUserStatus = (id: number, status: number) => {
|
export const updateUserStatus = (
|
||||||
|
id: number,
|
||||||
|
status: number,
|
||||||
|
retireDate: string,
|
||||||
|
hireStatus: number
|
||||||
|
) => {
|
||||||
const data = {
|
const data = {
|
||||||
id,
|
id,
|
||||||
status
|
status,
|
||||||
|
retireDate,
|
||||||
|
hireStatus
|
||||||
}
|
}
|
||||||
return request.put({ url: '/admin-api/system/user/update-status', data: data })
|
return request.put({ url: '/admin-api/system/user/update-status', data: data })
|
||||||
}
|
}
|
||||||
@@ -84,3 +93,8 @@ export const getAllUserList = (): Promise<UserVO[]> => {
|
|||||||
export const getAllUserListWithHire = (): Promise<UserVO[]> => {
|
export const getAllUserListWithHire = (): Promise<UserVO[]> => {
|
||||||
return request.get({ url: '/admin-api/system/user/no/permission/list-all' })
|
return request.get({ url: '/admin-api/system/user/no/permission/list-all' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取钉钉id
|
||||||
|
export const getDDIdByPhone = (params) => {
|
||||||
|
return request.get({ url: '/admin-api/system/user/getDingTalkUserIdByMobile', params })
|
||||||
|
}
|
||||||
|
|||||||
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()
|
appStore.setCssVarTheme()
|
||||||
})
|
})
|
||||||
|
|
||||||
const { width } = useWindowSize()
|
const { width, height } = useWindowSize()
|
||||||
|
|
||||||
// 监听窗口变化
|
// 监听窗口变化
|
||||||
watch(
|
watch(
|
||||||
() => width.value,
|
() => width.value,
|
||||||
(width: number) => {
|
(width: number) => {
|
||||||
if (width < 768) {
|
if (width < 768 || height.value < 450) {
|
||||||
!appStore.getMobile ? appStore.setMobile(true) : undefined
|
!appStore.getMobile ? appStore.setMobile(true) : undefined
|
||||||
setCssVar('--left-menu-min-width', '0')
|
setCssVar('--left-menu-min-width', '0')
|
||||||
appStore.setCollapse(true)
|
appStore.setCollapse(true)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default defineComponent({
|
|||||||
name: 'DictTag',
|
name: 'DictTag',
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
type: String as PropType<string>,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
@@ -42,7 +42,7 @@ export default defineComponent({
|
|||||||
return (
|
return (
|
||||||
<ElTag
|
<ElTag
|
||||||
style={dictData.value?.cssClass ? 'color: #fff' : ''}
|
style={dictData.value?.cssClass ? 'color: #fff' : ''}
|
||||||
type={dictData.value?.colorType}
|
type={dictData.value?.colorType || 'primary'}
|
||||||
color={
|
color={
|
||||||
dictData.value?.cssClass && isHexColor(dictData.value?.cssClass)
|
dictData.value?.cssClass && isHexColor(dictData.value?.cssClass)
|
||||||
? dictData.value?.cssClass
|
? dictData.value?.cssClass
|
||||||
@@ -50,7 +50,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
disableTransitions={true}
|
disableTransitions={true}
|
||||||
>
|
>
|
||||||
{dictData.value?.label}
|
{dictData.value?.label || '未知'}
|
||||||
</ElTag>
|
</ElTag>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,34 @@ const props = defineProps({
|
|||||||
height: propTypes.oneOfType([Number, String]).def('40vh'),
|
height: propTypes.oneOfType([Number, String]).def('40vh'),
|
||||||
editorConfig: {
|
editorConfig: {
|
||||||
type: Object as PropType<Partial<IEditorConfig>>,
|
type: Object as PropType<Partial<IEditorConfig>>,
|
||||||
default: () => undefined
|
default: () => ({})
|
||||||
},
|
},
|
||||||
readonly: propTypes.bool.def(false),
|
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'
|
||||||
|
],
|
||||||
|
insertKeys: {
|
||||||
|
index: 20, // 自定义插入的位置
|
||||||
|
keys: ['uploadAttachment'] // “上传附件”菜单
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['change', 'update:modelValue'])
|
const emit = defineEmits(['change', 'update:modelValue'])
|
||||||
@@ -84,6 +108,12 @@ const editorConfig = computed((): IEditorConfig => {
|
|||||||
},
|
},
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
scroll: true,
|
scroll: true,
|
||||||
|
// 在编辑器中,点击选中“附件”节点时,要弹出的菜单
|
||||||
|
hoverbarKeys: {
|
||||||
|
attachment: {
|
||||||
|
menuKeys: ['downloadAttachment'] // “下载附件”菜单
|
||||||
|
}
|
||||||
|
},
|
||||||
MENU_CONF: {
|
MENU_CONF: {
|
||||||
['uploadImage']: {
|
['uploadImage']: {
|
||||||
server: import.meta.env.VITE_UPLOAD_URL,
|
server: import.meta.env.VITE_UPLOAD_URL,
|
||||||
@@ -198,6 +228,52 @@ const editorConfig = computed((): IEditorConfig => {
|
|||||||
customInsert(res: any, insertFn: InsertFnType) {
|
customInsert(res: any, insertFn: InsertFnType) {
|
||||||
insertFn(res.data, 'video', res.data)
|
insertFn(res.data, 'video', res.data)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
uploadAttachment: {
|
||||||
|
server: import.meta.env.VITE_UPLOAD_URL,
|
||||||
|
timeout: 20 * 1000, // 2s
|
||||||
|
|
||||||
|
fieldName: 'file',
|
||||||
|
// meta: { token: 'xxx', a: 100 }, // 请求时附加的数据
|
||||||
|
// metaWithUrl: true, // meta 拼接到 url 上
|
||||||
|
// headers: { Accept: 'text/x-json' },
|
||||||
|
// 自定义增加 http header
|
||||||
|
headers: {
|
||||||
|
Accept: '*',
|
||||||
|
Authorization: 'Bearer ' + getAccessToken(),
|
||||||
|
'tenant-id': getTenantId(),
|
||||||
|
'instance-id': getAppId()
|
||||||
|
},
|
||||||
|
|
||||||
|
maxFileSize: 20 * 1024 * 1024, // 20M
|
||||||
|
|
||||||
|
onBeforeUpload(file: File) {
|
||||||
|
console.log('onBeforeUpload', file)
|
||||||
|
return file // 上传 file 文件
|
||||||
|
// return false // 会阻止上传
|
||||||
|
},
|
||||||
|
onProgress(progress: number) {
|
||||||
|
console.log('onProgress', progress)
|
||||||
|
},
|
||||||
|
onSuccess(file: File, res: any) {
|
||||||
|
console.log('onSuccess', file, res)
|
||||||
|
},
|
||||||
|
onFailed(file: File, res: any) {
|
||||||
|
alert(res.message)
|
||||||
|
console.log('onFailed', file, res)
|
||||||
|
},
|
||||||
|
onError(file: File, err: Error, res: any) {
|
||||||
|
alert(err.message)
|
||||||
|
console.error('onError', file, err, res)
|
||||||
|
},
|
||||||
|
// 上传成功后,用户自定义插入文件
|
||||||
|
customInsert(res: any, file: File, insertFn: Function) {
|
||||||
|
console.log('customInsert', res)
|
||||||
|
|
||||||
|
// 插入附件到编辑器
|
||||||
|
insertFn(file.name, res.data)
|
||||||
|
// insertFn(res.data, `customInsert-${file.name}`, res.data)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
uploadImgShowBase64: true
|
uploadImgShowBase64: true
|
||||||
@@ -212,24 +288,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) => {
|
const handleChange = (editor: IDomEditor) => {
|
||||||
emit('change', editor)
|
emit('change', editor)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export const useRenderRadio = () => {
|
|||||||
return item?.options?.map((option) => {
|
return item?.options?.map((option) => {
|
||||||
const { ...other } = option
|
const { ...other } = option
|
||||||
return (
|
return (
|
||||||
<Com {...other} label={option[valueAlias || 'value']}>
|
<Com {...other} label={option[valueAlias || 'value']} value={option[valueAlias || 'value']}>
|
||||||
{option[labelAlias || 'label']}
|
{option[labelAlias || 'label']}
|
||||||
</Com>
|
</Com>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
v-model:page-size="pageSize"
|
v-model:page-size="pageSize"
|
||||||
:small="small"
|
:small="small"
|
||||||
:background="true"
|
:background="true"
|
||||||
:page-sizes="[10, 20, 30, 50, 100]"
|
:page-sizes="[10, 50, 100, 500, 1000]"
|
||||||
:pager-count="pagerCount"
|
:pager-count="pagerCount"
|
||||||
:total="total"
|
:total="total"
|
||||||
class="float-right mt-15px mb-15px"
|
class="float-right mt-15px mb-15px"
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
:data="tableObject.tableList"
|
:data="tableObject.tableList"
|
||||||
:row-key="rowkey"
|
:row-key="rowkey"
|
||||||
:expand-row-keys="expandRowKeys"
|
:expand-row-keys="expandRowKeys"
|
||||||
|
:show-summary="showSummary"
|
||||||
|
:summary-method="summaryMethod"
|
||||||
border
|
border
|
||||||
style="flex: 1"
|
style="flex: 1"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
@@ -35,7 +37,7 @@
|
|||||||
@end="onDragEnd"
|
@end="onDragEnd"
|
||||||
>
|
>
|
||||||
<template #item="{ element: item }">
|
<template #item="{ element: item }">
|
||||||
<el-checkbox :key="item.id" :label="item.id">
|
<el-checkbox :key="item.id" :label="item.id" :value="item.id">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
@@ -62,7 +64,9 @@ const props = defineProps({
|
|||||||
tableObject: { type: Object, default: () => ({ tableList: [] }) },
|
tableObject: { type: Object, default: () => ({ tableList: [] }) },
|
||||||
tableColumns: { type: Array, default: () => [] },
|
tableColumns: { type: Array, default: () => [] },
|
||||||
rowkey: { type: String, default: 'id' },
|
rowkey: { type: String, default: 'id' },
|
||||||
expandRowKeys: { type: Array, default: () => [] }
|
expandRowKeys: { type: Array, default: () => [] },
|
||||||
|
showSummary: { type: Boolean, default: false },
|
||||||
|
summaryMethod: { type: Function, default: null }
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:tableObject', 'getList', 'getCheckedColumns', 'selection-change'])
|
const emit = defineEmits(['update:tableObject', 'getList', 'getCheckedColumns', 'selection-change'])
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ initSearch()
|
|||||||
virtual-triggering
|
virtual-triggering
|
||||||
>
|
>
|
||||||
<el-checkbox-group v-model="checkedSchema" @change="changeSearch">
|
<el-checkbox-group v-model="checkedSchema" @change="changeSearch">
|
||||||
<el-checkbox v-for="item in schema" :key="item.id" :label="item.id">
|
<el-checkbox v-for="item in schema" :key="item.id" :label="item.id" :value="item.id">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const props = defineProps({
|
|||||||
// fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']), // 文件类型, 例如['png', 'jpg', 'jpeg']
|
// fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']), // 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||||
fileType: propTypes.array.def([]),
|
fileType: propTypes.array.def([]),
|
||||||
accept: propTypes.string.def('*'),
|
accept: propTypes.string.def('*'),
|
||||||
fileSize: propTypes.number.def(5), // 大小限制(MB)
|
fileSize: propTypes.number.def(100), // 大小限制(MB)
|
||||||
limit: propTypes.number.def(5), // 数量限制
|
limit: propTypes.number.def(5), // 数量限制
|
||||||
autoUpload: propTypes.bool.def(true), // 自动上传
|
autoUpload: propTypes.bool.def(true), // 自动上传
|
||||||
drag: propTypes.bool.def(false), // 拖拽上传
|
drag: propTypes.bool.def(false), // 拖拽上传
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
@import './process-designer.scss';
|
@import './process-designer.scss';
|
||||||
@import './process-panel.scss';
|
@import './process-panel.scss';
|
||||||
@@ -49,6 +49,9 @@ const service: AxiosInstance = axios.create({
|
|||||||
// request拦截器
|
// request拦截器
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
(config: InternalAxiosRequestConfig) => {
|
(config: InternalAxiosRequestConfig) => {
|
||||||
|
if (config.url?.startsWith('/out-api')) {
|
||||||
|
config.baseURL = ''
|
||||||
|
}
|
||||||
// 是否需要设置 token
|
// 是否需要设置 token
|
||||||
let isToken = (config!.headers || {}).isToken === false
|
let isToken = (config!.headers || {}).isToken === false
|
||||||
whiteList.some((v) => {
|
whiteList.some((v) => {
|
||||||
@@ -132,6 +135,9 @@ service.interceptors.response.use(
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
}
|
}
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
// if (data.code === undefined) {
|
||||||
|
// return response
|
||||||
|
// }
|
||||||
// 未设置状态码则默认成功状态
|
// 未设置状态码则默认成功状态
|
||||||
const code = data.code || result_code
|
const code = data.code || result_code
|
||||||
// 二进制数据则直接返回
|
// 二进制数据则直接返回
|
||||||
@@ -205,6 +211,8 @@ service.interceptors.response.use(
|
|||||||
if (msg === '无效的刷新令牌') {
|
if (msg === '无效的刷新令牌') {
|
||||||
// hard coding:忽略这个提示,直接登出
|
// hard coding:忽略这个提示,直接登出
|
||||||
console.log(msg)
|
console.log(msg)
|
||||||
|
} else if (code == 18888) {
|
||||||
|
return { data }
|
||||||
} else {
|
} else {
|
||||||
ElNotification.error({ title: msg })
|
ElNotification.error({ title: msg })
|
||||||
if (code == 403) {
|
if (code == 403) {
|
||||||
|
|||||||
@@ -266,7 +266,6 @@ const filterFormSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): For
|
|||||||
// 过滤 descriptions 结构
|
// 过滤 descriptions 结构
|
||||||
const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[] => {
|
const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[] => {
|
||||||
const descriptionsSchema: FormSchema[] = []
|
const descriptionsSchema: FormSchema[] = []
|
||||||
|
|
||||||
eachTree(crudSchema, (schemaItem: CrudSchema) => {
|
eachTree(crudSchema, (schemaItem: CrudSchema) => {
|
||||||
// 判断是否显示
|
// 判断是否显示
|
||||||
if (schemaItem?.isDetail !== false && schemaItem.detail?.show !== false) {
|
if (schemaItem?.isDetail !== false && schemaItem.detail?.show !== false) {
|
||||||
@@ -275,6 +274,10 @@ const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[
|
|||||||
field: schemaItem.field,
|
field: schemaItem.field,
|
||||||
label: schemaItem.detail?.label || schemaItem.label
|
label: schemaItem.detail?.label || schemaItem.label
|
||||||
}
|
}
|
||||||
|
if (schemaItem.form?.component == 'Editor') {
|
||||||
|
descriptionsSchemaItem.span = 2
|
||||||
|
descriptionsSchemaItem.isEditor = true
|
||||||
|
}
|
||||||
if (schemaItem.dictType) {
|
if (schemaItem.dictType) {
|
||||||
descriptionsSchemaItem.dictType = schemaItem.dictType
|
descriptionsSchemaItem.dictType = schemaItem.dictType
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,12 @@ export const useMessage = () => {
|
|||||||
},
|
},
|
||||||
// 成功消息
|
// 成功消息
|
||||||
success(content: string) {
|
success(content: string) {
|
||||||
ElMessage.success(content)
|
// ElMessage.success(content)
|
||||||
|
ElMessage({
|
||||||
|
message: content,
|
||||||
|
duration: 1500,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 警告消息
|
// 警告消息
|
||||||
warning(content: string) {
|
warning(content: string) {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<script lang="ts" name="Message" setup>
|
<script lang="ts" name="Message" setup>
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import * as NotifyMessageApi from '@/api/system/notify/message'
|
import * as NotifyMessageApi from '@/api/system/notify/message'
|
||||||
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
|
||||||
|
const userStore = useUserStore()
|
||||||
|
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const activeName = ref('notice')
|
const activeName = ref('notice')
|
||||||
@@ -9,16 +12,21 @@ const list = ref<any[]>([]) // 消息列表
|
|||||||
|
|
||||||
// 获得消息列表
|
// 获得消息列表
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
list.value = await NotifyMessageApi.getUnreadNotifyMessageList()
|
const data = await NotifyMessageApi.getUnreadNotifyMessageList({
|
||||||
|
roleId: userStore.getUser?.currentRole
|
||||||
|
})
|
||||||
|
list.value = data.list
|
||||||
// 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除
|
// 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除
|
||||||
unreadCount.value = 0
|
unreadCount.value = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得未读消息数
|
// 获得未读消息数
|
||||||
const getUnreadCount = async () => {
|
const getUnreadCount = async () => {
|
||||||
NotifyMessageApi.getUnreadNotifyMessageCount().then((data) => {
|
NotifyMessageApi.getUnreadNotifyMessageCount({ roleId: userStore.getUser?.currentRole }).then(
|
||||||
unreadCount.value = data
|
(data) => {
|
||||||
})
|
unreadCount.value = data
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转我的站内信
|
// 跳转我的站内信
|
||||||
@@ -34,9 +42,9 @@ onMounted(() => {
|
|||||||
// 首次加载小红点
|
// 首次加载小红点
|
||||||
getUnreadCount()
|
getUnreadCount()
|
||||||
// 轮询刷新小红点
|
// 轮询刷新小红点
|
||||||
// msgInterval.value = setInterval(() => {
|
msgInterval.value = setInterval(() => {
|
||||||
// getUnreadCount()
|
getUnreadCount()
|
||||||
// }, 1000 * 60 * 2)
|
}, 1000 * 60 * 2)
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
@@ -56,10 +64,9 @@ onUnmounted(() => {
|
|||||||
<div class="message-list">
|
<div class="message-list">
|
||||||
<template v-for="item in list" :key="item.id">
|
<template v-for="item in list" :key="item.id">
|
||||||
<div class="message-item">
|
<div class="message-item">
|
||||||
<img alt="" class="message-icon" src="@/assets/imgs/avatar.gif" />
|
|
||||||
<div class="message-content">
|
<div class="message-content">
|
||||||
<span class="message-title">
|
<span class="message-title">
|
||||||
{{ item.templateNickname }}:{{ item.templateContent }}
|
{{ item.title }}
|
||||||
</span>
|
</span>
|
||||||
<span class="message-date">
|
<span class="message-date">
|
||||||
{{ formatDate(item.createTime) }}
|
{{ formatDate(item.createTime) }}
|
||||||
@@ -94,7 +101,7 @@ onUnmounted(() => {
|
|||||||
.message-item {
|
.message-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20px 0;
|
padding: 5px 0;
|
||||||
border-bottom: 1px solid var(--el-border-color-light);
|
border-bottom: 1px solid var(--el-border-color-light);
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
@@ -113,6 +120,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.message-title {
|
.message-title {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-date {
|
.message-date {
|
||||||
|
|||||||
@@ -42,8 +42,13 @@ import '@/plugins/tongji' // 百度统计
|
|||||||
import Logger from '@/utils/Logger'
|
import Logger from '@/utils/Logger'
|
||||||
import VueDOMPurifyHTML from 'vue-dompurify-html'
|
import VueDOMPurifyHTML from 'vue-dompurify-html'
|
||||||
|
|
||||||
|
import { Boot } from '@wangeditor/editor'
|
||||||
|
import attachmentModule from '@wangeditor/plugin-upload-attachment'
|
||||||
|
|
||||||
// 创建实例
|
// 创建实例
|
||||||
const setupAll = async () => {
|
const setupAll = async () => {
|
||||||
|
// 注册。要在创建编辑器之前注册,且只能注册一次,不可重复注册。
|
||||||
|
Boot.registerModule(attachmentModule)
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
|
|
||||||
await setupI18n(app)
|
await setupI18n(app)
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import router from './router'
|
import router from './router'
|
||||||
import { isRelogin } from '@/config/axios/service'
|
import { isRelogin } from '@/config/axios/service'
|
||||||
import { getAccessToken, removeToken } from '@/utils/auth'
|
import { getAccessToken } from '@/utils/auth'
|
||||||
import { useTitle } from '@/hooks/web/useTitle'
|
import { useTitle } from '@/hooks/web/useTitle'
|
||||||
import { useNProgress } from '@/hooks/web/useNProgress'
|
import { useNProgress } from '@/hooks/web/useNProgress'
|
||||||
import { usePageLoading } from '@/hooks/web/usePageLoading'
|
import { usePageLoading } from '@/hooks/web/usePageLoading'
|
||||||
import { useDictStoreWithOut } from '@/store/modules/dict'
|
import { useDictStoreWithOut } from '@/store/modules/dict'
|
||||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||||
import { usePermissionStoreWithOut } from '@/store/modules/permission'
|
import { usePermissionStoreWithOut } from '@/store/modules/permission'
|
||||||
import { getTenantId, getAppId } from '@/utils/auth'
|
import { useAppStoreWithOut } from '@/store/modules/app'
|
||||||
import cache from '@/plugins/cache'
|
import { getTenantId, getAppId, setTenantId, setAppId } from '@/utils/auth'
|
||||||
|
import { checkPermi } from '@/utils/permission'
|
||||||
|
|
||||||
const { start, done } = useNProgress()
|
const { start, done } = useNProgress()
|
||||||
|
|
||||||
@@ -17,69 +18,93 @@ const { loadStart, loadDone } = usePageLoading()
|
|||||||
const whiteList = [
|
const whiteList = [
|
||||||
'/login',
|
'/login',
|
||||||
'/mp-login',
|
'/mp-login',
|
||||||
|
'/nm-detail',
|
||||||
'/social-login',
|
'/social-login',
|
||||||
'/auth-redirect',
|
'/auth-redirect',
|
||||||
'/bind',
|
'/bind',
|
||||||
'/register',
|
'/register',
|
||||||
'/swagger'
|
'/swagger'
|
||||||
|
// '/crm/'
|
||||||
]
|
]
|
||||||
|
|
||||||
// 路由加载前
|
// 路由加载前
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
start()
|
start()
|
||||||
loadStart()
|
loadStart()
|
||||||
if (getAppId() && to.query?.appId && getAppId() != to.query?.appId) {
|
const userStore = useUserStoreWithOut()
|
||||||
removeToken()
|
if (to.path == '/login') {
|
||||||
cache?.local?.delete('appInfo')
|
userStore.resetState() // 重置用户信息状态
|
||||||
cache?.local?.delete('roleRouters')
|
}
|
||||||
cache?.local?.delete('user')
|
if (getAccessToken()) {
|
||||||
cache?.local?.delete('App_ID')
|
if (to.path === '/login') {
|
||||||
next(`/login?tenantId=${to.query?.tenantId}&appId=${to.query?.appId}`)
|
if (to.query?.tenantId && to.query?.appId) {
|
||||||
} else {
|
setApp(to.query.tenantId, to.query.appId)
|
||||||
if (getAccessToken()) {
|
await waitTime(1500)
|
||||||
if (to.path === '/login') {
|
}
|
||||||
next({ path: '/' })
|
next({ path: '/' })
|
||||||
|
} else if (to.name == 'ReceiveInput') {
|
||||||
|
if (!checkPermi(['clue:remark:receive-input'])) {
|
||||||
|
next({ path: '/403', replace: true, query: { noGoBack: true } })
|
||||||
|
return
|
||||||
} else {
|
} else {
|
||||||
// 获取所有字典
|
next()
|
||||||
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 {
|
} else {
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
// 获取所有字典
|
||||||
next()
|
const dictStore = useDictStoreWithOut()
|
||||||
|
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 {
|
} else {
|
||||||
const tenantId = getTenantId()
|
next()
|
||||||
const appId = getAppId()
|
}
|
||||||
if (tenantId && appId) {
|
}
|
||||||
next(`/crm/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
} else {
|
||||||
} else {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
next(`/crm/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
next()
|
||||||
}
|
} else {
|
||||||
|
const tenantId = getTenantId()
|
||||||
|
const appId = getAppId()
|
||||||
|
if (tenantId && appId) {
|
||||||
|
next(`/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||||
|
} else {
|
||||||
|
// next(`/login?redirect=${to.fullPath}`) // 使用内部路由重定向到登录页
|
||||||
|
window.location.href = 'https://cloud.ahduima.com/ss/login' // 已注释:避免外部跳转
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
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) => {
|
router.afterEach((to) => {
|
||||||
useTitle(to?.meta?.title)
|
useTitle(to?.meta?.title)
|
||||||
done() // 结束Progress
|
done() // 结束Progress
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '',
|
path: '/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/Home/index',
|
redirect: '/Home/index',
|
||||||
name: '',
|
name: '',
|
||||||
@@ -59,6 +59,21 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
title: '首页',
|
title: '首页',
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
|
// ,
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: '/index',
|
||||||
|
// component: () => import('@/views/Basic/Menu/index.vue'),
|
||||||
|
// name: 'Home',
|
||||||
|
// meta: {
|
||||||
|
// title: '首页',
|
||||||
|
// icon: 'ep:home-filled',
|
||||||
|
// noTagsView: true,
|
||||||
|
// affix: true
|
||||||
|
// // hidden: true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/swagger',
|
path: '/swagger',
|
||||||
@@ -106,7 +121,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// path: '/dict',
|
// path: '/dict',
|
||||||
// component: Layout,
|
// component: Layout,
|
||||||
@@ -134,8 +148,8 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
// path: '/Basic',
|
// path: '/Basic',
|
||||||
// component: Layout,
|
// component: Layout,
|
||||||
// name: 'Basic',
|
// name: 'Basic',
|
||||||
// meta: {},
|
|
||||||
// redirect: '/Basic/menu',
|
// redirect: '/Basic/menu',
|
||||||
|
// meta: { title: '菜单管理' },
|
||||||
// children: [
|
// children: [
|
||||||
// {
|
// {
|
||||||
// path: 'menu',
|
// path: 'menu',
|
||||||
@@ -151,6 +165,38 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
path: '/clue-add',
|
||||||
|
name: 'ClueAdd',
|
||||||
|
component: () => import('@/views/Clue/Pool/ClueAdd.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '线索录入',
|
||||||
|
hidden: true,
|
||||||
|
noTagsView: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/receive-input/:id',
|
||||||
|
name: 'ReceiveInput',
|
||||||
|
component: () => import('@/views/Clue/ReceiveInput/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '接待信息录入',
|
||||||
|
hidden: true,
|
||||||
|
noTagsView: true,
|
||||||
|
permission: 'clue:receiveInput:index'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/clue-enroll/:id',
|
||||||
|
name: 'ClueEnroll',
|
||||||
|
component: () => import('@/views/Clue/Pool/ClueEnroll.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '学员报名登记',
|
||||||
|
hidden: true,
|
||||||
|
noTagsView: true,
|
||||||
|
permission: 'clue:pool:enroll'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: () => import('@/views/Login/Login.vue'),
|
component: () => import('@/views/Login/Login.vue'),
|
||||||
@@ -181,6 +227,16 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
noTagsView: true
|
noTagsView: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/nm-detail',
|
||||||
|
component: () => import('@/views/Profile/NotifyMessageDetail.vue'),
|
||||||
|
name: 'NMDetail',
|
||||||
|
meta: {
|
||||||
|
hidden: true,
|
||||||
|
title: '通知详情',
|
||||||
|
noTagsView: true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/403',
|
path: '/403',
|
||||||
component: () => import('@/views/Error/403.vue'),
|
component: () => import('@/views/Error/403.vue'),
|
||||||
|
|||||||
87
src/router/modules/static.ts
Normal file
87
src/router/modules/static.ts
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
const staticRouter: AppCustomRouteRecordRaw[] = [
|
||||||
|
{
|
||||||
|
icon: 'ep:calendar',
|
||||||
|
path: '/Okr',
|
||||||
|
component: '',
|
||||||
|
name: 'OKR',
|
||||||
|
componentName: '',
|
||||||
|
redirect: '',
|
||||||
|
parentId: 0,
|
||||||
|
visible: true,
|
||||||
|
alwaysShow: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
icon: 'ep:finished',
|
||||||
|
path: 'okr-management',
|
||||||
|
name: 'OKR管理',
|
||||||
|
componentName: 'OkrManagement',
|
||||||
|
component: 'OKR/Management/index',
|
||||||
|
visible: true,
|
||||||
|
alwaysShow: true,
|
||||||
|
meta: {
|
||||||
|
title: 'OKR管理'
|
||||||
|
},
|
||||||
|
redirect: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'ep:alarm-clock',
|
||||||
|
path: 'okr-wait',
|
||||||
|
name: '待办事项',
|
||||||
|
componentName: 'OkrWait',
|
||||||
|
component: 'OKR/Wait/index',
|
||||||
|
meta: {
|
||||||
|
title: '待办事项'
|
||||||
|
},
|
||||||
|
visible: true,
|
||||||
|
alwaysShow: true,
|
||||||
|
redirect: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'ep:data-line',
|
||||||
|
path: 'okr-analysis',
|
||||||
|
name: 'Okr统计',
|
||||||
|
componentName: 'OkrAnalysis',
|
||||||
|
component: 'OKR/Analysis/index',
|
||||||
|
meta: {
|
||||||
|
title: 'Okr统计'
|
||||||
|
},
|
||||||
|
visible: true,
|
||||||
|
alwaysShow: true,
|
||||||
|
redirect: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'ep:data-board',
|
||||||
|
path: 'okr-meeting',
|
||||||
|
name: '会议管理',
|
||||||
|
componentName: 'OkrMeeting',
|
||||||
|
component: 'OKR/Meeting/index',
|
||||||
|
meta: {
|
||||||
|
title: '会议管理'
|
||||||
|
},
|
||||||
|
visible: true,
|
||||||
|
alwaysShow: true,
|
||||||
|
redirect: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'ep:data-board',
|
||||||
|
path: 'okr-meeting-info/:id',
|
||||||
|
name: '会议详情',
|
||||||
|
componentName: 'MeetingInfo',
|
||||||
|
component: 'OKR/Meeting/MeetingInfo',
|
||||||
|
meta: {
|
||||||
|
title: '会议详情'
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
alwaysShow: true,
|
||||||
|
redirect: '',
|
||||||
|
keepAlive: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
meta: {
|
||||||
|
title: 'OKR',
|
||||||
|
icon: 'ep:calendar'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
export default staticRouter
|
||||||
@@ -45,7 +45,7 @@ export const useDictStore = defineStore('dict', {
|
|||||||
this.dictMap = dictMap
|
this.dictMap = dictMap
|
||||||
this.isSetDict = true
|
this.isSetDict = true
|
||||||
} else {
|
} else {
|
||||||
const res = await listSimpleDictData()
|
const res = (await listSimpleDictData()) || []
|
||||||
// 设置数据
|
// 设置数据
|
||||||
const dictDataMap = new Map<string, any>()
|
const dictDataMap = new Map<string, any>()
|
||||||
res.forEach((dictData: DictDataVO) => {
|
res.forEach((dictData: DictDataVO) => {
|
||||||
@@ -75,7 +75,7 @@ export const useDictStore = defineStore('dict', {
|
|||||||
},
|
},
|
||||||
async resetDict() {
|
async resetDict() {
|
||||||
cache.session.delete(CACHE_KEY.DICT_CACHE)
|
cache.session.delete(CACHE_KEY.DICT_CACHE)
|
||||||
const res = await listSimpleDictData()
|
const res = (await listSimpleDictData()) || []
|
||||||
// 设置数据
|
// 设置数据
|
||||||
const dictDataMap = new Map<string, any>()
|
const dictDataMap = new Map<string, any>()
|
||||||
res.forEach((dictData: DictDataVO) => {
|
res.forEach((dictData: DictDataVO) => {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { defineStore } from 'pinia'
|
|||||||
import { store } from '../index'
|
import { store } from '../index'
|
||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
import remainingRouter from '@/router/modules/remaining'
|
import remainingRouter from '@/router/modules/remaining'
|
||||||
|
import staticRouter from '@/router/modules/static'
|
||||||
import { generateRoute, flatMultiLevelRoutes } from '@/utils/routerHelper'
|
import { generateRoute, flatMultiLevelRoutes } from '@/utils/routerHelper'
|
||||||
import { CACHE_KEY } from '@/hooks/web/useCache'
|
import { CACHE_KEY } from '@/hooks/web/useCache'
|
||||||
import cache from '@/plugins/cache'
|
import cache from '@/plugins/cache'
|
||||||
@@ -36,6 +37,25 @@ export const usePermissionStore = defineStore('permission', {
|
|||||||
if (cache.local.get(CACHE_KEY.ROLE_ROUTERS)) {
|
if (cache.local.get(CACHE_KEY.ROLE_ROUTERS)) {
|
||||||
res = cache.local.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
|
res = cache.local.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
|
||||||
}
|
}
|
||||||
|
const staticRouters = cloneDeep(staticRouter)
|
||||||
|
// 与动态路由比较,首先判断目录是否存在,如果存在就合并,并替换动态路由中的目录
|
||||||
|
staticRouters.forEach((item) => {
|
||||||
|
const index = res.findIndex((item2) => item2.path === item.path)
|
||||||
|
if (index !== -1) {
|
||||||
|
const arr = []
|
||||||
|
if (!item.children || item.children.length === 0) {
|
||||||
|
item.children = arr
|
||||||
|
}
|
||||||
|
if (res[index].children && res[index].children.length > 0) {
|
||||||
|
item.children = item.children.concat(res[index].children)
|
||||||
|
}
|
||||||
|
// routerMap[index].children = item.children
|
||||||
|
// 插入动态路由数组的第二位
|
||||||
|
res[index] = { ...res, ...item }
|
||||||
|
} else {
|
||||||
|
res = [...staticRouters, ...res]
|
||||||
|
}
|
||||||
|
})
|
||||||
const routerMap: AppRouteRecordRaw[] = generateRoute(res)
|
const routerMap: AppRouteRecordRaw[] = generateRoute(res)
|
||||||
// 动态路由,404一定要放到最后面
|
// 动态路由,404一定要放到最后面
|
||||||
this.addRouters = routerMap.concat([
|
this.addRouters = routerMap.concat([
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ interface UserVO {
|
|||||||
id: number
|
id: number
|
||||||
avatar: string
|
avatar: string
|
||||||
nickname: string
|
nickname: string
|
||||||
|
currentRole: number
|
||||||
}
|
}
|
||||||
interface UserInfoVO {
|
interface UserInfoVO {
|
||||||
permissions: string[]
|
permissions: string[]
|
||||||
@@ -25,7 +26,8 @@ export const useUserStore = defineStore('admin-user', {
|
|||||||
user: {
|
user: {
|
||||||
id: 0,
|
id: 0,
|
||||||
avatar: '',
|
avatar: '',
|
||||||
nickname: ''
|
nickname: '',
|
||||||
|
currentRole: 0
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
@@ -62,7 +64,7 @@ export const useUserStore = defineStore('admin-user', {
|
|||||||
async loginOut() {
|
async loginOut() {
|
||||||
await loginOut()
|
await loginOut()
|
||||||
removeToken()
|
removeToken()
|
||||||
cache.local.clear()
|
// cache.local.clear()
|
||||||
this.resetState()
|
this.resetState()
|
||||||
},
|
},
|
||||||
resetState() {
|
resetState() {
|
||||||
@@ -72,8 +74,10 @@ export const useUserStore = defineStore('admin-user', {
|
|||||||
this.user = {
|
this.user = {
|
||||||
id: 0,
|
id: 0,
|
||||||
avatar: '',
|
avatar: '',
|
||||||
nickname: ''
|
nickname: '',
|
||||||
|
currentRole: 0
|
||||||
}
|
}
|
||||||
|
cache.local.delete(CACHE_KEY.USER)
|
||||||
},
|
},
|
||||||
refresh() {
|
refresh() {
|
||||||
cache.local.delete(CACHE_KEY.USER)
|
cache.local.delete(CACHE_KEY.USER)
|
||||||
|
|||||||
@@ -69,3 +69,51 @@
|
|||||||
width: 100%;
|
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;
|
||||||
|
}
|
||||||
|
.el-drawer__header {
|
||||||
|
padding: 16px 16px 8px 16px !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
line-height: 24px !important;
|
||||||
|
font-size: 18px !important;
|
||||||
|
color: #303133 !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
// border-bottom: 1px solid #e8e8e8 !important;
|
||||||
|
}
|
||||||
@@ -8,26 +8,34 @@ const RefreshTokenKey = 'REFRESH_TOKEN'
|
|||||||
// 获取token
|
// 获取token
|
||||||
export const getAccessToken = () => {
|
export const getAccessToken = () => {
|
||||||
// 此处与TokenKey相同,此写法解决初始化时Cookies中不存在TokenKey报错
|
// 此处与TokenKey相同,此写法解决初始化时Cookies中不存在TokenKey报错
|
||||||
return cache.local.get(AccessTokenKey)
|
return localStorage.getItem(AccessTokenKey)
|
||||||
? cache.local.get(AccessTokenKey)
|
? localStorage.getItem(AccessTokenKey)
|
||||||
: cache.local.get('ACCESS_TOKEN')
|
: localStorage.getItem('ACCESS_TOKEN')
|
||||||
|
// return cache.local.get(AccessTokenKey)
|
||||||
|
// ? cache.local.get(AccessTokenKey)
|
||||||
|
// : cache.local.get('ACCESS_TOKEN')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新token
|
// 刷新token
|
||||||
export const getRefreshToken = () => {
|
export const getRefreshToken = () => {
|
||||||
return cache.local.get(RefreshTokenKey)
|
return localStorage.getItem(RefreshTokenKey)
|
||||||
|
// return cache.local.get(RefreshTokenKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置token
|
// 设置token
|
||||||
export const setToken = (token: TokenType) => {
|
export const setToken = (token: TokenType) => {
|
||||||
cache.local.set(RefreshTokenKey, token.refreshToken)
|
localStorage.setItem(AccessTokenKey, token.accessToken)
|
||||||
cache.local.set(AccessTokenKey, token.accessToken)
|
localStorage.setItem(RefreshTokenKey, token.refreshToken)
|
||||||
|
// cache.local.set(RefreshTokenKey, token.refreshToken)
|
||||||
|
// cache.local.set(AccessTokenKey, token.accessToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除token
|
// 删除token
|
||||||
export const removeToken = () => {
|
export const removeToken = () => {
|
||||||
cache.local.delete(AccessTokenKey)
|
localStorage.removeItem(AccessTokenKey)
|
||||||
cache.local.delete(RefreshTokenKey)
|
localStorage.removeItem(RefreshTokenKey)
|
||||||
|
// cache.local.delete(AccessTokenKey)
|
||||||
|
// cache.local.delete(RefreshTokenKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 格式化token(jwt格式) */
|
/** 格式化token(jwt格式) */
|
||||||
|
|||||||
@@ -74,13 +74,13 @@ export const SystemUserSocialTypeEnum = {
|
|||||||
type: 20,
|
type: 20,
|
||||||
source: 'dingtalk',
|
source: 'dingtalk',
|
||||||
img: 'https://s1.ax1x.com/2022/05/22/OzMDRs.png'
|
img: 'https://s1.ax1x.com/2022/05/22/OzMDRs.png'
|
||||||
},
|
|
||||||
WECHAT_ENTERPRISE: {
|
|
||||||
title: '企业微信',
|
|
||||||
type: 30,
|
|
||||||
source: 'wechat_enterprise',
|
|
||||||
img: 'https://s1.ax1x.com/2022/05/22/OzMrzn.png'
|
|
||||||
}
|
}
|
||||||
|
// WECHAT_ENTERPRISE: {
|
||||||
|
// title: '企业微信',
|
||||||
|
// type: 30,
|
||||||
|
// source: 'wechat_enterprise',
|
||||||
|
// img: 'https://s1.ax1x.com/2022/05/22/OzMrzn.png'
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -220,3 +220,83 @@ export const removeNullField = (obj: Object) => {
|
|||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|
||||||
|
import * as XLSX from 'xlsx'
|
||||||
|
import * as FileSaver from 'file-saver'
|
||||||
|
export const exportTableWithVue = (domId: any, fileName: String) => {
|
||||||
|
// const XLSX = require('xlsx')
|
||||||
|
// 使用 this.$nextTick 是在dom元素都渲染完成之后再执行
|
||||||
|
// this.$nextTick(function () {
|
||||||
|
// 设置导出的内容是否只做解析,不进行格式转换 false:要解析, true:不解析
|
||||||
|
const xlsxParam = { raw: true }
|
||||||
|
const wb = XLSX.utils.table_to_book(document.querySelector(domId), xlsxParam)
|
||||||
|
|
||||||
|
const wbout = XLSX.write(wb, {
|
||||||
|
bookType: 'xlsx',
|
||||||
|
bookSST: true,
|
||||||
|
type: 'array'
|
||||||
|
})
|
||||||
|
try {
|
||||||
|
// 下载保存文件
|
||||||
|
FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), `${fileName}.xlsx`)
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof console !== 'undefined') {
|
||||||
|
console.log(e, wbout)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return wbout
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数组数据导出为 Excel
|
||||||
|
* @param {Array} data 要导出的数组数据(对象数组,如 [{name: '张三', age: 18}, ...])
|
||||||
|
* @param {String} fileName 导出的文件名(不含 .xlsx 后缀)
|
||||||
|
* @param {Array} header 自定义表头映射(可选,格式:[{key: 'name', title: '姓名'}, ...])
|
||||||
|
* 若不传入,默认使用数据对象的 key 作为表头
|
||||||
|
*/
|
||||||
|
export const exportArrayToExcel = function (data: any[], fileName: String, header: any) {
|
||||||
|
// 处理表头映射
|
||||||
|
const worksheetData = []
|
||||||
|
let headerKeys = [] // 数据对象的 key 集合
|
||||||
|
let headerTitles = [] // 表头显示文本
|
||||||
|
|
||||||
|
if (header && header.length > 0) {
|
||||||
|
// 使用自定义表头
|
||||||
|
headerKeys = header.map((item) => item.key)
|
||||||
|
headerTitles = header.map((item) => item.title)
|
||||||
|
worksheetData.push(headerTitles) // 加入表头行
|
||||||
|
} else {
|
||||||
|
// 自动生成表头(使用数据中第一个对象的 key)
|
||||||
|
if (data.length === 0) {
|
||||||
|
console.warn('导出数据为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
headerKeys = Object.keys(data[0])
|
||||||
|
headerTitles = headerKeys // 表头默认用 key
|
||||||
|
worksheetData.push(headerTitles) // 加入表头行
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理数据行(按表头 key 顺序提取数据)
|
||||||
|
data.forEach((item) => {
|
||||||
|
const row = headerKeys.map((key) => {
|
||||||
|
// 处理特殊类型(如日期对象转为字符串)
|
||||||
|
if (item[key] instanceof Date) {
|
||||||
|
return item[key].toLocaleString()
|
||||||
|
}
|
||||||
|
// 其他类型直接转为字符串(避免 undefined 显示)
|
||||||
|
return item[key] !== undefined ? String(item[key]) : ''
|
||||||
|
})
|
||||||
|
worksheetData.push(row)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 创建工作簿和工作表
|
||||||
|
const ws = XLSX.utils.aoa_to_sheet(worksheetData) // 数组转工作表
|
||||||
|
const wb = XLSX.utils.book_new() // 创建工作簿
|
||||||
|
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1') // 工作表命名为 Sheet1
|
||||||
|
|
||||||
|
// 生成二进制文件并下载
|
||||||
|
const excelBuffer = XLSX.write(wb, { bookType: 'xlsx', type: 'array' })
|
||||||
|
const blob = new Blob([excelBuffer], { type: 'application/octet-stream' })
|
||||||
|
saveAs(blob, `${fileName}.xlsx`) // 保存文件
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,122 +1,74 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog v-model="dialogVisible" :title="dialogTitle" width="800px">
|
<Dialog v-if="dialogVisible" v-model="dialogVisible" :title="dialogTitle" width="800px">
|
||||||
<el-tabs v-model="tabIndex">
|
<el-form
|
||||||
<el-tab-pane label="基础信息" :name="1">
|
ref="formRef"
|
||||||
<el-form
|
v-loading="formLoading"
|
||||||
ref="formRef"
|
:model="formData"
|
||||||
v-loading="formLoading"
|
:rules="formRules"
|
||||||
:model="formData"
|
label-width="80px"
|
||||||
:rules="formRules"
|
>
|
||||||
label-width="80px"
|
<el-row :gutter="20">
|
||||||
>
|
<el-col :span="12" :offset="0">
|
||||||
<el-row :gutter="20">
|
<el-form-item label="上级部门" prop="parentId">
|
||||||
<el-col :span="12" :offset="0">
|
<el-tree-select
|
||||||
<el-form-item label="上级部门" prop="parentId">
|
v-model="formData.parentId"
|
||||||
<el-tree-select
|
:data="deptTree"
|
||||||
v-model="formData.parentId"
|
:props="defaultProps"
|
||||||
:data="deptTree"
|
check-strictly
|
||||||
:props="defaultProps"
|
default-expand-all
|
||||||
check-strictly
|
placeholder="请选择上级部门"
|
||||||
default-expand-all
|
value-key="deptId"
|
||||||
placeholder="请选择上级部门"
|
|
||||||
value-key="deptId"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="部门名称" prop="name">
|
|
||||||
<el-input v-model="formData.name" placeholder="请输入部门名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="负责人" prop="leaderUserId">
|
|
||||||
<el-select v-model="formData.leaderUserId" clearable placeholder="请输入负责人">
|
|
||||||
<el-option
|
|
||||||
v-for="item in userList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.nickname"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="状态" prop="status">
|
|
||||||
<el-radio-group v-model="formData.status">
|
|
||||||
<el-radio :label="0"> 启用 </el-radio>
|
|
||||||
<el-radio :label="1"> 禁用 </el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="排序" prop="sort">
|
|
||||||
<el-input-number v-model="formData.sort" :min="0" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<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>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="业务指标" :name="2">
|
|
||||||
<el-form :model="formData" label-width="auto">
|
|
||||||
<el-form-item label="每日跟进指标数">
|
|
||||||
<el-input-number
|
|
||||||
v-model="formData.followDaliyNum"
|
|
||||||
:controls="false"
|
|
||||||
style="width: 150px"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="跟进指标生效日期">
|
</el-col>
|
||||||
<el-date-picker
|
<el-col :span="12" :offset="0">
|
||||||
v-model="formData.effectDate"
|
<el-form-item label="部门名称" prop="name">
|
||||||
type="date"
|
<el-input v-model="formData.name" placeholder="请输入部门名称" />
|
||||||
placeholder="选择日期时间"
|
|
||||||
format="YYYY-MM-DD"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
style="width: 150px"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-col>
|
||||||
<el-divider direction="horizontal" content-position="left">成交额指标</el-divider>
|
</el-row>
|
||||||
<el-button class="mb-10px" type="primary" @click="taskList.push({})">添加年份</el-button>
|
<el-row :gutter="20">
|
||||||
<el-table :data="taskList" border>
|
<el-col :span="12" :offset="0">
|
||||||
<el-table-column label="年份" width="120">
|
<el-form-item label="负责人" prop="leaderUserId">
|
||||||
<template #default="{ row }">
|
<el-select
|
||||||
<el-date-picker
|
v-model="formData.leaderUserId"
|
||||||
v-model="row.year"
|
clearable
|
||||||
type="year"
|
multiple
|
||||||
placeholder="选择年份"
|
placeholder="请输入负责人"
|
||||||
size="small"
|
>
|
||||||
format="YYYY"
|
<el-option
|
||||||
value-format="YYYY"
|
v-for="item in userList"
|
||||||
style="width: 100%"
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</template>
|
</el-select>
|
||||||
</el-table-column>
|
</el-form-item>
|
||||||
<el-table-column v-for="col in 12" :key="col" :label="`${col}月`" width="100px">
|
</el-col>
|
||||||
<template #default="{ row }">
|
<el-col :span="12" :offset="0">
|
||||||
<el-input-number
|
<el-form-item label="状态" prop="status">
|
||||||
v-model="row[`month${col}`]"
|
<el-radio-group v-model="formData.status">
|
||||||
size="small"
|
<el-radio :label="0"> 启用 </el-radio>
|
||||||
:controls="false"
|
<el-radio :label="1"> 禁用 </el-radio>
|
||||||
style="width: 100%"
|
</el-radio-group>
|
||||||
/>
|
</el-form-item>
|
||||||
</template>
|
</el-col>
|
||||||
</el-table-column>
|
</el-row>
|
||||||
</el-table>
|
<el-row :gutter="20">
|
||||||
</el-tab-pane>
|
<el-col :span="12" :offset="0">
|
||||||
</el-tabs>
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input-number v-model="formData.sort" :min="0" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24" :offset="0">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<Editor v-model="formData.remark" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
@@ -135,8 +87,6 @@ const message = useMessage() // 消息弹窗
|
|||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
|
|
||||||
const tabIndex = ref(1)
|
|
||||||
|
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@@ -232,6 +182,4 @@ const getTree = async () => {
|
|||||||
dept.children = handleTree(data)
|
dept.children = handleTree(data)
|
||||||
deptTree.value.push(dept)
|
deptTree.value.push(dept)
|
||||||
}
|
}
|
||||||
|
|
||||||
const taskList = ref([])
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
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 v-loading="loading" :data="list" row-key="id" default-expand-all border>
|
||||||
<el-table-column prop="name" label="部门名称" />
|
<el-table-column prop="name" label="部门名称" />
|
||||||
<el-table-column prop="leader" label="负责人" width="120" />
|
<el-table-column prop="leaderUserName" label="负责人" width="120" />
|
||||||
<el-table-column prop="sort" label="排序" width="200" />
|
<el-table-column prop="sort" label="排序" width="200" />
|
||||||
<el-table-column prop="status" label="状态" width="100" />
|
<el-table-column prop="status" label="状态" width="100">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ ['启用', '禁用'][row.status] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="createTime" width="180" :formatter="dateFormatter" />
|
<el-table-column label="创建时间" prop="createTime" width="180" :formatter="dateFormatter" />
|
||||||
<el-table-column label="操作" class-name="fixed-width" width="160">
|
<el-table-column label="操作" class-name="fixed-width" width="240">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
@@ -35,6 +39,14 @@
|
|||||||
>
|
>
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="openTarget(scope.row.id)"
|
||||||
|
v-hasPermi="['basic:dept:update']"
|
||||||
|
>
|
||||||
|
业绩指标
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
@@ -49,11 +61,13 @@
|
|||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<DeptForm ref="formRef" @success="getList" />
|
<DeptForm ref="formRef" @success="getList" />
|
||||||
|
<DialogTarget ref="targetDialogRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="SystemDept">
|
<script setup lang="ts" name="SystemDept">
|
||||||
import { handleTree } from '@/utils/tree'
|
import { handleTree } from '@/utils/tree'
|
||||||
import * as DeptApi from '@/api/system/dept'
|
import * as DeptApi from '@/api/system/dept'
|
||||||
import DeptForm from './DeptForm.vue'
|
import DeptForm from './DeptForm.vue'
|
||||||
|
import DialogTarget from './DialogTarget.vue'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
@@ -93,6 +107,11 @@ const openForm = (type: string, id?: number) => {
|
|||||||
formRef.value.open(type, id)
|
formRef.value.open(type, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const targetDialogRef = ref()
|
||||||
|
const openTarget = (id: number) => {
|
||||||
|
targetDialogRef.value.open(id)
|
||||||
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (id: number) => {
|
const handleDelete = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
<!-- <el-tab-pane label="销售提成" :name="10" v-if="checkPermi(['basic:setting:comission'])">
|
<!-- <el-tab-pane label="销售提成" :name="10" v-if="checkPermi(['basic:setting:comission'])">
|
||||||
<BSSalerComission v-if="tabIndex == 10" />
|
<BSSalerComission v-if="tabIndex == 10" />
|
||||||
</el-tab-pane> -->
|
</el-tab-pane> -->
|
||||||
|
<!-- <el-tab-pane label="微信机器人" :name="20">
|
||||||
|
<BSSalerComission v-if="tabIndex == 20" />
|
||||||
|
</el-tab-pane> -->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<MenuForm ref="formRef" :appList="appList" @success="getList" />
|
<MenuForm ref="formRef" :appList="appList" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" name="SystemMenu" setup>
|
<script lang="ts" name="Menu" setup>
|
||||||
import { handleTree } from '@/utils/tree'
|
import { handleTree } from '@/utils/tree'
|
||||||
import * as MenuApi from '@/api/system/menu'
|
import * as MenuApi from '@/api/system/menu'
|
||||||
import MenuForm from './MenuForm.vue'
|
import MenuForm from './MenuForm.vue'
|
||||||
|
|||||||
@@ -2,35 +2,36 @@
|
|||||||
<div class="pl-20px pr-20px">
|
<div class="pl-20px pr-20px">
|
||||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" v-loading="formLoading">
|
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" v-loading="formLoading">
|
||||||
<el-form-item label="开启通知">
|
<el-form-item label="开启通知">
|
||||||
<el-radio-group v-model="form.kaiqitongzhi">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio :label="1"> 开启 </el-radio>
|
<el-radio :label="0"> 开启 </el-radio>
|
||||||
<el-radio :label="0"> 关闭 </el-radio>
|
<el-radio :label="1"> 关闭 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="发送途径">
|
<el-form-item label="发送途径">
|
||||||
<el-checkbox-group v-model="form.fasongtujing">
|
<el-checkbox-group v-model="form.sendType">
|
||||||
<el-checkbox :label="1">系统通知</el-checkbox>
|
<el-checkbox v-for="(item, index) in sendTypeOptions" :key="index" :label="item.value">
|
||||||
<el-checkbox :label="2">微信公众号</el-checkbox>
|
{{ item.label }}
|
||||||
|
</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发送时间">
|
<el-form-item label="发送时间">
|
||||||
<el-time-picker
|
<el-time-picker
|
||||||
v-model="form.sendTime"
|
v-model="form.sendTime"
|
||||||
placeholder="任意时间点"
|
placeholder="任意时间点"
|
||||||
format="HH:mm:ss"
|
format="HH:mm"
|
||||||
value-format="HH:mm:ss"
|
value-format="HH:mm"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发送内容">
|
<el-form-item label="发送内容">
|
||||||
<el-tree
|
<el-tree
|
||||||
ref="treeRef"
|
ref="treeRef"
|
||||||
:data="contentOptions"
|
:data="contentOptions"
|
||||||
|
:props="defaultProps"
|
||||||
empty-text="加载中,请稍候"
|
empty-text="加载中,请稍候"
|
||||||
node-key="value"
|
node-key="id"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
default-expand-all
|
default-expand-all
|
||||||
:default-checked-keys="form.sendContent"
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -42,7 +43,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="ReportDaily">
|
<script setup name="ReportDaily">
|
||||||
import { handleTree } from '@/utils/tree'
|
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 message = useMessage() // 消息弹窗
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -53,9 +56,16 @@ const props = defineProps({
|
|||||||
|
|
||||||
const formLoading = ref(false)
|
const formLoading = ref(false)
|
||||||
const form = ref({
|
const form = ref({
|
||||||
checkedMenuIds: []
|
sendItem: []
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.roleId,
|
||||||
|
() => {
|
||||||
|
getReportInfo()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
@@ -71,43 +81,39 @@ async function init() {
|
|||||||
getReportInfo()
|
getReportInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const sendTypeOptions = ref([])
|
||||||
const treeRef = ref()
|
const treeRef = ref()
|
||||||
function getOptions() {
|
function getOptions() {
|
||||||
const arr = [
|
getGeneralSysDictData('message_send_type').then((data) => {
|
||||||
{
|
sendTypeOptions.value = data
|
||||||
value: 1,
|
})
|
||||||
label: '销售快报',
|
DaliyReportApi.getDaliyReportContent().then((data) => {
|
||||||
children: [
|
contentOptions.value = handleTree(data)
|
||||||
{ value: 11, label: '今日跟进线索数', pId: 1 },
|
})
|
||||||
{ value: 12, label: '今日待跟进数', pId: 1 },
|
|
||||||
{ value: 13, label: '今日接受线索数', pId: 1 }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
value: 2,
|
|
||||||
label: '管理快报',
|
|
||||||
children: [
|
|
||||||
{ value: 21, label: '当日业绩(成交数,成交额)', pId: 2 },
|
|
||||||
{ value: 22, label: '当月业绩(成交数,成交额)', pId: 2 },
|
|
||||||
{ value: 23, label: '本月业绩完成情况(数值,比例)', pId: 2 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
contentOptions.value = arr
|
|
||||||
handleTree(arr)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getReportInfo() {
|
async function getReportInfo() {
|
||||||
try {
|
try {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
form.value = {
|
const data = await DaliyReportApi.getRoleDaliyReport(props.roleId)
|
||||||
kaiqitongzhi: 1,
|
form.value = { ...data }
|
||||||
fasongtujing: [1, 2],
|
|
||||||
sendTime: '21:00:00',
|
if (!form.value.sendType) {
|
||||||
sendContent: [21, 22, 23]
|
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
|
formLoading.value = false
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
@@ -121,16 +127,19 @@ const submitForm = async () => {
|
|||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
const data = {
|
const data = {
|
||||||
|
id: form.value.id,
|
||||||
roleId: props.roleId,
|
roleId: props.roleId,
|
||||||
menuIds: [
|
sendType: form.value.sendType,
|
||||||
|
sendTime: form.value.sendTime,
|
||||||
|
status: form.value.status,
|
||||||
|
sendItem: [
|
||||||
...treeRef.value.getCheckedKeys(false), // 获得当前选中节点
|
...treeRef.value.getCheckedKeys(false), // 获得当前选中节点
|
||||||
...treeRef.value.getHalfCheckedKeys() // 获得半选中的父节点
|
...treeRef.value.getHalfCheckedKeys() // 获得半选中的父节点
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
// await PermissionApi.assignRoleMenu(data)
|
await DaliyReportApi.updateRoleDaliyReport(data)
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
message.success('保存成功')
|
message.success('保存成功')
|
||||||
|
getReportInfo()
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,18 @@
|
|||||||
:label="col.label"
|
:label="col.label"
|
||||||
:width="col.width"
|
:width="col.width"
|
||||||
/>
|
/>
|
||||||
|
<el-table-column label="状态" key="status">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.status"
|
||||||
|
:active-value="0"
|
||||||
|
active-text="在职"
|
||||||
|
inactive-text="离职"
|
||||||
|
:inactive-value="1"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<Pagination
|
<Pagination
|
||||||
v-model:limit="pageSize"
|
v-model:limit="pageSize"
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="head-container">
|
|
||||||
<el-input v-model="deptName" class="mb-20px" clearable placeholder="请输入部门名称">
|
|
||||||
<template #prefix>
|
|
||||||
<Icon icon="ep:search" />
|
|
||||||
</template>
|
|
||||||
</el-input>
|
|
||||||
</div>
|
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-tree
|
<el-tree
|
||||||
ref="treeRef"
|
ref="treeRef"
|
||||||
@@ -26,7 +19,6 @@ import { ElTree } from 'element-plus'
|
|||||||
import * as DeptApi from '@/api/system/dept'
|
import * as DeptApi from '@/api/system/dept'
|
||||||
import { defaultProps, handleTree } from '@/utils/tree'
|
import { defaultProps, handleTree } from '@/utils/tree'
|
||||||
|
|
||||||
const deptName = ref('')
|
|
||||||
const deptList = ref<Tree[]>([]) // 树形结构
|
const deptList = ref<Tree[]>([]) // 树形结构
|
||||||
const treeRef = ref<InstanceType<typeof ElTree>>()
|
const treeRef = ref<InstanceType<typeof ElTree>>()
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="80px"
|
label-width="100px"
|
||||||
>
|
>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item v-if="formData.id === undefined" label="登录账号" prop="username">
|
<el-form-item label="登录账号" prop="username">
|
||||||
<el-input v-model="formData.username" placeholder="请输入登录账号" />
|
<el-input v-model="formData.username" placeholder="请输入登录账号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -85,6 +85,11 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="微信号" prop="wxAlias">
|
||||||
|
<el-input v-model="formData.wxAlias" placeholder="请输入微信号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="入职日期" prop="hireDate">
|
<el-form-item label="入职日期" prop="hireDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -97,6 +102,23 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="钉钉手机号">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.ddPhone"
|
||||||
|
placeholder="请输入钉钉手机号"
|
||||||
|
clearable
|
||||||
|
@blur="getDDId"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="钉钉Id" prop="dingUserId">
|
||||||
|
<el-input v-model="formData.dingUserId" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
@@ -127,7 +149,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
|
|||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref<any>({
|
||||||
nickname: '',
|
nickname: '',
|
||||||
deptId: '',
|
deptId: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
@@ -139,7 +161,9 @@ const formData = ref({
|
|||||||
remark: '',
|
remark: '',
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
roleIds: [],
|
roleIds: [],
|
||||||
hireDate: ''
|
hireDate: '',
|
||||||
|
isNewUserConfirm: false,
|
||||||
|
wxAlias: ''
|
||||||
})
|
})
|
||||||
const formRules = ref<any>({
|
const formRules = ref<any>({
|
||||||
username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }],
|
username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }],
|
||||||
@@ -192,8 +216,14 @@ const submitForm = async () => {
|
|||||||
try {
|
try {
|
||||||
const data = formData.value as unknown as UserApi.UserVO
|
const data = formData.value as unknown as UserApi.UserVO
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
await UserApi.createUser(data)
|
const resp = await UserApi.createUser(data)
|
||||||
message.success(t('common.createSuccess'))
|
if (resp.code == 18888) {
|
||||||
|
await message.confirm(resp.msg)
|
||||||
|
formData.value.isNewUserConfirm = true
|
||||||
|
submitForm()
|
||||||
|
} else {
|
||||||
|
message.success(t('common.createSuccess'))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
await UserApi.updateUser(data)
|
await UserApi.updateUser(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
@@ -220,8 +250,22 @@ const resetForm = () => {
|
|||||||
remark: '',
|
remark: '',
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
roleIds: [],
|
roleIds: [],
|
||||||
hireDate: formatDate(new Date(), 'YYYY-MM-DD')
|
hireDate: formatDate(new Date(), 'YYYY-MM-DD'),
|
||||||
|
isNewUserConfirm: false,
|
||||||
|
wxAlias: ''
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getDDId() {
|
||||||
|
try {
|
||||||
|
if (!formData.value.ddPhone) {
|
||||||
|
formData.value.dingUserId = undefined
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const data = await UserApi.getDDIdByPhone({ mobile: formData.value.ddPhone })
|
||||||
|
formData.value.dingUserId = data
|
||||||
|
} finally {
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="20" :xs="24">
|
<el-col :span="20" :xs="24">
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<el-form :model="queryParams" ref="queryFormRef" inline label-width="68px">
|
<el-form :model="queryParams" ref="queryFormRef" inline label-width="0">
|
||||||
<el-form-item label="姓名" prop="nickname">
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.nickname"
|
v-model="queryParams.nickname"
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机号码" prop="mobile">
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.mobile"
|
v-model="queryParams.mobile"
|
||||||
placeholder="请输入手机号码"
|
placeholder="请输入手机号码"
|
||||||
@@ -25,6 +25,12 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-radio-group v-model="queryParams.status" @change="handleQuery">
|
||||||
|
<el-radio :label="0"> 启用 </el-radio>
|
||||||
|
<el-radio :label="1"> 禁用 </el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery" v-hasPermi="['basic:employee:search']">搜索</el-button>
|
<el-button @click="handleQuery" v-hasPermi="['basic:employee:search']">搜索</el-button>
|
||||||
<el-button @click="resetQuery" v-hasPermi="['basic:employee:reset']">重置</el-button>
|
<el-button @click="resetQuery" v-hasPermi="['basic:employee:reset']">重置</el-button>
|
||||||
@@ -39,29 +45,45 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="用户编号" key="id" prop="id" />
|
<el-table-column label="用户编号" key="id" prop="id" width="100" />
|
||||||
<el-table-column label="登录账号" prop="username" />
|
<el-table-column label="登录账号" prop="username" />
|
||||||
<el-table-column label="用户姓名" prop="nickname" />
|
<el-table-column label="用户姓名" prop="nickname" />
|
||||||
<el-table-column label="部门" key="deptName" prop="deptName" />
|
<el-table-column label="部门" key="deptName" prop="deptName" width="100" />
|
||||||
<el-table-column label="手机号码" prop="mobile" width="120" />
|
<el-table-column label="手机号码" prop="mobile" width="120" />
|
||||||
<el-table-column label="状态" key="status">
|
<el-table-column label="微信号" prop="wxAlias" min-width="80" />
|
||||||
|
<el-table-column label="钉钉号" prop="dingUserId" min-width="80" />
|
||||||
|
<el-table-column label="在职状态" key="hireStatus" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.hireStatus"
|
||||||
:active-value="0"
|
:active-value="0"
|
||||||
:inactive-value="1"
|
:inactive-value="1"
|
||||||
|
active-text="在职"
|
||||||
|
inactive-text="离职"
|
||||||
|
size="small"
|
||||||
v-hasPermi="['basic:employee:update']"
|
v-hasPermi="['basic:employee:update']"
|
||||||
@change="handleStatusChange(scope.row)"
|
@change="handleStatusChange(scope.row)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="启用状态" key="status" width="120">
|
||||||
label="创建时间"
|
<template #default="scope">
|
||||||
prop="createTime"
|
<el-switch
|
||||||
width="180"
|
v-model="scope.row.status"
|
||||||
:formatter="dateFormatter"
|
:active-value="0"
|
||||||
/>
|
:inactive-value="1"
|
||||||
<el-table-column label="操作" width="260">
|
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">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -114,13 +136,14 @@ const { t } = useI18n() // 国际化
|
|||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
const list = ref([]) // 列表的数
|
const list = ref([]) // 列表的数
|
||||||
const queryParams = reactive({
|
const queryParams = ref({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
username: undefined,
|
username: undefined,
|
||||||
nickname: undefined,
|
nickname: undefined,
|
||||||
mobile: undefined,
|
mobile: undefined,
|
||||||
deptId: undefined
|
deptId: undefined,
|
||||||
|
status: undefined
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
||||||
@@ -128,7 +151,7 @@ const queryFormRef = ref() // 搜索的表单
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await UserApi.getUserPage(queryParams)
|
const data = await UserApi.getUserPage(queryParams.value)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
@@ -138,19 +161,28 @@ const getList = async () => {
|
|||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.pageNo = 1
|
queryParams.value.pageNo = 1
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
queryFormRef.value?.resetFields()
|
queryFormRef.value?.resetFields()
|
||||||
|
queryParams.value = {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
username: undefined,
|
||||||
|
nickname: undefined,
|
||||||
|
mobile: undefined,
|
||||||
|
deptId: undefined,
|
||||||
|
status: undefined
|
||||||
|
}
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理部门被点击 */
|
/** 处理部门被点击 */
|
||||||
const handleDeptNodeClick = async (row) => {
|
const handleDeptNodeClick = async (row) => {
|
||||||
queryParams.deptId = row.id
|
queryParams.value.deptId = row.id
|
||||||
await getList()
|
await getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,14 +192,49 @@ const openForm = (type: string, id?: number) => {
|
|||||||
formRef.value.open(type, id)
|
formRef.value.open(type, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改用户状态 */
|
/** 修改在职状态 */
|
||||||
const handleStatusChange = async (row: UserApi.UserVO) => {
|
const handleStatusChange = async (row: UserApi.UserVO) => {
|
||||||
try {
|
try {
|
||||||
// 修改状态的二次确认
|
// 修改状态的二次确认
|
||||||
const text = row.status === CommonStatusEnum.ENABLE ? '启用' : '停用'
|
const text = row.hireStatus === CommonStatusEnum.ENABLE ? '入职' : '离职'
|
||||||
await message.confirm('确认要"' + text + '""' + row.username + '"用户吗?')
|
let result = { value: '' }
|
||||||
|
if (text == '入职') {
|
||||||
|
await message.confirm('确认要"' + text + '""' + row.nickname + '"吗?')
|
||||||
|
} else {
|
||||||
|
result = await message.prompt(
|
||||||
|
'请输入年月日,如2024-01-01',
|
||||||
|
'确认要"' + text + '""' + row.nickname + '"用户吗?'
|
||||||
|
)
|
||||||
|
const regex = /^\d{4}-\d{2}-\d{2}$/
|
||||||
|
|
||||||
|
if (!regex.test(result.value)) {
|
||||||
|
message.error('请输入离职日期')
|
||||||
|
throw new Error()
|
||||||
|
}
|
||||||
|
}
|
||||||
// 发起修改状态
|
// 发起修改状态
|
||||||
await UserApi.updateUserStatus(row.id, row.status)
|
await UserApi.updateUserStatus(row.id, row.status, result.value, row.hireStatus)
|
||||||
|
message.success('修改成功')
|
||||||
|
// 刷新列表
|
||||||
|
await getList()
|
||||||
|
} catch {
|
||||||
|
// 取消后,进行恢复按钮
|
||||||
|
row.hireStatus =
|
||||||
|
row.hireStatus === CommonStatusEnum.ENABLE
|
||||||
|
? CommonStatusEnum.DISABLE
|
||||||
|
: CommonStatusEnum.ENABLE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改启用状态
|
||||||
|
const handleUseChange = async (row: UserApi.UserVO) => {
|
||||||
|
try {
|
||||||
|
// 修改状态的二次确认
|
||||||
|
const text = row.status === CommonStatusEnum.ENABLE ? '启用' : '禁用'
|
||||||
|
await message.confirm('确认要"' + text + '""' + row.nickname + '"吗?')
|
||||||
|
// 发起修改状态
|
||||||
|
await UserApi.updateUserStatus(row.id, row.status, row.retireDate, row.hireStatus)
|
||||||
|
message.success('修改成功')
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await getList()
|
await getList()
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
7
src/views/Basic/WxRobot/Record.vue
Normal file
7
src/views/Basic/WxRobot/Record.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<div> record </div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="WXRecord"></script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
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>
|
<template>
|
||||||
<el-tabs v-model="tabIndex" type="border-card">
|
<el-tabs v-model="tabIndex" type="border-card">
|
||||||
<el-tab-pane label="微信消息记录" :name="0">
|
<!-- <el-tab-pane label="微信消息记录" :name="0">
|
||||||
<!-- 搜索工作栏 -->
|
<Record />
|
||||||
<Search
|
</el-tab-pane> -->
|
||||||
:schema="allSchemas.searchSchema"
|
<el-tab-pane label="消息配置" :name="1">
|
||||||
labelWidth="0"
|
<Setting />
|
||||||
@search="setSearchParams"
|
|
||||||
@reset="setSearchParams"
|
|
||||||
/>
|
|
||||||
<!-- 列表 -->
|
|
||||||
<SSTable
|
|
||||||
class="mt-20px"
|
|
||||||
v-model:tableObject="tableObject"
|
|
||||||
:tableColumns="allSchemas.tableColumns"
|
|
||||||
@get-list="getTableList"
|
|
||||||
>
|
|
||||||
<el-table-column
|
|
||||||
v-for="item in allSchemas.tableColumns"
|
|
||||||
:key="item.field"
|
|
||||||
:prop="item.field"
|
|
||||||
:label="item.label"
|
|
||||||
:fixed="item.fixed"
|
|
||||||
min-width="150px"
|
|
||||||
showOverflowTooltip
|
|
||||||
/>
|
|
||||||
<el-table-column label="操作" width="150px" fixed="right">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-button type="primary" link @click="sendMsg(row)">再次发送</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</SSTable>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup name="WXBoot">
|
||||||
import { allSchemas } from './index.data.js'
|
// import Record from './Record.vue'
|
||||||
|
import Setting from './Setting.vue'
|
||||||
|
|
||||||
const tabIndex = ref(0)
|
const tabIndex = ref(1)
|
||||||
|
|
||||||
const tableObject = ref({
|
|
||||||
tableList: [],
|
|
||||||
loading: false,
|
|
||||||
total: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
currentPage: 1
|
|
||||||
})
|
|
||||||
|
|
||||||
function setSearchParams() {
|
|
||||||
tableObject.value.tableList = [
|
|
||||||
{
|
|
||||||
sendUser: '测试',
|
|
||||||
content: '您今日有10条待跟进的线索',
|
|
||||||
status: '发送成功',
|
|
||||||
createTime: '2024-04-25 12:00:00'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
function getTableList() {
|
|
||||||
tableObject.value.tableList = [
|
|
||||||
{
|
|
||||||
sendUser: '测试',
|
|
||||||
content: '您今日有10条待跟进的线索',
|
|
||||||
status: '发送成功',
|
|
||||||
createTime: '2024-04-25 12:00:00'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
function sendMsg() {
|
|
||||||
console.log('测试')
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
@@ -1,7 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="searchForm" label-width="0" inline>
|
<el-form :model="searchForm" label-width="0" inline>
|
||||||
<el-form-item>
|
<template v-if="appStore.getAppInfo?.instanceType == 2">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.signOrderId" placeholder="成交单号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.signId" placeholder="子订单号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<el-form-item v-else>
|
||||||
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
|
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -83,6 +91,18 @@
|
|||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
|
<el-form-item>
|
||||||
|
<el-select v-model="searchForm.area" placeholder="选择区域" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in areaOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleSearch" v-hasPermi="['clue:order:after-sale-search']">
|
<el-button @click="handleSearch" v-hasPermi="['clue:order:after-sale-search']">
|
||||||
查询
|
查询
|
||||||
@@ -93,6 +113,20 @@
|
|||||||
<el-button @click="batchAudit" v-hasPermi="['clue:order:after-sale-batch-audit']">
|
<el-button @click="batchAudit" v-hasPermi="['clue:order:after-sale-batch-audit']">
|
||||||
批量审核
|
批量审核
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-upload
|
||||||
|
ref="salaryFile"
|
||||||
|
action="#"
|
||||||
|
:limit="1"
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:show-file-list="false"
|
||||||
|
style="margin-left: 10px; height: 32px"
|
||||||
|
:before-upload="fileBeforeUpload"
|
||||||
|
:http-request="afterSalesUpload"
|
||||||
|
:disabled="uploading"
|
||||||
|
v-hasPermi="['clue:order:after-sale-import']"
|
||||||
|
>
|
||||||
|
<el-button type="primary"> 导入 </el-button>
|
||||||
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@@ -103,9 +137,33 @@
|
|||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" :selectable="(row) => row.state == 1" />
|
<el-table-column type="selection" width="55" :selectable="(row) => row.state == 1" />
|
||||||
<el-table-column prop="signId" label="成交单号" min-width="150px" />
|
<!-- <el-table-column prop="signId" label="成交单号" min-width="150px" /> -->
|
||||||
<el-table-column prop="name" label="线索名称" min-width="200px" />
|
<el-table-column
|
||||||
<el-table-column prop="phone" label="联系方式" min-width="150px" />
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="signId"
|
||||||
|
label="成交单号"
|
||||||
|
min-width="120px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 2"
|
||||||
|
prop="signOrderId"
|
||||||
|
label="成交单号"
|
||||||
|
min-width="120px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 2"
|
||||||
|
prop="signId"
|
||||||
|
label="子订单号"
|
||||||
|
min-width="120px"
|
||||||
|
/>
|
||||||
|
<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="reason" label="售后原因" min-width="150px" />
|
||||||
<el-table-column prop="refundAmount" label="退款金额" min-width="90px" />
|
<el-table-column prop="refundAmount" label="退款金额" min-width="90px" />
|
||||||
<el-table-column prop="percentageDeductAmount" label="提成扣款" min-width="90px" />
|
<el-table-column prop="percentageDeductAmount" label="提成扣款" min-width="90px" />
|
||||||
@@ -183,6 +241,7 @@
|
|||||||
<script setup name="AfterSales">
|
<script setup name="AfterSales">
|
||||||
import * as AfterSaleApi from '@/api/clue/afterSale'
|
import * as AfterSaleApi from '@/api/clue/afterSale'
|
||||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||||
|
import { getAreaSimpleList } from '@/api/school/setting/area'
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
|
||||||
import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue'
|
import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue'
|
||||||
@@ -191,10 +250,13 @@ import DialogBatchAudit from './DialogBatchAudit.vue'
|
|||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
|
import { exportArrayToExcel } from '@/utils/index'
|
||||||
|
|
||||||
const afterSaleAuditDialog = ref()
|
const afterSaleAuditDialog = ref()
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
const appStore = useAppStore()
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const currentUserId = userStore.getUser.id
|
const currentUserId = userStore.getUser.id
|
||||||
@@ -208,6 +270,7 @@ const searchForm = ref({
|
|||||||
createDate: [],
|
createDate: [],
|
||||||
createUser: undefined,
|
createUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
|
signOrderId: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
})
|
})
|
||||||
@@ -232,6 +295,7 @@ function handleReset() {
|
|||||||
createDate: [],
|
createDate: [],
|
||||||
createUser: undefined,
|
createUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
|
signOrderId: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
}
|
}
|
||||||
@@ -284,7 +348,68 @@ function handleAudit(row) {
|
|||||||
afterSaleAuditDialog.value.open(row)
|
afterSaleAuditDialog.value.open(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const fileBeforeUpload = (file) => {
|
||||||
|
let format = '.' + file.name.split('.')[1]
|
||||||
|
if (!['.xls', '.xlsx'].includes(format)) {
|
||||||
|
message.error(`请上传指定格式".xls,.xlsx"文件`)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
let isRightSize = file.size / 1024 / 1024 < 20
|
||||||
|
if (!isRightSize) {
|
||||||
|
message.error('文件大小超过 20MB')
|
||||||
|
}
|
||||||
|
return isRightSize
|
||||||
|
}
|
||||||
|
|
||||||
|
const uploading = ref(false)
|
||||||
|
async function afterSalesUpload(data) {
|
||||||
|
uploading.value = true
|
||||||
|
const fd = new FormData()
|
||||||
|
fd.append('file', data.file)
|
||||||
|
try {
|
||||||
|
const resp = await AfterSaleApi.importAfterSales(fd)
|
||||||
|
debugger
|
||||||
|
if (resp && resp.data && resp.data.length) {
|
||||||
|
const succList = resp.data.filter((item) => item.success)
|
||||||
|
const failList = resp.data.filter((item) => !item.success)
|
||||||
|
let msg = `导入完成!成功 ${succList.length} 条,失败 ${failList.length} 条。`
|
||||||
|
if (failList.length) {
|
||||||
|
// 如果有失败,提示下载失败文件
|
||||||
|
msg += '\n请点击消息下载失败明细进行查看。'
|
||||||
|
}
|
||||||
|
ElNotification({
|
||||||
|
title: '导入结果',
|
||||||
|
message: msg,
|
||||||
|
type: 'info',
|
||||||
|
duration: 0,
|
||||||
|
onClick: () => {
|
||||||
|
if (failList.length) {
|
||||||
|
// 将failList生成文件,使用前端下载
|
||||||
|
exportArrayToExcel(failList, `售后导入失败明细${new Date().getTime()}`, [
|
||||||
|
{ title: '手机号', key: 'phone' },
|
||||||
|
{ title: '售后原因', key: 'reason' },
|
||||||
|
{ title: '退款金额', key: 'refundAmount' },
|
||||||
|
{ title: '提成扣款', key: 'percentageDeductAmount' },
|
||||||
|
{ title: '解决方案', key: 'solution' },
|
||||||
|
{ title: '备注', key: 'remark' },
|
||||||
|
{ title: '失败原因', key: 'message' }
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
uploading.value = false
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const areaOptions = ref([])
|
||||||
function getOptions() {
|
function getOptions() {
|
||||||
|
// 区域
|
||||||
|
getAreaSimpleList().then((data) => {
|
||||||
|
areaOptions.value = data
|
||||||
|
})
|
||||||
getUserOption().then((data) => {
|
getUserOption().then((data) => {
|
||||||
userOptions.value = data
|
userOptions.value = data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-form :model="searchForm" label-width="0" inline>
|
<el-form :model="searchForm" label-width="0" inline>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
|
<el-input v-model="searchForm.signOrderId" placeholder="成交单号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.signId" placeholder="子订单号" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
||||||
@@ -67,7 +70,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableList" border>
|
<el-table v-loading="loading" :data="tableList" border>
|
||||||
<el-table-column prop="signId" label="成交单号" min-width="120px" />
|
<el-table-column prop="signOrderId" label="成交单号" min-width="120px" />
|
||||||
|
<el-table-column prop="signId" label="子订单号" min-width="120px" />
|
||||||
<el-table-column prop="name" label="线索名称" min-width="120px" />
|
<el-table-column prop="name" label="线索名称" min-width="120px" />
|
||||||
<el-table-column prop="phone" label="联系方式" width="120px" />
|
<el-table-column prop="phone" label="联系方式" width="120px" />
|
||||||
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
||||||
@@ -120,6 +124,7 @@ import { dateFormatter } from '@/utils/formatTime'
|
|||||||
|
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
signId: undefined,
|
signId: undefined,
|
||||||
|
signOrderId: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
dealDate: [],
|
dealDate: [],
|
||||||
signUser: undefined,
|
signUser: undefined,
|
||||||
@@ -142,6 +147,7 @@ function handleSearch() {
|
|||||||
function handleReset() {
|
function handleReset() {
|
||||||
searchForm.value = {
|
searchForm.value = {
|
||||||
signId: undefined,
|
signId: undefined,
|
||||||
|
signOrderId: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
dealDate: [],
|
dealDate: [],
|
||||||
signUser: undefined,
|
signUser: undefined,
|
||||||
|
|||||||
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" :value="0">待生产</el-radio>
|
||||||
|
<el-radio :label="1" :value="1">已生产</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" :offset="0">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:autoSize="{ minRows: 3 }"
|
||||||
|
v-model="form.remark"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span>
|
||||||
|
<el-button @click="show = false">取 消</el-button>
|
||||||
|
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="DialogProduct">
|
||||||
|
import { addOrderProduct } from '@/api/clue/sign'
|
||||||
|
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
|
const specsOptions = computed({
|
||||||
|
get() {
|
||||||
|
return (prodId) => {
|
||||||
|
if (prodId) {
|
||||||
|
return prodOptions.value.find((it) => it.productId == prodId).productSpecList
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const show = ref(false)
|
||||||
|
const form = ref({})
|
||||||
|
const rules = {
|
||||||
|
productId: { required: true, message: '成交产品不可为空', trigger: 'change' },
|
||||||
|
specsId: { required: true, message: '产品规格不可为空', trigger: 'change' },
|
||||||
|
signNum: { required: true, message: '成交数量不可为空', trigger: 'blur' }
|
||||||
|
}
|
||||||
|
|
||||||
|
const prodOptions = ref([])
|
||||||
|
|
||||||
|
function open(signId, arr) {
|
||||||
|
prodOptions.value = arr
|
||||||
|
form.value.signId = signId
|
||||||
|
form.value.isProduced = 0
|
||||||
|
show.value = true
|
||||||
|
}
|
||||||
|
defineExpose({ open })
|
||||||
|
|
||||||
|
const emit = defineEmits(['success'])
|
||||||
|
const formRef = ref()
|
||||||
|
const formLoading = ref(false)
|
||||||
|
async function handleSave() {
|
||||||
|
// 校验表单
|
||||||
|
if (!formRef.value) return
|
||||||
|
const valid = await formRef.value.validate()
|
||||||
|
if (!valid) return
|
||||||
|
|
||||||
|
// 提交请求
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
await addOrderProduct(form.value)
|
||||||
|
message.success('新增成功!')
|
||||||
|
show.value = false
|
||||||
|
// 发送操作成功的事件
|
||||||
|
emit('success')
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -45,11 +45,11 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="24" :offset="0">
|
<el-col :span="24" :offset="0" v-if="appStore.getAppInfo?.instanceType == 2">
|
||||||
<el-form-item label="是否退货" prop="isReturns">
|
<el-form-item label="是否退货" prop="isReturns">
|
||||||
<el-radio-group v-model="form.isReturns">
|
<el-radio-group v-model="form.isReturns">
|
||||||
<el-radio :label="true"> 退货 </el-radio>
|
<el-radio :label="true" :value="true"> 退货 </el-radio>
|
||||||
<el-radio :label="false"> 不退货 </el-radio>
|
<el-radio :label="false" :value="false"> 不退货 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -79,7 +79,9 @@
|
|||||||
|
|
||||||
<script setup name="DialogAfterSale">
|
<script setup name="DialogAfterSale">
|
||||||
import { getAfterSalePage, createAfterSale } from '@/api/clue/afterSale'
|
import { getAfterSalePage, createAfterSale } from '@/api/clue/afterSale'
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
|
|
||||||
|
const appStore = useAppStore()
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="状态" prop="state">
|
<el-form-item label="状态" prop="state">
|
||||||
<el-radio-group v-model="formData.state">
|
<el-radio-group v-model="formData.state">
|
||||||
<el-radio :label="3"> 通过 </el-radio>
|
<el-radio :label="3" :value="3"> 通过 </el-radio>
|
||||||
<el-radio :label="4"> 驳回 </el-radio>
|
<el-radio :label="4" :value="4"> 驳回 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="状态" prop="state">
|
<el-form-item label="状态" prop="state">
|
||||||
<el-radio-group v-model="formData.state">
|
<el-radio-group v-model="formData.state">
|
||||||
<el-radio :label="3"> 通过 </el-radio>
|
<el-radio :label="3" :value="3"> 通过 </el-radio>
|
||||||
<el-radio :label="4"> 驳回 </el-radio>
|
<el-radio :label="4" :value="4"> 驳回 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -10,13 +10,13 @@
|
|||||||
<el-col :span="16" :offset="0">
|
<el-col :span="16" :offset="0">
|
||||||
<el-form-item label="发货方式">
|
<el-form-item label="发货方式">
|
||||||
<el-radio-group v-model="form.sendType" :disabled="autoAuditPurchase == 'false'">
|
<el-radio-group v-model="form.sendType" :disabled="autoAuditPurchase == 'false'">
|
||||||
<el-radio :label="1">
|
<el-radio :label="1" :value="1">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
message="必须在进销存的“通用配置-常规配置”中,将 ’采购申请自动通过‘ 设置为“是”"
|
message="必须在进销存的“通用配置-常规配置”中,将 ’采购申请自动通过‘ 设置为“是”"
|
||||||
/>
|
/>
|
||||||
立即采购发货
|
立即采购发货
|
||||||
</el-radio>
|
</el-radio>
|
||||||
<el-radio :label="2"> 使用库存发货 </el-radio>
|
<el-radio :label="2" :value="2"> 使用库存发货 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
<el-select v-model="form.supplier" placeholder="选择供应商" filterable>
|
<el-select v-model="form.supplier" placeholder="选择供应商" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supplierOptions"
|
v-for="item in supplierOptions"
|
||||||
:key="item.value"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.supplierName"
|
||||||
:value="item.value"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -141,15 +141,18 @@
|
|||||||
import { getSimpleWarehouseList, getRemainInventoryList } from '@/api/mall/warehouse'
|
import { getSimpleWarehouseList, getRemainInventoryList } from '@/api/mall/warehouse'
|
||||||
import { createDelivery } from '@/api/clue/delivery'
|
import { createDelivery } from '@/api/clue/delivery'
|
||||||
import { getConfigList } from '@/api/system/set'
|
import { getConfigList } from '@/api/system/set'
|
||||||
import { getDictOptions } from '@/utils/dict'
|
import { getSupplierSimpleList } from '@/api/school/setting/supplier'
|
||||||
import { getExtraFeeSimpleList } from '@/api/clue/extraFee'
|
import { getExtraFeeSimpleList } from '@/api/clue/extraFee'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const warehouseOptions = ref([])
|
const warehouseOptions = ref([])
|
||||||
const extraPayOptions = ref([])
|
const extraPayOptions = ref([])
|
||||||
const supplierOptions = getDictOptions('erp_supplier')
|
const supplierOptions = ref([])
|
||||||
function getOptions() {
|
function getOptions() {
|
||||||
|
getSupplierSimpleList().then((data) => {
|
||||||
|
supplierOptions.value = data
|
||||||
|
})
|
||||||
getSimpleWarehouseList().then((data) => {
|
getSimpleWarehouseList().then((data) => {
|
||||||
warehouseOptions.value = data
|
warehouseOptions.value = data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -74,6 +74,9 @@
|
|||||||
<script setup name="DialogExtraPay">
|
<script setup name="DialogExtraPay">
|
||||||
import { signAddPay, getSignExtraPayList } from '@/api/clue/sign'
|
import { signAddPay, getSignExtraPayList } from '@/api/clue/sign'
|
||||||
import * as ExtraFeeApi from '@/api/clue/extraFee'
|
import * as ExtraFeeApi from '@/api/clue/extraFee'
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
|
|
||||||
|
const appStore = useAppStore()
|
||||||
|
|
||||||
const extraPayOptions = ref([])
|
const extraPayOptions = ref([])
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
@@ -92,13 +95,13 @@ defineExpose({
|
|||||||
const form = ref({})
|
const form = ref({})
|
||||||
function resetForm(id) {
|
function resetForm(id) {
|
||||||
form.value = {
|
form.value = {
|
||||||
signId: id,
|
id: id,
|
||||||
extraPay: []
|
extraPay: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFormList() {
|
function getFormList() {
|
||||||
getSignExtraPayList({ id: form.value.signId }).then((data) => {
|
getSignExtraPayList({ id: form.value.id }).then((data) => {
|
||||||
form.value.extraPay = data.map((it) => ({
|
form.value.extraPay = data.map((it) => ({
|
||||||
...it,
|
...it,
|
||||||
editabled: false
|
editabled: false
|
||||||
@@ -121,10 +124,14 @@ async function onSubmit() {
|
|||||||
// 提交请求
|
// 提交请求
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
const params = {
|
let params = {
|
||||||
signId: form.value.signId,
|
|
||||||
extraPay: form.value.extraPay.filter((it) => it.editabled)
|
extraPay: form.value.extraPay.filter((it) => it.editabled)
|
||||||
}
|
}
|
||||||
|
if (appStore.getAppInfo?.instanceType == 1) {
|
||||||
|
params.signId = form.value.id
|
||||||
|
} else {
|
||||||
|
params.signOrderId = form.value.id
|
||||||
|
}
|
||||||
await signAddPay(params)
|
await signAddPay(params)
|
||||||
message.success('添加额外支出成功!')
|
message.success('添加额外支出成功!')
|
||||||
getFormList()
|
getFormList()
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否结清" prop="isPayoff">
|
<el-form-item label="是否结清" prop="isPayoff">
|
||||||
<el-radio-group v-model="form.isPayoff">
|
<el-radio-group v-model="form.isPayoff">
|
||||||
<el-radio :label="true"> 结清 </el-radio>
|
<el-radio :label="true" :value="true"> 结清 </el-radio>
|
||||||
<el-radio :label="false"> 未结清 </el-radio>
|
<el-radio :label="false" :value="false"> 未结清 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="状态" prop="state">
|
<el-form-item label="状态" prop="state">
|
||||||
<el-radio-group v-model="formData.state">
|
<el-radio-group v-model="formData.state">
|
||||||
<el-radio :label="3"> 通过 </el-radio>
|
<el-radio :label="3" :value="3"> 通过 </el-radio>
|
||||||
<el-radio :label="4"> 驳回 </el-radio>
|
<el-radio :label="4" :value="4"> 驳回 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<el-divider direction="horizontal" content-position="left">
|
<el-divider direction="horizontal" content-position="left">
|
||||||
其他费用<span v-if="extraTotalPrice">,应收:{{ extraTotalPrice }}</span>
|
其他费用<span v-if="extraTotalPrice">,应收:{{ extraTotalPrice }}</span>
|
||||||
</el-divider>
|
</el-divider>
|
||||||
<el-table :data="orderInfo.extraPay" border stripe>
|
<el-table :data="orderInfo.otherPay" border stripe>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column prop="extraPayType" label="费用项" />
|
<el-table-column prop="extraPayType" label="费用项" />
|
||||||
<el-table-column prop="extraPayMoney" label="金额" />
|
<el-table-column prop="extraPayMoney" label="金额" />
|
||||||
@@ -61,14 +61,15 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane
|
<el-tab-pane label="回款记录" name="returnRecord">
|
||||||
label="回款记录"
|
|
||||||
name="returnRecord"
|
|
||||||
v-if="checkPermi(['clue:order:return-list'])"
|
|
||||||
>
|
|
||||||
<el-table :data="returnRecordList" border stripe>
|
<el-table :data="returnRecordList" border stripe>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column prop="money" label="回款金额" />
|
<el-table-column
|
||||||
|
v-if="checkPermi(['clue:order:return-list'])"
|
||||||
|
prop="money"
|
||||||
|
label="回款金额"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="personProfit" label="员工利润" />
|
||||||
<el-table-column prop="applyTime" label="申请日期" />
|
<el-table-column prop="applyTime" label="申请日期" />
|
||||||
<el-table-column prop="isPayoff" label="是否结清" />
|
<el-table-column prop="isPayoff" label="是否结清" />
|
||||||
<el-table-column prop="stateName" label="审核状态" />
|
<el-table-column prop="stateName" label="审核状态" />
|
||||||
@@ -109,7 +110,8 @@ const show = ref(false)
|
|||||||
const clueInfo = ref({})
|
const clueInfo = ref({})
|
||||||
const orderInfo = ref({
|
const orderInfo = ref({
|
||||||
signProducts: [],
|
signProducts: [],
|
||||||
extraPay: []
|
extraPay: [],
|
||||||
|
otherPay: []
|
||||||
})
|
})
|
||||||
const returnRecordList = ref([])
|
const returnRecordList = ref([])
|
||||||
const aftersaleList = ref([])
|
const aftersaleList = ref([])
|
||||||
@@ -126,7 +128,7 @@ const prodTotalPrice = computed(() => {
|
|||||||
|
|
||||||
// 其他费用
|
// 其他费用
|
||||||
const extraTotalPrice = computed(() => {
|
const extraTotalPrice = computed(() => {
|
||||||
return orderInfo.value.extraPay.reduce((pre, cur) => pre + cur.extraPayMoney, 0)
|
return orderInfo.value.otherPay?.reduce((pre, cur) => pre + cur.extraPayMoney, 0)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 额外支出
|
// 额外支出
|
||||||
@@ -191,13 +193,20 @@ function getFields() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
getOrderFieldList().then((data) => {
|
getOrderFieldList().then((data) => {
|
||||||
const arr = useCrudSchemas(data).allSchemas.detailSchema
|
const list = useCrudSchemas(data).allSchemas.detailSchema
|
||||||
arr.forEach((it) => {
|
const arr = []
|
||||||
|
list.forEach((it) => {
|
||||||
if (it.label.includes('日期')) {
|
if (it.label.includes('日期')) {
|
||||||
it.dateFormat = 'YYYY-MM-DD'
|
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) {
|
if (arr.filter((item) => item.span != 2).length % 2 != 0) {
|
||||||
arr.push({})
|
arr.push({})
|
||||||
}
|
}
|
||||||
orderSchema.value = [
|
orderSchema.value = [
|
||||||
|
|||||||
133
src/views/Clue/Order/Comp/DialogOrderProduct.vue
Normal file
133
src/views/Clue/Order/Comp/DialogOrderProduct.vue
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog title="成交商品" v-model="show" width="80%">
|
||||||
|
<el-table :data="orderProductList" border stripe>
|
||||||
|
<el-table-column prop="productName" label="成交产品" />
|
||||||
|
<el-table-column prop="specsName" label="产品规格" />
|
||||||
|
<el-table-column prop="signNum" label="成交数量" width="100px" />
|
||||||
|
<el-table-column prop="remark" label="产品备注" />
|
||||||
|
<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="待生产"
|
||||||
|
v-if="checkPermi(['clue:order:update-produce'])"
|
||||||
|
size="small"
|
||||||
|
@change="handleChangeProdoce(scope.row)"
|
||||||
|
/>
|
||||||
|
<div v-else>{{ scope.row.isProducedDesc }}</div>
|
||||||
|
</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="发货备注">
|
||||||
|
<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>
|
||||||
|
<DialogDelivery ref="deliveryDialog" @success="getList" />
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import * as SignApi from '@/api/clue/sign'
|
||||||
|
import { checkPermi } from '@/utils/permission'
|
||||||
|
import DialogDelivery from './DialogDelivery.vue'
|
||||||
|
|
||||||
|
const show = ref(false)
|
||||||
|
const orderProductList = ref([])
|
||||||
|
const orderId = ref(null)
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
|
function open(signId) {
|
||||||
|
try {
|
||||||
|
show.value = true
|
||||||
|
orderId.value = signId
|
||||||
|
getList()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getList() {
|
||||||
|
try {
|
||||||
|
SignApi.getOrderProductList({ signId: orderId.value }).then((data) => {
|
||||||
|
orderProductList.value = data || []
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 deliveryDialog = ref()
|
||||||
|
function handleDelivery(row) {
|
||||||
|
deliveryDialog.value.open(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -2,46 +2,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<div>
|
<div>
|
||||||
<el-form
|
|
||||||
:model="searchForm"
|
|
||||||
ref="moreSearchRef"
|
|
||||||
inline
|
|
||||||
label-width="0"
|
|
||||||
style="display: inline"
|
|
||||||
>
|
|
||||||
<el-form-item style="margin-bottom: 10px">
|
|
||||||
<el-select
|
|
||||||
v-model="searchForm.signProduct"
|
|
||||||
placeholder="选择成交产品"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
@change="searchForm.specsId = undefined"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in prodOptions"
|
|
||||||
:key="item.productId"
|
|
||||||
:label="item.productName"
|
|
||||||
:value="item.productId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item style="margin-bottom: 10px">
|
|
||||||
<el-select
|
|
||||||
v-model="searchForm.specsId"
|
|
||||||
placeholder="选择规格"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
:disabled="!searchForm.signProduct"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in specsOptions(searchForm.signProduct)"
|
|
||||||
:key="item.specsId"
|
|
||||||
:label="item.specsName"
|
|
||||||
:value="item.specsId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<Search
|
<Search
|
||||||
v-if="!loading"
|
v-if="!loading"
|
||||||
ref="searchRef"
|
ref="searchRef"
|
||||||
@@ -67,90 +27,98 @@
|
|||||||
v-if="!loading"
|
v-if="!loading"
|
||||||
class="mt-10px"
|
class="mt-10px"
|
||||||
v-model:tableObject="tableObject"
|
v-model:tableObject="tableObject"
|
||||||
:tableColumns="allSchemas.tableColumns"
|
:tableColumns="allSchemas.tableColumns.filter((it) => it.paramLevel == 1)"
|
||||||
rowkey="signId"
|
rowkey="signOrderId"
|
||||||
:expandRowKeys="expendRows"
|
:expandRowKeys="expendRows"
|
||||||
|
:showSummary="true"
|
||||||
|
:summaryMethod="summaryMethod"
|
||||||
@get-list="getTableList"
|
@get-list="getTableList"
|
||||||
@get-checked-columns="getCheckedColumns"
|
@get-checked-columns="getCheckedColumns"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="60" />
|
<el-table-column type="selection" width="60" fixed="left" />
|
||||||
<el-table-column type="expand">
|
<el-table-column type="expand" fixed="left">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="p-10px flex justify-center">
|
<div class="p-10px flex justify-center">
|
||||||
<VueDraggable
|
<el-table :data="row.childrenOrder" row-key="signId" stripe>
|
||||||
target="tbody"
|
<el-table-column
|
||||||
v-model="row.signProducts"
|
:prop="item.field"
|
||||||
:animation="150"
|
:label="item.label"
|
||||||
@end="onDragEnd"
|
v-for="item in allSchemas.tableColumns.filter((it) => it.paramLevel == 2)"
|
||||||
style="width: 100%"
|
:key="item.id"
|
||||||
>
|
width="100px"
|
||||||
<el-table
|
|
||||||
:data="row.signProducts"
|
|
||||||
row-key="id"
|
|
||||||
stripe
|
|
||||||
style="width: 80%; margin: 0 auto"
|
|
||||||
>
|
>
|
||||||
<el-table-column prop="productName" label="成交产品" />
|
<template #default="scope">
|
||||||
<el-table-column prop="specsName" label="产品规格" />
|
<el-popover
|
||||||
<el-table-column prop="signNum" label="成交数量" width="90px" />
|
v-if="item.field == 'remark' || item.form?.component == 'Editor'"
|
||||||
<el-table-column prop="remark" label="成交备注" width="100px" />
|
trigger="hover"
|
||||||
<el-table-column label="生产状态" width="160px">
|
placement="top"
|
||||||
<template #default="scope">
|
>
|
||||||
<el-switch
|
<div v-dompurify-html="scope.row.remark"></div>
|
||||||
v-model="scope.row.isProduced"
|
<template #reference>
|
||||||
:active-value="true"
|
<el-button type="primary" link>查看</el-button>
|
||||||
:inactive-value="false"
|
</template>
|
||||||
active-text="已生产"
|
</el-popover>
|
||||||
inactive-text="待生产"
|
<div v-else>
|
||||||
:disabled="!checkPermi(['clue:order:update-produce'])"
|
<span v-if="item.isCustom">{{ scope.row.diyParams[item.field] }}</span>
|
||||||
size="small"
|
<span v-else>{{ scope.row[item.field] }}</span>
|
||||||
@change="handleChangeProdoce(scope.row)"
|
</div>
|
||||||
/>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="操作" width="260px" fixed="right">
|
||||||
<el-table-column label="发货状态" prop="sendState" width="90px">
|
<template #default="scope">
|
||||||
<template #default="scope">
|
<el-button
|
||||||
<el-tag
|
type="primary"
|
||||||
:type="scope.row.sendState == '待发货' ? 'danger' : 'success'"
|
class="mr-10px"
|
||||||
size="small"
|
link
|
||||||
>
|
style="padding: 0; margin-left: 0"
|
||||||
{{ scope.row.sendState }}
|
@click="openProduct(scope.row)"
|
||||||
</el-tag>
|
>
|
||||||
</template>
|
成交商品
|
||||||
</el-table-column>
|
</el-button>
|
||||||
<el-table-column label="发货备注" width="100px">
|
<el-button
|
||||||
<template #default="scope">
|
type="primary"
|
||||||
<el-popover
|
class="mr-10px"
|
||||||
placement="top"
|
link
|
||||||
width="500px"
|
style="padding: 0; margin-left: 0"
|
||||||
trigger="click"
|
v-hasPermi="['clue:order:after-sale']"
|
||||||
v-if="scope.row.warehouseName && scope.row.sendRemark"
|
@click="sellAfter(scope.row)"
|
||||||
>
|
>
|
||||||
<template #reference>
|
售后
|
||||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
</el-button>
|
||||||
</template>
|
<el-button
|
||||||
<div v-dompurify-html="scope.row.sendRemark"></div>
|
type="primary"
|
||||||
</el-popover>
|
class="mr-10px"
|
||||||
</template>
|
link
|
||||||
</el-table-column>
|
style="padding: 0; margin-left: 0"
|
||||||
<el-table-column label="操作" width="100px">
|
v-hasPermi="['clue:order:return']"
|
||||||
<template #default="scope">
|
@click="feeBack(scope.row)"
|
||||||
<el-button
|
>
|
||||||
type="primary"
|
回款
|
||||||
class="mr-10px"
|
</el-button>
|
||||||
link
|
<el-button
|
||||||
:disabled="scope.row.sendState == '已发货'"
|
type="primary"
|
||||||
style="padding: 0; margin-left: 0"
|
class="mr-10px"
|
||||||
v-hasPermi="['clue:order:send']"
|
link
|
||||||
@click="handleDelivery(scope.row)"
|
style="padding: 0; margin-left: 0"
|
||||||
>
|
v-hasPermi="['clue:pool:enroll']"
|
||||||
发货
|
@click="cancelDeal(scope.row)"
|
||||||
</el-button>
|
>
|
||||||
</template>
|
取消登记
|
||||||
</el-table-column>
|
</el-button>
|
||||||
</el-table>
|
<el-button
|
||||||
</VueDraggable>
|
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>
|
||||||
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -165,7 +133,7 @@
|
|||||||
<div v-if="item.field == 'remark' || item.form?.component == 'Editor'">
|
<div v-if="item.field == 'remark' || item.form?.component == 'Editor'">
|
||||||
<el-popover placement="top" width="500px" trigger="click" v-if="row[item.field]">
|
<el-popover placement="top" width="500px" trigger="click" v-if="row[item.field]">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
<el-button type="primary" style="padding: 0" link>点击查看</el-button>
|
||||||
</template>
|
</template>
|
||||||
<div v-dompurify-html="row[item.field]"></div>
|
<div v-dompurify-html="row[item.field]"></div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
@@ -175,39 +143,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="240px" fixed="right">
|
<el-table-column label="操作" width="120px" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
class="mr-10px"
|
|
||||||
link
|
|
||||||
style="padding: 0; margin-left: 0"
|
|
||||||
v-hasPermi="['clue:order:detail']"
|
|
||||||
@click="handleDetail(scope.row)"
|
|
||||||
>
|
|
||||||
详情
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
class="mr-10px"
|
|
||||||
link
|
|
||||||
style="padding: 0; margin-left: 0"
|
|
||||||
v-hasPermi="['clue:order:after-sale']"
|
|
||||||
@click="sellAfter(scope.row)"
|
|
||||||
>
|
|
||||||
售后
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
class="mr-10px"
|
|
||||||
link
|
|
||||||
style="padding: 0; margin-left: 0"
|
|
||||||
v-if="scope.row.isPayoff == '未结清'"
|
|
||||||
v-hasPermi="['clue:order:return']"
|
|
||||||
@click="feeBack(scope.row)"
|
|
||||||
>
|
|
||||||
回款
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
class="mr-10px"
|
class="mr-10px"
|
||||||
@@ -218,46 +155,34 @@
|
|||||||
>
|
>
|
||||||
添加支出
|
添加支出
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
class="mr-10px"
|
|
||||||
link
|
|
||||||
style="padding: 0; margin-left: 0"
|
|
||||||
v-hasPermi="['clue:pool:enroll']"
|
|
||||||
@click="cancelDeal(scope.row)"
|
|
||||||
>
|
|
||||||
取消登记
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</SSTable>
|
</SSTable>
|
||||||
|
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<DialogOrder ref="orderDetailDialog" />
|
|
||||||
<DialogFeeback ref="feedbackDialog" />
|
<DialogFeeback ref="feedbackDialog" />
|
||||||
<DialogAfterSale ref="afterSaleDialog" />
|
<DialogAfterSale ref="afterSaleDialog" />
|
||||||
<DialogExtraFee ref="extraFeeDialog" />
|
<DialogExtraFee ref="extraFeeDialog" />
|
||||||
<DialogDelivery ref="deliveryDialog" @success="getTableList" />
|
<DialogAddProduct ref="addProductDialog" @success="getTableList" />
|
||||||
|
<DialogOrderProduct ref="orderProductDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="ClueOrderList">
|
<script setup name="ClueOrderList">
|
||||||
import { getSimpleFieldList } from '@/api/clue/orderField'
|
import { getSimpleFieldList } from '@/api/clue/orderField'
|
||||||
import * as SignApi from '@/api/clue/sign'
|
import * as SignApi from '@/api/clue/sign'
|
||||||
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
|
||||||
import { getSimpleProductList } from '@/api/mall/product'
|
import { getSimpleProductList } from '@/api/mall/product'
|
||||||
|
import { getSimpleUserList as getUserOption, getAllUserListWithHire } from '@/api/system/user'
|
||||||
|
|
||||||
import DialogOrder from './DialogOrder.vue'
|
|
||||||
import DialogFeeback from './DialogFeeback.vue'
|
import DialogFeeback from './DialogFeeback.vue'
|
||||||
import DialogAfterSale from './DialogAfterSale.vue'
|
import DialogAfterSale from './DialogAfterSale.vue'
|
||||||
import DialogExtraFee from './DialogExtraPay.vue'
|
import DialogExtraFee from './DialogExtraPay.vue'
|
||||||
import DialogDelivery from './DialogDelivery.vue'
|
import DialogAddProduct from './DialogAddProduct.vue'
|
||||||
|
import DialogOrderProduct from './DialogOrderProduct.vue'
|
||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import { ElMessageBox, ElOption, ElSelect } from 'element-plus'
|
import { ElMessageBox, ElOption, ElSelect } from 'element-plus'
|
||||||
import { VueDraggable } from 'vue-draggable-plus'
|
|
||||||
import { checkPermi } from '@/utils/permission'
|
|
||||||
|
|
||||||
const userOptions = ref([])
|
const userOptions = ref([])
|
||||||
const allUserOptions = ref([])
|
const allUserOptions = ref([])
|
||||||
@@ -269,20 +194,7 @@ const message = useMessage() // 消息弹窗
|
|||||||
|
|
||||||
const allSchemas = ref({})
|
const allSchemas = ref({})
|
||||||
|
|
||||||
const orderDetailDialog = ref()
|
|
||||||
const searchRef = ref()
|
const searchRef = ref()
|
||||||
const prodOptions = ref([])
|
|
||||||
|
|
||||||
const specsOptions = computed({
|
|
||||||
get() {
|
|
||||||
return (prodId) => {
|
|
||||||
if (prodId) {
|
|
||||||
return prodOptions.value.find((it) => it.productId == prodId).productSpecList
|
|
||||||
}
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
signProduct: undefined
|
signProduct: undefined
|
||||||
@@ -293,7 +205,12 @@ const tableObject = ref({
|
|||||||
loading: false,
|
loading: false,
|
||||||
total: 1,
|
total: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
pageNo: 1
|
pageNo: 1,
|
||||||
|
totalData: {
|
||||||
|
totalReceivedMoney: 0,
|
||||||
|
totalSignPrice: 0,
|
||||||
|
totalPayAmount: 0
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
@@ -314,29 +231,44 @@ async function getTableList() {
|
|||||||
...queryParams,
|
...queryParams,
|
||||||
...searchForm.value,
|
...searchForm.value,
|
||||||
pageNo: tableObject.value.pageNo,
|
pageNo: tableObject.value.pageNo,
|
||||||
pageSize: tableObject.value.pageSize
|
pageSize: tableObject.value.pageSize,
|
||||||
|
diyParams: {}
|
||||||
}
|
}
|
||||||
|
searchFieldList.value.map((it) => {
|
||||||
|
if (params[it.field]) {
|
||||||
|
params.diyParams[it.field] = params[it.field]
|
||||||
|
}
|
||||||
|
})
|
||||||
const data = await SignApi.getSignPage(removeNullField(params))
|
const data = await SignApi.getSignPage(removeNullField(params))
|
||||||
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams }))
|
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.orderDiyParams }))
|
||||||
tableObject.value.total = data.total
|
tableObject.value.total = data.total
|
||||||
|
tableObject.value.totalData = data.totalData
|
||||||
} finally {
|
} finally {
|
||||||
tableObject.value.loading = false
|
tableObject.value.loading = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
|
const searchFieldList = ref([])
|
||||||
async function getCurdSchemas() {
|
async function getCurdSchemas() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await getSimpleFieldList()
|
const data = await getSimpleFieldList()
|
||||||
|
searchFieldList.value = data.filter((it) => it.isCustom && it.isSearch)
|
||||||
|
// const mainOrderFields = data.filter((it) => it.paramLevel == 1)
|
||||||
data.forEach((elem) => {
|
data.forEach((elem) => {
|
||||||
if (['createUser'].includes(elem.field)) {
|
if (elem.isSearch) {
|
||||||
elem.search.options = userOptions.value
|
// if (['createUser'].includes(elem.field)) {
|
||||||
} else if (['convertPeople', 'receiver'].includes(elem.field)) {
|
// elem.search.options = userOptions.value
|
||||||
elem.search.options = allUserOptions.value
|
// } else
|
||||||
|
if (['convertPeople', 'receiver', 'createUser'].includes(elem.field)) {
|
||||||
|
elem.search.options = allUserOptions.value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
allSchemas.value = useCrudSchemas(data).allSchemas
|
allSchemas.value = useCrudSchemas(data).allSchemas
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -349,12 +281,8 @@ const showColumns = ref([])
|
|||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
function getCheckedColumns(list) {
|
function getCheckedColumns(list) {
|
||||||
showColumns.value = list && list.length ? list : allSchemas.value.tableColumns
|
showColumns.value =
|
||||||
}
|
list && list.length ? list : allSchemas.value.tableColumns.filter((it) => it.paramLevel == 1)
|
||||||
|
|
||||||
// 详情
|
|
||||||
function handleDetail(row) {
|
|
||||||
orderDetailDialog.value.open(row.clueId, row.signId)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const feedbackDialog = ref()
|
const feedbackDialog = ref()
|
||||||
@@ -386,27 +314,23 @@ async function cancelDeal(row) {
|
|||||||
|
|
||||||
const extraFeeDialog = ref()
|
const extraFeeDialog = ref()
|
||||||
function handleAddFee(row) {
|
function handleAddFee(row) {
|
||||||
extraFeeDialog.value.open(row.signId)
|
extraFeeDialog.value.open(row.signOrderId)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getOptions() {
|
async function getOptions() {
|
||||||
|
userOptions.value = await getUserOption()
|
||||||
|
allUserOptions.value = await getAllUserListWithHire()
|
||||||
|
getCurdSchemas()
|
||||||
|
|
||||||
// 产品
|
// 产品
|
||||||
getSimpleProductList().then((data) => {
|
getSimpleProductList().then((data) => {
|
||||||
prodOptions.value = data
|
prodOptions.value = data
|
||||||
})
|
})
|
||||||
|
|
||||||
userOptions.value = await getUserOption()
|
|
||||||
allUserOptions.value = await getAllUserList()
|
|
||||||
getCurdSchemas()
|
|
||||||
}
|
|
||||||
const deliveryDialog = ref()
|
|
||||||
function handleDelivery(row) {
|
|
||||||
deliveryDialog.value.open(row)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const batchIds = ref([])
|
const batchIds = ref([])
|
||||||
function handleSelectionChange(val) {
|
function handleSelectionChange(val) {
|
||||||
batchIds.value = val.map((it) => it.signId)
|
batchIds.value = val.map((it) => it.signOrderId)
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectedValue = ref(undefined)
|
const selectedValue = ref(undefined)
|
||||||
@@ -460,38 +384,37 @@ function handleBatchUpdateInstall() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleChangeProdoce(row) {
|
const orderProductDialog = ref()
|
||||||
try {
|
function openProduct(row) {
|
||||||
// 修改状态的二次确认
|
orderProductDialog.value.open(row.signId)
|
||||||
await message.confirm('确认要修改生产状态吗?')
|
}
|
||||||
// 发起修改状态
|
|
||||||
await SignApi.updateProduceStatus({
|
function summaryMethod({ columns }) {
|
||||||
signId: row.signId,
|
const sums = []
|
||||||
id: row.id,
|
columns.forEach((column, index) => {
|
||||||
isProduced: row.isProduced
|
if (index === 0) {
|
||||||
})
|
sums[index] = '合计'
|
||||||
message.success('修改成功')
|
return
|
||||||
// 刷新列表
|
}
|
||||||
getTableList()
|
if (column.property == 'payTotalAmount') {
|
||||||
} catch {
|
sums[index] = tableObject.value.totalData?.totalPayAmount || 0
|
||||||
// 取消后,进行恢复按钮
|
} else if (column.property == 'signTotalPrice') {
|
||||||
row.isProduced = !row.isProduced
|
sums[index] = tableObject.value.totalData?.totalSignPrice || 0
|
||||||
}
|
} else if (column.property == 'receivedMoney') {
|
||||||
|
sums[index] = tableObject.value.totalData?.totalReceivedMoney || 0
|
||||||
|
} else {
|
||||||
|
sums[index] = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return sums
|
||||||
}
|
}
|
||||||
|
|
||||||
const expendRows = ref([])
|
const expendRows = ref([])
|
||||||
async function onDragEnd(ev) {
|
|
||||||
try {
|
const addProductDialog = ref()
|
||||||
expendRows.value = [ev.data.signId]
|
const prodOptions = ref([])
|
||||||
const list = tableObject.value.tableList.find((it) => it.signId == ev.data.signId).signProducts
|
function handleAddProduct(row) {
|
||||||
await SignApi.updateProduceSort(list.map((it) => it.id))
|
addProductDialog.value.open(row.signId, prodOptions.value)
|
||||||
message.success('修改成功')
|
|
||||||
// 刷新列表
|
|
||||||
getTableList()
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
getTableList()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="searchForm" label-width="0" inline>
|
<el-form :model="searchForm" label-width="0" inline>
|
||||||
<el-form-item>
|
<template v-if="appStore.getAppInfo?.instanceType == 2">
|
||||||
<el-input
|
<el-form-item>
|
||||||
v-model="searchForm.signId"
|
<el-input v-model="searchForm.signOrderId" placeholder="成交单号" clearable />
|
||||||
placeholder="成交单号"
|
</el-form-item>
|
||||||
clearable
|
<el-form-item>
|
||||||
style="width: 120px"
|
<el-input v-model="searchForm.signId" placeholder="子订单号" clearable />
|
||||||
/>
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<el-form-item v-else>
|
||||||
|
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable style="width: 120px" />
|
<el-input v-model="searchForm.name" placeholder="线索名称" clearable style="width: 120px" />
|
||||||
@@ -116,16 +119,16 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supplierOptions"
|
v-for="item in supplierOptions"
|
||||||
:key="item.value"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.supplierName"
|
||||||
:value="item.value"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio-group v-model="searchForm.settlementState">
|
<el-radio-group v-model="searchForm.settlementState">
|
||||||
<el-radio :label="1"> 已结算 </el-radio>
|
<el-radio :label="1" :value="1"> 已结算 </el-radio>
|
||||||
<el-radio :label="0"> 待结算 </el-radio>
|
<el-radio :label="0" :value="0"> 待结算 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -152,21 +155,60 @@
|
|||||||
fixed="left"
|
fixed="left"
|
||||||
:selectable="(row) => row.settlementState == '待结算'"
|
:selectable="(row) => row.settlementState == '待结算'"
|
||||||
/>
|
/>
|
||||||
<el-table-column prop="signId" label="成交单号" min-width="120px" />
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="signId"
|
||||||
|
label="成交单号"
|
||||||
|
min-width="120px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 2"
|
||||||
|
prop="signOrderId"
|
||||||
|
label="成交单号"
|
||||||
|
min-width="120px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 2"
|
||||||
|
prop="signId"
|
||||||
|
label="子订单号"
|
||||||
|
min-width="120px"
|
||||||
|
/>
|
||||||
<el-table-column prop="name" label="线索名称" min-width="120px" />
|
<el-table-column prop="name" label="线索名称" min-width="120px" />
|
||||||
<el-table-column prop="phone" label="联系方式" width="120px" />
|
<el-table-column prop="phone" label="联系方式" width="120px" />
|
||||||
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
||||||
<el-table-column prop="dealDate" label="成交日期" width="120px" :formatter="dateFormatter" />
|
<el-table-column prop="dealDate" label="成交日期" width="120px" :formatter="dateFormatter" />
|
||||||
<el-table-column
|
<el-table-column prop="createTime" label="支出日期" width="140px">
|
||||||
prop="createTime"
|
<template #default="{ row, col }">
|
||||||
label="支出日期"
|
<el-date-picker
|
||||||
width="120px"
|
v-if="row.edit"
|
||||||
:formatter="dateFormatter"
|
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="signProduct" label="成交产品" min-width="150px" />
|
||||||
<el-table-column prop="signSpecs" 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="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="settlementNum" label="结算数量" min-width="150px" />
|
||||||
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" />
|
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" />
|
||||||
<el-table-column label="费用备注" width="90px">
|
<el-table-column label="费用备注" width="90px">
|
||||||
@@ -199,6 +241,19 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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>
|
</el-table>
|
||||||
<Pagination
|
<Pagination
|
||||||
v-model:limit="searchForm.pageSize"
|
v-model:limit="searchForm.pageSize"
|
||||||
@@ -211,6 +266,16 @@
|
|||||||
<el-form-item label="结算金额">
|
<el-form-item label="结算金额">
|
||||||
{{ settleAmount }}
|
{{ settleAmount }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="结算日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.settlementDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="结算备注" prop="remark">
|
<el-form-item label="结算备注" prop="remark">
|
||||||
<Editor v-model:modelValue="form.remark" />
|
<Editor v-model:modelValue="form.remark" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -232,11 +297,13 @@ import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
|||||||
import { getSimpleProductList } from '@/api/mall/product'
|
import { getSimpleProductList } from '@/api/mall/product'
|
||||||
import * as SettleApi from '@/api/clue/settle'
|
import * as SettleApi from '@/api/clue/settle'
|
||||||
|
|
||||||
import { getDictOptions } from '@/utils/dict'
|
import { getSupplierSimpleList } from '@/api/school/setting/supplier'
|
||||||
import { removeNullField } from '@/utils/index'
|
import { removeNullField } from '@/utils/index'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
const appStore = useAppStore()
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getOptions()
|
getOptions()
|
||||||
@@ -252,6 +319,7 @@ const searchForm = ref({
|
|||||||
signProduct: undefined,
|
signProduct: undefined,
|
||||||
signSpecs: undefined,
|
signSpecs: undefined,
|
||||||
signId: undefined,
|
signId: undefined,
|
||||||
|
signOrderId: undefined,
|
||||||
settlementState: 0,
|
settlementState: 0,
|
||||||
settlementType: undefined,
|
settlementType: undefined,
|
||||||
supplier: undefined,
|
supplier: undefined,
|
||||||
@@ -269,6 +337,7 @@ function handleReset() {
|
|||||||
signProduct: undefined,
|
signProduct: undefined,
|
||||||
signSpecs: undefined,
|
signSpecs: undefined,
|
||||||
signId: undefined,
|
signId: undefined,
|
||||||
|
signOrderId: undefined,
|
||||||
settlementState: 0,
|
settlementState: 0,
|
||||||
settlementType: undefined,
|
settlementType: undefined,
|
||||||
supplier: undefined,
|
supplier: undefined,
|
||||||
@@ -318,6 +387,28 @@ function getSummaries(param) {
|
|||||||
return sums
|
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([])
|
const selectList = ref([])
|
||||||
function handleSelectionChange(val) {
|
function handleSelectionChange(val) {
|
||||||
selectList.value = [...val]
|
selectList.value = [...val]
|
||||||
@@ -337,6 +428,7 @@ function batchSettle() {
|
|||||||
showDailog.value = true
|
showDailog.value = true
|
||||||
form.value = {
|
form.value = {
|
||||||
settlementIds: selectList.value.map((it) => it.settlementId),
|
settlementIds: selectList.value.map((it) => it.settlementId),
|
||||||
|
settlementDate: formatDate(new Date(), 'YYYY-MM-DD'),
|
||||||
reamrk: undefined
|
reamrk: undefined
|
||||||
}
|
}
|
||||||
settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0)
|
settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0)
|
||||||
@@ -362,9 +454,12 @@ async function handleSaveSettle() {
|
|||||||
|
|
||||||
const userOptions = ref([])
|
const userOptions = ref([])
|
||||||
const prodOptions = ref([])
|
const prodOptions = ref([])
|
||||||
const supplierOptions = getDictOptions('erp_supplier')
|
const supplierOptions = ref([])
|
||||||
|
|
||||||
function getOptions() {
|
function getOptions() {
|
||||||
|
getSupplierSimpleList().then((data) => {
|
||||||
|
supplierOptions.value = data
|
||||||
|
})
|
||||||
// 产品
|
// 产品
|
||||||
getSimpleProductList().then((data) => {
|
getSimpleProductList().then((data) => {
|
||||||
prodOptions.value = data
|
prodOptions.value = data
|
||||||
|
|||||||
@@ -100,10 +100,20 @@
|
|||||||
<span v-else-if="item.form?.component == 'DatePicker'">
|
<span v-else-if="item.form?.component == 'DatePicker'">
|
||||||
{{ formatDate(row[item.field]) }}
|
{{ formatDate(row[item.field]) }}
|
||||||
</span>
|
</span>
|
||||||
|
<div v-else-if="item.form?.component == 'UploadImg'">
|
||||||
|
<el-image
|
||||||
|
v-if="row[item.field]"
|
||||||
|
:src="row[item.field]"
|
||||||
|
preview-teleported
|
||||||
|
:lazy="true"
|
||||||
|
:preview-src-list="[row[item.field]]"
|
||||||
|
/>
|
||||||
|
<!-- <img v-if="row[item.field]" :src="row[item.field]" style="width: 100%; height: 100%" /> -->
|
||||||
|
</div>
|
||||||
<span v-else>{{ row[item.field] }}</span>
|
<span v-else>{{ row[item.field] }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="240px" fixed="right">
|
<el-table-column label="操作" width="170px" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -150,6 +160,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
class="mr-10px"
|
class="mr-10px"
|
||||||
link
|
link
|
||||||
|
:disabled="scope.row.isCommissioned != '未发放'"
|
||||||
style="padding: 0; margin-left: 0"
|
style="padding: 0; margin-left: 0"
|
||||||
v-hasPermi="['clue:pool:enroll']"
|
v-hasPermi="['clue:pool:enroll']"
|
||||||
@click="cancelDeal(scope.row)"
|
@click="cancelDeal(scope.row)"
|
||||||
@@ -171,7 +182,7 @@
|
|||||||
<script setup name="ClueOrderList">
|
<script setup name="ClueOrderList">
|
||||||
import { getSimpleFieldList } from '@/api/clue/orderField'
|
import { getSimpleFieldList } from '@/api/clue/orderField'
|
||||||
import * as SignApi from '@/api/clue/sign'
|
import * as SignApi from '@/api/clue/sign'
|
||||||
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
import { getAllUserListWithHire } from '@/api/system/user'
|
||||||
import { getPlaceList } from '@/api/school/place'
|
import { getPlaceList } from '@/api/school/place'
|
||||||
import { getClassTypeList } from '@/api/school/class'
|
import { getClassTypeList } from '@/api/school/class'
|
||||||
|
|
||||||
@@ -183,7 +194,7 @@ import DialogExtraFee from './DialogExtraPay.vue'
|
|||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
const userOptions = ref([])
|
// const userOptions = ref([])
|
||||||
const allUserOptions = ref([])
|
const allUserOptions = ref([])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getOptions()
|
getOptions()
|
||||||
@@ -238,8 +249,14 @@ async function getTableList() {
|
|||||||
...queryParams,
|
...queryParams,
|
||||||
...searchForm.value,
|
...searchForm.value,
|
||||||
pageNo: tableObject.value.pageNo,
|
pageNo: tableObject.value.pageNo,
|
||||||
pageSize: tableObject.value.pageSize
|
pageSize: tableObject.value.pageSize,
|
||||||
|
diyParams: {}
|
||||||
}
|
}
|
||||||
|
searchFieldList.value.map((it) => {
|
||||||
|
if (params[it.field]) {
|
||||||
|
params.diyParams[it.field] = params[it.field]
|
||||||
|
}
|
||||||
|
})
|
||||||
const data = await SignApi.getSignPage(removeNullField(params))
|
const data = await SignApi.getSignPage(removeNullField(params))
|
||||||
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams }))
|
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams }))
|
||||||
tableObject.value.total = data.total
|
tableObject.value.total = data.total
|
||||||
@@ -249,14 +266,17 @@ async function getTableList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
|
const searchFieldList = ref([])
|
||||||
async function getCurdSchemas() {
|
async function getCurdSchemas() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await getSimpleFieldList()
|
const data = await getSimpleFieldList()
|
||||||
|
searchFieldList.value = data.filter((it) => it.isCustom && it.isSearch)
|
||||||
data.forEach((elem) => {
|
data.forEach((elem) => {
|
||||||
if (['createUser'].includes(elem.field)) {
|
// if (['createUser'].includes(elem.field)) {
|
||||||
elem.search.options = userOptions.value
|
// elem.search.options = userOptions.value
|
||||||
} else if (['convertPeople', 'receiver'].includes(elem.field)) {
|
// } else
|
||||||
|
if (['convertPeople', 'receiver', 'createUser'].includes(elem.field)) {
|
||||||
elem.search.options = allUserOptions.value
|
elem.search.options = allUserOptions.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -331,12 +351,14 @@ async function getClassTypeOptions() {
|
|||||||
|
|
||||||
async function getOptions() {
|
async function getOptions() {
|
||||||
// 驾校
|
// 驾校
|
||||||
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
|
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true, hasAll: true }).then(
|
||||||
schoolOptions.value = data.schoolList
|
(data) => {
|
||||||
allPlaceOptions.value = data.placeList
|
schoolOptions.value = data.schoolList
|
||||||
})
|
allPlaceOptions.value = data.placeList
|
||||||
userOptions.value = await getUserOption()
|
}
|
||||||
allUserOptions.value = await getAllUserList()
|
)
|
||||||
|
// userOptions.value = await getUserOption()
|
||||||
|
allUserOptions.value = await getAllUserListWithHire()
|
||||||
getCurdSchemas()
|
getCurdSchemas()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
237
src/views/Clue/Order/Comp/OrderRemark.vue
Normal file
237
src/views/Clue/Order/Comp/OrderRemark.vue
Normal file
@@ -0,0 +1,237 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form :model="searchForm" label-width="0" inline>
|
||||||
|
<el-form-item>
|
||||||
|
<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
|
||||||
|
style="width: 100px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.intentionState"
|
||||||
|
placeholder="学员意向"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in intentionOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.followUser"
|
||||||
|
placeholder="跟进人"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 120px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in userOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.remarkDate"
|
||||||
|
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-select
|
||||||
|
v-model="searchForm.schoolId"
|
||||||
|
placeholder="邀约驾校"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 120px"
|
||||||
|
>
|
||||||
|
<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.placeId"
|
||||||
|
placeholder="邀约场地"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 120px"
|
||||||
|
>
|
||||||
|
<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-date-picker
|
||||||
|
v-model="searchForm.signDate"
|
||||||
|
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-select
|
||||||
|
v-model="searchForm.isSign"
|
||||||
|
placeholder="报名状态"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option label="未报名" :value="0" />
|
||||||
|
<el-option label="已报名" :value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.isEnroll"
|
||||||
|
placeholder="登记状态"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option label="未登记" :value="0" />
|
||||||
|
<el-option label="已登记" :value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleSearch">查询</el-button>
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="tableList" border>
|
||||||
|
<el-table-column prop="name" label="学员姓名" width="90px" />
|
||||||
|
<el-table-column prop="phone" label="联系方式" width="110px" />
|
||||||
|
<el-table-column prop="followUserName" label="跟进人" width="90" />
|
||||||
|
<el-table-column prop="intentionStateName" label="学员意向" width="90" />
|
||||||
|
<el-table-column prop="remarkDate" label="报备日期" width="100px" />
|
||||||
|
<el-table-column prop="remarkUserName" label="报备人" width="90px" />
|
||||||
|
<el-table-column prop="remarkContent" label="报备内容" min-width="400px" />
|
||||||
|
<el-table-column prop="schoolName" label="邀约驾校" width="100" />
|
||||||
|
<el-table-column prop="placeName" label="邀约场地" width="100" />
|
||||||
|
<el-table-column prop="signDate" label="报名日期" width="100px" />
|
||||||
|
<el-table-column prop="enterUserName" label="接待人" width="90px" />
|
||||||
|
<el-table-column prop="signInfo" label="报名信息" min-width="150px" />
|
||||||
|
<el-table-column prop="isSign" label="报名状态" width="85px" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag type="success" v-if="row.isSign">已报名</el-tag>
|
||||||
|
<el-tag type="info" v-else>未报名</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="isEnroll" label="登记状态" width="85px" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag type="success" v-if="row.isEnroll">已登记</el-tag>
|
||||||
|
<el-tag type="info" v-else>未登记</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<Pagination
|
||||||
|
v-model:limit="searchForm.pageSize"
|
||||||
|
v-model:page="searchForm.pageNo"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||||
|
import { getClueRemarkPage } from '@/api/clue/clueRemark'
|
||||||
|
import { getPlaceList } from '@/api/school/place'
|
||||||
|
import { getIntDictOptions } from '@/utils/dict'
|
||||||
|
import { removeNullField } from '@/utils/index'
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getOptions()
|
||||||
|
handleSearch()
|
||||||
|
})
|
||||||
|
|
||||||
|
const userOptions = ref([])
|
||||||
|
const schoolOptions = ref([])
|
||||||
|
const placeOptions = ref([])
|
||||||
|
const intentionOptions = getIntDictOptions('intention_state')
|
||||||
|
function getOptions() {
|
||||||
|
getUserOption().then((data) => {
|
||||||
|
userOptions.value = data
|
||||||
|
})
|
||||||
|
|
||||||
|
getPlaceList({
|
||||||
|
placeStatus: 0,
|
||||||
|
schoolStatus: 0,
|
||||||
|
isSearchSchool: true
|
||||||
|
}).then((data) => {
|
||||||
|
schoolOptions.value = data.schoolList
|
||||||
|
placeOptions.value = data.placeList
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const searchForm = ref({
|
||||||
|
name: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
pageSize: 20,
|
||||||
|
pageNo: 1
|
||||||
|
})
|
||||||
|
|
||||||
|
function handleReset() {
|
||||||
|
searchForm.value = {
|
||||||
|
name: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
pageSize: 20,
|
||||||
|
pageNo: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSearch() {
|
||||||
|
searchForm.value.pageNo = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const tableList = ref([])
|
||||||
|
const total = ref(0)
|
||||||
|
|
||||||
|
async function getList() {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
let params = { ...removeNullField(searchForm.value) }
|
||||||
|
const data = await getClueRemarkPage(params)
|
||||||
|
tableList.value = data.list
|
||||||
|
total.value = data.total
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -1,12 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="searchForm" label-width="0" inline>
|
<el-form :model="searchForm" label-width="0" inline>
|
||||||
<el-form-item>
|
<template v-if="appStore.getAppInfo?.instanceType == 2">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.signOrderId" placeholder="成交单号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.signId" placeholder="子订单号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<el-form-item v-else>
|
||||||
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
|
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.mobile" placeholder="联系方式" clearable />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="searchForm.state" placeholder="审核状态" clearable style="width: 120px">
|
<el-select v-model="searchForm.state" placeholder="审核状态" clearable style="width: 120px">
|
||||||
<el-option label="待审核" :value="1" />
|
<el-option label="待审核" :value="1" />
|
||||||
@@ -15,22 +26,93 @@
|
|||||||
<el-option label="已驳回" :value="4" />
|
<el-option label="已驳回" :value="4" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="appStore.getAppInfo?.instanceType == 1">
|
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
<el-select
|
<el-form-item>
|
||||||
v-model="searchForm.receiver"
|
<el-select
|
||||||
placeholder="接待人"
|
v-model="searchForm.receiver"
|
||||||
clearable
|
placeholder="接待人"
|
||||||
filterable
|
clearable
|
||||||
style="width: 120px"
|
filterable
|
||||||
>
|
style="width: 120px"
|
||||||
<el-option
|
>
|
||||||
v-for="item in allUserOptions"
|
<el-option
|
||||||
:key="item.id"
|
v-for="item in allUserOptions"
|
||||||
:label="item.nickname"
|
:key="item.id"
|
||||||
:value="item.id"
|
:label="item.nickname"
|
||||||
/>
|
:value="item.id"
|
||||||
</el-select>
|
/>
|
||||||
</el-form-item>
|
</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-form-item v-else-if="appStore.getAppInfo?.instanceType == 2">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchForm.convertPeople"
|
v-model="searchForm.convertPeople"
|
||||||
@@ -118,6 +200,7 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleSearch" v-hasPermi="['clue:order:return-search']">查询</el-button>
|
<el-button @click="handleSearch" v-hasPermi="['clue:order:return-search']">查询</el-button>
|
||||||
<el-button @click="handleReset" v-hasPermi="['clue:order:return-reset']">重置</el-button>
|
<el-button @click="handleReset" v-hasPermi="['clue:order:return-reset']">重置</el-button>
|
||||||
|
<el-button @click="handleExport" v-hasPermi="['clue:order:return-export']">导出</el-button>
|
||||||
<el-button @click="batchAudit" v-hasPermi="['clue:order:return-batch-audit']">
|
<el-button @click="batchAudit" v-hasPermi="['clue:order:return-batch-audit']">
|
||||||
批量审核
|
批量审核
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -133,8 +216,25 @@
|
|||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="60" :selectable="(row) => row.state == 1" />
|
<el-table-column type="selection" width="60" :selectable="(row) => row.state == 1" />
|
||||||
<el-table-column prop="signId" label="成交单号" min-width="180px" />
|
<el-table-column
|
||||||
<el-table-column prop="name" label="线索名称" width="150px" />
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="signId"
|
||||||
|
label="成交单号"
|
||||||
|
min-width="120px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 2"
|
||||||
|
prop="signOrderId"
|
||||||
|
label="成交单号"
|
||||||
|
min-width="120px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 2"
|
||||||
|
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="phone" label="联系方式" width="120px" />companyProfit
|
||||||
<el-table-column prop="money" label="回款金额" min-width="120px">
|
<el-table-column prop="money" label="回款金额" min-width="120px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -185,7 +285,7 @@
|
|||||||
<div v-else>{{ row.personProfit }}</div>
|
<div v-else>{{ row.personProfit }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="signPrice" label="成交价" min-width="90" />
|
<el-table-column prop="signPrice" label="成交价" min-width="120" />
|
||||||
<el-table-column prop="isPayoff" label="是否结清" min-width="90">
|
<el-table-column prop="isPayoff" label="是否结清" min-width="90">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-select v-if="row.edit" size="small" v-model="row.isPayoffValue">
|
<el-select v-if="row.edit" size="small" v-model="row.isPayoffValue">
|
||||||
@@ -195,6 +295,30 @@
|
|||||||
<div v-else>{{ row.isPayoff }}</div>
|
<div v-else>{{ row.isPayoff }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="signSchool"
|
||||||
|
label="报名驾校"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="signPlace"
|
||||||
|
label="报名场地"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="signClass"
|
||||||
|
label="报名班型"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="licenseType"
|
||||||
|
label="驾照类型"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="appStore.getAppInfo?.instanceType == 1"
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
prop="receiverName"
|
prop="receiverName"
|
||||||
@@ -207,6 +331,12 @@
|
|||||||
label="转化人"
|
label="转化人"
|
||||||
min-width="90"
|
min-width="90"
|
||||||
/>
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
prop="area"
|
||||||
|
label="区域"
|
||||||
|
min-width="90"
|
||||||
|
/>
|
||||||
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="dealDate"
|
prop="dealDate"
|
||||||
@@ -218,9 +348,24 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
prop="applyTime"
|
prop="applyTime"
|
||||||
label="申请时间"
|
label="申请时间"
|
||||||
min-width="120px"
|
min-width="140px"
|
||||||
:formatter="dateFormatter"
|
: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="checkUser" label="审核人" min-width="90" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="checkTime"
|
prop="checkTime"
|
||||||
@@ -229,11 +374,12 @@
|
|||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
/>
|
/>
|
||||||
<el-table-column prop="stateName" label="审核状态" fixed="right" min-width="90" />
|
<el-table-column prop="stateName" label="审核状态" fixed="right" min-width="90" />
|
||||||
<el-table-column label="操作" width="220px" fixed="right">
|
<el-table-column label="操作" width="150px" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
style="padding: 0"
|
class="mr-10px"
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
text
|
text
|
||||||
v-hasPermi="['clue:order:return-detail']"
|
v-hasPermi="['clue:order:return-detail']"
|
||||||
@click="handleDetail(row)"
|
@click="handleDetail(row)"
|
||||||
@@ -242,7 +388,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
style="padding: 0"
|
class="mr-10px"
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
text
|
text
|
||||||
v-if="row.state == 1 && currentUserId == row.applyUser"
|
v-if="row.state == 1 && currentUserId == row.applyUser"
|
||||||
v-hasPermi="['clue:order:return']"
|
v-hasPermi="['clue:order:return']"
|
||||||
@@ -252,7 +399,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
style="padding: 0"
|
class="mr-10px"
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
text
|
text
|
||||||
v-if="row.state == 1"
|
v-if="row.state == 1"
|
||||||
v-hasPermi="['clue:order:update-return-money']"
|
v-hasPermi="['clue:order:update-return-money']"
|
||||||
@@ -262,7 +410,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
style="padding: 0"
|
class="mr-10px"
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
text
|
text
|
||||||
v-if="row.state == 1"
|
v-if="row.state == 1"
|
||||||
v-hasPermi="['clue:order:return-audit']"
|
v-hasPermi="['clue:order:return-audit']"
|
||||||
@@ -289,6 +438,10 @@
|
|||||||
<script setup name="Reback">
|
<script setup name="Reback">
|
||||||
import * as FeebackApi from '@/api/clue/payment'
|
import * as FeebackApi from '@/api/clue/payment'
|
||||||
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
||||||
|
import { getPlaceList } from '@/api/school/place'
|
||||||
|
import { getClassTypeList } from '@/api/school/class'
|
||||||
|
import { getAreaSimpleList } from '@/api/school/setting/area'
|
||||||
|
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
|
||||||
import DialogFeebackAudit from './DialogFeebackAudit.vue'
|
import DialogFeebackAudit from './DialogFeebackAudit.vue'
|
||||||
@@ -296,8 +449,10 @@ import DialogFeebackDetail from './DialogFeebackDetail.vue'
|
|||||||
import DialogBatchAudit from './DialogBatchAudit.vue'
|
import DialogBatchAudit from './DialogBatchAudit.vue'
|
||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
|
import download from '@/utils/download'
|
||||||
import { useAppStore } from '@/store/modules/app'
|
import { useAppStore } from '@/store/modules/app'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||||
|
import { ElLoading } from 'element-plus'
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
@@ -309,6 +464,7 @@ const currentUserId = userStore.getUser.id
|
|||||||
|
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
signId: undefined,
|
signId: undefined,
|
||||||
|
signOrderId: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
state: undefined,
|
state: undefined,
|
||||||
dealDate: [],
|
dealDate: [],
|
||||||
@@ -316,6 +472,7 @@ const searchForm = ref({
|
|||||||
applyTime: [],
|
applyTime: [],
|
||||||
applyUser: undefined,
|
applyUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
|
phone: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
})
|
})
|
||||||
@@ -323,6 +480,13 @@ const searchForm = ref({
|
|||||||
const userOptions = ref([])
|
const userOptions = ref([])
|
||||||
const allUserOptions = ref([])
|
const allUserOptions = ref([])
|
||||||
|
|
||||||
|
const schoolOptions = ref([])
|
||||||
|
const allPlaceOptions = ref([])
|
||||||
|
|
||||||
|
const placeOptions = computed(() => {
|
||||||
|
return allPlaceOptions.value.filter((it) => it.schoolId == searchForm.value.signSchool)
|
||||||
|
})
|
||||||
|
|
||||||
const tableList = ref([])
|
const tableList = ref([])
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
|
|
||||||
@@ -334,6 +498,7 @@ function handleSearch() {
|
|||||||
function handleReset() {
|
function handleReset() {
|
||||||
searchForm.value = {
|
searchForm.value = {
|
||||||
signId: undefined,
|
signId: undefined,
|
||||||
|
signOrderId: undefined,
|
||||||
receiver: undefined,
|
receiver: undefined,
|
||||||
convertPeople: undefined,
|
convertPeople: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
@@ -343,11 +508,32 @@ function handleReset() {
|
|||||||
applyTime: [],
|
applyTime: [],
|
||||||
applyUser: undefined,
|
applyUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
|
mobile: undefined,
|
||||||
|
signSchool: undefined,
|
||||||
|
signPlace: undefined,
|
||||||
|
signClass: undefined,
|
||||||
|
area: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeSchool() {
|
||||||
|
searchForm.value.signPlace = undefined
|
||||||
|
searchForm.value.signClass = undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
function changePlace() {
|
||||||
|
searchForm.value.signClass = undefined
|
||||||
|
getClassTypeOptions()
|
||||||
|
}
|
||||||
|
|
||||||
|
const classOptions = ref([])
|
||||||
|
async function getClassTypeOptions() {
|
||||||
|
const data = await getClassTypeList({ placeId: searchForm.value.signPlace, status: 0 })
|
||||||
|
classOptions.value = data
|
||||||
|
}
|
||||||
|
|
||||||
const totalInfo = ref({})
|
const totalInfo = ref({})
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
async function getList() {
|
async function getList() {
|
||||||
@@ -362,6 +548,26 @@ async function getList() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function handleExport() {
|
||||||
|
try {
|
||||||
|
ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '正在导出数据,请稍后...',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
})
|
||||||
|
const params = removeNullField(searchForm.value)
|
||||||
|
delete params.pageNo
|
||||||
|
delete params.pageSize
|
||||||
|
const data = await FeebackApi.exportPayment(params)
|
||||||
|
download.excel(data, `汇款记录表${new Date().getTime()}.xls`)
|
||||||
|
} finally {
|
||||||
|
setTimeout(() => {
|
||||||
|
const loadingInstance = ElLoading.service()
|
||||||
|
loadingInstance.close()
|
||||||
|
}, 400)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const batchIds = ref([])
|
const batchIds = ref([])
|
||||||
function handleSelectionChange(val) {
|
function handleSelectionChange(val) {
|
||||||
batchIds.value = val.map((it) => it.id)
|
batchIds.value = val.map((it) => it.id)
|
||||||
@@ -370,7 +576,7 @@ function handleSelectionChange(val) {
|
|||||||
const batchAuditDialog = ref()
|
const batchAuditDialog = ref()
|
||||||
function batchAudit() {
|
function batchAudit() {
|
||||||
if (batchIds.value.length) {
|
if (batchIds.value.length) {
|
||||||
batchAuditDialog.value.open('aftersale', batchIds.value)
|
batchAuditDialog.value.open('feeback', batchIds.value)
|
||||||
} else {
|
} else {
|
||||||
message.info('请选择表格中需要审核的数据')
|
message.info('请选择表格中需要审核的数据')
|
||||||
}
|
}
|
||||||
@@ -397,7 +603,17 @@ function handleAudit(row) {
|
|||||||
feebackDialog.value.open(row)
|
feebackDialog.value.open(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const areaOptions = ref([])
|
||||||
function getOptions() {
|
function getOptions() {
|
||||||
|
// 驾校
|
||||||
|
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
|
||||||
|
schoolOptions.value = data.schoolList
|
||||||
|
allPlaceOptions.value = data.placeList
|
||||||
|
})
|
||||||
|
// 区域
|
||||||
|
getAreaSimpleList().then((data) => {
|
||||||
|
areaOptions.value = data
|
||||||
|
})
|
||||||
getUserOption().then((data) => {
|
getUserOption().then((data) => {
|
||||||
userOptions.value = data
|
userOptions.value = data
|
||||||
})
|
})
|
||||||
@@ -438,7 +654,8 @@ async function handleUpdate(row) {
|
|||||||
money: row.money,
|
money: row.money,
|
||||||
companyProfit: row.companyProfit,
|
companyProfit: row.companyProfit,
|
||||||
personProfit: row.personProfit,
|
personProfit: row.personProfit,
|
||||||
isPayoff: row.isPayoffValue
|
isPayoff: row.isPayoffValue,
|
||||||
|
applyTime: formatDate(row.applyTime)
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
message.success('修改成功')
|
message.success('修改成功')
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user