diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 99b0b5fc3..9c677d708 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -37,9 +37,10 @@ class PartnerController extends ThinkController $row = intval(I('row', 0)); $row = empty($row) ? 10 : $row;//每页条数 - $data = $model - ->field('tab_partner.id,tab_partner.partner,tab_partner.status,tab_partner.create_time,sys_member.nickname') - ->join('left join sys_member on sys_member.uid = tab_partner.uid') + $data = $model->alias('p') + ->field('p.id,p.partner,p.status,p.create_time,link_man,link_phone,address,company_tax_no,payee_name, + bank_account,opening_bank,m.nickname') + ->join('left join sys_member as m on m.uid = p.uid') ->where($map) ->order('id desc') ->page($page, $row) @@ -92,10 +93,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 +144,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 +157,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 +185,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/Application/Admin/View/Partner/lists.html b/Application/Admin/View/Partner/lists.html index 223a2403e..87d478aba 100644 --- a/Application/Admin/View/Partner/lists.html +++ b/Application/Admin/View/Partner/lists.html @@ -73,6 +73,15 @@ 合作方 显示状态 + + 联系人 + 联系电话 + 邮寄地址 + 公司税号 + 收款方名称 + 银行账号 + 开户行 + 添加人 添加时间 操作 @@ -89,6 +98,15 @@ {$data.partner} {$data.status} + + {$data.link_man} + {$data.link_phone} + {$data.address} + {$data.company_tax_no} + {$data.payee_name} + {$data.bank_account} + {$data.opening_bank} + {$data.nickname} {$data.create_time} diff --git a/Data/update.sql b/Data/update.sql index 5b4eb6b2e..e942b2df2 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -936,6 +936,14 @@ ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型 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`; -- 2020-01-02 -- 提现结算类型 cxj