diff --git a/app/common/utils/WsEvents.php b/app/common/utils/WsEvents.php index 64ecd4f..e539831 100644 --- a/app/common/utils/WsEvents.php +++ b/app/common/utils/WsEvents.php @@ -291,7 +291,7 @@ class WsEvents { $ly = [ 1 => 186, - 3 => 226, + 3 => 224, ]; if ($num === 0) { diff --git a/app/crmAdmin/service/CustomerService.php b/app/crmAdmin/service/CustomerService.php index 56d42f1..0ba9a31 100644 --- a/app/crmAdmin/service/CustomerService.php +++ b/app/crmAdmin/service/CustomerService.php @@ -135,6 +135,7 @@ class CustomerService $customer = $query->orderBy('id', 'desc')->paginate($perPage, ['*'], 'page', $page); } else { $customer = $query->orderBy('id', 'desc')->get(); + return $customer; } if (!$export) { @@ -176,7 +177,7 @@ class CustomerService public function export($params) { - if(empty($params['user_id']) && empty($params['tag_id'])){ + if(empty($params['user_id']) && empty($params['tag_id']) && empty($params['channel_id'])){ $params['user_id'] = 0; } $customers = $this->search($params, true); @@ -198,6 +199,8 @@ class CustomerService 'I1' => '描述', 'J1' => '所属人', 'K1' => '录入人', + 'L1' => '详情', + 'M1' => '录入时间', ]; // 设置表头样式 @@ -227,7 +230,7 @@ class CustomerService ], ]; - $sheet->getStyle('A1:K1')->applyFromArray($headerStyle); + $sheet->getStyle('A1:M1')->applyFromArray($headerStyle); // 填充数据 $row = 2; @@ -247,6 +250,8 @@ class CustomerService $sheet->setCellValue('I' . $row, $customerData['describe']); $sheet->setCellValue('J' . $row, $customerData['user_name']); // 所属人姓名 $sheet->setCellValue('K' . $row, $customerData['enter_user_name']); + $sheet->setCellValue('L' . $row, strip_tags($customerData['desc_collect'])); + $sheet->setCellValue('M' . $row, $customerData['created_at']->toDateTimeString()); $row++; }