保誠-保戶業務員媒合平台
Tomas
2021-12-22 f36e617e9e534a4b05f2029724d678bbd6c655b3
PAMapp/pages/questionnaire/_agentNo.vue
@@ -140,13 +140,16 @@
<script lang="ts">
import { Vue, Component, State, Action, Watch, namespace } from 'nuxt-property-decorator';
import { addFavoriteConsultant, appointmentDemand, AppointmentParams, AppointmentRequests ,editAppointment } from '~/shared/api/consultant';
import { getRequestQuestionFromStorage, getRequestsFromStorage, removeRequestQuestionFromStorage, setRequestsToStorage } from '~/shared/storageRequests';
import { getRequestsFromStorage, removeRequestQuestionFromStorage, setRequestsToStorage } from '~/shared/storageRequests';
import _ from 'lodash';
import queryConsultantService from '~/shared/services/query-consultant.service';
import appointmentService from '~/shared/services/appointment.service';
import { Consultant } from '~/shared/models/consultant.model';
import { ContactType } from '~/shared/models/enum/ContactType';
import { Gender } from '~/shared/models/enum/Gender';
import { RegisterInfo } from '~/shared/models/registerInfo';
import { AppointmentParams, AppointmentRequests } from '~/shared/models/appointment.model';
  const roleStorage = namespace('localStorage');
  @Component
@@ -350,7 +353,7 @@
      if (this.isEditBtn) {
        this.sentEditAppointmentDemand();
      } else {
        addFavoriteConsultant([this.$route.params.agentNo]).then(res => this.sentAppointmentDemand());
        queryConsultantService.addFavoriteConsultant([this.$route.params.agentNo]).then(res => this.sentAppointmentDemand());
      }
    }
@@ -363,7 +366,7 @@
          agentNo: this.$route.params.agentNo
        };
        appointmentDemand(data).then(res => {
        queryConsultantService.appointmentDemand(data).then(res => {
            this.sendReserve = true;
            this.myRequest.hopeContactTime = [];
            setRequestsToStorage(this.myRequest);
@@ -378,7 +381,7 @@
          id: this.appointmentId,
          otherRequirement: null
        }
        editAppointment(info).then(res => {
        appointmentService.editAppointment(info).then(res => {
          this.sendReserve = true;
          this.myRequest.hopeContactTime = [];
          setRequestsToStorage(this.myRequest);