汇总编辑前端修改

master
zhengyongxing 4 years ago
parent 4f35cacbab
commit 6b47baf59a

@ -444,19 +444,43 @@
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
}
var week_amount_find = $(_this).parent().parent();
var old_amount = week_amount_find.find(".sum_money_span").text();
//扣款
pay_money = parseFloat(pay_money) - parseFloat(refund);
var value = parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100);
$(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2));
$(_this).parent().parent().find(".sum_money").val(value.toFixed(2));
var this_amount = week_amount_find.find(".sum_money_span").text();
var week_amount = 0;
for (;;) {
week_amount = week_amount_find.find(".week_amount").text();
if (week_amount_find) {
break;
} else {
week_amount_find = week_amount_find.prev();
}
}
var D_value = parseFloat(old_amount)-parseFloat(this_amount);
week_amount_find.find(".week_amount").text((parseFloat(week_amount)-D_value).toFixed(2));
}
//结算金额重算
function changeStatementAmount(_this) {
var _parent = $(_this).parent().parent();
var statement_amount = '';
for (;;) {
statement_amount = _parent.find(".statement_money").text();
if (!statement_amount ) {
@ -477,7 +501,10 @@
get_item = get_item.next();
}
// week_amount_find.find(".week_amount").text();
_parent.find(".statement_money").text(sum_amount.toFixed(2));
}
//结算金额合计重算
function changeSumAmount() {
@ -485,7 +512,7 @@
var sum_amount = 0;
var st = 0;
$("#statementShow").find(".statement_money").each(function (key,val) {
$("#statementShow").find(".statement_money").each(function (key,val) {
st = $(val).data('st')
sum_amount = parseFloat(sum_amount) + parseFloat($(val).text());
@ -493,6 +520,9 @@
});
$(".count_sum_money").text(sum_amount.toFixed(2));
}
</script>

Loading…
Cancel
Save