Преглед на файлове

【Mod】打卡记录导出增加积分字段

liuxiangxin преди 2 месеца
родител
ревизия
79425b09c7
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      app/Http/Controllers/Admin/CustomClockinRecord.php

+ 2 - 1
app/Http/Controllers/Admin/CustomClockinRecord.php

@@ -236,6 +236,7 @@ class CustomClockinRecord extends Auth{
                                         'username'=>$value['username'],
                                         'phone'=>(string)$value['phone'],
                                         'clockin_day'=> $value['clockin_day'],
+										'score'=> $value['score'],
                                         'clockin_time'=>date('Y-m-d H:i:s',$value['clockin_time']),
                                         'city_name'=>$value['city_name'],
                                         'weiban_extid'=>$value['weiban_extid'],
@@ -258,7 +259,7 @@ class CustomClockinRecord extends Auth{
     private function  toDown($data){
         // xlsx文件保存路径
 		$excel      		= new \Vtiful\Kernel\Excel(['path' =>public_path().'/uploads/']);
-		$filePath 			= $excel->fileName(uniqid().'.xlsx', 'sheet1')->header(['记录ID','活动ID','活动名称','客户编码','客户昵称','联系方式','打卡天数','打卡时间','城市名称','微伴ID'])->data($data)->output();
+		$filePath 			= $excel->fileName(uniqid().'.xlsx', 'sheet1')->header(['记录ID','活动ID','活动名称','客户编码','客户昵称','联系方式','打卡天数','打卡积分','打卡时间','城市名称','微伴ID'])->data($data)->output();
 		header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
 		header('Content-Disposition: attachment;filename="打卡记录'.date('Y-m-d His').'.xlsx"');
 		header('Content-Length: ' . filesize($filePath));