Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
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
hujun
tl_estate
Commits
92e151c1
Commit
92e151c1
authored
Jan 31, 2018
by
刘丹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纪人列表
parent
93b8cf68
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
166 additions
and
8 deletions
+166
-8
agent.html
application/index/view/agent/agent.html
+0
-0
save_agent.html
application/index/view/agent/save_agent.html
+1
-1
auth_rule_box.html
application/index/view/auth/auth_rule_box.html
+1
-0
home.css
public/resource/css/home.css
+7
-0
public.css
public/resource/css/public.css
+1
-2
agent.js
public/resource/js/agent.js
+127
-0
agent_template_tpl.html
public/resource/template/agent_template_tpl.html
+29
-5
No files found.
application/index/view/agent/agent.html
View file @
92e151c1
This diff is collapsed.
Click to expand it.
application/index/view/agent/save_agent.html
View file @
92e151c1
...
...
@@ -115,7 +115,7 @@
<div
class=
"col-md-6"
>
<textarea
name=
"remarks"
id=
"remarks"
class=
"form-control"
length=
"120"
rows=
"5"
></textarea>
<p
class=
"help-block"
><i
class=
"fa fa-info-circle color-info1"
></i>
请填写个人说明
</p>
</div>
</div>
</div>
<div
class=
"form-group item_status "
>
<label
for=
"status"
class=
"col-md-2 control-label"
>
状态
</label>
<div
class=
"col-md-4"
>
...
...
application/index/view/auth/auth_rule_box.html
View file @
92e151c1
...
...
@@ -2,6 +2,7 @@
<!--关联js元素-->
<input
type=
"hidden"
class=
"page-load"
id=
"auth_rule_box"
/>
<!--关联js元素-->
<div
class=
"box box-solid"
style=
"min-height: 1426px; width: 1035px; float: left; margin-left: 20px;"
>
<div
class=
"box-body"
>
...
...
public/resource/css/home.css
View file @
92e151c1
...
...
@@ -203,4 +203,10 @@ body{
.but7
{
width
:
100%
!important
;
float
:
left
;
}
.fl
{
float
:
right
!important
;
}
.margin-top-ld
{
margin-top
:
15px
;
}
\ No newline at end of file
public/resource/css/public.css
View file @
92e151c1
...
...
@@ -189,4 +189,4 @@ a:hover{
.ld-Marheight
{
margin-top
:
7px
;
margin-left
:
7px
;
}
\ No newline at end of file
}
public/resource/js/agent.js
View file @
92e151c1
...
...
@@ -12,8 +12,135 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
$
(
'#search'
).
click
(
function
(
pageNo
)
{
agent
.
getList
(
1
);
});
$
(
document
).
delegate
(
".edit"
,
"click"
,
function
()
{
//点击编辑
agent
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
Edit_add
();
agent
.
Edit
();
});
$
(
document
).
delegate
(
".submit_edit"
,
"click"
,
function
()
{
//提交编辑
agent
.
Submit_edit
();
agent
.
getList
();
});
$
(
document
).
delegate
(
".edit_add"
,
"click"
,
function
()
{
//新增
agent
.
Edit_add
();
});
$
(
document
).
delegate
(
".User_add"
,
"click"
,
function
()
{
//点击变更
//var user_check=$("input[name=ids]").is(":checked");
agent
.
User_add
();
});
$
(
document
).
delegate
(
".submit_user"
,
"click"
,
function
()
{
//提交变更
agent
.
Submit_user
();
agent
.
getList
();
});
},
Submit_user
:
function
(){
//提交变更的信息
var
v
=
''
;
var
_ids
=
''
;
$
(
"input[name=ids]:checked"
).
each
(
function
(
i
)
{
v
+=
','
+
$
(
this
).
val
();
_ids
=
v
.
substring
(
1
);
})
var
group_id
=
$
(
"#User_add"
).
val
();
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/updateRole'
,
data
:{
'ids'
:
_ids
,
'group_id'
:
group_id
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
}
else
{
alert
(
"重复提交"
);
}
}
});
},
User_add
:
function
(){
//获取变更角色
$
.
ajax
({
url
:
'/index/getAuth2'
,
type
:
'GET'
,
async
:
true
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
User_add
=
""
;
$
.
each
(
data
.
data
.
list
,
function
(
i
,
item
){
User_add
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
title
+
'</option>'
;
});
$
(
"#User_add"
).
html
(
User_add
);
}
});
},
Edit_add
:
function
(){
$
.
ajax
({
url
:
'/index/getAuth2'
,
type
:
'GET'
,
async
:
true
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'get_auth_list'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#auth_group_id"
).
html
(
doTempl
(
data
.
data
.
list
));
//赋值
}
});
},
Edit
:
function
(){
//获取
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/saveAgent/group_id/'
,
//获取编辑数据
data
:
{
"id"
:
agent
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
$
(
"input[name = id]"
).
val
(
data
.
data
.
id
);
$
(
"input[name = phone]"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
$
(
"input[name = store_id]"
).
val
(
data
.
data
.
store_id
);
$
(
"#admin_off"
).
val
(
data
.
data
.
admin_off
);
$
(
"#remarks"
).
val
(
data
.
data
.
remarks
);
$
(
"#status"
).
val
(
data
.
data
.
status
);
$
(
"#auth_group_id"
).
val
(
data
.
data
.
auth_group_id
);
if
(
data
.
data
.
sex
==
'0'
){
$
(
"#sex0"
).
attr
(
'checked'
,
true
);
}
else
if
(
data
.
data
.
sex
==
'1'
){
$
(
"#sex1"
).
attr
(
'checked'
,
true
);
}
else
{
$
(
"#sex2"
).
attr
(
'checked'
,
true
);
}
}
});
},
Submit_edit
:
function
(){
//提交编辑的信息
var
par
=
{}
par
.
id
=
agent
.
house_id
;
par
.
name
=
$
(
"input[name = name]"
).
val
();
par
.
store_id
=
$
(
"input[name = store_id]"
).
val
();
par
.
phone
=
$
(
"input[name = phone]"
).
val
();
if
(
par
.
phone
==
''
){
alert
(
'手机号必填!'
);
return
false
;
}
par
.
admin_off
=
$
(
"#admin_off"
).
val
();
par
.
district_id
=
$
(
'#district_id'
).
val
();
par
.
sex
=
$
(
"input[name =sex]:checked"
).
val
();
par
.
remarks
=
$
(
"#remarks"
).
val
();
par
.
auth_group_id
=
$
(
"#auth_group_id"
).
val
();
par
.
status
=
$
(
"#status"
).
val
();
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/saveAgent'
,
data
:
par
,
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
}
else
{
alert
(
data
.
msg
);
}
}
});
},
getList
:
function
(
pageNo
){
agent
.
pageNo
=
pageNo
;
var
params
=
{};
...
...
public/resource/template/agent_template_tpl.html
View file @
92e151c1
...
...
@@ -2,12 +2,22 @@
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
>
<
td
><
div
class
=
"icheckbox_minimal-blue"
style
=
""
aria
-
checked
=
"false"
aria
-
disabled
=
"false"
>
<!--<
input
type
=
"checkbox"
name
=
"ids[]"
value
=
"1"
class
=
"ids"
style
=
""
>-->
<
/div
>
<
td
>
<
input
type
=
"checkbox"
name
=
"ids"
value
=
"[%= it[item]['id'] %]"
>
<
/td
>
<
td
>
[
%=
it
[
item
][
"id"
]
%
]
<
/td
>
<
td
><
img
src
=
"./index/[%= it[item]['img'] %]"
alt
=
""
><
/td
>
<
td
>
[
%
if
(
it
[
item
][
"level"
]
==
10
)
{
%
]
经纪人
[
%
}
else
if
(
it
[
item
][
"level"
]
==
20
)
{
%
]
店长
[
%
}
else
if
(
it
[
item
][
"level"
]
==
30
)
{
%
]
总监
[
%
}
else
{
%
]
总监和店长
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"name"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"phone"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"store_name"
]
%
]
<
/td
>
...
...
@@ -16,8 +26,8 @@
<
td
>
[
%=
it
[
item
][
"status"
]
%
]
<
/td
>
<!--<
td
><
span
class
=
"fa fa-check text-success"
><
/span></
td
>-->
<
td
>
<
a
style
=
"margin-right:6px;"
href
=
"/index/saveAgentIndex.html?id=[%= it[item]['id'] %]"
class
=
"btn btn-primary btn-xs"
title
=
"编辑"
>
编辑
<
/a
>
<
a
style
=
"margin-right:6px;"
href
=
""
class
=
"btn btn-warning btn-xs ajax-get confirm"
title
=
"禁用"
>
禁用
<
/a
>
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
<
a
style
=
"margin-right:6px;"
href
=
""
class
=
"btn btn-warning btn-xs ajax-get confirm"
title
=
"禁用"
>
禁用
<
/a
>
<
/td
>
<
/tr
>
[
%
}
%
]
...
...
@@ -26,4 +36,17 @@
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
<!--经纪人列表模板-->
<script
id=
"get_auth_list"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
option
value
=
"[%= it[item]['id'] %]"
>
[
%=
it
[
item
][
"title"
]
%
]
<
/option
>
[
%
}
%
]
[
%
}
%
]
</script>
\ No newline at end of file
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