Commit ca238877 authored by youjie's avatar youjie

no message

parents f7bad1ac 5d222561
...@@ -24,13 +24,8 @@ ...@@ -24,13 +24,8 @@
</div> </div>
<div class="row studentDate" > <div class="row studentDate" >
<q-input <UeEditor v-model="addMsg.Demand" class="q-pb-sm" placeholder="试听需求" :config="config"></UeEditor>
style="width:257px;"
v-model="addMsg.Demand"
placeholder="试听需求"
filled
type="textarea"
/>
</div> </div>
<div class="row wrap justify-end q-pr-lg" style="margin-bottom:10px;"> <div class="row wrap justify-end q-pr-lg" style="margin-bottom:10px;">
...@@ -52,11 +47,11 @@ ...@@ -52,11 +47,11 @@
GetTrialLessonList GetTrialLessonList
} from "../../../api/school/index"; } from "../../../api/school/index";
// import auditionForm from "../../schedul/audition-form"; // import auditionForm from "../../schedul/audition-form";
import UeEditor from "../../editor/UeEditor";
export default { export default {
components: { components: {
// auditionForm, // auditionForm,
UeEditor
}, },
props: { props: {
saveObj: { saveObj: {
...@@ -66,6 +61,10 @@ ...@@ -66,6 +61,10 @@
}, },
data() { data() {
return { return {
config: {
initialFrameWidth: null,
initialFrameHeight: 90
},
isShowReserve: false, isShowReserve: false,
addMsg: { addMsg: {
Id: 0, //编号 Id: 0, //编号
......
<style></style> <style>
.divP p{margin:0px !important;}
</style>
<template> <template>
<div> <div>
<!-- <div class="row wrap"> <!-- <div class="row wrap">
...@@ -35,7 +37,7 @@ ...@@ -35,7 +37,7 @@
试听日期:{{ timeFormatSeconds(tItem.ReservationDate) }} 试听日期:{{ timeFormatSeconds(tItem.ReservationDate) }}
</div> </div>
<div v-if="tItem.Demand&&tItem.Demand.length>0"> <div v-if="tItem.Demand&&tItem.Demand.length>0">
试听需求:{{ tItem.Demand }} <span style="float:left;"> 试听需求:</span><div v-html="tItem.Demand" class="divP"></div>
</div> </div>
<div> <div>
预约时间:{{ tItem.ClassDateStr }} {{ tItem.ClassTime }} 预约时间:{{ tItem.ClassDateStr }} {{ tItem.ClassTime }}
...@@ -87,10 +89,57 @@ ...@@ -87,10 +89,57 @@
<el-button type="primary" @click="saveFankuiForm()">确 定</el-button> <el-button type="primary" @click="saveFankuiForm()">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="试听开课" :visible.sync="VisitorReserveClassMsg.IsShow" width="30%" @close="closeShitingKaiKe()">
<audition :VisitorReserveClassMsg="VisitorReserveClassMsg" <el-dialog title="试听开课" :visible.sync="VisitorReserveClassMsg.IsShow" width="30%">
@close="closeShitingKaiKe()" <div class="row wrap">
@success="SetVisitorReserveClass"></audition> <div style="width:100%;margin-bottom:15px;">试听时间:<span style="color:red;">{{timeFormatSeconds(VisitorReserveClassMsg.ReservationDate)}}</span></div>
<div style="width:100%;margin-bottom:15px;">试听需求:<span style="color:red;">{{VisitorReserveClassMsg.Demand}}</span></div>
</div>
<div class="row studentDate">
<q-field filled class="col-6 q-pb-lg q-pr-lg" dense>
<template v-slot:control>
<el-date-picker v-model="VisitorReserveClassMsg.ClassDate" ref="ClassDate" :rules="[val => !!val || '请选择预约日期']"
style="width:225px" size="mini" type="date" placeholder="预约日期" value-format="yyyy-MM-dd">
</el-date-picker>
</template>
</q-field>
<div class="col-6 q-pr-lg Student_Date ">
<q-field filled class="q-pb-lg" dense>
<template v-slot:control>
<el-time-select v-model="VisitorReserveClassMsg.ClassTime" size="mini" ref="ClassTime" style="width:50%" :picker-options="{
start: '09:00',
step: '00:15',
end: '21:00',
maxTime: VisitorReserveClassMsg.EndTime
}" placeholder="预约开始时间">
</el-time-select>
<el-time-select v-model="VisitorReserveClassMsg.EndTime" size="mini" dense ref="EndTime" style="width:50%"
:picker-options="{
start: '09:00',
step: '00:15',
end: '21:00',
minTime: VisitorReserveClassMsg.ClassTime
}" placeholder="预约结束时间">
</el-time-select>
</template>
</q-field>
</div>
</div>
<div class="row wrap">
<q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="VisitorReserveClassMsg.TeacherId"
ref="TeacherId" :options="TeacherList" label="选择教师" dense class="col-6 q-pb-lg q-pr-lg" emit-value
map-options />
<q-select filled stack-label option-value="RoomId" dense option-label="RoomName" v-model="VisitorReserveClassMsg.ClassRoomId"
ref="ClassRoomId" :options="ClassRoomList" label="关联教室" class="col-6 q-pb-lg q-pr-lg" emit-value
map-options />
<q-select filled stack-label option-value="Id" dense option-label="LessonName" v-model="VisitorReserveClassMsg.TrialLessonId"
:options="TrialList" label="试听课程" class="col-6 q-pb-lg q-pr-lg" emit-value map-options />
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="closeShitingKaiKe()">取 消</el-button>
<el-button type="primary" @click="SetVisitorReserveClass()">确 定</el-button>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -110,7 +159,6 @@ ...@@ -110,7 +159,6 @@
} from "../../../api/school/index"; } from "../../../api/school/index";
import reserveclassForm from "./reserveclass-form"; import reserveclassForm from "./reserveclass-form";
import reserveclasskaikeform from "./reserveclasskaikeform"; import reserveclasskaikeform from "./reserveclasskaikeform";
import audition from "../../../pages/h5page/audition";
export default { export default {
meta: { meta: {
...@@ -119,8 +167,7 @@ ...@@ -119,8 +167,7 @@
components: { components: {
reserveclassForm, reserveclassForm,
reserveclasskaikeform, reserveclasskaikeform,
UeEditor, UeEditor
audition
}, },
props: { props: {
saveObj: { saveObj: {
...@@ -211,11 +258,54 @@ return timeStr; ...@@ -211,11 +258,54 @@ return timeStr;
}, },
//保存 //保存
SetVisitorReserveClass() { SetVisitorReserveClass() {
if (this.VisitorReserveClassMsg.ClassDate == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请选择预约日期!"
});
return;
}
if (this.VisitorReserveClassMsg.ClassTime == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请选择预约开始时间!"
});
return;
}
if (this.VisitorReserveClassMsg.EndTime == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请选择预约结束时间!"
});
return;
}
SetVisitorReserveClass(this.VisitorReserveClassMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: res.Message,
position: "top"
});
this.$emit("success"); this.$emit("success");
} else {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: res.Message
});
}
this.closeShitingKaiKe(); this.closeShitingKaiKe();
this.getList(); this.getList();
});
}, },
closeShitingKaiKe(){ closeShitingKaiKe(){
this.VisitorReserveClassMsg.Id=0; this.VisitorReserveClassMsg.Id=0;
...@@ -234,7 +324,6 @@ return timeStr; ...@@ -234,7 +324,6 @@ return timeStr;
this.VisitorReserveClassMsg.ClassPlanId=0; this.VisitorReserveClassMsg.ClassPlanId=0;
this.VisitorReserveClassMsg.Demand=""; this.VisitorReserveClassMsg.Demand="";
this.VisitorReserveClassMsg.IsShow=false; this.VisitorReserveClassMsg.IsShow=false;
this.$forceUpdate()
}, },
//试听课开课 //试听课开课
ShitingKaiKe(item){ ShitingKaiKe(item){
......
...@@ -82,10 +82,11 @@ ...@@ -82,10 +82,11 @@
<q-card-actions align="right" class="bg-white q-mx-md "> <q-card-actions align="right" class="bg-white q-mx-md ">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" v-close-popup /> <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" v-close-popup />
<q-btn @click="$refs.stepper.previous()" color="primary" label="上一步" v-if="step > 1" /> <q-btn @click="$refs.stepper.previous()" color="primary" label="上一步" v-if="step > 1" />
<template v-if="mode == 3 && step == 2"> <!-- <template v-if="mode == 3 && step == 2">
<q-btn label="保存" color="primary" @click="saveCourseForm" /> <q-btn label="保存" color="primary" @click="saveCourseForm" />
</template> </template>
<template v-else> <template v-else>-->
<template >
<q-btn @click="next" color="primary" label="下一步" v-if="step < 3" /> <q-btn @click="next" color="primary" label="下一步" v-if="step < 3" />
<q-btn label="保存" color="primary" :loading="loading1" @click="saveOrderForm" v-if="step == 3" /> <q-btn label="保存" color="primary" :loading="loading1" @click="saveOrderForm" v-if="step == 3" />
</template> </template>
...@@ -334,7 +335,7 @@ export default { ...@@ -334,7 +335,7 @@ export default {
return; return;
} }
if ( if (
this.mode == 2 && (this.mode == 2||this.mode == 3) &&
(!this.saveObj.ClassId || this.saveObj.ClassId == 0) (!this.saveObj.ClassId || this.saveObj.ClassId == 0)
) { ) {
this.$q.notify({ this.$q.notify({
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
:dense="false" :dense="false"
type="number" type="number"
:min="1" :min="1"
@input="totalCourseFee()" @input="totalCourseFee(1)"
v-model="item.TotalClassHours" v-model="item.TotalClassHours"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="总课时数" label="总课时数"
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
:dense="false" :dense="false"
type="number" type="number"
:min="0" :min="0"
@input="totalCourseFee()" @input="totalCourseFee(0)"
v-model="item.TextbookFee" v-model="item.TextbookFee"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="课件费" label="课件费"
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
:dense="false" :dense="false"
type="number" type="number"
:min="0" :min="0"
@input="totalCourseFee()" @input="totalCourseFee(0)"
v-model="item.CoursewareFee" v-model="item.CoursewareFee"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="教材费" label="教材费"
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
:dense="false" :dense="false"
type="number" type="number"
:min="1" :min="1"
@input="oneTotalCourseFee()" @input="oneTotalCourseFee(1)"
v-model="OrderMsg.TotalClassHours" v-model="OrderMsg.TotalClassHours"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="总课时数" label="总课时数"
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
:dense="false" :dense="false"
type="number" type="number"
:min="0" :min="0"
@input="oneTotalCourseFee()" @input="oneTotalCourseFee(0)"
v-model="OrderMsg.TextbookFee" v-model="OrderMsg.TextbookFee"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="课件费" label="课件费"
...@@ -454,7 +454,7 @@ ...@@ -454,7 +454,7 @@
:dense="false" :dense="false"
type="number" type="number"
:min="0" :min="0"
@input="oneTotalCourseFee()" @input="oneTotalCourseFee(0)"
v-model="OrderMsg.CoursewareFee" v-model="OrderMsg.CoursewareFee"
class="col-6 q-py-sm" class="col-6 q-py-sm"
label="教材费" label="教材费"
...@@ -899,7 +899,7 @@ export default { ...@@ -899,7 +899,7 @@ export default {
} }
this.courseInformationList.push(dataObj) this.courseInformationList.push(dataObj)
}); });
this.totalCourseFee() this.totalCourseFee(1)
} }
...@@ -907,14 +907,17 @@ export default { ...@@ -907,14 +907,17 @@ export default {
methods: { methods: {
//单个课程计算 //单个课程计算
oneTotalCourseFee(){ oneTotalCourseFee(type){
if(this.OrderMsg.Unit_PriceType==2){ if(this.OrderMsg.Unit_PriceType==2){
if(type==1){
this.OrderMsg.TextbookFee=Number((this.OrderMsg.TotalClassHours*this.OrderMsg.Unit_Price*this.OrderMsg.GuestNum)*(20/100)).toFixed(2);
}
this.OrderMsg.PreferPrice = this.OrderMsg.GuestNum*this.OrderMsg.Unit_Price*this.OrderMsg.TotalClassHours+Number(this.OrderMsg.TextbookFee)+Number(this.OrderMsg.CoursewareFee) this.OrderMsg.PreferPrice = this.OrderMsg.GuestNum*this.OrderMsg.Unit_Price*this.OrderMsg.TotalClassHours+Number(this.OrderMsg.TextbookFee)+Number(this.OrderMsg.CoursewareFee)
} }
}, },
// 多个课程计算 // 多个课程计算
totalCourseFee(){ totalCourseFee(type){
this.courseInformationList.forEach((item)=>{ this.courseInformationList.forEach((item)=>{
if(this.stuData.StuList[0].IsRenewGuest==1){ if(this.stuData.StuList[0].IsRenewGuest==1){
item.DiscountMoney = this.accAdd( item.DiscountMoney = this.accAdd(
...@@ -928,8 +931,9 @@ export default { ...@@ -928,8 +931,9 @@ export default {
item.PreferPrice = item.GuestNum*item.Unit_Price item.PreferPrice = item.GuestNum*item.Unit_Price
} }
else if(item.Unit_PriceType==2){ else if(item.Unit_PriceType==2){
if(type==1){
item.TextbookFee=Number((item.TotalClassHours*item.Unit_Price*item.GuestNum)*(20/100)).toFixed(2); item.TextbookFee=Number((item.TotalClassHours*item.Unit_Price*item.GuestNum)*(20/100)).toFixed(2);
}
item.PreferPrice = (item.GuestNum*item.Unit_Price*item.TotalClassHours)+Number(item.TextbookFee)+Number(item.CoursewareFee) item.PreferPrice = (item.GuestNum*item.Unit_Price*item.TotalClassHours)+Number(item.TextbookFee)+Number(item.CoursewareFee)
} }
......
...@@ -232,6 +232,10 @@ ...@@ -232,6 +232,10 @@
if (this.$route.query.CategoryId) { if (this.$route.query.CategoryId) {
this.msg.CategoryId = this.$route.query.CategoryId; this.msg.CategoryId = this.$route.query.CategoryId;
} }
if (this.$route.query.StuName) {
this.msg.StuName = this.$route.query.StuName;
}
this.$route.query.OrderId;
this.getStatusList(); this.getStatusList();
this.getStudent() this.getStudent()
}, },
......
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