保誠-保戶業務員媒合平台
PAMapp/pages/agentInfo/edit/_agentNo.vue
@@ -263,14 +263,15 @@
const loginStore = namespace('login.store');
@Component
export default class AgentInfoComponent extends Vue {
export default class AgentInfoEditComponent extends Vue {
  @localStorageTest.State('current_role')
  @localStorageTest.State
  current_role: any;
  @loginStore.Action
  updateConsultantDetail!: (agentInfo: AgentInfo) => AgentInfo;
  updateConsultantDetail!: (agentNo: string) => Promise<AgentInfo>;
  _agentInfoSetting!: AgentInfoSetting;
  defaultAgentInfoSetting!: AgentInfoSetting;
  agentInfo!      : AgentInfo
  fieldInfoDesc   : string = '';
  fieldInfoTitle  : string = '';
@@ -358,7 +359,7 @@
  private setAgentInfo(agentInfo: AgentInfo): void {
    const [agentYear, _yearUnit , agentMonth, _monthUnit] =  agentInfo.seniority.split(" ");
    this._agentInfoSetting = {
    this.defaultAgentInfoSetting = {
      agentNo           : agentInfo.agentNo||'',
      name              : agentInfo.name || '',
      expertise         : agentInfo.expertise || [],
@@ -378,10 +379,10 @@
    };
    this.editInfoValue = {
      ...this._agentInfoSetting,
      expertise          : _.cloneDeep(this._agentInfoSetting.expertise),
      ...this.defaultAgentInfoSetting,
      expertise          : _.cloneDeep(this.defaultAgentInfoSetting.expertise),
      // TODO: 確認後端此欄位後端應改為以" , "隔開 [Tomas, 2021/12/28]
      communicationStyle : this._agentInfoSetting.communicationStyle.split('、'),
      communicationStyle : this.defaultAgentInfoSetting.communicationStyle.split('、'),
    }
  }
@@ -394,8 +395,8 @@
      serveArea: this.editInfoValue.serveArea.join('、'),
    }
    accountSettingService.editAgentInfoSetting(editSettingInfo).then((res: AgentInfoSetting) => {
      this.updateConsultantDetail(editSettingInfo.agentNo);
      this.isInfoUpdate = true;
      this.updateConsultantDetail(editSettingInfo.agentNo);
    });
  }
@@ -426,7 +427,7 @@
  ////////////////////////////////////////////////////////////
  get nameValid(): boolean {
    return !!this.editAgentInfoSetting.name;
    return !!this.defaultAgentInfoSetting?.name;
  }
  get phoneValid(): boolean {