保誠-保戶業務員媒合平台
Tomas
2022-01-21 1ea7200df3ce7be88dcdc53f5043c182282f77dc
update: 顧問_預約單列表 - 未聯絡, 結案清單排序(新->舊)
修改2個檔案
17 ■■■■ 已變更過的檔案
PAMapp/pages/myAppointmentList/appointmentList.vue 13 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/myAppointmentList/closedList.vue 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/myAppointmentList/appointmentList.vue
@@ -63,18 +63,11 @@
    @Watch('myAppointmentList')
    onMyAppointmentListChange(): void {
      const tempViewList = this.myAppointmentList
          .filter(item => item.communicateStatus === this.contactStatus.RESERVED);
      // TODO: 後續如需針對 unreadList 做更細緻的排序,則需請後端提供判斷依據(例如: createTime)。[Tomas, 2021/12/16];
      const unreadList = tempViewList
                    .filter((item) => !item.consultantReadTime);
      const readList = tempViewList
                    .filter((item) => item.consultantReadTime)
                    .map((item) => ({ ...item, sortTime: new Date(item.consultantReadTime)}))
          .filter(item => item.communicateStatus === this.contactStatus.RESERVED)
          .map((item) => ({ ...item, sortTime: new Date(item.lastModifiedDate)}))
                    .sort((preItem, nextItem) => +nextItem.sortTime - +preItem.sortTime);
      this.appointmentList = [ ...unreadList, ...readList];
      this.filterList = this.appointmentList;
      this.filterList = tempViewList;
      this.getCurrentPage();
    }
PAMapp/pages/myAppointmentList/closedList.vue
@@ -74,8 +74,8 @@
    @Watch('myAppointmentList')
    onMyAppointmentListChange() {
        this.closedList = (this.myAppointmentList || [])
            .filter(item => item.communicateStatus === this.contactStatus.DONE || item.communicateStatus === this.contactStatus.CLOSE)
            .map((item) => ({...item, sortTime: new Date(item.contactTime)}))
            .filter(item => item.communicateStatus === this.contactStatus.DONE || item.communicateStatus === this.contactStatus.CLOSE || item.communicateStatus === this.contactStatus.CANCEL)
            .map((item) => ({...item, sortTime: new Date(item.lastModifiedDate)}))
            .sort((prevItem, nextItem) => +nextItem.sortTime - +prevItem.sortTime);
        this.filterList = this.closedList;
        this.itemSum = this.closedList.length;