feat(addMember, editMember): 接入员工编号查询,部门展示改用secondDepart/thirdDepart

- onQueryEmployee 接入 GET /weighingScale/v5/getUserInfoByWkno
- 单位展示由 workNo 改为 secondDepart / thirdDepart 拼接
- birthday 员工查询时回填,提交统一取值
- edit/user 接口 v3 升级到 v5

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-06-11 17:57:35 +08:00
co-authored by Claude Opus 4.7
parent cb626c7c88
commit c3b031aed4
4 changed files with 63 additions and 11 deletions
+4 -4
View File
@@ -22,7 +22,7 @@ Page({
/** dataType === 1 为家庭用户 */
isFamily: false,
/** 单位(非家庭用户) */
workNo: '',
unitDisplay: '',
/** 出生年月 YYYY-MM-DD(家庭用户) */
birthday: '',
/** 接口返回的原始用户数据,提交时以此为 base 覆盖修改字段 */
@@ -59,7 +59,7 @@ Page({
this.setData({
rawUser: u,
isFamily,
workNo: u.workNo ?? '',
unitDisplay: [u.secondDepart, u.thirdDepart].filter(Boolean).join(' / '),
birthday: u.birthday ?? '',
'form.name': u.realname ?? '',
'form.idCard': u.idCard ?? '',
@@ -163,14 +163,14 @@ Page({
id: this.data.userId,
realname: name.trim(),
idCard,
sex: this.data.form.sex,
sex,
birthday: this.data.birthday,
height: heightNum,
weight: isNaN(weightNum) ? 0 : weightNum,
connectDeviceInfo: connectDeviceInfoRaw ? JSON.stringify(connectDeviceInfoRaw) : (rawUser?.connectDeviceInfo ?? ''),
}
put('weighingScale/v3/edit/user', payload)
put('weighingScale/v5/edit/user', payload)
.then(() => {
wx.showToast({ title: '保存成功', icon: 'success' })
setTimeout(() => {