车辆对接
This commit is contained in:
@ -538,29 +538,35 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
payChange() {
|
payChange(value?: any) {
|
||||||
const subtotal = this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.oilCardPay + this.sf7.value.receiptPay || 0;
|
let subtotal: any ={}
|
||||||
const oilCardPay = this.sf7.value.oilCardPay || 0;
|
let oilCardPay: any ={}
|
||||||
this.service
|
if(value) {
|
||||||
.request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`)
|
subtotal = (value.prePay +value.toPay + value.oilCardPay + value.receiptPay) || 0;
|
||||||
.subscribe(res => {
|
oilCardPay = value.oilCardPay || 0;
|
||||||
if (res) {
|
} else {
|
||||||
this.sf7.setValue('/appendFee', res.surcharge);
|
subtotal = (this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.oilCardPay + this.sf7.value.receiptPay) || 0;
|
||||||
this.sf7.setValue('/subtotal', subtotal);
|
oilCardPay = this.sf7.value.oilCardPay || 0;
|
||||||
this.sf7.setValue('/total', subtotal + res.surcharge);
|
}
|
||||||
this.service
|
console.log(this.sf7.value)
|
||||||
.request(this.service.$api_getcalculatedServiceRate + `?invoiceAmount=${subtotal + res.surcharge}&totalFreight=${subtotal}`)
|
|
||||||
.subscribe(res => {
|
this.service.request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.currentRate = res.rate;
|
this.sf7.setValue('/appendFee', res.surcharge);
|
||||||
} else {
|
this.sf7.setValue('/subtotal', subtotal);
|
||||||
this.service.msgSrv.error(res.msg);
|
this.sf7.setValue('/total', subtotal + res.surcharge);
|
||||||
}
|
this.service.request(this.service.$api_getcalculatedServiceRate + `?invoiceAmount=${subtotal + res.surcharge}&totalFreight=${subtotal}`).subscribe(res => {
|
||||||
});
|
if (res) {
|
||||||
} else {
|
this.currentRate = res.rate * 100;
|
||||||
this.service.msgSrv.error(res.msg);
|
} else {
|
||||||
}
|
this.service.msgSrv.error(res.msg);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addStartInfo(event: any) {
|
addStartInfo(event: any) {
|
||||||
@ -922,10 +928,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
toPay: res?.shippingInformationVO?.toPay,
|
toPay: res?.shippingInformationVO?.toPay,
|
||||||
oilCardPay: res?.shippingInformationVO?.oilCardPay,
|
oilCardPay: res?.shippingInformationVO?.oilCardPay,
|
||||||
receiptPay: res?.shippingInformationVO?.receiptPay,
|
receiptPay: res?.shippingInformationVO?.receiptPay,
|
||||||
// subtotal: res?.shippingInformationVO?.oilCardPay ,
|
subtotal: res?.shippingInformationVO?.totalFee,
|
||||||
|
total: res?.shippingInformationVO?.totalFee,
|
||||||
appendFee: res?.shippingInformationVO?.appendFee,
|
appendFee: res?.shippingInformationVO?.appendFee,
|
||||||
paymentDays: res?.paymentDays
|
paymentDays: res?.paymentDays
|
||||||
};
|
};
|
||||||
|
this.payChange(this.sf7data);
|
||||||
}
|
}
|
||||||
backBillChange() {
|
backBillChange() {
|
||||||
const modalRef = this.modalService.create({
|
const modalRef = this.modalService.create({
|
||||||
|
|||||||
Reference in New Issue
Block a user