| | |
| | | <template> |
| | | <div> |
| | | <el-row type="flex" class="rowStyle" :class="{'new': !agentInfo.customerViewTime }"> |
| | | <el-row type="flex" class="rowStyle" :class="{'new': !agentInfo.customerViewTime && $route.name !== 'myConsultantList-contactedList' }"> |
| | | <el-col class="flex_column pl-5" :xs="5" :sm="3"> |
| | | <UiAvatar |
| | | :size="50" |
| | |
| | | class="icon-star pam-icon icon--yellow satisfaction" |
| | | style="margin-top: 0"></i> |
| | | <template v-if="isAppointment"> |
| | | <template v-if="agentInfo.appointmentStatus === 'close' |
| | | <template v-if="agentInfo.appointmentStatus === 'closed' |
| | | || agentInfo.appointmentStatus === 'done'"> |
| | | <span v-if="agentInfo.appointmentScore"> |
| | | {{ agentInfo.appointmentScore }} |
| | |
| | | <p>性別:{{gender}}</p> |
| | | <p>年齡:{{appointmentDetail.age | toAgeLabel }}</p> |
| | | <p>職業:{{appointmentDetail.job}}</p> |
| | | <p>需求:{{appointmentDetail.requirement.split(',').join('、')}}</p> |
| | | <p>諮詢方式:{{appointmentDetail.consultationMethod | toConsultationMethod }}</p> |
| | | <p>需求:{{appointmentDetail.requirement ? appointmentDetail.requirement.split(',').join('、') : '--'}}</p> |
| | | <p |
| | | v-for="(item, index) in hopeContactTime" |
| | | :key="index" |
| | |
| | | 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 { |
| | |
| | | } |
| | | 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) { |