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()); }); }
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(); }
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; }
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; }
protected function genInsertMemberInfoValue(&$mixInfo) { $this->initMixInfoEle($mixInfo, 'memberinfo', ExcelHelper::rmi('AP')); $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_SERNO_INDEX] = $mixInfo['code']; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_CREATEDATE_INDEX] = date('Ymd'); $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_NAME_INDEX] = $mixInfo['name']; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_SEX_INDEX] = '0'; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_BIRTHDAY_INDEX] = $mixInfo['birthday']; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_CATEGORYCODE_INDEX] = HoneyBaby::MEMBER_CATEGORY_CODE; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_DISCODE_INDEX] = FixtureHelper::getDistincCode($this->getDateString()); $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_LEVEL_INDEX] = HoneyBaby::MEMBER_LEVEL_CODE; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_HOMETEL_INDEX] = $mixInfo['homeTel']; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_COMPANYTEL_INDEX] = $mixInfo['companyTel']; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_MOBILE_INDEX] = $mixInfo['mobile']; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_AREACODE_PREV_INDEX] = substr($mixInfo['areacode'], 0, 3); $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_AREACODE_NEXT_INDEX] = false === ($codeTail2 = substr($mixInfo['areacode'], 3, 2)) ? '' : $codeTail2; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_ADDRESS_INDEX] = $mixInfo['state'] . $mixInfo['city'] . $mixInfo['address']; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_EMAIL_INDEX] = $mixInfo['email']; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_EMPCODE_INDEX] = HoneyBaby::MEMBER_EMP_CODE; $mixInfo['memberinfo'][HoneyBaby::EXPORT_INSERT_MEMBERINFO_MEMO_INDEX] = $mixInfo['newCustomMemo']; return $this; }
protected function getSpecificNav() { $arr = array_fill(0, 25, NULL); $arr[ExcelHelper::rmi('B')] = '本月業績'; $arr[ExcelHelper::rmi('I')] = '去年'; $arr[ExcelHelper::rmi('K')] = 'PL業績(含稅)'; $arr[ExcelHelper::rmi('Q')] = '毛利(含稅)'; $arr[ExcelHelper::rmi('T')] = '來客&客單'; return $arr; }