Merge pull request '提交' (#9) from dev-zcx into master

Reviewed-on: #9
pull/11/head
zcx 2 years ago
commit 01d8c27b48
  1. 3
      package.json
  2. 1
      public/index.html
  3. 11
      src/api/login.js
  4. 44
      src/api/zs/office.js
  5. 53
      src/api/zs/officeSign.js
  6. 5
      src/assets/styles/index.scss
  7. 5
      src/assets/styles/wx.scss
  8. 48
      src/store/modules/user.js
  9. 151
      src/views/login.vue
  10. 217
      src/views/password.vue
  11. 75
      src/views/wxCode.vue
  12. 61
      src/views/zs/components/batchUpdateForm.vue
  13. 632
      src/views/zs/components/clueForm.vue
  14. 106
      src/views/zs/components/distributeForm.vue
  15. 72
      src/views/zs/components/filterForm.vue
  16. 84
      src/views/zs/components/publicTable.vue
  17. 416
      src/views/zs/components/signForm.vue
  18. 129
      src/views/zs/office/components/OfiiceDialogForm.vue
  19. 42
      src/views/zs/office/components/SearchForm.vue
  20. 125
      src/views/zs/office/index.vue
  21. 252
      src/views/zs/officeSign/columns.js
  22. 406
      src/views/zs/officeSign/components/OfiiceSignDialogForm.vue
  23. 59
      src/views/zs/officeSign/components/SearchForm.vue
  24. 143
      src/views/zs/officeSign/index.vue
  25. 12
      vue.config.js

@ -78,7 +78,8 @@
"sass-loader": "10.1.1", "sass-loader": "10.1.1",
"script-ext-html-webpack-plugin": "2.1.5", "script-ext-html-webpack-plugin": "2.1.5",
"svg-sprite-loader": "5.1.1", "svg-sprite-loader": "5.1.1",
"vue-template-compiler": "2.6.12" "vue-template-compiler": "2.6.12",
"vue-wxlogin": "^1.0.4"
}, },
"engines": { "engines": {
"node": ">=8.9", "node": ">=8.9",

@ -93,6 +93,7 @@
securityJsCode:'420463f2f8c849ab78b9d29548aff7d3', securityJsCode:'420463f2f8c849ab78b9d29548aff7d3',
} }
</script> </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> <script src="https://webapi.amap.com/maps?v=1.4.15&key=ec6b7ebe38f7ff27126f7088d87a9091&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Scale"></script>
</body> </body>
</html> </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) { export function register(data) {
return request({ return request({

@ -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'
})
}

@ -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; z-index: 9999;
} }
.impowerBox .qrcode {
width: 80px;
margin-top: 15px;
border: 1px solid #e2e2e2;
}

@ -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 {
import { getToken, setToken, removeToken } from '@/utils/auth'; login,
logout,
getInfo,
wxLogin
} from '@/api/login';
import {
getToken,
setToken,
removeToken
} from '@/utils/auth';
const user = { const user = {
state: { state: {
@ -30,7 +39,9 @@ const user = {
actions: { actions: {
// 登录 // 登录
Login({ commit }, userInfo) { Login({
commit
}, userInfo) {
const username = userInfo.username.trim(); const username = userInfo.username.trim();
const password = userInfo.password; const password = userInfo.password;
const code = userInfo.code; const code = userInfo.code;
@ -47,9 +58,29 @@ const user = {
}); });
}); });
}, },
// 登录
WXLogin({
commit
}, userInfo) {
return new Promise((resolve, reject) => {
wxLogin(userInfo)
.then((res) => {
setToken(res.token);
commit('SET_TOKEN', res.token);
resolve();
})
.catch((error) => {
reject(error);
});
});
},
// 获取用户信息 // 获取用户信息
GetInfo({ commit, state }) { GetInfo({
commit,
state
}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getInfo() getInfo()
.then((res) => { .then((res) => {
@ -74,7 +105,10 @@ const user = {
}, },
// 退出系统 // 退出系统
LogOut({ commit, state }) { LogOut({
commit,
state
}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
logout(state.token) logout(state.token)
.then(() => { .then(() => {
@ -91,7 +125,9 @@ const user = {
}, },
// 前端 登出 // 前端 登出
FedLogOut({ commit }) { FedLogOut({
commit
}) {
return new Promise((resolve) => { return new Promise((resolve) => {
commit('SET_TOKEN', ''); commit('SET_TOKEN', '');
removeToken(); removeToken();

@ -1,36 +1,23 @@
<template> <template>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <div class="login-form">
<h3 class="title">若依管理系统</h3> <h3 class="title">若依管理系统</h3>
<el-form-item prop="username"> <el-tabs v-model="activeName" type="card">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号"> <el-tab-pane label="微信扫码" name="wx" style="height:200px">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> <wxlogin v-if="!code && activeName === 'wx'" appid="wx203f734baa9c9845" :scope="'snsapi_login'" :theme="'black'" redirect_uri="https://xueche.ahduima.com/login" :href="href">
</el-input> </wxlogin>
</el-form-item> <!-- <div id="wxcode" v-if="!code && activeName === 'wx'"></div> -->
<el-form-item prop="password"> <!-- 绑定手机号框 -->
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin"> <div v-else v-loading="loading">
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> <WxCode v-if="codeShow" :code="code" :openId="openId" />
</el-input>
</el-form-item>
<el-form-item v-if="captchaEnabled" prop="code">
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter.native="handleLogin">
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>
<div class="login-code">
<img :src="codeUrl" class="login-code-img" @click="getCode">
</div> </div>
</el-form-item> </el-tab-pane>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> <el-tab-pane label="账号密码" name="password" style="height:200px">
<el-form-item style="width:100%;"> <Password v-if="activeName === 'password'" />
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" @click.native.prevent="handleLogin"> </el-tab-pane>
<span v-if="!loading"> </span> </el-tabs>
<span v-else> 中...</span>
</el-button>
<div v-if="register" style="float: right;">
<router-link class="link-type" :to="'/register'">立即注册</router-link>
</div> </div>
</el-form-item>
</el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span> <span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>
@ -42,30 +29,26 @@
import { getCodeImg } from '@/api/login'; import { getCodeImg } from '@/api/login';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { encrypt, decrypt } from '@/utils/jsencrypt'; import { encrypt, decrypt } from '@/utils/jsencrypt';
import wxlogin from 'vue-wxlogin'
import Password from './password.vue';
import WxCode from './wxCode.vue';
export default { export default {
name: 'Login', name: 'Login',
components: {
wxlogin, Password, WxCode
},
data() { data() {
return { return {
codeUrl: '', codeUrl: '',
loginForm: {
username: 'admin',
password: 'admin123',
rememberMe: false,
code: '',
uuid: ''
},
loginRules: {
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
},
loading: false, loading: false,
// redirect: undefined,
captchaEnabled: true, activeName: 'wx',
// code: undefined,
register: false, openId: undefined,
redirect: undefined codeShow: false,
href: "data:text/css;base64,LmltcG93ZXJCb3ggLnFyY29kZSB7d2lkdGg6IDE4MHB4OyBtYXJnaW4tdG9wOjBweH0KLmltcG93ZXJCb3ggLnRpdGxlIHtkaXNwbGF5OiBub25lO30KLmltcG93ZXJCb3ggLmluZm8ge3dpZHRoOiAxODBweDt9Ci5zdGF0dXNfaWNvbiB7ZGlzcGxheTogbm9uZX0KLmltcG93ZXJCb3ggLnN0YXR1cyB7dGV4dC1hbGlnbjogY2VudGVyO30g"
}; };
}, },
watch: { watch: {
@ -77,54 +60,39 @@ export default {
} }
}, },
created() { created() {
this.getCode(); this.code = this.$route.query.code;
this.getCookie(); if (this.code) {
}, this.loading = true
methods: { this.wxLogin(this.code);
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() { mounted() {
const username = Cookies.get('username'); // this.createWxQrcode();
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() { methods: {
this.$refs.loginForm.validate((valid) => { async wxLogin(code) {
if (valid) { //codeopenId
this.loading = true; const resp = this.$store.dispatch('WXLogin', { code: code, type: 1 });
if (this.loginForm.rememberMe) { if (resp.token) {
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(() => { }); this.$router.push({ path: this.redirect || '/' }).catch(() => { });
}) } else if (resp.openId) {
.catch(() => { //openId
this.loading = false; this.openId = resp.openId;
if (this.captchaEnabled) { this.loading = false
this.getCode(); this.codeShow = true
}
});
} }
},
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 { .login-form {
display: inline;
border-radius: 6px; border-radius: 6px;
background: #ffffff; background: #ffffff;
width: 400px; width: 350px;
padding: 25px 25px 5px 25px; padding: 25px 25px 5px 25px;
.el-input { .el-input {
height: 38px; height: 38px;
@ -192,4 +161,8 @@ export default {
.login-code-img { .login-code-img {
height: 38px; height: 38px;
} }
.impowerBox .qrcode {
width: 200px !important;
}
</style> </style>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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
}
];

@ -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>

@ -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>

@ -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', assetsDir: 'static',
// 是否开启eslint保存检测,有效值:ture | false | 'error' // 是否开启eslint保存检测,有效值:ture | false | 'error'
lintOnSave: process.env.NODE_ENV === 'development', lintOnSave: process.env.NODE_ENV === 'development',
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。rrra
productionSourceMap: false, productionSourceMap: false,
// webpack-dev-server 相关配置 // webpack-dev-server 相关配置
devServer: { devServer: {
@ -35,8 +35,8 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://118.31.23.45/duima/`, // target: `http://118.31.23.45/duima/`,
// target: `http://localhost:8086`, target: `http://localhost:8086`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''
@ -97,12 +97,10 @@ module.exports = {
config config
.plugin('ScriptExtHtmlWebpackPlugin') .plugin('ScriptExtHtmlWebpackPlugin')
.after('html') .after('html')
.use('script-ext-html-webpack-plugin', [ .use('script-ext-html-webpack-plugin', [{
{
// `runtime` must same as runtimeChunk name. default is `runtime` // `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/ inline: /runtime\..*\.js$/
} }])
])
.end(); .end();
config.optimization.splitChunks({ config.optimization.splitChunks({
chunks: 'all', chunks: 'all',

Loading…
Cancel
Save