This commit is contained in:
wangshiming
2022-03-01 19:59:23 +08:00
parent e983ba5457
commit f2ac497c48
2 changed files with 16 additions and 6 deletions

View File

@ -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,