Files
bodyWeight/miniprogram/pages/addMember/addMember.wxml
T
17792275749andClaude Opus 4.7 57950bd7c2 feat(addMember): 添加用户页改造,员工/家庭双tab + 员工编号查询表单
- 顶部胶囊式 tabs(员工/家庭用户)切换
- 员工 tab:员工编号输入 + 确认查询 → 回填用户信息 → 补充身高体重
- 家庭 tab:待实现
- 表单宽度调整为 100% 自适应

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 11:48:11 +08:00

134 lines
4.6 KiB
Plaintext

<view class="add-member">
<!-- 顶部浅蓝提示条 -->
<view class="tips">
<view class="tips-icon">!</view>
<text class="tips-text">最多支持 10 位用户</text>
</view>
<view class="form">
<scroll-view scroll-y class="scrollView">
<view class="scrollViewContent">
<view class="tabsDom">
<view class="tabs">
<view class="tab-item active">员工</view>
<view class="tab-item">家庭用户</view>
</view>
</view>
<view class="selectWorkNo">
<view class="form-row">
<view class="form-label">
<text class="label-text">员工编号</text>
<text class="label-star">*</text>
</view>
<view class="form-control">
<view class="form-input-wrap">
<input class="form-input" type="number" placeholder="请填写员工编号" placeholder-class="form-placeholder" />
</view>
</view>
</view>
<view class="selectWorkNoBtn">确认查询</view>
</view>
<!-- <view class="workNoDesc">输入员工编号后自动查询员工信息</view>
<view class="workNoNull">未查询到员工信息,请确认员工编号是否正确</view> -->
<view class="workNoInfo">
<view class="workNoInfo_">
<view class="workNoInfoTitle">用户信息</view>
<view class="workNoInfoContent">
<view>
<view class="form-row">
<view class="form-label">
<text class="label-text">姓名</text>
</view>
<view class="form-control">
<view class="form-readonly">
<text class="readonly-text">{{ form.name }}</text>
</view>
</view>
</view>
<view class="form-row">
<view class="form-label">
<text class="label-text">单位</text>
</view>
<view class="form-control">
<view class="form-readonly">
<text class="readonly-text">{{ form.name }}</text>
</view>
</view>
</view>
</view>
<view>
<view class="form-row" style="margin-bottom: 0;">
<view class="form-label">
<text class="label-text">性别</text>
</view>
<view class="form-control">
<view class="form-readonly">
<text class="readonly-text">{{ form.name }}</text>
</view>
</view>
</view>
<view class="form-row">
<view class="form-label">
<text class="label-text">年龄</text>
</view>
<view class="form-control">
<view class="form-readonly">
<text class="readonly-text">{{ form.name }}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="workNoInfo_">
<view class="workNoInfoTitle">补充信息</view>
<view class="workNoInfoContent">
<view>
<view class="form-row" style="margin-bottom: 0;">
<view class="form-label">
<text class="label-text">身高</text>
<text class="label-star">*</text>
</view>
<view class="form-control">
<view class="form-input-wrap">
<input class="form-input form-input-with-suffix" type="digit" maxlength="5" placeholder="请填写身高" placeholder-class="form-placeholder" value="{{ form.height }}" bind:input="onHeightInput" />
<text class="form-suffix form-suffix-inside">cm</text>
</view>
</view>
</view>
<view class="form-row">
<view class="form-label">
<text class="label-text">体重</text>
</view>
<view class="form-control">
<view class="form-input-wrap">
<input class="form-input form-input-with-suffix" type="digit" maxlength="6" placeholder="请填写体重" placeholder-class="form-placeholder" value="{{ form.weight }}" bind:input="onWeightInput" />
<text class="form-suffix form-suffix-inside">kg</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="familyInfo"></view>
</view>
</scroll-view>
</view>
<!-- 底部双按钮:取消 / 保存用户信息 -->
<view class="actions">
<view class="btn-cancel" bind:tap="onCancel">取消</view>
<view class="btn-primary" bind:tap="onSubmit">保存用户信息</view>
</view>
<!-- 选择已有用户抽屉 -->
<select-member-drawer show="{{ showSelectDrawer }}" bind:close="onSelectMemberClose" bind:select="onSelectMember">
</select-member-drawer>
<!-- 确认弹框 -->
<user-info-confirm-modal show="{{ showConfirmModal }}" userInfo="{{ serverResult }}" bind:confirm="onConfirmModalConfirm" bind:cancel="onConfirmModalCancel">
</user-info-confirm-modal>
</view>