Commit 65e7a30b authored by zhengke's avatar zhengke

修改

parent d32db0d5
<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 {
color: #000000;
font-size: 18px;
font-weight: bold;
}
.schedulVisit .fangkeTitle { .schedulVisit .fangkeNumb {
color: #000000; display: inline-block;
font-size: 18px; background-color: #bccefd;
font-weight: bold; color: #2966fe;
} font-size: 15px;
border-radius: 6px;
text-align: center;
line-height: 22px;
margin-left: 15px;
padding: 0px 6px;
}
.schedulVisit .fangkeNumb { .schedulVisit .visit_Date {
display: inline-block; margin-left: 60px;
background-color: #bccefd; color: #000000;
color: #2966fe; font-size: 16px;
font-size: 15px; }
border-radius: 6px;
text-align: center;
line-height: 22px;
margin-left: 15px;
padding: 0px 6px;
}
.schedulVisit .visit_Date { .schedulVisit .visit_Date i {
margin-left: 60px; color: #b4b4b4;
color: #000000; margin-right: 10px;
font-size: 16px; }
}
.schedulVisit .visit_Date i { .page-option .el-input__inner {
color: #b4b4b4; background-color: #f1f3f5;
margin-right: 10px; border: 0;
} height: 34px;
line-height: 34px;
border-radius: 10px;
}
.page-option .el-input__inner { .page-option .el-input__icon {
background-color: #f1f3f5; line-height: 34px;
border: 0; }
height: 34px;
line-height: 34px;
border-radius: 10px;
}
.page-option .el-input__icon { .schedul_Vtable tr th {
line-height: 34px; color: #8e8e8e;
} }
.schedul_Vtable tr th { .schedul_Vtable tr td {
color: #8e8e8e; color: #2d2d2d;
} }
.schedul_Vtable tr td { .visit_FORM .el-input__inner {
color: #2d2d2d; background: #f0f2f5;
} border-radius: 10px;
height: 34px;
line-height: 34px;
border: 0;
}
.visit_FORM .el-input__inner { .visit_FORM .el-input__icon {
background: #f0f2f5; line-height: 34px;
border-radius: 10px; }
height: 34px;
line-height: 34px;
border: 0;
}
.visit_FORM .el-input__icon { .schedulVisit .q-table {
line-height: 34px; padding-bottom: 5px;
} }
.schedulVisit .q-table { .schedulVisit .q-table tbody td:before {
padding-bottom: 5px; background: "" !important;
} }
.schedulVisit .q-table tbody td:before { .schedulVisit .q-table tbody tr:hover {
background: "" !important; box-shadow: 0px 2px 20px 0px #e4e7fb;
} background: #fff;
border-radius: 16px;
}
.schedulVisit .q-table tbody tr:hover { .schedulVisit .q-table tbody td:before {
box-shadow: 0px 2px 20px 0px #e4e7fb; background: transparent !important;
background: #fff; }
border-radius: 16px;
}
.schedulVisit .q-table tbody td:before { .scheduVipop .el-textarea__inner {
background: transparent !important; background: #f0f2f5 !important;
} border: 0;
}
.scheduVipop .el-textarea__inner {
background: #f0f2f5 !important;
border: 0;
}
</style> </style>
<template> <template>
<div class="schedulVisit"> <div class="schedulVisit">
<div class="row"> <div class="row">
<div class="col q-mr-lg"> <div class="col q-mr-lg">
<q-tabs <q-tabs style="margin-bottom:20px;" v-model="tabCheck" narrow-indicator dense align="left" class="text-primary">
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="first" label="预约到访" />
<q-tab :ripple="false" name="second" label="访客登记" /> <q-tab :ripple="false" name="second" label="访客登记" />
<q-tab :ripple="false" name="third" label="预约试听" /> <q-tab :ripple="false" name="third" label="预约试听" />
</q-tabs> </q-tabs>
</div> </div>
<div v-if="tabCheck == 'first'" class="col-3"> <div v-if="tabCheck == 'first'" class="col-3">
<q-input <q-input dense debounce v-model="searchObj.arriveVisitKey" input-style="font-size:13px;" filled
dense placeholder="请输入到访者姓名或电话" @keydown.enter="changeVisitList">
debounce
v-model="searchObj.arriveVisitKey"
input-style="font-size:13px;"
filled
placeholder="请输入到访者姓名或电话"
@keydown.enter="changeVisitList"
>
<template v-slot:prepend> <template v-slot:prepend>
<q-icon name="search" color="gery-3" /> <q-icon name="search" color="gery-3" />
</template> </template>
</q-input> </q-input>
</div> </div>
<div v-if="tabCheck == 'second'"> <div v-if="tabCheck == 'second'">
<q-btn <q-btn outline dense icon="add" class="q-px-sm" color="primary" @click="showAddForm = true" label="新增客户">
outline </q-btn>
dense
icon="add"
class="q-px-sm"
color="primary"
@click="showAddForm = true"
label="新增客户"
></q-btn>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table <q-table :pagination="msg" :loading="loadingObj.visitLoading" no-data-label="暂无相关数据" flat
:pagination="msg" class="stickycreatInsertStr-column-table schedul_Vtable" separator="none" :data="data" :columns="columns"
:loading="loadingObj.visitLoading" row-key="name" v-if="tabCheck == 'second'">
no-data-label="暂无相关数据" <template v-slot:body-cell-StuName="props">
flat <q-td :props="props">
class="stickycreatInsertStr-column-table schedul_Vtable" <div class="text-blue cursor-pointer" @click="getStuRight(props.row)">
separator="none" {{ props.value }}
:data="data" </div>
:columns="columns" </q-td>
row-key="name" </template>
v-if="tabCheck == 'second'" <template v-slot:body-cell-AssistList="props">
> <q-td :props="props">
<template v-for="(item,index) in props.row.AssistList">
{{item.AssistName}}<span :key="index" v-if="index!=props.row.AssistList.length-1">,</span>
</template>
</q-td>
</template>
<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 <i class="iconfont icon-img-rili" style=""></i>{{ saveObj.PlanDate }}
>{{ 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 <el-input placeholder="姓名/电话/微信" v-model="msg.KeyWords" @input="resetSearch">
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 <el-popover placement="left" popper-class="scheduVipop" width="300" trigger="click">
placement="left"
popper-class="scheduVipop"
width="300"
trigger="click"
>
<div> <div>
<el-form <el-form label-width="80px" :model="addMsg" ref="addMsg1" :rules="rules" style="margin-top:10px;"
label-width="80px" class="visit_FORM">
: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 <el-input v-model="addMsg.Name" placeholder="请输入姓名"></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 <el-input v-model="addMsg.Tel" placeholder="请输入电话号码"></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 <el-input v-model="addMsg.WeChatNum" placeholder="请输入微信号"></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 <el-input v-model="addMsg.CourseName" placeholder="请输入兴趣课程"></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 <el-input v-model="addMsg.StudyTime" placeholder="请输入学习时间"></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 <el-select v-model="addMsg.LevelType" style="width:200px;" placeholder="请选择">
v-model="addMsg.LevelType" <el-option v-for="item in GBList" :key="item.Id" :label="item.Name" :value="item.Name">
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 <el-select v-model="addMsg.VisitorStatus" style="width:200px;" placeholder="请选择">
v-model="addMsg.VisitorStatus" <el-option v-for="item in statusList" :key="item.Id" :label="item.Name" :value="item.Id">
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 <el-input v-model="addMsg.Evaluate" placeholder="请输入意向评估"></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 <el-input type="textarea" v-model="addMsg.Remark" :rows="4" placeholder="请输入备注"></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 <q-btn color="accent" size="sm" @click="submitForm('addMsg1')" style="float:right;margin-bottom:10px;"
color="accent" label="保存" />
size="sm"
@click="submitForm('addMsg1')"
style="float:right;margin-bottom:10px;"
label="保存"
/>
</div> </div>
<q-btn <q-btn color="accent" slot="reference" size="sm" icon="add" @click="clearAddMsg" label="添加访客"
color="accent" v-if="DutyAuthObj.isShowAdd" />
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 <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
class="full-width justify-end" :input="true" @input="changePage" />
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<el-popover
placement="left"
popper-class="scheduVipop"
width="300"
ref="popover2"
trigger="click"
>
<div>
<el-form
label-width="80px"
:model="addMsg"
ref="addMsg2"
:rules="rules"
style="margin-top:10px;"
class="visit_FORM"
>
<el-form-item label="姓名" prop="Name">
<el-input
v-model="addMsg.Name"
placeholder="请输入姓名"
maxlength="50"
></el-input>
</el-form-item>
<el-form-item label="电话" prop="Tel">
<el-input
v-model="addMsg.Tel"
placeholder="请输入电话号码"
maxlength="50"
></el-input>
</el-form-item>
<el-form-item label="微信号">
<el-input
v-model="addMsg.WeChatNum"
placeholder="请输入微信号"
maxlength="50"
></el-input>
</el-form-item>
<el-form-item label="兴趣课程" prop="CourseName">
<el-input
v-model="addMsg.CourseName"
placeholder="请输入兴趣课程"
maxlength="50"
></el-input>
</el-form-item>
<el-form-item label="学习时间" prop="StudyTime">
<el-input
v-model="addMsg.StudyTime"
placeholder="请输入学习时间"
maxlength="100"
></el-input>
</el-form-item>
<el-form-item label="当前水平" prop="LevelType">
<el-select
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-select>
</el-form-item>
<el-form-item label="状态" prop="VisitorStatus">
<el-select
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-select>
</el-form-item>
<el-form-item label="意向评估" prop="Evaluate">
<el-input
v-model="addMsg.Evaluate"
placeholder="请输入意向评估"
maxlength="500"
></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input
type="textarea"
v-model="addMsg.Remark"
:rows="4"
placeholder="请输入备注"
maxlength="500"
>
</el-input>
</el-form-item>
</el-form>
<q-btn
color="accent"
size="sm"
@click="submitForm2('addMsg2')"
style="float:right;margin-bottom:10px;"
label="保存"
/>
</div>
<q-btn
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>
<q-btn
flat
size="xs"
@click="getDetail(props.row)"
icon="iconfont icon-View"
color="accent"
style="font-weight:400"
label="详情"
/>
</q-td>
</template> </template>
</q-table> </q-table>
<q-table <q-table v-if="tabCheck == 'first'" hide-bottom :columns="visitColumns" :data="showTodayVist"
v-if="tabCheck == 'first'" :loading="loadingObj.visitLoading" no-data-label="暂无相关数据" flat
hide-bottom class="sticky-right-column-table sticky-column-table" separator="none">
: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"> <template v-slot:body-cell-Option="props">
<q-td :props="props"> <q-td :props="props">
<q-btn <q-btn dense flat color="primary" v-if="props.row.IsVisit != 1"
dense @click="setCustomerVisitHandler(props.row.Id)">
flat <q-icon name="edit" color="primary" style="font-size:11px" class="q-mr-xs"></q-icon>
color="primary"
v-if="props.row.IsVisit != 1"
@click="setCustomerVisitHandler(props.row.Id)"
>
<q-icon
name="edit"
color="primary"
style="font-size:11px"
class="q-mr-xs"
></q-icon>
<span style="font-size:12px;">到访</span> <span style="font-size:12px;">到访</span>
</q-btn> </q-btn>
</q-td> </q-td>
...@@ -458,29 +218,17 @@ ...@@ -458,29 +218,17 @@
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<q-table <q-table v-if="tabCheck == 'third'" hide-bottom :columns="dutyColumns" :data="shwoTrialList"
v-if="tabCheck == 'third'" :loading="loadingObj.trialLoading" no-data-label="暂无相关数据" flat class="sticky-column-table">
hide-bottom
:columns="dutyColumns"
:data="shwoTrialList"
:loading="loadingObj.trialLoading"
no-data-label="暂无相关数据"
flat
class="sticky-column-table"
>
<template v-slot:body-cell-StuName="props"> <template v-slot:body-cell-StuName="props">
<q-td :props="props" style="border-left:1px solid #E5e5e5;padding:0"> <q-td :props="props" style="border-left:1px solid #E5e5e5;padding:0">
<template v-for="(x, i) in props.row.GuestList"> <template v-for="(x, i) in props.row.GuestList">
<div <div :key="i" class="q-pa-md" :style="{
:key="i"
class="q-pa-md"
:style="{
'border-bottom': 'border-bottom':
i == props.row.GuestList.length - 1 i == props.row.GuestList.length - 1
? 'none' ? 'none'
: '1px solid #e5e5e5' : '1px solid #e5e5e5'
}" }">
>
{{ x.GuestName }} {{ x.GuestName }}
</div> </div>
</template> </template>
...@@ -489,16 +237,12 @@ ...@@ -489,16 +237,12 @@
<template v-slot:body-cell-StuPhone="props"> <template v-slot:body-cell-StuPhone="props">
<q-td :props="props" style="border-right:1px solid #E5e5e5;padding:0"> <q-td :props="props" style="border-right:1px solid #E5e5e5;padding:0">
<template v-for="(x, i) in props.row.GuestList"> <template v-for="(x, i) in props.row.GuestList">
<div <div :key="i + 'tel'" class="q-pa-md" :style="{
:key="i + 'tel'"
class="q-pa-md"
:style="{
'border-bottom': 'border-bottom':
i == props.row.GuestList.length - 1 i == props.row.GuestList.length - 1
? 'none' ? 'none'
: '1px solid #e5e5e5' : '1px solid #e5e5e5'
}" }">
>
{{ x.StuTel }} {{ x.StuTel }}
</div> </div>
</template> </template>
...@@ -506,31 +250,15 @@ ...@@ -506,31 +250,15 @@
</template> </template>
</q-table> </q-table>
</div> </div>
<schedulFanke <schedulFanke v-if="isShowDetail" @close="closeDetail" :save-obj="sendObj"></schedulFanke>
v-if="isShowDetail" <q-dialog v-model="showAddForm" persistent content-class="bg-grey-1 big-dialog">
@close="closeDetail" <student-add-form @success="addFinishHandler" @close="showAddForm = false"></student-add-form>
:save-obj="sendObj"
></schedulFanke>
<q-dialog
v-model="showAddForm"
persistent
content-class="bg-grey-1 big-dialog"
>
<student-add-form
@success="addFinishHandler"
@close="showAddForm = false"
></student-add-form>
</q-dialog> </q-dialog>
<q-dialog persistent v-model="isShowModelInfo" v-if="visitModel"> <q-dialog persistent v-model="isShowModelInfo" v-if="visitModel">
<q-card flat class="q-pa-md" style="width:300px"> <q-card flat class="q-pa-md" style="width:300px">
<div class="text-h6">客户已存在</div> <div class="text-h6">客户已存在</div>
<div class="text-center q-my-md"> <div class="text-center q-my-md">
<q-avatar <q-avatar size="40px" rounded style="background:#C7C7C7" text-color="white">
size="40px"
rounded
style="background:#C7C7C7"
text-color="white"
>
<span>{{ visitModel.StuName.substring(0, 1) }}</span> <span>{{ visitModel.StuName.substring(0, 1) }}</span>
</q-avatar> </q-avatar>
</div> </div>
...@@ -546,568 +274,622 @@ ...@@ -546,568 +274,622 @@
</div> </div>
<q-separator class="q-mb-md" /> <q-separator class="q-mb-md" />
<div class="text-center q-py-xs"> <div class="text-center q-py-xs">
<q-btn <q-btn outline color="primary" class="q-px-md" label="打卡到访" @click="createVisitHandler(visitModel)"></q-btn>
outline
color="primary"
class="q-px-md"
label="打卡到访"
@click="createVisitHandler(visitModel)"
></q-btn>
</div> </div>
</q-card> </q-card>
</q-dialog> </q-dialog>
<studentRight-form v-if="isShowStuRight" :save-obj="stuOption" @close="closeStuForm" @success="refreshStuList">
</studentRight-form>
</div> </div>
</template> </template>
<script> <script>
import { getTodayVisitList } from "../../api/stuMan/index"; import studentRightForm from "../school/student/studentRight-form";
import { getStudentPage, saveStudent, getStudentInfo } from "../../api/school"; import {
import { getTodayVisitList
saveStudentVisitFeedback, } from "../../api/stuMan/index";
saveStudentVisit import {
} from "../../api/customerstudent/customerstudent"; getStudentPage,
import { getGuestBasicsEnumList } from "../../api/sale/sale"; saveStudent,
import schedulFanke from "../schedul/schedul-fanke"; getStudentInfo
import { queryDutyTrialLesson } from "../../api/duty/index"; } from "../../api/school";
import studentAddForm from "../../components/school/student/studentAddForm"; import {
import { mapGetters } from "vuex"; saveStudentVisitFeedback,
export default { saveStudentVisit
props: { } from "../../api/customerstudent/customerstudent";
saveObj: { import {
type: Object, getGuestBasicsEnumList
default: null } from "../../api/sale/sale";
import schedulFanke from "../schedul/schedul-fanke";
import {
queryDutyTrialLesson
} from "../../api/duty/index";
import studentAddForm from "../../components/school/student/studentAddForm";
import {
mapGetters
} from "vuex";
export default {
props: {
saveObj: {
type: Object,
default: null
},
authObj: {
type: Object,
default: null
}
}, },
authObj: { components: {
type: Object, schedulFanke,
default: null studentAddForm,
} studentRightForm
}, },
components: { computed: {
schedulFanke, ...mapGetters(["userInfo"])
studentAddForm },
}, data() {
computed: { return {
...mapGetters(["userInfo"]) isShowStuRight: false,
}, isShowModelInfo: true,
data() { visitModel: null,
return { tabCheck: "first",
isShowModelInfo: true, columns: [{
visitModel: null, name: "StuName",
tabCheck: "first", label: "昵称",
columns: [ required: true,
{ field: "StuName",
name: "StuName", align: "left"
label: "姓名", },
required: true, {
field: "StuName", name: "StuSexStr",
align: "left" field: "StuSexStr",
}, label: "性别",
{ align: "left"
name: "StuSexStr", },
field: "StuSexStr", {
label: "性别", name: "StuTel",
align: "left" field: "StuTel",
}, label: "客户电话",
{ align: "left"
name: "StuTel", },
field: "StuTel", {
label: "客户电话", name: "StuStageName",
align: "left" field: "StuStageName",
}, label: "客户阶段",
{ align: "left"
name: "StuStageName", },
field: "StuStageName", {
label: "客户阶段", name: "StuProfession",
align: "left" label: "职业",
}, field: "StuProfession",
{ align: "left"
name: "CreateTimeStr", },
field: "CreateTimeStr", {
label: "创建时间", name: "StuEducationName",
align: "left" label: "学历",
}, field: "StuEducationName",
{ align: "left"
name: "CreateByName", },
label: "关联人员", {
field: "CreateByName", name: "StuPurposeName",
align: "left" label: "目的",
}, field: "StuPurposeName",
{ align: "left"
name: "VisitTimes", },
label: "到访次数", {
field: "VisitTimes", name: "CreateByName",
align: "left" label: "负责人",
}, align: "left",
{ field: "CreateByName"
name: "optioned", },
label: "操作" {
} name: "AssistList",
], label: "协同人",
showAddForm: false, align: "left",
visitColumns: [ field: "AssistList"
{ },
name: "StuName", {
label: "姓名", name: "CreateTypeStr",
field: "StuName", label: "获取渠道",
align: "left" field: "CreateTypeStr",
}, align: "left"
{ },
name: "StuTel", {
field: "StuTel", name: "StuSourceIdName",
label: "客户电话", label: "关联人员",
align: "left" field: "StuSourceIdName",
}, align: "left"
{ },
name: "VisitTime", {
label: "预计到访时间", name: "VisitCount",
field: "VisitTime", label: "到访次数",
align: "left" field: "VisitCount",
}, align: "left"
{ },
name: "SchoolName", {
label: "预计校区", name: "TrialLessonCount",
field: "SchoolName", label: "试听次数",
align: "left" field: "TrialLessonCount",
}, align: "left"
{ },
name: "ReceptionPersionName", {
label: "对接人", name: "CreateTimeStr",
field: "ReceptionPersionName", field: "CreateTimeStr",
align: "left" label: "创建时间",
}, align: "left"
{ }
name: "ReceptionPersionTel", ],
label: "对接人电话", showAddForm: false,
field: "ReceptionPersionTel", visitColumns: [{
align: "left" name: "StuName",
}, label: "姓名",
{ field: "StuName",
name: "Remark", align: "left"
label: "备注", },
field: "Remark", {
align: "left" name: "StuTel",
}, field: "StuTel",
{ label: "客户电话",
name: "IsVisitStr", align: "left"
label: "到访状态", },
field: "IsVisitStr", {
align: "left" name: "VisitTime",
}, label: "预计到访时间",
{ field: "VisitTime",
name: "Option", align: "left"
label: "操作", },
field: "Option" {
} name: "SchoolName",
], label: "预计校区",
dutyColumns: [ field: "SchoolName",
{ align: "left"
name: "TeacherName", },
label: "试讲老师", {
field: "TeacherName", name: "ReceptionPersionName",
align: "left" label: "对接人",
}, field: "ReceptionPersionName",
{ align: "left"
name: "StartTime", },
label: "开始时间", {
field: "StartTime", name: "ReceptionPersionTel",
align: "left" label: "对接人电话",
}, field: "ReceptionPersionTel",
{ align: "left"
name: "CourseName", },
label: "试讲内容", {
field: "CourseName", name: "Remark",
align: "left" label: "备注",
}, field: "Remark",
{ align: "left"
name: "RoomName", },
label: "教室", {
field: "RoomName", name: "IsVisitStr",
align: "left" label: "到访状态",
field: "IsVisitStr",
align: "left"
},
{
name: "Option",
label: "操作",
field: "Option"
}
],
dutyColumns: [{
name: "TeacherName",
label: "试讲老师",
field: "TeacherName",
align: "left"
},
{
name: "StartTime",
label: "开始时间",
field: "StartTime",
align: "left"
},
{
name: "CourseName",
label: "试讲内容",
field: "CourseName",
align: "left"
},
{
name: "RoomName",
label: "教室",
field: "RoomName",
align: "left"
},
{
name: "StuName",
label: "客户姓名",
align: "left"
},
{
name: "StuPhone",
label: "客户电话",
align: "left"
}
],
searchObj: {
arriveVisitKey: "",
dutyKey: ""
}, },
{ loadingObj: {
name: "StuName", visitLoading: true,
label: "客户姓名", trialLoading: true
align: "left"
}, },
{ data: [],
name: "StuPhone", loading: true,
label: "客户电话", pageCount: 0,
align: "left" GBList: [], //日语基础列表
} msg: {
], pageIndex: 1,
searchObj: { pageSize: 5,
arriveVisitKey: "", rowsPerPage: 5,
dutyKey: "" IsQueryMyStu: 1,
}, KeyWords: ""
loadingObj: {
visitLoading: true,
trialLoading: 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,
Name: "正常"
}, },
{ addMsg: {
Id: 2, Id: 0, //编号
Name: "贵宾" Name: "", //姓名
Tel: "", //电话
WeChatNum: "", //微信号
CourseName: "", //兴趣课程
StudyTime: "", //学习时间
LevelType: "", //当前水平
PlanId: 0, //值班编号
VisitorStatus: "", //状态
Evaluate: "", //意向评估
Remark: "" //备注
}, },
{ statusList: [{
Id: 3, Id: 1,
Name: "黑名单" Name: "正常"
} },
], {
SearchKey: "", //搜索条件 Id: 2,
isShowVform: false, Name: "贵宾"
isShowVedit: false, },
//权限显示对象
DutyAuthObj: {
isShowAdd: true, //是否显示新增按钮【默认显示】
isShowEdit: true //是否显示编辑按钮【默认显示】
},
rules: {
//表单必填验证
Name: [
{ {
Id: 3,
Name: "黑名单"
}
],
SearchKey: "", //搜索条件
isShowVform: false,
isShowVedit: false,
//权限显示对象
DutyAuthObj: {
isShowAdd: true, //是否显示新增按钮【默认显示】
isShowEdit: true //是否显示编辑按钮【默认显示】
},
rules: {
//表单必填验证
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: {},
sendObj: {}, isShowDetail: false,
isShowDetail: false, todayVistList: [],
todayVistList: [], showTodayVist: [],
showTodayVist: [], trialList: [],
trialList: [], shwoTrialList: [],
shwoTrialList: [] stuOption:null
}; };
},
watch: {
//有默认值
authObj: {
handler(newValue) {
this.initAuth();
},
immediate: true
}, },
tabCheck: { watch: {
handler(newValue) { //有默认值
if (newValue == "first") { authObj: {
this.initTodayVistList(); handler(newValue) {
} else if (newValue == "second") { this.initAuth();
this.getVisitoryPage(); },
} else { immediate: true
this.initDutyTrialLessonList();
}
}, },
immediate: true tabCheck: {
} handler(newValue) {
}, if (newValue == "first") {
created() {},
mounted() {
this.msg.PlanId = this.saveObj.Id;
this.getGuestBasics();
this.initAuth();
this.getVisitoryPage();
this.initTodayVistList();
this.initDutyTrialLessonList();
},
methods: {
addFinishHandler(m, t) {
console.log(m, t);
if (m && m.StuId) {
if (t == 1) {
this.visitModel = m;
} else {
this.visitModel = null;
this.createVisitHandler(m);
this.getVisitoryPage();
}
}
this.showAddForm = false;
},
createVisitHandler(m) {
let d = new Date();
let msg = {
Id: 0,
Date: d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate(),
ReceptionPersion: this.userInfo.Id,
Remark:
"客户临时到访门店,由" + this.userInfo.AccountName + "记录到访信息",
School_Id: this.userInfo.School_Id,
StuId: m.StuId,
VisitTime: d.getHours() + ":" + d.getMinutes()
};
console.log("进来了呀", msg);
saveStudentVisit(msg).then(r => {
this.visitModel=null
if (r.Data) {
let msg2 = {
Id: r.Data.Id,
IsVisit: 1,
Feedback: msg.remark
};
saveStudentVisitFeedback(msg2).then(r2 => {
this.initTodayVistList(); this.initTodayVistList();
}); } else if (newValue == "second") {
} this.getVisitoryPage();
}); } else {
this.initDutyTrialLessonList();
}
},
immediate: true
}
}, },
submitForm(addMsg1) { created() {},
//提交创建、修改表单 mounted() {
this.$refs[addMsg1].validate(valid => { this.msg.PlanId = this.saveObj.Id;
if (valid) { this.getGuestBasics();
this.SaveVisitor(); this.initAuth();
} else { this.getVisitoryPage();
return false; this.initTodayVistList();
} this.initDutyTrialLessonList();
});
}, },
submitForm2(addMsg2) { methods: {
this.$refs[addMsg2].validate(valid => { //点击学生姓名弹出
if (valid) { getStuRight(obj) {
this.SaveVisitor(); if (obj) {
this.stuOption = obj;
} else { } else {
return false; this.stuOption = null;
} }
}); this.isShowStuRight = true;
}, },
//初始化权限信息
initAuth() { addFinishHandler(m, t) {
if (this.authObj) { console.log(m, t);
if (this.authObj.isShowAdd != null && !this.authObj.isShowAdd) { if (m && m.StuId) {
this.DutyAuthObj.isShowAdd = this.authObj.isShowAdd; if (t == 1) {
this.visitModel = m;
} else {
this.visitModel = null;
this.createVisitHandler(m);
this.getVisitoryPage();
}
} }
if (this.authObj.isShowEdit != null && !this.authObj.isShowEdit) { this.showAddForm = false;
this.DutyAuthObj.isShowEdit = this.authObj.isShowEdit; },
createVisitHandler(m) {
let d = new Date();
let msg = {
Id: 0,
Date: d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate(),
ReceptionPersion: this.userInfo.Id,
Remark: "客户临时到访门店,由" + this.userInfo.AccountName + "记录到访信息",
School_Id: this.userInfo.School_Id,
StuId: m.StuId,
VisitTime: d.getHours() + ":" + d.getMinutes()
};
console.log("进来了呀", msg);
saveStudentVisit(msg).then(r => {
this.visitModel = null
if (r.Data) {
let msg2 = {
Id: r.Data.Id,
IsVisit: 1,
Feedback: msg.remark
};
saveStudentVisitFeedback(msg2).then(r2 => {
this.initTodayVistList();
});
}
});
},
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) {
if (!this.DutyAuthObj.isShowEdit) { this.visibleColumns.splice(this.visibleColumns.length - 1, 1);
this.visibleColumns.splice(this.visibleColumns.length - 1, 1);
}
},
//日语基础枚举
getGuestBasics() {
getGuestBasicsEnumList({}).then(res => {
if (res.Code == 1) {
this.GBList = res.Data;
} }
}); },
}, //日语基础枚举
//重新查询 getGuestBasics() {
resetSearch() { getGuestBasicsEnumList({}).then(res => {
this.msg.pageIndex = 1; if (res.Code == 1) {
this.getVisitoryPage(); this.GBList = res.Data;
}, }
//翻页
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;
}); });
}, },
clearAddMsg() { //重新查询
this.addMsg.Id = 0; resetSearch() {
this.addMsg.Name = ""; this.msg.pageIndex = 1;
this.addMsg.Tel = ""; this.getVisitoryPage();
this.addMsg.WeChatNum = ""; },
this.addMsg.CourseName = ""; //翻页
this.addMsg.StudyTime = ""; changePage(val) {
this.addMsg.LevelType = ""; this.msg.pageIndex = val;
this.msg.PlanId = this.saveObj.Id; this.getVisitoryPage();
this.addMsg.VisitorStatus = ""; },
this.addMsg.Evaluate = ""; refreshStuList() {
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(); this.closeStuForm();
},
closeStuForm(){
this.isShowStuRight = false;
},
//获取访客列表
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;
});
},
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;
getRemarks(remark) { setVisitor(this.addMsg).then(res => {
if (remark.length > 10) { this.$refs.fkdj.click();
return remark.substring(0, 10) + "..."; this.isShowVform = false;
} else { this.getVisitoryPage();
return remark; this.clearAddMsg();
} this.$refs.addMsg1.resetFields();
}, this.$refs.addMsg2.resetFields();
//获取详情
getDetail(obj) {
this.sendObj = obj;
this.isShowDetail = true;
},
//关闭
closeDetail() {
this.isShowDetail = false;
},
changeVisitList() {
this.loadingObj.visitLoading = true;
this.showTodayVist = [];
this.$nextTick(() => {
this.showTodayVist = this.todayVistList.filter(x => {
return (
x.StuName.indexOf(this.searchObj.arriveVisitKey) != -1 ||
x.StuTel.indexOf(this.searchObj.arriveVisitKey) != -1
);
}); });
this.loadingObj.visitLoading = false; },
}); //过滤备注显示
}, getRemarks(remark) {
setCustomerVisitHandler(id) { if (remark.length > 10) {
this.$q return remark.substring(0, 10) + "...";
.dialog({ } else {
title: "确认到访", return remark;
message: "请再次确认改客户是否到达", }
cancel: true, },
persistent: true //获取详情
}) getDetail(obj) {
.onOk(() => { this.sendObj = obj;
let msg = { this.isShowDetail = true;
Id: id, },
IsVisit: 1, //关闭
Feedback: "" closeDetail() {
}; this.isShowDetail = false;
saveStudentVisitFeedback(msg).then(r => { },
this.initTodayVistList(); changeVisitList() {
this.loadingObj.visitLoading = true;
this.showTodayVist = [];
this.$nextTick(() => {
this.showTodayVist = this.todayVistList.filter(x => {
return (
x.StuName.indexOf(this.searchObj.arriveVisitKey) != -1 ||
x.StuTel.indexOf(this.searchObj.arriveVisitKey) != -1
);
}); });
});
},
initTodayVistList() {
this.loadingObj.visitLoading = true;
if (this.$route.query.Id) {
let msg = { Id: this.$route.query.Id };
getTodayVisitList(msg).then(r => {
this.todayVistList = r.Data;
this.changeVisitList();
this.loadingObj.visitLoading = false; this.loadingObj.visitLoading = false;
}); });
} else { },
this.loadingObj.visitLoading = false; setCustomerVisitHandler(id) {
} this.$q
}, .dialog({
changeDutyTrialHander() { title: "确认到访",
this.shwoTrialList = this.trialList; message: "请再次确认改客户是否到达",
return; cancel: true,
this.loadingObj.trialLoading = true; persistent: true
this.shwoTrialList = []; })
this.$nextTick(() => { .onOk(() => {
this.shwoTrialList = this.trialList.filter(x => { let msg = {
return ( Id: id,
x.StuName.indexOf(this.searchObj.dutyKey) != -1 || IsVisit: 1,
x.StuTel.indexOf(this.searchObj.dutyKey) != -1 Feedback: ""
); };
}); saveStudentVisitFeedback(msg).then(r => {
this.loadingObj.trialLoading = false; this.initTodayVistList();
});
},
initDutyTrialLessonList() {
this.loadingObj.trialLoading = true;
if (this.$route.query.Id) {
let msg = { Id: this.$route.query.Id };
queryDutyTrialLesson(msg).then(r => {
if (r.Data) {
r.Data.forEach(x => {
x.CourseName = x.CourseName.split(":")[0];
}); });
} });
this.trialList = r.Data; },
this.changeDutyTrialHander(); initTodayVistList() {
this.loadingObj.visitLoading = true;
if (this.$route.query.Id) {
let msg = {
Id: this.$route.query.Id
};
getTodayVisitList(msg).then(r => {
this.todayVistList = r.Data;
this.changeVisitList();
this.loadingObj.visitLoading = false;
});
} else {
this.loadingObj.visitLoading = false;
}
},
changeDutyTrialHander() {
this.shwoTrialList = this.trialList;
return;
this.loadingObj.trialLoading = true;
this.shwoTrialList = [];
this.$nextTick(() => {
this.shwoTrialList = this.trialList.filter(x => {
return (
x.StuName.indexOf(this.searchObj.dutyKey) != -1 ||
x.StuTel.indexOf(this.searchObj.dutyKey) != -1
);
});
this.loadingObj.trialLoading = false; this.loadingObj.trialLoading = false;
}); });
} else { },
this.loadingObj.trialLoading = false; initDutyTrialLessonList() {
this.loadingObj.trialLoading = true;
if (this.$route.query.Id) {
let msg = {
Id: this.$route.query.Id
};
queryDutyTrialLesson(msg).then(r => {
if (r.Data) {
r.Data.forEach(x => {
x.CourseName = x.CourseName.split(":")[0];
});
}
this.trialList = r.Data;
this.changeDutyTrialHander();
this.loadingObj.trialLoading = false;
});
} else {
this.loadingObj.trialLoading = false;
}
} }
} }
} };
};
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<template v-slot:body-cell-AssistList="props"> <template v-slot:body-cell-AssistList="props">
<q-td :props="props"> <q-td :props="props">
<template v-for="(item,index) in props.row.AssistList"> <template v-for="(item,index) in props.row.AssistList">
{{item.AssistName}} {{item.AssistName}}<span :key="index" v-if="index!=props.row.AssistList.length-1">,</span>
</template> </template>
</q-td> </q-td>
</template> </template>
......
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