<view class="containerView public">
    <!-- 轮播图 -->
    <view class="swiperView">
        <view class="tag">展厅</view>
        <swiper class='swiper-box' indicator-dots autoplay interval="3000" duration="1000" circular='true'>
            <swiper-item wx:for="{{bannerList}}" wx:key="index">
                <image class="img" src="{{IMG_NAME + item}}" mode="aspectFill"></image>
            </swiper-item>
        </swiper>
    </view>

    <!-- 详细信息 -->
    <view class="meetingDetailView">
        <view class="detailView">
            <view class="title">{{detail.capacityNum}}人间 | {{detail.roomName}} | {{detail.buildingName}}</view>
        </view>
        <view class="priceView">
            <view class="price">￥免费</view>
        </view>
    </view>

    <!-- 内容 -->
    <view class="contentView">
        <view class="item">
            <van-icon name="calendar-o" size="54rpx" />
            <view class="time">{{selectDay}}</view>
        </view>
        <view class="item">
            <van-icon name="clock-o" size="54rpx" />
            <view class="time">{{selectCountTime}}</view>
        </view>
        <view class="item">
            <van-icon name="contact-o" size="54rpx" />
            <view class="time">{{userData.username}} {{userData.mobile}}</view>
        </view>
    </view>

    <!-- 填写信息 -->
    <view class="fillMsgView">
        <view class="itemView">
            <view class="label must">展厅主题</view>
            <view class="content">
                <van-field value="{{ formData.title }}" placeholder="请输入展厅主题" input-align="right" border="{{ false }}" bind:change="inputChange" data-name="title" />
            </view>
        </view>
        <view class="itemView">
            <view class="label must">来参观人员</view>
            <view class="content">
                <view class="add" bind:tap="dialogUnfold">请添加
                    <van-icon class="van-icon" name="add-o" size="34rpx" color="#c3c3c3" />
                </view>
            </view>
        </view>
        <view class="itemView grayBg" wx:if="{{personList.length > 0}}">
            <view class="personView">
                <view class="item" wx:for="{{personList}}" wx:key="*this">
                    <view class="data">{{item.name}}</view>
                    <view class="data">{{item.job}}</view>
                    <view class="data">{{item.phone ? item.phone : '-'}}</view>
                    <van-icon name="close" size="34rpx" data-id="{{item.id}}" bind:tap="removePerson" />
                </view>
            </view>
        </view>
        <view class="itemView" bind:tap="showVisitType">
            <view class="label must">参观目的</view>
            <view class="content">
                <van-field value="{{ formData.visitTypeName }}" placeholder="请选择参观目的" input-align="right" border="{{ false }}" readonly is-link arrow-direction="down" bind:change="titleChange" />
            </view>
        </view>
        <view class="itemView">
            <view class="label must">讲解需求</view>
            <view class="content">
                <van-switch checked="{{ formData.explainNeedTypeBoolean }}" size="50rpx" bind:change="switchChange" data-name="explainNeedType" />
            </view>
        </view>
        <view class="itemView">
            <view class="label must">是否需要会议室</view>
            <view class="content">
                <van-switch checked="{{ formData.meetingNeedTypeBoolean }}" bind:change="onChange" size="50rpx" bind:change="switchChange" data-name="meetingNeedType" />
            </view>
        </view>
        <view class="itemView">
            <view class="label must">摄影需求</view>
            <view class="content">
                <van-switch checked="{{ formData.photographTypeBoolean }}" bind:change="onChange" size="50rpx" bind:change="switchChange" data-name="photographType" />
            </view>
        </view>
        <view class="itemView">
            <view class="label">备注</view>
            <view class="content">
                <van-field value="{{ formData.remake }}" placeholder="请输入备注" input-align="right" border="{{ false }}" bind:change="inputChange" data-name="remake" />
            </view>
        </view>
    </view>

    <!-- 协议 -->
    <view class="protocolView">
        <van-checkbox value="{{ protocolFlag }}" bind:tap="protocolChange" icon-size="26rpx"></van-checkbox>
        <view bind:tap="protocolChange">我已阅读并同意</view>
        <view class="protocolTitle" bind:tap="jumpProtocol">{{protocolTitle}}</view>
    </view>

    <!-- 合计 -->
    <view class="submitBtn" bind:tap="submitData">立即预约</view>


</view>

<!-- 添加人员弹出框 -->
<van-dialog use-slot title="添加-参观人员" show="{{ dialogShow }}" show-confirm-button="{{false}}" show-cancel-button="{{false}}" close-on-click-overlay>
    <view class="dialogContent">
        <van-field value="{{ dialogName }}" required clearable label="姓名" placeholder="请输入姓名" bind:change="dialogInputChange" data-name="dialogName" />
        <van-field value="{{ dialogJob }}" required clearable label="职务" placeholder="请输入职务" bind:change="dialogInputChange" data-name="dialogJob" />
        <van-field value="{{ dialogPhone }}" clearable label="手机号" placeholder="请输入手机号" bind:change="dialogInputChange" data-name="dialogPhone" />
    </view>
    <view class="dialogBtnView">
        <view class="rejectBtn" bind:tap="dialogCancel">取消</view>
        <view class="successBtn" bind:tap="dialogSubmit">确定</view>
    </view>
</van-dialog>

<!-- 提示 -->
<van-notify id="van-notify" />

<!-- 选择-参观目的 -->
<van-action-sheet description="请选择参观目的" close-on-click-overlay="{{true}}" show="{{ visitTypeShow }}" actions="{{ visitTypeList }}" bind:select="selectVisitType" bind:close="hideVisitType" />