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
ca0861e7
Commit
ca0861e7
authored
Jul 08, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纪人修改
parent
044cc094
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
1 deletion
+87
-1
agent.html
application/index/view/broker/agent.html
+32
-1
agent.js
public/resource/js/agent.js
+51
-0
agent_template_tpl.html
public/resource/template/agent_template_tpl.html
+4
-0
No files found.
application/index/view/broker/agent.html
View file @
ca0861e7
...
...
@@ -378,7 +378,38 @@
</div>
<!-- /.modal -->
</div>
<!--转勤 修改手机号-->
<div
class=
"modal fade"
id=
"modal-editPhone"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
修改手机号
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
电话(登录账号):
</label>
<input
type=
"number"
class=
"form-control btn6"
id=
"edit-phone"
value=
""
placeholder=
"填写手机号"
>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary edit-phone-save"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--变更角色-->
<div
class=
"modal fade"
id=
"modal-user"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
...
...
public/resource/js/agent.js
View file @
ca0861e7
...
...
@@ -5,6 +5,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
agent_id
:
0
,
idArray
:
''
,
confirm_old
:
''
,
//是否转勤
editObj
:
''
,
//编辑返回的对象
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
+
template_binding
+
pctemplate_binding
);
...
...
@@ -121,6 +122,14 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
$
(
document
).
on
(
"click"
,
".black-list"
,
function
()
{
//点击黑名单
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
});
$
(
document
).
on
(
"click"
,
".edit-phone-btn"
,
function
()
{
//点击修改手机号
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
Edit
();
//获取编辑内容
});
$
(
document
).
on
(
"click"
,
".edit-phone-save"
,
function
()
{
//保存修改手机号
agent
.
Submit_edit_phone
();
//获取编辑内容
});
$
(
document
).
on
(
"click"
,
".phone-bundling"
,
function
()
{
//点击绑定手机
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
getPhoneBindingList
(
browser_version
);
...
...
@@ -454,6 +463,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
agent
.
editObj
=
data
.
data
;
$
(
"#edit-phone"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = id]"
).
val
(
data
.
data
.
id
);
$
(
"input[name = phone]"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
...
...
@@ -557,6 +568,46 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}
});
},
Submit_edit_phone
:
function
()
{
//修改手机号
//提交编辑的信息
var
params
=
{}
params
.
id
=
agent
.
agent_id
;
params
.
name
=
agent
.
editObj
.
name
;
params
.
password
=
agent
.
editObj
.
password
;
params
.
district_id
=
agent
.
editObj
.
district_id
;
params
.
store_id
=
agent
.
editObj
.
store_id
;
params
.
phone
=
$
(
"#edit-phone"
).
val
();
params
.
admin_off
=
agent
.
editObj
.
admin_off
;
params
.
sex
=
agent
.
editObj
.
sex
;
params
.
remarks
=
agent
.
editObj
.
remarks
;
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
}
if
(
params
.
phone
.
length
!=
11
)
{
alert
(
'手机号码错误!'
);
return
false
;
}
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/saveAgent'
,
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功'
);
$
(
"#modal-editPhone"
).
modal
(
'hide'
);
}
else
if
(
data
.
code
==
101
){
alert
(
data
.
msg
);
}
else
{
}
}
});
},
Submit_edit
:
function
()
{
//提交编辑的信息
...
...
public/resource/template/agent_template_tpl.html
View file @
ca0861e7
...
...
@@ -37,6 +37,7 @@
<
td
class
=
"number-evaluation text-center"
data
-
id
=
'[%= it[item]["id"] %]'
>--<
/td
>
<
td
class
=
"score-evaluation text-center"
data
-
id
=
'[%= it[item]["id"] %]'
>--<
/td
>
<
td
class
=
"text-center"
>
[
%
if
(
it
[
item
][
"status"
]
!=
3
)
{
%
]
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
[
%
if
(
it
[
item
][
"status"
]
==
2
)
{
%
]
<
a
class
=
"btn1 btn-warning yetai_checkbox isCheck"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
status
=
'[%= it[item]["status"] %]'
>
已离职
<
/a
>
...
...
@@ -73,6 +74,9 @@
[
%
}
%
]
<
a
class
=
"btn1 btn-default btn-default-hide-caozuo btn-default-hide-display"
><<<<
/a
>
[
%
}
else
{
%
]
<
a
class
=
"btn1 btn-success edit-phone-btn"
href
=
"#modal-editPhone"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
修改手机号
<
/a
>
[
%
}
%
]
<
/td
>
...
...
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