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 @@
上下游奖罚记录管理
+ + +