From 52af1074673f0dc2c29901516051008a61d955c1 Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期一, 03 一月 2022 15:30:09 +0800 Subject: [PATCH] Update:TODO#132411 顧問編輯帳戶資訊 增加手機選項與檢核 --- PAMapp/pages/agentInfo/edit/_agentNo.vue | 35 +++++++++++++++++++++++++++++++++-- 1 files changed, 33 insertions(+), 2 deletions(-) diff --git a/PAMapp/pages/agentInfo/edit/_agentNo.vue b/PAMapp/pages/agentInfo/edit/_agentNo.vue index cbd0ce3..5cab332 100644 --- a/PAMapp/pages/agentInfo/edit/_agentNo.vue +++ b/PAMapp/pages/agentInfo/edit/_agentNo.vue @@ -27,6 +27,29 @@ <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-phone" + ></i>����Ⅳ + <span class="hint text--bold" v-show="!phoneValid">����Ⅳ�撘�炊</span> + <span class="hint text--bold" v-show="editInfoValue.phoneNumber.length === 0">����Ⅳ�敹‵</span> + </div> + </div> + <el-input + v-model="editInfoValue.phoneNumber" + :class="{'is-invalid': !phoneValid}" + maxlength="10" + minlength="10"></el-input> + </div> + </el-col> + </el-row> + + + <el-row + type="flex" + class="pam-paragraph"> <UiField :span="12" icon="agent" label="����"> <el-input v-model="editInfoValue.title"></el-input> </UiField> @@ -102,7 +125,7 @@ <MultiSelectBtn class="mt-30" :mutiSelect.sync="editInfoValue.communicationStyle" :options="agentCommunicationStyleList" - @change="selectCommunicationStyles" + :maxLength="2" > </MultiSelectBtn> </div> @@ -231,6 +254,7 @@ awards : '', communicationStyle: [] as string[], photoBase64 : '', + phoneNumber : '' }; communicationStyleList: string[] = agentCommunicationStyleList; @@ -359,6 +383,13 @@ } } //////////////////////////////////////////////////////////// + get phoneValid(): boolean { + const rule = /^09[0-9]{8}$/; + return this.editInfoValue.phoneNumber + ? rule.test(this.editInfoValue.phoneNumber) && _.isEqual(this.editInfoValue.phoneNumber.length,10) + : true; + } + get isSubmitBtnDisabled(): boolean { const isFormValid = this.editInfoValue.name && this.editInfoValue.title @@ -366,7 +397,7 @@ && this.editInfoValue.serveArea && this.editInfoValue.concept && this.editInfoValue.experiences - && this.editInfoValue.awards + && this.editInfoValue.phoneNumber.length && this.editInfoValue.seniorityYear && this.editInfoValue.expertise.length && this.editInfoValue.communicationStyle.length; -- Gitblit v1.8.0