fix bug
This commit is contained in:
		| @ -4,24 +4,31 @@ | |||||||
|  * @Author       : Shiming |  * @Author       : Shiming | ||||||
|  * @Date         : 2022-03-31 11:10:10 |  * @Date         : 2022-03-31 11:10:10 | ||||||
|  * @LastEditors  : Shiming |  * @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 |  * @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. |  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||||
| --> | --> | ||||||
| <div nz-row> | <div nz-row> | ||||||
|   <div style="width: 10%;"> |   <div style="width: 10%"> | ||||||
|     <nz-tabset [nzTabPosition]="'left'" style="height: 100%;"> |     <nz-tabset [nzTabPosition]="'left'" style="height: 100%"> | ||||||
|       <nz-tab [nzTitle]="item?.name" *ngFor="let item of tabs" (nzSelect)="selectTab(item)"></nz-tab> |       <nz-tab [nzTitle]="item?.name" *ngFor="let item of tabs" (nzSelect)="selectTab(item)"></nz-tab> | ||||||
|     </nz-tabset> |     </nz-tabset> | ||||||
|   </div> |   </div> | ||||||
|   <div style="width: 90%;"> |   <div style="width: 90%"> | ||||||
|     <st #st [scroll]="{x:'1000px', y: '600px'}" [data]="service.$api_get_getTaxFieldCheckList" [columns]="columns" |     <st | ||||||
|       [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" |       #st | ||||||
|       [res]="{ reName: { list: 'data', total: 'data' } }" [page]="{ show: false}" [loading]="false" |       [scroll]="{ x: '1000px', y: '600px' }" | ||||||
|       [bordered]="true"> |       [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> |       <ng-template st-row="freightDetails" let-item> | ||||||
|         <div *ngFor="let item of item.freightDetails"> |         <div *ngFor="let item of item.freightDetails"> | ||||||
|           <div>{{item.expenseName}}:{{item.price | currency}} </div> |           <div>{{ item.expenseName }}:{{ item.price | currency }} </div> | ||||||
|         </div> |         </div> | ||||||
|       </ng-template> |       </ng-template> | ||||||
|     </st> |     </st> | ||||||
|  | |||||||
| @ -4,13 +4,13 @@ | |||||||
|  * @Author       : Shiming |  * @Author       : Shiming | ||||||
|  * @Date         : 2022-03-30 14:26:01 |  * @Date         : 2022-03-30 14:26:01 | ||||||
|  * @LastEditors  : Shiming |  * @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 |  * @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. |  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||||
|  */ |  */ | ||||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
| import { Router } from '@angular/router'; | 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 { SFSchema } from '@delon/form'; | ||||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||||
| @ -21,7 +21,6 @@ import { TaxManagementService } from '../../../services/tax-management.service'; | |||||||
|   templateUrl: './verify-result.component.html', |   templateUrl: './verify-result.component.html', | ||||||
| }) | }) | ||||||
| export class TaxManagementOrderVerifyResultComponent implements OnInit { | export class TaxManagementOrderVerifyResultComponent implements OnInit { | ||||||
|   url = `/user`; |  | ||||||
|   searchSchema: SFSchema = { |   searchSchema: SFSchema = { | ||||||
|     properties: { |     properties: { | ||||||
|       no: { |       no: { | ||||||
| @ -41,13 +40,46 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit { | |||||||
|     { name: '订单信息', value: '3' }, |     { name: '订单信息', value: '3' }, | ||||||
|   ]; |   ]; | ||||||
|  |  | ||||||
|   get reqParams() { |   // get reqParams() { | ||||||
|     const params ={ |   //   console.log(this.subjectType); | ||||||
|       subjectId: this.record?.shipperId, |   //   const params ={ | ||||||
|       subjectType: this.subjectType || '0' |   //     subjectId: this.record?.shipperId, | ||||||
|     } |   //     subjectType: this.subjectType, | ||||||
|     return params; |   //   } | ||||||
|  |   //   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) { |   constructor(public service: TaxManagementService, private modalRef: NzModalRef, public router: Router) { | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -98,7 +130,10 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit { | |||||||
|  |  | ||||||
|   selectTab(e: any) { |   selectTab(e: any) { | ||||||
|     setTimeout(() => { |     setTimeout(() => { | ||||||
|  |       console.log(e?.value); | ||||||
|  |        | ||||||
|       this.subjectType = e?.value; |       this.subjectType = e?.value; | ||||||
|  |       console.log(this.subjectType); | ||||||
|       this.st.load(1); |       this.st.load(1); | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user