Compare commits
53 Commits
58d702f6f7
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b7d3ddf77 | ||
| 767ec44bba | |||
| 779b6c9eba | |||
|
|
c66b8f227e | ||
| fc92668bd1 | |||
| 8813f57c9b | |||
| 9eeefde0fb | |||
| f6c6002eda | |||
| ecc49ec019 | |||
| ed848edfd9 | |||
| f8eda78cf7 | |||
| 6b22078098 | |||
| 0a771cfa54 | |||
|
|
fe708bd2a8 | ||
| fd24f914f7 | |||
| 59f5885669 | |||
| f83a81c02a | |||
| 153e7e766c | |||
| 8bc6ec10c4 | |||
| 85a36e7fd9 | |||
| f727796d1f | |||
|
|
e756980625 | ||
| be38cebe38 | |||
|
|
3454ff1bd5 | ||
| 50a64770ee | |||
|
|
cf049fc1e8 | ||
|
|
00fa8e4d84 | ||
|
|
dd53612b39 | ||
| 25cd675698 | |||
| 15622a2e5a | |||
| ca533e85e3 | |||
| b27a46f037 | |||
| 7b1afb53da | |||
| 63eb91e64c | |||
| ba59394115 | |||
| 2cdb072ab8 | |||
|
|
155f9009fc | ||
| 9800001876 | |||
| 60a2a27e61 | |||
| 01d8c27b48 | |||
| 054e739905 | |||
| 9a14b99b18 | |||
|
|
d03f08dcd4 | ||
| 7d026fd682 | |||
| a4cf773aaa | |||
| 44c7642b9a | |||
| f6225b2afb | |||
| 1fd8a381ea | |||
|
|
c7a6210195 | ||
| 553cdd3657 | |||
|
|
fbbba80e23 | ||
| fc3f3fa3de | |||
| e151ad7c9c |
@@ -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 = '/duima'
|
||||
|
||||
@@ -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'], // 使用的默认的规则集
|
||||
|
||||
|
||||
11
package.json
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "river",
|
||||
"version": "1.0.0",
|
||||
"description": "对嘛管理系统",
|
||||
"author": "对嘛",
|
||||
"description": "寻驾招生管理系统",
|
||||
"author": "寻驾招生",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
@@ -59,7 +59,8 @@
|
||||
"vue-meta": "2.4.0",
|
||||
"vue-router": "3.4.9",
|
||||
"vuedraggable": "2.24.3",
|
||||
"vuex": "3.6.0"
|
||||
"vuex": "3.6.0",
|
||||
"webpack-dev-server": "^3.10.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "4.4.6",
|
||||
@@ -72,13 +73,15 @@
|
||||
"connect": "3.6.6",
|
||||
"eslint": "7.15.0",
|
||||
"eslint-plugin-vue": "7.2.0",
|
||||
"html-webpack-plugin": "^5.6.0",
|
||||
"lint-staged": "10.5.3",
|
||||
"runjs": "4.4.2",
|
||||
"sass": "1.32.13",
|
||||
"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: 106 KiB |
BIN
public/favicon1.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: 'f653df5a2c5f44ae68faaab6f6a6b8ab'
|
||||
};
|
||||
</script>
|
||||
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
|
||||
<script src="https://webapi.amap.com/maps?v=1.4.15&key=713d839ff505943b0f18e6df45f3b0dc&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Scale"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
public/logo.png
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 106 KiB |
54
src/api/finance/expense/accountExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/account/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/account/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/meituanExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/officeExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/office/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office/remove/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/office/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/placeSignExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/signExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/remove/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
56
src/api/home.js
Normal file
@@ -0,0 +1,56 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取首页统计信息
|
||||
export function getCount() {
|
||||
return request({
|
||||
url: '/system/home/count',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getTodayPeopleRange() {
|
||||
return request({
|
||||
url: '/system/home/range/today',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getMonthPeopleRange() {
|
||||
return request({
|
||||
url: '/system/home/range/month',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//查询成交率
|
||||
export function dealRate() {
|
||||
return request({
|
||||
url: '/system/home/rate/total',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
//查询本月成交率
|
||||
export function getMonthDealRateRange() {
|
||||
return request({
|
||||
url: '/system/home/rate/month',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//查询上月成交率
|
||||
export function getLastDealRateRange() {
|
||||
return request({
|
||||
url: '/system/home/rate/last',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//查询考勤异常信息
|
||||
export function getCheckin() {
|
||||
return request({
|
||||
url: '/system/home/checkin',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -18,6 +18,17 @@ export function login(username, password, code, uuid) {
|
||||
});
|
||||
}
|
||||
|
||||
export function wxLogin(data) {
|
||||
return request({
|
||||
url: '/wx/login',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 注册方法
|
||||
export function register(data) {
|
||||
return request({
|
||||
@@ -57,3 +68,12 @@ export function getCodeImg() {
|
||||
timeout: 20000
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function getMsgCode(data) {
|
||||
return request({
|
||||
url: '/msgcode',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
42
src/api/question.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-08-17 20:30:56
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-08-19 00:26:04
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取首页统计信息
|
||||
export function searchQuestion(param) {
|
||||
return request({
|
||||
url: '/xunjia/tdQuestion/duima/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
export function updateQuestion(data) {
|
||||
return request({
|
||||
url: '/xunjia/tdQuestion/duima/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function addQuestion(data) {
|
||||
return request({
|
||||
url: '/xunjia/tdQuestion/duima/add',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function uploadFile(data) {
|
||||
return request({
|
||||
url: '/xunjia/applet/tiku/question/upload',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
@@ -9,6 +9,16 @@ export function getClassTypeTableList(query) {
|
||||
});
|
||||
}
|
||||
|
||||
// 查询班型列表
|
||||
export function getAllList(query) {
|
||||
return request({
|
||||
url: '/sch/classType/all',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 新增班型
|
||||
export function insertClassType(params) {
|
||||
return request({
|
||||
@@ -41,3 +51,11 @@ export function cloneClassType(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function batchUpdateProfit(data) {
|
||||
return request({
|
||||
url: '/sch/classType/profit',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
20
src/api/sch/file.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询文件列表
|
||||
export function listFile(query) {
|
||||
return request({
|
||||
url: '/sch/file/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除文件
|
||||
export function delFile(data) {
|
||||
return request({
|
||||
url: '/sch/file',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -17,11 +17,32 @@ export async function updateSchoolStatus(data) {
|
||||
});
|
||||
}
|
||||
|
||||
// 保存场地状态
|
||||
export function savePlace(data) {
|
||||
// 新增
|
||||
export function addPlace(data) {
|
||||
return request({
|
||||
url: '/sch/place',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 修改场地
|
||||
export function updatePlace(data) {
|
||||
return request({
|
||||
url: '/sch/place',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询场地
|
||||
export function getAllPlaces(param) {
|
||||
return request({
|
||||
url: `/sch/place/all`,
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
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'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
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'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
35
src/api/system/maillist.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询通讯录列表
|
||||
export function getMaillistTableList(query) {
|
||||
return request({
|
||||
url: '/system/maillist/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增通讯录
|
||||
export function insertMaillist(params) {
|
||||
return request({
|
||||
url: '/system/maillist',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 修改通讯录
|
||||
export function updateMaillist(params) {
|
||||
return request({
|
||||
url: '/system/maillist',
|
||||
method: 'put',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 删除通讯录
|
||||
export function deleteMaillist(params) {
|
||||
return request({
|
||||
url: '/system/maillist/' + params,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
77
src/api/system/skill.js
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-14 00:31:37
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-15 00:37:52
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询关键话术列表
|
||||
export function pageSkill(query) {
|
||||
return request({
|
||||
url: '/system/skill/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询关键话术列表
|
||||
export function listSkill(query) {
|
||||
return request({
|
||||
url: '/system/skill/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询关键话术详细
|
||||
export function getSkill(skillId) {
|
||||
return request({
|
||||
url: '/system/skill/' + skillId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getSkillKey() {
|
||||
return request({
|
||||
url: '/system/skill/key',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增关键话术
|
||||
export function addSkill(data) {
|
||||
return request({
|
||||
url: '/system/skill',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改关键话术
|
||||
export function updateSkill(data) {
|
||||
return request({
|
||||
url: '/system/skill',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除关键话术
|
||||
export function delSkill(skillId) {
|
||||
return request({
|
||||
url: '/system/skill/' + skillId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 审核关键话术
|
||||
export function checkSkill(data) {
|
||||
return request({
|
||||
url: '/system/skill/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
28
src/api/system/summary.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询任务
|
||||
export function getList(query) {
|
||||
return request({
|
||||
url: '/system/summary/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询任务
|
||||
export function getTask(query) {
|
||||
return request({
|
||||
url: '/system/summary',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 保存
|
||||
export function saveTask(data) {
|
||||
return request({
|
||||
url: '/system/summary',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
39
src/api/vip.js
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询车型列表
|
||||
export function getCarList(param) {
|
||||
return request({
|
||||
url: '/driver-api/tdSysUserMember/duima/car/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
// 查询会员列表
|
||||
export function getMemberList(param) {
|
||||
return request({
|
||||
url: '/driver-api/tdSysUserMember/duima/member/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询用户会员列表
|
||||
export function getUserMemberList(param) {
|
||||
return request({
|
||||
url: '/driver-api/tdSysUserMember/duima/user/member/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
//新增会员
|
||||
export function addUserMember(data) {
|
||||
return request({
|
||||
url: '/driver-api/tdSysUserMember/duima/user/member',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
@@ -9,6 +9,15 @@ export function getClueList(query) {
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索列表
|
||||
export function getClueInfo(id) {
|
||||
return request({
|
||||
url: '/zs/clue/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 新增线索
|
||||
export function addClue(data) {
|
||||
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,22 @@ 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
|
||||
});
|
||||
}
|
||||
|
||||
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: 105 KiB |
BIN
src/assets/logo/logo2.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
85
src/assets/styles/element-ui.css
Normal file
@@ -0,0 +1,85 @@
|
||||
@charset "UTF-8";
|
||||
.el-breadcrumb__inner,
|
||||
.el-breadcrumb__inner a {
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
|
||||
.el-upload input[type="file"] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.el-upload__input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cell .el-tag {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.small-padding .cell {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.fixed-width .el-button--mini {
|
||||
padding: 7px 10px;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.status-col .cell {
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.status-col .cell .el-tag {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.el-dialog {
|
||||
transform: none;
|
||||
left: 0;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.upload-container .el-upload {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.upload-container .el-upload .el-upload-dragger {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.el-dropdown-menu a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.el-textarea__inner {
|
||||
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
|
||||
}
|
||||
|
||||
.el-range-editor.el-input__inner {
|
||||
display: inline-flex !important;
|
||||
}
|
||||
|
||||
.el-range-separator {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.el-menu--collapse
|
||||
> div
|
||||
> .el-submenu
|
||||
> .el-submenu__title
|
||||
.el-submenu__icon-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.el-form-item--mini.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
1
src/assets/styles/element-ui.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.el-breadcrumb__inner,.el-breadcrumb__inner a{font-weight:400 !important}.el-upload input[type="file"]{display:none !important}.el-upload__input{display:none}.cell .el-tag{margin-right:0px}.small-padding .cell{padding-left:5px;padding-right:5px}.fixed-width .el-button--mini{padding:7px 10px;width:60px}.status-col .cell{padding:0 10px;text-align:center}.status-col .cell .el-tag{margin-right:0px}.el-dialog{transform:none;left:0;position:relative;margin:0 auto}.upload-container .el-upload{width:100%}.upload-container .el-upload .el-upload-dragger{width:100%;height:200px}.el-dropdown-menu a{display:block}.el-textarea__inner{font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif}.el-range-editor.el-input__inner{display:inline-flex !important}.el-range-separator{box-sizing:content-box}.el-menu--collapse>div>.el-submenu>.el-submenu__title .el-submenu__icon-arrow{display:none}.el-card{border-radius:0;border:none}.el-form-item--mini.el-form-item{margin-bottom:10px}
|
||||
@@ -99,3 +99,6 @@
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
}
|
||||
.el-form-item--mini.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
@@ -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;}
|
||||
92
src/components/DMCheckbox/index.vue
Normal file
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<el-checkbox-group v-model="modelValue">
|
||||
<el-checkbox v-if="allText" class="no-cicrle" label="全部" @change="handleAll">全部</el-checkbox>
|
||||
<el-checkbox v-for="(item, index) in list" :key="index" class="no-cicrle" :label="item[name]" @change="handleChange">
|
||||
{{ item[label] }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
allText: {
|
||||
// 是否展示 "全部",有字则展示
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
showBottomLine: {
|
||||
// 是否展示底部下划线,类似tab标签页
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
label: {
|
||||
// key
|
||||
type: String,
|
||||
default: 'label'
|
||||
},
|
||||
name: {
|
||||
// value
|
||||
type: String,
|
||||
default: 'value'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
modelValue: undefined
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
if (this.allText) {
|
||||
this.modelValue = val.length > 0 ? val : ['全部'];
|
||||
} else {
|
||||
this.modelValue = val.filter((item) => item !== '全部');
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAll() {
|
||||
this.modelValue = ['全部'];
|
||||
this.$emit('input', []);
|
||||
},
|
||||
handleChange() {
|
||||
if (this.modelValue.some((item) => item === '全部')) {
|
||||
this.modelValue.shift();
|
||||
} else if (this.modelValue.length == 0) {
|
||||
this.modelValue = ['全部'];
|
||||
}
|
||||
this.$emit('input', this.modelValue.every((item) => item === '全部') ? [] : this.modelValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.no-cicrle {
|
||||
::v-deep .el-checkbox__input,
|
||||
.el-checkbox__input {
|
||||
display: none;
|
||||
}
|
||||
::v-deep .el-checkbox__label {
|
||||
padding-left: 0;
|
||||
color: rgba($color: #000000, $alpha: 0.6);
|
||||
}
|
||||
}
|
||||
.no-cicrle.is-checked ::v-deep .el-checkbox__label {
|
||||
color: #0075ff;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
102
src/components/DMRadio/index.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<div :class="{ 'border-bottom': showBottomLine }">
|
||||
<el-radio-group v-model="modelValue" @change="handleChange">
|
||||
<el-radio v-if="allText" class="no-cicrle" :style="{'margin-bottom': gutter}" label="全部">全部</el-radio>
|
||||
<el-radio v-for="(item,index) in list" :key="index" class="no-cicrle" :style="{'margin-bottom': gutter}" :label="item[name]">
|
||||
{{ item[label] }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: [String, Number],
|
||||
allText: {
|
||||
// 是否展示 "全部",有字则展示
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
showBottomLine: {
|
||||
// 是否展示底部下划线,类似tab标签页
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
label: {
|
||||
// key
|
||||
type: String,
|
||||
default: 'label'
|
||||
},
|
||||
name: {
|
||||
// value
|
||||
type: String,
|
||||
default: 'value'
|
||||
},
|
||||
gutter: {
|
||||
// 上下间隔
|
||||
type: String,
|
||||
default: '0'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
modelValue: undefined
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
this.modelValue = val === undefined ? '全部' : val;
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange(value) {
|
||||
this.$emit('input', this.modelValue === '全部' ? undefined : this.modelValue);
|
||||
this.$emit('change', this.modelValue === '全部' ? undefined : this.modelValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.border-bottom {
|
||||
width: 100%;
|
||||
border-bottom: 2px solid rgba($color: #000000, $alpha: 0.08);
|
||||
::v-deep .is-checked .el-radio__label {
|
||||
position: relative;
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -10.5px;
|
||||
right: 0;
|
||||
height: 2px;
|
||||
background-color: #0075ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.no-cicrle {
|
||||
::v-deep .el-radio__input,
|
||||
.el-checkbox__input {
|
||||
display: none;
|
||||
}
|
||||
::v-deep .el-radio__label {
|
||||
padding-left: 0;
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
color: rgba($color: #000000, $alpha: 0.6);
|
||||
}
|
||||
}
|
||||
.no-cicrle.is-checked ::v-deep .el-radio__label {
|
||||
color: #0075ff;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
@@ -80,6 +80,7 @@ export default {
|
||||
// eslint-disable-next-line vue/no-mutating-props
|
||||
this.columns[item].visible = !data.includes(key);
|
||||
}
|
||||
localStorage.setItem(`${this.$route.name}-table-columns`, JSON.stringify(this.columns));
|
||||
},
|
||||
// 打开显隐列dialog
|
||||
showColumn() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,9 +1,25 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
import { parseTime, resetForm, handleTree, addDateRange } from '@/utils/ruoyi';
|
||||
import { deepClone } from '@/utils/index';
|
||||
import { download } from '@/utils/request';
|
||||
import { getConfigKey } from '@/api/system/config';
|
||||
import {
|
||||
parseTime,
|
||||
resetForm,
|
||||
handleTree,
|
||||
addDateRange,
|
||||
selectDictLabel,
|
||||
isNullOrEmpty
|
||||
} from '@/utils/ruoyi';
|
||||
import {
|
||||
deepClone
|
||||
} from '@/utils/index';
|
||||
import {
|
||||
download
|
||||
} from '@/utils/request';
|
||||
import {
|
||||
getConfigKey
|
||||
} from '@/api/system/config';
|
||||
import {
|
||||
getDicts
|
||||
} from '@/api/system/dict/data'
|
||||
|
||||
// 全局方法挂载
|
||||
Vue.prototype.parseTime = parseTime;
|
||||
@@ -13,3 +29,6 @@ Vue.prototype.handleTree = handleTree;
|
||||
Vue.prototype.deepClone = deepClone;
|
||||
Vue.prototype.addDateRange = addDateRange;
|
||||
Vue.prototype.getConfigKey = getConfigKey;
|
||||
Vue.prototype.getDicts = getDicts;
|
||||
Vue.prototype.selectDictLabel = selectDictLabel;
|
||||
Vue.prototype.isNullOrEmpty = isNullOrEmpty
|
||||
|
||||
@@ -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
|
||||
};
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ Vue.use(plugins);
|
||||
Vue.use(VueMeta);
|
||||
|
||||
Vue.use(Element, {
|
||||
size: Cookies.get('size') || 'small' // set element-ui default size
|
||||
size: Cookies.get('size') || 'mini' // set element-ui default size
|
||||
});
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
import router from './router';
|
||||
import store from './store';
|
||||
import { Message } from 'element-ui';
|
||||
import {
|
||||
Message
|
||||
} from 'element-ui';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { isRelogin } from '@/utils/request';
|
||||
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'];
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start();
|
||||
@@ -16,7 +24,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 +34,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 {
|
||||
|
||||
@@ -29,172 +29,176 @@ import Layout from '@/layout';
|
||||
*/
|
||||
|
||||
// 公共路由
|
||||
export const constantRoutes = [
|
||||
{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: () => import('@/views/redirect')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/login'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
component: () => import('@/views/register'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/error/404'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: () => import('@/views/error/401'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: Layout,
|
||||
redirect: 'index',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/index'),
|
||||
name: 'Index',
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'dashboard',
|
||||
affix: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/demo',
|
||||
// component: Layout,
|
||||
// redirect: 'noredirect',
|
||||
// meta: {
|
||||
// title: 'Demo',
|
||||
// icon: 'xx'
|
||||
// },
|
||||
// children: [{
|
||||
// path: '/base-page',
|
||||
// component: () => import('@/views/demo/basePage/index'),
|
||||
// name: 'BasePage',
|
||||
// meta: {
|
||||
// title: 'BasePage',
|
||||
// icon: 'xx'
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: '/base-components',
|
||||
// component: () => import('@/views/demo/baseComponents/index'),
|
||||
// name: 'BaseComponents',
|
||||
// meta: {
|
||||
// title: 'BaseComponents',
|
||||
// icon: 'xx'
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [
|
||||
{
|
||||
path: 'profile',
|
||||
component: () => import('@/views/system/user/profile/index'),
|
||||
name: 'Profile',
|
||||
meta: {
|
||||
title: '个人中心',
|
||||
icon: 'user'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
export const constantRoutes = [{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: () => import('@/views/redirect')
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/login'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
component: () => import('@/views/register'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/question',
|
||||
component: () => import('@/views/question'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/error/404'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: () => import('@/views/error/401'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: Layout,
|
||||
redirect: 'index',
|
||||
children: [{
|
||||
path: 'index',
|
||||
component: () => import('@/views/index'),
|
||||
name: 'Index',
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'dashboard',
|
||||
affix: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
// {
|
||||
// path: '/demo',
|
||||
// component: Layout,
|
||||
// redirect: 'noredirect',
|
||||
// meta: {
|
||||
// title: 'Demo',
|
||||
// icon: 'xx'
|
||||
// },
|
||||
// children: [{
|
||||
// path: '/base-page',
|
||||
// component: () => import('@/views/demo/basePage/index'),
|
||||
// name: 'BasePage',
|
||||
// meta: {
|
||||
// title: 'BasePage',
|
||||
// icon: 'xx'
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: '/base-components',
|
||||
// component: () => import('@/views/demo/baseComponents/index'),
|
||||
// name: 'BaseComponents',
|
||||
// meta: {
|
||||
// title: 'BaseComponents',
|
||||
// icon: 'xx'
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [{
|
||||
path: 'profile',
|
||||
component: () => import('@/views/system/user/profile/index'),
|
||||
name: 'Profile',
|
||||
meta: {
|
||||
title: '个人中心',
|
||||
icon: 'user'
|
||||
}
|
||||
}]
|
||||
}
|
||||
];
|
||||
|
||||
// 动态路由,基于用户权限动态去加载
|
||||
export const dynamicRoutes = [
|
||||
{
|
||||
path: '/system/user-auth',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:user:edit'],
|
||||
children: [
|
||||
{
|
||||
path: 'role/:userId(\\d+)',
|
||||
component: () => import('@/views/system/user/authRole'),
|
||||
name: 'AuthRole',
|
||||
meta: {
|
||||
title: '分配角色',
|
||||
activeMenu: '/system/user'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/role-auth',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:role:edit'],
|
||||
children: [
|
||||
{
|
||||
path: 'user/:roleId(\\d+)',
|
||||
component: () => import('@/views/system/role/authUser'),
|
||||
name: 'AuthUser',
|
||||
meta: {
|
||||
title: '分配用户',
|
||||
activeMenu: '/system/role'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/dict-data',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:dict:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index/:dictId(\\d+)',
|
||||
component: () => import('@/views/system/dict/data'),
|
||||
name: 'Data',
|
||||
meta: {
|
||||
title: '字典数据',
|
||||
activeMenu: '/system/dict'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/monitor/job-log',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['monitor:job:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/monitor/job/log'),
|
||||
name: 'JobLog',
|
||||
meta: {
|
||||
title: '调度日志',
|
||||
activeMenu: '/monitor/job'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
export const dynamicRoutes = [{
|
||||
path: '/system/user-auth',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:user:edit'],
|
||||
children: [{
|
||||
path: 'role/:userId(\\d+)',
|
||||
component: () => import('@/views/system/user/authRole'),
|
||||
name: 'AuthRole',
|
||||
meta: {
|
||||
title: '分配角色',
|
||||
activeMenu: '/system/user'
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/system/role-auth',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:role:edit'],
|
||||
children: [{
|
||||
path: 'user/:roleId(\\d+)',
|
||||
component: () => import('@/views/system/role/authUser'),
|
||||
name: 'AuthUser',
|
||||
meta: {
|
||||
title: '分配用户',
|
||||
activeMenu: '/system/role'
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/system/dict-data',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:dict:list'],
|
||||
children: [{
|
||||
path: 'index/:dictId(\\d+)',
|
||||
component: () => import('@/views/system/dict/data'),
|
||||
name: 'Data',
|
||||
meta: {
|
||||
title: '字典数据',
|
||||
activeMenu: '/system/dict'
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/monitor/job-log',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['monitor:job:list'],
|
||||
children: [{
|
||||
path: 'index',
|
||||
component: () => import('@/views/monitor/job/log'),
|
||||
name: 'JobLog',
|
||||
meta: {
|
||||
title: '调度日志',
|
||||
activeMenu: '/monitor/job'
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/zs/clue-form',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['zs:clue:add', 'zs:clue:edit'],
|
||||
children: [{
|
||||
path: 'index/:clueId(\\d+)',
|
||||
component: () => import('@/views/zs/clue/ClueForm'),
|
||||
name: 'ClueForm',
|
||||
meta: {
|
||||
title: '线索详情',
|
||||
activeMenu: '/zs/clue'
|
||||
}
|
||||
}]
|
||||
}
|
||||
];
|
||||
|
||||
// 防止连续点击多次路由报错
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
import { login, logout, getInfo } from '@/api/login';
|
||||
import { 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>
|
||||
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :model="searchForm" label-width="100px">
|
||||
<el-form-item label-width="0">
|
||||
<DMRadio v-model="searchForm.quickSearch" show-bottom-line :list="quickList" />
|
||||
</el-form-item>
|
||||
<el-form-item label="意向状态:">
|
||||
<DMRadio v-model="searchForm.status" :list="statusList" all-text="全部" />
|
||||
</el-form-item>
|
||||
<el-form-item label="意向状态2:">
|
||||
<DMCheckbox v-model="searchForm.status2" :list="statusList" />
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="$emit('search')">查询</el-button>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DMRadio from '@/components/DMRadio';
|
||||
import DMCheckbox from '@/components/DMCheckbox';
|
||||
export default {
|
||||
components: {
|
||||
DMRadio,
|
||||
DMCheckbox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
quickSearch: 1,
|
||||
status: undefined,
|
||||
status2: []
|
||||
},
|
||||
quickList: [
|
||||
{ value: 1, label: '我创建的' },
|
||||
{ value: 2, label: '我的有效' }
|
||||
],
|
||||
statusList: [
|
||||
{ value: 1, label: 'A高意向' },
|
||||
{ value: 2, label: 'B中意向' }
|
||||
]
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card shadow="always" :body-style="{ padding: '20px' }" />
|
||||
<SearchForm />
|
||||
<div class="p20">
|
||||
<el-card shadow="always" :body-style="{ padding: '20px' }">
|
||||
<SearchForm ref="SearchForm" @search="getTableList" />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -18,6 +19,14 @@ export default {
|
||||
pageSize: 20
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getTableList() {
|
||||
const tempForm = this.$refs.SearchForm.searchForm;
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
console.log(params);
|
||||
// api.list(params)
|
||||
}
|
||||
}
|
||||
};
|
||||
</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>
|
||||
|
||||
45
src/views/finance/expense/index.vue
Normal file
@@ -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>
|
||||
16
src/views/finance/register/columns.js
Normal file
@@ -0,0 +1,16 @@
|
||||
export const defaultColumns = [
|
||||
{ key: 0, prop: 'state', label: `全款状态`, visible: true },
|
||||
{ key: 1, prop: 'followUserName', label: `归属人员`, visible: true },
|
||||
{ key: 2, prop: 'area', label: `所属区域`, visible: true },
|
||||
{ key: 3, prop: 'offlineReceiverName', label: `线下接待人员`, visible: true },
|
||||
{ key: 4, prop: 'dealDate', label: `成交时间`, visible: true },
|
||||
{ key: 5, prop: 'name', label: `学员姓名`, visible: true },
|
||||
{ key: 6, prop: 'phone', label: `联系方式`, visible: true },
|
||||
{ key: 7, prop: 'source', label: `线索来源`, visible: true },
|
||||
{ key: 8, prop: 'signPrice', label: `报名价格`, visible: true },
|
||||
{ key: 9, prop: 'schoolName', label: `报名驾校`, visible: true },
|
||||
{ key: 10, prop: 'placeName', label: `报名场地`, visible: true },
|
||||
{ key: 11, prop: 'className', label: `报名班型`, visible: true },
|
||||
{ key: 12, prop: 'schoolPeople', label: `对接人`, visible: true },
|
||||
{ key: 13, prop: 'schoolPay', label: `驾校支付`, visible: true }
|
||||
];
|
||||
106
src/views/finance/register/components/SearchForm.vue
Normal file
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<el-form ref="searchForm" :model="searchForm" inline label-width="80px">
|
||||
<el-row>
|
||||
<el-form-item label="审核状态:" label-width="90px">
|
||||
<DMRadio v-model="searchForm.checkState" :list="auditStatusOptions" all-text="全部" />
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="是否全款:" label-width="90px">
|
||||
<DMRadio v-model="searchForm.state" :list="stateOptions" all-text="全部" />
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="回款状态:" label-width="90px">
|
||||
<DMRadio v-model="searchForm.moneyState" :list="moneyStateOptions" label="dictLabel" name="dictCode" all-text="全部" />
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-form-item label="快速查询">
|
||||
<el-input v-model="searchForm.name" placeholder="姓名/联系方式" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="成交时间">
|
||||
<el-date-picker v-model="searchForm.dealDate" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="驾校">
|
||||
<el-select v-model="searchForm.signSchool" placeholder="请选择" clearable>
|
||||
<el-option v-for="dict in schoolOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="跟进人员">
|
||||
<el-select v-model="searchForm.followUser2" placeholder="请选择" 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-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DMRadio from '@/components/DMRadio';
|
||||
export default {
|
||||
components: {
|
||||
DMRadio
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
checkState: undefined,
|
||||
state: undefined,
|
||||
moneyState: undefined,
|
||||
name: undefined,
|
||||
dealDate: [],
|
||||
signSchool: undefined,
|
||||
followUser2: undefined
|
||||
},
|
||||
auditStatusOptions: [
|
||||
{ label: '待审核', value: 1 },
|
||||
{ label: '已审核', value: 2 },
|
||||
{ label: '驳回', value: 3 }
|
||||
],
|
||||
stateOptions: [
|
||||
{ label: '全款', value: true },
|
||||
{ label: '非全款', value: false }
|
||||
],
|
||||
moneyStateOptions: [],
|
||||
schoolOptions: [],
|
||||
userOptions: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDicts('dm_money_state').then((response) => {
|
||||
this.moneyStateOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
resetQuery() {
|
||||
this.searchForm = {
|
||||
checkState: undefined,
|
||||
state: undefined,
|
||||
moneyState: undefined,
|
||||
name: undefined,
|
||||
dealDate: [],
|
||||
signSchool: undefined,
|
||||
followUser2: undefined
|
||||
};
|
||||
},
|
||||
getEmployee() {
|
||||
// getEmployee({ coach: false }).then((resp) => {
|
||||
// if (resp.code == 200) {
|
||||
// this.userOptions = resp.data
|
||||
// }
|
||||
// })
|
||||
},
|
||||
getSchools() {
|
||||
// getSchools().then((resp) => {
|
||||
// this.schoolOptions = resp.data
|
||||
// })
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
90
src/views/finance/register/index.vue
Normal file
@@ -0,0 +1,90 @@
|
||||
<!-- 成交登记 -->
|
||||
<template>
|
||||
<div class="p20">
|
||||
<SearchForm v-show="showSearch" ref="SearchForm" @search="_getTableList" />
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" @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 v-loading="loading" :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" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button type="text" @click="handleCheck(scope.row)">审核</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @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" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchForm from './components/SearchForm.vue';
|
||||
import { defaultColumns } from './columns.js';
|
||||
export default {
|
||||
components: {
|
||||
SearchForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
searchForm: {
|
||||
pageNum: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
tableList: [],
|
||||
total: 0,
|
||||
columns: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const str = localStorage.getItem(`${this.$route.name}-table-columns`);
|
||||
this.columns = str ? JSON.parse(str) : defaultColumns;
|
||||
// this._getTableList();
|
||||
},
|
||||
methods: {
|
||||
async _getTableList() {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
console.log(params);
|
||||
// api.list(params)
|
||||
this.tableList = [];
|
||||
for (let i = 0; i < 20; i++) {
|
||||
this.tableList.push({ name: `数据${i + 1}` });
|
||||
}
|
||||
},
|
||||
handleExport() {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
this.$confirm('是否确认导出所有成交记录项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((resp) => {
|
||||
// return exportData(params)
|
||||
})
|
||||
.then((response) => {
|
||||
// this.download(response.msg);
|
||||
})
|
||||
.catch(function () {});
|
||||
},
|
||||
handleAdd() {}
|
||||
}
|
||||
};
|
||||
</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="6">
|
||||
<el-card>
|
||||
<div slot="header">团队业绩概况</div>
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" style="color: #EE7621;" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div>
|
||||
<span class="card-panel-text">本月报名数:</span>
|
||||
<count-to :start-val="0" :end-val="count.monthSign" :duration="5" class="card-panel-num" />
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<span class="card-panel-text">今日报名数:</span>
|
||||
<count-to :start-val="0" :end-val="count.todaySign" :duration="5" class="card-panel-num" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-card>
|
||||
<div slot="header">转化率</div>
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" style="color: #EE7621;" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div>
|
||||
<span class="card-panel-text">本月转化率:</span>
|
||||
<span class="card-panel-num">{{rate.currentSignRate}}</span>
|
||||
<!-- <count-to
|
||||
:start-val="0"
|
||||
:end-val="rate.currentSignRate"
|
||||
:duration="0.1"
|
||||
class="card-panel-num"
|
||||
/>-->
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<span class="card-panel-text">上月转化率:</span>
|
||||
<span class="card-panel-num">{{rate.lastSignRate}}</span>
|
||||
<!-- <count-to
|
||||
:start-val="0"
|
||||
:end-val="rate.lastSignRate"
|
||||
:duration="5"
|
||||
class="card-panel-num"
|
||||
/>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- </el-row>
|
||||
<el-row :gutter="40" class="panel-group" style="margin-bottom: 20px"> -->
|
||||
|
||||
<!-- 考勤信息 -->
|
||||
<el-col :span="6">
|
||||
<el-card>
|
||||
<div slot="header">打卡异常信息</div>
|
||||
<div class="card-panel">
|
||||
<el-carousel :interval="3000" arrow="always">
|
||||
<el-carousel-item v-for="item in countNum" :key="item">
|
||||
<ul style="overflow:auto">
|
||||
<li v-for="i in 5" :key="i" class="infinite-list-item">
|
||||
<span v-for="(d,index ) in checkin_datas" :key="index" v-if="index == ((item-1)*5 + i - 1)">
|
||||
<span style="float:left">{{d.name}}</span>
|
||||
<span style="float:right">{{d.error_days}} 天</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 成交数排行榜 -->
|
||||
<el-row :gutter="32">
|
||||
<!-- 本月个人成交数排行榜 -->
|
||||
<el-col :xs="12" :sm="12" :lg="24">
|
||||
<div class="chart-wrapper">
|
||||
<span>本月成交排行榜</span>
|
||||
<bar-chart-1 />
|
||||
</div>
|
||||
</el-col>
|
||||
<!-- 今日个人成交数排行榜 -->
|
||||
<el-col :xs="12" :sm="12" :lg="24">
|
||||
<div class="chart-wrapper">
|
||||
<span>今日成交排行榜</span>
|
||||
<bar-chart />
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<!-- 成交率排行榜 -->
|
||||
<el-row :gutter="32">
|
||||
<!-- 本月个人成交率排行榜 -->
|
||||
<el-col :xs="12" :sm="12" :lg="24">
|
||||
<div class="chart-wrapper">
|
||||
<span>本月成交率排行榜</span>
|
||||
<bar-chart-2 />
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<!-- 上月个人成交率排行榜 -->
|
||||
<el-col :xs="12" :sm="12" :lg="24">
|
||||
<div class="chart-wrapper">
|
||||
<span>上月成交率排行榜</span>
|
||||
<bar-chart-3 />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 添加或修改公告对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="taskType === 2">
|
||||
<el-form-item label="日期" prop="day">
|
||||
<el-date-picker v-model="form.day" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="任务内容">
|
||||
<editor v-model="form.content" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" style="padding-top:20px">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="open=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</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 0px;
|
||||
margin-left: 0px;
|
||||
|
||||
.card-panel-text {
|
||||
line-height: 18px;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.card-panel-num {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.infinite-list-item {
|
||||
height: 20px;
|
||||
margin: 2px;
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 550px) {
|
||||
.card-panel-description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.card-panel-icon-wrapper {
|
||||
float: none !important;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0 !important;
|
||||
|
||||
.svg-icon {
|
||||
display: block;
|
||||
margin: 14px auto !important;
|
||||
float: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,36 +1,23 @@
|
||||
<template>
|
||||
<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="wx203f734baa9c9845" :scope="'snsapi_login'" :theme="'black'" redirect_uri="https://xueche.ahduima.com/login" :href="href">
|
||||
</wxlogin>
|
||||
<!-- <div id="wxcode" v-if="!code && activeName === 'wx'"></div> -->
|
||||
<!-- 绑定手机号框 -->
|
||||
<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 +29,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 +60,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: "wx203f734baa9c9845", // 微信官方提供的测试id
|
||||
scope: "snsapi_login",
|
||||
redirect_uri: "https://xueche.ahduima.com/login", // 微信官方中的测试地址
|
||||
state: "bind",
|
||||
style: "black",
|
||||
href: this.href,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -147,9 +119,10 @@ export default {
|
||||
}
|
||||
|
||||
.login-form {
|
||||
display: inline;
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
width: 400px;
|
||||
width: 350px;
|
||||
padding: 25px 25px 5px 25px;
|
||||
.el-input {
|
||||
height: 38px;
|
||||
@@ -192,4 +165,8 @@ export default {
|
||||
.login-code-img {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.impowerBox .qrcode {
|
||||
width: 200px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||