| | |
| | | <div |
| | | class="cus-tab-item" |
| | | :class="{'is-active': activeTabName === 'appointmentList'}" |
| | | @click="tabClick('appointmentList')" |
| | | @click="clickTab('appointmentList')" |
| | | >客戶預約 |
| | | <span class="p">({{appointmentList.length}})</span> |
| | | </div> |
| | | <div |
| | | class="cus-tab-item" |
| | | :class="{'is-active': activeTabName === 'contactedList'}" |
| | | @click="tabClick('contactedList')" |
| | | @click="clickTab('contactedList')" |
| | | >已聯絡 |
| | | <span class="p">({{contactedList.length}})</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <NuxtChild></NuxtChild> |
| | | |
| | | </div> |
| | | |
| | | <!-- DIALOG --> |
| | |
| | | |
| | | import * as _ from 'lodash'; |
| | | |
| | | import { ClientInfo } from '~/assets/ts/models/client.model'; |
| | | import { ClientInfo } from '~/shared/models/client.model'; |
| | | |
| | | @Component({ |
| | | layout: 'home', |
| | |
| | | }) |
| | | export default class ClientReservedList extends Vue { |
| | | |
| | | activeTabName = 'appointmentList'; |
| | | appointmentList: ClientInfo[] = []; |
| | | contactedList: ClientInfo[] = []; |
| | | clients: ClientInfo[] = []; |
| | | showNewAppointmentHint = false; |
| | | |
| | | @State('myAppointmentList') |
| | | myAppointmentList!: ClientInfo[]; |
| | | |
| | | @State('myNewAppointmentSum') |
| | | newAppointmentSum!: number; |
| | | |
| | | @Action |
| | | storeMyAppointmentList!: () => Promise<number>; |
| | | |
| | | @Watch('myAppointmentList') |
| | | onMyAppointmentListChange() { |
| | |
| | | .filter(item => item.communicateStatus !== 'contacted'); |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | @State('myNewAppointmentSum') |
| | | newAppointmentSum!: number; |
| | | |
| | | mounted() { |
| | | this.setActivatedTab(); |
| | | this.storeMyAppointmentList(); |
| | | @Watch('newAppointmentSum') |
| | | newAppointmentSumChange(): void { |
| | | this.showNewAppointmentHint = this.newAppointmentSum > 0; |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | activeTabName = 'appointmentList'; |
| | | appointmentList: ClientInfo[] = []; |
| | | contactedList: ClientInfo[] = []; |
| | | clients: ClientInfo[] = []; |
| | | showNewAppointmentHint = false; |
| | | |
| | | get bannerClassName() { |
| | | const routeName = this.$route.name || ''; |
| | | return this.routeFormatBannerClass(routeName); |
| | | }; |
| | | |
| | | tabClick(path: string) { |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | mounted() { |
| | | this.setActivatedTab(); |
| | | this.storeMyAppointmentList(); |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | @Action |
| | | storeMyAppointmentList!: () => Promise<number>; |
| | | |
| | | |
| | | clickTab(path: string): void { |
| | | this.activeTabName = path; |
| | | this.$router.push(`/myAppointmentList/${this.activeTabName}`); |
| | | } |