<wxs src="../../utils/util/util.wxs" module="util" />
<!--pages/visitor_make/visitor_make.wxml-->
<zyh-navigator showArrow="{{type == 2 ? false : true}}" title="{{international.Visitors_appointment[language]}}" title-style="white" bg-color="#2F6FD1"></zyh-navigator>
<!-- <view> -->
	<!-- {{international.Female_guests[language]}} -->
	<view class="top">
		<view class="top-area"></view>
	</view>
	<view class="top-item">
		<!-- 提示信息-步骤条 -->
		<zyh-dot-line currentIndex="{{currentIndex}}" swiperDx="{{swiperDx}}" width="140" list="{{stepsList}}" language="{{language}}">
		</zyh-dot-line>
		<swiper class="swiper" duration="200" current="{{currentIndex}}" bindtransition="getSwiperPercent" bindanimationfinish="changeSwiper">
			<swiper-item>
				<scroll-view class="scroll-area" scroll-y="true">
					<!-- 拜访楼宇信息 -->
					<view class="card pad nomt">
						<image bindtap="goToChange" class="change-icon" src="../../static/images/change-icon.png" mode="" wx:if="{{userInfo && buildingAdminId}}" />
						<view class="msg_info">{{international.v_b_i[language]}}</view>
						<van-cell border="{{ false }}" class="label-sm">
							<view slot="title">
								<text class="{{buildingAdminId?'text-green':'text-red'}}">*</text>
								<text class="van-cell-text">{{international.Of_building[language]}}</text>
							</view>
							<zyh-picker list="{{buildingList}}" index="{{buildingIndex}}" range-key="name" placeholder="{{[international.select_building[language]]}}" data-type="visiteeBuilding" bind:change="getValue" isAudit="{{disableSelectAdminInfo}}"></zyh-picker>
						</van-cell>
						<!-- 访客认证 -->
						<view class="m-t" wx:if="{{buildingAdminId}}">
							<zyh-face-verify language="{{language}}" bind:certificationState="getCertificationState" bind:updateState="getUpdateState" isDisabled="{{isDisabled}}" userInfo="{{userInfo}}" userType="访客" needLoginList="{{needLoginList}}" needPhoto="{{needPhoto}}" needRealname="{{needRealname}}" needPhone="{{needPhone}}"></zyh-face-verify>
						</view>
						<!-- 额外信息 -->
						<view class="padding-s" wx:if="{{userInfo && buildingAdminId}}">
							<!-- 单位 -->
							<van-cell border="{{ false }}" class="label-sm">
								<view slot="title">
									<text class="{{form.company?'text-green':'text-red'}}">*</text>
									<text class="van-cell-text">{{international.unit[language]}}</text>
								</view>
								<zyh-input value="{{form.company}}" placeholder="{{international.enter_unit[language]}}" data-type="company" bindchange="getValue"></zyh-input>
							</van-cell>
							<!-- 车牌号 -->
							<van-cell title="{{international.License_number[language]}}" border="{{ false }}" class="label-sm">
								<add-car-number value="{{form.carno}}" placeholder="{{international.enter_plate_number[language]}}" data-type="carno" bindchange="getValue"></add-car-number>
							</van-cell>
						</view>
					</view>
					<view style="height: 138rpx;"></view>
					<!-- 按钮区 -->
					<view class="btn-area-one" wx:if="{{isDisabled}}">
						<!-- <button wx:if="{{false}}">认证</button> -->
						<button class="{{stepsList[0].complete?'bg-blue':'bg-grey'}}" disabled="{{!stepsList[0].complete}}" bindtap="next_step">{{international.next_step[language]}}</button>
					</view>
				</scroll-view>
			</swiper-item>


			<swiper-item>
				<scroll-view class="scroll-area" scroll-y="true">
					<!-- 拜访信息填写 -->
					<view class="card card-cont nomt">
						<view class="msg_info">{{international.Visit_information[language]}}</view>
						<!-- 受访人手机号 -->
						<van-cell wx:if="{{buildingCheckType==1}}" border="{{ false }}" class="label-sm">
							<view slot="title">
								<text class="{{form.visiteePhone?'text-green':'text-red'}}">*</text>
								<text class="van-cell-text">{{international.number_person_interviewed[language]}}</text>
							</view>
							<!-- <input type="number" value="{{form.visiteePhone}}" maxLength="{{11}}" placeholder="{{international.enter_number[language]}}" data-type="visiteePhone" bindchange="getValue" disabled="{{isAudit}}" /> -->
							<zyh-input type="number" value="{{form.visiteePhone}}" maxLength="{{11}}" placeholder="{{international.enter_number[language]}}" data-type="visiteePhone" bindchange="getValue" disabled="{{isAudit}}"></zyh-input>
						</van-cell>
						<!-- 受访单位 -->
						<view wx:if="{{companyList.length>0}}">
							<van-cell border="{{ false }}" class="label-sm">
								<view slot="title">
									<text class="{{companyIndex||companyIndex==0?'text-green':'text-red'}}">*</text>
									<text class="van-cell-text">{{international.Of_unit[language]}}</text>
								</view>
								<zyh-picker list="{{companyList}}" index="{{companyIndex}}" range-key="companyName" placeholder="{{[international.select_interviewee[language]]}}" data-type="visiteeCompany" bind:change="getValue" isAudit="{{isAudit}}"></zyh-picker>
							</van-cell>
						</view>
						<van-cell border="{{ false }}" class="label-sm" wx:if="{{companyList.length > 0}}">
							<view slot="title">
								<text class="{{form.visiteeXm?'text-green':'text-red'}}">*</text>
								<text class="van-cell-text">{{international.Name_nterviewee[language]}}</text>
							</view>
							<zyh-input value="{{form.visiteeXm}}" placeholder="{{international.enterName_nterviewee[language]}}" data-type="visiteeXm" bindchange="getValue" isAudit="{{true}}">
							</zyh-input>
						</van-cell>
						<van-cell border="{{ false }}" class="label-sm">
							<view slot="title">
								<text class="{{reasonIndex!=null?'text-green':'text-red'}}">*</text>
								<text class="van-cell-text">{{international.Visit_for[language]}}</text>
							</view>
							<zyh-picker list="{{reasonList}}" index="{{reasonIndex}}" range-key="name" placeholder="{{[international.select_occasion[language]]}}" data-type="reason" bind:change="getValue" isAudit="{{isAudit}}"></zyh-picker>
						</van-cell>
						<!-- 人员类型 -->
						<van-cell wx:if="{{type===2}}" title="{{international.Personnel_type[language]}}" border="{{ false }}" class="label-sm">
							<zyh-radio-group list="{{personTypeList}}" value="{{personTypIndex}}" label-key="{{language=='ch'?'name_ch':'name_en'}}" value-key="id" data-type="personnelType" bind:change="getValue" isAudit="{{isAudit}}"></zyh-radio-group>
						</van-cell>
						<van-cell wx:if="{{companyList.length>0}}" title="{{international.start_time[language]}}" border="{{ false }}" class="label-sm">
							<zyh-picker type="date-time" dateTime="{{form.startTime}}" delay="{{0}}" placeholder="{{['请选择日期','请选择时间']}}" data-type="startTime" bind:change="getValue" isAudit="{{isAudit}}">
							</zyh-picker>
						</van-cell>
						<van-cell wx:if="{{companyList.length>0}}" title="{{international.end_time[language]}}" border="{{ false }}" class="label-sm">
							<zyh-picker type="date-time" dateTime="{{form.endTime}}" delay="{{12*60*60*1000}}" placeholder="{{['请选择日期','请选择时间']}}" data-type="endTime" bind:change="getValue" isAudit="{{isAudit}}">
							</zyh-picker>
						</van-cell>
					</view>


					<!-- 三码合一 -->
					<!-- <view class="card card-cont" wx:if="{{threeCodeList.length>0}}">
            <three_yards xcPhone="{{visitorUserInfo.phone}}" startTime="{{startTime}}" hsHour="{{hsHour}}" threeCodeList="{{threeCodeList}}" bind:isthreeYards="isthreeYards" language="{{language}}" buildingId="{{form.visiteeBuildingId}}" />
          </view> -->
					<!-- 自定义字段 -->
					<custom-field wx:if="{{isShowApplet}}" pageType="访客" orgId="{{buildingAdminId}}" customField="{{customField}}" bind:isFillFields="isFillFields" currentIndex="{{currentIndex}}" />
					<view style="height: 138rpx;"></view>
					<!-- 按钮区 -->
					<view class="btn-area-two">
						<button class="bg-blue" bindtap="previous_step">{{international.previous_step[language]}}</button>
						<button class="{{stepsList[1].complete?'bg-blue':'bg-grey'}}" disabled="{{!stepsList[1].complete}}" bindtap="submit">{{type===1?international.submit[language]:international.acceptInvitation[language]}}</button>
					</view>
				</scroll-view>
			</swiper-item>
		</swiper>
	</view>
<!-- </view> -->