Compare commits
47 Commits
1fd8a381ea
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b7d3ddf77 | ||
| 767ec44bba | |||
| 779b6c9eba | |||
|
|
c66b8f227e | ||
| fc92668bd1 | |||
| 8813f57c9b | |||
| 9eeefde0fb | |||
| f6c6002eda | |||
| ecc49ec019 | |||
| ed848edfd9 | |||
| f8eda78cf7 | |||
| 6b22078098 | |||
| 0a771cfa54 | |||
|
|
fe708bd2a8 | ||
| fd24f914f7 | |||
| 59f5885669 | |||
| f83a81c02a | |||
| 153e7e766c | |||
| 8bc6ec10c4 | |||
| 85a36e7fd9 | |||
| f727796d1f | |||
|
|
e756980625 | ||
| be38cebe38 | |||
|
|
3454ff1bd5 | ||
| 50a64770ee | |||
|
|
cf049fc1e8 | ||
|
|
00fa8e4d84 | ||
|
|
dd53612b39 | ||
| 25cd675698 | |||
| 15622a2e5a | |||
| ca533e85e3 | |||
| b27a46f037 | |||
| 7b1afb53da | |||
| 63eb91e64c | |||
| ba59394115 | |||
| 2cdb072ab8 | |||
|
|
155f9009fc | ||
| 9800001876 | |||
| 60a2a27e61 | |||
| 01d8c27b48 | |||
| 054e739905 | |||
| 9a14b99b18 | |||
|
|
d03f08dcd4 | ||
| 7d026fd682 | |||
| a4cf773aaa | |||
| 44c7642b9a | |||
| f6225b2afb |
@@ -1,11 +1,20 @@
|
|||||||
|
###
|
||||||
|
# @Author: riverQiu
|
||||||
|
# @Date: 2023-08-16 22:04:23
|
||||||
|
# @LastEditors: riverQiu
|
||||||
|
# @LastEditTime: 2023-08-18 23:22:27
|
||||||
|
# @Description:
|
||||||
|
###
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 对嘛管理系统
|
VUE_APP_TITLE = 寻驾招生管理系统
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# 对嘛管理系统/开发环境
|
# 寻驾招生管理系统/开发环境
|
||||||
VUE_APP_BASE_API = '/dev-api'
|
VUE_APP_BASE_API = '/dev-api'
|
||||||
|
|
||||||
|
JWL_API = ''
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 对嘛管理系统
|
VUE_APP_TITLE = 寻驾招生管理系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
||||||
# 对嘛管理系统/生产环境
|
# 寻驾招生管理系统/生产环境
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = '/duima'
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 对嘛管理系统
|
VUE_APP_TITLE = 寻驾招生管理系统
|
||||||
|
|
||||||
NODE_ENV = production
|
NODE_ENV = production
|
||||||
|
|
||||||
# 测试环境配置
|
# 测试环境配置
|
||||||
ENV = 'staging'
|
ENV = 'staging'
|
||||||
|
|
||||||
# 对嘛管理系统/测试环境
|
# 寻驾招生管理系统/测试环境
|
||||||
VUE_APP_BASE_API = '/stage-api'
|
VUE_APP_BASE_API = '/stage-api'
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ module.exports = {
|
|||||||
// 添加全局变量
|
// 添加全局变量
|
||||||
globals: {
|
globals: {
|
||||||
uni: 'readonly',
|
uni: 'readonly',
|
||||||
wx: 'readonly'
|
wx: 'readonly',
|
||||||
},
|
},
|
||||||
extends: ['plugin:vue/recommended', 'eslint:recommended'], // 使用的默认的规则集
|
extends: ['plugin:vue/recommended', 'eslint:recommended'], // 使用的默认的规则集
|
||||||
|
|
||||||
|
|||||||
11
package.json
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "river",
|
"name": "river",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "对嘛管理系统",
|
"description": "寻驾招生管理系统",
|
||||||
"author": "对嘛",
|
"author": "寻驾招生",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "vue-cli-service serve",
|
||||||
@@ -59,7 +59,8 @@
|
|||||||
"vue-meta": "2.4.0",
|
"vue-meta": "2.4.0",
|
||||||
"vue-router": "3.4.9",
|
"vue-router": "3.4.9",
|
||||||
"vuedraggable": "2.24.3",
|
"vuedraggable": "2.24.3",
|
||||||
"vuex": "3.6.0"
|
"vuex": "3.6.0",
|
||||||
|
"webpack-dev-server": "^3.10.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "4.4.6",
|
"@vue/cli-plugin-babel": "4.4.6",
|
||||||
@@ -72,13 +73,15 @@
|
|||||||
"connect": "3.6.6",
|
"connect": "3.6.6",
|
||||||
"eslint": "7.15.0",
|
"eslint": "7.15.0",
|
||||||
"eslint-plugin-vue": "7.2.0",
|
"eslint-plugin-vue": "7.2.0",
|
||||||
|
"html-webpack-plugin": "^5.6.0",
|
||||||
"lint-staged": "10.5.3",
|
"lint-staged": "10.5.3",
|
||||||
"runjs": "4.4.2",
|
"runjs": "4.4.2",
|
||||||
"sass": "1.32.13",
|
"sass": "1.32.13",
|
||||||
"sass-loader": "10.1.1",
|
"sass-loader": "10.1.1",
|
||||||
"script-ext-html-webpack-plugin": "2.1.5",
|
"script-ext-html-webpack-plugin": "2.1.5",
|
||||||
"svg-sprite-loader": "5.1.1",
|
"svg-sprite-loader": "5.1.1",
|
||||||
"vue-template-compiler": "2.6.12"
|
"vue-template-compiler": "2.6.12",
|
||||||
|
"vue-wxlogin": "^1.0.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.9",
|
"node": ">=8.9",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 106 KiB |
BIN
public/favicon1.ico
Normal file
|
After Width: | Height: | Size: 137 KiB |
@@ -27,13 +27,13 @@
|
|||||||
padding: 0.2em 0;
|
padding: 0.2em 0;
|
||||||
}
|
}
|
||||||
.logo {
|
.logo {
|
||||||
position: absolute;
|
/* position: absolute; */
|
||||||
display: block;
|
display: block;
|
||||||
left: 50%;
|
/* left: 50%;
|
||||||
top: 50%;
|
top: 50%; */
|
||||||
width: 100px;
|
width: 100px;
|
||||||
/* height: 162px; */
|
/* height: 162px; */
|
||||||
transform: translate3d(-50%, -80px, 0);
|
/* transform: translate3d(-50%, -80px, 0); */
|
||||||
animation: twinkling 1.2s infinite ease-in-out;
|
animation: twinkling 1.2s infinite ease-in-out;
|
||||||
}
|
}
|
||||||
/* .animated {
|
/* .animated {
|
||||||
@@ -54,21 +54,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.loading {
|
.loading {
|
||||||
position: absolute;
|
/* position: absolute; */
|
||||||
|
margin-top: 40px;
|
||||||
display: block;
|
display: block;
|
||||||
left: 50%;
|
/* left: 50%; */
|
||||||
top: 50%;
|
/* top: 50%; */
|
||||||
transform: translate3d(-50%, 80px, 0);
|
/* transform: translate3d(-50%, 80px, 0); */
|
||||||
color: #fefeff;
|
color: #fefeff;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
canvas {
|
/* canvas {
|
||||||
display: block;
|
display: block;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translate3d(-50%, 100px, 0);
|
transform: translate3d(-50%, 100px, 0);
|
||||||
}
|
} */
|
||||||
|
|
||||||
#loader-wrapper {
|
#loader-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -76,6 +77,10 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background: #1a1a34;
|
background: #1a1a34;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script src="/loading/prefixfree.min.js"></script>
|
<script src="/loading/prefixfree.min.js"></script>
|
||||||
@@ -88,5 +93,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="/loading/index.js"></script>
|
<script src="/loading/index.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
window._AMapSecurityConfig = {
|
||||||
|
securityJsCode: 'f653df5a2c5f44ae68faaab6f6a6b8ab'
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
|
||||||
|
<script src="https://webapi.amap.com/maps?v=1.4.15&key=713d839ff505943b0f18e6df45f3b0dc&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Scale"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
BIN
public/logo.png
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 106 KiB |
54
src/api/finance/expense/accountExpense.js
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 查询报销列表
|
||||||
|
export function listExpense(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/account/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增报销
|
||||||
|
export function addExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/account',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改报销
|
||||||
|
export function updateExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/account',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除报销
|
||||||
|
export function removeExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/account/' + data,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出报销
|
||||||
|
export function exportExpense(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/account/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审核报销
|
||||||
|
export function checkExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/account/check',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
54
src/api/finance/expense/meituanExpense.js
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 查询报销列表
|
||||||
|
export function listExpense(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/meituan/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增报销
|
||||||
|
export function addExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/meituan',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改报销
|
||||||
|
export function updateExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/meituan',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除报销
|
||||||
|
export function removeExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/meituan/' + data,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出报销
|
||||||
|
export function exportExpense(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/meituan/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审核报销
|
||||||
|
export function checkExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/meituan/check',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
54
src/api/finance/expense/officeExpense.js
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 查询报销列表
|
||||||
|
export function listExpense(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/office/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增报销
|
||||||
|
export function addExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/office',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改报销
|
||||||
|
export function updateExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/office',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除报销
|
||||||
|
export function removeExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/office/remove/' + data,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出报销
|
||||||
|
export function exportExpense(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/office/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审核报销
|
||||||
|
export function checkExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/office/check',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
54
src/api/finance/expense/placeSignExpense.js
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 查询报销列表
|
||||||
|
export function listExpense(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/placeSign/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增报销
|
||||||
|
export function addExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/placeSign',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改报销
|
||||||
|
export function updateExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/placeSign',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除报销
|
||||||
|
export function removeExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/placeSign/' + data,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出报销
|
||||||
|
export function exportExpense(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/placeSign/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审核报销
|
||||||
|
export function checkExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/placeSign/check',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
54
src/api/finance/expense/signExpense.js
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 查询报销列表
|
||||||
|
export function listExpense(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/sign/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增报销
|
||||||
|
export function addExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/sign',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改报销
|
||||||
|
export function updateExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/sign',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除报销
|
||||||
|
export function removeExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/sign/remove/' + data,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出报销
|
||||||
|
export function exportExpense(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/sign/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审核报销
|
||||||
|
export function checkExpense(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/expense/sign/check',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
56
src/api/home.js
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取首页统计信息
|
||||||
|
export function getCount() {
|
||||||
|
return request({
|
||||||
|
url: '/system/home/count',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getTodayPeopleRange() {
|
||||||
|
return request({
|
||||||
|
url: '/system/home/range/today',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getMonthPeopleRange() {
|
||||||
|
return request({
|
||||||
|
url: '/system/home/range/month',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询成交率
|
||||||
|
export function dealRate() {
|
||||||
|
return request({
|
||||||
|
url: '/system/home/rate/total',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//查询本月成交率
|
||||||
|
export function getMonthDealRateRange() {
|
||||||
|
return request({
|
||||||
|
url: '/system/home/rate/month',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//查询上月成交率
|
||||||
|
export function getLastDealRateRange() {
|
||||||
|
return request({
|
||||||
|
url: '/system/home/rate/last',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询考勤异常信息
|
||||||
|
export function getCheckin() {
|
||||||
|
return request({
|
||||||
|
url: '/system/home/checkin',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -18,6 +18,17 @@ export function login(username, password, code, uuid) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function wxLogin(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wx/login',
|
||||||
|
headers: {
|
||||||
|
isToken: false
|
||||||
|
},
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 注册方法
|
// 注册方法
|
||||||
export function register(data) {
|
export function register(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -57,3 +68,12 @@ export function getCodeImg() {
|
|||||||
timeout: 20000
|
timeout: 20000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function getMsgCode(data) {
|
||||||
|
return request({
|
||||||
|
url: '/msgcode',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
42
src/api/question.js
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* @Author: riverQiu
|
||||||
|
* @Date: 2023-08-17 20:30:56
|
||||||
|
* @LastEditors: riverQiu
|
||||||
|
* @LastEditTime: 2023-08-19 00:26:04
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 获取首页统计信息
|
||||||
|
export function searchQuestion(param) {
|
||||||
|
return request({
|
||||||
|
url: '/xunjia/tdQuestion/duima/list',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateQuestion(data) {
|
||||||
|
return request({
|
||||||
|
url: '/xunjia/tdQuestion/duima/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addQuestion(data) {
|
||||||
|
return request({
|
||||||
|
url: '/xunjia/tdQuestion/duima/add',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function uploadFile(data) {
|
||||||
|
return request({
|
||||||
|
url: '/xunjia/applet/tiku/question/upload',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -9,6 +9,16 @@ export function getClassTypeTableList(query) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询班型列表
|
||||||
|
export function getAllList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/classType/all',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 新增班型
|
// 新增班型
|
||||||
export function insertClassType(params) {
|
export function insertClassType(params) {
|
||||||
return request({
|
return request({
|
||||||
@@ -41,3 +51,11 @@ export function cloneClassType(data) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function batchUpdateProfit(data) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/classType/profit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
20
src/api/sch/file.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询文件列表
|
||||||
|
export function listFile(query) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/file/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 删除文件
|
||||||
|
export function delFile(data) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/file',
|
||||||
|
method: 'delete',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -17,8 +17,8 @@ export async function updateSchoolStatus(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存场地状态
|
// 新增
|
||||||
export function savePlace(data) {
|
export function addPlace(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/sch/place',
|
url: '/sch/place',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -27,6 +27,16 @@ export function savePlace(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 修改场地
|
||||||
|
export function updatePlace(data) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/place',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 查询场地
|
// 查询场地
|
||||||
export function getAllPlaces(param) {
|
export function getAllPlaces(param) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
44
src/api/sch/rules.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询规章制度列表
|
||||||
|
export function listRules(query) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/rules/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询规章制度详细
|
||||||
|
export function getRules(ruleId) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/rules/' + ruleId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增规章制度
|
||||||
|
export function addRules(data) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/rules',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改规章制度
|
||||||
|
export function updateRules(data) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/rules',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除规章制度
|
||||||
|
export function delRules(ruleId) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/rules/' + ruleId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -7,6 +7,13 @@ export default {
|
|||||||
params: data
|
params: data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
allList(data = {}) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/school/all',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
});
|
||||||
|
},
|
||||||
getById(id) {
|
getById(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/sch/school/${id}`,
|
url: `/sch/school/${id}`,
|
||||||
@@ -32,5 +39,11 @@ export default {
|
|||||||
url: `/sch/school/${id}`,
|
url: `/sch/school/${id}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
createCode(id){
|
||||||
|
return request({
|
||||||
|
url: `/sch/school/create/${id}`,
|
||||||
|
method: 'post'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
10
src/api/statistic/areaStudent.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 查询场地学员统计
|
||||||
|
export function listReport(query) {
|
||||||
|
return request({
|
||||||
|
url: '/statistic/area/student/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
10
src/api/statistic/placeStudent.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 查询场地学员统计
|
||||||
|
export function listReport(query) {
|
||||||
|
return request({
|
||||||
|
url: '/statistic/place/student/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -38,5 +38,12 @@ export default {
|
|||||||
url: '/system/employee/getEmployees',
|
url: '/system/employee/getEmployees',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getSignPlace(userId) {
|
||||||
|
return request({
|
||||||
|
url: '/system/employee/signPlace/' + userId,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
77
src/api/system/skill.js
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
* @Author: riverQiu
|
||||||
|
* @Date: 2023-10-14 00:31:37
|
||||||
|
* @LastEditors: riverQiu
|
||||||
|
* @LastEditTime: 2023-10-15 00:37:52
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 分页查询关键话术列表
|
||||||
|
export function pageSkill(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/skill/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询关键话术列表
|
||||||
|
export function listSkill(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/skill/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询关键话术详细
|
||||||
|
export function getSkill(skillId) {
|
||||||
|
return request({
|
||||||
|
url: '/system/skill/' + skillId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function getSkillKey() {
|
||||||
|
return request({
|
||||||
|
url: '/system/skill/key',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增关键话术
|
||||||
|
export function addSkill(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/skill',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改关键话术
|
||||||
|
export function updateSkill(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/skill',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除关键话术
|
||||||
|
export function delSkill(skillId) {
|
||||||
|
return request({
|
||||||
|
url: '/system/skill/' + skillId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审核关键话术
|
||||||
|
export function checkSkill(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/skill/check',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
39
src/api/vip.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 查询车型列表
|
||||||
|
export function getCarList(param) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdSysUserMember/duima/car/list',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询会员列表
|
||||||
|
export function getMemberList(param) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdSysUserMember/duima/member/list',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查询用户会员列表
|
||||||
|
export function getUserMemberList(param) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdSysUserMember/duima/user/member/list',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增会员
|
||||||
|
export function addUserMember(data) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdSysUserMember/duima/user/member',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -9,6 +9,15 @@ export function getClueList(query) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询线索列表
|
||||||
|
export function getClueInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/clue/' + id,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 新增线索
|
// 新增线索
|
||||||
export function addClue(data) {
|
export function addClue(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -39,8 +48,8 @@ export function deleteClue(data) {
|
|||||||
export function exportData(query) {
|
export function exportData(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/zs/clue/export',
|
url: '/zs/clue/export',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: query
|
data: query
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,17 +117,16 @@ export function getDistributeRecord(param) {
|
|||||||
// 查询跟踪记录
|
// 查询跟踪记录
|
||||||
export function getFollowRecord(param) {
|
export function getFollowRecord(param) {
|
||||||
return request({
|
return request({
|
||||||
url: '/zs/clue/followrecord',
|
url: '/zs/followrecord/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: param
|
params: param
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//查询咨询记录
|
||||||
|
|
||||||
export function getConsultRecord(param) {
|
export function getConsultRecord(param) {
|
||||||
return request({
|
return request({
|
||||||
url: '/zs/clue/consultrecord',
|
url: '/zs/consultrecord/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: param
|
params: param
|
||||||
});
|
});
|
||||||
@@ -183,3 +191,22 @@ export function updateAccept(data) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//查询线索分发信息
|
||||||
|
export function getCluePlaceList(data) {
|
||||||
|
return request({
|
||||||
|
url: `/zs/clue/place/info`,
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存线索分发信息
|
||||||
|
export function saveCluePlace(data) {
|
||||||
|
return request({
|
||||||
|
url: `/zs/clue/place`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
44
src/api/zs/office.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询报名点列表
|
||||||
|
export function listOffice(query) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/office/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询报名点详细
|
||||||
|
export function getOffice(officeId) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/office/' + officeId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增报名点
|
||||||
|
export function addOffice(data) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/office',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改报名点
|
||||||
|
export function updateOffice(data) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/office',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除报名点
|
||||||
|
export function delOffice(officeId) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/office/' + officeId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
53
src/api/zs/placeSign.js
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询报名点成交登记列表
|
||||||
|
export function listSign(query) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/placeSign/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询报名点成交登记详细
|
||||||
|
export function getSign(placeSignId) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/placeSign/' + placeSignId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增报名点成交登记
|
||||||
|
export function addSign(data) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/placeSign',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改报名点成交登记
|
||||||
|
export function updateSign(data) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/placeSign',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除报名点成交登记
|
||||||
|
export function delSign(placeSignId) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/placeSign/' + placeSignId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//审核登记
|
||||||
|
export function checkSign(data) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/placeSign/check',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -9,12 +9,20 @@ export function getSignList(query) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询线索列表
|
||||||
|
export function getSign(id) {
|
||||||
|
return request({
|
||||||
|
url: '/zs/sign/' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
export function exportData(query) {
|
export function exportData(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/zs/sign/export',
|
url: '/zs/sign/export',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: query
|
data: query
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
src/assets/images/place/position_black.png
Normal file
|
After Width: | Height: | Size: 903 B |
BIN
src/assets/images/place/position_blue.png
Normal file
|
After Width: | Height: | Size: 958 B |
BIN
src/assets/images/place/position_green.png
Normal file
|
After Width: | Height: | Size: 926 B |
BIN
src/assets/images/place/position_purple.png
Normal file
|
After Width: | Height: | Size: 926 B |
BIN
src/assets/images/place/position_red.png
Normal file
|
After Width: | Height: | Size: 950 B |
BIN
src/assets/images/place/position_yellow.png
Normal file
|
After Width: | Height: | Size: 970 B |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 105 KiB |
BIN
src/assets/logo/logo2.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
@@ -233,3 +233,13 @@ aside {
|
|||||||
padding: 15px 20px 0 20px;
|
padding: 15px 20px 0 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.amap-sug-result {
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.impowerBox .qrcode {
|
||||||
|
width: 80px;
|
||||||
|
margin-top: 15px;
|
||||||
|
border: 1px solid #e2e2e2;
|
||||||
|
}
|
||||||
5
src/assets/styles/wx.scss
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.impowerBox .qrcode {width: 200px;}
|
||||||
|
.impowerBox .title {display: none;}
|
||||||
|
.impowerBox .info {width: 200px;}
|
||||||
|
.status_icon {display: none}
|
||||||
|
.impowerBox .status {text-align: center;}
|
||||||
@@ -10,7 +10,6 @@ export default {
|
|||||||
const { value } = binding;
|
const { value } = binding;
|
||||||
const all_permission = '*:*:*';
|
const all_permission = '*:*:*';
|
||||||
const permissions = store.getters && store.getters.permissions;
|
const permissions = store.getters && store.getters.permissions;
|
||||||
|
|
||||||
if (value && value instanceof Array && value.length > 0) {
|
if (value && value instanceof Array && value.length > 0) {
|
||||||
const permissionFlag = value;
|
const permissionFlag = value;
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||||
|
|
||||||
<breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container" />
|
<!-- <breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container" /> -->
|
||||||
<top-nav v-if="topNav" id="topmenu-container" class="topmenu-container" />
|
<!-- <top-nav v-if="topNav" id="topmenu-container" class="topmenu-container" /> -->
|
||||||
|
<!-- <tags-view v-if="needTagsView" /> -->
|
||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||||
@@ -32,12 +33,15 @@ import { mapGetters } from 'vuex';
|
|||||||
import Breadcrumb from '@/components/Breadcrumb';
|
import Breadcrumb from '@/components/Breadcrumb';
|
||||||
import TopNav from '@/components/TopNav';
|
import TopNav from '@/components/TopNav';
|
||||||
import Hamburger from '@/components/Hamburger';
|
import Hamburger from '@/components/Hamburger';
|
||||||
|
import TagsView from '././TagsView';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Breadcrumb,
|
Breadcrumb,
|
||||||
TopNav,
|
TopNav,
|
||||||
Hamburger
|
Hamburger,
|
||||||
|
TagsView
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['sidebar', 'avatar', 'device']),
|
...mapGetters(['sidebar', 'avatar', 'device']),
|
||||||
@@ -56,6 +60,11 @@ export default {
|
|||||||
get() {
|
get() {
|
||||||
return this.$store.state.settings.topNav;
|
return this.$store.state.settings.topNav;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
needTagsView: {
|
||||||
|
get() {
|
||||||
|
return this.$store.state.settings.tagsView;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -73,7 +82,7 @@ export default {
|
|||||||
location.href = '/index';
|
location.href = '/index';
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '对嘛管理系统',
|
title: '寻驾招生管理系统',
|
||||||
logo: logoImg
|
logo: logoImg
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
import router from './router';
|
import router from './router';
|
||||||
import store from './store';
|
import store from './store';
|
||||||
import { Message } from 'element-ui';
|
import {
|
||||||
|
Message
|
||||||
|
} from 'element-ui';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
import { getToken } from '@/utils/auth';
|
import {
|
||||||
import { isRelogin } from '@/utils/request';
|
getToken
|
||||||
|
} from '@/utils/auth';
|
||||||
|
import {
|
||||||
|
isRelogin
|
||||||
|
} from '@/utils/request';
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false });
|
NProgress.configure({
|
||||||
|
showSpinner: false
|
||||||
|
});
|
||||||
|
|
||||||
const whiteList = ['/login', '/auth-redirect', '/bind', '/register'];
|
const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/question'];
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
@@ -16,7 +24,9 @@ router.beforeEach((to, from, next) => {
|
|||||||
to.meta.title && store.dispatch('settings/setTitle', to.meta.title);
|
to.meta.title && store.dispatch('settings/setTitle', to.meta.title);
|
||||||
/* has token*/
|
/* has token*/
|
||||||
if (to.path === '/login') {
|
if (to.path === '/login') {
|
||||||
next({ path: '/' });
|
next({
|
||||||
|
path: '/'
|
||||||
|
});
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
} else {
|
} else {
|
||||||
if (store.getters.roles.length === 0) {
|
if (store.getters.roles.length === 0) {
|
||||||
@@ -24,18 +34,25 @@ router.beforeEach((to, from, next) => {
|
|||||||
// 判断当前用户是否已拉取完user_info信息
|
// 判断当前用户是否已拉取完user_info信息
|
||||||
store
|
store
|
||||||
.dispatch('GetInfo')
|
.dispatch('GetInfo')
|
||||||
.then(() => {
|
.then((resp) => {
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
|
localStorage.setItem('admin', resp.user.admin);
|
||||||
|
localStorage.setItem('userId', resp.user.userId);
|
||||||
store.dispatch('GenerateRoutes').then((accessRoutes) => {
|
store.dispatch('GenerateRoutes').then((accessRoutes) => {
|
||||||
// 根据roles权限生成可访问的路由表
|
// 根据roles权限生成可访问的路由表
|
||||||
router.addRoutes(accessRoutes); // 动态添加可访问路由表
|
router.addRoutes(accessRoutes); // 动态添加可访问路由表
|
||||||
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
|
next({
|
||||||
|
...to,
|
||||||
|
replace: true
|
||||||
|
}); // hack方法 确保addRoutes已完成
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
Message.error(err);
|
Message.error(err);
|
||||||
next({ path: '/' });
|
next({
|
||||||
|
path: '/'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -29,44 +29,45 @@ import Layout from '@/layout';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// 公共路由
|
// 公共路由
|
||||||
export const constantRoutes = [
|
export const constantRoutes = [{
|
||||||
{
|
|
||||||
path: '/redirect',
|
path: '/redirect',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [
|
children: [{
|
||||||
{
|
|
||||||
path: '/redirect/:path(.*)',
|
path: '/redirect/:path(.*)',
|
||||||
component: () => import('@/views/redirect')
|
component: () => import('@/views/redirect')
|
||||||
}
|
}]
|
||||||
]
|
},
|
||||||
},
|
{
|
||||||
{
|
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: () => import('@/views/login'),
|
component: () => import('@/views/login'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/register',
|
path: '/register',
|
||||||
component: () => import('@/views/register'),
|
component: () => import('@/views/register'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
path: '/question',
|
||||||
|
component: () => import('@/views/question'),
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
component: () => import('@/views/error/404'),
|
component: () => import('@/views/error/404'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/401',
|
path: '/401',
|
||||||
component: () => import('@/views/error/401'),
|
component: () => import('@/views/error/401'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: 'index',
|
redirect: 'index',
|
||||||
children: [
|
children: [{
|
||||||
{
|
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/index'),
|
component: () => import('@/views/index'),
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
@@ -75,44 +76,42 @@ export const constantRoutes = [
|
|||||||
icon: 'dashboard',
|
icon: 'dashboard',
|
||||||
affix: true
|
affix: true
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
},
|
||||||
},
|
// {
|
||||||
// {
|
// path: '/demo',
|
||||||
// path: '/demo',
|
// component: Layout,
|
||||||
// component: Layout,
|
// redirect: 'noredirect',
|
||||||
// redirect: 'noredirect',
|
// meta: {
|
||||||
// meta: {
|
// title: 'Demo',
|
||||||
// title: 'Demo',
|
// icon: 'xx'
|
||||||
// icon: 'xx'
|
// },
|
||||||
// },
|
// children: [{
|
||||||
// children: [{
|
// path: '/base-page',
|
||||||
// path: '/base-page',
|
// component: () => import('@/views/demo/basePage/index'),
|
||||||
// component: () => import('@/views/demo/basePage/index'),
|
// name: 'BasePage',
|
||||||
// name: 'BasePage',
|
// meta: {
|
||||||
// meta: {
|
// title: 'BasePage',
|
||||||
// title: 'BasePage',
|
// icon: 'xx'
|
||||||
// icon: 'xx'
|
// }
|
||||||
// }
|
// },
|
||||||
// },
|
// {
|
||||||
// {
|
// path: '/base-components',
|
||||||
// path: '/base-components',
|
// component: () => import('@/views/demo/baseComponents/index'),
|
||||||
// component: () => import('@/views/demo/baseComponents/index'),
|
// name: 'BaseComponents',
|
||||||
// name: 'BaseComponents',
|
// meta: {
|
||||||
// meta: {
|
// title: 'BaseComponents',
|
||||||
// title: 'BaseComponents',
|
// icon: 'xx'
|
||||||
// icon: 'xx'
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// ]
|
||||||
// ]
|
// },
|
||||||
// },
|
{
|
||||||
{
|
|
||||||
path: '/user',
|
path: '/user',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
redirect: 'noredirect',
|
redirect: 'noredirect',
|
||||||
children: [
|
children: [{
|
||||||
{
|
|
||||||
path: 'profile',
|
path: 'profile',
|
||||||
component: () => import('@/views/system/user/profile/index'),
|
component: () => import('@/views/system/user/profile/index'),
|
||||||
name: 'Profile',
|
name: 'Profile',
|
||||||
@@ -120,20 +119,17 @@ export const constantRoutes = [
|
|||||||
title: '个人中心',
|
title: '个人中心',
|
||||||
icon: 'user'
|
icon: 'user'
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
}
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// 动态路由,基于用户权限动态去加载
|
// 动态路由,基于用户权限动态去加载
|
||||||
export const dynamicRoutes = [
|
export const dynamicRoutes = [{
|
||||||
{
|
|
||||||
path: '/system/user-auth',
|
path: '/system/user-auth',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['system:user:edit'],
|
permissions: ['system:user:edit'],
|
||||||
children: [
|
children: [{
|
||||||
{
|
|
||||||
path: 'role/:userId(\\d+)',
|
path: 'role/:userId(\\d+)',
|
||||||
component: () => import('@/views/system/user/authRole'),
|
component: () => import('@/views/system/user/authRole'),
|
||||||
name: 'AuthRole',
|
name: 'AuthRole',
|
||||||
@@ -141,16 +137,14 @@ export const dynamicRoutes = [
|
|||||||
title: '分配角色',
|
title: '分配角色',
|
||||||
activeMenu: '/system/user'
|
activeMenu: '/system/user'
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
},
|
||||||
},
|
{
|
||||||
{
|
|
||||||
path: '/system/role-auth',
|
path: '/system/role-auth',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['system:role:edit'],
|
permissions: ['system:role:edit'],
|
||||||
children: [
|
children: [{
|
||||||
{
|
|
||||||
path: 'user/:roleId(\\d+)',
|
path: 'user/:roleId(\\d+)',
|
||||||
component: () => import('@/views/system/role/authUser'),
|
component: () => import('@/views/system/role/authUser'),
|
||||||
name: 'AuthUser',
|
name: 'AuthUser',
|
||||||
@@ -158,16 +152,14 @@ export const dynamicRoutes = [
|
|||||||
title: '分配用户',
|
title: '分配用户',
|
||||||
activeMenu: '/system/role'
|
activeMenu: '/system/role'
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
},
|
||||||
},
|
{
|
||||||
{
|
|
||||||
path: '/system/dict-data',
|
path: '/system/dict-data',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['system:dict:list'],
|
permissions: ['system:dict:list'],
|
||||||
children: [
|
children: [{
|
||||||
{
|
|
||||||
path: 'index/:dictId(\\d+)',
|
path: 'index/:dictId(\\d+)',
|
||||||
component: () => import('@/views/system/dict/data'),
|
component: () => import('@/views/system/dict/data'),
|
||||||
name: 'Data',
|
name: 'Data',
|
||||||
@@ -175,16 +167,14 @@ export const dynamicRoutes = [
|
|||||||
title: '字典数据',
|
title: '字典数据',
|
||||||
activeMenu: '/system/dict'
|
activeMenu: '/system/dict'
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
},
|
||||||
},
|
{
|
||||||
{
|
|
||||||
path: '/monitor/job-log',
|
path: '/monitor/job-log',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['monitor:job:list'],
|
permissions: ['monitor:job:list'],
|
||||||
children: [
|
children: [{
|
||||||
{
|
|
||||||
path: 'index',
|
path: 'index',
|
||||||
component: () => import('@/views/monitor/job/log'),
|
component: () => import('@/views/monitor/job/log'),
|
||||||
name: 'JobLog',
|
name: 'JobLog',
|
||||||
@@ -192,9 +182,23 @@ export const dynamicRoutes = [
|
|||||||
title: '调度日志',
|
title: '调度日志',
|
||||||
activeMenu: '/monitor/job'
|
activeMenu: '/monitor/job'
|
||||||
}
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/zs/clue-form',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['zs:clue:add', 'zs:clue:edit'],
|
||||||
|
children: [{
|
||||||
|
path: 'index/:clueId(\\d+)',
|
||||||
|
component: () => import('@/views/zs/clue/ClueForm'),
|
||||||
|
name: 'ClueForm',
|
||||||
|
meta: {
|
||||||
|
title: '线索详情',
|
||||||
|
activeMenu: '/zs/clue'
|
||||||
}
|
}
|
||||||
]
|
}]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
// 防止连续点击多次路由报错
|
// 防止连续点击多次路由报错
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
import { login, logout, getInfo } from '@/api/login';
|
import {
|
||||||
import { getToken, setToken, removeToken } from '@/utils/auth';
|
login,
|
||||||
|
logout,
|
||||||
|
getInfo,
|
||||||
|
wxLogin
|
||||||
|
} from '@/api/login';
|
||||||
|
import {
|
||||||
|
getToken,
|
||||||
|
setToken,
|
||||||
|
removeToken
|
||||||
|
} from '@/utils/auth';
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
state: {
|
state: {
|
||||||
@@ -30,7 +39,9 @@ const user = {
|
|||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
// 登录
|
// 登录
|
||||||
Login({ commit }, userInfo) {
|
Login({
|
||||||
|
commit
|
||||||
|
}, userInfo) {
|
||||||
const username = userInfo.username.trim();
|
const username = userInfo.username.trim();
|
||||||
const password = userInfo.password;
|
const password = userInfo.password;
|
||||||
const code = userInfo.code;
|
const code = userInfo.code;
|
||||||
@@ -47,9 +58,29 @@ const user = {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 登录
|
||||||
|
WXLogin({
|
||||||
|
commit
|
||||||
|
}, userInfo) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
wxLogin(userInfo)
|
||||||
|
.then((res) => {
|
||||||
|
setToken(res.token);
|
||||||
|
commit('SET_TOKEN', res.token);
|
||||||
|
resolve(res);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
reject(error);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
GetInfo({ commit, state }) {
|
GetInfo({
|
||||||
|
commit,
|
||||||
|
state
|
||||||
|
}) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getInfo()
|
getInfo()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -74,7 +105,10 @@ const user = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 退出系统
|
// 退出系统
|
||||||
LogOut({ commit, state }) {
|
LogOut({
|
||||||
|
commit,
|
||||||
|
state
|
||||||
|
}) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
logout(state.token)
|
logout(state.token)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -91,7 +125,9 @@ const user = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 前端 登出
|
// 前端 登出
|
||||||
FedLogOut({ commit }) {
|
FedLogOut({
|
||||||
|
commit
|
||||||
|
}) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
commit('SET_TOKEN', '');
|
commit('SET_TOKEN', '');
|
||||||
removeToken();
|
removeToken();
|
||||||
|
|||||||
@@ -1,16 +1,32 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Notification, MessageBox, Message, Loading } from 'element-ui';
|
import {
|
||||||
|
Notification,
|
||||||
|
MessageBox,
|
||||||
|
Message,
|
||||||
|
Loading
|
||||||
|
} from 'element-ui';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import { getToken } from '@/utils/auth';
|
import {
|
||||||
|
getToken
|
||||||
|
} from '@/utils/auth';
|
||||||
import errorCode from '@/utils/errorCode';
|
import errorCode from '@/utils/errorCode';
|
||||||
import { tansParams, blobValidate } from '@/utils/ruoyi';
|
import {
|
||||||
|
tansParams,
|
||||||
|
blobValidate
|
||||||
|
} from '@/utils/ruoyi';
|
||||||
import cache from '@/plugins/cache';
|
import cache from '@/plugins/cache';
|
||||||
import { saveAs } from 'file-saver';
|
import {
|
||||||
import { successCode } from '@/global/global';
|
saveAs
|
||||||
|
} from 'file-saver';
|
||||||
|
import {
|
||||||
|
successCode
|
||||||
|
} from '@/global/global';
|
||||||
|
|
||||||
let downloadLoadingInstance;
|
let downloadLoadingInstance;
|
||||||
// 是否显示重新登录
|
// 是否显示重新登录
|
||||||
export const isRelogin = { show: false };
|
export const isRelogin = {
|
||||||
|
show: false
|
||||||
|
};
|
||||||
|
|
||||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
@@ -18,7 +34,7 @@ const service = axios.create({
|
|||||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||||
baseURL: process.env.VUE_APP_BASE_API,
|
baseURL: process.env.VUE_APP_BASE_API,
|
||||||
// 超时
|
// 超时
|
||||||
timeout: 10000
|
timeout: 120000
|
||||||
});
|
});
|
||||||
|
|
||||||
// request拦截器
|
// request拦截器
|
||||||
@@ -31,6 +47,11 @@ service.interceptors.request.use(
|
|||||||
if (getToken() && !isToken) {
|
if (getToken() && !isToken) {
|
||||||
config.headers['Authorization'] = 'Bearer ' + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
|
config.headers['Authorization'] = 'Bearer ' + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||||
}
|
}
|
||||||
|
if (config.url.includes("http")) {
|
||||||
|
config.baseURL = "";
|
||||||
|
} else if (config.url.includes("amap")) {
|
||||||
|
config.baseURL = "";
|
||||||
|
}
|
||||||
// get请求映射params参数
|
// get请求映射params参数
|
||||||
if (config.method === 'get' && config.params) {
|
if (config.method === 'get' && config.params) {
|
||||||
let url = config.url + '?' + tansParams(config.params);
|
let url = config.url + '?' + tansParams(config.params);
|
||||||
@@ -116,7 +137,9 @@ service.interceptors.response.use(
|
|||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
console.log('err' + error);
|
console.log('err' + error);
|
||||||
let { message } = error;
|
let {
|
||||||
|
message
|
||||||
|
} = error;
|
||||||
if (message === 'Network Error') {
|
if (message === 'Network Error') {
|
||||||
message = '后端接口连接异常';
|
message = '后端接口连接异常';
|
||||||
} else if (message.includes('timeout')) {
|
} else if (message.includes('timeout')) {
|
||||||
@@ -147,7 +170,9 @@ export function download(url, params, filename, config) {
|
|||||||
return tansParams(params);
|
return tansParams(params);
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
|
},
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
...config
|
...config
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -73,20 +73,10 @@ export function addDateRange(params, dateRange, propName) {
|
|||||||
|
|
||||||
// 回显数据字典
|
// 回显数据字典
|
||||||
export function selectDictLabel(datas, value) {
|
export function selectDictLabel(datas, value) {
|
||||||
if (value === undefined) {
|
if (value == undefined) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
var actions = [];
|
return datas.find((item) => item.dictValue == value).dictLabel;
|
||||||
Object.keys(datas).some((key) => {
|
|
||||||
if (datas[key].value === '' + value) {
|
|
||||||
actions.push(datas[key].label);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (actions.length === 0) {
|
|
||||||
actions.push(value);
|
|
||||||
}
|
|
||||||
return actions.join('');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 回显数据字典(字符串数组)
|
// 回显数据字典(字符串数组)
|
||||||
|
|||||||
111
src/views/dashboard/BarChart-bak.vue
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
<template>
|
||||||
|
<div :class="className" :style="{height:height,width:width}" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import echarts from 'echarts';
|
||||||
|
require('echarts/theme/macarons'); // echarts theme
|
||||||
|
import resize from './mixins/resize';
|
||||||
|
|
||||||
|
const animationDuration = 6000;
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [resize],
|
||||||
|
props: {
|
||||||
|
className: {
|
||||||
|
type: String,
|
||||||
|
default: 'chart'
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: '100%'
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: String,
|
||||||
|
default: '300px'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.initChart();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (!this.chart) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.chart.dispose();
|
||||||
|
this.chart = null;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initChart() {
|
||||||
|
this.chart = echarts.init(this.$el, 'macarons');
|
||||||
|
|
||||||
|
this.chart.setOption({
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
|
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: 10,
|
||||||
|
left: '2%',
|
||||||
|
right: '2%',
|
||||||
|
bottom: '3%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||||
|
axisTick: {
|
||||||
|
alignWithLabel: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: 'pageA',
|
||||||
|
type: 'bar',
|
||||||
|
stack: 'vistors',
|
||||||
|
barWidth: '60%',
|
||||||
|
data: [79, 52, 200, 334, 390, 330, 220],
|
||||||
|
animationDuration
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'pageB',
|
||||||
|
type: 'bar',
|
||||||
|
stack: 'vistors',
|
||||||
|
barWidth: '60%',
|
||||||
|
data: [80, 52, 200, 334, 390, 330, 220],
|
||||||
|
animationDuration
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'pageC',
|
||||||
|
type: 'bar',
|
||||||
|
stack: 'vistors',
|
||||||
|
barWidth: '60%',
|
||||||
|
data: [30, 52, 200, 334, 390, 330, 220],
|
||||||
|
animationDuration
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,111 +1,101 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="className" :style="{height:height,width:width}" />
|
<div class="chart" style="height:200px;width:100%;" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts';
|
import * as echarts from 'echarts'
|
||||||
require('echarts/theme/macarons'); // echarts theme
|
require('echarts/theme/macarons') // echarts theme
|
||||||
import resize from './mixins/resize';
|
import resize from './mixins/resize'
|
||||||
|
import { getTodayPeopleRange, getMonthPeopleRange } from '@/api/home'
|
||||||
|
|
||||||
const animationDuration = 6000;
|
const animationDuration = 6000
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
props: {
|
// props: {
|
||||||
className: {
|
// className: {
|
||||||
type: String,
|
// type: String,
|
||||||
default: 'chart'
|
// default: 'chart'
|
||||||
},
|
// },
|
||||||
width: {
|
// width: {
|
||||||
type: String,
|
// type: String,
|
||||||
default: '100%'
|
// default: '100%'
|
||||||
},
|
// },
|
||||||
height: {
|
// height: {
|
||||||
type: String,
|
// type: String,
|
||||||
default: '300px'
|
// default: '300px'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chart: null
|
chart: null,
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart();
|
getTodayPeopleRange().then((resp) => {
|
||||||
});
|
this.initChart(resp.data)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
this.chart.dispose();
|
this.chart.dispose()
|
||||||
this.chart = null;
|
this.chart = null
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart() {
|
initChart(item) {
|
||||||
this.chart = echarts.init(this.$el, 'macarons');
|
this.chart = echarts.init(this.$el, 'macarons')
|
||||||
|
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
// 坐标轴指示器,坐标轴触发有效
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 10,
|
top: 10,
|
||||||
left: '2%',
|
left: '2%',
|
||||||
right: '2%',
|
right: '2%',
|
||||||
bottom: '3%',
|
bottom: '3%',
|
||||||
containLabel: true
|
containLabel: true,
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['人数'],
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
data: item.people,
|
||||||
axisTick: {
|
// axisTick: {
|
||||||
alignWithLabel: true
|
// alignWithLabel: true
|
||||||
}
|
// }
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisTick: {
|
// axisTick: {
|
||||||
show: false
|
// show: false
|
||||||
}
|
// }
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: 'pageA',
|
name: '成交学员数',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
stack: 'vistors',
|
// stack: 'vistors',
|
||||||
barWidth: '60%',
|
barWidth: 40,
|
||||||
data: [79, 52, 200, 334, 390, 330, 220],
|
data: item.data,
|
||||||
animationDuration
|
// animationDuration
|
||||||
},
|
},
|
||||||
{
|
],
|
||||||
name: 'pageB',
|
})
|
||||||
type: 'bar',
|
|
||||||
stack: 'vistors',
|
|
||||||
barWidth: '60%',
|
|
||||||
data: [80, 52, 200, 334, 390, 330, 220],
|
|
||||||
animationDuration
|
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
name: 'pageC',
|
}
|
||||||
type: 'bar',
|
|
||||||
stack: 'vistors',
|
|
||||||
barWidth: '60%',
|
|
||||||
data: [30, 52, 200, 334, 390, 330, 220],
|
|
||||||
animationDuration
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
102
src/views/dashboard/BarChart1.vue
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 本月成交排行榜 -->
|
||||||
|
<div class="chart" style="height:200px;width:100%;" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as echarts from 'echarts'
|
||||||
|
require('echarts/theme/macarons') // echarts theme
|
||||||
|
import resize from './mixins/resize'
|
||||||
|
import { getTodayPeopleRange, getMonthPeopleRange } from '@/api/home'
|
||||||
|
|
||||||
|
const animationDuration = 6000
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [resize],
|
||||||
|
// props: {
|
||||||
|
// className: {
|
||||||
|
// type: String,
|
||||||
|
// default: 'chart'
|
||||||
|
// },
|
||||||
|
// width: {
|
||||||
|
// type: String,
|
||||||
|
// default: '100%'
|
||||||
|
// },
|
||||||
|
// height: {
|
||||||
|
// type: String,
|
||||||
|
// default: '300px'
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
getMonthPeopleRange().then((resp) => {
|
||||||
|
this.initChart(resp.data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (!this.chart) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.chart.dispose()
|
||||||
|
this.chart = null
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initChart(item) {
|
||||||
|
this.chart = echarts.init(this.$el, 'macarons')
|
||||||
|
|
||||||
|
this.chart.setOption({
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
|
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: 10,
|
||||||
|
left: '2%',
|
||||||
|
right: '2%',
|
||||||
|
bottom: '3%',
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['人数'],
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
data: item.people,
|
||||||
|
// axisTick: {
|
||||||
|
// alignWithLabel: true
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
// axisTick: {
|
||||||
|
// show: false
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '成交学员数',
|
||||||
|
type: 'bar',
|
||||||
|
// stack: 'vistors',
|
||||||
|
barWidth: 40,
|
||||||
|
data: item.data,
|
||||||
|
// animationDuration
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
102
src/views/dashboard/BarChart2.vue
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 本月成交排行榜 -->
|
||||||
|
<div class="chart" style="height:200px;width:100%;" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as echarts from 'echarts'
|
||||||
|
require('echarts/theme/macarons') // echarts theme
|
||||||
|
import resize from './mixins/resize'
|
||||||
|
import { getMonthDealRateRange } from '@/api/home'
|
||||||
|
|
||||||
|
const animationDuration = 6000
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [resize],
|
||||||
|
// props: {
|
||||||
|
// className: {
|
||||||
|
// type: String,
|
||||||
|
// default: 'chart'
|
||||||
|
// },
|
||||||
|
// width: {
|
||||||
|
// type: String,
|
||||||
|
// default: '100%'
|
||||||
|
// },
|
||||||
|
// height: {
|
||||||
|
// type: String,
|
||||||
|
// default: '300px'
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
getMonthDealRateRange().then((resp) => {
|
||||||
|
this.initChart(resp.data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (!this.chart) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.chart.dispose()
|
||||||
|
this.chart = null
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initChart(item) {
|
||||||
|
this.chart = echarts.init(this.$el, 'macarons')
|
||||||
|
|
||||||
|
this.chart.setOption({
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
|
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: 10,
|
||||||
|
left: '2%',
|
||||||
|
right: '2%',
|
||||||
|
bottom: '3%',
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['成交率'],
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
data: item.people,
|
||||||
|
// axisTick: {
|
||||||
|
// alignWithLabel: true
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
// axisTick: {
|
||||||
|
// show: false
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '成交率',
|
||||||
|
type: 'bar',
|
||||||
|
// stack: 'vistors',
|
||||||
|
barWidth: 40,
|
||||||
|
data: item.data,
|
||||||
|
// animationDuration
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
102
src/views/dashboard/BarChart3.vue
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 本月成交排行榜 -->
|
||||||
|
<div class="chart" style="height:200px;width:100%;" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as echarts from 'echarts'
|
||||||
|
require('echarts/theme/macarons') // echarts theme
|
||||||
|
import resize from './mixins/resize'
|
||||||
|
import { getLastDealRateRange } from '@/api/home'
|
||||||
|
|
||||||
|
const animationDuration = 6000
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [resize],
|
||||||
|
// props: {
|
||||||
|
// className: {
|
||||||
|
// type: String,
|
||||||
|
// default: 'chart'
|
||||||
|
// },
|
||||||
|
// width: {
|
||||||
|
// type: String,
|
||||||
|
// default: '100%'
|
||||||
|
// },
|
||||||
|
// height: {
|
||||||
|
// type: String,
|
||||||
|
// default: '300px'
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
getLastDealRateRange().then((resp) => {
|
||||||
|
this.initChart(resp.data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (!this.chart) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.chart.dispose()
|
||||||
|
this.chart = null
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initChart(item) {
|
||||||
|
this.chart = echarts.init(this.$el, 'macarons')
|
||||||
|
|
||||||
|
this.chart.setOption({
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
|
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: 10,
|
||||||
|
left: '2%',
|
||||||
|
right: '2%',
|
||||||
|
bottom: '3%',
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['成交率'],
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
data: item.people,
|
||||||
|
// axisTick: {
|
||||||
|
// alignWithLabel: true
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
// axisTick: {
|
||||||
|
// show: false
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '成交率',
|
||||||
|
type: 'bar',
|
||||||
|
// stack: 'vistors',
|
||||||
|
barWidth: 40,
|
||||||
|
data: item.data,
|
||||||
|
// animationDuration
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
82
src/views/finance/expense/DialogAdd.vue
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-if="show" title="新增报销" :visible.sync="show" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="成交学员" prop="stuName">
|
||||||
|
<el-input v-model="form.stuName" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报名点" prop="spotName">
|
||||||
|
<el-input v-model="form.spotName" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销款项" prop="expenseType">
|
||||||
|
<el-radio-group v-model="form.expenseType">
|
||||||
|
<el-radio v-for="(item, index) in expenseTypeOptions" :key="index" :label="item.key">
|
||||||
|
{{ item.value }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销金额" prop="expenseTotal">
|
||||||
|
<el-input v-model="form.expenseTotal" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销说明" prop="applyRemark">
|
||||||
|
<el-input v-model="form.applyRemark" type="textarea" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-if="form.type == 2" :data="tableList" border stripe>
|
||||||
|
<el-table-column prop="expenseType" label="报销款项" />
|
||||||
|
<el-table-column prop="expenseTotal" label="报销金额" />
|
||||||
|
<el-table-column prop="applyUser" label="申请人" />
|
||||||
|
<el-table-column prop="applyTime" label="申请时间" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<span slot="footer">
|
||||||
|
<el-button @click="show = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="handleSure">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
showColumns: [],
|
||||||
|
form: {
|
||||||
|
stuName: undefined,
|
||||||
|
spotName: undefined,
|
||||||
|
expenseTotal: undefined,
|
||||||
|
expenseType: undefined,
|
||||||
|
applyRemark: undefined
|
||||||
|
},
|
||||||
|
expenseTypeOptions: [],
|
||||||
|
rules: {
|
||||||
|
stuName: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
spotName: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
expenseTotal: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
applyRemark: { required: true, message: '请输入', trigger: 'blur' }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(data) {
|
||||||
|
this.show = true;
|
||||||
|
this.form.type = data.type;
|
||||||
|
if (!this.expenseTypeOptions.length) {
|
||||||
|
// 获取款项类型下拉
|
||||||
|
this.expenseTypeOptions = [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSure() {
|
||||||
|
this.$refs.form.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
// 提交申请
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
72
src/views/finance/expense/DialogAudit.vue
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-if="show" title="报销审批" :visible.sync="show" width="800px">
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item v-for="(item, index) in showColumns" :key="index" :label="item.label">
|
||||||
|
{{ info[item.prop] }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-form ref="form" class="mt20" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="是否通过" prop="auditStatus">
|
||||||
|
<el-radio-group v-model="form.auditStatus">
|
||||||
|
<el-radio :label="1">通过</el-radio>
|
||||||
|
<el-radio :label="0">驳回</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审批说明" prop="auditRemark">
|
||||||
|
<el-input v-model="form.auditRemark" type="textarea" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span slot="footer">
|
||||||
|
<el-button @click="show = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="handleSure">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
showColumns: [],
|
||||||
|
info: {},
|
||||||
|
form: {
|
||||||
|
auditStatus: 1,
|
||||||
|
auditRemark: undefined
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
auditRemark: { required: true, message: '请输入', trigger: 'blur' }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(data) {
|
||||||
|
this.show = true;
|
||||||
|
this.info = { ...data, type: '1' };
|
||||||
|
const commonColumns = [
|
||||||
|
{ prop: 'applyUser', label: `申请人` },
|
||||||
|
{ prop: 'applyDate', label: `申请时间` },
|
||||||
|
{ prop: 'applyRemark', label: `申请备注` },
|
||||||
|
{ prop: 'expenseType', label: `报销款项` },
|
||||||
|
{ prop: 'expenseTotal', label: `报销金额` }
|
||||||
|
];
|
||||||
|
const otherColumns = {
|
||||||
|
1: [{ prop: 'spotName', label: `报名点` }],
|
||||||
|
2: [{ prop: 'stuName', label: `成交学员` }]
|
||||||
|
};
|
||||||
|
this.showColumns = otherColumns[this.info.type].concat(commonColumns);
|
||||||
|
},
|
||||||
|
handleSure() {
|
||||||
|
this.$refs.form.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
// 提交审批结果
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
49
src/views/finance/expense/DialogDetail.vue
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-if="show" :title="`报销详情【${info.statusName}】`" :visible.sync="show" width="800px">
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item v-for="(item, index) in showColumns" :key="index" :label="item.label">
|
||||||
|
{{ info[item.prop] }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<span slot="footer">
|
||||||
|
<el-button @click="show = false">取消</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
showColumns: [],
|
||||||
|
info: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(data) {
|
||||||
|
this.show = true;
|
||||||
|
this.info = { ...data, statusName: '待审核', type: '1' };
|
||||||
|
const commonColumns = [
|
||||||
|
{ prop: 'applyUser', label: `申请人` },
|
||||||
|
{ prop: 'applyDate', label: `申请时间` },
|
||||||
|
{ prop: 'applyRemark', label: `申请备注` },
|
||||||
|
{ prop: 'expenseType', label: `报销款项` },
|
||||||
|
{ prop: 'expenseTotal', label: `报销金额` },
|
||||||
|
{ prop: 'auditStatus', label: `审批状态` },
|
||||||
|
{ prop: 'auditUser', label: `审批人` },
|
||||||
|
{ prop: 'auditDate', label: `审批时间` },
|
||||||
|
{ prop: 'auditRemark', label: `审批备注` }
|
||||||
|
];
|
||||||
|
const otherColumns = {
|
||||||
|
1: [{ prop: 'spotName', label: `报名点` }],
|
||||||
|
2: [{ prop: 'stuName', label: `成交学员` }]
|
||||||
|
};
|
||||||
|
this.showColumns = otherColumns[this.info.type].concat(commonColumns);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
97
src/views/finance/expense/RightPane.vue
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<SearchForm v-show="showSearch" :value.sync="searchForm" />
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||||
|
<el-button type="warning" icon="el-icon-download" @click="handleExport">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="tableList">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<template v-for="item in columns">
|
||||||
|
<el-table-column v-if="item.visible" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||||
|
</template>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click="handleDetail(scope.row)">详情</el-button>
|
||||||
|
<el-button type="text" @click="handleCheck(scope.row)">审核</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||||
|
|
||||||
|
<DialogDetail ref="DialogDetail" />
|
||||||
|
<DialogAudit ref="DialogAudit" />
|
||||||
|
<DialogAdd ref="DialogAdd" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import DialogDetail from './DialogDetail.vue';
|
||||||
|
import DialogAudit from './DialogAudit.vue';
|
||||||
|
import DialogAdd from './DialogAdd.vue';
|
||||||
|
import SearchForm from './SearchForm.vue';
|
||||||
|
import { defaultColumns } from './columns.js';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
SearchForm, DialogDetail, DialogAudit, DialogAdd
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: '1'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {
|
||||||
|
expenseUser: undefined,
|
||||||
|
expenseDate: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20
|
||||||
|
},
|
||||||
|
showSearch: true,
|
||||||
|
tableList: [],
|
||||||
|
total: 0,
|
||||||
|
columns: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
type: {
|
||||||
|
handler() {
|
||||||
|
const str = localStorage.getItem(`${this.$route.name}-${this.type}-table-columns`);
|
||||||
|
this.columns = str ? JSON.parse(str) : defaultColumns[this.type];
|
||||||
|
this._getTableList();
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _getTableList() {
|
||||||
|
const params = { ...this.searchForm };
|
||||||
|
// api.list(params)
|
||||||
|
this.tableList = [];
|
||||||
|
for (let i = 0; i < 20; i++) {
|
||||||
|
this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleDetail(row) {
|
||||||
|
this.$refs.DialogDetail && this.$refs.DialogDetail.init({ ...row, type: this.type });
|
||||||
|
},
|
||||||
|
handleCheck(row) {
|
||||||
|
this.$refs.DialogAudit && this.$refs.DialogAudit.init({ ...row, type: this.type });
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.$refs.DialogAdd && this.$refs.DialogAdd.init({ type: this.type });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
40
src/views/finance/expense/SearchForm.vue
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<template>
|
||||||
|
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||||
|
<el-form-item label="报销人:" label-width="90px">
|
||||||
|
<el-input v-model="searchForm.expenseUser" placeholder="请输入" clearable @change="$emit('update:value', searchForm)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销时间:">
|
||||||
|
<el-date-picker v-model="searchForm.expenseDate" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value: {
|
||||||
|
handler(val) {
|
||||||
|
this.searchForm = this.deepClone(val);
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
289
src/views/finance/expense/columns.js
Normal file
@@ -0,0 +1,289 @@
|
|||||||
|
export const defaultColumns = {
|
||||||
|
1: [{
|
||||||
|
key: 0,
|
||||||
|
prop: 'spotName',
|
||||||
|
label: `报名点`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
prop: 'expenseType',
|
||||||
|
label: `报销款项`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
prop: 'expenseTotal',
|
||||||
|
label: `报销金额`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
prop: 'applyUser',
|
||||||
|
label: `申请人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
prop: 'applyDate',
|
||||||
|
label: `申请时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'applyRemark',
|
||||||
|
label: `申请备注`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
prop: 'auditStatus',
|
||||||
|
label: `审批状态`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
prop: 'auditUser',
|
||||||
|
label: `审批人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 8,
|
||||||
|
prop: 'auditDate',
|
||||||
|
label: `审批时间`,
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
2: [{
|
||||||
|
key: 0,
|
||||||
|
prop: 'stuName',
|
||||||
|
label: `成交学员`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
prop: 'expenseType',
|
||||||
|
label: `报销款项`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
prop: 'expenseTotal',
|
||||||
|
label: `报销金额`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
prop: 'applyUser',
|
||||||
|
label: `申请人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
prop: 'applyDate',
|
||||||
|
label: `申请时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'applyRemark',
|
||||||
|
label: `申请备注`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
prop: 'auditStatus',
|
||||||
|
label: `审批状态`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
prop: 'auditUser',
|
||||||
|
label: `审批人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 8,
|
||||||
|
prop: 'auditDate',
|
||||||
|
label: `审批时间`,
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
3: [{
|
||||||
|
key: 0,
|
||||||
|
prop: 'shop',
|
||||||
|
label: `门店`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
prop: 'expenseType',
|
||||||
|
label: `报销人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
prop: 'expenseTotal',
|
||||||
|
label: `申请日期`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
prop: 'applyUser',
|
||||||
|
label: `成交班型`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
prop: 'applyDate',
|
||||||
|
label: `成交价格`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'applyDate1',
|
||||||
|
label: `实际入账`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
prop: 'applyDate1',
|
||||||
|
label: `手续费`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
prop: 'applyRemark',
|
||||||
|
label: `备注`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 8,
|
||||||
|
prop: 'auditStatus',
|
||||||
|
label: `审批状态`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 9,
|
||||||
|
prop: 'auditUser',
|
||||||
|
label: `审批人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 10,
|
||||||
|
prop: 'auditDate',
|
||||||
|
label: `审批时间`,
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
4: [{
|
||||||
|
key: 0,
|
||||||
|
prop: 'stuName',
|
||||||
|
label: `报销人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
prop: 'expenseType',
|
||||||
|
label: `报销款项`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
prop: 'applyDate',
|
||||||
|
label: `申请时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
prop: 'expenseTotal',
|
||||||
|
label: `报销金额`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
prop: 'applyUser',
|
||||||
|
label: `发票`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'applyRemark',
|
||||||
|
label: `备注`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
prop: 'auditStatus',
|
||||||
|
label: `审批状态`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
prop: 'auditUser',
|
||||||
|
label: `审批人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 8,
|
||||||
|
prop: 'auditDate',
|
||||||
|
label: `审批时间`,
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
5: [{
|
||||||
|
key: 0,
|
||||||
|
prop: 'stuName',
|
||||||
|
label: `报销人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
prop: 'expenseType',
|
||||||
|
label: `报销款项`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
prop: 'applyDate',
|
||||||
|
label: `申请时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
prop: 'applyUser',
|
||||||
|
label: `充值对公账号`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
prop: 'expenseTotal',
|
||||||
|
label: `报销金额`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'applyRemark',
|
||||||
|
label: `备注`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
prop: 'auditStatus',
|
||||||
|
label: `审批状态`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
prop: 'auditUser',
|
||||||
|
label: `审批人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 8,
|
||||||
|
prop: 'auditDate',
|
||||||
|
label: `审批时间`,
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
@@ -0,0 +1,151 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-if="show" title="账户充值报销" :visible.sync="show" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="报销人" prop="createUser">
|
||||||
|
<el-select v-model="form.createUser" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销项目" prop="expenseType">
|
||||||
|
<el-input v-model="form.expenseType" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日期" prop="expenseDate">
|
||||||
|
<el-date-picker v-model="form.expenseDate" value-format="yyyy-MM-dd" type="date" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="对公账户" prop="account">
|
||||||
|
<el-input v-model="form.account" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销金额" prop="money">
|
||||||
|
<el-input v-model="form.money" placeholder="请输入" type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span slot="footer">
|
||||||
|
<!--有权限 且 新增或修改时展示 -->
|
||||||
|
<!-- <el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(0)">保存</el-button> -->
|
||||||
|
<el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(1)">提交</el-button>
|
||||||
|
<!--有权限 且 审核时展示 -->
|
||||||
|
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(2)">通过</el-button>
|
||||||
|
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(3)">驳回</el-button>
|
||||||
|
<el-button @click="show = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { addExpense, updateExpense, checkExpense } from '@/api/finance/expense/accountExpense'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
userOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
showColumns: [],
|
||||||
|
userId: localStorage.getItem('userId'),
|
||||||
|
form: {
|
||||||
|
createUser: undefined,
|
||||||
|
expenseDate: undefined,
|
||||||
|
expenseType: undefined,
|
||||||
|
money: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
state: 0
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
createUser: { required: true, message: '请选择', trigger: 'blur' },
|
||||||
|
expenseType: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
expenseDate: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
money: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
account: { required: true, message: '请输入', trigger: 'blur' }
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(data) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetForm();
|
||||||
|
if (data) {
|
||||||
|
this.form = this.deepClone(data);
|
||||||
|
// this.$refs['form'].resetFields();
|
||||||
|
}
|
||||||
|
this.show = true
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.form = {
|
||||||
|
createUser: this.userId,
|
||||||
|
expenseDate: undefined,
|
||||||
|
expenseType: undefined,
|
||||||
|
money: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
state: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSave(state) {
|
||||||
|
this.form.state = state;
|
||||||
|
this.$refs.form.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
if (state == 1) {
|
||||||
|
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.handleExpenseSave();
|
||||||
|
})
|
||||||
|
.catch(function () { });
|
||||||
|
} else {
|
||||||
|
this.handleExpenseSave();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleExpenseSave() {
|
||||||
|
// 提交申请
|
||||||
|
if (this.form.expenseId) {
|
||||||
|
updateExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('修改成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('新增成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCheck(state) {
|
||||||
|
this.form.state = state;
|
||||||
|
checkExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('审核成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<template>
|
||||||
|
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||||
|
<el-form-item label="报销人:" label-width="90px">
|
||||||
|
<el-select v-model="searchForm.createUser" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销时间:">
|
||||||
|
<el-date-picker v-model="searchForm.createTimeRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
userOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value: {
|
||||||
|
handler(val) {
|
||||||
|
this.searchForm = this.deepClone(val);
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
export const defaultColumns = [{
|
||||||
|
key: 0,
|
||||||
|
prop: 'createUserName',
|
||||||
|
label: `姓名`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
prop: 'expenseType',
|
||||||
|
label: `报销项目`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
prop: 'expenseDate',
|
||||||
|
label: `日期`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
prop: 'account',
|
||||||
|
label: `充值对公账号`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
prop: 'money',
|
||||||
|
label: `报销金额`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'remark',
|
||||||
|
label: `备注`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
prop: 'createTime',
|
||||||
|
label: `申请时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
prop: 'state',
|
||||||
|
label: `审批状态`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 8,
|
||||||
|
prop: 'checkUser',
|
||||||
|
label: `审批人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 9,
|
||||||
|
prop: 'checkTime',
|
||||||
|
label: `审批时间`,
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
]
|
||||||
142
src/views/finance/expense/components/AccountExpense/index.vue
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<SearchForm v-show="showSearch" :value.sync="searchForm" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" />
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['finance:expense:account:add']" @click="handleDialog(null)">新增</el-button>
|
||||||
|
<el-button type="warning" icon="el-icon-download" v-hasPermi="['finance:expense:account:export']" @click="handleExport">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="tableList">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<template v-for="item in columns">
|
||||||
|
<el-table-column v-if="item.visible && item.prop != 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||||
|
<el-table-column v-if="item.visible && item.prop == 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-tag v-if="scope.row.state == 0">保存中</el-tag>
|
||||||
|
<el-tag type="warning" v-if="scope.row.state == 1">待审核</el-tag>
|
||||||
|
<el-tag type="success" v-if="scope.row.state == 2">已审核</el-tag>
|
||||||
|
<el-tag type="danger" v-if="scope.row.state == 3">驳回</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click="handleDialog(scope.row)">详情</el-button>
|
||||||
|
<el-button type="text" v-if="scope.row.state == 1" v-hasPermi="['finance:expense:account:check']" @click="handleDialog(scope.row)">审核</el-button>
|
||||||
|
<el-button type="text" v-if="scope.row.state == 0" v-hasPermi="['finance:expense:account:remove']" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||||
|
|
||||||
|
<AccountDialog ref="AccountDialog" @refreshDataList="_getTableList" :userOptions="userOptions" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import SearchForm from './SearchForm.vue';
|
||||||
|
import AccountDialog from './AccountDialog.vue';
|
||||||
|
import { defaultColumns } from './columns.js';
|
||||||
|
import empApi from '@/api/system/employee';
|
||||||
|
|
||||||
|
|
||||||
|
import { listExpense, removeExpense, exportExpense } from '@/api/finance/expense/accountExpense'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// name: "AccountExpense",
|
||||||
|
components: {
|
||||||
|
SearchForm, AccountDialog
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: '1'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {
|
||||||
|
createUser: undefined,
|
||||||
|
createTimeRange: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20
|
||||||
|
},
|
||||||
|
showSearch: true,
|
||||||
|
tableList: [],
|
||||||
|
total: 0,
|
||||||
|
columns: [],
|
||||||
|
userOptions: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
type: {
|
||||||
|
handler() {
|
||||||
|
this.columns = defaultColumns
|
||||||
|
this._getTableList();
|
||||||
|
this.getEmployee()
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _getTableList() {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
const params = { ...this.searchForm, ...tempForm };
|
||||||
|
// api.list(params)
|
||||||
|
listExpense(params).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.tableList = resp.rows
|
||||||
|
this.total = resp.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// this.tableList = [];
|
||||||
|
// for (let i = 0; i < 20; i++) {
|
||||||
|
// this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
handleDialog(row) {
|
||||||
|
this.$refs.AccountDialog && this.$refs.AccountDialog.init(row);
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
handleDelete(item) {
|
||||||
|
this.$confirm('是否确认删除该条报销(“' + item.expenseType + '/' + item.expenseDate + '”)?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
removeExpense(item.expenseId).then((resp) => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.$message.success('删除成功');
|
||||||
|
this._getTableList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(function () { });
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
this.$confirm('是否确认导出所查询报销信息项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
this.download('finance/expense/account/export', tempForm, `账户充值报销信息_${new Date().getTime()}.xlsx`);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getEmployee() {
|
||||||
|
empApi.getEmployee().then((resp) => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.userOptions = resp.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
@@ -0,0 +1,179 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-if="show" title="美团刷单报销" :visible.sync="show" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="门店" prop="shop">
|
||||||
|
<el-input v-model="form.shop" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销人" prop="createUser">
|
||||||
|
<el-select v-model="form.createUser" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日期" prop="expenseDate">
|
||||||
|
<el-date-picker v-model="form.expenseDate" value-format="yyyy-MM-dd" type="date" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成交班型" prop="signClass">
|
||||||
|
<el-input v-model="form.signClass" placeholder="请输入" />
|
||||||
|
|
||||||
|
<!-- <el-select v-model="form.typeId" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in classTypeOptions" :key="dict.typeId" :label="dict.schoolName +'-'+ dict.placeName +'-'+ dict.typeName" :value="dict.typeId" />
|
||||||
|
</el-select> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成交价格" prop="signPrice">
|
||||||
|
<el-input v-model="form.signPrice" placeholder="请输入" type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="实际入账" prop="actualEntry">
|
||||||
|
<el-input v-model="form.actualEntry" placeholder="请输入" type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手续费" prop="commission">
|
||||||
|
<el-input v-model="form.commission" placeholder="请输入" type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span slot="footer">
|
||||||
|
<!--有权限 且 新增或修改时展示 -->
|
||||||
|
<!-- <el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(0)">保存</el-button> -->
|
||||||
|
<el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(1)">提交</el-button>
|
||||||
|
<!--有权限 且 审核时展示 -->
|
||||||
|
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(2)">通过</el-button>
|
||||||
|
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(3)">驳回</el-button>
|
||||||
|
<el-button @click="show = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { addExpense, updateExpense, checkExpense } from '@/api/finance/expense/meituanExpense'
|
||||||
|
import { getClassTypeTableList } from '@/api/sch/classType';
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
userOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userId: localStorage.getItem('userId'),
|
||||||
|
show: false,
|
||||||
|
showColumns: [],
|
||||||
|
form: {
|
||||||
|
createUser: undefined,
|
||||||
|
expenseDate: undefined,
|
||||||
|
shop: undefined,
|
||||||
|
typeId: undefined,
|
||||||
|
signPrice: undefined,
|
||||||
|
actualEntry: undefined,
|
||||||
|
commission: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
state: 0
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
createUser: { required: true, message: '请选择', trigger: 'blur' },
|
||||||
|
shop: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
expenseDate: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
signClass: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
signPrice: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
actualEntry: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
commission: { required: true, message: '请输入', trigger: 'blur' }
|
||||||
|
},
|
||||||
|
classTypeOptions: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(data) {
|
||||||
|
this.getClassTypes()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetForm();
|
||||||
|
if (data) {
|
||||||
|
this.form = this.deepClone(data);
|
||||||
|
// this.$refs['form'].resetFields();
|
||||||
|
}
|
||||||
|
this.show = true
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.form = {
|
||||||
|
createUser: this.userId,
|
||||||
|
expenseDate: undefined,
|
||||||
|
shop: undefined,
|
||||||
|
typeId: undefined,
|
||||||
|
signPrice: undefined,
|
||||||
|
actualEntry: undefined,
|
||||||
|
commission: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
state: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSave(state) {
|
||||||
|
this.form.state = state;
|
||||||
|
this.$refs.form.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
if (state == 1) {
|
||||||
|
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.handleExpenseSave();
|
||||||
|
})
|
||||||
|
.catch(function () { });
|
||||||
|
} else {
|
||||||
|
this.handleExpenseSave();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleExpenseSave() {
|
||||||
|
// 提交申请
|
||||||
|
if (this.form.expenseId) {
|
||||||
|
updateExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('修改成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('新增成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCheck(state) {
|
||||||
|
this.form.state = state;
|
||||||
|
checkExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('审核成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getClassTypes() {
|
||||||
|
getClassTypeTableList({}).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.classTypeOptions = resp.rows;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||||
|
<el-form-item label="门店" label-width="90px">
|
||||||
|
<el-input v-model="searchForm.shop" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销人:" label-width="90px">
|
||||||
|
<el-select v-model="searchForm.createUser" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销时间:">
|
||||||
|
<el-date-picker v-model="searchForm.createTimeRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
userOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value: {
|
||||||
|
handler(val) {
|
||||||
|
this.searchForm = this.deepClone(val);
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
export const defaultColumns = [{
|
||||||
|
key: 0,
|
||||||
|
prop: 'shop',
|
||||||
|
label: `门店`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
prop: 'createUserName',
|
||||||
|
label: `报销人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
prop: 'expenseDate',
|
||||||
|
label: `日期`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
prop: 'signClass',
|
||||||
|
label: `成交班型`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
prop: 'signPrice',
|
||||||
|
label: `报销金额`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'actualEntry',
|
||||||
|
label: `实际入账`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
prop: 'commission',
|
||||||
|
label: `手续费`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'remark',
|
||||||
|
label: `备注`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
prop: 'createTime',
|
||||||
|
label: `申请时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 8,
|
||||||
|
prop: 'state',
|
||||||
|
label: `审批状态`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 9,
|
||||||
|
prop: 'checkUser',
|
||||||
|
label: `审批人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 10,
|
||||||
|
prop: 'checkTime',
|
||||||
|
label: `审批时间`,
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
]
|
||||||
143
src/views/finance/expense/components/MeituanExpense/index.vue
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<SearchForm v-show="showSearch" :value.sync="searchForm" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" />
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['finance:expense:meituan:add']" @click="handleDialog(null)">新增</el-button>
|
||||||
|
<el-button type="warning" icon="el-icon-download" v-hasPermi="['finance:expense:meituan:export']" @click="handleExport">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="tableList">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<template v-for="item in columns">
|
||||||
|
<el-table-column v-if="item.visible && item.prop != 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||||
|
<el-table-column v-if="item.visible && item.prop == 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.state == 0">保存中</el-tag>
|
||||||
|
<el-tag type="warning" v-if="scope.row.state == 1">待审核</el-tag>
|
||||||
|
<el-tag type="success" v-if="scope.row.state == 2">已审核</el-tag>
|
||||||
|
<el-tag type="danger" v-if="scope.row.state == 3">驳回</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click="handleDialog(scope.row)">详情</el-button>
|
||||||
|
<el-button type="text" v-if="scope.row.state == 1" v-hasPermi="['finance:expense:meituan:check']" @click="handleDialog(scope.row)">审核</el-button>
|
||||||
|
<el-button type="text" v-if="scope.row.state == 0" v-hasPermi="['finance:expense:meituan:remove']" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||||
|
|
||||||
|
<MeituanDialog ref="MeituanDialog" @refreshDataList="_getTableList" :userOptions="userOptions" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import SearchForm from './SearchForm.vue';
|
||||||
|
import MeituanDialog from './MeituanDialog.vue';
|
||||||
|
import { defaultColumns } from './columns.js';
|
||||||
|
import empApi from '@/api/system/employee';
|
||||||
|
|
||||||
|
|
||||||
|
import { listExpense, removeExpense, exportExpense } from '@/api/finance/expense/meituanExpense'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// name: "AccountExpense",
|
||||||
|
components: {
|
||||||
|
SearchForm, MeituanDialog
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: '1'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {
|
||||||
|
createUser: undefined,
|
||||||
|
createTimeRange: [],
|
||||||
|
shop: undefined,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20
|
||||||
|
},
|
||||||
|
showSearch: true,
|
||||||
|
tableList: [],
|
||||||
|
total: 0,
|
||||||
|
columns: [],
|
||||||
|
userOptions: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
type: {
|
||||||
|
handler() {
|
||||||
|
this.columns = defaultColumns
|
||||||
|
this._getTableList();
|
||||||
|
this.getEmployee()
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _getTableList() {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
const params = { ...this.searchForm, ...tempForm };
|
||||||
|
// api.list(params)
|
||||||
|
listExpense(params).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.tableList = resp.rows
|
||||||
|
this.total = resp.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// this.tableList = [];
|
||||||
|
// for (let i = 0; i < 20; i++) {
|
||||||
|
// this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
handleDialog(row) {
|
||||||
|
this.$refs.MeituanDialog && this.$refs.MeituanDialog.init(row);
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
handleDelete(item) {
|
||||||
|
this.$confirm('是否确认删除该条报销(“' + item.shop + '/' + item.expenseDate + '”)?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
removeExpense(item.expenseId).then((resp) => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.$message.success('删除成功');
|
||||||
|
this._getTableList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(function () { });
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
this.$confirm('是否确认导出所查询报销信息项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
this.download('finance/expense/meituan/export', tempForm, `美团刷单报销信息_${new Date().getTime()}.xlsx`);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getEmployee() {
|
||||||
|
empApi.getEmployee().then((resp) => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.userOptions = resp.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
@@ -0,0 +1,190 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-if="show" title="办公费用报销" :visible.sync="show" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="报销人" prop="createUser">
|
||||||
|
<el-select v-model="form.createUser" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销项目" prop="expenseType">
|
||||||
|
<el-input v-model="form.expenseType" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日期" prop="expenseDate">
|
||||||
|
<el-date-picker v-model="form.expenseDate" value-format="yyyy-MM-dd" type="date" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销金额" prop="money">
|
||||||
|
<el-input v-model="form.money" placeholder="请输入" type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发票" prop="files">
|
||||||
|
<el-upload class="avatar-uploader" accept="image/*" action="https://jsonplaceholder.typicode.com/posts/" :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
|
||||||
|
<img v-if="form.files" :src="form.files" class="avatar">
|
||||||
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span slot="footer">
|
||||||
|
<!--有权限 且 新增或修改时展示 -->
|
||||||
|
<!-- <el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(0)">保存</el-button> -->
|
||||||
|
<el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(1)">提交</el-button>
|
||||||
|
<!--有权限 且 审核时展示 -->
|
||||||
|
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(2)">通过</el-button>
|
||||||
|
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(3)">驳回</el-button>
|
||||||
|
<el-button @click="show = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { addExpense, updateExpense, checkExpense } from '@/api/finance/expense/officeExpense'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
userOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
showColumns: [],
|
||||||
|
form: {
|
||||||
|
createUser: undefined,
|
||||||
|
expenseDate: undefined,
|
||||||
|
expenseType: undefined,
|
||||||
|
money: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
files: undefined,
|
||||||
|
state: 0
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
createUser: { required: true, message: '请选择', trigger: 'blur' },
|
||||||
|
expenseType: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
expenseDate: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
money: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
account: { required: true, message: '请输入', trigger: 'blur' }
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(data) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetForm();
|
||||||
|
if (data) {
|
||||||
|
this.form = this.deepClone(data);
|
||||||
|
// this.$refs['form'].resetFields();
|
||||||
|
}
|
||||||
|
this.show = true
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.form = {
|
||||||
|
createUser: undefined,
|
||||||
|
expenseDate: undefined,
|
||||||
|
expenseType: undefined,
|
||||||
|
money: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
state: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSave(state) {
|
||||||
|
this.form.state = state;
|
||||||
|
this.$refs.form.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
if (state == 1) {
|
||||||
|
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.handleExpenseSave();
|
||||||
|
})
|
||||||
|
.catch(function () { });
|
||||||
|
} else {
|
||||||
|
this.handleExpenseSave();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleExpenseSave() {
|
||||||
|
// 提交申请
|
||||||
|
if (this.form.expenseId) {
|
||||||
|
updateExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('修改成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('新增成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCheck(state) {
|
||||||
|
this.form.state = state;
|
||||||
|
checkExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('审核成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleAvatarSuccess(res, file) {
|
||||||
|
console.log(file)
|
||||||
|
this.form.files = URL.createObjectURL(file.raw);
|
||||||
|
},
|
||||||
|
beforeAvatarUpload(file) {
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 10;
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.$message.error('上传文件大小不能超过 10MB!');
|
||||||
|
}
|
||||||
|
return isLt2M;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.avatar-uploader .el-upload {
|
||||||
|
border: 1px dashed #d9d9d9;
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.avatar-uploader .el-upload:hover {
|
||||||
|
border-color: #409eff;
|
||||||
|
}
|
||||||
|
.avatar-uploader-icon {
|
||||||
|
font-size: 28px;
|
||||||
|
color: #8c939d;
|
||||||
|
width: 178px;
|
||||||
|
height: 178px;
|
||||||
|
line-height: 178px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.avatar {
|
||||||
|
width: 178px;
|
||||||
|
height: 178px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<template>
|
||||||
|
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||||
|
<el-form-item label="报销人:" label-width="90px">
|
||||||
|
<el-select v-model="searchForm.createUser" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销时间:">
|
||||||
|
<el-date-picker v-model="searchForm.createTimeRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
userOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value: {
|
||||||
|
handler(val) {
|
||||||
|
this.searchForm = this.deepClone(val);
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
export const defaultColumns = [{
|
||||||
|
key: 0,
|
||||||
|
prop: 'createUserName',
|
||||||
|
label: `报销人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
prop: 'expenseType',
|
||||||
|
label: `报销项目`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
prop: 'expenseDate',
|
||||||
|
label: `日期`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
prop: 'money',
|
||||||
|
label: `金额`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
prop: 'remark',
|
||||||
|
label: `备注`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'createTime',
|
||||||
|
label: `申请时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
prop: 'state',
|
||||||
|
label: `审批状态`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
prop: 'checkUser',
|
||||||
|
label: `审批人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 8,
|
||||||
|
prop: 'checkTime',
|
||||||
|
label: `审批时间`,
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
]
|
||||||
142
src/views/finance/expense/components/OfficeExpense/index.vue
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<SearchForm v-show="showSearch" :value.sync="searchForm" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" />
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['finance:expense:meituan:add']" @click="handleDialog(null)">新增</el-button>
|
||||||
|
<el-button type="warning" icon="el-icon-download" v-hasPermi="['finance:expense:meituan:export']" @click="handleExport">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="tableList">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<template v-for="item in columns">
|
||||||
|
<el-table-column v-if="item.visible && item.prop != 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||||
|
<el-table-column v-if="item.visible && item.prop == 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-tag v-if="scope.row.state == 0">保存中</el-tag>
|
||||||
|
<el-tag type="warning" v-if="scope.row.state == 1">待审核</el-tag>
|
||||||
|
<el-tag type="success" v-if="scope.row.state == 2">已审核</el-tag>
|
||||||
|
<el-tag type="danger" v-if="scope.row.state == 3">驳回</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click="handleDialog(scope.row)">详情</el-button>
|
||||||
|
<el-button type="text" v-if="scope.row.state == 1" v-hasPermi="['finance:expense:meituan:check']" @click="handleDialog(scope.row)">审核</el-button>
|
||||||
|
<el-button type="text" v-if="scope.row.state == 0" v-hasPermi="['finance:expense:meituan:remove']" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||||
|
|
||||||
|
<OfficeDialog ref="OfficeDialog" @refreshDataList="_getTableList" :userOptions="userOptions" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import SearchForm from './SearchForm.vue';
|
||||||
|
import OfficeDialog from './OfficeDialog.vue';
|
||||||
|
import { defaultColumns } from './columns.js';
|
||||||
|
import empApi from '@/api/system/employee';
|
||||||
|
|
||||||
|
|
||||||
|
import { listExpense, removeExpense, exportExpense } from '@/api/finance/expense/officeExpense'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// name: "AccountExpense",
|
||||||
|
components: {
|
||||||
|
SearchForm, OfficeDialog
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: '1'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {
|
||||||
|
createUser: undefined,
|
||||||
|
createTimeRange: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20
|
||||||
|
},
|
||||||
|
showSearch: true,
|
||||||
|
tableList: [],
|
||||||
|
total: 0,
|
||||||
|
columns: [],
|
||||||
|
userOptions: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
type: {
|
||||||
|
handler() {
|
||||||
|
this.columns = defaultColumns
|
||||||
|
this._getTableList();
|
||||||
|
this.getEmployee()
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _getTableList() {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
const params = { ...this.searchForm, ...tempForm };
|
||||||
|
// api.list(params)
|
||||||
|
listExpense(params).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.tableList = resp.rows
|
||||||
|
this.total = resp.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// this.tableList = [];
|
||||||
|
// for (let i = 0; i < 20; i++) {
|
||||||
|
// this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
handleDialog(row) {
|
||||||
|
this.$refs.OfficeDialog && this.$refs.OfficeDialog.init(row);
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
handleDelete(item) {
|
||||||
|
this.$confirm('是否确认删除该条报销(“' + item.expenseType + '/' + item.expenseDate + '”)?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
removeExpense(item.expenseId).then((resp) => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.$message.success('删除成功');
|
||||||
|
this._getTableList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(function () { });
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
this.$confirm('是否确认导出所查询报销信息项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
this.download('finance/expense/office/export', tempForm, `办公费用报销信息_${new Date().getTime()}.xlsx`);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getEmployee() {
|
||||||
|
empApi.getEmployee().then((resp) => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.userOptions = resp.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-if="show" title="报名点报销" :visible.sync="show" width="600px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="检索">
|
||||||
|
<el-autocomplete v-model="searchValue" :fetch-suggestions="querySearchAsync" style="width: 100%;" placeholder="请输入姓名/联系方式进行学员检索" @select="handleSelect">
|
||||||
|
<template slot-scope="{ item }">
|
||||||
|
<span class="name">{{ item.name }}</span>
|
||||||
|
<span class="addr">{{ item.phone }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="姓名" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系方式" prop="phone">
|
||||||
|
<el-input v-model="form.phone" placeholder="请输入" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报名时间" prop="dealDate">
|
||||||
|
<el-date-picker v-model="form.dealDate" value-format="yyyy-MM-dd" type="date" disabled></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成交价格" prop="signPrice">
|
||||||
|
<el-input v-model="form.signPrice" placeholder="请输入" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报名驾校" prop="schoolName">
|
||||||
|
<el-input v-model="form.schoolName" placeholder="请输入" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="班型" prop="className">
|
||||||
|
<el-input v-model="form.className" placeholder="请输入" type="number" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="利润" prop="profit">
|
||||||
|
<el-input v-model="form.profit" placeholder="请输入" type="number" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="额外支出项目" prop="expenseType">
|
||||||
|
<el-select v-model="form.expenseType" placeholder="请选择" filterable clearable disabled>
|
||||||
|
<el-option v-for="dict in extraOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="额外支出金额" prop="money">
|
||||||
|
<el-input v-model="form.money" placeholder="请输入" type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="学员归属" prop="followUser">
|
||||||
|
<el-select v-model="form.followUser" placeholder="请选择" filterable clearable disabled>
|
||||||
|
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span slot="footer">
|
||||||
|
<!--有权限 且 新增或修改时展示 -->
|
||||||
|
<!-- <el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(0)">保存</el-button> -->
|
||||||
|
<el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(1)">提交</el-button>
|
||||||
|
<!--有权限 且 审核时展示 -->
|
||||||
|
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(2)">通过</el-button>
|
||||||
|
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(3)">驳回</el-button>
|
||||||
|
<el-button @click="show = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { addExpense, updateExpense, checkExpense } from '@/api/finance/expense/signExpense'
|
||||||
|
import { listSign } from '@/api/zs/placeSign'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
userOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
extraOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
showColumns: [],
|
||||||
|
searchValue: undefined,
|
||||||
|
form: {
|
||||||
|
signId: undefined,
|
||||||
|
expenseType: undefined,
|
||||||
|
money: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
state: 0,
|
||||||
|
// 登记信息
|
||||||
|
name: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
dealDate: undefined,
|
||||||
|
signPrice: undefined,
|
||||||
|
schoolName: undefined,
|
||||||
|
className: undefined,
|
||||||
|
profit: undefined
|
||||||
|
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
phone: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
expenseType: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
money: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
},
|
||||||
|
restaurants: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(data) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetForm();
|
||||||
|
if (data) {
|
||||||
|
this.form = this.deepClone(data);
|
||||||
|
// this.$refs['form'].resetFields();
|
||||||
|
}
|
||||||
|
this.show = true
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.form = {
|
||||||
|
signId: undefined,
|
||||||
|
expenseType: undefined,
|
||||||
|
money: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
state: 0,
|
||||||
|
name: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
dealDate: undefined,
|
||||||
|
signPrice: undefined,
|
||||||
|
schoolName: undefined,
|
||||||
|
className: undefined,
|
||||||
|
profit: undefined
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//检索查询登记信息
|
||||||
|
async querySearchAsync(queryString, cb) {
|
||||||
|
if (queryString) {
|
||||||
|
const resp = listSign({
|
||||||
|
name: queryString
|
||||||
|
});
|
||||||
|
cb(resp.rows);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//选择对应的查询结果
|
||||||
|
handleSelect(item) {
|
||||||
|
this.$set(this.form, "signId", item.signId);
|
||||||
|
this.$set(this.form, "name", item.name);
|
||||||
|
this.$set(this.form, "phone", item.phone);
|
||||||
|
this.$set(this.form, "dealDate", item.dealDate);
|
||||||
|
this.$set(this.form, "signPrice", item.signPrice);
|
||||||
|
this.$set(this.form, "schoolName", item.schoolName);
|
||||||
|
this.$set(this.form, "className", item.className);
|
||||||
|
this.$set(this.form, "profit", item.profit);
|
||||||
|
},
|
||||||
|
handleSave(state) {
|
||||||
|
this.form.state = state;
|
||||||
|
this.$refs.form.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
if (state == 1) {
|
||||||
|
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.handleExpenseSave();
|
||||||
|
})
|
||||||
|
.catch(function () { });
|
||||||
|
} else {
|
||||||
|
this.handleExpenseSave();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleExpenseSave() {
|
||||||
|
// 提交申请
|
||||||
|
if (this.form.expenseId) {
|
||||||
|
updateExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('修改成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('新增成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCheck(state) {
|
||||||
|
this.form.state = state;
|
||||||
|
checkExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('审核成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<template>
|
||||||
|
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||||
|
<el-form-item label="报名点:" label-width="90px">
|
||||||
|
<el-select v-model="searchForm.signPlace" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in signPlaceOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销人:" label-width="90px">
|
||||||
|
<el-select v-model="searchForm.createUser" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销时间:">
|
||||||
|
<el-date-picker v-model="searchForm.createTimeRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
userOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
signPlaceOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value: {
|
||||||
|
handler(val) {
|
||||||
|
this.searchForm = this.deepClone(val);
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
export const defaultColumns = [{
|
||||||
|
key: 0,
|
||||||
|
prop: 'signPlace',
|
||||||
|
label: `报名点`,
|
||||||
|
visible: true
|
||||||
|
}, {
|
||||||
|
key: 1,
|
||||||
|
prop: 'name',
|
||||||
|
label: `姓名`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
prop: 'phone',
|
||||||
|
label: `联系方式`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
prop: 'dealDate',
|
||||||
|
label: `报名时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
prop: 'signPrice',
|
||||||
|
label: `成交价`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'className',
|
||||||
|
label: `班型`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
prop: 'schoolName',
|
||||||
|
label: `报名驾校`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
prop: 'profit',
|
||||||
|
label: `利润`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 8,
|
||||||
|
prop: 'expenseType',
|
||||||
|
label: `额外支出项目`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 9,
|
||||||
|
prop: 'money',
|
||||||
|
label: `额外支出金额`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 10,
|
||||||
|
prop: 'followUserName',
|
||||||
|
label: `学员归属`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 11,
|
||||||
|
prop: 'remark',
|
||||||
|
label: `备注`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 12,
|
||||||
|
prop: 'createTime',
|
||||||
|
label: `申请时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 13,
|
||||||
|
prop: 'state',
|
||||||
|
label: `审批状态`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 14,
|
||||||
|
prop: 'checkUser',
|
||||||
|
label: `审批人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 15,
|
||||||
|
prop: 'checkTime',
|
||||||
|
label: `审批时间`,
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
]
|
||||||
155
src/views/finance/expense/components/PlaceSignExpense/index.vue
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<SearchForm v-show="showSearch" :value.sync="searchForm" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" :signPlaceOptions="signPlaceOptions" />
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['finance:expense:placeSign:add']" @click="handleDialog(null)">新增</el-button>
|
||||||
|
<el-button type="warning" icon="el-icon-download" v-hasPermi="['finance:expense:placeSign:export']" @click="handleExport">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="tableList">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<template v-for="item in columns">
|
||||||
|
<el-table-column v-if="item.visible && item.prop != 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||||
|
<el-table-column v-if="item.visible && item.prop == 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-tag v-if="scope.row.state == 0">保存中</el-tag>
|
||||||
|
<el-tag type="warning" v-if="scope.row.state == 1">待审核</el-tag>
|
||||||
|
<el-tag type="success" v-if="scope.row.state == 2">已审核</el-tag>
|
||||||
|
<el-tag type="danger" v-if="scope.row.state == 3">驳回</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click="handleDialog(scope.row)">详情</el-button>
|
||||||
|
<el-button type="text" v-if="scope.row.state == 1" v-hasPermi="['finance:expense:placeSign:check']" @click="handleDialog(scope.row)">审核</el-button>
|
||||||
|
<el-button type="text" v-if="scope.row.state == 0" v-hasPermi="['finance:expense:placeSign:remove']" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||||
|
|
||||||
|
<PlaceSignDialog ref="PlaceSignDialog" @refreshDataList="_getTableList" :userOptions="userOptions" :extraOptions="extraOptions" :signPlaceOptions="signPlaceOptions" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import SearchForm from './SearchForm.vue';
|
||||||
|
import PlaceSignDialog from './PlaceSignDialog.vue';
|
||||||
|
import { defaultColumns } from './columns.js';
|
||||||
|
import empApi from '@/api/system/employee';
|
||||||
|
|
||||||
|
import { listExpense, removeExpense, exportExpense } from '@/api/finance/expense/placeSignExpense'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// name: "AccountExpense",
|
||||||
|
components: {
|
||||||
|
SearchForm, PlaceSignDialog
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: '1'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {
|
||||||
|
createUser: undefined,
|
||||||
|
createTimeRange: [],
|
||||||
|
signPlace: undefined,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20
|
||||||
|
},
|
||||||
|
showSearch: true,
|
||||||
|
tableList: [],
|
||||||
|
total: 0,
|
||||||
|
columns: [],
|
||||||
|
userOptions: [],
|
||||||
|
extraOptions: [],
|
||||||
|
signPlaceOptions: []
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
type: {
|
||||||
|
handler() {
|
||||||
|
this.columns = defaultColumns
|
||||||
|
this._getTableList();
|
||||||
|
this.getEmployee()
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 额外支出
|
||||||
|
this.getDicts('dm_extra_pay').then((response) => {
|
||||||
|
this.extraOptions = response.data;
|
||||||
|
});
|
||||||
|
// 报名点
|
||||||
|
this.getDicts('sign_place').then((response) => {
|
||||||
|
this.signPlaceOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _getTableList() {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
const params = { ...this.searchForm, ...tempForm };
|
||||||
|
// api.list(params)
|
||||||
|
listExpense(params).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.tableList = resp.rows
|
||||||
|
this.total = resp.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// this.tableList = [];
|
||||||
|
// for (let i = 0; i < 20; i++) {
|
||||||
|
// this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
handleDialog(row) {
|
||||||
|
this.$refs.PlaceSignDialog && this.$refs.PlaceSignDialog.init(row);
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
handleDelete(item) {
|
||||||
|
this.$confirm('是否确认删除该条线索(“' + item.expenseType + '/' + item.expenseDate + '”)?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
removeExpense(item.expenseId).then((resp) => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.$message.success('删除成功');
|
||||||
|
this._getTableList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(function () { });
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
this.$confirm('是否确认导出所查询学员信息项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
this.download('finance/expense/account/export', tempForm, `账户充值报销信息_${new Date().getTime()}.xlsx`);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getEmployee() {
|
||||||
|
empApi.getEmployee().then((resp) => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.userOptions = resp.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<template>
|
||||||
|
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||||
|
<el-form-item label="报销人:" label-width="90px">
|
||||||
|
<el-select v-model="searchForm.createUser" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报销时间:">
|
||||||
|
<el-date-picker v-model="searchForm.createTimeRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
userOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value: {
|
||||||
|
handler(val) {
|
||||||
|
this.searchForm = this.deepClone(val);
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
217
src/views/finance/expense/components/SignExpense/SignDialog.vue
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-if="show" title="成交登记报销" :visible.sync="show" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="检索">
|
||||||
|
<el-autocomplete v-model="searchValue" :fetch-suggestions="querySearchAsync" style="width: 100%;" placeholder="请输入姓名/联系方式进行学员检索" :trigger-on-focus="false" @select="handleSelect">
|
||||||
|
<template slot-scope="{ item }">
|
||||||
|
<span class="name">{{ item.name }}</span>
|
||||||
|
<span class="addr">/{{ item.phone }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="姓名" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系方式" prop="phone">
|
||||||
|
<el-input v-model="form.phone" placeholder="请输入" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报名时间" prop="dealDate">
|
||||||
|
<el-date-picker v-model="form.dealDate" value-format="yyyy-MM-dd" type="date" disabled></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成交价格" prop="signPrice">
|
||||||
|
<el-input v-model="form.signPrice" placeholder="请输入" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报名驾校" prop="schoolName">
|
||||||
|
<el-input v-model="form.schoolName" placeholder="请输入" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="班型" prop="className">
|
||||||
|
<el-input v-model="form.className" placeholder="请输入" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="利润" prop="profit">
|
||||||
|
<el-input v-model="form.profit" placeholder="请输入" type="number" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="额外支出项目" prop="expenseType">
|
||||||
|
<el-select v-model="form.expenseType" placeholder="请选择" filterable clearable>
|
||||||
|
<el-option v-for="dict in extraOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="额外支出金额" prop="money">
|
||||||
|
<el-input v-model="form.money" placeholder="请输入" type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="学员归属" prop="followUser">
|
||||||
|
<el-select v-model="form.followUser" placeholder="请选择" multiple filterable clearable disabled>
|
||||||
|
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span slot="footer">
|
||||||
|
<!--有权限 且 新增或修改时展示 -->
|
||||||
|
<!-- <el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(0)">保存</el-button> -->
|
||||||
|
<el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(1)">提交</el-button>
|
||||||
|
<!--有权限 且 审核时展示 -->
|
||||||
|
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(2)">通过</el-button>
|
||||||
|
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(3)">驳回</el-button>
|
||||||
|
<el-button @click="show = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { addExpense, updateExpense, checkExpense } from '@/api/finance/expense/signExpense'
|
||||||
|
import { getSignList } from '@/api/zs/sign'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
userOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
extraOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
showColumns: [],
|
||||||
|
searchValue: undefined,
|
||||||
|
form: {
|
||||||
|
signId: undefined,
|
||||||
|
expenseType: undefined,
|
||||||
|
money: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
state: 0,
|
||||||
|
// 登记信息
|
||||||
|
name: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
dealDate: undefined,
|
||||||
|
signPrice: undefined,
|
||||||
|
schoolName: undefined,
|
||||||
|
className: undefined,
|
||||||
|
profit: undefined
|
||||||
|
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
phone: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
expenseType: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
money: { required: true, message: '请输入', trigger: 'blur' },
|
||||||
|
},
|
||||||
|
restaurants: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(data) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetForm();
|
||||||
|
if (data) {
|
||||||
|
this.form = this.deepClone(data);
|
||||||
|
// this.$refs['form'].resetFields();
|
||||||
|
}
|
||||||
|
this.show = true
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.form = {
|
||||||
|
signId: undefined,
|
||||||
|
expenseType: undefined,
|
||||||
|
money: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
state: 0,
|
||||||
|
name: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
dealDate: undefined,
|
||||||
|
signPrice: undefined,
|
||||||
|
schoolName: undefined,
|
||||||
|
className: undefined,
|
||||||
|
profit: undefined
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//检索查询登记信息
|
||||||
|
async querySearchAsync(queryString, cb) {
|
||||||
|
if (queryString) {
|
||||||
|
const resp = await getSignList({
|
||||||
|
name: queryString
|
||||||
|
});
|
||||||
|
cb(resp.rows);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//选择对应的查询结果
|
||||||
|
handleSelect(item) {
|
||||||
|
this.$set(this.form, "signId", item.signId);
|
||||||
|
this.$set(this.form, "name", item.name);
|
||||||
|
this.$set(this.form, "phone", item.phone);
|
||||||
|
this.$set(this.form, "dealDate", item.dealDate);
|
||||||
|
this.$set(this.form, "signPrice", item.signPrice);
|
||||||
|
this.$set(this.form, "schoolName", item.schoolName);
|
||||||
|
this.$set(this.form, "className", item.className);
|
||||||
|
this.$set(this.form, "profit", item.profit);
|
||||||
|
this.$set(this.form, "followUser", item.followUser);
|
||||||
|
},
|
||||||
|
handleSave(state) {
|
||||||
|
this.form.state = state;
|
||||||
|
this.$refs.form.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
if (state == 1) {
|
||||||
|
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.handleExpenseSave();
|
||||||
|
})
|
||||||
|
.catch(function () { });
|
||||||
|
} else {
|
||||||
|
this.handleExpenseSave();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleExpenseSave() {
|
||||||
|
// 提交申请
|
||||||
|
if (this.form.expenseId) {
|
||||||
|
updateExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('修改成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('新增成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCheck(state) {
|
||||||
|
this.form.state = state;
|
||||||
|
checkExpense(this.form).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('审核成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
91
src/views/finance/expense/components/SignExpense/columns.js
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
export const defaultColumns = [{
|
||||||
|
key: 0,
|
||||||
|
prop: 'name',
|
||||||
|
label: `姓名`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
prop: 'phone',
|
||||||
|
label: `联系方式`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
prop: 'dealDate',
|
||||||
|
label: `报名时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
prop: 'signPrice',
|
||||||
|
label: `成交价`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
prop: 'className',
|
||||||
|
label: `班型`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
prop: 'schoolName',
|
||||||
|
label: `报名驾校`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
prop: 'profit',
|
||||||
|
label: `利润`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
prop: 'expenseType',
|
||||||
|
label: `额外支出项目`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 8,
|
||||||
|
prop: 'money',
|
||||||
|
label: `额外支出金额`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 9,
|
||||||
|
prop: 'followUserName',
|
||||||
|
label: `学员归属`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 10,
|
||||||
|
prop: 'remark',
|
||||||
|
label: `备注`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 11,
|
||||||
|
prop: 'createTime',
|
||||||
|
label: `申请时间`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 12,
|
||||||
|
prop: 'state',
|
||||||
|
label: `审批状态`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 13,
|
||||||
|
prop: 'checkUser',
|
||||||
|
label: `审批人`,
|
||||||
|
visible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 14,
|
||||||
|
prop: 'checkTime',
|
||||||
|
label: `审批时间`,
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
]
|
||||||
149
src/views/finance/expense/components/SignExpense/index.vue
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<SearchForm v-show="showSearch" :value.sync="searchForm" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" />
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['finance:expense:meituan:add']" @click="handleDialog(null)">新增</el-button>
|
||||||
|
<el-button type="warning" icon="el-icon-download" v-hasPermi="['finance:expense:meituan:export']" @click="handleExport">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="tableList">
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<template v-for="item in columns">
|
||||||
|
<el-table-column v-if="item.visible && item.prop != 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||||
|
<el-table-column v-if="item.visible && item.prop == 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-tag v-if="scope.row.state == 0">保存中</el-tag>
|
||||||
|
<el-tag type="warning" v-if="scope.row.state == 1">待审核</el-tag>
|
||||||
|
<el-tag type="success" v-if="scope.row.state == 2">已审核</el-tag>
|
||||||
|
<el-tag type="danger" v-if="scope.row.state == 3">驳回</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click="handleDialog(scope.row)">详情</el-button>
|
||||||
|
<el-button type="text" v-if="scope.row.state == 1" v-hasPermi="['finance:expense:meituan:check']" @click="handleDialog(scope.row)">审核</el-button>
|
||||||
|
<el-button type="text" v-if="scope.row.state == 0" v-hasPermi="['finance:expense:meituan:remove']" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||||
|
|
||||||
|
<SignDialog ref="SignDialog" @refreshDataList="_getTableList" :userOptions="userOptions" :extraOptions="extraOptions" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import SearchForm from './SearchForm.vue';
|
||||||
|
import SignDialog from './SignDialog.vue';
|
||||||
|
import { defaultColumns } from './columns.js';
|
||||||
|
import empApi from '@/api/system/employee';
|
||||||
|
|
||||||
|
|
||||||
|
import { listExpense, removeExpense, exportExpense } from '@/api/finance/expense/signExpense'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// name: "AccountExpense",
|
||||||
|
components: {
|
||||||
|
SearchForm, SignDialog
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: '1'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {
|
||||||
|
createUser: undefined,
|
||||||
|
createTimeRange: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20
|
||||||
|
},
|
||||||
|
showSearch: true,
|
||||||
|
tableList: [],
|
||||||
|
total: 0,
|
||||||
|
columns: [],
|
||||||
|
userOptions: [],
|
||||||
|
extraOptions: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
type: {
|
||||||
|
handler() {
|
||||||
|
this.columns = defaultColumns
|
||||||
|
this._getTableList();
|
||||||
|
this.getEmployee()
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 额外支出
|
||||||
|
this.getDicts('dm_extra_pay').then((response) => {
|
||||||
|
this.extraOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _getTableList() {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
const params = { ...this.searchForm, ...tempForm };
|
||||||
|
// api.list(params)
|
||||||
|
listExpense(params).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.tableList = resp.rows
|
||||||
|
this.total = resp.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// this.tableList = [];
|
||||||
|
// for (let i = 0; i < 20; i++) {
|
||||||
|
// this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
handleDialog(row) {
|
||||||
|
this.$refs.SignDialog && this.$refs.SignDialog.init(row);
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
handleDelete(item) {
|
||||||
|
this.$confirm('是否确认删除该条线索(“' + item.expenseType + '/' + item.expenseDate + '”)?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
removeExpense(item.expenseId).then((resp) => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.$message.success('删除成功');
|
||||||
|
this._getTableList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(function () { });
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
this.$confirm('是否确认导出所查询学员信息项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
this.download('finance/expense/account/export', tempForm, `账户充值报销信息_${new Date().getTime()}.xlsx`);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getEmployee() {
|
||||||
|
empApi.getEmployee().then((resp) => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.userOptions = resp.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p20">
|
||||||
|
<el-tabs v-model="expenseType" tab-position="left">
|
||||||
|
<el-tab-pane label="报名点报销" v-hasPermi="['finance:expense:signPlace']" name="1">
|
||||||
|
<PlaceSignExpense v-if="expenseType==1" :type="expenseType" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="学员成交报销" v-hasPermi="['finance:expense:sign']" name="2">
|
||||||
|
<SignExpense v-if="expenseType==2" :type="expenseType" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="美团刷单报销" v-hasPermi="['finance:expense:meituan']" name="3">
|
||||||
|
<MeituanExpense v-if="expenseType==3" :type="expenseType" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="办公费用报销" v-hasPermi="['finance:expense:office']" name="4">
|
||||||
|
<OfficeExpense v-if="expenseType==4" :type="expenseType" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="账户充值报销" v-hasPermi="['finance:expense:account']" name="5">
|
||||||
|
<AccountExpense v-if="expenseType==5" :type="expenseType" />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import RightPane from './RightPane';
|
||||||
|
import SignExpense from './components/SignExpense'
|
||||||
|
import PlaceSignExpense from './components/PlaceSignExpense'
|
||||||
|
import OfficeExpense from './components/OfficeExpense'
|
||||||
|
|
||||||
|
import AccountExpense from './components/AccountExpense'
|
||||||
|
import MeituanExpense from './components/MeituanExpense'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
RightPane, AccountExpense, MeituanExpense, OfficeExpense, PlaceSignExpense, SignExpense
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
expenseType: '1'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
@@ -1,19 +1,443 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main-content">
|
<div class="dashboard-editor-container">
|
||||||
|
<!-- 招生团队首页 -->
|
||||||
|
<div>
|
||||||
|
<el-row :gutter="40" class="panel-group" style="margin-bottom: 20px">
|
||||||
|
<!-- <el-col :span="6">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>这是首页</div>
|
<div slot="header">
|
||||||
|
问候
|
||||||
|
</div>
|
||||||
|
<div class="task-pane">
|
||||||
|
<p>亲爱的{{user.nickName}},您好!</p>
|
||||||
|
<p>人生的路,漫长且孤独,短暂也快乐,漫长的是考验,短暂的是幸福,平坦的路途,让我们心怀感恩,泥泞的路途,让我们努力加油。</p>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card>
|
||||||
|
<div slot="header">
|
||||||
|
计划总结
|
||||||
|
<span style="float:right">
|
||||||
|
<el-button type="text" size="mini" @click="handleEditTask(1)">本月计划</el-button>
|
||||||
|
<el-button type="text" size="mini" @click="handleEditTask(2 )">今日计划</el-button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="task-pane">
|
||||||
|
<div v-html="task" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card>
|
||||||
|
<div slot="header">团队业绩概况</div>
|
||||||
|
<div class="card-panel">
|
||||||
|
<div class="card-panel-icon-wrapper icon-people">
|
||||||
|
<svg-icon icon-class="peoples" class-name="card-panel-icon" style="color: #EE7621;" />
|
||||||
|
</div>
|
||||||
|
<div class="card-panel-description">
|
||||||
|
<div>
|
||||||
|
<span class="card-panel-text">本月报名数:</span>
|
||||||
|
<count-to :start-val="0" :end-val="count.monthSign" :duration="5" class="card-panel-num" />
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<span class="card-panel-text">今日报名数:</span>
|
||||||
|
<count-to :start-val="0" :end-val="count.todaySign" :duration="5" class="card-panel-num" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card>
|
||||||
|
<div slot="header">转化率</div>
|
||||||
|
<div class="card-panel">
|
||||||
|
<div class="card-panel-icon-wrapper icon-people">
|
||||||
|
<svg-icon icon-class="peoples" class-name="card-panel-icon" style="color: #EE7621;" />
|
||||||
|
</div>
|
||||||
|
<div class="card-panel-description">
|
||||||
|
<div>
|
||||||
|
<span class="card-panel-text">本月转化率:</span>
|
||||||
|
<span class="card-panel-num">{{rate.currentSignRate}}</span>
|
||||||
|
<!-- <count-to
|
||||||
|
:start-val="0"
|
||||||
|
:end-val="rate.currentSignRate"
|
||||||
|
:duration="0.1"
|
||||||
|
class="card-panel-num"
|
||||||
|
/>-->
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<span class="card-panel-text">上月转化率:</span>
|
||||||
|
<span class="card-panel-num">{{rate.lastSignRate}}</span>
|
||||||
|
<!-- <count-to
|
||||||
|
:start-val="0"
|
||||||
|
:end-val="rate.lastSignRate"
|
||||||
|
:duration="5"
|
||||||
|
class="card-panel-num"
|
||||||
|
/>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<!-- </el-row>
|
||||||
|
<el-row :gutter="40" class="panel-group" style="margin-bottom: 20px"> -->
|
||||||
|
|
||||||
|
<!-- 考勤信息 -->
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card>
|
||||||
|
<div slot="header">打卡异常信息</div>
|
||||||
|
<div class="card-panel">
|
||||||
|
<el-carousel :interval="3000" arrow="always">
|
||||||
|
<el-carousel-item v-for="item in countNum" :key="item">
|
||||||
|
<ul style="overflow:auto">
|
||||||
|
<li v-for="i in 5" :key="i" class="infinite-list-item">
|
||||||
|
<span v-for="(d,index ) in checkin_datas" :key="index" v-if="index == ((item-1)*5 + i - 1)">
|
||||||
|
<span style="float:left">{{d.name}}</span>
|
||||||
|
<span style="float:right">{{d.error_days}} 天</span>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</el-carousel-item>
|
||||||
|
</el-carousel>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 成交数排行榜 -->
|
||||||
|
<el-row :gutter="32">
|
||||||
|
<!-- 本月个人成交数排行榜 -->
|
||||||
|
<el-col :xs="12" :sm="12" :lg="24">
|
||||||
|
<div class="chart-wrapper">
|
||||||
|
<span>本月成交排行榜</span>
|
||||||
|
<bar-chart-1 />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<!-- 今日个人成交数排行榜 -->
|
||||||
|
<el-col :xs="12" :sm="12" :lg="24">
|
||||||
|
<div class="chart-wrapper">
|
||||||
|
<span>今日成交排行榜</span>
|
||||||
|
<bar-chart />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<!-- 成交率排行榜 -->
|
||||||
|
<el-row :gutter="32">
|
||||||
|
<!-- 本月个人成交率排行榜 -->
|
||||||
|
<el-col :xs="12" :sm="12" :lg="24">
|
||||||
|
<div class="chart-wrapper">
|
||||||
|
<span>本月成交率排行榜</span>
|
||||||
|
<bar-chart-2 />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!-- 上月个人成交率排行榜 -->
|
||||||
|
<el-col :xs="12" :sm="12" :lg="24">
|
||||||
|
<div class="chart-wrapper">
|
||||||
|
<span>上月成交率排行榜</span>
|
||||||
|
<bar-chart-3 />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 添加或修改公告对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24" v-if="taskType === 2">
|
||||||
|
<el-form-item label="日期" prop="day">
|
||||||
|
<el-date-picker v-model="form.day" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="任务内容">
|
||||||
|
<editor v-model="form.content" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer" style="padding-top:20px">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="open=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import BarChart from './dashboard/BarChart'
|
||||||
|
import { getCount, dealRate, getCheckin } from '@/api/home'
|
||||||
|
import { saveTask, getTask } from '@/api/system/summary'
|
||||||
|
import CountTo from 'vue-count-to'
|
||||||
|
import BarChart1 from './dashboard/BarChart1'
|
||||||
|
import { getUserProfile } from '@/api/system/user'
|
||||||
|
import BarChart2 from './dashboard/BarChart2'
|
||||||
|
import BarChart3 from './dashboard/BarChart3'
|
||||||
|
import editor from '@/components/Editor'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
data() {
|
components: {
|
||||||
return {};
|
BarChart,
|
||||||
|
BarChart1,
|
||||||
|
BarChart2,
|
||||||
|
BarChart3,
|
||||||
|
CountTo,
|
||||||
|
editor,
|
||||||
},
|
},
|
||||||
methods: {}
|
data() {
|
||||||
};
|
return {
|
||||||
|
count: {},
|
||||||
|
user: {},
|
||||||
|
userId: localStorage.getItem('userId'),
|
||||||
|
rate: {},
|
||||||
|
checkin_datas: [],
|
||||||
|
task: undefined,
|
||||||
|
countNum: 0,
|
||||||
|
title: undefined,
|
||||||
|
open: false,
|
||||||
|
form: {
|
||||||
|
taskType: 1,
|
||||||
|
userId: undefined,
|
||||||
|
month: undefined,
|
||||||
|
day: undefined,
|
||||||
|
content: undefined,
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
day: [{ required: true, message: '日期不能为空', trigger: 'blur' }],
|
||||||
|
content: [
|
||||||
|
{ required: true, message: '任务内容不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
taskType: 1,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getUser()
|
||||||
|
getCount().then((response) => {
|
||||||
|
this.count = response.data
|
||||||
|
})
|
||||||
|
dealRate().then((response) => {
|
||||||
|
this.rate = response.data
|
||||||
|
})
|
||||||
|
this.getCheckin()
|
||||||
|
this.getTask(1)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getUser() {
|
||||||
|
getUserProfile().then((response) => {
|
||||||
|
this.user = response.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCheckin() {
|
||||||
|
getCheckin().then((resp) => {
|
||||||
|
this.checkin_datas = resp.data
|
||||||
|
this.countNum = Math.ceil(this.checkin_datas.length / 5)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleEditTask(type) {
|
||||||
|
this.taskType = type
|
||||||
|
if (type === 2) {
|
||||||
|
this.title = '今日任务'
|
||||||
|
} else {
|
||||||
|
this.title = '本月任务'
|
||||||
|
}
|
||||||
|
this.getTask(type)
|
||||||
|
this.open = true
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
saveTask(this.form).then((response) => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
this.open = false
|
||||||
|
if (this.taskType == 1) {
|
||||||
|
this.task = this.form.content
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTask(type) {
|
||||||
|
this.form = {
|
||||||
|
taskType: type,
|
||||||
|
userId: this.userId,
|
||||||
|
month: undefined,
|
||||||
|
day: undefined,
|
||||||
|
content: undefined,
|
||||||
|
}
|
||||||
|
//查询当前任务,编辑查询当前月的,细化查询当日的
|
||||||
|
let now = new Date()
|
||||||
|
let year = now.getFullYear() //得到年份
|
||||||
|
let month = now.getMonth() + 1 //得到月份
|
||||||
|
let day = now.getDate() //得到日期
|
||||||
|
this.$set(this.form, 'month', month)
|
||||||
|
if (type === 2) {
|
||||||
|
this.$set(this.form, 'day', year + '-' + month + '-' + day)
|
||||||
|
}
|
||||||
|
getTask(this.form).then((resp) => {
|
||||||
|
if (resp.code == 200 && resp.data) {
|
||||||
|
this.form = resp.data
|
||||||
|
if (type == 1) {
|
||||||
|
this.task = resp.data.content
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style lang="scss" scoped>
|
||||||
|
.task-pane {
|
||||||
|
overflow-y: auto;
|
||||||
|
height: 120px;
|
||||||
|
max-height: 120px;
|
||||||
|
}
|
||||||
|
.dashboard-editor-container {
|
||||||
|
padding: 25px;
|
||||||
|
background-color: rgb(240, 242, 245);
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.chart-wrapper {
|
||||||
|
background: #fff;
|
||||||
|
padding: 16px 16px 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.chart-wrapper {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-col {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.panel-group {
|
||||||
|
margin-top: 5px;
|
||||||
|
|
||||||
|
.card-panel-col {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel {
|
||||||
|
height: 120px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 12px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
color: #666;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
|
||||||
|
border-color: rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.card-panel-icon-wrapper {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-people {
|
||||||
|
background: #40c9c6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-message {
|
||||||
|
background: #36a3f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-money {
|
||||||
|
background: #f4516c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shopping {
|
||||||
|
background: #34bfa3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-people {
|
||||||
|
color: #40c9c6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-message {
|
||||||
|
color: #36a3f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-money {
|
||||||
|
color: #f4516c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shopping {
|
||||||
|
color: #34bfa3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-icon-wrapper {
|
||||||
|
float: left;
|
||||||
|
margin: 20px 0 0 10px;
|
||||||
|
padding: 16px;
|
||||||
|
transition: all 0.38s ease-out;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-icon {
|
||||||
|
float: left;
|
||||||
|
font-size: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-description {
|
||||||
|
float: right;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 26px 0px;
|
||||||
|
margin-left: 0px;
|
||||||
|
|
||||||
|
.card-panel-text {
|
||||||
|
line-height: 18px;
|
||||||
|
color: rgba(0, 0, 0, 0.45);
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-num {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.infinite-list-item {
|
||||||
|
height: 20px;
|
||||||
|
margin: 2px;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 550px) {
|
||||||
|
.card-panel-description {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-panel-icon-wrapper {
|
||||||
|
float: none !important;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0 !important;
|
||||||
|
|
||||||
|
.svg-icon {
|
||||||
|
display: block;
|
||||||
|
margin: 14px auto !important;
|
||||||
|
float: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,36 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<div class="login-form">
|
||||||
<h3 class="title">对嘛管理系统</h3>
|
<h3 class="title">寻驾招生管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-tabs v-model="activeName" type="card">
|
||||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-tab-pane label="微信扫码" name="wx" style="height:200px">
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<wxlogin v-if="!code && activeName === 'wx'" appid="wx203f734baa9c9845" :scope="'snsapi_login'" :theme="'black'" redirect_uri="https://xueche.ahduima.com/login" :href="href">
|
||||||
</el-input>
|
</wxlogin>
|
||||||
</el-form-item>
|
<!-- <div id="wxcode" v-if="!code && activeName === 'wx'"></div> -->
|
||||||
<el-form-item prop="password">
|
<!-- 绑定手机号框 -->
|
||||||
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin">
|
<div v-else v-loading="loading">
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<WxCode v-if="codeShow" :code="code" :openId="openId" />
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="captchaEnabled" prop="code">
|
|
||||||
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter.native="handleLogin">
|
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
|
||||||
</el-input>
|
|
||||||
<div class="login-code">
|
|
||||||
<img :src="codeUrl" class="login-code-img" @click="getCode">
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-tab-pane>
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
<el-tab-pane label="账号密码" name="password" style="height:200px">
|
||||||
<el-form-item style="width:100%;">
|
<Password v-if="activeName === 'password'" />
|
||||||
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
|
</el-tab-pane>
|
||||||
<span v-if="!loading">登 录</span>
|
</el-tabs>
|
||||||
<span v-else>登 录 中...</span>
|
|
||||||
</el-button>
|
|
||||||
<div v-if="register" style="float: right;">
|
|
||||||
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div class="el-login-footer">
|
<div class="el-login-footer">
|
||||||
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>
|
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>
|
||||||
@@ -42,30 +29,26 @@
|
|||||||
import { getCodeImg } from '@/api/login';
|
import { getCodeImg } from '@/api/login';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
||||||
|
import wxlogin from 'vue-wxlogin'
|
||||||
|
import Password from './password.vue';
|
||||||
|
import WxCode from './wxCode.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
|
components: {
|
||||||
|
wxlogin, Password, WxCode
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
codeUrl: '',
|
codeUrl: '',
|
||||||
loginForm: {
|
|
||||||
username: 'admin',
|
|
||||||
password: 'admin123',
|
|
||||||
rememberMe: false,
|
|
||||||
code: '',
|
|
||||||
uuid: ''
|
|
||||||
},
|
|
||||||
loginRules: {
|
|
||||||
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
|
|
||||||
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
|
|
||||||
code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
|
|
||||||
},
|
|
||||||
loading: false,
|
loading: false,
|
||||||
// 验证码开关
|
redirect: undefined,
|
||||||
captchaEnabled: true,
|
activeName: 'wx',
|
||||||
// 注册开关
|
code: undefined,
|
||||||
register: false,
|
openId: undefined,
|
||||||
redirect: undefined
|
codeShow: false,
|
||||||
|
href: "data:text/css;base64,LmltcG93ZXJCb3ggLnFyY29kZSB7d2lkdGg6IDE4MHB4OyBtYXJnaW4tdG9wOjBweH0KLmltcG93ZXJCb3ggLnRpdGxlIHtkaXNwbGF5OiBub25lO30KLmltcG93ZXJCb3ggLmluZm8ge3dpZHRoOiAxODBweDt9Ci5zdGF0dXNfaWNvbiB7ZGlzcGxheTogbm9uZX0KLmltcG93ZXJCb3ggLnN0YXR1cyB7dGV4dC1hbGlnbjogY2VudGVyO30g"
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -77,54 +60,43 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCode();
|
this.code = this.$route.query.code;
|
||||||
this.getCookie();
|
if (this.code) {
|
||||||
|
this.loading = true
|
||||||
|
this.wxLogin(this.code);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// this.createWxQrcode();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode() {
|
async wxLogin(code) {
|
||||||
getCodeImg().then((res) => {
|
//根据code和openId查询是否关联了手机号,如果没有关联 需先关联手机号
|
||||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
this.$store.dispatch('WXLogin', { code: code, type: 1 }).then(resp => {
|
||||||
if (this.captchaEnabled) {
|
if (resp && resp.token != undefined) {
|
||||||
this.codeUrl = 'data:image/gif;base64,' + res.img;
|
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
|
||||||
this.loginForm.uuid = res.uuid;
|
} else if (resp.openId) {
|
||||||
}
|
//如果返回openId则是没有绑定手机号
|
||||||
});
|
this.openId = resp.openId;
|
||||||
},
|
this.loading = false
|
||||||
getCookie() {
|
this.codeShow = true
|
||||||
const username = Cookies.get('username');
|
|
||||||
const password = Cookies.get('password');
|
|
||||||
const rememberMe = Cookies.get('rememberMe');
|
|
||||||
this.loginForm = {
|
|
||||||
username: username === undefined ? this.loginForm.username : username,
|
|
||||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
|
||||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
|
||||||
};
|
|
||||||
},
|
|
||||||
handleLogin() {
|
|
||||||
this.$refs.loginForm.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.loading = true;
|
|
||||||
if (this.loginForm.rememberMe) {
|
|
||||||
Cookies.set('username', this.loginForm.username, { expires: 30 });
|
|
||||||
Cookies.set('password', encrypt(this.loginForm.password), { expires: 30 });
|
|
||||||
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
|
|
||||||
} else {
|
} else {
|
||||||
Cookies.remove('username');
|
this.$message.error("二维码失效,请刷新!");
|
||||||
Cookies.remove('password');
|
|
||||||
Cookies.remove('rememberMe');
|
|
||||||
}
|
|
||||||
this.$store
|
|
||||||
.dispatch('Login', this.loginForm)
|
|
||||||
.then(() => {
|
|
||||||
this.$router.push({ path: this.redirect || '/' }).catch(() => {});
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
if (this.captchaEnabled) {
|
|
||||||
this.getCode();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
},
|
||||||
|
createWxQrcode() {
|
||||||
|
// 生成微信登录二维码
|
||||||
|
var obj = new WxLogin({
|
||||||
|
self_redirect: true,
|
||||||
|
id: "wxcode", // 页面显示二维码的容器id
|
||||||
|
appid: "wx203f734baa9c9845", // 微信官方提供的测试id
|
||||||
|
scope: "snsapi_login",
|
||||||
|
redirect_uri: "https://xueche.ahduima.com/login", // 微信官方中的测试地址
|
||||||
|
state: "bind",
|
||||||
|
style: "black",
|
||||||
|
href: this.href,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -147,9 +119,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
|
display: inline;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
width: 400px;
|
width: 350px;
|
||||||
padding: 25px 25px 5px 25px;
|
padding: 25px 25px 5px 25px;
|
||||||
.el-input {
|
.el-input {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
@@ -192,4 +165,8 @@ export default {
|
|||||||
.login-code-img {
|
.login-code-img {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.impowerBox .qrcode {
|
||||||
|
width: 200px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
217
src/views/password.vue
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
|
<el-form-item prop="username">
|
||||||
|
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password">
|
||||||
|
<el-input v-model="loginForm.password" auto-complete="off" placeholder="短信验证码" style="width: 63%" @keyup.enter.native="handleLogin">
|
||||||
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||||
|
</el-input>
|
||||||
|
<el-button :loading="loading" size="medium" type="primary" @click.native.prevent="handleMsgCode" style="width: 32%; padding: 11px; float: right;" v-show="sendButton">获取验证码</el-button>
|
||||||
|
<el-button :loading="loading" size="medium" type="info" style="width: 32%; padding: 11px; float: right;" v-show="!sendButton" disabled>{{seconds}} s</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item v-if="captchaEnabled" prop="code">
|
||||||
|
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter.native="handleLogin">
|
||||||
|
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||||
|
</el-input>
|
||||||
|
<div class="login-code">
|
||||||
|
<img :src="codeUrl" class="login-code-img" @click="getCode">
|
||||||
|
</div>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> -->
|
||||||
|
<el-form-item style="width:100%;">
|
||||||
|
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
|
||||||
|
<span v-if="!loading">登 录</span>
|
||||||
|
<span v-else>登 录 中...</span>
|
||||||
|
</el-button>
|
||||||
|
<!-- <div v-if="register" style="float: right;">
|
||||||
|
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
||||||
|
</div> -->
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getCodeImg, getMsgCode } from '@/api/login';
|
||||||
|
import Cookies from 'js-cookie';
|
||||||
|
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Password',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
codeUrl: '',
|
||||||
|
loginForm: {
|
||||||
|
username: undefined,
|
||||||
|
password: undefined,
|
||||||
|
rememberMe: false,
|
||||||
|
code: '',
|
||||||
|
uuid: '',
|
||||||
|
type: 'password'
|
||||||
|
},
|
||||||
|
loginRules: {
|
||||||
|
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
|
||||||
|
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
|
||||||
|
code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
// 验证码开关
|
||||||
|
captchaEnabled: true,
|
||||||
|
// 注册开关
|
||||||
|
register: false,
|
||||||
|
redirect: undefined,
|
||||||
|
activeName: 'wx',
|
||||||
|
code: undefined,
|
||||||
|
sendButton: true,
|
||||||
|
seconds: '',
|
||||||
|
timer: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route: {
|
||||||
|
handler: function (route) {
|
||||||
|
this.redirect = route.query && route.query.redirect;
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.getCode();
|
||||||
|
// this.getCookie();
|
||||||
|
// this.handleWx()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getCode() {
|
||||||
|
getCodeImg().then((res) => {
|
||||||
|
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||||
|
if (this.captchaEnabled) {
|
||||||
|
this.codeUrl = 'data:image/gif;base64,' + res.img;
|
||||||
|
this.loginForm.uuid = res.uuid;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// getCookie() {
|
||||||
|
// const username = Cookies.get('username');
|
||||||
|
// const password = Cookies.get('password');
|
||||||
|
// const rememberMe = Cookies.get('rememberMe');
|
||||||
|
// this.loginForm = {
|
||||||
|
// username: username === undefined ? this.loginForm.username : username,
|
||||||
|
// password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||||
|
// rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||||
|
// };
|
||||||
|
// },
|
||||||
|
handleLogin() {
|
||||||
|
this.$refs.loginForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
|
this.$store
|
||||||
|
.dispatch('Login', this.loginForm)
|
||||||
|
.then(() => {
|
||||||
|
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleMsgCode() {
|
||||||
|
this.$refs.loginForm.validateField('username', (valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
this.loginForm.type = 0
|
||||||
|
getMsgCode(this.loginForm).then((response) => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.loginForm.uuid = response.data
|
||||||
|
this.countdown()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
countdown() {
|
||||||
|
const TIME_COUNT = 60
|
||||||
|
if (!this.timer) {
|
||||||
|
this.seconds = TIME_COUNT
|
||||||
|
this.sendButton = false
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
if (this.seconds > 0 && this.seconds <= TIME_COUNT) {
|
||||||
|
this.seconds--
|
||||||
|
} else {
|
||||||
|
this.sendButton = true
|
||||||
|
clearInterval(this.timer)
|
||||||
|
this.timer = null
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
|
.login {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
background-image: url('../assets/images/login-background.jpg');
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
margin: 0px auto 30px auto;
|
||||||
|
text-align: center;
|
||||||
|
color: #707070;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #ffffff;
|
||||||
|
width: 400px;
|
||||||
|
padding: 25px 25px 5px 25px;
|
||||||
|
.el-input {
|
||||||
|
height: 38px;
|
||||||
|
input {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-icon {
|
||||||
|
height: 39px;
|
||||||
|
width: 14px;
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.login-tip {
|
||||||
|
font-size: 13px;
|
||||||
|
text-align: center;
|
||||||
|
color: #bfbfbf;
|
||||||
|
}
|
||||||
|
.login-code {
|
||||||
|
width: 33%;
|
||||||
|
height: 38px;
|
||||||
|
float: right;
|
||||||
|
img {
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-login-footer {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-family: Arial;
|
||||||
|
font-size: 12px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
.login-code-img {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
246
src/views/question/components/QuestionAddForm.vue
Normal file
@@ -0,0 +1,246 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="试题" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="900px" @close="closeDialog">
|
||||||
|
<div>
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:model="dialogForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
label-width="80px"
|
||||||
|
label-position="left"
|
||||||
|
@keyup.enter.native="dialogFormSubmit()"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="题目" prop="question">
|
||||||
|
<el-input v-model="dialogForm.question" maxlength="200" placeholder="请输入题目" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="选项A" prop="question">
|
||||||
|
<el-input v-model="dialogForm.chooseA" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="选项B" prop="question">
|
||||||
|
<el-input v-model="dialogForm.chooseB" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="选项C" prop="question">
|
||||||
|
<el-input v-model="dialogForm.chooseC" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="选项D" prop="question">
|
||||||
|
<el-input v-model="dialogForm.chooseD" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="选项E" prop="question">
|
||||||
|
<el-input v-model="dialogForm.chooseE" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="选项F" prop="question">
|
||||||
|
<el-input v-model="dialogForm.chooseF" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="选项G" prop="question">
|
||||||
|
<el-input v-model="dialogForm.chooseG" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="答案" prop="trueAnswer">
|
||||||
|
<el-input v-model="dialogForm.trueAnswer" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="科目" prop="subject">
|
||||||
|
<span v-if="dialogForm.subject == 1">科一</span>
|
||||||
|
<span v-else-if="dialogForm.subject == 4">科四</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="精选500题" prop="isVip">
|
||||||
|
<el-radio-group v-model="dialogForm.isVip" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="精选600题" prop="isVip2">
|
||||||
|
<el-radio-group v-model="dialogForm.isVip2" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否易错题" prop="isError">
|
||||||
|
<el-radio-group v-model="dialogForm.isError" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否新规" prop="isNew">
|
||||||
|
<el-radio-group v-model="dialogForm.isNew" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否密卷1" prop="isExam1">
|
||||||
|
<el-radio-group v-model="dialogForm.isExam1" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否密卷2" prop="isExam2">
|
||||||
|
<el-radio-group v-model="dialogForm.isExam2" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- <el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="考点" prop="examKeys">
|
||||||
|
<el-input v-model="dialogForm.examKeys" maxlength="200" placeholder="请输入考点" clearable />
|
||||||
|
<span style="color:red;">包含多个考点,以英文";"分割!</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row> -->
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="答题技巧" prop="skillInfo">
|
||||||
|
<el-input v-model="dialogForm.skillInfo" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-form-item label="题目图片" prop="imageUrl">
|
||||||
|
<el-upload
|
||||||
|
action="#"
|
||||||
|
accept=".png,.jpg,.jpeg,.gif"
|
||||||
|
:limit="1"
|
||||||
|
:http-request="handleImport"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:show-file-list="false"
|
||||||
|
>
|
||||||
|
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" style="width: 200px;">
|
||||||
|
<i v-else class="el-icon-plus" />
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button plain @click="visible = false">取消</el-button>
|
||||||
|
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { addQuestion } from '@/api/question';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
canSubmit: true,
|
||||||
|
dialogForm: {
|
||||||
|
questionId: undefined,
|
||||||
|
isVip: 0,
|
||||||
|
isVip2: 0,
|
||||||
|
isError: 0,
|
||||||
|
isNew: 0,
|
||||||
|
isExam1: 0,
|
||||||
|
isExam2: 0,
|
||||||
|
examKeys: undefined
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
schoolName: [{ required: true, message: '驾校名称不能为空', trigger: 'blur' }],
|
||||||
|
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(info = undefined) {
|
||||||
|
// debugger
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetDialogForm();
|
||||||
|
// this.$refs['dialogForm'].resetFields();
|
||||||
|
if (info) {
|
||||||
|
this.dialogForm = this.deepClone(info);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetDialogForm() {
|
||||||
|
this.dialogForm = {
|
||||||
|
questionId: undefined,
|
||||||
|
isVip: 0,
|
||||||
|
isVip2: 0,
|
||||||
|
isError: 0,
|
||||||
|
isNew: 0,
|
||||||
|
isExam1: 0,
|
||||||
|
isExam2: 0,
|
||||||
|
examKeys: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
closeDialog() {
|
||||||
|
this.$emit('update:dialogVisible', false);
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dialogFormSubmit() {
|
||||||
|
this.$refs.dialogForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
addQuestion(this.dialogForm).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
// this.visible = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleImport(opt) {
|
||||||
|
const data = new FormData();
|
||||||
|
data.append('file', opt.file);
|
||||||
|
// 上传
|
||||||
|
// api.upload(data).then(resp => {
|
||||||
|
// if (resp.code == 200) {
|
||||||
|
// this.$modal.msgSuccess('文件上传成功');
|
||||||
|
// this.dialogForm.imageUrl = resp.data;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
handleExceed(files) {
|
||||||
|
this.handleImport({ file: files[0] });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
228
src/views/question/components/QuestionForm.vue
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="试题" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="800px" @close="closeDialog">
|
||||||
|
<div>
|
||||||
|
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="left" @keyup.enter.native="dialogFormSubmit()">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="题目" prop="question">
|
||||||
|
<div>{{ dialogForm.question }}</div>
|
||||||
|
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" width="200" alt="" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="替换图片">
|
||||||
|
<el-upload
|
||||||
|
action="#"
|
||||||
|
accept=".png,.jpg,.jpeg,.gif"
|
||||||
|
:limit="1"
|
||||||
|
:http-request="handleImport"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:show-file-list="false"
|
||||||
|
>
|
||||||
|
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" style="width: 300px" />
|
||||||
|
<i v-else class="el-icon-plus" />
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="选项" prop="question">
|
||||||
|
<span v-if="dialogForm.chooseA"
|
||||||
|
>A:{{ dialogForm.chooseA
|
||||||
|
}}<span>
|
||||||
|
<span v-if="dialogForm.chooseB">B:{{ dialogForm.chooseB }} </span>
|
||||||
|
<span v-if="dialogForm.chooseC">C:{{ dialogForm.chooseC }} </span>
|
||||||
|
<span v-if="dialogForm.chooseD">D:{{ dialogForm.chooseD }}</span>
|
||||||
|
<span v-if="dialogForm.chooseE">E:{{ dialogForm.chooseE }}</span>
|
||||||
|
<span v-if="dialogForm.chooseF">F:{{ dialogForm.chooseF }}</span>
|
||||||
|
<span v-if="dialogForm.chooseG">G:{{ dialogForm.chooseG }}</span>
|
||||||
|
</span></span
|
||||||
|
></el-form-item
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="答案" prop="trueAnswer">
|
||||||
|
<span>{{ dialogForm.trueAnswer }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="科目" prop="subject">
|
||||||
|
<span v-if="dialogForm.subject == 1">科一</span>
|
||||||
|
<span v-if="dialogForm.subject == 4">科四</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="精选500题" prop="isVip">
|
||||||
|
<el-radio-group v-model="dialogForm.isVip" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="精选600题" prop="isVip2">
|
||||||
|
<el-radio-group v-model="dialogForm.isVip2" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否易错题" prop="isError">
|
||||||
|
<el-radio-group v-model="dialogForm.isError" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否新规" prop="isNew">
|
||||||
|
<el-radio-group v-model="dialogForm.isNew" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否密卷1" prop="isExam1">
|
||||||
|
<el-radio-group v-model="dialogForm.isExam1" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否密卷2" prop="isExam2">
|
||||||
|
<el-radio-group v-model="dialogForm.isExam2" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- <el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="考点" prop="examKeys">
|
||||||
|
<el-input v-model="dialogForm.examKeys" maxlength="200" placeholder="请输入考点" clearable />
|
||||||
|
<span style="color:red;">包含多个考点,以英文";"分割!</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row> -->
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="答题技巧" prop="skillInfo">
|
||||||
|
<el-input v-model="dialogForm.skillInfo" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button plain @click="visible = false">取消</el-button>
|
||||||
|
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updateQuestion, uploadFile } from '@/api/question';
|
||||||
|
// import axios from 'axios';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
canSubmit: true,
|
||||||
|
dialogForm: {
|
||||||
|
questionId: undefined,
|
||||||
|
isVip: 0,
|
||||||
|
isVip2: 0,
|
||||||
|
isError: 0,
|
||||||
|
isNew: 0,
|
||||||
|
isExam1: 0,
|
||||||
|
isExam2: 0,
|
||||||
|
examKeys: undefined
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
schoolName: [{ required: true, message: '驾校名称不能为空', trigger: 'blur' }],
|
||||||
|
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(info = undefined) {
|
||||||
|
// debugger
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetDialogForm();
|
||||||
|
// this.$refs['dialogForm'].resetFields();
|
||||||
|
if (info) {
|
||||||
|
this.dialogForm = this.deepClone(info);
|
||||||
|
this.fileUrl = info.imageUrl;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetDialogForm() {
|
||||||
|
this.dialogForm = {
|
||||||
|
questionId: undefined,
|
||||||
|
isVip: 0,
|
||||||
|
isVip2: 0,
|
||||||
|
isError: 0,
|
||||||
|
isNew: 0,
|
||||||
|
isExam1: 0,
|
||||||
|
isExam2: 0,
|
||||||
|
examKeys: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
closeDialog() {
|
||||||
|
this.$emit('update:dialogVisible', false);
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dialogFormSubmit() {
|
||||||
|
this.$refs.dialogForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
updateQuestion(this.dialogForm).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.$emit('update');
|
||||||
|
// this.visible = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleImport(opt) {
|
||||||
|
const data = new FormData();
|
||||||
|
data.append('file', opt.file);
|
||||||
|
// axios({
|
||||||
|
// method: 'post',
|
||||||
|
// url: 'http://xj.ahduima.com/xunjia/tiku/question/upload',
|
||||||
|
// data: data
|
||||||
|
// }).then((resp) => {
|
||||||
|
// console.log(resp.data);
|
||||||
|
// if (resp.data.code == 200) {
|
||||||
|
// this.$modal.msgSuccess('文件上传成功');
|
||||||
|
// this.dialogForm.imageUrl = resp.data.msg;
|
||||||
|
// }
|
||||||
|
// console.log(this.dialogForm)
|
||||||
|
// });
|
||||||
|
// 上传
|
||||||
|
uploadFile(data).then(resp => {
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$modal.msgSuccess('文件上传成功');
|
||||||
|
this.dialogForm.imageUrl = resp.msg;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleExceed(files) {
|
||||||
|
this.handleImport({ file: files[0] });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
153
src/views/question/index.vue
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container" style="text-align: center">
|
||||||
|
<el-form size="small" :inline="true" label-width="68px" @submit.native.prevent>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-form-item label="车型">
|
||||||
|
<el-radio-group v-model="queryParams.carTypeId">
|
||||||
|
<el-radio :label="1001">小车</el-radio>
|
||||||
|
<el-radio :label="1002">摩托车</el-radio>
|
||||||
|
<el-radio :label="1003">货车</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="科目">
|
||||||
|
<el-radio-group v-model="queryParams.subject">
|
||||||
|
<el-radio :label="1">科一</el-radio>
|
||||||
|
<el-radio :label="4">科四</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item>
|
||||||
|
<el-checkbox v-model="queryParams.isWatermark" :label="true">是否有水印</el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="题目">
|
||||||
|
<el-input v-model="queryParams.question" placeholder="请输入题目" clearable style="width: 400px" @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="tableList" style="width: 80%; margin: auto" @row-click="handleEdit">
|
||||||
|
<el-table-column type="index" width="55" align="center" />
|
||||||
|
<el-table-column label="题目" align="center" prop="question" min-width="140" />
|
||||||
|
<el-table-column label="选项" align="center" min-width="140">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<p v-if="row.chooseA">A:{{ row.chooseA }}</p>
|
||||||
|
<p v-if="row.chooseB">B:{{ row.chooseB }}</p>
|
||||||
|
<p v-if="row.chooseC">C:{{ row.chooseC }}</p>
|
||||||
|
<p v-if="row.chooseD">D:{{ row.chooseD }}</p>
|
||||||
|
<p v-if="row.chooseE">E:{{ row.chooseE }}</p>
|
||||||
|
<p v-if="row.chooseF">F:{{ row.chooseF }}</p>
|
||||||
|
<p v-if="row.chooseG">G:{{ row.chooseG }}</p>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="答案" align="center" prop="trueAnswer" min-width="100" />
|
||||||
|
<el-table-column label="科目" align="center" prop="subject" min-width="100">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<p v-if="row.subject == 1">科一</p>
|
||||||
|
<p v-if="row.subject == 4">科四</p>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否新规" align="center" min-width="100">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
{{ row.isNew ? '是' : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="车型" align="center" min-width="100">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
{{ row.carTypeId == 1001 ? '小车' : '摩托车' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图片" align="center" min-width="200">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<img :src="row.imageUrl" alt="" width="80px" srcset="">
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-download" @click="handleEdit(scope.row)">编辑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
|
||||||
|
<QuestionForm v-if="dialogVisible" ref="dialogForm" :dialog-visible="dialogVisible" @update="getList" />
|
||||||
|
<QuestionAddForm v-if="dialogAddVisible" ref="dialogAddForm" :dialog-visible="dialogAddVisible" @update="getList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { searchQuestion } from '@/api/question';
|
||||||
|
import QuestionForm from './components/QuestionForm.vue';
|
||||||
|
import QuestionAddForm from './components/QuestionAddForm.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Question',
|
||||||
|
components: {
|
||||||
|
QuestionForm,
|
||||||
|
QuestionAddForm
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
tableList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
question: '',
|
||||||
|
carTypeId: 1001,
|
||||||
|
subject: 1
|
||||||
|
},
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogAddVisible: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询文件列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
searchQuestion(this.queryParams).then((response) => {
|
||||||
|
this.tableList = response.data;
|
||||||
|
// this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
if (this.queryParams.question || (this.queryParams.isWatermark != undefined && this.queryParams.isWatermark)) {
|
||||||
|
this.getList();
|
||||||
|
} else {
|
||||||
|
this.$modal.msgWarning('请输入题目 ');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams.question = '';
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
handleEdit(item) {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.dialogForm.init(item);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAdd(item) {
|
||||||
|
this.dialogAddVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.dialogAddForm.init({
|
||||||
|
subject: this.queryParams.subject,
|
||||||
|
carTypeId: this.queryParams.carTypeId
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="register">
|
<div class="register">
|
||||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||||
<h3 class="title">对嘛管理系统</h3>
|
<h3 class="title">寻驾招生管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
@@ -110,7 +110,7 @@ export default {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
this.$router.push('/login');
|
this.$router.push('/login');
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
155
src/views/sch/classType/components/ProfitSettingDialog.vue
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="利润配置" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="600px"
|
||||||
|
@close="closeDialog">
|
||||||
|
<div>
|
||||||
|
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="top">
|
||||||
|
<el-form-item label="利润类型" prop="profitType">
|
||||||
|
<el-radio-group v-model="dialogForm.profitType" @change="profitTypeChange">
|
||||||
|
<el-radio :label="1">底价</el-radio>
|
||||||
|
<el-radio :label="2">比例</el-radio>
|
||||||
|
<el-radio :label="3">固定</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="利润参数" prop="profitParam">
|
||||||
|
<el-input v-show="dialogForm.profitType != 3" v-model="dialogForm.profitParam" maxlength="100"
|
||||||
|
placeholder="请输入" clearable />
|
||||||
|
<div v-show="dialogForm.profitType == 3" style="text-align: center;">
|
||||||
|
<el-table :data="dialogForm.profitParamVOList" stripe border>
|
||||||
|
<el-table-column label="下限" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.min'" :rules="dataRule['min']">
|
||||||
|
<el-input v-model="scope.row.min" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上限" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.max'" :rules="dataRule['max']">
|
||||||
|
<el-input v-model="scope.row.max" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="利润" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.profit'" :rules="dataRule['profit']">
|
||||||
|
<el-input v-model="scope.row.profit" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" width="130">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button @click="handleProfitParamDelete(scope.$index)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-button plain @click="handleAddProfitParam">新增</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button plain @click="(visible = false)">取消</el-button>
|
||||||
|
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { batchUpdateProfit } from '@/api/sch/classType';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ProfitSettingDialog',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
canSubmit: true,
|
||||||
|
dialogForm: {
|
||||||
|
typeIds: undefined,
|
||||||
|
profitType: 1,
|
||||||
|
profitParam: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
profitParamVOList: [{
|
||||||
|
min: 0,
|
||||||
|
max: undefined,
|
||||||
|
profit: undefined
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
profitType: [{ required: true, message: '利润类型不能为空', trigger: 'blur' }],
|
||||||
|
min: [{ required: true, message: '上限不能为空', trigger: 'blur' }],
|
||||||
|
max: [{ required: true, message: '下限不能为空', trigger: 'blur' }],
|
||||||
|
profit: [{ required: true, message: '利润不能为空', trigger: 'blur' }]
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(info = undefined) {
|
||||||
|
// debugger
|
||||||
|
this.visible = true;
|
||||||
|
this.canSubmit = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetDialogForm();
|
||||||
|
this.$refs['dialogForm'].resetFields();
|
||||||
|
if (info) {
|
||||||
|
this.dialogForm = { ...this.dialogForm, ...info };
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetDialogForm() {
|
||||||
|
this.dialogForm = {
|
||||||
|
typeIds: undefined,
|
||||||
|
profitType: 1,
|
||||||
|
profitParam: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
profitParamVOList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
closeDialog() {
|
||||||
|
this.$emit('update:dialogVisible', false);
|
||||||
|
},
|
||||||
|
handleAddProfitParam() {
|
||||||
|
this.dialogForm.profitParamVOList.push({
|
||||||
|
min: 0,
|
||||||
|
max: undefined,
|
||||||
|
profit: undefined
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleProfitParamDelete(index) {
|
||||||
|
console.log(index);
|
||||||
|
this.dialogForm.profitParamVOList.splice(index, 1);
|
||||||
|
},
|
||||||
|
profitTypeChange(type) {
|
||||||
|
if (type == 3) {
|
||||||
|
this.dialogForm.profitParamVOList.push({
|
||||||
|
min: 0,
|
||||||
|
max: undefined,
|
||||||
|
profit: undefined
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$set(this.dialogForm, "profitParamVOList", []);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dialogFormSubmit() {
|
||||||
|
this.$refs.dialogForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.canSubmit = false;
|
||||||
|
// 校验完成,调接口
|
||||||
|
batchUpdateProfit(this.dialogForm)
|
||||||
|
.then((resp) => {
|
||||||
|
this.canSubmit = true;
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('保存成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.visible = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.canSubmit = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -3,51 +3,69 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-input v-model="searchName" placeholder="请输入驾校名称" clearable prefix-icon="el-icon-search" style="margin-bottom: 20px" />
|
<el-input v-model="searchName" placeholder="请输入驾校名称" clearable prefix-icon="el-icon-search"
|
||||||
|
style="margin-bottom: 20px" />
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container" style="max-height: 700px;overflow-y: auto">
|
<div class="head-container" style="max-height: 700px;overflow-y: auto">
|
||||||
<el-tree ref="tree" :data="schoolOption.filter(item => item.label.includes(searchName))" accordion node-key="id" :default-expanded-keys="selectNodes.map(item => item.id)" @node-click="handleNodeClick" />
|
<el-tree ref="tree" :data="schoolOption.filter(item => item.label.includes(searchName))" accordion node-key="id"
|
||||||
|
:default-expanded-keys="selectNodes.map(item => item.id)" @node-click="handleNodeClick" />
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="queryParams.typeName" placeholder="请输入班型名称" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.typeName" placeholder="请输入班型名称" clearable style="width: 240px"
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="queryParams.licenseType" clearable placeholder="选择驾照类型">
|
<el-select v-model="queryParams.licenseType" clearable placeholder="选择驾照类型">
|
||||||
<el-option v-for="item in licenseTypeOption" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
|
<el-option v-for="item in licenseTypeOption" :key="item.dictValue" :label="item.dictLabel"
|
||||||
|
:value="item.dictValue" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="queryParams.status" placeholder="班型状态" clearable>
|
<el-select v-model="queryParams.status" placeholder="班型状态" clearable>
|
||||||
<el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
<el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
<el-button v-hasPermi="['sch:classType:add']" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
<el-button v-hasPermi="['sch:classType:add']" type="primary" icon="el-icon-plus"
|
||||||
<el-button v-hasPermi="['sch:classType:remove']" type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete">删除</el-button>
|
@click="handleAdd">新增</el-button>
|
||||||
<el-button v-hasPermi="['sch:classType:clone']" type="primary" icon="el-icon-copy" :disabled="multiple" @click="handleClone">克隆</el-button>
|
<el-button v-hasPermi="['sch:classType:remove']" type="danger" icon="el-icon-delete" :disabled="multiple"
|
||||||
|
@click="handleDelete">删除</el-button>
|
||||||
|
<el-button v-hasPermi="['sch:classType:clone']" type="primary" icon="el-icon-copy" :disabled="multiple"
|
||||||
|
@click="handleClone">克隆</el-button>
|
||||||
|
<el-button v-hasPermi="['sch:classType:profit']" type="primary" :disabled="multiple"
|
||||||
|
@click="handleProfit()">利润配置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading.tableLoading" :data="tableDataList" stripe border @selection-change="handleSelectionChange">
|
<el-table v-loading="loading.tableLoading" :data="tableDataList" stripe border
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="驾校" prop="schoolName" />
|
<el-table-column label="驾校" prop="schoolName" />
|
||||||
<el-table-column label="场地" prop="placeName" />
|
<el-table-column label="场地" prop="placeName" min-width="200" />
|
||||||
<el-table-column label="班型名称" prop="typeName" />
|
<el-table-column label="班型名称" prop="typeName" />
|
||||||
<el-table-column label="驾照类型" prop="licenseType" :formatter="licenseTypeFormat" width="80" />
|
<el-table-column label="驾照类型" prop="licenseType" :formatter="licenseTypeFormat" width="80" />
|
||||||
<!-- <el-table-column label="原价" prop="originalPrice" /> -->
|
<!-- <el-table-column label="原价" prop="originalPrice" /> -->
|
||||||
<el-table-column label="报价" prop="currentPrice" width="60" />
|
<el-table-column label="报价" prop="currentPrice" width="60" />
|
||||||
<el-table-column label="底价" prop="minPrice" width="60" />
|
<el-table-column label="底价" prop="minPrice" width="60" />
|
||||||
<el-table-column label="描述" prop="description" />
|
<el-table-column label="描述" prop="description" min-width="200" show-overflow-tooltip />
|
||||||
|
<el-table-column label="利润类型" prop="profitType" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.profitType == 1">底价</span>
|
||||||
|
<span v-else-if="scope.row.profitType == 2">比例</span>
|
||||||
|
<span v-else>固定</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="利润参数" prop="profitParamShow" min-width="200" show-overflow-tooltip />
|
||||||
<el-table-column label="状态" prop="status" :formatter="statusFormat" width="80" />
|
<el-table-column label="状态" prop="status" :formatter="statusFormat" width="80" />
|
||||||
<el-table-column label="创建时间" width="160">
|
<el-table-column label="创建时间" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -56,18 +74,20 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="130">
|
<el-table-column label="操作" fixed="right" width="130">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-hasPermi="['sch:classType:edit']" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
<el-button v-hasPermi="['sch:classType:edit']" type="text" icon="el-icon-edit"
|
||||||
<el-button v-hasPermi="['sch:classType:remove']" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
@click="handleUpdate(scope.row)">修改</el-button>
|
||||||
|
<el-button v-hasPermi="['sch:classType:remove']" type="text" icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getPageList" />
|
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getPageList" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-dialog title="班型设置" :visible.sync="modalVisible" width="500px" append-to-body :close-on-click-modal="false">
|
<el-dialog title="班型设置" :visible.sync="modalVisible" width="600px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="modalForm" :model="modalForm" :rules="modalRules" label-width="80px">
|
<el-form ref="modalForm" :model="modalForm" :rules="modalRules" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -91,7 +111,8 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="驾照类型" prop="licenseType">
|
<el-form-item label="驾照类型" prop="licenseType">
|
||||||
<el-select v-model="modalForm.licenseType" placeholder="选择驾照类型">
|
<el-select v-model="modalForm.licenseType" placeholder="选择驾照类型">
|
||||||
<el-option v-for="item in licenseTypeOption" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
|
<el-option v-for="item in licenseTypeOption" :key="item.dictValue" :label="item.dictLabel"
|
||||||
|
:value="item.dictValue" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -110,24 +131,24 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="甩单低价" prop="orderMinPrice">
|
<el-form-item label="甩单底价" prop="orderMinPrice">
|
||||||
<el-input v-model="modalForm.orderMinPrice" placeholder="请输入" />
|
<el-input v-model="modalForm.orderMinPrice" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="入账低价" prop="enterMinPrice">
|
<el-form-item label="入账底价" prop="enterMinPrice">
|
||||||
<el-input v-model="modalForm.enterMinPrice" placeholder="请输入" />
|
<el-input v-model="modalForm.enterMinPrice" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="公司低价" prop="companyMinPrice">
|
<el-form-item label="公司底价" prop="companyMinPrice">
|
||||||
<el-input v-model="modalForm.companyMinPrice" placeholder="请输入" />
|
<el-input v-model="modalForm.companyMinPrice" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="员工低价" prop="employeeMinPrice">
|
<el-form-item label="员工底价" prop="employeeMinPrice">
|
||||||
<el-input v-model="modalForm.employeeMinPrice" placeholder="请输入" />
|
<el-input v-model="modalForm.employeeMinPrice" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -141,11 +162,56 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="状态" prop="currentPrice">
|
<el-form-item label="状态" prop="currentPrice">
|
||||||
<el-radio-group v-model="modalForm.status">
|
<el-radio-group v-model="modalForm.status">
|
||||||
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
|
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel
|
||||||
|
}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="利润类型" prop="profitType">
|
||||||
|
<el-radio-group v-model="modalForm.profitType" @change="profitTypeChange">
|
||||||
|
<el-radio :label="1">底价</el-radio>
|
||||||
|
<el-radio :label="2">比例</el-radio>
|
||||||
|
<el-radio :label="3">固定</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="利润参数" prop="profitParam">
|
||||||
|
<el-input v-show="modalForm.profitType != 3" v-model="modalForm.profitParam" maxlength="100" placeholder="请输入"
|
||||||
|
clearable />
|
||||||
|
<div v-show="modalForm.profitType == 3" style="text-align: center;">
|
||||||
|
<el-table :data="modalForm.profitParamVOList" stripe border>
|
||||||
|
<el-table-column label="下限">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.min'" :rules="modalRules['min']">
|
||||||
|
<el-input v-model="scope.row.min" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上限">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.max'" :rules="modalRules['max']">
|
||||||
|
<el-input v-model="scope.row.max" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="利润">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.profit'" :rules="modalRules['profit']">
|
||||||
|
<el-input v-model="scope.row.profit" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" width="130">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button @click="handleProfitParamDelete(scope.$index)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-button plain @click="handleAddProfitParam">新增</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
<!-- <el-row>
|
<!-- <el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="是否克隆到场地" prop="currentPrice">
|
<el-form-item label="是否克隆到场地" prop="currentPrice">
|
||||||
@@ -159,7 +225,8 @@
|
|||||||
</el-row> -->
|
</el-row> -->
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="描述" prop="description">
|
<el-form-item label="描述" prop="description">
|
||||||
<el-input v-model="modalForm.description" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入描述" />
|
<el-input v-model="modalForm.description" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
placeholder="请输入描述" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -186,6 +253,9 @@
|
|||||||
<el-button @click="cloneOpen = false">取 消</el-button>
|
<el-button @click="cloneOpen = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 利润配置表 -->
|
||||||
|
<ProfitSettingDialog ref="ProfitSettingDialog" @refreshDataList="getPageList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -193,9 +263,13 @@
|
|||||||
import { getClassTypeTableList, updateClassType, insertClassType, deleteClassType, cloneClassType } from '@/api/sch/classType';
|
import { getClassTypeTableList, updateClassType, insertClassType, deleteClassType, cloneClassType } from '@/api/sch/classType';
|
||||||
import { validateMoney } from '@/utils/validate';
|
import { validateMoney } from '@/utils/validate';
|
||||||
import { getMapData } from '@/api/sch/place';
|
import { getMapData } from '@/api/sch/place';
|
||||||
|
import ProfitSettingDialog from './components/ProfitSettingDialog.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Classtype',
|
name: 'Classtype',
|
||||||
|
components: {
|
||||||
|
ProfitSettingDialog
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchName: '',
|
searchName: '',
|
||||||
@@ -239,7 +313,10 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
message: '场地不为空',
|
message: '场地不为空',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
},
|
||||||
|
min: [{ required: true, message: '上限不能为空', trigger: 'blur' }],
|
||||||
|
max: [{ required: true, message: '下限不能为空', trigger: 'blur' }],
|
||||||
|
profit: [{ required: true, message: '利润不能为空', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
schoolOption: [],
|
schoolOption: [],
|
||||||
placeOption: [],
|
placeOption: [],
|
||||||
@@ -317,7 +394,7 @@ export default {
|
|||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
if (this.selectNodes.length < 1) {
|
if (this.selectNodes.length < 1) {
|
||||||
this.msgError('请选择左侧驾校或场地');
|
this.$message.error('请选择左侧驾校或场地');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.resetForm('modalForm');
|
this.resetForm('modalForm');
|
||||||
@@ -336,7 +413,10 @@ export default {
|
|||||||
orderMinPrice: undefined,
|
orderMinPrice: undefined,
|
||||||
enterMinPrice: undefined,
|
enterMinPrice: undefined,
|
||||||
companyMinPrice: undefined,
|
companyMinPrice: undefined,
|
||||||
employeeMinPrice: undefined
|
employeeMinPrice: undefined,
|
||||||
|
profitType: 1,
|
||||||
|
profitParam: undefined,
|
||||||
|
profitParamVOList: []
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.selectNodes.length > 1) {
|
if (this.selectNodes.length > 1) {
|
||||||
@@ -441,7 +521,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(function () {});
|
.catch(function () { });
|
||||||
},
|
},
|
||||||
handleClone() {
|
handleClone() {
|
||||||
this.cloneOpen = true;
|
this.cloneOpen = true;
|
||||||
@@ -464,6 +544,38 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
// 利润配置
|
||||||
|
handleProfit() {
|
||||||
|
const item = {
|
||||||
|
typeIds: this.ids,
|
||||||
|
profitType: 1,
|
||||||
|
profitParam: undefined
|
||||||
|
};
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ProfitSettingDialog.init(item);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAddProfitParam() {
|
||||||
|
this.modalForm.profitParamVOList.push({
|
||||||
|
min: 0,
|
||||||
|
max: undefined,
|
||||||
|
profit: undefined
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleProfitParamDelete(index) {
|
||||||
|
console.log(index);
|
||||||
|
this.modalForm.profitParamVOList.splice(index, 1);
|
||||||
|
},
|
||||||
|
profitTypeChange(type) {
|
||||||
|
this.$set(this.modalForm, "profitParamVOList", []);
|
||||||
|
if (type == 3) {
|
||||||
|
this.modalForm.profitParamVOList.push({
|
||||||
|
min: 0,
|
||||||
|
max: undefined,
|
||||||
|
profit: undefined
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
137
src/views/sch/file/index.vue
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="文件名" prop="fileName">
|
||||||
|
<el-input v-model="queryParams.fileName" placeholder="请输入文件名" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-upload ref="upload" v-hasPermi="['sch:file:upload']" class="upload-demo" :headers="upload.headers" :action="upload.url" multiple :limit="5" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :show-file-list="false">
|
||||||
|
<el-button size="mini" type="primary">上传</el-button>
|
||||||
|
</el-upload>
|
||||||
|
<!-- <el-button type="primary" plain icon="el-icon-upload" size="mini" @click="handleAdd" v-hasPermi="['sch:file:upload']">上传</el-button> -->
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="tableList">
|
||||||
|
<el-table-column type="index" width="55" align="center" />
|
||||||
|
<el-table-column label="文件名" align="center" prop="fileName" />
|
||||||
|
<el-table-column label="文件路径" align="center" prop="fileUrl" />
|
||||||
|
<el-table-column label="上传时间" align="center" prop="uploadTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.uploadTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上传人员" align="center" prop="uploadUser" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-download" @click="handleDownload(scope.row)" v-hasPermi="['sch:file:download']">下载</el-button>
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['sch:file:remove']">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listFile, delFile, } from "@/api/sch/file";
|
||||||
|
import { getToken } from '@/utils/auth'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "File",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
tableList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
fileName: null
|
||||||
|
},
|
||||||
|
upload: {
|
||||||
|
// 是否禁用上传
|
||||||
|
isUploading: false,
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: { Authorization: 'Bearer ' + getToken() },
|
||||||
|
// 上传的地址
|
||||||
|
url: process.env.VUE_APP_BASE_API + '/sch/file/upload',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询文件列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listFile(this.queryParams).then(response => {
|
||||||
|
this.tableList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 文件上传中处理
|
||||||
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
|
this.upload.isUploading = true;
|
||||||
|
},
|
||||||
|
// 文件上传成功处理
|
||||||
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
this.upload.isUploading = false;
|
||||||
|
this.$refs.upload.clearFiles();
|
||||||
|
this.$message.success('上传成功');
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const fileIds = row.fileId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除文件名为"' + row.fileName + '"的数据项?').then(function () {
|
||||||
|
return delFile(row);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$message.success('删除成功');
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleDownload(row) {
|
||||||
|
this.download('sch/file/download', {
|
||||||
|
...row
|
||||||
|
}, row.fileName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -5,12 +5,15 @@
|
|||||||
<el-input id="search" v-model="searchBody" class="search-body" placeholder="请输入..." @keyup.enter.native="submitSearch">
|
<el-input id="search" v-model="searchBody" class="search-body" placeholder="请输入..." @keyup.enter.native="submitSearch">
|
||||||
<el-button slot="append" icon="el-icon-search" @click="submitSearch" />
|
<el-button slot="append" icon="el-icon-search" @click="submitSearch" />
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="asider" :class="showSchool ? '':'hidden-school'">
|
<div class="asider" :class="showSchool ? '' : 'hidden-school'">
|
||||||
<el-card class="box-card" :body-style="{ flex: 1,'overflow-y': 'scroll', padding: 0 }">
|
<el-card class="box-card" :body-style="{ flex: 1, 'overflow-y': 'scroll', padding: 0 }">
|
||||||
|
<div style="margin:10px;">
|
||||||
|
<el-input v-model="searchValue" placeholder="请输入驾校名" ></el-input>
|
||||||
|
</div>
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<div class="map-card-title">驾校列表</div>
|
<div class="map-card-title">驾校列表</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="school in schoolList" :key="school.schoolId" style="margin:10px;" :class="currentdeptId == school.schoolId?'actived-school':''">
|
<div v-for="school in schoolList.filter(item => (searchValue == undefined || item.schoolName.includes(searchValue)))" :key="school.schoolId" style="margin:10px;" :class="currentdeptId == school.schoolId ? 'actived-school' : ''">
|
||||||
<el-card :body-style="{ padding: '10px' }">
|
<el-card :body-style="{ padding: '10px' }">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<div class="map-card-title">{{ school.schoolName }}</div>
|
<div class="map-card-title">{{ school.schoolName }}</div>
|
||||||
@@ -94,7 +97,7 @@
|
|||||||
<el-radio v-model="placeForm.recommend" :label="false">否</el-radio>
|
<el-radio v-model="placeForm.recommend" :label="false">否</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="placeForm.remark" placeholder="输入备注" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" />
|
<el-input v-model="placeForm.remark" placeholder="输入备注" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="text-align:right;">
|
<el-form-item style="text-align:right;">
|
||||||
<el-button v-hasPermi="['sch:place:edit']" type="primary" @click="onSubmit">保存</el-button>
|
<el-button v-hasPermi="['sch:place:edit']" type="primary" @click="onSubmit">保存</el-button>
|
||||||
@@ -102,7 +105,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card :class="placeListDialogShow ? '':'hidden-place-list'" class="place-list-dialog" :style="{ right: showSchool ? '300px' : '0', top : fullScreenPlaceList?'0px':'420px' }" :body-style="{ padding: '10px', height: 'calc(100% - 52px)' }">
|
<el-card :class="placeListDialogShow ? '' : 'hidden-place-list'" class="place-list-dialog" :style="{ right: showSchool ? '300px' : '0', top: fullScreenPlaceList ? '0px' : '420px' }" :body-style="{ padding: '10px', height: 'calc(100% - 52px)' }">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<div class="map-card-title">
|
<div class="map-card-title">
|
||||||
{{ placeListDialogTitle }}
|
{{ placeListDialogTitle }}
|
||||||
@@ -112,7 +115,7 @@
|
|||||||
<el-button icon="el-icon-full-screen" class="add-icon" @click="fullScreenPlaceList = !fullScreenPlaceList" />
|
<el-button icon="el-icon-full-screen" class="add-icon" @click="fullScreenPlaceList = !fullScreenPlaceList" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="关闭" placement="top" effect="dark">
|
<el-tooltip content="关闭" placement="top" effect="dark">
|
||||||
<el-button icon="el-icon-close" class="add-icon" @click="() => { placeListDialogShow = false;fullScreenPlaceList = false }" />
|
<el-button icon="el-icon-close" class="add-icon" @click="() => { placeListDialogShow = false; fullScreenPlaceList = false }" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="placeTableData" border stripe class="place-table-list" height="100%">
|
<el-table :data="placeTableData" border stripe class="place-table-list" height="100%">
|
||||||
@@ -139,13 +142,13 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<div v-if="isPointing || isRanging" class="map-tip" :style="{ transform: 'translate3D(' + (tipPostion.x + 15) +'px,' + (tipPostion.y - 10) + 'px, 0)' }">{{ mapHelpText }}</div>
|
<div v-if="isPointing || isRanging" class="map-tip" :style="{ transform: 'translate3D(' + (tipPostion.x + 15) + 'px,' + (tipPostion.y - 10) + 'px, 0)' }">{{ mapHelpText }}</div>
|
||||||
<i v-if="isPointing" class="el-icon-s-flag circle" :style="{ transform: 'translate3D(' + tipPostion.x +'px,' + tipPostion.y + 'px, 0)' }" />
|
<i v-if="isPointing" class="el-icon-s-flag circle" :style="{ transform: 'translate3D(' + tipPostion.x + 'px,' + tipPostion.y + 'px, 0)' }" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- eslint-disable no-undef -->
|
<!-- eslint-disable no-undef -->
|
||||||
<script>
|
<script>
|
||||||
import { getMapData, savePlace, updateSchoolStatus } from '@/api/sch/place';
|
import { getMapData, addPlace, updatePlace, updateSchoolStatus } from '@/api/sch/place';
|
||||||
export default {
|
export default {
|
||||||
name: 'Place',
|
name: 'Place',
|
||||||
data() {
|
data() {
|
||||||
@@ -186,7 +189,8 @@ export default {
|
|||||||
schoolList: [],
|
schoolList: [],
|
||||||
currentdeptId: undefined,
|
currentdeptId: undefined,
|
||||||
placeMarkerList: [],
|
placeMarkerList: [],
|
||||||
areaOptions: []
|
areaOptions: [],
|
||||||
|
searchValue: undefined
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -215,6 +219,7 @@ export default {
|
|||||||
window.onLoad = () => {
|
window.onLoad = () => {
|
||||||
this.aMap = new AMap.Map('map', {
|
this.aMap = new AMap.Map('map', {
|
||||||
zoom: this.zomm,
|
zoom: this.zomm,
|
||||||
|
center: [117.226095, 31.814372],
|
||||||
zooms: [8, 18]
|
zooms: [8, 18]
|
||||||
});
|
});
|
||||||
// 监听缩放
|
// 监听缩放
|
||||||
@@ -280,7 +285,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 导入地图
|
// 导入地图
|
||||||
importMap() {
|
importMap() {
|
||||||
const url = 'https://webapi.amap.com/maps?v=1.4.15&key=124646b0e6076de9d801400f833ac986&callback=onLoad';
|
const url = 'https://webapi.amap.com/maps?v=1.4.15&key=0e62be0896c6b8d27d453445f0fb8bc4&callback=onLoad';
|
||||||
var jsapi = document.createElement('script');
|
var jsapi = document.createElement('script');
|
||||||
jsapi.charset = 'utf-8';
|
jsapi.charset = 'utf-8';
|
||||||
jsapi.src = url;
|
jsapi.src = url;
|
||||||
@@ -426,7 +431,7 @@ export default {
|
|||||||
// 保存接口
|
// 保存接口
|
||||||
if (this.checkPlaceFormValidate()) {
|
if (this.checkPlaceFormValidate()) {
|
||||||
// 先访问接口,返回id插入placeForm
|
// 先访问接口,返回id插入placeForm
|
||||||
const resp = await savePlace(this.placeForm);
|
const resp = this.savePlace(this.placeForm);
|
||||||
if (resp.code != 200) {
|
if (resp.code != 200) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@@ -472,6 +477,13 @@ export default {
|
|||||||
this.placeMarkerList = tmpArr1;
|
this.placeMarkerList = tmpArr1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async savePlace(item) {
|
||||||
|
if (item.placeId) {
|
||||||
|
return updatePlace(item);
|
||||||
|
} else {
|
||||||
|
return addPlace(item);
|
||||||
|
}
|
||||||
|
},
|
||||||
checkPlaceFormValidate() {
|
checkPlaceFormValidate() {
|
||||||
const valid = [];
|
const valid = [];
|
||||||
if (!this.placeForm.name) {
|
if (!this.placeForm.name) {
|
||||||
@@ -538,7 +550,7 @@ export default {
|
|||||||
for (let i = 0; i < this.tableData.length; i++) {
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
const element = this.tableData[i];
|
const element = this.tableData[i];
|
||||||
const tempSchool = this.schoolList.filter((item) => item.schoolId === element.schoolId)[0];
|
const tempSchool = this.schoolList.filter((item) => item.schoolId === element.schoolId)[0];
|
||||||
if (!tempSchool.showInMap || !element.showInMap) {
|
if (!element.schoolShow || !element.showInMap) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const tmpMarker = new AMap.Marker({
|
const tmpMarker = new AMap.Marker({
|
||||||
@@ -569,7 +581,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 修改场地状态
|
// 修改场地状态
|
||||||
async changePlaceStatus(item) {
|
async changePlaceStatus(item) {
|
||||||
const resp = await savePlace(item);
|
const resp = await updatePlace(item);
|
||||||
if (resp.code == 200) {
|
if (resp.code == 200) {
|
||||||
this.resetMarkers();
|
this.resetMarkers();
|
||||||
}
|
}
|
||||||
@@ -731,6 +743,7 @@ export default {
|
|||||||
.actived-school {
|
.actived-school {
|
||||||
border: 2px solid #409eff !important;
|
border: 2px solid #409eff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-radio__label {
|
::v-deep .el-radio__label {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
115
src/views/sch/rules/components/RuleDialogForm.vue
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="驾校信息" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="600px" @close="closeDialog">
|
||||||
|
<div>
|
||||||
|
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="top" @keyup.enter.native="dialogFormSubmit()">
|
||||||
|
<el-form-item label="制度名" prop="ruleName">
|
||||||
|
<el-input v-model="dialogForm.ruleName" placeholder="请输入制度名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="实施时间" prop="implementTime">
|
||||||
|
<el-date-picker clearable v-model="dialogForm.implementTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择实施时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="到期时间" prop="dueTime">
|
||||||
|
<el-date-picker clearable v-model="dialogForm.dueTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择到期时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="制度内容" prop="ruleContent">
|
||||||
|
<editor v-model="dialogForm.ruleContent" :min-height="192" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button plain @click="(visible=false)">取消</el-button>
|
||||||
|
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { addRules, updateRules } from "@/api/sch/rules";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
canSubmit: true,
|
||||||
|
dialogForm: {
|
||||||
|
ruleId: undefined,
|
||||||
|
ruleName: undefined,
|
||||||
|
implementTime: undefined,
|
||||||
|
dueTime: undefined,
|
||||||
|
ruleContent: undefined
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
ruleName: [{ required: true, message: '制度名不能为空', trigger: 'blur' }],
|
||||||
|
implementTime: [{ required: true, message: '实施时间不能为空', trigger: 'blur' }],
|
||||||
|
ruleContent: [{ required: true, message: '制度内容不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(info = undefined) {
|
||||||
|
// debugger
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetDialogForm();
|
||||||
|
this.$refs['dialogForm'].resetFields();
|
||||||
|
if (info) {
|
||||||
|
this.dialogForm = this.deepClone(info);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetDialogForm() {
|
||||||
|
this.dialogForm = {
|
||||||
|
ruleId: undefined,
|
||||||
|
ruleName: undefined,
|
||||||
|
implementTime: undefined,
|
||||||
|
dueTime: undefined,
|
||||||
|
ruleContent: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
closeDialog() {
|
||||||
|
this.$emit('update:dialogVisible', false);
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dialogFormSubmit() {
|
||||||
|
this.$refs.dialogForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.canSubmit = false;
|
||||||
|
|
||||||
|
if (this.dialogForm.ruleId) {
|
||||||
|
// 校验完成,调接口
|
||||||
|
updateRules(this.dialogForm)
|
||||||
|
.then((resp) => {
|
||||||
|
this.canSubmit = true;
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('保存成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.visible = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.canSubmit = true;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addRules(this.dialogForm)
|
||||||
|
.then((resp) => {
|
||||||
|
this.canSubmit = true;
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('保存成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.visible = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.canSubmit = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
46
src/views/sch/rules/components/SearchForm.vue
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="searchForm" :model="searchForm" inline>
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="制度名" prop="ruleName">
|
||||||
|
<el-input v-model="searchForm.ruleName" placeholder="请输入制度名" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import DMRadio from '@/components/DMRadio';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
DMRadio
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {},
|
||||||
|
dateRange: []
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
resetQuery() {
|
||||||
|
this.searchForm = {
|
||||||
|
ruleName: undefined
|
||||||
|
};
|
||||||
|
this.dateRange = []
|
||||||
|
this.$emit('search')
|
||||||
|
},
|
||||||
|
pickDateChange() {
|
||||||
|
this.addDateRange(this.searchForm, this.dateRange)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
111
src/views/sch/rules/index.vue
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 搜索插件 -->
|
||||||
|
<SearchForm v-show="showSearch" ref="SearchForm" @search="_getTableList" />
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddAndUpdate(undefined)" v-hasPermi="['sch:rules:add']">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="_getTableList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="tableList">
|
||||||
|
<el-table-column type="index" width="55" align="center" />
|
||||||
|
<el-table-column label="制度名" align="center" prop="ruleName" />
|
||||||
|
<el-table-column label="实施时间" align="center" prop="implementTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.implementTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="到期时间" align="center" prop="dueTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.dueTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="制度内容" align="center" prop="ruleContent" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleAddAndUpdate(scope.row)" v-hasPermi="['sch:rules:edit']">修改</el-button>
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['sch:rules:remove']">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total>0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||||
|
|
||||||
|
<!-- 添加或修改规章制度对话框 -->
|
||||||
|
<RuleDialogForm v-if="dialogVisible" ref="ruleDialogForm" :dialog-visible="dialogVisible" @refreshDataList="_getTableList" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listRules, getRules, delRules } from "@/api/sch/rules";
|
||||||
|
import SearchForm from "./components/SearchForm.vue";
|
||||||
|
import RuleDialogForm from "./components/RuleDialogForm.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Rules",
|
||||||
|
components: {
|
||||||
|
SearchForm, RuleDialogForm
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 规章制度表格数据
|
||||||
|
tableList: [],
|
||||||
|
// 查询参数
|
||||||
|
searchForm: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
dialogVisible: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this._getTableList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询规章制度列表 */
|
||||||
|
_getTableList() {
|
||||||
|
this.loading = true;
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
const params = { ...this.searchForm, ...tempForm };
|
||||||
|
listRules(params).then(response => {
|
||||||
|
this.tableList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAddAndUpdate(info) {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleDialogForm.init(info)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ruleIds = row.ruleId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除规章制度名为"' + row.ruleName + '"的数据项?').then(function () {
|
||||||
|
return delRules(ruleIds);
|
||||||
|
}).then(() => {
|
||||||
|
this._getTableList();
|
||||||
|
this.$message.success('删除成功');
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -22,6 +22,12 @@
|
|||||||
<el-table-column label="负责人" prop="leader" />
|
<el-table-column label="负责人" prop="leader" />
|
||||||
<el-table-column label="联系方式" prop="phone" />
|
<el-table-column label="联系方式" prop="phone" />
|
||||||
<el-table-column label="备注" prop="remark" />
|
<el-table-column label="备注" prop="remark" />
|
||||||
|
<el-table-column label="小程序二维码" prop="jwlCodePath" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-image v-if="scope.row.jwlCodePath != undefined" style="width: 100px; height: 100px" :src="baseUrl + scope.row.jwlCodePath" ></el-image>
|
||||||
|
<el-button v-else v-hasPermi="['sch:school:create']" type="text" icon="el-icon-edit" @click="handleCreate(scope.row)">生成</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" width="160">
|
<el-table-column label="创建时间" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
@@ -31,7 +37,6 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-hasPermi="['sch:school:edit']" type="text" icon="el-icon-edit" @click="addOrUpdateHandle(scope.row)">修改</el-button>
|
<el-button v-hasPermi="['sch:school:edit']" type="text" icon="el-icon-edit" @click="addOrUpdateHandle(scope.row)">修改</el-button>
|
||||||
<el-button v-hasPermi="['sch:school:remove']" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button v-hasPermi="['sch:school:remove']" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -63,7 +68,8 @@ export default {
|
|||||||
loading: {
|
loading: {
|
||||||
tableLoading: false
|
tableLoading: false
|
||||||
},
|
},
|
||||||
dialogVisible: false
|
dialogVisible: false,
|
||||||
|
baseUrl: process.env.VUE_APP_BASE_API
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -102,6 +108,14 @@ export default {
|
|||||||
this.$refs.dialogForm.init(item);
|
this.$refs.dialogForm.init(item);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleCreate(item){
|
||||||
|
schoolApi.createCode(item.schoolId).then(resp => {
|
||||||
|
if (resp.code === 200) {
|
||||||
|
this.getPageList();
|
||||||
|
this.$modal.msgSuccess('生成成功');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 删除操作
|
// 删除操作
|
||||||
handleDelete(item) {
|
handleDelete(item) {
|
||||||
this.$modal
|
this.$modal
|
||||||
@@ -115,7 +129,7 @@ export default {
|
|||||||
this.$modal.msgSuccess('删除成功');
|
this.$modal.msgSuccess('删除成功');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
55
src/views/statistic/areaStudent/components/SearchForm.vue
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="searchForm" :model="searchForm" inline>
|
||||||
|
<el-form-item label="区域" prop="area">
|
||||||
|
<el-select v-model="searchForm.area" filterable placeholder="请选择" clearable size="mini">
|
||||||
|
<el-option v-for="(dict, index) in areaOptions" :key="index" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="月份" prop="month">
|
||||||
|
<el-date-picker v-model="searchForm.month" type="month" placeholder="选择月" value-format="yyyy-MM" format="yyyy-MM">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import DMRadio from '@/components/DMRadio';
|
||||||
|
const date = new Date();
|
||||||
|
const month = date.getFullYear() + "-" + (date.getMonth() + 1);
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
DMRadio
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
areaOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {
|
||||||
|
area: undefined,
|
||||||
|
month: month
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
resetQuery() {
|
||||||
|
this.searchForm = {
|
||||||
|
placeId: undefined,
|
||||||
|
month: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
105
src/views/statistic/areaStudent/index.vue
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 搜索插件 -->
|
||||||
|
<SearchForm v-show="showSearch" ref="SearchForm" @search="_getTableList" :areaOptions="areaOptions" />
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['statistic:areaStudent:export']">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" :columns="columns" @queryTable="_getTableList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column type="index" width="55" align="center" />
|
||||||
|
<el-table-column label="区域" align="center" min-width="120" prop="areaName" />
|
||||||
|
<el-table-column label="月份" align="center" min-width="120" prop="month" />
|
||||||
|
<el-table-column label="线索数" align="center" min-width="120" prop="clueNum" />
|
||||||
|
<el-table-column label="成交数" align="center" min-width="120" prop="signNum" />
|
||||||
|
<el-table-column label="成交率" align="center" min-width="120" sortable prop="dealRate" />
|
||||||
|
<el-table-column label="平均利润" align="center" min-width="120" sortable prop="avgProfit" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total>0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listReport } from "@/api/statistic/areaStudent";
|
||||||
|
import SearchForm from "./components/SearchForm.vue";
|
||||||
|
import { getAllPlaces } from '@/api/sch/place'
|
||||||
|
|
||||||
|
const date = new Date();
|
||||||
|
const month = date.getFullYear() + "-" + (date.getMonth() + 1);
|
||||||
|
export default {
|
||||||
|
name: "AreaStudent",
|
||||||
|
components: {
|
||||||
|
SearchForm
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 列表数据
|
||||||
|
dataList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
searchForm: {
|
||||||
|
month: month,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
columns: [],
|
||||||
|
dialogVisible: false,
|
||||||
|
areaOptions: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this._getTableList();
|
||||||
|
this.getDicts('dm_area').then((response) => {
|
||||||
|
this.areaOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询报名点成交登记列表 */
|
||||||
|
_getTableList() {
|
||||||
|
this.loading = true;
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
const params = { ...this.searchForm, ...tempForm };
|
||||||
|
listReport(params).then(response => {
|
||||||
|
this.dataList = response.data;
|
||||||
|
// this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async getAllPlaces() {
|
||||||
|
const resp = await getAllPlaces();
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.placeOptions = resp.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
|
const params = { ...this.searchForm, ...tempForm };
|
||||||
|
this.download('/statistic/area/student/export', params, `区域学员报表_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||