fixed: npm run generate fail
| | |
| | | return service.get('/appointment/getDetail/'+apointmentId, {headers}) |
| | | } |
| | | export interface Consultants { |
| | | agentNo: string, |
| | | name: string, |
| | | img: string, |
| | | new: boolean, |
| | | avgScore: number, |
| | | expertise: string[], |
| | | updateTime: Date, |
| | | seniority: string, |
| | | contactStatus?: string; |
| | | agentNo : string, |
| | | name : string, |
| | | img : string, |
| | | new : boolean, |
| | | avgScore : number, |
| | | expertise : string[], |
| | | updateTime : Date, |
| | | seniority : string, |
| | | contactStatus? : string; |
| | | latestAppointmentId: number; |
| | | role: string; |
| | | image?: string; |
| | | expertises?: string; |
| | | role : string; |
| | | image? : string; |
| | | expertises? : string; |
| | | } |
| | | |
| | | export interface FastQueryParams { |
| | | gender: string, |
| | | gender : string, |
| | | communicationStyles: string[], |
| | | avgScore: number, |
| | | status: string |
| | | avgScore : number, |
| | | status : string |
| | | } |
| | | |
| | | export interface AppointmentRequests { |
| | | phone:string, |
| | | email:string, |
| | | contactType:string, |
| | | gender:string, |
| | | age:string, |
| | | job:string, |
| | | requirement:string, |
| | | hopeContactTime:string[], |
| | | otherRequirement:string, |
| | | agentNo:string, |
| | | phone : string, |
| | | email : string, |
| | | contactType : string, |
| | | gender : string, |
| | | age : string, |
| | | job : string, |
| | | requirement : string[], |
| | | hopeContactTime: ContactTime[], |
| | | agentNo : string, |
| | | } |
| | | export interface ContactTime { |
| | | selectWeekOptions : string[], |
| | | selectTimesOptions: string[] |
| | | } |
| | | export interface AppointmentParams { |
| | | phone?: string, |
| | | email?: string, |
| | | contactType: string, |
| | | gender?: string, |
| | | age?: string, |
| | | job?: string, |
| | | requirement: string, |
| | | hopeContactTime?: string, |
| | | agentNo: string |
| | | phone : string, |
| | | email : string, |
| | | contactType : string, |
| | | gender : string, |
| | | age : string, |
| | | job : string, |
| | | requirement : string, |
| | | hopeContactTime: string, |
| | | agentNo : string |
| | | } |
| | | export interface StrictQueryParams{ |
| | | gender: string; |
| | |
| | | name: string, |
| | | /** "SMS":Otp發送手機,"EMAIL":Otp發email */ |
| | | contactType: string |
| | | } |
| | | } |
| | |
| | | <div class="pam-career"> |
| | | <div class="subTitle">職業</div> |
| | | <el-radio-group class="pam-single__select--col" v-model="career" @change="handleChange"> |
| | | <el-radio-button v-for="(career,index) in options" |
| | | :key="index" |
| | | <el-radio-button v-for="(career,index) in options" |
| | | :key="index" |
| | | :label="career.label"> |
| | | {{career.title}} |
| | | </el-radio-button> |
| | | </el-radio-group> |
| | | <div class="mt-10" v-if="career === '其他'"> |
| | | <input class="pam-career__other-input" |
| | | <input class="pam-career__other-input" |
| | | :class="{'warning':!career_Other}" |
| | | v-model="career_Other" > |
| | | v-model="career_Other" > |
| | | </div> |
| | | <el-button type="primary" |
| | | <el-button type="primary" |
| | | class="pam-career__confirm" |
| | | :disabled="isCareerVerifyFailed" |
| | | :disabled="isCareerVerifyFailed" |
| | | @click="patchCareer"> |
| | | 確定 |
| | | </el-button> |
| | | </div> |
| | | </PopUpFrame> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | |
| | | import * as _ from 'lodash'; |
| | | @Component |
| | | export default class CareerSelect extends Vue { |
| | | @PropSync('careerSelect',{ type: String, default :''}) syncCareerSelect :string; |
| | | @PropSync('careerSelect',{ type: String, default :''}) syncCareerSelect! :string; |
| | | showJobDrawer = false; |
| | | career=''; |
| | | career_Other=''; |
| | |
| | | } |
| | | ]; |
| | | get isCareerVerifyFailed():boolean{ |
| | | return !this.career || (_.isEqual(this.career,'其他')&&!this.career_Other) ; |
| | | return !this.career || (_.isEqual(this.career,'其他')&&!this.career_Other) ; |
| | | } |
| | | handleChange(event:any):void{ |
| | | if(event !== '其他'){ |
| | |
| | | this.career = '其他'; |
| | | this.career_Other = this.syncCareerSelect; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | patchCareer():boolean { |
| | |
| | | margin-top: 30px; |
| | | } |
| | | |
| | | </style> |
| | | </style> |
| | |
| | | <div class="ques-page--reset"> |
| | | <div class="ques-header"> |
| | | <div class="ques-header__mob-banner"></div> |
| | | <div class="ques-header__info" v-if="myRequest.contactType==='phone'"> |
| | | <div |
| | | class="ques-header__info" |
| | | v-if="myRequest.contactType==='phone'"> |
| | | <div class="text--middle"> |
| | | <div class="mdTxt">你指定的聯繫方式</div> |
| | | <div class="mt-10"> |
| | |
| | | <div class="mdTxt">其他備用聯繫方式</div> |
| | | <div class="ques-header__input-block"> |
| | | <span>Email:</span> |
| | | <input class="ques-header__input" |
| | | <input class="ques-header__input" |
| | | placeholder="請輸入" |
| | | v-model="myRequest.email"> |
| | | </div> |
| | |
| | | <span v-show="!phoneValid">手機號碼格式有誤</span> |
| | | </div> |
| | | </div> |
| | | <div class="mt-30" v-if="checkPhoneLength&&phoneValid"> |
| | | <div class="mt-30" v-if="phoneValid"> |
| | | <div class="datepicker"> |
| | | <span class="mdTxt">手機連絡的方便時間</span> |
| | | <PhoneContactTimePicker |
| | |
| | | </div> |
| | | <div class="pam-paragraph ques-footer"> |
| | | <el-button type="primary" |
| | | :disabled="isRequiredByInit || !phoneValid" |
| | | :disabled="isDisabledSubmitBtn" |
| | | @click.native="sentDemand"> |
| | | 送出 |
| | | </el-button> |
| | |
| | | import { Gender } from '~/assets/ts/models/enum/Gender'; |
| | | import { ContactType } from '~/assets/ts/models/enum/ContactType'; |
| | | import _ from 'lodash'; |
| | | |
| | | @Component |
| | | export default class Questionnaire extends Vue { |
| | | genderOptions=[ |
| | |
| | | label:Gender.FEMALE, |
| | | } |
| | | ]; |
| | | |
| | | requirementOptions=[ |
| | | { |
| | | title:'健康與保障', |
| | |
| | | label:'分紅保單相關', |
| | | }, |
| | | ]; |
| | | |
| | | ageRangeOptions=[ |
| | | { |
| | | title:'20歲以下', |
| | |
| | | label:'over_71', |
| | | } |
| | | ]; |
| | | |
| | | quesAboutList = [ |
| | | { |
| | | title:'健康與保障', |
| | |
| | | content:'匹配度是透過嚴選配對或快速篩選後,將每一位保險顧問資料進行比對後排序推薦給您的媒合數值,您可以作為選擇適合顧問的參考值。' |
| | | } |
| | | ]; |
| | | myRequest= { |
| | | phone:this.userInfo?.phone ? this.userInfo.phone :'', |
| | | email:this.userInfo?.email ? this.userInfo.email :'', |
| | | contactType:_.includes(this.userInfo.contactType,ContactType.SMS) ? ContactType.PHONE : ContactType.EMAIL , |
| | | |
| | | myRequest: AppointmentRequests = { |
| | | phone: this.userInfo?.phone ? this.userInfo.phone :'', |
| | | email: this.userInfo?.email ? this.userInfo.email :'', |
| | | contactType: _.isEqual(this.userInfo.contactType,ContactType.SMS) ? ContactType.PHONE : ContactType.EMAIL , |
| | | gender: '', |
| | | age: '', |
| | | job: '', |
| | | requirement: [], |
| | | hopeContactTime: [{ |
| | | selectWeekOptions:[], |
| | | selectTimesOptions:[], |
| | | selectWeekOptions: [], |
| | | selectTimesOptions: [], |
| | | }], |
| | | agentNo:this.$route.params.agentNo, |
| | | agentNo: this.$route.params.agentNo, |
| | | }; |
| | | |
| | | showDrawer= false; |
| | |
| | | this.myRequest = storageMyRequest; |
| | | } |
| | | } |
| | | get phoneValid():boolean{ |
| | | |
| | | get phoneValid(): boolean { |
| | | const rule = /^09[0-9]{8}$/; |
| | | return this.myRequest.phone ? rule.test(this.myRequest.phone) : true; |
| | | return this.myRequest.phone ? rule.test(this.myRequest.phone) && _.isEqual(this.myRequest.phone.length,10) : true; |
| | | } |
| | | get userInfo():RegisterInfo{ |
| | | const initUserInfo = JSON.parse(localStorage.getItem('userInfo')); |
| | | |
| | | get userInfo(): RegisterInfo { |
| | | const initUserInfo = JSON.parse(localStorage.getItem('userInfo')!); |
| | | return initUserInfo; |
| | | } |
| | | |
| | | get isMainContractPhoneByLocalStorage():boolean{ |
| | | return true; |
| | | get isDisabledSubmitBtn(): boolean { |
| | | return _.includes(this.myRequest.contactType,ContactType.PHONE) |
| | | ? !this.isHopeContactTimeDone() |
| | | : !this.phoneValid; |
| | | } |
| | | |
| | | get isRequiredByInit():boolean{ |
| | | return _.includes(this.myRequest.contactType,ContactType.PHONE) |
| | | ? !this.isHopeContactTimeDone() |
| | | :false; |
| | | } |
| | | get checkPhoneLength():boolean{ |
| | | return _.isEqual(this.myRequest.phone.length,10); |
| | | } |
| | | private isHopeContactTimeDone():boolean{ |
| | | return this.myRequest.hopeContactTime[0].selectWeekOptions.length >0 && this.myRequest.hopeContactTime[0].selectTimesOptions.length >0; |
| | | } |
| | | |
| | | |
| | | sentDemand() { |
| | | addFavoriteConsultant([this.myRequest.agentNo]).then(res => this.sentAppointmentDemand()); |
| | | } |
| | | |
| | | private sentAppointmentDemand() { |
| | | |
| | | const data: AppointmentParams = { |
| | | ...this.myRequest, |
| | | requirement: _.map(this.myRequest.requirement,o=>o).toString(), |
| | | hopeContactTime:this.phoneValid&&this.checkPhoneLength ? this.getHopeContactTime() :'', |
| | | hopeContactTime:this.phoneValid ? this.getHopeContactTime() :'', |
| | | }; |
| | | |
| | | appointmentDemand(data).then(res => { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | export interface SelectedQuestion { |
| | | name: string; |
| | | selected: boolean; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | margin-bottom: 26px; |
| | | } |
| | | |
| | | //drawer最底下文字樣式 |
| | | .qa-dialog-footer{ |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-bottom: 81px; |
| | | color: #ED1B2E; |
| | | cursor: pointer; |
| | | }//drawer最底下文字樣式 |
| | | } |
| | | |
| | | //送出按鈕樣式與排版 |
| | | .ques-footer{ |
| | | justify-content: center; |
| | | margin: 30px 0; |
| | |
| | | border-style: solid; |
| | | pointer-events: none; |
| | | } |
| | | } |
| | | }//送出按鈕樣式與排版 |
| | | } |
| | | } |
| | | |
| | | //詳細問題drawer中間內容空間大小設置 |
| | | .qa-dialog{ |
| | | overflow-y:auto; |
| | | height: 500px; |
| | | margin-top: 20px; |
| | | }//詳細問題drawer中間內容空間大小設置 |
| | | } |
| | | |
| | | //詳細問題drawer主要標題 |
| | | .qaTextTitle{ |
| | | margin-top:30px; |
| | | display: flex; |
| | | justify-content: center; |
| | | }//詳細問題drawer主要標題 |
| | | } |
| | | |
| | | .el-button+.el-button{ |
| | | margin-left: 0; |
| | |
| | | } |
| | | } |
| | | |
| | | .ques-page--reset.pam-page-container{ |
| | | .ques-page--reset.pam-page-container { |
| | | margin: 0px auto; |
| | | } |
| | | .ques-header{ |
| | | |
| | | .ques-header { |
| | | position: relative; |
| | | } |
| | | .ques-header__mob-banner{ |
| | | |
| | | .ques-header__mob-banner { |
| | | width: 100%; |
| | | min-height: 80px; |
| | | background-color: #F8F9FA; |
| | |
| | | background-size: cover; |
| | | background-position: center; |
| | | } |
| | | .ques-header__info{ |
| | | |
| | | .ques-header__info { |
| | | position: relative; |
| | | padding:30px 20px; |
| | | margin: 0px 20px; |
| | | background-color: #B3E7E3; |
| | | border-radius: 10px; |
| | | } |
| | | .ques-header__input-block{ |
| | | |
| | | .ques-header__input-block { |
| | | display: flex; |
| | | align-items: center; |
| | | @extend .text--middle,.mt-10 ; |
| | |
| | | } |
| | | } |
| | | |
| | | .ques-container{ |
| | | .ques-container { |
| | | position: relative; |
| | | margin: 0px 20px; |
| | | } |