master
commit
32bc839dcd
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
use Think\Controller;
|
||||
use Think\Exception;
|
||||
|
||||
/**
|
||||
* 系统任务接口
|
||||
* @author cz
|
||||
*/
|
||||
class CmdTasksController extends Controller {
|
||||
|
||||
public function run()
|
||||
{
|
||||
$params = D("CmdTasks")->getTask();
|
||||
if(!$params){
|
||||
echo('暂无任务');
|
||||
}
|
||||
try {
|
||||
exec($params['params'], $resArr, $status);
|
||||
$result = json_encode($resArr,JSON_UNESCAPED_UNICODE);
|
||||
D("CmdTasks")->updateTask(['id'=>$params['id'],'status' => 2, 'end_time' => time(), 'result' => $result]);
|
||||
} catch (Exception $e) {
|
||||
D("CmdTasks")->updateTask(['id'=>$params['id'],'status' => 3, 'end_time' => time(), 'result' => $e->getMessage()]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,254 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
/**
|
||||
* 线下打款
|
||||
* @author cz
|
||||
*/
|
||||
class CompanyStatementOfflineController extends ThinkController
|
||||
{
|
||||
public $CompanyType = [
|
||||
"1"=>"下游公司",
|
||||
"2"=>"下游个人",
|
||||
"3"=>"上游公司"
|
||||
];
|
||||
public $IsPayment = [
|
||||
"1"=>"是",
|
||||
"2"=>"否"
|
||||
];
|
||||
public $PayStatus=[
|
||||
"-1"=>"打款失败",
|
||||
"0"=>"未打款",
|
||||
"1"=>"打款成功"
|
||||
];
|
||||
|
||||
public function lists() {
|
||||
$params = I('get.');
|
||||
$page = $params['p'] ? intval($params['p']) : 1;
|
||||
$row = $params['row'] ? intval($params['row']) : 10;
|
||||
//权限分配
|
||||
if(!IS_ROOT){
|
||||
$this->OpAuthList= getModuleControllerAuth();
|
||||
}
|
||||
$this->assign('menubtn',$this->menuAuth());
|
||||
|
||||
$map = [
|
||||
"c.verify_status"=>2,
|
||||
"p.verify_status"=>["GT",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"] = "(c.statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (c.statement_end_time BETWEEN {$time_start} AND {$time_end}) OR (c.statement_begin_time <= {$time_end} AND c.statement_end_time >= {$time_end})";
|
||||
} elseif (isset($_REQUEST['time_start'])) {
|
||||
$time_start = strtotime($_REQUEST['time_start']);
|
||||
$map["_string"] = "(c.statement_begin_time >= {$time_start} ) OR (c.statement_end_time >= {$time_start})";
|
||||
} elseif (isset($_REQUEST['time_end'])) {
|
||||
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
|
||||
$map["_string"] = "(c.statement_begin_time <= {$time_end} ) OR (c.statement_end_time <= {$time_end})";
|
||||
}
|
||||
|
||||
//其他
|
||||
if(isset($_REQUEST['company_type'])){
|
||||
$map['c.company_type'] = $_REQUEST['company_type'];
|
||||
}
|
||||
if(isset($_REQUEST['company_name'])){
|
||||
$map['c.company_name'] =["LIKE","%{$_REQUEST['company_name']}%"];
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['statement_pool_num'])){
|
||||
$map['p.statement_num'] =["LIKE","%{$_REQUEST['statement_pool_num']}%"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//条件end
|
||||
$data = M("company_statement_info","tab_")
|
||||
->alias("c")
|
||||
->field("c.*,p.statement_num,p.verify_status")
|
||||
->where($map)
|
||||
|
||||
->join("tab_company_statement_pool as p ON c.pool_id = p.id")
|
||||
|
||||
->page($page,$row)
|
||||
->order("id desc")
|
||||
->select();
|
||||
|
||||
foreach($data as $k => &$v) {
|
||||
|
||||
$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['company_type_str'] = $this->CompanyType[$v['company_type']];
|
||||
$v["valid"] = "{$v['statement_begin_time']}-{$v['statement_end_time']}";
|
||||
$v["pay_status_str"] = $this->PayStatus[$v["pay_status"]];
|
||||
|
||||
$v["pay_info"] = json_decode($v['pay_info'], true);
|
||||
if(isset($v['pay_info']['payment_user'])){
|
||||
$v["payment"]= "{$v['pay_status_str']}({$v['pay_info']['payment_user']})<br>{$v['pay_info']['payment_time']}";
|
||||
}else{
|
||||
$v["payment"] = $v["pay_status_str"];
|
||||
}
|
||||
|
||||
$v['oplist'] = $this->OpAuth($v);
|
||||
}
|
||||
|
||||
$count = M("company_statement_info","tab_")->alias("c")->field("count(c.id) count,sum(c.statement_money) statement_money")->join("tab_company_statement_pool as p ON c.pool_id = p.id")->where($map)->find();
|
||||
// dd($count);
|
||||
$params['p'] = $page;
|
||||
$params['row'] = $row;
|
||||
$page = set_pagination($count['count'], $row, $params);
|
||||
if ($page) {
|
||||
$this->assign('_page', $page);
|
||||
}
|
||||
// dd($data);
|
||||
$this->assign('data',$data);
|
||||
$this->assign('count',$count);
|
||||
$this->assign('CompanyType',$this->CompanyType);
|
||||
$this->display();
|
||||
|
||||
}
|
||||
public function doPayment()
|
||||
{
|
||||
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
|
||||
$ids = $_REQUEST['ids'];
|
||||
//获取所有的母单id
|
||||
$companyStatementInfo = M("company_statement_info","tab_");
|
||||
$statementPool = $companyStatementInfo->where("id in ($ids) and pay_status <> 1")->field("pool_id,count(id) count")->group("pool_id")->select();
|
||||
$poolInfo = [];
|
||||
foreach ($statementPool as $k => $v) {
|
||||
$poolInfo[$v['pool_id']] = $v['count'];
|
||||
}
|
||||
unset($statementPool);
|
||||
|
||||
//修改info
|
||||
$saveData = [
|
||||
"pay_type"=>3,
|
||||
"pay_status"=>1,
|
||||
"pay_info"=>json_encode(["payment_user"=>$_SESSION['onethink_admin']['user_auth']["username"],"payment_time"=>date("Y-m-d H:i:s")])
|
||||
];
|
||||
$ires = $companyStatementInfo->where("id in ($ids)")->save($saveData);
|
||||
|
||||
//获取母单未支付完成订单
|
||||
$poolIds = implode(",",array_keys($poolInfo));
|
||||
$poolInfo = $companyStatementInfo->where("pool_id in ($poolIds) and pay_status <> 1")->field("pool_id,count(id) count")->group("pool_id")->select();
|
||||
|
||||
//全部就打款成功,否则打款中
|
||||
$companyStatementPool = M("company_statement_pool","tab_");
|
||||
foreach ($poolInfo as $k => $v) {
|
||||
if($v['count'] == $poolInfo[$v['pool_id']]){
|
||||
//打款成功
|
||||
$this->setOneVerifyStatus(4,"payment",$v['pool_id']);
|
||||
}else{
|
||||
//打款中
|
||||
$this->setOneVerifyStatus(3,"payment",$v['pool_id']);
|
||||
}
|
||||
}
|
||||
|
||||
$this->ajaxReturn(array(
|
||||
'status' =>1,
|
||||
"info"=>"打款确认成功"
|
||||
));
|
||||
}
|
||||
public function viewStatement()
|
||||
{
|
||||
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){
|
||||
//上游
|
||||
A("CompanyStatementPool")->viewCpPool($dbres,$is_export);
|
||||
}elseif($dbres[0]['company_type'] == 1){
|
||||
//下游公司
|
||||
A("CompanyStatementPool")->viewPcPool($dbres,$is_export);
|
||||
}else{
|
||||
A("CompanyStatementPool")->viewPuPool($dbres,$is_export);
|
||||
}
|
||||
}
|
||||
|
||||
public function export(){
|
||||
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
|
||||
$ids = $_REQUEST['ids'];
|
||||
$dbres = M("company_statement_info","tab_")->where("id in ({$ids})")->select();
|
||||
|
||||
$is_export= false;
|
||||
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
|
||||
$is_export = true;
|
||||
}
|
||||
|
||||
if($dbres[0]['company_type'] == 3){
|
||||
//上游
|
||||
$this->assign("title","上游公司线下打款");
|
||||
A("CompanyStatementPool")->viewCpPool($dbres,$is_export);
|
||||
}elseif($dbres[0]['company_type'] == 1){
|
||||
//下游公司
|
||||
$this->assign("title","下游公司线下打款");
|
||||
A("CompanyStatementPool")->viewPcPool($dbres,$is_export);
|
||||
}else{
|
||||
$this->assign("title","下游个人线下打款");
|
||||
A("CompanyStatementPool")->viewPuPool($dbres,$is_export);
|
||||
}
|
||||
}
|
||||
|
||||
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']=$_SESSION['onethink_admin']['user_auth']["username"];
|
||||
$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);
|
||||
}
|
||||
|
||||
public function OpAuth($info)
|
||||
{
|
||||
$id = $info['id'];
|
||||
$type = $info['company_type'];
|
||||
//原始列表
|
||||
$opBtn = [
|
||||
"viewStatement"=>"<a class='confirm viewStatement' data-id='{$id}' data-companytype='{$type}'>查看</a>",
|
||||
];
|
||||
//操作对应菜单
|
||||
$optist = ["viewStatement"];
|
||||
$resarr = [];
|
||||
foreach ($optist as $k => $v) {
|
||||
if(IS_ROOT){
|
||||
$resarr[] = $opBtn[$v];
|
||||
}else{
|
||||
if(in_array($v,$this->OpAuthList)){
|
||||
$resarr[] = $opBtn[$v];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $resarr;
|
||||
}
|
||||
public function menuAuth()
|
||||
{
|
||||
$mentBtn = [
|
||||
"doPayment"=>"<a class='butn' id='doPayment'>打款确认</a>",
|
||||
"export"=>"<a class='butn' id='export'>批量导出</a>"
|
||||
];
|
||||
$resarr = [];
|
||||
foreach ($mentBtn as $k => $v) {
|
||||
if(IS_ROOT){
|
||||
$resarr[] = $v;
|
||||
}else{
|
||||
if(in_array($k,$this->OpAuthList)){
|
||||
$resarr[] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $resarr;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* 定时自动完成
|
||||
*/
|
||||
namespace Admin\Controller;
|
||||
use Admin\Model\SpendModel;
|
||||
use Think\Think;
|
||||
use Base\Tool\Printer;
|
||||
use Base\Tool\TaskClient;
|
||||
use Base\Service\TestingResourceService;
|
||||
use GuzzleHttp\Client;
|
||||
use think\Db;
|
||||
use Base\Tool\GameCatClient;
|
||||
|
||||
class GameApiController extends Think {
|
||||
|
||||
protected function _initialize()
|
||||
{
|
||||
C(api('Config/lists'));
|
||||
}
|
||||
|
||||
public function verify()
|
||||
{
|
||||
$service = new TestingResourceService();
|
||||
$batches = M('testing_resource_batch', 'tab_')->where(['verify_status' => 0])->select();
|
||||
foreach ($batches as $batch) {
|
||||
$service->verify($batch);
|
||||
}
|
||||
}
|
||||
|
||||
public function provide()
|
||||
{
|
||||
$service = new TestingResourceService();
|
||||
$batches = M('testing_resource_batch', 'tab_')->where(['verify_status' => 1, 'provide_status' => 0])->select();
|
||||
foreach ($batches as $batch) {
|
||||
$service->provide($batch);
|
||||
}
|
||||
}
|
||||
|
||||
public function send()
|
||||
{
|
||||
$role = [
|
||||
'role_id' => '6819493',
|
||||
'user_account' => 'qh11102',
|
||||
'sdk_version' => 1,
|
||||
];
|
||||
$order = [
|
||||
'ref_amount' => '10.00',
|
||||
'ref_id' => '8',
|
||||
'remark' => '测试',
|
||||
'order_no' => date('YmdHis') . rand(1000, 9999) . '_1',
|
||||
];
|
||||
$service = new TestingResourceService();
|
||||
$result = $service->provideFromGameCat($order, $role);
|
||||
var_dump($result);
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
//推广公司模型
|
||||
namespace Admin\Model;
|
||||
use Think\Model;
|
||||
|
||||
/**
|
||||
* 文档基础模型
|
||||
*/
|
||||
class CmdTasksModel extends Model{
|
||||
protected $tablePrefix = 'tab_';
|
||||
//获取待执行任务
|
||||
public function getTask()
|
||||
{
|
||||
//按顺序获取任务
|
||||
$has_run = $this->where(['status'=>"1"])->count();
|
||||
if($has_run > 0){
|
||||
return false;
|
||||
}
|
||||
$task = $this->field("id,params")->where(['status'=>"0"])->order("id asc")->find();
|
||||
if(empty($task)){
|
||||
return false;
|
||||
}else{
|
||||
//修改状态为执行中
|
||||
$this->save(['id'=>$task['id'],'status'=>"1","start_time"=>time()]);
|
||||
return $task;
|
||||
}
|
||||
}
|
||||
//更新
|
||||
public function updateTask($params)
|
||||
{
|
||||
$this->save($params);
|
||||
}
|
||||
//获取同类型任务最后一次操作时间
|
||||
public function getTypeLastTask($type)
|
||||
{
|
||||
$task = $this->field("end_time")->where(['status'=>"2",'type'=>$type])->order("id desc")->find();
|
||||
if(empty($task)){
|
||||
return false;
|
||||
}else{
|
||||
return date("Y-m-d H:i:s",$task['end_time']);
|
||||
}
|
||||
}
|
||||
//插入任务
|
||||
public function addTask($type,$params,$need_path=true)
|
||||
{
|
||||
$task = $this->field("end_time")->where(['status'=>["in","0,1"],'type'=>$type])->order("id desc")->find();
|
||||
if(!empty($task)){
|
||||
return false;
|
||||
}
|
||||
if($need_path){
|
||||
if(IS_WIN){
|
||||
$p = explode(':',ROOTTTTT);
|
||||
$params = "{$p[0]}:&".'cd "'.$p[1].'"&'.$params;
|
||||
}else{
|
||||
$params = "cd ".ROOTTTTT.";".$params;
|
||||
}
|
||||
}
|
||||
$params = rtrim($params,";").' 2>&1';
|
||||
$save = [
|
||||
"uid"=>$_SESSION['onethink_admin']['user_auth']['uid'],
|
||||
"created_time"=>time(),
|
||||
"params"=>$params,
|
||||
"type"=>$type
|
||||
];
|
||||
return $this->add($save);
|
||||
}
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Model;
|
||||
|
||||
use Think\Model;
|
||||
|
||||
class CompanyGameRatioModel extends Model
|
||||
{
|
||||
// 数据表前缀
|
||||
protected $tablePrefix = 'tab_';
|
||||
/**
|
||||
* 按公司获取游戏分成比例
|
||||
*
|
||||
* @param [type] $company_id 公司id
|
||||
* @param [type] $game_ids 游戏关联id
|
||||
* @param [type] $begintime 开始时间
|
||||
* @param [type] $endtime 结束时间
|
||||
* @param boolean $company_belong 公司内外团
|
||||
* @return void
|
||||
*/
|
||||
public function getPromoteCompanyGameRatio($company_id,$game_ids,$begintime,$endtime,$company_belong=false){
|
||||
//获取默认比例
|
||||
if($company_belong === false){
|
||||
$company_belong = M("PromoteCompany","tab_")->field("company_belong")->where("id='{$company_id}'")->find()['company_belong'];
|
||||
}
|
||||
|
||||
$mwhere = [
|
||||
"company_belong"=>$company_belong,
|
||||
"relation_game_id"=>["in",$game_ids]
|
||||
];
|
||||
$m_res = M("GameRatioMould","tab_")->where($mwhere)->select();
|
||||
$modul_ratio = [];
|
||||
for ($i=0; $i < count($m_res); $i++) {
|
||||
$modul_ratio[$m_res[$i]['relation_game_id']] = $m_res[$i];
|
||||
}
|
||||
unset($m_res);
|
||||
//设置默认
|
||||
$game_ratio = [];
|
||||
$tmp_g = explode(",",$game_ids);
|
||||
for ($i=0; $i < count($tmp_g); $i++) {
|
||||
$game_ratio[$tmp_g[$i]] = [
|
||||
["begintime"=>$begintime,"endtime"=>$endtime]
|
||||
];
|
||||
}
|
||||
$map = [
|
||||
"company_id"=>$company_id,
|
||||
"relation_game_id"=>['in',$game_ids],
|
||||
"_string"=>"begin_time <={$endtime} AND ( end_time = 0 OR end_time >= {$begintime})"
|
||||
];
|
||||
$res = $this->where($map)->order("begin_time asc")->select();
|
||||
foreach($res as $k=>$v){
|
||||
//获取最后一个数据
|
||||
$tgr = &$game_ratio[$v['relation_game_id']];
|
||||
$last_time_ratio = end($game_ratio[$v['relation_game_id']]);
|
||||
if($v['end_time'] == 0 || ($v['end_time'] >= $last_time_ratio['endtime'])){
|
||||
//全段
|
||||
if($v['begin_time'] <= $last_time_ratio['begintime']){
|
||||
$tgr[count($tgr)-1]['ratio'] = $v['ratio'];
|
||||
$tgr[count($tgr)-1]['turnover_ratio'] = $v['turnover_ratio'];
|
||||
continue;
|
||||
}else{
|
||||
//上分段
|
||||
$tgr[count($tgr)-1]['endtime'] = $v['begin_time']-1;
|
||||
$tgr[] = ['begintime'=>$v['begin_time'],"endtime"=>$last_time_ratio['endtime'],"ratio"=>$v['ratio'],"turnover_ratio"=>$v['turnover_ratio']];
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if($v['end_time'] < $last_time_ratio['endtime']){
|
||||
if($last_time_ratio['begintime'] < $v['begin_time']){
|
||||
//中段
|
||||
$tgr[count($tgr)-1]['endtime'] = $v['begin_time']-1;
|
||||
|
||||
$tgr[] = ['begintime'=>$v['begin_time'],"endtime"=>$v['end_time'],"ratio"=>$v['ratio'],"turnover_ratio"=>$v['turnover_ratio']];
|
||||
|
||||
$tgr[] = ['begintime'=>$v['end_time']-0+1,"endtime"=>$last_time_ratio['endtime']];
|
||||
continue;
|
||||
}
|
||||
if($last_time_ratio['begintime'] > $v['begin_time']){
|
||||
//下分段
|
||||
$tgr[count($tgr)-1]['endtime'] = $v['end_time'];
|
||||
$tgr[] = ['begintime'=>$v['end_time']-0+1,"endtime"=>$last_time_ratio['endtime'],"ratio"=>$v['ratio'],"turnover_ratio"=>$v['turnover_ratio']];
|
||||
continue;
|
||||
}
|
||||
if($last_time_ratio['begintime'] = $v['begin_time']){
|
||||
$tgr[count($tgr)-1]['endtime'] = $v['end_time'];
|
||||
$tgr[count($tgr)-1]['ratio'] = $v['ratio'];
|
||||
$tgr[count($tgr)-1]['turnover_ratio'] = $v['turnover_ratio'];
|
||||
|
||||
$tgr[] = ['begintime'=>$v['end_time']-0+1,"endtime"=>$last_time_ratio['endtime']];
|
||||
}
|
||||
}
|
||||
}
|
||||
//模板填充
|
||||
foreach($game_ratio as $k=>&$list){
|
||||
foreach($list as $i => &$ratio){
|
||||
if(!isset($ratio['ratio'])){
|
||||
if(isset($modul_ratio[$k]['ratio'])){
|
||||
$ratio['ratio'] = $modul_ratio[$k]['ratio'];
|
||||
$ratio['turnover_ratio'] = $modul_ratio[$k]['turnover_ratio'];
|
||||
}else{
|
||||
$ratio['ratio'] = 0;
|
||||
$ratio['turnover_ratio'] =null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $game_ratio;
|
||||
}
|
||||
}
|
@ -0,0 +1,402 @@
|
||||
<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;}
|
||||
.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" id="order_url">仅当汇总单审批通过的单子才允许进行打款</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 style="width: 200px;" type="text" name="company_name" class="search-input" value="{:I('company_name')}" placeholder="请输入公司名称搜索">
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<input style="width: 200px;" type="text" name="statement_pool_num" class="search-input" value="{:I('statement_pool_num')}" placeholder="请输入汇总单号">
|
||||
</div>
|
||||
|
||||
<div class="input-list">
|
||||
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="结算开始时间" />
|
||||
-
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
<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">
|
||||
<foreach name="menubtn" item="vo" >
|
||||
{$vo}
|
||||
</foreach>
|
||||
</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 class="tooltip">汇总单号<span class="tooltiptext">汇总单号</span></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']}" name="ids[]" data-companytype="{$data['company_type']}" data-paystatus="{$data['pay_status']}"></td>
|
||||
<td>{$data.company_name}</td>
|
||||
<td>{$data.company_type_str}</td>
|
||||
<td>{$data.valid}</td>
|
||||
<td>{$data.statement_money}</td>
|
||||
<td>{$data.platform_amount}</td>
|
||||
<td>{$data.payment}</td>
|
||||
<td>{$data.statement_num}</td>
|
||||
<td>
|
||||
<foreach name="data.oplist" item="vo" >
|
||||
{$vo}
|
||||
</foreach>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
<tr><td style="line-height: 42px;">合计</td><td colspan="12" style="line-height: 42px;">结算总金额: {$count.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 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__/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();
|
||||
|
||||
$(".viewStatement").click(function () {
|
||||
var id = $(this).data("id");
|
||||
var url = "{:U('viewStatement')}"+"&id="+id
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "海南万盟天下科技有限公司",
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: ['100%', '100%'],
|
||||
content: url
|
||||
});
|
||||
});
|
||||
|
||||
$("#doPayment").on("click",function(){
|
||||
var id = $(this).attr("id");
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
if($(elem).data("paystatus") == 0){
|
||||
return $(elem).val();
|
||||
}
|
||||
}).get();
|
||||
|
||||
if(text.length < 1){
|
||||
layer.msg("<font style='color:white'>无需要进行确认打款确认操作的数据</font>");
|
||||
return;
|
||||
}
|
||||
|
||||
text = text.join(",");
|
||||
|
||||
if(confirm){
|
||||
layer.confirm('【警告】确认打款后将不可回退,如需继续请点击确认', {
|
||||
btn: ['确认','取消'],
|
||||
title:false
|
||||
}, function(){
|
||||
_doAgreeApply();
|
||||
});
|
||||
}else{
|
||||
_doAgreeApply();
|
||||
}
|
||||
|
||||
function _doAgreeApply(){
|
||||
//执行
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{:U('doPayment')}",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: {ids:text},
|
||||
success:function(data){
|
||||
if(data.status==1){
|
||||
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
},1500);
|
||||
}else{
|
||||
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
$("#export").click(function () {
|
||||
var company = [];
|
||||
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
|
||||
var cid = $(elem).data("companytype");
|
||||
try {
|
||||
company[cid].push($(elem).val());
|
||||
} catch (error) {
|
||||
company[cid] = [];
|
||||
company[cid].push($(elem).val());
|
||||
}
|
||||
});
|
||||
company.forEach(function(e){
|
||||
var ids = e.join(",");
|
||||
var url ="{:U('export')}"+"&ids="+ids+"&export=1";
|
||||
var iframeExcel = "<iframe src='"+url+"' width='0px' height='0px' style='z-index:-1;position: absolute;top: -999999px;'></iframe>";
|
||||
$("body").append(iframeExcel)
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
$("#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;
|
||||
});
|
||||
|
||||
$('#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'
|
||||
})
|
||||
|
||||
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,133 @@
|
||||
<?php
|
||||
namespace Base\Service;
|
||||
|
||||
use Base\Facade\Request;
|
||||
use Base\Tool\GameCatClient;
|
||||
|
||||
class TestingResourceService
|
||||
{
|
||||
public static $provideStatusList = [
|
||||
'0' => '待发放',
|
||||
'1' => '已发放',
|
||||
'2' => '异常',
|
||||
];
|
||||
public static $verifyStatusList = [
|
||||
'0' => '未审核',
|
||||
'1' => '审核通过',
|
||||
'2' => '审核拒绝',
|
||||
];
|
||||
|
||||
public function getProvideStatusText($provideStatus)
|
||||
{
|
||||
return self::$provideStatusList[$provideStatus] ?? '未知';
|
||||
}
|
||||
|
||||
public function getVerifyStatusText($verifyStatus)
|
||||
{
|
||||
return self::$verifyStatusList[$verifyStatus] ?? '未知';
|
||||
}
|
||||
|
||||
public function verify($batch)
|
||||
{
|
||||
if ($batch['verify_status'] != 0) {
|
||||
throw new \Exception('审核状态异常');
|
||||
}
|
||||
|
||||
$batchData = [];
|
||||
$batchData['verify_time'] = time();
|
||||
$batchData['update_time'] = time();
|
||||
|
||||
if (!in_array($batch['game_id'], [229, 230])) {
|
||||
|
||||
$batchData['verify_status'] = 2;
|
||||
$batchData['verify_remark'] = '该游戏发放功能暂未实现';
|
||||
M('testing_resource_batch', 'tab_')->where(['id' => $batch['id']])->save($batchData);
|
||||
|
||||
throw new \Exception('该游戏发放功能暂未实现');
|
||||
}
|
||||
|
||||
$batchData['verify_status'] = 1;
|
||||
$batchData['verify_remark'] = '审核成功';
|
||||
M('testing_resource_batch', 'tab_')->where(['id' => $batch['id']])->save($batchData);
|
||||
}
|
||||
|
||||
public function provide($batch)
|
||||
{
|
||||
if ($batch['verify_status'] != 1) {
|
||||
throw new \Exception('该申请未审核通过');
|
||||
}
|
||||
|
||||
if ($batch['provide_status'] != 0) {
|
||||
throw new \Exception('发放状态异常');
|
||||
}
|
||||
|
||||
$role = M('user_play_info', 'tab_')
|
||||
->field(['id', 'role_id', 'user_id', 'promote_id', 'user_account', 'sdk_version'])
|
||||
->where(['game_id' => $batch['game_id'], 'role_id' => $batch['role_id']])
|
||||
->find();
|
||||
$orders = M('testing_resource_order', 'tab_')
|
||||
->where(['batch_id' => $batch['id']])
|
||||
->select();
|
||||
|
||||
$hasError = false;
|
||||
$provideAmount = 0;
|
||||
foreach ($orders as $order) {
|
||||
$result = $this->provideFromGameCat($order, $role);
|
||||
$orderData = [
|
||||
'result' => json_encode(['code' => $result['code'], 'message' => $result['message']]),
|
||||
];
|
||||
if (!$result['status']) {
|
||||
$hasError = true;
|
||||
$orderData['provide_status'] = 2;
|
||||
} else {
|
||||
$orderData['provide_status'] = 1;
|
||||
}
|
||||
$provideAmount += round($order['ref_amount'] * $order['num'], 2);
|
||||
$orderData['provide_time'] = time();
|
||||
M('testing_resource_order', 'tab_')
|
||||
->where(['id' => $order['id']])
|
||||
->save($orderData);
|
||||
}
|
||||
|
||||
$batchData = [];
|
||||
if ($hasError) {
|
||||
$batchData['provide_status'] = 2;
|
||||
} else {
|
||||
$batchData['provide_status'] = 1;
|
||||
}
|
||||
$batchData['provide_time'] = time();
|
||||
$batchData['provide_amount'] = $provideAmount;
|
||||
$batchData['update_time'] = time();
|
||||
M('testing_resource_batch', 'tab_')
|
||||
->where(['id' => $batch['id']])
|
||||
->save($batchData);
|
||||
}
|
||||
|
||||
public function provideFromGameCat($order, $role)
|
||||
{
|
||||
$gameCatClient = new GameCatClient();
|
||||
$result = $gameCatClient->api('provide', [
|
||||
'roleId' => $role['role_id'],
|
||||
'amount' => intval($order['ref_amount']),
|
||||
'supportItem' => $order['ref_id'],
|
||||
'supportType' => '0',
|
||||
'channelUid' => $role['user_account'],
|
||||
'applyRemark' => $order['remark'] == '' ? '测试资源申请' : $order['remark'],
|
||||
'applyId' => $order['order_no'],
|
||||
'device_type' => $role['sdk_version'] == 1 ? 'andriod' : 'ios',
|
||||
]);
|
||||
if ($result['state'] == 1 && $result['data']) {
|
||||
return [
|
||||
'status' => true,
|
||||
'message' => $result['msg'],
|
||||
'code' => 1,
|
||||
];
|
||||
} else {
|
||||
return [
|
||||
'status' => false,
|
||||
'msg' => $result['msg'],
|
||||
'code' => $result['state'],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
|
||||
namespace Base\Tool;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
|
||||
/**
|
||||
* 游戏猫接口客户端
|
||||
*/
|
||||
class GameCatClient
|
||||
{
|
||||
const SIGN_NAME = 'sign';
|
||||
const SUCCESS = '0000';
|
||||
|
||||
protected $client;
|
||||
|
||||
private $apis = [
|
||||
'get-pay-type' => ['uri' => '/game/support/items/v1', 'method' => 'post'],
|
||||
'provide' => ['uri' => '/game/support/provide/v1', 'method' => 'post'],
|
||||
];
|
||||
|
||||
private $appIds = [
|
||||
'andriod' => 1746,
|
||||
'ios' => 1747,
|
||||
];
|
||||
|
||||
private $channelIds = [
|
||||
'andriod' => 11595,
|
||||
'ios' => 11596,
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->client = new Client([
|
||||
'base_uri' => C('GAME_CAT_URL'),
|
||||
'timeout' => 10.0,
|
||||
]);
|
||||
}
|
||||
|
||||
public function api($api, array $params = [])
|
||||
{
|
||||
$api = $this->apis[$api] ?? null;
|
||||
if (is_null($api)) {
|
||||
throw new \Exception('接口不存在');
|
||||
}
|
||||
$deviceType = 'andriod';
|
||||
if (isset($params['device_type'])) {
|
||||
$deviceType = $params['device_type'];
|
||||
unset($params['device_type']);
|
||||
}
|
||||
$params['appId'] = $this->appIds[$deviceType] ?? $this->appIds['andriod'];
|
||||
$params['channelId'] = $this->channelIds[$deviceType] ?? $this->channelIds['andriod'];
|
||||
$params['timestamp'] = time();
|
||||
$params[self::SIGN_NAME] = $this->sign($params);
|
||||
try {
|
||||
return $this->request($api, $params);
|
||||
} catch (\Exception $e) {
|
||||
$env = C('APP_ENV', null, 'prod');
|
||||
return ['code' => 1000, 'state' => 1000, 'message' => '接口请求错误。' . ($env == 'prod' ? '' : $e->getMessage()) , 'data' => []];
|
||||
}
|
||||
}
|
||||
|
||||
public function request($api, $params)
|
||||
{
|
||||
if ($api['method'] == 'get') {
|
||||
return $this->get($api['uri'], $params);
|
||||
} else {
|
||||
return $this->post($api['uri'], $params);
|
||||
}
|
||||
}
|
||||
|
||||
protected function post($uri, array $params = [])
|
||||
{
|
||||
$response = $this->client->post($uri, [
|
||||
'verify' => false,
|
||||
'form_params' => $params,
|
||||
]);
|
||||
$result = (string)$response->getBody();
|
||||
/* var_dump($uri);
|
||||
var_dump($params);
|
||||
var_dump($result); */
|
||||
return json_decode($result, true);
|
||||
}
|
||||
|
||||
protected function get($uri, array $params = [])
|
||||
{
|
||||
$response = $this->client->get($uri, [
|
||||
'verify' => false,
|
||||
'query' => $params,
|
||||
]);
|
||||
$result = (string)$response->getBody();
|
||||
return json_decode($result, true);
|
||||
}
|
||||
|
||||
protected function sign($params)
|
||||
{
|
||||
unset($params[self::SIGN_NAME]);
|
||||
ksort($params);
|
||||
$params['key'] = C('GAME_CAT_KEY');
|
||||
$signRows = [];
|
||||
foreach ($params as $key => $value) {
|
||||
$signRows[] = $key . '=' . $value;
|
||||
}
|
||||
// var_dump(implode('&', $signRows));
|
||||
return md5(implode('&', $signRows));
|
||||
}
|
||||
}
|
@ -0,0 +1,574 @@
|
||||
<extend name="Public/basic"/>
|
||||
<block name="body">
|
||||
<style>
|
||||
.trunk-search .form-group {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.normal_table input {
|
||||
position: relative;
|
||||
padding: 5px;
|
||||
border: 1px solid #E5E5E5;
|
||||
border-radius: 4px;
|
||||
height: 25px;
|
||||
}
|
||||
.normal_table td {
|
||||
padding: 5px;
|
||||
}
|
||||
.normal_table td select {
|
||||
width: 100%;
|
||||
}
|
||||
.normal_table td button {
|
||||
width: 70px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.normal_table td button.delete-row {
|
||||
background-color: rgb(249,104,104);
|
||||
}
|
||||
.btn-row {
|
||||
position: relative;
|
||||
font-size: 11px;
|
||||
margin-top: 28px;
|
||||
text-align: center;
|
||||
}
|
||||
.btn-row button {
|
||||
width: 70px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
.btn-row button.close-btn {
|
||||
background: #E5E5E5;
|
||||
color: #535875;
|
||||
}
|
||||
.form-group .static-input {
|
||||
line-height: 32px;
|
||||
display: inline-block;
|
||||
}
|
||||
.trunk-search button {
|
||||
width: 70px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
.info-row {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.info-row button {
|
||||
width: 120px;
|
||||
height: 25px;
|
||||
display: block;
|
||||
background: #E5E5E5;
|
||||
color: #535875;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.info-row button.bind-btn {
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
<div class="page-search normal_list promoteCoin-record-search" style="padding: 20px;">
|
||||
<div class="trunk-content article">
|
||||
<div class="trunk-search clearfix" style="margin-bottom: 10px;">
|
||||
<form method="post" class="clearfix">
|
||||
<div class="clearfix">
|
||||
<div class="form-group fl">
|
||||
<select id="game-select" name="" class="select_gallery" style="width:150px" <?php if($role):?>disabled<?php endif;?>>
|
||||
<option value="0">请选择游戏</option>
|
||||
<?php foreach($games as $game):?>
|
||||
<option value="<?=$game['id']?>" <?php if($role && $role['game_id'] == $game['id']):?>selected<?php endif;?>>
|
||||
<?=$game['game_name']?>
|
||||
</option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group fl">
|
||||
<select id="server-select" class="select_gallery" style="width:150px" <?php if($role):?>disabled<?php endif;?>>
|
||||
<option value="0">请选择区服</option>
|
||||
<?php foreach($servers as $server):?>
|
||||
<option value="<?=$server['id']?>" <?php if($role && $server['server_id'] == $role['server_id']):?>selected<?php endif;?>>
|
||||
<?=$server['server_name']?>
|
||||
</option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group fl">
|
||||
<input id="test_account" type="text" name="account" class="txt normal_txt" placeholder="请输入测试资源账号" value="{$role.user_account}" <?php if($role):?>disabled<?php endif;?>>
|
||||
</div>
|
||||
<div class="form-group fl">
|
||||
<select id="role-select" name="role_id" class="select_gallery" style="width:150px" <?php if($role):?>disabled<?php endif;?>>
|
||||
<option value="">请选择角色</option>
|
||||
<?php if($role):?>
|
||||
<option value="<?=$role['role_id']?>" selected><?=$role['role_name']?></option>
|
||||
<?php endif;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($role):?>
|
||||
<div class="info-row">
|
||||
<?php if($bindingRole):?>
|
||||
<button type="button">绑定角色: <?= $bindingRole['role_name']?></button>
|
||||
<?php else:?>
|
||||
<button id="bind-btn" class="bind-btn" type="button">绑定玩家角色</button>
|
||||
<?php endif;?>
|
||||
<div class="" style="display:inline-block; margin-left: 10px;">
|
||||
当前可用额度:<span id="quota" data-quota="<?=$quota?>"><?=$quota?></span> 待审核额度:<span id="verify-quota">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="clearfix" style="margin-top: 10px;">
|
||||
<div class="form-group fl">
|
||||
<select id="resource-type-select" name="resource_type_id" style="width:150px" class="select_gallery">
|
||||
<option value="">请选择资源类型</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group fl">
|
||||
<select id="resource-select" name="resource_id" style="width:150px" class="select_gallery">
|
||||
<option value="">请选择资源内容</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group fl">
|
||||
<input id="remark-input" type="text" name="remark" class="txt normal_txt" id="uid" placeholder="请输入备注" value="">
|
||||
</div>
|
||||
<div class="form-group fl">
|
||||
<p id="resource-amount" class="static-input">资源价值: --</p>
|
||||
</div>
|
||||
<div class="form-group fl">
|
||||
<p class="static-input">资源数量: 1</p>
|
||||
<!-- <input id="num-input" type="text" name="num" class="txt normal_txt" id="uid" placeholder="请输入资源数量" value=""> -->
|
||||
</div>
|
||||
<div class="form-group fl">
|
||||
<button id="add-row" class="add-row" type="button">增加</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="trunk-list list_normal">
|
||||
<div class="table-wrapper" style="height: 280px;">
|
||||
<table id="resource-table" class="table normal_table">
|
||||
<thead>
|
||||
<tr class="table-header">
|
||||
<th width="150">资源类型</th>
|
||||
<th width="150">资源内容</th>
|
||||
<th>资源价值</th>
|
||||
<th>资源数量</th>
|
||||
<th>备注</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btn-row clearfix">
|
||||
<button id="submit-btn" class="submit-btn" type="button">提交</button>
|
||||
<button id="close-btn" class="close-btn" type="button">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bind-box" class="layer-box" style="display: none;">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label>玩家账号</label>
|
||||
<div class="form-item" style="width: 250px">
|
||||
<input id="bind_account" name="account" type="text" class="form-input" style="width: 100%;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>玩家角色</label>
|
||||
<div class="form-item" style="width: 250px">
|
||||
<select id="bind-role-select" name="role_id" style="width:270px" class="select_gallery">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label></label>
|
||||
<a id="submit-bind" href="javascript:;" class="add-submit btn">确定</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</block>
|
||||
<block name="script">
|
||||
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(".select_gallery").select2()
|
||||
var globalGameId = $('#game-select').val()
|
||||
if (globalGameId > 0) {
|
||||
initTable(globalGameId)
|
||||
}
|
||||
$('#game-select').on({
|
||||
change: function () {
|
||||
var gameId = $(this).val()
|
||||
globalGameId = gameId
|
||||
$.ajax({
|
||||
url: "{:U('getServers')}",
|
||||
type: "post",
|
||||
data: { game_id: gameId },
|
||||
dataType: 'json',
|
||||
success: function(result){
|
||||
if (result.status == 1) {
|
||||
var servers = result.data.servers
|
||||
var html = "<option value='0'>请选择区服</option>";
|
||||
for (var i in servers){
|
||||
html += "<option value='"+servers[i].id+"'>"+servers[i].server_name+"</option>"
|
||||
}
|
||||
$("#server-select").html(html);
|
||||
$("#server-select").select2();
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
initTable(gameId)
|
||||
}
|
||||
})
|
||||
var resourceTypes = new Array()
|
||||
var rowCount = 0
|
||||
function initTable(gameId) {
|
||||
var table = $('#resource-table');
|
||||
table.find('.normal-row').remove()
|
||||
$.ajax({
|
||||
url: "{:U('getResourceTypes')}",
|
||||
type: "post",
|
||||
data: { game_id: gameId },
|
||||
dataType: 'json',
|
||||
success: function(result){
|
||||
if (result.status == 1) {
|
||||
rowCount = 0
|
||||
resourceTypes = result.data.resourceTypes
|
||||
var selector = $('#resource-type-select')
|
||||
var html = getResourceTypesHtml()
|
||||
selector.html(html)
|
||||
selector.select2();
|
||||
|
||||
var resourceSelector = $('#resource-select')
|
||||
resourceSelector.html(getResourcesHtml([]))
|
||||
resourceSelector.select2();
|
||||
|
||||
$('#resource-amount').html('资源价值:--')
|
||||
$('#resource-table tbody').html('')
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
function getResourceTypesHtml() {
|
||||
var html = "<option value=''>请选择资源类型</option>";
|
||||
for (var i in resourceTypes) {
|
||||
html += "<option value='"+resourceTypes[i].id+"'>"+resourceTypes[i].name+"</option>"
|
||||
}
|
||||
return html
|
||||
}
|
||||
$('#resource-type-select').change(function () {
|
||||
var that = this
|
||||
var typeId = $(this).val()
|
||||
$.ajax({
|
||||
url: "{:U('getResources')}",
|
||||
type: "post",
|
||||
data: { type_id: typeId },
|
||||
dataType: 'json',
|
||||
success: function(result){
|
||||
if (result.status == 1) {
|
||||
var resources = result.data.resources
|
||||
var html = getResourcesHtml(resources)
|
||||
var rowSelect = $('#resource-select')
|
||||
rowSelect.html(html);
|
||||
rowSelect.select2();
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
function getResourcesHtml(resources) {
|
||||
var html = "<option value=''>请选择资源内容</option>";
|
||||
for (var i in resources){
|
||||
html += "<option value='"+resources[i].ref_id+"' data-amount="+resources[i].amount+">"+resources[i].name+"</option>"
|
||||
}
|
||||
return html
|
||||
}
|
||||
$('#resource-select').change(function () {
|
||||
var amount = $(this).find('option:selected').attr('data-amount')
|
||||
amount = amount == undefined ? '--' : amount
|
||||
$('#resource-amount').html('资源价值:' + amount)
|
||||
})
|
||||
$('#add-row').click(function () {
|
||||
if (rowCount >= 5) {
|
||||
return layer.msg('最多同时只能添加5条')
|
||||
}
|
||||
var resourceTypeId = $('#resource-type-select').val()
|
||||
var resourceId = $('#resource-select').val()
|
||||
var resourceTypeName = $('#resource-type-select option:selected').html()
|
||||
var resourceName = $('#resource-select option:selected').html()
|
||||
var amount = $('#resource-select option:selected').attr('data-amount')
|
||||
amount = amount == undefined ? '--' : amount
|
||||
// var num = $('#num-input').val()
|
||||
var num = 1
|
||||
var remark = $('#remark-input').val()
|
||||
|
||||
if (resourceTypeId == '') {
|
||||
return layer.msg('请选择资源类型')
|
||||
}
|
||||
if (resourceId == '') {
|
||||
return layer.msg('请选择资源内容')
|
||||
}
|
||||
if (num == '') {
|
||||
return layer.msg('请输入资源数量')
|
||||
}
|
||||
|
||||
var html = '<tr class="normal-row" data-resource-id="' + resourceId + '" data-resource-type-id="' + resourceTypeId + '" >' +
|
||||
'<td>' + resourceTypeName + '</td>' +
|
||||
'<td>' + resourceName + '</td>' +
|
||||
'<td class="amount">' + amount + '</td>' +
|
||||
'<td class="num"><input name="num" type="text" value="' + num + '" readonly></td>' +
|
||||
'<td class="remark"><input name="remark" type="text" value="' + remark + '"></td>' +
|
||||
'<td><button class="delete-row" type="button" class="danger-btn">删除</button></td>' +
|
||||
'</tr>';
|
||||
|
||||
$('#resource-table tbody').append(html)
|
||||
rowCount ++
|
||||
$(".select_gallery").select2()
|
||||
statQuota()
|
||||
})
|
||||
$('#resource-table').on('click', '.delete-row', function () {
|
||||
var tr = $(this).parents('tr').eq(0)
|
||||
rowCount --
|
||||
tr.remove()
|
||||
statQuota()
|
||||
})
|
||||
$('#resource-table').on('blur', 'input[name=num]', function() {
|
||||
if($(this).val() == '') {
|
||||
return layer.msg('请输入资源数量')
|
||||
} else {
|
||||
statQuota()
|
||||
}
|
||||
})
|
||||
function statQuota() {
|
||||
var quota = $('#quota').attr('data-quota')
|
||||
var verifyQuota = 0
|
||||
$('#resource-table').find('.normal-row').each(function (index, ele) {
|
||||
verifyQuota += $(ele).find('.amount').html() * $(ele).find('.num').children('input').val()
|
||||
})
|
||||
$('#verify-quota').html(verifyQuota)
|
||||
$('#quota').html(quota-verifyQuota)
|
||||
}
|
||||
$('#test_account').on({
|
||||
blur: function() {
|
||||
var gameId = $('#game-select').val()
|
||||
if (gameId == 0) {
|
||||
return layer.msg('请选择游戏')
|
||||
}
|
||||
var serverId = $('#server-select').val()
|
||||
if (serverId == 0) {
|
||||
return layer.msg('请选择区服')
|
||||
}
|
||||
var userAccount = $('#test_account').val()
|
||||
if (userAccount == '') {
|
||||
return layer.msg('请输入测试资源账号')
|
||||
}
|
||||
getUserRoles(userAccount, gameId, serverId, function(roles, isTestingAccount) {
|
||||
if (roles.length == 0) {
|
||||
return layer.msg('当前账号在该区服未创建角色')
|
||||
}
|
||||
if (!isTestingAccount) {
|
||||
return layer.msg('此账号非测试账号')
|
||||
}
|
||||
var html = "<option value=''>请选择角色</option>";
|
||||
for (var i in roles){
|
||||
html += "<option value='"+roles[i].role_id+"'>"+roles[i].role_name+"</option>"
|
||||
}
|
||||
$("#role-select").html(html);
|
||||
$("#role-select").select2();
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
function getUserRoles(userAccount, gameId, serverId, callback) {
|
||||
$.ajax({
|
||||
url: "{:U('getUserRoles')}",
|
||||
type: "post",
|
||||
data: { user_account: userAccount, game_id: gameId, server_id: serverId },
|
||||
dataType: 'json',
|
||||
success: function(result){
|
||||
if (result.status == 1) {
|
||||
var roles = result.data.roles
|
||||
var isTestingAccount = result.data.is_testing_account
|
||||
callback(roles, isTestingAccount)
|
||||
} else {
|
||||
layer.msg(result.message)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$('#bind_account').on({
|
||||
blur: function () {
|
||||
var gameId = $('#game-select').val()
|
||||
if (gameId == 0) {
|
||||
return layer.msg('请选择游戏')
|
||||
}
|
||||
var serverId = $('#server-select').val()
|
||||
if (serverId == 0) {
|
||||
return layer.msg('请选择区服')
|
||||
}
|
||||
var userAccount = $('#bind_account').val()
|
||||
if (userAccount == '') {
|
||||
return layer.msg('请输入玩家账号')
|
||||
}
|
||||
getUserRoles(userAccount, gameId, serverId, function(roles, isTestingAccount) {
|
||||
if (roles.length == 0) {
|
||||
return layer.msg('玩家账号在该区服未创建角色')
|
||||
}
|
||||
if (isTestingAccount) {
|
||||
return layer.msg('此账号为测试账号,无法绑定')
|
||||
}
|
||||
var html = "<option value=''>请选择角色</option>";
|
||||
for (var i in roles){
|
||||
html += "<option value='"+roles[i].role_id+"'>"+roles[i].role_name+"</option>"
|
||||
}
|
||||
$("#bind-role-select").html(html);
|
||||
$("#bind-role-select").select2();
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
function getRecords() {
|
||||
var records = []
|
||||
$('#resource-table tbody tr').each(function (index, tr) {
|
||||
var num = $(tr).find('input[name=num]').val()
|
||||
var remark = $(tr).find('input[name=remark]').val()
|
||||
var resourceId = $(tr).attr('data-resource-id')
|
||||
var resourceTypeId = $(tr).attr('data-resource-type-id')
|
||||
records.push({
|
||||
resource_id: resourceId,
|
||||
resource_type_id: resourceTypeId,
|
||||
num: num,
|
||||
remark: remark,
|
||||
})
|
||||
})
|
||||
return records
|
||||
}
|
||||
|
||||
$('#bind-btn').click(function () {
|
||||
var box = $('#bind-box')
|
||||
layer.open({
|
||||
title: '绑定玩家角色',
|
||||
type: 1,
|
||||
content: box,
|
||||
area: ['500px', '250px'],
|
||||
zIndex: 250,
|
||||
scrollbar: false
|
||||
})
|
||||
});
|
||||
|
||||
$('#submit-bind').click(function () {
|
||||
var gameId = $('#game-select').val()
|
||||
if (gameId == 0) {
|
||||
return layer.msg('请选择游戏')
|
||||
}
|
||||
var roleId = $('#role-select').val()
|
||||
if (roleId == 0) {
|
||||
return layer.msg('请选择测试账号角色')
|
||||
}
|
||||
var bindRoleId = $('#bind-role-select').val()
|
||||
if (bindRoleId == 0) {
|
||||
return layer.msg('请选择玩家角色')
|
||||
}
|
||||
$.ajax({
|
||||
url: "{:U('bindRole')}",
|
||||
type: "post",
|
||||
data: { game_id: gameId, bind_role_id: bindRoleId, testing_role_id: roleId},
|
||||
dataType: 'json',
|
||||
success: function(result){
|
||||
if (result.status == 1) {
|
||||
layer.msg(result.message, function(){
|
||||
window.location.href = window.location.href
|
||||
})
|
||||
} else {
|
||||
layer.msg(result.message)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
$('#submit-btn').on({
|
||||
click: function () {
|
||||
var records = getRecords()
|
||||
|
||||
if (records.length == 0) {
|
||||
return layer.msg('至少添加一项资源申请')
|
||||
}
|
||||
|
||||
for (var i in records) {
|
||||
if (records[i].num == '') {
|
||||
return layer.msg('请输入资源数量')
|
||||
}
|
||||
}
|
||||
|
||||
var gameId = $('#game-select').val()
|
||||
var serverId = $('#server-select').val()
|
||||
var userAccount = $('#test_account').val()
|
||||
var roleId = $('#role-select').val()
|
||||
|
||||
if (gameId == 0) {
|
||||
return layer.msg('请选择游戏')
|
||||
}
|
||||
if (serverId == 0) {
|
||||
return layer.msg('请选择区服')
|
||||
}
|
||||
if (userAccount == '') {
|
||||
return layer.msg('请输入测试资源账号')
|
||||
}
|
||||
if (roleId == 0) {
|
||||
return layer.msg('请选择角色')
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "{:U('doApply')}",
|
||||
type: "post",
|
||||
data: { records: records, game_id: gameId, server_id: serverId, user_account: userAccount, role_id: roleId},
|
||||
dataType: 'json',
|
||||
success: function(result){
|
||||
if (result.status == 1) {
|
||||
layer.msg(result.message, function(){
|
||||
parent.window.location.href = "{:U('batches')}"
|
||||
})
|
||||
} else {
|
||||
layer.msg(result.message)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
$('#close-btn').on({
|
||||
click: function () {
|
||||
var index = parent.layer.getFrameIndex(window.name)
|
||||
parent.layer.close(index)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,156 @@
|
||||
<extend name="Public/basic"/>
|
||||
<block name="body">
|
||||
<style>
|
||||
.trunk-search .form-group {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.normal_table input {
|
||||
position: relative;
|
||||
padding: 5px;
|
||||
border: 1px solid #E5E5E5;
|
||||
border-radius: 4px;
|
||||
height: 25px;
|
||||
}
|
||||
.normal_table td {
|
||||
padding: 5px;
|
||||
}
|
||||
.normal_table td select {
|
||||
width: 100%;
|
||||
}
|
||||
.normal_table td button {
|
||||
width: 70px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.normal_table td button.delete-row {
|
||||
background-color: rgb(249,104,104);
|
||||
}
|
||||
.btn-row {
|
||||
position: relative;
|
||||
font-size: 11px;
|
||||
margin-top: 28px;
|
||||
text-align: center;
|
||||
}
|
||||
.btn-row button {
|
||||
width: 70px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
.btn-row button.close-btn {
|
||||
background: #E5E5E5;
|
||||
color: #535875;
|
||||
}
|
||||
.form-group .static-input {
|
||||
line-height: 32px;
|
||||
display: inline-block;
|
||||
}
|
||||
.trunk-search button {
|
||||
width: 70px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
background: #409eff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
.info-row {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.info-row button {
|
||||
width: 120px;
|
||||
height: 25px;
|
||||
display: block;
|
||||
background: #E5E5E5;
|
||||
color: #535875;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.normal_table td .status-0 {
|
||||
color: #e6a23c;
|
||||
}
|
||||
.normal_table td .status-1 {
|
||||
color: #67c23a;
|
||||
}
|
||||
.normal_table td .status-2 {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.normal_table tr td {
|
||||
padding: 10px 5px;
|
||||
}
|
||||
</style>
|
||||
<div class="page-search normal_list promoteCoin-record-search" style="padding: 20px;">
|
||||
<div class="trunk-content article">
|
||||
<div class="trunk-list list_normal">
|
||||
<div class="table-wrapper" style="height: 200px;">
|
||||
<table id="resource-table" class="table normal_table">
|
||||
<tr class="odd zwm_tr">
|
||||
<th>申请ID</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>
|
||||
<empty name="records">
|
||||
<tr><td colspan="14" style="text-align: center;height: 45vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
|
||||
<else />
|
||||
<volist name="records" id="record" mod="2">
|
||||
<tr data-id="{$record.id}" class="<eq name='mod' value='1'>odd</eq>">
|
||||
<td>{$record.id}</td>
|
||||
<td>
|
||||
<?=substr($record['create_time'], 0, 10)?>
|
||||
<br>
|
||||
<?=substr($record['create_time'], 10)?>
|
||||
</td>
|
||||
<td>{$record.game_name}</td>
|
||||
<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>
|
||||
<td>{$record.amount}</td>
|
||||
<td>{$record.remark}</td>
|
||||
<td><span class="status-{$record.provide_status}">{$record.provide_status_text}</span></td>
|
||||
</tr>
|
||||
</volist>
|
||||
</empty>
|
||||
</table>
|
||||
</div>
|
||||
<!-- <div class="pagenation clearfix">
|
||||
{$pagination}
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
<block name="script">
|
||||
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
</block>
|
Loading…
Reference in New Issue