Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
tpingzhang 5 years ago
commit d600b8d7aa

@ -20,17 +20,21 @@ class SupportController extends ThinkController {
if(I('game_id')){
$map['game_id']=I('game_id');
}
if(!empty(I('support_type')) || I('support_type')==='0'){
$map['support_type']=I('support_type');
if(!empty(I('apply_type')) || I('apply_type')==='0'){
$map['apply_type']=I('apply_type');
}
//
if(!empty(I('apply_status')) || I('apply_status')==='0'){
$map['apply_status']=I('apply_status');
}
/* 获取频道列表 */
$list = M('support','tab_')
->field('id,promote_id,promote_account,user_id,user_account,game_id,game_name,server_name,role_name,support_num,support_type,create_time,status,notice_status,remarks,real_support_num')
$list = M('test_resource','tab_')
->field('*')
->where($map)
->order('id desc')
->page($page,$row)
->select();
$count = M('support','tab_')->where($map)->count();
$count = M('test_resource','tab_')->where($map)->count();
//分页
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
@ -40,40 +44,45 @@ class SupportController extends ThinkController {
$this->display();
}
//改变审核状态
public function change(){
if (empty(I('id'))) {
$this->error('请选择要操作的数据!');
}
$map['id']=I('id');
$data['status']=I('status');
$data['check_time']=time();
$res=M('support','tab_')->where($map)->save($data);
if($res!==false){
$this->success('操作成功');
}else{
$this->error('操作失败');
}
}
// public function change(){
// if (empty(I('id'))) {
// $this->error('请选择要操作的数据!');
// }
// $map['id']=I('id');
// $data['status']=I('status');
// $data['check_time']=time();
// $res=M('support','tab_')->where($map)->save($data);
// if($res!==false){
// $this->success('操作成功');
// }else{
// $this->error('操作失败');
// }
// }
//通知渠道
public function notice_pro(){
if (empty(I('id'))) {
$this->ajaxReturn(['status'=>0,'msg'=>'请选择要操作的数据!']);
}
if( I('real_support_num') < 0){
if( I('verify_resource') < 0){
$this->ajaxReturn(['status'=>0,'msg'=>'实际发放数量不正确!']);
}
$map['id']=I('id');
$support=M('support','tab_')->field('support_num,status')->find($map['id']);
if($support['status'] !=2 ){
$this->ajaxReturn(['status'=>0,'msg'=>'未审核通过!']);
$support=M('test_resource','tab_')->field('apply_resource,apply_status')->find($map['id']);
if($support['apply_status'] !=0 ){
$this->ajaxReturn(['status'=>0,'msg'=>'请勿重复提交!']);
}
if($support['support_num'] < I('real_support_num') ){
if($support['apply_resource'] < I('verify_resource') ){
$this->ajaxReturn(['status'=>0,'msg'=>'实际发放数量不能大于申请额度!']);
}
$data['opinion']=I('opinion');
$data['notice_status']=1;
$data['real_support_num']=I('real_support_num');
$res=M('support','tab_')->where($map)->save($data);
$data['verify_remark']=I('verify_remark');
$data['verify_resource']=I('verify_resource');
$data['verify_time']=time();
$data['apply_status']=2;
$res=M('test_resource','tab_')->where($map)->save($data);
if($res!==false){
$this->ajaxReturn(['status'=>1,'msg'=>'操作成功!']);
}else{
@ -86,29 +95,31 @@ class SupportController extends ThinkController {
$this->ajaxReturn(['status'=>0,'msg'=>'请选择要操作的数据!']);
}
$map['id']=I('id');
$support=M('support','tab_')->field('support_num,status')->find($map['id']);
$data['opinion']=I('opinion');
$data['notice_status']=1;
$data['status']=0;
$data['check_time']=time();
$res=M('support','tab_')->where($map)->save($data);
$support=M('test_resource','tab_')->field('verify_resource,apply_status')->find($map['id']);
if($support['apply_status'] !=0 ){
$this->ajaxReturn(['status'=>0,'msg'=>'请勿重复提交!']);
}
$data['verify_remark']=I('verify_remark');
$data['verify_time']=time();
$data['apply_status']=1;
$res=M('test_resource','tab_')->where($map)->save($data);
if($res!==false){
$this->ajaxReturn(['status'=>1,'msg'=>'操作成功!']);
}else{
$this->ajaxReturn(['status'=>0,'msg'=>'操作失败!']);
}
}
//设置自动审核
public function set_config_auto_audit($val='',$config_key='')
{
$config['value'] = $val;
$res = M('config')->where(array('name'=>$config_key))->save($config);
S('DB_CONFIG_DATA',null);
if($res !== false){
$this->success('操作成功');
}else{
$this->error('操作失败');
}
}
// //设置自动审核
// public function set_config_auto_audit($val='',$config_key='')
// {
// $config['value'] = $val;
// $res = M('config')->where(array('name'=>$config_key))->save($config);
// S('DB_CONFIG_DATA',null);
// if($res !== false){
// $this->success('操作成功');
// }else{
// $this->error('操作失败');
// }
// }
}

@ -39,7 +39,7 @@
</div>
<div class="cf top_nav_list">
<div class="fl button_list">
<!-- <div class="fl button_list">
<div class="tools">
<if condition="C(SUPPORT_AUTO_AUDIT) eq 0">
<a class="ajax-get" target-form="ids" url='{:U("set_config_auto_audit",array("val"=>1,"config_key"=>"SUPPORT_AUTO_AUDIT"))}'><span class="button_icon button_icon4"></span>开启自动审核</a>
@ -48,7 +48,7 @@
</if>
</div>
</div>
</div> -->
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
@ -75,12 +75,21 @@
</div>
<div class="input-list">
<label>扶持类型:</label>
<select name="support_type">
<select name="apply_type">
<option value="">全部</option>
<option value="0">新增扶持</option>
<option value="1">后续扶持</option>
</select>
</div>
<div class="input-list">
<label>审核状态</label>
<select name="apply_status">
<option value="">全部</option>
<option value="0">待审核</option>
<option value="1">审核未通过</option>
<option value="2">审核通过</option>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('lists')}">搜索</a>
@ -124,34 +133,34 @@
<td>{$data['game_name']}</td>
<td>{$data['server_name']}</td>
<td>{$data['role_name']}</td>
<td>{$data['support_num']}</td>
<td><if condition="$data.support_type eq 0" >新增扶持<else/>后续扶持</if></td>
<td>{$data['remarks']}</td>
<td>{$data['apply_resource']}</td>
<td><if condition="$data.apply_type eq 0" >新增扶持<else/>后续扶持</if></td>
<td style="max-width: 200px;line-height: 1.5;padding:8px;">{$data['apply_remark']}</td>
<td>{:date('Y-m-d H:i:s',$data['create_time'])}</td>
<td>{:max_quota($data['game_id'],$data['promote_id'])}</td>
<td>{$data['real_support_num']}</td>
<td>{$data['verify_resource']}</td>
<td>
<if condition="$data.status eq 0" >拒绝
<elseif condition="$data.notice_status eq 1"/>通过
<if condition="$data.apply_status eq 1" >拒绝
<elseif condition="$data.apply_status eq 2"/>通过
<else/>待审核
</if>
</td>
<td>
<if condition="$data['status'] eq 1">
<a href="{:U('change',['id'=>$data['id'],'status'=>2])}" class="ajax-get pack">审核</a>
<if condition="$data['apply_status'] eq '0'">
<a href="javascript:" class="ajax-get pack notice_pro" data-id="{$data['id']}">审核</a>
<a href="" class="ajax-get pack jujue" data-id="{$data['id']}">拒绝</a>
<else/>
<a href="#" disabled style="color:rgb(64,64,64);">审核</a>
<a href="#" disabled style="color:rgb(64,64,64); ">拒绝</a>
</if>
<if condition="$data['notice_status'] eq 0 and $data['status'] neq 0">
<!-- <if condition="$data['notice_status'] eq 0 and $data['status'] neq 0">
<a href="" class="ajax-get pack notice_pro" data-id="{$data['id']}" status="{$data['status']}" notice_status="{$data['notice_status']}">通知渠道</a>
<else/>
<a href="#" disabled style="color:rgb(64,64,64);">通知渠道</a>
</if>
</if> -->
</td>
</tr>
</volist>
@ -221,7 +230,7 @@ $(function(){
url: "{:U('refuse_notice')}",
type:"POST",
dataType: 'json',
data: {id:id,opinion:text},
data: {id:id,verify_remark:text},
success:function(data){
if(data.status==0){
layer.msg(data.msg,{icon:2});
@ -242,12 +251,6 @@ $(function(){
$(".notice_pro").click(function(){
var id=$(this).attr('data-id');
var _status=$(this).attr('status');
var _notice_status=$(this).attr('notice_status');
if(_status==1 ){
layer.msg("请先审核",{icon:2});
return false;
}
layer.prompt({title: '实际发放数量', formType: 0}, function(text1, index){
if(text1 == 0 ){
layer.msg('实际发放数量输入不正确',{icon:2});
@ -258,19 +261,13 @@ $(function(){
layer.msg('实际发放数量输入不正确',{icon:2});
return false;
}
layer.prompt({title: '审核意见', formType: 2}, function(text, index){
layer.close(index);
$.ajax({
url: "{:U('notice_pro')}",
type:"POST",
dataType: 'json',
data: {id:id,opinion:text,real_support_num:text1},
data: {id:id,verify_remark:text,verify_resource:text1},
success:function(data){
if(data.status==0){
layer.msg(data.msg,{icon:2});

@ -269,7 +269,7 @@ class TestResourceController extends BaseController
$data['server_name']=I('server_name');
$data['user_account']=I('user_account')[$i];
$data['user_id']=get_user_id(I('user_account')[$i]);
$data['user_password']=I('user_password')[$i];
$data['user_password']=base64_encode(I('user_password')[$i]);
$data['phone']=$user['phone'];
$data['role_name']=I('role_name')[$i];
@ -315,7 +315,7 @@ class TestResourceController extends BaseController
$this->ajaxReturn(['status'=>0,'msg'=>'密码不正确']);
}
$data['user_password']=I('user_password');
$data['user_password']=base64_encode(I('user_password'));
$data['role_name']=I('role_name');
$map = I("post.");
unset($map['user_password']);

@ -279,7 +279,7 @@
<td>{$s.create_time}</td>
<td>
<a href="javascript:;" class="open_edit" data-account="{$s.user_account}"
data-password="{$s['user_password']}"
data-password="{:base64_decode($s['user_password'])}"
data-game_name="{$s.game_name}" data-server_name="{$s.server_name}"
data-role_name="{$s.role_name}" data-support_id="{$s.id}">编辑</a>
<a href="javascript:;" class="apply" id="" data-id="{$s.id}">申请</a>

Loading…
Cancel
Save