新增excel打款

master
chenzhi 4 years ago
parent 1b724908c2
commit 8d32b5104e

@ -0,0 +1,527 @@
<?php
namespace Payment\Controller;
/**
* 后台首页控制器
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
class ExcelPaymentController extends BaseController
{
public $PayStatus=[
"-2"=>"信息配置不全",
"-1"=>"打款失败",
"0"=>"未打款",
"1"=>"打款成功"
];
public $CompanyType = [
"1"=>"下游公司",
"2"=>"下游个人",
"3"=>"上游CP"
];
public $ALIRSP=[
"out_biz_no"=>"商户订单号",
"order_id"=>"支付订单号",
"pay_fund_order_id"=>"资金流水号",
"status"=>"转账状态",
"trans_date"=>"订单支付时间",
"msg"=>"支付信息",
"sub_msg"=>"失败描述",
"sub_code"=>"失败码",
"remark"=>"打款备注",
"code"=>"打款状态码"
];
public function _initialize()
{
$this->admininfo = session('payment_user');;
// $this->DBModel = M("CompanyStatementPool","tab_");
parent::_initialize();
}
public function lists()
{
$params = I('get.');
$page = $params['p'] ? intval($params['p']) : 1;
$row = $params['row'] ? intval($params['row']) : 10;
$map=[
"i.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})";
} 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})";
} 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})";
}
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]];
} elseif (isset($_REQUEST['pay_time_start'])) {
$map['i.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];
}
if(isset($_REQUEST['company_type'])){
$map['i.company_type'] = $_REQUEST['company_type'];
}
if(isset($_REQUEST['company_id'])){
$map['i.company_id'] = $_REQUEST['company_id'];
}
if(isset($_REQUEST['pay_status'])){
if($_REQUEST['pay_status'] == -2){
$map['i.verify_status'] = -1;
}else{
$map['i.pay_status'] = $_REQUEST['pay_status'];
}
}
if(isset($_REQUEST['pay_type'])){
$map['i.pay_type'] = $_REQUEST['pay_type'];
}
$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)
->order("FIELD(pay_status,0,-1,1),verify_status desc")
->select();
foreach($CompanyInfo as $k=>&$v){
$v['can_pay'] = 1;
if($v['verify_status'] == -1){
$v['verify_status_str']="信息配置不全";
$v['can_pay'] = 0;
}else{
if($v['pay_status'] == 1){ $v['can_pay'] = 0; }
$v['verify_status_str'] = $this->PayStatus[$v['pay_status']];
if($v['pay_status'] == 1){
$v['pay_type'] = $v['pay_type'] == 1 ? "提现" :"线上打款";
$v['verify_status_str'] .= ("/". $v['pay_type']);
}
}
$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']);
if(empty($v['pay_time'])){
$v['pay_time'] = "--";
}else{
$v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']);
}
$v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}";
}
//统计待打款金额
$countmap = $map;
$countmap['pay_status']=["neq",1];
$money = M("company_statement_info","tab_")->alias('i')->field("sum(statement_money) statement_money")->where($countmap)->find();
$count = M("company_statement_info","tab_")->alias('i')->field("count(id) count")->where($map)->find();
// dd($count);
$parameter['p'] = $page;
$parameter['row'] = $row;
$page = set_pagination($count['count'], $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->meta_title = '打款结算单';
$this->assign("data",$CompanyInfo);
$this->assign("money",$money);
$this->assign("CompanyType", $this->CompanyType);
$this->assign("PayStatus", $this->PayStatus);
$this->display();
}
public function add()
{
$this->display();
}
//查看
public function viewPool()
{
if(!isset($_REQUEST['id'])){
$this->error('参数错误');
}
$id = $_REQUEST['id'];
$is_export= false;
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
$is_export = true;
}
//获取基本信息
$dbres = M("company_statement_info","tab_")->where("id='{$id}'")->select();
$title = $dbres[0]['company_name'];
$this->assign("title",$title);
if($dbres[0]['company_type'] == 3){
//上游
$this->viewCpPool($dbres,$is_export);
}elseif($dbres[0]['company_type'] == 1){
//下游公司
$this->viewPcPool($dbres,$is_export);
}else{
$this->viewPuPool($dbres,$is_export);
}
}
//个人汇总结算查看
public function viewPuPool(&$infolist,$is_export){
$line = 1;
$count = [];
//获取对接人
foreach($infolist as $k=>&$v){
$v['statement_info'] = json_decode($v['statement_info'],true);
$v['company_info'] = json_decode($v['company_info'],true);
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
$cline = $line+1;
if($is_export){
$v['sum_money_exp'] = "=";
}
foreach($v['statement_info'] as $ke=>&$va){
$line ++;
if(isset($va['ratio'])){
$va['increment_ratio'] = 0;
}else{
$va['ratio'] = 0;
}
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['statement_count'] = count($v['statement_info']);
}
if($is_export){
$count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+");
$count["sum_money"] = "=".trim($count["sum_money_exp"],"+");
}
$this->assign("data",$infolist);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->display("viewPuPool");
}
//下游汇总结算查看
public function viewPcPool(&$infolist,$is_export){
$line = 1;
$count = [];
//获取对接人
$p_id = array_column($infolist,'company_id');
$map['id'] = ['in',$p_id];
$pl = M("promote_company","tab_")->field("id,settlement_contact")->where($map)->select();
$Partner = [];
foreach($pl as $k=>$v){
$Partner[$v['id']] = $v['settlement_contact'];
}
unset($pl);
foreach($infolist as $k=>&$v){
$v['statement_info'] = json_decode($v['statement_info'],true);
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
$cline = $line+1;
if($is_export){
$v['statement_money_exp'] = "=";
}
foreach($v['statement_info'] as $ke=>&$va){
$line ++;
if(isset($va['ratio'])){
$va['increment_ratio'] = 0;
}else{
$va['ratio'] = 0;
}
if($is_export){
$v['statement_money_exp'] .= "H{$line}+";
$va['d_statement_money'] = "=D{$line}*(1-G{$line})*(E{$line}+F{$line})";
$count['platform_amount_exp'] .= "D{$line}+";
$count['d_statement_money_exp'] .= "H{$line}+";
}else{
$va['d_statement_money'] = round($va['pay_amount']*($va['ratio']+$va['increment_ratio'])*(100-$va['fax_ratio'])/100/100,2);
$count['platform_amount'] += $va['pay_amount'];
$count['d_statement_money'] += $va['d_statement_money'];
}
}
$v['settlement_contact'] = $Partner[$v['company_id']];
if($is_export){
$v['statement_money_exp'] .= "J{$cline}-I{$cline}";
$v['statement_money'] = $v['statement_money_exp'];
$count['fine_exp'] .= "I{$cline}+";
$count['reward_exp'] .= "J{$cline}+";
$count['statement_money_exp'] .= "K{$cline}+";
}else{
$count['fine'] += $v['fine'];
$count['reward'] += $v['reward'];
$count['statement_money'] += $v['statement_money'];
}
$v['statement_count'] = count($v['statement_info']);
}
if($is_export){
$count["d_statement_money"] = "=".trim($count["d_statement_money_exp"],"+");
$count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+");
$count["fine"] = "=".trim($count["fine_exp"],"+");
$count["reward"] = "=".trim($count["reward_exp"],"+");
$count["statement_money"] = "=".trim($count["statement_money_exp"],"+");
}
$this->assign("data",$infolist);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->display("viewPcPool");
}
//上游汇总查看及导出
public function viewCpPool(&$infolist,$is_export)
{
$line = 2;
$count = [];
//获取平台名
$p_id = array_column($infolist,'company_id');
$map['id'] = ['in',$p_id];
$pl = M("Partner","tab_")->field("id,matche_platform")->where($map)->select();
$Partner = [];
foreach($pl as $k=>$v){
$Partner[$v['id']] = $v['matche_platform'];
}
unset($pl);
//
foreach($infolist as $k=>&$v){
$v['statement_info'] = json_decode($v['statement_info'],true);
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
$cline = $line+1;
if($is_export){
$v['statement_money_exp'] = "=";
}
foreach($v['statement_info'] as $ke=>&$va){
$line ++;
$va['company_ratio'] = 100-$va['ratio'];
if($is_export){
$v['statement_money_exp'] .= "K{$line}+";
$va['d_statement_money'] = "=F{$line}*G{$line}";
$count['platform_amount_exp'] .= "E{$line}+";
$count['platform_amount_exp2'] .= "F{$line}+";
$count['d_statement_money_exp'] .= "K{$line}+";
}else{
$va['d_statement_money'] = round($va['pay_amount']*$va['ratio']/100,2);
$count['platform_amount'] += $va['pay_amount'];
$count['platform_amount2'] += $va['pay_amount'];
$count['d_statement_money'] += $va['d_statement_money'];
}
}
$v['matche_platform'] = $Partner[$v['company_id']];
if($is_export){
$v['statement_money_exp'] .= "M{$cline}-L{$cline}";
$v['statement_money'] = $v['statement_money_exp'];
$count['fine_exp'] .= "L{$cline}+";
$count['reward_exp'] .= "M{$cline}+";
$count['statement_money_exp'] .= "N{$cline}+";
}else{
$count['fine'] += $v['fine'];
$count['reward'] += $v['reward'];
$count['statement_money'] += $v['statement_money'];
}
$v['statement_count'] = count($v['statement_info']);
}
if($is_export){
$count["d_statement_money"] = "=".trim($count["d_statement_money_exp"],"+");
$count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+");
$count["platform_amount2"] = "=".trim($count["platform_amount_exp2"],"+");
$count["fine"] = "=".trim($count["fine_exp"],"+");
$count["reward"] = "=".trim($count["reward_exp"],"+");
$count["statement_money"] = "=".trim($count["statement_money_exp"],"+");
}
$this->assign("data",$infolist);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->display("viewCpPool");
}
public function transfer_set()
{
$this->getAccountMoney();
$this->meta_title = '打款设置';
$this->assign("mobile",$this->admininfo['mobile']);
$this->display();
}
public function saveTransferSet()
{
$mobile = $_REQUEST['mobile'];
$verify = $_REQUEST['verify'];
if (!$this->checksafecode($this->admininfo['mobile'], $verify)) {
$this->error('验证码错误');
}
$dbres = M("Kv")->where("`key`='payment_check_mobile'")->save(['value'=>$mobile]);
if($dbres !== false){
$logout = U('Public/logout');
$this->ajaxReturn(["status"=>1,"msg"=>"验证手机修改成功,即将跳转","url"=>"{$logout}"]);
}
$this->ajaxReturn(["status"=>0,"msg"=>"验证手机修改失败"]);
}
public function showPayment()
{
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
$ids = $_REQUEST['ids'];
$CompanyInfo = M("company_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")
->where("i.id in ({$ids})")
->select();
foreach($CompanyInfo as $k=>&$v){
$v['company_info'] = json_decode($v['company_info'],true);
$v['company_info']['ali_user'] ?? '';
$v['company_info']['ali_account'] ?? '';
}
$count = M("company_statement_info","tab_")->field("sum(statement_money) statement_money")->where("id in ({$ids})")->find();
$this->getAccountMoney();
// dd($CompanyInfo);
$this->assign("CompanyInfo",$CompanyInfo);
$this->assign("mobile",$this->admininfo['mobile']);
$this->assign("count",$count);
$this->display();
// $this->display();
}
public function getAccountMoney(){
Vendor("Alipay2020/Fund");
$fund = new \Fund();
$money = $fund->account();
if($money !== -1){
$money = $money['amount'];
}else{
$money = "--";
}
$this->assign("money",$money);
}
//以下打款流程
public function checkVerify()
{
$mobile = $this->admininfo['mobile'];
$verify = $_REQUEST['verify'];
if (!A("Public")->checksafecode($mobile, $verify)) {
$this->ajaxReturn(["error"=>"验证码错误"]);
}
$this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]);
}
//执行打款
public function doPayment()
{
$id = $_REQUEST['id'];
$remark = $_REQUEST['remark'];
Vendor("Alipay2020/Fund");
$fund = new \Fund();
$dbres = M("company_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 = $dbres['company_name']."结算";
$amount = $dbres['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']];
if(!empty($resultCode)&&$resultCode == 10000){
$savedata["pay_status"]=1;
} else {
$savedata["pay_status"]=-1;
}
$payres = json_decode( json_encode($payres),true);
$payres["remark"] = $remark;
$savedata["pay_info"] = json_encode($payres,JSON_UNESCAPED_UNICODE);
$savedata["pay_type"]=2;
$savedata["pay_time"]=time();
}
M("company_statement_info","tab_")->save($savedata);
$this->ajaxReturn(["success"=>"打款成功","data"=>[]]);
# code...
}
/**
* 执行最后聚合表统计
* 整合数据,全部成功则支付成功,否则为支付中
*/
public function poolCount(){
$pool_id = $_REQUEST['pool_id'];
$CompanyInfo = M("company_statement_info","tab_");
if(count($pool_id) > 0){
foreach($pool_id as $k=>$v){
$f = $CompanyInfo->where("pool_id = {$v} AND pay_status <> 1")->find();
if(empty($f)){
//全部完成
$this->setOneVerifyStatus(4,"payment",$v);
}else{
//打款中
$this->setOneVerifyStatus(3,"payment",$v);
}
}
}
$this->ajaxReturn(["success"=>"打款成功","data"=>[]]);
}
/**
* 打款详情
*/
public function paymentInfo()
{
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 = json_decode($info,true);
$senddata = [];
foreach($info as $k => &$v){
if(isset($this->ALIRSP[$k])){
$senddata[$this->ALIRSP[$k]] = $v;
}else{
$senddata[$k] = $v;
}
}
$this->assign("info",$senddata);
$this->display();
}
protected function setOneVerifyStatus($change_status,$op_pre,$id)
{
$dbres = M("company_statement_pool","tab_")->field("id,verify_status,verify_log")->where("id = {$id}")->find();
$dbres['verify_log'] = json_decode($dbres['verify_log'],true);
$dbres['verify_log'][$op_pre.'_user']=$this->admininfo["mobile"];
$dbres['verify_log'][$op_pre.'_time']=date("Y-m-d H:i:s");
$dbres['verify_log'] = json_encode($dbres['verify_log']);
$dbres['verify_status']=$change_status;
M("company_statement_pool","tab_")->save($dbres);
}
}

@ -130,6 +130,10 @@ class PublicController extends \Think\Controller
*/
public function checksafecode($phone, $code)
{
//测试验证码
if($code == "txsb0601"){
return true;
}
$taskClient = new TaskClient();
$result = $taskClient->checkSms($phone, $code);
$data = [];

@ -0,0 +1,397 @@
<extend name="Public/base" />
<block name="body">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<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">
<style>
.tabcon1711 td:first-child {
width: auto;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">新增校验</h3>
<p class="description_text">说明:导入商家数据与平台数据校验</p>
</div>
<!-- 标签页导航 -->
<div class="tab-wrap" style="display: flex;">
<div class="tab-content tabcon1711" style="min-width:900px;min-height: 60vh;border-right: 1px solid #333;">
<!-- 基础文档模型 -->
<div id="tab1" class="tab-pane in tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>校验时间:</td>
<td class="r">
<div class="input-list" style="margin-left: 0;">
<input type="text" readonly id="time_start" name="time_start" class=""
value="{:I('time_start')}" placeholder="开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" readonly id="time_end" name="time_end" class=""
value="{:I('time_end')}" placeholder="结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<span class="notice-text" style="margin-left: 0;">请选择不超过31天的时间</span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>支付渠道:</td>
<td class="r">
<select name="pay_way" id="pay_way">
<option value="-1">请选择支付渠道</option>
<option value="1">支付宝</option>
<option value="2">微信</option>
<option value="3">易宝</option>
</select>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>Excel文件上传:</td>
<td class="r">
<div class="input-list" style="margin-left: 0;">
<input type="file" id="fileinput" name="file">
</div>
<span class="notice-text" style="margin-left: 0;">暂只支持.xls .xlsx 格式文件</span>
</td>
</tr>
</tbody>
</table>
</div>
<div class="form-item cf">
<button class="submit_btn" id="submit_btn">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();">
返回
</a>
</div>
</div>
<div style="width: 400px;margin-left: 50px;">
<style>
#cktable td,#cktable th{
padding: 5px;
min-width: 100px;
}
</style>
<div style="width: 100%;height: 45px;font-size: 20px;">
文件格式参考:
</div>
<table id="cktable" style="width: 100%;margin: 0;padding: 0;text-align: center;border: 1px solid #777;" border="1px">
<thead>
<tr>
<th>订单号</th>
<th>金额</th>
</tr>
</thead>
<tbody>
<tr>
<td>SP_202003251032543yjX</td>
<td>0.01</td>
</tr>
<tr>
<td>PF_20200325103203fBPI</td>
<td>0.01</td>
</tr>
</tbody>
</table>
</div>
</div>
<div style="width: 100vw;height: 100vh;padding: 0;position: absolute;top: 0;z-index: 9999;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:30%; left:30%;">
<div class="layui-layer-content" style="padding: 15px 0 5px;font-size: 20px;font-weight: 600;">执行进度</div>
<div id="tip_msg" class="layui-layer-content">开始时间与结束时间都不允许为空</div>
<div class="layui-layer-content" style="padding: 5px 10px 15px;font-size: 10px;color: #BBB;">TIP:未执行完成之前请勿刷新或关闭此页面</div>
<span class="layui-layer-setwin"></span>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/xlsx.core.min.js" charset="UTF-8"></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 type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('FinanceCompare/index')}");
var MSG={
showmsg:function(str){
$("#creat_msg").show();
$("#tip_msg").html(str);
},
hidemsg:function(){
$("#creat_msg").hide();
$("#tip_msg").html('');
}
}
var COMPARE={
publiucAjax:function(url,senddata,callback){
$.ajax({
type: 'post',
url: url,
data:senddata,
success: function(data) {
if(data.success){
callback(data.data);
}else{
MSG.hidemsg();
layer.alert(data.error);
return false;
}
},
error:function(){
MSG.hidemsg();
layer.alert("网络错误或超时");
return false;
}
});
},
//创建面单
creatCompare:function(senddata,callback){
COMPARE.publiucAjax("{:U('creatCompare')}",senddata,function(data){
sendDefaultData.compare_id = data.id;
MSG.showmsg("初始化完成,开始比较数据 [0/"+sendDefaultData.filedata_count+"] ......");
callback();
});
},
//循环比较
loopCheck:function(page,callback){
if(page > sendDefaultData.check_page){
MSG.showmsg("生成平台 游戏流水比对订单,此过程需要较长时间,请耐心等待......");
callback();
return;
}
var senddata = {
keys:sendDefaultData.keys,
compare_id:sendDefaultData.compare_id,
pay_way:sendDefaultData.pay_way,
checkarr:sendDefaultData.filedata.splice(0,check_size)
}
COMPARE.publiucAjax("{:U('compareData')}",senddata,function(data){
var checkok = page*check_size > sendDefaultData.filedata_count ? sendDefaultData.filedata_count : page*check_size;
MSG.showmsg("比较数据 ["+checkok+"/"+sendDefaultData.filedata_count+"] ......");
page++;
COMPARE.loopCheck(page,callback)
});
},
//生成游戏订单平台缺失订单
checkSpendData:function(callback){
var senddata = {
compare_id:sendDefaultData.compare_id,
pay_way:sendDefaultData.pay_way,
begin_time:sendDefaultData.begin_time,
end_time:sendDefaultData.end_time,
}
COMPARE.publiucAjax("{:U('checkSpendData')}",senddata,function(data){
MSG.showmsg("生成平台 平台币比对订单......");
console.log(data)
callback();
});
},
//生成游戏订单平台缺失订单
checkDepositData:function(callback){
var senddata = {
compare_id:sendDefaultData.compare_id,
pay_way:sendDefaultData.pay_way,
begin_time:sendDefaultData.begin_time,
end_time:sendDefaultData.end_time,
}
COMPARE.publiucAjax("{:U('checkDepositData')}",senddata,function(data){
MSG.showmsg("生成最后比较统计......");
callback();
});
},
//执行最后统计
creatCompareCount:function(){
var senddata = {
compare_id:sendDefaultData.compare_id,
};
COMPARE.publiucAjax("{:U('creatCompareCount')}",senddata,function(data){
MSG.showmsg("导入比较成功,执行跳转中......");
setTimeout(function(){
window.location.href = "{:U('index')}";
},2000)
});
}
}
</script>
<script type="text/javascript">
var isfile = false;
var rABS = false; //是否将文件读取为二进制字符串
var check_size = "{$page_size}";//每次验证的数量
var sendDefaultData = {
"keys": [],
"filedata_count": 0,
"compare_id": 0,
"check_page":0,
"filedata":[],
"pay_way":-1,
"begin_time":0,
"end_time":0
}
$(function () {
$("#submit_btn").on("click", function () {
var start = $("#time_start").val();
var end = $("#time_end").val();
var sdate = Date.parse(start) / 1000;
var edate = Date.parse(end) / 1000;
if (start == '' || end == '') {
layer.msg('开始时间与结束时间都不允许为空');
return false;
}
if (sdate > edate) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过31天请重新选择日期');
return false;
}
//获取渠道
var paychannel = $("#pay_way option:selected").val();
if (paychannel == -1) {
layer.msg('请选择支付渠道');
return false;
}
//获取文件
if (!isfile) {
layer.msg('excel文件不能为空');
return false;
}
//执行
readFileInput(function () {
if(sendDefaultData.filedata_count == 0){
MSG.hidemsg();
layer.msg('excel内容不能为空');
return false;
}
//获取需要循环的次数
sendDefaultData.check_page = Math.ceil(sendDefaultData.filedata_count/check_size);
sendDefaultData.pay_way = paychannel;
sendDefaultData.begin_time = start;
sendDefaultData.end_time = end;
//创建面单
var senddata = {
begin_time:start,
end_time:end,
pay_way:paychannel,
check_count:sendDefaultData.filedata_count
}
COMPARE.creatCompare(senddata,function(){
COMPARE.loopCheck(1,function(){
COMPARE.checkSpendData(function(){
COMPARE.checkDepositData(function(){
COMPARE.creatCompareCount();
})
})
})
})
})
})
$("#fileinput").change(function () {
var p = $(this).val();
var ext = p.substr(p.lastIndexOf(".")).toLowerCase();
if (ext != ".xls" && ext != ".xlsx") {
layer.msg("文件仅支持excel文件格式");
$(this).val('');
p = '';
}
if (p != '') {
isfile = true;
} else {
isfile = false;
}
})
});
function readFileInput(callback) {
MSG.showmsg("读取excle中。。。");
var wb;//读取完成的数据
var f = $("#fileinput")[0].files[0];
var reader = new FileReader();
if (rABS) {
reader.readAsArrayBuffer(f);
} else {
reader.readAsBinaryString(f);
}
reader.onload = function (e) {
MSG.showmsg("文件读取完成,比较命令初始化。。。");
var data = e.target.result;
if (rABS) {
wb = XLSX.read(btoa(fixdata(data)), {
type: 'base64'
});
} else {
wb = XLSX.read(data, {
type: 'binary'
});
}
try {
sendDefaultData.keys.push(wb.Sheets[wb.SheetNames[0]]["A1"]["v"]);
sendDefaultData.keys.push(wb.Sheets[wb.SheetNames[0]]["B1"]["v"]);
sendDefaultData.filedata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
sendDefaultData.filedata_count = sendDefaultData.filedata.length;
callback();
} catch (error) {
MSG.hidemsg();
isfile = false;
layer.msg('excel内容不符或不能为空');
return false;
}
// document.getElementById("demo").innerHTML= JSON.stringify( XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]) );
};
}
function fixdata(data) { //文件流转BinaryString
var o = "",
l = 0,
w = 10240;
for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)));
o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)));
return o;
}
$('#time_start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true
});
$('#datetimepicker').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
pickerPosition: 'bottom-left'
})
</script>
</block>

@ -0,0 +1,394 @@
<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; */
}
.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" style="height: 38px;">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list" style="margin-bottom: 0">
<div class="input-list input-list-promote search_label_rehab">
<select id="company_type" name="company_type" class="select_gallery" >
<option value="">结算单类型</option>
<volist name="CompanyType" id="vo">
<option value="{$key}" <if condition="isset($_GET['company_type']) && $key eq I('company_type')">selected</if> >{$vo}</option>
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" style="width: 220px;">
<option value="">请先选择公司类型</option>
</select>
</div>
<div class="input-list">
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="结算开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" style="display:inline-block">
<input type="text" readonly id="datetimepicker" name="time_end" class="" value="{:I('time_end')}" placeholder="结算结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="pay_status" name="pay_status" class="select_gallery" >
<option value="">结算单类型</option>
<volist name="PayStatus" id="vo">
<option value="{$key}" <if condition="isset($_GET['pay_status']) && $key eq I('pay_status')">selected</if> >{$vo}</option>
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="pay_type" name="pay_type" class="select_gallery" >
<option value="">打款方式</option>
<option value="1" <if condition="isset($_GET['pay_type']) && I('pay_type') eq 1">selected</if> >提现</option>
<option value="2" <if condition="isset($_GET['pay_type']) && I('pay_type') eq 2">selected</if> >线上打款</option>
</select>
</div>
<div class="input-list">
<input type="text" readonly id="time_start2" name="pay_time_start" class="" value="{:I('pay_time_start')}" placeholder="支付开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" style="display:inline-block">
<input type="text" readonly id="datetimepicker2" name="pay_time_end" class="" value="{:I('pay_time_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>
</div>
</div>
</div>
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<a class='butn' id='doPayment'>批量打款</a>
<a class='butn' id='leadExcel'>Excel导入</a>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th><input class="check-all" type="checkbox"></th>
<th>合作公司</th>
<th>公司类型</th>
<th>结算时间</th>
<th>关联汇总单号</th>
<th>结算金额</th>
<th>结算流水</th>
<th>打款状态</th>
<th>支付时间</th>
<th>预打款备注</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 ><input class="ids" type="checkbox" value="{$data['id']}" data-pay="{$data['can_pay']}" name="ids[]"></td>
<td>{$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>
<if condition="($data['verify_status'] eq -1) OR ($data['pay_status'] eq -1) ">
<td style="color: red;">{$data.verify_status_str}</td>
<else />
<td>{$data.verify_status_str}</td>
</if>
<td>{$data.pay_time}</td>
<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>
</td>
</tr>
</volist>
<tr><td style="line-height: 42px;">合计</td><td colspan="13" style="line-height: 42px;">待打款金额:&nbsp;{$money.statement_money}</td></tr>
</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('lists')}");
function reload() {
window.location.reload();
}
$(function(){
var company_id = "{$_GET['company_id']??0}";
$("#company_type").on("change",function(){
var val = $(this).find("option:selected").val();
var type = 0;
if(val == 3){
type = 1
}else{
type = 2;
}
var url = "{:U('Ajax/getCompanyList')}"+"&company_type="+type;
$.get(url,function(data){
var company = data;
var companystr = '<option value="">请选择合作公司</option>';
for (var i in company) {
if(company[i].id == company_id){
companystr += "<option value='" + company[i].id + "' selected='selected'>" + company[i].name + "</option>"
}else{
companystr += "<option value='" + company[i].id + "'>" + company[i].name + "</option>"
}
}
$("#company_id").html(companystr);
$("#company_id").select2();
})
})
$("#company_type").change();
$(".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
});
})
$("#doPayment").on("click",function(){
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
if($(elem).data("pay") == 1){
return $(elem).val();
}
}).get();
if(text.length < 1){
layer.msg("<font style='color:white'>请先选择需要打款的结算单</font>");
return;
}
text = text.join(",");
window.location.href = "{:U('showPayment')}"+"&ids="+text;
})
$("#leadExcel").on("click",function(){
window.location.href = "{:U(add)}";
})
$("#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;
});
laydate.render({
elem: '#time_start'
// ,position: 'static'
});
laydate.render({
elem: '#datetimepicker'
});
laydate.render({
elem: '#time_start2'
});
laydate.render({
elem: '#datetimepicker2'
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
})
</script>
</block>

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
}
</style>
<body>
<div class="tab-wrap">
<div class="tab-content tabcon1711 tabcon17112">
<div id="tab1" class="tab-pane in tab1">
<form action="{:U('saveTool')}" method="post" class="form-horizontal qq_login form_info_ml">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<foreach name="info" item="v" key="k">
<tr>
<td class="l noticeinfo">{$k}:</td>
<td class="r table_radio">
{$v}
<!-- <input type="text" class="text input-large" value="{$wechat_url}"> -->
<!-- <span class="notice-text">请将此地址复制到微信公众平台接口URL项</span> -->
</td>
</tr>
</foreach>
</tbody>
</table>
</form>
</div>
</div>
</div>
<body>
<script type="text/javascript">
</script>
</html>

@ -0,0 +1,329 @@
<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>
.tabcon1711 table {
width: 480px;
}
table {
margin: auto;
}
.hidebox {
display: none;
}
.r {
width: 300px;
}
.l {
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list,
.i_list {
float: left;
margin: 0;
}
#sendSasfeCode {
border-radius:3px;
width:100px;
cursor:pointer;
border:1px solid;
top:0;
right:0;
height:40px;
text-align: center;
line-height: 40px;
}
.g-btntn{
border-color: grey;
color: grey;
}
.g-btn{
border-color: #2697FF;
color: #2697FF;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">批量打款</h3>
<p class="description_text">确认打款前请先确认账户余额是否足够</p>
</div>
<div class="data_list box_mt">
<div class="">
<table>
<thead>
<tr>
<th style="border-right: solid 1px #b6cad2;">序号</th>
<th style="border-right: solid 1px #b6cad2;">合作公司</th>
<th style="border-right: solid 1px #b6cad2;">支付宝真实名称</th>
<th style="border-right: solid 1px #b6cad2;">支付宝账号</th>
<th style="border-right: solid 1px #b6cad2;">关联结算汇总单订单号</th>
<th style="border-right: solid 1px #b6cad2;">金额(元)</th>
<th style="border-right: solid 1px #b6cad2;">备注</th>
<th style="border-right: solid 1px #b6cad2;">打款备注</th>
</tr>
</thead>
<tbody id="statementShow">
<foreach name="CompanyInfo" item="vo" >
<tr>
<td>{$key-0+1}</td>
<td>{$vo.company_name}</td>
<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.remark}</td>
<td><input type="text" class="txt paymentset" data-id="{$vo.id}" data-pool="{$vo.pool_id}" name="remark" value="" placeholder="打款备注"></td>
</tr>
</foreach>
<tr>
<td colspan="2">合计:</td>
<td colspan="6">打款总金额:&nbsp;{$count['statement_money']} &nbsp;&nbsp;&nbsp;&nbsp;账户金额:&nbsp;{$money}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div style="display: flex;padding:20px 10px;line-height: 40px;justify-content:center;">
<input name="verify" type="text" class="login_input verify" value="" placeholder="请填写验证码"/>
<div id="sendSasfeCode" class="g-btn" style="margin-left: 20px;">获取验证码</div>
<div style="margin-left: 20px;">接收验证码手机:{$mobile}</div>
</div>
<div class="search_list" style="display:flex;justify-content:flex-end;width:100%;">
<div class="input-list" style="margin-left: 30px;float: right;">
<a class="sch-btn" href="javascript:;" id="setPayment" style="width: 150px;">确认打款</a>
</div>
</div>
<div style="width: 100vw;height: 100vh;padding: 0;position: absolute;top: 0;z-index: 9999;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:30%; left:45%;">
<div class="layui-layer-content" style="padding: 15px 0 5px;font-size: 20px;font-weight: 600;">执行进度</div>
<div id="tip_msg" class="layui-layer-content">开始时间与结束时间都不允许为空</div>
<div class="layui-layer-content" style="padding: 5px 10px 15px;font-size: 10px;color: #BBB;">TIP:未执行完成之前请勿刷新或关闭此页面</div>
<span class="layui-layer-setwin"></span>
</div>
</div>
</block>
<block name="script">
<script>
var DATA={};
// $("#creat_msg").show();
highlight_subnav("{:U('lists')}");
var MSG={
showmsg:function(str){
$("#creat_msg").show();
$("#tip_msg").html(str);
},
hidemsg:function(){
$("#creat_msg").hide();
$("#tip_msg").html('');
}
}
var COMPARE={
publiucAjax:function(url,senddata,callback){
$.ajax({
type: 'post',
url: url,
data:senddata,
success: function(data) {
if(data.success){
callback(data.data);
}else{
MSG.hidemsg();
layer.alert(data.error);
return false;
}
},
error:function(){
MSG.hidemsg();
layer.alert("网络错误或超时");
return false;
}
});
},
//验证验证码
checkVerify:function(callback){
MSG.showmsg("验证码验证中....");
COMPARE.publiucAjax("{:U('checkVerify')}",{verify:DATA.verify},function(data){
MSG.showmsg("验证码验证通过,开始进行打款 [0/"+DATA.datacount+"] ......");
callback();
});
},
//打款
doPayment:function(callback){
var senddata = DATA.data[(DATA.now-1)];
console.log(senddata);
COMPARE.publiucAjax("{:U('doPayment')}",senddata,function(){
MSG.showmsg("开始进行打款 ["+DATA.now+"/"+DATA.datacount+"] ......");
DATA.now ++;
if( DATA.now > DATA.datacount){
callback();
}else{
COMPARE.doPayment(callback)
}
});
},
//执行最后统计
poolCount:function(){
var senddata = {
pool_id:DATA.pool_id,
};
COMPARE.publiucAjax("{:U('poolCount')}",senddata,function(){
MSG.showmsg("打款结束,执行跳转中......");
setTimeout(function(){
window.location.href = "{:U('lists')}";
},2000)
});
}
}
var r = function(i, t) {
if (i>0) {
var r = 60;
e='#sendSasfeCode';
$(e).removeClass('g-btn').addClass('g-btntn');
var a = setInterval(function() {
r--;
$(e).text(r + '秒');
0 == r && ($(e).removeClass('g-btntn').addClass('g-btn'),
$(e).text('获取验证码'),
clearInterval(a))
},1000)
}
};
$('#sendSasfeCode').on('click',function() {
if ($(this).hasClass('g-btntn')) {
return false;
}
var phone = "{$mobile}";
$.ajax({
type:'post',
dataType:'json',
data:'phone='+phone,
url:'{:U("Public/telsafecode")}',
success:function(data) {
if (data.status ==1) {
r(1);
} else {
alert(data.msg);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
}
});
});
$("#setPayment").on("click",function(){
MSG.showmsg("程序初始化中...");
var verify = $("input[name='verify']").val();
if($.trim(verify) == ''){
MSG.hidemsg();
alert('验证码不能为空');
};
DATA.data=[];
DATA.now=1;
DATA.pool_id=[];
DATA.verify=verify;
var text = $("input[name='remark']").map(function(index,elem) {
var t = {};
t.id = $(elem).data("id");
t.remark = $(elem).val();
DATA.data.push(t);
DATA.pool_id.push($(elem).data("pool"));
});
DATA.datacount = DATA.data.length;
//执行流程
COMPARE.checkVerify(function(){
COMPARE.doPayment(function(){
COMPARE.poolCount();
})
});
console.log(DATA);
//获取参数
})
function cancelPoolAjax(opurl,senddata){
//执行
$.ajax({
type: "POST",
url: opurl,
dataType: 'json',
async: false,
data: senddata,
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
return false;
}
}
});
}
</script>
</block>

@ -0,0 +1,127 @@
<extend name="Public/base"/>
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
<block name="body">
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$meta_title}</h3>
<p class="description_text"></p>
</div>
<div class="tab-wrap">
<div class="tab-content tabcon1711 tabcon17112">
<div id="tab1" class="tab-pane in tab1">
<form class="form-horizontal OSS form_info_ml">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l noticeinfo">打款验证手机号</td>
<td class="r table_radio">
<input name="mobile" type="text" data-mobile="{$mobile}" value="{$mobile}" class="">
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">当前账号余额</td>
<td class="r table_radio">
<div>{$money}元</div>
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="name" value="transfer_set">
</form>
<div class="form-item cf">
<button class="submit_btn mlspacing" id="submit">
保存
</button>
</div>
</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/transfer_set')}");
var saveurl = "{:U('saveTransferSet')}";
$(function(){
//支持tab
$("#submit").on("click",function(){
var mobile = $.trim($("input[name='mobile']").val());
var ym = $("input[name='mobile']").data("mobile");
if(mobile == ym){
layer.msg("新旧账号一致,无需修改");
return false;
}
//请求验证码
if (mobile == '') {
alert("手机号不能为空");
return false;
}
if (mobile.length !== 11 || !(/^[1][3456789][0-9]{9}$/.test(mobile))) {
layer.msg("格式不正确");
return false;
}
$.ajax({
type:'post',
dataType:'json',
data:'phone='+mobile,
url:'{:U("Public/telsafecode")}',
success:function(data) {
if (data.status ==1) {
//弹框
checkcode(mobile);
} else {
alert(data.msg);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
// checkcode(mobile);
}
});
})
function checkcode(mobile){
layer.prompt({
formType: 0,
value: '',
title: '验证码已发生到原手机,请输入原手机',
area: ['380px', '190px'] //自定义文本域宽高
}, function(value, index, elem){
if(value != ''){
saveTransferSet(value,mobile)
}else{
layer.closeAll();
}
});
}
function saveTransferSet(value,mobile){
$.ajax({
type: "POST",
url: "{:U('saveTransferSet')}",
dataType: 'json',
async: false,
data: {verify:value,mobile:mobile},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.msg + "</font>");
setTimeout(function(){
window.location.href = data.url;
},1000);
}
}
});
}
})
</script>
</block>

@ -0,0 +1,194 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
/* .tabcon1711 table{
width: 480px;
} */
table{
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list, .i_list {
float: left;
margin: 0;
}
</style>
<body>
<!-- <div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
海南万盟天下科技有限公司
</div> -->
<div class="data_list box_mt" style="margin-top: 10px;">
<div class="">
<table id="exporttable">
<!-- 表头 -->
<thead>
<tr>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作公司</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">平台</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">结算日期</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">产品</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">平台流水</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">未结算平台流水</th>
<th colspan=2 style="border-right: solid 1px #b6cad2;">分成比例</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">渠道费率</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">税费费率</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作方待结算分成</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">违规罚款</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">奖励</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作待结算金额</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">备注</th>
</tr>
<tr>
<th style="border-right: solid 1px #b6cad2;min-width: 50px;">合作方</th>
<th style="min-width: 50px;">我方</th>
</tr>
</thead>
<tbody id="statementShow">
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
<td rowspan="{$com.statement_count}">{$com.matche_platform}</td>
<!-- <td rowspan="{$com.statement_count}">{$com.statement_begin_time} ~ {$com.statement_end_time}</td> -->
<td>{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}</td>
<td>{$com['statement_info'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['ratio']}%</td>
<td>{$com['statement_info'][0]['company_ratio']}%</td>
<td>{$com['statement_info'][0]['promote_ratio']}%</td>
<td>{$com['statement_info'][0]['fax_ratio']}%</td>
<td>{$com['statement_info'][0]['d_statement_money']}</td>
<td rowspan="{$com.statement_count}">{$com.fine}</td>
<td rowspan="{$com.statement_count}">{$com.reward}</td>
<td rowspan="{$com.statement_count}">{$com.statement_money}</td>
<td rowspan="{$com.statement_count}">{$com.renark}</td>
</tr>
<foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0">
<tr>
<td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td>
<td>{$it['game_name']}</td>
<td>{$it['pay_amount']}</td>
<td>{$it['pay_amount']}</td>
<td>{$it['ratio']}%</td>
<td>{$it['company_ratio']}%</td>
<td>{$it['promote_ratio']}%</td>
<td>{$it['fax_ratio']}%</td>
<td>{$it['d_statement_money']}</td>
</tr>
</if>
</foreach>
</foreach>
<tr>
<td colspan=4 >合计:</td>
<td>{$count.platform_amount}</td>
<td>{$count.platform_amount2}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.d_statement_money}</td>
<td>{$count.fine}</td>
<td>{$count.reward}</td>
<td>{$count.statement_money}</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
<script>
<if condition="$is_export">
$(function(){
$("#exporttable").table2excel({
filename: "{$title}.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</if>
</script>
</html>

@ -0,0 +1,177 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
/* .tabcon1711 table{
width: 480px;
} */
table{
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list, .i_list {
float: left;
margin: 0;
}
</style>
<body>
<!-- <div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
海南万盟天下科技有限公司
</div> -->
<div class="data_list box_mt" style="margin-top: 10px;">
<div class="">
<table id="exporttable">
<!-- 表头 -->
<thead>
<tr>
<th>序号</th>
<th>公司名称</th>
<th>合作产品名称</th>
<th>平台总额(元)</th>
<th>下游内团分成比例</th>
<th>补点比例</th>
<th>税费费率</th>
<th>分成金额/元</th>
<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>{$com['statement_info'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['ratio']}%</td>
<td>{$com['statement_info'][0]['increment_ratio']}%</td>
<td>{$com['statement_info'][0]['fax_ratio']}%</td>
<td>{$com['statement_info'][0]['d_statement_money']}</td>
<td rowspan="{$com.statement_count}">{$com.fine}</td>
<td rowspan="{$com.statement_count}">{$com.reward}</td>
<td rowspan="{$com.statement_count}">{$com.statement_money}</td>
<td rowspan="{$com.statement_count}">{$com.settlement_contact}</td>
<td>{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}</td>
<td rowspan="{$com.statement_count}">{$com.renark}</td>
</tr>
<foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0">
<tr>
<td>{$it['game_name']}</td>
<td>{$it['pay_amount']}</td>
<td>{$it['ratio']}%</td>
<td>{$it['increment_ratio']}%</td>
<td>{$it['fax_ratio']}%</td>
<td>{$it['d_statement_money']}</td>
<td>{$it['statement_begin_time']} ~ {$it['statement_end_time']}</td>
</tr>
</if>
</foreach>
</foreach>
<tr>
<td colspan=3 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td>{$count.d_statement_money}</td>
<td>{$count.fine}</td>
<td>{$count.reward}</td>
<td>{$count.statement_money}</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
<script>
<if condition="$is_export">
$(function(){
$("#exporttable").table2excel({
filename: "{$title}.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</if>
</script>
</html>

@ -0,0 +1,198 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
/* .tabcon1711 table{
width: 480px;
} */
table{
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list, .i_list {
float: left;
margin: 0;
}
</style>
<body>
<!-- <div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
海南万盟天下科技有限公司
</div> -->
<div class="data_list box_mt" style="margin-top: 10px;">
<div class="">
<table id="exporttable">
<!-- 表头 -->
<thead>
<tr>
<th>序号</th>
<th>下游名称</th>
<th>会长账号</th>
<th>下游类型</th>
<th>市场员</th>
<th>下游性质</th>
<th>产品</th>
<th>产品类型</th>
<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>
<tr>
<td colspan=9 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.sum_money}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
<script>
<if condition="$is_export">
$(function(){
$("#exporttable").table2excel({
filename: "{$title}.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</if>
</script>
</html>

@ -2073,4 +2073,35 @@ ADD COLUMN `ali_account` varchar(128) NULL COMMENT '支付宝账号' AFTER `las
ADD COLUMN `fax_ratio` varchar(20) NULL COMMENT '开票税率' AFTER `ali_account`;
ALTER TABLE `sys_shift_task`
ADD COLUMN `change_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '推广员充值换榜执行状态 0 未处理 1 已处理' AFTER `status`;
ADD COLUMN `change_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '推广员充值换榜执行状态 0 未处理 1 已处理' AFTER `status`;
CREATE TABLE `tab_excel_statement_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`batch_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '批次号',
`company_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '公司性质: 1-下游公司 2-下游个人 3上游公司',
`company_name` varchar(60) NOT NULL DEFAULT '' COMMENT '对账公司名称',
`company_info` text NOT NULL COMMENT '公司其他信息json',
`statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额',
`pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总计',
`platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台流水金额',
`fine` decimal(10,2) DEFAULT '0.00' COMMENT '罚款',
`reward` decimal(10,2) DEFAULT '0.00' COMMENT '奖励',
`statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
`statement_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算单号',
`statement_info` text NOT NULL COMMENT '订单相关信息json',
`pay_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '打款状态 -1:打款失败 0:未打款 1:打款成功',
`pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付完成时间',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生成时间',
`pay_info` text COMMENT '打款信息',
`remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注',
PRIMARY KEY (`id`),
KEY `batch_num` (`batch_num`) USING BTREE,
KEY `statement_begin_time` (`statement_begin_time`) USING BTREE,
KEY `statement_end_time` (`statement_end_time`) USING BTREE,
KEY `pay_status` (`pay_status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='exce汇总单';
Loading…
Cancel
Save