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

@ -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: {