Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
import { AfterViewInit, Component, OnInit } from '@angular/core';
|
||||
import { fromEvent } from 'rxjs';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
template: ''
|
||||
})
|
||||
export class BasicTableComponent implements AfterViewInit {
|
||||
scrollY = '400px';
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
setTimeout(() => {
|
||||
this.getScrollY();
|
||||
}, 100);
|
||||
fromEvent(window, 'resize')
|
||||
.pipe(debounceTime(100))
|
||||
.subscribe(event => {
|
||||
this.getScrollY();
|
||||
});
|
||||
}
|
||||
|
||||
getScrollY() {
|
||||
const windowHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight);
|
||||
const header = document.getElementsByTagName('layout-pro-header')?.[0];
|
||||
if (windowHeight && header) {
|
||||
let scrollY = windowHeight - header.clientHeight - 35 - 49;
|
||||
const headerWrapper = document.getElementsByTagName('page-header-wrapper')?.[0];
|
||||
if (headerWrapper) {
|
||||
scrollY -= headerWrapper.clientHeight;
|
||||
}
|
||||
const tabset = document.getElementsByTagName('nz-tabset')?.[0];
|
||||
if (tabset) {
|
||||
scrollY -= tabset.clientHeight;
|
||||
}
|
||||
this.scrollY = scrollY + 'px';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6,6 +6,7 @@ import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { fromEvent, of } from 'rxjs';
|
||||
import { debounceTime, map } from 'rxjs/operators';
|
||||
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
|
||||
import { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component';
|
||||
import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component';
|
||||
import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component';
|
||||
@ -20,7 +21,7 @@ import { OrderManagementService } from '../../services/order-management.service'
|
||||
templateUrl: './vehicle.component.html',
|
||||
styleUrls: ['../../../commom/less/commom-table.less']
|
||||
})
|
||||
export class OrderManagementVehicleComponent implements OnInit {
|
||||
export class OrderManagementVehicleComponent extends BasicTableComponent implements OnInit {
|
||||
ui: SFUISchema = {};
|
||||
schema: SFSchema = {};
|
||||
auditMany = false;
|
||||
@ -67,7 +68,6 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
};
|
||||
resourceStatus: any;
|
||||
|
||||
scrollY = '400px';
|
||||
visible = false;
|
||||
constructor(
|
||||
public service: OrderManagementService,
|
||||
@ -75,7 +75,9 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
public shipperservice: ShipperBaseService,
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute
|
||||
) {}
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -145,32 +147,6 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
this.initST();
|
||||
this.initSTFloat();
|
||||
this.initSTFloatView();
|
||||
|
||||
setTimeout(() => {
|
||||
this.getScrollY();
|
||||
}, 100);
|
||||
fromEvent(window, 'resize')
|
||||
.pipe(debounceTime(100))
|
||||
.subscribe(event => {
|
||||
this.getScrollY();
|
||||
});
|
||||
}
|
||||
|
||||
getScrollY() {
|
||||
const windowHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight);
|
||||
const header = document.getElementsByTagName('layout-pro-header')?.[0];
|
||||
if (windowHeight && header) {
|
||||
let scrollY = windowHeight - header.clientHeight - 35 - 49;
|
||||
const headerWrapper = document.getElementsByTagName('page-header-wrapper')?.[0];
|
||||
if (headerWrapper) {
|
||||
scrollY -= headerWrapper.clientHeight;
|
||||
}
|
||||
const tabset = document.getElementsByTagName('nz-tabset')?.[0];
|
||||
if (tabset) {
|
||||
scrollY -= tabset.clientHeight;
|
||||
}
|
||||
this.scrollY = scrollY + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
search() {
|
||||
|
||||
@ -4,8 +4,9 @@ import { SharedModule } from '@shared';
|
||||
// dashboard pages
|
||||
import { DashboardComponent } from './dashboard/dashboard.component';
|
||||
import { RouteRoutingModule } from './routes-routing.module';
|
||||
import { BasicTableComponent } from './commom/components/basic-table/basic-table.component';
|
||||
|
||||
const COMPONENTS = [DashboardComponent];
|
||||
const COMPONENTS = [DashboardComponent, BasicTableComponent];
|
||||
const COMPONENTS_NOROUNT: Array<Type<void>> = [];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@ -33,7 +33,12 @@ export class InvoiceRequestedComponent {
|
||||
|
||||
totalCallNo = 0;
|
||||
selectedRows: any[] = [];
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router,public shipperservice: ShipperBaseService,) {}
|
||||
constructor(
|
||||
public service: TicketService,
|
||||
private nzModalService: NzModalService,
|
||||
private router: Router,
|
||||
public shipperservice: ShipperBaseService
|
||||
) {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.resourceStatus) {
|
||||
@ -226,6 +231,16 @@ export class InvoiceRequestedComponent {
|
||||
});
|
||||
}
|
||||
|
||||
downloadPdf(item: any) {
|
||||
this.service.request(this.service.$api_downloadPdf, { vatappHId: item.id }).subscribe(res => {
|
||||
if (res?.reconciliationUrl) {
|
||||
this.service.reviewPDF(res.reconciliationUrl);
|
||||
} else {
|
||||
this.service.msgSrv.warning('获取对账单失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
@ -305,7 +320,7 @@ export class InvoiceRequestedComponent {
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
title: '申请时间',
|
||||
@ -349,7 +364,7 @@ export class InvoiceRequestedComponent {
|
||||
},
|
||||
asyncData: () => this.shipperservice.getCRM()
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -441,11 +456,12 @@ export class InvoiceRequestedComponent {
|
||||
text: '查看原因<br/>',
|
||||
click: item => this.showReason(item),
|
||||
iif: item => item.sts === '4'
|
||||
},
|
||||
{
|
||||
text: '下载对账单',
|
||||
iif: item => item.sts === '3',
|
||||
click: item => this.downloadPdf(item)
|
||||
}
|
||||
// {
|
||||
// text: '下载对账单'
|
||||
// // click: item => this.rejectAction(item)
|
||||
// }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@ -108,6 +108,9 @@ export class TicketService extends ShipperBaseService {
|
||||
// 查询快递轨迹
|
||||
$api_get_express_routes = '/api/fcc/ficoExpressH/searchRoutes';
|
||||
|
||||
// 下载对账单文件
|
||||
$api_downloadPdf = '/api/fcc/ficoVatappBill/downloadPdf';
|
||||
|
||||
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
||||
super(injector, eaCacheSrv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user