Commit 40cbc823 authored by 吴滔's avatar 吴滔

详情联调/开票联调

parent 814cf115
......@@ -191,6 +191,24 @@ export function deleteReceipt(id) {
})
}
// 获得收款单开票信息
export function getReceiptInvoicing(id) {
return request({
url: '/ecw/receipt/invoicing/info/' + id,
method: 'get'
})
}
// 更新收款单开票信息
export function updateReceiptInvoicing(data) {
return request({
url: '/ecw/receipt/invoicing/info',
method: 'put',
data: data
})
}
// 更新应付款
export function updatePayable(data) {
return request({
......
......@@ -27,7 +27,6 @@ export default {
download0(data, fileName, mineType) {
// 创建 blob
let blob = new Blob([data], {type: mineType});
debugger
// 创建 href 超链接,点击进行下载
window.URL = window.URL || window.webkitURL;
let href = URL.createObjectURL(blob);
......
......@@ -149,12 +149,11 @@
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-table-column>
<el-table-column label="核销比例" align="center" prop="totalAmount">
<!-- <el-table-column label="核销比例" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}%</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
</el-table-column> -->
<!-- <el-table-column label="已收金额" align="center" prop="unitPrice">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
......
This diff is collapsed.
......@@ -72,12 +72,11 @@
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-table-column>
<el-table-column label="核销比例" align="center" prop="totalAmount">
<!-- <el-table-column label="核销比例" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}%</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
</el-table-column> -->
<!-- <el-table-column label="已收金额" align="center" prop="unitPrice">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
......@@ -277,9 +276,9 @@
<el-form-item label="收款单号">{{ form.receiptNo }}</el-form-item>
<el-form-item label="剩余应收金额">
<div>
<div>10000美元</div>
<div>10000美元</div>
<div>10000美元</div>
<div>{{ remainingAmount.usAmount }}美元</div>
<div>{{ remainingAmount.rmbAmount }}人民币</div>
<div>{{ remainingAmount.nairaAmount }}奈拉</div>
</div>
</el-form-item>
<el-form-item label="收款账户" required prop="accountNo" error="收款账户不能为空">
......@@ -324,7 +323,7 @@
v-if="showCurrencyId != addForm.currencyId"
prop="rate"
required
error="实收不能为空"
error="汇率不能为空"
>
<template slot="label">
汇率(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
......@@ -333,7 +332,6 @@
</el-form-item>
<el-form-item
v-if="showCurrencyId != addForm.currencyId"
prop="rate"
>
<template slot="label">
金额(<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="showCurrencyId" />
......@@ -424,6 +422,11 @@ export default {
nairaCount: 0,
writtenOff: 0,
WriteOffProportion: 0
},
remainingAmount: {
usAmount: 0,
rmbAmount: 0,
nairaAmount: 0
}
}
},
......@@ -449,6 +452,11 @@ export default {
else return 1
}
},
watch: {
'addForm.currencyId'(newVal) {
this.currencyIdChange(newVal)
}
},
async created() {
// 获取汇率
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
......@@ -489,12 +497,30 @@ export default {
if (this.showCurrencyId === 1) { // 美元
this.verificationData.writtenOff = usCount
this.verificationData.WriteOffProportion = NP.times(NP.divide(usCount, this.form.receivableTotalAmount), 100)
const remaining = NP.minus(this.form.receivableTotalAmount, usCount)
this.remainingAmount = {
usAmount: remaining,
rmbAmount: NP.times(this.UStoRMB(), remaining),
nairaAmount: NP.times(this.UStoNAN(), remaining)
}
} else if (this.showCurrencyId === 2) { // 人民币
this.verificationData.writtenOff = rmbCount
this.verificationData.WriteOffProportion = NP.times(NP.divide(rmbCount, this.form.receivableTotalAmount), 100)
const remaining = NP.minus(this.form.receivableTotalAmount, rmbCount)
this.remainingAmount = {
usAmount: NP.times(this.RMBtoUS(), remaining),
rmbAmount: remaining,
nairaAmount: NP.times(this.RMBtoNAN(), remaining)
}
} else if (this.showCurrencyId === 3) { // 奈拉
this.verificationData.writtenOff = nairaCount
this.verificationData.WriteOffProportion = NP.times(NP.divide(nairaCount, this.form.receivableTotalAmount), 100)
const remaining = NP.minus(this.form.receivableTotalAmount, nairaCount)
this.remainingAmount = {
usAmount: NP.times(this.NANtoUS(), remaining),
rmbAmount: NP.times(this.NANtoRMB(), remaining),
nairaAmount: remaining
}
}
},
RMBtoUS() {
......@@ -515,6 +541,19 @@ export default {
NANtoRMB() {
return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100)
},
currencyIdChange(val) {
val = Number(val)
if(val === this.showCurrencyId) {
this.addForm.rate = 1
} else {
if (this.showCurrencyId === 1 && val === 2) this.addForm.rate = this.RMBtoUS()
else if (this.showCurrencyId === 1 && val === 3) this.addForm.rate = this.NANtoUS()
else if (this.showCurrencyId === 2 && val === 1) this.addForm.rate = this.UStoRMB()
else if (this.showCurrencyId === 2 && val === 3) this.addForm.rate = this.NANtoRMB()
else if (this.showCurrencyId === 3 && val === 1) this.addForm.rate = this.UStoNAN()
else if (this.showCurrencyId === 3 && val === 2) this.addForm.rate = this.RMBtoNAN()
}
},
getList() {
getReceivableItem({ id: this.id }).then(res => {
this.detailed = res.data.map(v => ({
......
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