From ce9faf7271097d0df8d7a26046e96a193690087e Mon Sep 17 00:00:00 2001 From: sk <599123572@qq.com> Date: Mon, 3 Feb 2020 12:24:15 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E5=85=AC=E5=8F=B8=E5=BD=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromoteCompanyController.class.php | 86 ++++++++++++++++++- .../Admin/View/PromoteCompany/add.html | 48 +++++++++++ .../Admin/View/PromoteCompany/edit.html | 48 +++++++++++ 3 files changed, 180 insertions(+), 2 deletions(-) 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/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 @@ + + *联系结算人: + + + + + + *联系电话: + + + + + + *所在地址: + + + + + + *银行卡号: + + + + + + *银行卡名: + + + + + + *收款银行: + + + + + + *开户网点: + + + + + + 备注: + + + + *显示状态: From 4ce64d43aa7923106eb37cf034057e9df2f6e64c Mon Sep 17 00:00:00 2001 From: sk <599123572@qq.com> Date: Mon, 3 Feb 2020 15:19:06 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E5=85=AC=E5=8F=B8=E5=BD=95=E5=85=A5sql?= =?UTF-8?q?=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Data/update.sql b/Data/update.sql index cf7f2f909..e30e6d88a 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1101,3 +1101,15 @@ ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显 ALTER TABLE `tab_promote_belong` ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是'; + + +-- 公司录入信息 +ALTER TABLE `tab_promote_company` +ADD COLUMN `settlement_contact` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci 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) CHARACTER SET utf8 COLLATE utf8_general_ci 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) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '银行卡名' AFTER `bank_card`, +ADD COLUMN `bank_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '收款银行' AFTER `bank_cardname`, +ADD COLUMN `bank_address` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '开户网点' AFTER `bank_name`, +ADD COLUMN `content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 0 COMMENT '备注' AFTER `bank_address`; From d98bfa04b9cf0f959d8df824410dfc49546dcd72 Mon Sep 17 00:00:00 2001 From: sk <599123572@qq.com> Date: Wed, 5 Feb 2020 18:24:08 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E8=B5=84=E8=B4=A8=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E7=94=B5=E5=AD=90=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/SafeController.class.php | 21 ++++++++++++++++++- .../View/default/Safe/modifyBaseInfo.html | 2 +- .../Home/View/default/Safe/safeDocument.html | 10 ++++----- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index 55daaae66..4a4c42744 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -459,14 +459,33 @@ class SafeController extends BaseController{ } public function safeDocument() { + $realname = $_REQUEST['realname']; + $phone = $_REQUEST['phone']; + $email = $_REQUEST['email']; + $address = $_REQUEST['address']; + if (empty($realname)) { + $realname = '您未填写真实姓名'; + } + if (empty($email)) { + $email = '您未填写联系邮箱'; + } + if (empty($address)) { + $address = '您未填写注册地址'; + } + if (empty($phone)) { + $phone = '您未填写联系号码'; + } $time = time(); $loginPromote = $this->getLoginPromote(); $sn = date('Ymd') . '-' . strtoupper(substr(md5($loginPromote['id']), 8, 16)); - $endTime = date('Y-m-d',strtotime('+1 year')); $this->assign('time',date('Y-m-d',$time)); $this->assign('endTime',$endTime); $this->assign('sn',$sn); + $this->assign('realname',$realname); + $this->assign('email',$email); + $this->assign('address',$address); + $this->assign('phone',$phone); $this->display(); } } \ No newline at end of file diff --git a/Application/Home/View/default/Safe/modifyBaseInfo.html b/Application/Home/View/default/Safe/modifyBaseInfo.html index e645fd7a8..a40135f17 100644 --- a/Application/Home/View/default/Safe/modifyBaseInfo.html +++ b/Application/Home/View/default/Safe/modifyBaseInfo.html @@ -304,7 +304,7 @@ - 我已仔细阅读,并同意《游戏推广服务框架协议》 + 我已仔细阅读,并同意《游戏推广服务框架协议》 diff --git a/Application/Home/View/default/Safe/safeDocument.html b/Application/Home/View/default/Safe/safeDocument.html index 3395e8ae0..f94cab217 100644 --- a/Application/Home/View/default/Safe/safeDocument.html +++ b/Application/Home/View/default/Safe/safeDocument.html @@ -57,11 +57,11 @@ and open the template in the editor.

联系电话:13067391751

联系人:雷丽华

邮箱号:383166987@qq.com

-

乙方:

-

注册地址:

-

联系电话:

-

联系人:

-

邮箱号:

+

乙方:{$realname}

+

注册地址:{$address}

+

联系电话:{$phone}

+

联系人:{$realname}

+

邮箱号:{$email}

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

1 合作内容及合作期限

From 889a79a6b56c53867298e0f06b9b5012486939ac Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 11 Feb 2020 13:53:48 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E7=94=B5=E5=AD=90=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/default/Safe/modifyBaseInfo.html | 19 ++++++++++++++++++- .../Home/View/default/Safe/safeDocument.html | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Application/Home/View/default/Safe/modifyBaseInfo.html b/Application/Home/View/default/Safe/modifyBaseInfo.html index a40135f17..f239511d8 100644 --- a/Application/Home/View/default/Safe/modifyBaseInfo.html +++ b/Application/Home/View/default/Safe/modifyBaseInfo.html @@ -304,7 +304,8 @@ - 我已仔细阅读,并同意《游戏推广服务框架协议》 + + 我已仔细阅读,并同意《游戏推广服务框架协议》 @@ -329,6 +330,22 @@ + + + diff --git a/Application/Home/View/default/Safe/safeDocument.html b/Application/Home/View/default/Safe/safeDocument.html index f94cab217..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}签订:

From cec446b5ab79c196df62cdf843bb8b9e02a44efa Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 11 Feb 2020 15:23:25 +0800 Subject: [PATCH 05/18] sql --- Data/update.sql | 98 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 88 insertions(+), 10 deletions(-) diff --git a/Data/update.sql b/Data/update.sql index e30e6d88a..f78d43196 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1074,6 +1074,22 @@ CREATE TABLE `sys_document_pop_rules` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; +--会长设置推广配置-- + +CREATE TABLE `tab_sociaty_games` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `promote_id` int(11) NOT NULL COMMENT '会长ID', + `game_id` int(11) NOT NULL COMMENT '游戏ID', + `status` tinyint(1) NOT null DEFAULT '0' COMMENT '状态 0 禁用 1 启用', + `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间', + `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT '工会授权游戏'; + +--游戏会长申请权限-- +ALTER TABLE `tab_game` + ADD COLUMN `apply_auth` INT(11) NULL DEFAULT '1' COMMENT '申请权限(1为全部可申请2为部分会长可申请)' AFTER `game_detail_cover`; + -- 2020-01-14 -- cxj ALTER TABLE `tab_promote_game_ratio` @@ -1102,14 +1118,76 @@ ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显 ALTER TABLE `tab_promote_belong` ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是'; +--CP分成比例添加运算符字段 2020-02-04 郑昌隆 +ALTER TABLE `tab_cp_game_ratio` +ADD COLUMN `instanceof` tinyint(2) NOT NULL DEFAULT 1 COMMENT '运算符(1:>= ; 2:>)' AFTER `game_id`; + +-- 2020-02-04 +ALTER TABLE `tab_promote` +ADD COLUMN `auto_review_withdraw_status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '提现自动审核状态:0-关闭 1-开启'; +ALTER TABLE `tab_promote` +ADD COLUMN `auto_review_withdraw_updated_time` int(10) NOT NULL DEFAULT 0 COMMENT '提现自动审核状态更新时间'; +ALTER TABLE `tab_promote` +ADD INDEX `auto_review_withdraw_status`(`auto_review_withdraw_status`) USING BTREE; + +-- 2020-02-10 yulingwei 奖罚记录 +CREATE TABLE `tab_reward_record` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `reward_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '奖罚类型 1奖励 2惩罚', + `company_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '公司类型 1上游公司 2下游公司', + `company_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '公司ID 当公司类型为上游CP公司时,展示合作方管理下的公司,反之展示推广公司管理下的公司', + `accounts` json NOT NULL, + `relation_game_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏id', + `content` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '事件内容', + `money` double(11,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额', + `reward_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖惩时间', + `remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注', + `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', + `creater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建者ID', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; --- 公司录入信息 -ALTER TABLE `tab_promote_company` -ADD COLUMN `settlement_contact` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci 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) CHARACTER SET utf8 COLLATE utf8_general_ci 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) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '银行卡名' AFTER `bank_card`, -ADD COLUMN `bank_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '收款银行' AFTER `bank_cardname`, -ADD COLUMN `bank_address` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '开户网点' AFTER `bank_name`, -ADD COLUMN `content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 0 COMMENT '备注' AFTER `bank_address`; +CREATE TABLE `tab_company_info` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `partner` varchar(60) NOT NULL COMMENT '合作方名称', + `uid` int(11) NOT NULL DEFAULT '0' COMMENT '添加人ID', + `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态 0-禁用 1-启用', + `link_man` varchar(64) DEFAULT '' COMMENT '联系人', + `link_phone` varchar(24) DEFAULT NULL COMMENT '联系电话', + `address` varchar(255) DEFAULT NULL COMMENT '邮寄地址', + `company_tax_no` varchar(64) DEFAULT NULL COMMENT '公司税号', + `payee_name` varchar(24) DEFAULT NULL COMMENT '收款方名称', + `bank_account` varchar(32) DEFAULT NULL COMMENT '银行账号', + `opening_bank` varchar(128) DEFAULT NULL COMMENT '开户行', + `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间', + `last_up_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='内部公司信息'; + + +-- 2020-02-10 liaojinling 会长押金 +CREATE TABLE `tab_president_deposit` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `promote_id` varchar(60) NOT NULL COMMENT '会长ID', + `payer` varchar(50) NOT NULL DEFAULT '' COMMENT '付款人', + `amount` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '金额', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态', + `pay_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '押金付款方式', + `pay_way` tinyint(1) NOT NULL DEFAULT '0' COMMENT '付款方式', + `pay_account` varchar(60) NOT NULL DEFAULT '' COMMENT '付款账号', + `pay_confirm_time` int(10) NOT NULL DEFAULT '0' COMMENT '押金确认时间', + `refund_time` int(10) NOT NULL DEFAULT '0' COMMENT '退款时间', + `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间', + `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='会长押金'; + +-- 2020-02-10 yulingwei 推广工会管理 新增属性类型 +ALTER TABLE `tab_promote_belong` +MODIFY COLUMN `company_belong` tinyint(1) UNSIGNED NOT NULL DEFAULT 3 COMMENT '工会归属:0-内团;1-外团 2-分发联盟 3 无' AFTER `verify_status`, +MODIFY COLUMN `company_relation` tinyint(1) UNSIGNED NOT NULL DEFAULT 2 COMMENT '工会关系:0-自主开发及维护;1-只维护 2 无' AFTER `company_belong`; +ADD COLUMN `company_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '工会类型 1公司 2个人' AFTER `can_view_recharge`; + +-- 2020-02-10 cxj 推广提现--新增审核模式 +ALTER TABLE `tab_withdraw` +ADD COLUMN `review_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '审核模式:1-人工审核 2-自动审核'; From f65ad73acfd29fdf57f90a143a8542b85ff012b3 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 11 Feb 2020 16:19:14 +0800 Subject: [PATCH 06/18] =?UTF-8?q?sql=E5=85=AC=E5=8F=B8=E5=BD=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Data/update.sql b/Data/update.sql index f78d43196..c657086a4 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1191,3 +1191,15 @@ ADD COLUMN `company_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '工 -- 2020-02-10 cxj 推广提现--新增审核模式 ALTER TABLE `tab_withdraw` ADD COLUMN `review_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '审核模式:1-人工审核 2-自动审核'; + + +--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`; From afbba4d20b534c598620811b856a5d55a91d47fb Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Wed, 12 Feb 2020 10:23:01 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E7=94=B5=E5=AD=90=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/View/default/Safe/modifyBaseInfo.html | 7 ++++++- Application/Home/View/default/Safe/safeDocument.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Application/Home/View/default/Safe/modifyBaseInfo.html b/Application/Home/View/default/Safe/modifyBaseInfo.html index f239511d8..5edbdd5d2 100644 --- a/Application/Home/View/default/Safe/modifyBaseInfo.html +++ b/Application/Home/View/default/Safe/modifyBaseInfo.html @@ -342,7 +342,12 @@ shadeClose: true, shade: 0.8, area: ['70%', '82%'], - content: ['index.php?s=/Home/safe/safeDocument/username/'+ username +'/email/' + email + '/realname/' + realname + '/phone/' + phone +'/address/' + address + '', 'no'] + btn:['同意'], + content: ['index.php?s=/Home/safe/safeDocument/username/'+ username +'/email/' + email + '/realname/' + realname + '/phone/' + phone +'/address/' + address + '', 'no'], + yes:function(index) { + window.localStorage.setItem('checked','checked'); + layer.close(index); + } }); } diff --git a/Application/Home/View/default/Safe/safeDocument.html b/Application/Home/View/default/Safe/safeDocument.html index 0694eff24..707800c19 100644 --- a/Application/Home/View/default/Safe/safeDocument.html +++ b/Application/Home/View/default/Safe/safeDocument.html @@ -236,7 +236,7 @@ and open the template in the editor.



- +







From 6a612565c656c1d9b966f69865c2b623ca58f308 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 13 Feb 2020 10:46:31 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E6=89=A9=E5=B1=95=E6=8E=A8=E5=B9=BF?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromoteCompanyController.class.php | 48 ++++- .../Admin/View/PromoteCompany/add.html | 191 +++++++++++++++++- .../Admin/View/PromoteCompany/addfile.html | 84 ++++++++ Data/update.sql | 11 + 4 files changed, 327 insertions(+), 7 deletions(-) create mode 100644 Application/Admin/View/PromoteCompany/addfile.html diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 1fe22c5d8..1038af82a 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -91,7 +91,7 @@ class PromoteCompanyController extends ThinkController if (empty(I('post.contact_phone'))) { $this->error('请输入联系人电话'); } - $pattern = "/^1[3|5|7|8]\\d{9}$/i"; + $pattern = "/^1[3|4|5|6|7|8|9]\\d{9}$/i"; if(!preg_match($pattern, I('post.contact_phone'))) { $this->error("手机号码格式不合法"); return false; @@ -178,7 +178,7 @@ class PromoteCompanyController extends ThinkController if (empty(I('post.contact_phone'))) { $this->error('请输入联系人电话'); } - $pattern = "/^1[3|5|7|8]\\d{9}$/i"; + $pattern = "/^1[3|4|5|6|7|8|9]\\d{9}$/i";//手机号验证修改 if(!preg_match($pattern, I('post.contact_phone'))) { $this->error("手机号码格式不合法"); return false; @@ -278,4 +278,48 @@ class PromoteCompanyController extends ThinkController $this->success('删除成功', U('lists')); } + //处理上传图片 + public function saveFile() + { + $path = '/Uploads/'; + $upload = new \Think\Upload();// 实例化上传类 + $upload->maxSize = 0 ;// 设置附件上传大小 + $upload->exts = '';// 设置附件上传类型 + $upload->rootPath = '.'.$path; // 设置附件上传根目录 + $upload->savePath = ''; // 设置附件上传(子)目录 + // 上传文件 + $info = $upload->upload(); + // dump($info); + if(!$info) {// 上传错误提示错误信息 + $msg = $upload->getError(); + $array= array('status' => 0, 'info' => $msg); + }else{// 上传成功 + $array=array( + "info"=>"上传成功", + "status"=>1, + "file_path"=>$path.$info['file']['savepath'].$info['file']['savename'], + "file_name"=>$_POST['file_name'], + "file_type"=>$_FILES['file']['type'], + "file_size"=>$_FILES['file']['size'], + "upload_time"=>date("Y-m-d H:i:s",time()) + ); + } + $this->ajaxReturn($array); + } + //删除图片 + public function delFile() + { + $id = $_REQUEST['id']; + $index = $_REQUEST['index'] ?: false; + $file_path = $_REQUEST['file_path'] ?: false; + if($id == 0){ + //未存入数据库,不用管 + unlink("./".$file_path); + $this->ajaxReturn(array( + 'status' => 1, + 'info' => "删除成功" + )); + } + # code... + } } diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index 0d2b420ed..ee183364c 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -14,7 +14,20 @@ - + +
@@ -24,7 +37,7 @@
-
+
@@ -35,6 +48,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
对应平台(简称): + +
合同期限: +
+ +  -  +
+ + +
+
+
开票税点: + + % +
*公司性质: +
+ +
+
*是否签署合同: +
+ +
+
*团体归属: +
+ +
+
*联系结算人: @@ -97,18 +177,30 @@
文档管理 +
+ 添加 +
+
+ + +
-
- 返回
-
+
@@ -119,7 +211,29 @@ 已添加添加至常用设置
+ @@ -130,4 +244,71 @@ $('#form').submit(); }); + diff --git a/Application/Admin/View/PromoteCompany/addfile.html b/Application/Admin/View/PromoteCompany/addfile.html new file mode 100644 index 000000000..aa56f5d44 --- /dev/null +++ b/Application/Admin/View/PromoteCompany/addfile.html @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
文件名称: + +
文件选择: + +
+
+
+
确认添加
+
+
+
+ + + + + diff --git a/Data/update.sql b/Data/update.sql index c657086a4..81cf88d47 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1203,3 +1203,14 @@ ALTER TABLE `tab_promote_company` 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`; + +--2020-02-11 chenzhi 推广公司录入主体信息增加-- +ALTER TABLE `tab_promote_company` + ADD COLUMN `platform_name` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '平台名称' AFTER `bank_address`, + ADD COLUMN `contact_begin` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '合同开始时间' AFTER `platform_name`, + ADD COLUMN `contact_end` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '合同结束时间' AFTER `contact_begin`, + ADD COLUMN `fax_ratio` VARCHAR(20) NOT NULL DEFAULT '0' COMMENT '开票税率' AFTER `contact_end`, + ADD COLUMN `company_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '公司性质:1-公司 2-个人' AFTER `fax_ratio`, + ADD COLUMN `is_sign_contact` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否签署合同:0-未签署 1-签署' AFTER `company_type`, + ADD COLUMN `company_belong` tinyint(1) UNSIGNED NOT NULL DEFAULT 3 COMMENT '工会归属:0-内团;1-外团 2-分发联盟 3 无' AFTER `is_sign_contact`, + ADD COLUMN `resources` VARCHAR(2000) NULL DEFAULT '' COMMENT '文档' AFTER `company_belong`; \ No newline at end of file From 1f1e75e73696c44e840105ed3d06ef8ebb370cfe Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 13 Feb 2020 13:00:21 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A8=E5=B9=BF?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromoteCompanyController.class.php | 76 ++++------------- .../Admin/View/PromoteCompany/add.html | 83 ++++++++++++++++++- Public/static/czinputcheck.js | 80 ++++++++++++++++++ 3 files changed, 177 insertions(+), 62 deletions(-) create mode 100644 Public/static/czinputcheck.js diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 1038af82a..066eeff44 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -80,77 +80,35 @@ class PromoteCompanyController extends ThinkController { if ($_POST) { $company_name = I('post.company_name', ''); - $status = intval(I('post.status', 1)); - - 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|4|5|6|7|8|9]\\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'); if ($res) { - $this->error('推广公司已存在'); + $this->ajaxReturn(array( + 'status' => 0, + 'info' => "推广公司已经存在" + )); } - $time = time(); - $save['company_name'] = $company_name; - $save['status'] = $status; - $save['uid'] = UID; + $save = I('post.');//前端已经验证 $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'); - + if(isset($save['resources'])){ + $save['resources'] = json_encode($save['resources'],JSON_UNESCAPED_UNICODE); + } $res = $model->add($save); if ($res) { \Think\Log::actionLog('PromoteCompany/add', 'partner', $res); - $this->success('保存成功', U('lists')); + $array=array( + "info"=>"添加成功", + "status"=>1 + ); + $this->ajaxReturn($array); } else { - $this->error('保存失败'); + $this->ajaxReturn(array( + 'status' => 0, + 'info' => "保存失败" + )); } } else { $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'PromoteCompany/add'])->find()); diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index ee183364c..87220142b 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -2,6 +2,8 @@ + + - +
+
-
-
- -
-
- - 搜索 +
+ + +
+
+   +
+ +
+ +
+
+ +
+ +
+ 搜索 +
@@ -77,19 +102,18 @@ 产品类型 游戏名称 合作方分成比例 - - - aOh! 暂时还没有内容! + aOh! 暂时还没有内容! + 查看 编辑 删除 @@ -191,14 +215,14 @@ {$_page|default=''}
-
+ From 6ea7a581f581ffe78cdf9a60d2b7cd2b48a1e753 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 13 Feb 2020 21:25:30 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromoteCompanyController.class.php | 21 +- .../Admin/View/PromoteCompany/edit.html | 295 ++++++++++++-- .../Admin/View/PromoteCompany/view.html | 377 ++++++++++++++++++ 3 files changed, 665 insertions(+), 28 deletions(-) create mode 100644 Application/Admin/View/PromoteCompany/view.html diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 1d53d2179..89d8bdefa 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -239,6 +239,20 @@ class PromoteCompanyController extends ThinkController $this->display(); } } + //查看 + public function view() + { + $model = M($this->modelName, 'tab_'); + $id = $_REQUEST['id'] ?: 0; + $map['id'] = $id; + $data = $model->field('*')->find($id); + if (empty($data)) { + $this->error('数据异常', U('lists')); + } + $this->assign('data', $data); + $this->display(); + } + //编辑 public function edit() @@ -322,16 +336,13 @@ class PromoteCompanyController extends ThinkController $this->success('保存成功', U('lists')); } } else { - $id = intval(I('get.id', 0)); + $id = $_REQUEST['id'] ?: 0; $map['id'] = $id; - $data = $model->field('id,company_name,status,settlement_contact,contact_phone,address,bank_card,bank_cardname,bank_name,bank_address,content')->find($id); + $data = $model->field('*')->find($id); if (empty($data)) { $this->error('数据异常', U('lists')); } - $this->assign('data', $data); - $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'PromoteCompany/edit'])->find()); - $this->meta_title = '编辑推广公司'; $this->display(); } } diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index b064668ed..7a3b0e042 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -2,6 +2,8 @@ + +
@@ -24,7 +42,7 @@
-
+
@@ -35,52 +53,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -88,49 +173,213 @@ + + + + +
对应平台(简称): + +
合同期限: +
+ +  -  +
+ + +
+
+
开票税点: + + % +
*公司性质: +
+ +
+
*是否签署合同: +
+ +
+
*团体归属: +
+ +
+
*联系结算人: - +
*联系电话: - +
*所在地址: - +
*银行卡号: - +
*收款银行: - +
*开户网点: - +
备注: - +
文档管理 +
+ 添加 +
+
+ + +
-
- - - + 返回
-
+
+
+ diff --git a/Application/Admin/View/PromoteCompany/view.html b/Application/Admin/View/PromoteCompany/view.html new file mode 100644 index 000000000..8b16d5be3 --- /dev/null +++ b/Application/Admin/View/PromoteCompany/view.html @@ -0,0 +1,377 @@ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
推广公司名称: + +
对应平台(简称): + +
合同期限: +
+ +  -  +
+ + +
+
+
开票税点: + + % +
公司性质: +
+ +
+
是否签署合同: +
+ +
+
团体归属: +
+ +
+
联系结算人: + +
联系电话: + +
所在地址: + +
银行卡号: + +
收款银行: + +
开户网点: + +
备注: + +
显示状态: + + + + + +
+ + +
+
+
+
+
+ + +
+ + + + + From 4e28b399995962f92f9d5fbbf03e027bef38b54c Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 13 Feb 2020 22:05:38 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A8=E5=B9=BF?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromoteCompanyController.class.php | 115 +++++------- .../Admin/View/PromoteCompany/edit.html | 176 ++++++++++-------- 2 files changed, 145 insertions(+), 146 deletions(-) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 89d8bdefa..50ceddccc 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -249,6 +249,8 @@ class PromoteCompanyController extends ThinkController if (empty($data)) { $this->error('数据异常', U('lists')); } + $data['contact_begin']=date("Y-m-d",$data['contact_begin']); + $data['contact_end']=date("Y-m-d",$data['contact_end']); $this->assign('data', $data); $this->display(); } @@ -260,80 +262,29 @@ class PromoteCompanyController extends ThinkController $model = M($this->modelName, 'tab_'); if ($_POST) { - $company_name = I('post.company_name', ''); - $status = intval(I('post.status', 1)); - $id = intval(I('post.id', 0)); - - 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|4|5|6|7|8|9]\\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('数据异常'); - } - - $map['company_name'] = $company_name; - $res = $model->where($map)->getField('id'); - if ($res && $res != $id) { - $this->error('推广公司已存在'); - } - $time = time(); - $save['id'] = $id; - $save['company_name'] = $company_name; - $save['status'] = $status; + $save = I('post.');//前端已经验证 + $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'); - + $save['contact_begin']=strtotime($save['contact_begin']); + $save['contact_end']=strtotime($save['contact_end']); + + if(isset($save['resources'])){ + $save['resources'] = json_encode($save['resources'],JSON_UNESCAPED_UNICODE); + } $res = $model->save($save); - if ($res === false) { - $this->error('保存失败'); + if ($res) { + \Think\Log::actionLog('PromoteCompany/edit', 'partner', $res); + $array=array( + "info"=>"修改成功", + "status"=>1 + ); + $this->ajaxReturn($array); } else { - \Think\Log::actionLog('PromoteCompany/edit', 'PromoteCompany', $id); - $this->success('保存成功', U('lists')); + $this->ajaxReturn(array( + 'status' => 0, + 'info' => "修改失败" + )); } } else { $id = $_REQUEST['id'] ?: 0; @@ -342,6 +293,9 @@ class PromoteCompanyController extends ThinkController if (empty($data)) { $this->error('数据异常', U('lists')); } + $data['contact_begin']=date("Y-m-d",$data['contact_begin']); + $data['contact_end']=date("Y-m-d",$data['contact_end']); + $this->assign('data', $data); $this->display(); } @@ -402,15 +356,30 @@ class PromoteCompanyController extends ThinkController public function delFile() { $id = $_REQUEST['id']; - $index = $_REQUEST['index'] ?: false; $file_path = $_REQUEST['file_path'] ?: false; + unlink("./".$file_path); if($id == 0){ - //未存入数据库,不用管 - unlink("./".$file_path); $this->ajaxReturn(array( 'status' => 1, 'info' => "删除成功" )); + }else{ + //需要修改 + $array = array( + "resources"=>json_encode($_REQUEST['resources'],JSON_UNESCAPED_UNICODE) + ); + $res = M($this->modelName, 'tab_')->where("id='{$id}'")->save($array); + if($res === false){ + $this->ajaxReturn(array( + 'status' => 0, + 'info' => "删除保存失败" + )); + }else{ + $this->ajaxReturn(array( + 'status' => 1, + 'info' => "删除成功" + )); + } } # code... } diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index 7a3b0e042..015297b55 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -37,7 +37,7 @@
@@ -63,11 +63,11 @@ 合同期限:
-  - 
-
@@ -77,7 +77,7 @@ 开票税点: - + % @@ -87,8 +87,10 @@
@@ -99,8 +101,10 @@
@@ -111,10 +115,14 @@
@@ -123,25 +131,25 @@ *联系结算人: - + *联系电话: - + *所在地址: - + *银行卡号: - +