From f7590abfcbb4db299a54aeeeb422d53560e61288 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期二, 03 五月 2022 16:44:34 +0800
Subject: [PATCH] Fixed#138373 修正 [客戶_編輯預約單]客戶已以Email方式註冊並完成預約單後,再次編輯預約單補充手機資訊。此時手機方便聯絡時間無法編輯的狀況

---
 PAMapp/pages/questionnaire/_agentNo.vue |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/PAMapp/pages/questionnaire/_agentNo.vue b/PAMapp/pages/questionnaire/_agentNo.vue
index bf703e4..76fa04d 100644
--- a/PAMapp/pages/questionnaire/_agentNo.vue
+++ b/PAMapp/pages/questionnaire/_agentNo.vue
@@ -402,19 +402,20 @@
 
     private getReservedData(appointmentInfo) {
       if (appointmentInfo) {
-        const hopeContactTime = appointmentInfo!.hopeContactTime.split("'")
-              .filter(item => item && item !== ',');
-        this.getAppointmentId(appointmentInfo);
-
-        return {
-            ...appointmentInfo,
-            hopeContactTime: hopeContactTime.map(item => {
+        const hopeContactTime = appointmentInfo!.hopeContactTime 
+          ?  appointmentInfo!.hopeContactTime.split("'").filter(item => item && item !== ',').map(item => {
                 const info = item.split('��');
                 return {
                     selectWeekOptions: info[0].split(','),
                     selectTimesOptions: info[1].split(',')
                 }
-            }),
+            })
+          :[{selectWeekOptions : [],selectTimesOptions: []}];
+        this.getAppointmentId(appointmentInfo);
+
+        return {
+            ...appointmentInfo,
+            hopeContactTime: hopeContactTime,
             requirement: appointmentInfo.requirement.split(',')
           }
       } else {

--
Gitblit v1.8.0