Merge pull request 'feature/finance_payment_20210115' (#174) from feature/finance_payment_20210115 into release
子站结算master
commit
234ce8817d
@ -1,327 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
use User\Api\UserApi as UserApi;
|
||||
|
||||
/**
|
||||
* 推广查询控制器
|
||||
* @author 王贺
|
||||
*/
|
||||
class QueryController extends ThinkController {
|
||||
public function settlement($p=0) {
|
||||
$group = I('group',1);
|
||||
$this->assign('group',$group);
|
||||
if(isset($_REQUEST['total_status'])){
|
||||
unset($_REQUEST['total_status']);
|
||||
}
|
||||
if ($group == 1) {
|
||||
if($_REQUEST['unum']==1){
|
||||
$order='unum';
|
||||
$order_type=SORT_ASC;
|
||||
}else if($_REQUEST['unum']==0){
|
||||
$order='unum';
|
||||
$order_type=SORT_DESC;
|
||||
}
|
||||
if($_REQUEST['spay_amount']==1){
|
||||
$order='spay_amount';
|
||||
$order_type=SORT_ASC;
|
||||
}else if($_REQUEST['spay_amount']==0){
|
||||
$order='spay_amount';
|
||||
$order_type=SORT_DESC;
|
||||
}
|
||||
$model = array(
|
||||
'title' => '渠道结算',
|
||||
'template_list' =>'settlement',
|
||||
'order' => $order,
|
||||
'order_type'=>$order_type//0倒序 1 正序
|
||||
);
|
||||
$start=$_REQUEST['timestart'];
|
||||
$end=$_REQUEST['timeend'];
|
||||
if(I('group')!=''){
|
||||
if($start==''||$end==''&&$_REQUEST['promote_account']==''){
|
||||
$this->error('结算周期、所属渠道不能为空!','',1);
|
||||
}
|
||||
if($start==''||$end==''){
|
||||
$this->error('请选择结算周期!','',1);
|
||||
}
|
||||
if($_REQUEST['promote_account']==''){
|
||||
$this->error('请选择渠道!','',1);
|
||||
}
|
||||
}
|
||||
if($start && $end){
|
||||
if((strtotime($end)+24*60*60-1)<strtotime($start)){
|
||||
$this->error('时间选择不正确!',U('Query/settlement'),'');
|
||||
}
|
||||
$umap['register_time']=array('BETWEEN',array(strtotime($start),strtotime($end)+24*60*60-1));
|
||||
if(isset($_REQUEST['game_name'])&&$_REQUEST['game_name']!=''){
|
||||
$umap['fgame_name']=$_REQUEST['game_name'];
|
||||
$smap['tab_spend.game_name']=$_REQUEST['game_name'];
|
||||
}
|
||||
if(isset($_REQUEST['promote_account'])&&$_REQUEST['promote_account']!=''){
|
||||
$allid=get_subordinate_promote($_REQUEST['promote_account'],'parent_name');
|
||||
$allid[]=$_REQUEST['promote_account'];
|
||||
$umap['tab_user.promote_account']=array('in',implode(',',$allid));
|
||||
$smap['tab_spend.promote_account']=array('in',implode(',',$allid));
|
||||
}else{
|
||||
$this->error('未选择渠道!','',1);
|
||||
}
|
||||
$umap['is_check']=1;
|
||||
$smap['pay_time']=array('BETWEEN',array(strtotime($start),strtotime($end)+24*60*60-1));
|
||||
$smap['is_check']=1;
|
||||
$map['umap']=$umap;
|
||||
$map['smap']=$smap;
|
||||
$user = A('Settlement','Event');
|
||||
$user->settlement($model,$p,$map);
|
||||
}else{
|
||||
$this->assign('setdate',date("Y-m-d",strtotime("-1 day")));
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
if ($group == 2) {
|
||||
if(isset($_REQUEST['timestart'])&&isset($_REQUEST['timeend'])){
|
||||
$map['create_time']=array('BETWEEN',array(strtotime($_REQUEST['timestart']),strtotime($_REQUEST['timeend'])+24*60*60-1));
|
||||
}
|
||||
if(isset($_REQUEST['game_name'])){
|
||||
if($_REQUEST['game_name']=='全部'){
|
||||
unset($_REQUEST['game_name']);
|
||||
}else{
|
||||
$map['game_name'] = $_REQUEST['game_name'];
|
||||
}
|
||||
}
|
||||
if(isset($_REQUEST['promote_account'])){
|
||||
if($_REQUEST['promote_account']=='全部'){
|
||||
unset($_REQUEST['promote_account']);
|
||||
}else{
|
||||
$map['promote_account'] = $_REQUEST['promote_account'];
|
||||
}
|
||||
}
|
||||
if(!empty($_REQUEST['settlement_number'])){
|
||||
$map['settlement_number'] = $_REQUEST['settlement_number'];
|
||||
}
|
||||
$model = array(
|
||||
'm_name' => 'settlement',
|
||||
'order' => 'create_time desc ',
|
||||
'title' => '结算账单',
|
||||
'template_list' =>'settlement',
|
||||
);
|
||||
$user = A('Bill','Event');
|
||||
$user->money_list($model,$p,$map);
|
||||
}
|
||||
}
|
||||
public function cpsettlement($p=0) {
|
||||
$group = I('group',1);
|
||||
$this->assign('group',$group);
|
||||
if(isset($_REQUEST['timestart'])&&$_REQUEST['timestart']!=''&&$_REQUEST['group']==1){
|
||||
$starttime=strtotime($_REQUEST['timestart'].'-01');
|
||||
if($starttime>=strtotime(date('Y-m-01'))){
|
||||
$this->error('时间选择不正确','',1);exit;
|
||||
}
|
||||
$endtime=strtotime($_REQUEST['timestart']."+1 month -1 day")+24*3600-1;
|
||||
if(isset($_REQUEST['game_name'])&&$_REQUEST['game_name']!='全部'){
|
||||
$map['g.game_name']=$_REQUEST['game_name'];
|
||||
}
|
||||
if(isset($_REQUEST['selle_status'])){
|
||||
if($_REQUEST['selle_status']=="未结算"){
|
||||
$map['s.selle_status']=0;
|
||||
}else if($_REQUEST['selle_status']=="已结算"){
|
||||
$map['s.selle_status']=1;
|
||||
}
|
||||
}
|
||||
$map['s.pay_status']=1;
|
||||
$map['pay_time']=array('BETWEEN',array($starttime,$endtime));
|
||||
$model = array(
|
||||
'm_name' => 'Spend as s',
|
||||
'order' => 's.id',
|
||||
'title' => '渠道结算',
|
||||
'group' => 'g.developers,g.id',
|
||||
'fields' =>'sum(s.pay_amount) as total,s.selle_ratio,s.id,g.developers,s.selle_status,g.id as gid,g.game_name,s.pay_status,s.pay_amount',
|
||||
'template_list' =>'cpsettlement',
|
||||
);
|
||||
|
||||
$user = A('Spend','Event');
|
||||
$user->cpsettl_list($model,$p,$map);
|
||||
}else if($_REQUEST['group']==2){
|
||||
if(isset($_REQUEST['timestart'])&&$_REQUEST['timestart']!=''){
|
||||
$starttime=strtotime($_REQUEST['timestart'].'-01');
|
||||
if($starttime>=strtotime(date('Y-m-01'))){
|
||||
$this->error('时间选择不正确','',1);exit;
|
||||
}
|
||||
$starttime=strtotime($_REQUEST['timestart'].'-01');
|
||||
$endtime=strtotime($_REQUEST['timestart']."+1 month -1 day")+24*3600-1;
|
||||
$map['pay_time']=array('BETWEEN',array($starttime,$endtime));
|
||||
}
|
||||
$map['s.pay_status']=1;
|
||||
$map['s.selle_status']=1;//已结算
|
||||
$model = array(
|
||||
'm_name' => 'Spend as s',
|
||||
'order' => 's.id',
|
||||
'title' => '渠道结算',
|
||||
'group' => 'g.developers,g.id',
|
||||
'fields' =>'sum(s.pay_amount) as total, s.id,s.selle_ratio,g.developers,s.selle_status,s.selle_time,g.id as gid,g.game_name,s.pay_status,s.pay_amount',
|
||||
'template_list' =>'cpsettlement',
|
||||
);
|
||||
|
||||
$user = A('Spend','Event');
|
||||
$user->cpsettl_list($model,$p,$map);
|
||||
}else{
|
||||
$this->meta_title = '渠道结算列表';
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
public function generatesettlement(){
|
||||
//批量结算要加判断
|
||||
$data['game_id']=$_REQUEST['game_id'];
|
||||
$data['game_name']=get_game_name($_REQUEST['game_id']);
|
||||
$data['promote_id']=$_REQUEST['promote_id'];
|
||||
$data['promote_account']=get_promote_name($_REQUEST['promote_id']);
|
||||
$data['total_money']=$_REQUEST['spay_amount'];
|
||||
$data['total_number']=$_REQUEST['unum'];
|
||||
$data['starttime']=strtotime($_REQUEST['starttime']);
|
||||
$data['endtime']=strtotime($_REQUEST['endtime'])+24*60*60-1;
|
||||
$data['pattern']=$_REQUEST['cooperation']=='CPS'?0:1;
|
||||
$data['ratio']=$_REQUEST['cps_ratio'];
|
||||
$data['money']=$_REQUEST['cpa_price'];
|
||||
$data['create_time']=time();
|
||||
$data['settlement_number']='JS-'.date('Ymd').date('His').sp_random_string(4);
|
||||
if(get_settlement($data['starttime'],$data['promote_id'],$data['game_id'])){
|
||||
$this->error('该结算周期不可结算,请重新选择');
|
||||
}
|
||||
if($data['pattern']){
|
||||
$data['sum_money']=$data['total_number']*$data['money'];
|
||||
}else{
|
||||
$data['sum_money']=$data['total_money']*$data['ratio']/100;
|
||||
}
|
||||
if($data['game_id']==''||$data['promote_id']==''||$data['starttime']==''||$data['endtime']==''){
|
||||
$this->error('必要参数不存在');
|
||||
}
|
||||
$map['fgame_id']=$data['game_id'];
|
||||
// $map['is_check']=1;
|
||||
$map['register_time']=array('BETWEEN',array($data['starttime'],$data['endtime']));
|
||||
$allid=get_subordinate_promote($data['promote_account'],'parent_name');
|
||||
$allid[]=$data['promote_account'];
|
||||
$map['promote_id']=array('in',$data['promote_id']);
|
||||
$u=M('User','tab_');
|
||||
$user=$u->where($map)->setField('settle_check',1);
|
||||
unset($map['register_time']);
|
||||
$map['pay_time']=array('BETWEEN',array($data['starttime'],$data['endtime']));
|
||||
$s=M('spend','tab_');
|
||||
$spend=$s->where($map)->setField('settle_check',1);
|
||||
$result=M('settlement','tab_')->add($data);
|
||||
if($result){
|
||||
$this->success('结算成功');
|
||||
}else{
|
||||
$this->error('结算失败');
|
||||
}
|
||||
}
|
||||
public function generatecpsettlement() {//cp结算
|
||||
$game_id = I('request.ids');
|
||||
if(empty($game_id)){
|
||||
$this->error('请选择要操作的数据');
|
||||
}
|
||||
$starttime=strtotime($_REQUEST['timestart'].'-01');
|
||||
$endtime=strtotime($_REQUEST['timestart']."+1 month -1 day")+24*3600-1;
|
||||
$map['s.pay_status']=1;
|
||||
$map['s.selle_status']=0;
|
||||
if(is_array($game_id)){
|
||||
$map['s.game_id']=array('in',$game_id);
|
||||
}else{
|
||||
$map['s.game_id']=$game_id;
|
||||
}
|
||||
$map['pay_time']=array('BETWEEN',array($starttime,$endtime));
|
||||
$spe=M('spend as s','tab_');
|
||||
$smap= array('s.selle_time'=>$_REQUEST['timestart'],'s.selle_status'=>1);
|
||||
$data=$spe
|
||||
->field('s.id,s.selle_status,s.selle_time')
|
||||
->join('tab_game as g on g.id=s.game_id','LEFT')
|
||||
->where($map)
|
||||
->setField($smap);
|
||||
if($data){
|
||||
$this->success('结算成功');
|
||||
}else{
|
||||
$this->error('结算失败');
|
||||
}
|
||||
|
||||
}
|
||||
public function changeratio(){
|
||||
$gid = I('request.game_id');
|
||||
if(empty($gid)){
|
||||
$this->ajaxReturn(0,"请选择要操作的数据",0);exit;
|
||||
}
|
||||
$starttime=strtotime($_REQUEST['timestart'].'-01');
|
||||
$endtime=strtotime($_REQUEST['timestart']."+1 month -1 day")+24*3600-1;
|
||||
$map['s.pay_status']=1;
|
||||
$map['s.selle_status']=0;
|
||||
$map['s.game_id']=$_REQUEST['game_id'];
|
||||
$map['pay_time']=array('BETWEEN',array($starttime,$endtime));
|
||||
$spe=M('spend as s','tab_');
|
||||
$data=$spe
|
||||
->field('s.id,s.selle_status,s.selle_ratio')
|
||||
->join('tab_game as g on g.id=s.game_id','LEFT')
|
||||
->where($map)
|
||||
->setField('s.selle_ratio',$_POST['ratio']);
|
||||
if($data){
|
||||
$this->ajaxReturn($data);
|
||||
}else{
|
||||
$this->ajaxReturn(-1);
|
||||
}
|
||||
}
|
||||
public function withdraw() {
|
||||
|
||||
if(isset($_REQUEST['settlement_number'])){
|
||||
$map['settlement_number']=$_REQUEST['settlement_number'];
|
||||
}
|
||||
if(isset($_REQUEST['status'])){
|
||||
$map['status']=$_REQUEST['status'];
|
||||
}
|
||||
if(isset($_REQUEST['promote_account'])){
|
||||
if($_REQUEST['promote_account']=='全部'){
|
||||
unset($_REQUEST['promote_account']);
|
||||
}else{
|
||||
$map['promote_account'] = $_REQUEST['promote_account'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$model = array(
|
||||
'm_name' => 'withdraw',
|
||||
'order' => 'create_time desc ',
|
||||
'title' => '渠道提现',
|
||||
'template_list' =>'withdraw',
|
||||
);
|
||||
|
||||
$user = A('Bill','Event');
|
||||
$user->money_list($model,$p,$map);
|
||||
|
||||
}
|
||||
|
||||
public function set_withdraw_status($model='withdraw') {
|
||||
$withdraw=M('withdraw',"tab_");
|
||||
$seet=M('settlement',"tab_");
|
||||
$count=count($_REQUEST['ids']);
|
||||
if($count>1){
|
||||
for ($i=0; $i <$count; $i++) {
|
||||
$map['id']=$_REQUEST['ids'][$i];
|
||||
$dind=$withdraw->where($map)->find();
|
||||
$se_map['settlement_number']=$dind['settlement_number'];
|
||||
$seet->where($se_map)->save(array("ti_status"=>$_REQUEST['status']));
|
||||
$withdraw->where($map)->save(array("end_time"=>time()));
|
||||
}
|
||||
}else{
|
||||
$map['id']=$_REQUEST['ids'];
|
||||
$dind=$withdraw->where($map)->find();
|
||||
$se_map['settlement_number']=$dind['settlement_number'];
|
||||
$seet->where($se_map)->save(array("ti_status"=>$_REQUEST['status']));
|
||||
$withdraw->where($map)->save(array("end_time"=>time()));
|
||||
}
|
||||
|
||||
parent::set_status($model);
|
||||
}
|
||||
|
||||
|
||||
protected function upPromote($promote_id){
|
||||
$model = D('Promote');
|
||||
$data['id'] = $promote_id;
|
||||
$data['money'] = 0;
|
||||
return $model->save($data);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
//use Think\Controller;
|
||||
/**
|
||||
* 上下游结算单
|
||||
* @author cz
|
||||
*/
|
||||
class SubUserStatementController extends ThinkController
|
||||
{
|
||||
|
||||
public $DBModel;
|
||||
public function _initialize()
|
||||
{
|
||||
$this->DBModel = M("UserStatement","sub_",SUBSITE_DB);//指定子库
|
||||
parent::_initialize();
|
||||
}
|
||||
|
||||
public function lists() {
|
||||
$params = I('get.');
|
||||
$page = $params['p'] ? intval($params['p']) : 1;
|
||||
$row = $params['row'] ? intval($params['row']) : 10;
|
||||
|
||||
//权限分配
|
||||
$map = [
|
||||
"_string"=>"1=1"
|
||||
];
|
||||
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
||||
$time_start = strtotime($_REQUEST['time_start']);
|
||||
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
|
||||
$map["_string"] = "(statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (statement_end_time BETWEEN {$time_start} AND {$time_end}) OR (statement_begin_time <= {$time_end} AND statement_end_time >= {$time_end})";
|
||||
} elseif (isset($_REQUEST['time_start'])) {
|
||||
$time_start = strtotime($_REQUEST['time_start']);
|
||||
$map["_string"] = "(statement_begin_time >= {$time_start} ) OR (statement_end_time >= {$time_start})";
|
||||
} elseif (isset($_REQUEST['time_end'])) {
|
||||
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
|
||||
$map["_string"] = "(statement_begin_time <= {$time_end} ) OR (statement_end_time <= {$time_end})";
|
||||
}
|
||||
|
||||
$data = $this->DBModel->where($map)->page($page,$row)->field("statement_info",true)->order("statement_begin_time desc")->select();
|
||||
foreach ($data as $k => &$v) {
|
||||
$v['statement_begin_time'] = date('Y.m.d',$v['statement_begin_time']);
|
||||
$v['statement_end_time'] = date('Y.m.d',$v['statement_end_time']);
|
||||
$v["valid"] = "{$v['statement_begin_time']}-{$v['statement_end_time']}";
|
||||
}
|
||||
|
||||
$count = $this->DBModel->where($map)->count();
|
||||
|
||||
$params['p'] = $page;
|
||||
$params['row'] = $row;
|
||||
$page = set_pagination($count, $row, $params);
|
||||
if ($page) {
|
||||
$this->assign('_page', $page);
|
||||
}
|
||||
$this->assign('data',$data);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function updateStatement()
|
||||
{
|
||||
if(!isset($_REQUEST['id'])){
|
||||
$this->error('参数错误');
|
||||
}
|
||||
$id = $_REQUEST['id'];
|
||||
$temp = $this->DBModel->where(['id'=>$id])->getField('statement_end_time');
|
||||
$temp = date('Y-m-d',$temp-0+1);
|
||||
|
||||
$params = "php ".SUBSITE_INDEX." SubCompanyStatementSet/setFreeDateCount/begin/{$temp}/end/{$temp}/company/pu";
|
||||
$r = D("CmdTasks")->addTask("SubCompanyStatementSet",$params,true);
|
||||
if($r){
|
||||
$this->DBModel->where(['id'=>$id])->delete();
|
||||
$this->ajaxReturn(["status"=>1,"info"=>"旧数据已删除且重算登记成功,请稍后刷新页面查看最新数据"]);
|
||||
}else{
|
||||
$this->ajaxReturn(["status"=>0,"info"=>"重算登记错误"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function viewStatement()
|
||||
{
|
||||
$is_export= false;
|
||||
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
|
||||
$is_export = true;
|
||||
}
|
||||
|
||||
if(!isset($_REQUEST['id'])){
|
||||
$this->error('参数错误');
|
||||
}
|
||||
$id = $_REQUEST['id'];
|
||||
|
||||
$data = $this->DBModel->where(['id'=>$id])->getField("statement_info");
|
||||
$data = json_decode($data,true);
|
||||
$line = 2;
|
||||
foreach ($data as $k => &$v) {
|
||||
$v['row'] = count($v['statement_info']);
|
||||
if ($is_export) {
|
||||
foreach ($v['statement_info'] as $key => &$val) {
|
||||
$val['sum_money'] = "=ROUND(F{$line}*G{$line},2)";
|
||||
$line++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($is_export) {
|
||||
$title = $data[0]['statement_info'][0]['statement_begin_time']."-".$data[0]['statement_info'][0]['statement_end_time']."个人汇总单";
|
||||
$this->assign("title",$title);
|
||||
}
|
||||
$this->assign("data",$data);
|
||||
$this->assign("is_export",$is_export);
|
||||
$this->display("viewPuPool");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,273 @@
|
||||
<!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>
|
||||
</head>
|
||||
<style>
|
||||
html {
|
||||
min-width:100%;
|
||||
}
|
||||
body {
|
||||
padding: 0px 0px 150px;
|
||||
width: 960px;
|
||||
margin: auto;
|
||||
}
|
||||
.tabcon1711 table{
|
||||
width: 480px;
|
||||
}
|
||||
table{
|
||||
|
||||
margin: auto;
|
||||
}
|
||||
.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 style="display: flex;margin: auto;">
|
||||
<if condition="$data['first_party_info']">
|
||||
<div class="tab-content tabcon1711" id="firstPartBaseInfo">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l">甲方:</td>
|
||||
<td class="r">
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="first_partner_id" name="partner_id" class="select_gallery">
|
||||
<option value="{$data['first_party_info']['id']}" selected>{$data['first_part_company']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tbody id="first_part_bser_info_show">
|
||||
<tr>
|
||||
<td class="l">联系人:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="link_man" value="{$data['first_party_info']['link_man']}" disabled="disabled" placeholder="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">联系电话:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="link_phone" value="{$data['first_party_info']['link_phone']}" disabled="disabled" placeholder="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">邮寄地址:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="address" value="{$data['first_party_info']['address']}" disabled="disabled" placeholder="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">公司税号:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="company_tax_no" disabled="disabled" value="{$data['first_party_info']['company_tax_no']}" placeholder="">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</if>
|
||||
<if condition="$data['second_party_info']">
|
||||
<div class="tab-content tabcon1711" id="secondPartBaseInfo">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l">乙方:</td>
|
||||
<td class="r">
|
||||
<div class="input-list input-list-game search_label_rehab">
|
||||
<select id="second_partner_id" name="partner_id" class="select_gallery">
|
||||
<option value="{$data['second_party_info']['id']}" selected>{$data['second_part_company']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tbody id="second_part_bser_info_show">
|
||||
<tr>
|
||||
<td class="l">联系人:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="link_man" value="{$data['second_party_info']['link_man']}" disabled="disabled" placeholder="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">联系电话:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="link_phone" value="{$data['second_party_info']['link_phone']}" disabled="disabled" placeholder="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">邮寄地址:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="address" value="{$data['second_party_info']['address']}" disabled="disabled" placeholder="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">公司税号:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="company_tax_no" value="{$data['second_party_info']['company_tax_no']}" disabled="disabled" placeholder="">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</if>
|
||||
</div>
|
||||
<if condition="$data['company']">
|
||||
<div style="padding: 30px 0px 10px;display: block;height:30px;">
|
||||
<div class="input-list input-list-server search_label_rehab">
|
||||
<p style="font-size: 20px;font-weight: 600;">支付给:<spen style="margin-left: 15px;font-size: 16px;">{$data.company}
|
||||
</spen>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</if>
|
||||
<div class="data_list box_mt" style="margin-top: 10px;">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="border-right: solid 1px #b6cad2;">结算时间</th>
|
||||
<th style="border-right: solid 1px #b6cad2;">合作产品</th>
|
||||
<th style="border-right: solid 1px #b6cad2;">渠道费率</th>
|
||||
<th style="border-right: solid 1px #b6cad2;">税费费率</th>
|
||||
<th>结算金额</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="statementShow">
|
||||
<foreach name="data.statement_info" item="it" >
|
||||
<tr>
|
||||
<td>{$it.statement_begin_time}-{$it.statement_end_time}</td>
|
||||
<td>{$it.game_name}</td>
|
||||
<if condition="$key eq 0">
|
||||
<td rowspan="{$data['statement_count']['list_count']}">{$it.promote_ratio|showNumPercent}</td>
|
||||
<td rowspan="{$data['statement_count']['list_count']}">{$it.fax_ratio|showNumPercent}</td>
|
||||
<td rowspan="{$data['statement_count']['list_count']}">{$data['statement_count']['statement_money']}</td>
|
||||
</if>
|
||||
</tr>
|
||||
</foreach>
|
||||
<tr style="border-top: solid 1px #b6cad2;">
|
||||
<td colspan=4>本月分成总金额(人民币大写):</td>
|
||||
<td>{$data.statement_count.big_ratio_money}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<if condition="$data['payinfo']">
|
||||
<div id="partpatinfo" style="display: flex;margin: auto;">
|
||||
<div class="tab-content tabcon1711" id="skf_payinfo">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l">收款方名称:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="" disabled="disabled" placeholder="" value="{$data.payinfo.payee_name}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">银行账号:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="" value="{$data.payinfo.bank_account}" disabled="disabled" placeholder="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">开户行:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="password" value="{$data.payinfo.opening_bank}" disabled="disabled" placeholder="请先选择支付给谁">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-content tabcon1711" id="fkf_payinfo">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l">付款方名称:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="" disabled="disabled" placeholder="" value="{$data.fkf_payinfo.payee_name}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">银行账号:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="" value="{$data.fkf_payinfo.bank_account}" disabled="disabled" placeholder="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">开户行:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="password" value="{$data.fkf_payinfo.opening_bank}" disabled="disabled" placeholder="请先选择支付给谁">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</if>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,149 @@
|
||||
<!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;
|
||||
}
|
||||
#statementShow td{
|
||||
line-height: 1.5;
|
||||
padding: 8px 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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="statementShow">
|
||||
<if condition = "empty($data)">
|
||||
<tr>
|
||||
<td colspan="50" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
</tr>
|
||||
</if>
|
||||
<foreach name="data" item="com">
|
||||
<foreach name="com.statement_info" item="st" key="g">
|
||||
<tr>
|
||||
<if condition = "$g eq 0">
|
||||
<td rowspan="{$com.row}">{$key-0+1}</td>
|
||||
<td rowspan="{$com.row}">{$com.partner}</td>
|
||||
</if>
|
||||
<td>{$st.game_name}</td>
|
||||
<td>{$st.game_type_name}</td>
|
||||
<td>{$st.statement_begin_time}-{$st.statement_end_time}</td>
|
||||
<td>{$st.pay_amount}</td>
|
||||
<td>{$st.ratio}%</td>
|
||||
<td>{$st.sum_money}</td>
|
||||
</tr>
|
||||
</foreach>
|
||||
</foreach>
|
||||
</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>
|
Binary file not shown.
Loading…
Reference in New Issue