Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
LuJin-Im
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
yangzhaojun
LuJin-Im
Commits
0a3b62c8
Commit
0a3b62c8
authored
Jul 14, 2018
by
李博今
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
每行长度窄一些
添加时,添加按钮隐藏,注册->添加 取消->返回 修改时显示用户ID和账号 添加密码修改
parent
5d0127b4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
155 additions
and
48 deletions
+155
-48
UserAccountDao.java
...in/java/com/qiqiim/webserver/user/dao/UserAccountDao.java
+2
-0
UserAccountDao.xml
...ain/java/com/qiqiim/webserver/user/dao/UserAccountDao.xml
+4
-0
ConsultantManagerEntity.java
.../qiqiim/webserver/user/model/ConsultantManagerEntity.java
+8
-0
UserAccountServiceImpl.java
...m/webserver/user/service/impl/UserAccountServiceImpl.java
+3
-1
conljjlwsultant.jsp
src/main/webapp/WEB-INF/page/user/conljjlwsultant.jsp
+39
-12
conljjyfsultant.jsp
src/main/webapp/WEB-INF/page/user/conljjyfsultant.jsp
+39
-12
consultantlist.jsp
src/main/webapp/WEB-INF/page/user/consultantlist.jsp
+60
-23
No files found.
src/main/java/com/qiqiim/webserver/user/dao/UserAccountDao.java
View file @
0a3b62c8
...
...
@@ -27,6 +27,8 @@ public interface UserAccountDao extends BaseDao<UserAccountEntity> {
public
int
updateConsultantDept
(
@Param
(
value
=
"deptName"
)
String
deptName
,
@Param
(
value
=
"id"
)
long
id
);
public
int
updateConsultantPassword
(
@Param
(
value
=
"password"
)
String
password
,
@Param
(
value
=
"id"
)
long
id
);
public
int
updateConsultantPhone
(
@Param
(
value
=
"phone"
)
String
phone
,
@Param
(
value
=
"id"
)
long
id
);
public
int
updateConsultantName
(
@Param
(
value
=
"name"
)
String
name
,
@Param
(
value
=
"id"
)
long
id
);
...
...
src/main/java/com/qiqiim/webserver/user/dao/UserAccountDao.xml
View file @
0a3b62c8
...
...
@@ -158,4 +158,8 @@
<update
id=
"updateConsultantPhone"
>
update user_info set phone = #{phone} where uid = #{id}
</update>
<update
id=
"updateConsultantPassword"
>
update user_account set password = #{password} where id = #{id}
</update>
</mapper>
\ No newline at end of file
src/main/java/com/qiqiim/webserver/user/model/ConsultantManagerEntity.java
View file @
0a3b62c8
...
...
@@ -16,7 +16,15 @@ public class ConsultantManagerEntity {
private
String
headPic
;
private
String
whereToGo
;
private
String
password
;
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getWhereToGo
()
{
return
whereToGo
;
...
...
src/main/java/com/qiqiim/webserver/user/service/impl/UserAccountServiceImpl.java
View file @
0a3b62c8
...
...
@@ -101,7 +101,9 @@ public class UserAccountServiceImpl implements UserAccountService {
int
i
=
0
;
if
(
consultantManagerEntity
.
getDeptName
()
!=
null
&&
!
""
.
equals
(
consultantManagerEntity
.
getDeptName
())){
i
+=
userAccountDao
.
updateConsultantDept
(
new
String
(
consultantManagerEntity
.
getDeptName
().
getBytes
(
"iso8859-1"
),
"UTF-8"
),
Long
.
parseLong
(
consultantManagerEntity
.
getId
()));
}
if
(
consultantManagerEntity
.
getPassword
()
!=
null
&&
!
""
.
equals
(
consultantManagerEntity
.
getPassword
())){
i
+=
userAccountDao
.
updateConsultantPassword
(
new
String
(
consultantManagerEntity
.
getPassword
().
getBytes
(
"iso8859-1"
),
"UTF-8"
),
Long
.
parseLong
(
consultantManagerEntity
.
getId
()));
}
if
(
consultantManagerEntity
.
getName
()
!=
null
&&
!
""
.
equals
(
consultantManagerEntity
.
getName
())){
i
+=
userAccountDao
.
updateConsultantName
(
new
String
(
consultantManagerEntity
.
getName
().
getBytes
(
"iso8859-1"
),
"UTF-8"
),
Long
.
parseLong
(
consultantManagerEntity
.
getId
()));
...
...
src/main/webapp/WEB-INF/page/user/conljjlwsultant.jsp
View file @
0a3b62c8
...
...
@@ -5,13 +5,16 @@
<html>
<head>
<title>
顾问管理
</title>
<link
href=
"img/icon.ico"
rel=
"SHORTCUT ICON"
/>
<%@ include
file=
"/WEB-INF/page/public/meta.jsp"
%>
<link
rel=
"stylesheet"
href=
"layui/css/layui.css"
>
</head>
<body>
<button
class=
"layui-btn layui-btn-primary layui-btn-xs sendUserMsg"
onclick=
"add()"
id=
"add"
>
添加
</button>
<div
style=
"margin: 20px;"
>
<div
id=
"list"
>
<button
class=
"layui-btn layui-btn-primary layui-btn-xs sendUserMsg"
onclick=
"add()"
id=
"add"
style=
"width: 100px;height: 40px"
>
添加
</button>
<table
class=
"layui-table"
lay-size=
"lg"
>
<colgroup>
<col
width=
"150"
>
...
...
@@ -32,7 +35,7 @@
<tbody>
<c:forEach
items=
"
${
allsession
}
"
var=
"user"
>
<tr>
<td><img
src=
"${user.headPic}"
/></td>
<td><img
s
tyle=
"width: 75px;height: 75px"
s
rc=
"${user.headPic}"
/></td>
<td>
${user.id}
</td>
<td>
${user.account}
</td>
<td>
${user.name}
</td>
...
...
@@ -66,6 +69,20 @@
<fieldset
class=
"layui-elem-field index-button"
style=
"margin-top: 30px"
>
<legend>
修改
</legend>
<div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
ID
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"name"
id=
"id1"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"请输入账号"
class=
"layui-input"
disabled
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
账号
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"name"
id=
"account1"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"请输入账号"
class=
"layui-input"
disabled
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
姓名
</label>
<div
class=
"layui-input-block"
>
...
...
@@ -73,6 +90,13 @@
placeholder=
"请输入账号"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
密码
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"password"
id=
"password1"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"不填写则为不修改"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
联系电话
</label>
<div
class=
"layui-input-block"
>
...
...
@@ -82,9 +106,9 @@
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<input
type=
"submit"
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
value=
"修改"
/>
<input
type=
"submit"
id=
"updBut"
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
value=
"修改"
/>
<button
class=
"layui-btn layui-btn-primary"
onclick=
"cancel()"
target=
"_blank"
><i
class=
"layui-icon"
>

</i>
取消
class=
"layui-icon"
>

</i>
返回
</button>
</div>
</div>
...
...
@@ -94,7 +118,7 @@
</div>
<div
id=
"addForm"
style=
"display: none"
>
<fieldset
class=
"layui-elem-field index-button"
style=
"margin-top: 30px"
>
<legend>
注册
</legend>
<legend>
添加
</legend>
<div>
<form
class=
"layui-form"
action=
"addConsultant"
method=
"post"
>
<div
class=
"layui-form-item"
>
...
...
@@ -129,9 +153,9 @@
<input
type=
"text"
name=
"whereToGo"
value=
"3"
style=
"display: none"
/>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
>
立即注册
</button>
<button
class=
"layui-btn"
id=
"regBut"
lay-submit=
""
lay-filter=
"reg"
>
添加
</button>
<button
class=
"layui-btn layui-btn-primary"
onclick=
"cancel()"
target=
"_blank"
><i
class=
"layui-icon"
>

</i>
取消
class=
"layui-icon"
>

</i>
返回
</button>
</div>
</div>
...
...
@@ -160,6 +184,8 @@
var
tr
=
e
.
parentElement
.
parentElement
;
console
.
log
(
tr
);
document
.
getElementById
(
"uid1"
).
value
=
tr
.
children
[
1
].
innerHTML
;
document
.
getElementById
(
"id1"
).
value
=
tr
.
children
[
1
].
innerHTML
;
document
.
getElementById
(
"account1"
).
value
=
tr
.
children
[
2
].
innerHTML
;
document
.
getElementById
(
"name1"
).
value
=
tr
.
children
[
3
].
innerHTML
;
document
.
getElementById
(
"phone1"
).
value
=
tr
.
children
[
5
].
innerHTML
;
list
.
style
.
display
=
'none'
;
...
...
@@ -192,18 +218,18 @@
document
.
getElementById
(
"updatePic"
).
style
.
display
=
'none'
;
}
else
{
alert
(
"图片不能为空"
);
return
false
;
}
}
updateDetailForm
.
onsubmit
=
function
()
{
if
(
document
.
getElementById
(
"name1"
).
value
!==
""
&&
document
.
getElementById
(
"deptName1"
).
value
!==
""
&&
document
.
getElementById
(
"phone1"
).
value
!==
""
)
{
document
.
getElementById
(
"updBut"
).
onclick
=
function
()
{
if
(
document
.
getElementById
(
"name1"
).
value
!==
""
)
{
document
.
getElementById
(
"updateDetail"
).
submit
();
}
else
{
alert
(
"数据不能为空"
);
return
false
;
}
}
addForm
.
onsubmit
=
function
()
{
document
.
getElementById
(
"regBut"
).
onclick
=
function
()
{
if
(
document
.
getElementById
(
"account2"
).
value
!==
""
&&
document
.
getElementById
(
"password2"
).
value
!==
""
&&
document
.
getElementById
(
"deptid2"
).
value
!==
""
&&
...
...
@@ -211,6 +237,7 @@
document
.
getElementById
(
"addForm"
).
submit
();
}
else
{
alert
(
"数据不能为空"
);
return
false
;
}
}
...
...
src/main/webapp/WEB-INF/page/user/conljjyfsultant.jsp
View file @
0a3b62c8
...
...
@@ -5,13 +5,16 @@
<html>
<head>
<title>
顾问管理
</title>
<link
href=
"img/icon.ico"
rel=
"SHORTCUT ICON"
/>
<%@ include
file=
"/WEB-INF/page/public/meta.jsp"
%>
<link
rel=
"stylesheet"
href=
"layui/css/layui.css"
>
</head>
<body>
<button
class=
"layui-btn layui-btn-primary layui-btn-xs sendUserMsg"
onclick=
"add()"
id=
"add"
>
添加
</button>
<div
style=
"margin: 20px;"
>
<div
id=
"list"
>
<button
class=
"layui-btn layui-btn-primary layui-btn-xs sendUserMsg"
onclick=
"add()"
id=
"add"
style=
"width: 100px;height: 40px"
>
添加
</button>
<table
class=
"layui-table"
lay-size=
"lg"
>
<colgroup>
<col
width=
"150"
>
...
...
@@ -32,7 +35,7 @@
<tbody>
<c:forEach
items=
"
${
allsession
}
"
var=
"user"
>
<tr>
<td><img
src=
"${user.headPic}"
/></td>
<td><img
s
tyle=
"width: 75px;height: 75px"
s
rc=
"${user.headPic}"
/></td>
<td>
${user.id}
</td>
<td>
${user.account}
</td>
<td>
${user.name}
</td>
...
...
@@ -66,6 +69,20 @@
<fieldset
class=
"layui-elem-field index-button"
style=
"margin-top: 30px"
>
<legend>
修改
</legend>
<div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
ID
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"name"
id=
"id1"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"请输入账号"
class=
"layui-input"
disabled
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
账号
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"name"
id=
"account1"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"请输入账号"
class=
"layui-input"
disabled
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
姓名
</label>
<div
class=
"layui-input-block"
>
...
...
@@ -73,6 +90,13 @@
placeholder=
"请输入账号"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
密码
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"password"
id=
"password1"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"不填写则为不修改"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
联系电话
</label>
<div
class=
"layui-input-block"
>
...
...
@@ -83,9 +107,9 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<input
type=
"submit"
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
value=
"修改"
/>
<input
type=
"submit"
id=
"updBut"
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
value=
"修改"
/>
<button
class=
"layui-btn layui-btn-primary"
onclick=
"cancel()"
target=
"_blank"
><i
class=
"layui-icon"
>

</i>
取消
class=
"layui-icon"
>

</i>
返回
</button>
</div>
</div>
...
...
@@ -95,7 +119,7 @@
</div>
<div
id=
"addForm"
style=
"display: none"
>
<fieldset
class=
"layui-elem-field index-button"
style=
"margin-top: 30px"
>
<legend>
注册
</legend>
<legend>
添加
</legend>
<div>
<form
class=
"layui-form"
action=
"addConsultant"
method=
"post"
>
<div
class=
"layui-form-item"
>
...
...
@@ -130,9 +154,9 @@
<input
type=
"text"
name=
"whereToGo"
value=
"4"
style=
"display: none"
/>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
>
立即注册
</button>
<button
class=
"layui-btn"
id=
"regBut"
lay-submit=
""
lay-filter=
"reg"
>
添加
</button>
<button
class=
"layui-btn layui-btn-primary"
onclick=
"cancel()"
target=
"_blank"
><i
class=
"layui-icon"
>

</i>
取消
class=
"layui-icon"
>

</i>
返回
</button>
</div>
</div>
...
...
@@ -161,6 +185,8 @@
var
tr
=
e
.
parentElement
.
parentElement
;
console
.
log
(
tr
);
document
.
getElementById
(
"uid1"
).
value
=
tr
.
children
[
1
].
innerHTML
;
document
.
getElementById
(
"id1"
).
value
=
tr
.
children
[
1
].
innerHTML
;
document
.
getElementById
(
"account1"
).
value
=
tr
.
children
[
2
].
innerHTML
;
document
.
getElementById
(
"name1"
).
value
=
tr
.
children
[
3
].
innerHTML
;
document
.
getElementById
(
"phone1"
).
value
=
tr
.
children
[
5
].
innerHTML
;
list
.
style
.
display
=
'none'
;
...
...
@@ -193,18 +219,18 @@
document
.
getElementById
(
"updatePic"
).
style
.
display
=
'none'
;
}
else
{
alert
(
"图片不能为空"
);
return
false
;
}
}
updateDetailForm
.
onsubmit
=
function
()
{
if
(
document
.
getElementById
(
"name1"
).
value
!==
""
&&
document
.
getElementById
(
"deptName1"
).
value
!==
""
&&
document
.
getElementById
(
"phone1"
).
value
!==
""
)
{
document
.
getElementById
(
"updBut"
).
onclick
=
function
()
{
if
(
document
.
getElementById
(
"name1"
).
value
!==
""
)
{
document
.
getElementById
(
"updateDetail"
).
submit
();
}
else
{
alert
(
"数据不能为空"
);
return
false
;
}
}
addForm
.
onsubmit
=
function
()
{
document
.
getElementById
(
"regBut"
).
onclick
=
function
()
{
if
(
document
.
getElementById
(
"account2"
).
value
!==
""
&&
document
.
getElementById
(
"password2"
).
value
!==
""
&&
document
.
getElementById
(
"deptid2"
).
value
!==
""
&&
...
...
@@ -212,6 +238,7 @@
document
.
getElementById
(
"addForm"
).
submit
();
}
else
{
alert
(
"数据不能为空"
);
return
false
;
}
}
...
...
src/main/webapp/WEB-INF/page/user/consultantlist.jsp
View file @
0a3b62c8
...
...
@@ -5,13 +5,17 @@
<html>
<head>
<title>
顾问管理
</title>
<link
href=
"img/icon.ico"
rel=
"SHORTCUT ICON"
/>
<%@ include
file=
"/WEB-INF/page/public/meta.jsp"
%>
<link
rel=
"stylesheet"
href=
"layui/css/layui.css"
>
</head>
<body>
<button
class=
"layui-btn layui-btn-primary layui-btn-xs sendUserMsg"
onclick=
"add()"
id=
"add"
>
添加
</button>
<div
style=
"margin: 20px;"
>
<div
id=
"list"
>
<button
class=
"layui-btn layui-btn-primary layui-btn-xs sendUserMsg"
onclick=
"add()"
id=
"add"
style=
"width: 100px;height: 40px"
>
添加
</button>
<table
class=
"layui-table"
lay-size=
"lg"
>
<colgroup>
<col
width=
"150"
>
...
...
@@ -32,7 +36,7 @@
<tbody>
<c:forEach
items=
"
${
allsession
}
"
var=
"user"
>
<tr>
<td><img
src=
"${user.headPic}"
/></td>
<td><img
s
tyle=
"width: 75px;height: 75px"
s
rc=
"${user.headPic}"
/></td>
<td>
${user.id}
</td>
<td>
${user.account}
</td>
<td>
${user.name}
</td>
...
...
@@ -65,6 +69,20 @@
<fieldset
class=
"layui-elem-field index-button"
style=
"margin-top: 30px"
>
<legend>
修改
</legend>
<div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
ID
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"name"
id=
"id1"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"请输入账号"
class=
"layui-input"
disabled
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
账号
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"name"
id=
"account1"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"请输入账号"
class=
"layui-input"
disabled
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
姓名
</label>
<div
class=
"layui-input-block"
>
...
...
@@ -72,6 +90,13 @@
placeholder=
"请输入账号"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
密码
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"password"
id=
"password1"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"不填写则为不修改"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
联系电话
</label>
<div
class=
"layui-input-block"
>
...
...
@@ -95,9 +120,10 @@
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<input
type=
"submit"
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
value=
"修改"
/>
<button
class=
"layui-btn layui-btn-primary"
onclick=
"cancel()"
target=
"_blank"
><i
class=
"layui-icon"
>

</i>
取消
<input
type=
"button"
id=
"updBut"
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
value=
"修改"
/>
<button
class=
"layui-btn layui-btn-primary"
onclick=
"cancel()"
><i
class=
"layui-icon"
>

</i>
返回
</button>
</div>
</div>
...
...
@@ -107,7 +133,7 @@
</div>
<div
id=
"addForm"
style=
"display: none"
>
<fieldset
class=
"layui-elem-field index-button"
style=
"margin-top: 30px"
>
<legend>
注册
</legend>
<legend>
添加
</legend>
<div>
<form
class=
"layui-form"
action=
"addConsultant"
method=
"post"
>
<div
class=
"layui-form-item"
>
...
...
@@ -138,21 +164,25 @@
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<label
class=
"layui-form-label"
>
所在部门
</label>
<select
name=
"deptid"
id=
"deptid2"
lay-verify=
"required"
style=
"display: block"
>
<option
value=
"1"
selected
>
路劲太阳城
</option>
<option
value=
"3"
>
路劲隽澜湾
</option>
<option
value=
"4"
>
路劲隽悦府
</option>
</select>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
所在部门
</label>
<div
class=
"layui-input-block"
>
<button
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
>
立即注册
</button>
<select
name=
"deptid"
id=
"deptid2"
lay-verify=
"required"
style=
"display: block"
>
<option
value=
"1"
selected
>
路劲太阳城
</option>
<option
value=
"3"
>
路劲隽澜湾
</option>
<option
value=
"4"
>
路劲隽悦府
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
id=
"regBut"
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
>
添加
</button>
<button
class=
"layui-btn layui-btn-primary"
onclick=
"cancel()"
target=
"_blank"
><i
class=
"layui-icon"
>

</i>
取消
class=
"layui-icon"
>

</i>
返回
</button>
</div>
</div>
...
...
@@ -175,14 +205,17 @@
var
updatePicForm
=
document
.
getElementById
(
"updatePic"
);
var
updateDetailForm
=
document
.
getElementById
(
"updateDetail"
);
function
del
(
e
){
function
del
(
e
)
{
document
.
getElementById
(
"id3"
).
value
=
e
.
parentElement
.
parentElement
.
children
[
1
].
innerHTML
;
document
.
getElementById
(
"delForm"
).
submit
();
}
function
update
(
e
)
{
var
tr
=
e
.
parentElement
.
parentElement
;
console
.
log
(
tr
);
document
.
getElementById
(
"uid1"
).
value
=
tr
.
children
[
1
].
innerHTML
;
document
.
getElementById
(
"id1"
).
value
=
tr
.
children
[
1
].
innerHTML
;
document
.
getElementById
(
"account1"
).
value
=
tr
.
children
[
2
].
innerHTML
;
document
.
getElementById
(
"name1"
).
value
=
tr
.
children
[
3
].
innerHTML
;
if
(
tr
.
children
[
4
].
innerHTML
===
"路劲太阳城置业顾问"
)
{
alert
(
"路劲太阳城置业顾问"
);
...
...
@@ -223,18 +256,21 @@
document
.
getElementById
(
"updatePic"
).
style
.
display
=
'none'
;
}
else
{
alert
(
"图片不能为空"
);
return
false
;
}
}
updateDetailForm
.
onsubmit
=
function
()
{
document
.
getElementById
(
"updBut"
).
onclick
=
function
()
{
if
(
document
.
getElementById
(
"name1"
).
value
!==
""
&&
document
.
getElementById
(
"deptName1"
).
value
!==
""
&&
document
.
getElementById
(
"phone1"
).
value
!==
""
)
{
document
.
getElementById
(
"deptName1"
).
value
!==
""
)
{
document
.
getElementById
(
"updateDetail"
).
submit
();
}
else
{
alert
(
"数据不能为空"
);
return
false
;
}
}
addForm
.
onsubmit
=
function
()
{
// addForm.onsubmit = function () {
document
.
getElementById
(
"regBut"
).
onclick
=
function
()
{
if
(
document
.
getElementById
(
"account2"
).
value
!==
""
&&
document
.
getElementById
(
"password2"
).
value
!==
""
&&
document
.
getElementById
(
"deptid2"
).
value
!==
""
&&
...
...
@@ -242,6 +278,7 @@
document
.
getElementById
(
"addForm"
).
submit
();
}
else
{
alert
(
"数据不能为空"
);
return
false
;
}
}
...
...
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