This commit is contained in:
wangshiming
2022-04-09 14:10:16 +08:00
parent 620ac95b19
commit b26fd59881
2 changed files with 60 additions and 18 deletions

View File

@ -4,24 +4,31 @@
* @Author : Shiming
* @Date : 2022-03-31 11:10:10
* @LastEditors : Shiming
* @LastEditTime : 2022-04-09 13:39:31
* @LastEditTime : 2022-04-09 14:02:23
* @FilePath : \\tms-obc-web\\src\\app\\routes\\tax-management\\components\\order-reporting\\verify-result\\verify-result.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<div nz-row>
<div style="width: 10%;">
<nz-tabset [nzTabPosition]="'left'" style="height: 100%;">
<div style="width: 10%">
<nz-tabset [nzTabPosition]="'left'" style="height: 100%">
<nz-tab [nzTitle]="item?.name" *ngFor="let item of tabs" (nzSelect)="selectTab(item)"></nz-tab>
</nz-tabset>
</div>
<div style="width: 90%;">
<st #st [scroll]="{x:'1000px', y: '600px'}" [data]="service.$api_get_getTaxFieldCheckList" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data', total: 'data' } }" [page]="{ show: false}" [loading]="false"
[bordered]="true">
<div style="width: 90%">
<st
#st
[scroll]="{ x: '1000px', y: '600px' }"
[data]="service.$api_get_getTaxFieldCheckList"
[columns]="columns"
[req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data', total: 'data' } , process: afterRes}"
[page]="{ show: false }"
[loading]="false"
[bordered]="true"
>
<ng-template st-row="freightDetails" let-item>
<div *ngFor="let item of item.freightDetails">
<div>{{item.expenseName}}:{{item.price | currency}} </div>
<div>{{ item.expenseName }}:{{ item.price | currency }} </div>
</div>
</ng-template>
</st>

View File

@ -4,13 +4,13 @@
* @Author : Shiming
* @Date : 2022-03-30 14:26:01
* @LastEditors : Shiming
* @LastEditTime : 2022-04-09 13:43:49
* @LastEditTime : 2022-04-09 14:09:14
* @FilePath : \\tms-obc-web\\src\\app\\routes\\tax-management\\components\\order-reporting\\verify-result\\verify-result.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFSchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalRef } from 'ng-zorro-antd/modal';
@ -21,7 +21,6 @@ import { TaxManagementService } from '../../../services/tax-management.service';
templateUrl: './verify-result.component.html',
})
export class TaxManagementOrderVerifyResultComponent implements OnInit {
url = `/user`;
searchSchema: SFSchema = {
properties: {
no: {
@ -41,13 +40,46 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit {
{ name: '订单信息', value: '3' },
];
get reqParams() {
const params ={
subjectId: this.record?.shipperId,
subjectType: this.subjectType || '0'
}
return params;
// get reqParams() {
// console.log(this.subjectType);
// const params ={
// subjectId: this.record?.shipperId,
// subjectType: this.subjectType,
// }
// return params;
// }
beforeReq = (requestOptions: STRequestOptions) => {let a: string = '';
// if (this.resourceStatus) {
// a.billStatus = this.resourceStatus;
// }
switch (this.subjectType) {
case '0':
a = this.record?.networkTransporter;
break
case '1':
a = this.record?.shipperId;
break
case '2':
a = this.record?.driverId;
break
case '3':
a = this.record?.billId;
break
}
Object.assign(requestOptions.body, {
subjectId: a ,
subjectType: this.subjectType,
});
// this.loading = true;
return requestOptions;
};
afterRes = (data: any[], rawData?: any) => {
console.log(data)
// this.loading = false
return data.map(item => ({
...item,
}));
};
constructor(public service: TaxManagementService, private modalRef: NzModalRef, public router: Router) {
}
@ -98,7 +130,10 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit {
selectTab(e: any) {
setTimeout(() => {
console.log(e?.value);
this.subjectType = e?.value;
console.log(this.subjectType);
this.st.load(1);
})
}