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
746f6023
Commit
746f6023
authored
Jul 02, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纪人修改
parent
551606ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
23 deletions
+24
-23
agent.js
public/resource/js/agent.js
+18
-17
phoneBinding_template_tpl.html
public/resource/template/phoneBinding_template_tpl.html
+6
-6
No files found.
public/resource/js/agent.js
View file @
746f6023
...
...
@@ -117,26 +117,33 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
return
;
}
agent
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
sessionStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
// console.log(user_info_obj);
var
params
=
{
};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
===
"
正常
"
)
{
if
(
str
===
"
允许
"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-default is_show2'
);
params
.
type
=
1
;
$
(
this
).
html
(
'
冻结
'
);
}
else
if
(
str
===
"
冻结
"
)
{
$
(
this
).
html
(
'
解绑
'
);
}
else
if
(
str
===
"
解绑
"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-info is_show2'
);
params
.
type
=
0
;
$
(
this
).
html
(
'正常'
);
}
else
{
params
.
type
=
2
;
}
$
(
this
).
html
(
'允许'
);
};
$
.
ajax
({
//禁用
'type'
:
'POST'
,
'url'
:
'/index/updateStatus'
,
data
:
{
"ids"
:
agent
.
id
,
"status"
:
params
.
type
},
'url'
:
'/index/updateDevice'
,
data
:
{
"agent_id"
:
agent
.
agent_id
,
"id"
:
params
.
id
,
"operator_id"
:
user_info_obj
.
id
,
"is_forbidden"
:
params
.
type
},
/* $params = array(
"agent_id" => 1,//解绑或者绑定的经纪人id
"id" => 1, //关系id
"operator_id" => 12,//操作人id 登陆后台的经纪人id
"is_forbidden" => 0,//0正常 1禁止
);*/
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
)
{
...
...
@@ -302,16 +309,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
},
//手机绑定权限
getPhoneBindingList
:
function
(
pageNo
)
{
// agent.pageNo = pageNo;
var
params
=
{};
// params.pageNo = agent.pageNo;
// params.pageSize = agent.pageSize;
params
.
agent_id
=
agent
.
agent_id
;
console
.
log
(
agent
.
agent_id
);
// params.groupname = $("input[name='groupname']").val();
// params.store_name = $("input[name='store_name']").val();
$
.
ajax
({
url
:
'index/deviceList'
,
url
:
'
/
index/deviceList'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
...
...
@@ -319,11 +321,10 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'phone_binding_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#agent_phone_binding"
).
html
(
doTempl
(
data
.
data
.
list
));
$
(
"#agent_phone_binding"
).
html
(
doTempl
(
data
.
data
));
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
agent
.
pageSize
,
agent
.
getList
);
$
(
'.J_preview'
).
preview
();
}
})
},
...
...
public/resource/template/phoneBinding_template_tpl.html
View file @
746f6023
...
...
@@ -2,13 +2,13 @@
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
"
name
"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"
id
"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"
model
"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"
create_time
"
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"
status
"
]
==
0
)
{
%
]
<
a
class
=
"btn1 btn-info is_show2"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
正常
<
/a
>
[
%
}
else
if
(
it
[
item
][
"
status
"
]
==
1
)
{
%
]
<
a
class
=
"btn1 btn-default is_show2"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
冻结
<
/a
>
[
%
if
(
it
[
item
][
"
is_forbidden
"
]
==
0
)
{
%
]
<
a
class
=
"btn1 btn-info is_show2"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
解绑
<
/a
>
[
%
}
else
if
(
it
[
item
][
"
is_forbidden
"
]
==
1
)
{
%
]
<
a
class
=
"btn1 btn-default is_show2"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
允许
<
/a
>
[
%
}
else
{
%
]
<
a
class
=
"btn1 btn-default"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
离职
<
/a
>
[
%
}
%
]
...
...
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