From f351509a0b4f3003bf6bcf2af89a9071e67afcd6 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 4 Apr 2022 18:24:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ty-order-list.component.html | 1 + .../ty-order-list/ty-order-list.component.ts | 19 +++++++++++++++++++ .../services/ty-agent-oil-station.service.ts | 12 ++++++++++++ src/environments/environment.ts | 2 +- 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.html b/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.html index d480fbe..780744a 100644 --- a/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.html +++ b/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.html @@ -60,6 +60,7 @@
共计 {{dataObject.total?dataObject.total:0}} 条数据
+
diff --git a/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.ts b/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.ts index 9fe5b42..e6a96d9 100644 --- a/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.ts +++ b/src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.ts @@ -4,6 +4,7 @@ import {NzMessageService, NzModalService} from '_ng-zorro-antd@9.3.0@ng-zorro-an import {TyAgentOilStationService} from '../../../../services/ty-agent-oil-station.service'; import {ADMIN_INFO_OBJECT} from "../../../../services/local-storage.namespace"; import {LocalStorageService} from "../../../../services/local-storage.service"; +import {environment} from "../../../../../environments/environment"; @Component({ selector: 'app-ty-order-list', @@ -11,6 +12,7 @@ import {LocalStorageService} from "../../../../services/local-storage.service"; styleUrls: ['./ty-order-list.component.scss'] }) export class TyOrderListComponent implements OnInit { + FILE_URL = environment.imageUrl; roleType; adminFlag; @@ -72,4 +74,21 @@ export class TyOrderListComponent implements OnInit { resetForm(): void { this.searchForm.reset(); } + + /** + * 导出订单 + */ + excelOrder() { + this.tyAgentOilStationService.excelOrder(this.whereObject, data => { + if (data['return_code'] === '000000') { + window.location.href = this.FILE_URL + 'temporary/' + data['return_data']; + } else { + this.modal.error({ + nzTitle: '提示', + nzContent: data['return_msg'] + }); + } + }); + } + } diff --git a/src/app/services/ty-agent-oil-station.service.ts b/src/app/services/ty-agent-oil-station.service.ts index 6ca0e28..9057fce 100644 --- a/src/app/services/ty-agent-oil-station.service.ts +++ b/src/app/services/ty-agent-oil-station.service.ts @@ -100,4 +100,16 @@ export class TyAgentOilStationService { }); } + + /** + * 查询订单列表 + * @param paramObject 参数 + * @param callBack + */ + excelOrder(paramObject: object, callBack) { + this.http.get(environment.baseUrl + 'tyAgentOilStation/excelOrder?' + this.common.getWhereCondition(paramObject)).subscribe(data => { + callBack(data); + }); + } + } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index ffa77b2..21ad46f 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,7 +6,7 @@ export const environment = { production: false, // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) // imageUrl: 'http://localhost:9302/filesystem/', - baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) + baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) imageUrl: 'https://hsgcs.dctpay.com/filesystem/', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',