From 6e63662f7d441276440b2988ea463e91ec8a76bd Mon Sep 17 00:00:00 2001 From: datang Date: Fri, 17 Feb 2023 14:41:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=8A=9E=E6=95=B0=E5=AD=97=E5=88=B7?= =?UTF-8?q?=E6=96=B0=EF=BC=9B=E5=AE=A2=E6=88=B7=E7=BA=A7=E5=88=AB=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/model/Field.php | 2 ++ application/crm/controller/Message.php | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/application/admin/model/Field.php b/application/admin/model/Field.php index 6daf83c..120b90e 100644 --- a/application/admin/model/Field.php +++ b/application/admin/model/Field.php @@ -1250,9 +1250,11 @@ class Field extends Model // $new_field_list[] = db('admin_field')->where(['types_id' => 0, 'field' => 'owner_user_id'])->find(); // } if ($new_field_list) $field_list = array_merge(collection($field_list)->toArray(), $new_field_list); + $adminTypes = adminGroupTypes($user_id); foreach ($field_list as $k => $v) { # 处理字段授权 $field_list[$k]['writeStatus'] = 1; + if($field_list[$k]['name'] == '客户级别' && !in_array(1,$adminTypes)) $field_list[$k]['writeStatus'] = 0; if (!$userLevel && $param['module'] == 'crm' && !empty($grantData[$param['types']])) { $status = getFieldGrantStatus($v['field'], $grantData[$param['types']]); diff --git a/application/crm/controller/Message.php b/application/crm/controller/Message.php index b794ac5..643e07e 100644 --- a/application/crm/controller/Message.php +++ b/application/crm/controller/Message.php @@ -91,7 +91,7 @@ class Message extends ApiCommon $todayLeads = $this->todayLeads(true); $data['todayLeads'] = $todayLeads['dataCount'] ? : 0; cache('todayLeadsCount'.$userInfo['id'], $data['todayLeads']); - cache('todayLeadsTime'.$userInfo['id'], time() + 180); + cache('todayLeadsTime'.$userInfo['id'], time() ); } # 今日需联系客户 $todayCustomerTime = cache('todayCustomerTime'.$userInfo['id']); @@ -102,7 +102,7 @@ class Message extends ApiCommon $todayCustomer = $this->todayCustomer(true); $data['todayCustomer'] = $todayCustomer['dataCount'] ? : 0; cache('todayCustomerCount'.$userInfo['id'], $data['todayCustomer']); - cache('todayCustomerTime'.$userInfo['id'], time() + 180); + cache('todayCustomerTime'.$userInfo['id'], time() ); } # 今日需联系商机 $todayBusinessTime = cache('todayBusinessTime'.$userInfo['id']); @@ -113,7 +113,7 @@ class Message extends ApiCommon $todayBusiness = $this->todayBusiness(true); $data['todayBusiness'] = $todayBusiness['dataCount'] ? : 0; cache('todayBusinessCount'.$userInfo['id'], $data['todayBusiness']); - cache('todayBusinessTime'.$userInfo['id'], time() + 180); + cache('todayBusinessTime'.$userInfo['id'], time() ); } # 分配给我的线索 $followLeadsTime = cache('followLeadsTime'.$userInfo['id']); @@ -124,7 +124,7 @@ class Message extends ApiCommon $followLeads = $this->followLeads(true); $data['followLeads'] = $followLeads['dataCount'] ? : 0; cache('followLeadsCount'.$userInfo['id'], $data['followLeads']); - cache('followLeadsTime'.$userInfo['id'], time() + 180); + cache('followLeadsTime'.$userInfo['id'], time() ); } # 分配给我的客户 $followCustomerTime = cache('followCustomerTime'.$userInfo['id']); @@ -135,7 +135,7 @@ class Message extends ApiCommon $followCustomer = $this->followCustomer(true); $data['followCustomer'] = $followCustomer['dataCount'] ? : 0; cache('followCustomerCount'.$userInfo['id'], $data['followCustomer']); - cache('followCustomerTime'.$userInfo['id'], time() + 180); + cache('followCustomerTime'.$userInfo['id'], time() ); } # 待审核合同 $checkContractTime = cache('checkContractTime'.$userInfo['id']); @@ -146,7 +146,7 @@ class Message extends ApiCommon $checkContract = $this->checkContract(true); $data['checkContract'] = $checkContract['dataCount'] ? : 0; cache('checkContractCount'.$userInfo['id'], $data['checkContract']); - cache('checkContractTime'.$userInfo['id'], time() + 180); + cache('checkContractTime'.$userInfo['id'], time() ); } # 待审核回款 $checkReceivablesTime = cache('checkReceivablesTime'.$userInfo['id']); @@ -157,7 +157,7 @@ class Message extends ApiCommon $checkReceivables = $this->checkReceivables(true); $data['checkReceivables'] = $checkReceivables['dataCount'] ? : 0; cache('checkReceivablesCount'.$userInfo['id'], $data['checkReceivables']); - cache('checkReceivablesTime'.$userInfo['id'], time() + 180); + cache('checkReceivablesTime'.$userInfo['id'], time() ); } # 待审核发票 $checkInvoiceTime = cache('checkInvoiceTime'.$userInfo['id']); @@ -170,7 +170,7 @@ class Message extends ApiCommon $data['checkInvoice'] = $checkInvoice['dataCount'] ? : 0; cache('checkInvoiceCount'.$userInfo['id'], $data['checkInvoice']); - cache('checkInvoiceTime'.$userInfo['id'], time() + 180); + cache('checkInvoiceTime'.$userInfo['id'], time() ); } # 待回款提醒 $remindReceivablesPlanTime = cache('remindReceivablesPlanTime'.$userInfo['id']); @@ -181,7 +181,7 @@ class Message extends ApiCommon $remindReceivablesPlan = $this->remindReceivablesPlan(true); $data['remindReceivablesPlan'] = $remindReceivablesPlan['dataCount'] ? : 0; cache('remindReceivablesPlanCount'.$userInfo['id'], $data['remindReceivablesPlan']); - cache('remindReceivablesPlanTime'.$userInfo['id'], time() + 180); + cache('remindReceivablesPlanTime'.$userInfo['id'], time() ); } if ($configData['visit_config'] == 1) { # 待回访合同 @@ -193,7 +193,7 @@ class Message extends ApiCommon $visitContract = $this->visitContract(true); $data['returnVisitRemind'] = $visitContract['dataCount'] ? : 0; cache('visitContractCount'.$userInfo['id'], $data['returnVisitRemind']); - cache('visitContractTime'.$userInfo['id'], time() + 180); + cache('visitContractTime'.$userInfo['id'], time() ); } } # 即将到期合同 @@ -206,7 +206,7 @@ class Message extends ApiCommon $endContract = $this->endContract(true); $data['endContract'] = $endContract['dataCount'] ? : 0; cache('endContractCount'.$userInfo['id'], $data['endContract']); - cache('endContractTime'.$userInfo['id'], time() + 180); + cache('endContractTime'.$userInfo['id'], time() ); } } # 待进入公海提醒 @@ -220,7 +220,7 @@ class Message extends ApiCommon $remindCustomer = $this->remindCustomer(true); $data['putInPoolRemind'] = !empty($remindCustomer['dataCount']) ? $remindCustomer['dataCount'] : 0; cache('remindCustomerCount'.$userInfo['id'], $data['putInPoolRemind']); - cache('remindCustomerTime'.$userInfo['id'], time() + 180); + cache('remindCustomerTime'.$userInfo['id'], time() ); } }