From 3041bdc8daee6f17ab790bbab0bfdbf22f244573 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期四, 27 一月 2022 10:18:51 +0800 Subject: [PATCH] update: [前單] 在相關功能顯示滿意度資訊、打開滿意度相關功能 --- PAMapp/pages/agentInfo/edit/_agentNo.vue | 64 ++++++++++++++++++++++++++----- 1 files changed, 53 insertions(+), 11 deletions(-) diff --git a/PAMapp/pages/agentInfo/edit/_agentNo.vue b/PAMapp/pages/agentInfo/edit/_agentNo.vue index 67235be..82d013a 100644 --- a/PAMapp/pages/agentInfo/edit/_agentNo.vue +++ b/PAMapp/pages/agentInfo/edit/_agentNo.vue @@ -1,16 +1,17 @@ <template> - <div> + <div class="edit-agent-info-page"> <el-row type="flex" justify="center"> - <EditConsultantAvatar :agentNo="agentInfo.agentNo" :photoBase64.sync="editInfoValue.photoBase64"/> + <EditConsultantAvatar + :agentNo="agentInfo.agentNo" + :photoBase64.sync="editInfoValue.photoBase64"/> </el-row> <el-row type="flex" class="pt-10" justify="center" align="middle" v-if="!hideReviews"> - <!-- TODO:���遛��漲 --> <i class="pam-icon icon--primary icon-star"></i> <h3 class="mdTxt">{{ agentInfo.avgScore }}</h3> </el-row> @@ -21,6 +22,29 @@ justify="center"> <el-input class="mdTxt" v-model="editInfoValue.name"></el-input> </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-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" @@ -100,7 +124,7 @@ <MultiSelectBtn class="mt-30" :mutiSelect.sync="editInfoValue.communicationStyle" :options="agentCommunicationStyleList" - @change="selectCommunicationStyles" + :maxLength="2" > </MultiSelectBtn> </div> @@ -203,7 +227,7 @@ @Component export default class AgentInfoComponent extends Vue { - @Prop({type:Object ,}) aa!:any; + @localStorageTest.State('current_role') currentRole!:string | null; @@ -229,10 +253,12 @@ awards : '', communicationStyle: [] as string[], photoBase64 : '', + phoneNumber : '' }; communicationStyleList: string[] = agentCommunicationStyleList; role = Role; + agentExpertList = [ { title:'�摨瑁����', @@ -290,7 +316,6 @@ this.setAgentInfo(this.agentInfo); } - ///////////////////////////////////////////////////////////////////////////// private setAgentInfo(agentInfo: AgentInfo): void { const [agentYear, _yearUnit , agentMonth, _monthUnit] = agentInfo.seniority.split(" "); this._agentInfoSetting = { @@ -321,27 +346,28 @@ } ////////////////////////////////////////////////////////////////////// + editAgentInfoSetting(): void { const editSettingInfo: any = { ...this.editInfoValue, communicationStyle: this.editInfoValue.communicationStyle.join('��'), } accountSettingService.editAgentInfoSetting(editSettingInfo).then((res: AgentInfoSetting) => { - console.log(editSettingInfo) + this.isInfoUpdate = true; }); - this.isInfoUpdate = true; } backToInfo() { this.isInfoUpdate = false this.$router.push(`/agentInfo/${this.agentInfo.agentNo}`); - } + } selectCommunicationStyles(): void { if (this.editInfoValue.communicationStyle.length > 2) { this.editInfoValue.communicationStyle.shift(); } } + alertFieldInfo(field: string): void { this.isAlertFieldInfo = true; switch(field) { @@ -356,6 +382,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 @@ -363,7 +396,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; @@ -373,7 +406,12 @@ </script> -<style lang="scss"> +<style lang="scss" > +.edit-agent-info-page{ + .el-textarea__inner{ + font-size: 15px; +} +} .pam-icon { font-size : 15px; padding-right: 8px; @@ -434,4 +472,8 @@ .el-input--suffix .el-input__inner { padding-right: 20px; } + +.el-textarea__inner{ + font-size: 18px; +} </style> -- Gitblit v1.9.3