File was renamed from PAMapp/pages/questionnaire/index.vue |
| | |
| | | <i class="icon-down down-icon " style="margin-right:18px" @click="showJobDrawer = true" ></i> |
| | | </div> |
| | | <div class="ques-footer pt-30"> |
| | | <el-button type="primary" @click="sendReserve = true">送出</el-button> |
| | | <el-button type="primary" @click="sentDemand">送出</el-button> |
| | | </div> |
| | | |
| | | <PopUpFrame :isOpen.sync="showDrawer" :drawerSize=" '95%' "> |
| | |
| | | <el-button type="primary" class="job-drawerBtn" @click="showJobDrawer = false">確定</el-button> |
| | | </div> |
| | | </PopUpFrame> |
| | | <PopUpFrame :isOpen.sync="sendReserve"> |
| | | <PopUpFrame :isOpen.sync="sendReserve" @update:isOpen="closeReservePopUp"> |
| | | <div class="fz-20 mt-30 sendReserve-txt">預約成功!您預約的保險顧問會</div> |
| | | <div class="fz-20 sendReserve-txt">儘速與您聯絡!</div> |
| | | <div class="qa-dialog-footer mdTxt" @click="sendReserve = false"><p>我知道了</p></div> |
| | | <div class="qa-dialog-footer mdTxt" @click="closeReservePopUp"><p>我知道了</p></div> |
| | | </PopUpFrame> |
| | | </div> |
| | | </template> |
| | | <script lang="ts"> |
| | | import { Vue, Component } from 'vue-property-decorator'; |
| | | import { appointmentDemand } from '~/assets/ts/api/consultant'; |
| | | |
| | | @Component |
| | | export default class Questionnaire extends Vue { |
| | |
| | | mobileNumber = ''; |
| | | email = ''; |
| | | inputValue=''; |
| | | selectedQuestion = []; |
| | | selectedQuestion: SelectedQuestion[] = []; |
| | | // staff:'in'|'out'|'jobOther'='in'; |
| | | staff = '外勤'; |
| | | |
| | |
| | | content:'匹配度是透過嚴選配對或快速篩選後,將每一位保險顧問資料進行比對後排序推薦給您的媒合數值,您可以作為選擇適合顧問的參考值。' |
| | | }, |
| | | ] |
| | | |
| | | agentNo!: string; |
| | | |
| | | get disableActionButton(): boolean { |
| | | return true; |
| | |
| | | return this.connectDevices.includes('email'); |
| | | } |
| | | |
| | | mounted() { |
| | | this.agentNo = this.$route.params.agentNo; |
| | | } |
| | | |
| | | toggleConnectDevice(selectDevice: 'mobile' | 'email'): void { |
| | | const deviceSelected = this.connectDevices.includes(selectDevice); |
| | | if (deviceSelected) { |
| | |
| | | this.connectDevices.push(selectDevice); |
| | | } |
| | | |
| | | sentDemand() { |
| | | const data = { |
| | | phone: '09123456789', |
| | | email: this.email, |
| | | contactType: this.connectDevices.toString(), |
| | | gender: this.gender, |
| | | age: this.age, |
| | | job: this.staff, |
| | | requirement: this.getRequirement(), |
| | | hopeContactTime: this.getHopeContactTime(), |
| | | otherRequirement: '', |
| | | agentNo: this.agentNo |
| | | } |
| | | appointmentDemand(data).then(res => { |
| | | this.sendReserve = true |
| | | }) |
| | | } |
| | | |
| | | getRequirement() { |
| | | const requirement = this.selectedQuestion.filter(item => item.selected) |
| | | return requirement.map(item => item.name).toString(); |
| | | } |
| | | |
| | | getHopeContactTime() { |
| | | const initScheduleList = this.initScheduleList.map(item => { |
| | | return { |
| | | selectWeekOptions: item.selectWeekOptions.toString(), |
| | | selectTimesOptions: item.selectTimesOptions.toString() |
| | | } |
| | | }) |
| | | |
| | | return initScheduleList.map(i => { |
| | | return `'${i.selectWeekOptions},${i.selectTimesOptions}'`} |
| | | ).toString() |
| | | } |
| | | |
| | | closeReservePopUp() { |
| | | this.sendReserve = false; |
| | | this.$router.push('/') |
| | | } |
| | | } |
| | | |
| | | export interface SelectedQuestion { |
| | | name: string; |
| | | selected: boolean; |
| | | } |
| | | </script> |
| | | <style lang="scss"> |