lqmac 8 months ago
parent 2f65cc122a
commit 7bd8c05277
  1. 20
      app/admin/controller/Goods.php
  2. 1
      public/admin/css/app.9154d0a4.css
  3. 1
      public/admin/css/goods.9a716766.css
  4. 1
      public/admin/css/menu.0391ed9c.css
  5. 2
      public/admin/index.html
  6. 1
      public/admin/js/app.94ef28d8.js
  7. 3
      public/admin/js/goods.d540532f.js
  8. 3
      public/admin/js/menu.c52f90e4.js
  9. 3
      public/admin/js/store.47835409.js

@ -38,14 +38,14 @@ class Goods extends Controller
* @return Json * @return Json
* @throws DbException * @throws DbException
*/ */
public function list(): Json public function list(int $pageSize = 15): Json
{ {
// 获取列表记录 // 获取列表记录
$model = new GoodsModel; $model = new GoodsModel;
$params = $this->request->param(); $params = $this->request->param();
$params['store_id'] = 0; $params['store_id'] = 0;
$params['role'] = $this->admin['user']['role']; $params['role'] = $this->admin['user']['role'];
$list= $model->getAdminList($params); $list= $model->getAdminList($params, $pageSize);
return $this->renderSuccess(compact('list')); return $this->renderSuccess(compact('list'));
} }
@ -193,14 +193,17 @@ class Goods extends Controller
} }
public function export(){ public function export(){
$model = new GoodsModel; $model = new GoodsModel;
$params = $this->request->param(); $params = $this->request->param();
$params['store_id'] = 0; $params['store_id'] = 0;
$list = $model->getAdminListExport($params)->toArray(); $list = $model->getAdminListExport($params)->toArray();
$accessNum = $list['total'];
// echo $accessNum;
// exit();
set_time_limit(0); set_time_limit(0);
ini_set('memory_limit', '1024M'); ini_set('memory_limit', '1024M');
$columns = ['系统编码','标题','型号','价格库存链接','成本价','库存','详细图市场价链接','前台价',"发货区域","商品备注"]; //设置好告诉浏览器要下载excel文件的headers $columns = ['系统编码','标题','型号','该商品苏宁的链接','成本价','库存','京东的价拖链接','前台价',"发货区域","商品备注"]; //设置好告诉浏览器要下载excel文件的headers
header('Content-Encoding: UTF-8'); header('Content-Encoding: UTF-8');
header('Content-Type: application/vnd.ms-excel;charset=UTF-8'); header('Content-Type: application/vnd.ms-excel;charset=UTF-8');
header('Content-Disposition: attachment; filename="导出数据-'.date('Y-m-d', time()).'.csv"'); header('Content-Disposition: attachment; filename="导出数据-'.date('Y-m-d', time()).'.csv"');
@ -214,16 +217,19 @@ class Goods extends Controller
//获取总数,分页循环处理 //获取总数,分页循环处理
$accessNum = $list['total']; $accessNum = $list['total'];
$perSize = 1000; $perSize = 1000;
$pages = ceil($accessNum / $perSize); $pages = ceil($accessNum / $perSize);
//echo $pages;
//exit();
for($i = 1; $i <= $pages; $i++) { for($i = 1; $i <= $pages; $i++) {
$params['page'] = $i; $params['page'] = $i;
$db_data = $list = $model->getAdminListExport($params)->toArray(); $db_data = $model->getAdminListExport($params, $perSize)->toArray();
// echo "<pre>"; // echo "<pre>";
// print_r($db_data); // print_r($db_data);
// exit; // exit;
foreach($db_data['data'] as $key => $value) { foreach($db_data['data'] as $key => $value) {
unset($value['goods_sales']);
//$rowData = []; //获取每列数据,转换处理成需要导出的数据 //$rowData = []; //获取每列数据,转换处理成需要导出的数据
//需要格式转换,否则会乱码 //需要格式转换,否则会乱码
//mb_convert_variables('GBK', 'UTF-8', $rowData); //mb_convert_variables('GBK', 'UTF-8', $rowData);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
.ant-tag[data-v-6945f1cc]{cursor:pointer}.ant-tag[data-v-6945f1cc]:hover{border:1px solid #fb9a9a;color:#fb9a9a}

@ -1 +1 @@
<!DOCTYPE html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>超级管理后台</title><style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style><link href="css/cloud.a47f0029.css" rel="prefetch"><link href="css/goods.1bbe0edc.css" rel="prefetch"><link href="css/menu.a51b889c.css" rel="prefetch"><link href="css/setting.acf5c21b.css" rel="prefetch"><link href="css/store.14ef162f.css" rel="prefetch"><link href="css/user.6c29834d.css" rel="prefetch"><link href="js/cloud.5250d74c.js" rel="prefetch"><link href="js/fail.9f520b72.js" rel="prefetch"><link href="js/goods.265dfe41.js" rel="prefetch"><link href="js/menu.b0330e60.js" rel="prefetch"><link href="js/setting.9458c846.js" rel="prefetch"><link href="js/store.f45b7791.js" rel="prefetch"><link href="js/user.8c820957.js" rel="prefetch"><link href="css/app.3ac8026c.css" rel="preload" as="style"><link href="css/chunk-vendors.f1c5ffe0.css" rel="preload" as="style"><link href="js/app.82ec1003.js" rel="preload" as="script"><link href="js/chunk-vendors.deec1c57.js" rel="preload" as="script"><link href="css/chunk-vendors.f1c5ffe0.css" rel="stylesheet"><link href="css/app.3ac8026c.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div id="loading-mask"><div class="loading-wrapper"><span class="loading-dot loading-dot-spin"><i></i><i></i><i></i><i></i></span></div></div></div><script src="config.js"></script><script src="js/chunk-vendors.deec1c57.js"></script><script src="js/app.82ec1003.js"></script></body></html> <!DOCTYPE html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>超级管理后台</title><style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style><link href="css/cloud.a47f0029.css" rel="prefetch"><link href="css/goods.9a716766.css" rel="prefetch"><link href="css/menu.0391ed9c.css" rel="prefetch"><link href="css/setting.acf5c21b.css" rel="prefetch"><link href="css/store.14ef162f.css" rel="prefetch"><link href="css/user.6c29834d.css" rel="prefetch"><link href="js/cloud.5250d74c.js" rel="prefetch"><link href="js/fail.9f520b72.js" rel="prefetch"><link href="js/goods.d540532f.js" rel="prefetch"><link href="js/menu.c52f90e4.js" rel="prefetch"><link href="js/setting.9458c846.js" rel="prefetch"><link href="js/store.47835409.js" rel="prefetch"><link href="js/user.8c820957.js" rel="prefetch"><link href="css/app.9154d0a4.css" rel="preload" as="style"><link href="css/chunk-vendors.f1c5ffe0.css" rel="preload" as="style"><link href="js/app.94ef28d8.js" rel="preload" as="script"><link href="js/chunk-vendors.deec1c57.js" rel="preload" as="script"><link href="css/chunk-vendors.f1c5ffe0.css" rel="stylesheet"><link href="css/app.9154d0a4.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div id="loading-mask"><div class="loading-wrapper"><span class="loading-dot loading-dot-spin"><i></i><i></i><i></i><i></i></span></div></div></div><script src="config.js"></script><script src="js/chunk-vendors.deec1c57.js"></script><script src="js/app.94ef28d8.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save