需求:客户信息录入不限数量,但是录入的信息1个月内只有自己和部门领导能看到,如果1个月内未成交或者未转移至自己的客保 则掉入公海所有人可见,这里所说的客保就是现在系统自带的客保
ALTER TABLE `5kcrm_crm_customer` ADD `protect_pool_id` INT NOT NULL DEFAULT '0' COMMENT '公海保护(只匹配保护公海规则)' AFTER `crm_enufsp`;
INSERT INTO `5kcrm_admin_rule` (`id`, `types`, `title`, `name`, `level`, `pid`, `status`) VALUES (NULL, '2', '保护公海', 'protectPool', '3', '10', '1');
INSERT INTO `5kcrm_admin_scene` (`scene_id`, `types`, `name`, `user_id`, `order_id`, `data`, `is_hide`, `type`, `bydata`,
`create_time`, `update_time`) VALUES (NULL, 'crm_customer', '我保护的客户', '0', '0', '', '0', '1', 'me_protect', '1546272000', '1546272000'),
(NULL, 'crm_customer', '下属保护的客户', '0', '0', '', '0', '1', 'sub_protect', '1546272000', '1546272000');
ALTER TABLE `5kcrm_crm_customer` ADD `protect_pool_user_id` INT NOT NULL DEFAULT '0' COMMENT '保护人' AFTER `protect_pool_id`;
ALTER TABLE `5kcrm_crm_customer_config` CHANGE `is_deal` `is_deal` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '1成交客户';
ALTER TABLE `5kcrm_crm_customer_config` CHANGE `types` `types` INT(4) NOT NULL DEFAULT '1' COMMENT '1拥有客户上限2锁定客户上限';
执行定时任务
\application\common\command\PoolbCommand.php
protected function configure()
{
$this->setName('poolb')
->addArgument('status', Argument::REQUIRED, 'start/stop/reload/status/connections')
->addOption('d', null, Option::VALUE_NONE, 'daemon(守护进程)方式启动')
->setDescription('公海回收定时器');
// 读取数据库配置文件
$filename = ROOT_PATH . 'config' . DS . 'database.php';
// 重新加载数据库配置文件
Config::load($filename, 'database');
}
php think pool start --d
php think poolb start -d
启动:php think pool start --d
重启:php think pool restart --d
停止:php think pool stop
状态:php think pool status
前端修改的文件
\src\api\crm\customer.js
\src\views\admin\crm\bizParam\index.vue
\src\views\admin\crm\customer\index.vue
\src\views\crm\components\SelectionHandle\ProtectPoolHandle.vue
\src\views\crm\components\CRMTableHead.vue
\src\views\crm\components\CRMDetailHead.vue
\src\views\crm\seas\index.vue