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
febf23e7
Commit
febf23e7
authored
Apr 18, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款记录
parent
13df2d28
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
207 additions
and
181 deletions
+207
-181
getCollection.html
application/index/view/collection/getCollection.html
+30
-26
getCollection.js
public/resource/js/getCollection.js
+167
-123
get_collection_template_tpl.html
public/resource/template/get_collection_template_tpl.html
+10
-32
No files found.
application/index/view/collection/getCollection.html
View file @
febf23e7
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"getCollection"
/>
<!-- 提示成功模态框(Modal) -->
<div
class=
"successModel"
>
<div
class=
"successModel-center"
>
<p>
<!--提交成功!-->
</p>
</div>
</div>
<!--<script>-->
<!--$(document).ready(function(),2000);//2秒后执行该方法-->
<!--});-->
<!--</script>-->
<!-- -->
<!-- 收款记录页面 -->
<input
type=
"hidden"
class=
"page-load"
id=
"getCollection"
>
<style>
.modal-body
{
height
:
600px
;
...
...
@@ -32,6 +16,17 @@
list-style
:
none
;
line-height
:
30px
;
}
.money_total_two
{
font-weight
:
bold
;
font-size
:
15px
;
}
#search
{
float
:
left
;
}
#reset
{
float
:
left
;
}
</style>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
...
...
@@ -56,16 +51,17 @@
<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 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"shop_name"
placeholder=
"商铺名称"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"shop_num"
placeholder=
"铺号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"payment_time"
placeholder=
"收款时间"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"customer_phone"
placeholder=
"客户手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"customer_name"
placeholder=
"客户姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"store_name"
placeholder=
"门店"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"applicant_phone"
placeholder=
"报备手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"applicant_name"
placeholder=
"报备人姓名"
type=
"text"
value=
""
>
<span
class=
"btn btn-default btn3 ld-Marheight"
id=
"search"
style=
"visibility: hidden;"
>
搜索
</span>
<span
class=
"btn btn-default btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-default btn3 ld-Marheight"
id=
"reset"
>
重置
</span>
<span>
总额:
</span><span>
349999元
</span>
<span
class=
" btn btn-info btn3 ld-Marheight"
style=
"visibility: hidden;"
>
搜索
</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=
"money_total_two fore-span ld-Marheight "
>
总额:
</span><span
id=
"money_total"
class=
"money_total_two fore-span ld-Marheight"
></span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"exporting_report"
>
导出报表
</span>
</form>
</form>
</td>
</tr>
...
...
@@ -78,10 +74,11 @@
<th
class=
"text-center"
>
入账方式
</th>
<th
class=
"text-center"
>
商铺地址
</th>
<th
class=
"text-center"
>
商铺名称
</th>
<th
class=
"text-center"
>
操作
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</thead>
<tbody
class=
"text-center"
id=
"follow_list"
></tbody></table>
<tbody
class=
"text-center"
id=
"follow_list"
>
</table>
</div>
<!-- /#page-content-wrapper -->
<div
class=
"text-right"
id=
"pagediv"
>
...
...
@@ -94,5 +91,12 @@
</div>
</div>
</div>
<script
src=
"/resource/lib/js/require.min.js"
data-main=
"/resource/js/main?version=123"
charset=
"utf-8"
></script>
</div>
\ No newline at end of file
\ No newline at end of file
public/resource/js/getCollection.js
View file @
febf23e7
define
([
'doT'
,
'text!temp/get_collection_template_tpl.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
follow
=
{
pageNo
:
1
,
...
...
@@ -16,156 +17,199 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
$
(
document
.
body
).
append
(
template
);
follow
.
getList
(
0
);
follow
.
event
();
// alert(5)
},
event
:
function
()
{
$
(
"#search"
).
click
(
function
()
{
follow
.
getList
(
1
);
});
$
(
"#reset"
).
click
(
function
()
{
//重置
document
.
getElementById
(
"form_search"
).
reset
();
});
//
$ (document).delegate (".caozuo", "click", function () {//点击操作跟进详情
//
follow.house_id = $ (this).attr ("data-id");
//
follow.Caozuo();
//
});
//
$ (document).delegate (".submit_edit", "click", function () {//提交
//
follow.house_id = $ (this).attr ("data-id");
//
follow.Submit_follow();
//
});
//
$ (document).on ("input","#cus_fang", function () {//手机号搜索客方2
//
if($("#cus_fang").val()==''){
//
$(".user-ul2").html('');
//
}else{
//
follow.search_phone2();
//
}
//
});
//
$ (document).delegate (".addphone2", "click", function () {//list2消失
//
follow.addphone2(this);
//
});
$
(
document
).
delegate
(
".caozuo"
,
"click"
,
function
()
{
//点击操作跟进详情
follow
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
follow
.
Caozuo
();
});
$
(
document
).
delegate
(
".submit_edit"
,
"click"
,
function
()
{
//提交
follow
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
follow
.
Submit_follow
();
});
$
(
document
).
on
(
"input"
,
"#cus_fang"
,
function
()
{
//手机号搜索客方2
if
(
$
(
"#cus_fang"
).
val
()
==
''
){
$
(
".user-ul2"
).
html
(
''
);
}
else
{
follow
.
search_phone2
();
}
});
$
(
document
).
delegate
(
".addphone2"
,
"click"
,
function
()
{
//list2消失
follow
.
addphone2
(
this
);
});
},
//
addphone2:function(obj){
//
var user_ht=$(obj).html();
//
$("#cus_fang").val(user_ht);
//
$(".user-ul2").html('');
//
follow.agent_id = $ (obj).attr ("data-id");
addphone2
:
function
(
obj
){
var
user_ht
=
$
(
obj
).
html
();
$
(
"#cus_fang"
).
val
(
user_ht
);
$
(
".user-ul2"
).
html
(
''
);
follow
.
agent_id
=
$
(
obj
).
attr
(
"data-id"
);
//
},
//
search_phone2:function(){//手机号
//
$.ajax ({
//
url: '/index/select_by_phone',
//
type: 'POST',
//
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.realname+'-'+item.phone+'</li>';
//
});
//
$(".user-ul2").html(user_ul2);
},
search_phone2
:
function
(){
//手机号
$
.
ajax
({
url
:
'/index/select_by_phone'
,
type
:
'POST'
,
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
.
realname
+
'-'
+
item
.
phone
+
'</li>'
;
});
$
(
".user-ul2"
).
html
(
user_ul2
);
//
} else {
//
alert(data.msg);
//
}
}
else
{
alert
(
data
.
msg
);
}
//
}
//
});
//
},
//
Caozuo:function(){//获取跟进详情的数据
//
$.ajax({
//
'type': 'GET',
//
'url' : '/index/useraction_search',
//
data: {"user_id":follow.house_id},
//
dataType: "json",
//
success: function(data){
//
if(data.code == 200){
//
if (data.data) {
//
$("#cus_id").html(data.data.user_info.user_id);//客户编号
//
$("#cus_name").val(data.data.user_info.user_nick);//姓名
//
$("#sex").val(data.data.user_info.sex);//性别
//
$("#cus_phone").html(data.data.user_info.user_phone);//电话
//
$("#cus_date").html(data.data.user_info.create_time);//上传时间
//
$("#cus_fang").val(data.data.user_info.agentinfo);//客方
//
var caozuo_table="";
//
$.each(data['data']['user_date'], function(i, item) {
//
console.log(item)
//
caozuo_table +='<tr><td>'+item.content+'</td><td>'+item.agentinfo+'</td><td>'+item.create_time+'</td></tr>';
//
});
//
$("#caozuo_table").html(caozuo_table);
//
}
//
} else {
//
alert('获取失败!');
//
}
//
}
//
});
//
},
}
});
},
Caozuo
:
function
(){
//获取跟进详情的数据
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/useraction_search'
,
data
:
{
"user_id"
:
follow
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
if
(
data
.
data
)
{
$
(
"#cus_id"
).
html
(
data
.
data
.
user_info
.
user_id
);
//客户编号
$
(
"#cus_name"
).
val
(
data
.
data
.
user_info
.
user_nick
);
//姓名
$
(
"#sex"
).
val
(
data
.
data
.
user_info
.
sex
);
//性别
$
(
"#cus_phone"
).
html
(
data
.
data
.
user_info
.
user_phone
);
//电话
$
(
"#cus_date"
).
html
(
data
.
data
.
user_info
.
create_time
);
//上传时间
$
(
"#cus_fang"
).
val
(
data
.
data
.
user_info
.
agentinfo
);
//客方
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
][
'user_date'
],
function
(
i
,
item
)
{
console
.
log
(
item
)
caozuo_table
+=
'<tr><td>'
+
item
.
content
+
'</td><td>'
+
item
.
agentinfo
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
});
$
(
"#caozuo_table"
).
html
(
caozuo_table
);
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
// Submit_follow: function() { //提交
// $.ajax({
// 'type': 'POST',
// 'url': '/index/pcEditClient',
// data: {
// "id": follow.house_id,
// "user_nick": $("#cus_name").val(),
// "user_phone": $("#cus_phone").html(),
// "agent_id":follow.agent_id,//客方
// "sex": $("#sex").val()
// },
// dataType: "json",
// success: function(data) {
// if(data.code == 200) {
// if(data.data) {
// }
// } else {
// }
// }
// });
// },
//
Submit_follow
:
function
()
{
//提交
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/pcEditClient'
,
data
:
{
"id"
:
follow
.
house_id
,
"user_nick"
:
$
(
"#cus_name"
).
val
(),
"user_phone"
:
$
(
"#cus_phone"
).
html
(),
"agent_id"
:
follow
.
agent_id
,
//客方
"sex"
:
$
(
"#sex"
).
val
()
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
}
}
else
{
}
}
});
},
getList
:
function
(
pageNo
)
{
follow
.
pageNo
=
pageNo
;
var
_startDateObj
=
$
(
'#start_date'
),
_endDateObj
=
$
(
'#end_date'
),
_customerNameObj
=
$
(
'#customer_name'
),
_customerPhoneObj
=
$
(
'#customer_phone'
),
_followContentObj
=
$
(
'#follow_content'
);
var
params
=
{
'pageNo'
:
follow
.
pageNo
,
'pageSize'
:
follow
.
pageSize
};
_startDateObj
.
val
()
!=
''
&&
(
params
.
start_date
=
_startDateObj
.
val
());
_endDateObj
.
val
()
!=
''
&&
(
params
.
end_date
=
_endDateObj
.
val
());
$
.
trim
(
_customerNameObj
.
val
())
!=
''
&&
(
params
.
customer
=
$
.
trim
(
_customerNameObj
.
val
()));
$
.
trim
(
_customerPhoneObj
.
val
())
!=
''
&&
(
params
.
phone
=
$
.
trim
(
_customerPhoneObj
.
val
()));
$
.
trim
(
_followContentObj
.
val
())
!=
''
&&
(
params
.
content
=
$
.
trim
(
_followContentObj
.
val
()));
console
.
log
(
params
);
console
.
log
(
$
(
'#customer_name'
).
val
());
follow
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
user_name
=
$
(
'#customer_name'
).
val
();
params
.
start_time
=
$
(
'#start_date'
).
val
();
params
.
end_time
=
$
(
'#end_date'
).
val
();
params
.
internal_title
=
$
(
'#shop_name'
).
val
();
params
.
user_phone
=
$
(
'#customer_phone'
).
val
();
params
.
id
=
$
(
'#shop_num'
).
val
()
*
1
;
params
.
store_name
=
$
(
'#store_name'
).
val
();
params
.
report_phone
=
$
(
'#applicant_phone'
).
val
();
params
.
report_name
=
$
(
'#applicant_name'
).
val
();
params
.
pageNo
=
follow
.
pageNo
;
params
.
pageSize
=
follow
.
pageSize
;
$
.
ajax
({
type
:
'GET'
,
// url: '/index/RemarkFollowList',
url
:
'/index/getCollection'
,
data
:
params
,
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
console
.
log
(
data
);
console
.
log
(
data
)
if
(
typeof
data
===
'object'
)
{
if
(
!
data
.
code
)
{
// var doTtmpl = doT.template(document.getElementById('get_collection_tpl').innerHTML);
if
(
data
.
code
==
200
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'get_collection_tpl'
).
innerHTML
);
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
// 支付方式 10支付宝 20 微信 30pos机器 40转账 50现金 60其他
$
(
"#follow_list tr"
).
each
(
function
(
e
)
{
//e代表索引 从0开始 eq(0)就是第一行
var
temp
=
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
();
//获取一列的值
var
temp_two
=
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
5
).
html
();
if
(
temp
*
1
==
10
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
(
"支付宝"
)
}
if
(
temp
*
1
==
20
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
(
"微信"
)
}
if
(
temp
*
1
==
30
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
(
"pos机器"
)
}
if
(
temp
*
1
==
40
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
(
"转账"
)
}
if
(
temp
*
1
==
50
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
(
"现金"
)
}
if
(
temp
*
1
==
60
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
(
"其他"
)
}
// 付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他
if
(
temp_two
*
1
==
10
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
5
).
html
(
"意向金"
)
}
if
(
temp_two
*
1
==
20
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
5
).
html
(
"定金"
)
}
if
(
temp_two
*
1
==
30
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
5
).
html
(
"保管金"
)
}
if
(
temp_two
*
1
==
40
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
5
).
html
(
"押金"
)
}
if
(
temp_two
*
1
==
50
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
5
).
html
(
"租金"
)
}
if
(
temp_two
*
1
==
60
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
5
).
html
(
"进场费"
)
}
if
(
temp_two
*
1
==
70
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
5
).
html
(
"转让费"
)
}
if
(
temp_two
*
1
==
80
){
$
(
"#follow_list"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
5
).
html
(
"其他"
)
}
});
$
(
"#money_total"
).
html
(
data
.
data
.
money_total
)
/*分页代码*/
$
(
"#pagediv"
).
pagination
({
length
:
data
.
data
.
total
,
$
(
"#pagediv"
).
pagination
({
length
:
data
.
data
.
total
,
current
:
pageNo
,
every
:
follow
.
pageSize
,
onClick
:
function
(
el
)
{
...
...
public/resource/template/get_collection_template_tpl.html
View file @
febf23e7
...
...
@@ -2,26 +2,18 @@
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
'start_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'user_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'user_phone'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'money'
]
%
]
<
/td
>
<
td
class
=
"pay_type"
>
[
%=
it
[
item
][
'pay_type'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'type'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'internal_address'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'internal_title'
]
%
]
<
/td>
<
td
>
[
%
if
(
it
[
item
][
'label_name'
])
{
%
]
【
[
%=
it
[
item
][
'label_name'
]
%
]
】
[
%
}
else
{
%
]
【】
[
%
}
%
]
[
%=
it
[
item
][
'content'
]
%
]
<
a
class
=
"btn1 btn-info caozuo"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
时间轴
<
/a
>
<
a
class
=
"btn1 btn-info caozuo"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
<
/td
>
<
td
>
[
%=
it
[
item
][
'end_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'internal_title'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'user_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'user_phone'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'store_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'report_phone'
]
%
]
<
/td
>
<!--
<
td
>
<
a
class
=
"btn1 btn-success caozuo"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
详细信息
<
/a
>
<
/td> --
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
...
...
@@ -44,17 +36,3 @@
<!-- start_time 开始时间
end_time 开始时间
internal_title 楼盘名
user_name 客户姓名
user_phone 客户手机号
id false 商铺id
store_name 门店名
report_phone 报备人手机号
report_name 报备人姓名 -->
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