edit
This commit is contained in:
		| @ -20,7 +20,7 @@ module.exports = { | |||||||
|   // } |   // } | ||||||
|   '//api': { |   '//api': { | ||||||
|     target: { |     target: { | ||||||
|       host: 'tms-api-dev.eascs.com', |       host: 'tms-api-test.eascs.com', | ||||||
|       protocol: 'https:', |       protocol: 'https:', | ||||||
|       port: 443 |       port: 443 | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; | |||||||
| import { Router } from '@angular/router'; | import { Router } from '@angular/router'; | ||||||
| import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; | import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; | ||||||
| import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; | import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; | ||||||
|  | import { DateHelperByDatePipe } from 'ng-zorro-antd/i18n'; | ||||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
| import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component'; | import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component'; | ||||||
| import { FreightAccountService } from '../../services/freight-account.service'; | import { FreightAccountService } from '../../services/freight-account.service'; | ||||||
| @ -23,7 +24,12 @@ export class VoucherSummaryComponent implements OnInit { | |||||||
|   _$expand = false; |   _$expand = false; | ||||||
|  |  | ||||||
|   selectedRows: any[] = []; |   selectedRows: any[] = []; | ||||||
|   constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} |   constructor( | ||||||
|  |     public service: FreightAccountService, | ||||||
|  |     private nzModalService: NzModalService, | ||||||
|  |     private router: Router, | ||||||
|  |     private dateHelperByDatePipe: DateHelperByDatePipe | ||||||
|  |   ) {} | ||||||
|  |  | ||||||
|   ngOnInit(): void {} |   ngOnInit(): void {} | ||||||
|  |  | ||||||
| @ -283,8 +289,18 @@ export class VoucherSummaryComponent implements OnInit { | |||||||
|       { title: '汇总凭证号', index: 'vc2code', type: 'link', width: 140 }, |       { title: '汇总凭证号', index: 'vc2code', type: 'link', width: 140 }, | ||||||
|       { title: '帐套', index: 'vcltdcode', width: 120 }, |       { title: '帐套', index: 'vcltdcode', width: 120 }, | ||||||
|       { title: '凭证时间', index: 'vctime', type: 'date', width: 150 }, |       { title: '凭证时间', index: 'vctime', type: 'date', width: 150 }, | ||||||
|       { title: '统计时间', index: 'invdate', type: 'date', width: 150 }, |       { | ||||||
|       { title: '凭证类型', index: 'vctypeLabel', width: 120 }, |         title: '统计区间', | ||||||
|  |         index: 'invdate', | ||||||
|  |         type: 'date', | ||||||
|  |         width: 200, | ||||||
|  |         format: item => | ||||||
|  |           `${this.dateHelperByDatePipe.format(item.vctime2start, 'yyyy-MM-dd')} | ${this.dateHelperByDatePipe.format( | ||||||
|  |             item.vctime2end, | ||||||
|  |             'yyyy-MM-dd' | ||||||
|  |           )}` | ||||||
|  |       }, | ||||||
|  |       { title: '凭证类型', index: 'vctype', width: 120 }, | ||||||
|       { title: '序号', index: 'invmoney', width: 100, format: _ => '1' }, |       { title: '序号', index: 'invmoney', width: 100, format: _ => '1' }, | ||||||
|       { title: '摘要', index: 'remarks', width: 120 }, |       { title: '摘要', index: 'remarks', width: 120 }, | ||||||
|       { title: '币种', index: 'currency', width: 100 }, |       { title: '币种', index: 'currency', width: 100 }, | ||||||
| @ -306,8 +322,8 @@ export class VoucherSummaryComponent implements OnInit { | |||||||
|       }, |       }, | ||||||
|       { title: 'NC凭证', index: 'importncnotes', width: 120 }, |       { title: 'NC凭证', index: 'importncnotes', width: 120 }, | ||||||
|       { title: '凭证状态', index: 'stsLabel', width: 120 }, |       { title: '凭证状态', index: 'stsLabel', width: 120 }, | ||||||
|       { title: '创建时间', index: 'createTime', width: 150 }, |       { title: '创建时间', index: 'createTime', width: 180 }, | ||||||
|       { title: '创建人', index: 'createUserId', width: 120 }, |       { title: '创建人', index: 'createUserName', width: 120 }, | ||||||
|       { |       { | ||||||
|         title: '操作', |         title: '操作', | ||||||
|         width: '130px', |         width: '130px', | ||||||
|  | |||||||
| @ -13,7 +13,7 @@ | |||||||
|                 {{headerInfo?.ltdidName}} |                 {{headerInfo?.ltdidName}} | ||||||
|             </se> |             </se> | ||||||
|             <se label="申请编号"> |             <se label="申请编号"> | ||||||
|                 {{headerInfo?.vatappHId}} |                 {{headerInfo?.vatappcode}} | ||||||
|             </se> |             </se> | ||||||
|             <se label="已开/全部订单数"> |             <se label="已开/全部订单数"> | ||||||
|                 {{headerInfo?.vatinvBillNum}} / {{headerInfo?.ordlines}} |                 {{headerInfo?.vatinvBillNum}} / {{headerInfo?.ordlines}} | ||||||
| @ -27,7 +27,7 @@ | |||||||
|         </div> |         </div> | ||||||
|         <div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1"> |         <div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1"> | ||||||
|             <se label="购买方"> |             <se label="购买方"> | ||||||
|                 {{headerInfo?.projectName}} |                 {{headerInfo?.artoName}} | ||||||
|             </se> |             </se> | ||||||
|             <se label="纳税号"> |             <se label="纳税号"> | ||||||
|                 {{headerInfo?.taxNumber}} |                 {{headerInfo?.taxNumber}} | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ | |||||||
|     </div> |     </div> | ||||||
|     <div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> |     <div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> | ||||||
|       <button nz-button nzType="primary" (click)="creat()">新增企业</button> |       <button nz-button nzType="primary" (click)="creat()">新增企业</button> | ||||||
|       <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> |       <button nz-button nzType="primary" [disabled]="!loadingList && service.http.loading" [nzLoading]="loadingList" (click)="st?.load(1)">查询</button> | ||||||
|       <button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()">导出</button> |       <button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()">导出</button> | ||||||
|       <button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button> |       <button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button> | ||||||
|       <button nz-button nzType="link" (click)="expandToggle()"> |       <button nz-button nzType="link" (click)="expandToggle()"> | ||||||
| @ -34,10 +34,10 @@ | |||||||
|   <!-- [data]="service.$api_get_supplier_page" --> |   <!-- [data]="service.$api_get_supplier_page" --> | ||||||
|  |  | ||||||
|   <st #st [columns]="columns" [data]='service.$api_get_freight_list' |   <st #st [columns]="columns" [data]='service.$api_get_freight_list' | ||||||
|     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" |     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" | ||||||
|     [res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }" |     [res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }" | ||||||
|     [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" |     [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" | ||||||
|     [loading]="service.http.loading"> |     [loading]="loadingList" > | ||||||
|     <ng-template st-row="enterpriseName" let-item let-index="index"> |     <ng-template st-row="enterpriseName" let-item let-index="index"> | ||||||
|       <div nz-tooltip [nzTooltipTitle]="item.enterpriseName"> |       <div nz-tooltip [nzTooltipTitle]="item.enterpriseName"> | ||||||
|         <div |         <div | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
| import { ActivatedRoute, Router } from '@angular/router'; | import { ActivatedRoute, Router } from '@angular/router'; | ||||||
| import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st'; | import { STChange, STColumn, STColumnBadge, STComponent, STData, STRequestOptions } from '@delon/abc/st'; | ||||||
| import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; | import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; | ||||||
| import { DynamicSettingModalComponent, ShipperBaseService } from '@shared'; | import { DynamicSettingModalComponent, ShipperBaseService } from '@shared'; | ||||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
| @ -22,29 +22,15 @@ export class FreightComponentsListComponent implements OnInit { | |||||||
|   @ViewChild('promoterModal', { static: false }) |   @ViewChild('promoterModal', { static: false }) | ||||||
|   promoterModal!: any; |   promoterModal!: any; | ||||||
|   promotersTelephone = ''; |   promotersTelephone = ''; | ||||||
|  |  | ||||||
|  |   loadingList = true; | ||||||
|   constructor( |   constructor( | ||||||
|     public service: UsermanageService, |     public service: UsermanageService, | ||||||
|     private modal: NzModalService, |     private modal: NzModalService, | ||||||
|     private router: Router,  |     private router: Router, | ||||||
|     private ar: ActivatedRoute,  |     private ar: ActivatedRoute, | ||||||
|     public shipperservice: ShipperBaseService) {} |     public shipperservice: ShipperBaseService | ||||||
|  |   ) {} | ||||||
|   /** |  | ||||||
|    * 查询参数 |  | ||||||
|    */ |  | ||||||
|   get reqParams() { |  | ||||||
|     const params: any = { |  | ||||||
|       ...(this.sf && this.sf.value), |  | ||||||
|       listSource: 1 |  | ||||||
|     }; |  | ||||||
|     if (this.sf?.value.effectiveDate) { |  | ||||||
|       params.effectiveDateStart = this.sf?.value.effectiveDate[0]; |  | ||||||
|       params.effectiveDateEnd = this.sf?.value.effectiveDate[1]; |  | ||||||
|     } |  | ||||||
|     delete params.effectiveDate; |  | ||||||
|     delete params.expand; |  | ||||||
|     return params; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   ngOnInit() { |   ngOnInit() { | ||||||
|     this.initSF(); |     this.initSF(); | ||||||
| @ -53,12 +39,22 @@ export class FreightComponentsListComponent implements OnInit { | |||||||
|       this.st?.load(1); |       this.st?.load(1); | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|   dataProcess(data: STData[]): STData[] { |  | ||||||
|     return data.map((i, index) => { |   beforeReq = (requestOptions: STRequestOptions) => { | ||||||
|       i.showSortFlag = false; |     Object.assign(requestOptions.body, { listSource: 1 }); | ||||||
|       return i; |     if (this.sf) { | ||||||
|     }); |       Object.assign(requestOptions.body, { | ||||||
|   } |         ...this.sf.value | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |     this.loadingList = true; | ||||||
|  |     return requestOptions; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   dataProcess = (data: STData[]): STData[] => { | ||||||
|  |     this.loadingList = false; | ||||||
|  |     return data; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|   settingAction(item?: any) { |   settingAction(item?: any) { | ||||||
|     this.modal.create({ |     this.modal.create({ | ||||||
| @ -113,7 +109,7 @@ export class FreightComponentsListComponent implements OnInit { | |||||||
|             showRequired: false |             showRequired: false | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         |  | ||||||
|         networkTransporter: { |         networkTransporter: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '网络货运人', |           title: '网络货运人', | ||||||
| @ -121,8 +117,8 @@ export class FreightComponentsListComponent implements OnInit { | |||||||
|             widget: 'select', |             widget: 'select', | ||||||
|             placeholder: '请选择', |             placeholder: '请选择', | ||||||
|             allowClear: true, |             allowClear: true, | ||||||
|             asyncData: () => this.shipperservice.getNetworkFreightForwarder(), |             asyncData: () => this.shipperservice.getNetworkFreightForwarder() | ||||||
|           }, |           } | ||||||
|         }, |         }, | ||||||
|         promotersTelephone: { |         promotersTelephone: { | ||||||
|           title: '业务员', |           title: '业务员', | ||||||
| @ -252,7 +248,12 @@ export class FreightComponentsListComponent implements OnInit { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   exportList() { |   exportList() { | ||||||
|     const params = this.reqParams; |     const params = { listSource: 1 }; | ||||||
|  |     if (this.sf) { | ||||||
|  |       Object.assign(params, { | ||||||
|  |         ...this.sf.value | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|     this.service.downloadFile(this.service.$api_export_enterprise, params); |     this.service.downloadFile(this.service.$api_export_enterprise, params); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user