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
ec73d58d
Commit
ec73d58d
authored
Jul 02, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手机绑定
parent
03309383
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
agent.js
public/resource/js/agent.js
+34
-0
phoneBinding_template_tpl.html
public/resource/template/phoneBinding_template_tpl.html
+2
-2
No files found.
public/resource/js/agent.js
View file @
ec73d58d
...
...
@@ -110,6 +110,40 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}
});
});
//手机绑定状态切换
$
(
document
).
delegate
(
".is_show2"
,
"click"
,
function
()
{
//点击禁用
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
agent
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
params
=
{
};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
===
"正常"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-default is_show2'
);
params
.
type
=
1
;
$
(
this
).
html
(
'冻结'
);
}
else
if
(
str
===
"冻结"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-info is_show2'
);
params
.
type
=
0
;
$
(
this
).
html
(
'正常'
);
}
else
{
params
.
type
=
2
;
}
$
.
ajax
({
//禁用
'type'
:
'POST'
,
'url'
:
'/index/updateStatus'
,
data
:
{
"ids"
:
agent
.
id
,
"status"
:
params
.
type
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
)
{
alert
(
"禁用失败!"
)
}
}
});
});
},
Submit_user
:
function
()
{
//提交变更的信息
var
group_id
=
$
(
"#edit_role"
).
val
();
...
...
public/resource/template/phoneBinding_template_tpl.html
View file @
ec73d58d
...
...
@@ -6,9 +6,9 @@
<
td
>
[
%=
it
[
item
][
"id"
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"status"
]
==
0
)
{
%
]
<
a
class
=
"btn1 btn-info is_show"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
正常
<
/a
>
<
a
class
=
"btn1 btn-info is_show
2
"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
正常
<
/a
>
[
%
}
else
if
(
it
[
item
][
"status"
]
==
1
)
{
%
]
<
a
class
=
"btn1 btn-default is_show"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
冻结
<
/a
>
<
a
class
=
"btn1 btn-default is_show
2
"
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