Merge pull request '版本更新v1.2.0' (#15) from release into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/15
master
廖金灵 4 years ago
commit 85e33e7089

@ -127,7 +127,7 @@ class CompanyStatementLackController extends ThinkController
//下游公司
A("CompanyStatementPool")->viewPcPool($dbres,$is_export,$withdraw_type);
}else{
A("CompanyStatementPool")->viewPuPool($dbres,$is_export,$withdraw_type);
A("CompanyStatementPool")->viewPuPool($dbres,$is_export,["withdraw_type"=>3]);
}
}
@ -284,7 +284,7 @@ class CompanyStatementLackController extends ThinkController
A("CompanyStatementPool")->viewPcPool($dbres,$is_export);
}else{
$this->assign("title","下游个人未汇总");
A("CompanyStatementPool")->viewPuPool($dbres,$is_export);
A("CompanyStatementPool")->viewPuPool($dbres,$is_export,["withdraw_type"=>3]);
}
}

@ -172,7 +172,7 @@ class CompanyStatementOfflineController extends ThinkController
//下游公司
A("CompanyStatementPool")->viewPcPool($dbres,$is_export);
}else{
A("CompanyStatementPool")->viewPuPool($dbres,$is_export);
A("CompanyStatementPool")->viewPuPool($dbres,$is_export,["withdraw_type"=>3]);
}
}
@ -196,7 +196,7 @@ class CompanyStatementOfflineController extends ThinkController
A("CompanyStatementPool")->viewPcPool($dbres,$is_export);
}else{
$this->assign("title","下游个人线下打款");
A("CompanyStatementPool")->viewPuPool($dbres,$is_export);
A("CompanyStatementPool")->viewPuPool($dbres,$is_export,["withdraw_type"=>3]);
}
}

@ -218,7 +218,7 @@ class CompanyStatementPoolController extends ThinkController
//获取基本信息
$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();
$pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids,verify_status,is_payment,withdraw_type,statement_begin_time,statement_end_time')->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();
@ -236,7 +236,7 @@ class CompanyStatementPoolController extends ThinkController
//下游公司
$this->viewPcPool($infolist,$is_export);
}else{
$this->viewPuPool($infolist,$is_export);
$this->viewPuPool($infolist,$is_export,$pool_info);
}
}
@ -466,11 +466,19 @@ class CompanyStatementPoolController extends ThinkController
}
//个人汇总结算查看
public function viewPuPool(&$infolist,$is_export){
public function viewPuPool(&$infolist,$is_export,$pool_info){
$line = 1;
$count = [];
$count = [
"pool_week_count"=>0,//上周数据合计
"pool_lack_count"=>0,//本周未结算流水合计
"sum_money"=>0,//打款合计
"pool_lack_count"=>0,//本周未结算流水合计
"st_lack_count"=>0,//本周暂不结算合计
"st_count"=>0//本次应支付
];
$week_line = 2;
$pool_statement_begin_time = date('Y.m.d', $pool_info['statement_begin_time']);
$pool_statement_end_time = date('Y.m.d', $pool_info['statement_end_time']);
//获取对接人
foreach($infolist as $k=>&$v){
$v['statement_info'] = json_decode($v['statement_info'],true);
@ -484,6 +492,7 @@ class CompanyStatementPoolController extends ThinkController
$v['is_payment'] = 1;
}
}
$is_statement = $v['st'] == 1 ? true :false;
$cline = $line+1;
if($is_export){
$v['statement_money'] = "=ROUND(";
@ -495,17 +504,9 @@ class CompanyStatementPoolController extends ThinkController
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;
}
@ -513,8 +514,25 @@ class CompanyStatementPoolController extends ThinkController
if (!$val['ratio']) {
$val['ratio'] = 0;
}
//上周数据合计
if($val['statement_begin_time'] == $pool_statement_begin_time && $val['statement_end_time'] == $pool_statement_end_time){
$count['pool_week_count'] += $val['pay_amount'];
if($is_export){
$this->setWeekCount($line);
}
}
//本周未结算流水合计
if(!$is_statement){
$count['pool_lack_count'] += $val['pay_amount'];
$count['st_lack_count'] += $val['sum_money'];
if($is_export){
$this->setlackCount($line);
}
}else{
$count['st_count'] += $val['sum_money'];
}
}
if($is_export){
if($v['withdraw_type'] != 3) {
@ -525,15 +543,11 @@ class CompanyStatementPoolController extends ThinkController
$v['statement_money'] .= "S{$line}+";
}else{
$count['platform_amount'] += $val['pay_amount'];
// $count['sum_money'] += $val['sum_money'];
}
}
$count['week_money'] += $va['week_amount'];
$count['sum_money'] += $va['week_amount'];
}
// dump($count);
$v['row'] = $row;
@ -543,7 +557,6 @@ class CompanyStatementPoolController extends ThinkController
if($is_export){
if($v['withdraw_type'] != 3) {
// $v['statement_money'] .="P{$cline}-Q{$cline},2)";
$v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1) . ",2)";
} else {
$v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1).",2)";
@ -551,18 +564,78 @@ class CompanyStatementPoolController extends ThinkController
}
}
if($is_export){
if($pool_info["withdraw_type"] != 3){
//上周数据合计
$count["pool_week_count"] = $this->setWeekCount($line,true);
$count["pool_lack_count"] = $this->setlackCount($line,true);
//本周暂不结算合计
$count["st_lack_count"] = '=ROUND(SUMIFS(T2:T'.$line.',Y2:Y'.$line.',"否"),2)';
//本次应支付
$count["st_count"] = '=ROUND(SUMIFS(T2:T'.$line.',Y2:Y'.$line.',"是"),2)';
}
$count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)";
$count["week_money"] = "=ROUND(SUM(S2:S".$line."),2)";
$count["sum_money"] = "=ROUND(SUM(T2:T".$line."),2)";
}
// die();
// die();
$this->assign("data",$infolist);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->assign("withdraw_type",$pool_info["withdraw_type"]);
$this->display("CompanyStatementPool/viewPuPool");
}
//导出中上周结算数据计算
protected function setWeekCount($line,$return = false)
{
global $pool_week_str,$pool_week_line;
if(empty($pool_week_str)){
$pool_week_str = "=";
$pool_week_line = 0;
}
if($pool_week_str == "="){
$pool_week_str .= "SUM(K{$line}:";
}else{
if($line - $pool_week_line > 1){
//不连续
$pool_week_str .= "K{$pool_week_line})+SUM(K{$line}:";
}
}
$pool_week_line = $line;
if($return){
$data = $pool_week_str."K{$line})";
unset($pool_week_str,$pool_week_line);
return $data;
}
}
//本周不结算
protected function setlackCount($line,$return = false)
{
global $pool_lack_str,$pool_lack_line;
if(empty($pool_lack_str)){
$pool_lack_str = "=";
$pool_lack_line = 0;
}
if($pool_lack_str == "="){
$pool_lack_str .= "SUM(K{$line}:";
}else{
if($line - $pool_lack_line > 1){
//不连续
$pool_lack_str .= "K{$pool_lack_line})+SUM(K{$line}:";
}
}
$pool_lack_line = $line;
if($return){
$data = $pool_lack_str."K{$line})";
unset($pool_lack_str,$pool_lack_line);
return $data;
}
}
//改变结构
public function changeDataStruct($statement_info = [],$is_export = 0,&$week_line = 1) {
@ -1022,6 +1095,13 @@ class CompanyStatementPoolController extends ThinkController
$ids = $_REQUEST['ids'];
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
if ($this->checkStatementPay($ids)) {
$this->ajaxReturn(array(
'status' => 0,
"info"=>"已有打款的详单,审批撤回失败"
));
}
foreach($dbres as $k=>&$v){
$VerifyStatus = $v['verify_status'];
if(!in_array($VerifyStatus,[-1,1,2])) continue;
@ -1033,6 +1113,8 @@ class CompanyStatementPoolController extends ThinkController
$v['verify_log'] = json_encode($v['verify_log']);
$v['verify_status']=6;
$this->delPayInfo($v['id']);
$this->DBModel->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"审批撤回",'url'=>U('lists')]);
}
@ -1042,6 +1124,39 @@ class CompanyStatementPoolController extends ThinkController
));
}
public function checkStatementPay($ids) {
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
foreach ($dbres as $k=>$v) {
if ($v['verify_status'] == 3) {
return true;
}
}
return false;
}
public function delPayInfo($id) {
$company_statement_info = M("company_statement_info","tab_")->field("id")->where("pool_id={$id}")->select();
//有一笔单子已打款将不可撤回
foreach ($company_statement_info as $key => $value) {
if($value['pay_status'] == 1) {
return;
}
}
//线上打款审核状态撤回
M("company_statement_info","tab_")->where("pool_id={$id}")->save(['pay_verify_status'=>0,'verify_time'=>'','verify_member_id'=>0]);
//线上打款支付宝状态撤回
M("company_statement_info","tab_")->where("pool_id={$id} and verify_status != 2")->save(['verify_status'=>0]);
foreach ($company_statement_info as $key => $value) {
$is_hav = M("pay_statement_info","tab_")->where(['statement_info_id'=>$value['id']])->find();
if ($is_hav) {
M("pay_statement_info","tab_")->where(['statement_info_id'=>$value['id']])->delete();
}
}
}
//线下打款
public function setUlPayment()
{
@ -1082,6 +1197,11 @@ class CompanyStatementPoolController extends ThinkController
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>$opname,'url'=>U('lists')]);
}
if($ajaxreturn){
if ($change_status == 2) {
$this->splitForPayStatementInfo();
}
$this->ajaxReturn(array(
'status' => 1,
"info"=>$opname."成功"
@ -1800,4 +1920,188 @@ class CompanyStatementPoolController extends ThinkController
}
public function splitForPayStatementInfo() {
$ids = $_REQUEST['ids'];
$limit_amount = 50000;
$dbres = $this->DBModel->field("id,company_type")->where("id in ({$ids})")->select();
foreach($dbres as $key=>$value){
$statement_data_info = M("company_statement_info","tab_")
->where(['pool_id'=>$value['id']])
->select();
if ($value['company_type'] == 2){
//循环info汇总详单
foreach ($statement_data_info as $skey => $svalue) {
if ($svalue['verify_status'] == 1) {
$statement_info = json_decode($svalue['statement_info'], true);
$handle_data = [];
foreach ($statement_info as $k => $v) {
$game_list = $v['game_list'];
foreach ($game_list as $gk => $gv) {
//同一结算时间的汇总成一个数组
if (!$handle_data[$gv['statement_begin_time'] . '-' . $gv['statement_end_time']][$v['account']]) {
$handle_data[$gv['statement_begin_time'] . '-' . $gv['statement_end_time']][$v['account']] = ['account' => $v['account'], 'game_list' => [$gv]];
} else {
$handle_data[$gv['statement_begin_time'] . '-' . $gv['statement_end_time']][$v['account']]['game_list'][] = $gv;
}
}
}
$save = [];
$handle_statement = [];
// dump($handle_data);
//将同一时间的汇总详单记录起来
foreach ($handle_data as $hk => $hv) {
$statement_time = explode('-', $hk);
$save['statement_begin_time'] = strtotime(str_replace('.', '-', $statement_time[0]));
$save['statement_end_time'] = strtotime(str_replace('.', '-', $statement_time[1]));
$handle_statement = json_encode(array_values($hv));
$statement_money = 0;
foreach ($hv as $shk => $shv) {
$game_list = $shv['game_list'];
foreach ($game_list as $gk => $gv) {
$statement_money += $gv['sum_money']+$gv['reward']-$gv['fine']-$gv['withhold'];
}
}
if ($statement_money > $limit_amount) {
for ($amount = $statement_money; $amount > 0; $amount -= $limit_amount) {
$save['statement_info'] = $handle_statement;
$save['company_id'] = $svalue['company_id'];
$save['company_name'] = $svalue['company_name'];
$save['company_type'] = $svalue['company_type'];
$save['pay_type'] = $svalue['pay_type'];
$save['verify_status'] = $svalue['verify_status'];
$save['remark'] = $svalue['remark'];
$save['company_info'] = $svalue['company_info'];
$save['statement_num'] = "JS_" . date("YmdHis", time()) . $svalue['company_id'] . sp_random_string(5);
if ($amount > $limit_amount) {
$save['statement_money'] = $limit_amount;
} else {
$save['statement_money'] = $amount;
}
$save['final_statement_money'] = $save['statement_money'];
// $setStatementInfo = json_decode($svalue['statement_info'],true);
// foreach ($setStatementInfo as $sskey => $ssvalue) {
//
// $setStatementInfo[$sskey]['pay_amount'] = $save['statement_money']/(($ssvalue['ratio']-$ssvalue['fax_ratio'])/100);
// $setStatementInfo[$sskey]['sum_money'] = $save['statement_money'];
//
// }
//
// $save['statement_info'] = json_encode($setStatementInfo);
$save['statement_info_id'] = $svalue['id'];
$save['fine'] = $svalue['fine'];
$save['reward'] = $svalue['reward'];
$save['is_limit'] = 1;
M("pay_statement_info", "tab_")->add($save);
}
} else {
$save['statement_info'] = $handle_statement;
$save['company_id'] = $svalue['company_id'];
$save['company_name'] = $svalue['company_name'];
$save['company_type'] = $svalue['company_type'];
$save['pay_type'] = $svalue['pay_type'];
$save['verify_status'] = $svalue['verify_status'];
$save['remark'] = $svalue['remark'];
$save['company_info'] = $svalue['company_info'];
$save['statement_num'] = "JS_" . date("YmdHis", time()) . $save['company_id'] . sp_random_string(5);
$save['statement_money'] = $statement_money;
$save['final_statement_money'] = $save['statement_money'];
$save['statement_info_id'] = $svalue['id'];
$save['fine'] = $svalue['fine'];
$save['reward'] = $svalue['reward'];
M("pay_statement_info", "tab_")->add($save);
}
}
}
}
}
else {
foreach ($statement_data_info as $skey => $svalue) {
if ($svalue['verify_status'] == 1) {
$statement_money = $svalue['statement_money'];
if ($statement_money > $limit_amount) {
for ($amount = $statement_money; $amount > 0; $amount -= $limit_amount) {
$save['statement_begin_time'] = $svalue['statement_begin_time'];
$save['statement_end_time'] = $svalue['statement_end_time'];
$save['company_id'] = $svalue['company_id'];
$save['company_name'] = $svalue['company_name'];
$save['company_type'] = $svalue['company_type'];
$save['pay_type'] = $svalue['pay_type'];
$save['verify_status'] = $svalue['verify_status'];
$save['remark'] = $svalue['remark'];
$save['company_info'] = $svalue['company_info'];
$save['statement_num'] = "JS_" . date("YmdHis", time()) . $svalue['company_id'] . sp_random_string(5);
$save['statement_money'] = $svalue['statement_money'];
$save['is_limit'] = 1;
if ($amount > $limit_amount) {
$save['statement_money'] = $limit_amount;
} else {
$save['statement_money'] = $amount;
}
$save['final_statement_money'] = $save['statement_money'];
$setStatementInfo = json_decode($svalue['statement_info'],true);
foreach ($setStatementInfo as $sskey => $ssvalue) {
$setStatementInfo[$sskey]['pay_amount'] = $save['statement_money']/(($ssvalue['ratio']-$ssvalue['fax_ratio'])/100);
$setStatementInfo[$sskey]['sum_money'] = $save['statement_money'];
}
$save['statement_info'] = json_encode($setStatementInfo);
$save['statement_info_id'] = $svalue['id'];
$save['fine'] = $svalue['fine'];
$save['reward'] = $svalue['reward'];
M("pay_statement_info", "tab_")->add($save);
}
} else {
$save['statement_begin_time'] = $svalue['statement_begin_time'];
$save['statement_end_time'] = $svalue['statement_end_time'];
$save['statement_info'] = $svalue['statement_info'];
$save['company_id'] = $svalue['company_id'];
$save['company_name'] = $svalue['company_name'];
$save['company_type'] = $svalue['company_type'];
$save['pay_type'] = $svalue['pay_type'];
$save['verify_status'] = $svalue['verify_status'];
$save['remark'] = $svalue['remark'];
$save['company_info'] = $svalue['company_info'];
$save['statement_num'] = "JS_" . date("YmdHis", time()) .$svalue['company_id'] . sp_random_string(5);
$save['statement_money'] = $svalue['statement_money'];
$save['final_statement_money'] = $save['statement_money'];
$save['statement_info_id'] = $svalue['id'];
$save['fine'] = $svalue['fine'];
$save['reward'] = $svalue['reward'];
M("pay_statement_info", "tab_")->add($save);
}
}
}
}
}
}
}

@ -466,6 +466,7 @@ ADD COLUMN `kefu_qq` varchar(255) NULL DEFAULT '' COMMENT 'kefu_qq_type为2 时
$otherData['flooring_page_video_cover'] = $sibling['flooring_page_video_cover'];
$otherData['kefu_qq'] = I('post.kefu_qq');
$otherData['kefu_qq_type'] = I('post.kefu_qq_type');
$otherData['data_share'] = I('post.data.share');
M('Game', 'tab_')->data($otherData)->where(array('id' => $another['id']))->save();
//同时修改代充游戏折扣

@ -514,6 +514,16 @@ class MemberController extends ThinkController
/* if (!empty($data['idcard']) && !preg_match('/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/', $data['idcard'])) {
$this->error('请输入正确的身份证号码');
}*/
if ($data['age_status'] == 2 || $data['age_status'] == 3) {
$user = A('User', 'Event');
$userInfo = $user->user_entity($id);
if (empty($userInfo['real_name'])) {
$this->error('真实姓名不能为空');
}
if (empty($userInfo['idcard'])) {
$this->error('身份证号不能为空');
}
}
$res = $member->updateInfo($data);
if ($res !== false) {
@ -713,7 +723,10 @@ class MemberController extends ThinkController
public function changephone()
{
if (preg_match('/^[1][3578][0-9]{9}/', $_POST['phone'])) {
if (strlen($_POST['phone']) != 11) {
$this->ajaxReturn(array("status" => 0, "msg" => "手机长度有误"));
}
if (preg_match('/^[1][0-9]{10}$/', $_POST['phone'])) {
//重复判断
$where['phone'] = $_POST['phone'];
$user = M('User', 'tab_')->where($where)->field('id,account')->find();

@ -10,6 +10,62 @@ namespace Admin\Controller;
class OldCountController extends \Think\Controller
{
public function updateStatementInfo() {
$data = M("company_statement_info","tab_")
->where(['pay_status'=>['neq',0]])
->select();
foreach ($data as $key => $value) {
M("company_statement_info","tab_")
->where(['id'=>$value['id']])
->save([
'pay_verify_status'=>1,
'verify_time'=>$value['pay_time'],
'verify_member_id'=>1
]);
}
$data = M("excel_statement_info","tab_")
->where("1=1")
->select();
foreach ($data as $key => $value) {
$statement_info = json_decode($value['statement_info'],true);
$time = explode('-',$statement_info[0]['game_list'][0]['statement_time']);
$start = strtotime(str_replace('.','-',$time[0]));
$end = strtotime(str_replace('.','-',$time[1]));
M("excel_statement_info","tab_")
->where(['id'=>$value['id']])
->save([
'statement_begin_time'=>$start,
'statement_end_time'=>$end
]);
// dump($statement_info);
}
$data = M("excel_statement_info","tab_")
->where(['pay_status'=>['neq',0]])
->select();
foreach ($data as $key => $value) {
M("excel_statement_info","tab_")
->where(['id'=>$value['id']])
->save([
'verify_status'=>1,
'verify_time'=>$value['pay_time'],
'verify_member_id'=>1
]);
}
echo "success";
}
public function oldRewardChange() {
$data = M("company_lack_statement_info","tab_")

@ -153,7 +153,12 @@ class SpendController extends ThinkController
($value['promote_account']=='官方渠道')?($value['promote_account']=C('OFFICIEL_CHANNEL')):'';
$value['market_admin_username'] = $adminUsernameList[$value['market_admin_id']] ?? '无';
$value['is_check_str'] = D(self::model_name)::IsCheckStr[$value['is_check']];
//拆分游戏名称和设备类型
$game_arr = explode("(",rtrim($value['game_name'],")"));
$value['game_name'] = $game_arr[0];
$value['sdk_version_name'] = $game_arr[1];
}
$this->assign('showMarketAdmin', session('user_auth')['show_market_admin']);
$this->assign('showPromote', session('user_auth')['show_promote']);
$this->assign('isMarketAdmin', $isMarketAdmin);

@ -327,6 +327,7 @@ class StatementMangementController extends ThinkController
->field('r.id')
->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT')
->where($map)
->order("r.id desc")
->group('r.id')
->select();
@ -345,10 +346,11 @@ class StatementMangementController extends ThinkController
$list = M('reward_record', 'tab_')->alias('r')
->field('
r.id, r.relation_game_id, r.settlement_time, r.confirm_time, r.content, r.reward_type, r.creater_id,
r.id, r.relation_game_id, r.settlement_time, r.confirm_time, r.content, r.reward_type, r.creater_id,r.create_time,
rd.id as rid, rd.type as detail_type, rd.company_type as detail_company_type, rd.company_id as detail_company_id , rd.company_name as detail_company_name, rd.settlement_type as detail_settlement_type, rd.promote_account as detail_promote_account,rd.amount as detail_amount
')
->where($map)
->order("rid desc")
->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT')->select();
if ($list) {
$record = [];
@ -397,7 +399,7 @@ class StatementMangementController extends ThinkController
if ($page) {
$this->assign('_page', $page);
}
ksort($record);
krsort($record);
$this->assign('list', $record);
$this->assign('promoters', array_column(M('promote', 'tab_')->where(['level'=>1])->field('id, nickname, account')->select(), null, 'id'));

@ -212,7 +212,8 @@ class TestingResourceController extends ThinkController
'user_account' => '测试账号',
'user_phone' => '手机号',
'promote_account' => '所属推广员',
'apply_promote_account' => '申请人',
'apply_username' => '申请人',
'verify_admin_username' => '审核人',
'apply_amount' => '申请金额',
'provide_amount' => '发放金额',
'verify_status_text' => '审核状态',
@ -230,10 +231,13 @@ class TestingResourceController extends ThinkController
$gameId = $params['game_id'] ?? 0;
$admins = M('ucenter_member', 'sys_')->field(['id', 'username'])->select();
$this->assign('verifyStatusList', TestingResourceRepository::$verifyStatusList);
$this->assign('provideStatusList', TestingResourceRepository::$provideStatusList);
$this->assign('servers', $gameRepository->getServersByGameId($gameId));
$this->assign('games', $gameRepository->getChoiceGames());
$this->assign('admins', $admins);
$this->assign('count', $count);
$this->assign('_page', $pagination);
$this->assign('records', $records);
@ -266,7 +270,6 @@ class TestingResourceController extends ThinkController
'user_account' => $role['user_account'],
'server_name' => $role['server_name'],
'role_name' => $role['role_name'],
'apply_promote_account' => $applyPromote ? $applyPromote['account'] : '',
'promote_account' => $promote['account'],
'ref_name' => $order['ref_name'],
'ref_amount' => $order['ref_amount'],
@ -337,9 +340,10 @@ class TestingResourceController extends ThinkController
public function doApply()
{
$params = I('post.');
$userAuth = session('user_auth');
try {
$testingResourceService = new TestingResourceService();
$testingResourceService->apply($params);
$testingResourceService->apply($params, null, $userAuth['uid']);
return $this->ajaxReturn(['status' => 1, 'message' => '申请成功,等待审核。']);
} catch (\Throwable $e) {
return $this->ajaxReturn(['status' => 0, 'message' => $e->getMessage()]);
@ -362,11 +366,13 @@ class TestingResourceController extends ThinkController
if (count($batches) == 0) {
return $this->ajaxReturn(['status' => 0, 'message' => '无未审核批次']);
}
$userAuth = session('user_auth');
foreach ($batches as $batch) {
if ($status == 1) {
$service->verify($batch);
$service->verify($batch, $userAuth['uid']);
} elseif ($status == 2) {
$service->verifyRefuse($batch);
$remark = '审核拒绝';
$service->verifyRefuse($batch, $remark, $userAuth['uid']);
}
}
return $this->ajaxReturn(['status' => 1, 'message' => '操作成功']);
@ -510,6 +516,10 @@ class TestingResourceController extends ThinkController
$applyPromotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($batches, 'apply_promote_id')]])->select();
$applyPromotes = index_by_column('id', $applyPromotes);
$verifyAdminIds = array_column($batches, 'verify_admin_id');
$verifyAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $verifyAdminIds]])->select();
$verifyAdmins = index_by_column('id', $verifyAdmins);
$promotes = [];
if (count($roles) > 0) {
$promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($roles, 'promote_id')]])->select();
@ -525,6 +535,8 @@ class TestingResourceController extends ThinkController
$role = isset($roles[$roleKey]) ? $roles[$roleKey] : null;
$applyPromote = $applyPromotes[$batch['apply_promote_id']] ?? null;
$promote = $role ? ($promotes[$role['promote_id']] ?? null) : null;
$verifyAdmin = $verifyAdmins[$batch['verify_admin_id']] ?? null;
$records[] = [
'id' => $order['id'],
'batch_no' => substr($batch['batch_no'], 14),
@ -533,8 +545,8 @@ class TestingResourceController extends ThinkController
'user_account' => $role ? $role['user_account'] : '',
'server_name' => $role ? $role['server_name'] : '',
'role_name' => $role ? $role['role_name'] : '',
'apply_promote_account' => $applyPromote ? $applyPromote['account'] : '',
'promote_account' => $promote ? $promote['account'] : '',
'verify_admin_username' => $verifyAdmin ? $verifyAdmin['username'] : '系統',
'ref_name' => $order['ref_name'],
'ref_amount' => $order['ref_amount'],
'num' => $order['num'],
@ -552,8 +564,8 @@ class TestingResourceController extends ThinkController
'server_name' => '区服名称',
'user_account' => '测试账号',
'role_name' => '角色名称',
'apply_promote_account' => '申请人',
'promote_account' => '所属推广员',
'verify_admin_username' => '审核人',
'ref_name' => '资源名称',
'ref_amount' => '资源价值',
'num' => '申请数量',

@ -308,28 +308,61 @@
</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></td>
<td>{$count.week_money}</td>
<td>{$count.sum_money}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<if condition="!$is_export">
<if condition="$withdraw_type LT 2">
<tr>
<td colspan="9" rowspan="3"></td>
<td>上周数据合计:</td>
<td>{$count.pool_week_count}</td>
<td colspan="5" rowspan="3"></td>
<td colspan="3">打款合计:</td>
<td>{$count.sum_money}</td>
<td colspan="6" rowspan="3"></td>
<if condition="!$is_export">
<td rowspan="3"></td>
</if>
</tr>
<tr>
<td>本周未结算流水合计:</td>
<td>{$count.pool_lack_count}</td>
<td colspan="3">本周暂不结算合计:</td>
<td>{$count.st_lack_count}</td>
</tr>
<tr>
<td></td>
</if>
</tr>
<td></td>
<td colspan="3">本次应支付:</td>
<td>{$count.st_count}</td>
</tr>
<else />
<tr>
<td colspan=10 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.week_money}</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>
</if>
</tbody>
</table>
</div>

@ -68,13 +68,34 @@
.layui-layer{
overflow: scroll;
}
.main-place .question_content:before{
right: 20px;
left: auto;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$_REQUEST['count_date']}游戏统计</h3>
<p class="description_text">说明:仅统计通知成功,结算给上游的是支付成功通知成功,就算给公会的是支付成功</p>
<p class="description_text">说明:游戏相关支付统计,结算给上游的是支付成功通知成功的订单,结算给公会的是支付成功的订单</p>
<div class="question" style="float: right;margin-right: 20px;">
<i class="question_mark">?</i>
<ul class="question_content" style="right: -20px;left: auto;">
<li class="question_title">数据相关说明</li>
<li class="question_list">
<span class="">上游结算:</span>
<span class="">游戏内充值合计 + 聚合万盟数据 + 聚合其他渠道数据</span>
</li>
<li class="question_list">
<span class="">下游结算:</span>
<span class="">游戏内充值合计 + 联运通知失败合计 + 聚合万盟数据 + 聚合万盟通知失败 - 下游不结算订单</span>
</li>
<li class="question_list">
<span class="">下游不结算订单:</span>
<span class="">未在此处体现,指:推广公司不推广某款游戏后,产生的该游戏的流水</span>
</li>
</ul>
</div>
</div>
<div class="cf top_nav_list">
@ -178,7 +199,7 @@
<th ><div class="tooltip"><span style="color: red">联运通知失败合计</span><span class="tooltiptext"><span style="margin-left: -10px">联运所有通知失败的合计金额</span></span></div></th>
<th ><div class="tooltip">聚合万盟数据<span class="tooltiptext"><span style="margin-left: -10px">聚合平台万盟渠道支付成功且通知成功的金额</span></span></div></th>
<th ><div class="tooltip"><span style="color: red">聚合万盟通知失败</span><span class="tooltiptext"><span style="margin-left: -10px">聚合平台万盟渠道通知失败的订单合计金额</span></span></div></th>
<th ><div class="tooltip">聚合平台测试订单<span class="tooltiptext"><span style="margin-left: -10px">聚合平台测试订单</span></span></div></th>
<th ><div class="tooltip"><span style="color: red">聚合平台测试订单</span><span class="tooltiptext"><span style="margin-left: -10px">聚合平台测试订单</span></span></div></th>
<th ><div class="tooltip">聚合其他渠道数据<span class="tooltiptext"><span style="margin-left: -10px">聚合平台其他渠道(不含万盟)支付成功通知成功订单合计</span></span></div></th>
<th ><div class="tooltip"><span style="color: red">聚合其他渠道通知失败订单</span><span class="tooltiptext"><span style="margin-left: -10px">聚合平台其他渠道(不含万盟)<br>通知失败的订单合计金额</span></span></div></th>
<th >操作</th>
@ -243,7 +264,7 @@
'sdk_type'=>$_GET['sdk_type'],
'game_id'=>$data['game_id'],
'platform_type'=>2,
])}">{$data.test_amount}</a></span>
])}" style="color:red;">{$data.test_amount}</a></span>
</td>
<td ><a href="{:U('Finance/aggDetail', [
'timestart'=>$_GET['timestart'],

@ -676,6 +676,15 @@
</td>
</tr>
<tr>
<td class="l noticeinfo">安卓IOS数据是否互通</td>
<td class="r">
<select name="data_share">
<option value="0">不互通</option>
<option value="1">互通</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>

@ -892,6 +892,15 @@
</td>
</tr>
<tr>
<td class="l noticeinfo">安卓IOS数据是否互通</td>
<td class="r">
<select name="data_share">
<option value="0"<if condition="$data['data_share'] eq 0"> selected </if>>不互通</option>
<option value="1"<if condition="$data['data_share'] eq 1"> selected </if>>互通</option>
</select>
</td>
</tr>
</tbody>
</table>

@ -97,13 +97,13 @@
<td class="l noticeinfo">实名认证</td>
<td class="r table_radio">
<span class="form_radio table_btn player_table_btn">
<switch name="data.age_status">
<case value="0">未认证</case>
<case value="1">未通过</case>
<case value="2">已认证</case>
<case value="3">未成年</case>
<default />意外数据
</switch>
<select name="age_status">
<option value="0" <if condition="$data['age_status'] eq 0">selected</if> >未认证</option>
<option value="1" <if condition="$data['age_status'] eq 1">selected</if> >未通过</option>
<option value="2" <if condition="$data['age_status'] eq 2">selected</if> >已认证</option>
<option value="3" <if condition="$data['age_status'] eq 3">selected</if> >未成年</option>
</select>
</span><span class="notice-text">需玩家认证真实姓名和身份证号码</span></td>
</tr>
<tr>
@ -450,7 +450,7 @@
value: ''
}, function (phone) {
var jsid = $('#selfid').val();
preg = /^[1][3578][0-9]{9}/;
preg = /^[1][0-9]{10}$/;
if (!preg.test(phone)) {
layer.msg("手机号码不正确");
return false;

@ -5,6 +5,8 @@
<style>
#form .txt_area.download_url {width:400px;}
.tabcon1711 .table_radio2 .table_btn {width:215px;}
.move200 {margin-left: -1000px;}
.move150 {margin-left: -150px;}
</style>
</block>
<block name="body">
@ -36,7 +38,7 @@
<tr>
<td class="l">合同合作方名称:</td>
<td class="r" >
<input type="text" class="txt " name="partner" value="{$data.partner}" placeholder="请输入合作方名称" readonly>
<input type="text" class="txt " name="partner" id="partner" value="{$data.partner}" placeholder="请输入合作方名称" readonly>
</td>
</tr>
@ -133,7 +135,7 @@
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<?php if($relation):?>
<tr>
<!--<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>合作方式:</td>
<td class="r">
<select name="relation[collaborate_way]" disabled id="collaborate_way" class="select_gallery">
@ -142,8 +144,27 @@
</select>
<span class="notice-text"></span>
</td>
</tr>
</tr>-->
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td>
<td class="l" style="width: 50px;">
<select name="part_a_type" id="part_a_type" class="select_gallery" disabled>
<option value="1" selected>上游CP公司</option>
<option value="2">己方公司</option>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td>
<td class="r">
<select name="part_b_type" id="part_b_type" class="select_gallery" disabled>
<option value="1" >上游CP公司</option>
<option value="2" selected>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<!--<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>己方公司:</td>
<td class="r">
<select name="relation[self_company_id]" disabled id="self_company" class="select_gallery">
@ -154,7 +175,26 @@
</select>
<span class="notice-text"></span>
</td>
</tr>-->
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="l" style="width: 50px;">
<select name="part_a" id="part_a" class="select_gallery" disabled>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: 90px;"><i class="mustmark" >*</i>乙方公司:</td>
<td class="r">
<select name="part_b" id="part_b" class="select_gallery" disabled>
<?php foreach($selfCompanies as $selfCompany):?>
<option value="<?=$selfCompany['id']?>" <?php if($selfCompany['company_name']==''):?>selected<?php endif;?>><?=$selfCompany['company_name']?></option>
<?php endforeach;?>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>结算周期:</td>
<td class="r">
@ -186,7 +226,7 @@
<tr>
<td class="l">是否有打款流程:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<span class="form_radio table_btn" style="width: 100px;">
<label>
<input type="radio" value="1" disabled name="relation[is_payment]" <?php if($relation['is_payment'] == 1):?>checked<?php endif;?>> 是
</label>
@ -210,7 +250,7 @@
<?php endif;?>
<tr>
<td class="l">结算生效期限:</td>
<td class="r">
<td class="r" style="width: 640px;">
<input type="text" class="txt time time3" name="validity_start_time" value="{$data.validity_start_time}" placeholder="生效开始时间" readonly>
-<input type="text" class="txt time time4" name="validity_end_time" value="{$data.validity_end_time}" placeholder="生效结束时间" readonly>
</td>
@ -411,6 +451,75 @@
</script>
<script>
// 切换select
function selectRemove(id, typeId) {
$(id).children().remove();
indexNum = $(typeId).children('option:selected').index();
if (indexNum == 0) {
$(id).append("<option value='1'>" + $("#partner").val() + "</option>");
}
if (indexNum == 1) {
"<?php foreach($selfCompanies as $selfCompany):?>"
$(id).append(
"<option value=\"<?=$selfCompany['id']?>\" <?php if($selfCompany['company_name']=='海南万盟天下科技有限公司'):?>selected<?php endif;?>><?=$selfCompany['company_name']?></option>"
);
"<?php endforeach;?>";
}
}
$(function() {
if (!$("#partner").val()) {
$("#tab_tab1").click();
} else {
$("#part_a").children().remove();
$("#part_a").append("<option value='1'>" + $("#partner").val() + "</option>");
}
$("#tab_tab2").click(function() {
if (!$("#partner").val()) {
alert('请填写合作方名称');
$("#tab_tab1").click();
}
$("#part_a").children().remove();
$("#part_a").append("<option value='1'>" + $("#partner").val() + "</option>");
return false;
});
$("#part_a_type").change(function() {
selectRemove("#part_a", "#part_a_type");
indexBSelect = 0;
if (indexNum == 0) {
indexBSelect = 1;
}
if (indexNum == 1) {
indexBSelect = 0;
}
$("#part_b_type").get(0).selectedIndex = indexBSelect;
selectRemove("#part_b", "#part_b_type");
});
$("#part_b_type").change(function() {
selectRemove("#part_b", "#part_b_type");
indexASelect = 0;
if (indexNum == 0) {
indexASelect = 1;
}
if (indexNum == 1) {
indexASelect = 0;
}
$("#part_a_type").get(0).selectedIndex = indexASelect;
selectRemove("#part_a", "#part_a_type");
});
});
showTab();
<?php if($data['file_info']):?>
var doc = <?=$data['file_info']?>

@ -376,6 +376,21 @@
</td>
</tr>
<tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>是否特殊公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="type" >
</label>
<label>
<input type="radio" class="inp_radio" value="0" name="type" checked>
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
<tr class="site-custom-item" style="display: none;">
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>推广后台域名前缀:</td>
<td class="r" >

@ -378,6 +378,21 @@
</td>
</tr>
<tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>是否特殊公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="type" <if condition="$data['type'] eq 1">checked</if>> 是
</label>
<label>
<input type="radio" class="inp_radio" value="0" name="type" <if condition="$data['type'] eq 0">checked</if>> 否
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
<tr class="site-custom-item" <?php if($data['is_site_custom'] == 0):?>style="display:none"<?php endif;?>>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>推广后台域名前缀:</td>
<td class="r" >

@ -9,6 +9,8 @@
<style>
#form .txt_area.download_url {width:400px;}
.tabcon1711 .table_radio2 .table_btn {width:215px;}
.move200 {margin-left: -1000px;}
.move150 {margin-left: -150px;}
</style>
</block>
<block name="body">
@ -158,7 +160,7 @@
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>推广公司名称:</td>
<td class="r" >
<input type="text" class="txt " name="company_name" value="{$data.company_name}" readonly placeholder="请输入推广公司名称">
<input type="text" class="txt " name="company_name" id="partner" value="{$data.company_name}" readonly placeholder="请输入推广公司名称">
</td>
</tr>
@ -392,6 +394,23 @@
</td>
</tr>
<tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>是否特殊公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" disabled class="inp_radio" value="1" name="type" <if condition="$data['type'] eq 1">checked
</if>> 是
</label>
<label>
<input type="radio" disabled class="inp_radio" value="0" name="type" <if condition="$data['type'] eq 0">checked
</if>> 否
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
<?php if(isset($data['is_site_custom']) && $data['is_site_custom'] == 1):?>
<?php
$domain = C('DOMAIN', null, null);
@ -453,7 +472,7 @@
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<?php if($relation):?>
<tr>
<!--<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>合作方式:</td>
<td class="r">
<select name="relation[collaborate_way]" disabled id="collaborate_way" class="select_gallery">
@ -462,8 +481,27 @@
</select>
<span class="notice-text"></span>
</td>
</tr>
</tr>-->
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td>
<td class="r" style="width: 50px;">
<select name="part_a_type" id="part_a_type" class="select_gallery" disabled>
<option value="1" selected>下游推广公司</option>
<option value="2">己方公司</option>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td>
<td class="r">
<select name="part_b_type" id="part_b_type" class="select_gallery" disabled>
<option value="1" >下游推广公司</option>
<option value="2" selected>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<!--<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>己方公司:</td>
<td class="r">
<select name="relation[self_company_id]" disabled id="self_company" class="select_gallery">
@ -474,7 +512,26 @@
</select>
<span class="notice-text"></span>
</td>
</tr>-->
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="r" style="width: 50px;">
<select name="part_a" id="part_a" class="select_gallery" disabled>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: 90px"><i class="mustmark" >*</i>乙方公司:</td>
<td class="r">
<select name="part_b" id="part_b" class="select_gallery" disabled>
<?php foreach($selfCompanies as $selfCompany):?>
<option value="<?=$selfCompany['id']?>" <?php if($selfCompany['company_name']==''):?>selected<?php endif;?>><?=$selfCompany['company_name']?></option>
<?php endforeach;?>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>结算周期:</td>
<td class="r">
@ -506,7 +563,7 @@
<tr>
<td class="l">是否支付宝打款:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<span class="form_radio table_btn" style="width: 100px;">
<label>
<input type="radio" value="1" disabled name="relation[is_payment]" <?php if($relation['is_payment'] == 1):?>checked<?php endif;?>> 是
</label>
@ -530,7 +587,7 @@
<?php endif;?>
<tr>
<td class="l">结算生效期限:</td>
<td class="r">
<td class="r" style="width: 640px;">
<input type="text" class="txt time time3" readonly name="validity_start_time" value="{$data.validity_start_time}" placeholder="生效开始时间">
&nbsp;-&nbsp;<input type="text" class="txt time time4" readonly name="validity_end_time" value="{$data.validity_end_time}" placeholder="生效结束时间">
</td>
@ -747,6 +804,76 @@
<block name="script">
<script type="text/javascript">
// 切换select
function selectRemove(id, typeId) {
$(id).children().remove();
indexNum = $(typeId).children('option:selected').index();
if (indexNum == 0) {
$(id).append("<option value='1'>" + $("#partner").val() + "</option>");
}
if (indexNum == 1) {
"<?php foreach($selfCompanies as $selfCompany):?>"
$(id).append(
"<option value=\"<?=$selfCompany['id']?>\" <?php if($selfCompany['company_name']=='海南万盟天下科技有限公司'):?>selected<?php endif;?>><?=$selfCompany['company_name']?></option>"
);
"<?php endforeach;?>";
}
}
$(function() {
if (!$("#partner").val()) {
$("#tab_tab1").click();
} else {
$("#part_a").children().remove();
$("#part_a").append("<option value='1'>" + $("#partner").val() + "</option>");
}
$("#tab_tab2").click(function() {
if (!$("#partner").val()) {
alert('请填写合作方名称');
$("#tab_tab1").click();
}
$("#part_a").children().remove();
$("#part_a").append("<option value='1'>" + $("#partner").val() + "</option>");
return false;
});
$("#part_a_type").change(function() {
selectRemove("#part_a", "#part_a_type");
indexBSelect = 0;
if (indexNum == 0) {
indexBSelect = 1;
}
if (indexNum == 1) {
indexBSelect = 0;
}
$("#part_b_type").get(0).selectedIndex = indexBSelect;
selectRemove("#part_b", "#part_b_type");
});
$("#part_b_type").change(function() {
selectRemove("#part_b", "#part_b_type");
indexASelect = 0;
if (indexNum == 0) {
indexASelect = 1;
}
if (indexNum == 1) {
indexASelect = 0;
}
$("#part_a_type").get(0).selectedIndex = indexASelect;
selectRemove("#part_a", "#part_a_type");
});
});
//导航高亮
highlight_subnav("{:U('PromoteCompany/lists')}");
$('#submit').click(function(){

@ -231,6 +231,7 @@
<th>支付时间</th>
<th>玩家账号</th>
<th>游戏名称</th>
<th>设备类型</th>
<?php if($showPromote == 1):?>
<th>所属推广员</th>
<?php endif;?>
@ -293,6 +294,7 @@
</if>
<gt name="data.small_id" value="0"><neq name="data.small_id" value="$data.user_id">{$data.small_account}</neq></gt></td>
<td>{$data.game_name}</td>
<td>{$data.sdk_version_name}</td>
<?php if($showPromote == 1):?>
<td>
<eq name="data.promote_id" value="-1">C('OFFICIEL_CHANNEL')<else/>
@ -375,7 +377,7 @@
<if condition="$rule_count_check">
<tr class="data_summary">
<td colspan="2">汇总</td>
<td colspan="20">
<td colspan="21">
当页充值:{:null_to_0(array_sum(array_column(array_status2value('pay_status','',$list_data),'pay_amount')))}
<!-- 今日充值:{$ttotal}-->
<!-- 昨日充值:{$ytotal}-->

@ -448,23 +448,23 @@
var flag = false;
// 判断相反的是否已经存在该公司节点
$('.reward-data-info,.punish-data-info').each(function(){
var node_info = $(this).find('.info').val();
if (node_info) {
var otherData = JSON.parse(node_info);
// console.log(otherData)
// console.log((data['company_id'] != '0' ? data['company_id'] == otherData['company_id'] : data['company_name'] == otherData['company_name']) );
// console.log(data['company_type'] == otherData['company_type'] );
// 判断对立面是否有相同的公司或者部门
if ((data['company_type'] == otherData['company_type'])
&& (data['company_id'] != '0' ? data['company_id'] == otherData['company_id'] : data['company_name'] == otherData['company_name']) ) {
//console.log('已有相此公司的奖罚,请检查')
layer.closeAll();
layer.msg('已有此公司的奖罚,请检查');
flag = true;
}
}
});
// $('.reward-data-info,.punish-data-info').each(function(){
// var node_info = $(this).find('.info').val();
// if (node_info) {
// var otherData = JSON.parse(node_info);
// // console.log(otherData)
// // console.log((data['company_id'] != '0' ? data['company_id'] == otherData['company_id'] : data['company_name'] == otherData['company_name']) );
// // console.log(data['company_type'] == otherData['company_type'] );
// // 判断对立面是否有相同的公司或者部门
// if ((data['company_type'] == otherData['company_type'])
// && (data['company_id'] != '0' ? data['company_id'] == otherData['company_id'] : data['company_name'] == otherData['company_name']) ) {
// //console.log('已有相此公司的奖罚,请检查')
// layer.closeAll();
// layer.msg('已有此公司的奖罚,请检查');
// flag = true;
// }
// }
// });
if (flag) {
return false;

@ -143,6 +143,16 @@
<?php endforeach;?>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select name="verify_admin_id" class="select_gallery" style="width:120px;">
<option value="-1">请选择审核人</option>
<?php foreach($admins as $admin):?>
<option value="<?=$admin['id']?>">
<?=$admin['username']?>
</option>
<?php endforeach;?>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('TestingResource/batches')}">搜索</a>
<a class="sch-btn" href="{:U('exportOrders', I('get.'))}" style="width: 100px;">导出批次订单</a>
@ -178,7 +188,8 @@
<th>测试账号</th>
<th>手机号</th>
<th>所属推广员</th>
<th>申请人</th>
<th>申请人</th>
<th>审核人</th>
<!-- <th>发放总金额</th> -->
<th>申请金额</th>
<th>发放金额</th>
@ -211,7 +222,8 @@
<td>{$record.user_account}</td>
<td>{$record.user_phone}</td>
<td>{$record.promote_account}</td>
<td>{$record.apply_promote_account}</td>
<td>{$record.apply_username}</td>
<td>{$record.verify_admin_username}</td>
<!-- <td>{$record.history_provide_amount}</td> -->
<td>{$record.apply_amount}</td>
<td>{$record.provide_amount}</td>

@ -45,7 +45,6 @@ body {
<th>玩家账号</th>
<th>区服名称</th>
<th>角色名称</th>
<th>申请人</th>
<th>资源内容</th>
<th>资源价值</th>
<th>申请数量</th>
@ -72,7 +71,6 @@ body {
<td>{$record.user_account}</td>
<td>{$record.server_name}</td>
<td>{$record.role_name}</td>
<td>{$record.apply_promote_account}</td>
<td>{$record.ref_name}</td>
<td>{$record.ref_amount}</td>
<td>{$record.num}</td>

@ -88,6 +88,7 @@ class TestingResourceRepository
$verifyStatus = $params['verify_status'] ?? -1;
$provideStatus = $params['provide_status'] ?? -1;
$account = $params['account'] ?? '';
$adminId = $params['verify_admin_id'] ?? -1;
$conditions = [];
$conditions['_string'] = '1=1';
@ -113,6 +114,9 @@ class TestingResourceRepository
if ($provideStatus != -1) {
$conditions['provide_status'] = $provideStatus;
}
if ($adminId != -1) {
$conditions['verify_admin_id'] = $adminId;
}
if ($gameId) {
$conditions['game_id'] = $gameId;
}
@ -136,6 +140,8 @@ class TestingResourceRepository
$applyPromotes = [];
$users = [];
$promotes = [];
$verifyAdmins = [];
$applyAdmins = [];
if (count($batches) > 0) {
$gameRoleIds = [];
foreach ($batches as $batch) {
@ -153,16 +159,25 @@ class TestingResourceRepository
$applyPromotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($batches, 'apply_promote_id')]])->select();
$applyPromotes = index_by_column('id', $applyPromotes);
$applyAdminIds = array_column($batches, 'apply_admin_id');
$applyAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $applyAdminIds]])->select();
$applyAdmins = index_by_column('id', $applyAdmins);
if (count($users) > 0) {
$promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($users, 'promote_id')]])->select();
$promotes = index_by_column('id', $promotes);
}
$verifyAdminIds = array_column($batches, 'verify_admin_id');
$verifyAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $verifyAdminIds]])->select();
$verifyAdmins = index_by_column('id', $verifyAdmins);
}
return [
'roles' => $roles,
'applyPromotes' => $applyPromotes,
'users' => $users,
'promotes' => $promotes,
'verifyAdmins' => $verifyAdmins,
'applyAdmins' => $applyAdmins,
];
}
@ -173,6 +188,8 @@ class TestingResourceRepository
$applyPromotes = $result['applyPromotes'];
$users = $result['users'];
$promotes = $result['promotes'];
$verifyAdmins = $result['verifyAdmins'];
$applyAdmins = $result['applyAdmins'];
$records = [];
foreach ($batches as $batch) {
@ -181,6 +198,8 @@ class TestingResourceRepository
$user = $users[$batch['user_id']] ?? null;
$applyPromote = $applyPromotes[$batch['apply_promote_id']] ?? null;
$promote = $user && isset($promotes[$user['promote_id']]) ? $promotes[$user['promote_id']] : null;
$verifyAdmin = $verifyAdmins[$batch['verify_admin_id']] ?? null;
$applyAdmin = $applyAdmins[$batch['apply_admin_id']] ?? null;
$records[] = [
'id' => $batch['id'],
'batch_no' => substr($batch['batch_no'], 14),
@ -190,8 +209,9 @@ class TestingResourceRepository
'role_name' => $role ? $role['role_name'] : '--',
'user_account' => $role ?$role['user_account'] : '--',
'user_phone' => $user ? $user['phone'] : '',
'apply_promote_account' => $applyPromote ? $applyPromote['account'] : '',
'apply_username' => $applyPromote ? $applyPromote['account'] . '[推广员]' : ($applyAdmin ? $applyAdmin['username'] . '[管理员]' : ''),
'promote_account' => $promote['account'],
'verify_admin_username' => $batch['verify_status'] == 0 ? '--' : ($verifyAdmin ? $verifyAdmin['username'] : '系統'),
// 'history_provide_amount' => 0.00,
'apply_amount' => $batch['apply_amount'],
'provide_amount' => $batch['provide_amount'],

@ -17,6 +17,9 @@ class PromoteCompanyService
3 => '无',
];
const TYPE_NORMAL = 0; // 默认推广公司
const TYPE_CUSTOM = 1; // 定制推广公司 隐藏某些功能
public function getOutBelongs()
{
return [

@ -16,7 +16,7 @@ class TestingResourceService
$this->repository = new TestingResourceRepository();
}
public function verify($batch)
public function verify($batch, $verifyAdminId = 0)
{
if ($batch['verify_status'] != 0) {
throw new \Exception('审核状态异常');
@ -36,10 +36,11 @@ class TestingResourceService
$batchData['verify_status'] = 1;
$batchData['verify_remark'] = '审核成功';
$batchData['verify_admin_id'] = $verifyAdminId;
M('testing_resource_batch', 'tab_')->where(['id' => $batch['id']])->save($batchData);
}
public function verifyRefuse($batch, $remark = '审核拒绝')
public function verifyRefuse($batch, $remark = '审核拒绝', $verifyAdminId = 0)
{
if ($batch['verify_status'] != 0) {
throw new \Exception('审核状态异常');
@ -50,6 +51,7 @@ class TestingResourceService
$batchData['update_time'] = time();
$batchData['verify_status'] = 2;
$batchData['verify_remark'] = $remark;
$batchData['verify_admin_id'] = $verifyAdminId;
M('testing_resource_batch', 'tab_')->where(['id' => $batch['id']])->save($batchData);
}
@ -347,7 +349,7 @@ class TestingResourceService
return M('testing_binding', 'tab_')->where(['id' => $bindingId])->delete();
}
public function apply($params, $promote = null)
public function apply($params, $promote = null, $adminId = 0)
{
$gameId = $params['game_id'] ?? 0;
$roleId = $params['role_id'] ?? '';
@ -492,6 +494,7 @@ class TestingResourceService
'role_id' => $roleId,
'server_id' => $serverId,
'apply_promote_id' => $promote ? $promote['id'] : 0,
'apply_admin_id' => $adminId,
'apply_amount' => $amount,
'provide_status' => 0,
'verify_status' => 0,

@ -2,6 +2,7 @@
namespace Home\Controller;
use Base\Service\PromoteCompanyService;
use Think\Controller;
use Base\Service\PromoteService;
@ -393,13 +394,11 @@ class BaseController extends HomeController
}
}
$closePromoteLowest = [334, 370];
if (in_array($topPromote['company_id'], $closePromoteLowest)) {
if ($topPromote['can_view_recharge'] == 1 && !in_array($promote['level'], [4])) {
return true;
} else {
return false;
}
// 推广公司
$promoteCompanyService = new PromoteCompanyService();
$promoteCompany = $promoteCompanyService->getCompanies([$topPromote['company_id']]);
if ($promoteCompany[$topPromote['company_id']]['type'] == $promoteCompanyService::TYPE_CUSTOM) { // 特殊公司不能看
return false;
}
if ($topPromote['can_view_recharge'] == 1) {

@ -100,7 +100,6 @@ class TestingResourceController extends BaseController
'user_account' => $role['user_account'],
'server_name' => $role['server_name'],
'role_name' => $role['role_name'],
'apply_promote_account' => $applyPromote ? $applyPromote['account'] : '',
'promote_account' => $promote['account'],
'ref_name' => $order['ref_name'],
'ref_amount' => $order['ref_amount'],

@ -132,7 +132,7 @@
<a href="{:U('TestingResource/batches')}" class="<?=is_active_class(['TestingResource'], ['batches'])?>">测试资源申请记录</a>
</div>
<?php endif;?>
<?php if(C('APP_ENV') == 'dev' || in_array($loginer['company_id'], [334, 370])):?>
<?php if(C('APP_ENV') == 'dev' || $company['type'] == 1):?>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>评级管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<?php if($loginer['level'] <= 2):?>

@ -119,7 +119,6 @@
<th>测试账号</th>
<th>手机号</th>
<th>所属推广员</th>
<th>申请人</th>
<!-- <th>发放总金额</th> -->
<th>申请金额</th>
<th>发放金额</th>
@ -147,7 +146,6 @@
<td>{$record.user_account}</td>
<td>{$record.user_phone}</td>
<td>{$record.promote_account}</td>
<td>{$record.apply_promote_account}</td>
<!-- <td>{$record.history_provide_amount}</td> -->
<td>{$record.apply_amount}</td>
<td>{$record.provide_amount}</td>

@ -106,7 +106,6 @@
<th>玩家账号</th>
<th>区服名称</th>
<th>角色名称</th>
<th>申请人</th>
<th>资源内容</th>
<th>资源价值</th>
<th>申请数量</th>
@ -129,7 +128,6 @@
<td>{$record.user_account}</td>
<td>{$record.server_name}</td>
<td>{$record.role_name}</td>
<td>{$record.apply_promote_account}</td>
<td>{$record.ref_name}</td>
<td>{$record.ref_amount}</td>
<td>{$record.num}</td>

@ -64,6 +64,14 @@ class ExcelPaymentController extends BaseController
$map['i.pay_time'] = ['ELT', strtotime($_REQUEST['pay_time_end']) + 86399];
}
if (isset($_REQUEST['verifytime_start']) && isset($_REQUEST['verifytime_end'])) {
$map['i.verify_time'] = ['between', [strtotime($_REQUEST['verifytime_start']), strtotime($_REQUEST['verifytime_end']) + 86399]];
} elseif (isset($_REQUEST['verifytime_start'])) {
$map['i.verify_time'] = ['EGT', strtotime($_REQUEST['verifytime_start'])];
} elseif (isset($_REQUEST['verifytime_end'])) {
$map['i.verify_time'] = ['ELT', strtotime($_REQUEST['verifytime_end']) + 86399];
}
if(isset($_REQUEST['company_name'])){
$map['i.company_name'] = ['LIKE',"%".$_REQUEST['company_name']."%"];
}
@ -97,6 +105,17 @@ class ExcelPaymentController extends BaseController
}else{
$v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']);
}
if($v['verify_status'] == 0){
$v['verify'] = "--";
}else {
$member = M("payment_member")
->field("name")
->where(['id'=>$v['verify_member_id']])
->find();
$v['verify'] = (($v['verify_status'] == 1)?'审核通过':'审核拒绝')."({$member['name']})<br>".date('Y-m-d H:i:s', $v['verify_time']);;
}
// $v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}";
}
@ -138,16 +157,26 @@ class ExcelPaymentController extends BaseController
if(count($checkarr) < 1){
$this->ajaxReturn(["status"=>1,"msg"=>"ok"]);
}
// dump($batch);die();
$ExcelStatementInfo = M('ExcelStatementInfo',"tab_");
foreach ($checkarr as $k => &$v) {
$company_info = $v['company_info'];
// $v['statement_begin_time'] = $statement_begin_time;
// $v['statement_end_time'] = $statement_end_time;
$statement_time = explode('-',$v['statement_info'][0]['game_list'][0]['statement_time']);
$v['batch_num'] = $batch;
$v['statement_info'] = json_encode($v['statement_info'],JSON_UNESCAPED_UNICODE);
$v['company_info'] = json_encode($v['company_info'],JSON_UNESCAPED_UNICODE);
$v['company_type'] = 2;
$v['create_time'] = time();
$v['statement_begin_time'] = strtotime(str_replace('.','-',$statement_time[0]));
$v['statement_end_time'] = strtotime(str_replace('.','-',$statement_time[1]));
$v['statement_num'] = "JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5);
$dm = [
"mobile"=>$this->admininfo['mobile'],
@ -166,6 +195,7 @@ class ExcelPaymentController extends BaseController
M('ExcelStatementInfo',"tab_")->where("batch_num = '{$v['batch_num']}'")->delete();
$this->ajaxReturn(["status"=>0,"msg"=>"添加失败"]);
}
}
$this->ajaxReturn(["status"=>1,"msg"=>"ok"]);
}
@ -244,6 +274,16 @@ class ExcelPaymentController extends BaseController
$v['pay_time'] = '--';
}
if($v['verify_status'] == 0){
$v['verify'] = "--";
}else {
$member = M("payment_member")
->field("name")
->where(['id'=>$v['verify_member_id']])
->find();
$v['verify'] = (($v['verify_status'] == 1)?'审核通过':'审核拒绝')."({$member['name']})\n".date('Y-m-d H:i:s', $v['verify_time']);;
}
$row = 0;
foreach($v['statement_info'] as $ke=>&$va){
$va['row'] = count($va['game_list']);
@ -269,7 +309,7 @@ class ExcelPaymentController extends BaseController
}
if($is_export){
$count["platform_amount"] = "=SUM(J2:J".$line.")";
$count["sum_money"] = "=SUM(O2:O".$line.")";
$count["sum_money"] = "=SUM(D2:D".$line.")";
}
$this->assign("data",$infolist);
$this->assign("count",$count);
@ -336,7 +376,7 @@ class ExcelPaymentController extends BaseController
$id = $_REQUEST['id'];
$remark = $_REQUEST['remark'];
if (empty(C("ALI_PAYMENT"))) {
$this->ajaxReturn(["success"=>"配置错误,无法打款","data"=>[]]);
$this->ajaxReturn(["success"=>"配置错误,无法打款","data"=>['status'=>0]]);
}
Vendor("Alipay2020/Fund");
@ -371,7 +411,13 @@ class ExcelPaymentController extends BaseController
$savedata['payment_user'] = json_encode($pu, JSON_UNESCAPED_UNICODE);
}
M("ExcelStatementInfo", "tab_")->save($savedata);
$this->ajaxReturn(["success"=>"打款成功","data"=>[]]);
if ($savedata['pay_status'] == 1) {
$this->ajaxReturn(["success"=>"打款成功","data"=>['status'=>1]]);
} else {
$this->ajaxReturn(["success"=>"打款失败","data"=>['status'=>0]]);
}
}
/**
@ -394,4 +440,98 @@ class ExcelPaymentController extends BaseController
$this->assign("info",$senddata);
$this->display();
}
/**
* 打款审核
*/
public function verify() {
// dump($_SESSION['onethink_admin']['payment_user']['id']);die();
if ((!$_REQUEST['id']||!$_REQUEST['status'])&&$_REQUEST['status']!='0') {
$this->ajaxReturn(['status'=>0,'msg'=>'数据传输错误']);
}
$id = $_REQUEST['id'];
$status = $_REQUEST['status'];
$member_id = $_SESSION['onethink_admin']['payment_user']['id'];
($status == 1)?($status_str = '已审核通过'):($status_str = '已审核拒绝');
$verify = M("excel_statement_info","tab_")
->where([
'id'=>['in',$id]
])
->save([
'verify_status'=>$status,
'verify_time'=>time(),
'verify_member_id'=>$member_id
]);
if ($verify) {
$this->ajaxReturn(['status'=>1,'msg'=>$status_str]);
} else {
$this->ajaxReturn(['status'=>0,'msg'=>'审核失败请重新审核']);
}
}
/**
* 验证订单
*/
public function checkOrder() {
if(!$_REQUEST['ids']) {
$this->ajaxReturn(['data'=>[]]);
}
$ids = $_REQUEST['ids'];
$data = M("excel_statement_info","tab_")
->field("id,statement_money,company_name,statement_begin_time,statement_end_time,pay_time")
->where(['id'=>['in',$ids]])
->select();
$return = [];
foreach ($data as $key => $value) {
$check_data = M("excel_statement_info","tab_")
->where([
'statement_money'=>$value['statement_money'],
'company_name'=>$value['company_name'],
'statement_begin_time'=>$value['statement_begin_time'],
'statement_end_time'=>$value['statement_end_time'],
'id'=>['neq',$value['id']],
'pay_status'=>1
])
->select();
$check_company_statement_info = M("company_statement_info","tab_")
->where([
'pay_status'=>1,
'company_name'=>$value['company_name'],
'statement_begin_time'=>$value['statement_begin_time'],
'statement_end_time'=>$value['statement_end_time'],
'statement_money'=>$value['statement_money'],
])
->select();
$return = array_merge($return,$check_data,$check_company_statement_info);
}
foreach ($return as $key => $value) {
$return[$key]['time'] = ($value['statement_begin_time']?date("Y-m-d",$value['statement_begin_time']):'无').'-'.($value['statement_end_time']?date("Y-m-d",$value['statement_end_time']):'无');
$return[$key]['pay_time'] = date("Y-m-d H:m:s",$value['pay_time']);
}
$this->ajaxReturn(['data'=>$return]);
}
}

@ -42,59 +42,70 @@ class PaymentController extends BaseController
$row = $params['row'] ? intval($params['row']) : 10;
$map=[
"i.verify_status"=>["in","-1,1"],
"s.verify_status"=>["in","-1,1"],
];
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$time_start = strtotime($_REQUEST['time_start']);
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
$map["_string"] = "(i.statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (i.statement_end_time BETWEEN {$time_start} AND {$time_end})";
$map["_string"] = "(s.statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (s.statement_end_time BETWEEN {$time_start} AND {$time_end})";
} elseif (isset($_REQUEST['time_start'])) {
$time_start = strtotime($_REQUEST['time_start']);
$map["_string"] = "(i.statement_begin_time >= {$time_start} ) OR (i.statement_end_time >= {$time_start})";
$map["_string"] = "(s.statement_begin_time >= {$time_start} ) OR (s.statement_end_time >= {$time_start})";
} elseif (isset($_REQUEST['time_end'])) {
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
$map["_string"] = "(i.statement_begin_time <= {$time_end} ) OR (i.statement_end_time <= {$time_end})";
$map["_string"] = "(s.statement_begin_time <= {$time_end} ) OR (s.statement_end_time <= {$time_end})";
}
if (isset($_REQUEST['pay_time_start']) && isset($_REQUEST['pay_time_end'])) {
$map['i.pay_time'] = ['between', [strtotime($_REQUEST['pay_time_start']), strtotime($_REQUEST['pay_time_end']) + 86399]];
$map['s.pay_time'] = ['between', [strtotime($_REQUEST['pay_time_start']), strtotime($_REQUEST['pay_time_end']) + 86399]];
} elseif (isset($_REQUEST['pay_time_start'])) {
$map['i.pay_time'] = ['EGT', strtotime($_REQUEST['pay_time_start'])];
$map['s.pay_time'] = ['EGT', strtotime($_REQUEST['pay_time_start'])];
} elseif (isset($_REQUEST['pay_time_end'])) {
$map['i.pay_time'] = ['ELT', strtotime($_REQUEST['pay_time_end']) + 86399];
$map['s.pay_time'] = ['ELT', strtotime($_REQUEST['pay_time_end']) + 86399];
}
if (isset($_REQUEST['verifytime_start']) && isset($_REQUEST['verifytime_end'])) {
$map['s.verify_time'] = ['between', [strtotime($_REQUEST['verifytime_start']), strtotime($_REQUEST['verifytime_end']) + 86399]];
} elseif (isset($_REQUEST['verifytime_start'])) {
$map['s.verify_time'] = ['EGT', strtotime($_REQUEST['verifytime_start'])];
} elseif (isset($_REQUEST['verifytime_end'])) {
$map['s.verify_time'] = ['ELT', strtotime($_REQUEST['verifytime_end']) + 86399];
}
if(isset($_REQUEST['company_type'])){
$map['i.company_type'] = $_REQUEST['company_type'];
$map['s.company_type'] = $_REQUEST['company_type'];
}
if(isset($_REQUEST['company_id'])){
$map['i.company_id'] = $_REQUEST['company_id'];
$map['s.company_id'] = $_REQUEST['company_id'];
}
if(isset($_REQUEST['pay_status'])){
if($_REQUEST['pay_status'] == -2){
$map['i.verify_status'] = -1;
$map['s.verify_status'] = -1;
}else{
$map['i.pay_status'] = $_REQUEST['pay_status'];
$map['s.pay_status'] = $_REQUEST['pay_status'];
}
}
if(isset($_REQUEST['pay_type'])){
$map['i.pay_type'] = $_REQUEST['pay_type'];
$map['s.pay_type'] = $_REQUEST['pay_type'];
}
// dump($map);die();
$CompanyInfo = M("company_statement_info","tab_")
->alias('i')
->field("i.*,p.statement_num statement_pool_num")
->join("tab_company_statement_pool p ON p.id = i.pool_id")
->where($map)
->page($page,$row)
->order("FIELD(pay_status,0,-1,1),verify_status desc")
->select();
->alias('s')
->field("s.*,p.statement_num statement_pool_num")
->join("left join tab_company_statement_pool p ON p.id = s.pool_id")
->where($map)
->page($page,$row)
->order("FIELD(s.pay_status,0,-1,1),s.verify_status desc")
->select();
$handleData = [];
foreach($CompanyInfo as $k=>&$v){
$handleData[] = $v['id'];
$v['can_pay'] = 1;
if($v['verify_status'] == -1){
$v['verify_status_str']="信息配置不全";
@ -107,6 +118,17 @@ class PaymentController extends BaseController
$v['verify_status_str'] .= ("/". $v['pay_type']);
}
}
if($v['pay_verify_status'] == 0){
$v['verify'] = "--";
}else {
$member = M("payment_member")
->field("name")
->where(['id'=>$v['verify_member_id']])
->find();
$v['verify'] = (($v['pay_verify_status'] == 1)?'审核通过':'审核拒绝')."({$member['name']})<br>".date('Y-m-d H:i:s', $v['verify_time']);;
}
$v['company_type'] = $this->CompanyType[$v['company_type']];
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
@ -117,13 +139,63 @@ class PaymentController extends BaseController
}
$v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}";
}
if ($handleData) {
$statementInfo = M("pay_statement_info","tab_")
->alias('s')
->field("s.*,p.statement_num statement_pool_num")
->join("left join tab_company_statement_info i ON s.statement_info_id = i.id")
->join("left join tab_company_statement_pool p ON p.id = i.pool_id")
->where(['statement_info_id'=>['in',$handleData]])
->order("FIELD(s.pay_status,0,-1,1),s.verify_status desc")
->select();
$handleData = [];
foreach ($statementInfo as $key => $value) {
$value['can_pay'] = 1;
if($value['verify_status'] == -1){
$value['verify_status_str']="信息配置不全";
$value['can_pay'] = 0;
}else{
if($value['pay_status'] == 1){ $value['can_pay'] = 0; }
$value['verify_status_str'] = $this->PayStatus[$value['pay_status']];
if($value['pay_status'] == 1){
$value['pay_type'] = $value['pay_type'] == 1 ? "提现" :"线上打款";
$value['verify_status_str'] .= ("/". $value['pay_type']);
}
}
$value['company_type'] = $this->CompanyType[$value['company_type']];
$value['statement_begin_time'] = date('Y-m-d',$value['statement_begin_time']);
$value['statement_end_time'] = date('Y-m-d',$value['statement_end_time']);
if(empty($value['pay_time'])){
$value['pay_time'] = "--";
}else{
$value['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']);
}
$value["valid"] = "{$value['statement_begin_time']} ~ {$value['statement_end_time']}";
$handleData[$value['statement_info_id']]['data'][] = $value;
if ($value['pay_status'] != 1) {
$handleData[$value['statement_info_id']]['ids'][] = $value['id'];
}
}
foreach ($CompanyInfo as $key=>$value) {
$CompanyInfo[$key]['son_info'] = $handleData[$value['id']]['data'];
$CompanyInfo[$key]['ids'] = implode(',',$handleData[$value['id']]['ids']);
}
}
//统计待打款金额
$countmap = $map;
$countmap['pay_status']=["neq",1];
$money = M("company_statement_info","tab_")->alias('i')->field("sum(statement_money) statement_money")->where($countmap)->find();
$money = M("company_statement_info","tab_")->alias('s')->field("sum(statement_money) statement_money")->where($countmap)->find();
$count = M("company_statement_info","tab_")->alias('i')->field("count(id) count")->where($map)->find();
$count = M("company_statement_info","tab_")->alias('s')->field("count(id) count")->where($map)->find();
$page = set_pagination($count['count'], $row);
if ($page) {
$this->assign('_page', $page);
@ -162,41 +234,234 @@ class PaymentController extends BaseController
}
}
//改变结构
public function changeDataStruct($statement_info = [],$is_export = 0,&$week_line = 1) {
$game_list = [];
$old_line = $week_line;
//使用时间与会长账号作为键值分离数据
foreach($statement_info as $sk=>$sv){
foreach($sv['game_list'] as $gk=>$gv){
$gv['account'] = $sv['account'];
$game_list[$gv['statement_begin_time'].'-'.$gv['statement_end_time']][$gv['account']][] = $gv;
}
}
$game_data = [];
$handle_data = [];
//处理游戏金额数据
foreach($game_list as $gk => $gv) {
foreach ($gv as $sk => $sv) {
$game_data['account'] = $sk;
$game_data['row'] = count($sv);
if ($game_data['row'] == '0') {
$game_data['row'] = 1;
}
$game_data['time_row'] = count($sv);
if ($game_data['time_row'] == '0') {
$game_data['time_row'] = 1;
}
$game_data['time'] = $gk;
$game_data['week_amount'] = 0;
//周结算金额计算
for ($i=0;;$i++) {
if ($sv[$i]['sum_money']) {
$game_data['week_amount'] += $sv[$i]['sum_money'];
$game_data['withhold_amount'] += $sv[$i]['withhold'];
$game_data['fine'] += $sv[$i]['fine'];
$game_data['reward'] += $sv[$i]['reward'];
} else {
break;
}
}
$game_data['game_list'] = $sv;
array_push($handle_data,$game_data);
$game_data = [];
}
}
$substract = 1;
//添加周结算金额,合并相同的结算时间
foreach($handle_data as $hk => $hv) {
if($hk > 0) {
for (;;) {
if (!$handle_data[$hk-$substract]['time']) {
$substract++;
} else {
break;
}
}
if ($hv['time'] == $handle_data[$hk-$substract]['time']) {
$handle_data[$hk-$substract]['time_row'] += $handle_data[$hk]['time_row'];
$handle_data[$hk-$substract]['week_amount'] += $handle_data[$hk]['week_amount'];
$handle_data[$hk-$substract]['withhold_amount'] += $handle_data[$hk]['withhold_amount'];
unset($handle_data[$hk]['time']);
unset($handle_data[$hk]['time_row']);
unset($handle_data[$hk]['week_amount']);
}
$substract = 1;
}
}
foreach($handle_data as $hk => $hv) {
$substract = 1;
if ($is_export) {
for (;;) {
if (!$handle_data[$hk+$substract]['time']&&$handle_data[$hk+$substract]['account']) {
// if (
// $hv['account'] == 'zj9587' ||
// $hv['account'] == 'ruiyou' || $hv['account'] == 'weicheng') {
// dump($handle_data[$hk]['time']);
// }
$week_line++;
$substract++;
} else {
break;
}
}
if (count($hv['game_list'])>1) {
$week_line += count($hv['game_list'])-1;
}
$handle_data[$hk]['week_amount'] = "=ROUND(SUM(O{$old_line}:O{$week_line})+SUM(P{$old_line}:P{$week_line})-SUM(Q{$old_line}:Q{$week_line})-SUM(R{$old_line}:R{$week_line}),2)";
if (count($hv['game_list'])>1) {
$old_line += count($hv['game_list']);
} else {
$old_line++;
}
if(count($hv['game_list'])>1) {
$week_line = $old_line ;
} else {
$week_line = $old_line;
}
}
}
return $handle_data?$handle_data:[];
}
//个人汇总结算查看
public function viewPuPool(&$infolist,$is_export){
$line = 1;
$count = [];
$week_line = 2;
//获取对接人
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']);
$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['sum_money_exp'] = "=";
$v['statement_money'] = "=ROUND(";
}
$handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line);
$v['statement_info'] = $handle_data;
$row = 0;
foreach($v['statement_info'] as $ke=>&$va){
$line ++;
if(isset($va['ratio'])){
$va['increment_ratio'] = 0;
}else{
$va['ratio'] = 0;
$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;
// }
// }
$val['sum_money'] = $val['sum_money']-$val['fine']+$val['reward'];
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'] .= "S{$line}+";
}else{
$count['platform_amount'] += $val['pay_amount'];
$count['week_money'] += $val['sum_money'];
$count['sum_money'] += $val['sum_money'];
}
}
}
if($is_export){
//J3*(K3+L3)+M3-N3
$va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}";
$count['sum_money_exp'] .= "O{$line}+";
$count['platform_amount_exp'] .= "J{$line}+";
}else{
$count['platform_amount'] += $va['pay_amount'];
$count['sum_money'] += $va['sum_money'];
$v['row'] = $row;
if ($v['row'] == '0') {
$v['row'] = 1;
}
if($is_export){
if($v['withdraw_type'] != 3) {
// $v['statement_money'] .="P{$cline}-Q{$cline},2)";
$v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1) . ",2)";
} else {
$v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1).",2)";
}
}
$v['statement_count'] = count($v['statement_info']);
}
if($is_export){
$count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+");
@ -360,6 +625,196 @@ class PaymentController extends BaseController
$this->assign("mobile",$this->admininfo['mobile']);
$this->display();
}
public function memberList()
{
$params = I('get.');
$page = $params['p'] ? intval($params['p']) : 1;
$row = $params['row'] ? intval($params['row']) : 10;
$map=[
"_string"=>"1=1",
];
$payment_menber = M("payment_member")
->alias('p')
->field("p.*")
->where($map)
->page($page,$row)
->select();
foreach ($payment_menber as $key => $value) {
$payment_menber[$key]['is_payment_str'] = $value['is_payment'] == 1?"是":"否";
}
$count = M("payment_member")->where($map)->count();
$page = set_pagination_all($count['count'], $row);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('is_auth',$_SESSION['onethink_admin']['payment_user']['id']);
$this->assign("data",$payment_menber);
$this->getAccountMoney();
$this->meta_title = '复核账号';
$this->display("memberlist");
}
public function del() {
if (!$_REQUEST['id']) {
$this->ajaxReturn(['status'=>0,'msg'=>'传输数据错误']);
}
if ($_REQUEST['id'] == 1) {
$this->ajaxReturn(['status'=>0,'msg'=>'管理员账号不能删除']);
}
$is_del = M("payment_member")->where(['id'=>$_REQUEST['id']])->delete();
if ($is_del) {
$this->ajaxReturn(['status'=>1,'msg'=>'删除成功']);
} else {
$this->ajaxReturn(['status'=>0,'msg'=>'删除失败']);
}
}
public function add() {
if (IS_POST)
{
$data = $_POST;
if(!$data['name']) {
$this->error('名称不能为空');
}
if(!$data['mobile']) {
$this->error('手机号不能为空');
}
if(strlen($data['mobile']) < 11) {
$this->error('手机号格式错误');
// $this->error('手机号格式错误');
}
$is_hav = M("payment_member")
->where("mobile = '{$data['mobile']}'")
->find();
if ($is_hav) {
$this->error('手机号已经存在');
}
$is_success = M("payment_member")
->add([
'name'=>$data['name'],
'mobile'=>$data['mobile']
]);
if ($is_success) {
$this->success('添加成功',U('Payment/memberList'));
} else {
$this->error('添加失败');
}
} else {
$this->display();
}
}
public function edit() {
if (IS_POST)
{
$data = $_POST;
if(!$data['id']) {
$this->ajaxReturn(['status'=>0,'msg'=>'id不能传输为空']);
// $this->error('名称不能为空');
}
if(!$data['name']) {
$this->ajaxReturn(['status'=>0,'msg'=>'名称不能为空']);
// $this->error('名称不能为空');
}
if(!$data['mobile']) {
$this->ajaxReturn(['status'=>0,'msg'=>'手机号不能为空']);
// $this->error('手机号不能为空');
}
$hav_mobile = M("payment_member")
->where("id = '{$data['id']}'")
->find();
if ($data['id'] == 1 && $hav_mobile['mobile']!=$data['mobile']) {
$verify = $_REQUEST['verify'];
if (!A("Public")->checksafecode($data['old_mobile'], $verify)) {
$this->ajaxReturn(['status'=>0,'msg'=>'验证码错误']);
}
}
if(strlen($data['mobile']) < 11) {
$this->ajaxReturn(['status'=>0,'msg'=>'手机号格式错误']);
// $this->error('手机号格式错误');
}
$is_hav = M("payment_member")
->where("id = {$data['id']}")
->find();
if (!$is_hav) {
$this->ajaxReturn(['status'=>0,'msg'=>'账号不存在']);
// $this->error('账号不存在');
}
$is_hav = M("payment_member")
->where("mobile = '{$data['mobile']}' and id != {$data['id']}")
->find();
if($is_hav) {
$this->ajaxReturn(['status'=>0,'msg'=>'手机号重复请验证']);
// $this->error('手机号重复请验证');
}
$is_success = M("payment_member")
->where(['id'=>$data['id']])
->save([
'name'=>$data['name'],
'mobile'=>$data['mobile']
]);
if ($is_success) {
$this->ajaxReturn(['status'=>1,'msg'=>'修改成功']);
// $this->success('添加成功',U('Payment/memberList'));
} else {
$this->ajaxReturn(['status'=>0,'msg'=>'尚未修改数据,修改失败']);
// $this->error('添加失败');
}
} else {
$data = M("payment_member")
->where("id = {$_REQUEST['id']}")
->find();
$this->assign('data',$data);
$this->display();
}
}
public function saveTransferSet()
{
$mobile = $_REQUEST['mobile'];
@ -380,10 +835,11 @@ class PaymentController extends BaseController
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
$ids = $_REQUEST['ids'];
$CompanyInfo = M("company_statement_info","tab_")
$CompanyInfo = M("pay_statement_info","tab_")
->alias('i')
->field("i.id,i.pool_id,i.company_name,i.company_info,i.statement_money,p.statement_num,i.remark,i.pay_status")
->join("left join tab_company_statement_pool p ON p.id = i.pool_id")
->field("i.id,c.pool_id,i.company_name,i.company_info,i.statement_money,p.statement_num,i.remark,i.pay_status,i.final_statement_money")
->join("left join tab_company_statement_info c ON c.id = i.statement_info_id")
->join("left join tab_company_statement_pool p ON p.id = c.pool_id")
->where("i.id in ({$ids})")
->select();
foreach($CompanyInfo as $k=>&$v){
@ -392,7 +848,7 @@ class PaymentController extends BaseController
$v['company_info']['ali_account'] ?? '';
}
$count = M("company_statement_info","tab_")->field("sum(statement_money) statement_money")->where("id in ({$ids})")->find();
$count = M("pay_statement_info","tab_")->field("sum(final_statement_money) statement_money")->where("id in ({$ids})")->find();
$this->getAccountMoney();
// dd($CompanyInfo);
@ -434,18 +890,21 @@ class PaymentController extends BaseController
public function doPayment()
{
$id = $_REQUEST['id'];
$remark = $_REQUEST['remark'];
if(empty(C("ALI_PAYMENT"))){
$this->ajaxReturn(["success"=>"配置错误,无法打款","data"=>[]]);
$this->ajaxReturn(["success"=>"配置错误,无法打款","data"=>["status"=>0]]);
}
Vendor("Alipay2020/Fund");
$fund = new \Fund(C("ALI_PAYMENT"));
$dbres = M("company_statement_info", "tab_")->where("id='{$id}'")->find();
$dbres = M("pay_statement_info", "tab_")->where("id='{$id}'")->find();
$company_info = json_decode($dbres['company_info'], true);
if ($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1) {
//执行打款
$title = "信息服务费";
$amount = $dbres['statement_money'];
$amount = $dbres['final_statement_money'];
$payres = $fund->transfer($company_info['ali_account'], $company_info['ali_user'], $dbres['statement_num'], $amount, $title);
$resultCode = $payres->code;
$savedata = ["id"=>$dbres['id']];
@ -461,9 +920,54 @@ class PaymentController extends BaseController
$savedata["pay_type"]=2;
$savedata["pay_time"]=time();
}
M("company_statement_info","tab_")->save($savedata);
$this->ajaxReturn(["success"=>"打款成功","data"=>[]]);
M("pay_statement_info","tab_")->save($savedata);
if ($savedata["pay_status"] == -1) {
//支付详单bug修改
$this->setPayVerifyStatus(-1,$savedata["pay_type"],$id);
$this->ajaxReturn(["success"=>"打款成功","data"=>["status"=>0],'amount'=>$dbres['final_statement_money']]);
}
//支付详单bug修改
$this->setPayVerifyStatus(1,$savedata["pay_type"],$id);
$this->ajaxReturn(["success"=>"打款成功","data"=>["status"=>1]]);
}
/**
* 支付详单状态修改
*/
public function setPayVerifyStatus($change_status,$pay_type,$id) {
$pay_info = M("pay_statement_info","tab_")->where(['id'=>$id])->find();
$info = M("pay_statement_info","tab_")->where("statement_info_id = {$pay_info['statement_info_id']} AND pay_status <> 1")->select();
$dbres['pay_status'] = $change_status;
$dbres['pay_type'] = $pay_type;
$dbres['pay_time'] = time();
if (empty($info)) {
M("company_statement_info","tab_")->where(['id'=>$pay_info['statement_info_id']])->save($dbres);
}
else {
if ($change_status == -1) {
foreach ($info as $key => $value) {
if ($value['pay_status'] == -1) {
M("company_statement_info","tab_")->where(['id'=>$pay_info['statement_info_id']])->save($dbres);
return;
}
}
}
}
}
/**
* 执行最后聚合表统计
* 整合数据,全部成功则支付成功,否则为支付中
@ -492,7 +996,7 @@ class PaymentController extends BaseController
{
if(!isset($_REQUEST['id'])) $this->error("参数错误");
$id = $_REQUEST['id'];
$info = M("company_statement_info","tab_")->field("pay_info")->where("id='{$id}'")->find()['pay_info'];
$info = M("pay_statement_info","tab_")->field("pay_info")->where("id='{$id}'")->find()['pay_info'];
$info = json_decode($info,true);
$senddata = [];
foreach($info as $k => &$v){
@ -518,5 +1022,164 @@ class PaymentController extends BaseController
M("company_statement_pool","tab_")->save($dbres);
}
/**
* 打款审核
*/
public function verify() {
// dump($_SESSION['onethink_admin']['payment_user']['id']);die();
if ((!$_REQUEST['id']||!$_REQUEST['status'])&&$_REQUEST['status']!='0') {
$this->ajaxReturn(['status'=>0,'msg'=>'数据传输错误']);
}
$id = $_REQUEST['id'];
$status = $_REQUEST['status'];
$member_id = $_SESSION['onethink_admin']['payment_user']['id'];
($status == 1)?($status_str = '已审核通过'):($status_str = '已审核拒绝');
$save = [
'pay_verify_status'=>$status,
'verify_time'=>time(),
'verify_member_id'=>$member_id
];
$verify = M("company_statement_info","tab_")
->where([
'id'=>['in',$id]
])
->save($save);
$companyStatementInfo = M("company_statement_info","tab_")
->where([
'id'=>['in',$id]
])
->select();
foreach ($companyStatementInfo as $key => $value) {
if ($value['statement_money'] <= 0) {
$payres["remark"] = '打款金额非正,直接打款成功';
$pay_info = json_encode($payres, JSON_UNESCAPED_UNICODE);
M("company_statement_info","tab_")
->where([
'id'=>['in',$value['id']]
])
->save(['pay_status'=>1,'pay_time'=>time(),'pay_type'=>2,'pay_info'=>$pay_info]);
M("pay_statement_info","tab_")
->where([
'statement_info_id'=>['in',$value['id']]
])
->save(['pay_status'=>1,'pay_time'=>time(),'pay_type'=>2,'pay_info'=>$pay_info]);
} else {
$payres["remark"] = '打款金额非正,直接打款成功';
$pay_info = json_encode($payres, JSON_UNESCAPED_UNICODE);
M("pay_statement_info","tab_")
->where([
'statement_info_id'=>['in',$value['id']],
'statement_money'=>['elt',0]
])
->save(['pay_status'=>1,'pay_time'=>time(),'pay_type'=>2,'pay_info'=>$pay_info]);
$pay_statement_info = M("pay_statement_info","tab_")
->where([
'statement_info_id'=>['in',$value['id']]
])
->order("statement_money ASC")
->select();
$subtraction = 0;
foreach ($pay_statement_info as $sk => $sv) {
if ($sv['statement_money'] < 0) {
$subtraction += -($sv['statement_money']);
$sv['final_statement_money'] = 0;
} elseif($sv['statement_money'] > 0 && $subtraction > 0) {
if($sv['statement_money'] >= $subtraction) {
$sv['final_statement_money'] = $sv['statement_money']-$subtraction;
$subtraction = 0;
} else {
$sv['final_statement_money'] = 0;
$subtraction =-$sv['final_statement_money'];
}
}
M("pay_statement_info","tab_")
->where([
'id'=>$sv['id']
])->save($sv);
}
}
}
if ($verify) {
$this->ajaxReturn(['status'=>1,'msg'=>$status_str]);
} else {
$this->ajaxReturn(['status'=>0,'msg'=>'审核失败请重新审核']);
}
}
/**
* 验证订单
*/
public function checkOrder() {
if(!$_REQUEST['ids']) {
$this->ajaxReturn(['data'=>[]]);
}
$ids = $_REQUEST['ids'];
$data = M("company_statement_info","tab_")
->field("id,statement_money,company_name,statement_begin_time,statement_end_time,pay_time")
->where(['id'=>['in',implode(',',$ids)]])
->select();
// dump($data);die();
$return = [];
foreach ($data as $key => $value) {
$check_data = M("excel_statement_info","tab_")
->where([
'statement_money'=>$value['statement_money'],
'company_name'=>$value['company_name'],
'statement_begin_time'=>$value['statement_begin_time'],
'statement_end_time'=>$value['statement_end_time'],
// 'id'=>['neq',$value['id']],
'pay_status'=>1
])
->select();
$check_company_statement_info = M("company_statement_info","tab_")
->where([
'pay_status'=>1,
'company_name'=>$value['company_name'],
'statement_begin_time'=>$value['statement_begin_time'],
'statement_end_time'=>$value['statement_end_time'],
'statement_money'=>$value['statement_money'],
'id'=>['neq',$value['id']],
])
->select();
$return = array_merge($return,$check_data,$check_company_statement_info);
}
foreach ($return as $key => $value) {
$return[$key]['time'] = ($value['statement_begin_time']?date("Y-m-d",$value['statement_begin_time']):'无').'-'.($value['statement_end_time']?date("Y-m-d",$value['statement_end_time']):'无');
$return[$key]['pay_time'] = date("Y-m-d H:m:s",$value['pay_time']);
}
$this->ajaxReturn(['data'=>$return]);
}
}

@ -130,9 +130,9 @@ class PublicController extends \Think\Controller
public function checksafecode($phone, $code)
{
//测试验证码
// if($code == "txsb0601"){
// return true;
// }
// if($code == "txsb0601"){
// return true;
// }
$taskClient = new TaskClient();
$result = $taskClient->checkSms($phone, $code);
$data = [];
@ -145,7 +145,10 @@ class PublicController extends \Think\Controller
public function check_moblie(&$logininfo){
$mobile = $logininfo['mobile'];
$check_mobile = M("Kv")->field("value")->where("`key`='payment_check_mobile' AND `value`= '{$mobile}'")->find();
// $check_mobile = M("Kv")->field("value")->where("`key`='payment_check_mobile' AND `value`= '{$mobile}'")->find();
$check_mobile = M("payment_member")->field("mobile")->where("mobile = '{$mobile}'")->find();
if(empty($check_mobile)){
//获取普通登陆
$plogin = M("payment_member","tab_")->where("`mobile`= '{$mobile}'")->find();
@ -153,17 +156,21 @@ class PublicController extends \Think\Controller
$this->error('无此登陆账号');
}else{
$logininfo["real_name"] = $plogin['real_name'];
$logininfo["is_payment"] = 0;
$logininfo["is_payment"] = $plogin['is_payment'];
}
}else{
$rname = M("Kv")->field("value")->where("`key`='payment_check_name'")->find();
// $rname = M("Kv")->field("value")->where("`key`='payment_check_name'")->find();
$rname = M("payment_member")->field("id,mobile,name,is_payment")->where("mobile = '{$mobile}'")->find();
if(empty( $rname)){
$logininfo['real_name'] = "admin";
}else{
$logininfo['real_name'] = $rname['value'];
$logininfo['real_name'] = $rname['name'];
}
$logininfo['is_payment'] = 1;
$logininfo['id'] = $rname['id'];
$logininfo['is_payment'] = $rname['is_payment'];
}
}

@ -75,18 +75,18 @@
<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>-->
<!-- <th>罚款</th>-->
<th>结算金额</th>
<th>支付宝真实姓名</th>
<th>支付宝账号</th>
@ -97,18 +97,18 @@
<tr>
<td>1</td>
<td>海南万盟天下科技</td>
<td>leilihua</td>
<td>外团开发</td>
<td>小明</td>
<td>个人</td>
<td>秦汉风云</td>
<td>策略</td>
<!-- <td>leilihua</td>-->
<!-- <td>外团开发</td>-->
<!-- <td>小明</td>-->
<!-- <td>个人</td>-->
<!-- <td>秦汉风云</td>-->
<!-- <td>策略</td>-->
<td>2020.6.22-2020.6.28 5626</td>
<td>5626</td>
<td>1%</td>
<td>0%</td>
<td>0</td>
<td>0</td>
<!-- <td>5626</td>-->
<!-- <td>1%</td>-->
<!-- <td>0%</td>-->
<!-- <td>0</td>-->
<!-- <td>0</td>-->
<td>56.26</td>
<td>小花</td>
<td>12345678910</td>
@ -311,18 +311,18 @@
var titleKey={
"序号": "sort",
"下游名称": "company_name",
"会长账号": "account",
"下游类型": "company_relation_str",
"市场员": "nickname",
"下游性质": "company_type_str",
"产品": "game_name",
"产品类型": "game_type_name",
// "会长账号": "account",
// "下游类型": "company_relation_str",
// "市场员": "nickname",
// "下游性质": "company_type_str",
// "产品": "game_name",
// "产品类型": "game_type_name",
"结算时间": "statement_time",
"推广流水": "pay_amount",
"分成比例": "ratio",
"补点": "increment_ratio",
"奖励": "reward",
"罚款": "fine",
// "推广流水": "pay_amount",
// "分成比例": "ratio",
// "补点": "increment_ratio",
// "奖励": "reward",
// "罚款": "fine",
"结算金额":"sum_money",
"账户名": "payee_name",
"银行卡号": "bank_account",

@ -97,6 +97,26 @@
content: '';
padding: 0;
}
::-webkit-scrollbar {
width: 3px;
height: 3px;
}
::-webkit-scrollbar-track {
border-radius: 3px; /*滚动条的背景区域的圆角*/
}
::-webkit-scrollbar-thumb {
border-radius: 3px; /*滚动条的圆角*/
background-color: #ccc; /*滚动条的背景颜色*/
}
::-webkit-scrollbar-thumb:hover {
background-color: #bbb;
}
::-webkit-scrollbar-thumb:active {
cursor: pointer;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
@ -145,7 +165,14 @@
</div>
</div>
<div class="input-list">
<input type="text" readonly id="verifytime_start" name="verifytime_start" class="" value="{:I('verifytime_start')}" placeholder="审核开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" style="display:inline-block">
<input type="text" readonly id="verifytime_end" name="verifytime_end" class="" value="{:I('verifytime_end')}" placeholder="审核结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('lists','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
@ -157,10 +184,15 @@
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<if condition="session('payment_user.is_payment') eq 1">
<a class='butn' id='doPayment'>批量打款</a>
<a class='butn' id='doPayment'>打款</a>
</if>
<a class='butn' id='leadExcel'>Excel导入</a>
<a class='butn' id='export'>导出</a>
<a class='butn verify' data-value='1'>审核通过</a>
<a class='butn verify' data-value='2'>审核拒绝</a>
<a class='butn return_verify' data-value='0' style="background-color: red;">审核撤回</a>
<a class='butn' id='delItem' style="background-color: red;">批量删除</a>
</div>
</div>
@ -178,7 +210,8 @@
<th>创建时间</th>
<th>批次号</th>
<th>结算金额</th>
<th>结算流水</th>
<th>审批状态</th>
<!-- <th>结算流水</th>-->
<th>打款状态</th>
<th>支付时间</th>
<th>预打款备注</th>
@ -196,7 +229,7 @@
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td ><input class="ids" type="checkbox" value="{$data['id']}" data-pay="{$data['can_pay']}" data-paystatus="{$data.pay_status}" name="ids[]"></td>
<td ><input class="ids" type="checkbox" value="{$data['id']}" data-pay="{$data['can_pay']}" data-paystatus="{$data.pay_status}" name="ids[]" data-verifystatus="{$data.verify_status}"></td>
<td>{$data.company_name}</td>
<td>{$data.company_type}</td>
<td>{$data.create_time}</td>
@ -204,7 +237,8 @@
<td>{$data.batch_num}</td>
<td>{$data.statement_money}</td>
<td>{$data.platform_amount}</td>
<td <if condition="$data.verify_status eq 2">style="color: red"</if>>{$data.verify|default='---'}</td>
<!-- <td>{$data.platform_amount}</td>-->
<if condition="($data['pay_status'] eq -1) ">
<td style="color: red;">{$data.pay_status_str}</td>
<else />
@ -237,6 +271,68 @@
</if>
{$_page|default=''}
</div>
<div style="width: 800vw;height:600vh;padding: 0;position: absolute;top: 0;z-index: 9999;background-color:rgba(0,0,0,.6);right: 1px;display: none" id="window">
<div class="layui-layer layui-layer-hui" style="width:800px;height:440px;z-index: 19891015; top:28%; left:35%;border-radius: 2%;background-color:white;color: #0a001f;">
<div style="padding: 15px 30px 15px 20px;font-size: 28px;">打款提示</div>
<div class="layui-layer-content" style="font-size: 22px;padding: 0 25px;">您所选打款单与以下打款单可能存在重复,请谨慎操作</div>
<!-- <div style="padding: 0 25px">-->
<!-- <span style="width: 135px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;border-right:none;"><span style="display: block;padding: 6px 10px">公司</span></span>-->
<!-- <span style="width: 135px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;border-right:none;"><span style="display: block;padding: 6px 10px">结算时间</span></span>-->
<!-- <span style="width: 135px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;border-right:none;"><span style="display: block;padding: 6px 10px">结算金额</span></span>-->
<!-- <span style="width: 136px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;"><span style="display: block;padding: 6px 10px">支付时间</span></span>-->
<!-- </div>-->
<div class="layui-layer-content" style="font-size: 22px;padding: 5px 25px;height: 200px;overflow-x:hidden;overflow-y:scroll">
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th>公司</th>
<th>结算时间</th>
<th>结算金额</th>
<th>支付时间</th>
</tr>
</thead>
<!-- 列表 -->
<tbody id="tbody">
<tr>
<td >13214</td>
<td>13214</td>
<td>13214</td>
<td>13214</td>
</tr>
<tr>
<td >13214</td>
<td>13214</td>
<td>13214</td>
<td>13214</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div style="text-align: right;margin-top: 20px">
<div style="font-size: 28px;display: inline-block;">
<div class="search_list" style="justify-content:flex-end;width:100%;">
<div class="input-list" style="float: right;">
<a class="sch-btn" href="javascript:;" style="width: 150px;background: white;border: 1px solid black;color: black" id="back">返回</a>
</div>
</div>
</div>
<div style="padding: 0 20px 0 0;font-size: 28px;display: inline-block;">
<div class="search_list" style="justify-content:flex-end;width:100%;">
<div class="input-list" style="float: right;">
<a class="sch-btn" href="javascript:;" style="width: 150px;" id="commit">继续打款</a>
</div>
</div>
</div>
</div>
</div>
</div>
</block>
<block name="script">
@ -264,8 +360,25 @@
function reload() {
window.location.reload();
}
function closeLayer(pay_status) {
layer.closeAll();
if (pay_status == 1) {
layer.msg("<font style='color: white'>打款成功</font>");
} else {
layer.msg("<font style='color: white'>打款失败</font>");
}
setTimeout(function () {
window.location.reload();
},2000);
}
$(function(){
$("#back,#window").click(function() {
$('#window').hide();
});
$(".viewPool").click(function () {
var id = $(this).data("id");
var url = "{:U('viewPool')}"+"&id="+id
@ -278,7 +391,145 @@
content: url
});
});
$(".return_verify").click(function () {
var status = $(this).data('value');
var verifytip = 0;
var paytip = 0;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
var pay_status = $(elem).data('paystatus');
if (verifystatus == 0) {
verifytip = 1;
return ;
}
if (pay_status != 0) {
paytip = 1;
return ;
}
return $(elem).val();
}).get();
if (verifytip == 1) {
layer.msg("<font style='color:white'>" + '请选择已审核的打款单' + "</font>");
return;
}
if (paytip == 1) {
layer.msg("<font style='color:white'>" + '请选择未打款的打款单' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要操作的打款单' + "</font>");
return;
}
layer.confirm('【提示】是否确认取消审核'+((status==1)?'通过':'拒绝'), {
btn: ['确认','取消'],
title:false
}, function(){
$.ajax({
type:'post',
dataType:'json',
data: {'id':text,'status':status},
url:"{:U('verify')}",
success:function(data) {
if (data.status ==1) {
//弹框
layer.msg("<font style='color:white'>审批撤回成功</font>");
setTimeout(function(){
window.location.reload();
},1500);
} else {
layer.msg("<font style='color:white'>审批撤回失败</font>");
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
// checkcode(mobile);
}
});
});
});
$(".verify").click(function () {
var status = $(this).data('value');
var verifytip = 0;
var paytip = 0;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
var pay_status = $(elem).data('paystatus');
if (verifystatus > 0) {
verifytip = 1;
return ;
}
if (pay_status != 0) {
paytip = 1;
return ;
}
return $(elem).val();
}).get();
if (verifytip == 1) {
layer.msg("<font style='color:white'>" + '请选择未审核的打款单' + "</font>");
return;
}
if (paytip == 1) {
layer.msg("<font style='color:white'>" + '请选择未打款的打款单' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要操作的打款单' + "</font>");
return;
}
layer.confirm('【提示】是否确认审核'+((status==1)?'通过':'拒绝'), {
btn: ['确认','取消'],
title:false
}, function(){
$.ajax({
type:'post',
dataType:'json',
data: {'id':text,'status':status},
url:"{:U('verify')}",
success:function(data) {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
if (data.status ==1) {
//弹框
setTimeout(function(){
window.location.reload();
},1500);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
// checkcode(mobile);
}
});
});
});
$("#export").click(function () {
var flag = false;
@ -359,17 +610,109 @@
content: url
});
})
});
function checkPaymentOrder() {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
if($(elem).data("pay") == 1 && verifystatus == 1){
return $(elem).val();
}
}).get();
console.log(text)
// text = "47,99,100";
$("#tbody").empty();
$.ajax({
type:'post',
dataType:'json',
data: {'ids':text},
url:"{:U('checkOrder')}",
success:function(data) {
if (data.data.length >0) {
var datas = data.data;
var str = "";
$('#window').show();
for (var key in datas) {
str += "<tr><td>" + datas[key]['company_name'] + "</td>"
+ "<td>"+ datas[key]['time'] + "</td>"
+ "<td>"+ datas[key]['statement_money'] + "</td>"
+ "<td>"+ datas[key]['pay_time'] + "</td></tr>";
}
$("#tbody").append(str);
return true;
} else {
doPayment();
return false;
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
}
})
}
function doPayment() {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
if($(elem).data("pay") == 1 && verifystatus == 1){
return $(elem).val();
}
}).get();
text = text.join(",");
layer.open({
type: 2,
title: "打款详情",
shadeClose: true,
shade: 0.8,
area: ['100%', '100%'],
content: "{:U('showPayment')}"+"&ids="+text
});
// window.location.href = "{:U('showPayment')}"+"&ids="+text;
}
$("#commit").on("click",function () {
doPayment();
});
$("#doPayment").on("click",function(){
var verifytip = 0;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
if($(elem).data("pay") == 1){
var verifystatus = $(elem).data('verifystatus');
if($(elem).data("pay") == 1 && verifystatus == 1){
return $(elem).val();
}
if (verifystatus != 1) {
verifytip = 1;
}
}).get();
if (verifytip == 1) {
layer.msg("<font style='color:white'>审核通过方能打款</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>请先选择需要打款的结算单仅大于0.1元的打款单才能进行打款</font>");
return;
}
checkPaymentOrder();
return;
text = text.join(",");
window.location.href = "{:U('showPayment')}"+"&ids="+text;
})
@ -400,6 +743,15 @@
}
}
var verifystart = $("#verifytime_start").val();
var verifyend = $("#verifytime_end").val();
if(verifystart !='' && verifyend != ''){
if (Date.parse(verifystart) > Date.parse(verifyend)){
layer.msg("<font style='color:white'>审核时间开始时间必须小于等于结束时间</font>");
return false;
}
}
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
@ -424,7 +776,13 @@
});
laydate.render({
elem: '#datetimepicker2'
});
});
laydate.render({
elem: '#verifytime_start'
});
laydate.render({
elem: '#verifytime_end'
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){

@ -1,4 +1,23 @@
<extend name="Public/base"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
@ -10,7 +29,20 @@
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<style>
tml {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.tabcon1711 table {
width: 480px;
}
.tabcon1711 table {
width: 480px;
@ -159,9 +191,11 @@
</block>
<block name="script">
<script>
var DATA={};
var pay_status = 1;
// $("#creat_msg").show();
highlight_subnav("{:U('lists')}");
// highlight_subnav("{:U('lists')}");
var MSG={
showmsg:function(str){
@ -208,9 +242,14 @@
doPayment:function(callback){
var senddata = DATA.data[(DATA.now-1)];
console.log(senddata);
COMPARE.publiucAjax("{:U('doPayment')}",senddata,function(){
COMPARE.publiucAjax("{:U('doPayment')}",senddata,function(data){
MSG.showmsg("开始进行打款 ["+DATA.now+"/"+DATA.datacount+"] ......");
DATA.now ++;
if (data.status == 0) {
pay_status = 0;
}
if( DATA.now > DATA.datacount){
callback();
}else{
@ -283,7 +322,8 @@
COMPARE.doPayment(function(){
MSG.showmsg("打款结束,执行跳转中......");
setTimeout(function(){
window.location.href = "{:U('lists')}";
// window.location.href = "{:U('lists')}";
window.parent.closeLayer(pay_status);
},2000)
})
});

@ -101,19 +101,20 @@
<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>-->
<!-- <th>罚款</th>-->
<th>结算金额</th>
<th>审批状态</th>
<th>支付宝真实姓名</th>
<th>支付宝账号</th>
<th>制单人</th>
@ -131,29 +132,29 @@
<!-- <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_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']">-->
<!-- <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_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]['game_name']}</td>-->
<!-- <td>{$com['statement_info'][0]['game_list'][0]['game_type_name']}</td>-->
<td>{$com['statement_info'][0]['game_list'][0]['statement_time']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['ratio']|default=0}%</td>
<td>{$com['statement_info'][0]['game_list'][0]['increment_ratio']|default=0}%</td>
<td>{$com['statement_info'][0]['game_list'][0]['reward']}</td>
<td>{$com['statement_info'][0]['game_list'][0]['fine']}</td>
<!-- <td>{$com['statement_info'][0]['game_list'][0]['pay_amount']}</td>-->
<!-- <td>{$com['statement_info'][0]['game_list'][0]['ratio']|default=0}%</td>-->
<!-- <td>{$com['statement_info'][0]['game_list'][0]['increment_ratio']|default=0}%</td>-->
<!-- <td>{$com['statement_info'][0]['game_list'][0]['reward']}</td>-->
<!-- <td>{$com['statement_info'][0]['game_list'][0]['fine']}</td>-->
<td>{$com['statement_info'][0]['game_list'][0]['sum_money']}</td>
<else />
<td>-</td>
<td>-</td>
<!-- <td>-</td>-->
<!-- <td>-</td>-->
<td>-</td>
<td>-</td>
<td>-</td>
@ -162,6 +163,7 @@
<td>-</td>
<td>-</td>
</notempty>
<td rowspan="{$com.row}">{$com.verify}</td>
<td rowspan="{$com.row}">{$com.company_info.ali_user}</td>
<td rowspan="{$com.row}">{$com.company_info.ali_account}</td>
@ -176,14 +178,14 @@
<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['game_name']}</td>-->
<!-- <td>{$game['game_type_name']}</td>-->
<td>{$game['statement_time']}</td>
<td>{$game['pay_amount']}</td>
<td>{$game['ratio']|default=0}%</td>
<td>{$game['increment_ratio']|default=0}%</td>
<td>{$game['reward']}</td>
<td>{$game['fine']}</td>
<!-- <td>{$game['pay_amount']}</td>-->
<!-- <td>{$game['ratio']|default=0}%</td>-->
<!-- <td>{$game['increment_ratio']|default=0}%</td>-->
<!-- <td>{$game['reward']}</td>-->
<!-- <td>{$game['fine']}</td>-->
<td>{$game['sum_money']}</td>
</tr>
</if>
@ -199,14 +201,14 @@
<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]['game_name']}</td>-->
<!-- <td>{$account['game_list'][0]['game_type_name']}</td>-->
<td>{$account['game_list'][0]['statement_time']}</td>
<td>{$account['game_list'][0]['pay_amount']}</td>
<td>{$account['game_list'][0]['ratio']|default=0}%</td>
<td>{$account['game_list'][0]['increment_ratio']|default=0}%</td>
<td>{$account['game_list'][0]['reward']}</td>
<td>{$account['game_list'][0]['fine']}</td>
<!-- <td>{$account['game_list'][0]['pay_amount']}</td>-->
<!-- <td>{$account['game_list'][0]['ratio']|default=0}%</td>-->
<!-- <td>{$account['game_list'][0]['increment_ratio']|default=0}%</td>-->
<!-- <td>{$account['game_list'][0]['reward']}</td>-->
<!-- <td>{$account['game_list'][0]['fine']}</td>-->
<td>{$account['game_list'][0]['sum_money']}</td>
<else />
<td>-</td>
@ -225,14 +227,14 @@
<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['game_name']}</td>-->
<!-- <td>{$game['game_type_name']}</td>-->
<td>{$game['statement_time']}</td>
<td>{$game['pay_amount']}</td>
<td>{$game['ratio']|default=0}%</td>
<td>{$game['increment_ratio']|default=0}%</td>
<td>{$game['reward']}</td>
<td>{$game['fine']}</td>
<!-- <td>{$game['pay_amount']}</td>-->
<!-- <td>{$game['ratio']|default=0}%</td>-->
<!-- <td>{$game['increment_ratio']|default=0}%</td>-->
<!-- <td>{$game['reward']}</td>-->
<!-- <td>{$game['fine']}</td>-->
<td>{$game['sum_money']}</td>
</tr>
</if>
@ -245,12 +247,12 @@
</notempty>
</foreach>
<tr>
<td colspan=9 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td colspan=3 >合计:</td>
<!-- <td>{$count.platform_amount}</td>-->
<!-- <td></td>-->
<!-- <td></td>-->
<!-- <td></td>-->
<!-- <td></td>-->
<td>{$count.sum_money}</td>
<td></td>
<td></td>
@ -259,6 +261,7 @@
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>

@ -0,0 +1,77 @@
<extend name="Public/base"/>
<block name="body">
<div class="tabcon1711">
<form action="{:U('add')}" method="post" class="form-horizontal form_info_ml">
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">新增复核人</h3>
<p class="description_text"></p>
</div>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l"><i class="mustmark">*</i>姓名:</td>
<td class="r">
<input name="name" id="name" type="text" class="" placeholder="请输入姓名" onkeyup="value=value.replace(/[^\a-zA-Z\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\a-zA-Z\u4E00-\u9FA5]/g,''))">
<!-- <span class="notice-text">制单人姓名</span>-->
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>手机号码:</td>
<td class="r">
<input name="mobile" id="mobile" type="text" class="" placeholder="请输入手机号码" onkeyup="value=value.replace(/[^\d]/g,'')" maxlength=11>
<!-- <span class="notice-text">制单人登陆用的手机</span>-->
</td>
</tr>
</tbody>
</table>
<div class="form-item cf">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back(-1);" >
返回
</a>
</div>
</form>
</div>
</block>
<block name="script">
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Payment/memberList')}');
$(function () {
function isPoneAvailable(poneInput) {
var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
if (!myreg.test(poneInput.val())) {
return false;
} else {
return true;
}
}
$('#submit').click(function(){
var name = $("#name").val();
var mobile = $("#mobile").val();
if (!isPoneAvailable(mobile)) {
layer.toast('输入的格式不符合手机号的规则,请重新输入');
}
$('#form').submit();
});
})
</script>
</block>

@ -0,0 +1,172 @@
<extend name="Public/base"/>
<block name="body">
<div class="tabcon1711">
<form action="{:U('edit')}" method="post" id ="form">
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">编辑复核人</h3>
<p class="description_text"></p>
</div>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l"><i class="mustmark">*</i>姓名:</td>
<td class="r">
<input name="name" id="name" type="text" class="" placeholder="请输入姓名" value="{$data['name']}" onkeyup="value=value.replace(/[^\a-zA-Z\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\a-zA-Z\u4E00-\u9FA5]/g,''))">
<!-- <span class="notice-text">制单人姓名</span>-->
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>手机号码:</td>
<td class="r">
<input id="old_mobile" type="text" class="" placeholder="请输入手机号码" value="{$data['mobile']}" onkeyup="value=value.replace(/[^\d]/g,'')" maxlength=11 style="display: none">
<input name="mobile" id="mobile" type="text" class="" placeholder="请输入手机号码" value="{$data['mobile']}" onkeyup="value=value.replace(/[^\d]/g,'')" maxlength=11>
<!-- <span class="notice-text">制单人登陆用的手机</span>-->
</td>
</tr>
</tbody>
</table>
<div class="form-item cf">
<input name="id" value="{$_REQUEST['id']}" type="hidden" id = "id">
<!-- <button class="submit_btn mlspacing" id="submit" >-->
<!-- 保存-->
<!-- </button>-->
<a class="submit_btn mlspacing " alt="保存" title="保存" id="submit" >
保存
</a>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back(-1);" >
返回
</a>
</div>
</form>
</div>
<div style="width: 100vw;height: 200vh;padding: 0;position: absolute;top: 0;z-index: 9999999999;display: none;" id="creat_msg">
<div class="layui-layer layui-layer-dialog layui-layer-border layui-layer-msg layui-layer-hui"
type="dialog" times="1" showtime="50000" contype="string" style="z-index: 19891015; top:48%; left:47%;">
<div id="tip_msg" class="layui-layer-content">开始时间与结束时间都不允许为空</div>
</div>
</div>
</block>
<block name="script">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Payment/memberList')}');
$(function(){
var MSG={
showmsg:function(str){
$("#creat_msg").show();
$("#tip_msg").html(str);
},
hidemsg:function(){
$("#creat_msg").hide();
$("#tip_msg").html('');
}
}
var is_change = 0;
$("#name,#mobile").change(function () {
is_change = 1;
});
$("#submit").click(function () {
var id = $("#id").val();
var name = $("#name").val();
var mobile = $("#mobile").val();
var url = "{:U('edit')}";
var data = {id:id,name:name,mobile:mobile};
var old_mobile = $("#old_mobile").val();
if (is_change == 0) {
layer.msg("姓名、电话未做编辑,请编辑后提交");
return;
}
if (id != 1||old_mobile==mobile) {
publicAjax(url,data,function (data) {
layer.msg(data.msg);
if (data.status ==1) {
setTimeout(function(){
window.location.href = "{:U('memberList')}";
},2000)
}
});
return;
}
$.ajax({
type:'post',
dataType:'json',
data:'phone='+old_mobile,
url:'{:U("Public/telsafecode")}',
success:function(data) {
if (data.status ==1) {
layer.open({
title : '验证码已发送到原手机,请输入验证码',
content : `<input style="margin-left: 30px;width: 230px" type="text" id="verify" name="verify" value="" placeholder="请输入验证码"/>`,
success : function() {
},
yes : function(index, layero) {
var verify = $("#verify").val();
data = {id:id,name:name,mobile:mobile,old_mobile:old_mobile,verify:verify};
publicAjax(url,data,function (data) {
// layer.msg(data.msg);
MSG.showmsg(data.msg);
setTimeout(function() {
MSG.hidemsg();
},2000);
if (data.status ==1) {
setTimeout(function(){
window.location.href = "{:U('memberList')}";
},2000)
}
});
return;
}
});
} else {
alert(data.msg);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
}
});
});
function publicAjax(url,senddata,callback) {
$.ajax({
type: 'post',
url: url,
data:senddata,
success: function(data) {
callback(data);
},
error:function(){
MSG.hidemsg();
layer.alert("网络错误或超时");
return false;
}
});
}
});
</script>
</block>

@ -93,6 +93,39 @@
display: block;
}
.page .sch-btn:before{
content: '';
padding: 0;
}
::-webkit-scrollbar {
width: 3px;
height: 3px;
}
::-webkit-scrollbar-track {
border-radius: 3px; /*滚动条的背景区域的圆角*/
}
::-webkit-scrollbar-thumb {
border-radius: 3px; /*滚动条的圆角*/
background-color: #ccc; /*滚动条的背景颜色*/
}
::-webkit-scrollbar-thumb:hover {
background-color: #bbb;
}
::-webkit-scrollbar-thumb:active {
cursor: pointer;
}
.triangle{
width:0;
height:0;
border-top:10px solid blue;
border-left:8px solid transparent;
border-right:8px solid transparent;
border-bottom:0;
/*float: left;*/
}
</style>
<div class="cf main-place top_nav_list navtab_list">
@ -158,6 +191,15 @@
</div>
</div>
<div class="input-list">
<input type="text" readonly id="verifytime_start" name="verifytime_start" class="" value="{:I('verifytime_start')}" placeholder="审核开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" style="display:inline-block">
<input type="text" readonly id="verifytime_end" name="verifytime_end" class="" value="{:I('verifytime_end')}" placeholder="审核结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list">
@ -170,8 +212,11 @@
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<if condition="session('payment_user.is_payment') eq 1">
<a class='butn' id='doPayment'>批量打款</a>
<a class='butn' id='doPayment'>打款</a>
</if>
<a class='butn verify' data-value='1'>审核通过</a>
<a class='butn verify' data-value='2'>审核拒绝</a>
<a class='butn return_verify' data-value='0' style="background-color: red;">审核撤回</a>
</div>
</div>
@ -188,7 +233,8 @@
<th>结算时间</th>
<th>关联汇总单号</th>
<th>结算金额</th>
<th>结算流水</th>
<th>审批状态</th>
<!-- <th>结算流水</th>-->
<th>打款状态</th>
<th>支付时间</th>
<th>预打款备注</th>
@ -206,15 +252,16 @@
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td ><input class="ids" type="checkbox" value="{$data['id']}" data-pay="{$data['can_pay']}" name="ids[]"></td>
<td>{$data.company_name}</td>
<td ><input class="ids" type="checkbox" value="{$data['ids']}" data-verify_id="{$data['id']}" data-pay="{$data['can_pay']}" name="ids[]" data-paystatus="{$data.pay_status}" data-verifystatus="{$data.pay_verify_status}"></td>
<td style="text-align: left">{$data.company_name}</td>
<td>{$data.company_type}</td>
<td>{$data.valid}</td>
<td>{$data.statement_pool_num}</td>
<td>{$data.statement_money}</td>
<td>{$data.platform_amount}</td>
<td>{$data.verify|default='--'}</td>
<!-- <td>{$data.platform_amount}</td>-->
<if condition="($data['verify_status'] eq -1) OR ($data['pay_status'] eq -1) ">
<td style="color: red;">{$data.verify_status_str}</td>
<else />
@ -225,11 +272,42 @@
<td>{$data.remark}</td>
<td>
<a class='confirm viewPool' data-id='{$data.id}'>查看</a>
<if condition="$data['pay_status'] neq 0">
<a class='confirm paymentInfo' data-id='{$data.id}'>打款详情</a>
<if condition="$data['pay_status'] neq 0 and count($data['son_info']) elt 1">
<a class='confirm paymentInfo' data-id="{$data['son_info'][0]['id']}">打款详情</a>
</if>
</td>
</tr>
<volist name="data.son_info" id="s_data">
<if condition="count($data['son_info']) gt 1">
<tr>
<!-- <td ><input class="ids" type="checkbox" value="{$data['id']}" data-pay="{$data['can_pay']}" name="ids[]" data-paystatus="{$data.pay_status}" data-verifystatus="{$data.pay_verify_status}"></td>-->
<td></td>
<td style="text-align: left"><span style="margin-left: 15px">|--{$s_data.company_name}</span></td>
<td>{$s_data.company_type}</td>
<td>{$s_data.valid}</td>
<td>{$s_data.statement_pool_num}</td>
<td>{$s_data.statement_money}</td>
<td>{$data.verify|default='--'}</td>
<!-- <td>{$data.platform_amount}</td>-->
<if condition="($s_data['verify_status'] eq -1) OR ($s_data['pay_status'] eq -1) ">
<td style="color: red;">{$s_data.verify_status_str}</td>
<else />
<td>{$s_data.verify_status_str}</td>
</if>
<td>{$s_data.pay_time}</td>
<td>{$s_data.remark}</td>
<td>
<!-- <a class='confirm viewPool' data-id='{$data.id}'>查看</a>-->
<if condition="$s_data['pay_status'] neq 0">
<a class='confirm paymentInfo' data-id='{$s_data.id}'>打款详情</a>
</if>
</td>
</tr>
</if>
</volist>
</volist>
<tr><td style="line-height: 42px;">合计</td><td colspan="13" style="line-height: 42px;">待打款金额:&nbsp;{$money.statement_money}</td></tr>
</notemtpy>
@ -244,6 +322,68 @@
</if>
{$_page|default=''}
</div>
<div style="width: 800vw;height:600vh;padding: 0;position: absolute;top: 0;z-index: 9999;background-color:rgba(0,0,0,.6);right: 1px;display: none" id="window">
<div class="layui-layer layui-layer-hui" style="width:800px;height:440px;z-index: 19891015; top:28%; left:35%;border-radius: 2%;background-color:white;color: #0a001f;">
<div style="padding: 15px 30px 15px 20px;font-size: 28px;">打款提示</div>
<div class="layui-layer-content" style="font-size: 22px;padding: 0 25px;">您所选打款单与以下打款单可能存在重复,请谨慎操作</div>
<!-- <div style="padding: 0 25px">-->
<!-- <span style="width: 135px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;border-right:none;"><span style="display: block;padding: 6px 10px">公司</span></span>-->
<!-- <span style="width: 135px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;border-right:none;"><span style="display: block;padding: 6px 10px">结算时间</span></span>-->
<!-- <span style="width: 135px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;border-right:none;"><span style="display: block;padding: 6px 10px">结算金额</span></span>-->
<!-- <span style="width: 136px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;"><span style="display: block;padding: 6px 10px">支付时间</span></span>-->
<!-- </div>-->
<div class="layui-layer-content" style="font-size: 22px;padding: 5px 25px;height: 200px;overflow-x:hidden;overflow-y:scroll">
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th>公司</th>
<th>结算时间</th>
<th>结算金额</th>
<th>支付时间</th>
</tr>
</thead>
<!-- 列表 -->
<tbody id="tbody">
<tr>
<td >13214</td>
<td>13214</td>
<td>13214</td>
<td>13214</td>
</tr>
<tr>
<td >13214</td>
<td>13214</td>
<td>13214</td>
<td>13214</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div style="text-align: right;margin-top: 20px">
<div style="font-size: 28px;display: inline-block;">
<div class="search_list" style="justify-content:flex-end;width:100%;">
<div class="input-list" style="float: right;">
<a class="sch-btn" href="javascript:;" style="width: 150px;background: white;border: 1px solid black;color: black" id="back">返回</a>
</div>
</div>
</div>
<div style="padding: 0 20px 0 0;font-size: 28px;display: inline-block;">
<div class="search_list" style="justify-content:flex-end;width:100%;">
<div class="input-list" style="float: right;">
<a class="sch-btn" href="javascript:;" style="width: 150px;" id="commit">继续打款</a>
</div>
</div>
</div>
</div>
</div>
</div>
</block>
<block name="script">
@ -271,9 +411,177 @@
function reload() {
window.location.reload();
}
function closeLayer(pay_status) {
layer.closeAll();
if (pay_status == 1) {
layer.msg("<font style='color: white'>打款成功</font>");
} else {
layer.msg("<font style='color: white'>打款失败</font>");
}
setTimeout(function () {
window.location.reload();
},2000);
}
$("#back,#window").click(function() {
$('#window').hide();
});
$(function(){
$(".return_verify").click(function () {
var status = $(this).data('value');
var verifytip = 0;
var paytip = 0;
var canpay = 0;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
var pay_status = $(elem).data('paystatus');
if (verifystatus == 0) {
verifytip = 1;
return ;
}
if (pay_status != 0) {
paytip = 1;
return ;
}
return $(elem).data('verify_id');
}).get();
if (verifytip == 1) {
layer.msg("<font style='color:white'>" + '请选择已审核的打款单' + "</font>");
return;
}
if (paytip == 1) {
layer.msg("<font style='color:white'>" + '请选择未打款的打款单' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要操作的打款单' + "</font>");
return;
}
layer.confirm('【提示】是否取消审核'+((status==1)?'通过':'拒绝'), {
btn: ['确认','取消'],
title:false
}, function(){
$.ajax({
type:'post',
dataType:'json',
data: {'id':text,'status':status},
url:"{:U('verify')}",
success:function(data) {
if (data.status ==1) {
//弹框
layer.msg("<font style='color:white'>审批撤回成功</font>");
setTimeout(function(){
window.location.reload();
},1500);
} else {
layer.msg("<font style='color:white'>审批撤回失败</font>");
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
// checkcode(mobile);
}
});
});
});
$(".verify").click(function () {
var status = $(this).data('value');
var verifytip = 0;
var paytip = 0;
var canpay = 0;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
var pay_status = $(elem).data('paystatus');
if (verifystatus > 0) {
verifytip = 1;
return ;
}
if (pay_status != 0) {
paytip = 1;
return ;
}
if($(elem).data("pay") != 1) {
canpay = 1;
return;
}
return $(elem).data('verify_id');
}).get();
if (verifytip == 1) {
layer.msg("<font style='color:white'>" + '请选择未审核的打款单' + "</font>");
return;
}
if (paytip == 1) {
layer.msg("<font style='color:white'>" + '请选择未打款的打款单' + "</font>");
return;
}
if (canpay == 1) {
layer.msg("<font style='color:white'>" + '请选择信息配置完全的打款单' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要操作的打款单' + "</font>");
return;
}
layer.confirm('【提示】是否确认审核'+((status==1)?'通过':'拒绝'), {
btn: ['确认','取消'],
title:false
}, function(){
$.ajax({
type:'post',
dataType:'json',
data: {'id':text,'status':status},
url:"{:U('verify')}",
success:function(data) {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
if (data.status ==1) {
//弹框
setTimeout(function(){
window.location.reload();
},1500);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
// checkcode(mobile);
}
});
});
});
var company_id = "{$_GET['company_id']??0}";
$("#company_type").on("change",function(){
var val = $(this).find("option:selected").val();
@ -324,23 +632,117 @@
content: url
});
});
function checkPaymentOrder() {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
if($(elem).data("pay") == 1 && verifystatus == 1){
return $(elem).data("verify_id");
}
}).get();
// text = "47,99,100";
$("#tbody").empty();
$.ajax({
type:'post',
dataType:'json',
data: {'ids':text},
url:"{:U('checkOrder')}",
success:function(data) {
if (data.data.length >0) {
var datas = data.data;
var str = "";
$('#window').show();
for (var key in datas) {
str += "<tr><td>" + datas[key]['company_name'] + "</td>"
+ "<td>"+ datas[key]['time'] + "</td>"
+ "<td>"+ datas[key]['statement_money'] + "</td>"
+ "<td>"+ datas[key]['pay_time'] + "</td></tr>";
}
$("#tbody").append(str);
return true;
} else {
doPayment();
return false;
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
}
})
}
function doPayment() {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
if($(elem).data("pay") == 1 && verifystatus == 1 && $(elem).val()!=''){
return $(elem).val();
}
}).get();
console.log(text)
text = text.join(",");
if (!text) {
layer.msg("<font style='color: white'>管理后台汇总单未审核,请重新审核后再进行打款</font>");
return;
}
layer.open({
type: 2,
title: "打款详情",
shadeClose: true,
shade: 0.8,
area: ['100%', '100%'],
content: "{:U('showPayment')}"+"&ids="+text
});
// window.location.href = "{:U('showPayment')}"+"&ids="+text;
}
$("#commit").on("click",function () {
doPayment();
});
$("#doPayment").on("click",function(){
var verifytip = 0;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
if($(elem).data("pay") == 1){
var verifystatus = $(elem).data('verifystatus');
if($(elem).data("pay") == 1 && verifystatus == 1){
return $(elem).val();
}
if (verifystatus != 1) {
verifytip = 1;
}
}).get();
if (verifytip == 1) {
layer.msg("<font style='color:white'>审核通过方能打款</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>请先选择需要打款的结算单</font>");
return;
}
console.log(text);
checkPaymentOrder();
return;
text = text.join(",");
window.location.href = "{:U('showPayment')}"+"&ids="+text;
})
});
$("#search").click(function(){
@ -377,7 +779,13 @@
});
laydate.render({
elem: '#datetimepicker2'
});
});
laydate.render({
elem: '#verifytime_start'
});
laydate.render({
elem: '#verifytime_end'
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){

@ -0,0 +1,285 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
<script src="__STATIC__/jquery.form.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<style>
.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;}
.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;
}
.tooltip {
position: relative;
/* display: block; */
/* color: #056dae; */
color: #056dae;
}
.tooltip .tooltiptext {
display: none;
width: 100%;
background-color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 10px 5px 5px;
position: absolute;
z-index: 1;
bottom: 80%;
left: 0;
border: #000 solid 1px;
line-height: 20px;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: black transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
color: #333;
display: block;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">复核账号</h3>
<p class="description_text">说明:可设置复核账号</p>
</div>
<div class="cf top_nav_list">
<div class="fl button_list">
<a class=" " href="{:U('add?model='.$model['id'])}"><span class="button_icon button_icon1"></span>新增</a>
<a style="background-image: none;border: none;margin-left: 30px;font-size: 16px;padding-right: 0;">当前账户余额:</a><a style="background-image: none;border: none;color: red">{$money}元</a>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th>姓名</th>
<th>手机号码</th>
<th><div class="tooltip">是否可打款<span class="tooltiptext"><span style="margin-left: -10px">仅admin账号支持打款</span></span></div></th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<if condition = "empty($data)">
<tr>
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td>{$data.name}</td>
<td>{$data.mobile}</td>
<td>{$data.is_payment_str}</td>
<td>
<if condition="$is_auth eq 1">
<a class='confirm' href="{:U('edit',array('id'=>$data['id']))}">编辑</a>
<if condition="$data.id neq 1">
<a class='del ' data-value="{$data.id}">删除</a>
</if>
</if>
</td>
</tr>
</volist>
</notemtpy>
</tbody>
</table>
</div>
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<!-- <a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a> -->
</if>
{$_page|default=''}
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">
';
</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script src="__STATIC__/laydate/laydate.js" type="text/javascript"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
<script type="text/javascript">
</script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('memberList')}");
function reload() {
window.location.reload();
}
$(function(){
//删除操作
$(".del").click(function () {
var id = $(this).data("value");
var url = "{:U('del')}"+"&id="+id
layer.confirm('<font style="color: black">是否确定删除该账号,删除后,该账号将无法登入。</font>', {
btn: ['确认','取消'],
title:false
}, function(){
$.ajax({
type:'post',
dataType:'json',
url:url,
success:function(data) {
layer.msg(data.msg);
if (data.status ==1) {
//弹框
setTimeout(function(){
window.location.reload();
},1500);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
// checkcode(mobile);
}
});
});
});
$(".viewPool").click(function () {
var id = $(this).data("id");
var url = "{:U('viewPool')}"+"&id="+id
layer.open({
type: 2,
title: "海南万盟天下科技有限公司",
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: url
});
});
$(".paymentInfo").on("click",function(){
var id = $(this).data("id");
var url = "{:U('paymentInfo')}"+"&id="+id
layer.open({
type: 2,
title: "打款详情",
shadeClose: true,
shade: 0.8,
area: ['20%', '60%'],
content: url
});
})
$("#search").click(function(){
var start = $("#time_start").val();
var end = $("#time_end").val();
if(start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
})
</script>
</block>

@ -1,5 +1,24 @@
<extend name="Public/base"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
@ -11,7 +30,17 @@
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.tabcon1711 table {
width: 480px;
}
@ -119,7 +148,7 @@
<td>{$vo.company_info.ali_user}</td>
<td>{$vo.company_info.ali_account}</td>
<td>{$vo.statement_num}</td>
<td>{$vo.statement_money}</td>
<td>{$vo.final_statement_money}</td>
<td>{$vo.remark}</td>
<td><input type="text" class="txt paymentset" data-id="{$vo.id}" data-pool="{$vo.pool_id}" name="remark" value="" placeholder="打款备注"></td>
</tr>
@ -159,9 +188,11 @@
</block>
<block name="script">
<script>
var DATA={};
var pay_status = 1;
// $("#creat_msg").show();
highlight_subnav("{:U('lists')}");
// highlight_subnav("{:U('lists')}");
var MSG={
showmsg:function(str){
@ -208,8 +239,13 @@
doPayment:function(callback){
var senddata = DATA.data[(DATA.now-1)];
console.log(senddata);
COMPARE.publiucAjax("{:U('doPayment')}",senddata,function(){
COMPARE.publiucAjax("{:U('doPayment')}",senddata,function(data){
MSG.showmsg("开始进行打款 ["+DATA.now+"/"+DATA.datacount+"] ......");
console.log(data);
if (data.status == 0) {
pay_status = 0;
}
DATA.now ++;
if( DATA.now > DATA.datacount){
callback();
@ -228,7 +264,8 @@
COMPARE.publiucAjax("{:U('poolCount')}",senddata,function(){
MSG.showmsg("打款结束,执行跳转中......");
setTimeout(function(){
window.location.href = "{:U('lists')}";
// window.location.href = "{:U('lists')}";
window.parent.closeLayer(pay_status);
},2000)
});
}

@ -111,59 +111,213 @@
<th>奖励</th>
<th>罚款</th>
<th>结算金额</th>
<th>开户名</th>
<th>银行卡号</th>
<th>开户支行</th>
<th>帐户类型</th>
<!-- <th>开户名</th>-->
<!-- <th>银行卡号</th>-->
<!-- <th>开户支行</th>-->
<!-- <th>帐户类型</th>-->
<th>支付宝用户</th>
<th>支付宝账号</th>
<th>备注</th>
</tr>
</thead>
<tbody id="statementShow">
<!-- <foreach name="data" item="com">-->
<!-- <tr>-->
<!-- <td rowspan="{$com.statement_count}">{$key-0+1}</td>-->
<!-- <td rowspan="{$com.statement_count}">{$com.company_name}</td>-->
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.account}</td>-->
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.company_relation_str}</td>-->
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.nickname}</td>-->
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.company_type_str}</td>-->
<!-- <td>{$com['statement_info'][0]['game_name']}</td>-->
<!-- <td>{$com['statement_info'][0]['game_type_name']}</td>-->
<!-- <td>{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}</td>-->
<!-- <td>{$com['statement_info'][0]['pay_amount']}</td>-->
<!-- <td>{$com['statement_info'][0]['ratio']|default=0}%</td>-->
<!-- <td>{$com['statement_info'][0]['increment_ratio']|default=0}%</td>-->
<!-- <td>{$com['statement_info'][0]['reward']}</td>-->
<!-- <td>{$com['statement_info'][0]['fine']}</td>-->
<!-- <td>{$com['statement_info'][0]['sum_money']}</td>-->
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.payee_name}</td>-->
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.bank_account}</td>-->
<!-- <td rowspan="{$com.statement_count}">{$com.company_info.opening_bank}</td>-->
<!-- <td rowspan="{$com.statement_count}"></td>-->
<!-- <td rowspan="{$com.statement_count}">{$com.remark}</td>-->
<!-- </tr>-->
<!-- <foreach name="com.statement_info" item="it" key="k">-->
<!-- <if condition="$k neq 0">-->
<!-- <tr>-->
<!-- <td>{$it['game_name']}</td>-->
<!-- <td>{$it['game_type_name']}</td>-->
<!-- <td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td>-->
<!-- <td>{$it['pay_amount']}</td>-->
<!-- <td>{$it['ratio']|default=0}%</td>-->
<!-- <td>{$it['increment_ratio']|default=0}%</td>-->
<!-- <td>{$it['reward']}</td>-->
<!-- <td>{$it['fine']}</td>-->
<!-- <td>{$it['sum_money']}</td>-->
<!-- </tr>-->
<!-- </if>-->
<!-- </foreach>-->
<!-- </foreach>-->
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.statement_count}">{$key-0+1}</td>
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.account}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.company_relation_str}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.nickname}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.company_type_str}</td>
<td>{$com['statement_info'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['game_type_name']}</td>
<td>{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['ratio']|default=0}%</td>
<td>{$com['statement_info'][0]['increment_ratio']|default=0}%</td>
<td>{$com['statement_info'][0]['reward']}</td>
<td>{$com['statement_info'][0]['fine']}</td>
<td>{$com['statement_info'][0]['sum_money']}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.payee_name}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.bank_account}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.opening_bank}</td>
<td rowspan="{$com.statement_count}"></td>
<td rowspan="{$com.statement_count}">{$com.remark}</td>
</tr>
<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_relation_str}</td>
<foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0">
<tr>
<td>{$it['game_name']}</td>
<td>{$it['game_type_name']}</td>
<td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td>
<td>{$it['pay_amount']}</td>
<td>{$it['ratio']|default=0}%</td>
<td>{$it['increment_ratio']|default=0}%</td>
<td>{$it['reward']}</td>
<td>{$it['fine']}</td>
<td>{$it['sum_money']}</td>
</tr>
<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 rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['time']}</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]['ratio']}%</td>
<td>{$com['statement_info'][0]['game_list'][0]['increment_ratio']}%</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['reward']||default="0"}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['fine']||default="0"}</td>
<td><span class="sum_money_span">{$com['statement_info'][0]['game_list'][0]['sum_money']}</span></td>
<else />
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</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>
<td rowspan="{$com.statement_count}"></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>-->
<!-- <td rowspan="{$com.row}"></td>-->
</if>
</foreach>
<td rowspan="{$com.row}">{$com.remark}</td>
</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><span class="pay_amount">{$game['pay_amount']}</span></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>
<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>
<notempty name="account['time']">
<td rowspan="{$account['time_row']}">{$account['time']|default="-----"}</td>
</notempty>
<td><span class="pay_amount">{$account['game_list'][0]['pay_amount']}</span></td>
<td>{$account['game_list'][0]['ratio']}%</td>
<td>{$account['game_list'][0]['increment_ratio']}%</td>
<notempty name="account['time']">
<td rowspan="{$account['time_row']}">{$account['reward']|default=0}</td>
<td rowspan="{$account['time_row']}">{$account['fine']|default=0}</td>
</notempty>
<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>
<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><span class="pay_amount">{$game['pay_amount']}</span></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=9 >合计:</td>
@ -177,8 +331,6 @@
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>

@ -207,7 +207,7 @@ $(function(){
<h3 class='no'><i class="icon icon-unfold"></i>账号管理</h3>
<ul class="side-sub-menu" style="display: none;">
<li>
<a class="item" href="{:U('Payment/transfer_set')}">复核账号</a>
<a class="item" href="{:U('Payment/memberList')}">复核账号</a>
</li>
<li>
<a class="item" href="{:U('User/index')}">制单账号</a>

@ -2718,10 +2718,43 @@ ADD COLUMN `auto_verify` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否需要审
ALTER TABLE `tab_company_game_ratio_log`
ADD COLUMN `company_belong` varchar(60) NOT NULL DEFAULT 0 COMMENT '工会归属0-内团 1-外团 2-分发联盟 3-无 4-下游聚合' AFTER `verify_log`;
ALTER TABLE `tab_company_statement_info`
ADD COLUMN `pay_verify_status` tinyint(255) NULL DEFAULT 0 COMMENT '审核状态 0 未审核 1 审核通过 2 审核拒绝' AFTER `withdraw_type`,
ADD COLUMN `verify_time` varchar(11) NULL DEFAULT 0 COMMENT '审核时间' AFTER `pay_verify_status`,
ADD COLUMN `verify_member_id` int(11) NULL DEFAULT 0 COMMENT '审核人员id' AFTER `verify_time`;
ALTER TABLE `tab_excel_statement_info`
ADD COLUMN `verify_status` tinyint(255) NULL DEFAULT 0 COMMENT '审核状态 0 未审核 1 审核通过 2 审核拒绝',
ADD COLUMN `verify_time` varchar(11) NULL DEFAULT 0 COMMENT '审核时间',
ADD COLUMN `verify_member_id` int(11) NULL DEFAULT 0 COMMENT '审核人员id';
ALTER TABLE `sj_game_channel`.`sj_cptogether_company`
MODIFY COLUMN `phone` varchar(20) NULL DEFAULT NULL COMMENT '联系电话' AFTER `connection_person`,
MODIFY COLUMN `register_phone` varchar(20) NULL DEFAULT NULL COMMENT '注册电话' AFTER `register_address`;
CREATE TABLE `sys_payment_member` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '姓名',
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '手机号码',
`is_payment` tinyint(2) NULL DEFAULT 0 COMMENT '是否可打款 否0是1',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_payment_member
-- ----------------------------
INSERT INTO `sys_payment_member` VALUES (1, '', '1990676517', 1);
INSERT INTO `sys_payment_member` VALUES (3, '关飞', '18859216458', 0);
INSERT INTO `sys_payment_member` VALUES (4, '测试正在', '16754678756', 0);
ALTER TABLE `tab_promote_company`
ADD COLUMN `is_site_custom` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否定制推广后台' AFTER `is_inside`;
ALTER TABLE `tab_promote_company`
ADD COLUMN `site_domain_prefix` varchar(20) NOT NULL DEFAULT '' COMMENT '推广后台域名前缀' AFTER `is_site_custom`;
ALTER TABLE `tab_promote_company`
ADD COLUMN `site_config` varchar(255) NOT NULL DEFAULT '' COMMENT '推广后台网站配置' AFTER `is_site_custom`;
ADD COLUMN `site_config` varchar(255) NOT NULL DEFAULT '' COMMENT '推广后台网站配置' AFTER `is_site_custom`;
ALTER TABLE `tab_testing_resource_batch`
ADD COLUMN `verify_admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '審核管理員ID' AFTER `verify_status`;
ALTER TABLE `tab_testing_resource_batch`
ADD COLUMN `apply_admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '申請管理員ID' AFTER `apply_promote_id`;

Loading…
Cancel
Save