Commit a7507cdf authored by agping's avatar agping

多收 正常

parent 6c2359a9
......@@ -181,7 +181,50 @@ define(['doT', 'text!temp/office_receivables_template_tpl.html', 'css!style/home
});
//中介费 类型切换 多收 正常
$("#agency_fees_type_text").change(function() {
//中介费类型显示 隐藏 中介费
//之前已收佣
receiv.receivedMoneyLiu=$('#before_commission_text').val()*1;
//入账金额
receiv.payment_details_money=$('#intoPrice').val()*1;
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)
}
});
//入账金额 类型切换 多收 正常
$("#intoPrice").on('input',function() {
//之前已收佣
receiv.receivedMoneyLiu=$('#before_commission_text').val()*1;
//入账金额
receiv.payment_details_money=$('#intoPrice').val()*1;
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)
}
});
//之前已收佣 类型切换 多收 正常
$("#before_commission_text").on('input',function() {
//之前已收佣
receiv.receivedMoneyLiu=$('#before_commission_text').val()*1;
//入账金额
receiv.payment_details_money=$('#intoPrice').val()*1;
if($(this).val()*1 == 1){
var persent_liu=0;
receiv.receivedMoneyLiu = receiv.receivedMoneyLiu*0;
......
......@@ -181,7 +181,50 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
});
//中介费 类型切换 多收 正常
$("#agency_fees_type_text").change(function() {
//中介费类型显示 隐藏 中介费
//之前已收佣
receiv.receivedMoneyLiu=$('#before_commission_text').val()*1;
//入账金额
receiv.payment_details_money=$('#intoPrice').val()*1;
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)
}
});
//入账金额 类型切换 多收 正常
$("#intoPrice").on('input',function() {
//之前已收佣
receiv.receivedMoneyLiu=$('#before_commission_text').val()*1;
//入账金额
receiv.payment_details_money=$('#intoPrice').val()*1;
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)
}
});
//之前已收佣 类型切换 多收 正常
$("#before_commission_text").on('input',function() {
//之前已收佣
receiv.receivedMoneyLiu=$('#before_commission_text').val()*1;
//入账金额
receiv.payment_details_money=$('#intoPrice').val()*1;
if($(this).val()*1 == 1){
var persent_liu=0;
receiv.receivedMoneyLiu = receiv.receivedMoneyLiu*0;
......
......@@ -677,6 +677,7 @@ define(['doT', 'text!temp/reportList_office_template_tpl.html', 'css!style/home.
if($('.fee-type-zhongjie').val()*1 == 0){//正常
var shouldMoney = (0.7*bargain.price_commission).toFixed(2)
var moreMoney = ($('.commission-money').val()*1 - shouldMoney + $('.commission-before-zhongjie').val()*1).toFixed(2)
$('.fee-money-zhongjie').html(shouldMoney);//应收金额
$('.fee-more-zhongjie').html(moreMoney);//多收金额
......@@ -692,8 +693,45 @@ define(['doT', 'text!temp/reportList_office_template_tpl.html', 'css!style/home.
}
});
//之前已收佣 change
$(".commission-before-zhongjie").on('input',function() {
if($('.fee-type-zhongjie').val()*1 == 0){//正常
var shouldMoney = (0.7*bargain.price_commission).toFixed(2)
var moreMoney = ($('.commission-money').val()*1 - shouldMoney + $('.commission-before-zhongjie').val()*1).toFixed(2)
$('.fee-money-zhongjie').html(shouldMoney);//应收金额
$('.fee-more-zhongjie').html(moreMoney);//多收金额
}else{//多收
var shouldMoney = 0;
var moreMoney = $('.commission-money').val()*1;
$('.fee-money-zhongjie').html(shouldMoney);//应收金额
$('.fee-more-zhongjie').html(moreMoney);//多收金额
};
//多收金额 小于0 置为0
if($('.fee-more-zhongjie').html()*1 < 0){
$('.fee-more-zhongjie').html(0);
}
});
//收款入账 change
$(".commission-money").on('input',function() {
if($('.fee-type-zhongjie').val()*1 == 0){//正常
var shouldMoney = (0.7*bargain.price_commission).toFixed(2)
var moreMoney = ($('.commission-money').val()*1 - shouldMoney + $('.commission-before-zhongjie').val()*1).toFixed(2)
$('.fee-money-zhongjie').html(shouldMoney);//应收金额
$('.fee-more-zhongjie').html(moreMoney);//多收金额
}else{//多收
var shouldMoney = 0;
var moreMoney = $('.commission-money').val()*1;
$('.fee-money-zhongjie').html(shouldMoney);//应收金额
$('.fee-more-zhongjie').html(moreMoney);//多收金额
};
//多收金额 小于0 置为0
if($('.fee-more-zhongjie').html()*1 < 0){
$('.fee-more-zhongjie').html(0);
}
});
//收款图片 和 收款详情切换
$('.tit_con').unbind('click').bind('click',function(e){
......@@ -1070,8 +1108,17 @@ define(['doT', 'text!temp/reportList_office_template_tpl.html', 'css!style/home.
$('#container_body_img_area_liu').html('');
$('.commission-bargain-id').html(bargain.bargainid_commission);//初始化 成交报告id
$('.commission-price-zhongjie').html(bargain.price_commission);//初始化成交价
$('.fee-money-zhongjie').html(0);//应收金额
$('.fee-more-zhongjie').html(0);//多收金额
// $('.fee-money-zhongjie').html(0);//应收金额
// $('.fee-more-zhongjie').html(0);//多收金额
// 中介费 正常
var shouldMoney = (0.7*bargain.price_commission).toFixed(2)
var moreMoney = ($('.commission-money').val()*1 - shouldMoney + $('.commission-before-zhongjie').val()*1).toFixed(2)
$('.fee-money-zhongjie').html(shouldMoney);//应收金额
$('.fee-more-zhongjie').html(moreMoney);//多收金额
//多收金额 小于0 置为0
if($('.fee-more-zhongjie').html()*1 < 0){
$('.fee-more-zhongjie').html(0);
}
bargain.getNum();
bargain.getRole();
},
......
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