Compare commits
58 Commits
58d702f6f7
...
caozong
| Author | SHA1 | Date | |
|---|---|---|---|
| 205e2c7ae5 | |||
| 2aabff2e90 | |||
| 185163d326 | |||
| 052fcd60b8 | |||
| fc2404a5b8 | |||
|
|
72d19bfb02 | ||
|
|
ac798f3f94 | ||
|
|
0ba4d3fe26 | ||
| a2c29e8dda | |||
| 9631dba573 | |||
| ed848edfd9 | |||
| f8eda78cf7 | |||
| 6b22078098 | |||
| 13f3fd4377 | |||
| d41a186e22 | |||
| 0a771cfa54 | |||
|
|
fe708bd2a8 | ||
| 6c71bccd83 | |||
| 2c0bc99c03 | |||
| fd24f914f7 | |||
| 59f5885669 | |||
| f83a81c02a | |||
| 153e7e766c | |||
| 8bc6ec10c4 | |||
| 85a36e7fd9 | |||
| f727796d1f | |||
|
|
e756980625 | ||
| be38cebe38 | |||
|
|
3454ff1bd5 | ||
| 50a64770ee | |||
|
|
cf049fc1e8 | ||
|
|
00fa8e4d84 | ||
|
|
dd53612b39 | ||
| 25cd675698 | |||
| 15622a2e5a | |||
| ca533e85e3 | |||
| b27a46f037 | |||
| 7b1afb53da | |||
| 63eb91e64c | |||
| ba59394115 | |||
| 2cdb072ab8 | |||
|
|
155f9009fc | ||
| 9800001876 | |||
| 60a2a27e61 | |||
| 01d8c27b48 | |||
| 054e739905 | |||
| 9a14b99b18 | |||
|
|
d03f08dcd4 | ||
| 7d026fd682 | |||
| a4cf773aaa | |||
| 44c7642b9a | |||
| f6225b2afb | |||
| 1fd8a381ea | |||
|
|
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 = '/zhaosheng'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 对嘛管理系统
|
||||
VUE_APP_TITLE = 开心学车管理系统
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# 对嘛管理系统/测试环境
|
||||
# 开心学车管理系统/测试环境
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = {
|
||||
// 添加全局变量
|
||||
globals: {
|
||||
uni: 'readonly',
|
||||
wx: 'readonly'
|
||||
wx: 'readonly',
|
||||
},
|
||||
extends: ['plugin:vue/recommended', 'eslint:recommended'], // 使用的默认的规则集
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "river",
|
||||
"version": "1.0.0",
|
||||
"description": "对嘛管理系统",
|
||||
"author": "对嘛",
|
||||
"description": "开心学车管理系统",
|
||||
"author": "开心学车",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
@@ -78,7 +78,8 @@
|
||||
"sass-loader": "10.1.1",
|
||||
"script-ext-html-webpack-plugin": "2.1.5",
|
||||
"svg-sprite-loader": "5.1.1",
|
||||
"vue-template-compiler": "2.6.12"
|
||||
"vue-template-compiler": "2.6.12",
|
||||
"vue-wxlogin": "^1.0.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 20 KiB |
BIN
public/favicon1.ico
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
public/favicon2.ico
Normal file
|
After Width: | Height: | Size: 137 KiB |
@@ -27,13 +27,13 @@
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
.logo {
|
||||
position: absolute;
|
||||
/* position: absolute; */
|
||||
display: block;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
/* left: 50%;
|
||||
top: 50%; */
|
||||
width: 100px;
|
||||
/* height: 162px; */
|
||||
transform: translate3d(-50%, -80px, 0);
|
||||
/* transform: translate3d(-50%, -80px, 0); */
|
||||
animation: twinkling 1.2s infinite ease-in-out;
|
||||
}
|
||||
/* .animated {
|
||||
@@ -54,21 +54,22 @@
|
||||
}
|
||||
}
|
||||
.loading {
|
||||
position: absolute;
|
||||
/* position: absolute; */
|
||||
margin-top: 40px;
|
||||
display: block;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate3d(-50%, 80px, 0);
|
||||
/* left: 50%; */
|
||||
/* top: 50%; */
|
||||
/* transform: translate3d(-50%, 80px, 0); */
|
||||
color: #fefeff;
|
||||
font-size: 14px;
|
||||
}
|
||||
canvas {
|
||||
/* canvas {
|
||||
display: block;
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate3d(-50%, 100px, 0);
|
||||
}
|
||||
} */
|
||||
|
||||
#loader-wrapper {
|
||||
position: relative;
|
||||
@@ -76,6 +77,10 @@
|
||||
height: 100%;
|
||||
background: #1a1a34;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
<script src="/loading/prefixfree.min.js"></script>
|
||||
@@ -88,5 +93,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/loading/index.js"></script>
|
||||
<script type="text/javascript">
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: 'e7783f9551b7b38e1f485f99cb7d986f'
|
||||
};
|
||||
</script>
|
||||
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
|
||||
<script src="https://webapi.amap.com/maps?v=1.4.15&key=e92870cebfb5c7a9139f77bca1e7997a&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Scale"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
public/logo.png
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 20 KiB |
BIN
public/logo1.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
54
src/api/finance/expense/accountExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/account/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/account/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/meituanExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/officeExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/office/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office/remove/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/office/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/placeSignExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/signExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/remove/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
56
src/api/home.js
Normal file
@@ -0,0 +1,56 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取首页统计信息
|
||||
export function getCount() {
|
||||
return request({
|
||||
url: '/system/home/count',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getTodayPeopleRange() {
|
||||
return request({
|
||||
url: '/system/home/range/today',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getMonthPeopleRange() {
|
||||
return request({
|
||||
url: '/system/home/range/month',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//查询成交率
|
||||
export function dealRate() {
|
||||
return request({
|
||||
url: '/system/home/rate/total',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
//查询本月成交率
|
||||
export function getMonthDealRateRange() {
|
||||
return request({
|
||||
url: '/system/home/rate/month',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//查询上月成交率
|
||||
export function getLastDealRateRange() {
|
||||
return request({
|
||||
url: '/system/home/rate/last',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//查询考勤异常信息
|
||||
export function getCheckin() {
|
||||
return request({
|
||||
url: '/system/home/checkin',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -18,6 +18,17 @@ export function login(username, password, code, uuid) {
|
||||
});
|
||||
}
|
||||
|
||||
export function wxLogin(data) {
|
||||
return request({
|
||||
url: '/wx/login',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 注册方法
|
||||
export function register(data) {
|
||||
return request({
|
||||
@@ -57,3 +68,12 @@ export function getCodeImg() {
|
||||
timeout: 20000
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function getMsgCode(data) {
|
||||
return request({
|
||||
url: '/msgcode',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
35
src/api/question.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-08-17 20:30:56
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-08-19 00:26:04
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取首页统计信息
|
||||
export function searchQuestion(param) {
|
||||
return request({
|
||||
url: '/driver-api/tdQuestion/duima/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
export function updateQuestion(data) {
|
||||
return request({
|
||||
url: '/driver-api/tdQuestion/duima/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function addQuestion(data) {
|
||||
return request({
|
||||
url: '/driver-api/tdQuestion/duima/add',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,16 @@ export function getClassTypeTableList(query) {
|
||||
});
|
||||
}
|
||||
|
||||
// 查询班型列表
|
||||
export function getAllList(query) {
|
||||
return request({
|
||||
url: '/sch/classType/all',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 新增班型
|
||||
export function insertClassType(params) {
|
||||
return request({
|
||||
|
||||
59
src/api/sch/coach.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-07 17:14:32
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-10 17:00:57
|
||||
* @Description:教练接口
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询教练列表
|
||||
export function listCoach(query) {
|
||||
return request({
|
||||
url: '/sch/coach/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询教练详细
|
||||
export function getCoach(coachId) {
|
||||
return request({
|
||||
url: '/sch/coach/' + coachId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增教练
|
||||
export function addCoach(data) {
|
||||
return request({
|
||||
url: '/sch/coach',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改教练
|
||||
export function updateCoach(data) {
|
||||
return request({
|
||||
url: '/sch/coach',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除教练
|
||||
export function delCoach(coachId) {
|
||||
return request({
|
||||
url: '/sch/coach/' + coachId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
export function getAllCoaches(query){
|
||||
return request({
|
||||
url: '/sch/coach/all',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
20
src/api/sch/file.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询文件列表
|
||||
export function listFile(query) {
|
||||
return request({
|
||||
url: '/sch/file/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除文件
|
||||
export function delFile(data) {
|
||||
return request({
|
||||
url: '/sch/file',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -17,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'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
44
src/api/sch/shop.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询抖音门店列表
|
||||
export function listShop(query) {
|
||||
return request({
|
||||
url: '/system/shop/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询抖音门店详细
|
||||
export function getShop(shopId) {
|
||||
return request({
|
||||
url: '/system/shop/' + shopId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增抖音门店
|
||||
export function addShop(data) {
|
||||
return request({
|
||||
url: '/system/shop',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改抖音门店
|
||||
export function updateShop(data) {
|
||||
return request({
|
||||
url: '/system/shop',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除抖音门店
|
||||
export function delShop(shopId) {
|
||||
return request({
|
||||
url: '/system/shop/' + shopId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
10
src/api/statistic/areaStudent.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询场地学员统计
|
||||
export function listReport(query) {
|
||||
return request({
|
||||
url: '/statistic/area/student/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
10
src/api/statistic/placeStudent.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询场地学员统计
|
||||
export function listReport(query) {
|
||||
return request({
|
||||
url: '/statistic/place/student/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
@@ -38,5 +38,12 @@ export default {
|
||||
url: '/system/employee/getEmployees',
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
getSignPlace(userId) {
|
||||
return request({
|
||||
url: '/system/employee/signPlace/' + userId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
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'
|
||||
})
|
||||
}
|
||||
59
src/api/system/skill.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-14 00:31:37
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-15 00:37:52
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询关键话术列表
|
||||
export function listSkill(query) {
|
||||
return request({
|
||||
url: '/system/skill/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询关键话术详细
|
||||
export function getSkill(skillId) {
|
||||
return request({
|
||||
url: '/system/skill/' + skillId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getSkillKey() {
|
||||
return request({
|
||||
url: '/system/skill/key',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增关键话术
|
||||
export function addSkill(data) {
|
||||
return request({
|
||||
url: '/system/skill',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改关键话术
|
||||
export function updateSkill(data) {
|
||||
return request({
|
||||
url: '/system/skill',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除关键话术
|
||||
export function delSkill(skillId) {
|
||||
return request({
|
||||
url: '/system/skill/' + skillId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
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,30 @@ export function updateAccept(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//查询线索分发信息
|
||||
export function getCluePlaceList(data) {
|
||||
return request({
|
||||
url: `/zs/clue/place/info`,
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
|
||||
//保存线索分发信息
|
||||
export function saveCluePlace(data) {
|
||||
return request({
|
||||
url: `/zs/clue/place`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function getFollowCount() {
|
||||
return request({
|
||||
url: `/zs/clue/follow/count`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
51
src/api/zs/feedback.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-07 17:14:38
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-07 17:14:44
|
||||
* @Description: 线索反馈接口
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询线索反馈列表
|
||||
export function listFeedback(query) {
|
||||
return request({
|
||||
url: '/zs/feedback/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedback(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/' + feedbackId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增线索反馈
|
||||
export function addFeedback(data) {
|
||||
return request({
|
||||
url: '/zs/feedback',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改线索反馈
|
||||
export function updateFeedback(data) {
|
||||
return request({
|
||||
url: '/zs/feedback',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除线索反馈
|
||||
export function delFeedback(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/' + feedbackId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
93
src/api/zs/feedbackDetail.js
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-11 20:48:02
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-11 20:57:06
|
||||
* @Description:
|
||||
*/
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-10 16:08:39
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-10 16:10:06
|
||||
* @Description: 反馈单
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询线索反馈列表
|
||||
export function listFeedbackDetail(query) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackDetail(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/' + feedbackId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
export function getFeedbackDetailInfo(query){
|
||||
return request({
|
||||
url: '/zs/feedback/detail/info',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackDetailByClueId(clueId) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/' + clueId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增线索反馈
|
||||
export function addFeedbackDetail(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改线索反馈
|
||||
export function updateFeedbackDetail(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除线索反馈
|
||||
export function delFeedbackDetail(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/' + feedbackId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
//查询接待人统计
|
||||
export function getCount(param){
|
||||
return request({
|
||||
url: '/zs/feedback/detail/count',
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//查询接待人接待详情
|
||||
export function getCountDetail(param){
|
||||
return request({
|
||||
url: '/zs/feedback/detail/count/detail',
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
59
src/api/zs/feedbackOrder.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-10 16:08:39
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-10 16:10:06
|
||||
* @Description: 反馈单
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询线索反馈列表
|
||||
export function listFeedbackOrder(query) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackOrder(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/' + feedbackId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackOrderByClueId(clueId) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/' + clueId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增线索反馈
|
||||
export function addFeedbackOrder(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/order',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改线索反馈
|
||||
export function updateFeedbackOrder(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/order',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除线索反馈
|
||||
export function delFeedbackOrder(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/' + feedbackId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
53
src/api/zs/invitation.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询邀约列表
|
||||
export function listInvitation(query) {
|
||||
return request({
|
||||
url: '/zs/invitation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询邀约详细
|
||||
export function getInvitation(invitationId) {
|
||||
return request({
|
||||
url: '/zs/invitation/' + invitationId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询邀约详细
|
||||
export function getInvitationByClue(query) {
|
||||
return request({
|
||||
url: '/zs/invitation/clue',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增邀约
|
||||
export function addInvitation(data) {
|
||||
return request({
|
||||
url: '/zs/invitation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改邀约
|
||||
export function updateInvitation(data) {
|
||||
return request({
|
||||
url: '/zs/invitation',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除邀约
|
||||
export function delInvitation(invitationId) {
|
||||
return request({
|
||||
url: '/zs/invitation/' + invitationId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/zs/office.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询报名点列表
|
||||
export function listOffice(query) {
|
||||
return request({
|
||||
url: '/zs/office/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询报名点详细
|
||||
export function getOffice(officeId) {
|
||||
return request({
|
||||
url: '/zs/office/' + officeId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增报名点
|
||||
export function addOffice(data) {
|
||||
return request({
|
||||
url: '/zs/office',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改报名点
|
||||
export function updateOffice(data) {
|
||||
return request({
|
||||
url: '/zs/office',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除报名点
|
||||
export function delOffice(officeId) {
|
||||
return request({
|
||||
url: '/zs/office/' + officeId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
53
src/api/zs/placeSign.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询报名点成交登记列表
|
||||
export function listSign(query) {
|
||||
return request({
|
||||
url: '/zs/placeSign/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询报名点成交登记详细
|
||||
export function getSign(placeSignId) {
|
||||
return request({
|
||||
url: '/zs/placeSign/' + placeSignId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增报名点成交登记
|
||||
export function addSign(data) {
|
||||
return request({
|
||||
url: '/zs/placeSign',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改报名点成交登记
|
||||
export function updateSign(data) {
|
||||
return request({
|
||||
url: '/zs/placeSign',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除报名点成交登记
|
||||
export function delSign(placeSignId) {
|
||||
return request({
|
||||
url: '/zs/placeSign/' + placeSignId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//审核登记
|
||||
export function checkSign(data) {
|
||||
return request({
|
||||
url: '/zs/placeSign/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -9,12 +9,20 @@ export function getSignList(query) {
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索列表
|
||||
export function getSign(id) {
|
||||
return request({
|
||||
url: '/zs/sign/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出
|
||||
export function exportData(query) {
|
||||
return request({
|
||||
url: '/zs/sign/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
BIN
src/assets/images/place/position_black.png
Normal file
|
After Width: | Height: | Size: 903 B |
BIN
src/assets/images/place/position_blue.png
Normal file
|
After Width: | Height: | Size: 958 B |
BIN
src/assets/images/place/position_green.png
Normal file
|
After Width: | Height: | Size: 926 B |
BIN
src/assets/images/place/position_purple.png
Normal file
|
After Width: | Height: | Size: 926 B |
BIN
src/assets/images/place/position_red.png
Normal file
|
After Width: | Height: | Size: 950 B |
BIN
src/assets/images/place/position_yellow.png
Normal file
|
After Width: | Height: | Size: 970 B |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 20 KiB |
BIN
src/assets/logo/logo1.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/logo/logo2.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
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,3 +1,10 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-08-16 22:04:23
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-11 22:17:43
|
||||
* @Description:
|
||||
*/
|
||||
import router from './router';
|
||||
import store from './store';
|
||||
import { Message } from 'element-ui';
|
||||
@@ -6,9 +13,21 @@ import 'nprogress/nprogress.css';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { isRelogin } from '@/utils/request';
|
||||
|
||||
NProgress.configure({ showSpinner: false });
|
||||
NProgress.configure({
|
||||
showSpinner: false
|
||||
});
|
||||
|
||||
const whiteList = ['/login', '/auth-redirect', '/bind', '/register'];
|
||||
const whiteList = [
|
||||
'/login',
|
||||
'/auth-redirect',
|
||||
'/bind',
|
||||
'/register',
|
||||
'/question',
|
||||
'/clue/feedback/follow',
|
||||
'/clue/feedback/arrival',
|
||||
'/coach/count',
|
||||
'/coach/count/detail'
|
||||
];
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start();
|
||||
@@ -16,7 +35,9 @@ router.beforeEach((to, from, next) => {
|
||||
to.meta.title && store.dispatch('settings/setTitle', to.meta.title);
|
||||
/* has token*/
|
||||
if (to.path === '/login') {
|
||||
next({ path: '/' });
|
||||
next({
|
||||
path: '/'
|
||||
});
|
||||
NProgress.done();
|
||||
} else {
|
||||
if (store.getters.roles.length === 0) {
|
||||
@@ -24,18 +45,25 @@ router.beforeEach((to, from, next) => {
|
||||
// 判断当前用户是否已拉取完user_info信息
|
||||
store
|
||||
.dispatch('GetInfo')
|
||||
.then(() => {
|
||||
.then((resp) => {
|
||||
isRelogin.show = false;
|
||||
localStorage.setItem('admin', resp.user.admin);
|
||||
localStorage.setItem('userId', resp.user.userId);
|
||||
store.dispatch('GenerateRoutes').then((accessRoutes) => {
|
||||
// 根据roles权限生成可访问的路由表
|
||||
router.addRoutes(accessRoutes); // 动态添加可访问路由表
|
||||
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
|
||||
next({
|
||||
...to,
|
||||
replace: true
|
||||
}); // hack方法 确保addRoutes已完成
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
Message.error(err);
|
||||
next({ path: '/' });
|
||||
next({
|
||||
path: '/'
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -51,6 +51,31 @@ export const constantRoutes = [
|
||||
component: () => import('@/views/register'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/question',
|
||||
component: () => import('@/views/question'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/clue/feedback/follow',
|
||||
component: () => import('@/views/zs/feedback/follow'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/clue/feedback/arrival',
|
||||
component: () => import('@/views/zs/feedback/arrival'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/coach/count',
|
||||
component: () => import('@/views/sch/coach/count'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/coach/count/detail',
|
||||
component: () => import('@/views/sch/coach/count/detail'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/error/404'),
|
||||
@@ -194,6 +219,23 @@ export const dynamicRoutes = [
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/zs/clue-form',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['zs:clue:add', 'zs:clue:edit'],
|
||||
children: [
|
||||
{
|
||||
path: 'index/:clueId(\\d+)',
|
||||
component: () => import('@/views/zs/clue/ClueForm'),
|
||||
name: 'ClueForm',
|
||||
meta: {
|
||||
title: '线索详情',
|
||||
activeMenu: '/zs/clue'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
import { login, logout, getInfo } from '@/api/login';
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth';
|
||||
import {
|
||||
login,
|
||||
logout,
|
||||
getInfo,
|
||||
wxLogin
|
||||
} from '@/api/login';
|
||||
import {
|
||||
getToken,
|
||||
setToken,
|
||||
removeToken
|
||||
} from '@/utils/auth';
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
@@ -30,7 +39,9 @@ const user = {
|
||||
|
||||
actions: {
|
||||
// 登录
|
||||
Login({ commit }, userInfo) {
|
||||
Login({
|
||||
commit
|
||||
}, userInfo) {
|
||||
const username = userInfo.username.trim();
|
||||
const password = userInfo.password;
|
||||
const code = userInfo.code;
|
||||
@@ -47,9 +58,29 @@ const user = {
|
||||
});
|
||||
});
|
||||
},
|
||||
// 登录
|
||||
WXLogin({
|
||||
commit
|
||||
}, userInfo) {
|
||||
return new Promise((resolve, reject) => {
|
||||
wxLogin(userInfo)
|
||||
.then((res) => {
|
||||
setToken(res.token);
|
||||
commit('SET_TOKEN', res.token);
|
||||
resolve(res);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 获取用户信息
|
||||
GetInfo({ commit, state }) {
|
||||
GetInfo({
|
||||
commit,
|
||||
state
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo()
|
||||
.then((res) => {
|
||||
@@ -74,7 +105,10 @@ const user = {
|
||||
},
|
||||
|
||||
// 退出系统
|
||||
LogOut({ commit, state }) {
|
||||
LogOut({
|
||||
commit,
|
||||
state
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
logout(state.token)
|
||||
.then(() => {
|
||||
@@ -91,7 +125,9 @@ const user = {
|
||||
},
|
||||
|
||||
// 前端 登出
|
||||
FedLogOut({ commit }) {
|
||||
FedLogOut({
|
||||
commit
|
||||
}) {
|
||||
return new Promise((resolve) => {
|
||||
commit('SET_TOKEN', '');
|
||||
removeToken();
|
||||
|
||||
@@ -1,16 +1,32 @@
|
||||
import axios from 'axios';
|
||||
import { Notification, MessageBox, Message, Loading } from 'element-ui';
|
||||
import {
|
||||
Notification,
|
||||
MessageBox,
|
||||
Message,
|
||||
Loading
|
||||
} from 'element-ui';
|
||||
import store from '@/store';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import {
|
||||
getToken
|
||||
} from '@/utils/auth';
|
||||
import errorCode from '@/utils/errorCode';
|
||||
import { tansParams, blobValidate } from '@/utils/ruoyi';
|
||||
import {
|
||||
tansParams,
|
||||
blobValidate
|
||||
} from '@/utils/ruoyi';
|
||||
import cache from '@/plugins/cache';
|
||||
import { saveAs } from 'file-saver';
|
||||
import { successCode } from '@/global/global';
|
||||
import {
|
||||
saveAs
|
||||
} from 'file-saver';
|
||||
import {
|
||||
successCode
|
||||
} from '@/global/global';
|
||||
|
||||
let downloadLoadingInstance;
|
||||
// 是否显示重新登录
|
||||
export const isRelogin = { show: false };
|
||||
export const isRelogin = {
|
||||
show: false
|
||||
};
|
||||
|
||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
||||
// 创建axios实例
|
||||
@@ -18,7 +34,7 @@ const service = axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
// 超时
|
||||
timeout: 10000
|
||||
timeout: 120000
|
||||
});
|
||||
|
||||
// request拦截器
|
||||
@@ -31,6 +47,11 @@ service.interceptors.request.use(
|
||||
if (getToken() && !isToken) {
|
||||
config.headers['Authorization'] = 'Bearer ' + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
if (config.url.includes("http")) {
|
||||
config.baseURL = "";
|
||||
} else if (config.url.includes("amap")) {
|
||||
config.baseURL = "";
|
||||
}
|
||||
// get请求映射params参数
|
||||
if (config.method === 'get' && config.params) {
|
||||
let url = config.url + '?' + tansParams(config.params);
|
||||
@@ -84,10 +105,10 @@ service.interceptors.response.use(
|
||||
if (!isRelogin.show) {
|
||||
isRelogin.show = true;
|
||||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
|
||||
confirmButtonText: '重新登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
confirmButtonText: '重新登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
isRelogin.show = false;
|
||||
store.dispatch('LogOut').then(() => {
|
||||
@@ -116,7 +137,9 @@ service.interceptors.response.use(
|
||||
},
|
||||
(error) => {
|
||||
console.log('err' + error);
|
||||
let { message } = error;
|
||||
let {
|
||||
message
|
||||
} = error;
|
||||
if (message === 'Network Error') {
|
||||
message = '后端接口连接异常';
|
||||
} else if (message.includes('timeout')) {
|
||||
@@ -147,7 +170,9 @@ export function download(url, params, filename, config) {
|
||||
return tansParams(params);
|
||||
}
|
||||
],
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
responseType: 'blob',
|
||||
...config
|
||||
})
|
||||
|
||||
@@ -73,20 +73,10 @@ export function addDateRange(params, dateRange, propName) {
|
||||
|
||||
// 回显数据字典
|
||||
export function selectDictLabel(datas, value) {
|
||||
if (value === undefined) {
|
||||
if (value == undefined) {
|
||||
return '';
|
||||
}
|
||||
var actions = [];
|
||||
Object.keys(datas).some((key) => {
|
||||
if (datas[key].value === '' + value) {
|
||||
actions.push(datas[key].label);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (actions.length === 0) {
|
||||
actions.push(value);
|
||||
}
|
||||
return actions.join('');
|
||||
return datas.find((item) => item.dictValue == value).dictLabel;
|
||||
}
|
||||
|
||||
// 回显数据字典(字符串数组)
|
||||
|
||||
111
src/views/dashboard/BarChart-bak.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div :class="className" :style="{height:height,width:width}" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts';
|
||||
require('echarts/theme/macarons'); // echarts theme
|
||||
import resize from './mixins/resize';
|
||||
|
||||
const animationDuration = 6000;
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return;
|
||||
}
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$el, 'macarons');
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
axisTick: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'pageA',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [79, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
},
|
||||
{
|
||||
name: 'pageB',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [80, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
},
|
||||
{
|
||||
name: 'pageC',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [30, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,111 +1,101 @@
|
||||
<template>
|
||||
<div :class="className" :style="{height:height,width:width}" />
|
||||
<div class="chart" style="height:200px;width:100%;" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts';
|
||||
require('echarts/theme/macarons'); // echarts theme
|
||||
import resize from './mixins/resize';
|
||||
import * as echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
import { getTodayPeopleRange, getMonthPeopleRange } from '@/api/home'
|
||||
|
||||
const animationDuration = 6000;
|
||||
const animationDuration = 6000
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
}
|
||||
},
|
||||
// props: {
|
||||
// className: {
|
||||
// type: String,
|
||||
// default: 'chart'
|
||||
// },
|
||||
// width: {
|
||||
// type: String,
|
||||
// default: '100%'
|
||||
// },
|
||||
// height: {
|
||||
// type: String,
|
||||
// default: '300px'
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
};
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart();
|
||||
});
|
||||
getTodayPeopleRange().then((resp) => {
|
||||
this.initChart(resp.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$el, 'macarons');
|
||||
initChart(item) {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
containLabel: true,
|
||||
},
|
||||
legend: {
|
||||
data: ['人数'],
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
}
|
||||
}
|
||||
data: item.people,
|
||||
// axisTick: {
|
||||
// alignWithLabel: true
|
||||
// }
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
axisTick: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
// axisTick: {
|
||||
// show: false
|
||||
// }
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'pageA',
|
||||
name: '成交学员数',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [79, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
// stack: 'vistors',
|
||||
barWidth: 40,
|
||||
data: item.data,
|
||||
// animationDuration
|
||||
},
|
||||
{
|
||||
name: 'pageB',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [80, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
},
|
||||
{
|
||||
name: 'pageC',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [30, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
],
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
102
src/views/dashboard/BarChart1.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<!-- 本月成交排行榜 -->
|
||||
<div class="chart" style="height:200px;width:100%;" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
import { getTodayPeopleRange, getMonthPeopleRange } from '@/api/home'
|
||||
|
||||
const animationDuration = 6000
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
// props: {
|
||||
// className: {
|
||||
// type: String,
|
||||
// default: 'chart'
|
||||
// },
|
||||
// width: {
|
||||
// type: String,
|
||||
// default: '100%'
|
||||
// },
|
||||
// height: {
|
||||
// type: String,
|
||||
// default: '300px'
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
getMonthPeopleRange().then((resp) => {
|
||||
this.initChart(resp.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart(item) {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true,
|
||||
},
|
||||
legend: {
|
||||
data: ['人数'],
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: item.people,
|
||||
// axisTick: {
|
||||
// alignWithLabel: true
|
||||
// }
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
// axisTick: {
|
||||
// show: false
|
||||
// }
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '成交学员数',
|
||||
type: 'bar',
|
||||
// stack: 'vistors',
|
||||
barWidth: 40,
|
||||
data: item.data,
|
||||
// animationDuration
|
||||
},
|
||||
],
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
102
src/views/dashboard/BarChart2.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<!-- 本月成交排行榜 -->
|
||||
<div class="chart" style="height:200px;width:100%;" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
import { getMonthDealRateRange } from '@/api/home'
|
||||
|
||||
const animationDuration = 6000
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
// props: {
|
||||
// className: {
|
||||
// type: String,
|
||||
// default: 'chart'
|
||||
// },
|
||||
// width: {
|
||||
// type: String,
|
||||
// default: '100%'
|
||||
// },
|
||||
// height: {
|
||||
// type: String,
|
||||
// default: '300px'
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
getMonthDealRateRange().then((resp) => {
|
||||
this.initChart(resp.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart(item) {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true,
|
||||
},
|
||||
legend: {
|
||||
data: ['成交率'],
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: item.people,
|
||||
// axisTick: {
|
||||
// alignWithLabel: true
|
||||
// }
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
// axisTick: {
|
||||
// show: false
|
||||
// }
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '成交率',
|
||||
type: 'bar',
|
||||
// stack: 'vistors',
|
||||
barWidth: 40,
|
||||
data: item.data,
|
||||
// animationDuration
|
||||
},
|
||||
],
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
102
src/views/dashboard/BarChart3.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<!-- 本月成交排行榜 -->
|
||||
<div class="chart" style="height:200px;width:100%;" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
import { getLastDealRateRange } from '@/api/home'
|
||||
|
||||
const animationDuration = 6000
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
// props: {
|
||||
// className: {
|
||||
// type: String,
|
||||
// default: 'chart'
|
||||
// },
|
||||
// width: {
|
||||
// type: String,
|
||||
// default: '100%'
|
||||
// },
|
||||
// height: {
|
||||
// type: String,
|
||||
// default: '300px'
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
getLastDealRateRange().then((resp) => {
|
||||
this.initChart(resp.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart(item) {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true,
|
||||
},
|
||||
legend: {
|
||||
data: ['成交率'],
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: item.people,
|
||||
// axisTick: {
|
||||
// alignWithLabel: true
|
||||
// }
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
// axisTick: {
|
||||
// show: false
|
||||
// }
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '成交率',
|
||||
type: 'bar',
|
||||
// stack: 'vistors',
|
||||
barWidth: 40,
|
||||
data: item.data,
|
||||
// animationDuration
|
||||
},
|
||||
],
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -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
|
||||
}
|
||||
]
|
||||