diff --git a/app/admin/controller/Order.php b/app/admin/controller/Order.php
index 5f4fcf0..30988e1 100755
--- a/app/admin/controller/Order.php
+++ b/app/admin/controller/Order.php
@@ -13,6 +13,12 @@ use app\common\model\User;
use think\facade\View;
use think\Request;
use think\facade\Db;
+use PhpOffice\PhpSpreadsheet\Spreadsheet;
+use PhpOffice\PhpSpreadsheet\Writer\Xls;
+use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
+use PhpOffice\PhpSpreadsheet\Style\Alignment;
+use PhpOffice\PhpSpreadsheet\Style\Font;
+use PhpOffice\PhpSpreadsheet\IOFactory;
class Order extends Base
@@ -275,12 +281,23 @@ class Order extends Base
}
$field = '*';
$order = 'id desc';
+ $all_goodslist_money = 0;
$data = OrderListSend::getList($whe, $field, $order, $this->page);
foreach ($data['list'] as &$value) {
$user_info = User::field('nickname,headimg,mobile')->where(['id' => $value['user_id']])->find();
- $value['nickname'] = $user_info['nickname'];
- $value['headimg'] = $user_info['headimg'];
- $value['mobile'] = $user_info['mobile'];
+ if ($user_info) {
+ $value['nickname'] = $user_info['nickname'];
+ $value['headimg'] = $user_info['headimg'];
+ $value['mobile'] = $user_info['mobile'];
+ } else {
+ $value['nickname'] = '';
+ $value['headimg'] = '';
+ $value['mobile'] = '';
+
+ }
+ $goodslist_money = OrderList::where('send_num', '=', $value['send_num'])->sum('goodslist_money');
+ $value['goodslist_money'] = $goodslist_money;
+ $all_goodslist_money += $goodslist_money;
}
View::assign('list', $data['list']);
View::assign('count', $data['count']);
@@ -288,6 +305,7 @@ class Order extends Base
View::assign('user_id', $user_id ? $user_id : 0);
View::assign('mobile', $mobile ? $mobile : 0);
View::assign('send_num', $send_num ? $send_num : 0);
+ View::assign('all_goodslist_money', $all_goodslist_money ? $all_goodslist_money : 0);
View::assign('status', $status ? $status : 0);
View::assign('str_addtime', $str_addtime ? $str_addtime : 0);
return View::fetch('Order/send_order');
@@ -512,15 +530,14 @@ class Order extends Base
$mobile = trim(input('get.mobile'));
$order_num = trim(input('get.order_num'));
$addtime = trim(input('get.addtime'));
- $whe = array();
- $whe[] = ['status', '=', 1];
- $whe[] = ['kd_is', '=', 0];
+ $whe = [['status', '=', 1], ['kd_is', '=', 0]];
+
if ($user_id) {
$user_id = $user_id - 1260;
$whe[] = ['user_id', '=', $user_id];
}
if ($mobile) {
- $mobile = User::field('id')->where('mobile', '=', $mobile)->value('id');
+ $mobile = User::where('mobile', $mobile)->value('id');
$whe[] = ['user_id', '=', $mobile];
}
if ($order_num) {
@@ -528,239 +545,160 @@ class Order extends Base
}
if ($addtime) {
$time = explode('_', $addtime);
- $start_time = $time[0];
- $end_time = $time[1];
- if ($start_time > $end_time) {
+ if ($time[0] > $time[1]) {
return $this->renderError('开始时间不能大于结束时间');
}
- $whe[] = ['addtime', 'BETWEEN', array($start_time, $end_time)];
+ $whe[] = ['addtime', 'BETWEEN', [$time[0], $time[1]]];
}
- #数据
- $data = OrderModel::where($whe)
- ->append(['user_info'])
- ->order('id desc')
- ->select()
- ->toArray();
+
+ $data = OrderModel::where($whe)->append(['user_info'])->order('id desc')->select()->toArray();
if (!$data) {
return $this->renderError('未找到数据');
}
- $save_name = substr(dirname($_SERVER['SCRIPT_FILENAME']), 0, -6);
- require $save_name . 'extend/phpexcel/PHPExcel.php';
- //3.实例化PHPExcel类
- $objPHPExcel = new \PHPExcel();
- //4.激活当前的sheet表
- $objPHPExcel->setActiveSheetIndex(0);
- //5.设置表格头(即excel表格的第一行)
- $objPHPExcel->setActiveSheetIndex(0)
- ->setCellValue('A1', '订单号')
- ->setCellValue('B1', '用户信息')
- ->setCellValue('C1', '盒子信息')
- ->setCellValue('D1', '盒子类型')
- ->setCellValue('E1', '订单金额')
- ->setCellValue('F1', '折扣')
- ->setCellValue('G1', '折扣金额')
- ->setCellValue('H1', '微信支付')
- ->setCellValue('I1', '余额抵扣')
- ->setCellValue('J1', '吧唧币抵扣')
- ->setCellValue('K1', '积分支付')
- ->setCellValue('L1', '时间');
- //设置A列水平居中
- $objPHPExcel->getActiveSheet()->getRowDimension(1)->setRowHeight(25);
- $objPHPExcel->getActiveSheet()->getStyle('A')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('B')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('C')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('D')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('E')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('F')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('G')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('H')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('I')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('J')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('K')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('L')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
-
- $objPHPExcel->setActiveSheetIndex(0)->getStyle('A1:L1')->getAlignment()
- ->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
- $objPHPExcel->setActiveSheetIndex(0)->getStyle('A1:L1')->getAlignment()
- ->setVertical(\PHPExcel_Style_Alignment::VERTICAL_CENTER);//垂直居中
- $objPHPExcel->getActiveSheet()->getStyle('A1:L1')->getFont()->setBold(true);
-
- //设置单元格宽度
- //6.循环刚取出来的数组,将数据逐一添加到excel表格。
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('A')->setWidth(40);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('B')->setWidth(50);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('C')->setWidth(50);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('D')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('E')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('F')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('G')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('H')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('I')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('J')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('K')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('L')->setWidth(30);
-
- $line = 1;
- foreach ($data as $key => $value) {
- $line++;
- #订单号
- $order_num = $value['order_num'];
- #用户信息
- $user_info = 'ID:' . $value['user_id'] . " " . '昵称:' . $value['user_info']['nickname'] . " " . '手机号:' . $value['user_info']['mobile'];
- #奖品信息
- $goods_info = '盒子名称:' . $value['goods_title'];
- if ($value['num']) {
- $goods_info .= " " . '箱号:' . $value['num'];
- }
- #盒子类型
- $order_type_name = '';
- if ($value['order_type'] == 1) {
- $order_type_name = '一番赏';
- } elseif ($value['order_type'] == 2) {
- $order_type_name = '无限赏';
- } elseif ($value['order_type'] == 3) {
- $order_type_name = '擂台赏';
- } elseif ($value['order_type'] == 4) {
- $order_type_name = '抽卡机';
- } elseif ($value['order_type'] == 5) {
- $order_type_name = '积分赏';
- }
- #时间
- $addtime = date('Y-m-d H:i:s', $value['addtime']);
- #开始导出
- $objPHPExcel->getActiveSheet()->setCellValue('A' . $line, $order_num);#订单号
- $objPHPExcel->getActiveSheet()->setCellValue('B' . $line, $user_info);#用户信息
- $objPHPExcel->getActiveSheet()->setCellValue('C' . $line, $goods_info);#盒子信息
- $objPHPExcel->getActiveSheet()->setCellValue('D' . $line, $order_type_name);#盒子类型
- $objPHPExcel->getActiveSheet()->setCellValue('E' . $line, $value['order_total']);#订单金额
- $objPHPExcel->getActiveSheet()->setCellValue('F' . $line, $value['zhe']);#折扣
- $objPHPExcel->getActiveSheet()->setCellValue('G' . $line, $value['order_zhe_total']);#折扣金额
- $objPHPExcel->getActiveSheet()->setCellValue('H' . $line, $value['price']);#微信支付
- $objPHPExcel->getActiveSheet()->setCellValue('I' . $line, $value['use_money']);#余额抵扣
- $objPHPExcel->getActiveSheet()->setCellValue('J' . $line, $value['use_integral']);#吧唧币抵扣
- $objPHPExcel->getActiveSheet()->setCellValue('K' . $line, $value['use_score']);#积分支付
- $objPHPExcel->getActiveSheet()->setCellValue('L' . $line, $addtime);#时间
+ $spreadsheet = new Spreadsheet();
+ $sheet = $spreadsheet->getActiveSheet();
+ // 设置表头
+ $headers = ['订单号', '用户信息', '盒子信息', '盒子类型', '订单金额', '折扣', '折扣金额', '微信支付', '余额抵扣', '吧唧币抵扣', '积分支付', '时间'];
+ foreach ($headers as $col => $text) {
+ $sheet->setCellValueByColumnAndRow($col + 1, 1, $text);
}
- //7.设置保存的Excel表格名称
- $filename = '购买列表信息' . date('y-m-d H_i_s', time()) . '.xls';
- //8.设置当前激活的sheet表格名称;
- $objPHPExcel->getActiveSheet()->setTitle('现金套餐订单信息');
- //9.设置浏览器窗口下载表格
- header("Content-Type: application/force-download");
- header("Content-Type: application/octet-stream");
- header("Content-Type: application/download");
- header('Content-Disposition:inline;filename="' . $filename . '"');
- //生成excel文件
- $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
- //下载文件在浏览器窗口
- $objWriter->save('php://output');
+
+ // 设置样式
+ $sheet->getStyle('A1:L1')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
+ $sheet->getStyle('A1:L1')->getFont()->setBold(true);
+
+ // 设置列宽
+ $widths = [40, 50, 50, 30, 30, 30, 30, 30, 30, 30, 30, 30];
+ foreach (range('A', 'L') as $i => $col) {
+ $sheet->getColumnDimension($col)->setWidth($widths[$i]);
+ }
+
+ // 填充数据
+ $line = 2;
+ foreach ($data as $value) {
+ try {
+ $sheet->setCellValue('A' . $line, $value['order_num']);
+ if ($value['user_info']) {
+ $sheet->setCellValue('B' . $line, 'ID:' . $value['user_id'] . ' 昵称:' . $value['user_info']['nickname'] . ' 手机号:' . $value['user_info']['mobile']);
+ } else {
+ $sheet->setCellValue('B' . $line, 'ID:' . $value['user_id'] . ' 昵称: 手机号:');
+ }
+ $sheet->setCellValue('C' . $line, '盒子名称:' . $value['goods_title'] . ($value['num'] ? ' 箱号:' . $value['num'] : ''));
+ $sheet->setCellValue('D' . $line, ['1' => '一番赏', '2' => '无限赏', '3' => '擂台赏', '4' => '抽卡机', '5' => '积分赏'][$value['order_type']] ?? '');
+ $sheet->setCellValue('E' . $line, $value['order_total']);
+ $sheet->setCellValue('F' . $line, $value['zhe']);
+ $sheet->setCellValue('G' . $line, $value['order_zhe_total']);
+ $sheet->setCellValue('H' . $line, $value['price']);
+ $sheet->setCellValue('I' . $line, $value['use_money']);
+ $sheet->setCellValue('J' . $line, $value['use_integral']);
+ $sheet->setCellValue('K' . $line, $value['use_score']);
+ $sheet->setCellValue('L' . $line, date('Y-m-d H:i:s', $value['addtime']));
+ } catch (\Throwable $th) {
+ //throw $th;
+ $c = $value;
+ }
+ $line++;
+ }
+
+ // 输出 Excel
+ $filename = '购买列表信息_' . date('Y-m-d_H-i-s') . '.xls';
+ header('Content-Type: application/vnd.ms-excel');
+ header('Content-Disposition: attachment;filename="' . $filename . '"');
+ header('Cache-Control: max-age=0');
+
+ $writer = new Xls($spreadsheet);
+ $writer->save('php://output');
exit;
-
-
}
+
/**
* 兑换订单导出
*/
public function recovery_order_daochu()
{
-
$user_id = trim(input('get.user_id'));
$mobile = trim(input('get.mobile'));
$addtime = trim(input('get.addtime'));
- $whe = array();
+ $whe = [];
+
if ($user_id) {
$user_id = $user_id - 1260;
$whe[] = ['user_id', '=', $user_id];
}
if ($mobile) {
- $mobile = User::field('id')->where('mobile', '=', $mobile)->value('id');
- $whe[] = ['user_id', '=', $mobile];
+ $mobile = User::where('mobile', '=', $mobile)->value('id');
+ if ($mobile) {
+ $whe[] = ['user_id', '=', $mobile];
+ }
}
if ($addtime) {
$time = explode('_', $addtime);
- $start_time = $time[0];
- $end_time = $time[1];
- if ($start_time > $end_time) {
- return $this->renderError('开始时间不能大于结束时间');
+ if (count($time) == 2) {
+ [$start_time, $end_time] = $time;
+ if ($start_time > $end_time) {
+ return $this->renderError('开始时间不能大于结束时间');
+ }
+ $whe[] = ['addtime', 'BETWEEN', [$start_time, $end_time]];
}
- $whe[] = ['addtime', 'BETWEEN', array($start_time, $end_time)];
}
- #数据
+
$data = OrderListRecovery::where($whe)
->append(['user_info', 'status_name'])
->order('id desc')
->select()
->toArray();
+
if (!$data) {
return $this->renderError('未找到数据');
}
- $save_name = substr(dirname($_SERVER['SCRIPT_FILENAME']), 0, -6);
- require $save_name . 'extend/phpexcel/PHPExcel.php';
- //3.实例化PHPExcel类
- $objPHPExcel = new \PHPExcel();
- //4.激活当前的sheet表
- $objPHPExcel->setActiveSheetIndex(0);
- //5.设置表格头(即excel表格的第一行)
- $objPHPExcel->setActiveSheetIndex(0)
- ->setCellValue('A1', '用户信息')
- ->setCellValue('B1', '兑换金额')
- ->setCellValue('C1', '兑换数量')
- ->setCellValue('D1', '兑换时间');
- //设置A列水平居中
- $objPHPExcel->getActiveSheet()->getRowDimension(1)->setRowHeight(25);
- $objPHPExcel->getActiveSheet()->getStyle('A')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('B')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('C')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('D')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
+ $spreadsheet = new Spreadsheet();
+ $sheet = $spreadsheet->getActiveSheet();
- $objPHPExcel->setActiveSheetIndex(0)->getStyle('A1:D1')->getAlignment()
- ->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
- $objPHPExcel->setActiveSheetIndex(0)->getStyle('A1:D1')->getAlignment()
- ->setVertical(\PHPExcel_Style_Alignment::VERTICAL_CENTER);//垂直居中
- $objPHPExcel->getActiveSheet()->getStyle('A1:D1')->getFont()->setBold(true);
+ // 设置表头
+ $headers = ['用户信息', '兑换金额', '兑换数量', '兑换时间'];
+ $columns = ['A', 'B', 'C', 'D'];
- //设置单元格宽度
- //6.循环刚取出来的数组,将数据逐一添加到excel表格。
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('A')->setWidth(70);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('B')->setWidth(20);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('C')->setWidth(20);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('D')->setWidth(30);
-
- $line = 1;
- foreach ($data as $key => $value) {
- $line++;
- #用户信息
- $user_info = 'ID:' . $value['user_id'] . " " . '昵称:' . $value['user_info']['nickname'] . " " . '手机号:' . $value['user_info']['mobile'];
- #申请时间
- $addtime = date('Y-m-d H:i:s', $value['addtime']);
- #开始导出
- $objPHPExcel->getActiveSheet()->setCellValue('A' . $line, $user_info);#用户信息
- $objPHPExcel->getActiveSheet()->setCellValue('B' . $line, $value['money']);#兑换金额
- $objPHPExcel->getActiveSheet()->setCellValue('C' . $line, $value['count']);#兑换数量
- $objPHPExcel->getActiveSheet()->setCellValue('D' . $line, $addtime);#兑换时间
+ foreach ($headers as $index => $header) {
+ $col = $columns[$index] . '1';
+ $sheet->setCellValue($col, $header);
+ $sheet->getColumnDimension($columns[$index])->setAutoSize(true);
}
- //7.设置保存的Excel表格名称
- $filename = '兑换列表信息' . date('y-m-d H_i_s', time()) . '.xls';
- //8.设置当前激活的sheet表格名称;
- $objPHPExcel->getActiveSheet()->setTitle('现金套餐订单信息');
- //9.设置浏览器窗口下载表格
- header("Content-Type: application/force-download");
- header("Content-Type: application/octet-stream");
- header("Content-Type: application/download");
- header('Content-Disposition:inline;filename="' . $filename . '"');
- //生成excel文件
- $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
- //下载文件在浏览器窗口
- $objWriter->save('php://output');
+
+ $sheet->getStyle('A1:D1')->getFont()->setBold(true);
+ $sheet->getStyle('A1:D1')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
+
+ $line = 2;
+ foreach ($data as $value) {
+ $user_info = 'ID:' . ($value['user_id'] ?? '未知') . ' 昵称:' . ($value['user_info']['nickname'] ?? '未知') . ' 手机号:' . ($value['user_info']['mobile'] ?? '未知');
+ $addtime = date('Y-m-d H:i:s', $value['addtime']);
+
+ $sheet->setCellValue('A' . $line, $user_info);
+ $sheet->setCellValue('B' . $line, $value['money']);
+ $sheet->setCellValue('C' . $line, $value['count']);
+ $sheet->setCellValue('D' . $line, $addtime);
+
+ $line++;
+ }
+
+ $filename = '兑换列表信息_' . date('Y-m-d_H_i_s') . '.xls';
+ header('Content-Type: application/vnd.ms-excel');
+ header('Content-Disposition: attachment; filename="' . $filename . '"');
+ header('Cache-Control: max-age=0');
+
+ $writer = new Xls($spreadsheet);
+ $writer->save('php://output');
exit;
}
+ /**
+ * 发货订单导出
+ */
/**
* 发货订单导出
*/
@@ -771,174 +709,105 @@ class Order extends Base
$send_num = trim(input('get.send_num'));
$status = trim(input('get.status'));
$addtime = trim(input('get.addtime'));
+
if ($status == 4) {
return $this->renderError('不可导出已取消状态');
}
- $whe = array();
- if ($status) {
- $whe[] = ['status', '=', $status];
- } else {
- $whe[] = ['status', 'in', [1, 2, 3]];
+ $whe = [['status', 'in', [1, 2, 3]]];
+ if ($status) {
+ $whe = [['status', '=', $status]];
}
if ($user_id) {
- $user_id = $user_id - 1260;
- $whe[] = ['user_id', '=', $user_id];
+ $whe[] = ['user_id', '=', $user_id - 1260];
}
if ($mobile) {
- $mobile = User::field('id')->where('mobile', '=', $mobile)->value('id');
+ $mobile = User::where('mobile', $mobile)->value('id');
$whe[] = ['user_id', '=', $mobile];
}
if ($send_num) {
$whe[] = ['send_num', '=', $send_num];
}
if ($addtime) {
- $time = explode('_', $addtime);
- $start_time = $time[0];
- $end_time = $time[1];
+ [$start_time, $end_time] = explode('_', $addtime);
if ($start_time > $end_time) {
return $this->renderError('开始时间不能大于结束时间');
}
- $whe[] = ['addtime', 'BETWEEN', array($start_time, $end_time)];
+ $whe[] = ['addtime', 'BETWEEN', [$start_time, $end_time]];
}
- #数据
+
+ // 获取数据
$data = OrderListSend::where($whe)
->append(['user_info', 'status_name'])
->order('id desc')
->select()
->toArray();
+
if (!$data) {
return $this->renderError('未找到数据');
}
- $save_name = substr(dirname($_SERVER['SCRIPT_FILENAME']), 0, -6);
- require $save_name . 'extend/phpexcel/PHPExcel.php';
- //3.实例化PHPExcel类
- $objPHPExcel = new \PHPExcel();
- //4.激活当前的sheet表
- $objPHPExcel->setActiveSheetIndex(0);
- //5.设置表格头(即excel表格的第一行)
- $objPHPExcel->setActiveSheetIndex(0)
- ->setCellValue('A1', '订单号')
- ->setCellValue('B1', '用户信息')
- ->setCellValue('C1', '状态')
- ->setCellValue('D1', '收货姓名')
- ->setCellValue('E1', '收货电话')
- ->setCellValue('F1', '收货地址')
- ->setCellValue('G1', '奖品名称')
- ->setCellValue('H1', '奖品价格')
- ->setCellValue('I1', '奖品数量')
- ->setCellValue('J1', '赠送编码')
- ->setCellValue('K1', '奖品类型')
- ->setCellValue('L1', '申请时间')
- ->setCellValue('M1', '备注');
- //设置A列水平居中
- $objPHPExcel->getActiveSheet()->getRowDimension(1)->setRowHeight(25);
+ // 创建 Spreadsheet
+ $spreadsheet = new Spreadsheet();
+ $sheet = $spreadsheet->getActiveSheet();
- $objPHPExcel->getActiveSheet()->getStyle('A')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('B')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('C')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('D')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('E')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('F')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('G')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('H')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('I')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('J')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('K')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('L')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
- $objPHPExcel->getActiveSheet()->getStyle('M')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
+ // 设置表头
+ $headers = ['订单号', '用户信息', '状态', '收货姓名', '收货电话', '收货地址', '奖品名称', '奖品价格', '奖品数量', '赠送编码', '奖品类型', '申请时间', '备注'];
+ foreach ($headers as $col => $header) {
+ $sheet->setCellValueByColumnAndRow($col + 1, 1, $header);
+ }
- $objPHPExcel->setActiveSheetIndex(0)->getStyle('A1:M1')->getAlignment()
- ->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
- $objPHPExcel->setActiveSheetIndex(0)->getStyle('A1:M1')->getAlignment()
- ->setVertical(\PHPExcel_Style_Alignment::VERTICAL_CENTER);//垂直居中
- $objPHPExcel->getActiveSheet()->getStyle('A1:M1')->getFont()->setBold(true);
+ $sheet->getStyle("A1:M1")->getFont()->setBold(true);
+ $sheet->getStyle("A1:M1")->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
- //设置单元格宽度
- //6.循环刚取出来的数组,将数据逐一添加到excel表格。
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('A')->setWidth(40);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('B')->setWidth(50);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('C')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('D')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('E')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('F')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('G')->setWidth(50);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('H')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('I')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('J')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('K')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('L')->setWidth(30);
- $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('M')->setWidth(30);
-
- $line = 1;
- foreach ($data as $key => $value) {
- #订单号
- $send_num = $value['send_num'];
- #用户信息
- $user_info = 'ID:' . $value['user_id'] . " " . '昵称:' . $value['user_info']['nickname'] . " " . '手机号:' . $value['user_info']['mobile'];
- #状态
- $status = $value['status_name'];
- #收货姓名
- $name = $value['name'];
- #收货电话
- $mobile = $value['mobile'];
- #收货地址
- $address = $value['address'];
- #申请时间
+ // 填充数据
+ $row = 2;
+ foreach ($data as $value) {
+ $user_info = 'ID:' . $value['user_id'] . " 昵称:" . $value['user_info']['nickname'] . " 手机号:" . $value['user_info']['mobile'];
$addtime = date('Y-m-d H:i:s', $value['addtime']);
- #奖品信息
- $goods = OrderList::field('goodslist_id,goodslist_title,goodslist_price,goodslist_money,shang_id,count(`id`) as num')
+
+ $goods = OrderList::where('send_num', $value['send_num'])
->append(['shang_title', 'card_no'])
- ->where('send_num', '=', $value['send_num'])
->group('prize_code')
->order('id desc')
- ->select()->toArray();
- #备注
- $message = $value['message'];
- foreach ($goods as $goods_key => $goods_value) {
- $line++;
- #赠送编码
- $card_no = $goods_value['card_no'];
- #奖品信息
- $goods_title = $goods_value['goodslist_title'];
- $goods_price = $goods_value['goodslist_price'];
- #奖品数量
- $goods_num = $goods_value['num'];
- #奖品类型
- $goods_shang_title = $goods_value['shang_title'];
- #开始导出
- $objPHPExcel->getActiveSheet()->setCellValue('A' . $line, $send_num);#订单号
- $objPHPExcel->getActiveSheet()->setCellValue('B' . $line, $user_info);#用户信息
- $objPHPExcel->getActiveSheet()->setCellValue('C' . $line, $status);#状态
- $objPHPExcel->getActiveSheet()->setCellValue('D' . $line, $name);#收货姓名
- $objPHPExcel->getActiveSheet()->setCellValue('E' . $line, $mobile);#收货电话
- $objPHPExcel->getActiveSheet()->setCellValue('F' . $line, $address);#收货详细地址
- $objPHPExcel->getActiveSheet()->setCellValue('G' . $line, $goods_title);#奖品名称
- $objPHPExcel->getActiveSheet()->setCellValue('H' . $line, $goods_price);#奖品价格
- $objPHPExcel->getActiveSheet()->setCellValue('I' . $line, $goods_num);#奖品数量
- $objPHPExcel->getActiveSheet()->setCellValue('J' . $line, $card_no);#赠送编码
- $objPHPExcel->getActiveSheet()->setCellValue('K' . $line, $goods_shang_title);#奖品类型
- $objPHPExcel->getActiveSheet()->setCellValue('L' . $line, $addtime);#申请时间
- $objPHPExcel->getActiveSheet()->setCellValue('M' . $line, $message);#备注
+ ->select()
+ ->toArray();
+
+ foreach ($goods as $goods_value) {
+ $sheet->fromArray([
+ $value['send_num'],
+ $user_info,
+ $value['status_name'],
+ $value['name'],
+ $value['mobile'],
+ $value['address'],
+ $goods_value['goodslist_title'],
+ $goods_value['goodslist_price'],
+ $goods_value['num'],
+ $goods_value['card_no'],
+ $goods_value['shang_title'],
+ $addtime,
+ $value['message']
+ ], null, "A{$row}");
+ $row++;
}
}
- //7.设置保存的Excel表格名称
- $filename = '发货列表信息' . date('y-m-d H_i_s', time()) . '.xls';
- //8.设置当前激活的sheet表格名称;
- $objPHPExcel->getActiveSheet()->setTitle('现金套餐订单信息');
- //9.设置浏览器窗口下载表格
- header("Content-Type: application/force-download");
- header("Content-Type: application/octet-stream");
- header("Content-Type: application/download");
- header('Content-Disposition:inline;filename="' . $filename . '"');
- //生成excel文件
- $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
- //下载文件在浏览器窗口
- $objWriter->save('php://output');
+
+ // 自动调整列宽
+ foreach (range('A', 'M') as $columnID) {
+ $sheet->getColumnDimension($columnID)->setAutoSize(true);
+ }
+
+ // 生成 Excel 文件
+ $filename = '发货列表信息_' . date('Y-m-d_H_i_s') . '.xls';
+ header('Content-Type: application/vnd.ms-excel');
+ header('Content-Disposition: attachment;filename="' . $filename . '"');
+ header('Cache-Control: max-age=0');
+
+ $writer = new Xls($spreadsheet);
+ $writer->save('php://output');
exit;
-
-
}
+
}
\ No newline at end of file
diff --git a/app/admin/view/Order/send_order.html b/app/admin/view/Order/send_order.html
index 33721b0..3d0194a 100755
--- a/app/admin/view/Order/send_order.html
+++ b/app/admin/view/Order/send_order.html
@@ -48,7 +48,7 @@
| 用户信息 | 订单号 | -发货数量 | +发货数量/总价格 | 运费 | 收货信息 | 订单状态 | @@ -79,7 +79,7 @@{$vo.send_num} | -{$vo.count} | +{$vo.count} / {$vo['goodslist_money']} | {$vo.freight} |
{$vo['name']} {$vo['mobile']} diff --git a/composer.json b/composer.json index b76d07e..bfa67ed 100755 --- a/composer.json +++ b/composer.json @@ -26,7 +26,8 @@ "topthink/think-multi-app": "^1.0", "topthink/think-view": "^1.0", "topthink/think-captcha": "^3.0", - "endroid/qr-code": "^4.6" + "endroid/qr-code": "^4.6", + "phpoffice/phpspreadsheet": "^1.29" }, "require-dev": { "symfony/var-dumper": "^4.2", diff --git a/composer.lock b/composer.lock index 1aacc5f..06ac98d 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5200325cd7fc32515ef07db96ccd1e98", + "content-hash": "0b24efd4dd99cbb4227aa47b22059ba9", "packages": [ { "name": "bacon/bacon-qr-code", @@ -66,6 +66,91 @@ }, "time": "2022-12-07T17:46:57+00:00" }, + { + "name": "composer/pcre", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-12T16:29:46+00:00" + }, { "name": "dasprid/enum", "version": "1.0.5", @@ -200,6 +285,457 @@ ], "time": "2022-10-26T08:48:17+00:00" }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.18.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "cb56001e54359df7ae76dc522d08845dc741621b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b", + "reference": "cb56001e54359df7ae76dc522d08845dc741621b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" + }, + "type": "library", + "autoload": { + "files": [ + "library/HTMLPurifier.composer.php" + ], + "psr-0": { + "HTMLPurifier": "library/" + }, + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0" + }, + "time": "2024-11-01T03:51:45+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "2.2.6", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "30ad6f93cf3efe4192bc7a4c9cad11ff8f4f237f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/30ad6f93cf3efe4192bc7a4c9cad11ff8f4f237f", + "reference": "30ad6f93cf3efe4192bc7a4c9cad11ff8f4f237f", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "myclabs/php-enum": "^1.5", + "php": "^7.4 || ^8.0", + "psr/http-message": "^1.0", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.9", + "guzzlehttp/guzzle": "^6.5.3 || ^7.2.0", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.4", + "phpunit/phpunit": "^8.5.8 || ^9.4.2", + "vimeo/psalm": "^4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "support": { + "issues": "https://github.com/maennchen/ZipStream-PHP/issues", + "source": "https://github.com/maennchen/ZipStream-PHP/tree/2.2.6" + }, + "funding": [ + { + "url": "https://github.com/maennchen", + "type": "github" + }, + { + "url": "https://opencollective.com/zipstream", + "type": "open_collective" + } + ], + "time": "2022-11-25T18:57:19+00:00" + }, + { + "name": "markbaker/complex", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" + }, + "time": "2022-12-06T16:21:08+00:00" + }, + { + "name": "markbaker/matrix", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" + }, + "time": "2022-12-02T22:17:43+00:00" + }, + { + "name": "myclabs/php-enum", + "version": "1.8.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483", + "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^4.6.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + }, + "classmap": [ + "stubs/Stringable.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "support": { + "issues": "https://github.com/myclabs/php-enum/issues", + "source": "https://github.com/myclabs/php-enum/tree/1.8.4" + }, + "funding": [ + { + "url": "https://github.com/mnapoli", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum", + "type": "tidelift" + } + ], + "time": "2022-08-04T09:53:51+00:00" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.29.10", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "c80041b1628c4f18030407134fe88303661d4e4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/c80041b1628c4f18030407134fe88303661d4e4e", + "reference": "c80041b1628c4f18030407134fe88303661d4e4e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "composer/pcre": "^1||^2||^3", + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "ezyang/htmlpurifier": "^4.15", + "maennchen/zipstream-php": "^2.1 || ^3.0", + "markbaker/complex": "^3.0", + "markbaker/matrix": "^3.0", + "php": "^7.4 || ^8.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", + "dompdf/dompdf": "^1.0 || ^2.0 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.2", + "mitoteam/jpgraph": "^10.3", + "mpdf/mpdf": "^8.1.1", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5 || ^9.0", + "squizlabs/php_codesniffer": "^3.7", + "tecnickcom/tcpdf": "^6.5" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "ext-intl": "PHP Internationalization Functions", + "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.10" + }, + "time": "2025-02-08T02:56:14+00:00" + }, { "name": "psr/container", "version": "1.1.2", @@ -238,6 +774,125 @@ ], "time": "2021-11-05T16:50:12+00:00" }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "e616d01114759c4c489f93b099585439f795fe35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + }, + "time": "2023-04-10T20:10:41+00:00" + }, { "name": "psr/http-message", "version": "1.1", @@ -365,6 +1020,63 @@ ], "time": "2017-10-23T01:57:42+00:00" }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.31.0", + "dist": { + "type": "zip", + "url": "https://mirrors.tencent.com/repository/composer/symfony/polyfill-mbstring/v1.31.0/symfony-polyfill-mbstring-v1.31.0.zip", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2024-09-09T11:45:10+00:00" + }, { "name": "topthink/framework", "version": "v6.1.5", @@ -646,63 +1358,6 @@ } ], "packages-dev": [ - { - "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", - "dist": { - "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/polyfill-mbstring/v1.31.0/symfony-polyfill-mbstring-v1.31.0.zip", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2024-09-09T11:45:10+00:00" - }, { "name": "symfony/polyfill-php72", "version": "v1.31.0", |
|---|