保誠-保戶業務員媒合平台
Tomas
2023-09-07 8f60f9800584d6918d7bcda66ed18f8773a25f25
PAMapp/components/Consultant/ConsultantCard.vue
@@ -175,15 +175,15 @@
                return upperNumber[index];
            }
        },
        formatHopeContactTime(item: string): string {
      formatHopeContactTime(item: string): string {
        if (item) {
            const [hopeDay, hopeTime] = item.split('、');
            const day = hopeDay.split(',').length > 6 ? '不限日期' : hopeDay;
            const time = hopeTime.split(',').length > 3 ? '不限時間' : hopeTime;
            return `${day}、${time}`;
            }
            return '';
          const [hopeDay, hopeTime] = item.split('、');
          const day = hopeDay.split(',').length > 6 ? '不限日期' : hopeDay;
          const time = hopeTime.split(',').length > 3 ? '不限時間' : hopeTime;
          return `${day}、${time}`;
        }
        return ''; // 修正:移至 if (item) 的內部
      },
    }
})
export default class ConsultantCard extends Vue {
@@ -270,32 +270,35 @@
        }
        return ''
    }
    get actionBtnLabel() {
      const isAppointment = !!this.agentInfo['appointmentStatus'];
      if (isAppointment) {
        if (this.agentInfo['appointmentStatus'] === 'contacted') {
            return '已聯絡';
        }
        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.contactStatus === 'reserved') {
            return '已預約';
        }
  get actionBtnLabel() {
    const isAppointment = !!this.agentInfo['appointmentStatus'];
    if (isAppointment) {
      if (this.agentInfo['appointmentStatus'] === 'contacted') {
        return '已聯絡';
      }
        return '進行預約';
      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.contactStatus === 'reserved') {
        return '已預約';
      }
    }
    return '進行預約';
  }
    get actionBtnStyle() {
      const isAppointment = !!this.agentInfo['appointmentStatus'];
      if (isAppointment) {