From 719873869fae4227fc1f05368a7865dc030a8332 Mon Sep 17 00:00:00 2001 From: hu177768073 <177768073@qq.com> Date: Fri, 20 Sep 2024 17:33:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E7=A5=A8=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gas-order-receipt.component.html | 3 +++ .../gas-order-receipt.component.ts | 13 +++++++++++++ .../trade-receipt/gas-order-receipt.service.ts | 12 ++++++++++++ 3 files changed, 28 insertions(+) diff --git a/src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.html b/src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.html index 00088c1..4e7bc54 100644 --- a/src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.html +++ b/src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.html @@ -40,6 +40,7 @@
+
@@ -58,6 +59,7 @@ 交易单号 加油站 + 油号 开票公司 开票税号 开票金额 @@ -72,6 +74,7 @@ {{data.orderNo}} {{data.merName}} + {{data.oilNo}} {{data.companyName}} {{data.taxNo}} {{data.amount}} diff --git a/src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.ts b/src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.ts index 8b5b461..f2072b8 100644 --- a/src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.ts +++ b/src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.ts @@ -33,6 +33,7 @@ import {NzTooltipDirective} from "ng-zorro-antd/tooltip"; import {DateMinutesDiffPipe} from "../../../pipes/common/date-minutes-diff.pipe"; import {NzDividerComponent} from "ng-zorro-antd/divider"; import {NzTypographyComponent} from "ng-zorro-antd/typography"; +import {environment} from "../../../../environments/environment"; @Component({ selector: 'app-gas-order-receipt', @@ -89,6 +90,7 @@ import {NzTypographyComponent} from "ng-zorro-antd/typography"; styleUrl: './gas-order-receipt.component.less' }) export class GasOrderReceiptComponent { + imageUrl = environment.imageUrl; loadingObject = { title: "加载中...", status: false, @@ -249,4 +251,15 @@ export class GasOrderReceiptComponent { }); } + + /** + * 导出加油订单 + */ + export() { + this.gasOrderReceiptService.export(this.searchForm.value, (data:any) => { + window.location.href = this.imageUrl + 'temporary/' + data['return_data']; + }); + } + + } diff --git a/src/app/services/trade-receipt/gas-order-receipt.service.ts b/src/app/services/trade-receipt/gas-order-receipt.service.ts index 34a3a28..90d738d 100644 --- a/src/app/services/trade-receipt/gas-order-receipt.service.ts +++ b/src/app/services/trade-receipt/gas-order-receipt.service.ts @@ -22,6 +22,18 @@ export class GasOrderReceiptService { }); } + /** + * 导出 + * @param param + * @param callBack + */ + public export(param: any, callBack:any) { + param.tm = new Date().getTime(); + this.http.get(environment.baseUrl + 'gasOrderReceipt/export?'+ObjectData.objectByString(param)).subscribe(data => { + callBack(data); + }); + } + /** * 开票成功 * @param param