保誠-保戶業務員媒合平台
Tomas
2021-11-12 4c470b0d72591bb1732014352d6ac7d2d159547f
PAMapp/pages/questionnaire/_agentNo.vue
@@ -62,8 +62,11 @@
            <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="sentDemand">送出</el-button>
            <el-button type="primary"
            :disabled=" isInitScheduleDisabled || !isSelected"
            @click="sentDemand">送出</el-button>
        </div>
        <PopUpFrame :isOpen.sync="showDrawer" :drawerSize=" '95%' ">
@@ -81,7 +84,7 @@
        <PopUpFrame :isOpen.sync="showJobDrawer" drawerSize='60%'>
            <div class="job-drawerTxt fz-20">
                <div class="subTitle mt-18">職業</div>
                <!-- <p class="mt-30 fz-20" @click="staff ='內勤'" :class="{'jobBtn':staff === '內勤' }">內勤</p> -->
                <div class="radio-btn">
                    <el-radio-group  class="pam-radio-group--col" v-model="staff">
                        <el-radio-button style="margin-top:30px" text-color='#F09491' label="外勤"></el-radio-button>
@@ -98,44 +101,35 @@
            <div class="fz-20 sendReserve-txt">儘速與您聯絡!</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 {
                gender: 'male'|'female' = 'male';
                // connectTarget:'mobile'|'email'='mobile';
                connectDevices = ['1111'];
                connectDevices = new Array();
                mobileNumber = '';
                email = '';
                inputValue='';
                selectedQuestion: SelectedQuestion[] = [];
                // staff:'in'|'out'|'jobOther'='in';
                staff = '外勤';
                age:'20'|'30'|'40'|'50'|'55'|'60'|'70'|'71' = '20';
                showDrawer= false;
                showJobDrawer = false;
                sendReserve = false;
                // datepicker Dto
                initScheduleList=[{
                    selectWeekOptions:[],
                    selectTimesOptions:[],
                    }]
                // editJob(targetJob: string): void {
                //     const isExist = this.jobList.find((job) => job === targetJob);
                //     if (isExist) {
                //         const jobIndex = this.jobList.findIndex((job) => job === targetJob);
                //         this.jobList.splice(jobIndex, 1);
                //     } else {
                //         this.jobList.push(targetJob);
                //     }
                // }
                queaAboutList=[
                    {
                        title:'健康與保障',
@@ -172,6 +166,7 @@
                    return true;
                };
                get isConnectMobile(): boolean {
                    return this.connectDevices.includes('mobile');
                }
@@ -183,15 +178,30 @@
                mounted() {
                    this.agentNo = this.$route.params.agentNo;
                }
                get isSelected() {
                    return this.selectedQuestion.findIndex(i => i.selected)>=0
                }
                toggleConnectDevice(selectDevice: 'mobile' | 'email'): void {
                    const deviceSelected = this.connectDevices.includes(selectDevice);
                    if (deviceSelected) {
                        const deviceIndex = this.connectDevices.findIndex((device) => device === selectDevice);
                        this.connectDevices.splice(deviceIndex, 1);
                        if (selectDevice === 'mobile') {
                            this.initScheduleList = [{
                                selectWeekOptions:[],
                                selectTimesOptions:[],
                            }]
                        }
                        if (selectDevice === 'email') {
                            this.email = '';
                        }
                        return;
                    }
                    this.connectDevices.push(selectDevice);
                }
                sentDemand() {
@@ -233,6 +243,18 @@
                closeReservePopUp() {
                    this.sendReserve = false;
                    this.$router.push('/')
                }
                get isInitScheduleDisabled() {
                    console.log(this.isConnectMobile)
                    if (this.isConnectMobile && this.isConnectEmail) {
                        return !this.initScheduleList[0].selectWeekOptions.length || !this.initScheduleList[0].selectTimesOptions.length || !this.email
                    } else if (this.isConnectMobile) {
                        return !this.initScheduleList[0].selectWeekOptions.length || !this.initScheduleList[0].selectTimesOptions.length
                    } else if (this.isConnectEmail) {
                        return !this.email
                    }
                    return true;
                }
    }
@@ -315,6 +337,7 @@
.ques-footer{
    display: flex;
    justify-content: center;
}
.job-inputDiv{
    height:90px;