保誠-保戶業務員媒合平台
update: 調整 edit agent info (entryData) - 尚缺:初始化打 getAgentInfo 時,沒有 entryData 無法初始化該值
修改3個檔案
39 ■■■■ 已變更過的檔案
PAMapp/pages/agentInfo/edit/_agentNo.vue 33 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/models/account.model.ts 5 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/models/agent-info.model.ts 1 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/agentInfo/edit/_agentNo.vue
@@ -125,18 +125,11 @@
        <UiField :span="12" icon="time" label="最後上線時間">
          {{ agentInfo.latestLoginTime | formatDate }}
        </UiField>
        <UiField :span="12" icon="calender" label="服務資歷">
          <div class="mt-10" style="display: flex; align-items: center">
            <el-input  v-model="editInfoValue.seniorityYear" class="seniority-input" ></el-input>年
            <el-select  style="width:60px" v-model="editInfoValue.seniorityMonth" class="seniority-input">
              <el-option
                v-for="(month) in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]"
                :value="month"
                :key="month">
                {{ month }}
              </el-option>
            </el-select>月
          </div>
        <UiField :span="12" icon="calender" label="到職日期">
          <UiDatePicker
              class="mt-10"
              @changeDate="onChangeDate($event)"
          ></UiDatePicker>
        </UiField>
      </el-row>
@@ -308,8 +301,6 @@
    title             : '',
    serveArea         : [] as string[],
    companyAddress    : '',
    seniorityYear     : 1,
    seniorityMonth    : 0,
    concept           : '',
    experiences       : '',
    awards            : '',
@@ -317,6 +308,7 @@
    photoBase64       : '',
    phoneNumber       : '',
    email             : '',
    entryDate         : ','
  };
  communicationStyleList: string[] = agentCommunicationStyleList;
@@ -380,7 +372,7 @@
  }
  private setAgentInfo(agentInfo: AgentInfo): void {
    const [agentYear, _yearUnit , agentMonth, _monthUnit] =  agentInfo.seniority.split(" ");
    // const [agentYear, _yearUnit , agentMonth, _monthUnit] =  agentInfo.seniority.split(" ");
    this.defaultAgentInfoSetting = {
      agentNo           : agentInfo.agentNo||'',
      name              : agentInfo.name || '',
@@ -391,14 +383,13 @@
      gender            : agentInfo.gender||'',
      phoneNumber       : agentInfo.phoneNumber||'',
      companyAddress    : agentInfo.companyAddress || '',
      seniorityYear     : agentYear? +agentYear : 0,
      seniorityMonth    : agentMonth ? +agentMonth : 0,
      concept           : agentInfo.concept || '',
      experiences       : agentInfo.experiences  || '',
      awards            : agentInfo.awards || '',
      communicationStyle: agentInfo.communicationStyle || '',
      photoBase64       : '',
      email             : agentInfo.email || ''
      email             : agentInfo.email || '',
      entryDate         : agentInfo.entryDate || '',
    };
    this.editInfoValue = {
@@ -423,6 +414,10 @@
      this.isInfoUpdate = true;
      this.updateConsultantDetail(editSettingInfo.agentNo);
    });
  }
  onChangeDate(date: any): void {
    this.editInfoValue.entryDate = date;
  }
  backToInfo() {
@@ -475,7 +470,7 @@
                        && this.editInfoValue.concept
                        && this.editInfoValue.experiences
                        && this.editInfoValue.phoneNumber.length
                        && this.editInfoValue.seniorityYear
                        && this.editInfoValue.entryDate
                        && this.editInfoValue.expertise.length
                        && this.editInfoValue.communicationStyle.length
                        && this.editInfoValue.email.length;
PAMapp/shared/models/account.model.ts
@@ -14,12 +14,13 @@
    gender            : string;
    phoneNumber       : string;
    companyAddress    : string;
    seniorityYear     : number;
    seniorityMonth    : number;
    seniorityYear?    : number;
    seniorityMonth?   : number;
    concept           : string;
    experiences       : string;
    awards            : string;
    communicationStyle: string;
    photoBase64       : string;
    email             : string;
    entryDate         : string;
}
PAMapp/shared/models/agent-info.model.ts
@@ -19,4 +19,5 @@
  serveArea         : string;
  suitability       : number;
  title             : string;
  entryDate?        : string;
}