Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tjmdp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
other-project
tjmdp
Commits
12a10d95
Commit
12a10d95
authored
Apr 15, 2019
by
liuchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
cebace75
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
618 additions
and
131 deletions
+618
-131
UserController.java
src/main/java/com/qiankun/controller/UserController.java
+64
-18
User.java
src/main/java/com/qiankun/entity/User.java
+21
-7
UserVo.java
src/main/java/com/qiankun/vo/UserVo.java
+121
-20
system.properties
src/main/resources/system.properties
+1
-1
saveuser.jsp
src/main/webapp/WEB-INF/pages/user/saveuser.jsp
+30
-16
style.css
src/main/webapp/resources/css/style.css
+24
-2
jquery.validate.js
src/main/webapp/resources/js/tools/jquery.validate.js
+203
-0
user.js
src/main/webapp/resources/js/user/user.js
+154
-67
No files found.
src/main/java/com/qiankun/controller/UserController.java
View file @
12a10d95
...
...
@@ -67,11 +67,49 @@ public class UserController extends BaseController<Object>{
ModelAndView
view
=
new
ModelAndView
();
User
user
=
new
User
();
user
.
setUserName
(
userVo
.
getMobile
());
user
.
setName
(
userVo
.
getName
());
user
.
setGender
(
userVo
.
getGender
());
user
.
setBirthday
(
userVo
.
getBirthday
());
user
.
setPaperType
(
userVo
.
getPaperType
());
user
.
setPaperId
(
userVo
.
getPaperId
());
user
.
setNation
(
userVo
.
getNation
());
user
.
setNativePlace
(
userVo
.
getNativePlace
());
user
.
setNationality
(
userVo
.
getNationality
());
user
.
setEducation
(
userVo
.
getEducation
());
user
.
setDomicilePlace
(
userVo
.
getDomicilePlace
());
user
.
setAddr
(
userVo
.
getAddr
());
user
.
setUnit
(
userVo
.
getUnit
());
user
.
setUnitAddr
(
userVo
.
getUnitAddr
());
user
.
setUnitTel
(
userVo
.
getUnitTel
());
user
.
setProfession
(
userVo
.
getProfession
());
user
.
setMobile
(
userVo
.
getMobile
());
user
.
setEmail
(
userVo
.
getEmail
());
user
.
setTel
(
userVo
.
getTel
());
user
.
setQq
(
userVo
.
getQq
());
user
.
setWeixin
(
userVo
.
getWeixin
());
user
.
setDonateBloodCount
(
userVo
.
getDonateBloodCount
());
user
.
setBloodType
(
userVo
.
getBloodType
());
user
.
setHeight
(
userVo
.
getHeight
());
user
.
setWeight
(
userVo
.
getWeight
());
user
.
setRemark
(
userVo
.
getRemark
());
user
.
setRole
(
userVo
.
getRole
());
user
.
setStatus
(
userVo
.
getStatus
());
if
(
StringUtils
.
isEmpty
(
userVo
.
getId
()))
{
Boolean
userIsExist
Mobile
=
userService
.
validateUserExistByPaperId
(
userVo
.
getPaperId
());
if
(
userIsExist
Mobile
)
{
Boolean
userIsExist
PaperId
=
userService
.
validateUserExistByPaperId
(
userVo
.
getPaperId
());
if
(
userIsExist
PaperId
)
{
view
.
getModel
().
put
(
"message"
,
"userIsExist_paperId"
);
return
view
;
}
...
...
@@ -81,23 +119,32 @@ public class UserController extends BaseController<Object>{
view
.
getModel
().
put
(
"message"
,
"userIsExist_teamName"
);
return
view
;
}
Date
date
=
new
Date
();
user
.
setCreateTime
(
date
);
user
.
setMobile
(
userVo
.
getMobile
());
user
.
setPwd
(
MD5
.
digest
(
userVo
.
getPwd
()));
user
.
setUserName
(
userVo
.
getUserName
());
Contacts
contacts1
=
new
Contacts
();
contacts1
.
setName
(
userVo
.
getContactsName1
());
contacts1
.
setAddr
(
userVo
.
getContactsAddr1
());
contacts1
.
setMobile
(
userVo
.
getContactsMobile1
());
contacts1
.
setRelation
(
userVo
.
getContactsRelation1
());
contacts1
.
setWeixin
(
userVo
.
getContactsWeixin1
());
contacts1
.
setQq
(
userVo
.
getContactsQQ1
());
contacts1
.
setUpdateTime
(
date
);
contacts1
.
setUser
(
user
);
user
.
getContacts
().
add
(
contacts1
);
user
.
setEmail
(
userVo
.
getEmail
());
Date
date
=
new
Date
();
user
.
setCreateTime
(
date
);
Contacts
contacts2
=
new
Contacts
();
contacts2
.
setName
(
userVo
.
getContactsName2
());
contacts2
.
setAddr
(
userVo
.
getContactsAddr2
());
contacts2
.
setMobile
(
userVo
.
getContactsMobile2
());
contacts2
.
setRelation
(
userVo
.
getContactsRelation2
());
contacts2
.
setWeixin
(
userVo
.
getContactsWeixin2
());
contacts2
.
setQq
(
userVo
.
getContactsQQ2
());
contacts2
.
setUpdateTime
(
date
);
contacts2
.
setUser
(
user
);
user
.
getContacts
().
add
(
contacts2
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy"
);
String
year
=
sdf
.
format
(
date
);
Contacts
product
=
new
Contacts
();
product
.
setUser
(
user
);
user
.
getContacts
().
add
(
product
);
view
.
getModelMap
().
put
(
"status"
,
1
);
}
else
{
...
...
@@ -120,7 +167,7 @@ public class UserController extends BaseController<Object>{
if
(
userVo
.
getChangePassword
()!=
null
&&
userVo
.
getChangePassword
()){
user
.
setPwd
(
MD5
.
digest
(
userVo
.
getPwd
()));
}
user
.
setUserName
(
userVo
.
getUserName
());
user
.
setEmail
(
userVo
.
getEmail
());
...
...
@@ -144,7 +191,6 @@ public class UserController extends BaseController<Object>{
if
(
p
.
equals
(
pwd
))
{
User
user
=
new
User
();
user
.
setMobile
(
superAdmin
);
user
.
setUserName
(
superAdmin
);
user
.
setPwd
(
MD5
.
digest
(
pwd
));
SessionUtils
.
setUser
(
request
,
user
);
view
.
getModelMap
().
addAttribute
(
"status"
,
1
);
...
...
src/main/java/com/qiankun/entity/User.java
View file @
12a10d95
...
...
@@ -30,7 +30,8 @@ public class User {
@GeneratedValue
(
generator
=
"systemUUID"
)
private
String
id
;
private
String
userName
;
//用户名
private
String
userName
;
private
String
userCode
;
//用户二维码
private
String
name
;
//姓名
private
String
gender
;
//性别
private
String
birthday
;
//出生年月
...
...
@@ -51,6 +52,7 @@ public class User {
private
String
email
;
//邮箱
private
String
tel
;
//固定电话
private
String
qq
;
private
String
weixin
;
//微信号
private
String
openid
;
//微信openid
private
Integer
donateBloodCount
;
//无偿献血次数
private
String
bloodType
;
//血型
...
...
@@ -94,12 +96,6 @@ public class User {
this
.
id
=
id
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getMobile
()
{
return
mobile
;
}
...
...
@@ -309,6 +305,24 @@ public class User {
public
void
setPoints
(
Set
<
Points
>
points
)
{
this
.
points
=
points
;
}
public
String
getWeixin
()
{
return
weixin
;
}
public
void
setWeixin
(
String
weixin
)
{
this
.
weixin
=
weixin
;
}
public
String
getUserCode
()
{
return
userCode
;
}
public
void
setUserCode
(
String
userCode
)
{
this
.
userCode
=
userCode
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
...
...
src/main/java/com/qiankun/vo/UserVo.java
View file @
12a10d95
package
com
.
qiankun
.
vo
;
import
java
x.persistence.Lob
;
import
java
.util.Date
;
public
class
UserVo
{
private
String
id
;
private
String
id
;
private
String
userName
;
//用户名
private
String
name
;
//姓名
private
String
gender
;
//性别
private
String
birthda
te
;
//出生年月
private
String
paperType
;
//证件类型
private
String
birthda
y
;
//出生年月
private
String
paperType
;
//证件类型
1.身份证
private
String
paperId
;
//证件号
private
String
nation
;
//民族
private
String
nativePlace
;
//籍贯
...
...
@@ -24,21 +24,35 @@ private String id;
private
String
profession
;
//职业
private
String
mobile
;
//本人手机
private
String
email
;
//
电话
private
String
email
;
//
邮箱
private
String
tel
;
//固定电话
private
String
qq
;
private
String
weixin
;
//微信号
private
String
weixin
;
//微信号
private
String
openid
;
//微信openid
private
Integer
donateBloodCount
;
//无偿献血次数
private
String
bloodType
;
//血型
private
Integer
height
;
//身高
private
Integer
weight
;
//体重
@Lob
private
String
remark
;
//备注
private
String
contactsName1
;
private
String
contactsQQ1
;
private
String
contactsRelation1
;
private
String
contactsWeixin1
;
private
String
contactsMobile1
;
private
String
contactsAddr1
;
private
String
contactsName2
;
private
String
contactsQQ2
;
private
String
contactsRelation2
;
private
String
contactsWeixin2
;
private
String
contactsMobile2
;
private
String
contactsAddr2
;
private
String
pwd
;
//密码
private
String
role
;
//角色 1.管理员 2.志愿者 3.预注册用户
private
String
role
;
//角色 1.管理员 2.志愿者
private
String
status
;
//状态 0.未采血 1.已采血
private
String
oldpwd
;
//原密码
private
Boolean
changePassword
;
...
...
@@ -70,12 +84,7 @@ private String id;
public
void
setGender
(
String
gender
)
{
this
.
gender
=
gender
;
}
public
String
getBirthdate
()
{
return
birthdate
;
}
public
void
setBirthdate
(
String
birthdate
)
{
this
.
birthdate
=
birthdate
;
}
public
String
getPaperType
()
{
return
paperType
;
}
...
...
@@ -172,12 +181,7 @@ private String id;
public
void
setQq
(
String
qq
)
{
this
.
qq
=
qq
;
}
public
String
getWeixin
()
{
return
weixin
;
}
public
void
setWeixin
(
String
weixin
)
{
this
.
weixin
=
weixin
;
}
public
Integer
getDonateBloodCount
()
{
return
donateBloodCount
;
}
...
...
@@ -250,6 +254,103 @@ private String id;
public
void
setOldpwd
(
String
oldpwd
)
{
this
.
oldpwd
=
oldpwd
;
}
public
String
getBirthday
()
{
return
birthday
;
}
public
void
setBirthday
(
String
birthday
)
{
this
.
birthday
=
birthday
;
}
public
String
getWeixin
()
{
return
weixin
;
}
public
void
setWeixin
(
String
weixin
)
{
this
.
weixin
=
weixin
;
}
public
String
getOpenid
()
{
return
openid
;
}
public
void
setOpenid
(
String
openid
)
{
this
.
openid
=
openid
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getContactsName1
()
{
return
contactsName1
;
}
public
void
setContactsName1
(
String
contactsName1
)
{
this
.
contactsName1
=
contactsName1
;
}
public
String
getContactsQQ1
()
{
return
contactsQQ1
;
}
public
void
setContactsQQ1
(
String
contactsQQ1
)
{
this
.
contactsQQ1
=
contactsQQ1
;
}
public
String
getContactsRelation1
()
{
return
contactsRelation1
;
}
public
void
setContactsRelation1
(
String
contactsRelation1
)
{
this
.
contactsRelation1
=
contactsRelation1
;
}
public
String
getContactsWeixin1
()
{
return
contactsWeixin1
;
}
public
void
setContactsWeixin1
(
String
contactsWeixin1
)
{
this
.
contactsWeixin1
=
contactsWeixin1
;
}
public
String
getContactsMobile1
()
{
return
contactsMobile1
;
}
public
void
setContactsMobile1
(
String
contactsMobile1
)
{
this
.
contactsMobile1
=
contactsMobile1
;
}
public
String
getContactsAddr1
()
{
return
contactsAddr1
;
}
public
void
setContactsAddr1
(
String
contactsAddr1
)
{
this
.
contactsAddr1
=
contactsAddr1
;
}
public
String
getContactsName2
()
{
return
contactsName2
;
}
public
void
setContactsName2
(
String
contactsName2
)
{
this
.
contactsName2
=
contactsName2
;
}
public
String
getContactsQQ2
()
{
return
contactsQQ2
;
}
public
void
setContactsQQ2
(
String
contactsQQ2
)
{
this
.
contactsQQ2
=
contactsQQ2
;
}
public
String
getContactsRelation2
()
{
return
contactsRelation2
;
}
public
void
setContactsRelation2
(
String
contactsRelation2
)
{
this
.
contactsRelation2
=
contactsRelation2
;
}
public
String
getContactsWeixin2
()
{
return
contactsWeixin2
;
}
public
void
setContactsWeixin2
(
String
contactsWeixin2
)
{
this
.
contactsWeixin2
=
contactsWeixin2
;
}
public
String
getContactsMobile2
()
{
return
contactsMobile2
;
}
public
void
setContactsMobile2
(
String
contactsMobile2
)
{
this
.
contactsMobile2
=
contactsMobile2
;
}
public
String
getContactsAddr2
()
{
return
contactsAddr2
;
}
public
void
setContactsAddr2
(
String
contactsAddr2
)
{
this
.
contactsAddr2
=
contactsAddr2
;
}
...
...
src/main/resources/system.properties
View file @
12a10d95
...
...
@@ -20,7 +20,7 @@ tjmdp.msgDataFormat=JSON
nation
=
\u
6c49
\u
65cf,
\u8499\u
53e4
\u
65cf,
\u
56de
\u
65cf,
\u
85cf
\u
65cf,
\u
7ef4
\u
543e
\u
5c14
\u
65cf,
\u
82d7
\u
65cf,
\u
5f5d
\u
65cf,
\u
58ee
\u
65cf,
\u
5e03
\u
4f9d
\u
65cf,
\u
671d
\u
9c9c
\u
65cf,
\u
6ee1
\u
65cf,
\u
4f97
\u
65cf,
\u7476\u
65cf,
\u
767d
\u
65cf,
\u
571f
\u
5bb6
\u
65cf,
\u
54c8
\u
5c3c
\u
65cf,
\u
54c8
\u8428\u
514b
\u
65cf,
\u
50a3
\u
65cf,
\u
9ece
\u
65cf,
\u5088\u
50f3
\u
65cf,
\u
4f64
\u
65cf,
\u7572\u
65cf,
\u
9ad8
\u
5c71
\u
65cf,
\u
62c9
\u
795c
\u
65cf,
\u
6c34
\u
65cf,
\u
4e1c
\u
4e61
\u
65cf,
\u
7eb3
\u
897f
\u
65cf,
\u
666f
\u9887\u
65cf,
\u
67ef
\u
5c14
\u
514b
\u
5b5c
\u
65cf,
\u
571f
\u
65cf,
\u
8fbe
\u
65a1
\u
5c14
\u
65cf,
\u
4eeb
\u
4f6c
\u
65cf,
\u
7f8c
\u
65cf,
\u
5e03
\u6717\u
65cf,
\u6492\u
62c9
\u
65cf,
\u
6bdb
\u5357\u
65cf,
\u
4ee1
\u
4f6c
\u
65cf,
\u9521\u
4f2f
\u
65cf,
\u
963f
\u
660c
\u
65cf,
\u
666e
\u
7c73
\u
65cf,
\u5854\u5409\u
514b
\u
65cf,
\u6012\u
65cf,
\u
4e4c
\u
5b5c
\u
522b
\u
514b
\u
65cf,
\u
4fc4
\u
7f57
\u
65af
\u
65cf,
\u9102\u
6e29
\u
514b
\u
65cf,
\u
5fb7
\u6602\u
65cf,
\u
4fdd
\u
5b89
\u
65cf,
\u
88d5
\u
56fa
\u
65cf,
\u
4eac
\u
65cf,
\u5854\u5854\u
5c14
\u
65cf,
\u
72ec
\u
9f99
\u
65cf,
\u9102\u
4f26
\u6625\u
65cf,
\u
8d6b
\u
54f2
\u
65cf,
\u
95e8
\u
5df4
\u
65cf,
\u
73de
\u
5df4
\u
65cf,
\u
57fa
\u
8bfa
\u
65cf
nativePlace
=
\u5
317\u
4eac
\u
5e02,
\u5929\u
6d25
\u
5e02,
\u
91cd
\u
5e86
\u
5e02,
\u
4e0a
\u
6d77
\u
5e02,
\u9999\u
6e2f
\u7279\u
522b
\u
884c
\u
653f
\u
533a,
\u
6fb3
\u
95e8
\u7279\u
522b
\u
884c
\u
653f
\u
533a,
\u
6cb3
\u5317\u7701
,
\u
5c71
\u
897f
\u7701
,
\u5409\u6797\u7701
,
\u
8fbd
\u
5b81
\u7701
,
\u
9ed1
\u
9f99
\u
6c5f
\u7701
,
\u9655\u
897f
\u7701
,
\u7518\u8083\u7701
,
\u9752\u
6d77
\u7701
,
\u
5c71
\u
4e1c
\u7701
,
\u
798f
\u
5efa
\u7701
,
\u
6d59
\u
6c5f
\u7701
,
\u
53f0
\u
6e7e
\u7701
,
\u
6cb3
\u5357\u7701
,
\u
6e56
\u5317\u7701
,
\u
6e56
\u5357\u7701
,
\u
6c5f
\u
897f
\u7701
,
\u
6c5f
\u
82cf
\u7701
,
\u
5b89
\u
5fbd
\u7701
,
\u
5e7f
\u
4e1c
\u7701
,
\u
6d77
\u5357\u7701
,
\u
56db
\u
5ddd
\u7701
,
\u
8d35
\u
5dde
\u7701
,
\u
4e91
\u5357\u7701
,
\u5185\u8499\u
53e4
\u
81ea
\u
6cbb
\u
533a,
\u
65b0
\u7586\u
7ef4
\u
543e
\u
5c14
\u
81ea
\u
6cbb
\u
533a,
\u
5b81
\u
590f
\u
56de
\u
65cf
\u
81ea
\u
6cbb
\u
533a,
\u
5e7f
\u
897f
\u
58ee
\u
65cf
\u
81ea
\u
6cbb
\u
533a,
\u
897f
\u
85cf
\u
81ea
\u
6cbb
\u
533a
nativePlace
=
\u5
929\u
6d25
\u
5e02,
\u5317\u
4eac
\u
5e02,
\u
91cd
\u
5e86
\u
5e02,
\u
4e0a
\u
6d77
\u
5e02,
\u9999\u
6e2f
\u7279\u
522b
\u
884c
\u
653f
\u
533a,
\u
6fb3
\u
95e8
\u7279\u
522b
\u
884c
\u
653f
\u
533a,
\u
6cb3
\u5317\u7701
,
\u
5c71
\u
897f
\u7701
,
\u5409\u6797\u7701
,
\u
8fbd
\u
5b81
\u7701
,
\u
9ed1
\u
9f99
\u
6c5f
\u7701
,
\u9655\u
897f
\u7701
,
\u7518\u8083\u7701
,
\u9752\u
6d77
\u7701
,
\u
5c71
\u
4e1c
\u7701
,
\u
798f
\u
5efa
\u7701
,
\u
6d59
\u
6c5f
\u7701
,
\u
53f0
\u
6e7e
\u7701
,
\u
6cb3
\u5357\u7701
,
\u
6e56
\u5317\u7701
,
\u
6e56
\u5357\u7701
,
\u
6c5f
\u
897f
\u7701
,
\u
6c5f
\u
82cf
\u7701
,
\u
5b89
\u
5fbd
\u7701
,
\u
5e7f
\u
4e1c
\u7701
,
\u
6d77
\u5357\u7701
,
\u
56db
\u
5ddd
\u7701
,
\u
8d35
\u
5dde
\u7701
,
\u
4e91
\u5357\u7701
,
\u5185\u8499\u
53e4
\u
81ea
\u
6cbb
\u
533a,
\u
65b0
\u7586\u
7ef4
\u
543e
\u
5c14
\u
81ea
\u
6cbb
\u
533a,
\u
5b81
\u
590f
\u
56de
\u
65cf
\u
81ea
\u
6cbb
\u
533a,
\u
5e7f
\u
897f
\u
58ee
\u
65cf
\u
81ea
\u
6cbb
\u
533a,
\u
897f
\u
85cf
\u
81ea
\u
6cbb
\u
533a
profession
=
\u
536b
\u
751f
\u
4e13
\u
4e1a
\u6280\u
672f
\u
4eba
\u5458
,
\u
7ecf
\u
6d4e
\u
8d22
\u
52a1
\u
4eba
\u5458
,
\u
91d1
\u
878d
\u
4e1a
\u
52a1
\u
4eba
\u5458
,
\u
6cd5
\u
5f8b
\u
4e13
\u
4e1a
\u
4eba
\u5458
,
\u6587\u
5b66
\u
827a
\u
672f
\u
5de5
\u
4f5c
\u
4eba
\u5458
,
\u
4f53
\u
80b2
\u
5de5
\u
4f5c
\u
4eba
\u5458
,
\u
65b0
\u
95fb
\u6587\u5316\u
5de5
\u
4f5c
\u
4eba
\u5458
,
\u
5b97
\u6559\u
804c
\u
4e1a
\u8005
,
\u
884c
\u
653f
\u
529e
\u
516c
\u
4eba
\u5458
,
\u
5b89
\u5168\u
4fdd
\u
536b
\u
548c
\u
6d88
\u9632\u
4eba
\u5458
,
\u
90ae
\u
653f
\u
548c
\u7535\u
4fe1
\u
4e1a
\u
52a1
\u
4eba
\u5458
,
\u
8d2d
\u9500\u
4eba
\u5458
,
\u
5bb6
\u
653f
\u
670d
\u
52a1
\u
4eba
\u5458
,
\u5546\u
4e1a
\u
670d
\u
52a1
\u
4eba
\u5458
,
\u
53f8
\u
4e58
\u
4eba
\u5458
,
\u
5f85
\u
4e1a,
\u5176\u
4ed6,
\u
56fd
\u
5bb6
\u
516c
\u
52a1
\u5458
,
\u
519b
\u
4eba,
\u
5b66
\u
751f,
\u6559\u
5e08,
\u
5de5
\u
4eba,
\u
519c
\u6797\u7267\u
751f
\u
4ea7
\u
4eba
\u5458
,
\u
519c
\u6797\u7267\u6280\u
672f
\u
4eba
\u5458
,
\u
79d1
\u
5b66
\u7814\u
7a76
\u
4eba
\u5458
,
\u
5de5
\u
7a0b
\u6280\u
672f
\u
4eba
\u5458
,
\u
98de
\u
673a
\u
548c
\u8239\u8236\u6280\u
672f
\u
4eba
\u5458
bloodType
=
\u
672a
\u
77e5,A,B,O,AB,A:RH+,B:RH+,AB:RH+,O:RH+,A:RH-,B:RH-,AB:RH-,O:RH-
relation
=
\u7236\u
6bcd,
\u5144\u
59b9,
\u
914d
\u5076
,
\u
5b50
\u5973
,
\u
4eb2
\u
5c5e,
\u
670b
\u
53cb
...
...
src/main/webapp/WEB-INF/pages/user/saveuser.jsp
View file @
12a10d95
...
...
@@ -160,7 +160,6 @@
<div class="col-sm-9">
<select class="col-xs-10 col-sm-10" id="nativePlace" name="nativePlace">
<option value=""></option>
<c:forEach var="value" items="${dict.nativePlace}">
<option value="${value}">${value}</option>
</c:forEach>
...
...
@@ -222,7 +221,13 @@
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 职业 </label>
<div class="col-sm-9">
<input type="text" id="profession" name="profession" placeholder="" class="col-xs-10 col-sm-10" />
<select class="col-xs-10 col-sm-10" id="profession" name="profession">
<option value="">请选择</option>
<c:forEach var="value" items="${dict.profession}">
<option value="${value}">${value}</option>
</c:forEach>
</select>
</div>
</div>
...
...
@@ -278,7 +283,7 @@
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> QQ号码 </label>
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">
<font color="red">*</font>
QQ号码 </label>
<div class="col-sm-9">
<input type="text" id="qq" name="qq" placeholder="" class="col-xs-10 col-sm-10" />
...
...
@@ -359,7 +364,7 @@
<div class="col-xs-4">
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 姓名 </label>
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">
<font color="red">*</font>
姓名 </label>
<div class="col-sm-9">
<input type="text" id="contactsName1" name="contactsName1" placeholder="" class="col-xs-10 col-sm-10" />
...
...
@@ -381,8 +386,13 @@
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 关系</label>
<div class="col-sm-9">
<input type="text" id="contactsRelation1" name="contactsRelation1" placeholder="" class="col-xs-10 col-sm-10" />
<select class="col-xs-10 col-sm-10" id="contactsRelation1" name="contactsRelation1">
<option value="">请选择</option>
<c:forEach var="value" items="${dict.relation}">
<option value="${value}">${value}</option>
</c:forEach>
</select>
</div>
</div>
...
...
@@ -398,7 +408,7 @@
<div class="col-xs-4">
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 手机</label>
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">
<font color="red">*</font>
手机</label>
<div class="col-sm-9">
<input type="text" id="contactsMobile1" name="contactsMobile1" placeholder="" class="col-xs-10 col-sm-10" />
...
...
@@ -425,9 +435,9 @@
<div class="col-xs-4">
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 姓名 </label>
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">
<font color="red">*</font>
姓名 </label>
<div class="col-sm-9">
<input type="text" id="contactsName
1" name="contactsName1
" placeholder="" class="col-xs-10 col-sm-10" />
<input type="text" id="contactsName
2" name="contactsName2
" placeholder="" class="col-xs-10 col-sm-10" />
</div>
</div>
...
...
@@ -435,7 +445,7 @@
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> QQ号 </label>
<div class="col-sm-9">
<input type="text" id="contactsQQ
1" name="contactsQQ1
" placeholder="" class="col-xs-10 col-sm-10" />
<input type="text" id="contactsQQ
2" name="contactsQQ2
" placeholder="" class="col-xs-10 col-sm-10" />
</div>
</div>
...
...
@@ -447,15 +457,19 @@
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 关系</label>
<div class="col-sm-9">
<input type="text" id="contactsRelation1" name="contactsRelation1" placeholder="" class="col-xs-10 col-sm-10" />
<select class="col-xs-10 col-sm-10" id="contactsRelation2" name="contactsRelation2">
<option value="">请选择</option>
<c:forEach var="value" items="${dict.relation}">
<option value="${value}">${value}</option>
</c:forEach>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 微信号</label>
<div class="col-sm-9">
<input type="text" id="contactsWeixin
1" name="contactsWeixin1
" placeholder="" class="col-xs-10 col-sm-10" />
<input type="text" id="contactsWeixin
2" name="contactsWeixin2
" placeholder="" class="col-xs-10 col-sm-10" />
</div>
</div>
...
...
@@ -464,9 +478,9 @@
<div class="col-xs-4">
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 手机</label>
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">
<font color="red">*</font>
手机</label>
<div class="col-sm-9">
<input type="text" id="contactsMobile
1" name="contactsMobile1
" placeholder="" class="col-xs-10 col-sm-10" />
<input type="text" id="contactsMobile
2" name="contactsMobile2
" placeholder="" class="col-xs-10 col-sm-10" />
</div>
</div>
...
...
@@ -474,7 +488,7 @@
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 联系地址</label>
<div class="col-sm-9">
<input type="text" id="contactsAddr
1" name="contactsAddr1
" placeholder="" class="col-xs-10 col-sm-10" />
<input type="text" id="contactsAddr
2" name="contactsAddr2
" placeholder="" class="col-xs-10 col-sm-10" />
</div>
</div>
...
...
src/main/webapp/resources/css/style.css
View file @
12a10d95
...
...
@@ -1051,4 +1051,27 @@ a.a15:active {
.form-group
{
margin-bottom
:
10px
;
}
\ No newline at end of file
}
.select2-container
{
float
:
left
;
}
.error
{
color
:
red
;
padding-left
:
4px
;
}
input
.error
{
border
:
1px
solid
red
;
}
src/main/webapp/resources/js/tools/jquery.validate.js
View file @
12a10d95
...
...
@@ -1203,3 +1203,206 @@ $.format = $.validator.format;
}
});
})(
jQuery
);
//字符验证,只能包含中文、英文、数字、下划线等字符。
jQuery
.
validator
.
addMethod
(
"stringCheck"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[
a-zA-Z0-9
\u
4e00-
\u
9fa5-_
]
+$/
.
test
(
value
);
},
"只能包含中文、英文、数字、下划线等字符"
);
// 匹配english
jQuery
.
validator
.
addMethod
(
"isEnglish"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[
A-Za-z
]
+$/
.
test
(
value
);
},
"匹配english"
);
// 匹配汉字
jQuery
.
validator
.
addMethod
(
"isChinese"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[\u
4e00-
\u
9fa5
]
+$/
.
test
(
value
);
},
"匹配汉字"
);
// 匹配中文(包括汉字和字符)
jQuery
.
validator
.
addMethod
(
"isChineseChar"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[\u
0391-
\u
FFE5
]
+$/
.
test
(
value
);
},
"匹配中文(包括汉字和字符) "
);
// 判断是否为合法字符(a-zA-Z0-9-_)
jQuery
.
validator
.
addMethod
(
"isRightfulString"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[
A-Za-z0-9_-
]
+$/
.
test
(
value
);
},
"判断是否为合法字符(a-zA-Z0-9-_)"
);
// 判断是否包含中英文特殊字符,除英文"-_"字符外
jQuery
.
validator
.
addMethod
(
"isContainsSpecialChar"
,
function
(
value
,
element
)
{
var
reg
=
RegExp
(
/
[
(
\
)(
\`
)(
\~
)(
\!
)(
\@
)(
\#
)(
\$
)(
\%
)(
\^
)(
\&
)(
\*
)(
\(
)(
\)
)(
\+
)(
\=
)(
\|
)(
\{
)(
\}
)(
\'
)(
\:
)(
\;
)(
\'
)(',)(
\[
)(
\]
)(
\.
)(
\<
)(
\>
)(
\/
)(
\?
)(
\~
)(
\!
)(
\@
)(
\#
)(
\¥
)(
\%
)(
\…
)(
\&
)(
\*
)(
\(
)(
\)
)(
\—
)(
\+
)(
\|
)(
\{
)(
\}
)(
\【
)(
\】
)(
\‘
)(
\;
)(
\:
)(
\”
)(
\“
)(
\’
)(
\。
)(
\,
)(
\、
)(
\?
)
]
+/
);
return
this
.
optional
(
element
)
||
!
reg
.
test
(
value
);
},
"含有中英文特殊字符"
);
// IP地址验证
jQuery
.
validator
.
addMethod
(
"ip"
,
function
(
value
,
element
)
{
var
ip
=
/^
(?:(?:
25
[
0-5
]
|2
[
0-4
][
0-9
]
|
[
01
]?[
0-9
][
0-9
]?)\.){3}(?:
25
[
0-5
]
|2
[
0-4
][
0-9
]
|
[
01
]?[
0-9
][
0-9
]?)
$/
;
return
this
.
optional
(
element
)
||
(
ip
.
test
(
value
)
&&
(
RegExp
.
$1
<
256
&&
RegExp
.
$2
<
256
&&
RegExp
.
$3
<
256
&&
RegExp
.
$4
<
256
));
},
"Please enter a valid IP address."
);
// 字母和数字的验证
jQuery
.
validator
.
addMethod
(
"chrnum"
,
function
(
value
,
element
)
{
var
chrnum
=
/^
([
a-zA-Z0-9
]
+
)
$/
;
return
this
.
optional
(
element
)
||
(
chrnum
.
test
(
value
));
},
"只能输入数字和字母(字符A-Z, a-z, 0-9)"
);
// 中文的验证
jQuery
.
validator
.
addMethod
(
"chinese"
,
function
(
value
,
element
)
{
var
chinese
=
/^
[\u
4e00-
\u
9fa5
]
+$/
;
return
this
.
optional
(
element
)
||
(
chinese
.
test
(
value
));
},
"只能输入中文"
);
//判断整数value是否等于0
jQuery
.
validator
.
addMethod
(
"isIntEqZero"
,
function
(
value
,
element
)
{
value
=
parseInt
(
value
);
return
this
.
optional
(
element
)
||
value
==
0
;
},
"整数必须为0"
);
// 判断整数value是否大于0
jQuery
.
validator
.
addMethod
(
"isIntGtZero"
,
function
(
value
,
element
)
{
value
=
parseInt
(
value
);
return
this
.
optional
(
element
)
||
value
>
0
;
},
"Please enter a number greater than 0."
);
// 判断整数value是否大于或等于0
jQuery
.
validator
.
addMethod
(
"isIntGteZero"
,
function
(
value
,
element
)
{
value
=
parseInt
(
value
);
return
this
.
optional
(
element
)
||
value
>=
0
;
},
"整数必须大于或等于0"
);
// 判断整数value是否不等于0
jQuery
.
validator
.
addMethod
(
"isIntNEqZero"
,
function
(
value
,
element
)
{
value
=
parseInt
(
value
);
return
this
.
optional
(
element
)
||
value
!=
0
;
},
"整数必须不等于0"
);
// 判断整数value是否小于0
jQuery
.
validator
.
addMethod
(
"isIntLtZero"
,
function
(
value
,
element
)
{
value
=
parseInt
(
value
);
return
this
.
optional
(
element
)
||
value
<
0
;
},
"整数必须小于0"
);
// 判断整数value是否小于或等于0
jQuery
.
validator
.
addMethod
(
"isIntLteZero"
,
function
(
value
,
element
)
{
value
=
parseInt
(
value
);
return
this
.
optional
(
element
)
||
value
<=
0
;
},
"整数必须小于或等于0"
);
// 判断浮点数value是否等于0
jQuery
.
validator
.
addMethod
(
"isFloatEqZero"
,
function
(
value
,
element
)
{
value
=
parseFloat
(
value
);
return
this
.
optional
(
element
)
||
value
==
0
;
},
"浮点数必须为0"
);
// 判断浮点数value是否大于0
jQuery
.
validator
.
addMethod
(
"isFloatGtZero"
,
function
(
value
,
element
)
{
value
=
parseFloat
(
value
);
return
this
.
optional
(
element
)
||
value
>
0
;
},
"Please enter a number greater than 0."
);
// 判断浮点数value是否大于或等于0
jQuery
.
validator
.
addMethod
(
"isFloatGteZero"
,
function
(
value
,
element
)
{
value
=
parseFloat
(
value
);
return
this
.
optional
(
element
)
||
value
>=
0
;
},
"Please enter a number greater than or equal 0."
);
// 判断浮点数value是否不等于0
jQuery
.
validator
.
addMethod
(
"isFloatNEqZero"
,
function
(
value
,
element
)
{
value
=
parseFloat
(
value
);
return
this
.
optional
(
element
)
||
value
!=
0
;
},
"浮点数必须不等于0"
);
// 判断浮点数value是否小于0
jQuery
.
validator
.
addMethod
(
"isFloatLtZero"
,
function
(
value
,
element
)
{
value
=
parseFloat
(
value
);
return
this
.
optional
(
element
)
||
value
<
0
;
},
"浮点数必须小于0"
);
// 判断浮点数value是否小于或等于0
jQuery
.
validator
.
addMethod
(
"isFloatLteZero"
,
function
(
value
,
element
)
{
value
=
parseFloat
(
value
);
return
this
.
optional
(
element
)
||
value
<=
0
;
},
"浮点数必须小于或等于0"
);
// 判断浮点型
jQuery
.
validator
.
addMethod
(
"isFloat"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[
-
\+]?\d
+
(\.\d
+
)?
$/
.
test
(
value
);
},
"只能包含数字、小数点等字符"
);
// 匹配integer
jQuery
.
validator
.
addMethod
(
"isInteger"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
(
/^
[
-
\+]?\d
+$/
.
test
(
value
)
&&
parseInt
(
value
)
>=
0
);
},
"Please enter an integer"
);
// 判断数值类型,包括整数和浮点数
jQuery
.
validator
.
addMethod
(
"isNumber"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[
-
\+]?\d
+$/
.
test
(
value
)
||
/^
[
-
\+]?\d
+
(\.\d
+
)?
$/
.
test
(
value
);
},
"匹配数值类型,包括整数和浮点数"
);
// 只能输入[0-9]数字
jQuery
.
validator
.
addMethod
(
"isDigits"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
\d
+$/
.
test
(
value
);
},
"只能输入0-9数字"
);
// 判断中文字符
jQuery
.
validator
.
addMethod
(
"isChinese"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[\u
0391-
\u
FFE5
]
+$/
.
test
(
value
);
},
"只能包含中文字符。"
);
// 判断英文字符
jQuery
.
validator
.
addMethod
(
"isEnglish"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[
A-Za-z
]
+$/
.
test
(
value
);
},
"只能包含英文字符。"
);
// 手机号码验证
jQuery
.
validator
.
addMethod
(
"isMobile"
,
function
(
value
,
element
)
{
var
length
=
value
.
length
;
var
mobile
=
/^1
[
0-9
]{10}
$/
;
return
this
.
optional
(
element
)
||
(
length
==
11
&&
mobile
.
test
(
value
));
},
"请填写正确的手机号码"
);
// 电话号码验证
jQuery
.
validator
.
addMethod
(
"isPhone"
,
function
(
value
,
element
)
{
var
tel
=
/^
(\d{3,4}
-
?)?\d{7,9}
$/g
;
return
this
.
optional
(
element
)
||
(
tel
.
test
(
value
));
},
"请正确填写您的电话号码。"
);
// 联系电话(手机/电话皆可)验证
jQuery
.
validator
.
addMethod
(
"isTel"
,
function
(
value
,
element
)
{
var
length
=
value
.
length
;
var
mobile
=
/^
(((
13
[
0-9
]{1})
|
(
15
[
0-9
]{1})
|
(
18
[
0-9
]{1}))
+
\d{8})
$/
;
var
tel
=
/^
(\d{3,4}
-
?)?\d{7,9}
$/g
;
return
this
.
optional
(
element
)
||
tel
.
test
(
value
)
||
(
length
==
11
&&
mobile
.
test
(
value
));
},
"请正确填写您的联系方式"
);
// 匹配qq
jQuery
.
validator
.
addMethod
(
"isQq"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[
1-9
]\d{4,12}
$/
;
},
"匹配QQ"
);
// 邮政编码验证
jQuery
.
validator
.
addMethod
(
"isZipCode"
,
function
(
value
,
element
)
{
var
zip
=
/^
[
0-9
]{6}
$/
;
return
this
.
optional
(
element
)
||
(
zip
.
test
(
value
));
},
"请正确填写您的邮政编码。"
);
// 匹配密码,以字母开头,长度在6-12之间,只能包含字符、数字和下划线。
jQuery
.
validator
.
addMethod
(
"isPwd"
,
function
(
value
,
element
)
{
return
this
.
optional
(
element
)
||
/^
[
a-zA-Z
]\\
w
{6,12}
$/
.
test
(
value
);
},
"以字母开头,长度在6-12之间,只能包含字符、数字和下划线。"
);
// 身份证号码验证
jQuery
.
validator
.
addMethod
(
"isIdCardNo"
,
function
(
value
,
element
)
{
//var idCard = /^(\d{6})()?(\d{4})(\d{2})(\d{2})(\d{3})(\w)$/;
return
this
.
optional
(
element
)
||
isIdCardNo
(
value
);
},
"请输入正确的身份证号码。"
);
jQuery
.
validator
.
addMethod
(
"isIdCardNo"
,
function
(
value
,
element
)
{
//var idCard = /^(\d{6})()?(\d{4})(\d{2})(\d{2})(\d{3})(\w)$/;
return
this
.
optional
(
element
)
||
isIdCardNo
(
value
);
},
"请输入正确的身份证号码。"
);
src/main/webapp/resources/js/user/user.js
View file @
12a10d95
var
isSubmit
=
true
;
$
(
document
).
ready
(
function
(){
if
(
$
(
'#userForm'
).
length
>
0
){
$
(
'#userForm'
).
validate
({
doNotHideMessage
:
true
,
//this option enables to show the error/success messages on tab switch.
errorElement
:
'span'
,
//default input error message container
errorClass
:
'validate-inline'
,
// default input error message class
focusInvalid
:
false
,
// do not focus the last invalid input
rules
:
{
"
firstN
ame"
:
{
"
n
ame"
:
{
required
:
true
},
"
lastName
"
:
{
"
birthday
"
:
{
required
:
true
},
"
role
Id"
:
{
"
paper
Id"
:
{
required
:
true
},
"email"
:
{
required
:
true
,
email
:
true
"nativePlace"
:
{
required
:
true
},
"
password
"
:
{
required
:
"#changePassword:checked"
"
addr
"
:
{
required
:
true
},
"confirm_password"
:
{
required
:
"#changePassword:checked"
,
equalTo
:
"#password"
"mobile"
:
{
required
:
true
,
isMobile
:
true
,
maxlength
:
11
,
minlength
:
11
},
"
roleId
"
:
{
"
qq
"
:
{
required
:
true
},
"
jobNumber
"
:
{
required
:
"#isEmployee:checked"
"
contactsName1
"
:
{
required
:
true
},
"hireOnDateValue"
:
{
required
:
"#isEmployee:checked"
"contactsMobile1"
:
{
required
:
true
,
isMobile
:
true
,
maxlength
:
11
,
minlength
:
11
},
"clockId"
:
{
required
:
"#isEmployee:checked"
,
number
:
"#isEmployee:checked"
,
min
:
1
"contactsName2"
:
{
required
:
true
},
"payId"
:
{
required
:
"#isEmployee:checked"
"contactsMobile2"
:
{
required
:
true
,
isMobile
:
true
,
maxlength
:
11
,
minlength
:
11
}
},
messages
:{
"name"
:
{
required
:
"不能为空"
},
"
paygroupId
"
:
{
required
:
"
#isEmployee:checked"
"
birthday
"
:
{
required
:
"
不能为空"
},
"departmentValue"
:
{
required
:
true
"paperId"
:
{
required
:
"不能为空"
},
"nativePlace"
:
{
required
:
"不能为空"
},
"addr"
:
{
required
:
"不能为空"
},
"mobile"
:
{
required
:
"不能为空"
},
"qq"
:
{
required
:
"不能为空"
},
"contactsName1"
:
{
required
:
"不能为空"
},
"contactsMobile1"
:
{
required
:
"不能为空"
},
"contactsName2"
:
{
required
:
"不能为空"
},
"contactsMobile2"
:
{
required
:
"不能为空"
}
},
errorPlacement
:
function
(
error
,
element
)
{
// render error placement for each input type
error
.
insertAfter
(
element
);
// for other inputs, just perform default behavoir
if
(
element
.
attr
(
"name"
)
==
"roleId"
)
{
$
(
"#roleId-controls div a"
).
attr
(
"style"
,
"border-color: #b94a48 !important"
);
}
},
invalidHandler
:
function
(
event
,
validator
)
{
//display error alert on form submit
parent
.
Loading
.
stop
();
},
highlight
:
function
(
element
)
{
// hightlight error inputs
$
(
element
).
closest
(
'.help-inline'
).
removeClass
(
'ok'
);
// display OK icon
$
(
element
).
closest
(
'.control-group'
).
removeClass
(
'success'
).
addClass
(
'error'
);
// set error class to the control group
},
unhighlight
:
function
(
element
)
{
// revert the change dony by hightlight
$
(
element
).
closest
(
'.control-group'
).
removeClass
(
'error'
);
// set error class to the control group
if
(
$
(
element
).
attr
(
"name"
)
==
"roleId"
)
{
$
(
"#roleId-controls div a"
).
attr
(
"style"
,
""
);
}
},
success
:
function
(
label
)
{
label
.
addClass
(
'valid'
).
closest
(
'.control-group'
).
removeClass
(
'error'
);
// set success class to the control group
label
.
remove
();
},
submitHandler
:
function
(
form
){
user
.
save
(
form
,
false
);
},
onfocusin
:
function
(
element
,
event
)
{
submitHandler
:
function
(
form
){
user
.
save
(
form
);
}
});
}
...
...
@@ -125,7 +130,89 @@ $(document).ready(function(){
var
user
=
{
save
:
function
(
form
){
if
(
isSubmit
){
isSubmit
=
false
;
$
.
ajax
({
type
:
'POST'
,
url
:
'/api/user/save'
,
dataType
:
'json'
,
data
:
{
role
:
$
(
'#role'
).
val
(),
name
:
$
(
'#name'
).
val
(),
gender
:
$
(
'input:radio[name="gender"]:checked'
).
val
(),
birthday
:
$
(
'#birthday'
).
val
(),
paperType
:
$
(
'#paperType'
).
val
(),
paperId
:
$
(
'#paperId'
).
val
(),
nation
:
$
(
'#nation'
).
val
(),
nationality
:
$
(
'#nationality'
).
val
(),
nativePlace
:
$
(
'#nativePlace'
).
val
(),
domicilePlace
:
$
(
'#domicilePlace'
).
val
(),
addr
:
$
(
'#addr'
).
val
(),
education
:
$
(
'#education'
).
val
(),
unit
:
$
(
'#unit'
).
val
(),
profession
:
$
(
'#profession'
).
val
(),
unitAddr
:
$
(
'#unitAddr'
).
val
(),
unitTel
:
$
(
'#unitTel'
).
val
(),
mobile
:
$
(
'#mobile'
).
val
(),
tel
:
$
(
'#tel'
).
val
(),
email
:
$
(
'#email'
).
val
(),
qq
:
$
(
'#qq'
).
val
(),
weixin
:
$
(
'#weixin'
).
val
(),
donateBloodCount
:
$
(
'#donateBloodCount'
).
val
(),
bloodType
:
$
(
'#bloodType'
).
val
(),
height
:
$
(
'#height'
).
val
(),
weight
:
$
(
'#weight'
).
val
(),
remark
:
$
(
'#remark'
).
val
(),
contactsName1
:
$
(
'#contactsName1'
).
val
(),
contactsQQ1
:
$
(
'#contactsQQ1'
).
val
(),
contactsRelation1
:
$
(
'#contactsRelation1'
).
val
(),
contactsWeixin1
:
$
(
'#contactsWeixin1'
).
val
(),
contactsMobile1
:
$
(
'#contactsMobile1'
).
val
(),
contactsAddr1
:
$
(
'#contactsAddr1'
).
val
(),
contactsName2
:
$
(
'#contactsName2'
).
val
(),
contactsQQ2
:
$
(
'#contactsQQ2'
).
val
(),
contactsRelation2
:
$
(
'#contactsRelation2'
).
val
(),
contactsWeixin2
:
$
(
'#contactsWeixin2'
).
val
(),
contactsMobile2
:
$
(
'#contactsMobile2'
).
val
(),
contactsAddr2
:
$
(
'#contactsAddr2'
).
val
()
},
success
:
function
(
data
){
var
status
=
data
.
status
;
if
(
status
==
1
){
//注册成功
bootbox
.
dialog
({
message
:
"新增用户成功"
,
buttons
:{
"success"
:{
"label"
:
"返回"
,
"className"
:
"btn-sm btn-primary"
,
"callback"
:
function
()
{
window
.
location
.
href
=
'<webpath:path/>/'
;
}
},
"success"
:{
"label"
:
"继续添加"
,
"className"
:
"btn-sm btn-primary"
,
"callback"
:
function
()
{
window
.
location
.
href
=
'<webpath:path/>/'
;
}
}
}
});
}
}
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment