Merge branch 'feature/add_item' of wmtx/platform into master

编辑页面调整,及多个编辑错误修正
master
廖金灵 4 years ago committed by Gogs
commit 9483e4b7b3

@ -1710,6 +1710,8 @@ class CompanyStatementPoolController extends ThinkController
$lreward = 0; $lreward = 0;
$lfine = 0; $lfine = 0;
$handledata = [];
foreach ($increment_ratio as $key => $value) { foreach ($increment_ratio as $key => $value) {
@ -1718,8 +1720,22 @@ class CompanyStatementPoolController extends ThinkController
if ($st[$key][$akey] == 1) { if ($st[$key][$akey] == 1) {
$model = M("company_statement_info","tab_"); $model = M("company_statement_info","tab_");
if (!$handledata[$key][1]) {
$handledata[$key][1] = 1;
} else {
continue;
}
} else { } else {
$model = M("company_lack_statement_info","tab_"); $model = M("company_lack_statement_info","tab_");
if (!$handledata[$key][0]) {
$handledata[$key][0] = 1;
} else {
continue;
}
} }
$statement_data = $model->where(['id'=>$key])->find(); $statement_data = $model->where(['id'=>$key])->find();
@ -1776,7 +1792,7 @@ class CompanyStatementPoolController extends ThinkController
} }
//die();
M("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount+$reward-$fine,'lack_statement_money'=>$statement_lack_amount+$lreward-$lfine]); M("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount+$reward-$fine,'lack_statement_money'=>$statement_lack_amount+$lreward-$lfine]);
$this->ajaxReturn(['status'=>1,'info'=>'保存成功']); $this->ajaxReturn(['status'=>1,'info'=>'保存成功']);

@ -172,8 +172,8 @@
<td><span class="sum_money_span">{$com['statement_info'][0]['game_list'][0]['sum_money']}</span> <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"> <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">
<input class="st" name="st[{$com['id']}][{$com['statement_info'][0]['account']}]" value="{$com['st']}" style="width: 20px;display: none"></td> <input class="st" name="st[{$com['id']}][{$com['statement_info'][0]['account']}]" value="{$com['st']}" style="width: 20px;display: none"></td>
<td rowspan="{$com.row}">{$com['reward']}</td> <td rowspan="{$com['statement_info'][0]['time_row']}">{$com['reward']}</td>
<td rowspan="{$com.row}">{$com['fine']}</td> <td rowspan="{$com['statement_info'][0]['time_row']}">{$com['fine']}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}"> <td rowspan="{$com['statement_info'][0]['time_row']}">
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold_amount']|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="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold_amount']|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]['withhold_amount']|default=0}" style="width: 40px;display: none" > <input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold_amount']|default=0}" style="width: 40px;display: none" >
@ -232,7 +232,10 @@
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['account']}][]"></td> <td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['account']}][]"></td>
<td><input class="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="ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['ratio']}" style="width: 25px;">%</td> <td><input class="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="ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['ratio']}" style="width: 25px;">%</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="{$game['increment_ratio']}" style="width: 25px;">%</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="{$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> <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">
<input class="st" name="st[{$com['id']}][{$com['statement_info'][0]['account']}]" value="{$com['st']}" style="width: 20px;display: none"></td>
</td>
<!-- <td><input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$com['statement_info'][0]['account']}][]"></td>--> <!-- <td><input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$com['statement_info'][0]['account']}][]"></td>-->
</tr> </tr>
@ -262,7 +265,17 @@
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$account['game_list'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$account['account']}][]"></td> <td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$account['game_list'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$account['account']}][]"></td>
<td><input class="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="ratio[{$com['id']}][{$account['account']}][]" value="{$account['game_list'][0]['ratio']}" style="width: 25px;">%</td> <td><input class="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="ratio[{$com['id']}][{$account['account']}][]" value="{$account['game_list'][0]['ratio']}" style="width: 25px;">%</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']}][{$account['account']}][]" value="{$account['game_list'][0]['increment_ratio']}" style="width: 25px;">%</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']}][{$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> <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">
<input class="st" name="st[{$com['id']}][{$account['account']}]" value="{$com['st']}" style="width: 20px;display: none"></td>
</td>
<notempty name="account['time']">
<td rowspan="{$account['time_row']}">{$account['reward']|default=0}</td>
<td rowspan="{$account['time_row']}">{$account['fine']|default=0}</td>
</notempty>
<notempty name="account['time']"> <notempty name="account['time']">
<td rowspan="{$account['time_row']}"> <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="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']}]">
@ -297,7 +310,10 @@
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$account['account']}][]"></td> <td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$account['account']}][]"></td>
<td><input class="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="ratio[{$com['id']}][{$account['account']}][]" value="{$game['ratio']}" style="width: 25px;">%</td> <td><input class="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="ratio[{$com['id']}][{$account['account']}][]" value="{$game['ratio']}" style="width: 25px;">%</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']}][{$account['account']}][]" value="{$game['increment_ratio']}" style="width: 25px;">%</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']}][{$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> <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">
<input class="st" name="st[{$com['id']}][{$account['account']}]" value="{$com['st']}" style="width: 20px;display: none"></td>
</td>
<!-- <td><input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$account['account']}][]"></td>--> <!-- <td><input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$account['account']}][]"></td>-->
</tr> </tr>
@ -545,12 +561,16 @@
for (var i =0;i<parseInt(row);i++) { for (var i =0;i<parseInt(row);i++) {
var amount = get_item.find(".week_amount").text(); var amount = get_item.find(".week_amount").text();
if (amount) { if (amount) {
sum_amount = parseFloat(sum_amount) + parseFloat(amount); sum_amount = parseFloat(sum_amount) + parseFloat(amount);
get_item = get_item.next(); get_item = get_item.next();
} else {
get_item = get_item.next();
} }
} }
// week_amount_find.find(".week_amount").text(); // week_amount_find.find(".week_amount").text();
_parent.find(".statement_money").text(sum_amount.toFixed(2)); _parent.find(".statement_money").text(sum_amount.toFixed(2));

Loading…
Cancel
Save