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
2886237c
Commit
2886237c
authored
Nov 13, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
职称列表
parent
f7c2578d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
181 additions
and
2 deletions
+181
-2
professionalListCon.html
...tion/index/view/professionalList/professionalListCon.html
+61
-0
professionalList.js
public/resource/js/professionalList.js
+116
-1
professional_list_template_tpl.html
public/resource/template/professional_list_template_tpl.html
+4
-1
No files found.
application/index/view/professionalList/professionalListCon.html
View file @
2886237c
...
...
@@ -45,6 +45,23 @@
line-height
:
30px
;
margin-left
:
-28px
;
}
/*编辑 职称人员*/
.user-ul-agent-edit
{
width
:
223px
;
height
:
auto
;
float
:
left
;
position
:
absolute
;
background
:
#fff
;
border
:
.5px
solid
#ccc
;
border-top
:
none
;
left
:
4px
;
z-index
:
999
;
}
.user-ul-agent-edit
li
{
list-style
:
none
;
line-height
:
30px
;
margin-left
:
-28px
;
}
/*加载图标*/
#main_loading_pic
{
position
:
fixed
;
...
...
@@ -169,6 +186,50 @@
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- 编辑职称 人员 -->
<div
class=
"modal fade"
id=
"modal_edit"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-body-width-w"
>
<div
class=
"modal-content modal-body-width-h"
>
<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"
style=
"height: 350px;"
>
<form
class=
"form-horizontal"
id=
""
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
职称:
</label>
<select
id=
"professional_id_edit"
class=
"form-control btn6"
>
<option
value=
"-1"
>
选择职称
</option>
<option
value=
"1"
>
店长
</option>
<option
value=
"2"
>
经理
</option>
<option
value=
"3"
>
主任
</option>
<option
value=
"4"
>
顾问
</option>
<option
value=
"0"
>
新人
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
经纪人:
</label>
<div
class=
"left-phone"
>
<input
class=
"form-control"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_agent_name_edit"
placeholder=
"经纪人姓名"
type=
"text"
value=
""
>
<ul
class=
"user-ul-agent-edit"
></ul>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
id=
"close"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"edit_professional"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--加载图标-->
<div
id=
"main_loading_pic"
>
...
...
public/resource/js/professionalList.js
View file @
2886237c
...
...
@@ -8,6 +8,10 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
mainTabIndex
:
0
,
agent_id_choose
:
''
,
agent_id_choose_add
:
''
,
agent_id_choose_edit
:
''
,
agent_id_choose_concel
:
''
,
edit_professional
:
''
,
edit_professional_id
:
''
,
init
:
function
()
{
//初始化dot
$
(
document
.
body
).
append
(
template
);
...
...
@@ -35,12 +39,24 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
professional
.
search_phone_agent_add
();
}
});
_doc
.
on
(
"input"
,
"#user_agent_name_edit"
,
function
()
{
//客户列表 客方员工姓名 下拉式搜索(编辑)
if
(
$
(
"#user_agent_name_edit"
).
val
()
==
''
)
{
professional
.
agent_id_choose_edit
=
''
;
$
(
".user-ul-agent-edit"
).
html
(
''
);
}
else
{
professional
.
search_phone_agent_edit
();
}
});
_doc
.
delegate
(
".addphone-agent"
,
"click"
,
function
()
{
//客户列表 客户员工 下拉式 搜索 点击li事件 获取id ul消失
professional
.
addphoneAgent
(
this
);
});
_doc
.
delegate
(
".addphone-agent-add"
,
"click"
,
function
()
{
//客户列表 客户员工 下拉式 搜索 点击li事件 获取id ul消失(新增)
professional
.
addphoneAgentAdd
(
this
);
});
_doc
.
delegate
(
".addphone-agent-edit"
,
"click"
,
function
()
{
//客户列表 客户员工 下拉式 搜索 点击li事件 获取id ul消失(编辑)
professional
.
addphoneAgentEdit
(
this
);
});
//主页面 6个tab的点击事件
_doc
.
on
(
'click'
,
'.maintable-top-sub-tr>a'
,
function
(
e
){
e
.
preventDefault
();
...
...
@@ -48,7 +64,7 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
var
_this
=
$
(
this
);
_this
.
removeClass
(
'btn-default'
).
addClass
(
'btn-info'
).
siblings
().
removeClass
(
'btn-info'
).
addClass
(
'btn-default'
);
if
(
_this
.
index
()
==
0
){
professional
.
mainTabIndex
=
5
;
professional
.
mainTabIndex
=
''
;
}
if
(
_this
.
index
()
==
1
){
professional
.
mainTabIndex
=
1
;
...
...
@@ -81,6 +97,29 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
$
(
"#add_professional"
).
click
(
function
()
{
professional
.
addProfessional
();
//新增 职称人员
});
$
(
"#edit_professional"
).
click
(
function
()
{
professional
.
editProfessional
();
//编辑 职称人员
});
_doc
.
on
(
'click'
,
'.edit-professional-detail'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
professional
.
agent_id_choose_edit
=
_this
.
attr
(
'data-id'
);
var
professional_agent
=
_this
.
attr
(
'data-id'
)
+
"-"
+
_this
.
attr
(
'data-name'
)
+
'-'
+
_this
.
attr
(
'data-phone'
)
$
(
'#user_agent_name_edit'
).
val
(
professional_agent
);
$
(
'#professional_id_edit'
).
val
(
_this
.
attr
(
'data-agent'
));
});
_doc
.
on
(
'click'
,
'.concel-professional'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
professional
.
agent_id_choose_concel
=
_this
.
attr
(
'data-id'
);
if
(
!
confirm
(
'是否取消职称?'
))
{
return
;
};
professional
.
concelProfessional
();
//取消 职称人员
});
},
//新增 职称人员
addProfessional
:
function
()
{
...
...
@@ -106,6 +145,51 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
}
});
},
editProfessional
:
function
()
{
$
.
ajax
({
url
:
'/index/updatePosition'
,
type
:
'POST'
,
async
:
true
,
data
:
{
"agent_id"
:
professional
.
agent_id_choose_edit
,
"position"
:
$
(
"#professional_id_edit"
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功!'
)
$
(
"#modal_edit"
).
modal
(
'hide'
);
professional
.
getList
(
professional
.
pageNo
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
concelProfessional
:
function
()
{
$
.
ajax
({
url
:
'/index/updatePosition'
,
type
:
'POST'
,
async
:
true
,
data
:
{
"agent_id"
:
professional
.
agent_id_choose_concel
,
"position"
:
5
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功!'
)
$
(
"#modal_add_professional"
).
modal
(
'hide'
);
professional
.
getList
(
professional
.
pageNo
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
//获取不同职位的列表
getList
:
function
(
pageNo
){
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
...
...
@@ -212,6 +296,36 @@ define(['doT', 'text!temp/professional_list_template_tpl.html', 'text!temp/repor
$
(
".user-ul-agent-add"
).
html
(
''
);
professional
.
agent_id_choose_add
=
$
(
obj
).
attr
(
"data-id"
);
},
search_phone_agent_edit
:
function
()
{
//客户列表 客方员工 姓名的下拉式搜索(编辑)
$
.
ajax
({
url
:
'/index/getBroker_new'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"phone"
:
$
(
"#user_agent_name_edit"
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
user_ul
=
""
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
user_ul
+=
'<li class="addphone-agent-edit" data-id="'
+
item
.
id
+
'">'
+
item
.
id
+
'-'
+
item
.
name
+
'-'
+
item
.
phone
+
'</li>'
;
});
$
(
".user-ul-agent-edit"
).
html
(
user_ul
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
addphoneAgentEdit
:
function
(
obj
)
{
//客户列表 客方姓名 搜索 input赋值(编辑)
var
user_ht
=
$
(
obj
).
html
();
$
(
"#user_agent_name_edit"
).
val
(
user_ht
);
$
(
".user-ul-agent-edit"
).
html
(
''
);
professional
.
agent_id_choose_edit
=
$
(
obj
).
attr
(
"data-id"
);
},
};
return
professional
;
});
\ No newline at end of file
public/resource/template/professional_list_template_tpl.html
View file @
2886237c
...
...
@@ -21,9 +21,12 @@
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
'name'
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
'phone'
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
<
a
class
=
"btn1 btn-info concel-professional"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
agent
=
'[%= it[item]["agent_id"] %]'
>
<
a
class
=
"btn1 btn-info concel-professional"
data
-
id
=
'[%= it[item]["id"] %]'
>
取消职称
<
/a
>
<
a
class
=
"btn1 btn-info edit-professional-detail"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
agent
=
'[%= it[item]["position"] %]'
data
-
name
=
'[%= it[item]["name"] %]'
data
-
phone
=
'[%= it[item]["phone"] %]'
href
=
"#modal_edit"
data
-
toggle
=
"modal"
>
编辑职称
<
/a
>
<
/td
>
<
/tr
>
[
%
}
%
]
...
...
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