Commit febf23e7 authored by agping's avatar agping

收款记录

parent 13df2d28
{layout name="global/frame_tpl" /} {layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="getCollection" /> <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> <style>
.modal-body{ .modal-body{
height: 600px; height: 600px;
...@@ -32,6 +16,17 @@ ...@@ -32,6 +16,17 @@
list-style: none; list-style: none;
line-height: 30px; line-height: 30px;
} }
.money_total_two{
font-weight: bold;
font-size: 15px;
}
#search{
float: left;
}
#reset{
float: left;
}
</style> </style>
<div id="page-content-wrapper"> <div id="page-content-wrapper">
<div class="container"> <div class="container">
...@@ -56,16 +51,17 @@ ...@@ -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 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_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="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_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="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="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_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=""> <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-info btn3 ld-Marheight" style="visibility: hidden;">搜索</span>
<span class="btn btn-default btn3 ld-Marheight" id="search">搜索</span> <span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-default btn3 ld-Marheight" id="reset">重置</span> <span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
<span>总额:</span><span>349999元</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> </form>
</td> </td>
</tr> </tr>
...@@ -81,7 +77,8 @@ ...@@ -81,7 +77,8 @@
<th class="text-center">操作</th> <th class="text-center">操作</th>
</tr> </tr>
</thead> </thead>
<tbody class="text-center" id="follow_list"></tbody></table> <tbody class="text-center" id="follow_list">
</table>
</div> </div>
<!-- /#page-content-wrapper --> <!-- /#page-content-wrapper -->
<div class="text-right" id="pagediv"> <div class="text-right" id="pagediv">
...@@ -94,5 +91,12 @@ ...@@ -94,5 +91,12 @@
</div> </div>
</div> </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
define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) { define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
follow = { follow = {
pageNo: 1, pageNo: 1,
...@@ -16,156 +17,199 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css ...@@ -16,156 +17,199 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
$(document.body).append(template); $(document.body).append(template);
follow.getList(0); follow.getList(0);
follow.event(); follow.event();
// alert(5)
}, },
event: function() { event: function() {
$("#search").click(function() { $("#search").click(function() {
follow.getList(1); follow.getList(1);
}); });
$("#reset").click(function() { //重置 $("#reset").click(function() { //重置
document.getElementById("form_search").reset(); document.getElementById("form_search").reset();
}); });
// $ (document).delegate (".caozuo", "click", function () {//点击操作跟进详情 $ (document).delegate (".caozuo", "click", function () {//点击操作跟进详情
// follow.house_id = $ (this).attr ("data-id"); follow.house_id = $ (this).attr ("data-id");
// follow.Caozuo(); follow.Caozuo();
// }); });
// $ (document).delegate (".submit_edit", "click", function () {//提交 $ (document).delegate (".submit_edit", "click", function () {//提交
// follow.house_id = $ (this).attr ("data-id"); follow.house_id = $ (this).attr ("data-id");
// follow.Submit_follow(); follow.Submit_follow();
// }); });
// $ (document).on ("input","#cus_fang", function () {//手机号搜索客方2 $ (document).on ("input","#cus_fang", function () {//手机号搜索客方2
// if($("#cus_fang").val()==''){ if($("#cus_fang").val()==''){
// $(".user-ul2").html(''); $(".user-ul2").html('');
// }else{ }else{
// follow.search_phone2(); follow.search_phone2();
// } }
// }); });
// $ (document).delegate (".addphone2", "click", function () {//list2消失 $ (document).delegate (".addphone2", "click", function () {//list2消失
// follow.addphone2(this); follow.addphone2(this);
// }); });
}, },
// addphone2:function(obj){ addphone2:function(obj){
// var user_ht=$(obj).html(); var user_ht=$(obj).html();
// $("#cus_fang").val(user_ht); $("#cus_fang").val(user_ht);
// $(".user-ul2").html(''); $(".user-ul2").html('');
// follow.agent_id = $ (obj).attr ("data-id"); follow.agent_id = $ (obj).attr ("data-id");
// }, },
// search_phone2:function(){//手机号 search_phone2:function(){//手机号
// $.ajax ({ $.ajax ({
// url: '/index/select_by_phone', url: '/index/select_by_phone',
// type: 'POST', type: 'POST',
// async: true, async: true,
// data: { data: {
// "phone":$("#cus_fang").val() "phone":$("#cus_fang").val()
// }, },
// dataType: 'json', dataType: 'json',
// success: function (data) { success: function (data) {
// if (data.code == 200) { if (data.code == 200) {
// var user_ul2 = ""; var user_ul2 = "";
// $.each(data.data, function(i,item) { $.each(data.data, function(i,item) {
// user_ul2+='<li class="addphone2" data-id="'+item.id+'">'+item.id+'-'+item.realname+'-'+item.phone+'</li>'; user_ul2+='<li class="addphone2" data-id="'+item.id+'">'+item.id+'-'+item.realname+'-'+item.phone+'</li>';
// }); });
// $(".user-ul2").html(user_ul2); $(".user-ul2").html(user_ul2);
// } else { } else {
// alert(data.msg); alert(data.msg);
// } }
// } }
// }); });
// }, },
// Caozuo:function(){//获取跟进详情的数据 Caozuo:function(){//获取跟进详情的数据
// $.ajax({ $.ajax({
// 'type': 'GET', 'type': 'GET',
// 'url' : '/index/useraction_search', 'url' : '/index/useraction_search',
// data: {"user_id":follow.house_id}, data: {"user_id":follow.house_id},
// dataType: "json", dataType: "json",
// success: function(data){ success: function(data){
// if(data.code == 200){ if(data.code == 200){
// if (data.data) { if (data.data) {
// $("#cus_id").html(data.data.user_info.user_id);//客户编号 $("#cus_id").html(data.data.user_info.user_id);//客户编号
// $("#cus_name").val(data.data.user_info.user_nick);//姓名 $("#cus_name").val(data.data.user_info.user_nick);//姓名
// $("#sex").val(data.data.user_info.sex);//性别 $("#sex").val(data.data.user_info.sex);//性别
// $("#cus_phone").html(data.data.user_info.user_phone);//电话 $("#cus_phone").html(data.data.user_info.user_phone);//电话
// $("#cus_date").html(data.data.user_info.create_time);//上传时间 $("#cus_date").html(data.data.user_info.create_time);//上传时间
// $("#cus_fang").val(data.data.user_info.agentinfo);//客方 $("#cus_fang").val(data.data.user_info.agentinfo);//客方
// var caozuo_table=""; var caozuo_table="";
// $.each(data['data']['user_date'], function(i, item) { $.each(data['data']['user_date'], function(i, item) {
// console.log(item) console.log(item)
// caozuo_table +='<tr><td>'+item.content+'</td><td>'+item.agentinfo+'</td><td>'+item.create_time+'</td></tr>'; caozuo_table +='<tr><td>'+item.content+'</td><td>'+item.agentinfo+'</td><td>'+item.create_time+'</td></tr>';
// }); });
// $("#caozuo_table").html(caozuo_table); $("#caozuo_table").html(caozuo_table);
// } }
// } else { } else {
// alert('获取失败!'); alert('获取失败!');
// } }
// } }
// }); });
// }, },
// Submit_follow: function() { //提交 Submit_follow: function() { //提交
// $.ajax({ $.ajax({
// 'type': 'POST', 'type': 'POST',
// 'url': '/index/pcEditClient', 'url': '/index/pcEditClient',
// data: { data: {
// "id": follow.house_id, "id": follow.house_id,
// "user_nick": $("#cus_name").val(), "user_nick": $("#cus_name").val(),
// "user_phone": $("#cus_phone").html(), "user_phone": $("#cus_phone").html(),
// "agent_id":follow.agent_id,//客方 "agent_id":follow.agent_id,//客方
// "sex": $("#sex").val() "sex": $("#sex").val()
// }, },
// dataType: "json", dataType: "json",
// success: function(data) { success: function(data) {
// if(data.code == 200) { if(data.code == 200) {
// if(data.data) { if(data.data) {
// } }
// } else { } else {
// } }
// } }
// }); });
// }, },
//
getList: function(pageNo) { getList: function(pageNo) {
console.log($('#customer_name').val());
follow.pageNo = pageNo; follow.pageNo = pageNo;
var _startDateObj = $('#start_date'), var params = {};
_endDateObj = $('#end_date'), params.user_name =$('#customer_name').val();
_customerNameObj = $('#customer_name'), params.start_time =$('#start_date').val();
_customerPhoneObj = $('#customer_phone'), params.end_time =$('#end_date').val();
_followContentObj = $('#follow_content'); params.internal_title =$('#shop_name').val();
var params = { params.user_phone =$('#customer_phone').val();
'pageNo': follow.pageNo, params.id =$('#shop_num').val()*1;
'pageSize': follow.pageSize params.store_name =$('#store_name').val();
}; params.report_phone =$('#applicant_phone').val();
_startDateObj.val() != '' && (params.start_date = _startDateObj.val()); params.report_name =$('#applicant_name').val();
_endDateObj.val() != '' && (params.end_date = _endDateObj.val()); params.pageNo = follow.pageNo;
$.trim(_customerNameObj.val()) != '' && (params.customer = $.trim(_customerNameObj.val())); params.pageSize = follow.pageSize;
$.trim(_customerPhoneObj.val()) != '' && (params.phone = $.trim(_customerPhoneObj.val()));
$.trim(_followContentObj.val()) != '' && (params.content = $.trim(_followContentObj.val()));
console.log(params);
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
// url: '/index/RemarkFollowList',
url: '/index/getCollection', url: '/index/getCollection',
data: params, data: params,
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
beforeSend: function() {}, beforeSend: function() {},
success: function(data) { success: function(data) {
console.log(data); console.log(data)
if(typeof data === 'object') { if(typeof data === 'object') {
if (data.code == 200) {
if (!data.code) {
// var doTtmpl = doT.template(document.getElementById('get_collection_tpl').innerHTML);
var doTtmpl = doT.template(document.getElementById('get_collection_tpl').innerHTML); var doTtmpl = doT.template(document.getElementById('get_collection_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list)); $("#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({ $("#pagediv").pagination({
length: data.data.total, length:data.data.total,
current: pageNo, current: pageNo,
every: follow.pageSize, every: follow.pageSize,
onClick: function(el) { onClick: function(el) {
......
...@@ -2,26 +2,18 @@ ...@@ -2,26 +2,18 @@
[% if(it) { %] [% if(it) { %]
[% for(var item in it){ %] [% for(var item in it){ %]
<tr class="text-center"> <tr class="text-center">
<td>[%= it[item]['start_time'] %]</td> <td>[%= it[item]['create_time'] %]</td>
<td>
[% if(it[item]['label_name']) { %]
[%= it[item]['label_name'] %]
[% }else{ %]
【】
[% } %]
[%= it[item]['content'] %]
</td>
<td>[%= it[item]['end_time'] %]</td>
<td>[%= it[item]['internal_title'] %]</td>
<td>[%= it[item]['user_name'] %]</td> <td>[%= it[item]['user_name'] %]</td>
<td>[%= it[item]['user_phone'] %]</td> <td>[%= it[item]['user_phone'] %]</td>
<td>[%= it[item]['id'] %]</td> <td>[%= it[item]['money'] %]</td>
<td>[%= it[item]['store_name'] %]</td> <td class="pay_type">[%= it[item]['pay_type'] %]</td>
<td>[%= it[item]['report_phone'] %]</td> <td>[%= it[item]['type'] %]</td>
<td>[%= it[item]['internal_address'] %]</td>
<!-- <td> <td>[%= it[item]['internal_title'] %]</td>
<a class="btn1 btn-success caozuo" href="#modal-record" data-toggle="modal" data-id='[%= it[item]["id"] %]'>详细信息</a> <td>
</td> --> <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>
</tr> </tr>
[% } %] [% } %]
[% }else{ %] [% }else{ %]
...@@ -44,17 +36,3 @@ ...@@ -44,17 +36,3 @@
<!-- start_time 开始时间
end_time 开始时间
internal_title 楼盘名
user_name 客户姓名
user_phone 客户手机号
id false 商铺id
store_name 门店名
report_phone 报备人手机号
report_name 报备人姓名 -->
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment