diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 99b0b5fc3..c1d4986d2 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -92,10 +92,22 @@ class PartnerController extends ThinkController if ($res) { $this->error('合作方已存在'); } + if(!preg_match("/^1[358][0-9]{9}$/u",I('link_phone'))) { + $this->error('联系电话格式不正确'); + } $time = time(); $save['partner'] = $partner; $save['status'] = $status; + + $save['link_man'] = I('link_man'); + $save['link_phone'] = I('link_phone'); + $save['address'] = I('address'); + $save['company_tax_no'] = I('company_tax_no'); + $save['payee_name'] = I('payee_name'); + $save['bank_account'] = I('bank_account'); + $save['opening_bank'] = I('opening_bank'); + $save['uid'] = UID; $save['create_time'] = $time; $save['last_up_time'] = $time; @@ -131,7 +143,9 @@ class PartnerController extends ThinkController $this->error('参数异常'); } - $data = $model->field('id,partner')->find($id); + $data = $model + ->field('id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank') + ->find($id); if (empty($data)) { $this->error('数据异常'); } @@ -142,12 +156,24 @@ class PartnerController extends ThinkController $this->error('合作方已存在'); } + if(!preg_match("/^1[358][0-9]{9}$/u",I('link_phone'))) { + $this->error('联系电话格式不正确'); + } + $time = time(); $save['id'] = $id; $save['partner'] = $partner; + + $save['link_man'] = I('link_man'); + $save['link_phone'] = I('link_phone'); + $save['address'] = I('address'); + $save['company_tax_no'] = I('company_tax_no'); + $save['payee_name'] = I('payee_name'); + $save['bank_account'] = I('bank_account'); + $save['opening_bank'] = I('opening_bank'); + $save['status'] = $status; $save['last_up_time'] = $time; - $res = $model->save($save); if ($res === false) { $this->error('保存失败'); @@ -158,7 +184,9 @@ class PartnerController extends ThinkController } else { $id = intval(I('get.id', 0)); $map['id'] = $id; - $data = $model->field('id,partner,status')->find($id); + $data = $model + ->field('id,partner,status,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank') + ->find($id); if (empty($data)) { $this->error('数据异常', U('lists')); } diff --git a/Application/Admin/View/Partner/add.html b/Application/Admin/View/Partner/add.html index c499967a0..d4efaf0cd 100644 --- a/Application/Admin/View/Partner/add.html +++ b/Application/Admin/View/Partner/add.html @@ -35,6 +35,57 @@ + + + 联系人: + + + + + + + 联系电话: + + + + + + + 邮寄地址: + + + + + + + 公司税号: + + + + + + + 收款方名称: + + + + + + + 银行账号: + + + + + + + + 开户行: + + + + + *显示状态: diff --git a/Application/Admin/View/Partner/edit.html b/Application/Admin/View/Partner/edit.html index 8bfa4e180..902c9b0dd 100644 --- a/Application/Admin/View/Partner/edit.html +++ b/Application/Admin/View/Partner/edit.html @@ -35,17 +35,68 @@ + + + 联系人: + + + + + + + 联系电话: + + + + + + + 邮寄地址: + + + + + + + 公司税号: + + + + + + + 收款方名称: + + + + + + + 银行账号: + + + + + + + + 开户行: + + + + + *显示状态: diff --git a/Data/update.sql b/Data/update.sql index bf9d0accc..8f0ce3a30 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -919,4 +919,12 @@ ADD COLUMN `pay_config` varchar(255) NOT NULL COMMENT '支付渠道 wx 微信 zf ALTER TABLE tab_promote add `company_belong` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会归属:0-内团;1-外团'; ALTER TABLE tab_promote add `company_relation` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会关系:0-自主开发及维护;1-只维护'; +--游戏的合作方新增联系人,联系电话,邮寄地址,公司税号,收款方名称,银行账号,开户行 liuweiwen 2020-01-03 +ALTER TABLE tab_partner ADD `link_man` varchar(64) DEFAULT '' COMMENT '联系人' AFTER `status`; +ALTER TABLE tab_partner ADD `link_phone` varchar(24) DEFAULT NULL COMMENT '联系电话' AFTER `link_man`; +ALTER TABLE tab_partner ADD `address` varchar(255) DEFAULT NULL COMMENT '邮寄地址' AFTER `link_phone`; +ALTER TABLE tab_partner ADD `company_tax_no` varchar(64) DEFAULT NULL COMMENT '公司税号' AFTER `address`; +ALTER TABLE tab_partner ADD `payee_name` varchar(24) DEFAULT NULL COMMENT '收款方名称' AFTER `company_tax_no`; +ALTER TABLE tab_partner ADD `bank_account` varchar(32) DEFAULT NULL COMMENT '银行账号' AFTER `payee_name`; +ALTER TABLE tab_partner ADD `opening_bank` varchar(128) DEFAULT NULL COMMENT '开户行' AFTER `bank_account`;