Compare commits
53 Commits
c7a6210195
...
caozong
| Author | SHA1 | Date | |
|---|---|---|---|
| 205e2c7ae5 | |||
| 2aabff2e90 | |||
| 185163d326 | |||
| 052fcd60b8 | |||
| fc2404a5b8 | |||
|
|
72d19bfb02 | ||
|
|
ac798f3f94 | ||
|
|
0ba4d3fe26 | ||
| a2c29e8dda | |||
| 9631dba573 | |||
| ed848edfd9 | |||
| f8eda78cf7 | |||
| 6b22078098 | |||
| 13f3fd4377 | |||
| d41a186e22 | |||
| 0a771cfa54 | |||
|
|
fe708bd2a8 | ||
| 6c71bccd83 | |||
| 2c0bc99c03 | |||
| 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 | |||
| 1fd8a381ea |
@@ -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'
|
||||
|
||||
# 对嘛管理系统/开发环境
|
||||
# 开心学车管理系统/开发环境
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
|
||||
JWL_API = ''
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 对嘛管理系统
|
||||
VUE_APP_TITLE = 开心学车管理系统
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 对嘛管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
# 开心学车管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/zhaosheng'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 对嘛管理系统
|
||||
VUE_APP_TITLE = 开心学车管理系统
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# 对嘛管理系统/测试环境
|
||||
# 开心学车管理系统/测试环境
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = {
|
||||
// 添加全局变量
|
||||
globals: {
|
||||
uni: 'readonly',
|
||||
wx: 'readonly'
|
||||
wx: 'readonly',
|
||||
},
|
||||
extends: ['plugin:vue/recommended', 'eslint:recommended'], // 使用的默认的规则集
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "river",
|
||||
"version": "1.0.0",
|
||||
"description": "对嘛管理系统",
|
||||
"author": "对嘛",
|
||||
"description": "开心学车管理系统",
|
||||
"author": "开心学车",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
@@ -78,7 +78,8 @@
|
||||
"sass-loader": "10.1.1",
|
||||
"script-ext-html-webpack-plugin": "2.1.5",
|
||||
"svg-sprite-loader": "5.1.1",
|
||||
"vue-template-compiler": "2.6.12"
|
||||
"vue-template-compiler": "2.6.12",
|
||||
"vue-wxlogin": "^1.0.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 20 KiB |
BIN
public/favicon1.ico
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
public/favicon2.ico
Normal file
|
After Width: | Height: | Size: 137 KiB |
@@ -27,13 +27,13 @@
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
.logo {
|
||||
position: absolute;
|
||||
/* position: absolute; */
|
||||
display: block;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
/* left: 50%;
|
||||
top: 50%; */
|
||||
width: 100px;
|
||||
/* height: 162px; */
|
||||
transform: translate3d(-50%, -80px, 0);
|
||||
/* transform: translate3d(-50%, -80px, 0); */
|
||||
animation: twinkling 1.2s infinite ease-in-out;
|
||||
}
|
||||
/* .animated {
|
||||
@@ -54,21 +54,22 @@
|
||||
}
|
||||
}
|
||||
.loading {
|
||||
position: absolute;
|
||||
/* position: absolute; */
|
||||
margin-top: 40px;
|
||||
display: block;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate3d(-50%, 80px, 0);
|
||||
/* left: 50%; */
|
||||
/* top: 50%; */
|
||||
/* transform: translate3d(-50%, 80px, 0); */
|
||||
color: #fefeff;
|
||||
font-size: 14px;
|
||||
}
|
||||
canvas {
|
||||
/* canvas {
|
||||
display: block;
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate3d(-50%, 100px, 0);
|
||||
}
|
||||
} */
|
||||
|
||||
#loader-wrapper {
|
||||
position: relative;
|
||||
@@ -76,6 +77,10 @@
|
||||
height: 100%;
|
||||
background: #1a1a34;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
<script src="/loading/prefixfree.min.js"></script>
|
||||
@@ -88,5 +93,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/loading/index.js"></script>
|
||||
<script type="text/javascript">
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: 'e7783f9551b7b38e1f485f99cb7d986f'
|
||||
};
|
||||
</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=e92870cebfb5c7a9139f77bca1e7997a&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Scale"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
public/logo.png
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 20 KiB |
BIN
public/logo1.png
Normal file
|
After Width: | Height: | Size: 137 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) {
|
||||
return request({
|
||||
@@ -57,3 +68,12 @@ export function getCodeImg() {
|
||||
timeout: 20000
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function getMsgCode(data) {
|
||||
return request({
|
||||
url: '/msgcode',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
35
src/api/question.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* @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: '/driver-api/tdQuestion/duima/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
export function updateQuestion(data) {
|
||||
return request({
|
||||
url: '/driver-api/tdQuestion/duima/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function addQuestion(data) {
|
||||
return request({
|
||||
url: '/driver-api/tdQuestion/duima/add',
|
||||
method: 'put',
|
||||
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) {
|
||||
return request({
|
||||
|
||||
59
src/api/sch/coach.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-07 17:14:32
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-10 17:00:57
|
||||
* @Description:教练接口
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询教练列表
|
||||
export function listCoach(query) {
|
||||
return request({
|
||||
url: '/sch/coach/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询教练详细
|
||||
export function getCoach(coachId) {
|
||||
return request({
|
||||
url: '/sch/coach/' + coachId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增教练
|
||||
export function addCoach(data) {
|
||||
return request({
|
||||
url: '/sch/coach',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改教练
|
||||
export function updateCoach(data) {
|
||||
return request({
|
||||
url: '/sch/coach',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除教练
|
||||
export function delCoach(coachId) {
|
||||
return request({
|
||||
url: '/sch/coach/' + coachId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
export function getAllCoaches(query){
|
||||
return request({
|
||||
url: '/sch/coach/all',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
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({
|
||||
url: '/sch/place',
|
||||
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) {
|
||||
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
|
||||
});
|
||||
},
|
||||
allList(data = {}) {
|
||||
return request({
|
||||
url: '/sch/school/all',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
},
|
||||
getById(id) {
|
||||
return request({
|
||||
url: `/sch/school/${id}`,
|
||||
@@ -32,5 +39,11 @@ export default {
|
||||
url: `/sch/school/${id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
},
|
||||
createCode(id){
|
||||
return request({
|
||||
url: `/sch/school/create/${id}`,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
44
src/api/sch/shop.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询抖音门店列表
|
||||
export function listShop(query) {
|
||||
return request({
|
||||
url: '/system/shop/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询抖音门店详细
|
||||
export function getShop(shopId) {
|
||||
return request({
|
||||
url: '/system/shop/' + shopId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增抖音门店
|
||||
export function addShop(data) {
|
||||
return request({
|
||||
url: '/system/shop',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改抖音门店
|
||||
export function updateShop(data) {
|
||||
return request({
|
||||
url: '/system/shop',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除抖音门店
|
||||
export function delShop(shopId) {
|
||||
return request({
|
||||
url: '/system/shop/' + shopId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
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',
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
getSignPlace(userId) {
|
||||
return request({
|
||||
url: '/system/employee/signPlace/' + userId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
59
src/api/system/skill.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @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 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'
|
||||
})
|
||||
}
|
||||
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) {
|
||||
return request({
|
||||
@@ -39,8 +48,8 @@ export function deleteClue(data) {
|
||||
export function exportData(query) {
|
||||
return request({
|
||||
url: '/zs/clue/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
@@ -108,17 +117,16 @@ export function getDistributeRecord(param) {
|
||||
// 查询跟踪记录
|
||||
export function getFollowRecord(param) {
|
||||
return request({
|
||||
url: '/zs/clue/followrecord',
|
||||
url: '/zs/followrecord/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
//查询咨询记录
|
||||
export function getConsultRecord(param) {
|
||||
return request({
|
||||
url: '/zs/clue/consultrecord',
|
||||
url: '/zs/consultrecord/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
@@ -183,3 +191,30 @@ export function updateAccept(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
|
||||
});
|
||||
}
|
||||
|
||||
export function getFollowCount() {
|
||||
return request({
|
||||
url: `/zs/clue/follow/count`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
51
src/api/zs/feedback.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-07 17:14:38
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-07 17:14:44
|
||||
* @Description: 线索反馈接口
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询线索反馈列表
|
||||
export function listFeedback(query) {
|
||||
return request({
|
||||
url: '/zs/feedback/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedback(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/' + feedbackId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增线索反馈
|
||||
export function addFeedback(data) {
|
||||
return request({
|
||||
url: '/zs/feedback',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改线索反馈
|
||||
export function updateFeedback(data) {
|
||||
return request({
|
||||
url: '/zs/feedback',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除线索反馈
|
||||
export function delFeedback(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/' + feedbackId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
93
src/api/zs/feedbackDetail.js
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-11 20:48:02
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-11 20:57:06
|
||||
* @Description:
|
||||
*/
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-10 16:08:39
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-10 16:10:06
|
||||
* @Description: 反馈单
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询线索反馈列表
|
||||
export function listFeedbackDetail(query) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackDetail(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/' + feedbackId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
export function getFeedbackDetailInfo(query){
|
||||
return request({
|
||||
url: '/zs/feedback/detail/info',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackDetailByClueId(clueId) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/' + clueId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增线索反馈
|
||||
export function addFeedbackDetail(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改线索反馈
|
||||
export function updateFeedbackDetail(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除线索反馈
|
||||
export function delFeedbackDetail(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/' + feedbackId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
//查询接待人统计
|
||||
export function getCount(param){
|
||||
return request({
|
||||
url: '/zs/feedback/detail/count',
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//查询接待人接待详情
|
||||
export function getCountDetail(param){
|
||||
return request({
|
||||
url: '/zs/feedback/detail/count/detail',
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
59
src/api/zs/feedbackOrder.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-10 16:08:39
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-10 16:10:06
|
||||
* @Description: 反馈单
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询线索反馈列表
|
||||
export function listFeedbackOrder(query) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackOrder(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/' + feedbackId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackOrderByClueId(clueId) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/' + clueId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增线索反馈
|
||||
export function addFeedbackOrder(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/order',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改线索反馈
|
||||
export function updateFeedbackOrder(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/order',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除线索反馈
|
||||
export function delFeedbackOrder(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/' + feedbackId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
53
src/api/zs/invitation.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询邀约列表
|
||||
export function listInvitation(query) {
|
||||
return request({
|
||||
url: '/zs/invitation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询邀约详细
|
||||
export function getInvitation(invitationId) {
|
||||
return request({
|
||||
url: '/zs/invitation/' + invitationId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询邀约详细
|
||||
export function getInvitationByClue(query) {
|
||||
return request({
|
||||
url: '/zs/invitation/clue',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增邀约
|
||||
export function addInvitation(data) {
|
||||
return request({
|
||||
url: '/zs/invitation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改邀约
|
||||
export function updateInvitation(data) {
|
||||
return request({
|
||||
url: '/zs/invitation',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除邀约
|
||||
export function delInvitation(invitationId) {
|
||||
return request({
|
||||
url: '/zs/invitation/' + invitationId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
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) {
|
||||
return request({
|
||||
url: '/zs/sign/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
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: 20 KiB |
BIN
src/assets/logo/logo1.png
Normal file
|
After Width: | Height: | Size: 5.5 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;
|
||||
}
|
||||
}
|
||||
|
||||
.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 all_permission = '*:*:*';
|
||||
const permissions = store.getters && store.getters.permissions;
|
||||
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const permissionFlag = value;
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
|
||||
<breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container" />
|
||||
<top-nav v-if="topNav" id="topmenu-container" class="topmenu-container" />
|
||||
<!-- <breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container" /> -->
|
||||
<!-- <top-nav v-if="topNav" id="topmenu-container" class="topmenu-container" /> -->
|
||||
<!-- <tags-view v-if="needTagsView" /> -->
|
||||
|
||||
<div class="right-menu">
|
||||
<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 TopNav from '@/components/TopNav';
|
||||
import Hamburger from '@/components/Hamburger';
|
||||
import TagsView from '././TagsView';
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
TopNav,
|
||||
Hamburger
|
||||
Hamburger,
|
||||
TagsView
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['sidebar', 'avatar', 'device']),
|
||||
@@ -56,6 +60,11 @@ export default {
|
||||
get() {
|
||||
return this.$store.state.settings.topNav;
|
||||
}
|
||||
},
|
||||
needTagsView: {
|
||||
get() {
|
||||
return this.$store.state.settings.tagsView;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -73,7 +82,7 @@ export default {
|
||||
location.href = '/index';
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '对嘛管理系统',
|
||||
title: '开心学车管理系统',
|
||||
logo: logoImg
|
||||
};
|
||||
},
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-08-16 22:04:23
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-11 22:17:43
|
||||
* @Description:
|
||||
*/
|
||||
import router from './router';
|
||||
import store from './store';
|
||||
import { Message } from 'element-ui';
|
||||
@@ -6,9 +13,21 @@ import 'nprogress/nprogress.css';
|
||||
import { 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',
|
||||
'/clue/feedback/follow',
|
||||
'/clue/feedback/arrival',
|
||||
'/coach/count',
|
||||
'/coach/count/detail'
|
||||
];
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start();
|
||||
@@ -16,7 +35,9 @@ router.beforeEach((to, from, next) => {
|
||||
to.meta.title && store.dispatch('settings/setTitle', to.meta.title);
|
||||
/* has token*/
|
||||
if (to.path === '/login') {
|
||||
next({ path: '/' });
|
||||
next({
|
||||
path: '/'
|
||||
});
|
||||
NProgress.done();
|
||||
} else {
|
||||
if (store.getters.roles.length === 0) {
|
||||
@@ -24,18 +45,25 @@ router.beforeEach((to, from, next) => {
|
||||
// 判断当前用户是否已拉取完user_info信息
|
||||
store
|
||||
.dispatch('GetInfo')
|
||||
.then(() => {
|
||||
.then((resp) => {
|
||||
isRelogin.show = false;
|
||||
localStorage.setItem('admin', resp.user.admin);
|
||||
localStorage.setItem('userId', resp.user.userId);
|
||||
store.dispatch('GenerateRoutes').then((accessRoutes) => {
|
||||
// 根据roles权限生成可访问的路由表
|
||||
router.addRoutes(accessRoutes); // 动态添加可访问路由表
|
||||
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
|
||||
next({
|
||||
...to,
|
||||
replace: true
|
||||
}); // hack方法 确保addRoutes已完成
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
Message.error(err);
|
||||
next({ path: '/' });
|
||||
next({
|
||||
path: '/'
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -51,6 +51,31 @@ export const constantRoutes = [
|
||||
component: () => import('@/views/register'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/question',
|
||||
component: () => import('@/views/question'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/clue/feedback/follow',
|
||||
component: () => import('@/views/zs/feedback/follow'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/clue/feedback/arrival',
|
||||
component: () => import('@/views/zs/feedback/arrival'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/coach/count',
|
||||
component: () => import('@/views/sch/coach/count'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/coach/count/detail',
|
||||
component: () => import('@/views/sch/coach/count/detail'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/error/404'),
|
||||
@@ -194,6 +219,23 @@ export const dynamicRoutes = [
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
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 { getToken, setToken, removeToken } from '@/utils/auth';
|
||||
import {
|
||||
login,
|
||||
logout,
|
||||
getInfo,
|
||||
wxLogin
|
||||
} from '@/api/login';
|
||||
import {
|
||||
getToken,
|
||||
setToken,
|
||||
removeToken
|
||||
} from '@/utils/auth';
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
@@ -30,7 +39,9 @@ const user = {
|
||||
|
||||
actions: {
|
||||
// 登录
|
||||
Login({ commit }, userInfo) {
|
||||
Login({
|
||||
commit
|
||||
}, userInfo) {
|
||||
const username = userInfo.username.trim();
|
||||
const password = userInfo.password;
|
||||
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) => {
|
||||
getInfo()
|
||||
.then((res) => {
|
||||
@@ -74,7 +105,10 @@ const user = {
|
||||
},
|
||||
|
||||
// 退出系统
|
||||
LogOut({ commit, state }) {
|
||||
LogOut({
|
||||
commit,
|
||||
state
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
logout(state.token)
|
||||
.then(() => {
|
||||
@@ -91,7 +125,9 @@ const user = {
|
||||
},
|
||||
|
||||
// 前端 登出
|
||||
FedLogOut({ commit }) {
|
||||
FedLogOut({
|
||||
commit
|
||||
}) {
|
||||
return new Promise((resolve) => {
|
||||
commit('SET_TOKEN', '');
|
||||
removeToken();
|
||||
|
||||
@@ -1,16 +1,32 @@
|
||||
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 { getToken } from '@/utils/auth';
|
||||
import {
|
||||
getToken
|
||||
} from '@/utils/auth';
|
||||
import errorCode from '@/utils/errorCode';
|
||||
import { tansParams, blobValidate } from '@/utils/ruoyi';
|
||||
import {
|
||||
tansParams,
|
||||
blobValidate
|
||||
} from '@/utils/ruoyi';
|
||||
import cache from '@/plugins/cache';
|
||||
import { saveAs } from 'file-saver';
|
||||
import { successCode } from '@/global/global';
|
||||
import {
|
||||
saveAs
|
||||
} from 'file-saver';
|
||||
import {
|
||||
successCode
|
||||
} from '@/global/global';
|
||||
|
||||
let downloadLoadingInstance;
|
||||
// 是否显示重新登录
|
||||
export const isRelogin = { show: false };
|
||||
export const isRelogin = {
|
||||
show: false
|
||||
};
|
||||
|
||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
||||
// 创建axios实例
|
||||
@@ -18,7 +34,7 @@ const service = axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
// 超时
|
||||
timeout: 10000
|
||||
timeout: 120000
|
||||
});
|
||||
|
||||
// request拦截器
|
||||
@@ -31,6 +47,11 @@ service.interceptors.request.use(
|
||||
if (getToken() && !isToken) {
|
||||
config.headers['Authorization'] = 'Bearer ' + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
if (config.url.includes("http")) {
|
||||
config.baseURL = "";
|
||||
} else if (config.url.includes("amap")) {
|
||||
config.baseURL = "";
|
||||
}
|
||||
// get请求映射params参数
|
||||
if (config.method === 'get' && config.params) {
|
||||
let url = config.url + '?' + tansParams(config.params);
|
||||
@@ -84,10 +105,10 @@ service.interceptors.response.use(
|
||||
if (!isRelogin.show) {
|
||||
isRelogin.show = true;
|
||||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
|
||||
confirmButtonText: '重新登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
confirmButtonText: '重新登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
isRelogin.show = false;
|
||||
store.dispatch('LogOut').then(() => {
|
||||
@@ -116,7 +137,9 @@ service.interceptors.response.use(
|
||||
},
|
||||
(error) => {
|
||||
console.log('err' + error);
|
||||
let { message } = error;
|
||||
let {
|
||||
message
|
||||
} = error;
|
||||
if (message === 'Network Error') {
|
||||
message = '后端接口连接异常';
|
||||
} else if (message.includes('timeout')) {
|
||||
@@ -147,7 +170,9 @@ export function download(url, params, filename, config) {
|
||||
return tansParams(params);
|
||||
}
|
||||
],
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
responseType: 'blob',
|
||||
...config
|
||||
})
|
||||
|
||||
@@ -73,20 +73,10 @@ export function addDateRange(params, dateRange, propName) {
|
||||
|
||||
// 回显数据字典
|
||||
export function selectDictLabel(datas, value) {
|
||||
if (value === undefined) {
|
||||
if (value == undefined) {
|
||||
return '';
|
||||
}
|
||||
var actions = [];
|
||||
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('');
|
||||
return datas.find((item) => item.dictValue == value).dictLabel;
|
||||
}
|
||||
|
||||
// 回显数据字典(字符串数组)
|
||||
|
||||
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>
|
||||
<div :class="className" :style="{height:height,width:width}" />
|
||||
<div class="chart" style="height:200px;width:100%;" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts';
|
||||
require('echarts/theme/macarons'); // echarts theme
|
||||
import resize from './mixins/resize';
|
||||
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;
|
||||
const animationDuration = 6000
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
}
|
||||
},
|
||||
// props: {
|
||||
// className: {
|
||||
// type: String,
|
||||
// default: 'chart'
|
||||
// },
|
||||
// width: {
|
||||
// type: String,
|
||||
// default: '100%'
|
||||
// },
|
||||
// height: {
|
||||
// type: String,
|
||||
// default: '300px'
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
};
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart();
|
||||
});
|
||||
getTodayPeopleRange().then((resp) => {
|
||||
this.initChart(resp.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$el, 'macarons');
|
||||
initChart(item) {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
containLabel: true,
|
||||
},
|
||||
legend: {
|
||||
data: ['人数'],
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
}
|
||||
}
|
||||
data: item.people,
|
||||
// axisTick: {
|
||||
// alignWithLabel: true
|
||||
// }
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
axisTick: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
// axisTick: {
|
||||
// show: false
|
||||
// }
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'pageA',
|
||||
name: '成交学员数',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [79, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
// stack: 'vistors',
|
||||
barWidth: 40,
|
||||
data: item.data,
|
||||
// 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>
|
||||
<div class="main-content">
|
||||
<el-card>
|
||||
<div>这是首页</div>
|
||||
</el-card>
|
||||
<div class="dashboard-editor-container">
|
||||
<!-- 招生团队首页 -->
|
||||
<div>
|
||||
<el-row :gutter="40" class="panel-group" style="margin-bottom: 20px">
|
||||
<!-- <el-col :span="6">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
问候
|
||||
</div>
|
||||
<div class="task-pane">
|
||||
<p>亲爱的{{user.nickName}},您好!</p>
|
||||
<p>人生的路,漫长且孤独,短暂也快乐,漫长的是考验,短暂的是幸福,平坦的路途,让我们心怀感恩,泥泞的路途,让我们努力加油。</p>
|
||||
</div>
|
||||
</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="12">
|
||||
<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="12">
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
name: 'Index',
|
||||
data() {
|
||||
return {};
|
||||
components: {
|
||||
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>
|
||||
|
||||
<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;
|
||||
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,22 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">对嘛管理系统</h3>
|
||||
<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" type="password" auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin">
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</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>
|
||||
</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 class="login-form">
|
||||
<h3 class="title">开心学车管理系统</h3>
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="微信扫码" name="wx" style="height:200px">
|
||||
<wxlogin v-if="!code && activeName === 'wx'" appid="wxc9e106a4afd2b9dd" :scope="'snsapi_login'" :theme="'black'" redirect_uri="https://xueche.kxxc.top/login" :href="href">
|
||||
</wxlogin>
|
||||
|
||||
<div v-else v-loading="loading">
|
||||
<WxCode v-if="codeShow" :code="code" :openId="openId" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="短信验证码" name="password" style="height:200px">
|
||||
<Password v-if="activeName === 'password'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</div>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>
|
||||
@@ -42,30 +28,26 @@
|
||||
import { getCodeImg } from '@/api/login';
|
||||
import Cookies from 'js-cookie';
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
||||
import wxlogin from 'vue-wxlogin'
|
||||
import Password from './password.vue';
|
||||
import WxCode from './wxCode.vue';
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
components: {
|
||||
wxlogin, Password, WxCode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
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,
|
||||
// 验证码开关
|
||||
captchaEnabled: true,
|
||||
// 注册开关
|
||||
register: false,
|
||||
redirect: undefined
|
||||
redirect: undefined,
|
||||
activeName: 'wx',
|
||||
code: undefined,
|
||||
openId: undefined,
|
||||
codeShow: false,
|
||||
href: "data:text/css;base64,LmltcG93ZXJCb3ggLnFyY29kZSB7d2lkdGg6IDE4MHB4OyBtYXJnaW4tdG9wOjBweH0KLmltcG93ZXJCb3ggLnRpdGxlIHtkaXNwbGF5OiBub25lO30KLmltcG93ZXJCb3ggLmluZm8ge3dpZHRoOiAxODBweDt9Ci5zdGF0dXNfaWNvbiB7ZGlzcGxheTogbm9uZX0KLmltcG93ZXJCb3ggLnN0YXR1cyB7dGV4dC1hbGlnbjogY2VudGVyO30g"
|
||||
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -77,54 +59,43 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCode();
|
||||
this.getCookie();
|
||||
this.code = this.$route.query.code;
|
||||
if (this.code) {
|
||||
this.loading = true
|
||||
this.wxLogin(this.code);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.createWxQrcode();
|
||||
},
|
||||
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;
|
||||
async wxLogin(code) {
|
||||
//根据code和openId查询是否关联了手机号,如果没有关联 需先关联手机号
|
||||
this.$store.dispatch('WXLogin', { code: code, type: 1 }).then(resp => {
|
||||
if (resp && resp.token != undefined) {
|
||||
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
|
||||
} else if (resp.openId) {
|
||||
//如果返回openId则是没有绑定手机号
|
||||
this.openId = resp.openId;
|
||||
this.loading = false
|
||||
this.codeShow = true
|
||||
} else {
|
||||
this.$message.error("二维码失效,请刷新!");
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
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;
|
||||
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 {
|
||||
Cookies.remove('username');
|
||||
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: "wxc9e106a4afd2b9dd", // 微信官方提供的测试id
|
||||
scope: "snsapi_login",
|
||||
redirect_uri: "https://xueche.ahduima.com/login", // 微信官方中的测试地址
|
||||
state: "bind",
|
||||
style: "black",
|
||||
href: this.href,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -147,9 +118,10 @@ export default {
|
||||
}
|
||||
|
||||
.login-form {
|
||||
display: inline;
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
width: 400px;
|
||||
width: 350px;
|
||||
padding: 25px 25px 5px 25px;
|
||||
.el-input {
|
||||
height: 38px;
|
||||
@@ -192,4 +164,8 @@ export default {
|
||||
.login-code-img {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.impowerBox .qrcode {
|
||||
width: 200px !important;
|
||||
}
|
||||
</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>
|
||||
|
||||
211
src/views/question/components/QuestionAddForm.vue
Normal file
@@ -0,0 +1,211 @@
|
||||
<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-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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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-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 { 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) {
|
||||
updateQuestion(this.dialogForm).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
// this.visible = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
183
src/views/question/components/QuestionForm.vue
Normal file
@@ -0,0 +1,183 @@
|
||||
<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="100" alt="">
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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 } 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) {
|
||||
updateQuestion(this.dialogForm).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.$emit('update');
|
||||
// this.visible = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
143
src/views/question/index.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<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 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" 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.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(item);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="register">
|
||||
<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-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
.then(() => {
|
||||
this.$router.push('/login');
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
<el-button v-hasPermi="['sch:classType:add']" type="primary" icon="el-icon-plus" @click="handleAdd">新增</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-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
@@ -41,13 +40,13 @@
|
||||
|
||||
<el-table-column type="index" width="50" />
|
||||
<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="licenseType" :formatter="licenseTypeFormat" width="80" />
|
||||
<!-- <el-table-column label="原价" prop="originalPrice" /> -->
|
||||
<el-table-column label="报价" prop="currentPrice" 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="status" :formatter="statusFormat" width="80" />
|
||||
<el-table-column label="创建时间" width="160">
|
||||
<template slot-scope="scope">
|
||||
@@ -110,24 +109,24 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="甩单低价" prop="orderMinPrice">
|
||||
<el-form-item label="甩单底价" prop="orderMinPrice">
|
||||
<el-input v-model="modalForm.orderMinPrice" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入账低价" prop="enterMinPrice">
|
||||
<el-form-item label="入账底价" prop="enterMinPrice">
|
||||
<el-input v-model="modalForm.enterMinPrice" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司低价" prop="companyMinPrice">
|
||||
<el-form-item label="公司底价" prop="companyMinPrice">
|
||||
<el-input v-model="modalForm.companyMinPrice" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工低价" prop="employeeMinPrice">
|
||||
<el-form-item label="员工底价" prop="employeeMinPrice">
|
||||
<el-input v-model="modalForm.employeeMinPrice" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -441,7 +440,7 @@ export default {
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(function () {});
|
||||
.catch(function () { });
|
||||
},
|
||||
handleClone() {
|
||||
this.cloneOpen = true;
|
||||
138
src/views/sch/coach/components/CoachForm.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
|
||||
<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="schoolId">
|
||||
<el-select v-model="dialogForm.schoolId" filterable placeholder="请选择" value-key="schoolId" clearable size="small" style="width:100%">
|
||||
<el-option v-for="(dict, index) in schoolOptions" :key="index" :label="dict.schoolName" :value="dict.schoolId" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="接待人" prop="coachName">
|
||||
<el-input v-model="dialogForm.coachName" placeholder="请输入教练名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="dialogForm.phone" placeholder="请输入联系方式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信openid" prop="openId">
|
||||
<el-input v-model="dialogForm.openId" placeholder="请输入微信openid" />
|
||||
</el-form-item>
|
||||
<el-form-item label="负责场地" prop="placeIdList">
|
||||
<el-select v-model="dialogForm.placeIdList" multiple filterable placeholder="请选择" clearable size="small" style="width:100%">
|
||||
<el-option v-for="(dict, index) in placeOptions" :key="index" :label="dict.name" :value="dict.placeId" />
|
||||
</el-select>
|
||||
</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 { addCoach, updateCoach } from '@/api/sch/coach';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
schoolOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
placeOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: true,
|
||||
dialogForm: {
|
||||
coachId: null,
|
||||
deptId: null,
|
||||
// schoolId: null,
|
||||
placeIdList: null,
|
||||
placeNames: null,
|
||||
coachName: null,
|
||||
phone: null,
|
||||
openId: null
|
||||
},
|
||||
dataRule: {
|
||||
// schoolId: [{ required: true, message: '所属驾校不能为空', trigger: 'blur' }],
|
||||
placeIdList: [{ required: true, message: '负责场地不能为空', trigger: 'blur' }],
|
||||
coachName: [{ required: true, message: '教练名不能为空', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }],
|
||||
openId: [{ required: true, message: '微信openId不能为空', 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 = {
|
||||
coachId: null,
|
||||
deptId: null,
|
||||
schoolId: null,
|
||||
placeIdList: null,
|
||||
coachName: null,
|
||||
phone: null,
|
||||
openId: null
|
||||
};
|
||||
},
|
||||
closeDialog () {
|
||||
this.$emit('update:dialogVisible', false);
|
||||
},
|
||||
// 表单提交
|
||||
dialogFormSubmit () {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
|
||||
if (this.dialogForm.coachId) {
|
||||
// 校验完成,调接口
|
||||
updateCoach(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 {
|
||||
addCoach(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>
|
||||