Commit 78f04ddc authored by xishifeng's avatar xishifeng

暂存3

parent 90c06161
...@@ -76,8 +76,8 @@ ...@@ -76,8 +76,8 @@
</button> </button>
<h4 class="modal-title detail-modal-header-tab"> <h4 class="modal-title detail-modal-header-tab">
<a href="javascript:;" class="btn btn-info" id="information">成交信息</a> <a href="javascript:;" class="btn btn-info" id="information">成交信息</a>
<a href="javascript:;" class="btn btn-default caozuo" id="fees">分佣提成</span> <a href="javascript:;" class="btn btn-default caozuo" id="fees">分佣提成</a>
<a href="javascript:;" class="btn btn-default" id="records">开票税费</span> <a href="javascript:;" class="btn btn-default" id="records">开票税费</a>
</h4> </h4>
</div> </div>
<div class="modal-body modal-body-two"> <div class="modal-body modal-body-two">
......
...@@ -60,7 +60,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -60,7 +60,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
//点击获取报告详情 //点击获取报告详情
_doc.on('click', '.details-btn', function() { _doc.on('click', '.details-btn', function() {
bargain.bargain_id = $(this).closest('tr').attr("data-id"); bargain.bargain_id = $(this).closest('tr').attr("data-id");
bargain.Edit(); //bargain.Edit();
}); });
//详情弹出框里的tab点击事件,成交信息,分佣提成,开票税费 //详情弹出框里的tab点击事件,成交信息,分佣提成,开票税费
...@@ -72,11 +72,11 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -72,11 +72,11 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
bargain.detailTabIndex = _this.index(); bargain.detailTabIndex = _this.index();
console.log(bargain.detailTabIndex); console.log(bargain.detailTabIndex);
if(bargain.detailTabIndex == 0){ if(bargain.detailTabIndex == 0){
bargain.Information(); //bargain.Edit();
}else if(bargain.detailTabIndex == 1){ }else if(bargain.detailTabIndex == 1){
bargain.Fees(); //bargain.Fees();
}else{ }else{
bargain.shuiFee(); //bargain.shuiFee();
} }
}); });
...@@ -139,15 +139,15 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -139,15 +139,15 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
}); });
}, },
Edit: function() { //报告详情 Edit: function() { //报告详情
$(".Tswitch").eq(0).show(); // $(".Tswitch").eq(0).show();
$(".Tswitch").eq(1).hide(); // $(".Tswitch").eq(1).hide();
$(".Tswitch").eq(2).hide(); // $(".Tswitch").eq(2).hide();
$("#information").removeClass("btn-default"); // $("#information").removeClass("btn-default");
$("#information").addClass("btn-info"); // $("#information").addClass("btn-info");
$("#fees").removeClass("btn-info"); // $("#fees").removeClass("btn-info");
$("#fees").addClass("btn-default"); // $("#fees").addClass("btn-default");
$("#records").removeClass("btn-info"); // $("#records").removeClass("btn-info");
$("#records").addClass("btn-default"); // $("#records").addClass("btn-default");
$.ajax({ $.ajax({
'type': 'GET', 'type': 'GET',
'url': '/index/bargainInfo', 'url': '/index/bargainInfo',
...@@ -255,40 +255,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -255,40 +255,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
} }
}); });
}, },
Caozuo: function() { //分佣提成数据
$.ajax({
'type': 'GET',
'url': '/index/commissionList',
data: {
"id": bargain.bargain_id
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
if(data.data) {
var caozuo_table = "";
$.each(data['data'], function(i, item) {
caozuo_table += '<tr><td>' + item.role_name + '</td><td>' + item.agent_name + '</td><td>' + item.store_name +
'</td><td>' + item.scale + '</td><td>' + item.scale_fee + '</td><td>' + item.practical_fee + '</td><td>' + item.content + '</td></tr>';
});
$("#caozuo_table").html(caozuo_table);
$("#caozuo_table tr").each(function(e) { //不能为空
var temp = $("#caozuo_table").find("tr").eq(e).find("td").eq(6).html(); //获取一列的值
if(temp == 'null') {
$("#caozuo_table").find("tr").eq(e).find("td").eq(6).html(" ")
}
});
}
} else {
alert('获取失败!');
}
}
});
},
// 开票税费 // 开票税费
shuiFee: function() { shuiFee: function() {
$(".Tswitch:nth-of-type(3)").show().siblings().hide(); // $(".Tswitch:nth-of-type(3)").show().siblings().hide();
$("#records").addClass("btn-info").removeClass("btn-default").siblings().removeClass("btn-info").addClass("btn-default"); // $("#records").addClass("btn-info").removeClass("btn-default").siblings().removeClass("btn-info").addClass("btn-default");
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: '/index/getTallAge', url: '/index/getTallAge',
...@@ -320,94 +290,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -320,94 +290,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
} }
}); });
}, },
Records: function() { //分佣提成数据
$(".Tswitch").eq(0).hide();
$(".Tswitch").eq(1).hide();
$(".Tswitch").eq(2).show();
$("#information").removeClass("btn-info");
$("#information").addClass("btn-default");
$("#fees").removeClass("btn-info");
$("#fees").addClass("btn-default");
$("#records").removeClass("btn-default");
$("#records").addClass("btn-info");
$.ajax({
'type': 'GET',
'url': '/index/payLogList',
data: {
"id": bargain.bargain_id
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
if(data.data) {
var caozuo_table = "";
$.each(data['data'], function(i, item) {
caozuo_table += '<tr><td>' + item.create_time + '</td><td>' + item.money + '</td><td>' + item.type +
'</td><td>' + item.pay_type + '</td><td>' + item.agent_name + '</td></tr>';
});
$("#tcaozuo_table").html(caozuo_table);
$("#tcaozuo_table tr").each(function(e) { //不能为空
var temp_one = $("#tcaozuo_table").find("tr").eq(e).find("td").eq(4).html();
var temp = $("#tcaozuo_table").find("tr").eq(e).find("td").eq(3).html(); //获取一列的值
var temp_two = $("#tcaozuo_table").find("tr").eq(e).find("td").eq(2).html();
// 支付方式 10支付宝 20 微信 30pos机器 40转账 50现金 60其他
if(temp * 1 == 10) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(3).html("支付宝")
}
if(temp * 1 == 20) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(3).html("微信")
}
if(temp * 1 == 30) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(3).html("pos机器")
}
if(temp * 1 == 40) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(3).html("转账")
}
if(temp * 1 == 50) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(3).html("现金")
}
if(temp * 1 == 60) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(3).html("其他")
}
// 付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他
if(temp_two * 1 == 10) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(2).html("意向金")
}
if(temp_two * 1 == 20) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(2).html("定金")
}
if(temp_two * 1 == 30) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(2).html("保管金")
}
if(temp_two * 1 == 40) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(2).html("押金")
}
if(temp_two * 1 == 50) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(2).html("租金")
}
if(temp_two * 1 == 60) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(2).html("进场费")
}
if(temp_two * 1 == 70) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(2).html("转让费")
}
if(temp_two * 1 == 80) {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(2).html("其他")
};
if(temp_one == 'null') {
$("#tcaozuo_table").find("tr").eq(e).find("td").eq(4).html(" ")
}
});
}
} else {
alert('获取失败!');
}
}
});
},
newCommission: function() { //新增分佣提成 newCommission: function() { //新增分佣提成
$.ajax({ $.ajax({
'type': 'POST', 'type': 'POST',
...@@ -430,31 +312,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -430,31 +312,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
} }
}); });
}, },
// table切换
Information: function() {
$(".Tswitch").eq(0).show();
$(".Tswitch").eq(1).hide();
$(".Tswitch").eq(2).hide();
$("#information").removeClass("btn-default");
$("#information").addClass("btn-info");
$("#fees").removeClass("btn-info");
$("#fees").addClass("btn-default");
$("#records").removeClass("btn-info");
$("#records").addClass("btn-default");
},
Fees: function() {
$(".Tswitch").eq(0).hide();
$(".Tswitch").eq(1).show();
$(".Tswitch").eq(2).hide();
$("#information").removeClass("btn-info");
$("#information").addClass("btn-default");
$("#fees").removeClass("btn-default");
$("#fees").addClass("btn-info");
$("#records").removeClass("btn-info");
$("#records").addClass("btn-default");
},
Submit_follow: function() { //提交 Submit_follow: function() { //提交
$.ajax({ $.ajax({
'type': 'POST', 'type': 'POST',
......
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