From cf10887e494f9419f8bc8715cb07c10a1dca2964 Mon Sep 17 00:00:00 2001 From: jianglong Date: Fri, 1 Sep 2023 15:08:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/qingdong/model/FormField.php | 2 +- .../admin/controller/qingdong/contract/Record.php | 2 +- .../controller/qingdong/customer/Business.php | 2 +- .../controller/qingdong/customer/Contract.php | 4 +- .../controller/qingdong/customer/Customer.php | 4 +- .../controller/qingdong/customer/Receivables.php | 2 +- .../admin/controller/qingdong/customer/Record.php | 1 + .../controller/qingdong/department/Achievement.php | 2 +- .../admin/controller/qingdong/report/Daily.php | 2 +- .../controller/qingdong/statistic/Customers.php | 6 +-- .../admin/controller/qingdong/work/Approval.php | 6 +-- .../admin/controller/qingdong/work/Flow.php | 2 +- .../controller/qingdong/work/Formapproval.php | 6 +-- .../view/qingdong/customer/business/index.html | 48 ++++++++--------- .../view/qingdong/customer/contacts/index.html | 48 ++++++++--------- .../view/qingdong/customer/contract/index.html | 48 ++++++++--------- .../view/qingdong/customer/customer/index.html | 60 +++++++++++----------- .../admin/view/qingdong/customer/leads/index.html | 24 ++++----- .../view/qingdong/customer/receivables/index.html | 4 +- .../admin/view/qingdong/customer/seas/index.html | 4 +- .../admin/view/qingdong/product/goods/index.html | 4 +- .../view/qingdong/product/producttype/index.html | 2 +- 22 files changed, 142 insertions(+), 141 deletions(-) diff --git a/addons/qingdong/model/FormField.php b/addons/qingdong/model/FormField.php index c6d3f4f..193e31e 100644 --- a/addons/qingdong/model/FormField.php +++ b/addons/qingdong/model/FormField.php @@ -116,7 +116,7 @@ class FormField extends Model { $params[$v['field']]=implode(',',$params[$v['field']]); } $where[$v['field']]=$params[$v['field']]; - if($model->where($where)->count() > 0){ + if($model->where($where)->where('cid','=',CID)->count() > 0){ return $v['name'] ."【{$params[$v['field']]}】". '已存在!'; } } diff --git a/application/admin/controller/qingdong/contract/Record.php b/application/admin/controller/qingdong/contract/Record.php index 6a2365c..08007be 100644 --- a/application/admin/controller/qingdong/contract/Record.php +++ b/application/admin/controller/qingdong/contract/Record.php @@ -137,7 +137,7 @@ class Record extends Base { $this->error('创建失败'); } - $staff=Staff::where([])->column('name','id'); + $staff=Staff::where(['cid'=>CID])->column('name','id'); if($ids){ $contracts=Contract::where(['id'=>$ids])->column('id,name'); }else{ diff --git a/application/admin/controller/qingdong/customer/Business.php b/application/admin/controller/qingdong/customer/Business.php index 4ab9c14..30333e2 100644 --- a/application/admin/controller/qingdong/customer/Business.php +++ b/application/admin/controller/qingdong/customer/Business.php @@ -298,7 +298,7 @@ class Business extends Base $this->error('创建失败'); } - $staff=Staff::where([])->column('name','id'); + $staff=Staff::where(['cid'=>CID])->column('name','id'); $follow= Field::getField('商机状态'); $this->assign('follow', $follow); $this->assign('ids', $ids); diff --git a/application/admin/controller/qingdong/customer/Contract.php b/application/admin/controller/qingdong/customer/Contract.php index 6b3eebf..f577a0a 100644 --- a/application/admin/controller/qingdong/customer/Contract.php +++ b/application/admin/controller/qingdong/customer/Contract.php @@ -611,8 +611,8 @@ class Contract extends Base { foreach ($contacts as $v) { $contactsNames[$v['customer_id']][$v['name']] = $v; } - $businessNames=Business::where([])->column('id','name'); - $staffNames=Staff::where([])->column('id','name'); + $businessNames=Business::where(['cid'=>CID])->column('id','name'); + $staffNames=Staff::where(['cid'=>CID])->column('id','name'); $fn = []; $nums=$this->model->where([])->column('num'); for ($currentRow = 1; $currentRow <= 1; $currentRow++) { diff --git a/application/admin/controller/qingdong/customer/Customer.php b/application/admin/controller/qingdong/customer/Customer.php index 0ed0ef0..bd07123 100644 --- a/application/admin/controller/qingdong/customer/Customer.php +++ b/application/admin/controller/qingdong/customer/Customer.php @@ -229,7 +229,7 @@ class Customer extends Base $this->assign('seastype', Seastype::where([])->column('name', 'id')); $this->assign('staff_ids', $staff_ids); - $this->assign('staff', Staff::where([])->column('name', 'id')); + $this->assign('staff', Staff::where(['cid'=>CID])->column('name', 'id')); return $this->view->fetch(); } @@ -514,7 +514,7 @@ class Customer extends Base $customer = $this->model->where(['id' => $ids])->find(); - $this->assign('staff', Staff::where([])->column('name', 'id')); + $this->assign('staff', Staff::where(['cid'=>CID])->column('name', 'id')); $this->view->assign('customer', $customer); return $this->view->fetch(); } diff --git a/application/admin/controller/qingdong/customer/Receivables.php b/application/admin/controller/qingdong/customer/Receivables.php index 8c0d95e..0437f0d 100644 --- a/application/admin/controller/qingdong/customer/Receivables.php +++ b/application/admin/controller/qingdong/customer/Receivables.php @@ -137,7 +137,7 @@ class Receivables extends Base { } $this->error(__('Parameter %s can not be empty', '')); } - $staff=Staff::where([])->column('name','id'); + $staff=Staff::where(['cid'=>CID])->column('name','id'); $this->assign('staff', $staff); $flow= Flow::getsteplist(Flow::RECEIVABLES_STATUS); diff --git a/application/admin/controller/qingdong/customer/Record.php b/application/admin/controller/qingdong/customer/Record.php index 37e504b..c4d12fd 100644 --- a/application/admin/controller/qingdong/customer/Record.php +++ b/application/admin/controller/qingdong/customer/Record.php @@ -233,6 +233,7 @@ class Record extends Base { $this->assignconfig("idinfo", ['id' => $ids]); return $this->view->fetch(); } + /** * 评论 */ diff --git a/application/admin/controller/qingdong/department/Achievement.php b/application/admin/controller/qingdong/department/Achievement.php index 859e464..84d6daf 100644 --- a/application/admin/controller/qingdong/department/Achievement.php +++ b/application/admin/controller/qingdong/department/Achievement.php @@ -383,7 +383,7 @@ class Achievement extends Base if(!empty($name)){ $where['name'] = ['like','%'.$name.'%']; } - $staff = Staff::where($where)->field('id,name')->order('id desc')->paginate($pageSize, false, ['page' => $pageNumber]); + $staff = Staff::where($where)->where('cid','=',CID)->field('id,name')->order('id desc')->paginate($pageSize, false, ['page' => $pageNumber]); return json(['list' => $staff->items(), 'total' => $staff->total()]); } /** diff --git a/application/admin/controller/qingdong/report/Daily.php b/application/admin/controller/qingdong/report/Daily.php index a38c8e0..062cd16 100644 --- a/application/admin/controller/qingdong/report/Daily.php +++ b/application/admin/controller/qingdong/report/Daily.php @@ -152,7 +152,7 @@ class Daily extends Base { 'quarterly'=>'季报', 'yearly'=>'年报', ]; - $this->assign('staff', Staff::where([])->column('name', 'id')); + $this->assign('staff', Staff::where(['cid'=>CID])->column('name', 'id')); $this->assign('form_data', Form::getDataValue($type)); $this->assign('type', $data[$type]??'日'); diff --git a/application/admin/controller/qingdong/statistic/Customers.php b/application/admin/controller/qingdong/statistic/Customers.php index 6d9181f..3399905 100644 --- a/application/admin/controller/qingdong/statistic/Customers.php +++ b/application/admin/controller/qingdong/statistic/Customers.php @@ -119,7 +119,7 @@ class Customers extends Backend } $where['status'] = 1; $where['id'] = ['in', $ids]; - $staff = Staff::where($where)->field('id,name')->select(); + $staff = Staff::where($where)->where('cid','=',CID)->field('id,name')->select(); $customInfo = []; foreach ($staff as $k => $v) { $customInfo[$k]['name'] = $v['name']; @@ -240,7 +240,7 @@ class Customers extends Backend } $where['status'] = 1; $where['id'] = ['in', $ids]; - $staff = Staff::where($where)->field('id,name')->select(); + $staff = Staff::where($where)->where('cid','=',CID)->field('id,name')->select(); $customInfo = []; foreach ($staff as $k => $v) { $customInfo[$k]['name'] = $v['name']; @@ -504,7 +504,7 @@ class Customers extends Backend if (!empty($name)) { $where['name'] = ['like', '%' . $name . '%']; } - $staff = Staff::where($where)->field('id,name')->order('id desc')->paginate($pageSize, false, ['page' => $pageNumber]); + $staff = Staff::where($where)->where('cid','=',CID)->field('id,name')->order('id desc')->paginate($pageSize, false, ['page' => $pageNumber]); return json(['list' => $staff->items(), 'total' => $staff->total()]); } diff --git a/application/admin/controller/qingdong/work/Approval.php b/application/admin/controller/qingdong/work/Approval.php index b89749d..4fcde44 100644 --- a/application/admin/controller/qingdong/work/Approval.php +++ b/application/admin/controller/qingdong/work/Approval.php @@ -79,7 +79,7 @@ class Approval extends Base { $type = Form::where(array('id'=>$formapproval['form_id']))->value('type'); $this->assign('form_data', Form::getDataValue($type)); $this->assign('row', $formapproval); - $this->assign('staff', Staff::where([])->column('name', 'id')); + $this->assign('staff', Staff::where(['cid'=>CID])->column('name', 'id')); return $this->view->fetch(); } @@ -121,7 +121,7 @@ class Approval extends Base { //审批人 $where['id'] = array('in',$row['check_staff_ids']); - $staff = Staff::where($where)->column('name'); + $staff = Staff::where($where)->where('cid','=',CID)->column('name'); $row['staff_id'] = ''; if($staff){ $row['staff_id'] = implode(',',$staff); @@ -152,7 +152,7 @@ class Approval extends Base { if(!empty($name)){ $where['name'] = ['like','%'.$name.'%']; } - $staff = Staff::where($where)->where(['id'=>['neq',$this->_staff->id]])->field('id,name')->order('id desc')->paginate($pageSize, false, ['page' => $pageNumber]); + $staff = Staff::where($where)->where('cid','=',CID)->where(['id'=>['neq',$this->_staff->id]])->field('id,name')->order('id desc')->paginate($pageSize, false, ['page' => $pageNumber]); return json(['list' => $staff->items(), 'total' => $staff->total()]); } diff --git a/application/admin/controller/qingdong/work/Flow.php b/application/admin/controller/qingdong/work/Flow.php index c87e3d6..2037d74 100644 --- a/application/admin/controller/qingdong/work/Flow.php +++ b/application/admin/controller/qingdong/work/Flow.php @@ -207,7 +207,7 @@ class Flow extends Backend { if (!empty($name)) { $where['name'] = ['like', '%' . $name . '%']; } - $customer = Staff::where($where)->field('id,name')->order('id desc')->paginate($pageSize, false, ['page' => $pageNumber]); + $customer = Staff::where($where)->where('cid','=',CID)->field('id,name')->order('id desc')->paginate($pageSize, false, ['page' => $pageNumber]); return json(['list' => $customer->items(), 'total' => $customer->total()]); } } diff --git a/application/admin/controller/qingdong/work/Formapproval.php b/application/admin/controller/qingdong/work/Formapproval.php index 95d36f8..3e6fd0d 100644 --- a/application/admin/controller/qingdong/work/Formapproval.php +++ b/application/admin/controller/qingdong/work/Formapproval.php @@ -78,7 +78,7 @@ class Formapproval extends Backend { } $this->success('提交成功'); } - $staffname = Staff::where(['status' => 1])->column('id,name'); + $staffname = Staff::where(['status' => 1,'cid'=>CID])->column('id,name'); $staffs = ['' => '无']; foreach ($staffname as $id => $name) { $staffs[$id] = $name; @@ -105,7 +105,7 @@ class Formapproval extends Backend { } $this->success('提交成功'); } - $staffname = Staff::where(['status' => 1])->column('id,name'); + $staffname = Staff::where(['status' => 1,'cid'=>CID])->column('id,name'); $staffs = ['' => '无']; foreach ($staffname as $id => $name) { $staffs[$id] = $name; @@ -151,7 +151,7 @@ class Formapproval extends Backend { if (!empty($name)) { $where['name'] = ['like', '%' . $name . '%']; } - $customer = Staff::where($where)->field('id,name')->order('id desc')->paginate($pageSize, false, ['page' => $pageNumber]); + $customer = Staff::where($where)->where('cid','=',CID)->field('id,name')->order('id desc')->paginate($pageSize, false, ['page' => $pageNumber]); return json(['list' => $customer->items(), 'total' => $customer->total()]); } } diff --git a/application/admin/view/qingdong/customer/business/index.html b/application/admin/view/qingdong/customer/business/index.html index 101ad03..f96a097 100644 --- a/application/admin/view/qingdong/customer/business/index.html +++ b/application/admin/view/qingdong/customer/business/index.html @@ -20,10 +20,10 @@
{:build_toolbar('refresh,add')} 批量转移 - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
@@ -35,10 +35,10 @@
{:build_toolbar('refresh,add')} 批量转移 - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
@@ -50,10 +50,10 @@
{:build_toolbar('refresh,add')} 批量转移 - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
@@ -65,10 +65,10 @@
{:build_toolbar('refresh,add')} 批量转移 - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
@@ -80,10 +80,10 @@
{:build_toolbar('refresh,add')} 批量转移 - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
@@ -95,10 +95,10 @@
{:build_toolbar('refresh,add')} 批量转移 - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
diff --git a/application/admin/view/qingdong/customer/contacts/index.html b/application/admin/view/qingdong/customer/contacts/index.html index 8dc5474..5011a06 100644 --- a/application/admin/view/qingdong/customer/contacts/index.html +++ b/application/admin/view/qingdong/customer/contacts/index.html @@ -19,11 +19,11 @@
{:build_toolbar('refresh,add')} - 导入 - 导出 + + - 批量发送邮件 - 批量发送短信 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + - 批量发送邮件 - 批量发送短信 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + - 批量发送邮件 - 批量发送短信 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + - 批量发送邮件 - 批量发送短信 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + - 批量发送邮件 - 批量发送短信 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + - 批量发送邮件 - 批量发送短信 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 - 导入产品明细 - 导出产品明细 + + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + 批量转移 - 批量发送邮件 - 批量发送短信 + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + 批量转移 - 批量发送邮件 - 批量发送短信 + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + 批量转移 - 批量发送邮件 - 批量发送短信 + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + 批量转移 - 批量发送邮件 - 批量发送短信 + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + 批量转移 - 批量发送邮件 - 批量发送短信 + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + + 批量转移 - 批量发送邮件 - 批量发送短信 + + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + +
{:build_toolbar('refresh,add')} - 导入 - 导出 + +
{:build_toolbar('refresh')} - 导入 - 批量分配 + +
diff --git a/application/admin/view/qingdong/product/goods/index.html b/application/admin/view/qingdong/product/goods/index.html index 73f81a3..c3f2563 100644 --- a/application/admin/view/qingdong/product/goods/index.html +++ b/application/admin/view/qingdong/product/goods/index.html @@ -9,8 +9,8 @@ {:__('Add')} {:__('Edit')} - 导入 + +
{:__('Add')} - 导入 +