diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index d30d1055..96eaa64d 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -715,24 +715,33 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { const receiptPay = this.sf7.value.receiptPay || 0; const oilCardPay = 0; const subtotal = prePay + toPay + receiptPay; + console.log(this?.sf1.value?.enterpriseInfoName) + if(this?.sf1.value?.enterpriseInfoName) { + console.log('5555'); + + } + console.log(this?.sf1.value?.enterpriseInfoId) + console.log(this?.sf1data?.enterpriseInfoId) + console.log(this?.sf1?.value?.enterpriseInfoName ? this?.sf1?.value?.enterpriseInfoName : this?.sf1data?.enterpriseInfoId || '') const params = { - shipperId: this?.sf1.value?.shipperAppUserId, - enterpriseInfoId: this?.sf1.value?.enterpriseInfoName, + shipperId: this?.sf1?.value?.shipperAppUserId, + enterpriseInfoId: this?.sf1data?.enterpriseInfoId || '', totalFreight: subtotal, fuelCardAmount: oilCardPay, resourcetype: '1' }; this.service.request(this.service.$api_getCalculatedSurcharge, params).subscribe(res => { - console.log('999'); - console.log(this.envCache); if (res) { + console.log(res) this.sf7.setValue('/appendFee', res.surcharge); this.sf7.setValue('/subtotal', subtotal); this.sf7.setValue('/total', subtotal + res.surcharge); + let items = this?.sf1data?.enterpriseInfoId || ''; + console.log(items) this.service .request( this.service.$api_getAdditionalRate + - `?shipperId=${this?.sf1.value?.shipperAppUserId || ''}&enterpriseInfoId=${this?.sf1.value?.enterpriseInfoName || ''}&resourcetype='1'` + `?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'` ) .subscribe(res => { if (res) { @@ -1146,6 +1155,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } this.sf1data = { enterpriseInfoName: res?.enterpriseInfoName, + enterpriseInfoId: res?.enterpriseInfoId, dispatchPhone: res?.dispatchPhone, dispatchName: res?.dispatchName, externalResourceCode: res?.externalResourceCode, diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 578cc73d..f1f34aa4 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -747,7 +747,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { const subtotal = prePay + toPay + receiptPay; const params = { shipperId: this?.sf1.value?.shipperAppUserId, - enterpriseInfoId: this?.sf1.value?.enterpriseInfoName, + enterpriseInfoId: this?.sf1.value?.enterpriseInfoName || '', totalFreight: subtotal, fuelCardAmount: oilCardPay, resourcetype: '1'