| | |
| | | </PopUpFrame> |
| | | |
| | | <PopUpFrame :isOpen.sync="isEditPopup"> |
| | | <div class="text--middle mt-30 sendReserve-txt">是否繼續編輯預約單?</div> |
| | | <div class="text--middle text--center mb-10">已於 |
| | | <span class="bold">{{appointmentTime | formatDate}}</span> |
| | | 進行預約,</div> |
| | | <div class="text--middle text--center mb-30">是否繼續編輯?</div> |
| | | <div class="text--center mdTxt"> |
| | | <el-button @click="$router.go(-1)">返回</el-button> |
| | | <el-button @click="isEditPopup = false" type="primary">編輯</el-button> |
| | |
| | | import { Consultant } from '~/assets/ts/models/consultant.model'; |
| | | import { ContactType } from '~/assets/ts/models/enum/ContactType'; |
| | | import { Gender } from '~/assets/ts/models/enum/Gender'; |
| | | import { Role } from '~/assets/ts/models/enum/Role'; |
| | | |
| | | const roleStorage = namespace('localStorage'); |
| | | @Component |
| | |
| | | isEditBtn = false; |
| | | |
| | | appointmentId = 0; |
| | | appointmentTime = ''; |
| | | |
| | | beforeRouteEnter(to: any, from: any, next: any) { |
| | | next(vm => { |
| | |
| | | if (appointmentInfo) { |
| | | const hopeContactTime = appointmentInfo!.hopeContactTime.split("'") |
| | | .filter(item => item && item !== ','); |
| | | this.appointmentId = appointmentInfo.id; |
| | | this.getAppointmentId(appointmentInfo); |
| | | return { |
| | | age: appointmentInfo.age, |
| | | agentNo: appointmentInfo.agentNo, |
| | |
| | | requirement: appointmentInfo.requirement.split(',') |
| | | } |
| | | } else { |
| | | return { |
| | | age: '', |
| | | agentNo: '', |
| | | contactType: '', |
| | | email: '', |
| | | gender: '', |
| | | hopeContactTime: [], |
| | | job: '', |
| | | phone: '', |
| | | requirement: [] |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | private getAppointmentId(appointmentInfo) { |
| | | this.appointmentId = appointmentInfo.id; |
| | | this.appointmentTime = appointmentInfo.lastModifiedDate |
| | | ? appointmentInfo.lastModifiedDate |
| | | : appointmentInfo.appointmentDate; |
| | | } |
| | | @Watch('myConsultantList') onMyConsultantListChange() { |
| | | if (this.isUserLogin && this.myConsultantList.length > 0) { |
| | | const editAppointment = this.getLatestReserved(this.$route.params.agentNo); |
| | | |
| | | if (editAppointment.agentNo) { |
| | | if (editAppointment && editAppointment.agentNo) { |
| | | this.myRequest = JSON.parse(JSON.stringify(editAppointment)); |
| | | if (!this.$route.query || this.$route.query.edit !== 'true') { |
| | | this.isEditPopup = true; |