Commit 653ea1f0 authored by 332784038@qq.com's avatar 332784038@qq.com

应收请款时获取汇率bug修复

parent cfcf5bc6
......@@ -782,7 +782,7 @@ export default {
await getUserProfile().then((res) => (this.userInfo = res.data))
// 获取汇率
await getCurrencyPage(this.params).then((res) => (this.currencyList = res.data.list))
await getCurrencyRateAllAvailable().then((res) => (this.rateList = res.data.list))
await getCurrencyRateAllAvailable().then((res) => (this.rateList = res.data))
getWarehouseList().then((res) => (this.warehouseList = res.data))
let that = this
if (that.$route.query.orderId) {
......@@ -1101,14 +1101,17 @@ export default {
// if (row.currencyId == 2 && val == 1) row.collectionRate = this.NANtoUS()
// if (row.currencyId == 2 && val == 3) row.collectionRate = this.NANtoRMB()
// row.collectionRate = NP.times(this.currencyList.find(v => v.id === row.currencyId).huilv/100, this.currencyList.find(v => v.id === val).exchangeToFc/100).toFixed(6)
console.log("原期望币种:", row.currencyId)
console.log("当前期望币种:", val)
var rate = this.getRate(row.currencyId, val);
console.log("期望币种变更:", rate)
if (rate){
row.collectionSourceAmount = rate.sourceAmount
row.collectionSourceCurrencyCode = this.getCurrencySymbol(row.currencyId)
row.collectionTargetAmount = rate.targetAmount
row.collectionTargetCurrencyCode = this.getCurrencySymbol(val)
} else {
this.$modal.msgError(this.$t("汇率设置不能为空"))
row.collectionSourceAmount = 1
row.collectionSourceCurrencyCode = this.getCurrencySymbol(row.currencyId)
row.collectionTargetAmount = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment