Commit 662df2f5 authored by agping's avatar agping

优化成交报告 列表

parent 0ecf180c
...@@ -7,6 +7,21 @@ ...@@ -7,6 +7,21 @@
.button-center-bargain{ .button-center-bargain{
width: 430px; width: 430px;
} }
.user-ul{
height: auto;
float: left;
position: relative;
left: -40px;
}
.user-ul li{
list-style: none;
line-height: 30px;
}
.left-phone{
float: left;
margin-top: 10px;
margin-left: 10px;
}
</style> </style>
<div id="page-content-wrapper"> <div id="page-content-wrapper">
...@@ -57,7 +72,13 @@ ...@@ -57,7 +72,13 @@
</select> </select>
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_name" placeholder="约带看人姓名" type="text" value=""> <input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_name" placeholder="约带看人姓名" type="text" value="">
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_phone" placeholder="约带看人手机号" type="text" value=""> <input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="agent_phone" placeholder="约带看人手机号" type="text" value="">
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="partical_name" placeholder="分佣方姓名" type="text" value="">
<div class="left-phone">
<input class="form-control" data-rule-phoneus="false" data-rule-required="false" id="partical_name" placeholder="分佣方姓名" type="text" value="">
<ul class="user-ul"></ul>
</div>
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="bargain_id" placeholder="成交报告id" type="text" value=""> <input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="bargain_id" placeholder="成交报告id" type="text" value="">
<div class="clear"> <div class="clear">
...@@ -69,6 +90,7 @@ ...@@ -69,6 +90,7 @@
</td> </td>
</tr> </tr>
<tr class="maintable-tr-bar"> <tr class="maintable-tr-bar">
<th class="text-center">行号</th>
<th class="text-center">ID</th> <th class="text-center">ID</th>
<th class="text-center">提交时间</th> <th class="text-center">提交时间</th>
<th class="text-center">是否开业</th> <th class="text-center">是否开业</th>
......
...@@ -10,6 +10,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -10,6 +10,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
order_id: 0,//订单id order_id: 0,//订单id
panfangData: null, panfangData: null,
maidTotalCommission: 0,//应收总佣金 maidTotalCommission: 0,//应收总佣金
agent_id_phone:'',//分佣方 姓名搜索
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
...@@ -37,10 +38,14 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -37,10 +38,14 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
e.stopPropagation(); e.stopPropagation();
bargain.getList(1); //一级审核搜索 bargain.getList(1); //一级审核搜索
}); });
//点击li 列表消失
$(document).delegate(".addphone", "click", function() { //list消失新增客户 点击li事件 获取id ul消失
bargain.addphone(this);
});
//搜索的重置 //搜索的重置
$("#maintable_reset").click(function() { $("#maintable_reset").click(function() {
document.getElementById("maintable_form_search").reset(); document.getElementById("maintable_form_search").reset();
bargain.agent_id_phone='';
}); });
//时间轴按钮 //时间轴按钮
...@@ -142,7 +147,15 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -142,7 +147,15 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
e.stopPropagation(); e.stopPropagation();
$(this).parent().remove(); $(this).parent().remove();
}); });
//分佣方 姓名下拉式
$(document).on("input", "#partical_name", function() { //手机号新增搜索客方
if($("#partical_name").val() == '') {
bargain.agent_id_phone='';
$(".user-ul").html('');
} else {
bargain.search_phone();
}
});
//详情弹出框,点击成交信息确定 //详情弹出框,点击成交信息确定
_doc.delegate("#bargaininfo_btn_save", "click", function() { _doc.delegate("#bargaininfo_btn_save", "click", function() {
bargain.bargaininfoSave(); bargain.bargaininfoSave();
...@@ -519,6 +532,38 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -519,6 +532,38 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
//分佣方 姓名搜索
search_phone: function() { //手机号新增客户
$.ajax({
url: '/index/getBroker_new',
type: 'GET',
async: true,
data: {
"phone": $("#partical_name").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").html(user_ul);
} else {
alert(data.msg);
}
}
});
},
//将li里的值 赋给input(分佣方姓名)
addphone: function(obj) {//新增客户 input赋值
var user_ht = $(obj).html();
$("#partical_name").val(user_ht);
$(".user-ul").html('');
bargain.agent_id_phone = $(obj).attr("data-id");
},
bargaininfoShow: function() { //报告详情 bargaininfoShow: function() { //报告详情
$.ajax({ $.ajax({
'type': 'GET', 'type': 'GET',
...@@ -1372,8 +1417,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -1372,8 +1417,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
'store_id' : $("select[name='store_id'] option:selected").val(), 'store_id' : $("select[name='store_id'] option:selected").val(),
'agent_name': $.trim($('#agent_name').val()), 'agent_name': $.trim($('#agent_name').val()),
'agent_phone': $.trim($('#agent_phone').val()), 'agent_phone': $.trim($('#agent_phone').val()),
'partial_name': $.trim($('#partical_name').val()), // 'partial_name': $.trim($('#partical_name').val()),
'bargain_id' :$.trim($('#bargain_id').val()) 'bargain_id' :$.trim($('#bargain_id').val()),
'partial_id': bargain.agent_id_phone
}; };
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
...@@ -1387,6 +1434,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -1387,6 +1434,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
if(data.code == 200) { if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('reportList_list_tpl').innerHTML); var doTtmpl = doT.template(document.getElementById('reportList_list_tpl').innerHTML);
$("#maintable_list").html(doTtmpl(data.data)); $("#maintable_list").html(doTtmpl(data.data));
var hanghao=(pageNo-1)*10+1;
$("#maintable_list tr").each(function() {
$(this).children('td:eq(0)').html(hanghao++);
});
// var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); // var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo')));
/*分页代码*/ /*分页代码*/
add_page(data.data.total, pageNo, bargain.pageSize, bargain.getList); add_page(data.data.total, pageNo, bargain.pageSize, bargain.getList);
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
[% var sw=function(s){switch(Number(s)){case 10:return"出租";case 20:return"增佣";case 30:return"代理";case 40:return"好处费";default:return s}}; %] [% var sw=function(s){switch(Number(s)){case 10:return"出租";case 20:return"增佣";case 30:return"代理";case 40:return"好处费";default:return s}}; %]
[% for(var item in it["list"]){ %] [% for(var item in it["list"]){ %]
<tr data-id="[%= it['list'][item]['id'] %]" data-orderid="[%= it['list'][item]['order_id'] %]"> <tr data-id="[%= it['list'][item]['id'] %]" data-orderid="[%= it['list'][item]['order_id'] %]">
<td class="text-center" >行号 </td>
<td class="text-center" >[%= it["list"][item]['id'] %]</td> <td class="text-center" >[%= it["list"][item]['id'] %]</td>
<td class="text-center" width="10%">[%= it["list"][item]['create_time'] %]</td> <td class="text-center" width="10%">[%= it["list"][item]['create_time'] %]</td>
<td class="text-center" width="8%">[%= it["list"][item]['is_open']*1?'是':'否' %]</td> <td class="text-center" width="8%">[%= it["list"][item]['is_open']*1?'是':'否' %]</td>
......
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