Commit bc572a01 authored by 罗超's avatar 罗超

临时提交

parent 388d2162
...@@ -12,6 +12,14 @@ export function qyeryDutyFrequencyPage(data) { ...@@ -12,6 +12,14 @@ export function qyeryDutyFrequencyPage(data) {
}) })
} }
export function queryDutyTrialLesson(data) {
return request({
url: '/DutyPlan/GetDutyTrialLesson',
method: 'post',
data
})
}
/** /**
* 获取班次列表 * 获取班次列表
* @param {JSON参数} data * @param {JSON参数} data
......
...@@ -422,7 +422,13 @@ ...@@ -422,7 +422,13 @@
> >
<template v-slot:body-cell-Option="props"> <template v-slot:body-cell-Option="props">
<q-td :props="props"> <q-td :props="props">
<q-btn dense flat color="primary" v-if="props.row.IsVisit != 1"> <q-btn
dense
flat
color="primary"
v-if="props.row.IsVisit != 1"
@click="setCustomerVisitHandler(props.row.Id)"
>
<q-icon <q-icon
name="edit" name="edit"
color="primary" color="primary"
...@@ -441,6 +447,53 @@ ...@@ -441,6 +447,53 @@
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<q-table
v-if="tabCheck == 'third'"
hide-bottom
:columns="dutyColumns"
:data="shwoTrialList"
:loading="loadingObj.trialLoading"
no-data-label="暂无相关数据"
flat
class="sticky-column-table"
>
<template v-slot:body-cell-StuName="props">
<q-td :props="props" style="border-left:1px solid #E5e5e5;padding:0">
<template v-for="(x, i) in props.row.GuestList">
<div
:key="i"
class="q-pa-md"
:style="{
'border-bottom':
i == props.row.GuestList.length - 1
? 'none'
: '1px solid #e5e5e5'
}"
>
{{ x.GuestName }}
</div>
</template>
</q-td>
</template>
<template v-slot:body-cell-StuPhone="props">
<q-td :props="props" style="border-right:1px solid #E5e5e5;padding:0">
<template v-for="(x, i) in props.row.GuestList">
<div
:key="i + 'tel'"
class="q-pa-md"
:style="{
'border-bottom':
i == props.row.GuestList.length - 1
? 'none'
: '1px solid #e5e5e5'
}"
>
{{ x.StuTel }}
</div>
</template>
</q-td>
</template>
</q-table>
</div> </div>
<schedulFanke <schedulFanke
v-if="isShowDetail" v-if="isShowDetail"
...@@ -452,8 +505,10 @@ ...@@ -452,8 +505,10 @@
<script> <script>
import { getTodayVisitList } from "../../api/stuMan/index"; import { getTodayVisitList } from "../../api/stuMan/index";
import { getStudentPage, saveStudent, getStudentInfo } from "../../api/school"; import { getStudentPage, saveStudent, getStudentInfo } from "../../api/school";
import { saveStudentVisitFeedback } from "../../api/customerstudent/customerstudent";
import { getGuestBasicsEnumList } from "../../api/sale/sale"; import { getGuestBasicsEnumList } from "../../api/sale/sale";
import schedulFanke from "../schedul/schedul-fanke"; import schedulFanke from "../schedul/schedul-fanke";
import { queryDutyTrialLesson } from "../../api/duty/index";
export default { export default {
props: { props: {
...@@ -576,11 +631,49 @@ export default { ...@@ -576,11 +631,49 @@ export default {
field: "Option" 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: { searchObj: {
arriveVisitKey: "" arriveVisitKey: "",
dutyKey: ""
}, },
loadingObj: { loadingObj: {
visitLoading: true visitLoading: true,
trialLoading: true
}, },
data: [], data: [],
loading: true, loading: true,
...@@ -683,7 +776,9 @@ export default { ...@@ -683,7 +776,9 @@ export default {
sendObj: {}, sendObj: {},
isShowDetail: false, isShowDetail: false,
todayVistList: [], todayVistList: [],
showTodayVist: [] showTodayVist: [],
trialList: [],
shwoTrialList: []
}; };
}, },
watch: { watch: {
...@@ -693,6 +788,18 @@ export default { ...@@ -693,6 +788,18 @@ export default {
this.initAuth(); this.initAuth();
}, },
immediate: true immediate: true
},
tabCheck: {
handler(newValue) {
if (newValue == "first") {
this.initTodayVistList();
} else if (newValue == "second") {
this.getVisitoryPage();
} else {
this.initDutyTrialLessonList();
}
},
immediate: true
} }
}, },
created() {}, created() {},
...@@ -702,6 +809,7 @@ export default { ...@@ -702,6 +809,7 @@ export default {
this.initAuth(); this.initAuth();
this.getVisitoryPage(); this.getVisitoryPage();
this.initTodayVistList(); this.initTodayVistList();
this.initDutyTrialLessonList();
}, },
methods: { methods: {
submitForm(addMsg1) { submitForm(addMsg1) {
...@@ -825,19 +933,70 @@ export default { ...@@ -825,19 +933,70 @@ export default {
this.loadingObj.visitLoading = false; this.loadingObj.visitLoading = false;
}); });
}, },
setCustomerVisitHandler(id) {
this.$q
.dialog({
title: "确认到访",
message: "请再次确认改客户是否到达",
cancel: true,
persistent: true
})
.onOk(() => {
let msg = {
Id: id,
IsVisit: 1,
Feedback: ""
};
saveStudentVisitFeedback(msg).then(r => {
this.initTodayVistList();
});
});
},
initTodayVistList() { initTodayVistList() {
this.loadingObj.visitLoading = true; this.loadingObj.visitLoading = true;
if (this.$route.query.Id) { if (this.$route.query.Id) {
let msg = { Id: this.$route.query.Id }; let msg = { Id: this.$route.query.Id };
getTodayVisitList(msg).then(r => { getTodayVisitList(msg).then(r => {
console.log(r);
this.todayVistList = r.Data; this.todayVistList = r.Data;
this.showTodayVist = this.todayVistList; this.changeVisitList();
this.loadingObj.visitLoading = false; this.loadingObj.visitLoading = false;
}); });
} else { } else {
this.loadingObj.visitLoading = false; 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;
});
},
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;
}
} }
} }
}; };
......
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