汇总编辑功能提交

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,174 +135,182 @@
</tr>
</thead>
<tbody id="statementShow">
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.row}">{$key-0+1}</td>
<td rowspan="{$com.row}">{$com.company_name}</td>
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.account}</td> -->
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.row}">{$key-0+1}</td>
<td rowspan="{$com.row}">{$com.company_name}</td>
<notempty name="com['statement_info']">
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['account']}</td>
<else />
<td>-</td>
</notempty>
<td rowspan="{$com.row}">{$com.company_info.company_belong_str}</td>
<td rowspan="{$com.row}">{$com.company_info.company_relation_str}</td>
<td rowspan="{$com.row}">{$com.company_info.nickname}</td>
<td rowspan="{$com.row}">{$com.company_info.company_type_str}</td>
<notempty name="com['statement_info'][0]['game_list']">
<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']}][]"></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 rowspan="{$com.row}">{$com['reward']}</td>
<td rowspan="{$com.row}">{$com['fine']}</td>
<td rowspan="{$com.row}">{$com['statement_money']}</td>
<else />
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td rowspan="{$com.row}">-</td>
<td rowspan="{$com.row}">-</td>
<td rowspan="{$com.row}">-</td>
</notempty>
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.account}</td> -->
<if condition="$com['is_payment'] eq 2">
<td rowspan="{$com.row}">{$com.company_info.payee_name}</td>
<td rowspan="{$com.row}">&nbsp;{$com.company_info.bank_account}</td>
<td rowspan="{$com.row}">{$com.company_info.opening_bank}</td>
</if>
<notempty name="com['statement_info']">
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['account']}</td>
<else />
<td>-</td>
</notempty>
<if condition="$com['is_payment'] eq 1">
<td rowspan="{$com.row}">{$com.company_info.ali_user}</td>
<td rowspan="{$com.row}">{$com.company_info.ali_account}</td>
<td rowspan="{$com.row}"></td>
</if>
<td rowspan="{$com.row}"><if condition="$com['is_payment'] eq 1"><else /></if></td>
<td rowspan="{$com.row}"><if condition="$com['st'] eq 0"><else /></if></td>
<td rowspan="{$com.row}">{$com.remark}</td>
<td rowspan="{$com.row}">{$com.company_info.company_belong_str}</td>
<td rowspan="{$com.row}">{$com.company_info.company_relation_str}</td>
<if condition="!$is_export">
<td rowspan="{$com.row}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
</td>
</if>
<td rowspan="{$com.row}">{$com.company_info.nickname}</td>
<td rowspan="{$com.row}">{$com.company_info.company_type_str}</td>
</tr>
<notempty name="com['statement_info'][0]['game_list']">
<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']}][]"></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>
<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>
<if condition="$com['statement_info'][0]['row'] gt 1">
<foreach name="com['statement_info'][0]['game_list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<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']}][]"></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">
</tr>
<else />
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td rowspan="{$com.row}">-</td>
<td rowspan="{$com.row}">-</td>
<td rowspan="{$com.row}">-</td>
</notempty>
<if condition="$com['is_payment'] eq 2">
<td rowspan="{$com.row}">{$com.company_info.payee_name}</td>
<td rowspan="{$com.row}">&nbsp;{$com.company_info.bank_account}</td>
<td rowspan="{$com.row}">{$com.company_info.opening_bank}</td>
</if>
</foreach>
</if>
<if condition="$com['is_payment'] eq 1">
<td rowspan="{$com.row}">{$com.company_info.ali_user}</td>
<td rowspan="{$com.row}">{$com.company_info.ali_account}</td>
<td rowspan="{$com.row}"></td>
</if>
<td rowspan="{$com.row}"><if condition="$com['is_payment'] eq 1"><else /></if></td>
<td rowspan="{$com.row}"><if condition="$com['st'] eq 0"><else /></if></td>
<td rowspan="{$com.row}">{$com.remark}</td>
<if condition="!$is_export">
<td rowspan="{$com.row}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
</td>
</if>
<notempty name="com['statement_info'][1]">
<foreach name="com['statement_info']" item="account" key="akey">
<if condition="$akey gt 0">
<tr>
<td rowspan="{$account['row']}">{$account['account']}</td>
<notempty name="account['game_list']">
<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>{$account['game_list'][0]['ratio']|showNumPercent}</td>-->
<!-- <td>{$account['game_list'][0]['increment_ratio']|showNumPercent}</td>-->
</tr>
<if condition="$com['statement_info'][0]['row'] gt 1">
<foreach name="com['statement_info'][0]['game_list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<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']}][]"></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">
<else />
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</notempty>
</tr>
<if condition="$account['row'] gt 1">
<foreach name="account['game_list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<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>{$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">
</tr>
</if>
</foreach>
<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><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>
</if>
</if>
</foreach>
</notempty>
</foreach>
<tr>
<td colspan=10 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.sum_money}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<if condition="!$is_export">
<notempty name="com['statement_info'][1]">
<foreach name="com['statement_info']" item="account" key="akey">
<if condition="$akey gt 0">
<tr>
<td rowspan="{$account['row']}">{$account['account']}</td>
<notempty name="account['game_list']">
<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>{$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><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>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</notempty>
</tr>
<if condition="$account['row'] gt 1">
<foreach name="account['game_list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<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>{$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><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>
</if>
</if>
</foreach>
</notempty>
</foreach>
<tr>
<td colspan=10 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
</if>
</tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.sum_money}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<if condition="!$is_export">
<td></td>
</if>
</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