| | |
| | | :agentNo="agentInfo.agentNo" |
| | | @click.native="showAgentDetail(agentInfo.agentNo)" |
| | | ></UiAvatar> |
| | | <!-- TODO:隱藏滿意度 --> |
| | | <div v-if="!hideReviews"> |
| | | <i class="icon-star pam-icon icon--yellow satisfaction" v-if="notScoreAppointmentYet"></i> |
| | | <span v-if="notScoreAppointmentYet"> |
| | | {{ agentInfo.satisfactionScore }} |
| | | </span> |
| | | <div class="unfilled text--center " |
| | | style="display:flex" |
| | | v-if="notScoreAppointmentYet">未填<br />滿意度</div> |
| | | <span v-if="agentInfo.contactStatus !== 'contacted'">{{ agentInfo.avgScore }}</span> |
| | | <i class="icon-star pam-icon icon--yellow satisfaction"></i> |
| | | <template v-if="isAppointment"> |
| | | <span v-if="notScoreAppointmentYet"> |
| | | {{ agentInfo.satisfactionScore }} |
| | | </span> |
| | | <div class="unfilled text--center " |
| | | style="display:flex" |
| | | v-if="notScoreAppointmentYet">未填<br />滿意度</div> |
| | | </template> |
| | | <template v-else> |
| | | <span v-if="agentInfo.avgScore">{{ agentInfo.avgScore }}</span> |
| | | <span v-else>尚無<br />滿意度</span> |
| | | </template> |
| | | |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="10" :sm="15"> |
| | |
| | | :class="actionBtnStyle" |
| | | >{{ actionBtnLabel }}</el-button> |
| | | <div class="updateTime mt-10"> |
| | | {{ agentInfo.updateTime | formatDate }} |
| | | {{ (isAppointment ? agentInfo.appointmentLastModifiedDate : agentInfo.updateTime) | formatDate }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | > |
| | | <div v-if="appointmentDetail"> |
| | | <h5 class="subTitle text--center mb-30">預約成功</h5> |
| | | <p class="smTxt">{{appointmentDetail.appointmentDate | formatDate}}</p> |
| | | <p class="smTxt">{{appointmentDetail.appointmentDate | formatDate}} 建立</p> |
| | | <div class="reserved-info"> |
| | | <p>姓名:{{appointmentDetail.name}}</p> |
| | | <p>電話:{{appointmentDetail.phone}}</p> |
| | |
| | | return !!this.agentInfo['appointmentStatus']; |
| | | } |
| | | |
| | | get latestReservedAppointment(): Appointment { |
| | | get latestNotClosedAppointment(): Appointment { |
| | | return this.agentInfo.appointments! |
| | | .filter((appointment) => appointment.communicateStatus === 'reserved') |
| | | .filter((appointment) => appointment.communicateStatus === 'reserved' || appointment.communicateStatus === 'contacted') |
| | | .map((reversedAppointment) => { |
| | | return { |
| | | ...reversedAppointment, |
| | |
| | | const isAppointment = !!this.agentInfo['appointmentStatus']; |
| | | const appointmentId = isAppointment |
| | | ? this.agentInfo['appointmentId'] |
| | | : this.latestReservedAppointment.id; |
| | | : this.latestNotClosedAppointment.id; |
| | | |
| | | appointmentService.getAppointmentDetail(appointmentId!).then(res => { |
| | | this.appointmentDetail = { |
| | |
| | | const isAppointment = !!this.agentInfo['appointmentStatus']; |
| | | const appointmentId = isAppointment |
| | | ? this.agentInfo['appointmentId'] |
| | | : this.latestReservedAppointment.id; |
| | | : this.latestNotClosedAppointment.id; |
| | | |
| | | const reviewParams: UserReviewsConsultantsParams = { |
| | | appointmentId: appointmentId, |
| | |
| | | } |
| | | |
| | | cancel() { |
| | | appointmentService.cancelAppointment(this.latestReservedAppointment.id).then(res => { |
| | | appointmentService.cancelAppointment(this.latestNotClosedAppointment.id).then(res => { |
| | | this.storeConsultantList(); |
| | | this.isVisibleDialog = false; |
| | | this.isCancelPopup = false; |