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
47648f06
Commit
47648f06
authored
Nov 21, 2018
by
xinyuandu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
not finish
parent
1f0450e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
3 deletions
+128
-3
agent.html
application/index/view/broker/agent.html
+55
-0
agent.js
public/resource/js/agent.js
+73
-3
No files found.
application/index/view/broker/agent.html
View file @
47648f06
...
...
@@ -254,6 +254,9 @@
</form>
</div>
<div
class=
"modal-footer"
>
<a
href=
"#modal-turncity"
data-toggle=
"modal"
class=
"btn btn-primary agent_business"
>
同城转门店
</a>
<a
href=
"#modal-business"
data-toggle=
"modal"
class=
"btn btn-primary agent_business"
>
跨城市转勤
</a>
...
...
@@ -381,6 +384,54 @@
</div>
<!-- /.modal -->
</div>
<!--同城转勤-->
<div
class=
"modal fade"
id=
"modal-turncity"
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 form-horizontal-turn"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
所属部门:
</label>
<select
name=
"district_id_city"
class=
"form-control btn6"
>
<option
value=
""
>
选择所属部门
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
所属门店:
</label>
<select
name=
"store_id_business"
class=
"form-control btn6"
>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
业绩调整开始时间:
</label>
<input
id=
"same_city_Start_time"
class=
"form-control btn6"
type=
"text"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
>
</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 submit_city_turn"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--跨城市转勤-->
<div
class=
"modal fade"
id=
"modal-business"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
...
...
@@ -406,6 +457,10 @@
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
业绩调整开始时间:
</label>
<input
id=
"city_Start_time"
class=
"form-control btn6"
type=
"text"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
...
...
public/resource/js/agent.js
View file @
47648f06
...
...
@@ -15,7 +15,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
event
:
function
()
{
var
_doc
=
$
(
document
);
agent
.
getDistrict
(
function
()
{
_doc
.
on
(
'input'
,
'[name=district_id],#district_id2,[name=district_id_add],[name=district_id_business]'
,
function
()
{
_doc
.
on
(
'input'
,
'[name=district_id],#district_id2,[name=district_id_add],[name=district_id_business]
,[name=district_id_city]
'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
_this
.
next
().
html
(
''
);
//先清空
...
...
@@ -143,6 +143,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
e
.
stopPropagation
();
agent
.
Submit_edit_turn
();
});
$
(
document
).
delegate
(
".submit_city_turn"
,
"click"
,
function
(
e
)
{
//提交 编辑(跨城市 转勤)
e
.
preventDefault
();
e
.
stopPropagation
();
agent
.
Submit_edit_city_turn
();
});
$
(
document
).
delegate
(
"#role"
,
"click"
,
function
(
e
)
{
//变更角色
var
_this
=
$
(
this
);
var
_tempVal
=
_this
.
closest
(
'tr'
).
attr
(
'data-groupname'
);
...
...
@@ -464,14 +469,76 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
});
},
Submit_edit_city_turn
:
function
()
{
//提交编辑的信息(跨城市 转勤)
var
params
=
{}
params
.
id
=
agent
.
agent_id
;
params
.
name
=
$
(
"input[name = name]"
).
val
();
params
.
password
=
$
(
"#password"
).
val
();
params
.
district_id
=
$
(
'#modal-turncity'
).
find
(
"[name = district_id_business]"
).
val
();
params
.
store_id
=
$
(
'#modal-turncity'
).
find
(
"[name = store_id_business]"
).
val
();
params
.
phone
=
$
(
"input[name = phone]"
).
val
();
params
.
admin_off
=
$
(
"#admin_off"
).
val
();
params
.
sex
=
$
(
"input[name =sex]:checked"
).
val
();
params
.
remarks
=
$
(
"#remarks"
).
val
();
params
.
status
=
$
(
"#status"
).
val
();
params
.
password
=
$
(
"input[name='password']"
).
val
();
params
.
confirm_old
=
1
;
params
.
time
=
$
(
'#city_Start_time'
).
val
();
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
}
if
(
params
.
district_id
==
''
)
{
alert
(
'所属部门必填'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
if
(
params
.
store_id
==
''
)
{
alert
(
'所属门店必填'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
if
(
params
.
phone
.
length
!=
11
)
{
alert
(
'手机号码错误!'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/saveAgent'
,
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功'
);
$
(
"#modal-turncity"
).
modal
(
'hide'
);
//转勤 提交成功之后 关闭弹出框
$
(
"#modal-edit"
).
modal
(
'hide'
);
agent
.
getList
(
agent
.
pageNo
);
}
else
if
(
data
.
code
==
101
){
alert
(
data
.
msg
);
}
else
{
}
}
});
},
Submit_edit_turn
:
function
()
{
//提交编辑的信息(跨城市 转勤)
var
params
=
{}
params
.
id
=
agent
.
agent_id
;
params
.
name
=
$
(
"input[name = name]"
).
val
();
params
.
password
=
$
(
"#password"
).
val
();
params
.
district_id
=
$
(
"[name = district_id_business]"
).
val
();
params
.
store_id
=
$
(
"[name = store_id_business]"
).
val
();
params
.
district_id
=
$
(
'#modal-business'
).
find
(
"[name = district_id_business]"
).
val
();
params
.
store_id
=
$
(
'#modal-business'
).
find
(
"[name = store_id_business]"
).
val
();
params
.
phone
=
$
(
"input[name = phone]"
).
val
();
params
.
admin_off
=
$
(
"#admin_off"
).
val
();
params
.
sex
=
$
(
"input[name =sex]:checked"
).
val
();
...
...
@@ -479,6 +546,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
params
.
status
=
$
(
"#status"
).
val
();
params
.
password
=
$
(
"input[name='password']"
).
val
();
params
.
confirm_old
=
1
;
params
.
time
=
$
(
'#city_Start_time'
).
val
();
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
...
...
@@ -662,6 +731,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
$
(
'#district_id2'
).
append
(
str
);
$
(
'[name=district_id_add]'
).
append
(
str
);
$
(
'[name=district_id_business]'
).
append
(
str
);
$
(
'[name=district_id_city]'
).
append
(
str
);
fn
&&
fn
();
}
...
...
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