提交
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
securityJsCode:'420463f2f8c849ab78b9d29548aff7d3',
|
||||
}
|
||||
</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=ec6b7ebe38f7ff27126f7088d87a9091&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Scale"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -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({
|
||||
|
||||
44
src/api/zs/office.js
Normal file
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/officeSign.js
Normal file
53
src/api/zs/officeSign.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询报名点成交登记列表
|
||||
export function listSign(query) {
|
||||
return request({
|
||||
url: '/zs/officesign/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询报名点成交登记详细
|
||||
export function getSign(officesignId) {
|
||||
return request({
|
||||
url: '/zs/officesign/' + officesignId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增报名点成交登记
|
||||
export function addSign(data) {
|
||||
return request({
|
||||
url: '/zs/officesign',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改报名点成交登记
|
||||
export function updateSign(data) {
|
||||
return request({
|
||||
url: '/zs/officesign',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除报名点成交登记
|
||||
export function delSign(officesignId) {
|
||||
return request({
|
||||
url: '/zs/officesign/' + officesignId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//审核登记
|
||||
export function checkSign(data) {
|
||||
return request({
|
||||
url: '/zs/officesign/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -238,3 +238,8 @@ aside {
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.impowerBox .qrcode {
|
||||
width: 80px;
|
||||
margin-top: 15px;
|
||||
border: 1px solid #e2e2e2;
|
||||
}
|
||||
5
src/assets/styles/wx.scss
Normal file
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;}
|
||||
@@ -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();
|
||||
})
|
||||
.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,36 +1,23 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<div class="login-form">
|
||||
<h3 class="title">若依管理系统</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin">
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="captchaEnabled" prop="code">
|
||||
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter.native="handleLogin">
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" class="login-code-img" @click="getCode">
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
<div v-if="register" style="float: right;">
|
||||
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="微信扫码" name="wx" style="height:200px">
|
||||
<wxlogin v-if="!code && activeName === 'wx'" appid="wx203f734baa9c9845" :scope="'snsapi_login'" :theme="'black'" redirect_uri="https://xueche.ahduima.com/login" :href="href">
|
||||
</wxlogin>
|
||||
<!-- <div id="wxcode" v-if="!code && activeName === 'wx'"></div> -->
|
||||
<!-- 绑定手机号框 -->
|
||||
<div v-else v-loading="loading">
|
||||
<WxCode v-if="codeShow" :code="code" :openId="openId" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="账号密码" name="password" style="height:200px">
|
||||
<Password v-if="activeName === 'password'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</div>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>
|
||||
@@ -42,30 +29,26 @@
|
||||
import { getCodeImg } from '@/api/login';
|
||||
import Cookies from 'js-cookie';
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
||||
import wxlogin from 'vue-wxlogin'
|
||||
import Password from './password.vue';
|
||||
import WxCode from './wxCode.vue';
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
components: {
|
||||
wxlogin, Password, WxCode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
codeUrl: '',
|
||||
loginForm: {
|
||||
username: 'admin',
|
||||
password: 'admin123',
|
||||
rememberMe: false,
|
||||
code: '',
|
||||
uuid: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
|
||||
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
|
||||
code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
|
||||
},
|
||||
loading: false,
|
||||
// 验证码开关
|
||||
captchaEnabled: true,
|
||||
// 注册开关
|
||||
register: false,
|
||||
redirect: undefined
|
||||
redirect: undefined,
|
||||
activeName: 'wx',
|
||||
code: undefined,
|
||||
openId: undefined,
|
||||
codeShow: false,
|
||||
href: "data:text/css;base64,LmltcG93ZXJCb3ggLnFyY29kZSB7d2lkdGg6IDE4MHB4OyBtYXJnaW4tdG9wOjBweH0KLmltcG93ZXJCb3ggLnRpdGxlIHtkaXNwbGF5OiBub25lO30KLmltcG93ZXJCb3ggLmluZm8ge3dpZHRoOiAxODBweDt9Ci5zdGF0dXNfaWNvbiB7ZGlzcGxheTogbm9uZX0KLmltcG93ZXJCb3ggLnN0YXR1cyB7dGV4dC1hbGlnbjogY2VudGVyO30g"
|
||||
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -77,54 +60,39 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCode();
|
||||
this.getCookie();
|
||||
this.code = this.$route.query.code;
|
||||
if (this.code) {
|
||||
this.loading = true
|
||||
this.wxLogin(this.code);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.createWxQrcode();
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
getCodeImg().then((res) => {
|
||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||
if (this.captchaEnabled) {
|
||||
this.codeUrl = 'data:image/gif;base64,' + res.img;
|
||||
this.loginForm.uuid = res.uuid;
|
||||
}
|
||||
});
|
||||
async wxLogin(code) {
|
||||
//根据code和openId查询是否关联了手机号,如果没有关联 需先关联手机号
|
||||
const resp = this.$store.dispatch('WXLogin', { code: code, type: 1 });
|
||||
if (resp.token) {
|
||||
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
|
||||
} else if (resp.openId) {
|
||||
//如果返回openId则是没有绑定手机号
|
||||
this.openId = resp.openId;
|
||||
this.loading = false
|
||||
this.codeShow = true
|
||||
}
|
||||
},
|
||||
getCookie() {
|
||||
const username = Cookies.get('username');
|
||||
const password = Cookies.get('password');
|
||||
const rememberMe = Cookies.get('rememberMe');
|
||||
this.loginForm = {
|
||||
username: username === undefined ? this.loginForm.username : username,
|
||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||
};
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
if (this.loginForm.rememberMe) {
|
||||
Cookies.set('username', this.loginForm.username, { expires: 30 });
|
||||
Cookies.set('password', encrypt(this.loginForm.password), { expires: 30 });
|
||||
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
|
||||
} else {
|
||||
Cookies.remove('username');
|
||||
Cookies.remove('password');
|
||||
Cookies.remove('rememberMe');
|
||||
}
|
||||
this.$store
|
||||
.dispatch('Login', this.loginForm)
|
||||
.then(() => {
|
||||
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
if (this.captchaEnabled) {
|
||||
this.getCode();
|
||||
}
|
||||
});
|
||||
}
|
||||
createWxQrcode() {
|
||||
// 生成微信登录二维码
|
||||
var obj = new WxLogin({
|
||||
self_redirect: true,
|
||||
id: "wxcode", // 页面显示二维码的容器id
|
||||
appid: "wx203f734baa9c9845", // 微信官方提供的测试id
|
||||
scope: "snsapi_login",
|
||||
redirect_uri: "https://xueche.ahduima.com/login", // 微信官方中的测试地址
|
||||
state: "bind",
|
||||
style: "black",
|
||||
href: this.href,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -147,9 +115,10 @@ export default {
|
||||
}
|
||||
|
||||
.login-form {
|
||||
display: inline;
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
width: 400px;
|
||||
width: 350px;
|
||||
padding: 25px 25px 5px 25px;
|
||||
.el-input {
|
||||
height: 38px;
|
||||
@@ -192,4 +161,8 @@ export default {
|
||||
.login-code-img {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.impowerBox .qrcode {
|
||||
width: 200px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
217
src/views/password.vue
Normal file
217
src/views/password.vue
Normal file
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input v-model="loginForm.password" auto-complete="off" placeholder="短信验证码" style="width: 63%" @keyup.enter.native="handleLogin">
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<el-button :loading="loading" size="medium" type="primary" @click.native.prevent="handleMsgCode" style="width: 32%; padding: 11px; float: right;" v-show="sendButton">获取验证码</el-button>
|
||||
<el-button :loading="loading" size="medium" type="info" style="width: 32%; padding: 11px; float: right;" v-show="!sendButton" disabled>{{seconds}} s</el-button>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item v-if="captchaEnabled" prop="code">
|
||||
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter.native="handleLogin">
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" class="login-code-img" @click="getCode">
|
||||
</div>
|
||||
</el-form-item> -->
|
||||
<!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> -->
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
<!-- <div v-if="register" style="float: right;">
|
||||
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
||||
</div> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCodeImg } from '@/api/login';
|
||||
import Cookies from 'js-cookie';
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
||||
|
||||
export default {
|
||||
name: 'Password',
|
||||
data() {
|
||||
return {
|
||||
codeUrl: '',
|
||||
loginForm: {
|
||||
username: undefined,
|
||||
password: undefined,
|
||||
rememberMe: false,
|
||||
code: '',
|
||||
uuid: '',
|
||||
type: 'password'
|
||||
},
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
|
||||
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
|
||||
code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
|
||||
},
|
||||
loading: false,
|
||||
// 验证码开关
|
||||
captchaEnabled: true,
|
||||
// 注册开关
|
||||
register: false,
|
||||
redirect: undefined,
|
||||
activeName: 'wx',
|
||||
code: undefined,
|
||||
sendButton: true,
|
||||
seconds: '',
|
||||
timer: null,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function (route) {
|
||||
this.redirect = route.query && route.query.redirect;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.getCode();
|
||||
// this.getCookie();
|
||||
// this.handleWx()
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
getCodeImg().then((res) => {
|
||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||
if (this.captchaEnabled) {
|
||||
this.codeUrl = 'data:image/gif;base64,' + res.img;
|
||||
this.loginForm.uuid = res.uuid;
|
||||
}
|
||||
});
|
||||
},
|
||||
// getCookie() {
|
||||
// const username = Cookies.get('username');
|
||||
// const password = Cookies.get('password');
|
||||
// const rememberMe = Cookies.get('rememberMe');
|
||||
// this.loginForm = {
|
||||
// username: username === undefined ? this.loginForm.username : username,
|
||||
// password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||
// rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||
// };
|
||||
// },
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
this.$store
|
||||
.dispatch('Login', this.loginForm)
|
||||
.then(() => {
|
||||
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleMsgCode() {
|
||||
this.$refs.loginForm.validateField('username', (valid) => {
|
||||
if (!valid) {
|
||||
this.loginForm.type = 0
|
||||
getMsgCode(this.loginForm).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.loginForm.uuid = response.data
|
||||
this.countdown()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
countdown() {
|
||||
const TIME_COUNT = 60
|
||||
if (!this.timer) {
|
||||
this.seconds = TIME_COUNT
|
||||
this.sendButton = false
|
||||
this.timer = setInterval(() => {
|
||||
if (this.seconds > 0 && this.seconds <= TIME_COUNT) {
|
||||
this.seconds--
|
||||
} else {
|
||||
this.sendButton = true
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.login {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-image: url('../assets/images/login-background.jpg');
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
color: #707070;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
width: 400px;
|
||||
padding: 25px 25px 5px 25px;
|
||||
.el-input {
|
||||
height: 38px;
|
||||
input {
|
||||
height: 38px;
|
||||
}
|
||||
}
|
||||
.input-icon {
|
||||
height: 39px;
|
||||
width: 14px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
.login-tip {
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
.login-code {
|
||||
width: 33%;
|
||||
height: 38px;
|
||||
float: right;
|
||||
img {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.el-login-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-family: Arial;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.login-code-img {
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
|
||||
75
src/views/wxCode.vue
Normal file
75
src/views/wxCode.vue
Normal file
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div v-if="!loading">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<span style="color:red">首次登录需关联原账号手机号!</span>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="手机号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" @click.native.prevent="handleBind">
|
||||
<span v-if="!loading">确定</span>
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'WxCode',
|
||||
props: {
|
||||
code: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
openId: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loginForm: {
|
||||
username: undefined,
|
||||
code: undefined,
|
||||
type: 2,
|
||||
openId: undefined
|
||||
},
|
||||
loading: false,
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', message: '请输入您的手机号' }],
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
handleBind() {
|
||||
this.loginForm.code = code;
|
||||
this.loginForm.openId = this.openId
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
this.$store
|
||||
.dispatch('WXLogin', this.loginForm)
|
||||
.then(() => {
|
||||
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -1,61 +0,0 @@
|
||||
<template>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :disabled="form.signId != undefined">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="跟进人员" prop="followUsers">
|
||||
<el-select v-model="form.followUsers" multiple placeholder="请选择" clearable>
|
||||
<el-option v-for="dict in options.userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'BatchUpdateForm',
|
||||
model: {
|
||||
prop: 'info',
|
||||
event: 'update'
|
||||
},
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
userOptions: []
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: JSON.parse(localStorage.getItem('admin')),
|
||||
form: JSON.parse(JSON.stringify(this.info)),
|
||||
rules: {
|
||||
followUsers: {
|
||||
required: true,
|
||||
message: '跟进人员不能为空',
|
||||
trigger: 'blur'
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler(val) {
|
||||
this.$emit('update', val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validate() {
|
||||
return this.$refs.form.validate();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,632 +0,0 @@
|
||||
|
||||
<template>
|
||||
<div style="margin-bottom: 50px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="form.createTime" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" type="datetime" :disabled="admin != 'true'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="线索来源" prop="source">
|
||||
<el-select v-model="form.source" placeholder="请选择" clearable>
|
||||
<el-option v-for="dict in options.sourceOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="跟进人员" prop="followUser">
|
||||
<el-select v-model="form.followUser" multiple clearable :disabled="admin != 'true' && form.clueId != undefined">
|
||||
<el-option v-for="dict in options.userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入联系方式" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="意向状态" prop="intentionState">
|
||||
<el-select v-model="form.intentionState" placeholder="请选择" clearable>
|
||||
<el-option v-for="dict in options.intentionOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue">
|
||||
<i class="el-icon-star-on" :style="dict.cssClass" />
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">
|
||||
{{ dict.dictValue }}
|
||||
</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="下次跟进时间" prop="followTime">
|
||||
<el-date-picker v-model="form.followTime" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" type="datetime" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否近期看场地" prop="recentLook">
|
||||
<el-radio v-model="form.recentLook" label="是">是</el-radio>
|
||||
<el-radio v-model="form.recentLook" label="否">否</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="显示场地">
|
||||
<el-radio-group v-model="mapPlaceType" @change="createMarkersInMap">
|
||||
<el-radio :label="0">自营场地</el-radio>
|
||||
<el-radio :label="1">全部场地</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="clueMemo">
|
||||
<el-input v-model="form.clueMemo" type="textarea" :rows="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20 plr20" style="position: relative">
|
||||
<div id="map" class="amap-cavans" />
|
||||
<el-collapse class="box-card">
|
||||
<el-collapse-item title="附近驾校">
|
||||
<div style="padding: 10px">
|
||||
<div slot="header">附近驾校</div>
|
||||
<div v-if="nearbySchoolSearching">正在搜索中...</div>
|
||||
<template v-else>
|
||||
<div v-for="p in nearbySchoolList" :key="p.index">
|
||||
<div class="hover-pointer" style="font-size: 14px; color: blue" @click="getClassType(p)">
|
||||
<i v-if="p.recommend" class="el-icon-star-off" />
|
||||
驾校: {{ p.deptName }}-{{ p.name }}
|
||||
</div>
|
||||
<div class="mt5">地址:{{ p.address }}</div>
|
||||
<div class="mt5">
|
||||
直线距离: {{ p.distance }} 公里;
|
||||
<span class="ml0">步行距离:{{ p.walkdistance }}</span>
|
||||
</div>
|
||||
<el-divider />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
<div class="address">
|
||||
<el-form-item label="位置" prop="address" label-width="80px">
|
||||
<el-input v-model="form.address" placeholder="请输入位置" disabled>
|
||||
<el-button slot="append" class="p10" icon="el-icon-location-information" @click="handleMapEdit" />
|
||||
<el-button slot="append" class="p10" icon="el-icon-delete-solid" @click="handleRemovePosition" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="跟进情况">
|
||||
<el-timeline v-if="folowInfos != undefined && folowInfos.length > 0" style="max-height: 200px; overflow-y: auto">
|
||||
<el-timeline-item v-for="item in folowInfos" :key="item.record" :timestamp="item.operateTime" placement="top" style="padding: 5px !important">
|
||||
<el-card>
|
||||
<div style="font-weight: bold">用户 {{ item.operateUserName }}</div>
|
||||
<div style="padding-left: 10px" v-html="item.centent" />
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-dialog width="800px" title="地图编辑" :visible.sync="mapDialogShow" append-to-body @opened="initDialogMap()">
|
||||
<div id="dialogMap" class="dialog-map" />
|
||||
<!-- <el-input id="search" v-model="searchBody" class="search-body" placeholder="请输入..." /> -->
|
||||
<el-autocomplete v-model="searchBody" popper-class="my-autocomplete" class="search-body" placeholder="请输入..." :trigger-on-focus="false" :fetch-suggestions="querySearch" @select="handleSelect">
|
||||
<template slot-scope="{ item }">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<span class="addr">{{ item.district }}</span>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="mapDialogShow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleMapSave">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog width="40%" :title="innerTitle" :visible.sync="innerVisible" append-to-body>
|
||||
<div v-if="classType == undefined || classType.length == 0">无班型数据</div>
|
||||
<el-table v-else :data="classType" style="height: 300px; overflow-y: auto">
|
||||
<el-table-column label="班型">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.licenseType }}-{{ scope.row.dictLabel }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="currentPrice" label="报价" />
|
||||
<el-table-column property="minPrice" label="底价" />
|
||||
<el-table-column property="description" label="描述" />
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<!-- eslint-disable no-undef -->
|
||||
<script>
|
||||
import { getFollowRecord } from '@/api/zs/clue';
|
||||
import { getClassTypes } from '@/api/tool/common';
|
||||
import { inputtips, regeo, walking } from '@/api/tool/map';
|
||||
import AMap from 'AMap';
|
||||
export default {
|
||||
model: {
|
||||
prop: 'info',
|
||||
event: 'update'
|
||||
},
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => { }
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
userOptions: [],
|
||||
sourceOptions: [],
|
||||
intentionOptions: [],
|
||||
placeInfo: []
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: localStorage.getItem('admin'),
|
||||
userId: localStorage.getItem('userId'),
|
||||
form: JSON.parse(JSON.stringify(this.info)),
|
||||
mapDialogShow: false,
|
||||
map: null,
|
||||
locationMarker: null,
|
||||
dialogMap: null, // 弹窗地图(打点用)
|
||||
currentPoint: {}, // 地图弹窗经纬度信息
|
||||
marker: null, // 地图打点
|
||||
placeSearch: null,
|
||||
geocoder: null,
|
||||
searchBody: '',
|
||||
nearbySchoolList: [],
|
||||
folowInfos: [],
|
||||
nearbySchoolSearching: false, // 搜索附近场地
|
||||
rules: {
|
||||
name: {
|
||||
required: true,
|
||||
message: '姓名不为空',
|
||||
trigger: 'blur'
|
||||
},
|
||||
phone: {
|
||||
required: true,
|
||||
message: '联系方式不为空',
|
||||
trigger: 'blur'
|
||||
},
|
||||
createTime: {
|
||||
required: true,
|
||||
message: '创建时间不为空',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
consultTime: {
|
||||
required: true,
|
||||
message: '咨询时间不为空',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
source: {
|
||||
required: true,
|
||||
message: '线索来源不为空',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
address: {
|
||||
required: true,
|
||||
message: '位置不为空',
|
||||
trigger: 'blur'
|
||||
},
|
||||
intentionState: {
|
||||
required: true,
|
||||
message: '意向状态不为空',
|
||||
trigger: 'blur,change'
|
||||
}
|
||||
},
|
||||
innerTitle: '',
|
||||
classType: [],
|
||||
innerVisible: false,
|
||||
consultRecord: [],
|
||||
mapPlaceType: 0 // 地图上展示的场地类型 0:自营 1 全部
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler(val) {
|
||||
this.$emit('update', val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.form.clueId) {
|
||||
this.handleUpdate();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initMap();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.geocoder = null;
|
||||
this.locationMarker = null;
|
||||
this.marker = null;
|
||||
this.placeSearch = null;
|
||||
|
||||
this.map.clearMap();
|
||||
this.map && this.map.destroy();
|
||||
this.map = null;
|
||||
|
||||
this.dialogMap && this.dialogMap.destroy();
|
||||
this.dialogMap = null;
|
||||
},
|
||||
methods: {
|
||||
// 查询该场地下的班型报价
|
||||
getClassType(item) {
|
||||
this.classType = [];
|
||||
this.innerTitle = item.deptName + '-' + item.name + '-班型报价';
|
||||
getClassTypes({
|
||||
schoolId: item.deptId,
|
||||
placeId: item.placeId,
|
||||
status: '0'
|
||||
}).then((resp) => {
|
||||
if (resp && resp.code === 200 && resp.data) {
|
||||
this.classType = resp.data;
|
||||
this.innerVisible = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 编辑
|
||||
handleUpdate() {
|
||||
// 加载跟进记录
|
||||
getFollowRecord({ clueId: this.form.clueId }).then((resp) => {
|
||||
this.folowInfos = resp.data;
|
||||
});
|
||||
},
|
||||
initMap() {
|
||||
if (!this.map) {
|
||||
this.map = new AMap.Map('map', {
|
||||
zoom: 12,
|
||||
center: [117.226095, 31.814372],
|
||||
resizeEnable: true
|
||||
});
|
||||
}
|
||||
|
||||
// 地图坐标点定位
|
||||
if (this.form.lat && this.form.lng) {
|
||||
this.locationMarker = new AMap.Marker({
|
||||
position: [this.form.lng, this.form.lat],
|
||||
icon: require(`@/assets/images/place/flag_red.png`)
|
||||
});
|
||||
this.map.add(this.locationMarker);
|
||||
this.map.setCenter([this.form.lng, this.form.lat]);
|
||||
this.map.setZoom(14);
|
||||
}
|
||||
this.getNearbySchool();
|
||||
this.createMarkersInMap();
|
||||
},
|
||||
// 生成markers
|
||||
createMarkersInMap() {
|
||||
let arr = this.options.placeInfo;
|
||||
if (this.mapPlaceType === 0) {
|
||||
arr = arr.filter((item) => item.recommend);
|
||||
}
|
||||
this.map && this.map.clearMap();
|
||||
this.locationMarker && this.map.add(this.locationMarker);
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
const element = arr[i];
|
||||
const tmpMarker = new AMap.Marker({
|
||||
map: this.map,
|
||||
position: [element.lng, element.lat],
|
||||
label: {
|
||||
content: element.name,
|
||||
direction: 'left'
|
||||
},
|
||||
icon: require(`@/assets/images/position_${element.flagColor}.png`),
|
||||
extData: element,
|
||||
clickable: true
|
||||
});
|
||||
tmpMarker.on('click', (ev) => this.getClassType(ev.target.getExtData()));
|
||||
}
|
||||
},
|
||||
handleMapEdit() {
|
||||
this.searchBody = '';
|
||||
this.mapDialogShow = true;
|
||||
if (this.form.lat && this.form.lng) {
|
||||
this.currentPoint.lat = this.form.lat;
|
||||
this.currentPoint.lng = this.form.lng;
|
||||
}
|
||||
this.dialogMap && this.dialogMap.clearMap();
|
||||
},
|
||||
handleRemovePosition() {
|
||||
this.form.lng = undefined;
|
||||
this.form.lat = undefined;
|
||||
this.form.address = undefined;
|
||||
},
|
||||
initDialogMap() {
|
||||
if (!this.dialogMap) {
|
||||
this.dialogMap = new AMap.Map('dialogMap', {
|
||||
zoom: 12,
|
||||
resizeEnable: true,
|
||||
center: [117.283042, 31.86119]
|
||||
});
|
||||
this.dialogMap.on('click', (ev) => {
|
||||
this.currentPoint.lat = ev.lnglat.lat;
|
||||
this.currentPoint.lng = ev.lnglat.lng;
|
||||
this.regeoCode();
|
||||
this.marker && this.dialogMap.remove(this.marker);
|
||||
this.marker = new AMap.Marker({
|
||||
position: [this.currentPoint.lng, this.currentPoint.lat],
|
||||
icon: require(`@/assets/images/place/flag_red.png`)
|
||||
});
|
||||
this.dialogMap.add(this.marker);
|
||||
});
|
||||
this.dialogMap.addControl(new AMap.Scale());
|
||||
// const auto = new AMap.Autocomplete({
|
||||
// input: 'search', // 前端搜索框
|
||||
// })
|
||||
// this.placeSearch = new AMap.PlaceSearch({
|
||||
// map: this.dialogMap,
|
||||
// pageSize: 1, // 单页显示结果条数
|
||||
// pageIndex: 1, // 页码
|
||||
// autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
|
||||
// })
|
||||
// AMap.event.addListener(auto, 'select', this.select)
|
||||
this.geocoder = new AMap.Geocoder();
|
||||
}
|
||||
// 初始化编辑地图的中心点
|
||||
if (this.form.lat && this.form.lng) {
|
||||
this.searchBody = this.form.address;
|
||||
this.marker = new AMap.Marker({
|
||||
map: this.dialogMap,
|
||||
position: [this.form.lng, this.form.lat],
|
||||
icon: require(`@/assets/images/place/flag_red.png`)
|
||||
});
|
||||
this.dialogMap.setCenter([this.form.lng, this.form.lat]);
|
||||
this.dialogMap.setZoom(14);
|
||||
}
|
||||
},
|
||||
handleMapSave() {
|
||||
if (this.currentPoint.lat && this.currentPoint.lng) {
|
||||
this.form.lng = this.currentPoint.lng;
|
||||
this.form.lat = this.currentPoint.lat;
|
||||
this.$set(this.form, 'address', this.currentPoint.address);
|
||||
this.locationMarker && this.map.remove(this.locationMarker);
|
||||
this.locationMarker = new AMap.Marker({
|
||||
map: this.map,
|
||||
position: [this.currentPoint.lng, this.currentPoint.lat],
|
||||
icon: require(`@/assets/images/place/flag_red.png`)
|
||||
});
|
||||
this.map.setCenter([this.currentPoint.lng, this.currentPoint.lat]);
|
||||
this.map.setZoom(14);
|
||||
this.getNearbySchool();
|
||||
this.mapDialogShow = false;
|
||||
} else {
|
||||
this.$message.error('请在地图上选择位置后保存!');
|
||||
}
|
||||
},
|
||||
// 选择查询结果
|
||||
select(e) {
|
||||
this.placeSearch.setCity(e.poi.adcode);
|
||||
this.placeSearch.search(e.poi.name, (status, result) => {
|
||||
// 搜索成功时,result即是对应的匹配数据
|
||||
if (result && result.info && result.info === 'OK' && result.poiList && result.poiList.pois && result.poiList.pois.length > 0) {
|
||||
this.currentPoint.lat = result.poiList.pois[0].location.lat;
|
||||
this.currentPoint.lng = result.poiList.pois[0].location.lng;
|
||||
this.currentPoint.address = e.poi.name;
|
||||
this.dialogMap.clearMap();
|
||||
this.marker && this.dialogMap.remove(this.marker);
|
||||
this.marker = new AMap.Marker({
|
||||
map: this.dialogMap,
|
||||
position: [this.currentPoint.lng, this.currentPoint.lat],
|
||||
icon: require(`@/assets/images/place/flag_red.png`)
|
||||
});
|
||||
this.dialogMap.setZoom(14);
|
||||
this.dialogMap.setCenter([this.currentPoint.lng, this.currentPoint.lat]);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 经纬度 -> 地址
|
||||
regeoCode() {
|
||||
// this.geocoder.getAddress(
|
||||
// [this.currentPoint.lng, this.currentPoint.lat],
|
||||
// (status, result) => {
|
||||
// if (status === 'complete' && result.regeocode) {
|
||||
// this.currentPoint.address = result.regeocode.formattedAddress;
|
||||
// this.searchBody = result.regeocode.formattedAddress;
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
if (this.currentPoint.lng && this.currentPoint.lat) {
|
||||
regeo({
|
||||
key: 'f2f35d6adc4a16bb879d303cead56237',
|
||||
location: this.currentPoint.lng + ',' + this.currentPoint.lat
|
||||
}).then((resp) => {
|
||||
if (resp.status === '1') {
|
||||
this.currentPoint.address = resp.regeocode.formatted_address;
|
||||
this.searchBody = resp.regeocode.formatted_address;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 计算各个场地到目标点的距离·
|
||||
getNearbySchool() {
|
||||
if (this.form.lng && this.form.lat) {
|
||||
this.nearbySchoolList = [];
|
||||
this.nearbySchoolSearching = true;
|
||||
// 推荐的场地
|
||||
let places1 = [];
|
||||
// 普通的场地
|
||||
let places2 = [];
|
||||
|
||||
const p2 = [this.form.lng, this.form.lat];
|
||||
for (let i = 0; i < this.options.placeInfo.length; i++) {
|
||||
const element = this.options.placeInfo[i];
|
||||
const p1 = [element.lng, element.lat];
|
||||
// 计算直线距离
|
||||
element.distance = (window.AMap.GeometryUtil.distance(p1, p2) / 1000).toFixed(2);
|
||||
element.recommend ? places1.push(element) : places2.push(element);
|
||||
}
|
||||
// 按直线距离排序
|
||||
// 排序
|
||||
if (places1.length > 1) {
|
||||
places1 = places1.sort((a, b) => a.distance - b.distance);
|
||||
}
|
||||
// 排序
|
||||
if (places2.length > 1) {
|
||||
places2 = places2.sort((a, b) => a.distance - b.distance);
|
||||
}
|
||||
// 取普通场地和推荐场地,组合, 取四个
|
||||
this.nearbySchoolList = [];
|
||||
for (let i = 0; i < 4; i++) {
|
||||
places1.length > i && this.nearbySchoolList.push(places1[i]);
|
||||
places2.length > i && this.nearbySchoolList.push(places2[i]);
|
||||
if (this.nearbySchoolList.length === 4) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 计算步行距离
|
||||
this.nearbySchoolList.map(async (item) => {
|
||||
const p1 = [item.lng, item.lat];
|
||||
const resp = await this.getWalkingDistance(p1, p2);
|
||||
item.walkdistance = resp;
|
||||
this.$forceUpdate();
|
||||
});
|
||||
this.nearbySchoolSearching = false;
|
||||
}
|
||||
},
|
||||
// 获取两点之间的步行距离
|
||||
async getWalkingDistance(start, end) {
|
||||
if (start && end) {
|
||||
const resp = await walking({
|
||||
key: 'f2f35d6adc4a16bb879d303cead56237',
|
||||
origin: start[0] + ',' + start[1],
|
||||
destination: end[0] + ',' + end[1]
|
||||
});
|
||||
if (resp.status === '1') {
|
||||
const num = resp.route.paths[0].distance;
|
||||
return num > 1000 ? `${(num / 1000).toFixed(2)} 公里` : `${num} 米`;
|
||||
} else {
|
||||
return '步行数据无法确定';
|
||||
}
|
||||
}
|
||||
|
||||
// return new Promise((resolve, reject) => {
|
||||
|
||||
// })
|
||||
|
||||
// return new Promise((resolve, reject) => {
|
||||
// window.AMap.plugin('AMap.Walking', () => {
|
||||
// const walking = new AMap.Walking();
|
||||
// let num = 0;
|
||||
// walking.search(start, end, (status, result) => {
|
||||
// debugger
|
||||
// if (status === 'complete') {
|
||||
// result.routes.forEach((item) => {
|
||||
// num += item.distance;
|
||||
// });
|
||||
// resolve(
|
||||
// num > 1000 ? `${(num / 1000).toFixed(2)} 公里` : `${num} 米`
|
||||
// );
|
||||
// } else {
|
||||
// resolve('步行数据无法确定');
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
},
|
||||
validateForm() {
|
||||
return this.$refs.form.validate();
|
||||
},
|
||||
async querySearch(queryString, cb) {
|
||||
if (queryString) {
|
||||
const resp = await inputtips({
|
||||
key: 'f2f35d6adc4a16bb879d303cead56237',
|
||||
keywords: queryString
|
||||
});
|
||||
cb(resp.tips);
|
||||
}
|
||||
},
|
||||
handleSelect(item) {
|
||||
this.currentPoint.lat = item.location.split(',')[1];
|
||||
this.currentPoint.lng = item.location.split(',')[0];
|
||||
this.currentPoint.address = item.name;
|
||||
this.searchBody = item.district + item.name;
|
||||
this.dialogMap.clearMap();
|
||||
this.marker && this.dialogMap.remove(this.marker);
|
||||
this.marker = new AMap.Marker({
|
||||
map: this.dialogMap,
|
||||
position: [this.currentPoint.lng, this.currentPoint.lat],
|
||||
icon: require(`@/assets/images/place/flag_red.png`)
|
||||
});
|
||||
this.dialogMap.setZoom(14);
|
||||
this.dialogMap.setCenter([this.currentPoint.lng, this.currentPoint.lat]);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.amap-cavans {
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.dialog-map {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
}
|
||||
.address {
|
||||
position: absolute;
|
||||
left: 30px;
|
||||
top: 10px;
|
||||
width: 400px;
|
||||
background: #fff;
|
||||
}
|
||||
.box-card {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: 10px;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
position: absolute;
|
||||
top: 90px;
|
||||
left: 25px;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.el-divider--horizontal {
|
||||
margin: 6px 0;
|
||||
}
|
||||
li {
|
||||
padding: 6px;
|
||||
.name {
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.addr {
|
||||
line-height: 16px;
|
||||
font-size: 10px;
|
||||
color: #b4b4b4;
|
||||
}
|
||||
|
||||
.highlighted .addr {
|
||||
color: #ddd;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,106 +0,0 @@
|
||||
<template>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="线下接待人员" prop="offlineReceiver">
|
||||
<el-input v-if="form.offlineReceiverName" v-model="form.offlineReceiverName" disabled />+
|
||||
<el-select v-model="form.offlineReceiver" multiple filterable placeholder="请选择" style="width: 97%; padding-top: 5px">
|
||||
<el-option
|
||||
v-for="dict in options.userOptions.filter((item) => !options.offlineReceiver || !options.offlineReceiver.includes(item.id))"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="memo">
|
||||
<el-input v-model="form.memo" type="textarea" :rows="4" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col v-if="distributeRecord != undefined && distributeRecord.length > 0" :span="24">
|
||||
<el-form-item label="甩单记录">
|
||||
<el-timeline style="max-height: 260px; overflow-y: auto">
|
||||
<el-timeline-item
|
||||
v-for="item in distributeRecord"
|
||||
:key="item.record"
|
||||
:timestamp="item.operateTime"
|
||||
placement="top"
|
||||
style="padding: 5px !important"
|
||||
>
|
||||
<el-card>
|
||||
<span style="display: block; font-weight: bold; font-size: 13px">用户 {{ item.operateUserName }}</span>
|
||||
<span style="display: block; padding-left: 10px; font-size: 13px" v-html="item.centent" />
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDistributeRecord } from '@/api/zs/clue';
|
||||
export default {
|
||||
name: 'DistributeForm',
|
||||
model: {
|
||||
prop: 'info',
|
||||
event: 'update'
|
||||
},
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
userOptions: [],
|
||||
offlineReceiver: []
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: JSON.parse(JSON.stringify(this.info)),
|
||||
rules: {
|
||||
offlineReceiver: {
|
||||
required: true,
|
||||
message: '线下接待人员不为空',
|
||||
trigger: 'change'
|
||||
}
|
||||
},
|
||||
distributeRecord: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler(val) {
|
||||
this.$emit('update', val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.handleDistribute();
|
||||
},
|
||||
methods: {
|
||||
validate() {
|
||||
return this.$refs.form.validate();
|
||||
},
|
||||
handleDistribute() {
|
||||
// 甩单
|
||||
getDistributeRecord({ clueId: this.form.clueId }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.distributeRecord = resp.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,72 +0,0 @@
|
||||
<template>
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="form.myCreate" label="myCreate">我创建的</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="form.myValid" label="myValid">我的有效</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="form.valid" label="valid">有效线索</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="form.todayValid" label="todayValid">今日有效线索</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="form.todayFollow" label="todayFollow">今日跟踪</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="form.outtime" label="outtime">过期线索</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="form.relate" label="relate">相关线索</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-checkbox v-model="form.reSign" label="reSign">撞单线索</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'FilterForm',
|
||||
model: {
|
||||
prop: 'info',
|
||||
event: 'update'
|
||||
},
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
userOptions: []
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: JSON.parse(JSON.stringify(this.info)),
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler(val) {
|
||||
this.$emit('update', val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validate() {
|
||||
return this.$refs.form.validate();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,84 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button type="text" icon="el-icon-refresh" style="margin-bottom: 10px" @click="handleQuery">刷新</el-button>
|
||||
<el-table v-loading="loading" :data="publicList" border :row-class-name="tableRowClassName">
|
||||
<el-table-column label="创建时间" prop="consultTime" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.consultTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="线索来源" prop="source" width="100" />
|
||||
<el-table-column label="姓名" prop="name" width="100" />
|
||||
<el-table-column label="位置" prop="address" min-width="160" />
|
||||
<el-table-column label="意向状态" prop="intentionState" width="100" />
|
||||
<el-table-column label="备注" prop="clueMemo" min-width="150" />
|
||||
<el-table-column label="操作" fixed="right" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handlePickup(scope.row)">获取</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination :total="queryParams.total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" :page-sizes="[50, 100]" @pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getPublicList, pickupClue } from '@/api/zs/clue';
|
||||
export default {
|
||||
name: 'PublicTable',
|
||||
data() {
|
||||
return {
|
||||
publicList: [],
|
||||
loading: true,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
total: 0
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
// this.timer = setInterval(() => {
|
||||
// this.getList()
|
||||
// }, 5000)
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getPublicList(this.queryParams).then((resp) => {
|
||||
if (resp && resp.code === 200) {
|
||||
this.publicList = resp.rows;
|
||||
this.loading = false;
|
||||
this.queryParams.total = resp.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
handlePickup(item) {
|
||||
pickupClue(item).then((resp) => {
|
||||
if (resp && resp.code === 200) {
|
||||
this.$message.success('拾取成功');
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (row.followUser2 || row.followUser) {
|
||||
return 'warning-row';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
handleQuery() {
|
||||
this.loading = true;
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scope>
|
||||
.el-table .warning-row {
|
||||
background: oldlace;
|
||||
}
|
||||
</style>
|
||||
@@ -1,416 +0,0 @@
|
||||
<template>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :disabled="form.signId != undefined && !form.signEdit">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学员姓名">
|
||||
<el-input v-model="form.name" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学员联系方式">
|
||||
<el-input v-model="form.phone" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="线索来源">
|
||||
<el-select v-model="form.source" disabled>
|
||||
<el-option v-for="dict in options.sourceOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否全款" prop="state">
|
||||
<el-radio-group v-model="form.state">
|
||||
<el-radio :label="true">全款</el-radio>
|
||||
<el-radio :label="false">非全款</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成交日期" prop="dealDate">
|
||||
<el-date-picker v-model="form.dealDate" :picker-options="dateControl" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名价格(元)" prop="signPrice">
|
||||
<el-input v-model="form.signPrice" placeholder="学员报名时需要交纳总共的钱" @blur="priceChange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名驾校" prop="signSchool">
|
||||
<el-select v-model="form.signSchool" filterable placeholder="请选择" @change="schoolChange">
|
||||
<el-option v-for="dict in schoolOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名场地" prop="signPlace">
|
||||
<el-select v-model="form.signPlace" filterable placeholder="请选择" @change="placeChange">
|
||||
<el-option
|
||||
v-for="dict in options.placeInfo.filter((item) => item.deptId === form.signSchool)"
|
||||
:key="dict.placeId"
|
||||
:label="dict.name"
|
||||
:value="dict.placeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名班型" prop="signClass">
|
||||
<el-select v-model="form.signClass" filterable placeholder="请选择" @change="priceChange">
|
||||
<el-option
|
||||
v-for="dict in classTypeOptions.filter((item) => (!item.placeId && item.deptId === form.signSchool) || item.placeId === form.signPlace)"
|
||||
:key="dict.typeId"
|
||||
:label="`${dict.licenseType}-${dict.typeName}`"
|
||||
:value="dict.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="对接人" prop="schoolPeople">
|
||||
<el-input v-model="form.schoolPeople" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="驾校支付" prop="schoolPay">
|
||||
<el-input v-model="form.schoolPay" type="number" placeholder="请输入驾校支付金额" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="驾考宝典款" prop="alipay">
|
||||
<el-input v-model="form.alipay" placeholder="请输入驾考宝典款金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="额外支出" prop="extraPayType">
|
||||
<el-select v-model="form.extraPayTypes" filterable placeholder="请选择" multiple clearable>
|
||||
<el-option v-for="dict in extraPayTypeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="额外支出金额" prop="extraPay">
|
||||
<el-input v-model="form.extraPay" placeholder="请输入额外支出金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="归属人员" prop="followUser">
|
||||
<el-select v-model="form.followUser" multiple placeholder="请选择" clearable :disabled="true">
|
||||
<el-option v-for="dict in options.userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属区域" prop="area">
|
||||
<el-select v-model="form.area" placeholder="请选择" clearable>
|
||||
<el-option v-for="dict in areaOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="admin" :span="12">
|
||||
<el-form-item label="佣金明细" prop="commission">
|
||||
<el-select v-model="form.commission" placeholder="请选择" clearable>
|
||||
<el-option v-for="dict in commissionOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="memo">
|
||||
<el-input v-model="form.memo" type="textarea" :rows="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="凭据" prop="evidence">
|
||||
<el-upload action="#" class="evidence-uploader" :http-request="handleUploadFile" accept="image/*" :show-file-list="false" multiple>
|
||||
<i class="el-icon-plus evidence-uploader-icon" />
|
||||
</el-upload>
|
||||
<div v-for="(item, index) in form.fileList" :key="index" class="pr dib">
|
||||
<el-image class="image-list-item" fit="contain" :src="preUrl + item" :preview-src-list="form.fileList.map((url) => preUrl + url)" lazy />
|
||||
<i class="el-icon-close btn-close" @click="handleRemoveImage(index, item)" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="checkRecord && checkRecord.length > 0">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核记录">
|
||||
<el-timeline style="max-height: 260px; overflow-y: auto">
|
||||
<el-timeline-item
|
||||
v-for="item in checkRecord"
|
||||
:key="item.record"
|
||||
:timestamp="item.operateTime"
|
||||
placement="top"
|
||||
style="padding: 5px !important"
|
||||
>
|
||||
<el-card>
|
||||
<span style="display: block; font-weight: bold; font-size: 13px">用户 {{ item.operateUserName }}</span>
|
||||
<span style="display: block; padding-left: 10px; font-size: 13px" v-html="item.centent" />
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { validateMoney } from '@/utils/validate';
|
||||
import { getSchools, getClassTypeInfo, uploadEvidence, deleteFile } from '@/api/tool/common';
|
||||
import { getCheckRecord } from '@/api/zs/sign';
|
||||
export default {
|
||||
name: 'SignForm',
|
||||
model: {
|
||||
prop: 'info',
|
||||
event: 'update'
|
||||
},
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
userOptions: [],
|
||||
sourceOptions: [],
|
||||
placeInfo: []
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: JSON.parse(localStorage.getItem('admin')),
|
||||
preUrl: process.env.VUE_APP_BASE_API,
|
||||
form: JSON.parse(JSON.stringify(this.info)),
|
||||
rules: {
|
||||
area: {
|
||||
required: true,
|
||||
message: '所属区域不为空',
|
||||
trigger: 'blur'
|
||||
},
|
||||
dealDate: {
|
||||
required: true,
|
||||
message: '成交时间不为空',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
state: {
|
||||
required: true,
|
||||
message: '是否权限必选',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
followUser: {
|
||||
required: true,
|
||||
message: '归属人员不为空',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
signSchool: {
|
||||
required: true,
|
||||
message: '报名驾校不为空',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
signPlace: {
|
||||
required: true,
|
||||
message: '报名场地不为空',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
signClass: {
|
||||
required: true,
|
||||
message: '报名班型不为空',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
dealState: {
|
||||
required: true,
|
||||
message: '结算情况不为空',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
signPrice: {
|
||||
required: true,
|
||||
validator: validateMoney,
|
||||
trigger: 'blur'
|
||||
}
|
||||
},
|
||||
schoolOptions: [],
|
||||
placeOptions: [],
|
||||
classTypeOptions: [],
|
||||
areaOptions: [],
|
||||
commissionOptions: [],
|
||||
extraPayTypeOptions: [],
|
||||
dateControl: undefined,
|
||||
checkRecord: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler(val) {
|
||||
this.$emit('update', val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!this.form.fileList) {
|
||||
this.$set(this.form, 'fileList', []);
|
||||
}
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
// 佣金明细
|
||||
this.getDicts('dm_commission').then((response) => {
|
||||
this.commissionOptions = response.data;
|
||||
});
|
||||
// 额外支出类型
|
||||
this.getDicts('dm_extra_pay').then((response) => {
|
||||
this.extraPayTypeOptions = response.data;
|
||||
});
|
||||
// 所属区域
|
||||
this.getDicts('dm_area').then((response) => {
|
||||
this.areaOptions = response.data;
|
||||
});
|
||||
// 驾校
|
||||
getSchools().then((resp) => {
|
||||
this.schoolOptions = resp.data;
|
||||
});
|
||||
// 班型
|
||||
getClassTypeInfo({ status: '0' }).then((resp) => {
|
||||
this.classTypeOptions = resp.data;
|
||||
});
|
||||
// 审核记录
|
||||
this.form.signId &&
|
||||
getCheckRecord({
|
||||
signId: this.form.signId,
|
||||
type: 1
|
||||
}).then((resp) => {
|
||||
this.checkRecord = resp.data;
|
||||
});
|
||||
// 未登记并且非管理员,添加日期规则
|
||||
if (!this.form.signId) {
|
||||
let start = new Date();
|
||||
// 取1号
|
||||
start.setDate(1);
|
||||
// 5号之前可操作上个月,注意跨年
|
||||
if (new Date().getDate() < 5) {
|
||||
if (start.getMonth() > 0) {
|
||||
start.setMonth(start.getMonth() - 1);
|
||||
} else {
|
||||
start.setFullYear(start.getFullYear() - 1);
|
||||
start.setMonth(11);
|
||||
}
|
||||
}
|
||||
// 因为new Date()出来的时间戳,包含时分秒,判断日期时需要减一天
|
||||
start = start.getTime() - 24 * 60 * 60 * 1000;
|
||||
this.dateControl = {
|
||||
disabledDate: (time) => {
|
||||
return time.getTime() < start || time.getTime() > new Date();
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
validate() {
|
||||
return this.$refs.form.validate();
|
||||
},
|
||||
// 驾校change事件
|
||||
schoolChange() {
|
||||
this.$set(this.form, 'signPlace', undefined);
|
||||
this.$set(this.form, 'signClass', undefined);
|
||||
},
|
||||
placeChange() {
|
||||
this.$set(this.form, 'signClass', undefined);
|
||||
this.$set(this.form, 'schoolPeople', this.options.placeInfo.find((item) => item.placeId === this.form.signPlace).contact);
|
||||
this.$set(this.form, 'area', this.options.placeInfo.find((item) => item.placeId === this.form.signPlace).area);
|
||||
// this.form.schoolPeople = this.options.placeInfo.find(
|
||||
// (item) => item.placeId === this.form.signPlace
|
||||
// ).contact
|
||||
},
|
||||
async handleUploadFile(data) {
|
||||
if (data.file) {
|
||||
const size = data.file.size;
|
||||
const limitSize = 20 * 1024 * 1024; // 20M大小限制
|
||||
if (size < limitSize) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', data.file);
|
||||
const resp = await uploadEvidence(formData);
|
||||
if (resp.code === 200) {
|
||||
this.form.fileList.push(resp.data);
|
||||
}
|
||||
} else {
|
||||
this.msgInfo('文件过大');
|
||||
}
|
||||
}
|
||||
},
|
||||
handleRemoveImage(index, item) {
|
||||
deleteFile(item).then((resp) => {
|
||||
if (resp && resp.data) {
|
||||
// 最好先通过接口删除服务器图片
|
||||
this.form.fileList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
priceChange() {
|
||||
// 计算驾校支付款 报名价格-班型底价
|
||||
if (this.form.signClass && this.form.signPrice) {
|
||||
let minprice;
|
||||
this.classTypeOptions.some((item) => {
|
||||
if (item.typeId == this.form.signClass) {
|
||||
minprice = item.minPrice;
|
||||
return item;
|
||||
}
|
||||
});
|
||||
if (minprice) {
|
||||
this.$set(this.form, 'schoolPay', this.form.signPrice - minprice);
|
||||
}
|
||||
} else {
|
||||
this.$set(this.form, 'schoolPay', undefined);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.evidence-uploader {
|
||||
display: inline-block;
|
||||
.el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
&:hover {
|
||||
border-color: #409eff;
|
||||
}
|
||||
.evidence-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.image-list-item {
|
||||
height: 100px;
|
||||
img {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-close {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 2px;
|
||||
font-size: 20px;
|
||||
background: #f2f6fc;
|
||||
}
|
||||
</style>
|
||||
129
src/views/zs/office/components/OfiiceDialogForm.vue
Normal file
129
src/views/zs/office/components/OfiiceDialogForm.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<el-dialog title="报名点信息" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="600px" @close="closeDialog">
|
||||
<div>
|
||||
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="top" @keyup.enter.native="dialogFormSubmit()">
|
||||
<el-form-item label="报名点名称" prop="officeName">
|
||||
<el-input v-model="dialogForm.officeName" placeholder="请输入报名点名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="推送驾校" prop="schoolList">
|
||||
<el-select v-model="dialogForm.schoolList" filterable placeholder="请选择" value-key="schoolId" clearable size="small" multiple>
|
||||
<el-option v-for="(dict, index) in schoolOptions" :key="index" :label="dict.schoolName" :value="dict.schoolId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="leader">
|
||||
<el-input v-model="dialogForm.leader" placeholder="请输入负责人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="dialogForm.phone" placeholder="请输入联系方式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dialogForm.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button plain @click="(visible=false)">取消</el-button>
|
||||
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addOffice, updateOffice } from '@/api/zs/office';
|
||||
import schoolAPi from '@/api/sch/school'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: true,
|
||||
dialogForm: {
|
||||
officeId: undefined,
|
||||
deptId: undefined,
|
||||
officeName: undefined,
|
||||
leader: undefined,
|
||||
phone: undefined,
|
||||
schoolList: [],
|
||||
remark: undefined
|
||||
},
|
||||
dataRule: {
|
||||
officeName: [{ required: true, message: '报名点名称不能为空', trigger: 'blur' }],
|
||||
schoolList: [{ required: true, message: '推送驾校不能为空', trigger: 'blur' }]
|
||||
},
|
||||
schoolOptions: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(info = undefined) {
|
||||
// debugger
|
||||
this.visible = true;
|
||||
this.getSchools()
|
||||
this.$nextTick(() => {
|
||||
this.resetDialogForm();
|
||||
this.$refs['dialogForm'].resetFields();
|
||||
if (info) {
|
||||
this.dialogForm = this.deepClone(info);
|
||||
}
|
||||
});
|
||||
},
|
||||
resetDialogForm() {
|
||||
this.dialogForm = {
|
||||
officeId: undefined,
|
||||
deptId: undefined,
|
||||
officeName: undefined,
|
||||
leader: undefined,
|
||||
phone: undefined,
|
||||
schoolList: [],
|
||||
remark: undefined
|
||||
};
|
||||
},
|
||||
closeDialog() {
|
||||
this.$emit('update:dialogVisible', false);
|
||||
},
|
||||
// 表单提交
|
||||
dialogFormSubmit() {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
|
||||
if (this.dialogForm.officeId) {
|
||||
// 校验完成,调接口
|
||||
updateOffice(this.dialogForm)
|
||||
.then((resp) => {
|
||||
this.canSubmit = true;
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('保存成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addOffice(this.dialogForm)
|
||||
.then((resp) => {
|
||||
this.canSubmit = true;
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('保存成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getSchools() {
|
||||
schoolAPi.pageList().then((resp) => {
|
||||
this.schoolOptions = resp.rows
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
42
src/views/zs/office/components/SearchForm.vue
Normal file
42
src/views/zs/office/components/SearchForm.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="searchForm" :model="searchForm" inline>
|
||||
<el-form-item label="报名点名称" prop="officeName">
|
||||
<el-input v-model="searchForm.officeName" placeholder="请输入报名点名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import DMRadio from '@/components/DMRadio';
|
||||
export default {
|
||||
components: {
|
||||
DMRadio
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {},
|
||||
dateRange: []
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
resetQuery() {
|
||||
this.searchForm = {
|
||||
officeName: undefined
|
||||
};
|
||||
this.dateRange = []
|
||||
},
|
||||
pickDateChange() {
|
||||
this.addDateRange(this.searchForm, this.dateRange)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
125
src/views/zs/office/index.vue
Normal file
125
src/views/zs/office/index.vue
Normal file
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索插件 -->
|
||||
<SearchForm v-show="showSearch" ref="SearchForm" @search="_getTableList" />
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddAndUpdate(undefined)" v-hasPermi="['zs:office:add']">新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="_getTableList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="officeList">
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="报名点名称" align="center" prop="officeName" />
|
||||
<el-table-column label="负责人" align="center" prop="leader" />
|
||||
<el-table-column label="联系方式" align="center" prop="phone" />
|
||||
<el-table-column label="推送驾校" align="center" prop="schoolNames" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleAddAndUpdate(scope.row)" v-hasPermi="['zs:office:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['zs:office:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||
|
||||
<!-- 添加或修改报名点对话框 -->
|
||||
<OfiiceDialogForm v-if="dialogVisible" ref="dialogForm" :dialog-visible="dialogVisible" @refreshDataList="_getTableList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOffice, getOffice, delOffice, } from "@/api/zs/office";
|
||||
import SearchForm from "./components/SearchForm.vue";
|
||||
import OfiiceDialogForm from "./components/OfiiceDialogForm.vue";
|
||||
|
||||
export default {
|
||||
name: "Office",
|
||||
components: {
|
||||
SearchForm, OfiiceDialogForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 报名点表格数据
|
||||
officeList: [],
|
||||
// 查询参数
|
||||
searchForm: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
dialogVisible: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this._getTableList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询报名点列表 */
|
||||
_getTableList() {
|
||||
this.loading = true;
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
listOffice(params).then(response => {
|
||||
this.officeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this._getTableList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAddAndUpdate(item) {
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialogForm.init(item);
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const officeIds = row.officeId || this.ids;
|
||||
this.$modal.confirm('是否确认删除报名点编号为"' + officeIds + '"的数据项?').then(function () {
|
||||
return delOffice(officeIds);
|
||||
}).then(() => {
|
||||
this._getTableList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/office/export', {
|
||||
...this.queryParams
|
||||
}, `office_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
252
src/views/zs/officeSign/columns.js
Normal file
252
src/views/zs/officeSign/columns.js
Normal file
@@ -0,0 +1,252 @@
|
||||
export const defaultColumns = [{
|
||||
key: 0,
|
||||
prop: 'officeName',
|
||||
label: '报名点',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: false
|
||||
}, {
|
||||
key: 1,
|
||||
prop: 'name',
|
||||
label: '姓名',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'idcard',
|
||||
label: '身份证号',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'phone',
|
||||
label: '手机号',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'source',
|
||||
label: '线索来源',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'dealDate',
|
||||
label: '成交日期',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'signType',
|
||||
label: '报名类别',
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'schoolName',
|
||||
label: '报名驾校',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'placeName',
|
||||
label: '报名场地',
|
||||
width: 120,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 9,
|
||||
prop: 'className',
|
||||
label: '报名班型',
|
||||
width: 120,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 10,
|
||||
prop: 'signPrice',
|
||||
label: '报名价格',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 11,
|
||||
prop: 'profit',
|
||||
label: '利润',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 12,
|
||||
prop: 'trainFee',
|
||||
label: '培训费',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: false
|
||||
},
|
||||
{
|
||||
key: 13,
|
||||
prop: 'examFee',
|
||||
label: '考试费',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 14,
|
||||
prop: 'learningFee',
|
||||
label: '学杂费',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
}, {
|
||||
key: 15,
|
||||
prop: 'physicalExamFee',
|
||||
label: '体检费',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 16,
|
||||
prop: 'totalFee',
|
||||
label: '总计金额',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 17,
|
||||
prop: 'extraPayType',
|
||||
label: '额外支出项目',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 18,
|
||||
prop: 'extraPay',
|
||||
label: '额外支出金额',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
}, {
|
||||
key: 19,
|
||||
prop: 'extraPayWay',
|
||||
label: '支付方式',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 20,
|
||||
prop: 'collectionAccount1',
|
||||
label: '收款账户',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 21,
|
||||
prop: 'entryTime1',
|
||||
label: '入账时间',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
}, {
|
||||
key: 22,
|
||||
prop: 'entryMoney1',
|
||||
label: '入账金额',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 23,
|
||||
prop: 'commission1',
|
||||
label: '手续费',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 24,
|
||||
prop: 'collectionAccount2',
|
||||
label: '收款账户',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 25,
|
||||
prop: 'entryTime2',
|
||||
label: '入账时间',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
}, {
|
||||
key: 26,
|
||||
prop: 'entryMoney2',
|
||||
label: '入账金额',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 27,
|
||||
prop: 'commission2',
|
||||
label: '手续费',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
|
||||
{
|
||||
key: 28,
|
||||
prop: 'followUserName',
|
||||
label: '归属人员',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 29,
|
||||
prop: 'stuStatus',
|
||||
label: '学员状态',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 30,
|
||||
prop: 'submissionTime',
|
||||
label: '送审日期',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
},
|
||||
{
|
||||
key: 31,
|
||||
prop: 'memo',
|
||||
label: '备注',
|
||||
width: 140,
|
||||
visible: true,
|
||||
overflow: true
|
||||
}
|
||||
];
|
||||
406
src/views/zs/officeSign/components/OfiiceSignDialogForm.vue
Normal file
406
src/views/zs/officeSign/components/OfiiceSignDialogForm.vue
Normal file
@@ -0,0 +1,406 @@
|
||||
<template>
|
||||
<el-dialog title="报名点信息" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="800px" @close="closeDialog" style>
|
||||
<div>
|
||||
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-width="110px" @keyup.enter.native="dialogFormSubmit()" :disabled="type == 2 || dialogForm.checkState==1 || dialogForm.checkState==2">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名点" prop="officeId">
|
||||
<el-input v-model="dialogForm.officeId" placeholder="请输入报名点ID" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="dialogForm.name" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证号" prop="idcard">
|
||||
<el-input v-model="dialogForm.idcard" placeholder="请输入身份证号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="dialogForm.phone" placeholder="请输入联系方式" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="线索来源" prop="source">
|
||||
<el-select v-model="dialogForm.source" placeholder="请选择" clearable size="small" :disabled="modalForm.clueId != undefined">
|
||||
<el-option v-for="(dict, index) in sourceOptions" :key="index" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成交日期" prop="dealDate">
|
||||
<el-date-picker clearable v-model="dialogForm.dealDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择成交日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名驾校" prop="signSchool">
|
||||
<el-select v-model="dialogForm.signSchool" filterable placeholder="请选择" value-key="schoolId" clearable size="small" @change="schoolChange">
|
||||
<el-option v-for="(dict, index) in schoolOptions" :key="index" :label="dict.schoolName" :value="dict.schoolId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名场地" prop="signPlace">
|
||||
<el-select v-model="dialogForm.signPlace" filterable placeholder="请选择" clearable value-key="placeId" size="small" @change="placeChange">
|
||||
<el-option v-for="(dict, index) in placeOptions" :key="index" :label="dict.name" :value="dict.placeId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名班型" prop="signClass">
|
||||
<el-select v-model="dialogForm.signClass" filterable placeholder="请选择" clearable value-key="typeId" size="small" @change="priceChange">
|
||||
<el-option v-for="(dict, index) in classTypeOptions" :key="index" :label="`${dict.licenseType}-${dict.typeName}`" :value="dict.typeId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名价格" prop="signPrice">
|
||||
<el-input v-model="dialogForm.signPrice" placeholder="请输入报名价格" />
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="培训费" prop="trainFee">
|
||||
<el-input v-model="dialogForm.trainFee" placeholder="请输入培训费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="考试费" prop="examFee">
|
||||
<el-input v-model="dialogForm.examFee" placeholder="请输入考试费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学杂费" prop="learningFee">
|
||||
<el-input v-model="dialogForm.learningFee" placeholder="请输入学杂费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="体检费" prop="physicalExamFee">
|
||||
<el-input v-model="dialogForm.physicalExamFee" placeholder="请输入体检费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="额外支出项目" prop="extraPayType">
|
||||
<el-select v-model="dialogForm.extraPayTypes" filterable multiple placeholder="请选择" clearable size="small">
|
||||
<el-option v-for="(dict, index) in extraPayTypeOptions" :key="index" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="额外支出金额" prop="extraPay">
|
||||
<el-input v-model="dialogForm.extraPay" placeholder="请输入额外支出金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="支付方式" prop="extraPayWay">
|
||||
<el-input v-model="dialogForm.extraPayWay" placeholder="请输入支付方式" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="利润" prop="profit">
|
||||
<el-input v-model="dialogForm.profit" placeholder="请输入利润" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收款账户" prop="collectionAccount1">
|
||||
<el-input v-model="dialogForm.collectionAccount1" placeholder="请输入收款账户" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入账时间" prop="entryTime1">
|
||||
<el-date-picker clearable v-model="dialogForm.entryTime1" type="date" value-format="yyyy-MM-dd" placeholder="请选择入账时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入账金额" prop="entryMoney1">
|
||||
<el-input v-model="dialogForm.entryMoney1" placeholder="请输入入账金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手续费" prop="commission1">
|
||||
<el-input v-model="dialogForm.commission1" placeholder="请输入手续费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收款账户2" prop="collectionAccount2">
|
||||
<el-input v-model="dialogForm.collectionAccount2" placeholder="请输入收款账户" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入账时间2" prop="entryTime2">
|
||||
<el-date-picker clearable v-model="dialogForm.entryTime2" type="date" value-format="yyyy-MM-dd" placeholder="请选择入账时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入账金额2" prop="entryMoney2">
|
||||
<el-input v-model="dialogForm.entryMoney2" placeholder="请输入入账金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手续费2" prop="commission2">
|
||||
<el-input v-model="dialogForm.commission2" placeholder="请输入手续费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="送审日期" prop="submissionTime">
|
||||
<el-date-picker clearable v-model="dialogForm.submissionTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择送审日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学员状态" prop="commission2">
|
||||
<el-input v-model="dialogForm.commission2" placeholder="请输入手续费" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="归属人员" prop="followUserList">
|
||||
<el-select v-model="modalForm.followUserList" multiple placeholder="请选择" clearable size="small" :disabled="modalForm.clueId != undefined">
|
||||
<el-option v-for="(dict, index) in userOptions" :key="index" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="memo">
|
||||
<el-input type="textarea" :rows="3" v-model="dialogForm.memo" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button plain @click="(visible=false)">取消</el-button>
|
||||
<el-button v-if="type==1" v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||
<el-button v-if="type==2" v-jclick type="primary" @click="handleCheck(2)">通过</el-button>
|
||||
<el-button v-if="type==2" v-jclick type="primary" @click="handleCheck(3)">驳回</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addSign, updateSign, checkSign } from "@/api/zs/officeSign";
|
||||
import schoolAPi from '@/api/sch/school'
|
||||
import empApi from '@/api/system/employee'
|
||||
import { getAllPlaces } from '@/api/sch/place'
|
||||
import { getClassTypeTableList } from '@/api/sch/classType'
|
||||
|
||||
|
||||
export default {
|
||||
name: "OfficeSignDialogForm",
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: true,
|
||||
dialogForm: {},
|
||||
dataRule: {
|
||||
officeName: [{ required: true, message: '报名点名称不能为空', trigger: 'blur' }],
|
||||
schoolList: [{ required: true, message: '推送驾校不能为空', trigger: 'blur' }]
|
||||
},
|
||||
officeOptions: [],
|
||||
schoolOptions: [],
|
||||
placeOptions: [],
|
||||
classTypeOptions: [],
|
||||
userOptions: [],
|
||||
sourceOptions: [],
|
||||
extraPayTypeOptions: [],
|
||||
type: 1
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(info = undefined, type) {
|
||||
// debugger
|
||||
this.visible = true;
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.resetDialogForm();
|
||||
this.$refs['dialogForm'].resetFields();
|
||||
if (info) {
|
||||
this.dialogForm = this.deepClone(info);
|
||||
if (this.dialogForm.signSchool) {
|
||||
this.getAllPlaces(this.dialogForm.signSchool)
|
||||
this.getClassTypes(this.dialogForm.signSchool, this.dialogForm.signPlace)
|
||||
}
|
||||
}
|
||||
if (type) {
|
||||
this.type = type
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
initData() {
|
||||
this.getSchools();
|
||||
this.getEmployee();
|
||||
//线索来源
|
||||
this.getDicts('dm_source').then((response) => {
|
||||
this.sourceOptions = response.data
|
||||
})
|
||||
//额外支出类型
|
||||
this.getDicts('dm_extra_pay').then((response) => {
|
||||
this.extraPayTypeOptions = response.data
|
||||
})
|
||||
},
|
||||
resetDialogForm() {
|
||||
this.dialogForm = {
|
||||
officeSignId: null,
|
||||
officeId: null,
|
||||
clueId: null,
|
||||
name: null,
|
||||
idcard: null,
|
||||
phone: null,
|
||||
source: null,
|
||||
dealDate: null,
|
||||
signType: null,
|
||||
signSchool: null,
|
||||
schoolName: null,
|
||||
signPlace: null,
|
||||
placeName: null,
|
||||
signClass: null,
|
||||
className: null,
|
||||
signPrice: null,
|
||||
profit: null,
|
||||
followUser: null,
|
||||
followUserName: null,
|
||||
trainFee: null,
|
||||
examFee: null,
|
||||
learningFee: null,
|
||||
physicalExamFee: null,
|
||||
memo: null,
|
||||
checkState: null,
|
||||
rejectReason: null,
|
||||
createTime: null,
|
||||
createUser: null,
|
||||
updateTime: null,
|
||||
signDate: null,
|
||||
delFlag: null,
|
||||
submissionTime: null,
|
||||
stuStatus: "0",
|
||||
collectionAccount1: null,
|
||||
entryTime: null,
|
||||
entryMoney: null,
|
||||
commission: null,
|
||||
extraPayType: null,
|
||||
extraPay: null,
|
||||
extraPayWay: null
|
||||
};
|
||||
},
|
||||
closeDialog() {
|
||||
this.$emit('update:dialogVisible', false);
|
||||
},
|
||||
// 表单提交
|
||||
dialogFormSubmit() {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
|
||||
if (this.dialogForm.officeSignId) {
|
||||
// 校验完成,调接口
|
||||
updateSign(this.dialogForm)
|
||||
.then((resp) => {
|
||||
this.canSubmit = true;
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('保存成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addSign(this.dialogForm)
|
||||
.then((resp) => {
|
||||
this.canSubmit = true;
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('保存成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//审核登记
|
||||
handleCheck(status) {
|
||||
this.dialogForm.checkState = status;
|
||||
checkSign(this.dialogForm)
|
||||
.then((resp) => {
|
||||
this.canSubmit = true;
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('保存成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
},
|
||||
getSchools() {
|
||||
schoolAPi.pageList().then((resp) => {
|
||||
this.schoolOptions = resp.rows
|
||||
})
|
||||
},
|
||||
getPlaces(schoolId) {
|
||||
getAllPlaces({ schoolId: schoolId, status: '0' }).then((resp) => {
|
||||
this.placeOptions = resp.data
|
||||
})
|
||||
},
|
||||
getClassTypes(schoolId, placeId) {
|
||||
getClassTypeTableList({ schoolId: schoolId, placeId: placeId, status: '0' }).then(
|
||||
(resp) => {
|
||||
this.classTypeOptions = resp.rows
|
||||
}
|
||||
)
|
||||
},
|
||||
getEmployee() {
|
||||
empApi.getEmployee().then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
this.userOptions = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
59
src/views/zs/officeSign/components/SearchForm.vue
Normal file
59
src/views/zs/officeSign/components/SearchForm.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="searchForm" :model="searchForm" inline>
|
||||
<el-form-item label="报名点" prop="officeId">
|
||||
<el-input v-model="searchForm.officeId" placeholder="请输入报名点ID" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名/手机号" prop="name">
|
||||
<el-input v-model="searchForm.name" placeholder="请输入姓名" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idcard">
|
||||
<el-input v-model="searchForm.idcard" placeholder="请输入身份证号" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="线索来源" prop="source">
|
||||
<el-input v-model="searchForm.source" placeholder="请输入线索来源" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="成交日期" prop="dealDate">
|
||||
<el-date-picker clearable v-model="searchForm.dealDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择成交日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import DMRadio from '@/components/DMRadio';
|
||||
export default {
|
||||
components: {
|
||||
DMRadio
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {},
|
||||
dateRange: []
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
resetQuery() {
|
||||
this.searchForm = {
|
||||
officeId: undefined,
|
||||
name: undefined,
|
||||
idcard: undefined,
|
||||
source: undefined,
|
||||
dealDate: undefined
|
||||
};
|
||||
this.dateRange = []
|
||||
},
|
||||
pickDateChange() {
|
||||
this.addDateRange(this.searchForm, this.dateRange)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
143
src/views/zs/officeSign/index.vue
Normal file
143
src/views/zs/officeSign/index.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索插件 -->
|
||||
<SearchForm v-show="showSearch" ref="SearchForm" @search="_getTableList" />
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddAndUpdate(undefined)" v-hasPermi="['zs:officeSign:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['zs:officeSign:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" :columns="columns" @queryTable="_getTableList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="signList">
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<template v-for="item in columns">
|
||||
<el-table-column v-if="item.visible" :key="item.key" :label="item.label" align="center" :width="item.width" :prop="item.prop" :show-overflow-tooltip="item.overflow" />
|
||||
</template>
|
||||
<el-table-column align="center" width="100" fixed="right" label="审核状态">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="danger" size="mini" v-if="row.checkState == 1">待审核</el-button>
|
||||
<el-button type="success" size="mini" v-else-if="row.checkState == 2">已审核</el-button>
|
||||
<el-button type="warning" size="mini" v-else-if="row.checkState == 3">驳回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleAddAndUpdate(scope.row)" v-hasPermi="['zs:officeSign:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)" v-hasPermi="['zs:officeSign:check']">审核</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['zs:officeSign:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||
|
||||
<!-- 添加或修改报名点成交登记对话框 -->
|
||||
<OfiiceSignDialogForm v-if="dialogVisible" ref="dialogForm" :dialog-visible="dialogVisible" @refreshDataList="_getTableList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSign, getSign, delSign } from "@/api/zs/officeSign";
|
||||
import SearchForm from "./components/SearchForm.vue";
|
||||
import OfiiceSignDialogForm from "./components/OfiiceSignDialogForm.vue";
|
||||
import { defaultColumns } from './columns.js';
|
||||
|
||||
|
||||
export default {
|
||||
name: "OfficeSign",
|
||||
components: {
|
||||
SearchForm, OfiiceSignDialogForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 报名点成交登记表格数据
|
||||
signList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
searchForm: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
columns: [],
|
||||
dialogVisible: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const str = localStorage.getItem(`${this.$route.name}-table-columns`);
|
||||
this.columns = str ? JSON.parse(str) : defaultColumns;
|
||||
this._getTableList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
/** 查询报名点成交登记列表 */
|
||||
_getTableList() {
|
||||
this.loading = true;
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
listSign(params).then(response => {
|
||||
this.signList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.officeSignId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAddAndUpdate(item) {
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialogForm.init(item, 1);
|
||||
});
|
||||
},
|
||||
/** 审核 */
|
||||
handleCheck(item) {
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialogForm.init(item, 2);
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const officeSignIds = row.officeSignId || this.ids;
|
||||
this.$modal.confirm('是否确认删除报名点成交登记编号为"' + officeSignIds + '"的数据项?').then(function () {
|
||||
return delSign(row.officeSignId);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
this.download('zs/officeSign/export', params, `报名点登记_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -25,7 +25,7 @@ module.exports = {
|
||||
assetsDir: 'static',
|
||||
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。rrra
|
||||
productionSourceMap: false,
|
||||
// webpack-dev-server 相关配置
|
||||
devServer: {
|
||||
@@ -35,8 +35,8 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://118.31.23.45/duima/`,
|
||||
// target: `http://localhost:8086`,
|
||||
// target: `http://118.31.23.45/duima/`,
|
||||
target: `http://localhost:8086`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
@@ -97,12 +97,10 @@ module.exports = {
|
||||
config
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
.use('script-ext-html-webpack-plugin', [
|
||||
{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}
|
||||
])
|
||||
.use('script-ext-html-webpack-plugin', [{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}])
|
||||
.end();
|
||||
config.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
|
||||
Reference in New Issue
Block a user