聚合公司汇总编辑功能添加

master
zhengyongxing 4 years ago
parent 868889fe54
commit 31568dd37c

@ -1105,16 +1105,30 @@ class CompanyStatementPoolController extends ThinkController
foreach ($ratio as $key => $value) {
M("company_statement_info","tab_")->where(['id'=>$key])->find();
foreach ($value as $k => $v) {
$statement_data = M("company_statement_info","tab_")->where(['id'=>$key])->find();
$statement_info = json_decode($statement_data['statement_info'],true);
foreach ($statement_info as $k => $v) {
$game_list = $v['game_list'];
foreach ($game_list as $gk => $gv) {
$statement_info[$k]['game_list'][$gk]['ratio'] = $ratio[$key][$v['account']][$k];
$statement_info[$k]['game_list'][$gk]['refund'] = $refund[$key][$v['account']][$k];
$statement_info[$k]['game_list'][$gk]['increment_ratio'] = $increment_ratio[$key][$v['account']][$k];
$statement_info[$k]['game_list'][$gk]['sum_money'] = $sum_money[$key][$v['account']][$k];
}
}
}
$statement_info = json_encode($statement_info);
dump($data);
// M("company_statement_info","tab_")->where(['id'=>$key])->save(['statement_info'=>$statement_info]);
}
}

@ -160,11 +160,11 @@
<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><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>
<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>
<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>
<td rowspan="{$com.row}">{$com['statement_money']}</td>
@ -216,10 +216,10 @@
<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><span>{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][]" value="{$game['sum_money']}" style="width: 20px;display: none"></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>
</tr>
</if>
@ -241,10 +241,10 @@
<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>
<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>
<else />
<td>-</td>
@ -267,10 +267,10 @@
<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>
<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>
</tr>
</if>

Loading…
Cancel
Save