From 7adcfedc03d8b94c3cbbf896ef2f6825361afaf5 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 20 一月 2022 15:42:49 +0800
Subject: [PATCH] Update:TODO 約訪通知簡訊判斷

---
 PAMapp/components/Interview/InterviewMsg.vue |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/PAMapp/components/Interview/InterviewMsg.vue b/PAMapp/components/Interview/InterviewMsg.vue
index caa71b6..7ed83ca 100644
--- a/PAMapp/components/Interview/InterviewMsg.vue
+++ b/PAMapp/components/Interview/InterviewMsg.vue
@@ -17,16 +17,18 @@
         :autosize="true"
         placeholder="蝝赤�"
         resize="none"
-        v-model="isInterviewTxt">
+        v-model="interviewTxt">
         </el-input>
 
-      <div class="mdTxt mt-30 mb-10">����赤��挾</div>
-      <DateTimePicker
-        @changeDateTime="interviewTime = $event"
-      ></DateTimePicker>
+      <div v-if="client.phone">
+        <div class="mdTxt mt-30 mb-10">����赤��挾</div>
+        <DateTimePicker
+          @changeDateTime="interviewTime = $event"
+        ></DateTimePicker>
+      </div>
 
       <div class="msg-dialog-btn">
-        <el-button @click="addInterview"  :disabled="!interviewTime">���</el-button>
+        <el-button @click="addInterview"  :disabled="isBtnDisabled">���</el-button>
       </div>
 
         </el-dialog>
@@ -78,6 +80,10 @@
     interviewTime = '';
     //////////////////////////////////////////////////////////////////////
 
+    mounted() {
+      this.interviewTxt = "�憟踝��靽���像����憿批��" + this.loginConsultant.name + "嚗�����������銝膩������蝜�"+"\n"+"隞乩����閰梯�Ⅳ/Email嚗�"+"\n" + this.loginConsultant.phoneNumber + "\n" + this.loginConsultant.email + "\n"+"�甇斗���靘選����蝜恬�����"
+    }
+
     addInterview() {
       const appointmentInformation: ToInformAppointment = {
         appointmentId: this.client.id,
@@ -97,8 +103,9 @@
       this.storeMyAppointmentList();
     }
 
-    get isInterviewTxt() : string{
-      return this.interviewTxt = "�憟踝��靽���像����憿批��" + this.loginConsultant.name + "嚗�����������銝膩������蝜�"+"\n"+"隞乩����閰梯�Ⅳ/Email嚗�"+"\n" + this.loginConsultant.phoneNumber + "\n" + this.loginConsultant.email + "\n"+"�甇斗���靘選����蝜恬�����"
+    get isBtnDisabled() :Boolean {
+      const isFormValid = this.client.phone ? this.interviewTxt && this.interviewTime :this.interviewTxt
+      return !isFormValid
     }
 
 }

--
Gitblit v1.8.0