From 572df690f72ed4a077d934823f261dec39b3cc7d Mon Sep 17 00:00:00 2001
From: 刘帅 <rr.iii@qq.com>
Date: 星期二, 08 九月 2026 17:11:34 +0800
Subject: [PATCH] feat&bug:文档内容修改
---
cloud-server-management/src/main/webapp/static/modular/system/user/user_info.js | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/user/user_info.js b/cloud-server-management/src/main/webapp/static/modular/system/user/user_info.js
index 372195a..e4d3b01 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/user/user_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/user/user_info.js
@@ -77,9 +77,16 @@
}
});
}
- this.userInfoData[key] = ids;
+ // 不提交不存在控件或未选择控件的空字符串,避免后端把 "" 转 Integer 时抛异常。
+ if (ids !== "") {
+ this.userInfoData[key] = ids;
+ }
}else{
- this.userInfoData[key]= $("#" + key).val();
+ var value = $("#" + key).val();
+ // 新增页 id 为空、多选门店未选中时均不应提交为 key=""。
+ if (value !== null && value !== "") {
+ this.userInfoData[key] = value;
+ }
}
}
@@ -161,7 +168,13 @@
*/
UserInfoDlg.collectData = function () {
this.set('id').set('account').set('sex').set('password').set('avatar').set("deptid")
- .set('email').set('name').set('birthday').set('rePassword').set('roleid').set('phone').set('idCard');
+ .set('email').set('name').set('birthday').set('rePassword').set('roleid').set('phone').set('idCard').set('storeIds');
+
+ // jQuery 默认会把数组编码为 storeIds[]=1&storeIds[]=2;Spring 对 List<Integer>
+ // 无法解析空下标 "[]"。转成逗号分隔值后,Spring 会自动绑定为 List<Integer>。
+ if ($.isArray(this.userInfoData.storeIds)) {
+ this.userInfoData.storeIds = this.userInfoData.storeIds.join(',');
+ }
};
/**
--
Gitblit v1.7.1