diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index aebb55f6f..5604fc731 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -873,7 +873,7 @@ function checkPhone($phone) { * @return false|int */ function checkNumber($num) { - return preg_match("/^([1-9][0-9]*)+(.[0-9]{1,2})?$/",$num); + return preg_match("/^([1-9][0-9]*)+(.[0-9]{1,3})?$/",$num); } //获取sdk类型名称 diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index f3376e6f6..d888de704 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -3,8 +3,6 @@ namespace Admin\Controller; use User\Api\UserApi as UserApi; -use OSS\OssClient; -use OSS\Core\OSsException; use Think\Controller; /** @@ -201,14 +199,22 @@ class PartnerController extends ThinkController $this->meta_title = '合作方管理'; $this->display(); } + //审核列表 + public function index() + { + $model = M("partner_verify", 'tab_'); + $map = []; + // + $this->display(); + } //添加 public function add() { + $model = M($this->modelName, 'tab_');; if ($_POST) { $save = I("post."); $this->checkData($save); - $save['uid'] = UID; $save['create_time'] = time(); $res = $model->add($save); @@ -284,9 +290,6 @@ class PartnerController extends ThinkController $data['validity_end_time']=''; } - $data['channel_rate'] *= 100;//存的是小数,显示百分比 - $data['invoice_rate'] *= 100;//存的是小数,显示百分比 -// dd($data); $this->assign('data', $data); $action = I('action'); $this->assign('action', $action); @@ -361,22 +364,37 @@ class PartnerController extends ThinkController if(!empty(I('reg_phone')) && !checkPhone(I('reg_phone'))) { $this->error('注册电话格式不正确'); } + if(!empty(I('taxation_rate'))) { + if(!checkNumber(I('taxation_rate'))){ + $this->error('税费费率格式错误'); + }else{ + $save['taxation_rate'] = ($save['taxation_rate'] ?: 0); + } + }else{ + $save['taxation_rate']=0; + } if(!empty(I('channel_rate'))) { if(!checkNumber(I('channel_rate'))){ $this->error('渠道费率格式不对'); }else{ - $save['channel_rate'] = ($save['channel_rate'] ?: 0)/100; + $save['channel_rate'] = ($save['channel_rate'] ?: 0); } + }else{ + $save['channel_rate']=0; } if(!empty(I('invoice_rate'))) { if(!checkNumber(I('invoice_rate'))){ $this->error('开票税点格式不对'); }else{ - $save['invoice_rate'] = ($save['invoice_rate'] ?: 0)/100; + $save['invoice_rate'] = ($save['invoice_rate'] ?: 0); } + }else{ + $save['invoice_rate']=0; } - if(!empty(I('server_fee')) && !checkNumber(I('server_fee'))) { + if(!empty(I('server_fee')) && !checkNumber(I('server_fee')) && I("has_server_fee") == 1) { $this->error('服务器费用格式不对'); + }else{ + $save['server_fee']=0; } $time = time(); $save['contract_start_time'] = strtotime($save['contract_start_time']); diff --git a/Application/Admin/View/Partner/add.html b/Application/Admin/View/Partner/add.html index 639f45e88..ab72c45e1 100644 --- a/Application/Admin/View/Partner/add.html +++ b/Application/Admin/View/Partner/add.html @@ -63,18 +63,23 @@ 渠道费率: - % + % + 开票税点: - % + % + + + + 税费费率: + + % - - 是否签署合同: diff --git a/Application/Admin/View/Partner/edit.html b/Application/Admin/View/Partner/edit.html index b88a144cf..cf2c01034 100644 --- a/Application/Admin/View/Partner/edit.html +++ b/Application/Admin/View/Partner/edit.html @@ -62,14 +62,20 @@ 渠道费率: - % + % 开票税点: - % + % + + + + 税费费率: + + % @@ -425,14 +431,11 @@ }); }); $("#submit2").on("click",function(){ - console.log(111); var cres = $('form').serializeArray(); - console.log(222); //验证通过 if(doc.length > 0){ cres.push({"name":"file_info", "value":JSON.stringify(doc)}); } - console.log(333); //添加 $.ajax({ url:"{:U('partner/edit')}", diff --git a/Application/Admin/View/Partner/export.html b/Application/Admin/View/Partner/export.html index 32e5febde..683e80e13 100644 --- a/Application/Admin/View/Partner/export.html +++ b/Application/Admin/View/Partner/export.html @@ -74,6 +74,9 @@ 开票税点 发票类型 + 发票类型 + 税费费率 + 渠道费率 注册地址 注册电话 @@ -127,6 +130,7 @@ {$data.invoice_rate}% {$data.invoice_type} + {$data.taxation_rate}% {$data.channel_rate}% {$data.reg_address} {$data.reg_phone} diff --git a/Application/Admin/View/Partner/index.html b/Application/Admin/View/Partner/index.html new file mode 100644 index 000000000..d7e2a8b09 --- /dev/null +++ b/Application/Admin/View/Partner/index.html @@ -0,0 +1,313 @@ + + + + + + + + + + + +
+
+
+ +
+ +
+   +
+ +
+ +
+ +
+ + - +
+ + +
+
+ +
+ 搜索 +
+
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
合同合作方名称对应平台公司性质合同期限结算生效期限渠道费率开票税点结算生效期限帐户名银行账号收款银行是否有预付款操作
aOh! 暂时还没有内容!
{$data.partner}{$data.matche_platform}{$data.company_type}{$data['game'][0]['original_package_name']}{$data['game'][0]['relation_game_name']}{$data['game'][0]['game_type_name']}{$data['game'][0]['game_ratio'][0]['name']}{$data['game'][0]['game_ratio'][0]['ratio']}%-------{$data.settlement_type}{$data.payee_name}{$data.bank_account}{$data.opening_bank}{$data.has_advance_charge}{$data.is_collection} + 编辑 + 查看 + 删除 +
{$game_ratio['name']}{$game_ratio['ratio']}%
{$game['original_package_name']}{$game['relation_game_name']}{$game['game_type_name']}{$game['game_ratio'][0]['name']}{$game['game_ratio'][0]['ratio']}%--
{$game_ratio['name']}{$game_ratio['ratio']}%
+
+
+
+ {$_page|default=''} +
+ + + +
+ + + + + + if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + + + + diff --git a/Application/Admin/View/Partner/show.html b/Application/Admin/View/Partner/show.html index 2ecfc478a..1186d24fe 100644 --- a/Application/Admin/View/Partner/show.html +++ b/Application/Admin/View/Partner/show.html @@ -72,6 +72,13 @@ % + + 税费费率: + + % + + + diff --git a/Data/update.sql b/Data/update.sql index bd05e829a..1fa495b60 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2091,3 +2091,24 @@ ALTER TABLE `tab_partner` MODIFY COLUMN `settlement_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '结算方式(作废,请查看tab_company_relation表)' AFTER `is_sign_contract`; ALTER TABLE `sys_shift_task` ADD COLUMN `change_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '推广员充值换榜执行状态 0 未处理 1 已处理' AFTER `status`; + + +--CP审核 cz +ALTER TABLE `tab_partner` +ADD COLUMN `taxation_rate` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '开票税点' AFTER `cooperation_status`; + +CREATE TABLE `tab_partner_verify` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `partner_id` int(11) NOT NULL COMMENT '0新增,其他修改', + `partner_name` varchar(60) NOT NULL DEFAULT '' COMMENT '上游公司名称', + `partner_info` text NOT NULL COMMENT '公司信息', + `verify_status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态 -1拒绝 0未审核 1审核通过', + `create_admin_id` int(11) NOT NULL DEFAULT '0' COMMENT '添加人ID', + `create_admin_account` int(11) NOT NULL DEFAULT '0' COMMENT '添加人账号', + `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间', + `verify_log` text NOT NULL COMMENT '审批相关信息json', + PRIMARY KEY (`id`), + KEY `partner_id` (`partner_id`) USING BTREE, + KEY `partner_name` (`partner_name`) USING BTREE, + KEY `verify_status` (`verify_status`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;