| | |
| | | <div |
| | | class="delete" |
| | | v-if="showRemoveBtn" |
| | | @click="removeAgent" |
| | | @click="isRemoveAgentPopup = true" |
| | | >移除</div> |
| | | <div |
| | | v-if="notScoreAppointmentYet" |
| | |
| | | </div> |
| | | </PopUpFrame> |
| | | |
| | | <PopUpFrame :isOpen.sync="isConfirmPopup"> |
| | | <div class="text--center mdTxt">已成功取消此筆預約</div> |
| | | <PopUpFrame :isOpen.sync="isConfirmPopup"> |
| | | <div class="text--center mdTxt">已成功{{confirmTxt}}</div> |
| | | <div class="text--center mt-30"> |
| | | <el-button @click="isConfirmPopup = false" type="primary">確定</el-button> |
| | | </div> |
| | | </PopUpFrame> |
| | | |
| | | <PopUpFrame :isOpen.sync="isRemoveAgentPopup"> |
| | | <div class="text--center mdTxt">是否移除顧問 <span class="text--primary">{{agentInfo.name}}</span>?</div> |
| | | <div class="text--center mt-30"> |
| | | <el-button @click="isRemoveAgentPopup = false">否</el-button> |
| | | <el-button @click="removeAgent" type="primary">是</el-button> |
| | | </div> |
| | | </PopUpFrame> |
| | | </div> |
| | |
| | | isCancelPopup = false; |
| | | hideReviews = hideReviews; |
| | | isConfirmPopup = false; |
| | | isRemoveAgentPopup = false; |
| | | confirmTxt = ''; |
| | | |
| | | appointmentDetail: any = { |
| | | age : '', |
| | |
| | | get notScoreAppointmentYet(): boolean { |
| | | const isAppointment = !!this.agentInfo['appointmentStatus']; |
| | | if (!isAppointment) return false; |
| | | return !this.agentInfo['appointmentScore']; |
| | | return this.agentInfo['appointmentStatus'] !== 'contacted' ? !this.agentInfo['appointmentScore'] : false; |
| | | } |
| | | |
| | | get isAppointment(): boolean { |
| | | return !!this.agentInfo['appointmentStatus']; |
| | | } |
| | | |
| | | get latestReservedAppointment(): Appointment { |
| | | get latestNotClosedAppointment(): Appointment { |
| | | return this.agentInfo.appointments! |
| | | .filter((appointment) => appointment.communicateStatus !== 'contacted') |
| | | .filter((appointment) => appointment.communicateStatus === 'reserved' || appointment.communicateStatus === 'contacted') |
| | | .map((reversedAppointment) => { |
| | | return { |
| | | ...reversedAppointment, |
| | |
| | | if (this.agentInfo['appointmentStatus'] === 'reserved') { |
| | | return '已預約'; |
| | | } |
| | | if (this.agentInfo['appointmentStatus'] === 'done') { |
| | | return '已成交'; |
| | | } |
| | | if (this.agentInfo['appointmentStatus'] === 'closed') { |
| | | return '未成交'; |
| | | } |
| | | } else { |
| | | if (this.agentInfo.contactStatus === 'contacted') { |
| | | return '已聯絡'; |
| | |
| | | } |
| | | if (this.agentInfo['appointmentStatus'] === 'reserved') { |
| | | return 'reservedBtn'; |
| | | } |
| | | if (this.agentInfo['appointmentStatus'] === 'done') { |
| | | return 'doneBtn'; |
| | | } |
| | | if (this.agentInfo['appointmentStatus'] === 'closed') { |
| | | return 'closedBtn'; |
| | | } |
| | | } else { |
| | | if (this.agentInfo.contactStatus === 'contacted') { |
| | |
| | | const isAppointment = !!this.agentInfo['appointmentStatus']; |
| | | const appointmentId = isAppointment |
| | | ? this.agentInfo['appointmentId'] |
| | | : this.latestReservedAppointment.id; |
| | | : this.latestNotClosedAppointment.id; |
| | | |
| | | appointmentService.getAppointmentDetail(appointmentId!).then(res => { |
| | | this.appointmentDetail = { |
| | |
| | | |
| | | removeAgent() { |
| | | this.removeFromMyConsultantList(this.agentInfo.agentNo).then((removeOk) => { |
| | | this.isRemoveAgentPopup = false; |
| | | setTimeout(() => { |
| | | this.confirmTxt = '移除顧問'; |
| | | this.isConfirmPopup = true; |
| | | }, 300); |
| | | |
| | | }); |
| | | } |
| | | |
| | |
| | | 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; |
| | | setTimeout(() => { |
| | | this.confirmTxt = '取消此筆預約'; |
| | | this.isConfirmPopup = true; |
| | | |
| | | }, 300); |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | .delete { |
| | | display: inline-block; |
| | | color: $PRIMARY_RED; |
| | | font-size: 14px; |
| | | font-weight: bold; |
| | |
| | | } |
| | | } |
| | | |
| | | .doneBtn { |
| | | color: $BEIGE; |
| | | border-color: $BEIGE; |
| | | |
| | | &:focus { |
| | | color: $PRIMARY_WHITE; |
| | | background-color: $BEIGE; |
| | | opacity: 0.5; |
| | | } |
| | | } |
| | | |
| | | .closedBtn { |
| | | color: $PRUDENTIAL_GREY; |
| | | border-color: $PRUDENTIAL_GREY; |
| | | |
| | | &:focus { |
| | | color: $PRIMARY_WHITE; |
| | | background-color: $PRUDENTIAL_GREY; |
| | | opacity: 0.5; |
| | | } |
| | | } |
| | | |
| | | .updateTime { |
| | | font-size: 12px; |
| | | font-weight: bold; |