Files
kairos_miniapp/pages/joinFlow/person/index.wxml
2026-03-27 17:55:18 +08:00

133 lines
3.3 KiB
Plaintext

<wxs src="/utils/wxs/comment.wxs"
module="utils"></wxs>
<view class="page"
wx:if="{{!loading}}">
<view class="banner">
<t-navbar t-class="fixed-nav"
fixed="{{false}}" />
<view class="info">
<view class="text-1">术极守护</view>
<view class="text-2">您的贴身康复管家</view>
</view>
</view>
<scroll-view class="content"
scroll-y>
<view class="text-1">建立康复档案</view>
<t-cell title="医院"
wx:if="{{mood == 'manual'}}">
<input slot="note"
placeholder="请输入医院"
data-field="hospital"
bind:change="onInputChange" />
</t-cell>
<t-cell title="科室"
wx:if="{{mood == 'manual'}}">
<input slot="note"
placeholder="请输入科室"
data-field="department"
bind:change="onInputChange" />
</t-cell>
<t-cell title="选择手术"
arrow
t-class-title="ce"
bind:tap="changeSurgeryShow">
<view slot="note">
{{select.getNames(selectSurgery)}}
</view>
</t-cell>
<t-cell title="手术日期"
arrow
note="{{utils.formatDate(date, 'YYYY/MM/DD') || '请选择'}}"
bind:tap="chaneTimeShow">
</t-cell>
<t-cell title="年龄">
<input type="number"
slot="note"
maxlength="3"
placeholder="请输入年龄"
data-field="age"
bind:change="onInputChange" />
</t-cell>
<t-cell title="过敏史">
<textarea placeholder="请输入过敏史(如:青霉素过敏)"
slot="description"
data-field="allergy"
bind:change="onInputChange" />
</t-cell>
<t-cell title="合并症">
<textarea placeholder="请输入合并症(如:高血压、糖尿病)"
slot="description"
data-field="comorbidity"
bind:change="onInputChange" />
</t-cell>
</scroll-view>
<view class="btn">
<t-button block
theme="primary"
bind:tap="onSubmit">下一步
</t-button>
</view>
</view>
<view class="flex-center"
style="height: 100vh;"
wx:else>
<t-loading theme="circular"
size="40rpx" />
</view>
<t-popup visible="{{showSurgery}}"
placement="bottom"
bind:visible-change="changeSurgeryShow">
<view class="surgery-box">
<view class="title">手术列表</view>
<scroll-view class="surgery-list"
scroll-y>
<view class="flex-between surgery-item "
wx:for="{{surgeryList}}"
wx:key="index"
data-data="{{item}}"
bind:tap="handSelectSurgery">
<view class="name">{{item.name}}</view>
<t-icon name="check"
wx:if="{{select.isSelected(item.id, selectSurgery)}}" />
</view>
</scroll-view>
</view>
</t-popup>
<!-- 时间 -->
<t-date-time-picker title="选择时间"
visible="{{showTime}}"
mode="date"
default-value="{{date}}"
format="YYYY-MM-DD"
bindconfirm="onTimeConfirm"
bindclose="chaneTimeShow" />
<wxs module="select">
module.exports = {
isSelected: function (id, list) {
if (!list || !list.length) return false;
for (var i = 0; i < list.length; i++) {
if (list[i].id === id) return true;
}
return false;
},
getNames: function (list) {
if (!list || !list.length) return "请选择";
// 拼接名字,逗号分隔
var names = "";
for (var i = 0; i < list.length; i++) {
names += list[i].name;
if (i < list.length - 1) names += ", ";
}
return names;
}
};
</wxs>