diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index 7916130e1..cca1ec6e1 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -854,3 +854,11 @@ function convertAmountToCn($num) { return $daxie . '整'; } + +/** + * @param $phone + * @return false|int + */ +function checkPhone($phone) { + return preg_match("/^1[3456789]\d{9}$/",$phone); +} diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index a28fb5f2e..544d7eb71 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -1194,11 +1194,10 @@ class QueryController extends ThinkController $this->ajaxReturn(['msg' => $msg]); } - public function set_withdraw_status() + public function set_withdraw_status($status = 1) { $withdraw = M('withdraw', "tab_"); $ids = I('ids', 0); - $status = 1; if (empty($ids)) { $this->error('参数异常'); } @@ -1207,14 +1206,21 @@ class QueryController extends ThinkController } else { $map['id'] = $ids; } - $map['status'] = 0; + switch ($status) { + case 1: + $map['status'] = 0; + break; + case 2: + $map['status'] = 1; + break; + } $save['audit_time'] = time(); $save['status'] = $status; $res = $withdraw->where($map)->save($save); if ($res === false) { - $this->error('审核失败'); + $this->error('操作失败'); } else { - $this->success('审核成功', U('withdraw')); + $this->success('操作成功', U('withdraw')); } } diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 86f9e9afb..fd663c8da 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -233,6 +233,18 @@ class StatementMangementController extends ThinkController public function rewardManageList($row = 10, $p = 1) { $map = []; + if (!empty(I("game_name"))) { + $game_ids = array_column(getGameByName(I("game_name")), 'id'); + if ($game_ids) { + $map['relation_game_id'] = ['in', $game_ids]; + } + } + if (!empty(I('partner_id'))) { + $map['company_id'] = I('partner_id'); + } + if (!empty(I('account'))) { + $map['accounts'] = ['like', '%' . I('account') . '%']; + } $list = M('reward_record', 'tab_')->where($map)->page($p, $row)->select(); if ($list) { $companys[1] = array_column(M('partner', 'tab_')->field('id, partner as name')->select(), 'name', 'id'); diff --git a/Application/Admin/Controller/ToolController.class.php b/Application/Admin/Controller/ToolController.class.php index d5aee52fc..056c6c1ec 100644 --- a/Application/Admin/Controller/ToolController.class.php +++ b/Application/Admin/Controller/ToolController.class.php @@ -726,7 +726,7 @@ class ToolController extends ThinkController { $this->error('公司名称已存在'); } - if(!preg_match("/^1[358][0-9]{9}$/u",I('link_phone'))) { + if(!checkPhone(I('link_phone'))) { $this->error('联系电话格式不正确'); } $res2 = $model->where(['link_phone' => I('link_phone')])->getField('id'); @@ -798,7 +798,7 @@ class ToolController extends ThinkController { $this->error('公司名称已存在'); } - if(!preg_match("/^1[358][0-9]{9}$/u",I('link_phone'))) { + if(!checkPhone(I('link_phone'))) { $this->error('联系电话格式不正确'); } $res2 = $model->where([ diff --git a/Application/Admin/View/Query/settlement.html b/Application/Admin/View/Query/settlement.html index 4f1e6ad94..74123ec83 100644 --- a/Application/Admin/View/Query/settlement.html +++ b/Application/Admin/View/Query/settlement.html @@ -219,9 +219,7 @@ {$record.status_text} {$record.respond} - - 汇款证明 - + 重新审核 diff --git a/Application/Admin/View/Query/withdraw.html b/Application/Admin/View/Query/withdraw.html index afb677218..2946f9515 100644 --- a/Application/Admin/View/Query/withdraw.html +++ b/Application/Admin/View/Query/withdraw.html @@ -59,6 +59,7 @@ 通 过 驳 回 自动审核管理 + 确认汇款 @@ -187,7 +188,7 @@ 通过 驳回 - 上传汇款证明 + 确认汇款 diff --git a/Application/Admin/View/StatementMangement/rewardManageList.html b/Application/Admin/View/StatementMangement/rewardManageList.html index 5eff7bb53..6b79eaee0 100644 --- a/Application/Admin/View/StatementMangement/rewardManageList.html +++ b/Application/Admin/View/StatementMangement/rewardManageList.html @@ -52,12 +52,54 @@

上下游奖罚记录管理

+ + +
+ + +
+ +
+ +
+
+ +
+ +
+ +   +
+ + +
+ 搜索 + +
+ + + +
+
+
@@ -150,5 +192,54 @@ $(".select_gallery").select2(); highlight_subnav("{:U('StatementMangement/rewardManageList')}"); + + function get_game_list() + { + var game_name = $('#game_name').val(); + var partner_id = $("#partner_id option:selected").val(); + var sdk_type = $("#sdk_version1 option:selected").val(); + $.ajax({ + url:"{:U('Finance/getGameList')}", + type:"post", + data:{ + partner_id:partner_id, + sdk_type:sdk_type + }, + dataType:'json', + success:function(data){ + var str = ""; + for (var i in data){ + str += "" + } + // console.log(str); + $("#game_name").empty(); + $("#game_name").append(str); + $("#game_name").select2(); + + } + }) + } + $(function(){ + $("#partner_id").change(function(){ + get_game_list(); + }); + //搜索功能 + $("#search").click(function(){ + var url = $(this).attr('url'); + var query = $('.jssearch').find('input').serialize(); + console.log(url); + query += "&" + $('.jssearch').find('select').serialize(); + console.log(query); + query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,''); + query = query.replace(/^&/g,''); + if( url.indexOf('?')>0 ){ + url += '&' + query; + }else{ + url += '?' + query; + } + window.location.replace(url); + }); + }); + diff --git a/Data/update.sql b/Data/update.sql index ef1c96aeb..9cc0cdb92 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1124,10 +1124,10 @@ CREATE TABLE `tab_reward_record` ( `relation_game_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏id', `content` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '事件内容', `money` double(11,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额', + `reward_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖惩时间', `remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注', `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', `creater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建者ID', - `reward_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖惩时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;