管理后台>推广员>结算管理>推广提现--增加自动审核功能

master
chenxiaojun 5 years ago
parent 10665cc869
commit 73f1055303

@ -1073,7 +1073,7 @@ public function auto_rrdae(){
$map['level'] = 1;
$map['ver_status'] = 1;
$map['settlement_type'] = ($settlement == 3) ? 1 : $settlement;
$promotes = M('promote', 'tab_')->field('id, account, chain, settlement_type')->where($map)->select();
$promotes = M('promote', 'tab_')->field('id, account, chain, settlement_type, auto_review_withdraw_status')->where($map)->select();
$success = 0;
$error_withdraw = 0;
$error_spend = 0;

@ -2,6 +2,7 @@
namespace Admin\Controller;
use Admin\Model\PromoteModel;
use Home\Controller\FileController;
use User\Api\UserApi as UserApi;
use Admin\Model\WithdrawModel;
@ -1005,6 +1006,7 @@ class QueryController extends ThinkController
public function withdraw()
{
$page = I('p', 1);
$row = I('row', 10);
$map['_string'] = '1=1';
$adminid = C('USER_ADMINISTRATOR');//获取超管id
$adminmobile = M('UcenterMember')->field('mobile')->find($adminid);
@ -1030,6 +1032,13 @@ class QueryController extends ThinkController
} else {
$map['promote_id'] = array('gt', 0);
}
if (!empty($_REQUEST['company_id'])) {
$promoteIds = D('promote')->where(['company_id' => $_REQUEST['company_id']])
->getField('id', true);
$promoteIds = $promoteIds ?? [-1];
$where['promote_id'] = ['in', $promoteIds];
$map['_complex'] = $where;
}
$order = 'create_time desc';
if (isset($_REQUEST['data_order'])) {
@ -1042,40 +1051,68 @@ class QueryController extends ThinkController
}
}
}
$fields = 'id, widthdraw_number, sum_money, promote_id, promote_account, op_id, op_type, last_op_id, last_op_type, settlement_type, settlement_begin_time, settlement_end_time, create_time, status, respond, audit_time';
$count = 0;
if (I('export', 0) == 1) {
$records = D('withdraw')->field('widthdraw_number, sum_money, promote_account, op_id, op_type, last_op_id, last_op_type, settlement_type, settlement_begin_time, settlement_end_time, create_time, status, respond, audit_time')
$records = D('withdraw')->field($fields)
->where($map)
->order($order)
->select();
if (!empty($records)) {
$data = [];
foreach ($records as $record) {
$record['op_id_text'] = $this->getOpTypeText($record['op_type'], $record['op_id']);
$record['last_op_id_text'] = $this->getOpTypeText($record['last_op_type'], $record['last_op_id']);
$record['op_type_text'] = getPromoteWithdrawOpType($record['op_type']);
$record['last_op_type_text'] = getPromoteWithdrawOpType($record['last_op_type']);
$record['settlement_type_text'] = getPromoteWithdrawSettlementType($record['settlement_type']);
$data[] = [
'widthdraw_number' => $record['widthdraw_number'],
'sum_money' => $record['sum_money'],
'promote_account' => $record['promote_account'],
'op_id_text' => $this->getOpTypeText($record['op_type'], $record['op_id']),
'last_op_id_text' => $this->getOpTypeText($record['last_op_type'], $record['last_op_id']),
'op_type_text' => getPromoteWithdrawOpType($record['op_type']),
'last_op_type_text' => getPromoteWithdrawOpType($record['last_op_type']),
'settlement_type_text' => getPromoteWithdrawSettlementType($record['settlement_type']),
'settlement_begin_time' => $record['settlement_begin_time'] ? date('Y-m-d H:i:s', $record['settlement_begin_time']) : '--',
'settlement_end_time' => date('Y-m-d H:i:s', $record['settlement_end_time']),
'create_time' => date('Y-m-d H:i:s', $record['create_time']),
'status_text' => promoteWithdrawStatus($record['status']),
'respond' => $record['respond'],
'audit_time' => $record['audit_time'] ? date('Y-m-d H:i:s', $record['audit_time']) : '--',
];
} else {
$records = D('withdraw')->field($fields)
->where($map)
->order($order)
->page($page, $row)
->select();
$count = D('withdraw')->field($fields)
->where($map)
->count();
}
$datas = [];
if (!empty($records)) {
$promoteIds = array_column($records, 'promote_id');
$promoteCompanys = D('promote')->join('tab_promote_company as company on tab_promote.company_id = company.id')
->where(['tab_promote.id' => ['in', $promoteIds]])
->getField('tab_promote.id, company.company_name', true);
foreach ($records as $record) {
$record['op_id_text'] = $this->getOpTypeText($record['op_type'], $record['op_id']);
$record['last_op_id_text'] = $this->getOpTypeText($record['last_op_type'], $record['last_op_id']);
$record['op_type_text'] = getPromoteWithdrawOpType($record['op_type']);
$record['last_op_type_text'] = getPromoteWithdrawOpType($record['last_op_type']);
$record['settlement_type_text'] = getPromoteWithdrawSettlementType($record['settlement_type']);
$record['company_name'] = isset($promoteCompanys[$record['promote_id']]) ? $promoteCompanys[$record['promote_id']] : '未知';
$data = [
'widthdraw_number' => $record['widthdraw_number'],
'sum_money' => $record['sum_money'],
'company_name' => $record['company_name'],
'promote_account' => $record['promote_account'],
'op_id_text' => $this->getOpTypeText($record['op_type'], $record['op_id']),
'last_op_id_text' => $this->getOpTypeText($record['last_op_type'], $record['last_op_id']),
'op_type_text' => getPromoteWithdrawOpType($record['op_type']),
'last_op_type_text' => getPromoteWithdrawOpType($record['last_op_type']),
'settlement_type_text' => getPromoteWithdrawSettlementType($record['settlement_type']),
'settlement_begin_time' => $record['settlement_begin_time'] ? date('Y-m-d H:i:s', $record['settlement_begin_time']) : '--',
'settlement_end_time' => date('Y-m-d H:i:s', $record['settlement_end_time']),
'create_time' => date('Y-m-d H:i:s', $record['create_time']),
'status_text' => promoteWithdrawStatus($record['status']),
'respond' => $record['respond'],
'audit_time' => $record['audit_time'] ? date('Y-m-d H:i:s', $record['audit_time']) : '--',
];
if (I('export', 0) != 1) {
$data['id'] = $record['id'];
$data['status'] = $record['status'];
}
$datas[] = $data;
}
if (I('export', 0) == 1) {
$field = [
'widthdraw_number' => '结算单号',
'sum_money' => '结算金额',
'company_name' => '推广公司',
'promote_account' => '推广员账号',
'op_id_text' => '操作人',
'op_type_text' => '操作人类型',
@ -1089,17 +1126,11 @@ class QueryController extends ThinkController
'respond' => '说明',
'audit_time' => '审核时间',
];
data2csv($data,"推广结算", $field);
data2csv($datas,"推广结算", $field);
exit;
}
}
$model = array(
'm_name' => 'withdraw',
'order' => $order,
'title' => '渠道提现',
'template_list' => 'withdraw',
);
$map1 = array('status' => ['neq', -1]);
//为数据权限添加
setPowerPromoteIds($map1);
@ -1110,15 +1141,21 @@ class QueryController extends ThinkController
$this->assign('total', $total);
$this->assign('ttotal', $ttotal);
$this->assign('ytotal', $ytotal);
$user = A('Bill', 'Event');
$this->m_title = '推广提现';
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Query/withdraw', 'status' => 1])->find());
$page = set_pagination($count, $row);
if($page) {
$this->assign('_page', $page);
}
//为数据权限添加
setPowerPromoteIds($map);
$companys = getPromoteCompanys();
$this->assign('companys', $companys);
$this->assign('is_admin', is_administrator());
$user->money_list($model, $page, $map);
$this->assign('list_data', $datas);
$this->display();
}
public function getWithdraw()
@ -1669,4 +1706,87 @@ class QueryController extends ThinkController
}
$this->ajaxReturn(['balance' => $balance]);
}
public function autoReview($autoStatus = 0)
{
if ($_POST) {
$promoteIds = I('ids', '');
$autoStatus = intval($autoStatus);
if (empty($promoteIds)) {
$this->error('请选择需要操作的数据');
}
if (!in_array($autoStatus, [0, 1])) {
$this->error('参数错误');
}
$map['id'] = ['in', $promoteIds];
$time = time();
$save['auto_review_withdraw_status'] = $autoStatus;
$save['auto_review_withdraw_updated_time'] = $time;
$result = D('promote')->where($map)->save($save);
if ($result === false) {
$this->error('操作失败');
} else {
$this->success('操作成功');
}
} else {
$page = intval(I('p', 1));
$row = intval(I('row', 10));
$companyId = intval(I('company_id', 0));
$promoteId = intval(I('promote_id', 0));
$autoReviewWithdrawStatus = I('status', '');
if ($companyId > 0) {
$map['company_id'] =$companyId;
}
if ($promoteId > 0) {
$map['id'] =$promoteId;
}
if ($autoReviewWithdrawStatus !== '') {
$map['auto_review_withdraw_status'] = $autoReviewWithdrawStatus;
}
$map['level'] = 1;
$field = 'id, account, company_id, auto_review_withdraw_status';
$promotes = D('promote')->field($field)
->where($map)
->order('auto_review_withdraw_updated_time desc')
->page($page, $row)
->select();
$count = D('promote')->field($field)
->where($map)
->count();
$companys = getPromoteCompanys();
$companyList = array_column($companys, 'company_name', 'id');
$promoteList = (new PromoteModel())->getPromotersByLevel();
$records = [];
if (!empty($promotes)) {
foreach ($promotes as $promote) {
$promote['company_name'] = $companyList[$promote['company_id']] ?? '未知';
if ($promote['auto_review_withdraw_status'] == 0) {
$className = 'auto-closed';
$text = '关闭';
} else {
$className = 'auto-open';
$text = '开启';
}
$promote['auto_review_withdraw_status_text'] = "<span class='{$className}'>{$text}</span>";
$records[] = $promote;
}
}
$page = set_pagination($count, $row);
if($page) {
$this->assign('_page', $page);
}
$this->assign('meta_title', '推广提现自动审核管理');
$this->assign('records', $records);
$this->assign('count', $count);
$this->assign('companys', $companys);
$this->assign('promoteList', $promoteList);
$this->display('auto_review');
}
}
}

@ -193,7 +193,7 @@ class WithdrawModel extends Model{
$add['promote_id'] = $promote['id'];
$add['promote_account'] = $promote['account'];
$add['create_time'] = $thisTime;
$add['status'] = 0;
$add['status'] = ($promote['auto_review_withdraw_status'] == 1) ? 1 : 0;
$add['widthdraw_number'] = D('withdraw')->produceWithdrawNumber(1);
$add['settlement_begin_time'] = $settlementBeginTime;
$add['settlement_end_time'] = $settlementEndTime;
@ -252,7 +252,7 @@ class WithdrawModel extends Model{
$promoteGameRatioMap['status'] = 1;
$promoteGameRatioMap['promote_id'] = $promote['id'];
$promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time')
$promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time, interval_closed_status')
->where($promoteGameRatioMap)
->order('update_time desc')
->select();
@ -278,10 +278,19 @@ class WithdrawModel extends Model{
->where($spendWhere)
->find()['sum_amount'];
$sumAmount = $sumAmount ?? 0;
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
if ($promoteGameRatio['interval_closed_status'] == 1) {
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
}
}
} else {
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount > $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
}
}
}
@ -322,7 +331,7 @@ class WithdrawModel extends Model{
$add['promote_id'] = $promote['id'];
$add['promote_account'] = $promote['account'];
$add['create_time'] = $thisTime;
$add['status'] = 0;
$add['status'] = ($promote['auto_review_withdraw_status'] == 1) ? 1 : 0;
$add['widthdraw_number'] = D('withdraw')->produceWithdrawNumber(2);
$add['settlement_begin_time'] = $settlementBeginTime;
$add['settlement_end_time'] = $settlementEndTime;
@ -360,7 +369,7 @@ class WithdrawModel extends Model{
{
$promoteGameRatioMap['status'] = 1;
$promoteGameRatioMap['promote_id'] = $promote['id'];
$promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time')
$promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time, interval_closed_status')
->where($promoteGameRatioMap)
->order('update_time desc')
->select();
@ -399,10 +408,19 @@ class WithdrawModel extends Model{
->find()['sum_amount'];
$sumAmount = $sumAmount ?? 0;
$ratio = 0;
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
if ($promoteGameRatio['interval_closed_status'] == 1) {
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
}
}
} else {
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount > $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
}
}
}
@ -433,7 +451,7 @@ class WithdrawModel extends Model{
$add['promote_id'] = $promote['id'];
$add['promote_account'] = $promote['account'];
$add['create_time'] = $thisTime;
$add['status'] = 0;
$add['status'] = ($promote['auto_review_withdraw_status'] == 1) ? 1 : 0;
$add['widthdraw_number'] = D('withdraw')->produceWithdrawNumber(3);
$add['settlement_begin_time'] = $settlementBeginTime;
$add['settlement_end_time'] = $settlementEndTime;
@ -457,7 +475,7 @@ class WithdrawModel extends Model{
{
$promoteGameRatioMap['status'] = 1;
$promoteGameRatioMap['promote_id'] = $promote['id'];
$promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time')
$promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time, interval_closed_status')
->where($promoteGameRatioMap)
->order('update_time desc')
->select();
@ -485,10 +503,19 @@ class WithdrawModel extends Model{
->find()['sum_amount'];
$sumAmount = $sumAmount ?? 0;
$ratio = 0;
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
if ($promoteGameRatio['interval_closed_status'] == 1) {
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
}
}
} else {
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount > $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
}
}
}
@ -518,7 +545,7 @@ class WithdrawModel extends Model{
$promoteGameRatioMap['status'] = 1;
$promoteGameRatioMap['promote_id'] = $promote['id'];
$promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time')
$promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time, interval_closed_status')
->where($promoteGameRatioMap)
->order('update_time desc')
->select();
@ -542,10 +569,19 @@ class WithdrawModel extends Model{
->where($spendWhere)
->find()['sum_amount'];
$sumAmount = $sumAmount ?? 0;
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
if ($promoteGameRatio['interval_closed_status'] == 1) {
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
}
}
} else {
foreach ($turnoverRatios as $turnoverRatio) {
if ($sumAmount > $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
}
}
}

@ -0,0 +1,233 @@
<extend name="Public/base"/>
<block name="css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/promote.css" type="text/css"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
<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;}
.textarea-style {
width: 200px;
height: 80px;
border-radius: 5px;
padding: 5px;
}
.mustmark {
color: #FF0000;
font-style: normal;
margin: 0 3px;
}
.auto-closed {
border: 0 solid;
border-radius: 3px;
background-color: #999;
color: #fff;
padding: 5px 10px;
}
.auto-open {
border: 0 solid;
border-radius: 3px;
background-color: #4bbd00;
color: #fff;
padding: 5px 10px;
}
</style>
</block>
<block name="body">
<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="__JS__/jquery.form.js"></script>
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script src="__STATIC__/md5.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
<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="cf top_nav_list">
<empty name="model.extend">
<div class="fl button_list">
<div class="tools">
<a class="ajax-post" target-form="ids" url="{:U('autoReview',array('autoStatus' => 1))}"><span class="button_icon button_icon1"></span>开启自动审核</a>
<a class="ajax-post" target-form="ids" url="{:U('autoReview',array('autoStatus' => 0))}"><span class="button_icon button_icon2"></span>关闭自动审核</a>
</div>
</div>
</empty>
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" >
<option value="">推广公司</option>
<volist name="companys" id="vo">
<option value="{$vo.id}">{$vo.company_name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="promote_id" name="promote_id" class="select_gallery">
<option value="">推广员账号</option>
<volist name="promoteList" id="vo">
<option value="{$vo.id}">{$vo.account}({$vo.real_name})</option>
</volist>
</select>
</div>
<div class="input-list search_label_rehab">
<select name="status" class="select_gallery" style="width:120px;">
<option value="">自动审核</option>
<option value="0">关闭</option>
<option value="1">开启</option>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Query/autoReview','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
<a class="sch-btn" style="background-color: #999;" href="{:U('withdraw')}" >返回</a>
</div>
<!-- <div class="input-list">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>12,),I('get.')))}">导出</a>
</div> -->
</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>-->
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name ="records">
<td colspan="11" class="text-center">aOh! 暂时还没有内容!</td>
<else />
<volist name="records" id="record">
<tr>
<td>
<input class="ids" type="checkbox" value="{$record['id']}" name="ids[]">
</td>
<td>{$record.company_name}</td>
<td>{$record.account}</td>
<td>{$record.auto_review_withdraw_status_text}</td>
</tr>
</volist>
</empty>
<tr class="data_summary">
<td>汇总</td>
<td colspan="99">累计提现:{:null_to_0(floor($total*100)/100)}元</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="page">
<if condition="$is_admin eq true ">
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
</if>
{$_page|default=''}
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Query/withdraw">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</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__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
<script src="__STATIC__/jquery.cookie.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>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Query/withdraw')}');
$(function(){
$(".paixu").click(function(){
var that=$(this);
$data_order=that.attr('data-order');
$order_type='{$userarpu_order}';
console.log($order_type);
if($order_type==''||$order_type=='4'){
$(".sortBy").attr('name','data_order');
val='3,'+$data_order;
$(".sortBy").attr('value',val);
$("#search").click();
}else if($order_type=='3'){
$(".sortBy").attr('name','data_order');
val='4,'+$data_order;
$(".sortBy").attr('value',val);
$("#search").click();
}
});
//搜索功能
$("#search").click(function(){
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
});
</script>
</block>

@ -58,6 +58,7 @@
<div class="tools">
<a class="ajax-post" target-form="ids" url="{:U('set_withdraw_status')}"><span class="button_icon button_icon12"></span>通 过</a>
<a class="agree" data-id="ids"><span class="button_icon button_icon13"></span>驳 回</a>
<a href="{:U('autoReview')}"><span class="button_icon button_icon9 "></span>自动审核管理</a>
</div>
</div>
</empty>
@ -66,6 +67,14 @@
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" >
<option value="">推广公司</option>
<volist name="companys" id="vo">
<option value="{$vo.id}">{$vo.company_name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="promote_id" name="promote_account" class="select_gallery" style="width:120px;">
<option value="">推广员账号</option>
@ -123,6 +132,7 @@
</th>
<th>提现单号</th>
<th><a class="paixu" data-order='sum_money'>提现金额</a></th>
<th>推广公司</th>
<th>推广员账号</th>
<th>操作人</th>
<th>操作人类型</th>
@ -158,41 +168,19 @@
</td>
<td>{$data.widthdraw_number}</td>
<td onclick="details('{$data["id"]}')"><span class="money_color">{$data.sum_money}</span></td>
<td>
<!--<if condition="$is_admin eq true ">
{:get_promote_name($data['promote_id'])}
<else />
{:encryptStr(get_promote_name($data['promote_id']))}
</if>-->
{:get_promote_name($data['promote_id'])}
</td>
<td>
<if condition="$data.op_type eq 1">
{:get_promote_name($data['op_id'])}
<elseif condition="$data.op_type eq 2"/>
{:getAdminNickname($data['op_id'])}
<else/>
自动
</if>
</td>
<td>{:getPromoteWithdrawOpType($data['op_type'])}</td>
<td>
<if condition="$data.last_op_type eq 1">
{:get_promote_name($data['last_op_id'])}
<elseif condition="$data.last_op_type eq 2"/>
{:getAdminNickname($data['last_op_id'])}
<else/>
自动
</if>
</td>
<td>{:getPromoteWithdrawOpType($data['last_op_type'])}</td>
<td>{:getPromoteWithdrawSettlementType($data['settlement_type'])}</td>
<td><notempty name="data.settlement_begin_time">{$data.settlement_begin_time|date='Y-m-d H:i:s',###}<else />---</notempty></td>
<td><notempty name="data.settlement_end_time">{$data.settlement_end_time|date='Y-m-d H:i:s',###}<else />---</notempty></td>
<td><notempty name="data.create_time">{$data.create_time|date='Y-m-d H:i:s',###}<else />---</notempty></td>
<td><span <if condition="$data['status'] == -2">style="color: #999;"</if>>{:promoteWithdrawStatus($data['status'])}</span></td>
<td>{$data.company_name}</td>
<td>{$data.promote_account}</td>
<td>{$data.op_id_text}</td>
<td>{$data.op_type_text}</td>
<td>{$data.last_op_id_text}</td>
<td>{$data.last_op_type_text}</td>
<td>{$data.settlement_type_text}</td>
<td>{$data.settlement_begin_time}</td>
<td>{$data.settlement_end_time}</td>
<td>{$data.create_time}</td>
<td>{$data.status_text}</td>
<td>{$data.respond}</td>
<td><notempty name="data.audit_time">{$data.audit_time|date='Y-m-d H:i:s',###}<else />---</notempty></td>
<td>{$data.audit_time}</td>
<td>
<div class="partakebtn">
<if condition="$data.status eq 0">

@ -1104,4 +1104,12 @@ ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显
-- 2020-02-03
ALTER TABLE `tab_promote_game_ratio`
ADD COLUMN `interval_closed_status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '区间闭合状态1-闭合 2-不闭合' AFTER `last_turnover_ratio`;
ADD COLUMN `interval_closed_status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '区间闭合状态1-闭合 2-不闭合' AFTER `last_turnover_ratio`;
-- 2020-02-04
ALTER TABLE `tab_promote`
ADD COLUMN `auto_review_withdraw_status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '提现自动审核状态0-关闭 1-开启';
ALTER TABLE `tab_promote`
ADD COLUMN `auto_review_withdraw_updated_time` int(10) NOT NULL DEFAULT 0 COMMENT '提现自动审核状态更新时间';
ALTER TABLE `tab_promote`
ADD INDEX `auto_review_withdraw_status`(`auto_review_withdraw_status`) USING BTREE;
Loading…
Cancel
Save