Ejemplo n.º 1
0
 protected function genCreditCardDealReport($filename)
 {
     $self = $this;
     return Excel::create($filename, function ($excel) use($self) {
         $formatArr = ['J' => '@', 'K' => '@', 'L' => '@', 'M' => '@', 'N' => '@', 'O' => '@', 'P' => '@', 'Q' => '@', 'R' => '@', 'S' => '@', 'T' => '@', 'U' => '@', 'V' => '0', 'B' => '@', 'H' => '@', 'F' => '0', 'G' => '0'];
         ExcelHelper::genBasicSheet($excel, '表格', $formatArr, 'V', $self->getCreditCardDealQuery(), $self->genCreditCardDealHead());
     });
 }
Ejemplo n.º 2
0
 public function process()
 {
     $self = $this;
     Excel::create($this->getFileName(), function ($excel) use($self) {
         ExcelHelper::genBasicSheet($excel, '銷貨', ['C' => '@', 'G' => '@', 'I' => '@'], 'K', $self->getSaleQuery(), $self->getExportHead()['sale']);
         ExcelHelper::genBasicSheet($excel, '退貨', ['C' => '@', 'G' => '@', 'I' => '@'], 'K', $self->getBackQuery(), $self->getExportHead()['back']);
     })->store('xls', storage_path('excel/exports'));
     return $msg = $this->send();
 }
Ejemplo n.º 3
0
 public function process()
 {
     set_time_limit(0);
     ini_set('memory_limit', '512M');
     $self = $this;
     Excel::create($this->getFileName(), function ($excel) use($self) {
         ExcelHelper::genBasicSheet($excel, '表格', ['A' => '@', 'B' => '@', 'L' => '@', 'N' => '@', 'O' => '@'], 'Q', $self->getQuery(), $self->getExportHead());
     })->store('xls', storage_path('excel/exports'));
     return $msg = $this->send();
 }
 public function process()
 {
     Excel::create($this->getFileName(), function ($excel) {
         $params = $this->getBascitSheetParams();
         ExcelHelper::genBasicSheet($excel, $params[0], $params[1], $params[2], $params[3], $params[4]);
     })->store(ExportExcel::XLS, storage_path('excel/exports'));
     Mail::send('emails.creditCard', ['title' => $this->getSubject()], function ($m) {
         $m->subject($this->getSubject())->attach($this->getFilePath());
         $m->to($this->getToList())->cc($this->getCCList());
     });
     return "{$this->getSubject()} send complete!";
 }
 public function process()
 {
     Excel::create($this->getFileName(), function ($excel) {
         $excel->setTitle('進銷退明細');
         $excel->setCreator('*****@*****.**')->setCompany('chinghwa');
         $excel->setDescription(ExportExcel::SPB_FILENAME);
         ExcelHelper::genBasicSheet($excel, '退貨原因', array('G' => '@'), 'K', $this->getBackReasonQuery(), $this->getExportHead()['backReason']);
         ExcelHelper::genBasicSheet($excel, '進貨單', array('G' => '@'), 'N', $this->getPurchaseQuery(), $this->getExportHead()['purchase']);
         ExcelHelper::genBasicSheet($excel, '樣品出貨單', array('G' => '@'), 'N', $this->getSampleDispatchQuery(), $this->getExportHead()['sampleDispatch']);
         ExcelHelper::genBasicSheet($excel, '樣品退回單', array('G' => '@'), 'N', $this->getSampleBackQuery(), $this->getExportHead()['sampleBack']);
         ExcelHelper::genBasicSheet($excel, '調撥單據', array('G' => '@'), 'N', $this->getAllocateQuery(), $this->getExportHead()['allocate']);
         ExcelHelper::genBasicSheet($excel, '銷貨退回', array('G' => '@'), 'N', $this->getSoldBackQuery(), $this->getExportHead()['soldBack']);
         ExcelHelper::genBasicSheet($excel, '銷貨單', array('G' => '@'), 'N', $this->getSellQuery(), $this->getExportHead()['sell']);
     })->store('xls', storage_path('excel/exports'));
     $msg = $this->send();
     return $msg;
 }
Ejemplo n.º 6
0
 public function process()
 {
     if (!$this->hasToSend()) {
         return '員購銷貨單 No Task!';
     }
     $self = $this;
     Excel::create($this->getFileName(), function ($excel) use($self) {
         // Set the title
         $excel->setTitle('員購銷貨單');
         // Chain the setters
         $excel->setCreator('*****@*****.**')->setCompany('chinghwa');
         // Call them separately
         $excel->setDescription(ExportExcel::EMPP_FILENAME);
         ExcelHelper::genBasicSheet($excel, '表格', ['C' => '@', 'G' => '@', 'I' => '@'], 'K', $self->getQuery(), $self->getExportHead());
     })->store('xls', storage_path('excel/exports'));
     $msg = $this->send();
     return $msg;
 }