汇总编辑功能提交

master
zhengyongxing 4 years ago
parent 58bd48997f
commit 868889fe54

@ -1094,4 +1094,28 @@ class CompanyStatementPoolController extends ThinkController
return $resarr;
}
public function editCompanyStatementPool() {
$data = $_POST;
$ratio = $data['ratio'];
$refund = $data['refund'];
$increment_ratio = $data['increment_ratio'];
$sum_money = $data['sum_money'];
foreach ($ratio as $key => $value) {
M("company_statement_info","tab_")->where(['id'=>$key])->find();
foreach ($value as $k => $v) {
}
}
dump($data);
}
}

@ -95,6 +95,7 @@
<div class="data_list box_mt" style="margin-top: 10px;">
<div class="">
<form id="form" action="{:U('editCompanyStatementPool')}" method="post" class="form-horizontal">
<table id="exporttable">
<!-- 表头 -->
<thead>
@ -134,6 +135,7 @@
</tr>
</thead>
<tbody id="statementShow">
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.row}">{$key-0+1}</td>
@ -161,8 +163,8 @@
<td><input class="refund" value="0" style="width: 30px;" name="refund[{$com['id']}][]"></td>
<td><input class="ratio" name="ratio[{$com['id']}][]" value="{$com['statement_info'][0]['game_list'][0]['ratio']}" style="width: 20px;">%</td>
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][]" value="{$com['statement_info'][0]['game_list'][0]['increment_ratio']}" style="width: 20px;">%</td>
<input class="sum_money" name="sum_money[{$com['id']}][]" value="{$com['statement_info'][0]['game_list'][0]['sum_money']}" style="width: 20px;display: none">
<td>{$com['statement_info'][0]['game_list'][0]['sum_money']}</td>
<td><span>{$com['statement_info'][0]['game_list'][0]['sum_money']}</span>
<input class="sum_money" name="sum_money[{$com['id']}][]" 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>
<td rowspan="{$com.row}">{$com['statement_money']}</td>
@ -217,8 +219,8 @@
<td><input class="refund" value="0" style="width: 30px;" name="refund[{$com['id']}][]"></td>
<td><input class="ratio" name="ratio[{$com['id']}][]" value="{$game['ratio']}" style="width: 20px;">%</td>
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][]" value="{$game['increment_ratio']}" style="width: 20px;">%</td>
<td>{$game['sum_money']}</td>
<input class="sum_money" name="sum_money[{$com['id']}][]" value="{$game['sum_money']}" style="width: 20px;display: none">
<td><span>{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][]" value="{$game['sum_money']}" style="width: 20px;display: none"></td>
</tr>
</if>
</foreach>
@ -237,13 +239,13 @@
<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>{$account['game_list'][0]['ratio']|showNumPercent}</td>-->
<!-- <td>{$account['game_list'][0]['increment_ratio']|showNumPercent}</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']}][]"></td>
<td><input class="ratio" name="ratio[{$com['id']}][]" value="{$account['game_list'][0]['ratio']}" style="width: 20px;">%</td>
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][]" value="{$account['game_list'][0]['increment_ratio']}" style="width: 20px;">%</td>
<td>{$account['game_list'][0]['sum_money']}</td>
<input class="sum_money" name="sum_money[{$com['id']}][]" value="{$account['game_list'][0]['sum_money']}" style="width: 20px;display: none">
<td><span>{$account['game_list'][0]['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][]" value="{$account['game_list'][0]['sum_money']}" style="width: 20px;display: none"></td>
<else />
<td>-</td>
<td>-</td>
@ -263,13 +265,13 @@
<td>{$game['game_type_name']}</td>
<td>{$game['statement_begin_time']}-{$game['statement_end_time']}</td>
<td>{$game['pay_amount']}</td>
<!-- <td>{$game['ratio']|showNumPercent}</td>-->
<!-- <td>{$game['increment_ratio']|showNumPercent}</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']}][]"></td>
<td><input class="ratio" name="ratio[{$com['id']}][]" value="{$game['ratio']}" style="width: 20px;">%</td>
<td><input class="increment_ratio" name="increment_ratio[{$com['id']}][]" value="{$game['increment_ratio']}" style="width: 20px;">%</td>
<td>{$game['sum_money']}</td>
<input class="sum_money" name="sum_money[{$com['id']}][]" value="{$game['sum_money']}" style="width: 20px;display: none">
<td><span>{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][]" value="{$game['sum_money']}" style="width: 20px;display: none"></td>
</tr>
</if>
</foreach>
@ -302,6 +304,13 @@
</tr>
</tbody>
</table>
<div class="form-item cf" style="float: right;margin-top: 30px;margin-right: 30px;">
<input type="hidden" name="id" value="{$_GET['id']}">
<button class="submit_btn ajax-post" id="submit" type="submit" target-form="form-horizontal" style="margin-left:210px;">
保存
</button>
</div>
</form>
</div>
</div>
</body>

Loading…
Cancel
Save