Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
page
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
878e56db
authored
2018-03-30 14:33:15 +0800
by
wang
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
59572968
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
9 deletions
application/views/perm/staff.php
application/views/perm/staffAdd.php
application/views/perm/staffEdit.php
application/views/perm/staff.php
View file @
878e56d
...
...
@@ -75,6 +75,7 @@
<button class="btn radius size-M">请选择 <i class="Hui-iconfont"></i></button>\
<ul class="dropDown-menu menu radius box-shadow">\
'+str+'\
<li><a href="javascript:edit('+data+');">编辑</a></li>\
<li><a href="javascript:reset('+data+');">重置密码</a></li>\
</ul></span>';
}
...
...
application/views/perm/staffAdd.php
View file @
878e56d
...
...
@@ -19,7 +19,7 @@
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
身份证号码
</label>
<input
type=
"text"
class=
"form-control input-text"
name=
""
value=
""
>
<input
type=
"text"
class=
"form-control input-text"
name=
"
idcard
"
value=
""
>
</div>
</div>
<div
class=
"row cl"
>
...
...
@@ -92,7 +92,7 @@
name
:
data
[
'name'
],
username
:
data
[
'username'
],
telephone
:
data
[
'phone'
],
// phone:data['phone
'],
idcard
:
data
[
'idcard
'
],
password
:
data
[
'password'
],
roleIds
:
rolesid
,
// roles:data['roles'],
...
...
application/views/perm/staffEdit.php
View file @
878e56d
...
...
@@ -3,28 +3,29 @@
<body>
<div
class=
"panel panel-default"
>
<div
class=
"panel-body"
>
<form
action=
"system/user/update"
id=
"edit"
>
<div
class=
"row cl"
>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
用户名
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
<input
type=
"text"
class=
"form-control input-text"
name=
"username"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
真实姓名
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
<input
type=
"text"
class=
"form-control input-text"
name=
"name"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
手机号
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
<input
type=
"text"
class=
"form-control input-text"
name=
"phone"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
身份证号码
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
<input
type=
"text"
class=
"form-control input-text"
name=
"idcard"
value=
""
>
</div>
</div>
<div
class=
"row cl"
>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
所属网点
</label>
<select
class=
"select"
size=
"5"
multiple
>
<select
class=
"select"
size=
"5"
name=
"children"
multiple
>
<option
selected
value
>
请选择
</option>
<option
value
>
请选择
</option>
<option
value
>
请选择
</option>
...
...
@@ -34,7 +35,7 @@
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
角色
</label>
<select
class=
"select"
size=
"5"
multiple
>
<select
class=
"select"
size=
"5"
name=
"roles"
multiple
>
<option
selected
value
>
请选择
</option>
<option
value
>
请选择
</option>
<option
value
>
请选择
</option>
...
...
@@ -43,6 +44,7 @@
</select>
</div>
</div>
</form>
</div>
</div>
...
...
@@ -64,7 +66,60 @@
}
function
save
()
{
window
.
parent
.
msg
(
'修改成功'
);
var
targetUrl
=
$
(
"#edit"
).
attr
(
"action"
);
var
data
=
$
(
"#edit"
).
serializeJson
();
var
newData
=
{};
var
rolesid
=
[];
if
(
data
[
'roles'
].
length
==
1
){
rolesid
.
push
(
data
[
'roles'
]);
}
else
{
rolesid
=
data
[
'roles'
];
}
newData
=
{
// newData['HrVO'] = {
name
:
data
[
'name'
],
username
:
data
[
'username'
],
telephone
:
data
[
'phone'
],
idcard
:
data
[
'idcard'
],
password
:
data
[
'password'
],
roleIds
:
rolesid
,
// roles:data['roles'],
departmentId
:
data
[
'children'
]
};
// newData['DepartmentVO'] = {
// children:data['children']
// departmentId:data['children']
// };
// console.log(JSON.stringify(newData));
// return false;
$
.
ajax
({
type
:
'post'
,
url
:
apiBaseUrl
+
targetUrl
,
cache
:
false
,
data
:
JSON
.
stringify
(
newData
),
dataType
:
'json'
,
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
)
{
// console.log(data);
if
(
data
.
msg
)
{
layer
.
alert
(
data
.
msg
);
}
else
if
(
data
.
code
!=
0
)
{
layer
.
alert
(
'操作失败'
);
}
else
{
layer
.
msg
(
'操作成功'
);
}
if
(
data
.
code
)
{
setTimeout
(
function
()
{
window
.
parent
.
reload
();
layer_close
();
},
500
);
}
},
error
:
function
()
{
layer
.
alert
(
"操作失败"
)
}
})
// window.parent.msg('修改成功');
layer_close
();
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment