| | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row |
| | | type="flex" |
| | | class="pam-paragraph"> |
| | | <el-col :span="24" class="pam-field"> |
| | | <div class="pam-field__label pam-progress__label"> |
| | | <div> |
| | | <div class="pam-field__title mb-10"> |
| | | <i class="pam-icon icon-comment" |
| | | ></i>信箱 |
| | | <span class="hint text--bold" v-show="!emailValid">信箱格式有誤</span> |
| | | <span class="hint text--bold" v-show="editInfoValue.email.length === 0">信箱為必填</span> |
| | | </div> |
| | | </div> |
| | | <el-input |
| | | v-model="editInfoValue.email" |
| | | :class="{'is-invalid': !emailValid}" |
| | | ></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | <el-row |
| | | type="flex" |
| | |
| | | awards : '', |
| | | communicationStyle: [] as string[], |
| | | photoBase64 : '', |
| | | phoneNumber : '' |
| | | phoneNumber : '', |
| | | email : '', |
| | | }; |
| | | |
| | | communicationStyleList: string[] = agentCommunicationStyleList; |
| | |
| | | experiences : agentInfo.experiences || '', |
| | | awards : agentInfo.awards || '', |
| | | communicationStyle: agentInfo.communicationStyle || '', |
| | | photoBase64 : '' |
| | | photoBase64 : '', |
| | | email : agentInfo.email || '' |
| | | }; |
| | | |
| | | this.editInfoValue = { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | editAgentInfoSetting(): void { |
| | | console.log('???', this.editInfoValue) |
| | | const editSettingInfo: any = { |
| | | ...this.editInfoValue, |
| | | communicationStyle: this.editInfoValue.communicationStyle.join('、'), |
| | | serveArea: this.editInfoValue.serveArea.join('、'), |
| | | } |
| | | }; |
| | | console.log('!!!', editSettingInfo); |
| | | accountSettingService.editAgentInfoSetting(editSettingInfo).then((res: AgentInfoSetting) => { |
| | | this.isInfoUpdate = true; |
| | | this.updateConsultantDetail(editSettingInfo.agentNo); |
| | |
| | | : true; |
| | | } |
| | | |
| | | get emailValid() { |
| | | const rule = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; |
| | | return this.editInfoValue.email ? rule.test(this.editInfoValue.email) : true; |
| | | } |
| | | |
| | | get isSubmitBtnDisabled(): boolean { |
| | | const isFormValid = this.editInfoValue.name |
| | | && this.editInfoValue.title |
| | |
| | | && this.editInfoValue.phoneNumber.length |
| | | && this.editInfoValue.seniorityYear |
| | | && this.editInfoValue.expertise.length |
| | | && this.editInfoValue.communicationStyle.length; |
| | | && this.editInfoValue.communicationStyle.length |
| | | && this.editInfoValue.email.length; |
| | | return !isFormValid |
| | | } |
| | | } |