Commit cb346208 authored by 罗超's avatar 罗超

2

parent e60c46d6
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
} }
.infoBox { .infoBox {
height: calc(100% - 150rpx); height: calc(100% - 250rpx);
box-sizing: border-box; box-sizing: border-box;
padding: 0 20rpx; padding: 0 20rpx;
overflow-y: auto; overflow-y: auto;
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
flex-grow: 1; flex-grow: 1;
} }
.infoRow .subBtn { .subBtn {
font-size: 20rpx; font-size: 20rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
提示 提示
</view> </view>
<view class="subtitle"> <view class="subtitle">
前时段已有预约列表,是否切换? 日有相同课程,是否切换?
</view> </view>
<view class="infoBox"> <view class="infoBox">
<view v-for="(info,index) in infoList" :key="index" class="infoItem"> <view v-for="(info,index) in infoList" :key="index" class="infoItem">
...@@ -122,6 +122,11 @@ ...@@ -122,6 +122,11 @@
</view> </view>
</view> </view>
<view style="display: flex;justify-content:center">
<view class="subBtn" @click="goOn" style="display: inline-block;">
继续预约
</view>
</view>
</view> </view>
</van-popup> </van-popup>
...@@ -168,6 +173,10 @@ ...@@ -168,6 +173,10 @@
}, },
chooseTime(item) { chooseTime(item) {
ctx.emit("change", item) ctx.emit("change", item)
},
goOn() {
data.showpop = false
ctx.emit("goOn")
} }
} }
watch(() => props.show, (val) => { watch(() => props.show, (val) => {
......
...@@ -170,7 +170,8 @@ ...@@ -170,7 +170,8 @@
</view> </view>
</view> </view>
</van-overlay> </van-overlay>
<OtherTeacherTime :show="showOtherTime" :infoList="OtherTimeList" @close="closeOtherTeacherTime" @change="changeTime"/> <OtherTeacherTime :show="showOtherTime" :infoList="OtherTimeList" @close="closeOtherTeacherTime"
@change="changeTime" @goOn="subscribe(ShiftSortArr)" />
</view> </view>
</template> </template>
...@@ -216,9 +217,10 @@ ...@@ -216,9 +217,10 @@
courselist: [], courselist: [],
schoolName: "", schoolName: "",
roomName: "", roomName: "",
latestTime:"00:00",//最后预约的课时 latestTime: "00:00", //最后预约的课时
showOtherTime:false, showOtherTime: false,
OtherTimeList:[] OtherTimeList: [],
ShiftSortArr: [], //暂存选中的时段
}) })
const methods = { const methods = {
onConfirmCalendar(val) { onConfirmCalendar(val) {
...@@ -272,9 +274,9 @@ ...@@ -272,9 +274,9 @@
data.schoolName = data.teacherList[val.detail.current].SchoolName data.schoolName = data.teacherList[val.detail.current].SchoolName
data.roomName = data.teacherList[val.detail.current].RoomName data.roomName = data.teacherList[val.detail.current].RoomName
methods.courseGroup() methods.courseGroup()
data.courselist.map(e=>{ data.courselist.map(e => {
if(e.State==4){ if (e.State == 4) {
data.latestTime=e.StartTime data.latestTime = e.StartTime
} }
}) })
}, },
...@@ -291,10 +293,10 @@ ...@@ -291,10 +293,10 @@
data.schoolName = data.teacherList[0].SchoolName data.schoolName = data.teacherList[0].SchoolName
data.roomName = data.teacherList[0].RoomName data.roomName = data.teacherList[0].RoomName
methods.courseGroup() methods.courseGroup()
data.courselist.map(e=>{ data.courselist.map(e => {
if(e.State==4){ if (e.State == 4) {
data.latestTime=e.StartTime data.latestTime = e.StartTime
} }
}) })
} else { } else {
...@@ -331,7 +333,7 @@ ...@@ -331,7 +333,7 @@
const date = new Date() const date = new Date()
const y = date.getFullYear() const y = date.getFullYear()
const m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date const m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date
.getMonth() + 1 .getMonth() + 1
const d = date.getDate() const d = date.getDate()
const maxStr = y + '-' + m + '-' + (d + res.Data.AppointDay - 1) const maxStr = y + '-' + m + '-' + (d + res.Data.AppointDay - 1)
data.maxDateStr = new Date(maxStr).getTime() data.maxDateStr = new Date(maxStr).getTime()
...@@ -365,7 +367,7 @@ ...@@ -365,7 +367,7 @@
proxy.$request("/AppletCenter/GetScrollAppointmentTeacherList", data.msg).then(res => { proxy.$request("/AppletCenter/GetScrollAppointmentTeacherList", data.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
data.teacherList = res.Data; data.teacherList = res.Data;
console.log(355,data.latestTime) console.log(355, data.latestTime)
if (data.teacherList.length > 0) { if (data.teacherList.length > 0) {
data.courselist = data.teacherList[data.current].CourseTimeList data.courselist = data.teacherList[data.current].CourseTimeList
data.schoolName = data.teacherList[data.current].SchoolName data.schoolName = data.teacherList[data.current].SchoolName
...@@ -390,12 +392,12 @@ ...@@ -390,12 +392,12 @@
}, },
//选课 //选课
checkCourse(index) { checkCourse(index) {
if (data.basics.AdvanceDay == 1) { if (data.basics.AdvanceDay == 1 && data.basics.ScrollETime) {
const lateTime = new Date(getToday() + ' ' + data.basics.ScrollETime).getTime() const lateTime = new Date(getToday() + ' ' + data.basics.ScrollETime).getTime()
const nowTime = new Date().getTime() const nowTime = new Date().getTime()
const targetDay=parseInt(data.msg.Date.slice(-2)) const targetDay = parseInt(data.msg.Date.slice(-2))
const curDay=parseInt(getToday().slice(-2)) const curDay = parseInt(getToday().slice(-2))
if (nowTime > lateTime&&(targetDay-curDay===1)) { if (nowTime > lateTime && (targetDay - curDay === 1)) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: `${data.basics.ScrollETime}点后不可预约明天课程` title: `${data.basics.ScrollETime}点后不可预约明天课程`
...@@ -425,11 +427,11 @@ ...@@ -425,11 +427,11 @@
}) })
return return
} else { } else {
console.log(428,ShiftSortArr) console.log(428, ShiftSortArr)
this.mapNextCourse(index, ShiftSortArr, RemainTime) this.mapNextCourse(index, ShiftSortArr, RemainTime)
} }
} else if (RemainTime == 0) { } else if (RemainTime == 0) {
// this.subscribe(ShiftSortArr) this.ShiftSortArr = ShiftSortArr
this.validateAppointment(ShiftSortArr) this.validateAppointment(ShiftSortArr)
} else { } else {
uni.showToast({ uni.showToast({
...@@ -447,7 +449,7 @@ ...@@ -447,7 +449,7 @@
let RemainTime2 = RemainTime - nexCourse.Minutes //剩余课时 let RemainTime2 = RemainTime - nexCourse.Minutes //剩余课时
ShiftSortArr.push(nexCourse) ShiftSortArr.push(nexCourse)
if (RemainTime2 === 0) { if (RemainTime2 === 0) {
// this.subscribe(ShiftSortArr) this.ShiftSortArr = ShiftSortArr
this.validateAppointment(ShiftSortArr) this.validateAppointment(ShiftSortArr)
} else if (RemainTime2 > 0) { } else if (RemainTime2 > 0) {
this.mapNextCourse(nexIndex, ShiftSortArr, RemainTime2) this.mapNextCourse(nexIndex, ShiftSortArr, RemainTime2)
...@@ -492,7 +494,8 @@ ...@@ -492,7 +494,8 @@
return cur.Minutes + pre return cur.Minutes + pre
}, 0) }, 0)
if (data.basics.NextAppointMinutes == total) { if (data.basics.NextAppointMinutes == total) {
this.subscribe(item) this.ShiftSortArr = item
this.validateAppointment(item)
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
...@@ -522,7 +525,7 @@ ...@@ -522,7 +525,7 @@
}) })
// console.log(486, res) // console.log(486, res)
// if (res[data.basics.TempleteList[0]] == 'accept') { // if (res[data.basics.TempleteList[0]] == 'accept') {
// } else { // } else {
// uni.showToast({ // uni.showToast({
// icon: 'none', // icon: 'none',
...@@ -558,10 +561,10 @@ ...@@ -558,10 +561,10 @@
proxy.$request("/AppletCenter/ValidateToDayAppointment", msg).then(res => { proxy.$request("/AppletCenter/ValidateToDayAppointment", msg).then(res => {
if (res.Data.State == 0 || res.Data.State == 1) { if (res.Data.State == 0 || res.Data.State == 1) {
this.subscribe(ShiftSortArr) this.subscribe(ShiftSortArr)
}else if(res.Data.State == 2||res.Data.State == 3){ } else if (res.Data.State == 2 || res.Data.State == 3) {
console.log('验证约课时段', res) console.log('验证约课时段', res)
data.OtherTimeList=res.Data.TimeList data.OtherTimeList = res.Data.TimeList
data.showOtherTime=true data.showOtherTime = true
} }
}) })
}, },
...@@ -571,12 +574,11 @@ ...@@ -571,12 +574,11 @@
// let sArr=s.split(':') // let sArr=s.split(':')
// let sStr=sArr[0]*3600+sArr[1]*60 // let sStr=sArr[0]*3600+sArr[1]*60
// }, // },
closeOtherTeacherTime(val){ closeOtherTeacherTime(val) {
data.showOtherTime = val data.showOtherTime = val
}, },
//切换-预约其他老师的课 //切换-预约其他老师的课
changeTime(item){ changeTime(item) {
const obj = { const obj = {
Date: data.msg.Date, Date: data.msg.Date,
AccountId: item.AccountId, AccountId: item.AccountId,
...@@ -590,13 +592,13 @@ ...@@ -590,13 +592,13 @@
success(res) { success(res) {
proxy.$request("/AppletCenter/SetScrollAppointment", obj).then(res => { proxy.$request("/AppletCenter/SetScrollAppointment", obj).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
data.showOtherTime=false data.showOtherTime = false
let findIndex= data.teacherList.findIndex(e=>{ let findIndex = data.teacherList.findIndex(e => {
return e.TeacherId==item.TeacherId return e.TeacherId == item.TeacherId
}) })
console.log(findIndex) console.log(findIndex)
if(findIndex){ if (findIndex) {
data.current=findIndex data.current = findIndex
} }
methods.updateBaseInfo() methods.updateBaseInfo()
methods.updateTeacherList() methods.updateTeacherList()
...@@ -604,14 +606,14 @@ ...@@ -604,14 +606,14 @@
} }
}) })
// if (res[data.basics.TempleteList[0]] == 'accept') { // if (res[data.basics.TempleteList[0]] == 'accept') {
// } else { // } else {
// uni.showToast({ // uni.showToast({
// icon: 'none', // icon: 'none',
// title: "订阅失败,请重新预约" // title: "订阅失败,请重新预约"
// }) // })
// } // }
}, },
fail() { fail() {
uni.showToast({ uni.showToast({
...@@ -625,7 +627,7 @@ ...@@ -625,7 +627,7 @@
onMounted(() => { onMounted(() => {
methods.getDateData() methods.getDateData()
methods.getBaseInfo() methods.getBaseInfo()
}) })
return { return {
...toRefs(data), ...toRefs(data),
......
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