From 2e3f5d65a5703046ec19c6a18b9322ab02a0c21e Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sat, 7 May 2022 13:49:47 +0800 Subject: [PATCH] fix bug --- proxy.conf.js | 4 +-- .../operationtable.component.ts | 25 +++++++++++++------ .../routes/datatable/services/data.service.ts | 2 ++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/proxy.conf.js b/proxy.conf.js index 28ccca86..958626b6 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-18 09:51:21 * @LastEditors : Shiming - * @LastEditTime : 2022-05-07 10:35:23 + * @LastEditTime : 2022-05-07 11:27:16 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -30,7 +30,7 @@ module.exports = { // }, '//api': { target: { - host: 'tms-api-dev.eascs.com', + host: 'tms-api-test.eascs.com', protocol: 'https:', port: 443 }, diff --git a/src/app/routes/datatable/components/operationtable/operationtable.component.ts b/src/app/routes/datatable/components/operationtable/operationtable.component.ts index 15a0571c..aa8b8e33 100644 --- a/src/app/routes/datatable/components/operationtable/operationtable.component.ts +++ b/src/app/routes/datatable/components/operationtable/operationtable.component.ts @@ -73,9 +73,9 @@ export class DatatableOperationtableComponent implements OnInit { } initPillarData(flag?: boolean){ let type = 1 - if(this.mode === 'year') { + if(this.modeNext === 'year') { type = 1 - } else if(this.mode === 'month') { + } else if(this.modeNext === 'month') { type = 2 } const params: any = { @@ -126,7 +126,18 @@ export class DatatableOperationtableComponent implements OnInit { // Can not select days before today and today differenceInCalendarDays(current, this.today) > 0; exportFun() { - + let type = 1 + if(this.mode === 'year') { + type = 1 + } else if(this.mode === 'month') { + type = 2 + } + const params: any = { + time: this.time, + type, + enterpriseInfoId: this.enterpriseInfoId + }; + this.service.exportStart({ ...params, pageSize: -1 }, this.service.$api_asyncExportOperationalReport); } changeCurve(){ @@ -135,9 +146,9 @@ export class DatatableOperationtableComponent implements OnInit { } changeDataNext() { - if(this.mode === 'year') { + if(this.modeNext === 'year') { this.dateFormat = 'yyyy' - } else if(this.mode === 'month') { + } else if(this.modeNext === 'month') { this.dateFormat = 'yyyy-MM' } } @@ -145,9 +156,9 @@ export class DatatableOperationtableComponent implements OnInit { if(result === null) { return } - if(this.mode === 'year') { + if(this.modeNext === 'year') { this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy') + '-01-01 00:00:00'] - } else if(this.mode === 'month') { + } else if(this.modeNext === 'month') { this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00'] } this.initPillarData(true) diff --git a/src/app/routes/datatable/services/data.service.ts b/src/app/routes/datatable/services/data.service.ts index adea49fc..ca0bac57 100644 --- a/src/app/routes/datatable/services/data.service.ts +++ b/src/app/routes/datatable/services/data.service.ts @@ -107,6 +107,8 @@ export class DataService extends ShipperBaseService { $api_total_freight = `/api/sdc/reportData/getTotalFreight`; // 附加费总额 $api_total_surcharge = `/api/sdc/reportData/getTotalSurcharge`; + // 运营导出 + $api_asyncExportOperationalReport = `/api/sdc/report/asyncExportOperationalReport`;