|
|
|
@ -159,11 +159,11 @@
|
|
|
|
|
<td>{$com['statement_info'][0]['game_list'][0]['game_name']}</td>
|
|
|
|
|
<td>{$com['statement_info'][0]['game_list'][0]['game_type_name']}</td>
|
|
|
|
|
<td>{$com['statement_info'][0]['game_list'][0]['statement_begin_time']}-{$com['statement_info'][0]['game_list'][0]['statement_end_time']}</td>
|
|
|
|
|
<td>{$com['statement_info'][0]['game_list'][0]['pay_amount']}</td>
|
|
|
|
|
<td><input class="refund" value="0" style="width: 30px;" name="refund[{$com['id']}][{$com['statement_info'][0]['account']}][]"></td>
|
|
|
|
|
<td><input class="ratio" name="ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$com['statement_info'][0]['game_list'][0]['ratio']}" style="width: 20px;">%</td>
|
|
|
|
|
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$com['statement_info'][0]['game_list'][0]['increment_ratio']}" style="width: 20px;">%</td>
|
|
|
|
|
<td><span>{$com['statement_info'][0]['game_list'][0]['sum_money']}</span>
|
|
|
|
|
<td><span class="pay_amount">{$com['statement_info'][0]['game_list'][0]['pay_amount']}</span></td>
|
|
|
|
|
<td><input class="refund" value="0" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['account']}][]"></td>
|
|
|
|
|
<td><input class="ratio" name="ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$com['statement_info'][0]['game_list'][0]['ratio']}" style="width: 25px;">%</td>
|
|
|
|
|
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$com['statement_info'][0]['game_list'][0]['increment_ratio']}" style="width: 25px;">%</td>
|
|
|
|
|
<td><span class="sum_money_span">{$com['statement_info'][0]['game_list'][0]['sum_money']}</span>
|
|
|
|
|
<input class="sum_money" name="sum_money[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$com['statement_info'][0]['game_list'][0]['sum_money']}" style="width: 20px;display: none"></td>
|
|
|
|
|
<td rowspan="{$com.row}">{$com['reward']}</td>
|
|
|
|
|
<td rowspan="{$com.row}">{$com['fine']}</td>
|
|
|
|
@ -215,11 +215,11 @@
|
|
|
|
|
<td>{$game['game_name']}</td>
|
|
|
|
|
<td>{$game['game_type_name']}</td>
|
|
|
|
|
<td>{$game['statement_begin_time']}-{$game['statement_end_time']}</td>
|
|
|
|
|
<td>{$game['pay_amount']}</td>
|
|
|
|
|
<td><input class="refund" value="0" style="width: 30px;" name="refund[{$com['id']}][{$com['statement_info'][0]['account']}][]"></td>
|
|
|
|
|
<td><input class="ratio" name="ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['ratio']}" style="width: 20px;">%</td>
|
|
|
|
|
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['increment_ratio']}" style="width: 20px;">%</td>
|
|
|
|
|
<td><span>{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['sum_money']}" style="width: 20px;display: none"></td>
|
|
|
|
|
<td><span class="pay_amount">{$game['pay_amount']}</span></td>
|
|
|
|
|
<td><input class="refund" value="0" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['account']}][]"></td>
|
|
|
|
|
<td><input class="ratio" name="ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['ratio']}" style="width: 25px;">%</td>
|
|
|
|
|
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['increment_ratio']}" style="width: 25px;">%</td>
|
|
|
|
|
<td><span class="sum_money_span">{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['sum_money']}" style="width: 20px;display: none"></td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
</if>
|
|
|
|
@ -238,13 +238,13 @@
|
|
|
|
|
<td>{$account['game_list'][0]['game_name']}</td>
|
|
|
|
|
<td>{$account['game_list'][0]['game_type_name']}</td>
|
|
|
|
|
<td>{$account['game_list'][0]['statement_begin_time']}-{$account['game_list'][0]['statement_end_time']}</td>
|
|
|
|
|
<td>{$account['game_list'][0]['pay_amount']}</td>
|
|
|
|
|
<td><span class="pay_amount">{$account['game_list'][0]['pay_amount']}</span></td>
|
|
|
|
|
<!-- <td>{$account['game_list'][0]['ratio']|showNumPercent}</td>-->
|
|
|
|
|
<!-- <td>{$account['game_list'][0]['increment_ratio']|showNumPercent}</td>-->
|
|
|
|
|
<td><input class="refund" value="0" style="width: 30px;" name="refund[{$com['id']}][{$account['account']}][]"></td>
|
|
|
|
|
<td><input class="ratio" name="ratio[{$com['id']}][{$account['account']}][]" value="{$account['game_list'][0]['ratio']}" style="width: 20px;">%</td>
|
|
|
|
|
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][{$account['account']}][]" value="{$account['game_list'][0]['increment_ratio']}" style="width: 20px;">%</td>
|
|
|
|
|
<td><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>
|
|
|
|
|
<td><input class="refund" value="0" style="width: 40px;" name="refund[{$com['id']}][{$account['account']}][]"></td>
|
|
|
|
|
<td><input class="ratio" name="ratio[{$com['id']}][{$account['account']}][]" value="{$account['game_list'][0]['ratio']}" style="width: 25px;">%</td>
|
|
|
|
|
<td><input class="increment_ratio" 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>
|
|
|
|
|
|
|
|
|
|
<else />
|
|
|
|
|
<td>-</td>
|
|
|
|
@ -264,13 +264,13 @@
|
|
|
|
|
<td>{$game['game_name']}</td>
|
|
|
|
|
<td>{$game['game_type_name']}</td>
|
|
|
|
|
<td>{$game['statement_begin_time']}-{$game['statement_end_time']}</td>
|
|
|
|
|
<td>{$game['pay_amount']}</td>
|
|
|
|
|
<td><span class="pay_amount">{$game['pay_amount']}</span></td>
|
|
|
|
|
<!-- <td>{$game['ratio']|showNumPercent}</td>-->
|
|
|
|
|
<!-- <td>{$game['increment_ratio']|showNumPercent}</td>-->
|
|
|
|
|
<td><input class="refund" value="0" style="width: 30px;" name="refund[{$com['id']}][{$account['account']}][]"></td>
|
|
|
|
|
<td><input class="ratio" name="ratio[{$com['id']}][{$account['account']}][]" value="{$game['ratio']}" style="width: 20px;">%</td>
|
|
|
|
|
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][{$account['account']}][]" value="{$game['increment_ratio']}" style="width: 20px;">%</td>
|
|
|
|
|
<td><span>{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][{$account['account']}][]" value="{$game['sum_money']}" style="width: 20px;display: none"></td>
|
|
|
|
|
<td><input class="refund" value="0" style="width: 40px;" name="refund[{$com['id']}][{$account['account']}][]"></td>
|
|
|
|
|
<td><input class="ratio" name="ratio[{$com['id']}][{$account['account']}][]" value="{$game['ratio']}" style="width: 25px;">%</td>
|
|
|
|
|
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][{$account['account']}][]" value="{$game['increment_ratio']}" style="width: 25px;">%</td>
|
|
|
|
|
<td><span class="sum_money_span">{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][{$account['account']}][]" value="{$game['sum_money']}" style="width: 20px;display: none"></td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
</if>
|
|
|
|
@ -343,6 +343,56 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(".refund").on("blur",function () {
|
|
|
|
|
caculate_sum_money(this);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(".ratio").on("blur",function () {
|
|
|
|
|
caculate_sum_money(this);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(".increment_ratio").on("blur",function () {
|
|
|
|
|
caculate_sum_money(this);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function caculate_sum_money(_this) {
|
|
|
|
|
|
|
|
|
|
var pay_money = $(_this).parent().parent().find(".pay_amount").text();
|
|
|
|
|
|
|
|
|
|
var ratio = $(_this).parent().parent().find(".ratio").val();
|
|
|
|
|
|
|
|
|
|
if (!ratio || ratio < 0) {
|
|
|
|
|
ratio = 0;
|
|
|
|
|
$(_this).parent().parent().find(".ratio").val(ratio);
|
|
|
|
|
} else if (ratio > 100) {
|
|
|
|
|
ratio = 100;
|
|
|
|
|
$(_this).parent().parent().find(".ratio").val(ratio);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var refund = $(_this).parent().parent().find(".refund").val();
|
|
|
|
|
if (!refund || refund < 0) {
|
|
|
|
|
refund = 0;
|
|
|
|
|
$(_this).parent().parent().find(".refund").val(refund);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var increment_ratio = $(_this).parent().parent().find(".increment_ratio").val();
|
|
|
|
|
if (!increment_ratio || increment_ratio < 0) {
|
|
|
|
|
increment_ratio = 0;
|
|
|
|
|
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
|
|
|
|
|
} else if(increment_ratio > 100) {
|
|
|
|
|
increment_ratio = 100;
|
|
|
|
|
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</html>
|
|
|
|
|