Merge pull request 'hotfix/0323' (#238) from hotfix/0323 into release

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/238
master
张谷成 4 years ago
commit e7d65249b5

@ -129,6 +129,9 @@ return array(
"tab_reward_detail",
"tab_reward_record",
"tab_new_company_statement_info",
"tab_spend"
"tab_game",
"tab_spend",
"tab_promote",
"tab_promote_company",
]
);

@ -374,13 +374,16 @@ class CompanyStatementController extends ThinkController
if(is_array($dbres['statement_info'])) {
foreach ($dbres['statement_info'] as $key => $value) {
$dbres['pay_amount_other'] += $value['platform_money'];
if ($value['game_name'] == "罚款" || $value['game_name'] == "奖励") {
$dbres['statement_info'][$key]['pay_amount'] = "-";
}
$real_statement_amount
= number_format($value['platform_money']*(1-$value['promote_ratio']/100)*($value['ratio']/100)*(1-$value["fax_ratio"]/100),2,'.','');;
= number_format(($value['platform_money']+$value['aggregate_money'])*(1-$value['promote_ratio']/100)*($value['ratio']/100)*(1-$value["fax_ratio"]/100),2,'.','');
if (!$dbres['statement_info'][$key]['other_amount']) {
$dbres['statement_info'][$key]['other_amount'] = number_format($value["sum_money"] - $real_statement_amount,2,'.','');
}
@ -680,7 +683,7 @@ class CompanyStatementController extends ThinkController
$statement_info[$k]['sum_amount'] = $v["platform_money"] + $v["aggregate_money"] ;
$real_statement_amount
= number_format($v['platform_money']*(1-$v['promote_ratio']/100)*($v['ratio']/100)*(1-$v["fax_ratio"]/100),2,'.','');;
= number_format(($v['platform_money']+$value['aggregate_money'])*(1-$v['promote_ratio']/100)*($v['ratio']/100)*(1-$v["fax_ratio"]/100),2,'.','');
if (!$statement_info[$k]['other_amount']) {
$statement_info[$k]['other_amount'] = number_format($v["sum_money"] - $real_statement_amount,2,'.','');
}

@ -294,13 +294,12 @@ class FinancePromoteController extends AdminController
}
$map['s.pay_status']=1;
$map['s.is_check']=2;
D("Spend")->addSubsiteWhere($map,"s");
$field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as bind_coin_count,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) p_id,
IFNULL(company_id,0) company_id,company_name,develop_type,IFNULL(promote.company_belong,0) company_belong";
$query = M()
$query = SM()
->table("tab_spend s use index(promote_time)")
->field($field)
->where($map)
@ -379,13 +378,12 @@ class FinancePromoteController extends AdminController
}
$map['s.pay_status']=1;
// $map['s.is_check']=1;
D("Spend")->addSubsiteWhere($map,"s");
$field= "SUM(CASE WHEN pay_way > 0 and s.is_check=1 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 and s.is_check=1 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 and s.is_check=1 THEN pay_amount ELSE 0 END) as bind_coin_count,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) p_id,
IFNULL(company_id,0) company_id,company_name,develop_type,IFNULL(promote.company_belong,0) company_belong";
$query = M()
$query = SM()
->table("tab_spend s use index(promote_time)")
->field($field)
->where($map)
@ -610,13 +608,12 @@ class FinancePromoteController extends AdminController
}
$map['s.pay_status']=1;
$map['s.is_check']=1;
D("Spend")->addSubsiteWhere($map,"s");
// dd($map);
$field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as bind_coin_count,
IFNULL(company_id,0) company_id,company_name,promote_id,promote.account promote_account,develop_type,IFNULL(promote.company_belong,0) company_belong";
$query = M()
$query = SM()
->table("tab_spend s use index(promote_time)")
->field($field)
->where($map)
@ -895,9 +892,9 @@ class FinancePromoteController extends AdminController
$group = "";
$order = "pay_time DESC";
if(isset($_REQUEST['export'])){
$data = D('spend')->getSpendData($map,$field,$group,$order);
$data = D('spend')->getSubSpendData($map,$field,$group,$order);
}else {
$data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row);
$data = D('spend')->getSubSpendData($map,$field,$group,$order,$page,$row);
}
$marketAdmins = [];
@ -965,7 +962,7 @@ class FinancePromoteController extends AdminController
$this->assign('sumInside', $sumInside);
$this->assign('sumAll', null_to_0($sumAll));
$count = D("spend")->getSpendData($map,$field,$group,$order);
$count = D("spend")->getSubSpendData($map,$field,$group,$order);
$count = count($count);
$page = set_pagination($count,$row);
@ -996,7 +993,7 @@ class FinancePromoteController extends AdminController
$map['s.pay_status']=1;
$map['s.is_check']=1;
$query = M("spend","tab_")->alias("s")
$query = SM("spend","tab_")->alias("s")
->field("s.game_id,s.game_name,s.sdk_version,p.partner as partner_name,
SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
@ -1039,7 +1036,7 @@ class FinancePromoteController extends AdminController
$map['s.market_admin_id'] = $adminId;
}
$query = M("spend","tab_")->alias("s")
$query = SM("spend","tab_")->alias("s")
->field("SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count");
@ -1099,7 +1096,7 @@ class FinancePromoteController extends AdminController
$row = 10;
}
$map['pay_status'] = 1;
$map['is_check'] = 1;
$map['tab_spend.is_check'] = 1;
if (!empty(I('user_account'))) {
$map['tab_spend.user_account'] = array('like','%'.I("user_account").'%');
@ -1107,7 +1104,7 @@ class FinancePromoteController extends AdminController
if (!empty(I('user_nickname'))) {
$map['tab_spend.game_player_name'] = array('like',I("user_nickname").'%');
}
D("Spend")->addSubsiteWhere($map,"s");
D("Spend")->addSubsiteWhere($map,"tab_spend");
$field = "pay_order_number,FROM_UNIXTIME(payed_time) as pay_time,tab_spend.user_account,
tab_spend.user_nickname,tab_spend.game_name,tab_spend.promote_account,spend_ip,tab_spend.server_name,tab_spend.sdk_version,
game_player_name,pay_amount,cost,pay_way";

@ -29,13 +29,7 @@ class FinancialSummaryController extends AdminController
if(!IS_ROOT){
$this->OpAuthList= getModuleControllerAuth();
}
$this->assign('menubtn',$this->menuAuth());
$lastRecount = D("CmdTasks")->getTypeLastTask("FinancialSummary");
if(!$lastRecount){
$lastRecount = "无";
}
$this->assign('lastRecount',$lastRecount);
$this->assign('menubtn',$this->menuAuth());
$this->getYearList();
$this->getYearData();
$this->display();
@ -43,9 +37,10 @@ class FinancialSummaryController extends AdminController
}
public function updateStatement()
{
$temp = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'));
$params = "php ".SUBSITE_INDEX." FinancialSummarySet/setMonthFinancialSummary/recount/1/count_date/{$temp}";
if(!isset($_REQUEST['time'])) $this->error("参数错误");
$time = $_REQUEST['time'];
$params = "php ".SUBSITE_INDEX." FinancialSummarySet/setMonthFinancialSummary/recount/1/count_date/{$time}";
$r = D("CmdTasks")->addTask("FinancialSummary",$params);
if($r){
$this->ajaxReturn(["success"=>"ok"]);

@ -266,12 +266,13 @@ class FinancialSummarySetController extends \Think\Controller
*/
public function setPromoteMoney()
{
$SpendModel = SM("spend",'tab_');
$map = array(
"payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"pay_status"=>1,
);
D("Spend")->addSubsiteWhere($map,"s");
$res = $this->SpendModel
$res = $SpendModel
->alias('s')
->field("IFNULL(SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END),0) as cash_count,
IFNULL(SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END),0) as balance_coin_count,
@ -358,7 +359,7 @@ class FinancialSummarySetController extends \Think\Controller
$unmap = $map;
$unmap['is_check'] = 2;
$unSettlementRes = $this->SpendModel
$unSettlementRes = $SpendModel
->alias('s')
->field("IFNULL(SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END),0) as cash_count,
IFNULL(SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END),0) as balance_coin_count,

@ -466,7 +466,7 @@ ADD COLUMN `kefu_qq` varchar(255) NULL DEFAULT '' COMMENT 'kefu_qq_type为2 时
$otherData['flooring_page_video_cover'] = $sibling['flooring_page_video_cover'];
$otherData['kefu_qq'] = I('post.kefu_qq');
$otherData['kefu_qq_type'] = I('post.kefu_qq_type');
$otherData['data_share'] = I('post.data.share');
$otherData['data_share'] = I('post.data_share');
M('Game', 'tab_')->data($otherData)->where(array('id' => $another['id']))->save();
//同时修改代充游戏折扣

@ -255,7 +255,6 @@ class PlatformController extends ThinkController
"pay_time"=>["between",$yearMap],
"pay_status"=>1
];
D("Spend")->addSubsiteWhere($map);
$Payamount = SM("Spend","tab_")->field("sum(IF(is_check=1,pay_amount,0)) pay_amount,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_amount,FROM_UNIXTIME(`pay_time`, '%Y-%m') paytime")->where($map)->group("paytime")->select();
if(empty($Payamount)) return ;
foreach ($Payamount as $v) {
@ -1174,7 +1173,7 @@ class PlatformController extends ThinkController
}
D("Spend")->addSubsiteWhere($map,"s");
$data = M('promote', 'tab_')->alias('tp1')
$data = SM('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,g.relation_game_id,g.relation_game_name,
floor(sum(IF(is_check=1,pay_amount,0))*100) as count,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_count')
->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left')
@ -1190,7 +1189,7 @@ class PlatformController extends ThinkController
if(isset($map['pay_time'])){
$tmap['pay_time'] = ['between', array($tmin,$tmonth[1][1])];
}
$tdata = M('promote', 'tab_')->alias('tp1')
$tdata = SM('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,g.relation_game_id,g.relation_game_name,
floor(sum(IF(s.pay_time ' . $today . ' and is_check=1,pay_amount,0))*100) as today,
floor(sum(IF(s.pay_time ' . $week . ' and is_check=1,pay_amount,0))*100) as week,
@ -1248,11 +1247,11 @@ class PlatformController extends ThinkController
$user_auth_promote_ids = session('user_auth_promote_ids');
if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) {
//官方渠道数据添加
$authorityData = M('spend', 'tab_')->alias('s')
$authorityData = SM('spend', 'tab_')->alias('s')
->field('floor(sum(IF(is_check=1,pay_amount,0))*100) as count,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_count')
->where($map)
->find();
$tauthorityData = M('spend', 'tab_')->alias('s')
$tauthorityData = SM('spend', 'tab_')->alias('s')
->field('
floor(sum(IF(s.pay_time ' . $today . ' and is_check=1,pay_amount,0))*100) as today,
floor(sum(IF(s.pay_time ' . $week . ' and is_check=1,pay_amount,0))*100) as week,

@ -0,0 +1,73 @@
<?php
namespace Admin\Controller;
use Think\Controller;
/**
* 子站同步表
* @example 按日期同步: php wm.php SubSpendSet/setSubSpend/time/2019-09-31
* @example 重算更新: php wm.php SubSpendSet/recountSubSpend/begin/2019-01-01/end/2019-09-31
* @author cz
*/
class SubSynTableController extends Controller
{
const CHECK_SUM_SQL = "checksum table ";
const TRUNCATE_SQL = "truncate table ";
const LIMIT = 100;
public $SubSynTableModel;
public function _initialize()
{
if(!IS_SUBSITE) die("仅能在子站脚本下运行");
$this->SubSynTableModel = M("syn_table","sub_",SUBSITE_DB);//指定子库
}
public function run(){
$synList = $this->SubSynTableModel->field("id,table_name,table_prefix,check_sum")->select();
foreach ($synList as $k => $v) {
$this->doSyn($v);
}
}
public function synOneTable($table_prefix,$tab_name)
{
$synInfo = $this->SubSynTableModel->where("table_name = '{$tab_name}' and table_prefix = '{$table_prefix}'")->field("id,table_name,table_prefix,check_sum")->find();
$this->doSyn($synInfo);
}
protected function doSyn($dbarr)
{
//获取最新check_sum
$table_prefix = $dbarr['table_prefix'];
$table_name = $dbarr['table_name'];
$res = M()->query(self::CHECK_SUM_SQL.$table_prefix.$table_name);
$now = time();
$check_sum = $res[0]['checksum'];
if($check_sum !== $dbarr['check_sum']){
$this->clearTable($table_prefix,$table_name);
$this->synTable($table_prefix,$table_name);
$dbarr['syn_time'] = $now;
$dbarr['check_sum'] = $check_sum;
}
$dbarr['update_time'] = $now;
$this->SubSynTableModel->save($dbarr);
echo $table_prefix.$table_name." success".PHP_EOL;
}
protected function clearTable($table_prefix,$table_name)
{
return SM()->query(self::TRUNCATE_SQL.$table_prefix.$table_name);
}
protected function synTable($table_prefix,$table_name)
{
$count = M($table_name,$table_prefix)->count();
if(empty($count)) return true;
$pageCount = ceil($count/self::LIMIT);
for ($i=1; $i <= $pageCount; $i++) {
$tres = M($table_name,$table_prefix)->page($i,self::LIMIT)->select();
$addRes = M($table_name,$table_prefix,SUBSITE_DB)->addAll($tres);
echo "[{$i}/{$pageCount}] {$addRes}".PHP_EOL;
}
return true;
}
}

@ -843,6 +843,19 @@ class SpendModel extends Model
}
return $data;
}
public function getSubSpendData($map = [], $field = '', $group = '', $order = '', $page = 0, $row = 0, $join = false)
{
$query = SM('spend',"tab_")->field($field)->where($map)->group($group)->order($order);
if ($join) {
$query = $query->join($join);
}
if ($row == 0) {
$data = $query->select();
} else {
$data = $query->page($page, $row)->select();
}
return $data;
}
public function sumSpend($map = [], $field = '')
{
@ -850,6 +863,12 @@ class SpendModel extends Model
return $sum;
}
public function sumSubSpend($map = [], $field = '')
{
$sum = SM('spend',"tab_")->where($map)->sum($field);
return $sum;
}
private function getGameMapByGameStatMap($map)
{

@ -210,12 +210,12 @@
<th rowspan="2" style="border-right: solid 1px #b6cad2;">渠道费率</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">税费费率</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">其他</th>
<th>结算金额</th>
</tr>
<tr>
<th style="font-size: 10px;font-weight: 400;max-width: 100px;line-height: 1.2;">
结算金额=平台总额*1-渠道费)*分成比例*(1-税费费率)</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">结算金额</th>
</tr>
<!-- <tr>-->
<!-- <th style="font-size: 10px;font-weight: 400;max-width: 100px;line-height: 1.2;">-->
<!-- 结算金额=平台总额*1-渠道费)*分成比例*(1-税费费率)</th>-->
<!-- </tr>-->
</thead>
<!-- 列表 -->
@ -373,11 +373,11 @@
<td>${it.statement_begin_time}~${it.statement_end_time}</td>
<td>${it.game_name}</td>
{@if it.statement_type==1}
<td>-${it.pay_amount}元</td>
<td>-${it.platform_money}元</td>
{@else}
<td>${it.pay_amount}元</td>
<td>${it.platform_money}元</td>
{@/if}
<td>${it.aggregate_money}</td>
<td>${it.aggregate_money}</td>
{@if it.statement_type==0}
<td><input type="text" class="txt statementchange" name="ratio" data-index ="${index}" data-change="statement_info[${index}]['ratio']" value="${it.ratio}" style="width: 40px;">%</td>
@ -404,7 +404,7 @@
<tr>
<td>合计</td>
<td></td>
<td>${pay_amount}元</td>
<td>${pay_amount_other}元</td>
<td></td>
<td></td>
<td></td>

@ -85,7 +85,7 @@
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">公会统计</h3>
<p class="description_text">说明:公会相关统计</p>
<p class="description_text">说明:公会相关统计<if condition="IS_SUBSITE">/ <span style="color: red;">支付信息仅统计已固定的订单数据</span></if></p>
<div class="question" style="float: right;margin-right: 20px;">
<i class="question_mark">?</i>
<ul class="question_content" style="right: -20px;left: auto;">
@ -241,7 +241,9 @@
<th class="tooltip">渠道游戏内充值合计 <span class="tooltiptext">游戏现金金额(游戏现金流水+平台币支出+公会内充支出=总流水)</span>
<th class="tooltip">渠道游戏内不结算充值合计 <span class="tooltiptext">游戏现金金额(游戏不结算现金流水)</span>
</th>
<th>操作</th>
<if condition="!IS_SUBSITE">
<th>操作</th>
</if>
</tr>
</thead>
<!-- 列表 -->
@ -257,21 +259,33 @@
<td>{$data['company_belong']}</td>
<td>{$data['develop_type_text']}</td>
<td>{$data.cash_count}</td>
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
{$data.balance_coin_count}
</td>
<td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>-1,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
{$data.bind_coin_count}
</td>
<td class="coin-detail" data-pay_type="-2" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/insideCoinDetail',array_merge(I('get.'),['promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
{$data.inside_cash_count}
</td>
<if condition="!IS_SUBSITE">
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
{$data.balance_coin_count}
</td>
<td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>-1,'promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
{$data.bind_coin_count}
</td>
<td class="coin-detail" data-pay_type="-2" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/insideCoinDetail',array_merge(I('get.'),['promote_type'=>1,'promote_id'=>$data['p_id'],p=>1,row=>10]))}">
{$data.inside_cash_count}
</td>
<else />
<td>
{$data.balance_coin_count}
</td>
<td>
{$data.bind_coin_count}
</td>
<td>
{$data.inside_cash_count}
</td>
</if>
<!-- <td><span class='ljzc'
data-value="{$data['id']}"><a>{$data.inside_cash_count}</a></span></td> -->
<td>{$data.allcount}</td>
<td style="color: red;">{$data.unallcount}</td>
<if condition="!IS_SUBSITE">
<td>
<a
href="{:U('FinancePromote/gameStatistics',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id'],'promote_type'=>1],I('get.'),['p'=>1]))}">游戏查看</a>
@ -284,6 +298,7 @@
<a href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.'),['p'=>1]))}">渠道查看</a>
</if> -->
</td>
</if>
</tr>
</volist>
</empty>
@ -295,11 +310,13 @@
<td style="text-align: center;">{$all_count['inside_cash_count']}</td>
<td style="text-align: center;">{$all_count['all_count']}</td>
<td style="text-align: center;color: red;">{$all_count['unallcount']}</td>
<td style="text-align: center;">
<a
href="{:U('FinancePromote/gameStatistics',array_merge(I('get.'),['promote_type'=>1,'p'=>1]))}">游戏查看</a>
<a href="{:U('FinancePromote/promoteUser',array_merge(I('get.'),['p'=>1]))}">渠道查看</a>
</td>
<if condition="!IS_SUBSITE">
<td style="text-align: center;">
<a
href="{:U('FinancePromote/gameStatistics',array_merge(I('get.'),['promote_type'=>1,'p'=>1]))}">游戏查看</a>
<a href="{:U('FinancePromote/promoteUser',array_merge(I('get.'),['p'=>1]))}">渠道查看</a>
</td>
</if>
</tr>
<tr class="data_summary">
<td style="text-align: center;">内外团占比:</td>

@ -225,6 +225,24 @@
</table>
<div style="width: 100%;height: 50px;"></div>
</div>
<script type="text/html" id="updateStatementTpl">
<div style="padding:10px 40px 30px;">
<spend style="font-size:14px;color:#666;">
按月份对汇总数据进行重算任务提交成功后大约需等待3-5分钟才会完成重算
</spend>
<table border="0" cellspacing="0" cellpadding="0" style="margin-top:30px;">
<tr>
<td class="l noticeinfo" style="width:80px;">重算月份:</td>
<td class="r table_radio">
<input type="text" id="updateStatementTime" name="updateStatementTime" autocomplete="off" class="date" placeholder="重算月份" />
</td>
</tr>
</table>
<button class="submit_btn mlspacing" id="updateStatementSubmit" type="submit" style="margin-top:30px;">
保存
</button>
</div>
</script>
</block>
@ -285,26 +303,70 @@
window.location.href = url;
});
$("#updateStatement").on("click",function(){
layer.confirm("重算需要花费2分钟左右时间,并且只统计上个月信息,无需重算请取消,上次重算时间【{$lastRecount}】",{title:false}, function(index){
$.ajax({
type: 'post',
url: "{:U('updateStatement')}",
data:{},
success: function(data) {
if(data.success){
layer.alert('添加重算任务成功请2分钟后刷新查看',function(){
window.location.reload();
});
}else{
layer.alert('添加任务失败,已有重算任务。请等待上个重算任务完成');
var html = $("#updateStatementTpl").html();
layer.open({
type: 1,
title: "汇总重算",
maxWidth:720,
closeBtn: 1,
shadeClose: true,
content: html,
success:function(){
$("#updateStatementSubmit").off("click");
$("#updateStatementTime").datetimepicker({
format: 'yyyy-mm',
language: "zh-CN",
showMeridian:true,
pickDate:true,
startView: 3,
minView: 3,
autoclose: true,
pickTime:true
});
$("#updateStatementSubmit").on("click",function() {
var subtime= $("#updateStatementTime").val();
if(subtime == ''){
layer.msg('请先选择要重算的月份');
return false;
}
},
error:function(){
layer.alert("网络错误或超时");
return false;
}
});
});
var subtimeArr = subtime.split("-");
var today = new Date();
today.setTime(today.getTime());
var year = today.getFullYear();
var month = today.getMonth()+1;
if(subtimeArr[0] > year){
layer.msg('要重算的月份必须小于当前时间');
return false;
}
if(subtimeArr[0] == year && subtimeArr[1] >= month){
layer.msg('要重算的月份必须小于当前时间');
return false;
}
$.ajax({
type: 'post',
url: "{:U('updateStatement')}",
data:{time:subtime},
success: function(data) {
if(data.success){
layer.alert('添加重算任务成功请2分钟后刷新查看',function(){
window.location.reload();
});
}else{
layer.alert('添加任务失败,已有重算任务。请等待上个重算任务完成');
}
},
error:function(){
layer.alert("网络错误或超时");
return false;
}
});
});
}
});
})
//回车自动提交

@ -36,7 +36,7 @@
</div>
<h3 class="page_title">推广员充值统计</h3>
<p class="description_text">说明:针对所有推广员下的充值金额,进行充值排行统计:游戏、平台币、绑币的现金充值总额</p>
<p class="description_text">说明:针对所有推广员下的充值金额,进行充值排行统计:游戏、平台币、绑币的现金充值总额<if condition="IS_SUBSITE">/ <span style="color: red;">支付信息仅统计已固定的订单数据</span></if></p>
</div>
<div class="cf top_nav_list">

@ -307,9 +307,9 @@ class HomeController extends Controller
$ssgUrl = $downloadDomain . '/mobile.php/Ssg/pay/game_id/' . $game['id'] . '/promote_id/' . $promoteId;
/* if(in_array($game['id'], [187, 188])) {
$game['relation_game_name'] = '游戏下载';
} */
if(in_array($game['id'], [191, 192])) {
$game['relation_game_name'] = '九灵神域';
}
$this->assign("serviceQQ", $serviceQQ);
$this->assign('isNewIos', $isNewIos);

Loading…
Cancel
Save