diff --git a/Application/Admin/Controller/SupportController.class.php b/Application/Admin/Controller/SupportController.class.php index 5a036212b..4308c6b97 100644 --- a/Application/Admin/Controller/SupportController.class.php +++ b/Application/Admin/Controller/SupportController.class.php @@ -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('操作失败'); + // } + // } } diff --git a/Application/Admin/View/Support/lists.html b/Application/Admin/View/Support/lists.html index 1aeb4c3fd..344fc096d 100644 --- a/Application/Admin/View/Support/lists.html +++ b/Application/Admin/View/Support/lists.html @@ -39,7 +39,7 @@
-
+
@@ -75,12 +75,21 @@
-
+
+ + +
搜索 @@ -124,34 +133,34 @@ {$data['game_name']} {$data['server_name']} {$data['role_name']} - {$data['support_num']} - 新增扶持后续扶持 - {$data['remarks']} + {$data['apply_resource']} + 新增扶持后续扶持 + + {$data['apply_remark']} {:date('Y-m-d H:i:s',$data['create_time'])} {:max_quota($data['game_id'],$data['promote_id'])} - {$data['real_support_num']} + {$data['verify_resource']} - 拒绝 - 通过 + 拒绝 + 通过 待审核 - - 审核 + + 审核 拒绝 审核 拒绝 - - + @@ -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}); diff --git a/Application/Home/Controller/TestResourceController.class.php b/Application/Home/Controller/TestResourceController.class.php index 545d915b7..c7254bb88 100644 --- a/Application/Home/Controller/TestResourceController.class.php +++ b/Application/Home/Controller/TestResourceController.class.php @@ -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']); diff --git a/Application/Home/View/default/TestResource/index.html b/Application/Home/View/default/TestResource/index.html index 47130e055..320479efa 100644 --- a/Application/Home/View/default/TestResource/index.html +++ b/Application/Home/View/default/TestResource/index.html @@ -279,7 +279,7 @@ {$s.create_time} 编辑 申请