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
e177cc20
Commit
e177cc20
authored
Oct 31, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 后台 跨城市 转勤
parent
bee8ce54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
16 deletions
+64
-16
agent.html
application/index/view/broker/agent.html
+1
-1
agent.js
public/resource/js/agent.js
+63
-15
No files found.
application/index/view/broker/agent.html
View file @
e177cc20
...
...
@@ -411,7 +411,7 @@
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_user
"
data-dismiss=
"modal
"
>
<button
type=
"button"
class=
"btn btn-primary submit_user
_turn
"
>
提交
</button>
</div>
...
...
public/resource/js/agent.js
View file @
e177cc20
...
...
@@ -139,7 +139,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
e
.
stopPropagation
();
agent
.
Submit_edit
();
});
$
(
document
).
delegate
(
".submit_user_turn"
,
"click"
,
function
(
e
)
{
//提交 编辑(跨城市 转勤)
e
.
preventDefault
();
e
.
stopPropagation
();
agent
.
Submit_edit_turn
();
});
$
(
document
).
delegate
(
"#role"
,
"click"
,
function
(
e
)
{
//变更角色
var
_this
=
$
(
this
);
var
_tempVal
=
_this
.
closest
(
'tr'
).
attr
(
'data-groupname'
);
...
...
@@ -398,7 +402,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
yes
:
function
(
_index
){
layer
.
close
(
_index
);
agent
.
confirm_old
=
1
;
agent
.
Submit_
edit
();
agent
.
Submit_
add
();
}
});
}
else
{
...
...
@@ -425,7 +429,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
params
.
remarks
=
$
(
"#remarks"
).
val
();
params
.
status
=
$
(
"#status"
).
val
();
params
.
password
=
$
(
"input[name='password']"
).
val
();
params
.
confirm_old
=
agent
.
confirm_old
;
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
...
...
@@ -459,19 +462,64 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
alert
(
'提交成功'
);
$
(
"#modal-edit"
).
modal
(
'hide'
);
}
else
if
(
data
.
code
==
101
){
if
(
data
.
msg
==
'转勤'
){
layer
.
open
({
content
:
'该账号已经有相同账号,请问是否转勤?(转勤 即人员调配另外一个城市)转勤后,所有商铺和客户也都会转到新建的相同手机号里,请确定是否转勤。'
,
btn
:
[
'确定转勤'
,
'取消转勤'
],
yes
:
function
(
_index
){
layer
.
close
(
_index
);
agent
.
confirm_old
=
1
;
agent
.
Submit_edit
();
}
});
}
else
{
console
.
log
(
555
);
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
.
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
;
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-edit"
).
modal
(
'hide'
);
}
else
if
(
data
.
code
==
101
){
alert
(
data
.
msg
);
}
}
else
{
}
...
...
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