<!--pages/regular_visit_details/regular_visit_details.wxml-->
<view class="page">
	<!--创建一个画布，将它移出屏幕外看不到的地方-->
	<canvas class="canvas-code" canvas-id="myQrcode1" style="background:#fff;width:176px;height: 176px; display:block; left:-800rpx;position:absolute;" />
	<!--创建一个画布，将它移出屏幕外看不到的地方-->
	<canvas class="canvas-code" canvas-id="myQrcode2" style="background:#fff;width:176px;height: 176px; display:block; left:-800rpx;position:absolute;" />
	<!-- 基本信息 -->
	<zyh-details-card title="{{isRegular?international.Visiting_information[language]:international.Visit_information[language]}}" regularList="{{regularList}}" status="{{regularList.reviewStatus}}" pageType="常客" isRegular="{{isRegular}}" language="{{language}}" clickPage="{{clickPage}}" qrCode1="{{qrCode1}}" qrCode2="{{qrCode2}}" qrCodeType="{{qrCodeType}}" bind:showBtn="getShowBtn" pageType="visit"></zyh-details-card>
	<!-- 单子待审核&常客进入 -->
	<view class="fixed" wx:if="{{regularList.reviewStatus===0&&isRegular&&clickPage==1}}">
		<view class="picker-area" wx:if="{{regularList.name}}">
			<view class="choose">
				<!-- 按钮区-同意/拒绝 -->
				<view class="btn-area" wx:if="{{regularList.name}}">
					<button class="{{reviewStatus==2?'agree':'nor'}}" bindtap="chooseFun" data-type="2">{{international.agree[language]}}</button>
					<button class="{{reviewStatus==1?'reject':'nor'}}" bindtap="chooseFun" data-type="1">{{international.reject[language]}}</button>
				</view>
			</view>
			<view class="margin-l-r" style="{{reviewStatus==1?'display:none;':'' }}">
				<!-- 通道权限 -->
				<van-cell wx:if="{{machineList.length > 0}}" border='{{ false }}' class='label-sm' ref='saveChildRef2' bindtap='showSN'>
					<view slot='title'>
						<!-- <text class="{{snListLength?'text-green':'text-red'}}">*</text> -->
						<text class="van-cell-text">{{international.Channel_access[language]}}</text>
					</view>
					<text>{{snListLength?language=='ch'?('已选择'+snListLength+'个通道'):('has choosed'+snListLength+'passageways'):language=='ch'?'请选择通道权限':'Select passageway'}} </text>
					<van-icon class="icon" name="arrow" />
				</van-cell>
				<zjy-radio-checkbox list="{{machineList}}" range-key="sn" data-type="snList" bind:change="getValue" type="checkbox" chooseBuilding="{{chooseSN}}" className="block" sn="{{true}}" />

				<!-- 人员类型 -->
				<van-cell title="{{international.Personnel_type[language]}}" border="{{ false }}" class="label-sm">
					<zyh-radio-group list="{{personTypeList}}" value="{{personnelType}}" label-key="{{language=='ch'?'name_ch':'name_en'}}" value-key="id" data-type="personnelType" bind:change="getValue"></zyh-radio-group>
				</van-cell>
			</view>
			<!-- 备注 -->
			<van-cell-group border="{{ false }}" wx:if="{{reviewStatus==1}}">
				<van-cell border="{{ false }}" class="label-sm remark-bgc">
					<van-field value="{{ remark }}" type="textarea" placeholder="{{language=='ch'?'请填写备注~':'Input reason'}}" autosize="{{true}}" border="{{ false }}" bindinput="onInput" input-class="textarea" />
				</van-cell>
			</van-cell-group>
			<!-- 按钮区-提交 -->
			<button wx:if="{{ clickPage == 1 }}" class="sure" bindtap="handle">{{international.submit[language]}}</button>
			<!-- 重新下发 -->
		</view>
	</view>
	<view class="btn-area-fixed" wx:if="{{regularList.reviewStatus === 2 && qrCodeType == 3}}" >
		<button  bindtap="visitoryDownFaceAgain">{{international.AgainIssued[language]}}</button>
	</view>
	<view class="btn-area-fixed" wx:if="{{regularList.reviewStatus===0&&isRegular&&clickPage==2}}" >
		<button bindtap="inviteAgain" open-type="share">{{international.AgainInvite[language]}}</button>
	</view>
</view>