车辆对接
This commit is contained in:
@ -38,7 +38,9 @@ export class InvoiceRequestedDetailComponent implements OnInit {
|
||||
this.loadHeadInfo();
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
ngOnInit(): void {
|
||||
console.log(this.route.snapshot)
|
||||
}
|
||||
|
||||
loadHeadInfo() {
|
||||
this.service.request(this.service.$api_get_invoice_requested_header_detail, { vatappHId: this.vatappHId }).subscribe(res => {
|
||||
|
||||
@ -1,3 +1,11 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-29 13:12:35
|
||||
* @LastEditTime: 2021-12-29 16:15:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\ticket-management\components\invoice-requested\invoice-requested.component.html
|
||||
-->
|
||||
<page-header-wrapper [title]="'开票申请'">
|
||||
</page-header-wrapper>
|
||||
|
||||
@ -21,8 +29,8 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box" nzBordered>
|
||||
<nz-tabset [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-card class="content-box" nzBordered >
|
||||
<nz-tabset [nzTabBarExtraContent]="extraTemplate" (nzSelectedIndexChange)="selectChange($event)">
|
||||
<nz-tab nzTitle="待受理"></nz-tab>
|
||||
<nz-tab nzTitle="处理中"></nz-tab>
|
||||
<nz-tab nzTitle="已拒绝"></nz-tab>
|
||||
@ -42,12 +50,20 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<st
|
||||
#st
|
||||
size="small"
|
||||
[bordered]="true"
|
||||
[scroll]="{ x: '2000px' }"
|
||||
[data]="service.$api_get_invoice_requested_page"
|
||||
[columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500"
|
||||
[loading]="service.http.loading"
|
||||
>
|
||||
|
||||
<st #st [data]="service.$api_get_invoice_requested_page" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }" (change)="stChange($event)">
|
||||
<ng-template st-row="vatappcode" let-item let-index="index" let-column="column">
|
||||
{{ item.vatappcode }} <br> <label class="text-primary">待受理</label>
|
||||
</ng-template>
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { query } from '@angular/animations';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
@ -19,38 +20,52 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
sf!: SFComponent;
|
||||
@ViewChild('rejectModal', { static: false })
|
||||
rejectModal!: any;
|
||||
resourceStatus!: any;
|
||||
columns: STColumn[] = this.initST();
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
_$expand = false;
|
||||
|
||||
selectedRows: any[] = [];
|
||||
totalCallNo = 0;
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
createTime: {
|
||||
start: this.sf.value.createTime?.[0] || null,
|
||||
end: this.sf.value.createTime?.[1] || null
|
||||
}
|
||||
});
|
||||
get reqParams() {
|
||||
// if (this.sf) {
|
||||
// Object.assign(requestOptions.body, {
|
||||
// ...this.sf.value,
|
||||
// sts: this?.resourceStatus,
|
||||
// createTime: {
|
||||
// start: this.sf.value.createTime?.[0] || null,
|
||||
// end: this.sf.value.createTime?.[1] || null
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
const a:any = {};
|
||||
if(this.resourceStatus) {
|
||||
a.sts = this.resourceStatus
|
||||
}
|
||||
return requestOptions;
|
||||
return {
|
||||
...a,
|
||||
...this.sf?.value,
|
||||
createTime: {
|
||||
start: this.sf?.value?.createTime?.[0] || null,
|
||||
end: this.sf?.value?.createTime?.[1] || null
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0);
|
||||
break;
|
||||
}
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter((item) => item.checked) || [];
|
||||
}
|
||||
// stChange(e: STChange): void {
|
||||
// switch (e.type) {
|
||||
// case 'checkbox':
|
||||
// this.selectedRows = e.checkbox!;
|
||||
// this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
rejectAction(item: any[]) {
|
||||
const modal = this.nzModalService.create({
|
||||
@ -330,7 +345,7 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
text: '订单明细',
|
||||
click: item => this.router.navigate(['/ticket/invoice-requested/detail/' + item.vatappcode])
|
||||
click: item => this.orderDetail(item)
|
||||
},
|
||||
{
|
||||
text: '下载对账单'
|
||||
@ -340,4 +355,20 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
}
|
||||
orderDetail(item: any){
|
||||
console.log(item)
|
||||
this.router.navigate(['/ticket/invoice-requested/detail/' + item?.id,
|
||||
{
|
||||
queryParams: { vatappHId : item?.id }
|
||||
}
|
||||
])
|
||||
}
|
||||
selectChange(e: any) {
|
||||
console.log(e)
|
||||
this.resourceStatus = e;
|
||||
this.initST();
|
||||
setTimeout(() => {
|
||||
this.st.load();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ export class RequestedDetailComponent implements OnInit {
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-29 13:12:35
|
||||
* @LastEditTime: 2021-12-29 15:44:27
|
||||
* @LastEditors: your name
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\ticket-management\services\ticket.service.ts
|
||||
*/
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user