diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index 94890ef7a..2e960f9fa 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -1091,3 +1091,20 @@ function addSubsiteWhere(&$map,$field){ $map[$field] = ["in",[0,PARTNER_TYPE]]; } } + +/** + * 获取商务专员 + */ +function getAffairMember() { + + $data = M("member") + ->field("access.uid admin_id,real_name") + ->join("left join sys_auth_group_access access on sys_member.uid = access.uid") + ->join("left join sys_auth_group auth on access.group_id=auth.id") + ->where(['title' => ['like', '%商务%']]) + ->select(); + + return $data; + +} + diff --git a/Application/Admin/Controller/BusinessAffairsAwardController.class.php b/Application/Admin/Controller/BusinessAffairsAwardController.class.php new file mode 100644 index 000000000..cad940422 --- /dev/null +++ b/Application/Admin/Controller/BusinessAffairsAwardController.class.php @@ -0,0 +1,283 @@ + + */ +class BusinessAffairsAwardController extends ThinkController +{ + + private $model; + + public function _initialize() + { + $this->model = M("business_affairs_award","tab_"); + parent::_initialize(); + } + + /** + *商务奖金比例列表 + */ + public function lists() + { + $params = I('get.'); + $page = $params['p'] ? intval($params['p']) : 1; + $row = $params['row'] ? intval($params['row']) : 10; + + $data = $this->model->page($page, $row)->select(); + + foreach ($data as $key => $value) { + + if(!$value['end_amount'] == '0') { + $data[$key]['end_amount'] = '永久'; + } + + } + + $count = $this->model->where("1=1")->count(); + + $page = set_pagination($count, $row,$params); + if($page) { + $this->assign('_page', $page); + } + + $this->assign("list",$data); + + $this->display(); + + } + + public function add() + { + if(IS_POST) { + +// dump($_POST);die(); + if (!$_POST['ratio']) { + $this->ajaxReturn(["msg"=>"请填写抽成比例","code"=>0]); + } + + if(!$_POST['start_amount']) { + $this->ajaxReturn(["msg"=>"请填写起始流水","code"=>0]); + } + + if($_POST['start_amount'] >= $_POST['end_amount']&&$_POST['end_amount']) { + $this->ajaxReturn(["msg"=>"起始流水必须小于结束流水","code"=>0]); + } + + $amount_start = $_POST['start_amount']; + $amount_end = $_POST['end_amount']; + + $busunessData = M("business_affairs_award", "tab_") + ->where("((start_amount<{$amount_start} and (end_amount >={$amount_start} or end_amount=0)) or (start_amount<{$amount_end} and (end_amount >={$amount_end} or end_amount=0)) or ((end_amount>={$amount_start} or end_amount=0) and (end_amount <={$amount_end} and end_amount!=0)))") + ->select(); + + if ($busunessData) { + $this->ajaxReturn(["msg"=>"流水段已经存在","code"=>0]); + } + $add_data = $_POST; + $add_data['create_time'] = time(); + + !$add_data['end_amount']?($add_data['end_amount']=0):''; + + $this->model->add($add_data); + + $this->ajaxReturn(["msg"=>"添加成功","code"=>1,"url"=>U("lists")]); + } else { + $this->display(); + } + } + + public function edit() + { + $id = $_REQUEST["id"]; + if(IS_POST) { + + if (!$_POST['ratio']) { + $this->ajaxReturn(["msg"=>"请填写抽成比例","code"=>0]); + } + + if(!$_POST['start_amount']) { + $this->ajaxReturn(["msg"=>"请填写起始流水","code"=>0]); + } + + if($_POST['start_amount'] >= $_POST['end_amount']&&$_POST['end_amount']) { + $this->ajaxReturn(["msg"=>"起始流水必须小于结束流水","code"=>0]); + } + + $amount_start = $_POST['start_amount']; + $amount_end = $_POST['end_amount']; + + $busunessData = M("business_affairs_award", "tab_") + ->where("id != {$id} and ((start_amount<{$amount_start} and (end_amount >={$amount_start} or end_amount=0)) or (start_amount<{$amount_end} and (end_amount >={$amount_end} or end_amount=0)) or ((end_amount>={$amount_start} or end_amount=0) and (end_amount <={$amount_end} and end_amount!=0)))") + ->select(); + + if ($busunessData) { + $this->ajaxReturn(["msg"=>"流水段已经存在","code"=>0]); + } + + $add_data = $_POST; + $add_data['update_time'] = time(); + + !$add_data['end_amount']?($add_data['end_amount']=0):''; + + $this->model->where(['id'=>$id])->save($add_data); + + $this->ajaxReturn(["msg"=>"修改成功","code"=>1,"url"=>U("lists")]); + } else { + + $data = $this->model->where(['id'=>$id])->find(); + + $data['start_amount'] = floor($data['start_amount']); + $data['end_amount'] = floor($data['end_amount']); + $data['ratio'] = floor($data['ratio']); + + $this->assign("data",$data); + + $this->display(); + } + } + + + public function del() + { + if(!isset($_REQUEST['id'])){ + $this->error('参数错误'); + } + $id = $_REQUEST['id']; + $res = $this->model->where("id='{$id}'")->delete(); + if($res !== false){ + + $this->success('删除成功',U("lists")); + + }else{ + $this->error('删除错误'); + } + } + + public function businessAffairsList() { + + $map = []; + + $params = I('get.'); + $page = $params['p'] ? intval($params['p']) : 1; + $row = $params['row'] ? intval($params['row']) : 10; + + if($_REQUEST['time']) { + $map['time'] = $_REQUEST['time']; + } + + if ($_REQUEST['game_belong_name']) { + $map['game_belong_name'] = ['like',"%{$_REQUEST['game_belong_name']}%"]; + } + + if ($_REQUEST['relation_game_name']) { + $map['relation_game_name'] = ['like',"%{$_REQUEST['game_name']}%"]; + } + + if ($_REQUEST['verify_status'] || $_REQUEST['verify_status'] == '0') { + $map['verify_status'] = ['like',"%{$_REQUEST['verify_status']}%"]; + } + + $data = M("business_affairs_award_pool","tab_") + ->where($map) + ->page($page, $row) + ->select(); + + foreach ($data as $key => $value) { + + $detail = '未审核'; + + if ($value['verify_status'] == 1) { + $detail = '审批通过'; + } elseif($value['verify_status'] == 2) { + $detail = '审批拒绝'; + } + + if($_REQUEST['export']) { + $data[$key]['time'] = '`'.$value['time']; + $detail .= "\n"; + }else { + $detail .= "
"; + } + if ($value['verify_status']) { + $data[$key]['verify_detail'] = $detail.date('Y-m-d H:i:s',$value['verify_time']); + } else { + $data[$key]['verify_detail'] = '未审核'; + } + $data[$key]['ratio'] = round(($value['month_award']/$value['pay_amount']*100),2)."%"; + + } + + if ($_REQUEST['export']) { + + $title = ['time' => '月份', + 'relation_game_name' => '游戏名称', + 'pay_amount' => '产品流水', + 'ratio' => '抽成比例', + 'game_belong_name' => '奖励归属', + 'month_bonus_pool' => '本月奖金池总额', + 'quarter_bonus_pool' => '本季度累计激励', + 'month_award' => '流水个人奖金', + 'person_award' => '个人奖金总额', + 'verify_detail' => '审批状态']; + + data2csv($data, '商务奖金汇总', $title); + } + + $count = M("business_affairs_award_pool","tab_") + ->where($map) + ->count(); + + if(IS_ROOT){ + $this->assign('verify_check',true); + }else { + $exportRule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME . "_verify_check"); + + $this->assign('verify_check', $this->checkRule($exportRule, array('in', '1,2'))); + } + + $page = set_pagination($count, $row,$params); + if($page) { + $this->assign('_page', $page); + } + + $this->assign("list",$data); + + $this->display(); + + } + + public function verify() { + + $status = $_REQUEST['status']; + + $ids = $_REQUEST['ids']; + + if ($ids) { + + $is_save = M("business_affairs_award_pool","tab_") + ->where(['id'=>['in',$ids]]) + ->save(['verify_status'=>$status,'verify_time'=>time()]); + + if($is_save) { + $this->ajaxReturn(['status'=>1,'info'=>'操作成功']); + } else { + $this->ajaxReturn(['status'=>0,'info'=>'操作失败']); + } + + } else { + + $this->ajaxReturn(['status'=>0,'info'=>'数据错误']); + + } + + + + + + + } + +} diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 6e05c02fa..bc31f2aad 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -224,6 +224,12 @@ class GameController extends ThinkController $_POST['download_ways'] = $gameService->getDownLoadWaysValue($downloadWays); + $realname = M("member") + ->field("real_name") + ->where(['uid' => I('post.game_belong_id')]) + ->find()['real_name']; + $_POST['game_belong_name'] =$realname; + $game = D(self::model_name);//M('$this->$model_name','tab_'); $res = $game->update(); if (!$res) { @@ -415,6 +421,15 @@ ADD COLUMN `kefu_qq` varchar(255) NULL DEFAULT '' COMMENT 'kefu_qq_type为2 时 $_POST['pay_config'] = json_encode($_POST['pay_config']); $_POST['download_ways'] = $gameService->getDownLoadWaysValue($downloadWays); + + + $realname = M("member") + ->field("real_name") + ->where(['uid' => I('post.game_belong_id')]) + ->find()['real_name']; + $_POST['game_belong_name'] =$realname; + + unset($_POST['apply_auth']); $res = $gameModel->update(); @@ -467,6 +482,8 @@ ADD COLUMN `kefu_qq` varchar(255) NULL DEFAULT '' COMMENT 'kefu_qq_type为2 时 $otherData['kefu_qq'] = I('post.kefu_qq'); $otherData['kefu_qq_type'] = I('post.kefu_qq_type'); $otherData['data_share'] = I('post.data.share'); + $otherData['game_belong_id'] = I('post.game_belong_id'); + $otherData['game_belong_name'] = $realname; M('Game', 'tab_')->data($otherData)->where(array('id' => $another['id']))->save(); //同时修改代充游戏折扣 @@ -539,7 +556,7 @@ ADD COLUMN `kefu_qq` varchar(255) NULL DEFAULT '' COMMENT 'kefu_qq_type为2 时 } } $this->assign('sociatygames',$sociatyGamesData); - + $data['introduction'] = str_replace("~~", "\r\n", $data['introduction']); $this->assign('data', $data); $this->assign('game_id', $id); diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index f106bb3ac..1dd2437e1 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -18,6 +18,8 @@ use Base\Factory\BaseFactory; */ class TimingController extends AdminController { + private $affairRatioList = []; + public function _initialize(){ } @@ -1555,4 +1557,189 @@ class TimingController extends AdminController { $leavePercentageInstance->leaveTiming(); } + + + public function setbusinessAffairsAward() { + + echo date("Y-m-d H:i:s")."----------------------商务奖金计算----------------------\n"; + + list($becomeTimeList,$becomeTimeCount) = $this->getAffairList(date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'))); + + dump($becomeTimeList); + dump($becomeTimeCount);die(); + + $time1 = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01')); + $time2 = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-02')); + $time3 = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-03')); + + $lasttime = [$time2,$time3]; + + $tempoparyData = M("spend","tab_") + ->field("tab_spend.*,from_unixtime(payed_time,'%Y-%m') time,from_unixtime(payed_time,'%Y') year,from_unixtime(payed_time,'%Y-%m') month,relation_game_id,relation_game_name,game_belong_id,game_belong_name") + ->join("left join tab_game on tab_game.id=tab_spend.game_id") + ->where(['tab_spend.pay_status'=>1,'game_belong_id'=>['neq',0],'pay_way' => ['egt', 0]]) + ->select(false); + + $lastdata = M()->table("({$tempoparyData}) a") + ->field("*,sum(pay_amount) pay_amount") + ->where(['time'=>['in',$lasttime]]) + ->group("time,relation_game_id,game_belong_id") + ->select(); + + $handleData = []; + + foreach ($lastdata as $key => $value) { + $handleData[$value['time'].$value['game_belong_id'].$value['relation_game_id']] = $value; + } + + $data = M()->table("({$tempoparyData}) a") + ->field("sum(pay_amount) pay_amount,time,year,month,relation_game_id,relation_game_name,game_belong_id,game_belong_name") + ->where(['time'=>$time1]) + ->group("time,relation_game_id,game_belong_id") + ->select(); + + $sum_amount = M()->table("({$tempoparyData}) a") + ->field("sum(pay_amount) pay_amount") + ->where(['time'=>$time1]) + ->find()['pay_amount']; + + foreach ($data as $key => $value){ + + echo "{$value['time']},{$value['game_belong_name']},{$value['pay_amount']}\n"; + + $value['month_bonus_pool'] = $this->businessAffairRatio($value['pay_amount']); + + $value['quarter_bonus_pool'] = $this->businessAffairRatio($value['pay_amount']); + + for($i = (($value['month']%3)?(($value['month']%3)-1):2); $i == 0; $i--) { + $value['quarter_bonus_pool'] += + $this->businessAffairRatio($handleData[$value['year'].'-'.(($value['month']-$i)>0?($value['month']-$i):($value['month']-$i+12)).$value['game_belong_id'].$value['relation_game_id']]['pay_amount']); + } + + unset($value['year']); + unset($value['month']); + + $value['quarter_award'] = $value['quarter_bonus_pool']*0.25*($becomeTimeList[$value['game_belong_id']]/$becomeTimeCount); + + $is_assistant = M("ucenter_member") + ->field("sys_ucenter_member.id admin_id,become_time") + ->join("left join sys_auth_group_access access on sys_ucenter_member.id = access.uid") + ->join("left join sys_auth_group auth on access.group_id=auth.id") + ->where(['title' => ['like', '%助理%'],'sys_ucenter_member.id'=>$becomeTimeList[$value['game_belong_id']]]) + ->select(); + + if (!$is_assistant) { + $value['month_award'] = ($value['pay_amount']/$sum_amount)*$value['month_bonus_pool']*0.7*(($becomeTimeList[$value['game_belong_id']]?$becomeTimeList[$value['game_belong_id']]:0)/$becomeTimeCount); + } else { + $value['month_award'] = ($value['pay_amount']/$sum_amount)*$value['month_bonus_pool']*0.05*(($becomeTimeList[$value['game_belong_id']]?$becomeTimeList[$value['game_belong_id']]:0)/$becomeTimeCount); + } + + $value['month_award'] = round($value['month_award'],2); + $value['quarter_award'] = round($value['quarter_award'],2); + + if (!$becomeTimeCount) { + $value['month_award'] = 0; + } + + $value['person_award'] = $value['quarter_award'] + $value['month_award']; + + $hav_value = M("business_affairs_award_pool","tab_") + ->where([ + 'time'=>$value['time'], + 'relation_game_id'=>$value['relation_game_id'], + 'game_belong_id'=>$value['game_belong_id'] + ]) + ->find(); + + if ($hav_value) { + M("business_affairs_award_pool","tab_") + ->where(['time'=>$value['time'], + 'relation_game_id'=>$value['relation_game_id'], + 'game_belong_id'=>$value['game_belong_id']]) + ->save($value); + } else { + M("business_affairs_award_pool","tab_")->add($value); + } + + } + + echo date("Y-m-d H:i:s")."----------------------商务奖金计算----------------------\n"; + + } + + //获取转正月数列表 + private function getAffairList($now) { + + $all = 0; + + $affairList = M("ucenter_member") + ->field("sys_ucenter_member.id admin_id,become_time") + ->join("left join sys_auth_group_access access on sys_ucenter_member.id = access.uid") + ->join("left join sys_auth_group auth on access.group_id=auth.id") + ->where(['title' => ['like', '%商务%']]) + ->select(); + + $return = []; + + foreach($affairList as $key => $value) { + + if ($value['become_time']) { + $become_time = date("Y-m",$value['become_time']); + } else { + $become_time = $now; + } + + $return[$value['admin_id']] = 0; + + if ($now > $become_time && $value['become_time']) { + $return[$value['admin_id']] = $this->diffDate($become_time,$now); + } + + $all += $return[$value['admin_id']]; + + } + + return [$return,$all]; + + } + + function diffDate($date1,$date2) + { + $datetime1 = new \DateTime($date1); + $datetime2 = new \DateTime($date2); + $interval = $datetime1->diff($datetime2); + $time = $interval->format('%m'); + return $time; + } + + // + private function businessAffairRatio($amount = 0) { + if (!$amount) { + return 0; + } + + $returnAmount = 0; + + if (!$this->affairRatioList) { + $this->affairRatioList = M("business_affairs_award","tab_")->where("1=1")->group("start_amount")->select(); + } + + foreach ($this->affairRatioList as $key => $value) { + + $start_amount = $value['start_amount']; + $end_amount = $value['end_amount']; + $ratio = $value['ratio']; + + if ($amount > $start_amount&&($amount<=$end_amount||floor($end_amount)=='0')) { + $returnAmount += ($amount-$start_amount)*($ratio/100); + } elseif($amount > $start_amount &&($amount>$end_amount&&floor($end_amount)!='0')) { + $returnAmount += ($end_amount-$start_amount)*($ratio/100); + } + + } + + return $returnAmount; + + } + } diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index 39bca125e..1abd428b4 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -453,6 +453,8 @@ class UserController extends AdminController $info['mobile'] = isset($_POST['mobile']) ? $_POST['mobile'] : ''; $_POST['apply_leave_time'] ? ($info['apply_leave_time'] = strtotime($_POST['apply_leave_time'])):''; $_POST['leave_time'] ? ($info['leave_time'] = strtotime($_POST['leave_time'])+86399):''; + $_POST['become_time'] ? ($info['become_time'] = strtotime($_POST['become_time'])):''; + if($_POST['work_status']) { $info['work_status'] = $_POST['work_status']; } @@ -478,7 +480,7 @@ class UserController extends AdminController "url"=>U("User/index",array("nickname"=>$_POST['username'])) )); - if ((strtotime($_POST['leave_time'])+86399)where($map)->save(['work_status'=>1]); } else { $Member->where($map)->save(['work_status'=>0]); @@ -495,6 +497,7 @@ class UserController extends AdminController $Member['apply_leave_time']?($Member['apply_leave_time'] = date("Y-m-d",$Member['apply_leave_time'])):($Member['apply_leave_time']=''); $Member['leave_time']?($Member['leave_time'] = date("Y-m-d",$Member['leave_time'])):($Member['leave_time']=''); + $Member['become_time']?($Member['become_time'] = date("Y-m-d",$Member['become_time'])):($Member['become_time']=''); $data = D('Member')->where(array('uid' => $_GET['id']))->find(); diff --git a/Application/Admin/View/BusinessAffairsAward/add.html b/Application/Admin/View/BusinessAffairsAward/add.html new file mode 100644 index 000000000..7bf2d5480 --- /dev/null +++ b/Application/Admin/View/BusinessAffairsAward/add.html @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + + + + + + + + + + +
*流水区间: +
+ + - + +
+
*抽成比例: + + + % +
+
+ +
+ + + 返回 + +
+
+
+
+ +
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + + + diff --git a/Application/Admin/View/BusinessAffairsAward/businessAffairsList.html b/Application/Admin/View/BusinessAffairsAward/businessAffairsList.html new file mode 100644 index 000000000..3ba33659b --- /dev/null +++ b/Application/Admin/View/BusinessAffairsAward/businessAffairsList.html @@ -0,0 +1,384 @@ + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + + +
+ 搜索 +
+
+ + + +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
月份游戏名称产品流水抽成比例奖金归属人本月奖金池总额本季度累计激励流水个人奖金个人奖金总额审批状态
aOh! 暂时还没有内容!
{$data.time|default='无'}{$data.relation_game_name|default='无'}{$data.pay_amount|default='0'}{$data.ratio|default='--'}{$data.game_belong_name|default='无'}{$data.month_bonus_pool|default='0'}{$data.quarter_award|default='0'}{$data.month_award|default='0'}{$data.person_award|default='0'}{$data.verify_detail|default='无'}
+
+ +
+ +
+
+ 导出 + {$_page|default=''} +
+ +
+ + + + + if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + diff --git a/Application/Admin/View/BusinessAffairsAward/edit.html b/Application/Admin/View/BusinessAffairsAward/edit.html new file mode 100644 index 000000000..e79022ee1 --- /dev/null +++ b/Application/Admin/View/BusinessAffairsAward/edit.html @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + + + + + + + + + + +
*流水区间: +
+ + - + +
+
*抽成比例: + + % +
+
+ +
+ + + + 返回 + +
+
+
+
+ +
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + + + diff --git a/Application/Admin/View/BusinessAffairsAward/lists.html b/Application/Admin/View/BusinessAffairsAward/lists.html new file mode 100644 index 000000000..9bf92cfd7 --- /dev/null +++ b/Application/Admin/View/BusinessAffairsAward/lists.html @@ -0,0 +1,153 @@ + + + + + + + + + + + + +
+
+ +
+ 新增 +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
序号流水区间抽成比例操作
aOh! 暂时还没有内容!
{$data.id}{$data.start_amount}-{$data.end_amount}{$data.ratio}% + 编辑 + 删除 +
+
+
+
+ + 导出 + + {$_page|default=''} +
+ +
+ + + + + + diff --git a/Application/Admin/View/Game/add.html b/Application/Admin/View/Game/add.html index 199f3a918..0cf95aabd 100644 --- a/Application/Admin/View/Game/add.html +++ b/Application/Admin/View/Game/add.html @@ -60,6 +60,18 @@ + + 游戏归属: + + + + + 运营平台 diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html index 2e0c743ba..ee9a72c58 100644 --- a/Application/Admin/View/Game/edit.html +++ b/Application/Admin/View/Game/edit.html @@ -88,6 +88,22 @@ + + 游戏归属: + + + + + 运营平台 diff --git a/Application/Admin/View/Game/lists.html b/Application/Admin/View/Game/lists.html index f846e5604..e689f0f99 100644 --- a/Application/Admin/View/Game/lists.html +++ b/Application/Admin/View/Game/lists.html @@ -160,6 +160,7 @@ text-indent:0; 下载次数 排序设置 添加关联 + 游戏归属 操作 @@ -246,6 +247,7 @@ text-indent:0; 该游戏关联数据错误 + {$data.game_belong_name|default='无'} 编辑 删除 diff --git a/Application/Admin/View/User/edit.html b/Application/Admin/View/User/edit.html index 1aa028c6a..5097b5a1e 100644 --- a/Application/Admin/View/User/edit.html +++ b/Application/Admin/View/User/edit.html @@ -80,6 +80,12 @@ + + 转正时间: + + + + 离职状态 @@ -174,6 +180,17 @@ todayBtn:true, }); + $('#become_time').datetimepicker({ + format: 'yyyy-mm-dd', + language: "zh-CN", + showMeridian:true, + pickDate:true, + minView: 2, + autoclose: true, + pickTime:true, + todayBtn:true, + }); + $bind_wx=$("#bind_wx").prop('checked'); if($bind_wx){ cpsw=check(1); diff --git a/Data/update.sql b/Data/update.sql index 1f69fdff3..785a3a4c1 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2799,3 +2799,28 @@ ADD COLUMN `wm_statement_ids` int(11) NOT NULL DEFAULT 0 COMMENT '子系统财 ALTER TABLE `tab_reward_record` ADD COLUMN `is_verify` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否审核' AFTER `settlement_time`, ADD COLUMN `verify_detail` longtext NULL COMMENT '审核详情' AFTER `is_verify`; + +ALTER TABLE `tab_game` +ADD COLUMN `game_belong_id` int(11) NOT NULL DEFAULT 0 COMMENT '归属市场员id' AFTER `data_share`, +ADD COLUMN `game_belong_name` varchar(50) NOT NULL DEFAULT '' COMMENT '归属市场员姓名' AFTER `game_belong_id`; + +ALTER TABLE `sys_ucenter_member` +ADD COLUMN `become_time` int(11) NOT NULL DEFAULT 0 COMMENT '转正时间' AFTER `leave_time`; + +CREATE TABLE `tab_business_affairs_award_pool` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '月份', + `pay_amount` decimal(13, 2) NOT NULL COMMENT '流水', + `relation_game_id` int(11) NOT NULL COMMENT '游戏id', + `relation_game_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '游戏名', + `game_belong_id` int(11) NOT NULL DEFAULT 0 COMMENT '归属id', + `game_belong_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '归属名', + `month_bonus_pool` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '月奖金池', + `quarter_bonus_pool` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '季度奖金池', + `month_award` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '月奖金', + `quarter_award` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '季度奖金', + `person_award` decimal(13, 2) NOT NULL DEFAULT 0.00 COMMENT '个人奖金', + `verify_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '审核状态 0 未审核 1 审核通过 2 审核拒绝', + `verify_time` int(11) NOT NULL DEFAULT 0 COMMENT '审核时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic; \ No newline at end of file