旗云测试资源

master
elf 3 years ago
parent 8bd6133143
commit 44157634d3

@ -1,8 +1,11 @@
<?php
namespace Admin\Controller;
use Base\Service\MendService;
use User\Api\UserApi as UserApi;
use Base\Service\PromoteService as PromoteService;
use Think\Model;
/**
* 后台首页控制器
@ -69,7 +72,7 @@ class MendController extends ThinkController {
//为数据权限添加
setPowerPromoteIds($map);
$data = M("Mend","tab_")
->field("user_account,promote_account,pay_amount,promote_account_to,order_time,create_time,op_account,remark")
->field("user_account,promote_account,pay_amount,promote_account_to,order_time,create_time,op_account,remark,status")
->where($map)
->order("create_time desc");
@ -79,6 +82,7 @@ class MendController extends ThinkController {
$data = $data->page($page, $row)->select();
}
//格式化信息
$mendService = new MendService();
foreach ($data as $key => $value) {
($data[$key]['promote_account']=='官方渠道')?($data[$key]['promote_account']=C('OFFICIEL_CHANNEL')):'';
@ -88,9 +92,10 @@ class MendController extends ThinkController {
if(!$show_data_power){
$data[$key]['user_account'] = encryptStr($data[$key]['user_account']);
}
$data[$key]['status'] = $mendService->getStatusText($value['status']);
}
if($export) db2csv($data,"推广员管理_推广补链_补链记录",["玩家账号","补链前渠道","补链前归属金额","补链后渠道","切分时间","补链时间","操作人员","备注"]);
if($export) db2csv($data,"推广员管理_推广补链_补链记录",["玩家账号","补链前渠道","补链前归属金额","补链后渠道","切分时间","补链时间","操作人员","备注","处理状态"]);
if(IS_POST){
$page = set_pagination($_REQUEST['row_count'],$row);
@ -112,73 +117,37 @@ class MendController extends ThinkController {
$this->assign('show_data_power', $show_data_power);
$this->display();
// parent::lists("Mend",$p,$map);
}
public function edit($id = null)
{
if (IS_POST) {
$promoteService = new PromoteService();
if ($_POST['prmoote_id_to'] == -1){
$_POST['prmoote_id_to'] = 0;
}
if ($_POST['prmoote_id_to'] === ''){
$this->error('请选择需要变更的渠道');
}
if ($_POST['promote_id'] == $_POST['prmoote_id_to']) {
$this->error('没有变更数据');
}
if ($_POST['order_time'] == '') {
$this->error('没有订单日期');
}
//判断是否已经结算
// if(self::checkSettlement(strtotime($_POST['order_time']),$_POST['promote_id'])){
// $this->error('在订单日期内含有已经结算的订单,无法补链');
// }
// if(self::checkSpend(strtotime($_POST['order_time']),$_POST['account'])){
// $this->error("在订单日期内含有已经结算的订单,无法补链。");
// }
if(self::checkOrderTime(strtotime($_POST['order_time']))){
$this->error('仅能补链本周数据,请重新选择补链时间');
}
if(self::checkPromote(strtotime($_POST['order_time']),$_POST['account'])){
$this->error('在订单日期内含有多个推广员,无法补链');
}
$create = $_REQUEST;
$create['order_time'] = date($create['order_time']);
$params = array(
"from_promote_id"=>$create['promote_id'],
"to_promote_id"=>$create['prmoote_id_to'],
"order_time"=>$create['order_time'],
"type"=>2,
"shift_ids"=>[$create['user_id']],
"creator_type"=>0,
"creator_id"=>$_SESSION["onethink_admin"]["user_auth"]["uid"]
);
if(!empty($create['remark'])){
$params['remark'] = $create['remark'];
}
// dump($create);die();
$res = $promoteService->addShiftTask($params);
if($res['status']){
$userData = M('user','tab_')->field('account')->where(['id'=>$create['user_id']])->find();
$promoteToData = M('promote','tab_')->field('account')->where(['id'=>$create['prmoote_id_to']])->find();
$promoteFromData = M('promote','tab_')->field('account')->where(['id'=>$create['promote_id']])->find();
if ($create['promote_id'] == '0') {
$promoteFromData['account'] = '官方渠道';
$params = I('post.');
$service = new MendService();
try {
if (session('user_auth')['allow_over_week'] && $params['allow_over_week'] == 1) {
$params['allow_over_week'] = 1;
} else {
$params['allow_over_week'] = 0;
}
addOperationLog(['op_type'=>1,'key'=>$userData['account'].'/'.$promoteFromData['account'].'/'.$promoteToData['account'],'op_name'=>'编辑推广补链','url'=>U('Mend/edit',['id'=>$create['user_id']]),'menu'=>'推广员-推广员管理-推广补链-编辑推广补链']);
$service->addMendTask($params);
$userData = M('user','tab_')->field(['account', 'promote_id', 'promote_account'])->where(['id' => $params['user_id']])->find();
$promoteToData = M('promote','tab_')->field('account')->where(['id'=> $params['prmoote_id_to']])->find();
addOperationLog([
'op_type' => 1,
'key' => $userData['account'].'/'.$userData['promote_account'].'/'.$promoteToData['account'],
'op_name' => '编辑推广补链',
'url' => U('Mend/edit', ['id' => $userData['id']]),
'menu' => '推广员-推广员管理-推广补链-编辑推广补链',
'content' => json_encode($params)
]);
$this->success('补链成功', U('lists'), 2);
}else{
$this->error($res['msg']);
} catch (\Exception $e) {
$this->error($e->getMessage());
}
} else {
// echo 1;die();
@ -194,8 +163,7 @@ class MendController extends ThinkController {
$this->m_title = '推广补链';
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Mend/lists','status'=>1])->find());
$this->assign('allow_over_week', session('user_auth')['allow_over_week']);
$this->display();
}
}
@ -300,17 +268,11 @@ class MendController extends ThinkController {
public function shiftInfo()
{
$id = I('id');
$info = M("shift_task")->where("id = {$id} and status = 0")->find();
$info = M("mend", 'tab_')->where("id = {$id} and status = 0")->find();
if(empty($info)){
$this->error("补链不存在或已处理");
}
$info['user_id'] = json_decode($info['shift_ids'])[0];
$info['order_time'] = date("Y-m-d",$info['order_time']);
$userid = $info['user_id'];
$info['account'] = M("User","tab_")->field("account")->where("id = '{$userid}'")->find()['account'];
$this->assign('data',$info);
$this->display();
}
@ -318,11 +280,16 @@ class MendController extends ThinkController {
public function cancelShift()
{
$id = I('id');
$status = M('ShiftTask')->where(['id' => $id,'status' => 0])->save(['status' => 2]);
if ($status) {
addOperationLog(['op_type'=>1,'key'=>$id,'op_name'=>'取消补链','url'=>U('Mend/shiftInfo',['id'=>$id]),'menu'=>'推广员-推广员管理-推广补链-取消补链']);
$model = new Model();
$model->startTrans();
$status1 = M('ShiftTask')->where(['id' => $id,'status' => 0])->save(['status' => 2]);
$status2 = M('mend', 'tab_')->where(['task_id' => $id, 'status' => 0])->save(['status' => 2, 'update_time' => time()]);
if ($status1 && $status2) {
$model->commit();
addOperationLog(['op_type'=>1,'key'=>$id,'op_name'=>'取消补链','url'=>U('Mend/shiftInfo',['id'=>$id]),'menu'=>'推广员-推广员管理-推广补链-取消补链']);
$this->ajaxReturn(array("status"=>1,"url"=> U('lists')));
} else {
$this->ajaxReturn(array("status"=>0,"url"=> U('lists')));

@ -72,7 +72,7 @@
<tr>
<td class="l noticeinfo">补链后渠道</td>
<td class="r table_radio">
<select id="prmoote_id_to" name="prmoote_id_to" class="select_gallery">
<select id="promote_id_to" name="promote_id_to" class="select_gallery">
<option value="">下拉选择</option>
<option value="-1">{:C('OFFICIEL_CHANNEL')}</option>
<volist name=":get_promote_list()" id="vo">
@ -90,6 +90,22 @@
<input type="text" name="order_time" autocomplete="off" class="date" value="{:I('order_time')}" placeholder="订单日期" />
</td>
</tr>
<if condition="$allow_over_week==1">
<tr>
<td class="l noticeinfo">是否跨周补链:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="allow_over_week">
</label>
<label>
<input type="radio" class="inp_radio" value="0" name="allow_over_week" checked>
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
</if>
<tr>
<td class="l noticeinfo">备注</td>
<td class="r table_radio">
@ -152,7 +168,7 @@ $(".select_gallery").select2();
//导航高亮
highlight_subnav('{:U('Mend/lists')}');
Think.setValue("prmoote_id_to", {$data.promote_id|default = "''"});
Think.setValue("promote_id_to", {$data.promote_id|default = "''"});
$('#submit').click(function(){
$('#form').submit();
});

@ -65,7 +65,9 @@
<empty name ="list_data">
<td colspan="9" class="text-center">aOh! 暂时还没有内容!</td>
<else />
<?php $mends = getShiftingMends(array_column($list_data, 'id'));?>
<volist name="list_data" id="data">
<?php $mend = $mends[$data['id']] ?? null; ?>
<tr>
<td>
<if condition="$show_data_power eq true ">
@ -96,12 +98,11 @@
</if></td>
<td>
<if condition="getIsTask($data['id']) eq 0 ">
<a style="width:100%;text-align:center" href="{:U('Mend/edit?id='.$data['id'])}">补链</a>
<else/>
<a style="width:100%;text-align:center;color: #f00;" href="{:U('Mend/shiftInfo?id='.getIsTask($data['id']))}">补链中</a>
</if>
<?php if (is_null($mend)):?>
<a style="width:100%;text-align:center" href="{:U('Mend/edit?id='.$data['id'])}">补链</a>
<?php else:?>
<a style="width:100%;text-align:center;color: #f00;" href="{:U('Mend/shiftInfo?id='.$mend['id'])}">补链中</a>
<?php endif;?>
</td>
</tr>
</volist>

@ -75,6 +75,7 @@
<th style="width:400px;">备注</th>
<th>切分时间</th>
<th>补链时间</th>
<th>处理状态</th>
<th>操作人员</th>
</tr>
</thead>
@ -115,6 +116,7 @@
</td>
<td>{$data.order_time}</td>
<td>{$data.create_time}</td>
<td>{$data.status}</td>
<td>{$data.op_account}</td>
</tr>
</volist>

@ -57,20 +57,20 @@
<tr>
<td class="l noticeinfo">用户账号</td>
<td class="r table_radio">
<input name="account" value="{$data['account']}" disabled readonly type="text" class="">
<input name="account" value="{$data['user_account']}" disabled readonly type="text" class="">
</td>
</tr>
<tr>
<td class="l noticeinfo">修改前渠道</td>
<td class="r table_radio">
<input name="old_promote_id" value="{:get_promote_name($data['from_promote_id'])}" disabled readonly type="text" class="">
<input name="old_promote_id" value="{$data['promote_account']}" disabled readonly type="text" class="">
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">补链后渠道</td>
<td class="r table_radio">
<input name="old_promote_id" value="{:get_promote_name($data['to_promote_id'])}" disabled readonly type="text" class="">
<input name="old_promote_id" value="{$data['promote_account_to']}" disabled readonly type="text" class="">
<span class="notice-text"></span>
</td>
</tr>
@ -102,7 +102,7 @@
<div class="form-item cf">
<button class="submit_btn mlspacing" id="submit" data-id="{$data.id}">
<button class="submit_btn mlspacing" id="submit" data-id="{$data.task_id}">
取消补链
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" >

@ -0,0 +1,104 @@
<?php
namespace Base\Service;
class MendService
{
public static $statusList = [
0 => '处理中',
1 => '处理成功',
2 => '处理失败',
];
public function getStatusText($status)
{
return self::$statusList[$status] ?? '未知';
}
public function addMendTask($params, $permPromote = null, $handlePromote = null)
{
$userId = $params['user_id'] ?? 0;
$orderTime = $params['order_time'] ?? '';
$toPromoteId = $params['promote_id_to'] ?? '';
$allowOverWeek = $params['allow_over_week'] ?? 0;
$promoteService = new PromoteService();
if ($toPromoteId == -1) {
$toPromoteId = 0;
}
if ($toPromoteId === '') {
throw new \Exception('请选择需要变更的渠道');
}
$user = M('user', 'tab_')->where(['id' => $userId])->find();
if (!$user) {
throw new \Exception('用户不存在');
}
if ($user['promote_id'] == $toPromoteId) {
throw new \Exception('没有变更数据');
}
if ($orderTime == '') {
throw new \Exception('没有订单日期');
}
if (strtotime($orderTime) > time()) {
throw new \Exception('订单时间不能大于今天');
}
if ($permPromote) {
$levelColumn = 'level'. $permPromote['level'] . '_id';
$promote = M('promote', 'tab_')->where(['id' => $user['promote_id']])->where([$levelColumn => $permPromote['id']])->find();
if (!$promote) {
throw new \Exception('所属推广员异常');
}
}
if (!$allowOverWeek && !$this->checkOrderTime(strtotime($orderTime))) {
throw new \Exception('仅能补链本周数据,请重新选择补链时间');
}
if (!$this->checkPromote(strtotime($orderTime), $user['account'])) {
throw new \Exception('在订单日期内含有多个推广员,无法补链');
}
$data = [
'from_promote_id' => $user['promote_id'],
'to_promote_id' => $toPromoteId,
'order_time' => $orderTime,
'type' => 2,
'shift_ids' => [$userId],
'creator_type' => $handlePromote ? 1 : 0,
'creator_id' => $handlePromote ? $handlePromote['id'] : $_SESSION["onethink_admin"]["user_auth"]["uid"]
];
if(!empty($params['remark'])){
$data['remark'] = $params['remark'];
}
$result = $promoteService->addShiftTask($data);
if (!$result['status']) {
throw new \Exception($result['msg']);
}
}
private function checkOrderTime($orderTime)
{
$sdefaultDate = date('Y-m-d');
$first = 1; //周一开始
$w = date('w',strtotime($sdefaultDate));
$checktime = strtotime("$sdefaultDate -" . ($w ? $w - $first : 6) .' days'); //本周开始时间
if($orderTime >= $checktime){
//在本周允许换绑
return true;
}
return false;
}
private function checkPromote($orderTime, $account)
{
$res = M('Spend','tab_')->field('promote_id')->where(['pay_time' => array('EGT', $orderTime), 'user_account' => $account])->group('promote_id')->select();
if(count($res) > 1) {
return false;
}
return true;
}
}

@ -0,0 +1,136 @@
<?php
namespace Home\Controller;
use Base\Service\MendService;
use Base\Service\PromoteService;
/**
* 补链控制器
*/
class MendController extends BaseController
{
protected function _initialize()
{
parent::_initialize();
}
public function index()
{
if (!$this->canViewMend) {
return $this->error('没有权限');
}
$page = intval(I('p', 1));
$row = intval(I('row', 10));
$params = I('get.');
$loginer = $this->getLoginPromote();
$promoteService = new PromoteService();
$permPromote = $loginer;
if ($loginer['shift_over_apply'] == 1) {
$permPromote = $promoteService->getTopPromote($loginer);
}
$map = ['op_type' => 1, '_string' => '1=1'];
if(isset($params['account'])) {
$map['user_account']= ['like', '%' . $params['account'] . '%'];
}
if(!empty($params['promote_id'])) {
$map['promote_id']= $params['promote_id'];
}
if(!empty($params['promote_id_to'])) {
$map['promote_id_to'] = $params['promote_id_to'];
}
if(!empty($params['op_id'])) {
$map['op_id'] = $params['op_id'];
}
if (!empty($params['time_start'])) {
$map['order_time'] = ['egt', strtotime($params['time_start'])];
}
if (!empty($params['time_end'])) {
$map['order_time'] = ['elt', strtotime($params['time_end']) + 86399];
}
$subInSql = $promoteService->subInSql($permPromote);
$map['_string'] .= ' and (promote_id in (' . $subInSql . ') or promote_id_to in (' . $subInSql . '))';
$records = M('mend', 'tab_')->where($map)->order('create_time desc')->page($page, $row)->select();
$count = M('mend', 'tab_')->where($map)->count();
$mendService = new MendService();
foreach ($records as $key => $record) {
$record['status_text'] = $mendService->getStatusText($record['status']);
$records[$key] = $record;
}
$page = set_pagination($count, $row, $params);
if ($page) {
$this->assign('_page', $page);
}
$levelColumn = 'level'. $permPromote['level'] . '_id';
$promotes = M('promote', 'tab_')->field(['id', 'account'])->where([$levelColumn => $permPromote['id']])->select();
$this->assign('promotes', $promotes);
$this->assign('count', $count);
$this->assign('records', $records);
$this->meta_title = '补链记录';
$this->display();
}
public function add()
{
if (!$this->canViewMend) {
return $this->error('没有权限');
}
$userId = I('user_id', 0);
$user = M('user', 'tab_')->where(['id' => $userId])->find();
if (!$user) {
return $this->error('用户不存在');
}
$loginer = $this->getLoginPromote();
$permPromote = $loginer;
$promoteService = new PromoteService();
if ($loginer['shift_over_apply'] == 1) {
$permPromote = $promoteService->getTopPromote($loginer);
}
$levelColumn = 'level'. $permPromote['level'] . '_id';
$promote = M('promote', 'tab_')->where(['id' => $user['promote_id']])->where([$levelColumn => $permPromote['id']])->find();
if (!$promote) {
return $this->error('所属推广员异常');
}
$promotes = M('promote', 'tab_')->field(['id', 'account'])->where([$levelColumn => $permPromote['id']])->select();
$this->meta_title = '玩家补链';
$this->assign('user', $user);
$this->assign('promotes', $promotes);
$this->display();
}
public function save()
{
$params = I('post.');
$loginer = $this->getLoginPromote();
$permPromote = $loginer;
$promoteService = new PromoteService();
if ($loginer['shift_over_apply'] == 1) {
$permPromote = $promoteService->getTopPromote($loginer);
}
$service = new MendService();
try {
$service->addMendTask($params, $permPromote, $loginer);
$this->ajaxReturn(['status' => 1, 'msg' => '补链申请成功']);
} catch (\Exception $e) {
$this->ajaxReturn(['status' => 0, 'msg' => $e->getMessage()]);
}
}
}

@ -0,0 +1,168 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/platform.css" rel="stylesheet">
<style>
.trunk-list .table3 {width: 100%;}
.table3 tr td{border: 1px solid #E0E7EF;}
.pagenation{line-height: 6.5vh;}
.pagenation>div {text-align: right;}
.trunk-list .table3 tr {height: 4.2vh;}
.table_scroll {width:100%;table-layout:fixed;}
.table_scroll tr td {border:none;border-right:1px solid #E0E7EF;}
.table_scroll tr td:last-child{border-right:none;}
.table_scroll tr+tr td {border-top:1px solid #E0E7EF;}
.btn {cursor: pointer;}
</style>
</block>
<block name="body">
<div class="page-search normal_list promoteCoin-shift-search">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>数据管理></span><span>玩家补链</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_yve.png"><span class="title_main">玩家补链</span>
</div>
<div class="trunk-content article">
<div class="trunk-list" style="padding-top:33px;">
<form id="form" action="{:U('save')}" method="post">
<input type="hidden" name="user_id" value="<?=$user['id']?>">
<table class="table2">
<tbody>
<tr>
<td class="l"><span class="req">*</span>用户账号:</td>
<td class="r">
<input type="text" class="name txt" disabled value="<?=getHideAccount($user['account'])?>">
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>修改前推广员:</td>
<td class="r">
<input type="text" class="name txt" disabled value="<?=$user['promote_account']?>">
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>补链后推广员:</td>
<td class="r">
<select name="promote_id_to" class="reselect select_gallery" style="width: 220px;" >
<option value="">请选择推广账号</option>
<?php foreach($promotes as $promote):?>
<option value="<?=$promote['id']?>"><?=$promote['account']?></option>
<?php endforeach;?>
</select>
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>订单日期:</td>
<td class="r">
<input id="shift-order-time" type="text" autocomplete="off" class="name txt" name="order_time" placeholder="订单日期"" value="" style="width: 199px;">
</td>
</tr>
<tr>
<td class="l">备注:</td>
<td class="r">
<textarea name="remark" id="" cols="30" rows="10" class="name txt" style="padding: 10px"></textarea>
</td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<button type="button" class="tjbnt btn" onclick="check()" >确认</button>
<button type="button" style="background: #E5E5E5; color: #8B8CA0;" class="tjbnt btn" onclick="window.history.back();" >返回</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<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 type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$(function(){
$("#promote_id").change();
$("#promote_child").change();
$(".select_gallery").select2();
$('#shift-order-time').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true,
scrollMonth:false,
scrollTime:false,
scrollInput:false
})
});
function addParamsToUrl(url, params)
{
var pos = url.indexOf('.html')
url = url.substring(0, pos)
for (var i in params) {
url += '/' + i + '/' + params[i]
}
url += '.html'
return url
}
function submit() {
var userId = $('[name=user_id]').val()
var toPromoteId = $('[name=promote_id_to]').val()
var remark = $('[name=remark]').val()
var orderTime = $('[name=order_time]').val()
$.ajax({
type:"POST",
url:"{:U('save')}",
data: {
user_id: userId,
remark: remark,
promote_id_to: toPromoteId,
order_time: orderTime,
},
success:function(res){
if(res.status==1){
layer.msg(res.msg);
setTimeout(function(){
window.location.href = "{:U('Mend/index')}";
}, 1500);
} else {
layer.msg(res.msg);
}
}
})
}
function check() {
data = validation();
if (data.status != 1) {
layer.msg(data.msg, {icon: 2});
return false;
} else {
submit();
}
}
function validation() {
var json_data = "";
var limits = parseInt("{$loginer['balance_coin']|default=0}");
if ($('[name=promote_id_to]').val() == '') {
return json_data = {'status': 0, 'msg': '请选择补链后推广员'}
}
if ($('#shift-order-time').val() == '') {
return json_data = {'status': 0, 'msg': '请选择订单日期'}
}
return json_data = {'status': 1, 'msg': '成功'};
}
</script>
</block>

@ -0,0 +1,179 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/manager.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css?v=1.2" rel="stylesheet">
</block>
<block name="body">
<div class="page-search normal_list query-register-search jssearch" style="font-size: small;">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>数据管理></span><span>补链记录</span></div>
</div>
<img src="__IMG__/20180207/icon_zhuce.png">
<span class="title_main">补链记录</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<!-- <form action="{:U('Query/viewRole',array('row'=>I('get.row'),'id'=>I('get.id')))}" method="post" enctype="multipart/form-data">-->
<div class="form-group normal_space fl">
<input type="text" name="account" class="txt normal_txt" placeholder="请输入玩家账号"
value="{:I('account')}">
</div>
<div class="form-group normal_space fl">
<select id="promote_id" name="promote_id" class="reselect select_gallery">
<option value="">补链前推广员</option>
<volist name="promotes" id="vo">
<option value="{$vo.id}" title="{$vo.account}">{$vo.account}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fl">
<select id="promote_id_to" name="promote_id_to" class="reselect select_gallery">
<option value="">补链后推广员</option>
<volist name="promotes" id="vo">
<option value="{$vo.id}" title="{$vo.account}">{$vo.account}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fl">
<select id="op_id" name="op_id" class="reselect select_gallery">
<option value="">操作人员</option>
<volist name="promotes" id="vo">
<option value="{$vo.id}" title="{$vo.account}">{$vo.account}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fl">
<label class="form-title select-title" style="position: relative;">起止时间:</label>
<div class="select-time">
<input type="text" id="sdate" class="txt" name="time_start" placeholder="开始时间" value="{:I('time_start')}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" id="edate" class="txt" name="time_end" placeholder="结束时间" value="{:I('time_end')}">
</div>
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" id='submit' url="{:U('Mend/index',array('model'=>$model['name']),false)}"
value="查询">
</div>
<!-- </form>-->
</div>
</div>
<div class="page-list query-register-list">
<div class="trunk-content article">
<div class="trunk-list list_normal" style="">
<table class="table normal_table">
<tr class="odd">
<th>玩家账号</th>
<th>补链前推广账号</th>
<th>补链前归属金额</th>
<th>补链后推广账号</th>
<th>备注</th>
<th>切分时间</th>
<th>补链时间</th>
<th>状态</th>
<th>操作人员</th>
</tr>
<empty name="records">
<tr class="num2">
<td colspan="7" 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="vo">
<tr class="num2">
<td><?=getHideAccount($vo['user_account'])?></td>
<td>{$vo.promote_account}</td>
<td>{$vo.pay_amount}</td>
<td>{$vo.promote_account_to}</td>
<td>{$vo.remark}</td>
<td>{$vo.order_time|date='Y-m-d H:i:s',###}</td>
<td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
<td>{$vo.status_text}</td>
<td>{$vo.op_account}</td>
</tr>
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</div>
</div>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<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 type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$().ready(function () {
setValue('promote_id', {$Think.request.promote_id |default = '""'});
setValue('promote_id_to', {$Think.request.promote_id_to |default = '""'});
setValue('op_id', {$Think.request.op_id |default = '""'});
setValue('row', '{:I("get.row",10)}');
var date = "{$setdate}";
$('#sdate').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
scrollMonth: false,
scrollTime: false,
scrollInput: false,
endDate: date
});
$('#edate').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
pickerPosition: 'bottom-left',
scrollMonth: false,
scrollTime: false,
scrollInput: false,
endDate: date
});
$(".select_gallery").select2();
$('#submit').click(function () {
var sdate = $('#sdate').val();
var edate = $('#edate').val();
if (Date.parse(sdate) > Date.parse(edate)) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
var url = $(this).attr('url');
console.log(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;
});
});
</script>
</block>
Loading…
Cancel
Save