From 1d9e7752d67cb7f3f0aa6d7aa90b48eb8fbe388e Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期二, 14 十二月 2021 11:36:11 +0800
Subject: [PATCH] update: TODO#131539 1. 修改編輯預約 wording

---
 PAMapp/pages/questionnaire/_agentNo.vue |   29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/PAMapp/pages/questionnaire/_agentNo.vue b/PAMapp/pages/questionnaire/_agentNo.vue
index 1ed02c8..7426d2d 100644
--- a/PAMapp/pages/questionnaire/_agentNo.vue
+++ b/PAMapp/pages/questionnaire/_agentNo.vue
@@ -126,7 +126,10 @@
     </PopUpFrame>
 
     <PopUpFrame :isOpen.sync="isEditPopup">
-      <div class="text--middle mt-30 sendReserve-txt">��蝜潛�楊頛舫��嚗�</div>
+      <div class="text--middle text--center mb-10">撌脫
+        <span class="bold">{{appointmentTime | formatDate}}</span>
+      �脰�����</div>
+      <div class="text--middle text--center mb-30">��蝜潛�楊頛荔��</div>
       <div class="text--center mdTxt">
         <el-button @click="$router.go(-1)">餈��</el-button>
         <el-button @click="isEditPopup = false" type="primary">蝺刻摩</el-button>
@@ -143,7 +146,6 @@
 import { Consultant } from '~/assets/ts/models/consultant.model';
 import { ContactType } from '~/assets/ts/models/enum/ContactType';
 import { Gender } from '~/assets/ts/models/enum/Gender';
-import { Role } from '~/assets/ts/models/enum/Role';
 
   const roleStorage = namespace('localStorage');
   @Component
@@ -269,6 +271,7 @@
     isEditBtn = false;
 
     appointmentId = 0;
+    appointmentTime = '';
 
     beforeRouteEnter(to: any, from: any, next: any) {
       next(vm => {
@@ -413,7 +416,7 @@
       if (appointmentInfo) {
         const hopeContactTime = appointmentInfo!.hopeContactTime.split("'")
               .filter(item => item && item !== ',');
-        this.appointmentId = appointmentInfo.id;
+        this.getAppointmentId(appointmentInfo);
         return {
             age: appointmentInfo.age,
             agentNo: appointmentInfo.agentNo,
@@ -432,25 +435,21 @@
             requirement: appointmentInfo.requirement.split(',')
           }
       } else {
-        return {
-          age: '',
-          agentNo: '',
-          contactType: '',
-          email: '',
-          gender: '',
-          hopeContactTime: [],
-          job: '',
-          phone: '',
-          requirement: []
-        }
+        return null;
       }
     }
 
+    private getAppointmentId(appointmentInfo) {
+      this.appointmentId = appointmentInfo.id;
+      this.appointmentTime = appointmentInfo.lastModifiedDate
+                  ? appointmentInfo.lastModifiedDate
+                  : appointmentInfo.appointmentDate;
+    }
     @Watch('myConsultantList') onMyConsultantListChange() {
       if (this.isUserLogin && this.myConsultantList.length > 0) {
           const editAppointment = this.getLatestReserved(this.$route.params.agentNo);
 
-          if (editAppointment.agentNo) {
+          if (editAppointment && editAppointment.agentNo) {
             this.myRequest = JSON.parse(JSON.stringify(editAppointment));
             if (!this.$route.query || this.$route.query.edit !== 'true') {
               this.isEditPopup = true;

--
Gitblit v1.8.0