reservation.vue 4.7 KB

<template>
	<div class="reservation-container">
		<div class="gird-g form">

			<div class="pure-u-1 pure-u-md-1-2 form-item">
				<div class="label">
					<div class="icon"><img src="@/assets/images/reservation/icon-re-name.png"></div> {{$t('reservation.name')}}
				</div>
				<div class="ipt-wrap">
					<input :placeholder="$t('reservation.namePlaceholder')" class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="data.name">
				</div>
				<div class="validator" v-if="errorTips.e1.length > 0">
					<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e1}}
				</div>
			</div>

			<div class="pure-u-1 pure-u-md-1-2 form-item">
				<div class="label">
					<div class="icon"><img src="@/assets/images/reservation/icon-re-contact.png"></div>{{$t('reservation.contactType')}}
				</div>
				<div class="ipt-wrap">
					<div class="down-arrow"></div>
					<select class="ipt" v-model="data.contactType">
						<option v-for="(item,index) in contactTypes" :key="index" :value="item">{{item}}</option>
					</select>
				</div>
			</div>

			<div class="pure-u-1 pure-u-md-1-2 form-item">
				<div class="label">
					<div class="icon"><img src="@/assets/images/reservation/icon-re-phone.png"></div>{{$t('reservation.contact')}}
				</div>
				<div class="ipt-wrap">
					<input :placeholder="$t('reservation.contactPlaceholder')" class="ipt" :class="{err : errorTips.e3.length > 0}" type="text" v-model="data.contactMethod">
				</div>
				<div class="validator" v-if="errorTips.e3.length > 0">
					<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e3}}
				</div>
			</div>

			<div class="pure-u-1 pure-u-md-1-2 form-item">
				<div class="label">
					<div class="icon"><img src="@/assets/images/reservation/icon-re-clock.png"></div>{{$t('reservation.reservationType')}}
				</div>
				<div class="ipt-wrap">
					<div class="down-arrow"></div>
					<select class="ipt" v-model="data.reservationType">
						<option v-for="(item,index) in reservationTypes" :key="index" :value="item">{{item}}</option>
					</select>
				</div>
			</div>

			<div class="pure-u-1 form-item">
				<div class="label">
					<div class="icon"><img src="@/assets/images/reservation/icon-re-arrow-reservation.png"></div>{{$t('reservation.reservationRemark')}}
				</div>
				<div class="ipt-wrap">
					<textarea :placeholder="$t('reservation.reservationRemarkPlaceholder')" class="ipt textarea" :class="{err : errorTips.e5.length > 0}" v-model="data.instruction"></textarea>
				</div>
				<div class="validator" v-if="errorTips.e5.length > 0">
					<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e5}}
				</div>
			</div>

			<div class="pure-u-1 form-item form-item2">
				<div class="label">
					<div class="icon"><img src="@/assets/images/reservation/icon-re-custom.png"></div>{{$t('reservation.hkClient')}}
				</div>
				<div class="cont">
					<div class="boo-btn pointer" :class="{active:isHkCus}" @click="isHkCus=true">{{$t('reservation.yes')}}</div>
					<div class="boo-btn pointer" :class="{active:!isHkCus}" @click="isHkCus=false">{{$t('reservation.no')}}</div>
				</div>
			</div>

			<!-- 联络时间 -->
			<div class="pure-u-1 form-item">
				<div class="form-item3">
					<div class="label">
						<div class="icon"><img src="@/assets/images/reservation/icon-re-calendar.png"></div>{{$t('reservation.contactTime')}}
					</div>
					<div class="ipt-wrap">
						<!-- <input class="ipt" type="date" v-model="data.contactDate" :class="{err : errorTips.e7.length > 0}"> -->
						<date-picker v-model="data.contactDate"></date-picker>
					</div>
					<div class="validator" v-if="errorTips.e7.length > 0">
						<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e7}}
					</div>
					<div class="mt8">
						<div class="label">
						</div>
						<!-- <div class="calendar">
								<img src="@/assets/images/reservation/re-calendar.png">
							</div> -->
					</div>
				</div>
			</div>

		</div>

		<div class="box notice">
			<p class="notice-item">
				<img class="notice-item-icon" src="@/assets/images/reservation/icon-re-notice.png"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{$t('reservation.notice1')}}
			</p>
			<p class="notice-item pointer" @click="checked = !checked">
				<img v-if="!checked" class="notice-item-icon" src="@/assets/images/reservation/un-check.png">
				<img v-else class="notice-item-icon" src="@/assets/images/reservation/check.png"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{$t('reservation.notice2')}}
			</p>
		</div>

		<div class="submit-btn" :class="{disabled : !checked}" @click="submitHandler">
			{{$t('customService.reservation.submitBtn')}}
		</div>
	</div>
</template>

<script src="./reservation.js"></script>
<style lang="scss" scoped>
@import "./reservation.scss";
</style>