Merge branch 'feature/add_item' of wmtx/platform into release

9.29号后台功能提交
master
郑永星 5 years ago committed by Gogs
commit cb5e1c3b30

@ -2497,7 +2497,7 @@ function getCompanyBlongOther($id = -1)
$data = array(
["id"=>0,'name'=>"无"],
["id"=>1,'name'=>"自主开发"],
["id"=>2,'name'=>"自主开发及维护"],
// ["id"=>2,'name'=>"自主开发及维护"],
["id"=>3,'name'=>"只维护"]
);
if($id > -1){
@ -2812,8 +2812,9 @@ function getPromoteIdsByTopIds($ids)
function getCompanyDevelopTypes()
{
return [
0 => '无',
1 => '自主开发',
2 => '自主开发及维护',
// 2 => '自主开发及维护',
3 => '只维护',
];
}
@ -2821,10 +2822,11 @@ function getCompanyDevelopTypes()
function getCompanyDevelopTypesOther()
{
return [
0 => '无',
1 => '自主开发',
2 => '自主开发及维护',
// 2 => '自主开发及维护',
3 => '只维护',
'1,2'=>'自主开发&自主开发及维护'
'1,2'=>'自主开发&自主开发及维护',
];
}

@ -240,7 +240,20 @@ class CompanyStatementController extends ThinkController
$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);
foreach ($statement_info as $key => $value) {
if ($value['game_name'] == "罚款" ) {
$dbres['pay_amount'] = $dbres['pay_amount'] + $statement_info[$key]['pay_amount'];
$statement_info[$key]['pay_amount'] = "-";
}
if ($value['game_name'] == "奖励") {
$dbres['pay_amount'] = $dbres['pay_amount'] - $statement_info[$key]['pay_amount'];
$statement_info[$key]['pay_amount'] = "-";
}
}
if($dbres['pay_type'] == 2){
$company = $second_party_info['partner'];
$pyinfo = $second_party_info;
@ -263,6 +276,7 @@ class CompanyStatementController extends ThinkController
"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){
@ -332,6 +346,15 @@ class CompanyStatementController extends ThinkController
$dbres['first_party_info'] = json_decode($dbres['first_party_info'], true);
$dbres['second_party_info']= json_decode($dbres['second_party_info'], true);
$dbres['statement_info'] = json_decode($dbres['statement_info'], true);
if(is_array($dbres['statement_info'])) {
foreach ($dbres['statement_info'] as $key => $value) {
if ($value['game_name'] == "罚款" || $value['game_name'] == "奖励") {
$dbres['statement_info'][$key]['pay_amount'] = "-";
}
}
}
$this->assign("data", $dbres);
if ($dbres["company_belong"] == 9) {
//上游
@ -486,6 +509,15 @@ class CompanyStatementController extends ThinkController
$data['first_party_info'] = json_decode($data['first_party_info'], 1);//甲方
$data['second_party_info'] = json_decode($data['second_party_info'], 1);//乙方
$data['statement_info'] = json_decode($data['statement_info'], 1);//结算记录
if(is_array($data['statement_info'])) {
foreach ($data['statement_info'] as $key => $value) {
if ($value['game_name'] == "罚款" || $value['game_name'] == "奖励") {
$data['statement_info'][$key]['pay_amount'] = "-";
}
}
}
//收款方
$all_sum_money = $data['pay_amount'];//合计平台总额
$all_pay_amount = $data['statement_money'];//合计结算金额
@ -1402,6 +1434,16 @@ class CompanyStatementController extends ThinkController
$data = json_decode($_REQUEST['data'],true);
$company_ids = implode(',',array_column($data,'company_id'));
if ($company_ids) {
$inside = M("promote_company",'tab_')->field("company_name")->where(['id'=>['in',$company_ids],'is_inside'=>1])->select();
$inside = implode(',',array_column($inside,'company_name'));
$this->ajaxReturn(['status'=>0,'msg'=>$inside.'为内部公司不能添加特殊补点']);
}
$withdraw_type = 3;
$statement_data = [];
M()->startTrans();

@ -225,10 +225,14 @@ class CompanyStatementLackController extends ThinkController
}
}
}
$Pool = M("company_statement_pool","tab_");
$Statemen = M("company_statement","tab_");
foreach ($datas as $k => $v) {
if(count($v['company_list']) <= 0){continue;}
//保存公司信息
$company_list = $v['company_list'];
foreach ($company_list as $ke => $va) {
@ -334,6 +338,7 @@ class CompanyStatementLackController extends ThinkController
$v['statement_info'] = json_decode( $v['statement_info'],true);
$fine = $v['fine'];
$reward = $v['reward'];
$savedata['withdraw_type'] = $v['withdraw_type'];
if(isset($savedata['company_list'][$v['company_id']])){
//存在游戏合并

@ -168,6 +168,7 @@ class CompanyStatementPoolController extends ThinkController
$v['oplist'] = $this->OpAuth($v);
}
// dump($data);die();
$count = $this->DBModel->field("count(id) count,SUM(statement_money) as statement_money,SUM(lack_statement_money) lack_statement_money")->where($map)->find();
// dd($count);
$params['p'] = $page;
@ -222,8 +223,35 @@ class CompanyStatementPoolController extends ThinkController
}
}
//个人汇总结算查看
public function viewPuPool(&$infolist,$is_export){
public function editPool() {
if(!isset($_REQUEST['id'])){
$this->error('参数错误');
}
$id = $_REQUEST['id'];
$is_export= false;
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
$is_export = true;
}
//获取基本信息
$infolist = M("company_statement_info","tab_")->field("*,'1' as st")->where("pool_id = '{$id}'")->select();
//获取母单
$pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids,verify_status,is_payment,withdraw_type')->where("id={$id}")->find();
if(!empty($pool_info['create_lack_ids'])){
$l_ids = $pool_info['create_lack_ids'];
$lack_info = M("company_lack_statement_info","tab_")->field("*,'0' as st")->where("id in ({$l_ids})")->select();
$infolist =array_merge($infolist,$lack_info);
}
$statement_num = $pool_info['statement_num'];
$this->assign("title",$statement_num);
$this->assign("pool_status",$pool_info['verify_status']);
$this->assign("is_payment",$pool_info['is_payment']);
$this->editPuPool($infolist,$is_export);
}
public function editPuPool(&$infolist,$is_export) {
$line = 1;
$count = [];
//获取对接人
@ -243,25 +271,43 @@ class CompanyStatementPoolController extends ThinkController
if($is_export){
$v['statement_money'] = "=ROUND(";
}
$row = 0;
foreach($v['statement_info'] as $ke=>&$va){
$va['row'] = count($va['game_list']);
$row += count($va['game_list']);
foreach($va['game_list'] as $key=>&$val){
$line ++;
if($v['withdraw_type'] != 3) {
if(isset($val['ratio'])){
// if(!$val['ratio']&&!$val['increment_ratio']) {
// if(isset($val['ratio'])){
// $val['increment_ratio'] = 0;
// }else{
// $val['ratio'] = 0;
// }
// }
if (!$val['increment_ratio']) {
$val['increment_ratio'] = 0;
}else{
}
if (!$val['ratio']) {
$val['ratio'] = 0;
}
if (!$val['refund']) {
$val['refund'] = 0;
}
// if(isset($val['ratio'])){
// $val['increment_ratio'] = 0;
// }else{
// $val['ratio'] = 0;
// }
}
if($is_export){
if($v['withdraw_type'] != 3) {
$val['sum_money'] = "=ROUND(K{$line}*(L{$line}+M{$line}),2)";
$val['sum_money'] = "=ROUND((K{$line}-L{$line})*(M{$line}+N{$line}),2)";
} else {
$val['sum_money'] = "=ROUND(K{$line}*(M{$line}),2)";
}
@ -289,6 +335,86 @@ class CompanyStatementPoolController extends ThinkController
$this->assign("data",$infolist);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->display("CompanyStatementPool/editPuPool");
}
//个人汇总结算查看
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']);
if( isset($v['verify_status'])){
if( $v['verify_status'] ==2 ){
$v['is_payment'] = 2; //不打款
}else{
$v['is_payment'] = 1;
}
}
$cline = $line+1;
if($is_export){
$v['statement_money'] = "=ROUND(";
}
$row = 0;
foreach($v['statement_info'] as $ke=>&$va){
$va['row'] = count($va['game_list']);
$row += count($va['game_list']);
foreach($va['game_list'] as $key=>&$val){
$line ++;
if($v['withdraw_type'] != 3) {
// if(!$val['ratio']&&!$val['increment_ratio']) {
// if(isset($val['ratio'])){
// $val['increment_ratio'] = 0;
// }else{
// $val['ratio'] = 0;
// }
// }
if (!$val['increment_ratio']) {
$val['increment_ratio'] = 0;
}
if (!$val['ratio']) {
$val['ratio'] = 0;
}
}
if($is_export){
if($v['withdraw_type'] != 3) {
$val['sum_money'] = "=ROUND((K{$line}-L{$line})*(M{$line}+N{$line}),2)";
} else {
$val['sum_money'] = "=ROUND(K{$line}*(N{$line}),2)";
}
$v['statement_money'] .= "O{$line}+";
}else{
$count['platform_amount'] += $val['pay_amount'];
$count['sum_money'] += $val['sum_money'];
}
}
}
$v['row'] = $row;
if($is_export){
if($v['withdraw_type'] != 3) {
$v['statement_money'] .="P{$cline}-Q{$cline},2)";
} else {
$v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1).",2)";
}
}
}
if($is_export){
$count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)";
$count["sum_money"] = "=ROUND(SUM(R2:R".$line."),2)";
}
$this->assign("data",$infolist);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->display("CompanyStatementPool/viewPuPool");
}
//下游汇总结算查看
@ -458,6 +584,30 @@ class CompanyStatementPoolController extends ThinkController
public function verifyRefuse(){
$this->setVerifyStatus(0,-1,"verify");
}
//审批撤回
public function verifyReturn() {
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
$ids = $_REQUEST['ids'];
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
foreach($dbres as $k=>&$v){
if($v['verify_status'] != -1&&$v['verify_status'] != 1) continue;
$v['verify_log'] = json_decode($v['verify_log'],true);
unset($v['verify_log']['verify_user']);
unset($v['verify_log']['verify_time']);
$v['verify_log'] = json_encode($v['verify_log']);
$v['verify_status']=0;
$this->DBModel->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"审批撤回",'url'=>U('lists')]);
}
$this->ajaxReturn(array(
'status' => 1,
"info"=>"审批撤回成功"
));
}
//线下打款
public function setUlPayment()
{
@ -948,6 +1098,8 @@ class CompanyStatementPoolController extends ThinkController
$opBtn = [
"viewPool"=>"<a class='confirm viewPool' data-id='{$id}'>查看</a>",
"editPool"=>"<a class='confirm editPool' 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>",
"viewRemark"=>"<a class='confirm viewRemark' data-remark='{$remark}' data-id='{$id}'>查看备注</a>",
@ -1016,6 +1168,10 @@ class CompanyStatementPoolController extends ThinkController
$optist = ['viewPool','cancelPool'];
}
if($info['company_type'] == 2 && $info['verify_status'] == '0'&&$info['withdraw_type'] != "特殊补点") {
array_push($optist,"editPool");
}
if(empty($info['ext_file'])){
//未上传凭证
$optist = array_diff($optist, ["viewVoucher", "editVoucher"]);
@ -1054,6 +1210,7 @@ class CompanyStatementPoolController extends ThinkController
$mentBtn = [
"verifyAgree"=>"<a class='butn' id='verifyAgree'>审批通过</a>",
"verifyRefuse"=>"<a class='butn' id='verifyRefuse' style='background-color: red;'>审核拒绝</a>",
"verifyReturn"=>"<a class='butn' id='verifyReturn'>审批撤回</a>",
"export"=>"<a class='butn' id='export'>导出</a>"
];
$resarr = [];
@ -1069,4 +1226,71 @@ class CompanyStatementPoolController extends ThinkController
return $resarr;
}
public function editCompanyStatementPool() {
$data = $_POST;
if (!$data) {
$this->ajaxReturn(['status'=>0,'info'=>'数据错误']);
}
$ratio = $data['ratio'];
$refund = $data['refund'];
$increment_ratio = $data['increment_ratio'];
$sum_money = $data['sum_money'];
$st = $data['st'];
$id = $data['id'];
$remark = $data['remark'];
$amount = 0;
$statement_amount = 0;
$statement_lack_amount = 0;
foreach ($ratio as $key => $value) {
if ($st[$key] == 1) {
$model = M("company_statement_info","tab_");
} else {
$model = M("company_lack_statement_info","tab_");
}
$statement_data = $model->where(['id'=>$key])->find();
$statement_info = json_decode($statement_data['statement_info'],true);
foreach ($statement_info as $k => $v) {
$game_list = $v['game_list'];
foreach ($game_list as $gk => $gv) {
$statement_info[$k]['game_list'][$gk]['ratio'] = $ratio[$key][$v['account']][$gk];
$statement_info[$k]['game_list'][$gk]['refund'] = $refund[$key][$v['account']][$gk];
$statement_info[$k]['game_list'][$gk]['increment_ratio'] = $increment_ratio[$key][$v['account']][$gk];
$statement_info[$k]['game_list'][$gk]['sum_money'] = $sum_money[$key][$v['account']][$gk];
$amount += $sum_money[$key][$v['account']][$gk];
if ($st[$key] == 1) {
$statement_amount += $sum_money[$key][$v['account']][$gk];
} else {
$statement_lack_amount += $sum_money[$key][$v['account']][$gk];
}
// dump($v['account']);
// dump($sum_money[$key][$v['account']][$gk]);
}
}
$statement_info = json_encode($statement_info);
$model->where(['id'=>$key])->save(['statement_info'=>$statement_info,'statement_money'=>$amount,'pay_amount'=>$amount,'remark'=>$remark[$key]]);
$amount = 0;
}
M("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount,'lack_statement_money'=>$statement_lack_amount]);
$this->ajaxReturn(['status'=>1,'info'=>'保存成功']);
}
}

@ -20,6 +20,7 @@ class MarketPercentageController extends ThinkController
$_REQUEST['relation_game_id']?($map['relation_game_id'] = $_REQUEST['relation_game_id']):'';
$_REQUEST['sdk_version']?($map['sdk_version'] = $_REQUEST['sdk_version']):'';
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
$_REQUEST['company_id']?($map['company_id'] = $_REQUEST['company_id']):'';
$admin_id = $_SESSION['onethink_admin']['user_auth']['uid'];
$map['admin_id'] = $admin_id;
@ -87,7 +88,7 @@ class MarketPercentageController extends ThinkController
// var_dump($map);die();
$data = M("settleup_marketorder","tab_")
->field("pay_time,promote_account,company_belong,member.real_name,develop_type,game_name,
->field("pay_time,promote_account,company_name,company_belong,member.real_name,develop_type,game_name,
sum(pay_amount) pay_amount,sum(cp_amount) cp_amount,sum(promote_amount) promote_amount,
sum(channel_amount) channel_amount, sum(company_tax) company_tax,sum(company_profit) company_profit")
->join("left join sys_member member on member.uid=admin_id");
@ -225,11 +226,8 @@ class MarketPercentageController extends ThinkController
die();
}
}
$search_date = [];
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
@ -308,12 +306,21 @@ class MarketPercentageController extends ThinkController
->where($map)
->count();
$page = set_pagination($count, $row);
$page = set_pagination(count($data), $row);
if ($page) {
$this->assign('_page', $page);
}
$this->checkListOrCountAuthRestMap($map,[]);
if(IS_ROOT){
$this->assign('market_check',true);
$this->assign('finance_check',true);
}else {
$exportRule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME . "_market_check");
$this->assign('market_check',$this->checkRule($exportRule,array('in','1,2')));
$exportRule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME . "_finance_check");
$this->assign('finance_check',$this->checkRule($exportRule,array('in','1,2')));
}
$all_data = M("market_altogether","tab_")
// ->where($map)
@ -333,8 +340,18 @@ class MarketPercentageController extends ThinkController
$sum['commission'] = 0;
$sum['extend_commission'] = 0;
$sum['wait_commission'] = 0;
$admin = $_SESSION['onethink_admin']['user_auth']['username'];
foreach ($data as $key => $value) {
$Rule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME . "_export_show_check");
if ($_REQUEST['export'] && $this->checkRule($Rule,array('in','1,2'))) {
if (!$value['market_check'] || !$value['finance_check']) {
unset($data[$key]);
continue;
}
}
$data[$key]['start_time'] = date("Y-m-1",strtotime($value['pay_time']));
$data[$key]['end_time'] = date("Y-m-t",strtotime($value['pay_time']));
@ -347,6 +364,19 @@ class MarketPercentageController extends ThinkController
$data[$key]['level'] = '高级';
}
if(!$value['market_check']) {
$data[$key]['market_check_detail'] = "市场部未确认({$admin}<br>".date("Y-m-d H:m:s",time());
}
if (!$value['finance_check']) {
$data[$key]['finance_check_detail'] = "财务部未审批({$admin}<br>".date("Y-m-d H:m:s",time());
}
if ($_REQUEST['export']) {
$data[$key]['market_check_detail'] = str_replace("<br>",'',$data[$key]['market_check_detail']);
$data[$key]['finance_check_detail'] = str_replace("<br>",'',$data[$key]['finance_check_detail']);
}
$market_percentage = json_decode($value['market_percentage'],true);
//开发业绩提成比例
$data[$key]['develop_commission_ratio'] = $market_percentage['develop_commission_ratio'];
@ -505,7 +535,9 @@ class MarketPercentageController extends ThinkController
'achievement_bonus' => '绩效考核奖金',
'commission' => '当月合计',
'extend_commission' => '应发金额',
'wait_commission' => '待发金额'];
'wait_commission' => '待发金额',
'market_check_detail' => '市场部确认',
'finance_check_detail' => '财务部审批'];
foreach ($data as $key => $value) {
$line = $key+2;
@ -1151,5 +1183,50 @@ class MarketPercentageController extends ThinkController
}
}
//市场部确认操作
public function doMarketCheck() {
$ids = $_REQUEST['ids'];
if (!$ids) {
$this->ajaxReturn(['status'=>0,'info'=>'操作失败,id不能为空']);
}
$admin = $_SESSION['onethink_admin']['user_auth']['username'];
$market_check_detail = "市场部已确认({$admin}<br>".date("Y-m-d H:m:s",time());
$is_save = M("market_altogether","tab_")
->where(['id'=>['in',$ids],'market_check'=>0])
->save(['market_check'=>1,'market_check_detail'=>$market_check_detail]);
if (!$is_save) {
$this->ajaxReturn(['status'=>0,'info'=>'操作失败']);
}
$this->ajaxReturn(['status'=>1,'info'=>'市场部确认成功']);
}
//财务部审批操作
public function doFinanceCheck() {
$ids = $_REQUEST['ids'];
if (!$ids) {
$this->ajaxReturn(['status'=>0,'info'=>'操作失败,id不能为空']);
}
$admin = $_SESSION['onethink_admin']['user_auth']['username'];
$finance_check_detail = "财务部已确认({$admin}<br>".date("Y-m-d H:m:s",time());
$is_save = M("market_altogether","tab_")
->where(['id'=>['in',$ids],'finance_check'=>0])
->save(['finance_check'=>1,'finance_check_detail'=>$finance_check_detail]);
if (!$is_save) {
$this->ajaxReturn(['status'=>0,'info'=>'操作失败']);
}
$this->ajaxReturn(['status'=>1,'info'=>'市场部确认成功']);
}
}

@ -26,6 +26,37 @@ class OldCountController extends \Think\Controller
echo "changeCompanyGameidToPromoteGameid success";
}
public function changeDevelopTypeData() {
$is_save = M("promote","tab_")->where(['company_relation'=>2])->save(['company_relation'=>1]);
$is_save = M("promote_company","tab_")->where(['develop_type'=>2])->save(['develop_type'=>1]);
//更新tab_company_statement_info表的数据
$company_statement = M("company_statement_info","tab_")->field("id,company_info")->where(['company_info'=>['like',"%自主开发及维护%"]])->select();
foreach ($company_statement as $key => $value) {
$replace_statement = str_replace('自主开发及维护','自主开发',$value['company_info']);
M("company_statement_info","tab_")->where(['id'=>$value['id']])->save(['company_info'=>$replace_statement]);
}
//更新tab_company_lack_statement_info表的数据
$company_statement = M("company_lack_statement_info","tab_")->field("id,company_info")->where(['company_info'=>['like',"%自主开发及维护%"]])->select();
foreach ($company_statement as $key => $value) {
$replace_statement = str_replace('自主开发及维护','自主开发',$value['company_info']);
M("company_lack_statement_info","tab_")->where(['id'=>$value['id']])->save(['company_info'=>$replace_statement]);
}
echo "success\n";
}
/**
* 公会关系及游戏迁移
* 1. 迁移 公会company_relation到公司

@ -118,24 +118,76 @@ class PartnerController extends ThinkController
// dd($cp_game_ratio_map);
$parseGameRadiores = array();//合作方分成比例
// foreach ($gameradiores as $key =>$val) {
// $val['row'] = 1;
// $val['my_ratio'] = 100 - $val['ratio'];
// if ($val['begin_total_amount'] == 0) {
// $val['name'] = '默认比例';
// if (isset($parseGameRadiores[$val['game_id']])) {
// $parseGameRadiores[$val['game_id']] = [];
// }
// } else {
// if($val['instanceof']=='1'){
// $val['name']="月流水≥".$val['begin_total_amount'];
// }else{
// $val['name']="月流水>".$val['begin_total_amount'];
// }
// }
// $val['ratio'] = floatval($val['ratio']);
// $parseGameRadiores[$val['game_id']][] = $val;
// }
foreach ($gameradiores as $key =>$val) {
$val['row'] = 1;
$val['my_ratio'] = 100 - $val['ratio'];
if ($val['begin_total_amount'] == 0) {
$val['name'] = '默认比例';
if ($gameradiores[$key+1]['begin_total_amount']==0) {
$val['name'] = "0.00≤月流水≤∞";
} else {
$val['name']=$val['begin_total_amount']."≤月流水<".$gameradiores[$key+1]['begin_total_amount'];
}
if (isset($parseGameRadiores[$val['game_id']])) {
$parseGameRadiores[$val['game_id']] = [];
}
} else {
if($val['instanceof']=='1'){
$val['name']="月流水≥".$val['begin_total_amount'];
if ($gameradiores[$key+1]['begin_total_amount']!=0) {
$val['name']=$val['begin_total_amount']."≤月流水<".$gameradiores[$key+1]['begin_total_amount'];
} else {
$val['name']=$val['begin_total_amount']."≤月流水≤∞";
}
// $val['name']="月流水≥".$val['begin_total_amount'];
}else{
$val['name']="月流水>".$val['begin_total_amount'];
if($gameradiores[$key+1]['begin_total_amount']!=0) {
if ($gameradiores[$key+1]['instanceof'] == '1') {
$val['name']=$val['begin_total_amount']."<月流水<".$gameradiores[$key+1]['begin_total_amount'];
} else {
$val['name']=$val['begin_total_amount']."≤月流水<".$gameradiores[$key+1]['begin_total_amount'];
}
} else {
if ($gameradiores[$key+1]['instanceof'] == '1') {
$val['name']=$val['begin_total_amount']."<月流水≤∞";
} else {
$val['name']=$val['begin_total_amount']."≤月流水≤∞";
}
}
// $val['name']="月流水>".$val['begin_total_amount'];
}
}
$val['ratio'] = floatval($val['ratio']);
$parseGameRadiores[$val['game_id']][] = $val;
}
$myGameRadiores = $parseGameRadiores;//我方分成比例
foreach ($myGameRadiores as $key => &$val) {
foreach ($val as $k => &$v) {
@ -606,7 +658,7 @@ class PartnerController extends ThinkController
$this->error('请选择是否签署合同');
}
if (empty(I('company_type'))) {
$this->error('请输入公司性质');
$this->error('请输入结算性质');
}
if (!strlen(I('has_game_evidence'))) {
$this->error('请选择是否有游戏资质');

@ -43,6 +43,15 @@ class PresidentDepositController extends ThinkController
$depositWhere['status'] = $status;
}
}
if(I('amount_start', '') != '') {
$depositStrWhere .= ' and amount >= ' . I('amount_start', '');
}
if (I('amount_end', '') != '') {
$depositStrWhere .= ' and amount <= ' . I('amount_end', '');
}
if (I('pay_confirm_time_start', '') != '') {
$depositStrWhere .= ' and pay_confirm_time>=' . strtotime(I('pay_confirm_time_start') . ' 00:00:00');
}

@ -1295,6 +1295,7 @@ class PromoteCompanyController extends ThinkController
* @return void
*/
protected function getGamePromoteCompanyRadio($company_id,$game_ids,$is_export = false){
$is_inside = M("PromoteCompany","tab_")->field("is_inside")->where("id='{$company_id}'")->find()['is_inside'];
//判断是否有生效
$senddata = [];
$game = $this->getGameInfo($game_ids);
@ -1312,10 +1313,10 @@ class PromoteCompanyController extends ThinkController
foreach ($cgr_res as $k => $v) {
$t_gid = $v['relation_game_id'];
unset($game_arr[$t_gid]);
$senddata[$t_gid] = ["turnover_ratio"=>$v['turnover_ratio'],"ratio"=>$v['ratio'],"relation_game_id"=>$v['relation_game_id']];
$senddata[$t_gid] = ["turnover_ratio"=>$v['turnover_ratio'],"ratio"=>!$is_inside?$v['ratio']:0,"relation_game_id"=>$v['relation_game_id']];
$senddata[$t_gid] += $game[$t_gid];
$this->setPromoteRadio($senddata[$t_gid]);
$this->setPromoteRadio($senddata[$t_gid],$is_inside);
if($is_export){
if(isset($CpRadio[$t_gid])){
@ -1342,6 +1343,7 @@ class PromoteCompanyController extends ThinkController
$diff_ids = implode(",",array_keys($game_arr));
$company_belong = M("PromoteCompany","tab_")->field("company_belong")->where("id='{$company_id}'")->find()['company_belong'];
$mwhere = "company_belong='{$company_belong}' and relation_game_id in ({$diff_ids})";
$m_res = M("GameRatioMould","tab_")->where($mwhere)->select();
@ -1349,9 +1351,9 @@ class PromoteCompanyController extends ThinkController
foreach ($m_res as $k => $v) {
$t_gid = $v['relation_game_id'];
unset($game_arr[$t_gid]);
$senddata[$t_gid] = ["turnover_ratio"=>$v['turnover_ratio'],"ratio"=>$v['ratio'],"relation_game_id"=>$v['relation_game_id']];
$senddata[$t_gid] = ["turnover_ratio"=>$v['turnover_ratio'],"ratio"=>!$is_inside?$v['ratio']:0,"relation_game_id"=>$v['relation_game_id']];
$senddata[$t_gid] += $game[$t_gid];
$this->setPromoteRadio($senddata[$t_gid]);
$this->setPromoteRadio($senddata[$t_gid],$is_inside);
if($is_export){
if(isset($CpRadio[$t_gid])){
$senddata[$t_gid]["cp_ratio"] = $CpRadio[$t_gid];
@ -1446,42 +1448,121 @@ class PromoteCompanyController extends ThinkController
->order("begin_total_amount asc")
->select();
$parseGameRadiores = array();//合作方分成比例
foreach ($gameradiores as $key =>$val) {
$val['row'] = 1;
if ($val['begin_total_amount'] == 0) {
$val['name'] = '默认比例';
$val['name'] = "0.00≤月流水≤";
// $val['name'] = '默认比例';
if (isset($parseGameRadiores[$val['game_id']])) {
$parseGameRadiores[$val['game_id']] = [];
}
// if ($val['game_id']==197) {
// dump($gameradiores[$key+1]['begin_total_amount']);
// }
} else {
// if ($val['game_id']==197) {
// dump($gameradiores[$key+1]['begin_total_amount']);
// }
// if($val['instanceof']=='1'){
// $val['name']="月流水≥".$val['begin_total_amount'];
// }else{
// $val['name']="月流水>".$val['begin_total_amount'];
// }
if($val['instanceof']=='1'){
$val['name']="月流水≥".$val['begin_total_amount'];
if ($gameradiores[$key+1]['begin_total_amount']) {
$val['name']=$val['begin_total_amount']."≤月流水<".$gameradiores[$key+1]['begin_total_amount'];
} else {
$val['name']=$val['begin_total_amount']."≤月流水≤∞";
}
// $val['name']="月流水≥".$val['begin_total_amount'];
}else{
$val['name']="月流水>".$val['begin_total_amount'];
if($gameradiores[$key+1]['begin_total_amount']!=0) {
if ($gameradiores[$key+1]['instanceof'] == '1') {
$val['name']=$val['begin_total_amount']."<月流水<".$gameradiores[$key+1]['begin_total_amount'];
} else {
$val['name']=$val['begin_total_amount']."≤月流水<".$gameradiores[$key+1]['begin_total_amount'];
}
} else {
if ($gameradiores[$key+1]['instanceof'] == '1') {
$val['name']=$val['begin_total_amount']."<月流水≤∞";
} else {
$val['name']=$val['begin_total_amount']."≤月流水≤∞";
}
}
// $val['name']="月流水>".$val['begin_total_amount'];
}
}
$parseGameRadiores[$val['game_id']][] =['name'=>$val['name'],"ratio"=>floatval($val['ratio'])];
}
foreach ($parseGameRadiores as $key => $value) {
foreach ($value as $k => $v) {
if ($value[$k+1] && $k==0) {
$parseGameRadiores[$key][$k]['name'] .= number_format(substr($value[$k+1]['name'],0,strpos($value[$k+1]['name'], '.')),'2','.','');
} elseif($k==0) {
$parseGameRadiores[$key][$k]['name'] .= '∞';
}
}
}
return $parseGameRadiores;
}
//设置比例阶梯
protected function setPromoteRadio(&$v){
protected function setPromoteRadio(&$v,$is_inside=0){
$turnover_ratio = json_decode($v['turnover_ratio'],true);
if (!$turnover_ratio) {
$rate_detail = "0≤月流水≤∞";
} else {
$rate_detail = "0≤月流水<{$turnover_ratio[0]['turnover']}";
}
$v['turnover_ratio'] = array(
array("ratio"=>floatval($v['ratio'])."%","name"=>"默认比例")
array("ratio"=>floatval(!$is_inside?$v['ratio']:0)."%","name"=>$rate_detail)
);
foreach($turnover_ratio as $ke=>$va){
$t=array("ratio"=>floatval($va["ratio"])."%");
$t=array("ratio"=>floatval(!$is_inside?$va["ratio"]:0)."%");
if(array_key_exists("instanceof",$va)){
//存在
if($va['instanceof']=='1'){
$t['name']="月流水≥".$va['turnover'];
if ($turnover_ratio[$ke+1]['turnover']) {
$t['name']=$va['turnover']."≤月流水<".$turnover_ratio[$ke+1]['turnover'];
} else {
$t['name']=$va['turnover']."≤月流水≤∞";
}
}else{
$t['name']="月流水>".$va['turnover'];
if($turnover_ratio[$ke+1]['turnover']) {
$t['name']=$va['turnover']."<月流水<".$turnover_ratio[$ke+1]['turnover'];
} else {
$t['name']=$va['turnover']."<月流水≤∞";
}
}
}else{
$t['name']="月流水≥".$va['turnover'];
// $t['name']="月流水≥".$va['turnover'];
if ($turnover_ratio[$ke+1]['turnover']) {
$t['name']=$va['turnover']."≤月流水<".$turnover_ratio[$ke+1]['turnover'];
} else {
$t['name']=$va['turnover']."≤月流水<∞";
}
}
$v['turnover_ratio'][]=$t;
}

@ -769,6 +769,7 @@ class TimingController extends AdminController {
$return = [];
foreach ($data as $key => $value) {
$statement_info = json_decode($value['statement_info'],true);
$is_inside = M("PromoteCompany","tab_")->field("is_inside")->where("id='{$value['company_id']}'")->find()['is_inside'];
if ($value['company_type'] == 2) {
@ -777,9 +778,9 @@ class TimingController extends AdminController {
foreach ($info as $k => $v) {
//
if (isset($return[$statement_info['promote_id'].$v['relation_game_id']])) {
$return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] = $v['sum_money'];
$return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] = !$is_inside?$v['sum_money']:0;
} else {
$return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] += $v['sum_money'];
$return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] += !$is_inside?$v['sum_money']:0;
}
}
@ -811,7 +812,7 @@ class TimingController extends AdminController {
->group("promote_id")
->find();
$return[$value['company_id']."-".$promote_id."-".$v['relation_game_id']] += ($dataAmount['pay_amount']*$v['increment_ratio'])/100;
$return[$value['company_id']."-".$promote_id."-".$v['relation_game_id']] += !$is_inside?(($dataAmount['pay_amount']*$v['increment_ratio'])/100):0;
}
}
@ -839,6 +840,13 @@ class TimingController extends AdminController {
$begintime = strtotime(date("Y-m-1",strtotime($date)));
$endtime = strtotime(date("Y-m-t",strtotime($date)))+86399;
$is_inside = M("PromoteCompany","tab_")->field("is_inside")->where("id='{$company_id}'")->find()['is_inside'];
if ($is_inside == 1) {
return 0;
}
$company_game_ratio = M("company_game_ratio","tab_")
->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id])
->where("(end_time>={$begintime} and (end_time<={$endtime} and end_time!=0)) or (begin_time>={$begintime} and begin_time<={$endtime}) or (begin_time<={$begintime} and (end_time>={$endtime} or end_time=0))")
@ -1100,7 +1108,7 @@ class TimingController extends AdminController {
->select(false);
$promote_data = M()->table("({$spend}) spend")
->field("pay_time,company_id,account as promote_account,company.company_belong,develop_type,spend.promote_id,spend.game_name,game_id,relation_game_id,spend.pay_amount,auth.real_name,market_admin_id as admin_id,market_percentage,sdk_version")
->field("pay_time,company_id,company.company_name,account as promote_account,company.company_belong,develop_type,spend.promote_id,spend.game_name,game_id,relation_game_id,spend.pay_amount,auth.real_name,market_admin_id as admin_id,market_percentage,sdk_version")
->join("left join tab_promote promote on spend.promote_id = promote.id")
->join("left join tab_promote_company company on promote.company_id = company.id")
->join("left join ({$data}) auth on auth.uid=market_admin_id")

@ -23,7 +23,9 @@ class CompanyGameRatioModel extends Model
if($company_belong === false){
$company_belong = M("PromoteCompany","tab_")->field("company_belong")->where("id='{$company_id}'")->find()['company_belong'];
}
$is_inside = M("PromoteCompany","tab_")->field("is_inside")->where("id='{$company_id}'")->find()['is_inside'];
$mwhere = [
"company_belong"=>$company_belong,
"relation_game_id"=>["in",$game_ids]
@ -55,13 +57,13 @@ class CompanyGameRatioModel extends Model
if($v['end_time'] == 0 || ($v['end_time'] >= $last_time_ratio['endtime'])){
//全段
if($v['begin_time'] <= $last_time_ratio['begintime']){
$tgr[count($tgr)-1]['ratio'] = $v['ratio'];
$tgr[count($tgr)-1]['turnover_ratio'] = $v['turnover_ratio'];
$tgr[count($tgr)-1]['ratio'] = !$is_inside?$v['ratio']:0;
$tgr[count($tgr)-1]['turnover_ratio'] = !$is_inside?$v['turnover_ratio']:[];
continue;
}else{
//上分段
$tgr[count($tgr)-1]['endtime'] = $v['begin_time']-1;
$tgr[] = ['begintime'=>$v['begin_time'],"endtime"=>$last_time_ratio['endtime'],"ratio"=>$v['ratio'],"turnover_ratio"=>$v['turnover_ratio']];
$tgr[] = ['begintime'=>$v['begin_time'],"endtime"=>$last_time_ratio['endtime'],"ratio"=>!$is_inside?$v['ratio']:0,"turnover_ratio"=>!$is_inside?$v['turnover_ratio']:[]];
continue;
}
}
@ -70,7 +72,7 @@ class CompanyGameRatioModel extends Model
//中段
$tgr[count($tgr)-1]['endtime'] = $v['begin_time']-1;
$tgr[] = ['begintime'=>$v['begin_time'],"endtime"=>$v['end_time'],"ratio"=>$v['ratio'],"turnover_ratio"=>$v['turnover_ratio']];
$tgr[] = ['begintime'=>$v['begin_time'],"endtime"=>$v['end_time'],"ratio"=>!$is_inside?$v['ratio']:0,"turnover_ratio"=>!$is_inside?$v['turnover_ratio']:[]];
$tgr[] = ['begintime'=>$v['end_time']-0+1,"endtime"=>$last_time_ratio['endtime']];
continue;
@ -78,13 +80,13 @@ class CompanyGameRatioModel extends Model
if($last_time_ratio['begintime'] > $v['begin_time']){
//下分段
$tgr[count($tgr)-1]['endtime'] = $v['end_time'];
$tgr[] = ['begintime'=>$v['end_time']-0+1,"endtime"=>$last_time_ratio['endtime'],"ratio"=>$v['ratio'],"turnover_ratio"=>$v['turnover_ratio']];
$tgr[] = ['begintime'=>$v['end_time']-0+1,"endtime"=>$last_time_ratio['endtime'],"ratio"=>!$is_inside?$v['ratio']:0,"turnover_ratio"=>!$is_inside?$v['turnover_ratio']:[]];
continue;
}
if($last_time_ratio['begintime'] = $v['begin_time']){
$tgr[count($tgr)-1]['endtime'] = $v['end_time'];
$tgr[count($tgr)-1]['ratio'] = $v['ratio'];
$tgr[count($tgr)-1]['turnover_ratio'] = $v['turnover_ratio'];
$tgr[count($tgr)-1]['ratio'] = !$is_inside?$v['ratio']:0;
$tgr[count($tgr)-1]['turnover_ratio'] = !$is_inside?$v['turnover_ratio']:[];
$tgr[] = ['begintime'=>$v['end_time']-0+1,"endtime"=>$last_time_ratio['endtime']];
}
@ -95,8 +97,8 @@ class CompanyGameRatioModel extends Model
foreach($list as $i => &$ratio){
if(!isset($ratio['ratio'])){
if(isset($modul_ratio[$k]['ratio'])){
$ratio['ratio'] = $modul_ratio[$k]['ratio'];
$ratio['turnover_ratio'] = $modul_ratio[$k]['turnover_ratio'];
$ratio['ratio'] = !$is_inside?$modul_ratio[$k]['ratio']:0;
$ratio['turnover_ratio'] = !$is_inside?$modul_ratio[$k]['turnover_ratio']:null;
}else{
$ratio['ratio'] = 0;
$ratio['turnover_ratio'] =null;

@ -394,7 +394,7 @@ $(function(){
companyinfostr += '<tr><td class="l">内外团:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_belong+'</span></td></tr>';
}
if("company_type" in companyinfo){
companyinfostr += '<tr><td class="l">公司性质:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_type+'</span></td></tr>';
companyinfostr += '<tr><td class="l">结算性质:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_type+'</span></td></tr>';
}
if("company_relation" in companyinfo){
companyinfostr += '<tr><td class="l">开发类型:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_relation+'</span></td></tr>';

@ -283,7 +283,7 @@ $(function(){
companyinfostr += '<tr><td class="l">内外团:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_belong+'</span></td></tr>';
}
if("company_type" in companyinfo){
companyinfostr += '<tr><td class="l">公司性质:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_type+'</span></td></tr>';
companyinfostr += '<tr><td class="l">结算性质:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_type+'</span></td></tr>';
}
if("company_relation" in companyinfo){
companyinfostr += '<tr><td class="l">开发类型:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_relation+'</span></td></tr>';

@ -283,7 +283,7 @@ $(function(){
companyinfostr += '<tr><td class="l">内外团:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_belong+'</span></td></tr>';
}
if("company_type" in companyinfo){
companyinfostr += '<tr><td class="l">公司性质:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_type+'</span></td></tr>';
companyinfostr += '<tr><td class="l">结算性质:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_type+'</span></td></tr>';
}
if("company_relation" in companyinfo){
companyinfostr += '<tr><td class="l">开发类型:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_relation+'</span></td></tr>';

@ -356,7 +356,7 @@
} else {
is_submit = 1;
layer.msg("未知错误");
layer.msg(result.msg);
}
layer.closeAll("loading");
}});

@ -0,0 +1,485 @@
<!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="__STATIC__/jquery.form.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="">
<form id="form" method="post" class="form-horizontal" action="{:U('editCompanyStatementPool')}" enctype="multipart/form-data" target="rfFrame">
<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>
<th>开户行</th>
<th>是否支付宝打款</th>
<th>是否结算</th>
<th>备注</th>
<if condition="!$is_export">
<th>操作</th>
</if>
</tr>
</thead>
<tbody id="statementShow">
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.row}">{$key-0+1}</td>
<td rowspan="{$com.row}">{$com.company_name}</td>
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.account}</td> -->
<notempty name="com['statement_info']">
<td rowspan="{$com['statement_info'][0]['row']}" >{$com['statement_info'][0]['account']}</td>
<else />
<td>-</td>
</notempty>
<td rowspan="{$com.row}">{$com.company_info.company_belong_str}</td>
<td rowspan="{$com.row}">{$com.company_info.company_relation_str}</td>
<td rowspan="{$com.row}">{$com.company_info.nickname}</td>
<td rowspan="{$com.row}">{$com.company_info.company_type_str}</td>
<notempty name="com['statement_info'][0]['game_list']">
<td>{$com['statement_info'][0]['game_list'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['game_type_name']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['statement_begin_time']}-{$com['statement_info'][0]['game_list'][0]['statement_end_time']}</td>
<td><span class="pay_amount">{$com['statement_info'][0]['game_list'][0]['pay_amount']}</span></td>
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['game_list'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['account']}][]"></td>
<td><input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$com['statement_info'][0]['game_list'][0]['ratio']}" style="width: 25px;">%</td>
<td><input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$com['statement_info'][0]['game_list'][0]['increment_ratio']}" style="width: 25px;">%</td>
<td><span class="sum_money_span">{$com['statement_info'][0]['game_list'][0]['sum_money']}</span>
<input class="sum_money" name="sum_money[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$com['statement_info'][0]['game_list'][0]['sum_money']}" style="width: 20px;display: none">
<input class="st" name="st[{$com['id']}]" value="{$com['st']}" style="width: 20px;display: none"></td>
<td rowspan="{$com.row}">{$com['reward']}</td>
<td rowspan="{$com.row}">{$com['fine']}</td>
<td rowspan="{$com.row}" data-st="{$com['st']}" class="statement_money">{$com['statement_money']}</td>
<else />
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td rowspan="{$com.row}">-</td>
<td rowspan="{$com.row}">-</td>
<td rowspan="{$com.row}">-</td>
</notempty>
<if condition="$com['is_payment'] eq 2">
<td rowspan="{$com.row}">{$com.company_info.payee_name}</td>
<td rowspan="{$com.row}">&nbsp;{$com.company_info.bank_account}</td>
<td rowspan="{$com.row}">{$com.company_info.opening_bank}</td>
</if>
<if condition="$com['is_payment'] eq 1">
<td rowspan="{$com.row}">{$com.company_info.ali_user}</td>
<td rowspan="{$com.row}">{$com.company_info.ali_account}</td>
<td rowspan="{$com.row}"></td>
</if>
<td rowspan="{$com.row}"><if condition="$com['is_payment'] eq 1"><else /></if></td>
<td rowspan="{$com.row}"><if condition="$com['st'] eq 0"><else /></if></td>
<td rowspan="{$com.row}"><textarea name="remark[{$com['id']}]">{$com.remark}</textarea></td>
<if condition="!$is_export">
<td rowspan="{$com.row}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
</td>
</if>
</tr>
<if condition="$com['statement_info'][0]['row'] gt 1">
<foreach name="com['statement_info'][0]['game_list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td>{$game['game_name']}</td>
<td>{$game['game_type_name']}</td>
<td>{$game['statement_begin_time']}-{$game['statement_end_time']}</td>
<td><span class="pay_amount">{$game['pay_amount']}</span></td>
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['account']}][]"></td>
<td><input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['ratio']}" style="width: 25px;">%</td>
<td><input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['increment_ratio']}" style="width: 25px;">%</td>
<td><span class="sum_money_span">{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][{$com['statement_info'][0]['account']}][]" value="{$game['sum_money']}" style="width: 20px;display: none"></td>
</tr>
</if>
</foreach>
</if>
<notempty name="com['statement_info'][1]">
<foreach name="com['statement_info']" item="account" key="akey">
<if condition="$akey gt 0">
<tr>
<td rowspan="{$account['row']}" class="accounts">{$account['account']}</td>
<notempty name="account['game_list']">
<td>{$account['game_list'][0]['game_name']}</td>
<td>{$account['game_list'][0]['game_type_name']}</td>
<td>{$account['game_list'][0]['statement_begin_time']}-{$account['game_list'][0]['statement_end_time']}</td>
<td><span class="pay_amount">{$account['game_list'][0]['pay_amount']}</span></td>
<!-- <td>{$account['game_list'][0]['ratio']|showNumPercent}</td>-->
<!-- <td>{$account['game_list'][0]['increment_ratio']|showNumPercent}</td>-->
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$account['game_list'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$account['account']}][]"></td>
<td><input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$account['account']}][]" value="{$account['game_list'][0]['ratio']}" style="width: 25px;">%</td>
<td><input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$account['account']}][]" value="{$account['game_list'][0]['increment_ratio']}" style="width: 25px;">%</td>
<td><span class="sum_money_span">{$account['game_list'][0]['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][{$account['account']}][]" value="{$account['game_list'][0]['sum_money']}" style="width: 20px;display: none"></td>
<else />
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</notempty>
</tr>
<if condition="$account['row'] gt 1">
<foreach name="account['game_list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td>{$game['game_name']}</td>
<td>{$game['game_type_name']}</td>
<td>{$game['statement_begin_time']}-{$game['statement_end_time']}</td>
<td><span class="pay_amount">{$game['pay_amount']}</span></td>
<!-- <td>{$game['ratio']|showNumPercent}</td>-->
<!-- <td>{$game['increment_ratio']|showNumPercent}</td>-->
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$account['account']}][]"></td>
<td><input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$account['account']}][]" value="{$game['ratio']}" style="width: 25px;">%</td>
<td><input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$account['account']}][]" value="{$game['increment_ratio']}" style="width: 25px;">%</td>
<td><span class="sum_money_span">{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][{$account['account']}][]" value="{$game['sum_money']}" style="width: 20px;display: none"></td>
</tr>
</if>
</foreach>
</if>
</if>
</foreach>
</notempty>
</foreach>
<tr>
<td colspan=10 >合计:</td>
<td >{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td class="count_sum_money">{$count.sum_money}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<if condition="!$is_export">
<td></td>
</if>
</tr>
</tbody>
</table>
<input type="hidden" name="id" value="{$_GET['id']}">
</form>
<div class="form-item cf" style="float: right;margin-top: 30px;margin-right: 30px;">
<button class="submit_btn" id="submit" style="margin-left:210px;">
保存
</button>
</div>
<iframe id="rfFrame" name="rfFrame" src="about:blank" style="display:none;"></iframe>
</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>
$(".no_statement").on("click",function(){
var id = $(this).data('id');
$.ajax({
type: "POST",
url: "{:U('cancelStatement')}",
dataType: 'json',
async: false,
data: {id:id},
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;
}
}
});
});
var return_data = "";
$("#submit").click(function(){
var options = {
url:"{:U('editCompanyStatementPool')}", //同action
type:'post',
beforeSend:function(xhr){
},
success:function(data)
{
return_data = data;
},
complete:function(data){
if(return_data.status==1){
layer.msg("<font style='color:white'>" + return_data.info + "</font>");
setTimeout(function(){
parent.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + return_data.info + "</font>");
return false;
}
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
}
};
$("#form").ajaxSubmit(options);
});
$(".refund").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
$(".ratio").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
$(".increment_ratio").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
// 分成结算金额重算
function caculate_sum_money(_this) {
var pay_money = $(_this).parent().parent().find(".pay_amount").text();
var ratio = $(_this).parent().parent().find(".ratio").val();
//比例金额
if (!ratio || ratio < 0) {
ratio = 0;
$(_this).parent().parent().find(".ratio").val(ratio);
} else if (ratio > 100) {
ratio = 100;
$(_this).parent().parent().find(".ratio").val(ratio);
}
//退款
var refund = $(_this).parent().parent().find(".refund").val();
if (!refund || refund < 0) {
refund = 0;
$(_this).parent().parent().find(".refund").val(refund);
}
//补点
var increment_ratio = $(_this).parent().parent().find(".increment_ratio").val();
if (!increment_ratio || increment_ratio < 0) {
increment_ratio = 0;
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
} else if(increment_ratio > 100) {
increment_ratio = 100;
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
}
//扣款
pay_money = parseFloat(pay_money) - parseFloat(refund);
var value = parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100);
$(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2));
$(_this).parent().parent().find(".sum_money").val(value.toFixed(2));
}
//结算金额重算
function changeStatementAmount(_this) {
var _parent = $(_this).parent().parent();
var statement_amount = '';
for (;;) {
statement_amount = _parent.find(".statement_money").text();
if (!statement_amount ) {
_parent = _parent.prev();
} else {
break;
}
}
var row = _parent.find(".statement_money").attr("rowspan");
var get_item = _parent;
var sum_amount = 0;
for (var i =0;i<parseInt(row);i++) {
var amount = get_item.find(".sum_money_span").text();
sum_amount = parseFloat(sum_amount) + parseFloat(amount);
get_item = get_item.next();
}
_parent.find(".statement_money").text(sum_amount.toFixed(2));
}
//结算金额合计重算
function changeSumAmount() {
var sum_amount = 0;
var st = 0;
$("#statementShow").find(".statement_money").each(function (key,val) {
st = $(val).data('st')
sum_amount = parseFloat(sum_amount) + parseFloat($(val).text());
});
$(".count_sum_money").text(sum_amount.toFixed(2));
}
</script>
</html>

@ -294,6 +294,19 @@
});
});
$(".editPool").click(function () {
var id = $(this).data("id");
var url = "{:U('editPool')}"+"&id="+id
layer.open({
type: 2,
title: "海南万盟天下科技有限公司",
shadeClose: true,
shade: 0.8,
area: ['100%', '100%'],
content: url
});
});
$("#verifyAgree,#verifyRefuse").on("click",function(){
var id = $(this).attr("id");
@ -343,7 +356,12 @@
_doAgreeApply();
});
}else{
_doAgreeApply();
layer.confirm('【警告】'+opname+'是否确认,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function() {
_doAgreeApply();
});
}
}
@ -368,7 +386,69 @@
}
});
}
})
});
$("#verifyReturn").on("click",function(){
var status = false;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
console.log($(elem).data("status"))
if($(elem).data("status") == 1 || $(elem).data("status") == -1){
return $(elem).val();
} else {
status = true;
}
}).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 (status) {
layer.confirm("审批撤回仅会对【'审批通过','审批拒绝'】的申请进行处理,选择中包含其他的状态的申请将被忽略,点击取消停止操作",{title:false}, function(index){
_doAgreeApply();
layer.close(index);
});
} else {
layer.confirm('【提示】点击确认后,审批即撤回', {
btn: ['确认','取消'],
title:false
}, function(){
_doAgreeApply();
});
}
function _doAgreeApply(){
//执行
$.ajax({
type: "POST",
url: "{:U('verifyReturn')}",
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 flag = false;

@ -112,6 +112,7 @@
<th>产品类型</th>
<th>结算时间</th>
<th>推广流水</th>
<th>退款</th>
<th>分成比例</th>
<th>补点</th>
<th>分成结算金额</th>
@ -133,159 +134,172 @@
</tr>
</thead>
<tbody id="statementShow">
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.row}">{$key-0+1}</td>
<td rowspan="{$com.row}">{$com.company_name}</td>
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.account}</td> -->
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.row}">{$key-0+1}</td>
<td rowspan="{$com.row}">{$com.company_name}</td>
<notempty name="com['statement_info']">
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['account']}</td>
<else />
<td>-</td>
</notempty>
<td rowspan="{$com.row}">{$com.company_info.company_belong_str}</td>
<td rowspan="{$com.row}">{$com.company_info.company_relation_str}</td>
<td rowspan="{$com.row}">{$com.company_info.nickname}</td>
<td rowspan="{$com.row}">{$com.company_info.company_type_str}</td>
<notempty name="com['statement_info'][0]['game_list']">
<td>{$com['statement_info'][0]['game_list'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['game_type_name']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['statement_begin_time']}-{$com['statement_info'][0]['game_list'][0]['statement_end_time']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['ratio']|showNumPercent}</td>
<td>{$com['statement_info'][0]['game_list'][0]['increment_ratio']|showNumPercent}</td>
<td>{$com['statement_info'][0]['game_list'][0]['sum_money']}</td>
<td rowspan="{$com.row}">{$com['reward']}</td>
<td rowspan="{$com.row}">{$com['fine']}</td>
<td rowspan="{$com.row}">{$com['statement_money']}</td>
<else />
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td rowspan="{$com.row}">-</td>
<td rowspan="{$com.row}">-</td>
<td rowspan="{$com.row}">-</td>
</notempty>
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.account}</td> -->
<if condition="$com['is_payment'] eq 2">
<td rowspan="{$com.row}">{$com.company_info.payee_name}</td>
<td rowspan="{$com.row}">&nbsp;{$com.company_info.bank_account}</td>
<td rowspan="{$com.row}">{$com.company_info.opening_bank}</td>
</if>
<notempty name="com['statement_info']">
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['account']}</td>
<else />
<td>-</td>
</notempty>
<if condition="$com['is_payment'] eq 1">
<td rowspan="{$com.row}">{$com.company_info.ali_user}</td>
<td rowspan="{$com.row}">{$com.company_info.ali_account}</td>
<td rowspan="{$com.row}"></td>
</if>
<td rowspan="{$com.row}"><if condition="$com['is_payment'] eq 1"><else /></if></td>
<td rowspan="{$com.row}"><if condition="$com['st'] eq 0"><else /></if></td>
<td rowspan="{$com.row}">{$com.remark}</td>
<td rowspan="{$com.row}">{$com.company_info.company_belong_str}</td>
<td rowspan="{$com.row}">{$com.company_info.company_relation_str}</td>
<if condition="!$is_export">
<td rowspan="{$com.row}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
</td>
</if>
<td rowspan="{$com.row}">{$com.company_info.nickname}</td>
<td rowspan="{$com.row}">{$com.company_info.company_type_str}</td>
</tr>
<notempty name="com['statement_info'][0]['game_list']">
<td>{$com['statement_info'][0]['game_list'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['game_type_name']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['statement_begin_time']}-{$com['statement_info'][0]['game_list'][0]['statement_end_time']}</td>
<td><span class="pay_amount">{$com['statement_info'][0]['game_list'][0]['pay_amount']}</span></td>
<td>{$com['statement_info'][0]['game_list'][0]['refund']|default=0}</td>
<td>{$com['statement_info'][0]['game_list'][0]['ratio']}%</td>
<td>{$com['statement_info'][0]['game_list'][0]['increment_ratio']}%</td>
<td><span class="sum_money_span">{$com['statement_info'][0]['game_list'][0]['sum_money']}</span></td>
<td rowspan="{$com.row}">{$com['reward']}</td>
<td rowspan="{$com.row}">{$com['fine']}</td>
<td rowspan="{$com.row}">{$com['statement_money']}</td>
<else />
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td rowspan="{$com.row}">-</td>
<td rowspan="{$com.row}">-</td>
<td rowspan="{$com.row}">-</td>
<if condition="$com['statement_info'][0]['row'] gt 1">
<foreach name="com['statement_info'][0]['game_list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td>{$game['game_name']}</td>
<td>{$game['game_type_name']}</td>
<td>{$game['statement_begin_time']}-{$game['statement_end_time']}</td>
<td>{$game['pay_amount']}</td>
<td>{$game['ratio']|showNumPercent}</td>
<td>{$game['increment_ratio']|showNumPercent}</td>
<td>{$game['sum_money']}</td>
</tr>
</notempty>
<if condition="$com['is_payment'] eq 2">
<td rowspan="{$com.row}">{$com.company_info.payee_name}</td>
<td rowspan="{$com.row}">&nbsp;{$com.company_info.bank_account}</td>
<td rowspan="{$com.row}">{$com.company_info.opening_bank}</td>
</if>
</foreach>
</if>
<if condition="$com['is_payment'] eq 1">
<td rowspan="{$com.row}">{$com.company_info.ali_user}</td>
<td rowspan="{$com.row}">{$com.company_info.ali_account}</td>
<td rowspan="{$com.row}"></td>
</if>
<td rowspan="{$com.row}"><if condition="$com['is_payment'] eq 1"><else /></if></td>
<td rowspan="{$com.row}"><if condition="$com['st'] eq 0"><else /></if></td>
<td rowspan="{$com.row}">{$com.remark}</td>
<if condition="!$is_export">
<td rowspan="{$com.row}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
</td>
</if>
</tr>
<if condition="$com['statement_info'][0]['row'] gt 1">
<foreach name="com['statement_info'][0]['game_list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td>{$game['game_name']}</td>
<td>{$game['game_type_name']}</td>
<td>{$game['statement_begin_time']}-{$game['statement_end_time']}</td>
<td><span class="pay_amount">{$game['pay_amount']}</span></td>
<td>{$game['refund']|default=0}</td>
<td>{$game['ratio']}%</td>
<td>{$game['increment_ratio']}%</td>
<td><span class="sum_money_span">{$game['sum_money']}</span></td>
<notempty name="com['statement_info'][1]">
<foreach name="com['statement_info']" item="account" key="akey">
<if condition="$akey gt 0">
<tr>
<td rowspan="{$account['row']}">{$account['account']}</td>
<notempty name="account['game_list']">
<td>{$account['game_list'][0]['game_name']}</td>
<td>{$account['game_list'][0]['game_type_name']}</td>
<td>{$account['game_list'][0]['statement_begin_time']}-{$account['game_list'][0]['statement_end_time']}</td>
<td>{$account['game_list'][0]['pay_amount']}</td>
<td>{$account['game_list'][0]['ratio']|showNumPercent}</td>
<td>{$account['game_list'][0]['increment_ratio']|showNumPercent}</td>
<td>{$account['game_list'][0]['sum_money']}</td>
<else />
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</notempty>
</tr>
<if condition="$account['row'] gt 1">
<foreach name="account['game_list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td>{$game['game_name']}</td>
<td>{$game['game_type_name']}</td>
<td>{$game['statement_begin_time']}-{$game['statement_end_time']}</td>
<td>{$game['pay_amount']}</td>
<td>{$game['ratio']|showNumPercent}</td>
<td>{$game['increment_ratio']|showNumPercent}</td>
<td>{$game['sum_money']}</td>
</tr>
</if>
</foreach>
</tr>
</if>
</foreach>
</if>
</if>
</foreach>
</notempty>
</foreach>
<tr>
<td colspan=10 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.sum_money}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<if condition="!$is_export">
<notempty name="com['statement_info'][1]">
<foreach name="com['statement_info']" item="account" key="akey">
<if condition="$akey gt 0">
<tr>
<td rowspan="{$account['row']}">{$account['account']}</td>
<notempty name="account['game_list']">
<td>{$account['game_list'][0]['game_name']}</td>
<td>{$account['game_list'][0]['game_type_name']}</td>
<td>{$account['game_list'][0]['statement_begin_time']}-{$account['game_list'][0]['statement_end_time']}</td>
<td><span class="pay_amount">{$account['game_list'][0]['pay_amount']}</span></td>
<!-- <td>{$account['game_list'][0]['ratio']|showNumPercent}</td>-->
<!-- <td>{$account['game_list'][0]['increment_ratio']|showNumPercent}</td>-->
<td>{$account['game_list'][0]['refund']|default=0}</td>
<td>{$account['game_list'][0]['ratio']}%</td>
<td>{$account['game_list'][0]['increment_ratio']}%</td>
<td><span class="sum_money_span">{$account['game_list'][0]['sum_money']}</span></td>
<else />
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</notempty>
</tr>
<if condition="$account['row'] gt 1">
<foreach name="account['game_list']" item="game" key="gamekey">
<if condition="$gamekey gt 0">
<tr>
<td>{$game['game_name']}</td>
<td>{$game['game_type_name']}</td>
<td>{$game['statement_begin_time']}-{$game['statement_end_time']}</td>
<td><span class="pay_amount">{$game['pay_amount']}</span></td>
<!-- <td>{$game['ratio']|showNumPercent}</td>-->
<!-- <td>{$game['increment_ratio']|showNumPercent}</td>-->
<td>{$game['refund']|default=0}</td>
<td>{$game['ratio']}%</td>
<td>{$game['increment_ratio']}%</td>
<td><span class="sum_money_span">{$game['sum_money']}</span></td>
</tr>
</if>
</foreach>
</if>
</if>
</foreach>
</notempty>
</foreach>
<tr>
<td colspan=10 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
</if>
</tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.sum_money}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<if condition="!$is_export">
<td></td>
</if>
</tr>
</tbody>
</table>
</div>
@ -320,6 +334,56 @@
}
}
});
})
});
$(".refund").on("blur",function () {
caculate_sum_money(this);
});
$(".ratio").on("blur",function () {
caculate_sum_money(this);
});
$(".increment_ratio").on("blur",function () {
caculate_sum_money(this);
});
function caculate_sum_money(_this) {
var pay_money = $(_this).parent().parent().find(".pay_amount").text();
var ratio = $(_this).parent().parent().find(".ratio").val();
if (!ratio || ratio < 0) {
ratio = 0;
$(_this).parent().parent().find(".ratio").val(ratio);
} else if (ratio > 100) {
ratio = 100;
$(_this).parent().parent().find(".ratio").val(ratio);
}
var refund = $(_this).parent().parent().find(".refund").val();
if (!refund || refund < 0) {
refund = 0;
$(_this).parent().parent().find(".refund").val(refund);
}
var increment_ratio = $(_this).parent().parent().find(".increment_ratio").val();
if (!increment_ratio || increment_ratio < 0) {
increment_ratio = 0;
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
} else if(increment_ratio > 100) {
increment_ratio = 100;
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
}
pay_money = parseFloat(pay_money) - parseFloat(refund);
var value = parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100);
$(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2));
$(_this).parent().parent().find(".sum_money").val(value.toFixed(2));
}
</script>
</html>

@ -94,7 +94,7 @@
</tr>
<tr>
<td class="l">公司性质</td>
<td class="l">结算性质</td>
<td class="r">
<span class="form-required" style="line-height: 30px;"><if condition="$data['company_properties'] eq 0">个人<else/>公司</if></span>
</td>

@ -96,7 +96,7 @@
<tr>
<th >合作方名称</th>
<th >对应平台</th>
<th >公司性质</th>
<th >结算性质</th>
<!-- <th >支付渠道</th>-->
<th >原包名</th>
<th >现包名</th>
@ -155,8 +155,8 @@
<td rowspan="{$vo['sec_rowspan'][0]}">{$vo['game_name'][0]|default="------"}</td>
<td rowspan="{$vo['sec_rowspan'][0]}">{$vo['game_type'][0]|default="------"}</td>
<td rowspan="{$vo['sec_rowspan'][0]}">{$vo['withdraw_type'][0]|default="------"}</td>
<td rowspan='1'>默认</td>
<td rowspan='1'>{$vo['rate_data'][0][0]['exploitation_rate']|default="0"}</td>
<td rowspan='1'>{$vo['rate_data'][0][0]['exploitation_name']|default="0<=流水<=∞"}</td>
<td rowspan='1'>{$vo['rate_data'][0][0]['exploitation_rate']|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.bank_user|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.bank_card|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.bank_name|default="------"}</td>
@ -203,7 +203,7 @@
</tr>
</if>
<volist name="vo['rate_data'][$index-1]" id="rate" key="rate_index">
<if condition="$rate['exploitation_name'] neq '默认'">
<if condition="$rate_index gt 1">
<tr>
<td rowspan='1'>{$rate.exploitation_name}</td>
<td rowspan='1'>{$rate.exploitation_rate}</td>

@ -99,7 +99,7 @@
<div class="input-list input-list-spend search_label_rehab">
<select id="company_properties" name="company_properties" class="select_gallery" style="width:120px;">
<option value="">请选择公司性质</option>
<option value="">请选择结算性质</option>
<option value="0">个人</option>
<option value="1">公司</option>
</select>
@ -150,7 +150,7 @@
<tr>
<th >合作方名称</th>
<th >对应平台</th>
<th >公司性质</th>
<th >结算性质</th>
<!-- <th >支付渠道</th>-->
<th >原包名</th>
<th >现包名</th>
@ -189,8 +189,8 @@
<td rowspan="{$vo['sec_rowspan'][0]}">{$vo['game_name'][0]|default="------"}</td>
<td rowspan="{$vo['sec_rowspan'][0]}">{$vo['game_type'][0]|default="------"}</td>
<td rowspan="{$vo['sec_rowspan'][0]}">{$vo['withdraw_type'][0]|default="------"}</td>
<td rowspan='1'>默认</td>
<td rowspan='1'>{$vo['rate_data'][0][0]['exploitation_rate']|default="0"}</td>
<td rowspan='1'>{$vo['rate_data'][0][0]['exploitation_name']|default="0<=流水<=∞"}</td>
<td rowspan='1'>{$vo['rate_data'][0][0]['exploitation_rate']|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.bank_user|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.bank_card|default="------"}</td>
@ -216,7 +216,7 @@
</tr>
</if>
<volist name="vo['rate_data'][$index-1]" id="rate" key="rate_index">
<if condition="$rate['exploitation_name'] neq '默认'">
<if condition="$rate_index gt 1">
<tr>
<td rowspan='1'>{$rate.exploitation_name}</td>
<td rowspan='1'>{$rate.exploitation_rate}</td>

@ -53,6 +53,15 @@
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list input-list-resway search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" style="width:150px;">
<option value="">请选择推广公司</option>
<volist name=":getPromoteCompany()" id="vo">
<option value="{$vo.id}" <if condition="I('company_id') && $vo.id eq I('company_id')">selected
</if> >{$vo.company_name}</option>
</volist>
</select>
</div>
<!-- <div class="input-list input-list-promote search_label_rehab">-->
<!-- <select id="pay_time" name="pay_time" class="select_gallery" style="width:150px;">-->
<!-- <option value="">请选择月份</option>-->
@ -109,6 +118,7 @@
<thead>
<tr>
<th>时间</th>
<th>公司名称</th>
<th>会长账号</th>
<th>内外团</th>
<th>所属市场专员</th>
@ -134,6 +144,7 @@
<volist name="list_data" id="data">
<tr>
<td>{$data.pay_time}</td>
<td>{$data.company_name}</td>
<td>{$data.promote_account}</td>
<td>{$data.company_belong}</td>
<td>{$data.real_name}</td>
@ -148,6 +159,7 @@
</tr>
</volist>
<tr>
<td></td>
<td></td>
<td></td>
<td>合计</td>

@ -29,7 +29,35 @@
}
a:link ,a:visited,a:hover,a:active { text-decoration: none;}
.select2-results__option[aria-selected] {font-size:12px;}
.layui-layer-dialog .layui-layer-content{color:red}
.butnbox {padding:10px 0 10px;}
.butnbox .butnlist {overflow:hidden;clear:both;}
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
.butnbox .butnlist .butn.last {background:#009900;}
.butnbox .butnlist .butn~.butn {margin-left:20px;}
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
.layui-layer-title {
text-align: center;
height: 80px;
line-height: 80px;
font-weight: 600;
font-size: 18px;
}
.data_list table td{
line-height: 2;
}
.layui-layer-title {
text-align: center;
height: 42px;
line-height: 42px;
font-weight: 400;
font-size: 14px;
}
.main-place .question_content:before{
right: 20px;
left: auto;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
@ -92,7 +120,22 @@
<a class="sch-btn" href="javascript:;" id="search" url="{:U('marketStaffSettle','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
</div>
</div>
</div>
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<if condition="$market_check eq true">
<a class='butn' id='market_check' style='background-color: #3C95C8;'>市场部确认</a>
</if>
<if condition="$finance_check eq true">
<a class='butn' id='finance_check' style='background-color: #3C95C8;'>财务部审批</a>
</if>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<empty name="show_status">
@ -101,6 +144,7 @@
<!-- 表头 -->
<thead>
<tr>
<th><input class="check-all" type="checkbox"></th>
<th>时间</th>
<th>市场专员</th>
<th>级别</th>
@ -111,6 +155,8 @@
<th>当月合计</th>
<th>应发金额</th>
<th>待发金额</th>
<th>市场部确认</th>
<th>财务部审批</th>
</tr>
</thead>
@ -124,6 +170,7 @@
<notemtpy name = "list_data">
<volist name="list_data" id="data">
<tr>
<td><input class="ids" type="checkbox" value="{$data['id']}" data-market_check="{$data['market_check']}" data-finance_check="{$data['finance_check']}" name="ids[]"></td>
<td>{$data.pay_time|default='无'}</td>
<td>{$data.real_name|default='无'}</td>
<td>{$data.level|default='无'}</td>
@ -135,9 +182,11 @@
<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><if condition="$data.market_check eq 0"><span style="color: red"></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 style="color: red"></if>{$data['finance_check_detail']|default=''}<if condition="$data.market_check eq 1"></span></if></td>
</tr>
</volist>
<td colspan="3">合计</td>
<td colspan="4">合计</td>
<td>
<!-- <a href="{:U('FinancePromote/index',array('time_start'=>$start_time,'time_end'=>$end_time,'develop_type'=>'1,2'))}">-->
{$sum['performance_revenue']|default="0.00"}
@ -153,6 +202,8 @@
<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></td>
<td></td>
</notemtpy>
</tbody>
</table>
@ -186,6 +237,98 @@
//导航高亮
highlight_subnav('{:U('MarketPercentage/marketStaffSettle')}');
$(function(){
$("#market_check").on("click",function(){
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
if($(elem).data("market_check") == 0){
return $(elem).val();
}
}).get();
if(text.length < 1){
layer.msg("<font style='color:white'>" + '无需要进行[市场部确认]的申请,仅[市场部未确认]状态可以进行[市场部确认]操作</font>');
return;
}
text = text.join(",");
layer.confirm('【警告】[市场部确认]将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(index){
layer.close(index);
_doAgreeApply();
});
function _doAgreeApply(){
//执行
layer.load(2);
$.ajax({
type: "POST",
url: "{:U('doMarketCheck')}",
dataType: 'json',
async: true,
data: {ids:text},
success:function(data){
layer.closeAll('loading');
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;
}
}
});
}
});
$("#finance_check").on("click",function(){
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
if($(elem).data("finance_check") == 0&&$(elem).data("market_check") == 1){
return $(elem).val();
}
}).get();
if(text.length < 1){
layer.msg("<font style='color:white'>" + '无需要进行[财务部审批]的申请,仅[财务部未审批且市场部已确认]状态可以进行[财务部审批]操作</font>');
return;
}
text = text.join(",");
layer.confirm('【警告】[财务部审批]将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(index){
layer.close(index);
_doAgreeApply();
});
function _doAgreeApply(){
//执行
layer.load(2);
$.ajax({
type: "POST",
url: "{:U('doFinanceCheck')}",
dataType: 'json',
async: true,
data: {ids:text},
success:function(data){
layer.closeAll('loading');
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;
}
}
});
}
});
//搜索功能
$("#search").click(function(){
var url = $(this).attr('url');

@ -263,7 +263,7 @@
</tr> -->
<tr>
<td class="l noticeinfo">公司性质:</td>
<td class="l noticeinfo">结算性质:</td>
<td class="r">
<select name="company_type" class="select_gallery">
<!-- <option value="0">请选择公司性质</option> -->

@ -105,7 +105,7 @@
</tr> -->
<tr>
<td class="l noticeinfo">公司性质:</td>
<td class="l noticeinfo">结算性质:</td>
<td class="r">
<select name="company_type" class="select_gallery">
<!-- <option value="0">请选择公司性质</option> -->

@ -263,7 +263,7 @@
</tr> -->
<tr>
<td class="l noticeinfo">公司性质:</td>
<td class="l noticeinfo">结算性质:</td>
<td class="r">
<select name="company_type" class="select_gallery">
<option value="1" <if condition="$data['company_type'] eq '1'"> selected="selected"</if>>公司</option>

@ -52,7 +52,7 @@
<th>合同合作方名称</th>
<th>对应平台</th>
<th>公司性质</th>
<th>结算性质</th>
<th>原包名</th>
<th>现包名</th>

@ -127,7 +127,7 @@
<th>对应平台</th>
<th>审核类型</th>
<th>公司性质</th>
<th>结算性质</th>
<th>合同期限</th>
<th>结算生效期限</th>

@ -59,7 +59,7 @@
<div class="input-list input-list-game search_label_rehab">
<select id="company_type" name="company_type" class="select_gallery" >
<option value="">请选择公司性质</option>
<option value="">请选择结算性质</option>
<option value="1">公司</option>
<option value="2">个人</option>
</select>
@ -106,7 +106,7 @@
<th>合同合作方名称</th>
<th>对应平台</th>
<th>公司性质</th>
<th>结算性质</th>
<th>原包名</th>
<th>现包名</th>

@ -90,6 +90,16 @@
<?php endforeach;?>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<input type="text" name="amount_start" value="{:I('amount_start')}"
placeholder="押金起始区间"/>
-
<div class="input-append date" style="display:inline-block">
<input type="text" name="amount_end" value="{:I('amount_end')}"
placeholder="押金结束区间"/>
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="company_type" name="company_type" class="select_gallery" style="width:120px;">
<option value="">公会类型</option>

@ -184,14 +184,14 @@
<select id="develop_type" name="develop_type" class="select_gallery" style="width: 215px;">
<option value="0"></option>
<option value="1" selected>自主开发</option>
<option value="2">自主开发及维护</option>
<!-- <option value="2">自主开发及维护</option>-->
<option value="3">只维护</option>
</select>
</td>
</tr>
<tr>
<td class="l">公司性质:</td>
<td class="l">结算性质:</td>
<td class="r" >
<div class="input-list input-list-server search_label_rehab" style="margin:0;">
<select id="company_type" name="company_type" class="select_gallery" style="width: 215px;">
@ -329,6 +329,20 @@
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">是否为内部公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="is_inside" >
</label>
<label>
<input type="radio" class="inp_radio" value="0" name="is_inside" checked>
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>市场总监信息展示:</td>
<td class="r table_radio">

@ -119,14 +119,14 @@
<select id="develop_type" name="develop_type" class="select_gallery" style="width: 215px;">
<option value="0"></option>
<option value="1">自主开发</option>
<option value="2">自主开发及维护</option>
<!-- <option value="2">自主开发及维护</option>-->
<option value="3">只维护</option>
</select>
</td>
</tr>
<tr>
<td class="l">公司性质:</td>
<td class="l">结算性质:</td>
<td class="r" >
<div class="input-list input-list-server search_label_rehab" style="margin:0;">
<select id="company_type" name="company_type" class="select_gallery" style="width: 215px;">

@ -181,13 +181,13 @@
<select id="develop_type" name="develop_type" class="select_gallery" style="width: 215px;">
<option value="0" <if condition="$data.develop_type eq 0">selected</if>>无</option>
<option value="1" <if condition="$data.develop_type eq 1">selected</if>>自主开发</option>
<option value="2" <if condition="$data.develop_type eq 2">selected</if>>自主开发及维护</option>
<!-- <option value="2" <if condition="$data.develop_type eq 2">selected</if>>自主开发及维护</option>-->
<option value="3" <if condition="$data.develop_type eq 3">selected</if>>只维护</option>
</select>
</td>
</tr>
<tr>
<td class="l">公司性质:</td>
<td class="l">结算性质:</td>
<td class="r" >
<div class="input-list input-list-server search_label_rehab" style="margin:0;">
<select id="company_type" name="company_type" class="select_gallery" style="width: 215px;">
@ -330,6 +330,20 @@
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">是否为内部公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="is_inside" <if condition="$data['is_inside'] eq 1">checked</if>> 是
</label>
<label>
<input type="radio" class="inp_radio" value="0" name="is_inside" <if condition="$data['is_inside'] eq 0">checked</if>> 否
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">市场总监信息展示:</td>
<td class="r table_radio">

@ -116,13 +116,13 @@
<select id="develop_type" name="develop_type" class="select_gallery" style="width: 215px;">
<option value="0" <if condition="$data.develop_type eq 0">selected</if>>无</option>
<option value="1" <if condition="$data.develop_type eq 1">selected</if>>自主开发</option>
<option value="2" <if condition="$data.develop_type eq 2">selected</if>>自主开发及维护</option>
<!-- <option value="2" <if condition="$data.develop_type eq 2">selected</if>>自主开发及维护</option>-->
<option value="3" <if condition="$data.develop_type eq 3">selected</if>>只维护</option>
</select>
</td>
</tr>
<tr>
<td class="l">公司性质:</td>
<td class="l">结算性质:</td>
<td class="r" >
<div class="input-list input-list-server search_label_rehab" style="margin:0;">
<select id="company_type" name="company_type" class="select_gallery" style="width: 215px;">

@ -37,7 +37,7 @@
<th>对应平台</th>
<th>内外团</th>
<th>开发类型</th>
<th>公司性质</th>
<th>结算性质</th>
<th>结算周期</th>
<th>押金类型</th>
<th>押金金额</th>

@ -127,7 +127,7 @@
<th>对应平台</th>
<th>审核类型</th>
<th>公司性质</th>
<th>结算性质</th>
<th>合同期限</th>
<th>结算生效期限</th>

@ -85,7 +85,7 @@
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="company_type" name="company_type" class="select_gallery">
<option value="">请选择公司性质</option>
<option value="">请选择结算性质</option>
<option value="1" <?php echo I('company_type') === 1 ? "selected" : ''?>>公司</option>
<option value="2" <?php echo I('company_type') == 2 ? "selected" : ''?>>个人</option>
</select>
@ -151,7 +151,7 @@
<th>对应平台</th>
<th>内外团</th>
<th>开发类型</th>
<th>公司性质</th>
<th>结算性质</th>
<th width="80">是否<br>签署合同</th>
<th>结算周期</th>
<th width="100">押金类型</th>

@ -182,14 +182,14 @@
<select id="develop_type" name="develop_type" disabled class="select_gallery" style="width: 215px;">
<option value="0" <if condition="$data.develop_type eq 0">selected</if>>无</option>
<option value="1" <if condition="$data.develop_type eq 1">selected</if>>自主开发</option>
<option value="2" <if condition="$data.develop_type eq 2">selected</if>>自主开发及维护</option>
<!-- <option value="2" <if condition="$data.develop_type eq 2">selected</if>>自主开发及维护</option>-->
<option value="3" <if condition="$data.develop_type eq 3">selected</if>>只维护</option>
</select>
</td>
</tr>
<tr>
<td class="l">公司性质:</td>
<td class="l">结算性质:</td>
<td class="r" >
<div class="input-list input-list-server search_label_rehab" style="margin:0;">
<select id="company_type" disabled name="company_type" class="select_gallery" style="width: 215px;">
@ -343,6 +343,22 @@
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">是否为内部公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" disabled class="inp_radio" value="1" name="is_inside" <if condition="$data['is_inside'] eq 1">checked</if>> 是
</label>
<label>
<input type="radio" disabled class="inp_radio" value="0" name="is_inside" <if condition="$data['is_inside'] eq 0">checked</if>> 否
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">市场总监信息展示:</td>
<td class="r table_radio">

@ -2519,3 +2519,104 @@ CREATE TABLE `tab_payment_orders` (
/**
zyx 2020-09-25
*/
ALTER TABLE `tab_market_altogether`
ADD COLUMN `market_check` tinyint(2) NULL DEFAULT 0 COMMENT '市场确认 0 未确认 1 确认' AFTER `performance_profit`,
ADD COLUMN `market_check_detail` varchar(100) NULL DEFAULT '' COMMENT '市场确认详情' AFTER `market_check`,
ADD COLUMN `finance_check` tinyint(2) NULL DEFAULT 0 COMMENT '财务确认 0 未确认 1 确认' AFTER `market_check_detail`,
ADD COLUMN `finance_check_detail` varchar(100) NULL DEFAULT '' COMMENT '财务确认详情' AFTER `finance_check`;
ALTER TABLE `tab_promote_company`
ADD COLUMN `is_inside` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否为内部公司' AFTER `ali_partner`;
ALTER TABLE `tab_settleup_marketorder`
DROP COLUMN `company_name`,
ADD COLUMN `company_name` varchar(50) NULL DEFAULT '' COMMENT '公司名称' AFTER `company_id`;
CREATE TABLE `tab_aggregate_lack_statement_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`company_id` int(11) NULL DEFAULT 0 COMMENT '对账公司id',
`company_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '对账公司名称',
`company_belong_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '归属团体',
`company_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公司其他信息json',
`statement_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '对账金额',
`pay_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '总计',
`platform_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '平台流水金额',
`fine` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '罚款',
`reward` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '奖励',
`statement_begin_time` int(11) NOT NULL DEFAULT 0 COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT 0 COMMENT '对账截止时间',
`statement_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单相关信息json',
`statement_pool_num` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '生成此单的汇总单单号',
`is_payment` tinyint(3) NOT NULL DEFAULT 1 COMMENT '是否需要打款1-是 2-否(线下)',
`is_pool` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否被汇总:0否/1是',
`withdraw_type` tinyint(2) NULL DEFAULT 0 COMMENT '对账类型(0-周结 1月结 2补点 3特殊补点)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `company_tid`(`company_id`) USING BTREE,
INDEX `statement_begin_time`(`statement_begin_time`) USING BTREE,
INDEX `statement_end_time`(`statement_end_time`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '未满足支付条件的公司信息' ROW_FORMAT = Dynamic;
CREATE TABLE `tab_aggregate_statement_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`pool_id` int(11) NOT NULL COMMENT '汇总单id',
`company_id` int(11) NULL DEFAULT 0 COMMENT '对账公司id',
`company_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '对账公司名称',
`company_belong_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '归属团体',
`company_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公司其他信息json',
`statement_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '对账金额',
`pay_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '总计',
`platform_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '平台流水金额',
`fine` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '罚款',
`reward` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '奖励',
`statement_begin_time` int(11) NOT NULL DEFAULT 0 COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT 0 COMMENT '对账截止时间',
`statement_num` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算单号',
`statement_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单相关信息json',
`verify_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '验证状态 -1:配置信息不全 0:信息未确认 1:允许打款 2:线下无需打款',
`pay_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '打款状态 -1:打款失败 0:未打款 1:打款成功',
`pay_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '支付完成时间',
`pay_type` tinyint(2) NOT NULL DEFAULT 0 COMMENT '打款类型 1提现 2线上打款 3线下打款',
`pay_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '打款信息',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
`withdraw_type` tinyint(2) NULL DEFAULT 0 COMMENT '对账类型(0-周结 1月结 2补点 3特殊补点)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `company_tid`(`company_id`) USING BTREE,
INDEX `statement_begin_time`(`statement_begin_time`) USING BTREE,
INDEX `statement_end_time`(`statement_end_time`) USING BTREE,
INDEX `pay_status`(`pay_status`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '对账单汇总详情' ROW_FORMAT = Dynamic;
CREATE TABLE `tab_aggregate_statement_pool` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`statement_num` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算批量单号',
`statement_ids` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '涉及的结算单id',
`withdraw_type` tinyint(2) NULL DEFAULT 3 COMMENT '对账类型(0-周结 1月结 2补点 3无)',
`create_lack_ids` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '生成的lackid',
`del_lack_ids` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '合并计算的lackid',
`statement_begin_time` int(11) NOT NULL DEFAULT 0 COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT 0 COMMENT '对账截止时间',
`statement_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '对账金额',
`lack_statement_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '不结算金额',
`pay_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '总计',
`platform_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '平台流水金额',
`lack_platform_amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '不结算平台流水金额',
`fine` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '罚款',
`reward` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '奖励',
`online_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '成功支付金额',
`withdraw_money` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '提现成功金额',
`verify_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态 -2:打款失败 -1审批拒绝 0:未审批 1:审核通过 2:待打款 3:打款中 4:打款成功',
`verify_log` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '审批相关信息json',
`ext_file` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '凭证地址',
`is_payment` tinyint(3) NOT NULL DEFAULT 1 COMMENT '是否需要打款1-是 2-否(线下)',
`op_time` int(11) NOT NULL DEFAULT 0 COMMENT '操作时间',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE,
INDEX `op_time`(`op_time`) USING BTREE,
INDEX `verify_status`(`verify_status`) USING BTREE,
INDEX `statement_end_time`(`statement_end_time`) USING BTREE,
INDEX `statement_begin_time`(`statement_begin_time`) USING BTREE,
INDEX `statement_num`(`statement_num`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '对账单汇总' ROW_FORMAT = Dynamic;
Loading…
Cancel
Save