3.22好功能提交

master
zhengyongxing 4 years ago
parent 5d08b3aeea
commit eb8c9cebc1

@ -370,13 +370,24 @@ class CompanyStatementController extends ThinkController
if ($value['game_name'] == "罚款" || $value['game_name'] == "奖励") {
$dbres['statement_info'][$key]['pay_amount'] = "-";
}
$real_statement_amount
= number_format($value['platform_money']*(1-$value['promote_ratio']/100)*($value['ratio']/100)*(1-$value["fax_ratio"]/100),2,'.','');;
if (!$dbres['statement_info'][$key]['other_amount']) {
$dbres['statement_info'][$key]['other_amount'] = number_format($value["sum_money"] - $real_statement_amount,2,'.','');
}
}
}
$this->assign("data", $dbres);
if ($dbres["company_belong"] == 9) {
//上游
$this->display("editCpStatement");
if (IS_SUBSITE) {
$this->display("editWmCpStatement");
} else {
$this->display("editCpStatement");
}
} else {
if ($dbres["withdraw_type"] == 3) {
if($dbres["company_type"] == 1){
@ -626,23 +637,23 @@ class CompanyStatementController extends ThinkController
$map['company_belong'] = 9;
$data = SM("company_statement","tab_")
->field("id,company_id,company_name,FROM_UNIXTIME(statement_begin_time,'%m') time,statement_money,platform_amount,statement_info")
->field("id,company_id,company_name,FROM_UNIXTIME(statement_begin_time,'%m') time,statement_money,platform_amount,statement_info,withdraw_type")
->where($map)
->select();
$use_data = [
"01"=>["time"=>"01","show_company_name"=>$data[0]["company_name"]],
"02"=>["time"=>"02","show_company_name"=>$data[0]["company_name"]],
"03"=>["time"=>"03","show_company_name"=>$data[0]["company_name"]],
"04"=>["time"=>"04","show_company_name"=>$data[0]["company_name"]],
"05"=>["time"=>"05","show_company_name"=>$data[0]["company_name"]],
"06"=>["time"=>"06","show_company_name"=>$data[0]["company_name"]],
"07"=>["time"=>"07","show_company_name"=>$data[0]["company_name"]],
"08"=>["time"=>"08","show_company_name"=>$data[0]["company_name"]],
"09"=>["time"=>"09","show_company_name"=>$data[0]["company_name"]],
"10"=>["time"=>"10","show_company_name"=>$data[0]["company_name"]],
"11"=>["time"=>"11","show_company_name"=>$data[0]["company_name"]],
"12"=>["time"=>"12","show_company_name"=>$data[0]["company_name"]],
"01"=>["time"=>"01","show_company_name"=>$data[0]["company_name"],"row"=>1],
"02"=>["time"=>"02","show_company_name"=>$data[0]["company_name"],"row"=>1],
"03"=>["time"=>"03","show_company_name"=>$data[0]["company_name"],"row"=>1],
"04"=>["time"=>"04","show_company_name"=>$data[0]["company_name"],"row"=>1],
"05"=>["time"=>"05","show_company_name"=>$data[0]["company_name"],"row"=>1],
"06"=>["time"=>"06","show_company_name"=>$data[0]["company_name"],"row"=>1],
"07"=>["time"=>"07","show_company_name"=>$data[0]["company_name"],"row"=>1],
"08"=>["time"=>"08","show_company_name"=>$data[0]["company_name"],"row"=>1],
"09"=>["time"=>"09","show_company_name"=>$data[0]["company_name"],"row"=>1],
"10"=>["time"=>"10","show_company_name"=>$data[0]["company_name"],"row"=>1],
"11"=>["time"=>"11","show_company_name"=>$data[0]["company_name"],"row"=>1],
"12"=>["time"=>"12","show_company_name"=>$data[0]["company_name"],"row"=>1],
];
$row = 0;
@ -688,7 +699,16 @@ class CompanyStatementController extends ThinkController
}
$data[$key]["statement_info"] = $statement_info;
$use_data[$value['time']] = $data[$key];
if (!$use_data[$value['time']]["statement_info"]) {
$use_data[$value['time']] = $data[$key];
}
else {
foreach ($statement_info as $sk => $sv) {
array_push($use_data[$value['time']]["statement_info"], $sv);
}
}
}
$sum[$ckey]["ratio"] = number_format($sum[$ckey]["ratio"]/$row,2,'.','')."%";
@ -699,6 +719,13 @@ class CompanyStatementController extends ThinkController
}
foreach ($assign_data as $key => $value) {
foreach ($value as $k => $v) {
$assign_data[$key][$k]["row"] = count($v["statement_info"])?count($v["statement_info"]):1;
}
}
// dump($assign_data);
$is_export= false;
if (isset($_REQUEST['is_export']) && $_REQUEST['is_export']==1){
$is_export = true;

@ -828,6 +828,9 @@ class MarketPercentageController extends ThinkController
$value['company_profit'] = "0.00";
}
//
$data[$key]['should_performance_commission'] = substr(number_format($value["performance_commission"] * ($market_percentage["performance_monthly_ratio"]/100), 4, '.', ''),0,-2)+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission'];
$data[$key]['should_month_bonus_ratio'] = substr(number_format($value["achievement_bonus"] * ($market_percentage["month_bonus_ratio"]/100), 4, '.', ''),0,-2) + $this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus'];
$data[$key]['extend_commission'] += $this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus'];
// dump($this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']);
@ -848,6 +851,11 @@ class MarketPercentageController extends ThinkController
$sum['extend_commission'] += $data[$key]['extend_commission'];
$sum['company_profit'] += $data[$key]['company_profit'];
$sum['should_performance_commission'] += $data[$key]['should_performance_commission'];
$sum['should_month_bonus_ratio'] += $data[$key]['should_month_bonus_ratio'];
$sum['wait_performance_commission'] += $data[$key]['wait_performance_commission'];
$sum['wait_achievement_commission'] += $data[$key]['wait_achievement_commission'];
}
// die();
@ -871,8 +879,12 @@ class MarketPercentageController extends ThinkController
'achievement_bonus' => '绩效考核奖金',
'coefficient' => '绩效系数',
'commission' => '当月合计',
'extend_commission' => '应发金额',
'wait_commission' => '待发金额',
// 'extend_commission' => '应发金额',
// 'wait_commission' => '待发金额',
'should_performance_commission'=>'本月应发业绩提成',
'should_month_bonus_ratio'=>'本月应发绩效考核奖金',
'wait_performance_commission'=>'待发业绩提成',
'wait_achievement_commission'=>'待发绩效考核奖金',
'coefficient_check_detail' => '绩效确认',
'market_check_detail' => '市场部确认',
'finance_check_detail' => '财务部审批'];

@ -0,0 +1,676 @@
<!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;">
<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_party_info']['partner']}</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="" placeholder="请输入联系人">
</td>
</tr>
<tr>
<td class="l">联系电话:</td>
<td class="r">
<input type="text" class="txt" name="link_phone" value="" placeholder="请输入联系电话">
</td>
</tr>
<tr>
<td class="l">邮寄地址:</td>
<td class="r">
<input type="text" class="txt" name="address" value="" placeholder="请输入地址">
</td>
</tr>
<tr>
<td class="l">公司税号:</td>
<td class="r">
<input type="text" class="txt" name="company_tax_no" value="" placeholder="请输入公司税号">
</td>
</tr>
</tbody>
</tbody>
</table>
</div>
<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_party_info']['partner']}</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="" disabled="disabled"
placeholder="请先选择合作公司">
</td>
</tr>
<tr>
<td class="l">联系电话:</td>
<td class="r">
<input type="text" class="txt" name="link_phone" value="" disabled="disabled"
placeholder="请先选择合作公司">
</td>
</tr>
<tr>
<td class="l">邮寄地址:</td>
<td class="r">
<input type="text" class="txt" name="address" value="" disabled="disabled"
placeholder="请先选择合作公司">
</td>
</tr>
<tr>
<td class="l">公司税号:</td>
<td class="r">
<input type="text" class="txt" name="company_tax_no" value="" disabled="disabled"
placeholder="请先选择合作公司">
</td>
</tr>
</tbody>
</tbody>
</table>
</div>
</div>
<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_name}
</spen>
</p>
</div>
</div>
<div class="data_list box_mt" style="margin-top: 40px;">
<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 rowspan="2" style="border-right: solid 1px #b6cad2;">税费费率</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">其他</th>
<th>结算金额</th>
</tr>
<tr>
<th style="font-size: 10px;font-weight: 400;max-width: 100px;line-height: 1.2;">
结算金额=平台总额*1-渠道费)*分成比例*(1-税费费率)</th>
</tr>
</thead>
<!-- 列表 -->
<tbody id="statementInit" class="">
<tr style="height: 100px;">
<td colspan=8>
请先选择生成条件后点击生成对账数据
</td>
</tr>
</tbody>
<tbody id="statementShow">
</tbody>
</table>
</div>
</div>
<div id="partpatinfo" style="display: flex;margin: auto;">
<div class="tab-content tabcon1711" id="skf_payinfo">
<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" disabled="disabled" placeholder="" name="invoice_item" value="{$data.payinfo.invoice_content}">
</td>
</tr>
<tr>
<td class="l">发票类型:</td>
<td class="r">
<div class="input-list input-list-game search_label_rehab">
<select id="invoice_type" name="invoice_type" class="select_gallery" disabled>
<option value="0" <if condition="$data['payinfo']['invoice_type'] eq 0">selected</if>>无</option>
<option value="1" <if condition="$data['payinfo']['invoice_type'] eq 1">selected</if>>专票</option>
<option value="2" <if condition="$data['payinfo']['invoice_type'] eq 2">selected</if>>普票</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="search_list" style="display:flex;justify-content:flex-end;width:960px;">
<div class="input-list" style="margin-left: 30px;float: right;">
<a class="sch-btn" href="javascript:;" id="createStatement" style="width: 150px;">确认修改</a>
</div>
</div>
<script type="text/html" id="partbasetpl">
<tr>
<td class="l">联系人:</td>
<td class="r">
<input type="text" class="txt normalchange" data-change="${type}.link_man" name="link_man" value="${link_man|nonull}" placeholder="请输入联系人">
</td>
</tr>
<tr>
<td class="l">联系电话:</td>
<td class="r">
<input type="text" class="txt normalchange" name="link_phone" data-change="${type}.link_phone" value="${link_phone|nonull}" placeholder="请输入联系电话">
</td>
</tr>
<tr>
<td class="l">邮寄地址:</td>
<td class="r">
<input type="text" class="txt normalchange" name="address" data-change="${type}.address" value="${address|nonull}" placeholder="请输入地址">
</td>
</tr>
<tr>
<td class="l">公司税号:</td>
<td class="r">
<input type="text" class="txt normalchange" name="company_tax_no" data-change="${type}.company_tax_no" value="${company_tax_no|nonull}" placeholder="请输入公司税号">
</td>
</tr>
</script>
<script type="text/html" id="partpaytpl">
<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 normalchange" data-change="${skf_type}.payee_name" name="payee_name" placeholder="" value="${skf_party_info.payee_name}">
</td>
</tr>
<tr>
<td class="l">银行账号:</td>
<td class="r">
<input type="text" class="txt normalchange" data-change="${skf_type}.bank_account" name="bank_account" value="${skf_party_info.bank_account}" placeholder="">
</td>
</tr>
<tr>
<td class="l">开户行:</td>
<td class="r">
<input type="text" class="txt normalchange" data-change="${skf_type}.opening_bank" name="opening_bank" value="${skf_party_info.opening_bank}" 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 normalchange" data-change="${fkf_type}.payee_name" name="payee_name" placeholder="" value="${fkf_party_info.payee_name}">
</td>
</tr>
<tr>
<td class="l">银行账号:</td>
<td class="r">
<input type="text" class="txt normalchange" data-change="${fkf_type}.bank_account" name="bank_account" value="${fkf_party_info.bank_account}" placeholder="">
</td>
</tr>
<tr>
<td class="l">开户行:</td>
<td class="r">
<input type="text" class="txt normalchange" data-change="${fkf_type}.opening_bank" name="opening_bank" value="${fkf_party_info.opening_bank}" placeholder="请先选择支付给谁">
</td>
</tr>
</tbody>
</table>
</div>
</script>
<script type="text/html" id="statementTpl">
{@each statement_info as it,index}
<tr>
<td>${it.statement_begin_time}~${it.statement_end_time}</td>
<td>${it.game_name}</td>
{@if it.statement_type==1}
<td>-${it.pay_amount}元</td>
{@else}
<td>${it.pay_amount}元</td>
{@/if}
<td>${it.aggregate_money}</td>
{@if it.statement_type==0}
<td><input type="text" class="txt statementchange" name="first_ratio" data-index ="${index}" data-change="statement_info[${index}]['first_ratio']" value="${it.first_ratio}" style="width: 40px;">%</td>
<td><input type="text" class="txt statementchange" name="promote_ratio" data-index ="${index}" data-change="statement_info[${index}]['promote_ratio']" value="${it.promote_ratio}" style="width: 40px;">%</td>
<td><input type="text" class="txt statementchange" name="fax_ratio" data-index ="${index}" data-change="statement_info[${index}]['fax_ratio']" value="${it.fax_ratio}" style="width: 40px;">%</td>
<td><input type="text" class="txt statementchange other_amount" name="other_amount" data-index ="${index}" data-change="statement_info[${index}]['other_amount']" value="${it.other_amount?it.other_amount:0}" style="width: 60px;"></td>
{@else}
<td></td>
<td></td>
<td></td>
<td></td>
{@/if}
{@if it.statement_type==1}
<td>-<input type="text" class="txt statementchange sum_money" name="sum_money" data-index ="${index}" data-change="statement_info[${index}]['sum_money']" value="${it.sum_money}" style="width: 40px;">
<input type="text" class="txt statementchange old_sum_money" name="old_sum_money" data-index ="${index}" data-change="statement_info[${index}]['sum_money']" value="${it.sum_money}" style="width: 40px;display: none">
</td>
{@else}
<td><input type="text" class="txt statementchange sum_money" name="sum_money" data-index ="${index}" data-change="statement_info[${index}]['sum_money']" value="${it.sum_money}" style="width: 40px;">
<input type="text" class="txt statementchange old_sum_money" name="old_sum_money" data-index ="${index}" data-change="statement_info[${index}]['sum_money']" value="${it.sum_money}" style="width: 40px;display: none"></td>
{@/if}
</tr>
{@/each}
<tr>
<td>合计</td>
<td></td>
<td>${pay_amount}元</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>${statement_money}元</td>
</tr>
<tr>
<td colspan=8>本月分成总金额(人民币大写):</td>
<td>${statement_money|number_chinese}</td>
</tr>
</script>
<script>
$(function () {
TPLSHOW.juicerInit();
$(".select_gallery").select2();
$('#time_start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true
});
$('#datetimepicker').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
pickerPosition: 'bottom-left'
})
EVENT.changeCompany();
EVENT.createStatement();
$("#first_partner_id").change();
// $("#second_partner_id").change();
});
//基础类
var PUBLIC = {
postData(url, data, callback) {
$.ajax({
url: url,
data: data,
type: "post",
dataType: "json",
success: function (data) {
callback(data)
}
})
},
floatAdd(a,b){
return Math.round(a*100+b*100)/100;
},
floatCut(a,b){
return Math.round(a*100-b*100)/100;
},
CompanyKeyName:{
id:"公司表id",
partner:"公司名称",
link_man:'联系人',
link_phone:"联系电话",
address:'邮寄地址',
company_tax_no:'公司税号',
payee_name:'名称',
bank_account:"银行账号",
opening_bank:"开户行"
}
}
//数据类
var DATAOBJ = {$data|json_encode=###,JSON_UNESCAPED_UNICODE};
var YDATAOBJ = {$data|json_encode=###,JSON_UNESCAPED_UNICODE};
//事件类
var EVENT = {
changeCompany() {
$("#first_partner_id").on("change", function () {
TPLSHOW.firstPartInfo(DATAOBJ.first_party_info);
TPLSHOW.secondPartInfo(DATAOBJ.second_party_info);
TPLSHOW.showPartPayInfo();
TPLSHOW.showStatementList(true);
})
$("#first_partner_id").on("change", function () {
TPLSHOW.secondPartInfo(DATAOBJ.second_party_info);
})
},
createStatement() {
$("#createStatement").on("click", function () {
//TODO:验证信息
layer.load(2);
PUBLIC.postData("{:U('editStatement')}",DATAOBJ,function(data){
if(data.code == 0){
layer.closeAll('loading');
layer.msg('修改成功');
setTimeout(function(){
window.parent.reload();
},350);
}else{
alert("修改失败,请联系管理员")
}
});
//发送添加请求
})
},
normalchange() {
$(".normalchange").off("blur");
$(".normalchange").on("blur", function () {
var val = $(this).val();
var index = $(this).data("change");
var str = "DATAOBJ." + index + "='" + val + "';";
eval(str);
if (val !== eval("YDATAOBJ." + index)) {
isedit = true;
}
})
},
statementchange() {
$(".statementchange").off("blur");
$(".statementchange").on("blur",function(){
var sort = $(this).data("change");
var val = $(this).val();
var vdata = eval("DATAOBJ."+sort);//原先值
var dom = $(this);
var type = $(this).attr("name");
if(!CHECK.number.test(val)){
layer.msg('结算单中的罚款和税率必须是数字,且不能为空');
dom.val(vdata);
return false;
}
var str = "DATAOBJ."+sort+"='"+val+"';";
if((val > 100 || val < 0)&&type!='other_amount'&&type!="sum_money"){
layer.msg('结算单中的税率不允许大于100和小于0');
dom.val(vdata);
return false;
}
eval(str);
var index = $(this).data("index");
var td = DATAOBJ.statement_info[index];
if( $(this).attr("name") == "first_ratio"){
td['second_ratio'] = 100-val;
}
if( $(this).attr("name") == "second_ratio"){
td['first_ratio'] = 100-val;
}
if(DATAOBJ.pay_type == 1){
//甲方收款
var ratio = td['first_ratio']/100;
}else{
//乙方
var ratio = td['second_ratio']/100;
}
var old_sum_money = parseFloat($(this).parent().parent().find(".old_sum_money").val());
DATAOBJ.statement_money = PUBLIC.floatCut(DATAOBJ.statement_money,old_sum_money);
if (type!="sum_money") {
td['sum_money'] = Math.round((td['pay_amount']*(100-td['promote_ratio'])/100*ratio*(100-td['fax_ratio'])/100)* 100) / 100 ;
} else {
td['sum_money'] = $(this).parent().parent().find(".sum_money").val();
}
// DATAOBJ.statement_money = 0;
td['other_amount'] = $(this).parent().parent().find(".other_amount").val();
DATAOBJ.statement_money=PUBLIC.floatAdd(DATAOBJ.statement_money,td['sum_money']);
$(this).parent().parent().find(".old_sum_money").val(td['sum_money'])
TPLSHOW.showStatementList(true);
})
}
}
var CHECK = {
number: /^\d+(\.{1}\d+)?$/,
mobile: /^1[3456789]\d{9}$/,
BankNo: /^([1-9]{1})\d{10,19}$/,
money: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/
}
//
var TPLSHOW = {
juicerInit() {
var nonull = function (data) {
if (!data) {
return '';
}
return data;
};
var number_chinese = function (str) {
var num = parseFloat(str);
var strOutput = "",
strUnit = '仟佰拾亿仟佰拾万仟佰拾元角分';
num += "00";
var intPos = num.indexOf('.');
if (intPos >= 0) {
num = num.substring(0, intPos) + num.substr(intPos + 1, 2);
}
strUnit = strUnit.substr(strUnit.length - num.length);
for (var i = 0; i < num.length; i++) {
strOutput += '零壹贰叁肆伍陆柒捌玖'.substr(num.substr(i, 1), 1) + strUnit.substr(i, 1);
}
return strOutput.replace(/零角零分$/, '整').replace(/零[仟佰拾]/g, '零').replace(/零{2,}/g, '零').replace(/零([亿|万])/g, '$1').replace(/零+元/, '元').replace(/亿零{0,3}万/, '亿').replace(/^元/, "零元")
}
juicer.register('nonull', nonull);
juicer.register('number_chinese', number_chinese);
},
//
firstPartInfo(data) {
var tpl = $("#partbasetpl").html();
data.type = "first_party_info";
var html = juicer(tpl, data);
$("#first_part_bser_info_show").html(html);
TPLSHOW.pushStatementTypeOption();
},
secondPartInfo(data) {
var tpl = $("#partbasetpl").html();
data.type ="second_party_info";
var html = juicer(tpl, data);
$("#second_part_bser_info_show").html(html);
TPLSHOW.pushStatementTypeOption();
},
//支付给公司
pushStatementTypeOption() {
EVENT.normalchange();
},
//支付信息显示
showPartPayInfo() {
var data = {};
if (DATAOBJ.pay_type == 1) {
data.skf_party_info = DATAOBJ.first_party_info;
data.skf_type ="first_party_info";
data.fkf_party_info = DATAOBJ.second_party_info;
data.fkf_type ="second_party_info";
} else {
data.skf_party_info = DATAOBJ.second_party_info;
data.skf_type ="second_party_info";
data.fkf_party_info = DATAOBJ.first_party_info;
data.fkf_type ="first_party_info";
}
var tpl = $("#partpaytpl").html();
var html = juicer(tpl, data);
$("#partpatinfo").html(html);
EVENT.normalchange();
},
//订单信息显示
showStatementList(flag) {
if (flag) {
var data = DATAOBJ;
console.log(data);
$("#statementInit").addClass("hidebox");
var tpl = $("#statementTpl").html();
var html = juicer(tpl, data);
$("#statementShow").html(html);
EVENT.statementchange();
}
}
}
</script>
</body>
</html>

@ -128,7 +128,7 @@
<td rowspan="{$datas['row']}">{$datas['show_company_name']}</td>
<td rowspan="{$datas['row']}">{$time}年{$datas["time"]}月</td>
<if condition="$datas['statement_info'][0]['statement_type'] gt 0">
<td>{$datas['statement_info'][0]['game_name']|default="--"}</td>
<td>{$datas['statement_info'][0]['game_name']|default="--"}<if condition="$datas['statement_info'][0]['withdraw_type'] eq 0 and $datas['statement_info'][0]['statement_begin_time']">({$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']})</if></td>
<td>--</td>
<td>--</td>
<td>--</td>
@ -138,7 +138,7 @@
<td>--</td>
<td><if condition="$datas['statement_info'][0]['statement_type'] eq 2">-</if>{$datas['statement_info'][0]['sum_money']|default="--"}</td>
<else/>
<td>{$datas['statement_info'][0]['game_name']|default="--"}</td>
<td>{$datas['statement_info'][0]['game_name']|default="--"}<if condition="$datas['statement_info'][0]['withdraw_type'] eq 0 and $datas['statement_info'][0]['statement_begin_time']">({$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']})</if></td>
<td>{$datas['statement_info'][0]['platform_money']|default="--"}</td>
<td>{$datas['statement_info'][0]['aggregate_money']|default="--"}</td>
<td>{$datas['statement_info'][0]['sum_amount']|default="--"}</td>
@ -154,7 +154,7 @@
<foreach name="datas['statement_info']" item="statement_info" key="skey">
<if condition="$skey gt 0">
<if condition="$statement_info['statement_type'] gt 0">
<td>{$statement_info['game_name']|default="--"}</td>
<td>{$statement_info['game_name']|default="--"}<if condition="$datas['statement_info'][0]['withdraw_type'] eq 0 and $statement_info['statement_begin_time']">({$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']})</if></td>
<td>--</td>
<td>--</td>
<td>--</td>
@ -165,7 +165,7 @@
<td><if condition="$statement_info['statement_type'] eq 2">-</if>{$statement_info['sum_money']|default="--"}</td>
<else/>
<tr>
<td>{$statement_info['game_name']|default="--"}</td>
<td>{$statement_info['game_name']|default="--"}<if condition="$datas['statement_info'][0]['withdraw_type'] eq 0 and $statement_info['statement_begin_time']">({$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']})</if></td>
<td>{$statement_info['platform_money']|default="--"}</td>
<td>{$statement_info['aggregate_money']|default="--"}</td>
<td>{$statement_info['sum_amount']|default="--"}</td>

@ -202,8 +202,12 @@
<th ><div class="tooltip">绩效考核奖金<span class="tooltiptext"><span style="margin-left: -10px">当月开发税后毛利奖金与维护税后毛利奖金之和</span></span></div></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>
@ -232,8 +236,16 @@
<td>{$data['achievement_bonus']|default='0.00'}</td>
<td>{$data['coefficient']|default='1'}</td>
<td>{$data['commission']|default='0.00'}</td>
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'admin_id'=>$data['admin_id']))}" >{$data['extend_commission']|default='0.00'}</a></td>
<td><a href="{:U('MarketPercentage/showBonusList',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'real_name'=>$data['real_name'],'level'=>$data['group_id']))}" >{$data['wait_commission']|default='0.00'}</a></td>
<!-- <td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'admin_id'=>$data['admin_id']))}" >{$data['extend_commission']|default='0.00'}</a></td>-->
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'admin_id'=>$data['admin_id']))}" >{$data['should_performance_commission']|default='0.00'}</a></td>
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'admin_id'=>$data['admin_id']))}" >{$data['should_month_bonus_ratio']|default='0.00'}</a></td>
<!-- <td><a href="{:U('MarketPercentage/showBonusList',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'real_name'=>$data['real_name'],'level'=>$data['group_id']))}" >{$data['wait_commission']|default='0.00'}</a></td>-->
<td><a href="{:U('MarketPercentage/showBonusList',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'real_name'=>$data['real_name'],'level'=>$data['group_id']))}" >{$data['wait_performance_commission']|default='0.00'}</a></td>
<td><a href="{:U('MarketPercentage/showBonusList',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'real_name'=>$data['real_name'],'level'=>$data['group_id']))}" >{$data['wait_achievement_commission']|default='0.00'}</a></td>
<td><if condition="$data.coefficient_check eq 0"><span ></if>{$data['coefficient_check_detail']|default=''}<if condition="$data.market_check eq 1"></span></if></td>
<td><if condition="$data.market_check eq 0"><span ></if>{$data['market_check_detail']|default=''}<if condition="$data.market_check eq 1"></span></if></td>
<td><if condition="$data.finance_check eq 0"><span ></if>{$data['finance_check_detail']|default=''}<if condition="$data.market_check eq 1"></span></if></td>
@ -254,8 +266,8 @@
<td>{$sum['achievement_bonus']|default='0.00'}</td>
<td></td>
<td>{$sum['commission']|default='0.00'}</td>
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$start_time,'time_end'=>$end_time))}" >{$sum['extend_commission']|default='0.00'}</a></td>
<td></td>
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$start_time,'time_end'=>$end_time))}" >{$sum['should_performance_commission']|default='0.00'}</a></td>
<td><a href="{:U('MarketPercentage/personMarketStaffSettle',array('time_start'=>$start_time,'time_end'=>$end_time))}" >{$sum['should_month_bonus_ratio']|default='0.00'}</a></td>
<td></td>
<td></td>
<td></td>

@ -2794,4 +2794,8 @@ ALTER TABLE `tab_company_statement_info`
ADD COLUMN `is_reward_fine_split` tinyint(255) NULL DEFAULT 0 COMMENT '是否是奖罚分离生成 0 否 1 是' AFTER `pay_check_time`;
ALTER TABLE `platform_wm`.`tab_company_statement_pool`
ADD COLUMN `wm_statement_ids` int(11) NOT NULL DEFAULT 0 COMMENT '子系统财务结算单id' AFTER `remark`;
ADD COLUMN `wm_statement_ids` int(11) NOT NULL DEFAULT 0 COMMENT '子系统财务结算单id' AFTER `remark`;
ALTER TABLE `tab_reward_record`
ADD COLUMN `is_verify` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否审核' AFTER `settlement_time`,
ADD COLUMN `verify_detail` longtext NULL COMMENT '审核详情' AFTER `is_verify`;

Loading…
Cancel
Save