@ -167,8 +167,8 @@
<!-- <td>{$com['statement_info'][0]['game_list'][0]['statement_begin_time']} - {$com['statement_info'][0]['game_list'][0]['statement_end_time']}</td> -->
< td > < span class = "pay_amount" > {$com['statement_info'][0]['game_list'][0]['pay_amount']}< / span > < / td >
< td >
{$com['statement_info'][0]['game_list'][0]['refund']|default=0}
<!-- <input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['game_list'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['account']}][]">-- >
<!-- {$com['statement_info'][0]['game_list'][0]['refund']|default=0}-->
< input class = "refund" onkeyup = "value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value = "{$com['statement_info'][0]['game_list'][0]['refund']|default=0}" style = "width: 40px;" name = "refund[{$com['id']}][{$com['statement_info'][0]['account']}][]" >
< / td >
< td > {$com['statement_info'][0]['game_list'][0]['ratio']}%< / td >
< td > < input class = "increment_ratio" onkeyup = "if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name = "increment_ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value = "{$com['statement_info'][0]['game_list'][0]['increment_ratio']}" style = "width: 25px;" > %< / td >
@ -178,10 +178,11 @@
< td rowspan = "{$com.row}" > {$com['reward']}< / td >
< td rowspan = "{$com.row}" > {$com['fine']}< / td >
< td rowspan = "{$com['statement_info'][0]['time_row']}" >
{$com['statement_info'][0]['game_list'][0]['withhold']|default=0}
<!-- <input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['game_list'][0]['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$com['statement_info'][0]['account']}][]"> -->
<!-- {$com['statement_info'][0]['game_list'][0]['withhold']|default=0} -->
< input class = "withhold" onkeyup = "value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value = "{$com['statement_info'][0]['game_list'][0]['withhold']|default=0}" style = "width: 40px;" name = "withhold[{$com['id']}][{$com['statement_info'][0]['account']}][{$com['statement_info'][0]['game_list'][0]['statement_begin_time']}]" >
< input class = "oldwithhold" onkeyup = "value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value = "{$com['statement_info'][0]['game_list'][0]['withhold']|default=0}" style = "width: 40px;display: none" >
< / td >
< td rowspan = "{$com['statement_info'][0]['time_row']}" class = "week_amount" > {$com['statement_info'][0]['week_amount']}< / td >
< td rowspan = "{$com['statement_info'][0]['time_row']}" > < span class = "week_amount" > {$com['statement_info'][0]['week_amount']}< / span > < input style = "display: none" class = "week_amount_input" value = "{$com['statement_info'][0]['week_amount']}" > < / td >
< td rowspan = "{$com.row}" data-st = "{$com['st']}" class = "statement_money" > {$com['statement_money']}< / td >
< else / >
@ -267,8 +268,12 @@
< td > < input class = "increment_ratio" onkeyup = "if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name = "increment_ratio[{$com['id']}][{$account['account']}][]" value = "{$account['game_list'][0]['increment_ratio']}" style = "width: 25px;" > %< / td >
< td > < span class = "sum_money_span" > {$account['game_list'][0]['sum_money']}< / span > < input class = "sum_money" name = "sum_money[{$com['id']}][{$account['account']}][]" value = "{$account['game_list'][0]['sum_money']}" style = "width: 20px;display: none" > < / td >
< notempty name = "account['time']" >
< td rowspan = "{$account['time_row']}" > < input class = "withhold" onkeyup = "value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value = "{$account['withhold_amount']|default=0}" style = "width: 40px;" name = "withhold[{$com['id']}][{$account['account']}][{$account['game_list'][0]['statement_begin_time']}]" > < / td >
< td rowspan = "{$account['time_row']}" class = "week_amount" > {$account['week_amount']}< / td >
< td rowspan = "{$account['time_row']}" >
< input class = "withhold" onkeyup = "value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value = "{$account['withhold_amount']|default=0}" style = "width: 40px;" name = "withhold[{$com['id']}][{$account['account']}][{$account['game_list'][0]['statement_begin_time']}]" >
< input class = "oldwithhold" onkeyup = "value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value = "{$account['withhold_amount']|default=0}" style = "width: 40px;display: none" >
< / td >
< td rowspan = "{$account['time_row']}" > < span class = "week_amount" > {$account['week_amount']}< / span > < input style = "display: none" class = "week_amount_input" value = "{$account['week_amount']}" > < / td >
< / notempty >
< else / >
< td > -< / td >
@ -459,14 +464,17 @@
}
//退款
var withhold = $(_this).parent().parent().find(".withhold").val();
if (!withhold || withhold < 0 ) {
var withhold = parseFloat($(_this).parent().parent().find(".withhold").val());
var oldwithhold = $(_this).parent().parent().find(".oldwithhold").val();
if (!withhold ) {
withhold = 0;
$(_this).parent().parent().find(".withhold").val(withhold);
} else if(parseFloat(withhold) > parseFloat(pay_money)) {
withhold = pay_money;
$(_this).parent().parent().find(".withhold").val(withhold);
}
// else if(parseFloat(withhold) > parseFloat(pay_money)) {
// withhold = pay_money;
// $(_this).parent().parent().find(".withhold").val(withhold);
// }
//补点
var increment_ratio = $(_this).parent().parent().find(".increment_ratio").val();
@ -481,30 +489,36 @@
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;
var i = 0;
for (;;) {
week_amount = week_amount_find.find(".week_amount").text();
i++;
if (week_amount) {
break;
} else {
week_amount_find = week_amount_find.prev();
}
if (i>10) {
break;
}
}
var D_value = parseFloat(old_amount)-parseFloat(this_amount) - parseFloat(withhold);
//扣款
pay_money = parseFloat(pay_money) - parseFloat(refund);
week_amount_find.find(".week_amount").text((parseFloat(week_amount)-D_value).toFixed(2));
var value = (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 D_value = parseFloat(old_amount)-parseFloat(this_amount) + (withhold-oldwithhold) ;
week_amount_find.find(".week_amount").text((parseFloat(week_amount)-D_value).toFixed(2));
// week_amount_find.find(".week_amount_input").val((parseFloat(week_amount)-D_value- parseFloat(withhold)));
$(_this).parent().parent().find(".oldwithhold").val(withhold)
}
//结算金额重算
@ -530,11 +544,15 @@
for (var i =0;i< parseInt ( row ) ; i + + ) {
var amount = get_item.find(".sum_money_span").text();
var amount = get_item.find(".week_amount").text();
if (amount) {
sum_amount = parseFloat(sum_amount) + parseFloat(amount);
get_item = get_item.next();
}
}
// week_amount_find.find(".week_amount").text();
_parent.find(".statement_money").text(sum_amount.toFixed(2));