保誠-保戶業務員媒合平台
Mila
2022-01-17 f41af9be6cf3a4edb8b222f6e351bfaa03362085
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;