This commit is contained in:
Taric Xin
2021-12-27 13:55:46 +08:00
parent 0f532ad744
commit cac371baf3
33 changed files with 59 additions and 79 deletions

View File

@ -43,7 +43,7 @@
<st #st [data]="service.$mock_url" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: beforeReq }"
[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)">

View File

@ -22,8 +22,6 @@ export class CancellationInvoiceComponent implements OnInit {
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
reqParams = {};
_$expand = false;
selectedRows: any[] = [];
@ -34,7 +32,7 @@ export class CancellationInvoiceComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
this.reqParams = { ...this.sf.value };
Object.assign(requestOptions.body, { ...this.sf.value });
}
return requestOptions;
};

View File

@ -88,7 +88,7 @@
</div>
<st #orderST [data]="service.$mock_url" [columns]="orderColumns" size="small" bordered="true"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: orderReqParams, process: beforeReq }"
[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: '250px' }"></st>
@ -109,14 +109,14 @@
</div>
<st #costST [data]="service.$mock_url" [columns]="costColumns" size="small" bordered="true"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: orderReqParams, process: beforeReq }"
[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: '250px' }"></st>
</nz-tab>
<nz-tab nzTitle="发票明细">
<st #invoiceST [data]="service.$mock_url" [columns]="invoiceColumns" size="small" bordered="true"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: invoiceReqParams, process: beforeReq }"
[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: '250px' }">

View File

@ -17,7 +17,6 @@ export class InvoiceDetailComponent implements OnInit {
orderSf!: SFComponent;
orderColumns: STColumn[] = this.initOrderST();
orderSchema: SFSchema = this.initOrderSF();
ordeReqParams = {};
@ViewChild('costST', { static: true })
costST!: STComponent;
@ -25,12 +24,10 @@ export class InvoiceDetailComponent implements OnInit {
costSf!: SFComponent;
costColumns: STColumn[] = this.initCostST();
costSchema: SFSchema = this.initCostSF();
orderReqParams = {};
@ViewChild('invoiceST', { static: true })
invoiceST!: STComponent;
invoiceColumns: STColumn[] = this.initInvoiceST();
invoiceReqParams = {};
isCanEdit = false;
isEdit = false;
@ -43,10 +40,10 @@ export class InvoiceDetailComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {
if (this.orderSf) {
this.orderReqParams = { ...this.orderSf.value };
Object.assign(requestOptions.body, { ...this.orderSf.value });
}
if (this.costSf) {
this.orderReqParams = { ...this.costSf.value };
Object.assign(requestOptions.body, { ...this.costSf.value });
}
return requestOptions;
};
@ -78,7 +75,6 @@ export class InvoiceDetailComponent implements OnInit {
}
}
private initOrderSF(): SFSchema {
return {
properties: {

View File

@ -100,7 +100,7 @@
</div>
<st #st [data]="service.$mock_url" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: beforeReq }"
[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: '200px' }" (change)="stChange($event)"></st>

View File

@ -20,7 +20,6 @@ export class InvoiceRequestedDetailComponent implements OnInit {
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
reqParams = {};
detail: any = {};
selectedRows: any[] = [];
@ -32,7 +31,7 @@ export class InvoiceRequestedDetailComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
this.reqParams = { ...this.sf.value };
Object.assign(requestOptions.body, { ...this.sf.value });
}
return requestOptions;
};

View File

@ -44,7 +44,7 @@
<st #st [data]="service.$mock_url" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: beforeReq }"
[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)"></st>

View File

@ -22,8 +22,6 @@ export class InvoiceRequestedComponent implements OnInit {
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
reqParams = {};
_$expand = false;
selectedRows: any[] = [];
@ -34,7 +32,7 @@ export class InvoiceRequestedComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
this.reqParams = { ...this.sf.value };
Object.assign(requestOptions.body, { ...this.sf.value });
}
return requestOptions;
};

View File

@ -35,7 +35,7 @@
</div>
<st #st [data]="service.$mock_url" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: beforeReq }"
[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)">

View File

@ -11,7 +11,6 @@ import { TicketService } from '../../services/ticket.service';
styleUrls: ['./invoiced-list.component.less']
})
export class InvoicedListComponent implements OnInit {
url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
@ -23,8 +22,6 @@ export class InvoicedListComponent implements OnInit {
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
reqParams = {};
_$expand = false;
selectedRows: any[] = [];
@ -35,7 +32,7 @@ export class InvoicedListComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
this.reqParams = { ...this.sf.value };
Object.assign(requestOptions.body, { ...this.sf.value });
}
return requestOptions;
};