拜访区域和被访人增加联动

This commit is contained in:
chenglijuan
2026-04-28 15:30:05 +08:00
parent 533edb56bf
commit 1ba5ea1084
4 changed files with 81 additions and 8 deletions
+13 -4
View File
@@ -47,10 +47,6 @@
<!-- 被访人信息 -->
<view class="section">
<view class="section-title">被访人信息</view>
<view class="form-group">
<text class="form-label">被访人</text>
<input class="form-input" placeholder="请输入被访人姓名" value="{{form.hostName}}" bindinput="onHostNameInput" />
</view>
<view class="form-group">
<text class="form-label">拜访区域</text>
<picker class="form-picker-wrap" range="{{areas}}" value="{{areaIndex}}" bindchange="onAreaChange">
@@ -60,6 +56,19 @@
</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>
<!-- 提交按钮 -->