Commit 54a6da8c authored by 我在何方's avatar 我在何方

收款单详情应收金额为0优化

parent 2c14529e
......@@ -187,7 +187,7 @@
</el-table-column>
<el-table-column :label="$t('期望收款金额')" align="center" prop="collectionAmount">
<template slot-scope="scope">
<span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount }}</span>
<span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount||0 }}</span>
<div v-else>
<div v-for="itemAmount in scope.row.collectionAmount">{{$i18n.locale=='zh_CN'?itemAmount.currencyNameZh:itemAmount.currencyNameEn}}: {{ itemAmount&&itemAmount.amount?itemAmount.amount:0}}</div>
<!-- <div v-if="scope.row.collectionAmount[0]">{{ $t('美元') }}: {{ scope.row.collectionAmount[0] }}</div>
......@@ -811,7 +811,7 @@ export default {
// if(n && n.discountTotal&&n.discountTotal>0){
// amountList.push({currencyName:item.titleZh, currencyId: item.id, amount:(dollar-n.discountTotal).toFixed(2)})
// }else{
amountList.push({currencyId:item.id,currencyNameEn:item.titleEn,currencyNameZh:item.titleZh,amount:dollar})
amountList.push({currencyId:item.id,currencyNameEn:item.titleEn,currencyNameZh:item.titleZh,amount:dollar||0})
// }
}
......@@ -882,12 +882,12 @@ export default {
}else{
// console.log(this.addForm.amount)
// this.addForm.amount = this.addForm.amount.toFixed(2)
// if(this.addForm&&this.addForm.amount&&this.addForm.amount.indexOf('.')>-1){
if(this.addForm&&this.addForm.amount){
pointArr = this.addForm.amount.toString().split('.')
if(pointArr.length>1&&pointArr[1]){
this.addForm.amount =Math.round(this.addForm.amount*100)/100
}
// }
}
}
this.$set(this.addForm, 'writeOffAmount', NP.times(this.addForm.rate || 0, this.addForm.amount || 0))
},
......
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