新增打款结算列表

master
chenzhi 4 years ago
parent 6929f53e6e
commit 29a502d0f5

@ -0,0 +1,601 @@
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2016/12/19
* Time: 13:38
*/
namespace Payment\Controller;
use Admin\Model\PromoteModel;
class AjaxController extends BaseController{
/**
* 获取配置项
* @param $category
*/
public function getConfigCategory($category){
switch ($category){
case 1:$result = C('PC_CONFIG_GROUP_LIST');break;
case 2:$result = C('CHANNEL_CONFIG_GROUP_LIST');break;
case 3:$result = C('APP_CONFIG_GROUP_LIST');break;
case 5:$result = C('WAP_CONFIG_GROUP_LIST');break;
case 6:$result = C('BA_CONFIG_GROUP_LIST');break;
default:$result = C('CONFIG_GROUP_LIST');
}
$this->AjaxReturn($result);
}
/**
* 获取区服列表
* @param $game_id
*/
public function getServer($game_id=""){
$map = [];
if (!empty($game_id)) {
$map['game_id'] = $game_id;
}
$data = M('server','tab_')->where($map)->select();
$this->AjaxReturn($data);
}
/**
*获取充值游戏区服
* @param game_id
*/
public function getSpendServer($game_id="",$type=1, $game_type='', $game_name=''){
if($type==2){
$game = M('Game','tab_')->field('id')->where(['game_name'=>$game_id])->find();
$game_id = $game['id'];
}
$map['game_id'] = $game_id;
$map['server_name'] = array('neq','');
$data = M('Spend','tab_')->field('server_name')->where($map)->group('server_name')->select();
$this->AjaxReturn($data);
}
/**
* 获取用户注册区服
*/
public function getUserServer($game_id="",$type=1){
if($type==2){
$game = M('Game','tab_')->field('id')->where(['game_name'=>$game_id])->find();
$game_id = $game['id'];
}
$map['game_id'] = $game_id;
$map['server_name'] = array('neq','');
$data = M('UserPlayInfo','tab_')->field('server_name')->where($map)->group('server_name')->select();
$this->AjaxReturn($data);
}
public function getGmeServer($game_name="", $sdk_version="")
{
$game_map = [];
if ($game_name) {
$game_map['relation_game_name'] = $game_name;
}else {
$this->AjaxReturn([]);
}
if ($sdk_version) {
$map['server_version'] = $game_map['sdk_version'] = $sdk_version;
}else {
// $this->AjaxReturn([]);
}
$game = M("Game", 'tab_')->where($game_map)->getField('id', true);
// 获取版本信息
$map = [];
if ($game) {
$map['game_id'] = ['in', $game];
} else {
$map['game_id'] = ['in', [-1]];
}
$data = M('Server', 'tab_')->field('id, server_name, server_id')->where($map)->group('server_name')->select();
$this->AjaxReturn($data);
}
public function getGameVersion($game_name="")
{
if ($game_name) {
$map['relation_game_name'] = $game_name;
}else {
$this->AjaxReturn([]);
}
$data = M('Game','tab_')->field('sdk_version')->where($map)->select();
$this->AjaxReturn($data);
}
/**
* 获取游戏折扣
* @param $game_id
*/
public function getGameDiscount($game_id){
$data = M('Game','tab_')->find($game_id);
$res['discount'] = $data['discount'];
$this->AjaxReturn($res);
}
public function getUserPlayGameName($user_id=0){
$map['user_account'] = $user_id;
$data = M("UserPlay","tab_")->field("game_id,game_name,bind_balance")->where($map)->group('user_id,game_id')->select();
$this->AjaxReturn($data);
}
/**
*修改游戏字段
* @param int game_id
* @param string $fields 要修改的字段名称
* @param string $value 要修改的字段的值
* @author 小纯洁
*/
public function setGameDataField($game_id=0,$fields='',$value=''){
$map['id'] = $game_id;
$result = M('Game','tab_')->where($map)->setField($fields,$value);
if($result !== false){
if($fields != "game_status"){
$game = M('Game','tab_')->where($map)->find();
$map1['relation_game_name'] = $game['relation_game_name'];
M('Game','tab_')->where($map1)->setField($fields,$value);
}
$data = array('status' =>1 ,'data'=>$result );
$this->AjaxReturn($data);
}else{
$data = array('status' =>0 ,'data'=>$result );
$this->AjaxReturn($data);
}
}
/**
*获取推广员申请通过的游戏
*/
public function getPromoteApplyGame($promote_id = 0){
if($promote_id == 0){
$return_msg = array('status'=>0,'info'=>'请选择推广员');
$this->AjaxReturn($return_msg);
}
$fields = "tab_game.id,tab_game.game_name,discount,tab_apply.promote_id,tab_apply.promote_account";
$data = D('Apply')->getPromoteGame($promote_id,$fields);
if(empty($data)){
$return_msg = array('status'=>0,'info'=>'该推广员没有已审核的游戏');
$this->AjaxReturn($return_msg);
} else{
$return_msg = array('status'=>1,'info'=>'成功','data'=>$data);
$this->AjaxReturn($return_msg);
}
}
public function getPromotersByLevel()
{
$level = I('level');
if (!$level) {
return $this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>[]]);
}
$this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>(new PromoteModel)->getPromotersByLevel($level)]);
}
/**
* 根据公司id获取会长
*/
public function getPromotersByCompanyid($company_id = -1)
{
$company_id = I('company_id');
$data = M("Promote","tab_")->field("id,account,nickname,company_id");
if($company_id == -1){
$data = $data->where("level = '1'")->select();
}else{
$data = $data->where("company_id = '{$company_id}' and level = '1'")->select();
}
foreach ($data as &$item) {
$item['nickname'] = $item['account'] . ($item['nickname'] ? "({$item['nickname']})" : "");
}
if($company_id <= 0){
array_unshift($data,["id"=>0,"nickname"=>"官方渠道","account"=>"官方渠道","company_id"=>0]);
}
$this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>$data]);
}
public function getPromotersByLevelOther()
{
$level = I('level');
if (!$level) {
return $this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>[]]);
}
$this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>(new PromoteModel)->getPromotersByLevelOther($level)]);
}
public function getGameList($type=0, $sdk_type=0)
{
$game = M("game","tab_");
if(MODULE_NAME == 'Admin') {
$map['game_status'] = array('in','0,1');
} else {
$map['game_status'] = 1;
}
if(!empty($type)){
/*$map['developers'] = $type == 1? array('EQ',0):array('GT',0);*/
/* $map['game_status'] = $type == 1? 1:array('in','0,1'); */
switch($type) {
case 1:
$map['developers'] = array('EQ',0);
break;
case 2:
$map['developers'] = array('EGT',0);
break;
default:
$map['developers'] = array('GT',0);
}
}else{
$map['apply_status'] = 1;
$map['online_status'] = 1;
}
if (empty($sdk_type)) {
$lists = $game->field('id,game_name,sdk_version,relation_game_name,icon,relation_game_id,game_status,display_site,dow_num')->where($map)->group('relation_game_name')->order("id asc")->select();
} else {
$map['sdk_version'] = $sdk_type;
$lists = $game->field('id,game_name,sdk_version,relation_game_name,icon,relation_game_id,game_status,display_site,dow_num')->where($map)->order("id asc")->select();
}
$this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>$lists]);
}
public function getDownstreamData() {
$withdraw_number = $_REQUEST['withdraw_number'];
if ($withdraw_number) {
$map['widthdraw_number'] = $withdraw_number;
}
if ($_REQUEST['company_id']) {
$map['company_id'] = $_REQUEST['company_id'];
}
$data = M("withdraw","tab_")
->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,company_name,tab_withdraw.settlement_type,mobile_phone,real_name,tab_promote.bank_card,account_openin,tab_promote.address,game_ratio,bank_account")
->join("left join tab_promote on tab_withdraw.promote_id=tab_promote.id")
->join("left join tab_promote_company on tab_promote.company_id=tab_promote_company.id")
->where($map)
->find();
if ($data['settlement_type']==1) {
$data['settlement_type'] = '周结订单';
} else if($data['settlement_type']==2){
$data['settlement_type'] = '月结订单';
} else {
$data['settlement_type'] = '补点订单';
}
$data['game_ratio'] = json_decode($data['game_ratio'],true);
$getStatementData =M('statement','tab_')->where(['ext_field'=>$withdraw_number])->find();
$statementData = json_decode($getStatementData['statement_info'],true);
$reward = 0;
$forfeit = 0;
if ($statementData) {
$data['sum'] = $getStatementData['statement_money'];
$data['pay_amount'] = $getStatementData['pay_amount'];
$data['reward'] = 0;
$data['forfeit'] = 0;
$handleStatementData = [];
foreach ($statementData as $key=>$sv) {
if ($sv['game_id']) {
$nowVal['selle_ratio'] = $sv['second_ratio'];
$nowVal['sum_amount'] = $sv['pay_amount'];
$nowVal['begin_time'] = $sv['statement_begin_time'];
$nowVal['end_time'] = $sv['statement_end_time'];
$nowVal['game_name'] = $sv['game_name'];
$nowVal['fax_ratio'] = $sv['fax_ratio'];
$nowVal['sum'] = $sv['sum_money'];
$handleStatementData[$sv['game_id']][] = $nowVal;
} else {
if ($sv['statement_type'] == 2) {
$data['reward'] += $sv['sum_money'];
} else if ($sv['statement_type'] == 1) {
$data['forfeit'] += $sv['sum_money'];
}
}
}
// dump($handleStatementData);die();
$first_party_info = json_decode($getStatementData['first_party_info'],true);
$second_party_info = json_decode($getStatementData['second_party_info'],true);
$data['game_ratio'] = $handleStatementData;
$data['company_name'] = $second_party_info['partner'];
$data['mobile_phone'] = $second_party_info['link_phone'];
$data['bank_card'] = $second_party_info['bank_account'];
$data['account_openin'] = $second_party_info['opening_bank'];
$data['settlement_type'] = $second_party_info['settlement_type'];
$data['address'] = $second_party_info['address'];
$data['real_name'] = $second_party_info['link_man'];
$data['bank_account_name'] = $second_party_info['bank_account_name'];
$data['settlement_type_value'] = $getStatementData['settlement_type'];
$data['settlement_type_value'] = $getStatementData['settlement_type'];
$data['invoice_item'] = $second_party_info['invoice_item'];
$data['invoice_type'] = $second_party_info['invoice_type'];
$data['jfCompany'] = $first_party_info['jfCompany'];
$data['jfPerson'] = $first_party_info['jfPerson'];
$data['jfTel'] = $first_party_info['jfTel'];
if ($getStatementData['settlement_type']=='周结订单') {
$data['settlement_type_value'] = 1;
} else if ($getStatementData['settlement_type']=='月结订单') {
$data['settlement_type_value'] = 2;
} else {
$data['settlement_type_value'] = 3;
}
// dump($statementData);die();
} else {
$data['address'] = json_decode($data['address'],1);
// dd($data['address']);
$address = '';
if (is_array($data['address'])) {
foreach($data['address'] as $key => $value) {
$address = $address.' '.$value;
}
}
$data['address'] = $address;
$gameStr = [];
$game_ratio = [];
if (is_array($data['game_ratio'])) {
foreach ($data['game_ratio'] as $key => &$value) {
foreach ($value as $k => &$v) {
$v['game_name'] = substr(get_gamename($key),0,strpos(get_gamename($key), '('));
if (!in_array($v['game_name'],$gameStr)) {
array_push($gameStr,$v['game_name']);
} else {
// var_dump($key);
if (!$game_ratio[$v['game_name']]) {
$game_ratio[$v['game_name']] = $v;
}
else {
$game_ratio[$v['game_name']]['sum_amount'] += $v['sum_amount'];
}
unset($value[$k]);
}
}
if (!$value) {
unset($data['game_ratio'][$key]);
}
}
// dump($data['game_ratio']);die();
foreach ($data['game_ratio'] as $key => &$value) {
foreach ($value as $k => &$v) {
$startTime = strtotime($v['begin_time']);
$endTime = strtotime($v['end_time']);
$rewardData = M('reward_record','tab_')
->field("sum(tab_reward_record.money) as money,reward_type")
->join("left join (select * from tab_game group by relation_game_id)tab_game on tab_reward_record.relation_game_id=tab_game.relation_game_id")
->where(['company_type'=>2,'relation_game_name'=>['like',"%{$v['game_name']}%"],'company_id'=>$data['company_id'],'reward_time'=>['between',[$startTime,$endTime]]])
->group('reward_type')
->select();
foreach ($rewardData as $key => $valReward) {
if ($valReward['reward_type']==1) {
$reward = $reward + $valReward['money'];
} else if ($valReward['reward_type']==2) {
$forfeit = $forfeit + $valReward['money'];
}
}
// dump($reward);die();
if ($game_ratio[$v['game_name']]) {
$v['sum_amount'] = number_format($v['sum_amount'] + $game_ratio[$v['game_name']]['sum_amount'],2,'.','');
}
}
}
}
$data['reward'] = $reward;
$data['forfeit'] = $forfeit;
$yfData = M('tool','tab_')->where(['name'=>'company_info'])->find();
$yfData = json_decode($yfData['config'],true);
$data['yfpartner'] = $yfData['partner'];
$data['yflink_man'] = $yfData['link_man'];
$data['yflink_phone'] = $yfData['link_phone'];
}
$this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>$data]);
}
function getPromoteCompanyList() {
$map = [];
if ($_REQUEST['withdraw_number']) {
$map['widthdraw_number'] = $_REQUEST['withdraw_number'];
}
// var_dump($map);die();
if ($_REQUEST['company_id']) {
$map['_string'] = "tab_promote.company_id={$_REQUEST['company_id']} and ext_field is null";
}
// $map['widthdraw_number'] = ['neq',''];
$data = M("withdraw","tab_")
->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,tab_promote_company.company_name,tab_withdraw.settlement_type,mobile_phone,real_name,tab_promote.bank_card,account_openin,tab_promote.address,game_ratio,bank_account")
->join("left join tab_promote on tab_withdraw.promote_id=tab_promote.id")
->join("left join tab_promote_company on tab_promote.company_id=tab_promote_company.id")
->join("left join tab_statement as statement on tab_withdraw.widthdraw_number = statement.ext_field")
->where($map)
// ->where("widthdraw_number is not NULL")
->select();
$this->ajaxReturn(['data'=>$data]);
// return $data;
}
public function addfile()
{
$this->meta_title = '文档添加';
$template = I('t');
$template = $template ?: 'Partner/addfile';
return $this->display($template);
}
//处理上传图片
public function saveFile()
{
$path = '/Uploads/';
$upload = new \Think\Upload();// 实例化上传类
$upload->maxSize = 0 ;// 设置附件上传大小
$upload->exts = '';// 设置附件上传类型
$upload->rootPath = '.'.$path; // 设置附件上传根目录
$upload->savePath = ''; // 设置附件上传(子)目录
// 上传文件
$info = $upload->upload();
// dump($info);
if(!$info) {// 上传错误提示错误信息
$msg = $upload->getError();
$array= array('status' => 0, 'info' => $msg);
}else{// 上传成功
$array=array(
"info"=>"上传成功",
"status"=>1,
"file_path"=>$path.$info['file']['savepath'].$info['file']['savename'],
"file_name"=>$_POST['file_name'],
"file_type"=>$_FILES['file']['type'],
"file_size"=>$_FILES['file']['size'],
"upload_time"=>date("Y-m-d H:i:s",time())
);
}
$this->ajaxReturn($array);
}
//删除图片
public function delFile()
{
$id = $_REQUEST['id'];
$index = $_REQUEST['index'] ?: false;
$file_path = $_REQUEST['file_path'] ?: false;
if($id == 0){
//未存入数据库,不用管
unlink("./".$file_path);
$this->ajaxReturn(array(
'status' => 1,
'info' => "删除成功"
));
}
# code...
}
/**
*获取上下游公司
*/
public function getCompanyList()
{
$company_type = I('company_type');//公司类型
if ($company_type ==1) {//上游公司
$data = M('partner','tab_')->field('id, partner as name,1 as type')->where(['status' => 1])->select();
} elseif ($company_type ==2) {//下游公司
$data = M('promote_company','tab_')->field('id, company_name as name,2 as type')->where(['status' => 1])->select();
} else {
$partner = M('partner','tab_')->field('id, partner as name,1 as type')->where(['status' => 1])->select();
$promote_company = M('promote_company','tab_')->field('id, company_name as name, 2 as type')->where(['status' => 1])->select();
$data = array_merge($partner, $promote_company);
}
$this->ajaxReturn($data);
}
/**
* 操作日志
* option:
* array(
* op_type=>操作类型 1:编辑 2:删除 3:下载,
* op_name=>操作说明 例如:编辑,删除,锁定等,
* url=>需要跳转的url 添加去列表加唯一id编辑直接去编辑页面下载可以重新下载(新开页面),
* key=>关键词:用户的账号,游戏的名词等,
* menu=>非必须,菜单目录,不存在的话按控制器寻找
* )
* get: 页面get参数
*
* return: 0:错误 1:成功
*/
public function addOperationLog() {
$Get = $_GET['get'];
$option = $_GET['option'];
if (!$option['key']) {
$option['key'] = getNowDate();
}
if (!$option['url']) {
$this->ajaxReturn(['code'=>0]);
}
if (!$option['menu']) {
$this->ajaxReturn(['code'=>0]);
}
if (!$option['op_name']) {
$this->ajaxReturn(['code'=>0]);
}
addOperationLog(['op_type'=>$option['op_type'],'key'=>$option['key'],'op_name'=>$option['op_name'],'url'=>U($option['url'],$Get),'menu'=>$option['menu']]);
$this->ajaxReturn(['code'=>1]);
}
public function getPromoteChildren($pid)
{
$info = M('promote', 'tab_')->where(['id'=>$pid])->find();
if (empty($info)) return $this->ajaxReturn(['code'=>1, 'data'=>[]]);
$result = M('promote', 'tab_')->field("id,account,nickname")->where(['parent_id'=>$pid])->select();
$this->ajaxReturn(['code'=>1, 'data'=>$result]);
}
public function getPromotersByLevelResource()
{
$level = I('level');
if (!$level) {
// return $this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>[]]);
$level = '';
}
$this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>(new PromoteModel)->getPromotersByLevelResource($level)]);
}
}

@ -24,6 +24,10 @@ class PaymentController extends BaseController
}
public function lists()
{
$params = I('get.');
$page = $params['p'] ? intval($params['p']) : 1;
$row = $params['row'] ? intval($params['row']) : 10;
$map=[
"i.verify_status"=>["in","-1,1"],
];
@ -32,6 +36,7 @@ class PaymentController extends BaseController
->field("i.*,p.statement_num statement_pool_num")
->join("tab_company_statement_pool p ON p.id = i.pool_id")
->where($map)
->order("FIELD(pay_status,0,-1,1),verify_status desc")
->select();
foreach($CompanyInfo as $k=>&$v){
$v['can_pay'] = 1;
@ -56,11 +61,244 @@ class PaymentController extends BaseController
}
$v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}";
}
//统计待打款金额
$countmap = $map;
$countmap['pay_status']=["neq",1];
$money = M("company_statement_info","tab_")->alias('i')->field("sum(statement_money) statement_money")->where($countmap)->find();
$this->assign("data",$CompanyInfo);
$count = M("company_statement_info","tab_")->alias('i')->field("count(id) count")->where($map)->find();
// dd($count);
$parameter['p'] = $page;
$parameter['row'] = $row;
$page = set_pagination($count['count'], $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign("data",$CompanyInfo);
$this->assign("money",$money);
$this->assign("CompanyType", $this->CompanyType);
$this->display();
}
//查看
public function viewPool()
{
if(!isset($_REQUEST['id'])){
$this->error('参数错误');
}
$id = $_REQUEST['id'];
$is_export= false;
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
$is_export = true;
}
//获取基本信息
$dbres = M("company_statement_info","tab_")->where("id='{$id}'")->select();
$title = $dbres[0]['company_name'];
$this->assign("title",$title);
if($dbres[0]['company_type'] == 3){
//上游
$this->viewCpPool($dbres,$is_export);
}elseif($dbres[0]['company_type'] == 1){
//下游公司
$this->viewPcPool($dbres,$is_export);
}else{
$this->viewPuPool($dbres,$is_export);
}
}
//个人汇总结算查看
public function viewPuPool(&$infolist,$is_export){
$line = 1;
$count = [];
//获取对接人
foreach($infolist as $k=>&$v){
$v['statement_info'] = json_decode($v['statement_info'],true);
$v['company_info'] = json_decode($v['company_info'],true);
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
$cline = $line+1;
if($is_export){
$v['sum_money_exp'] = "=";
}
foreach($v['statement_info'] as $ke=>&$va){
$line ++;
if(isset($va['ratio'])){
$va['increment_ratio'] = 0;
}else{
$va['ratio'] = 0;
}
if($is_export){
//J3*(K3+L3)+M3-N3
$va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}";
$count['sum_money_exp'] .= "O{$line}+";
$count['platform_amount_exp'] .= "J{$line}+";
}else{
$count['platform_amount'] += $va['pay_amount'];
$count['sum_money'] += $va['sum_money'];
}
}
$v['statement_count'] = count($v['statement_info']);
}
if($is_export){
$count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+");
$count["sum_money"] = "=".trim($count["sum_money_exp"],"+");
}
$this->assign("data",$infolist);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->display("viewPuPool");
}
//下游汇总结算查看
public function viewPcPool(&$infolist,$is_export){
$line = 1;
$count = [];
//获取对接人
$p_id = array_column($infolist,'company_id');
$map['id'] = ['in',$p_id];
$pl = M("promote_company","tab_")->field("id,settlement_contact")->where($map)->select();
$Partner = [];
foreach($pl as $k=>$v){
$Partner[$v['id']] = $v['settlement_contact'];
}
unset($pl);
foreach($infolist as $k=>&$v){
$v['statement_info'] = json_decode($v['statement_info'],true);
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
$cline = $line+1;
if($is_export){
$v['statement_money_exp'] = "=";
}
foreach($v['statement_info'] as $ke=>&$va){
$line ++;
if(isset($va['ratio'])){
$va['increment_ratio'] = 0;
}else{
$va['ratio'] = 0;
}
if($is_export){
$v['statement_money_exp'] .= "H{$line}+";
$va['d_statement_money'] = "=D{$line}*(1-G{$line})*(E{$line}+F{$line})";
$count['platform_amount_exp'] .= "D{$line}+";
$count['d_statement_money_exp'] .= "H{$line}+";
}else{
$va['d_statement_money'] = round($va['pay_amount']*($va['ratio']+$va['increment_ratio'])*(100-$va['fax_ratio'])/100/100,2);
$count['platform_amount'] += $va['pay_amount'];
$count['d_statement_money'] += $va['d_statement_money'];
}
}
$v['settlement_contact'] = $Partner[$v['company_id']];
if($is_export){
$v['statement_money_exp'] .= "J{$cline}-I{$cline}";
$v['statement_money'] = $v['statement_money_exp'];
$count['fine_exp'] .= "I{$cline}+";
$count['reward_exp'] .= "J{$cline}+";
$count['statement_money_exp'] .= "K{$cline}+";
}else{
$count['fine'] += $v['fine'];
$count['reward'] += $v['reward'];
$count['statement_money'] += $v['statement_money'];
}
$v['statement_count'] = count($v['statement_info']);
}
if($is_export){
$count["d_statement_money"] = "=".trim($count["d_statement_money_exp"],"+");
$count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+");
$count["fine"] = "=".trim($count["fine_exp"],"+");
$count["reward"] = "=".trim($count["reward_exp"],"+");
$count["statement_money"] = "=".trim($count["statement_money_exp"],"+");
}
$this->assign("data",$infolist);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->display("viewPcPool");
}
//上游汇总查看及导出
public function viewCpPool(&$infolist,$is_export)
{
$line = 2;
$count = [];
//获取平台名
$p_id = array_column($infolist,'company_id');
$map['id'] = ['in',$p_id];
$pl = M("Partner","tab_")->field("id,matche_platform")->where($map)->select();
$Partner = [];
foreach($pl as $k=>$v){
$Partner[$v['id']] = $v['matche_platform'];
}
unset($pl);
//
foreach($infolist as $k=>&$v){
$v['statement_info'] = json_decode($v['statement_info'],true);
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
$cline = $line+1;
if($is_export){
$v['statement_money_exp'] = "=";
}
foreach($v['statement_info'] as $ke=>&$va){
$line ++;
$va['company_ratio'] = 100-$va['ratio'];
if($is_export){
$v['statement_money_exp'] .= "K{$line}+";
$va['d_statement_money'] = "=F{$line}*G{$line}";
$count['platform_amount_exp'] .= "E{$line}+";
$count['platform_amount_exp2'] .= "F{$line}+";
$count['d_statement_money_exp'] .= "K{$line}+";
}else{
$va['d_statement_money'] = round($va['pay_amount']*$va['ratio']/100,2);
$count['platform_amount'] += $va['pay_amount'];
$count['platform_amount2'] += $va['pay_amount'];
$count['d_statement_money'] += $va['d_statement_money'];
}
}
$v['matche_platform'] = $Partner[$v['company_id']];
if($is_export){
$v['statement_money_exp'] .= "M{$cline}-L{$cline}";
$v['statement_money'] = $v['statement_money_exp'];
$count['fine_exp'] .= "L{$cline}+";
$count['reward_exp'] .= "M{$cline}+";
$count['statement_money_exp'] .= "N{$cline}+";
}else{
$count['fine'] += $v['fine'];
$count['reward'] += $v['reward'];
$count['statement_money'] += $v['statement_money'];
}
$v['statement_count'] = count($v['statement_info']);
}
if($is_export){
$count["d_statement_money"] = "=".trim($count["d_statement_money_exp"],"+");
$count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+");
$count["platform_amount2"] = "=".trim($count["platform_amount_exp2"],"+");
$count["fine"] = "=".trim($count["fine_exp"],"+");
$count["reward"] = "=".trim($count["reward_exp"],"+");
$count["statement_money"] = "=".trim($count["statement_money_exp"],"+");
}
$this->assign("data",$infolist);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->display("viewCpPool");
}
public function transfer_set()
{
Vendor("Alipay2020/Fund");

@ -145,9 +145,7 @@
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<foreach name="menubtn" item="vo" >
{$vo}
</foreach>
<a class='butn' id='doPayment'>批量打款</a>
</div>
</div>
@ -200,13 +198,14 @@
<td>{$data.pay_time}</td>
<td>{$data.remark}</td>
<td>
<foreach name="data.oplist" item="vo" >
{$vo}
</foreach>
<a class='confirm viewPool' data-id='{$data.id}'>查看</a>
<if condition="$data['pay_status'] neq 0">
<a class='confirm viewPayment' data-id='{$data.id}'>打款详情</a>
</if>
</td>
</tr>
</volist>
<tr><td style="line-height: 42px;">合计</td><td colspan="13" style="line-height: 42px;">结算总金额:&nbsp;{$count.statement_money}</td></tr>
<tr><td style="line-height: 42px;">合计</td><td colspan="13" style="line-height: 42px;">待打款金额:&nbsp;{$money.statement_money}</td></tr>
</notemtpy>
</tbody>
</table>
@ -215,7 +214,7 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
<!-- <a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a> -->
</if>
{$_page|default=''}
</div>
@ -276,9 +275,9 @@
})
$("#company_type").change();
$(".viewStatement").click(function () {
$(".viewPool").click(function () {
var id = $(this).data("id");
var url = "{:U('viewStatement')}"+"&id="+id
var url = "{:U('viewPool')}"+"&id="+id
layer.open({
type: 2,
title: "海南万盟天下科技有限公司",
@ -289,80 +288,9 @@
});
});
$("#pool").on("click",function(){
var id = $(this).attr("id");
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get();
if(text.length > 40){
layer.msg("<font style='color:white'>" + '为保证效率暂不支持超过40条的批量操作' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '无需要汇总的操作'+"</font>");
return;
}
text = text.join(",");
if(confirm){
layer.confirm('【警告】汇总后将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(){
_doAgreeApply();
});
}else{
_doAgreeApply();
}
function _doAgreeApply(){
//执行
$.ajax({
type: "POST",
url: "{:U('pool')}",
dataType: 'json',
async: false,
data: {ids:text},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
return false;
}
}
});
}
})
$("#export").click(function () {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get();
if(text.length > 20){
layer.msg("<font style='color:white'>" + '暂不支持超过20条的批量导出' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要导出的结算单' + "</font>");
return;
}
for (var index = 0; index < text.length; index++) {
var id = text[index];
var url ="{:U('viewStatement')}"+"&id="+id+"&export=1";
var iframeExcel = "<iframe src='"+url+"' width='0px' height='0px' style='z-index:-1;position: absolute;top: -999999px;'></iframe>"//添加下载的地址到iframe这里是公司信息我用**表示了。
$("body").append(iframeExcel)
}
})
$("#search").click(function(){
var start = $("#time_start").val();

@ -0,0 +1,194 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
/* .tabcon1711 table{
width: 480px;
} */
table{
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list, .i_list {
float: left;
margin: 0;
}
</style>
<body>
<!-- <div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
海南万盟天下科技有限公司
</div> -->
<div class="data_list box_mt" style="margin-top: 10px;">
<div class="">
<table id="exporttable">
<!-- 表头 -->
<thead>
<tr>
<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 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 colspan=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 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 rowspan="2" style="border-right: solid 1px #b6cad2;">合作待结算金额</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">备注</th>
</tr>
<tr>
<th style="border-right: solid 1px #b6cad2;min-width: 50px;">合作方</th>
<th style="min-width: 50px;">我方</th>
</tr>
</thead>
<tbody id="statementShow">
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
<td rowspan="{$com.statement_count}">{$com.matche_platform}</td>
<!-- <td rowspan="{$com.statement_count}">{$com.statement_begin_time} ~ {$com.statement_end_time}</td> -->
<td>{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}</td>
<td>{$com['statement_info'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['ratio']}%</td>
<td>{$com['statement_info'][0]['company_ratio']}%</td>
<td>{$com['statement_info'][0]['promote_ratio']}%</td>
<td>{$com['statement_info'][0]['fax_ratio']}%</td>
<td>{$com['statement_info'][0]['d_statement_money']}</td>
<td rowspan="{$com.statement_count}">{$com.fine}</td>
<td rowspan="{$com.statement_count}">{$com.reward}</td>
<td rowspan="{$com.statement_count}">{$com.statement_money}</td>
<td rowspan="{$com.statement_count}">{$com.renark}</td>
</tr>
<foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0">
<tr>
<td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td>
<td>{$it['game_name']}</td>
<td>{$it['pay_amount']}</td>
<td>{$it['pay_amount']}</td>
<td>{$it['ratio']}%</td>
<td>{$it['company_ratio']}%</td>
<td>{$it['promote_ratio']}%</td>
<td>{$it['fax_ratio']}%</td>
<td>{$it['d_statement_money']}</td>
</tr>
</if>
</foreach>
</foreach>
<tr>
<td colspan=4 >合计:</td>
<td>{$count.platform_amount}</td>
<td>{$count.platform_amount2}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.d_statement_money}</td>
<td>{$count.fine}</td>
<td>{$count.reward}</td>
<td>{$count.statement_money}</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
<script>
<if condition="$is_export">
$(function(){
$("#exporttable").table2excel({
filename: "{$title}.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</if>
</script>
</html>

@ -0,0 +1,177 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
/* .tabcon1711 table{
width: 480px;
} */
table{
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list, .i_list {
float: left;
margin: 0;
}
</style>
<body>
<!-- <div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
海南万盟天下科技有限公司
</div> -->
<div class="data_list box_mt" style="margin-top: 10px;">
<div class="">
<table id="exporttable">
<!-- 表头 -->
<thead>
<tr>
<th>序号</th>
<th>公司名称</th>
<th>合作产品名称</th>
<th>平台总额(元)</th>
<th>下游内团分成比例</th>
<th>补点比例</th>
<th>税费费率</th>
<th>分成金额/元</th>
<th>罚款</th>
<th>奖励</th>
<th>合计/元</th>
<th>对账人</th>
<th>结算日期</th>
<th>备注</th>
</tr>
</thead>
<tbody id="statementShow">
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.statement_count}">{$key-0+1}</td>
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
<td>{$com['statement_info'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['ratio']}%</td>
<td>{$com['statement_info'][0]['increment_ratio']}%</td>
<td>{$com['statement_info'][0]['fax_ratio']}%</td>
<td>{$com['statement_info'][0]['d_statement_money']}</td>
<td rowspan="{$com.statement_count}">{$com.fine}</td>
<td rowspan="{$com.statement_count}">{$com.reward}</td>
<td rowspan="{$com.statement_count}">{$com.statement_money}</td>
<td rowspan="{$com.statement_count}">{$com.settlement_contact}</td>
<td>{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}</td>
<td rowspan="{$com.statement_count}">{$com.renark}</td>
</tr>
<foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0">
<tr>
<td>{$it['game_name']}</td>
<td>{$it['pay_amount']}</td>
<td>{$it['ratio']}%</td>
<td>{$it['increment_ratio']}%</td>
<td>{$it['fax_ratio']}%</td>
<td>{$it['d_statement_money']}</td>
<td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td>
</tr>
</if>
</foreach>
</foreach>
<tr>
<td colspan=3 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td>{$count.d_statement_money}</td>
<td>{$count.fine}</td>
<td>{$count.reward}</td>
<td>{$count.statement_money}</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
<script>
<if condition="$is_export">
$(function(){
$("#exporttable").table2excel({
filename: "{$title}.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</if>
</script>
</html>

@ -0,0 +1,198 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
/* .tabcon1711 table{
width: 480px;
} */
table{
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list, .i_list {
float: left;
margin: 0;
}
</style>
<body>
<!-- <div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
海南万盟天下科技有限公司
</div> -->
<div class="data_list box_mt" style="margin-top: 10px;">
<div class="">
<table id="exporttable">
<!-- 表头 -->
<thead>
<tr>
<th>序号</th>
<th>下游名称</th>
<th>会长账号</th>
<th>下游类型</th>
<th>市场员</th>
<th>下游性质</th>
<th>产品</th>
<th>产品类型</th>
<th>结算时间</th>
<th>推广流水</th>
<th>分成比例</th>
<th>补点</th>
<th>奖励</th>
<th>罚款</th>
<th>结算金额</th>
<th>开户名</th>
<th>银行卡号</th>
<th>开户支行</th>
<th>帐户类型</th>
<th>备注</th>
</tr>
</thead>
<tbody id="statementShow">
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.statement_count}">{$key-0+1}</td>
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.account}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.company_relation_str}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.nickname}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.company_type_str}</td>
<td>{$com['statement_info'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['game_type_name']}</td>
<td>{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['ratio']|default=0}%</td>
<td>{$com['statement_info'][0]['increment_ratio']|default=0}%</td>
<td>{$com['statement_info'][0]['reward']}</td>
<td>{$com['statement_info'][0]['fine']}</td>
<td>{$com['statement_info'][0]['sum_money']}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.payee_name}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.bank_account}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.opening_bank}</td>
<td rowspan="{$com.statement_count}"></td>
<td rowspan="{$com.statement_count}">{$com.remark}</td>
</tr>
<foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0">
<tr>
<td>{$it['game_name']}</td>
<td>{$it['game_type_name']}</td>
<td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td>
<td>{$it['pay_amount']}</td>
<td>{$it['ratio']|default=0}%</td>
<td>{$it['increment_ratio']|default=0}%</td>
<td>{$it['reward']}</td>
<td>{$it['fine']}</td>
<td>{$it['sum_money']}</td>
</tr>
</if>
</foreach>
</foreach>
<tr>
<td colspan=9 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.sum_money}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
<script>
<if condition="$is_export">
$(function(){
$("#exporttable").table2excel({
filename: "{$title}.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</if>
</script>
</html>
Loading…
Cancel
Save