master
chenzhi 5 years ago
parent 4e4da92420
commit eeec8b13f2

@ -171,42 +171,76 @@ class CompanyStatementPoolController extends ThinkController
}
$id = $_REQUEST['id'];
//获取基本信息
$dbres = $this->DBModel->where("id='{$id}'")->find();
$first_party_info = json_decode($dbres['first_party_info'],true);
$second_party_info = json_decode($dbres['second_party_info'],true);
$statement_info = json_decode($dbres['statement_info'],true);
if($dbres['pay_type'] == 2){
$company = $second_party_info['partner'];
$pyinfo = $second_party_info;
$fkf_pyinfo = $first_party_info;
}else{
$company = $first_party_info['partner'];
$pyinfo = $first_party_info;
$fkf_pyinfo = $second_party_info;
}
$senddata = array(
"company"=>$company,
"payinfo"=>$pyinfo,
"fkf_payinfo"=>$fkf_pyinfo,
"first_part_company"=>$first_party_info['partner'],
"second_part_company"=>$second_party_info['partner'],
"pay_type"=>$dbres['pay_type'],
"withdraw_type"=>$dbres['withdraw_type'],//2补丁
"first_party_info"=>$first_party_info,
"second_party_info"=>$second_party_info,
"statement_info"=>$statement_info,
"statement_count"=>array("pay_amount"=>$dbres['pay_amount'],"statement_money"=>$dbres['statement_money'],"big_ratio_money"=>convertAmountToCn($dbres['statement_money']))
);
$this->assign("data",$senddata);
if($dbres["company_belong"] == 9){
$infolist = M("company_statement_info","tab_")->where("pool_id = '{$id}'")->select();
if($infolist[0]['company_type'] == 1){
//上游
$this->display("viewCpStatement");
$line = 2;
}else{
$this->display("viewPcStatement");
$line = 1;
}
//初始值
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;
$v['statement_money_exp'] = "=";
foreach($v['statement_info'] as $ke=>&$va){
$line ++;
if($infolist[0]['company_type'] == 1){
$va['sum_money_exp'] = "=F{$line}*G{$line}";
$v['statement_money_exp'] .= "K{$line}+";
$va['company_ratio'] = 100-$va['ratio'];
}
}
if($infolist[0]['company_type'] == 1){
$v['statement_money_exp'] .= "M{$cline}-L{$cline}";
}
$v['statement_count'] = count($v['statement_info']);
}
// dd($infolist);
// $dbres = $this->DBModel->where("id='{$id}'")->find();
// $first_party_info = json_decode($dbres['first_party_info'],true);
// $second_party_info = json_decode($dbres['second_party_info'],true);
// $statement_info = json_decode($dbres['statement_info'],true);
// if($dbres['pay_type'] == 2){
// $company = $second_party_info['partner'];
// $pyinfo = $second_party_info;
// $fkf_pyinfo = $first_party_info;
// }else{
// $company = $first_party_info['partner'];
// $pyinfo = $first_party_info;
// $fkf_pyinfo = $second_party_info;
// }
// $senddata = array(
// "company"=>$company,
// "payinfo"=>$pyinfo,
// "fkf_payinfo"=>$fkf_pyinfo,
// "first_part_company"=>$first_party_info['partner'],
// "second_part_company"=>$second_party_info['partner'],
// "pay_type"=>$dbres['pay_type'],
// "withdraw_type"=>$dbres['withdraw_type'],//2补丁
// "first_party_info"=>$first_party_info,
// "second_party_info"=>$second_party_info,
// "statement_info"=>$statement_info,
// "statement_count"=>array("pay_amount"=>$dbres['pay_amount'],"statement_money"=>$dbres['statement_money'],"big_ratio_money"=>convertAmountToCn($dbres['statement_money']))
// );
$this->assign("data",$infolist);
// if($dbres["company_belong"] == 9){
// //上游
$this->display("viewCpPool");
// }else{
// $this->display("viewPcStatement");
// }
}
//审批通过
@ -416,7 +450,7 @@ class CompanyStatementPoolController extends ThinkController
$remark = $info['remark'];
//原始列表
$opBtn = [
"viewPool"=>"<a class='confirm viewStatement' data-id='{$id}'>查看</a>",
"viewPool"=>"<a class='confirm viewPool' data-id='{$id}'>查看</a>",
"addRemark"=>"<a class='confirm addRemark' data-id='{$id}'>新增备注</a>",
"editRemark"=>"<a class='confirm editRemark' data-remark='{$remark}' data-id='{$id}'>修改备注</a>",

@ -270,9 +270,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: "海南万盟天下科技有限公司",
@ -282,19 +282,7 @@
content: url
});
});
$(".editStatement").click(function () {
var id = $(this).data("id");
var url = "{:U('editStatement')}"+"&id="+id
layer.open({
type: 2,
title: "海南万盟天下科技有限公司",
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: url
});
});
$("#verifyAgree,#verifyRefuse,#cancelPool").on("click",function(){
var id = $(this).attr("id");

@ -0,0 +1,219 @@
<!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 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>
<!-- 表头 -->
<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.company_name}</td>
<td rowspan="{$com.statement_count}">{$com.statement_begin_time} ~ {$com.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]['sum_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['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['sum_money']}</td>
</tr>
</if>
</foreach>
</foreach>
</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>

@ -1,311 +0,0 @@
<!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 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>结算金额</th>
</tr>
<tr>
<th style="border-right: solid 1px #b6cad2;min-width: 50px;">甲方</th>
<th style="min-width: 50px;">乙方</th>
<th style="font-size: 10px;font-weight: 400;max-width: 100px;line-height: 1.2;">
结算金额=平台总额*1-渠道费)*分成比例*(1-税费费率)</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="$it['statement_type'] eq 1">
<td>-{$it.pay_amount}</td>
<else />
<td>{$it.pay_amount}</td>
</if>
<if condition="$it['statement_type'] eq 0">
<td>{$it.first_ratio}%</td>
<td>{$it.second_ratio}%</td>
<td>{$it.promote_ratio}%</td>
<td>{$it.fax_ratio}%</td>
<else />
<td></td>
<td></td>
<td></td>
<td></td>
</if>
<if condition="$it['statement_type'] eq 1">
<td>-{$it.sum_money}</td>
<else />
<td>{$it.sum_money}</td>
</if>
</tr>
<!-- {$key}|{$vo} -->
</foreach>
<tr>
<td>合计</td>
<td></td>
<td>{$data.statement_count.pay_amount}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$data.statement_count.statement_money}</td>
</tr>
<tr>
<td colspan=7>本月分成总金额(人民币大写):</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>
Loading…
Cancel
Save