Commit 65143629 authored by agping's avatar agping

收款详情 多收金额 应收金额 显示

parent 187c3308
......@@ -20,7 +20,9 @@ define(['doT', 'text!temp/financial_manager_daily_list_template_tpl.html', 'css!
house_id: '',
caiwu_site_id: '',
adjusment_id:'',
payment_details_price:'',
payment_details_money:'',
receivedMoneyLiu:'',
init: function() {
//初始化时间
var myDate = new Date();
......@@ -105,7 +107,23 @@ define(['doT', 'text!temp/financial_manager_daily_list_template_tpl.html', 'css!
e.stopPropagation();
bargain.deleteTableRow(bargain.adjusment_id);
});
//中介费 类型切换 多收 正常
$("#agency_fees_type_text").change(function() {
//中介费类型显示 隐藏 中介费
if($(this).val()*1 == 1){
var persent_liu=0;
receiv.receivedMoneyLiu = receiv.receivedMoneyLiu*0;
}else{
var persent_liu=0.7;
receiv.receivedMoneyLiu = receiv.receivedMoneyLiu*1;
};
$("#getPrice").text((Math.floor(((receiv.payment_details_price-0)*persent_liu )*100)/100).toFixed(2)+ "元");
$("#morePrice").text((Math.floor((receiv.payment_details_money - ((receiv.payment_details_price-0)*persent_liu) + receiv.receivedMoneyLiu )*100)/100).toFixed(2));
if($("#morePrice").html()*1 < 0){
$("#morePrice").html(0)
}
});
//点击资料 显示图片
_doc.on('click', '.record-pic', function(e) {
e.preventDefault();
......@@ -1184,6 +1202,9 @@ define(['doT', 'text!temp/financial_manager_daily_list_template_tpl.html', 'css!
$('.shenzhengpayType').show();
}
var persent = 0.7;
bargain.payment_details_price = data.price;
bargain.payment_details_money = data.money;
bargain.receivedMoneyLiu = data.received_money*1;
$('.zhzd').show();
$('.zjcon').hide();
......@@ -1226,9 +1247,10 @@ define(['doT', 'text!temp/financial_manager_daily_list_template_tpl.html', 'css!
doc.find("#intoType").text('佣金');
} else if ( data.type == 91 ) {
doc.find("#intoType").text('中介费');
if ( doc.find('#agency_fees_type').val() == 1 ){
if ( data.type_ext == 1 ){
persent = 0 ;
}
bargain.receivedMoneyLiu = bargain.receivedMoneyLiu * 0;
};
$('.zhzd').hide();
} else if ( data.type == 92 ) {
doc.find("#intoType").text('案场费');
......@@ -1246,11 +1268,12 @@ define(['doT', 'text!temp/financial_manager_daily_list_template_tpl.html', 'css!
doc.find("#intoPrice").val(data.money);
doc.find("#shouxu").val(data.transaction_fee);
doc.find("#realPrice").val(data.real_money);
// doc.find("#getPrice").text(((data.price-0)*0.7 )+ "元");
// doc.find("#morePrice").text(Math.floor((data.money - ((data.price-0)*0.7))*100)/100 + "元");
// 保留两位小数
doc.find("#getPrice").text((Math.floor(((data.price-0)*persent)*100)/100).toFixed(2)+ "元");
doc.find("#morePrice").text((Math.floor((data.money - ((data.price-0)*persent))*100)/100).toFixed(2) + "元");
//保留两位小数
doc.find("#getPrice").text((Math.floor(((data.price-0)*persent )*100)/100).toFixed(2)+ "元");
doc.find("#morePrice").text((Math.floor((data.money - ((data.price-0)*persent) + bargain.receivedMoneyLiu )*100)/100).toFixed(2));
if($("#morePrice").html()*1 < 0){
$("#morePrice").html(0)
}
$("#person").text(data.current_agent_name);
$("#belongT").text(data.store_name);
doc.find("#payType").val(data.pay_type);
......
......@@ -186,7 +186,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
};
$("#getPrice").text((Math.floor(((receiv.payment_details_price-0)*persent_liu )*100)/100).toFixed(2)+ "元");
$("#morePrice").text((Math.floor((receiv.payment_details_money - ((receiv.payment_details_price-0)*persent_liu) + receiv.receivedMoneyLiu )*100)/100).toFixed(2) + "元");
$("#morePrice").text((Math.floor((receiv.payment_details_money - ((receiv.payment_details_price-0)*persent_liu) + receiv.receivedMoneyLiu )*100)/100).toFixed(2));
if($("#morePrice").html()*1 < 0){
$("#morePrice").html(0)
}
......@@ -1420,7 +1420,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
doc.find("#realPrice").val(data.real_money);
//保留两位小数
doc.find("#getPrice").text((Math.floor(((data.price-0)*persent )*100)/100).toFixed(2)+ "元");
doc.find("#morePrice").text((Math.floor((data.money - ((data.price-0)*persent) + receiv.receivedMoneyLiu )*100)/100).toFixed(2) + "元");
doc.find("#morePrice").text((Math.floor((data.money - ((data.price-0)*persent) + receiv.receivedMoneyLiu )*100)/100).toFixed(2));
if($("#morePrice").html()*1 < 0){
$("#morePrice").html(0)
}
......
......@@ -24,6 +24,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
bargainid_commission:'',
price_commission:'',
reportid_commission:'',
receivedMoneyLiu:'',
payment_details_price:'',
payment_details_money:'',
init: function() {
//初始化dot
$(document.body).append(template);
......@@ -281,7 +284,23 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
$('#modal_new_maid').removeAttr('data-id').find('.modal-title').html('新增分佣提成');
bargain.newAddMaid();
});
//中介费 类型切换 多收 正常
$("#agency_fees_type_text").change(function() {
//中介费类型显示 隐藏 中介费
if($(this).val()*1 == 1){
var persent_liu=0;
bargain.receivedMoneyLiu = bargain.receivedMoneyLiu*0;
}else{
var persent_liu=0.7;
bargain.receivedMoneyLiu = bargain.receivedMoneyLiu*1;
};
$("#getPrice").text((Math.floor(((bargain.payment_details_price-0)*persent_liu )*100)/100).toFixed(2)+ "元");
$("#morePrice").text((Math.floor((bargain.payment_details_money - ((bargain.payment_details_price-0)*persent_liu) + bargain.receivedMoneyLiu )*100)/100).toFixed(2));
if($("#morePrice").html()*1 < 0){
$("#morePrice").html(0)
}
});
//详情弹出框,分佣提成里,点击编辑
_doc.on('click', '.detail-modal-maid-a-edit', function(e){
e.preventDefault();
......@@ -2413,6 +2432,11 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
},'json')
},
getValueFunction : function(data){
//切换 中介费类型 多收金额 应收金额相应的改变
bargain.payment_details_price = data.price;
bargain.payment_details_money = data.money;
bargain.receivedMoneyLiu = data.received_money*1;
var persent = 0.7;
$('.zhzd').show();
$('.zjcon').hide();
var doc = $('#modal-addPic');
......@@ -2423,6 +2447,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
doc.find("#tijiaoren").text(data.agent_name);
doc.find("#address").text(data.address);
doc.find("#comit_time").text(data.create_time);
//判断收款详情的类型
if(data.type == 91){
$('.agency_fees_type_hide').show();
......@@ -2454,6 +2479,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
doc.find("#intoType").text('佣金');
} else if ( data.type == 91 ) {
doc.find("#intoType").text('中介费');
if ( data.type_ext == 1 ){//收款详情为正常
persent = 0 ;
bargain.receivedMoneyLiu = bargain.receivedMoneyLiu * 0;
};
$('.zhzd').hide();
} else if ( data.type == 92 ) {
doc.find("#intoType").text('案场费');
......@@ -2474,8 +2503,11 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
// doc.find("#getPrice").text(((data.price-0)*0.7 )+ "元");
// doc.find("#morePrice").text(Math.floor((data.money - ((data.price-0)*0.7))*100)/100 + "元");
// 保留两位小数
doc.find("#getPrice").text((Math.floor(((data.price-0)*0.7 )*100)/100).toFixed(2)+ "元");
doc.find("#morePrice").text((Math.floor((data.money - ((data.price-0)*0.7))*100)/100).toFixed(2) + "元");
doc.find("#getPrice").text((Math.floor(((data.price-0)*persent )*100)/100).toFixed(2)+ "元");
doc.find("#morePrice").text((Math.floor((data.money - ((data.price-0)*persent) + bargain.receivedMoneyLiu )*100)/100).toFixed(2));
if($("#morePrice").html()*1 < 0){
$("#morePrice").html(0)
}
$("#person").text(data.current_agent_name);
$("#belongT").text(data.store_name);
doc.find("#payType").val(data.pay_type);
......
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