From 13d66456556a5c0a8f1ed519c01e7bd2f31d2160 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期五, 20 五月 2022 16:17:52 +0800
Subject: [PATCH] Fixed#138869 [發送約訪通知] 顧問手機號碼由半形改為全形送給後端

---
 PAMapp/components/Interview/InterviewMsg.vue |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/PAMapp/components/Interview/InterviewMsg.vue b/PAMapp/components/Interview/InterviewMsg.vue
index 7dedd8f..cbc2813 100644
--- a/PAMapp/components/Interview/InterviewMsg.vue
+++ b/PAMapp/components/Interview/InterviewMsg.vue
@@ -117,15 +117,28 @@
     interviewTxt = '';
 
     @Watch('interviewContent', { immediate: true, deep: true })
-    onInterviewContentChange(): void {
+    onInterviewContentChange() {
       if (this.interviewContent.addContactInfo) {
         if (this.interviewContent.interviewTime) {
           const targetDate = new Date(this.interviewContent.interviewTime);
           this.interviewContent.formattedInterviewTime = `${targetDate.getFullYear()}撟�${targetDate.getMonth() + 1}���${targetDate.getDate()}� ${targetDate.getHours()}���${targetDate.getMinutes()}��;
         }
-        this.interviewTxt = "�憟踝��靽���像����憿批��"+this.loginConsultant.name+"嚗��������"+"\n"+this.interviewContent.customContent+ "\n" ��+ ( this.client.phone || this.defaultValue ? ("�����銝膩������蝜�"+ "\n" + (this.interviewContent.formattedInterviewTime || "(撠����赤��挾)")): "") + "\n" +"隞乩����閰梯�Ⅳ/Email嚗�"+"\n" + (this.loginConsultant.phoneNumber || '(撠���閰梯�Ⅳ)') + "\n" + (this.loginConsultant.email|| '撠���� Email') + "\n"  +"�甇斗���靘選����蝜恬�����";
+        if(this.loginConsultant.phoneNumber){
+          let temp = '';
+          for (var i=0;i<this.loginConsultant.phoneNumber.length;i++) {
+            let charCode = this.loginConsultant.phoneNumber.charCodeAt(i);
+            if(charCode <=126 && charCode>= 33) {
+              charCode += 65248;
+            } else if (charCode ===32) {
+              charCode =12288;
+            }
+            temp = temp + String.fromCharCode(charCode);
+          }
+          this.interviewTxt = "�憟踝��靽���像����憿批��"+this.loginConsultant.name+"嚗��������"+"\n"+this.interviewContent.customContent+ "\n" ��+ ( this.client.phone || this.defaultValue ? ("�����銝膩������蝜�"+ "\n" + (this.interviewContent.formattedInterviewTime || "(撠����赤��挾)")): "") + "\n" +"隞乩����閰梯�Ⅳ/Email嚗�"+"\n" + ( temp || '(撠���閰梯�Ⅳ)') + "\n" + (this.loginConsultant.email|| '撠���� Email') + "\n"  +"�甇斗���靘選����蝜恬�����";
+        }
       } else {
-        this.interviewTxt = this.interviewContent.customContent;
+        // this.interviewTxt = this.interviewContent.customContent;
+        this.interviewTxt = "�憟踝��靽���像����憿批��"+this.loginConsultant.name+"嚗��������"+"\n"+this.interviewContent.customContent+ "\n" ��+ ( this.client.phone || this.defaultValue ? ("�����銝膩������蝜�"+ "\n" + (this.interviewContent.formattedInterviewTime || "(撠����赤��挾)")): "") + "\n" +"隞乩����mail嚗�"+"\n" + (this.loginConsultant.email|| '撠���� Email') + "\n"  +"�甇斗���靘選����蝜恬�����";
       }
     }
 

--
Gitblit v1.8.0