<view class="containerView public">
    <view class="headView">
        <view class="leftLineTitle">预约信息</view>
    </view>
    <view class="contentView">
        <view class="rowView" bind:tap="jumpIndexBar" data-title="单位">
            <view class="label must">被访单位</view>
            <van-field value="{{ detail.customerName }}" input-class="input" is-link readonly placeholder="请选择" input-align="right" border="{{ false }}" />
        </view>
        <view class="rowView" bind:tap="jumpIndexBar" data-title="人员">
            <view class="label must">被访人姓名</view>
            <van-field value="{{ detail.username }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" input-align="right" />
        </view>
        <view class="rowView" bind:tap="jumpIndexBar" data-title="人员">
            <view class="label must">被访人电话</view>
            <van-field value="{{ detail.mobile }}" is-link readonly input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
        </view>
        <view class="rowView">
            <view class="label must">访客姓名</view>
            <van-field value="{{ detail.name }}" bind:input="fieldInput" data-name="name" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
        </view>
        <view class="rowView">
            <view class="label must">手机号码</view>
            <van-field value="{{ detail.phone }}" bind:input="fieldInput" data-name="phone" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
        </view>
        <view class="rowView">
            <view class="label must">身份证类型</view>
            <van-field value="{{ detail.cardType }}" input-class="input" is-link readonly placeholder="请选择" arrow-direction="down" border="{{ false }}" input-align="right" bind:tap="showIdcardType" />
        </view>
        <view class="rowView">
            <view class="label must">身份证号</view>
            <van-field value="{{ detail.cardNo }}" bind:input="fieldInput" data-name="cardNo" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
        </view>
        <view class="rowView" bind:tap="showVisitTime">
            <view class="label must">到访时间</view>
            <van-field value="{{ detail.visitTime }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" arrow-direction="down" input-align="right" />
        </view>
        <view class="rowView" bind:tap="showLeaveTime">
            <view class="label must">离开时间</view>
            <van-field value="{{ detail.leaveTime }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" arrow-direction="down" input-align="right" />
        </view>

        <view class="rowView">
            <view class="label must">来访事由</view>
            <van-field value="{{ detail.visitContent }}" bind:input="fieldInput" data-name="visitContent" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
        </view>
        <view class="rowView">
            <view class="label must">访客照片</view>
            <van-field style="visibility: hidden;" />
        </view>
    </view>

    <!-- 上传图片 -->
    <view class="uploadImgView">
        <van-uploader file-list="{{ fileList }}" upload-text="点击上传照片" use-before-read bind:before-read="beforeRead" bind:after-read="afterRead" deletable="{{ true }}" bind:delete="deleteImg" max-count="1" />
        <view class="tipsView">提示:请保持五官清晰，以方便系统精准识</view>
    </view>

    <!-- 提交 -->
    <view class="submitBtnView" bind:tap="submitData">提交</view>

</view>

<!-- 消息通知 -->
<van-notify id="van-notify" />

<!-- 选择-身份证类型 -->
<van-action-sheet description="请选择身份证类型" close-on-click-overlay="{{true}}" show="{{ idcardTypeShow }}" actions="{{ idcardTypeList }}" bind:select="selectIdcardType" bind:close="closeIdcardType" />

<!-- 选择-到访时间 -->
<van-popup show="{{ visitTimeShow }}" position="bottom" custom-style="height: 50vh;" bind:close="closeVisitTime">
    <van-datetime-picker type="datetime" value="{{ visitTimeDate }}" min-date="{{ visitTimeMinDate }}" bind:confirm="confirmVisitTime" bind:cancel="closeVisitTime" />
</van-popup>

<!-- 选择-离开时间 -->
<van-popup show="{{ leaveTimeShow }}" position="bottom" custom-style="height: 50vh;" bind:close="closeLeaveTime">
    <van-datetime-picker type="datetime" value="{{ leaveTimeDate }}" min-date="{{ visitTimeDate }}" bind:confirm="confirmLeaveTime" bind:cancel="closeLeaveTime" />
</van-popup>