From c914ee023ed613ac3a1066b4db01cf54bc5dffc1 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 22 Dec 2021 20:14:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/bulk/bulk.component.ts | 2 +- .../components/vehicle/vehicle.component.ts | 11 +++++- .../update-freight.component.html | 2 +- .../update-freight.component.ts | 39 +++++++++++++++---- .../services/order-management.service.ts | 9 ++++- 5 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index abd3da68..967c079b 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -633,7 +633,7 @@ tabs = { nzTitle: '变更运费', nzWidth: 580, nzContent: UpdateFreightComponent, - nzComponentParams: { data }, + nzComponentParams: { data: { ...data, billId: item.id } }, nzOnOk: sin => { this.service.request(this.service.$api_insertFreightChangeBulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { if (res) { diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 9ee1cf34..db830dc4 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -585,7 +585,16 @@ resourceStatus: any; nzWidth: 580, nzContent: VehicleUpdateFreightComponent, nzComponentParams: { data: { ...data, id: item.id } }, - nzFooter: null + nzOnOk: sin => { + this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { + if (res) { + this.service.msgSrv.success('变更运费成功'); + modal.destroy(); + this.st.reload(); + } + }); + return false; + } }); modal.afterClose.subscribe(_ => this.st.reload()); } diff --git a/src/app/routes/order-management/modal/bulk/update-freight/update-freight.component.html b/src/app/routes/order-management/modal/bulk/update-freight/update-freight.component.html index afb0cecd..8770c6cf 100644 --- a/src/app/routes/order-management/modal/bulk/update-freight/update-freight.component.html +++ b/src/app/routes/order-management/modal/bulk/update-freight/update-freight.component.html @@ -1,7 +1,7 @@