feat(selectMemberDrawer): 用户列表新增本人/员工/家庭用户标签展示

- ExistingMember 补充 dataType/relationType 字段
- API 映射层透传 dataType 与 relationType
- member-type 区域按类型展示对应颜色标签

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-06-10 17:16:22 +08:00
co-authored by Claude Opus 4.7
parent 0fab5259c9
commit 44659a6ae4
3 changed files with 274 additions and 244 deletions
@@ -11,6 +11,8 @@ interface AddMemberApiItem {
weight: number
idCard: string | null
avatar: string | null
dataType?: number
relationType?: number | string | null
}
/** GET /weighingScale/v3/select/history/user 返回的单条结构 */
@@ -23,6 +25,7 @@ interface HistoryApiItem {
birthday: string
avatar: string | null
relationType: number | string | null
dataType?: number
}
/** 抽屉内部用户项(含回填所需全量字段) */
@@ -41,6 +44,8 @@ interface ExistingMember {
sex?: number
birthday?: string
relationType?: number | string | null
/** 0=员工 1=家庭成员 */
dataType?: number
}
/**
@@ -136,6 +141,7 @@ Component({
sex: item.sex,
birthday: item.birthday,
relationType: item.relationType,
dataType: item.dataType,
}))
this.setData({ members })
})
@@ -155,6 +161,8 @@ Component({
weight: item.weight,
idCard: item.idCard ?? '',
avatar: item.avatar ?? '',
relationType: item.relationType,
dataType: item.dataType,
}))
this.setData({ members })
})