Merge branch 'hotfix/promote_sum' of wmtx/platform into release

修改
master
廖金灵 4 years ago committed by Gogs
commit 91b04f5974

@ -1710,6 +1710,8 @@ class CompanyStatementPoolController extends ThinkController
$lreward = 0;
$lfine = 0;
$handledata = [];
foreach ($increment_ratio as $key => $value) {
@ -1718,8 +1720,22 @@ class CompanyStatementPoolController extends ThinkController
if ($st[$key][$akey] == 1) {
$model = M("company_statement_info","tab_");
if (!$handledata[$key][1]) {
$handledata[$key][1] = 1;
} else {
continue;
}
} else {
$model = M("company_lack_statement_info","tab_");
if (!$handledata[$key][0]) {
$handledata[$key][0] = 1;
} else {
continue;
}
}
$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]);
$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>
<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>
<td rowspan="{$com.row}">{$com['reward']}</td>
<td rowspan="{$com.row}">{$com['fine']}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['reward']}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['fine']}</td>
<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="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="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><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>-->
</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="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><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']">
<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']}]">
@ -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="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><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>-->
</tr>
@ -545,12 +561,16 @@
for (var i =0;i<parseInt(row);i++) {
var amount = get_item.find(".week_amount").text();
if (amount) {
sum_amount = parseFloat(sum_amount) + parseFloat(amount);
get_item = get_item.next();
} else {
get_item = get_item.next();
}
}
// week_amount_find.find(".week_amount").text();
_parent.find(".statement_money").text(sum_amount.toFixed(2));

@ -1247,9 +1247,10 @@ class PromoteService {
$map = [];
$map['_string'] = ' promote_id in(' . $this->subInSql($topPromote) . ')';
$map = $spendRepository->withIsCheck($map);
$historyGameIds = M('spend', 'tab_')->field(['distinct game_id'])->where($map)->getField('game_id', true);
if (!$historyGameIds) {
$historyGameIds = [];
$historyGames = M('spend', 'tab_')->field(['distinct game_id'])->where($map)->select();
$historyGameIds = [];
if ($historyGames) {
$historyGameIds = array_column($historyGames, 'game_id');
}
$nowGameIds = $topPromote['game_ids'] == '' ? [] : explode(',', $topPromote['game_ids']);
return array_unique(array_merge($historyGameIds, $nowGameIds));

@ -1298,9 +1298,9 @@ class QueryController extends BaseController
$parameter['own_id'] = $ownId;
$parameter['p'] = $page;
$parameter['row'] = $row;
$loginPromote = $this->getLoginPromote();
$map = [];
$map = ['_string' => '1=1'];
if ($ownId) {
@ -1323,7 +1323,7 @@ class QueryController extends BaseController
$params['begin_time'] = $begTime;
$params['end_time'] = $endTime - 1;
$promoteService = new PromoteService();
$allGameIs = $promoteService->getHistoryGameIds($loginPromote);
if ($allGameIs && count($allGameIs) > 0) {
@ -1334,7 +1334,6 @@ class QueryController extends BaseController
$data = M('game', 'tab_')->where($map)->order('sort desc,id desc')->page($page, $row)->select();
$count = M('game', 'tab_')->where($map)->count();
$records = [];
$allData = [];
if (!empty($data)) {

Loading…
Cancel
Save