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 @@
合同合作方名称 | +对应平台 | +公司性质 | +合同期限 | +结算生效期限 | + +渠道费率 | +开票税点 | +结算生效期限 | + + +帐户名 | +银行账号 | +收款银行 | + +是否有预付款 | + +操作 | +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']}% | +