Commit 41c7c422 authored by dragondean@qq.com's avatar dragondean@qq.com
parents 497ab994 d0bb9b2e
...@@ -289,13 +289,13 @@ ...@@ -289,13 +289,13 @@
<el-form-item label="收款单号">{{ form.receiptNo }}</el-form-item> <el-form-item label="收款单号">{{ form.receiptNo }}</el-form-item>
<el-form-item label="剩余应收金额"> <el-form-item label="剩余应收金额">
<div> <div>
<div>{{ remainingAmount.usAmount }}美元</div> <div>{{ remainingAmount.usAmount.toFixed(6) }}美元</div>
<div>{{ remainingAmount.rmbAmount }}人民币</div> <div>{{ remainingAmount.rmbAmount.toFixed(6) }}人民币</div>
<div>{{ remainingAmount.nairaAmount }}奈拉</div> <div>{{ remainingAmount.nairaAmount.toFixed(6) }}奈拉</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="收款账户" prop="accountNo" :rules="{ required: true, trigger: ['blur', 'change'], message: '收款账户不能为空' }"> <el-form-item label="收款账户" prop="accountNo" :rules="{ required: true, trigger: ['blur', 'change'], message: '收款账户不能为空' }">
<el-select v-if="!isView" v-model="addForm.accountNo" placeholder="请选择收款账户" style="width: 220px"> <el-select v-if="!isView" v-model="addForm.accountNo" placeholder="请选择收款账户" style="width: 220px" @change="accountChange">
<el-option v-for="item in bankData" :key="item.id" :label="item.baAccountName + '(' + item.baAccountNum + ')'" :value="item.id" /> <el-option v-for="item in bankData" :key="item.id" :label="item.baAccountName + '(' + item.baAccountNum + ')'" :value="item.id" />
</el-select> </el-select>
<span v-else>{{ addForm.accountNo }}</span> <span v-else>{{ addForm.accountNo }}</span>
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
汇率(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" /> 汇率(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
</template> </template>
<el-input v-if="!isView" v-model="addForm.rate" style="width: 220px"></el-input> <el-input v-if="!isView" v-model="addForm.rate" style="width: 220px"></el-input>
<span v-else>{{ addForm.rate }}</span> <span v-else>{{ addForm.rate}}</span>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-if="showCurrencyId != addForm.currencyId" v-if="showCurrencyId != addForm.currencyId"
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
<template slot="label"> <template slot="label">
金额(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" /> 金额(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
</template> </template>
<span>{{ addForm.writeOffAmount }}</span> <span>{{ addForm.writeOffAmount?parseFloat(addForm.writeOffAmount).toFixed(6):'' }}</span>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="水单附件" label="水单附件"
...@@ -398,7 +398,7 @@ ...@@ -398,7 +398,7 @@
import { getBankAccountPage } from "@/api/ecw/bankAccount"; import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { getCustomer } from '@/api/ecw/customer' import { getCustomer } from '@/api/ecw/customer'
import { import {
getReceiptInfoByIds, getReceiptInfoByIds,
getInvoicingItem, getInvoicingItem,
receiptItemCreate, receiptItemCreate,
...@@ -543,7 +543,7 @@ export default { ...@@ -543,7 +543,7 @@ export default {
}) })
}) })
} }
this.getList() this.getList()
}, },
methods: { methods: {
...@@ -596,6 +596,10 @@ export default { ...@@ -596,6 +596,10 @@ export default {
} }
} }
}, },
accountChange(val){
var data = this.bankData.find(item=>item.id==val)
this.$set(this.addForm,'accountName',data.baAccountName)
},
RMBtoUS() { RMBtoUS() {
return NP.divide(100, this.currencyList.find(v => v.titleEn === 'USD').huilv) return NP.divide(100, this.currencyList.find(v => v.titleEn === 'USD').huilv)
}, },
...@@ -635,6 +639,7 @@ export default { ...@@ -635,6 +639,7 @@ export default {
...v, ...v,
amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'), amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'),
accountNo: +v.accountNo, accountNo: +v.accountNo,
rate:parseFloat(v.rate).toFixed(6),
attr: v.attr ? v.attr.split(',').map(t => ({ name: t.slice(t.lastIndexOf('/') + 1), url: t })) : [] attr: v.attr ? v.attr.split(',').map(t => ({ name: t.slice(t.lastIndexOf('/') + 1), url: t })) : []
})) }))
this.calculation() this.calculation()
...@@ -663,7 +668,7 @@ export default { ...@@ -663,7 +668,7 @@ export default {
}) })
} }
}) })
}, },
toEdit() { toEdit() {
return this.$router.push("creatCollection?id=" + this.id); return this.$router.push("creatCollection?id=" + this.id);
...@@ -674,6 +679,7 @@ export default { ...@@ -674,6 +679,7 @@ export default {
this.isView = true this.isView = true
setTimeout(() => { setTimeout(() => {
this.addForm = { ...row } this.addForm = { ...row }
this.setWriteOffAmount()
}, 0) }, 0)
}, },
editClick(row) { editClick(row) {
...@@ -683,6 +689,7 @@ export default { ...@@ -683,6 +689,7 @@ export default {
this.isView = false this.isView = false
setTimeout(() => { setTimeout(() => {
this.addForm = { ...row } this.addForm = { ...row }
this.setWriteOffAmount()
}, 0) }, 0)
}, },
deleteClick(row) { deleteClick(row) {
...@@ -773,7 +780,7 @@ export default { ...@@ -773,7 +780,7 @@ export default {
}); });
this.addForm.attr = arr; this.addForm.attr = arr;
}, 300) }, 300)
this.loading.close(); this.loading.close();
}, },
handleBeforeUpload() { handleBeforeUpload() {
this.loading = this.$loading({ this.loading = this.$loading({
...@@ -827,4 +834,4 @@ export default { ...@@ -827,4 +834,4 @@ export default {
width: 22%; width: 22%;
} }
} }
</style> </style>
\ No newline at end of file
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