diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 986a2c076..1fe22c5d8 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -85,10 +85,45 @@ class PromoteCompanyController extends ThinkController if (empty($company_name)) { $this->error('请输入推广公司名称'); } + if (empty(I('post.settlement_contact'))) { + $this->error('请输入结算联系人'); + } + if (empty(I('post.contact_phone'))) { + $this->error('请输入联系人电话'); + } + $pattern = "/^1[3|5|7|8]\\d{9}$/i"; + if(!preg_match($pattern, I('post.contact_phone'))) { + $this->error("手机号码格式不合法"); + return false; + } + if (empty(I('post.address'))) { + $this->error('请输入所在地址'); + } + if (empty(I('post.bank_card'))) { + $this->error('请输入银行卡号'); + } + $bank_card_pattern = "/^\d{10,19}$/u"; + if (!preg_match($bank_card_pattern, I('post.bank_card'))) { + $this->error('卡号格式错误'); + return false; + } + if (empty(I('post.bank_cardname'))) { + $this->error('请输入银行卡名'); + } + if (empty(I('post.bank_name'))) { + $this->error('请输入收款银行'); + } + if (empty(I('post.bank_address'))) { + $this->error('请输入开户网点'); + } if (!in_array($status, [0, 1])) { $this->error('参数异常'); } + if (!empty(I('post.content'))) { + $save['content'] = I('post.content'); + } + $model = M($this->modelName, 'tab_'); $map['company_name'] = $company_name; $res = $model->where($map)->getField('id'); @@ -102,6 +137,13 @@ class PromoteCompanyController extends ThinkController $save['uid'] = UID; $save['create_time'] = $time; $save['last_up_time'] = $time; + $save['settlement_contact'] = I('post.settlement_contact'); + $save['contact_phone'] = I('post.contact_phone'); + $save['address'] = I('post.address'); + $save['bank_card'] = I('post.bank_card'); + $save['bank_cardname'] = I('post.bank_cardname'); + $save['bank_name'] = I('post.bank_name'); + $save['bank_address'] = I('post.bank_address'); $res = $model->add($save); if ($res) { @@ -130,10 +172,43 @@ class PromoteCompanyController extends ThinkController if (empty($company_name)) { $this->error('请输入推广公司名称'); } + if (empty(I('post.settlement_contact'))) { + $this->error('请输入结算联系人'); + } + if (empty(I('post.contact_phone'))) { + $this->error('请输入联系人电话'); + } + $pattern = "/^1[3|5|7|8]\\d{9}$/i"; + if(!preg_match($pattern, I('post.contact_phone'))) { + $this->error("手机号码格式不合法"); + return false; + } + if (empty(I('post.address'))) { + $this->error('请输入所在地址'); + } + if (empty(I('post.bank_card'))) { + $this->error('请输入银行卡号'); + } + $bank_card_pattern = "/^\d{10,19}$/u"; + if (!preg_match($bank_card_pattern, I('post.bank_card'))) { + $this->error('卡号格式错误'); + return false; + } + if (empty(I('post.bank_cardname'))) { + $this->error('请输入银行卡名'); + } + if (empty(I('post.bank_name'))) { + $this->error('请输入收款银行'); + } + if (empty(I('post.bank_address'))) { + $this->error('请输入开户网点'); + } if (!in_array($status, [0, 1]) || $id == 0) { $this->error('参数异常'); } - + if (!empty(I('post.content'))) { + $save['content'] = I('post.content'); + } $data = $model->field('id,company_name')->find($id); if (empty($data)) { $this->error('数据异常'); @@ -150,6 +225,13 @@ class PromoteCompanyController extends ThinkController $save['company_name'] = $company_name; $save['status'] = $status; $save['last_up_time'] = $time; + $save['settlement_contact'] = I('post.settlement_contact'); + $save['contact_phone'] = I('post.contact_phone'); + $save['address'] = I('post.address'); + $save['bank_card'] = I('post.bank_card'); + $save['bank_cardname'] = I('post.bank_cardname'); + $save['bank_name'] = I('post.bank_name'); + $save['bank_address'] = I('post.bank_address'); $res = $model->save($save); if ($res === false) { @@ -161,7 +243,7 @@ class PromoteCompanyController extends ThinkController } else { $id = intval(I('get.id', 0)); $map['id'] = $id; - $data = $model->field('id,company_name,status')->find($id); + $data = $model->field('id,company_name,status,settlement_contact,contact_phone,address,bank_card,bank_cardname,bank_name,bank_address,content')->find($id); if (empty($data)) { $this->error('数据异常', U('lists')); } diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php index c55fb6c5a..110270c14 100644 --- a/Application/Admin/Controller/PromoteGameRatioController.class.php +++ b/Application/Admin/Controller/PromoteGameRatioController.class.php @@ -116,14 +116,23 @@ class PromoteGameRatioController extends ThinkController $thisTurnoverRatios = $promoteGameRatio['turnover_ratio'] ? json_decode($promoteGameRatio['turnover_ratio'], true) : []; $thisRatioDtl = "默认:{$promoteGameRatio['ratio']}%"; if ($thisTurnoverRatios) { + if (I('export', 0) == 1) { + $symbol = "\n"; + } else { + $symbol = "
"; + } foreach ($thisTurnoverRatios as $thisTurnoverRatio) { $thisIntervalClosedStatusText = isset($thisTurnoverRatio['instanceof']) ? ($thisTurnoverRatio['instanceof'] == 1 ? '≥' : '>') : '≥'; - $thisRatioDtl .= "
月流水{$thisIntervalClosedStatusText}{$thisTurnoverRatio['turnover']},比例:{$thisTurnoverRatio['ratio']}%"; + $thisRatioDtl .= "{$symbol}月流水{$thisIntervalClosedStatusText}{$thisTurnoverRatio['turnover']},比例:{$thisTurnoverRatio['ratio']}%"; } } $thisLastRatioStatus = $promoteGameRatio['last_ratio_status']; $thisStatusText = self::$statusList[$promoteGameRatio['status']]; - $thisStatusText = ($promoteGameRatio['status'] == -1) ? '' . $thisStatusText . '' : $thisStatusText; + if (I('export', 0) == 1) { + $thisStatusText = ($promoteGameRatio['status'] == -1) ? $thisStatusText : $thisStatusText; + } else { + $thisStatusText = ($promoteGameRatio['status'] == -1) ? '' . $thisStatusText . '' : $thisStatusText; + } $thisApplicant = get_admin_account($promoteGameRatio['applicant_id']); $thisReviewer = $promoteGameRatio['reviewer_id'] ? get_admin_account($promoteGameRatio['reviewer_id']) : '待确认'; $thisBeninTime = date('Y/m', $promoteGameRatio['begin_time']); @@ -181,9 +190,12 @@ class PromoteGameRatioController extends ThinkController 'promote_create_time' => '注册时间', 'promote_status_text' => '状态', 'promote_ver_status_text' => '身份状态', + 'company_name' => '推广公司', + 'company_belong' => '工会归属', 'game_name' => '已申请游戏', + 'game_type_name' => '游戏类型', 'last_ratio' => '原分成比例', - 'ratio' => '当前分成比例', + 'ratio_dtl' => '公会阶梯比例详细信息', 'valid_date' => '开始时间', 'remark' => '备注', 'status_text' => '分成比例审核', diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index a5d09a711..bf1538d1d 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -1593,27 +1593,24 @@ class QueryController extends ThinkController $promoteInfo = M('promote','tab_')->where(['id'=>$promote_id])->find(); $level = $promoteInfo['level']; if($promote_id != 0) { + $promoteIdArr = []; if ($level == 1) { $rootPromoteId = $promote_id; - $where['promote_id'] = $promote_id; + $promoteIdArr[] = $promote_id; }else { $chain = $promoteInfo['chain']; $chainArr = explode('/',$chain); $rootPromoteId = $chainArr[1]; - $where1['chain'] = array('like', '%/' . $rootPromoteId. '/%'); - $promoteIdInfo = M('promote','tab_')->field('id')->where($where1)->select(); - $promoteIdArr = []; - foreach($promoteIdInfo as $key2 => $v1) { - $promoteIdArr[] = $v1['id']; - } - $where['promote_id'] = ['in',$promoteIdArr]; } - + $where1['chain'] = array('like', '%/' . $rootPromoteId. '/%'); + $promoteIdInfo = M('promote','tab_')->field('id')->where($where1)->select(); + foreach($promoteIdInfo as $key2 => $v1) { + $promoteIdArr[] = $v1['id']; + } + $where['promote_id'] = ['in',$promoteIdArr]; }else { $where['promote_id'] = 0; } - - $where['game_id'] = ['in',$gameNameIdArr]; $where['pay_status'] = 1; $begTime = strtotime($mytime); @@ -1911,25 +1908,25 @@ class QueryController extends ThinkController $promoteInfo = M('promote','tab_')->where(['id'=>$promote_id])->find(); $level = $promoteInfo['level']; if($promote_id != 0) { + $promoteIdArr = []; if ($level == 1) { $rootPromoteId = $promote_id; - $map['promote_id'] = $promote_id; + $promoteIdArr[] = $promote_id; }else { $chain = $promoteInfo['chain']; $chainArr = explode('/',$chain); $rootPromoteId = $chainArr[1]; - $where1['chain'] = array('like', '%/' . $rootPromoteId. '/%'); - $promoteIdInfo = M('promote','tab_')->field('id')->where($where1)->select(); - $promoteIdArr = []; - foreach($promoteIdInfo as $key2 => $v1) { - $promoteIdArr[] = $v1['id']; - } - $map['promote_id'] = ['in',$promoteIdArr]; } - + $where1['chain'] = array('like', '%/' . $rootPromoteId. '/%'); + $promoteIdInfo = M('promote','tab_')->field('id')->where($where1)->select(); + foreach($promoteIdInfo as $key2 => $v1) { + $promoteIdArr[] = $v1['id']; + } + $map['promote_id'] = ['in',$promoteIdArr]; }else { $map['promote_id'] = 0; } + var_dump($level); $pay_status = 1; $map['game_id'] = ['in',$gameNameIdArr]; // $map['promote_id'] = ['in',$promoteIdArr]; diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 6532fb38c..5cadcf02b 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -242,6 +242,9 @@ class StatementMangementController extends ThinkController if (!empty(I('partner_id'))) { $map['company_id'] = I('partner_id'); } + if (strlen(I('company_type'))) { + $map['company_type'] = I('company_type'); + } if (!empty(I('account'))) { $map['accounts'] = ['like', '%' . I('account') . '%']; } diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index 6f730da18..0d2b420ed 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -35,6 +35,54 @@ + + *联系结算人: + + + + + + *联系电话: + + + + + + *所在地址: + + + + + + *银行卡号: + + + + + + *银行卡名: + + + + + + *收款银行: + + + + + + *开户网点: + + + + + + 备注: + + + + *显示状态: diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index c66eb4666..b064668ed 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -35,6 +35,54 @@ + + *联系结算人: + + + + + + *联系电话: + + + + + + *所在地址: + + + + + + *银行卡号: + + + + + + *银行卡名: + + + + + + *收款银行: + + + + + + *开户网点: + + + + + + 备注: + + + + *显示状态: diff --git a/Application/Admin/View/StatementMangement/rewardManageList.html b/Application/Admin/View/StatementMangement/rewardManageList.html index 6b79eaee0..064f94ca5 100644 --- a/Application/Admin/View/StatementMangement/rewardManageList.html +++ b/Application/Admin/View/StatementMangement/rewardManageList.html @@ -64,7 +64,15 @@
- + +
+ +
+
我已仔细阅读,并同意《游戏推广服务框架协议》 + + 我已仔细阅读,并同意《游戏推广服务框架协议》 @@ -329,6 +330,22 @@ + + + diff --git a/Application/Home/View/default/Safe/safeDocument.html b/Application/Home/View/default/Safe/safeDocument.html index 3395e8ae0..0694eff24 100644 --- a/Application/Home/View/default/Safe/safeDocument.html +++ b/Application/Home/View/default/Safe/safeDocument.html @@ -47,7 +47,7 @@ and open the template in the editor. -
+

游戏推广服务框架协议

本协议由以下双方于{$time}签订:

@@ -57,11 +57,11 @@ and open the template in the editor.

联系电话:13067391751

联系人:雷丽华

邮箱号:383166987@qq.com

-

乙方:

-

注册地址:

-

联系电话:

-

联系人:

-

邮箱号:

+

乙方:{$realname}

+

注册地址:{$address}

+

联系电话:{$phone}

+

联系人:{$realname}

+

邮箱号:{$email}

      经甲乙双方协商一致,在平等互利的基础上,就乙方推广甲方拥有知识产权 或合法授权的游戏(以下简称“产品”)达成如下协议:

1 合作内容及合作期限

diff --git a/Data/update.sql b/Data/update.sql index 318cab14b..95d041538 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1195,3 +1195,14 @@ ADD COLUMN `review_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '审核模式:1 -- 2020-02-10 liaojinling 推广员组名/部门名 ALTER TABLE `tab_promote` ADD COLUMN `group_remark` varchar(50) NOT NULL default '' COMMENT '部门分组'; + +--2020-02-10 sunke 公司录入主体信息增加-- +ALTER TABLE `tab_promote_company` + ADD COLUMN `settlement_contact` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '结算联系人' AFTER `last_up_time`, + ADD COLUMN `contact_phone` BIGINT(12) NOT NULL DEFAULT '0' COMMENT '联系电话' AFTER `settlement_contact`, + ADD COLUMN `address` VARCHAR(255) NOT NULL DEFAULT '0' COMMENT '所在地址' AFTER `contact_phone`, + ADD COLUMN `bank_card` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '银行卡号' AFTER `address`, + ADD COLUMN `bank_cardname` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '银行卡名' AFTER `bank_card`, + ADD COLUMN `bank_name` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '收款银行' AFTER `bank_cardname`, + ADD COLUMN `bank_address` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '开户网点' AFTER `bank_name`, + ADD COLUMN `content` VARCHAR(255) NULL DEFAULT '' COMMENT '备注' AFTER `bank_address`;