Files
miniwx/pages/appointment/appointment.wxml
T
2026-04-28 15:30:05 +08:00

81 lines
3.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--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>
<!-- 预约时间 -->
<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>