85 lines
3.6 KiB
Plaintext
85 lines
3.6 KiB
Plaintext
<!--appointment.wxml-->
|
||
<view class="page">
|
||
<!-- 预约人信息 -->
|
||
<view class="section">
|
||
<view class="section-title">预约人信息</view>
|
||
<view class="form-group">
|
||
<text class="form-label">姓名</text>
|
||
<input class="form-input" placeholder="请输入访客姓名" value="{{form.name}}" bindinput="onNameInput" />
|
||
</view>
|
||
<view class="form-group">
|
||
<text class="form-label">手机号</text>
|
||
<input class="form-input" type="number" maxlength="11" placeholder="请输入手机号" value="{{form.phone}}" bindinput="onPhoneInput" />
|
||
</view>
|
||
<view class="form-group">
|
||
<text class="form-label">公司</text>
|
||
<input class="form-input" placeholder="请输入所属公司" value="{{form.company}}" bindinput="onCompanyInput" />
|
||
</view>
|
||
<view class="form-group">
|
||
<text class="form-label">来访事由</text>
|
||
<input class="form-input" placeholder="请输入来访事由" value="{{form.reason}}" bindinput="onReasonInput" />
|
||
</view>
|
||
<view class="form-group">
|
||
<text class="form-label">车牌号</text>
|
||
<input class="form-input" placeholder="如: 粤A12345(选填)" value="{{form.plateNumber}}" bindinput="onPlateNumberInput" maxlength="8" confirm-type="done" />
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 预约时间 -->
|
||
<view class="section">
|
||
<view class="section-title">预约时间</view>
|
||
<view class="form-group">
|
||
<text class="form-label">来访日期</text>
|
||
<picker class="form-picker-wrap" mode="date" value="{{form.date}}" start="{{today}}" bindchange="onDateChange">
|
||
<view class="form-picker">
|
||
<text class="{{form.date ? 'picker-value' : 'picker-placeholder'}}">{{form.date || '请选择日期'}}</text>
|
||
<text class="picker-arrow">›</text>
|
||
</view>
|
||
</picker>
|
||
</view>
|
||
<view class="form-group">
|
||
<text class="form-label">来访时间</text>
|
||
<picker class="form-picker-wrap" mode="time" value="{{form.time}}" bindchange="onTimeChange">
|
||
<view class="form-picker">
|
||
<text class="{{form.time ? 'picker-value' : 'picker-placeholder'}}">{{form.time || '请选择时间'}}</text>
|
||
<text class="picker-arrow">›</text>
|
||
</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 被访人信息 -->
|
||
<view class="section">
|
||
<view class="section-title">被访人信息</view>
|
||
<view class="form-group">
|
||
<text class="form-label">拜访区域</text>
|
||
<picker class="form-picker-wrap" range="{{areas}}" value="{{areaIndex}}" bindchange="onAreaChange">
|
||
<view class="form-picker">
|
||
<text class="{{areaIndex >= 0 ? 'picker-value' : 'picker-placeholder'}}">{{areaIndex >= 0 ? areas[areaIndex] : '请选择拜访区域'}}</text>
|
||
<text class="picker-arrow">›</text>
|
||
</view>
|
||
</picker>
|
||
</view>
|
||
<view class="form-group">
|
||
<text class="form-label">被访人</text>
|
||
<picker wx:if="{{personNames.length > 0}}" class="form-picker-wrap" range="{{personNames}}" value="{{personIndex}}" bindchange="onPersonChange">
|
||
<view class="form-picker">
|
||
<text class="{{personIndex >= 0 ? 'picker-value' : 'picker-placeholder'}}">{{personIndex >= 0 ? personNames[personIndex] : '请选择被访人'}}</text>
|
||
<text class="picker-arrow">›</text>
|
||
</view>
|
||
</picker>
|
||
<view wx:else class="form-picker">
|
||
<text class="picker-placeholder">请先选择拜访区域</text>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
|
||
<!-- 提交按钮 -->
|
||
<view class="submit-wrap">
|
||
<button class="submit-btn" bindtap="onSubmit" disabled="{{submitting}}">
|
||
{{submitting ? '提交中...' : '提交预约'}}
|
||
</button>
|
||
</view>
|
||
</view>
|