保誠-保戶業務員媒合平台
Mila
2021-12-14 1d9e7752d67cb7f3f0aa6d7aa90b48eb8fbe388e
update: TODO#131539 1. 修改編輯預約 wording
修改1個檔案
29 ■■■■ 已變更過的檔案
PAMapp/pages/questionnaire/_agentNo.vue 29 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
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;