Commit b9c222a8 authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 9c920d92
...@@ -569,7 +569,8 @@ class InvoiceService ...@@ -569,7 +569,8 @@ class InvoiceService
} }
} }
return [ 'path' => $path.$filename, 'filename' => $filename]; $downloadUrl = $invoiceInfo['invoice_platform'] == 'rhawn' ? 'http://download.rhawn.cn/' : 'http://download.chem-mall.com';
return [ 'path' => $downloadUrl.$path.$filename, 'filename' => $filename];
} }
public function getInvoicePdfDownloadUrl() public function getInvoicePdfDownloadUrl()
......
...@@ -85,7 +85,11 @@ class InvoiceController extends Controller ...@@ -85,7 +85,11 @@ class InvoiceController extends Controller
'Content-Type: application/pdf', 'Content-Type: application/pdf',
]; ];
//下载电子发票 //下载电子发票
return response()->download($result['path'],$result['filename'],$headers); header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: utf-8");
header("Content-disposition: attachment; filename=\"" . basename($result['filename']) . "\"");
readfile($result['path']);
//return response()->download($result['path'],$result['filename'],$headers);
} }
}catch(\Throwable $exception){ }catch(\Throwable $exception){
return $this->returnErrorExecptionResponse($exception,$exception->getMessage()); return $this->returnErrorExecptionResponse($exception,$exception->getMessage());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment