fix bug
This commit is contained in:
		| @ -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, | ||||
|  | ||||
| @ -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' | ||||
|  | ||||
		Reference in New Issue
	
	Block a user