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
dc3e4bce
Commit
dc3e4bce
authored
Sep 02, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户浏览记录
parent
7eac0b57
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
379 deletions
+60
-379
look_user_log.html
application/index/view/member/look_user_log.html
+18
-86
lookUserLog.js
public/resource/js/lookUserLog.js
+42
-293
No files found.
application/index/view/member/look_user_log.html
View file @
dc3e4bce
{layout name="global/frame_two_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"lookUserLog"
/>
<style>
.user-ul
{
text-align
:
center
;
float
:
left
;
position
:
relative
;
overflow-y
:
scroll
;
height
:
100px
;
left
:
0px
;
width
:
100%
;
line-height
:
30px
;
}
.user-ul
li
{
list-style
:
none
;
line-height
:
20px
;
}
.modal-body1
{
height
:
660px
;
overflow-y
:
auto
;
...
...
@@ -11,34 +25,6 @@
/*height: 380px;*/
}
.user-ul
{
width
:
100%
;
height
:
auto
;
padding-bottom
:
15px
;
float
:
left
;
position
:
relative
;
left
:
-40px
;
}
.user-ul
li
{
list-style
:
none
;
line-height
:
30px
;
}
.user-ul2
{
width
:
100%
;
height
:
auto
;
padding-bottom
:
15px
;
float
:
left
;
position
:
relative
;
left
:
-40px
;
}
.user-ul2
li
{
list-style
:
none
;
line-height
:
30px
;
}
.input
{
width
:
16%
!important
;
}
...
...
@@ -65,30 +51,6 @@
.ld-Marheight
{
margin-top
:
15px
;
}
.phone_list
{
margin-top
:
32px
;
width
:
182px
;
margin-left
:
-182px
;
}
.phone_jia
{
width
:
182px
;
}
.phone_list
li
{
height
:
22px
;
line-height
:
22px
;
}
.phone_list
li
:nth-of-type
(
even
)
{
display
:
none
;
}
.modal-dialog-one
{
width
:
668px
;
}
.clear
{
clear
:
both
;
}
...
...
@@ -103,40 +65,8 @@
width
:
80%
!important
;
float
:
left
;
}
.notice-title
{
font-size
:
20px
;
}
.notice-time
{
font-size
:
13px
;
margin-top
:
20px
;
}
.notice-text
{
font-size
:
16px
;
margin-top
:
30px
;
/*text-indent: 2em;*/
}
/*限制图片的最大宽度*/
.notice-text
img
{
/*width: 100%!important;*/
/*后端给的样式 没有 max-width */
max-width
:
550px
;
}
#fujian_ul
{
list-style
:
none
;
}
.notice-fujian-area
>
span
{
font-weight
:
600
;
}
.notice-fujian-area
{
margin-top
:
30px
;
}
</style>
<!--导航star-->
<!-- Sidebar -->
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
</style>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
...
...
@@ -167,7 +97,9 @@
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"date"
>
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_id"
placeholder=
"客户ID"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_name"
placeholder=
"查看人姓名/手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_name"
placeholder=
"查看人姓名/手机号"
type=
"text"
value=
""
>
<ul
class=
"user-ul"
style=
"display:none"
></ul>
<!--<input class="form-control btn2 margin-top-ld" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="查看人姓名/手机号" type="text" value="">-->
<!--<input class="form-control btn2 margin-top-ld" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="查看人手机号" type="text" value="">-->
<span
class=
"btn btn-info btn3 margin-top-ld"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 margin-top-ld"
id=
"reset"
>
重置
</span>
...
...
public/resource/js/lookUserLog.js
View file @
dc3e4bce
...
...
@@ -6,210 +6,69 @@ define (['doT', 'text!temp/lookUserLog_template_tpl.html','ckfinder','ckfinderSt
urls
:
''
,
agent_id_two
:
''
,
agent_id2
:
0
,
agent_id_phone
:
''
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
user
.
getList
();
user
.
event
();
//时间控件初始化
/* $('#datetimepicker').datetimepicker({
format: 'yyyy-MM-dd',
language: 'zh-CN',
pickTime: false
}).on('changeDate',function(){
$(this).datetimepicker('hide');
});*/
},
event
:
function
()
{
var
_doc
=
$
(
document
);
$
(
".Bannertu"
).
click
(
function
()
{
BrowseServer
(
'cover_image'
);
});
$
(
"#search"
).
click
(
function
(){
user
.
getList
(
1
);
});
$
(
"#reset"
).
click
(
function
()
{
document
.
getElementById
(
"form_search"
).
reset
();
});
$
(
"#close"
).
click
(
function
()
{
document
.
getElementById
(
"add_user_form"
).
reset
();
$
(
".user-ul"
).
empty
();
});
$
(
".close"
).
click
(
function
(){
document
.
getElementById
(
"add_user_form"
).
reset
();
$
(
".user-ul"
).
empty
();
});
$
(
"#confirm_delete"
).
click
(
function
(){
var
params
=
{};
params
.
id
=
user
.
announcementdel_id
;
console
.
log
(
user
.
announcementdel_id
);
if
(
!
params
.
id
||
params
.
id
==
null
){
alert
(
"要删除的id不能为空"
);
return
false
;
}
user
.
delete_user
(
params
);
});
$
(
document
).
delegate
(
".announcement-del"
,
"click"
,
function
()
{
user
.
announcementdel_id
=
$
(
this
).
attr
(
"data-id"
);
console
.
log
(
user
.
announcementdel_id
);
});
$
(
document
).
delegate
(
".add_alert"
,
"click"
,
function
()
{
//新增客户
document
.
getElementById
(
"add_user_form"
).
reset
();
});
// ===========================新增公告====================
//处理文件名,长度过长时处理
function
dealFileName
(
str
)
{
//如果文件超过30的长度,则用*代替
if
(
str
.
length
>
26
)
{
return
str
.
slice
(
0
,
23
)
+
'***'
+
str
.
slice
(
-
4
);
}
else
{
return
str
;
};
};
$
(
document
).
delegate
(
".announcement-details"
,
"click"
,
function
()
{
//点击公告详情
$
(
'.notice-title'
).
html
(
$
(
this
).
attr
(
"data-title"
));
$
(
'.notice-time'
).
html
(
$
(
this
).
attr
(
"data-createTime"
));
$
(
'.notice-text'
).
html
(
$
(
this
).
attr
(
"data-content"
));
var
_filePath
=
JSON
.
parse
(
$
(
this
).
attr
(
'data-fujian'
));
$
(
'#fujian_ul'
).
html
(
''
);
// 获取附件 对接口
if
(
_filePath
){
for
(
var
i
=
0
;
i
<
_filePath
.
length
;
i
++
){
var
_tempArr
=
_filePath
[
i
].
split
(
'/'
);
_filePath
[
i
]
&&
$
(
'#fujian_ul'
).
append
(
'<li><a href="{0}" title="点击可下载">{1}</a></li>'
.
stringFormatObj
({
'0'
:
_filePath
[
i
],
'1'
:
dealFileName
(
decodeURI
(
_tempArr
[
_tempArr
.
length
-
1
]))
}));
};
}
});
$
(
document
).
on
(
"input"
,
"#set_father_id3"
,
function
()
{
//手机号搜索客方
if
(
$
(
"#set_father_id3"
).
val
()
==
''
){
$
(
".user-ul"
).
html
(
''
);
}
else
{
user
.
search_phone
();
}
user
.
agent_id_phone
=
''
;
});
$
(
document
).
on
(
"input"
,
"#cus_fang"
,
function
()
{
//手机号搜索客方2
if
(
$
(
"#cus_fang"
).
val
()
==
''
){
$
(
".user-ul2"
).
html
(
''
);
}
else
{
user
.
search_phone2
();
//分佣方 姓名下拉式
$
(
document
).
on
(
"input"
,
"#comit_name"
,
function
()
{
//手机号新增搜索客方
if
(
$
(
"#comit_name"
).
val
()
==
''
)
{
user
.
agent_id_phone
=
''
;
$
(
".user-ul"
).
html
(
''
);
}
else
{
user
.
search_person
();
}
});
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//list消失
//点击li 列表消失
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//list消失新增客户 点击li事件 获取id ul消失
user
.
addphone
(
this
);
});
$
(
document
).
delegate
(
".addphone2"
,
"click"
,
function
()
{
//list2消失
user
.
addphone2
(
this
);
});
// =============================下拉列表===================
$
(
document
).
delegate
(
".submit_edit"
,
"click"
,
function
()
{
//提交
user
.
Submit_follow
();
});
// =============下拉列表========================
var
_ajaxObjTel
=
null
;
_doc
.
on
(
'input'
,
'.phone_jia'
,
function
(){
var
_this
=
$
(
this
),
_thisVal
=
$
.
trim
(
_this
.
val
());
_this
.
removeAttr
(
'data-id'
);
//移除之前携带的信息
if
(
_thisVal
!=
''
){
_ajaxObjTel
&&
_ajaxObjTel
.
abort
();
_ajaxObjTel
=
$
.
ajax
({
type
:
'GET'
,
},
search_person
:
function
()
{
//手机号新增客户
$
.
ajax
({
url
:
'/index/getBroker_new'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'phone'
:
$
.
trim
(
_this
.
val
())
"phone"
:
$
(
"#comit_name"
).
val
(),
'all'
:
1
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
[
'data'
].
length
>
0
){
var
_htmlTemp
=
''
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
_htmlTemp
+=
'<li data-id="{3}">{2}{0}-{1}<li>'
.
stringFormatObj
({
'0'
:
item
[
'name'
],
'1'
:
item
[
'phone'
],
'2'
:
_this
.
parent
().
nextAll
(
'.input-add-tel'
).
data
(
'hideid'
)?
''
:(
item
[
'id'
]
+
'-'
),
'3'
:
item
[
'id'
]
});
});
// 输出trim
_this
.
next
().
show
().
html
(
_htmlTemp
);
}
else
{
_this
.
next
().
html
(
''
);
};
}
else
{
alert
(
data
[
'msg'
]);
if
(
data
.
code
==
200
)
{
var
user_ul
=
""
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
if
(
item
.
status
==
0
||
item
.
status
==
4
){
var
status
=
' '
;
};
}
else
{
alert
(
'数据错误'
)
;
if
(
item
.
status
==
1
)
{
var
status
=
'-长假'
;
};
},
error
:
function
()
{
//alert('error');
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
alert
(
'请求超时'
);
if
(
item
.
status
==
2
){
var
status
=
'-离职'
;
};
if
(
item
.
status
==
3
){
var
status
=
'-转勤'
;
}
});
};
});
_doc
.
on
(
'click'
,
'.jian_class>ul>li'
,
function
(){
var
_this
=
$
(
this
);
_this
.
parent
().
prev
().
val
(
_this
.
html
()).
attr
(
'data-id'
,
_this
.
attr
(
'data-id'
));
_this
.
parent
().
html
(
''
).
hide
();
});
// ===================
},
addphone
:
function
(
obj
){
var
user_ht
=
$
(
obj
).
html
();
$
(
"#set_father_id3"
).
val
(
user_ht
);
$
(
".user-ul"
).
html
(
''
);
user
.
agent_id
=
$
(
obj
).
attr
(
"data-id"
);
},
addphone2
:
function
(
obj
){
var
user_ht
=
$
(
obj
).
html
();
$
(
"#cus_fang"
).
val
(
user_ht
);
$
(
".user-ul2"
).
html
(
''
);
user
.
agent_id2
=
$
(
obj
).
attr
(
"data-id"
);
},
search_phone
:
function
(){
//手机号
$
.
ajax
({
url
:
'/index/getBroker_new'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"phone"
:
$
(
"#set_father_id3"
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
user_ul
=
""
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
user_ul
+=
'<li class="addphone" data-id="'
+
item
.
id
+
'">'
+
item
.
id
+
'-'
+
item
.
name
+
'-'
+
item
.
phone
+
'</li>'
;
user_ul
+=
'<li class="addphone" data-id="'
+
item
.
id
+
'">'
+
item
.
id
+
'-'
+
item
.
name
+
'-'
+
item
.
phone
+
status
+
'</li>'
;
});
$
(
".user-ul"
).
html
(
user_ul
);
$
(
".user-ul"
).
show
();
}
else
{
alert
(
data
.
msg
);
}
...
...
@@ -217,86 +76,17 @@ define (['doT', 'text!temp/lookUserLog_template_tpl.html','ckfinder','ckfinderSt
}
});
},
search_phone2
:
function
(){
//手机号
$
.
ajax
({
url
:
'/index/getBroker_new'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"phone"
:
$
(
"#cus_fang"
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
user_ul2
=
""
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
user_ul2
+=
'<li class="addphone2" data-id="'
+
item
.
id
+
'">'
+
item
.
id
+
'-'
+
item
.
name
+
'-'
+
item
.
phone
+
'</li>'
;
});
$
(
".user-ul2"
).
html
(
user_ul2
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
Submit_follow
:
function
()
{
//提交
var
params
=
{};
params
.
id
=
user
.
user_id
;
params
.
user_name
=
$
(
"#cus_name"
).
val
();
params
.
agents_id
=
user
.
agent_id2
;
params
.
sex
=
$
(
"#sex"
).
val
();
params
.
industry_type
=
$
(
"select[name=industry_type_two]"
).
val
();
params
.
price_demand
=
$
(
"input[name=price_demand]"
).
val
();
params
.
area_demand
=
$
(
"input[name=area_demand]"
).
val
();
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/pcEditClient'
,
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
user
.
getList
(
1
);
}
else
{
alert
(
data
.
msg
)
}
}
});
},
edit_add
:
function
()
{
//提交跟进
var
user_status
=
$
(
"input[name = 'user_status']:checked"
).
val
();
var
genj_text
=
$
(
"#genj_text"
).
val
();
if
(
genj_text
==
''
)
{
alert
(
'跟进内容为空'
);
return
false
;
}
if
(
user_status
==
undefined
)
{
alert
(
'状态标签未选中'
);
return
false
;
}
$
.
ajax
({
url
:
'/index/pcAddFollow'
,
type
:
'POST'
,
async
:
true
,
data
:
{
"user_id"
:
user
.
user_id
,
"content"
:
genj_text
,
"user_status"
:
user_status
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
user
.
getList
(
1
);
}
else
{
alert
(
data
.
msg
);
}
}
});
//将li里的值 赋给input(分佣方姓名)
addphone
:
function
(
obj
)
{
//新增客户 input赋值
var
that
=
user
;
var
user_ht
=
$
(
obj
).
html
()
+
''
;
var
user_ht_str
=
user_ht
.
substring
(
0
,
user_ht
.
length
-
3
);
$
(
"#comit_name"
).
val
(
user_ht_str
);
$
(
".user-ul"
).
html
(
''
);
$
(
".user-ul"
).
hide
();
that
.
agent_id_phone
=
$
(
obj
).
attr
(
"data-id"
);
},
//筛选
getList
:
function
(
pageNo
)
{
user
.
pageNo
=
pageNo
;
...
...
@@ -304,11 +94,9 @@ define (['doT', 'text!temp/lookUserLog_template_tpl.html','ckfinder','ckfinderSt
params
.
create_time_start
=
$
(
"#start_date"
).
val
();
params
.
create_time_end
=
$
(
"#end_date"
).
val
();
params
.
user_id
=
$
(
"#user_id"
).
val
();
params
.
agend_id
=
$
(
"#user_name"
).
val
();
// params.from_type = $(".notice-lable").val();
params
.
agent_id
=
user
.
agent_id_phone
;
params
.
pageNo
=
user
.
pageNo
;
params
.
pageSize
=
user
.
pageSize
;
$
.
ajax
({
url
:
'/index/lookUserLog'
,
type
:
'GET'
,
...
...
@@ -329,45 +117,7 @@ define (['doT', 'text!temp/lookUserLog_template_tpl.html','ckfinder','ckfinderSt
}
});
},
delete_user
:
function
(
params
)
{
$
.
ajax
({
url
:
'/index/delNotice'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
$
(
"#modal-delete"
).
modal
(
'hide'
);
if
(
data
.
code
==
"101"
)
{
alert
(
data
.
msg
);
return
false
;
}
user
.
getList
(
user
.
pageNo
);
}
});
},
};
return
user
;
});
function
edit
(
obj
)
{
var
params
=
{}
params
.
id
=
$
(
obj
).
attr
(
"data-id"
)
$
.
ajax
({
url
:
'/index/usersList'
,
type
:
'get'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
$
(
"#edit_user_form input[name='phone']"
).
val
(
data
.
data
.
list
[
0
].
user_phone
);
$
(
"#edit_user_form input[name='password']"
).
val
(
data
.
data
.
list
[
0
].
user_pswd
);
$
(
"#invite_name"
).
html
(
data
.
data
.
list
[
0
].
realname
);
$
(
"#invite_phone"
).
html
(
data
.
data
.
list
[
0
].
phone
);
}
});
$
(
"#edit_id"
).
val
(
$
(
obj
).
attr
(
"data-id"
));
}
\ No newline at end of file
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