Commit 7fad46a4 authored by 我在何方's avatar 我在何方

收款单bug修复,汇率更新

parent ad0994cb
......@@ -375,7 +375,7 @@
<template slot-scope="scope">
<span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount }}</span>
<div v-else>
<div v-for="itemAmount in scope.row.collectionAmount">{{$i18n.locale=='zh_CN'?itemAmount.currencyNameZh:itemAmount.currencyNameEn}}: {{ itemAmount.amount}}</div>
<div v-for="itemAmount in scope.row.collectionAmount">{{$i18n.locale=='zh_CN'?(itemAmount?itemAmount.currencyNameZh:''):(itemAmount?itemAmount.currencyNameEn:'')}}: {{ itemAmount.amount}}</div>
<!-- <div v-if="scope.row.collectionAmount[1]">{{ $t('人民币') }}: {{ scope.row.collectionAmount[1].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[2]">{{ $t('奈拉') }}: {{ scope.row.collectionAmount[2].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[3]">{{ $t('西非法郎') }}: {{ scope.row.collectionAmount[3].toFixed(6) }}</div> -->
......@@ -810,8 +810,9 @@ export default {
this.form.receiptAccountList.forEach((item, index) => {
this.rateChange(item, index)
// this.calculation()
});
this.calculation()
})
})
}
......@@ -917,7 +918,7 @@ export default {
// if (row.currencyId == 3 && val == 2) row.collectionRate = this.RMBtoNAN()
// if (row.currencyId == 2 && val == 1) row.collectionRate = this.NANtoUS()
// if (row.currencyId == 2 && val == 3) row.collectionRate = this.NANtoRMB()
row.collectionRate = NP.divide(this.currencyList.find(v => v.id === row.currencyId).huilv, this.currencyList.find(v => v.id === val).huilv).toFixed(6)
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)
}
this.rateChange(row, index)
......@@ -986,12 +987,13 @@ export default {
dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.taxAmount || 0), 0)
discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
var t = copyList.find(v => v.currencyId == item.id)
console.log(discountDollar)
this.form.receiptAccountList.push(
{
discountTotal: discountDollar,
currencyId: item.id,
receivableAmount: dollar,
writeOffRate: NP.divide(this.currencyList.find(v => v.id === item.id).huilv, this.currencyList.find(v => v.id === this.showCurrencyId).huilv).toFixed(6),
writeOffRate: item.id==this.showCurrencyId?1: NP.times(this.currencyList.find(v => v.id === item.id).huilv/100, this.currencyList.find(v => v.id === this.showCurrencyId).exchangeToFc/100).toFixed(6),
platformAccountId: t?.platformAccountId || '',
collectionCurrencyId: item.id,
collectionRate: 1
......@@ -1206,12 +1208,14 @@ export default {
// this.calculation()
// })
// }else{
var discount = this.list[this.selectListIndex]
discount['discountTotal'] = this.discountForm.discountTotal
setTimeout(()=>{
getReceivableInfoByIds({ id: this.selectListRow.id }).then(res => {
this.$set(this.list, this.selectListIndex, {...res.data})
// getReceivableInfoByIds({ id: this.selectListRow.id }).then(res => {
this.$set(this.list, this.selectListIndex, {...discount})
this.cancelDiscount()
this.calculation()
})
// })
},1000)
......
......@@ -885,7 +885,7 @@ export default {
// else if (this.showCurrencyId === 3 && val === 2) rate = this.NANtoRMB()
// else if (this.showCurrencyId === 2 && val === 1) rate = this.UStoNAN()
// else if (this.showCurrencyId === 2 && val === 3) rate = this.RMBtoNAN()
rate = NP.divide(this.currencyList.find(v => v.id === val).huilv, this.currencyList.find(v => v.id === this.showCurrencyId).huilv).toFixed(6)
rate = NP.times(this.currencyList.find(v => v.id === val).huilv/100, this.currencyList.find(v => v.id === this.showCurrencyId).exchangeToFc/100).toFixed(6)
}
this.$set(this.addForm, 'rate', rate)
},
......
......@@ -144,25 +144,25 @@
clearable
></dict-selector>
</el-form-item>
<el-form-item :label="$t('发货人')">
<!-- <el-form-item :label="$t('发货人')">
<customer-selector
v-model="queryParams.consignorNameOrPhone"
@change="consignor = $event"
clearable
/>
</el-form-item>
<!-- <el-form-item label="发货人:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" :placeholder="$t('请输入发货人')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item label="发货人:" >
<el-input style="max-width: 188px;" v-model="queryParams.consignorNameOrPhone" :placeholder="$t('请输入发货人')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('收货人')">
<!-- <el-input style="max-width: 188px;" v-model="queryParams.consigneeNameOrPhone" :placeholder="$t('请输入收货人')" clearable @keyup.enter.native="handleQuery"/> -->
<customer-selector
<el-input style="max-width: 188px;" v-model="queryParams.consigneeNameOrPhone" :placeholder="$t('请输入收货人')" clearable @keyup.enter.native="handleQuery"/>
<!-- <customer-selector
v-model="queryParams.consigneeNameOrPhone"
@change="consignor = $event"
clearable
/>
/> -->
</el-form-item>
<el-form-item :label="$t('创建时间')">
<!-- <dict-selector :type="DICT_TYPE.BEGINTIME_TYPE_ENDTIME" v-model="queryParams.date"></dict-selector> -->
......@@ -328,7 +328,14 @@ export default {
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
console.log(this.queryParams)
let params = {};
for(let key in this.queryParams){
if(this.queryParams[key]&&this.queryParams[key]!= undefined){
params[key] = this.queryParams[key]
}
}
this.addBeginAndEndTime(params, this.dateType, "createTime");
// 执行查询
getReceivableList(params).then((response) => {
......
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