| | |
| | | <template> |
| | | <div class="appointment-client-detail-page"> |
| | | <div class="date-detail"> |
| | | <!-- TODO: 要依據不同 step 顯示不同 Date [Tomas, 2022/1/11] --> |
| | | <div>{{ appointmentDetail.appointmentDate }}</div> |
| | | <div>{{ appointmentDetail.consultantReadTime }}</div> |
| | | <div>{{ appointmentDetail.appointmentDate | formatDate }}</div> |
| | | <div>{{ appointmentDetail.consultantReadTime | formatDate }}</div> |
| | | </div> |
| | | |
| | | <AppointmentProgress |
| | | class="mt-10" |
| | | :currentStep="appointmentDetail.communicateStatus" |
| | | :currentStep="appointmentProgress" |
| | | ></AppointmentProgress> |
| | | |
| | | <section class="client-detail"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="client-detail-info__information"> |
| | | <div>{{ appointmentDetail.age || '--' }}歲</div> |
| | | <div>{{ appointmentDetail.age | toAgeLabel }}</div> |
| | | <div>{{ appointmentDetail.phone }}</div> |
| | | <div class="text--underline"> |
| | | {{ appointmentDetail.email }} |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="client-detail-action"> |
| | | <div class="client-detail-action" v-if="showWhenAppointmentHasClosed"> |
| | | <el-button >發送滿意度</el-button> |
| | | </div> |
| | | |
| | | <div class="client-detail-action" v-else> |
| | | <el-button @click="closeAppointment" >結案</el-button> |
| | | <el-button @click="sendMsg" style="margin-left: 0px">通知/約訪</el-button> |
| | | <!-- <el-button>發送滿意度</el-button> --> |
| | | </div> |
| | | |
| | | </section> |
| | | |
| | | <section class="close-appointment-detail"> |
| | | <section class="close-appointment-detail" v-if="showWhenAppointmentHasClosed"> |
| | | |
| | | <div class="close-appointment-detail-nav"> |
| | | <div class="mdTxt">結案方式</div> |
| | | <div class="mdTxt text--primary text--underline">編輯</div> |
| | | <div class="mdTxt text--primary text--underline cursor--pointer" @click="editAppointmentHasClosed">編輯</div> |
| | | </div> |
| | | <span class="mt-10 mb-30">成交</span> |
| | | |
| | |
| | | |
| | | </section> |
| | | |
| | | <InterviewMsg :isVisible.sync="isVisibleDialog"></InterviewMsg> |
| | | <InterviewMsg |
| | | :isVisible.sync="isVisibleDialog" |
| | | :client="appointmentDetail"> |
| | | </InterviewMsg> |
| | | |
| | | |
| | | <section class="mt-30"> |
| | | <AppointmentInterviewList /> |
| | | <AppointmentInterviewList :interviewList="appointmentDetail.interviewRecordDTOs" /> |
| | | </section> |
| | | |
| | | <section class="mt-30"> |
| | | <AppointmentRecordList /> |
| | | <AppointmentRecordList :noticeLogs="appointmentDetail.appointmentNoticeLogs" /> |
| | | </section> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Context } from '@nuxt/types'; |
| | | |
| | | import { Vue, Component } from 'vue-property-decorator'; |
| | | import { namespace } from 'nuxt-property-decorator'; |
| | | |
| | | import appointmentService from '~/shared/services/appointment.service'; |
| | | import { AppointmentDetail } from '~/shared/models/appointment.model'; |
| | | import { Appointment } from '~/shared/models/appointment.model'; |
| | | import { ContactStatus } from '~/shared/models/enum/contact-status'; |
| | | |
| | | const appointmentStore = namespace('appointment.store'); |
| | | |
| | | @Component |
| | | export default class AppointmentDetailComponent extends Vue { |
| | | |
| | | appointmentDetail!: AppointmentDetail; |
| | | @appointmentStore.State('appointmentDetail') |
| | | appointmentDetail!: Appointment; |
| | | |
| | | @appointmentStore.Getter('appointmentProgress') |
| | | appointmentProgress!: ContactStatus; |
| | | |
| | | isVisibleDialog = false; |
| | | interviewTxt = ""; |
| | | ////////////////////////////////////////////////////////////////////// |
| | | contactStatus = ContactStatus; |
| | | |
| | | async asyncData(context: Context) { |
| | | const appointmentId = +context.route.params.appointmentId; |
| | | return { |
| | | appointmentDetail: await appointmentService.getAppointmentDetail(appointmentId).then((res) => res) |
| | | } |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | |
| | | this.$router.push(`/appointment/${this.appointmentDetail.id}/close`); |
| | | } |
| | | |
| | | sendMsg():void{ |
| | | sendMsg():void { |
| | | this.isVisibleDialog = true; |
| | | } |
| | | |
| | | editAppointmentHasClosed(): void{ |
| | | this.$router.push(`/appointment/${this.appointmentDetail.id}/close`); |
| | | } |
| | | |
| | | get showWhenAppointmentHasClosed(): boolean { |
| | | return this.appointmentDetail.communicateStatus === this.contactStatus.DONE |
| | | || this.appointmentDetail.communicateStatus === this.contactStatus.CLOSE |
| | | || this.appointmentDetail.communicateStatus === this.contactStatus.CANCEL; |
| | | } |
| | | } |
| | | </script> |
| | | |