From 8a80a1de3ccc4ae2d0f7139cd1c6853207d8707f Mon Sep 17 00:00:00 2001 From: TaricXin <583259872@qq.com> Date: Mon, 14 Mar 2022 16:14:31 +0800 Subject: [PATCH 1/4] edit --- .../invoice-requested.component.ts | 14 +++++--- .../requested-invoice-modal.component.html | 2 +- .../requested-invoice-modal.component.ts | 34 ++++++++++--------- .../amap-path-simplifier.component.ts | 24 +++++++------ 4 files changed, 41 insertions(+), 33 deletions(-) diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts index 663c4091..50dc913b 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts @@ -1,12 +1,13 @@ import { query } from '@angular/animations'; import { CurrencyPipe } from '@angular/common'; -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/form'; import { isTemplateRef } from 'ng-zorro-antd/core/util'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; + import { TicketService } from '../../services/ticket.service'; import { PrintOrderModalComponent } from './print-order-modal/print-order-modal.component'; import { RequestedInvoiceModalComponent } from './requested-invoice-modal/requested-invoice-modal.component'; @@ -16,7 +17,7 @@ import { RequestedInvoiceModalComponent } from './requested-invoice-modal/reques templateUrl: './invoice-requested.component.html', styleUrls: ['./invoice-requested.component.less', '../../../commom/less/box.less'] }) -export class InvoiceRequestedComponent implements OnInit { +export class InvoiceRequestedComponent { @ViewChild('st', { static: true }) st!: STComponent; @ViewChild('sf', { static: false }) @@ -33,8 +34,6 @@ export class InvoiceRequestedComponent implements OnInit { selectedRows: any[] = []; constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} - ngOnInit(): void {} - beforeReq = (requestOptions: STRequestOptions) => { if (this.resourceStatus) { Object.assign(requestOptions.body, { sts: this.resourceStatus }); @@ -219,6 +218,11 @@ export class InvoiceRequestedComponent implements OnInit { }, nzFooter: null }); + modal.afterClose.subscribe(res => { + if (res) { + this.st.load(1); + } + }); } /** @@ -421,7 +425,7 @@ export class InvoiceRequestedComponent implements OnInit { // }, { text: '订单明细
', - click: item => this.router.navigate(['/ticket/invoice-requested/detail/' + item?.id], { queryParams: { sts: item.sts } }) + click: item => this.router.navigate([`/ticket/invoice-requested/detail/${item?.id}`], { queryParams: { sts: item.sts } }) }, { text: '查看原因
', diff --git a/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.html b/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.html index 8e20fb35..14c7d14d 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.html @@ -12,7 +12,7 @@ { Object.assign(requestOptions.body, { vatappHId: this.id }); return requestOptions; @@ -33,6 +32,7 @@ export class RequestedInvoiceModalComponent implements OnInit { /** * 移除订单 + * * @returns */ removeOrder(item: any[]) { @@ -45,7 +45,7 @@ export class RequestedInvoiceModalComponent implements OnInit { this.service.request(this.service.$api_remove_bill, ids).subscribe(res => { if (res) { this.service.msgSrv.success('移除成功'); - this.modal.destroy(); + this.modal.destroy(true); } }); } @@ -57,7 +57,7 @@ export class RequestedInvoiceModalComponent implements OnInit { this.selectedRows = e.checkbox!; break; case 'filter': - this.st.load(); + this.st1.load(); break; } } @@ -78,7 +78,7 @@ export class RequestedInvoiceModalComponent implements OnInit { width: 90, type: 'widget', className: 'text-right', - widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.billkpmoney }) } + widget: { type: 'currency-chy', params: ({ record }: any) => ({ value: record.billkpmoney }) } }, { title: '运输费', @@ -86,7 +86,7 @@ export class RequestedInvoiceModalComponent implements OnInit { width: 90, type: 'widget', className: 'text-right', - widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney2 }) } + widget: { type: 'currency-chy', params: ({ record }: any) => ({ value: record.fjfmoney2 }) } }, { title: '附加费', @@ -94,7 +94,7 @@ export class RequestedInvoiceModalComponent implements OnInit { width: 90, type: 'widget', className: 'text-right', - widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney }) } + widget: { type: 'currency-chy', params: ({ record }: any) => ({ value: record.fjfmoney }) } }, { title: '操作', @@ -104,7 +104,7 @@ export class RequestedInvoiceModalComponent implements OnInit { buttons: [ { text: '移除', - click: item => this.removeOrder([item]) + click: (item: any) => this.removeOrder([item]) } ] } @@ -116,17 +116,19 @@ export class RequestedInvoiceModalComponent implements OnInit { return; } const selectedRows = this.selectedRows.map(item => { - delete item._values; - return item; + return { ...item }; }); const params = { - ficoVatappBillVOList: selectedRows, + ficoVatappBillVOList: selectedRows.map(item => { + delete item._values; + return item; + }), id: this.id }; this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => { if (res) { this.service.msgSrv.success('开票成功'); - this.modal.destroy(); + this.modal.destroy(true); } }); } diff --git a/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts b/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts index ccac8683..928a066f 100644 --- a/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts +++ b/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts @@ -1,8 +1,8 @@ -import { Component, Input, OnChanges, OnInit, Output, SimpleChanges, EventEmitter } from '@angular/core'; -import { BaseService } from 'src/app/shared/services'; -import { throwError } from 'rxjs'; import AMapLoader from '@amap/amap-jsapi-loader'; +import { Component, Input, OnChanges, OnInit, Output, SimpleChanges, EventEmitter, OnDestroy } from '@angular/core'; import { amapConf } from '@conf/amap.config'; +import { throwError } from 'rxjs'; +import { BaseService } from 'src/app/shared/services'; declare var AMap: any; declare var AMapUI: any; declare var Loca: any; @@ -13,7 +13,7 @@ const CONFIG = amapConf; templateUrl: './amap-path-simplifier.component.html', styleUrls: ['./amap-path-simplifier.component.less'] }) -export class AmapPathSimplifierComponent implements OnInit, OnChanges { +export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy { aMap: any; pathSimplifierIns: any; geocoder: any; @@ -32,7 +32,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges { mapHeight = '500px'; @Output() - clcikPointEvent = new EventEmitter(); + readonly clcikPointEvent = new EventEmitter(); @Input() pois: any = []; @@ -45,7 +45,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges { this.setPathIndex(this.selectedIndex); } if (changes?.MapList?.currentValue && this?.pathSimplifierIns && changes.MapList?.currentValue.length > 0) { - console.log(this.MapList); + // console.log(this.MapList); this.pathList = [ { name: '路线1', @@ -130,7 +130,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges { getHoverTitle: function (pathData: any, pathIndex: any, pointIndex: any) { if (pointIndex >= 0) { //point - return pathData.name + ',' + pathData.points[pointIndex].name; + return `${pathData.name},${pathData.points[pointIndex].name}`; } return ''; }, @@ -147,7 +147,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges { this.pathSimplifierIns.on('pointClick', (e: any, info: any) => { this.clcikPointEvent.emit({ e, info }); - console.log('Click: ' + info.pathData.points[info.pointIndex].name); + console.log(`Click: ${info.pathData.points[info.pointIndex].name}`); }); } @@ -202,7 +202,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges { }); } - setData(pathList: Array) { + setData(pathList: any[]) { this.pathSimplifierIns.setData(pathList); } @@ -224,7 +224,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges { } /** 根据经纬度获取地址信息 */ - getPoiByPositon(position: Array) { + getPoiByPositon(position: string[]) { this.geocoder.getAddress(position, (status: any, result: any) => { if (status === 'complete' && result.info === 'OK') { // result中对应详细地理坐标信息 @@ -239,6 +239,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges { /** * 选中标点,设置窗口信息 + * * @param location */ selectedPOI(location: any) { @@ -250,6 +251,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges { /** * 增加标记点 + * * @param poi */ setPOI(poi: POI) { @@ -278,5 +280,5 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges { export interface POI { markerLabel: string; color: string; - position: Array; + position: string[]; } From 23226b2df0a27c0aa3dc39b73b6e8ec1053ab2a6 Mon Sep 17 00:00:00 2001 From: TaricXin <583259872@qq.com> Date: Mon, 14 Mar 2022 17:10:21 +0800 Subject: [PATCH 2/4] edit --- .../components/vehicle-detail/vehicle-detail.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index 7838d45d..3892a179 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -215,7 +215,7 @@
- +
From 9e473d2116648e2e139020b9bdd738847210e25e Mon Sep 17 00:00:00 2001 From: TaricXin <583259872@qq.com> Date: Mon, 14 Mar 2022 18:29:55 +0800 Subject: [PATCH 3/4] bugfix 5303 --- .../advance-collection.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts index 7806bb1b..95c6ce06 100644 --- a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts +++ b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts @@ -151,12 +151,12 @@ export class AdvanceCollectionComponent implements OnInit { text: '浏览', click: item => this.router.navigate(['/financial-management/advance-collection/detail/' + item.id]) }, - { - text: '核销' - }, - { - text: '退款' - } + // { + // text: '核销' + // }, + // { + // text: '退款' + // } ] } ]; From 4aadbec7cc7f45e4039507a386fa9a53d81fdae6 Mon Sep 17 00:00:00 2001 From: TaricXin <583259872@qq.com> Date: Tue, 15 Mar 2022 11:21:57 +0800 Subject: [PATCH 4/4] edit --- .../advance-collection-detail.component.html | 6 +++--- .../advance-collection.component.ts | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/app/routes/financial-management/components/advance-collection/advance-collection-detail/advance-collection-detail.component.html b/src/app/routes/financial-management/components/advance-collection/advance-collection-detail/advance-collection-detail.component.html index b596784a..584da352 100644 --- a/src/app/routes/financial-management/components/advance-collection/advance-collection-detail/advance-collection-detail.component.html +++ b/src/app/routes/financial-management/components/advance-collection/advance-collection-detail/advance-collection-detail.component.html @@ -21,7 +21,7 @@ {{ costInfo?.artoname }} - {{ costInfo?.shipperId }} + {{ costInfo?.cnoName }} {{ costInfo?.ltdaccountId }} @@ -75,8 +75,8 @@ --> + [res]="{ reName: { list: 'data' } }" [loading]="false" [scroll]="{ x: '1200px', y: '370px' }" + class="mt-md"> {{index+1}} diff --git a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts index 95c6ce06..3556e2d5 100644 --- a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts +++ b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts @@ -1,9 +1,9 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { NzModalService } from 'ng-zorro-antd/modal'; -import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component'; + import { FreightAccountService } from '../../services/freight-account.service'; @Component({ @@ -11,7 +11,7 @@ import { FreightAccountService } from '../../services/freight-account.service'; templateUrl: './advance-collection.component.html', styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] }) -export class AdvanceCollectionComponent implements OnInit { +export class AdvanceCollectionComponent { @ViewChild('st', { static: true }) st!: STComponent; @ViewChild('sf', { static: false }) @@ -23,8 +23,6 @@ export class AdvanceCollectionComponent implements OnInit { constructor(public service: FreightAccountService, private router: Router, private modal: NzModalService) {} - ngOnInit(): void {} - beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { Object.assign(requestOptions.body, { ...this.sf.value }); @@ -49,7 +47,7 @@ export class AdvanceCollectionComponent implements OnInit { } exportList() { - this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 }); + this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 }); } private initSF(): SFSchema { @@ -149,8 +147,8 @@ export class AdvanceCollectionComponent implements OnInit { buttons: [ { text: '浏览', - click: item => this.router.navigate(['/financial-management/advance-collection/detail/' + item.id]) - }, + click: item => this.router.navigate([`/financial-management/advance-collection/detail/${item.id}`]) + } // { // text: '核销' // },