Commit ed19de17 authored by 罗超's avatar 罗超

新增值班记录

parent fe8b3317
...@@ -49,7 +49,7 @@ module.exports = function (ctx) { ...@@ -49,7 +49,7 @@ module.exports = function (ctx) {
env: ctx.dev ? { env: ctx.dev ? {
// API: 'https://localhost:5001/api', // API: 'https://localhost:5001/api',
// API: 'http://192.168.20.24:8300/api', // API: 'http://192.168.20.24:8300/api',
API: 'http://192.168.20.8:8085/api', API: 'http://192.168.10.46:8300/api',
// API: 'http://192.168.20.17:8017/api', // API: 'http://192.168.20.17:8017/api',
...@@ -98,7 +98,7 @@ module.exports = function (ctx) { ...@@ -98,7 +98,7 @@ module.exports = function (ctx) {
// https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework
framework: { framework: {
iconSet: 'material-icons', // Quasar icon set iconSet: 'material-icons', // Quasar icon set
lang: 'en-us', // Quasar language pack lang: 'zh-hans', // Quasar language pack
config: {}, config: {},
// Possible values for "importStrategy": // Possible values for "importStrategy":
......
...@@ -13,7 +13,7 @@ export default { ...@@ -13,7 +13,7 @@ export default {
//alert("shouji"); //alert("shouji");
} else { } else {
//alert("diannao"); //alert("diannao");
document.write('<link href="font.css" rel="stylesheet" type="text/css" media="screen" />'); document.write('<link href="http://edu.oytour.com/font.css" rel="stylesheet" type="text/css" media="screen" />');
} }
}, },
}; };
......
...@@ -11,6 +11,14 @@ export function getStudentAttendanceDayStatistics(data) { ...@@ -11,6 +11,14 @@ export function getStudentAttendanceDayStatistics(data) {
}); });
} }
export function getTodayVisitList(data){
return request({
url: '/DutyPlan/GetDutyTodayVisit',
method: 'post',
data
});
}
//学管 获取访客列表 //学管 获取访客列表
export function getVisitorAllPageList(data) { export function getVisitorAllPageList(data) {
return request({ return request({
......
<style> <style>
.schedulVisit { .schedulVisit {
min-height: calc(100% - 30px); min-height: calc(100% - 30px);
padding: 15px; padding: 15px;
margin-top: 30px; margin-top: 30px;
border-radius: 8px; border-radius: 8px;
background: #fff; background: #fff;
} }
.schedulVisit .fangkeTitle { .schedulVisit .fangkeTitle {
color: #000000; color: #000000;
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
.schedulVisit .fangkeNumb { .schedulVisit .fangkeNumb {
display: inline-block; display: inline-block;
background-color: #BCCEFD; background-color: #bccefd;
color: #2966FE; color: #2966fe;
font-size: 15px; font-size: 15px;
border-radius: 6px; border-radius: 6px;
text-align: center; text-align: center;
line-height: 22px; line-height: 22px;
margin-left: 15px; margin-left: 15px;
padding: 0px 6px; padding: 0px 6px;
} }
.schedulVisit .visit_Date { .schedulVisit .visit_Date {
margin-left: 60px; margin-left: 60px;
color: #000000; color: #000000;
font-size: 16px; font-size: 16px;
} }
.schedulVisit .visit_Date i { .schedulVisit .visit_Date i {
color: #B4B4B4; color: #b4b4b4;
margin-right: 10px; margin-right: 10px;
} }
.page-option .el-input__inner { .page-option .el-input__inner {
background-color: #F1F3F5; background-color: #f1f3f5;
border: 0; border: 0;
height: 34px; height: 34px;
line-height: 34px; line-height: 34px;
border-radius: 10px; border-radius: 10px;
} }
.page-option .el-input__icon { .page-option .el-input__icon {
line-height: 34px; line-height: 34px;
} }
.schedul_Vtable tr th { .schedul_Vtable tr th {
color: #8E8E8E; color: #8e8e8e;
} }
.schedul_Vtable tr td { .schedul_Vtable tr td {
color: #2D2D2D; color: #2d2d2d;
} }
.visit_FORM .el-input__inner { .visit_FORM .el-input__inner {
background: #F0F2F5; background: #f0f2f5;
border-radius: 10px; border-radius: 10px;
height: 34px; height: 34px;
line-height: 34px; line-height: 34px;
border: 0; border: 0;
} }
.visit_FORM .el-input__icon { .visit_FORM .el-input__icon {
line-height: 34px; line-height: 34px;
} }
.schedulVisit .q-table { .schedulVisit .q-table {
padding-bottom: 5px; padding-bottom: 5px;
} }
.schedulVisit .q-table tbody td:before { .schedulVisit .q-table tbody td:before {
background: '' !important; background: "" !important;
} }
.schedulVisit .q-table tbody tr:hover { .schedulVisit .q-table tbody tr:hover {
box-shadow: 0px 2px 20px 0px #E4E7FB; box-shadow: 0px 2px 20px 0px #e4e7fb;
background: #fff; background: #fff;
border-radius: 16px border-radius: 16px;
} }
.schedulVisit .q-table tbody td:before { .schedulVisit .q-table tbody td:before {
background: transparent !important; background: transparent !important;
} }
.scheduVipop .el-textarea__inner { .scheduVipop .el-textarea__inner {
background: #F0F2F5 !important; background: #f0f2f5 !important;
border: 0; border: 0;
} }
</style> </style>
<template> <template>
<div class="schedulVisit"> <div class="schedulVisit">
<div class="row">
<div class="col q-mr-lg">
<q-tabs
style="margin-bottom:20px;"
v-model="tabCheck"
narrow-indicator
dense
align="left"
class="text-primary"
>
<q-tab :ripple="false" name="first" label="预约到访" />
<q-tab :ripple="false" name="second" label="访客登记" />
<q-tab :ripple="false" name="third" label="预约试听" />
</q-tabs>
</div>
<div v-if="tabCheck == 'first'" class="col-3">
<q-input
dense
debounce
v-model="searchObj.arriveVisitKey"
input-style="font-size:13px;"
filled
placeholder="请输入到访者姓名或电话"
@keydown.enter="changeVisitList"
>
<template v-slot:prepend>
<q-icon name="search" color="gery-3" />
</template>
</q-input>
</div>
</div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table
class="stickycreatInsertStr-column-table schedul_Vtable" separator="none" :data="data" :columns="columns" :pagination="msg"
row-key="name"> :loading="loadingObj.visitLoading"
no-data-label="暂无相关数据"
flat
class="stickycreatInsertStr-column-table schedul_Vtable"
separator="none"
:data="data"
:columns="columns"
row-key="name"
v-if="tabCheck == 'second'"
>
<template> <template>
<div class="fangkeTitle" ref="fkdj">访客登记</div> <div class="fangkeTitle" ref="fkdj">访客登记</div>
<span class="fangkeNumb">{{data.length}}</span> <span class="fangkeNumb">{{ data.length }}</span>
<div class="visit_Date"> <div class="visit_Date">
<i class="iconfont icon-img-rili" style=""></i>{{saveObj.PlanDate}} <i class="iconfont icon-img-rili" style=""></i
>{{ saveObj.PlanDate }}
</div> </div>
<q-space /> <q-space />
<div class="page-option" style="margin-right:20px;width:250px;"> <div class="page-option" style="margin-right:20px;width:250px;">
<el-input placeholder="姓名/电话/微信" v-model="msg.KeyWords" @input="resetSearch"> <el-input
placeholder="姓名/电话/微信"
v-model="msg.KeyWords"
@input="resetSearch"
>
<i slot="prefix" class="el-input__icon el-icon-search"></i> <i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input> </el-input>
</div> </div>
<div class="page-option addVisit"> <div class="page-option addVisit">
<el-popover placement="left" popper-class="scheduVipop" width="300" trigger="click"> <el-popover
placement="left"
popper-class="scheduVipop"
width="300"
trigger="click"
>
<div> <div>
<el-form label-width="80px" :model="addMsg" ref="addMsg1" :rules="rules" style="margin-top:10px;" <el-form
class="visit_FORM"> label-width="80px"
:model="addMsg"
ref="addMsg1"
:rules="rules"
style="margin-top:10px;"
class="visit_FORM"
>
<el-form-item label="姓名" prop="Name"> <el-form-item label="姓名" prop="Name">
<el-input v-model="addMsg.Name" placeholder="请输入姓名"></el-input> <el-input
v-model="addMsg.Name"
placeholder="请输入姓名"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="电话" prop="Tel"> <el-form-item label="电话" prop="Tel">
<el-input v-model="addMsg.Tel" placeholder="请输入电话号码"></el-input> <el-input
v-model="addMsg.Tel"
placeholder="请输入电话号码"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="微信号"> <el-form-item label="微信号">
<el-input v-model="addMsg.WeChatNum" placeholder="请输入微信号"></el-input> <el-input
v-model="addMsg.WeChatNum"
placeholder="请输入微信号"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="兴趣课程" prop="CourseName"> <el-form-item label="兴趣课程" prop="CourseName">
<el-input v-model="addMsg.CourseName" placeholder="请输入兴趣课程"></el-input> <el-input
v-model="addMsg.CourseName"
placeholder="请输入兴趣课程"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="学习时间" prop="StudyTime"> <el-form-item label="学习时间" prop="StudyTime">
<el-input v-model="addMsg.StudyTime" placeholder="请输入学习时间"></el-input> <el-input
v-model="addMsg.StudyTime"
placeholder="请输入学习时间"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="当前水平" prop="LevelType"> <el-form-item label="当前水平" prop="LevelType">
<el-select v-model="addMsg.LevelType" style="width:200px;" placeholder="请选择"> <el-select
<el-option v-for="item in GBList" :key="item.Id" :label="item.Name" :value="item.Name"> v-model="addMsg.LevelType"
style="width:200px;"
placeholder="请选择"
>
<el-option
v-for="item in GBList"
:key="item.Id"
:label="item.Name"
:value="item.Name"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="VisitorStatus"> <el-form-item label="状态" prop="VisitorStatus">
<el-select v-model="addMsg.VisitorStatus" style="width:200px;" placeholder="请选择"> <el-select
<el-option v-for="item in statusList" :key="item.Id" :label="item.Name" :value="item.Id"> v-model="addMsg.VisitorStatus"
style="width:200px;"
placeholder="请选择"
>
<el-option
v-for="item in statusList"
:key="item.Id"
:label="item.Name"
:value="item.Id"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="意向评估" prop="Evaluate"> <el-form-item label="意向评估" prop="Evaluate">
<el-input v-model="addMsg.Evaluate" placeholder="请输入意向评估"></el-input> <el-input
v-model="addMsg.Evaluate"
placeholder="请输入意向评估"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input type="textarea" v-model="addMsg.Remark" :rows="4" placeholder="请输入备注"></el-input> <el-input
type="textarea"
v-model="addMsg.Remark"
:rows="4"
placeholder="请输入备注"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<q-btn color="accent" size="sm" @click="submitForm('addMsg1')" style="float:right;margin-bottom:10px;" <q-btn
label="保存" /> color="accent"
size="sm"
@click="submitForm('addMsg1')"
style="float:right;margin-bottom:10px;"
label="保存"
/>
</div> </div>
<q-btn color="accent" slot="reference" size="sm" icon="add" @click="clearAddMsg" label="添加访客" <q-btn
v-if="DutyAuthObj.isShowAdd" /> color="accent"
slot="reference"
size="sm"
icon="add"
@click="clearAddMsg"
label="添加访客"
v-if="DutyAuthObj.isShowAdd"
/>
</el-popover> </el-popover>
</div> </div>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination
:input="true" @input="changePage" /> class="full-width justify-end"
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<el-popover placement="left" popper-class="scheduVipop" width="300" ref="popover2" trigger="click"> <el-popover
placement="left"
popper-class="scheduVipop"
width="300"
ref="popover2"
trigger="click"
>
<div> <div>
<el-form label-width="80px" :model="addMsg" ref="addMsg2" :rules="rules" style="margin-top:10px;" <el-form
class="visit_FORM"> label-width="80px"
:model="addMsg"
ref="addMsg2"
:rules="rules"
style="margin-top:10px;"
class="visit_FORM"
>
<el-form-item label="姓名" prop="Name"> <el-form-item label="姓名" prop="Name">
<el-input v-model="addMsg.Name" placeholder="请输入姓名" maxlength="50"></el-input> <el-input
v-model="addMsg.Name"
placeholder="请输入姓名"
maxlength="50"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="电话" prop="Tel"> <el-form-item label="电话" prop="Tel">
<el-input v-model="addMsg.Tel" placeholder="请输入电话号码" maxlength="50"></el-input> <el-input
v-model="addMsg.Tel"
placeholder="请输入电话号码"
maxlength="50"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="微信号"> <el-form-item label="微信号">
<el-input v-model="addMsg.WeChatNum" placeholder="请输入微信号" maxlength="50"></el-input> <el-input
v-model="addMsg.WeChatNum"
placeholder="请输入微信号"
maxlength="50"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="兴趣课程" prop="CourseName"> <el-form-item label="兴趣课程" prop="CourseName">
<el-input v-model="addMsg.CourseName" placeholder="请输入兴趣课程" maxlength="50"></el-input> <el-input
v-model="addMsg.CourseName"
placeholder="请输入兴趣课程"
maxlength="50"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="学习时间" prop="StudyTime"> <el-form-item label="学习时间" prop="StudyTime">
<el-input v-model="addMsg.StudyTime" placeholder="请输入学习时间" maxlength="100"></el-input> <el-input
v-model="addMsg.StudyTime"
placeholder="请输入学习时间"
maxlength="100"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="当前水平" prop="LevelType"> <el-form-item label="当前水平" prop="LevelType">
<el-select v-model="addMsg.LevelType" style="width:200px;" placeholder="请选择"> <el-select
<el-option v-for="item in GBList" :key="item.Name" :label="item.Name" :value="item.Name"> v-model="addMsg.LevelType"
style="width:200px;"
placeholder="请选择"
>
<el-option
v-for="item in GBList"
:key="item.Name"
:label="item.Name"
:value="item.Name"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="VisitorStatus"> <el-form-item label="状态" prop="VisitorStatus">
<el-select v-model="addMsg.VisitorStatus" style="width:200px;" placeholder="请选择"> <el-select
<el-option v-for="item in statusList" :key="item.Id" :value="item.Id" :label="item.Name"> v-model="addMsg.VisitorStatus"
style="width:200px;"
placeholder="请选择"
>
<el-option
v-for="item in statusList"
:key="item.Id"
:value="item.Id"
:label="item.Name"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="意向评估" prop="Evaluate"> <el-form-item label="意向评估" prop="Evaluate">
<el-input v-model="addMsg.Evaluate" placeholder="请输入意向评估" maxlength="500"></el-input> <el-input
v-model="addMsg.Evaluate"
placeholder="请输入意向评估"
maxlength="500"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input type="textarea" v-model="addMsg.Remark" :rows="4" placeholder="请输入备注" maxlength="500"> <el-input
type="textarea"
v-model="addMsg.Remark"
:rows="4"
placeholder="请输入备注"
maxlength="500"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<q-btn color="accent" size="sm" @click="submitForm2('addMsg2')" style="float:right;margin-bottom:10px;" <q-btn
label="保存" /> color="accent"
size="sm"
@click="submitForm2('addMsg2')"
style="float:right;margin-bottom:10px;"
label="保存"
/>
</div> </div>
<q-btn flat size="xs" icon="edit" slot="reference" @click="EditVisitor(props.row.Id)" color="accent" <q-btn
style="font-weight:400" label="编辑" v-if="DutyAuthObj.isShowEdit" /> flat
size="xs"
icon="edit"
slot="reference"
@click="EditVisitor(props.row.Id)"
color="accent"
style="font-weight:400"
label="编辑"
v-if="DutyAuthObj.isShowEdit"
/>
</el-popover> </el-popover>
<q-btn flat size="xs" @click="getDetail(props.row)" icon="iconfont icon-View" color="accent" <q-btn
style="font-weight:400" label="详情" /> flat
size="xs"
@click="getDetail(props.row)"
icon="iconfont icon-View"
color="accent"
style="font-weight:400"
label="详情"
/>
</q-td>
</template>
</q-table>
<q-table
v-if="tabCheck == 'first'"
hide-bottom
:columns="visitColumns"
:data="showTodayVist"
:loading="loadingObj.visitLoading"
no-data-label="暂无相关数据"
flat
class="sticky-right-column-table sticky-column-table"
separator="none"
>
<template v-slot:body-cell-Option="props">
<q-td :props="props">
<q-btn dense flat color="primary" v-if="props.row.IsVisit!=1">
<q-icon
name="edit"
color="primary"
style="font-size:11px"
class="q-mr-xs"
></q-icon>
<span style="font-size:12px;">到访</span>
</q-btn>
</q-td>
</template>
<template v-slot:body-cell-IsVisitStr="props">
<q-td :props="props" class="text-negative">
<span :class="{'text-primary':props.row.IsVisit==1}">{{props.row.IsVisitStr}}</span>
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
</div> </div>
<schedulFanke v-if="isShowDetail" @close="closeDetail" :save-obj="sendObj"></schedulFanke> <schedulFanke
v-if="isShowDetail"
@close="closeDetail"
:save-obj="sendObj"
></schedulFanke>
</div> </div>
</template> </template>
<script> <script>
import { import { getStudentPage } from "../../api/school";
getStudentPage import { getGuestBasicsEnumList } from "../../api/sale/sale";
} from "../../api/school"; import { getTodayVisitList } from "../../api/stuMan/index";
import { import schedulFanke from "../schedul/schedul-fanke";
getGuestBasicsEnumList
} from '../../api/sale/sale'
import schedulFanke from '../schedul/schedul-fanke'
export default { export default {
props: { props: {
saveObj: { saveObj: {
type: Object, type: Object,
default: null default: null
},
authObj: {
type: Object,
default: null
}
}, },
components: { authObj: {
schedulFanke type: Object,
}, default: null
data() { }
return { },
columns: [{ components: {
name: 'StuName', schedulFanke
label: '姓名', },
required: true, data() {
field: 'StuName', return {
align: 'left' tabCheck: "first",
}, columns: [
{ {
name: 'StuSexStr', name: "StuName",
field: 'StuSexStr', label: "姓名",
label: '性别', required: true,
align: 'left', field: "StuName",
}, align: "left"
{ },
name: 'StuTel', {
field: 'StuTel', name: "StuSexStr",
label: '电话', field: "StuSexStr",
align: 'left', label: "性别",
}, align: "left"
{ },
name: 'StuStageName', {
field: 'StuStageName', name: "StuTel",
label: '客户阶段', field: "StuTel",
align: 'left', label: "客户电话",
}, align: "left"
{ },
name: 'CreateTimeStr', {
field: 'CreateTimeStr', name: "StuStageName",
label: '创建时间', field: "StuStageName",
align: 'left', label: "客户阶段",
}, align: "left"
{ },
name: 'CreateByName', {
label: '关联人员', name: "CreateTimeStr",
field: 'CreateByName', field: "CreateTimeStr",
align: 'left' label: "创建时间",
}, align: "left"
{ },
name: 'VisitTimes', {
label: '到访次数', name: "CreateByName",
field: 'VisitTimes', label: "关联人员",
align: 'left' field: "CreateByName",
}, align: "left"
{ },
name: 'optioned', {
label: '操作', name: "VisitTimes",
} label: "到访次数",
], field: "VisitTimes",
data: [], align: "left"
loading: true, },
pageCount: 0, {
GBList: [], //日语基础列表 name: "optioned",
msg: { label: "操作"
pageIndex: 1, }
pageSize: 5, ],
rowsPerPage: 5, visitColumns: [
IsQueryMyStu: 1, {
KeyWords: "", name: "StuName",
label: "姓名",
field: "StuName",
align: "left"
},
{
name: "StuTel",
field: "StuTel",
label: "客户电话",
align: "left"
}, },
addMsg: { {
Id: 0, //编号 name: "VisitTime",
Name: "", //姓名 label: "预计到访时间",
Tel: "", //电话 field: "VisitTime",
WeChatNum: "", //微信号 align: "left"
CourseName: "", //兴趣课程
StudyTime: "", //学习时间
LevelType: "", //当前水平
PlanId: 0, //值班编号
VisitorStatus: '', //状态
Evaluate: '', //意向评估
Remark: '' //备注
}, },
statusList: [{ {
name: "SchoolName",
label: "预计校区",
field: "SchoolName",
align: "left"
},
{
name: "ReceptionPersionName",
label: "对接人",
field: "ReceptionPersionName",
align: "left"
},
{
name: "ReceptionPersionTel",
label: "对接人电话",
field: "ReceptionPersionTel",
align: "left"
},
{
name: "Remark",
label: "备注",
field: "Remark",
align: "left"
},
{
name: "IsVisitStr",
label: "到访状态",
field: "IsVisitStr",
align: "left"
},
{
name: "Option",
label: "操作",
field: "Option"
}
],
searchObj: {
arriveVisitKey: ""
},
loadingObj: {
visitLoading: true
},
data: [],
loading: true,
pageCount: 0,
GBList: [], //日语基础列表
msg: {
pageIndex: 1,
pageSize: 5,
rowsPerPage: 5,
IsQueryMyStu: 1,
KeyWords: ""
},
addMsg: {
Id: 0, //编号
Name: "", //姓名
Tel: "", //电话
WeChatNum: "", //微信号
CourseName: "", //兴趣课程
StudyTime: "", //学习时间
LevelType: "", //当前水平
PlanId: 0, //值班编号
VisitorStatus: "", //状态
Evaluate: "", //意向评估
Remark: "" //备注
},
statusList: [
{
Id: 1, Id: 1,
Name: '正常' Name: "正常"
}, { },
{
Id: 2, Id: 2,
Name: '贵宾' Name: "贵宾"
}, {
Id: 3,
Name: '黑名单'
}],
SearchKey: '', //搜索条件
isShowVform: false,
isShowVedit: false,
//权限显示对象
DutyAuthObj: {
isShowAdd: true, //是否显示新增按钮【默认显示】
isShowEdit: true, //是否显示编辑按钮【默认显示】
}, },
{
Id: 3,
Name: "黑名单"
}
],
SearchKey: "", //搜索条件
isShowVform: false,
isShowVedit: false,
//权限显示对象
DutyAuthObj: {
isShowAdd: true, //是否显示新增按钮【默认显示】
isShowEdit: true //是否显示编辑按钮【默认显示】
},
rules: {
rules: { //表单必填验证 //表单必填验证
Name: [{ Name: [
{
required: true, required: true,
message: '请输入姓名', message: "请输入姓名",
trigger: 'blur' trigger: "blur"
}], }
Tel: [{ ],
Tel: [
{
required: true, required: true,
message: '请输入电话', message: "请输入电话",
trigger: 'blur' trigger: "blur"
}], }
CourseName: [{ ],
CourseName: [
{
required: true, required: true,
message: '请输入兴趣课程', message: "请输入兴趣课程",
trigger: 'blur' trigger: "blur"
}], }
StudyTime: [{ ],
StudyTime: [
{
required: true, required: true,
message: '请输入学习时间', message: "请输入学习时间",
trigger: 'blur' trigger: "blur"
}], }
LevelType: [{ ],
LevelType: [
{
required: true, required: true,
message: '请选择当前水平', message: "请选择当前水平",
trigger: 'change' trigger: "change"
}], }
VisitorStatus: [{ ],
VisitorStatus: [
{
required: true, required: true,
message: '请选择状态', message: "请选择状态",
trigger: 'change' trigger: "change"
}], }
Evaluate: [{ ],
Evaluate: [
{
required: true, required: true,
message: '请输入意向评估', message: "请输入意向评估",
trigger: 'blur' trigger: "blur"
}] }
}, ]
sendObj: {}, },
isShowDetail: false sendObj: {},
isShowDetail: false,
todayVistList: [],
showTodayVist: []
};
},
watch: {
//有默认值
authObj: {
handler(newValue) {
this.initAuth();
},
immediate: true
}
},
created() {},
mounted() {
this.msg.PlanId = this.saveObj.Id;
this.getGuestBasics();
this.initAuth();
this.getVisitoryPage();
this.initTodayVistList();
},
methods: {
submitForm(addMsg1) {
//提交创建、修改表单
this.$refs[addMsg1].validate(valid => {
if (valid) {
this.SaveVisitor();
} else {
return false;
}
});
},
submitForm2(addMsg2) {
this.$refs[addMsg2].validate(valid => {
if (valid) {
this.SaveVisitor();
} else {
return false;
}
});
},
//初始化权限信息
initAuth() {
if (this.authObj) {
if (this.authObj.isShowAdd != null && !this.authObj.isShowAdd) {
this.DutyAuthObj.isShowAdd = this.authObj.isShowAdd;
}
if (this.authObj.isShowEdit != null && !this.authObj.isShowEdit) {
this.DutyAuthObj.isShowEdit = this.authObj.isShowEdit;
}
}
if (!this.DutyAuthObj.isShowEdit) {
this.visibleColumns.splice(this.visibleColumns.length - 1, 1);
} }
}, },
watch: { //日语基础枚举
//有默认值 getGuestBasics() {
authObj: { getGuestBasicsEnumList({}).then(res => {
handler(newValue) { if (res.Code == 1) {
this.initAuth(); this.GBList = res.Data;
}, }
immediate: true });
},
}, },
created() { //重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getVisitoryPage();
}, },
mounted() { //翻页
this.msg.PlanId = this.saveObj.Id; changePage(val) {
this.getGuestBasics(); this.msg.pageIndex = val;
this.initAuth()
this.getVisitoryPage(); this.getVisitoryPage();
}, },
methods: { //获取访客列表
submitForm(addMsg1) { //提交创建、修改表单 getVisitoryPage() {
this.$refs[addMsg1].validate((valid) => { this.loading = true;
if (valid) { getStudentPage(this.msg)
this.SaveVisitor(); .then(res => {
} else { console.log("res", res);
return false; this.loading = false;
} this.data = res.Data.PageData;
}); this.pageCount = res.Data.PageCount;
}, })
submitForm2(addMsg2) { .catch(() => {
this.$refs[addMsg2].validate((valid) => { this.loading = false;
if (valid) {
this.SaveVisitor();
} else {
return false;
}
}); });
},
}, //新增修改访客
//初始化权限信息 EditVisitor(Id) {
initAuth() { if (Id > 0) {
if (this.authObj) { queryVisitor({
if (this.authObj.isShowAdd != null && !this.authObj.isShowAdd) { Id: Id
this.DutyAuthObj.isShowAdd = this.authObj.isShowAdd; }).then(res => {
}
if (this.authObj.isShowEdit != null && !this.authObj.isShowEdit) {
this.DutyAuthObj.isShowEdit = this.authObj.isShowEdit;
}
}
if (!this.DutyAuthObj.isShowEdit) {
this.visibleColumns.splice(this.visibleColumns.length - 1, 1);
}
},
//日语基础枚举
getGuestBasics() {
getGuestBasicsEnumList({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.GBList = res.Data; var tempData = res.Data;
if (tempData) {
this.addMsg.Id = tempData.Id;
this.addMsg.Name = tempData.Name;
this.addMsg.Tel = tempData.Tel;
this.addMsg.WeChatNum = tempData.WeChatNum;
this.addMsg.CourseName = tempData.CourseName;
this.addMsg.StudyTime = tempData.StudyTime;
this.addMsg.LevelType = tempData.LevelType;
this.addMsg.PlanId = tempData.PlanId;
this.addMsg.VisitorStatus = tempData.VisitorStatus;
this.addMsg.Evaluate = tempData.Evaluate;
this.addMsg.Remark = tempData.Remark;
}
} }
}); });
}, } else {
//重新查询 this.clearAddMsg();
resetSearch() { }
this.msg.pageIndex = 1; },
clearAddMsg() {
this.addMsg.Id = 0;
this.addMsg.Name = "";
this.addMsg.Tel = "";
this.addMsg.WeChatNum = "";
this.addMsg.CourseName = "";
this.addMsg.StudyTime = "";
this.addMsg.LevelType = "";
this.msg.PlanId = this.saveObj.Id;
this.addMsg.VisitorStatus = "";
this.addMsg.Evaluate = "";
this.addMsg.Remark = "";
this.$refs.addMsg1.resetFields();
},
//保存
SaveVisitor() {
this.addMsg.PlanId = this.saveObj.Id;
setVisitor(this.addMsg).then(res => {
this.$refs.fkdj.click();
this.isShowVform = false;
this.getVisitoryPage(); this.getVisitoryPage();
}, this.clearAddMsg();
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getVisitoryPage()
},
//获取访客列表
getVisitoryPage() {
this.loading = true;
getStudentPage(this.msg).then(res => {
console.log("res", res)
this.loading = false
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}).catch(() => {
this.loading = false
})
},
//新增修改访客
EditVisitor(Id) {
if (Id > 0) {
queryVisitor({
Id: Id
}).then(res => {
if (res.Code == 1) {
var tempData = res.Data;
if (tempData) {
this.addMsg.Id = tempData.Id;
this.addMsg.Name = tempData.Name;
this.addMsg.Tel = tempData.Tel;
this.addMsg.WeChatNum = tempData.WeChatNum;
this.addMsg.CourseName = tempData.CourseName;
this.addMsg.StudyTime = tempData.StudyTime;
this.addMsg.LevelType = tempData.LevelType;
this.addMsg.PlanId = tempData.PlanId;
this.addMsg.VisitorStatus = tempData.VisitorStatus;
this.addMsg.Evaluate = tempData.Evaluate;
this.addMsg.Remark = tempData.Remark;
}
}
})
} else {
this.clearAddMsg();
}
},
clearAddMsg() {
this.addMsg.Id = 0;
this.addMsg.Name = "";
this.addMsg.Tel = "";
this.addMsg.WeChatNum = "";
this.addMsg.CourseName = "";
this.addMsg.StudyTime = "";
this.addMsg.LevelType = "";
this.msg.PlanId = this.saveObj.Id;
this.addMsg.VisitorStatus = '';
this.addMsg.Evaluate = "";
this.addMsg.Remark = "";
this.$refs.addMsg1.resetFields(); this.$refs.addMsg1.resetFields();
}, this.$refs.addMsg2.resetFields();
//保存 });
SaveVisitor() { },
this.addMsg.PlanId = this.saveObj.Id; //过滤备注显示
setVisitor(this.addMsg).then(res => { getRemarks(remark) {
this.$refs.fkdj.click(); if (remark.length > 10) {
this.isShowVform = false; return remark.substring(0, 10) + "...";
this.getVisitoryPage(); } else {
this.clearAddMsg(); return remark;
this.$refs.addMsg1.resetFields(); }
this.$refs.addMsg2.resetFields(); },
}) //获取详情
}, getDetail(obj) {
//过滤备注显示 this.sendObj = obj;
getRemarks(remark) { this.isShowDetail = true;
if (remark.length > 10) { },
return remark.substring(0, 10) + '...'; //关闭
} else { closeDetail() {
return remark; this.isShowDetail = false;
} },
}, changeVisitList() {
//获取详情 this.loadingObj.visitLoading = true;
getDetail(obj) { this.showTodayVist = [];
this.sendObj = obj; this.$nextTick(() => {
this.isShowDetail = true; this.showTodayVist = this.todayVistList.filter(x => {
}, return (
//关闭 x.StuName.indexOf(this.searchObj.arriveVisitKey) != -1 ||
closeDetail() { x.StuTel.indexOf(this.searchObj.arriveVisitKey) != -1
this.isShowDetail = false; );
});
this.loadingObj.visitLoading = false;
});
},
initTodayVistList() {
this.loadingObj.visitLoading = true;
if (this.$route.query.Id) {
let msg = { Id: this.$route.query.Id };
getTodayVisitList(msg).then(r => {
console.log(r);
this.todayVistList = r.Data;
this.showTodayVist = this.todayVistList;
this.loadingObj.visitLoading = false;
});
} else {
this.loadingObj.visitLoading = false;
} }
} }
} }
};
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
\ No newline at end of file
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
</style> </style>
<template> <template>
<div class="schedulVisit"> <div class="schedulVisit">
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="stickycreatInsertStr-column-table schedul_Vtable" separator="none" :data="data" :columns="columns" class="stickycreatInsertStr-column-table schedul_Vtable" separator="none" :data="data" :columns="columns"
...@@ -143,6 +144,7 @@ ...@@ -143,6 +144,7 @@
}, },
data() { data() {
return { return {
tabCheck:"first",
columns: [{ columns: [{
name: 'GuestName', name: 'GuestName',
label: '姓名', label: '姓名',
......
...@@ -122,15 +122,18 @@ ...@@ -122,15 +122,18 @@
} }
.Sctop_Color { .Sctop_Color {
font-size: 18px; font-size: 15px;
color: #000000; color: #000000;
width: 19%; width: 19%;
text-align: center; text-align: center;
font-weight: 600;
font-family: pingfang;
} }
.Scotop_little { .Scotop_little {
color: #AAAAAA; color: #AAAAAA;
font-size: 14px; font-size: 12px;
font-weight: 400;
margin-right: 15px; margin-right: 15px;
display: inline-block; display: inline-block;
text-align: right; text-align: right;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment