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
d5d89aa8
authored
2018-03-26 00:04:53 +0800
by
yangjianbin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
f1cef09e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
application/views/perm/staffAdd.php
application/views/perm/staffAdd.php
View file @
d5d89aa
...
...
@@ -7,15 +7,15 @@
<div
class=
"row cl"
>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
用户名
</label>
<input
type=
"text"
class=
"form-control input-text"
name=
"
HrVO.
username"
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"
name=
"
HrVO.
name"
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"
name=
"
HrVO.
phone"
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>
...
...
@@ -25,7 +25,7 @@
<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=
""
name=
"
HrVO.
password"
id=
"password"
>
<input
type=
"text"
class=
"form-control input-text"
value=
""
name=
"password"
id=
"password"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2 pt-25"
>
<button
class=
"btn btn-primary"
onclick=
"random()"
>
随机生成密码
</button>
...
...
@@ -34,7 +34,7 @@
<div
class=
"row cl"
>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
所属网点
</label>
<select
class=
"select"
name=
"
DepartmentVO.
children"
size=
"5"
multiple
>
<select
class=
"select"
name=
"children"
size=
"5"
multiple
>
<option
selected
value
>
请选择
</option>
<?php
foreach
(
$this
->
session
->
departments
as
$k
=>
$v
)
:
?>
<option
value=
"
<?=
$v
->
id
?>
"
>
<?=
$v
->
name
?>
</option>
...
...
@@ -48,7 +48,7 @@
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
角色
</label>
<select
class=
"select"
size=
"5"
name=
"
HrVO.
roles"
multiple
>
<select
class=
"select"
size=
"5"
name=
"roles"
multiple
>
<option
selected
value
>
请选择
</option>
<?php
foreach
(
$this
->
session
->
role
as
$k
=>
$v
)
:
?>
<option
value=
"
<?=
$v
->
id
?>
"
>
<?=
$v
->
nameZh
?>
</option>
...
...
@@ -80,11 +80,23 @@
function
saveStaff
()
{
var
targetUrl
=
$
(
"#add"
).
attr
(
"action"
);
var
data
=
$
(
"#add"
).
serializeJson
();
var
newData
=
{};
newData
[
'HrVO'
]
=
{
name
:
data
[
'name'
],
username
:
data
[
'username'
],
phone
:
data
[
'phone'
],
password
:
data
[
'password'
],
roles
:
data
[
'roles'
]
};
newData
[
'DepartmentVO'
]
=
{
children
:
data
[
'children'
]
};
$
.
ajax
({
type
:
'post'
,
url
:
apiBaseUrl
+
targetUrl
,
cache
:
false
,
data
:
JSON
.
stringify
(
d
ata
),
data
:
JSON
.
stringify
(
newD
ata
),
dataType
:
'json'
,
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
)
{
...
...
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