From 6c4b2c0c41606693fc8c83ac5586a448b8e4c873 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期一, 17 一月 2022 14:32:22 +0800
Subject: [PATCH] Merge branch 'Phase3' of https://dev.pollex.com.tw:8443/r/pcalife/PAM into Phase3

---
 PAMapp/components/Interview/InterviewAdd.vue |   63 +++++++++++++++++++++----------
 1 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/PAMapp/components/Interview/InterviewAdd.vue b/PAMapp/components/Interview/InterviewAdd.vue
index 7d6684b..f88210e 100644
--- a/PAMapp/components/Interview/InterviewAdd.vue
+++ b/PAMapp/components/Interview/InterviewAdd.vue
@@ -6,28 +6,46 @@
       </div>
 
       <div class="mdTxt mb-10">蝝赤����</div>
-      <div class="date-input">
-          2022/01/10 09:00
-          <i class="icon-calender icon"></i>
-      </div>
+      <DateTimePicker
+        @changeDateTime="interviewTime = $event"
+      ></DateTimePicker>
 
-      <div class="mdTxt mb-10">蝝赤蝝����</div>
-      <el-input type="textarea" :rows="5" placeholder="蝝赤�" resize="none">
+      <div class="mdTxt mb-10 mt-10">蝝赤蝝����</div>
+      <el-input
+        type="textarea"
+        :rows="5"
+        placeholder="隢撓�蝝赤蝝����"
+        resize="none"
+        v-model="content"
+      >
       </el-input>
 
       <div class="edit-appointment-record-btn">
           <el-button>����</el-button>
-          <el-button>蝣箏��</el-button>
+          <el-button :disabled="!interviewTime || !content" @click="createInterviewRecord">蝣箏��</el-button>
       </div>
+
+      <PopUpFrame :isOpen.sync="isConfirmPopup"
+        @closePopUp="closeConfirmPopup">
+        <div class="text--center mdTxt">�憓���</div>
+        <div class="text--center mt-30">
+            <el-button @click="closeConfirmPopup" type="primary">蝣箏��</el-button>
+        </div>
+    </PopUpFrame>
   </div>
 </template>
 <script lang="ts">
-import { AppointmentLog } from '~/shared/models/appointment.model';
+import { AppointmentLog, InterviewRecordInfo } from '~/shared/models/appointment.model';
 import { Vue, Component, Prop } from 'nuxt-property-decorator';
 import authService from '~/shared/services/auth.service';
+import appointmentService from '~/shared/services/appointment.service';
 
 @Component
 export default class InterviewAdd extends Vue {
+    interviewTime = '';
+    content = '';
+    isConfirmPopup = false;
+
     // @Prop()
     // myAppointmentReviewLogList!: AppointmentLog[];
 
@@ -37,6 +55,23 @@
     // mounted() {
     //   this.isUserLogin = authService.isUserLogin();
     // }
+
+    createInterviewRecord() {
+        const interviewRecordInfo: InterviewRecordInfo = {
+            content: this.content,
+            interviewDate: this.interviewTime,
+            appointmentId: +this.$route.params.appointmentId
+        }
+        appointmentService.createInterviewRecord(interviewRecordInfo).then(res => {
+            this.isConfirmPopup = true;
+        });
+
+    }
+
+    closeConfirmPopup() {
+        this.isConfirmPopup = false;
+        this.$router.go(-1);
+    }
 
 }
 </script>
@@ -51,18 +86,6 @@
         justify-content: space-between;
         margin-bottom  : 26px;
     }
-}
-.date-input {
-    align-items     : center;
-    background-color: #fff;
-    border          : 1px solid #707070;
-    border-radius   : 5px;
-    display         : flex;
-    font-size       : 20px;
-    height          : 46px;
-    margin-bottom   : 30px;
-    padding-left    : 20px;
-    padding-right   : 20px;
 }
 .icon {
     color          : $PRIMARY_RED;

--
Gitblit v1.8.0