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
76c867a4
Commit
76c867a4
authored
Oct 19, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纪人管理 修改
parent
8a09300e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
22 deletions
+55
-22
agent.html
application/index/view/broker/agent.html
+5
-0
agent.js
public/resource/js/agent.js
+36
-17
agent_template_tpl.html
public/resource/template/agent_template_tpl.html
+14
-5
No files found.
application/index/view/broker/agent.html
View file @
76c867a4
...
@@ -46,6 +46,11 @@
...
@@ -46,6 +46,11 @@
<select
class=
"form-control btn2 input ld-Marheight"
name=
""
id=
"guest_stores"
>
<select
class=
"form-control btn2 input ld-Marheight"
name=
""
id=
"guest_stores"
>
</select>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"id"
placeholder=
"姓名/手机号"
name=
"search"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"id"
placeholder=
"姓名/手机号"
name=
"search"
type=
"text"
value=
""
>
<select
class=
"form-control btn2 ld-Marheight"
name=
"agent_status"
placeholder=
"状态是否正常"
>
<option
value=
""
>
状态是否正常
</option>
<option
value=
"0"
>
是
</option>
<option
value=
"1"
>
否
</option>
</select>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
>
重置
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
>
重置
</span>
...
...
public/resource/js/agent.js
View file @
76c867a4
...
@@ -4,9 +4,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -4,9 +4,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
pageSize
:
15
,
pageSize
:
15
,
agent_id
:
0
,
agent_id
:
0
,
idArray
:
''
,
idArray
:
''
,
confirm_old
:
''
,
//是否转勤
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
"body"
).
append
(
template
+
template_binding
+
pctemplate_binding
);
$
(
"body"
).
append
(
template
+
template_binding
+
pctemplate_binding
);
$
(
"select[name=agent_status]"
).
val
(
'0'
);
agent
.
getList
();
agent
.
getList
();
agent
.
event
();
agent
.
event
();
},
},
...
@@ -23,7 +25,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -23,7 +25,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
if
(
_id
&&
_id
!=
'0'
)
{
if
(
_id
&&
_id
!=
'0'
)
{
agent
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
agent
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
// var _str = '';
// var _str = '';
var
_str
=
'<option value="
0
">全部</option>'
;
var
_str
=
'<option value="">全部</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
});
...
@@ -109,7 +111,12 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -109,7 +111,12 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
agent
.
emptyInput
();
//清空表单
agent
.
emptyInput
();
//清空表单
});
});
$
(
document
).
delegate
(
".agent_add"
,
"click"
,
function
()
{
//点击新增
agent
.
confirm_old
=
''
//是否转勤 置空
});
$
(
document
).
delegate
(
".edit"
,
"click"
,
function
()
{
//点击编辑
$
(
document
).
delegate
(
".edit"
,
"click"
,
function
()
{
//点击编辑
agent
.
confirm_old
=
''
//是否转勤 置空
$
(
"#title"
).
html
(
"编辑经纪人"
);
$
(
"#title"
).
html
(
"编辑经纪人"
);
$
(
".form-horizontal"
)[
0
].
reset
();
//重置表单
$
(
".form-horizontal"
)[
0
].
reset
();
//重置表单
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
...
@@ -152,6 +159,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -152,6 +159,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
if
(
!
confirm
(
'是否继续?'
))
{
if
(
!
confirm
(
'是否继续?'
))
{
return
;
return
;
};
};
var
params
=
{};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
if
(
$
(
this
).
hasClass
(
"isCheck"
)
){
//取消选中
if
(
$
(
this
).
hasClass
(
"isCheck"
)
){
//取消选中
if
(
$
(
this
).
html
()
==
'已离职'
){
if
(
$
(
this
).
html
()
==
'已离职'
){
$
(
this
).
html
(
'离职'
)
$
(
this
).
html
(
'离职'
)
...
@@ -159,35 +168,36 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -159,35 +168,36 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
if
(
$
(
this
).
html
()
==
'已长假'
){
if
(
$
(
this
).
html
()
==
'已长假'
){
$
(
this
).
html
(
'长假'
)
$
(
this
).
html
(
'长假'
)
}
}
if
(
$
(
this
).
html
()
==
'已转勤'
){
$
(
this
).
html
(
'转勤'
)
}
$
(
this
).
removeClass
(
"isCheck"
).
addClass
(
"btn-info"
).
removeClass
(
'btn-warning'
);
$
(
this
).
removeClass
(
"isCheck"
).
addClass
(
"btn-info"
).
removeClass
(
'btn-warning'
);
}
else
{
//选中
}
else
{
//选中
if
(
$
(
this
).
html
()
==
'离职'
){
if
(
$
(
this
).
html
()
==
'离职'
){
$
(
this
).
html
(
'已离职'
);
$
(
this
).
html
(
'已离职'
);
$
(
".yetai_checkbox:eq(1)"
).
html
(
'长假'
);
$
(
".yetai_checkbox:eq(1)"
).
html
(
'长假'
);
$
(
".yetai_checkbox:eq(2)"
).
html
(
'转勤'
);
}
}
if
(
$
(
this
).
html
()
==
'长假'
){
if
(
$
(
this
).
html
()
==
'长假'
){
$
(
this
).
html
(
'已长假'
);
$
(
this
).
html
(
'已长假'
);
$
(
".yetai_checkbox:eq(0)"
).
html
(
'离职'
);
$
(
".yetai_checkbox:eq(0)"
).
html
(
'离职'
);
$
(
".yetai_checkbox:eq(2)"
).
html
(
'转勤'
);
}
if
(
$
(
this
).
html
()
==
'转勤'
){
$
(
this
).
html
(
'已转勤'
);
$
(
".yetai_checkbox:eq(0)"
).
html
(
'离职'
);
$
(
".yetai_checkbox:eq(1)"
).
html
(
'长假'
);
}
}
$
(
this
).
siblings
(
".yetai_checkbox"
).
removeClass
(
"isCheck"
).
addClass
(
"btn-info"
).
removeClass
(
'btn-warning'
);
$
(
this
).
siblings
(
".yetai_checkbox"
).
removeClass
(
"isCheck"
).
addClass
(
"btn-info"
).
removeClass
(
'btn-warning'
);
$
(
this
).
addClass
(
"isCheck"
).
removeClass
(
"btn-info"
).
addClass
(
'btn-warning'
);
$
(
this
).
addClass
(
"isCheck"
).
removeClass
(
"btn-info"
).
addClass
(
'btn-warning'
);
};
};
$
.
ajax
({
//经纪人 离职 长假 转勤
if
(
$
(
'.isCheck'
).
length
!=
0
){
if
(
$
(
'.isCheck'
).
html
()
==
'已离职'
){
params
.
type
=
2
;
}
if
(
$
(
'.isCheck'
).
html
()
==
'已长假'
){
params
.
type
=
1
;
}
}
else
{
params
.
type
=
$
(
this
).
attr
(
"data-status"
);
console
.
log
(
11
)
};
$
.
ajax
({
//经纪人 离职 长假
'type'
:
'POST'
,
'type'
:
'POST'
,
'url'
:
'/index/updateStatus'
,
'url'
:
'/index/updateStatus'
,
data
:
{
data
:
{
"ids"
:
agent
.
id
,
"ids"
:
params
.
id
,
"status"
:
$
(
'.isCheck'
).
html
()
"status"
:
params
.
type
},
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
...
@@ -394,7 +404,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -394,7 +404,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
params
.
remarks
=
$
(
"#remarks"
).
val
();
params
.
remarks
=
$
(
"#remarks"
).
val
();
params
.
status
=
$
(
"#status"
).
val
();
params
.
status
=
$
(
"#status"
).
val
();
params
.
password
=
$
(
"input[name='password']"
).
val
();
params
.
password
=
$
(
"input[name='password']"
).
val
();
params
.
confirm_old
=
agent
.
confirm_old
;
if
(
params
.
phone
==
''
)
{
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
alert
(
'手机号必填!'
);
return
false
;
return
false
;
...
@@ -428,7 +438,16 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -428,7 +438,16 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
alert
(
'提交成功'
);
alert
(
'提交成功'
);
$
(
"#modal-edit"
).
modal
(
'hide'
);
$
(
"#modal-edit"
).
modal
(
'hide'
);
}
else
{
}
else
{
alert
(
data
.
msg
);
layer
.
open
({
content
:
'改账号已经有相同账号,请问是否转勤?(转勤 即人员调配另外一个城市)转勤后,所有商铺和客户也都会转到新建的相同手机号里,请确定是否转勤。'
,
btn
:
[
'确定转勤'
,
'取消转勤'
],
yes
:
function
(
_index
){
layer
.
close
(
_index
);
console
.
log
(
555
);
agent
.
confirm_old
=
1
;
agent
.
Submit_edit
();
}
});
}
}
}
}
});
});
...
@@ -455,7 +474,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -455,7 +474,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
params
.
group_name
=
$
(
"input[name='groupname']"
).
val
();
params
.
group_name
=
$
(
"input[name='groupname']"
).
val
();
params
.
district_id
=
$
(
"#district_id2"
).
val
();
params
.
district_id
=
$
(
"#district_id2"
).
val
();
params
.
store_id
=
$
(
"#guest_stores"
).
val
();
params
.
store_id
=
$
(
"#guest_stores"
).
val
();
params
.
status
=
$
(
"select[name=agent_status]"
).
val
();
$
.
ajax
({
$
.
ajax
({
url
:
'/index/AgentList'
,
url
:
'/index/AgentList'
,
type
:
'GET'
,
type
:
'GET'
,
...
...
public/resource/template/agent_template_tpl.html
View file @
76c867a4
...
@@ -27,16 +27,25 @@
...
@@ -27,16 +27,25 @@
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"district_name"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"district_name"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"store_name"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"store_name"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"name"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"name"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"phone"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"phone"
]
%
]
[
%
if
(
it
[
item
][
"status"
]
==
3
)
{
%
]
<
span
class
=
"btn1 btn-warning btn-xs"
>
已转勤
<
/span
>
[
%
}
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"groupname"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"groupname"
]
%
]
<
/td
>
<
td
class
=
"number-evaluation text-center"
data
-
id
=
'[%= it[item]["id"] %]'
>--<
/td
>
<
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
=
"score-evaluation text-center"
data
-
id
=
'[%= it[item]["id"] %]'
>--<
/td
>
<
td
class
=
"text-center"
>
<
td
class
=
"text-center"
>
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
[
%
if
(
it
[
item
][
""
]
==
2
)
{
%
]
<
a
class
=
"btn1 btn-info yetai_checkbox"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
离职
<
/a
>
<
a
class
=
"btn1 btn-warning yetai_checkbox isCheck"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
status
=
'[%= it[item]["status"] %]'
>
已离职
<
/a
>
<
a
class
=
"btn1 btn-info yetai_checkbox"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
长假
<
/a
>
[
%
}
%
]
<
a
class
=
"btn1 btn-info yetai_checkbox"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
转勤
<
/a
>
[
%
if
(
it
[
item
][
"status"
]
==
1
)
{
%
]
<
a
class
=
"btn1 btn-warning yetai_checkbox isCheck"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
status
=
'[%= it[item]["status"] %]'
>
已长假
<
/a
>
[
%
}
%
]
<
a
class
=
"btn1 btn-info yetai_checkbox"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
status
=
'[%= it[item]["status"] %]'
>
离职
<
/a
>
<
a
class
=
"btn1 btn-info yetai_checkbox"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
status
=
'[%= it[item]["status"] %]'
>
长假
<
/a
>
<
a
class
=
"btn1 btn-default btn-default-show-caozuo"
>>>><
/a
>
<
a
class
=
"btn1 btn-default btn-default-show-caozuo"
>>>><
/a
>
[
%
if
(
check_auth
(
'index/updateRole'
))
{
%
]
[
%
if
(
check_auth
(
'index/updateRole'
))
{
%
]
<
a
href
=
"#modal-user"
class
=
"btn1 btn-danger btn-default-hide-display"
id
=
'role'
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
角色设置
<
/a
>
<
a
href
=
"#modal-user"
class
=
"btn1 btn-danger btn-default-hide-display"
id
=
'role'
href
=
"#modal-edit"
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