Files
danyang-match/miniapp/pages/matchmaker-service-detail/matchmaker-service-detail.wxml
T

47 lines
2.7 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.
<view class="page">
<view wx:if="{{loading}}" class="state">加载中...</view>
<block wx:elif="{{detail}}">
<view class="card profile-card">
<view class="title">服务对象</view>
<view class="status">服务编号:{{detail.serviceDisplayId || detail.displayId}}</view>
<view wx:if="{{detail.userDisplayNumber}}" class="status">用户编号:{{detail.userDisplayNumber}}</view>
<view wx:if="{{detail.userProfile}}" class="profile-grid">
<text>展示名:{{detail.userProfile.displayName || '未设置'}}</text>
<text>年龄:{{detail.userProfile.age || '未设置'}}</text>
<text>地区:{{detail.userProfile.regionName || '未设置'}}</text>
<text>婚姻状态:{{detail.userProfile.maritalStatus || '未设置'}}</text>
</view>
<view class="status">服务状态:{{statusLabel}}</view>
<view wx:if="{{detail.description}}" class="description">服务需求:{{detail.description}}</view>
</view>
<view class="card" wx:if="{{source === 'assignment' && detail.status !== 'completed'}}">
<view class="title">记录服务</view>
<picker mode="selector" range="{{followupTypes}}" value="0" bindchange="onTypeChange">
<view class="picker">服务类型:{{form.followupType}}</view>
</picker>
<textarea class="textarea" maxlength="1000" placeholder="只记录完成公益服务所必需的信息" value="{{form.content}}" bindinput="onContentInput"></textarea>
<input class="input" placeholder="下次跟进时间(可选,如 2026-10-14 15:30)" value="{{form.nextFollowupAt}}" bindinput="onNextFollowupInput" />
<button type="primary" loading="{{submitting}}" disabled="{{submitting}}" bindtap="submitFollowup">保存服务记录</button>
</view>
<view class="card" wx:if="{{source === 'assignment' && detail.status === 'assigned'}}">
<button type="primary" loading="{{changingStatus}}" disabled="{{changingStatus}}" bindtap="changeStatus" data-action="start">开始服务</button>
</view>
<view class="card" wx:if="{{source === 'assignment' && (detail.status === 'in_service' || detail.status === 'waiting_user')}}">
<button loading="{{changingStatus}}" disabled="{{changingStatus}}" bindtap="changeStatus" data-action="complete">完成服务</button>
</view>
<view class="card">
<view class="title">服务历史</view>
<view wx:if="{{followups.length}}">
<view wx:for="{{followups}}" wx:key="id" class="history-item">
<view>{{item.followupType}} · {{item.createdAt}}</view>
<view class="history-content">{{item.content}}</view>
</view>
</view>
<view wx:else class="state">暂无服务记录</view>
</view>
</block>
</view>