Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
40cbc823
Commit
40cbc823
authored
Aug 30, 2022
by
吴滔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
详情联调/开票联调
parent
814cf115
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
245 additions
and
176 deletions
+245
-176
financial.js
src/api/ecw/financial.js
+18
-0
download.js
src/plugins/download.js
+0
-1
creatCollection.vue
src/views/ecw/financial/creatCollection.vue
+2
-3
openInvoice.vue
src/views/ecw/financial/openInvoice.vue
+178
-164
receiptDetail.vue
src/views/ecw/financial/receiptDetail.vue
+47
-8
No files found.
src/api/ecw/financial.js
View file @
40cbc823
...
@@ -191,6 +191,24 @@ export function deleteReceipt(id) {
...
@@ -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
)
{
export
function
updatePayable
(
data
)
{
return
request
({
return
request
({
...
...
src/plugins/download.js
View file @
40cbc823
...
@@ -27,7 +27,6 @@ export default {
...
@@ -27,7 +27,6 @@ export default {
download0
(
data
,
fileName
,
mineType
)
{
download0
(
data
,
fileName
,
mineType
)
{
// 创建 blob
// 创建 blob
let
blob
=
new
Blob
([
data
],
{
type
:
mineType
});
let
blob
=
new
Blob
([
data
],
{
type
:
mineType
});
debugger
// 创建 href 超链接,点击进行下载
// 创建 href 超链接,点击进行下载
window
.
URL
=
window
.
URL
||
window
.
webkitURL
;
window
.
URL
=
window
.
URL
||
window
.
webkitURL
;
let
href
=
URL
.
createObjectURL
(
blob
);
let
href
=
URL
.
createObjectURL
(
blob
);
...
...
src/views/ecw/financial/creatCollection.vue
View file @
40cbc823
...
@@ -149,12 +149,11 @@
...
@@ -149,12 +149,11 @@
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"核销比例"
align=
"center"
prop=
"totalAmount"
>
<
!-- <
el-table-column label="核销比例" align="center" prop="totalAmount">
<template slot-scope="scope">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}%</span>
<span>{{ scope.row.totalAmount }}%</span>
<!--
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
-->
</template>
</template>
</el-table-column>
</el-table-column>
-->
<!-- <el-table-column label="已收金额" align="center" prop="unitPrice">
<!-- <el-table-column label="已收金额" align="center" prop="unitPrice">
<template slot-scope="scope">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
<span>{{ scope.row.unitPrice }}</span>
...
...
src/views/ecw/financial/openInvoice.vue
View file @
40cbc823
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<div
slot=
"header"
class=
"card-title"
>
开票
</div>
<div
slot=
"header"
class=
"card-title"
>
开票
</div>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<el-card
class=
"card"
>
<el-form
<el-form
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"100px"
class=
"card"
>
:model=
"invoiceData"
<el-form-item
label=
"发票号码:"
>
ref=
"queryForm"
{{
invoiceData
.
sn
}}
size=
"small"
</el-form-item>
:inline=
"true"
<el-form-item
label=
"开票类型:"
>
label-width=
"120px"
<dict-selector
:type=
"DICT_TYPE.ECW_INVOICING_TYPE"
v-model=
"invoiceData.invoicingTypeId"
/>
class=
"card"
</el-form-item>
>
</el-form>
<el-card
class=
"card"
>
</el-card>
<el-form-item
label=
"发票号码:"
prop=
"invoiceNumber"
:rules=
"
{ required: true, trigger: ['blur'], message: '发票号码不能为空' }">
<el-card
class=
"card"
>
<el-input
v-model=
"invoiceData.invoiceNumber"
></el-input>
</el-form-item>
<el-form-item
label=
"开票类型:"
prop=
"invoicingTypeId"
:rules=
"
{ required: true, trigger: ['blur', 'change'], message: '开票类型不能为空' }">
<dict-selector
:type=
"DICT_TYPE.ECW_INVOICING_TYPE"
v-model=
"invoiceData.invoicingTypeId"
/>
</el-form-item>
</el-card>
<el-card
class=
"card"
>
<div
slot=
"header"
class=
"card-title"
>
开票资料
</div>
<div
slot=
"header"
class=
"card-title"
>
开票资料
</div>
<el-table
v-loading=
"loading"
:data=
"invoiceData.info"
border
class=
"card"
>
<el-descriptions
title=
""
direction=
"vertical"
:column=
"6"
border
>
<el-table-column
label=
"发票抬头"
align=
"center"
prop=
"taxpayer"
/>
<el-descriptions-item
label=
"发票抬头"
>
{{
invoiceData
.
invoice
}}
</el-descriptions-item>
<el-table-column
label=
"纳税人识别号"
align=
"center"
prop=
"taxpayer"
/>
<el-descriptions-item
label=
"纳税人识别号"
>
{{
invoiceData
.
taxpayer
}}
</el-descriptions-item>
<el-table-column
label=
"地址"
align=
"center"
prop=
"orderNo"
/>
<el-descriptions-item
label=
"地址"
>
{{
invoiceData
.
addressPhone
}}
</el-descriptions-item>
<el-table-column
label=
"开户行"
align=
"center"
prop=
"customerName"
/>
<el-descriptions-item
label=
"开户行"
>
{{
invoiceData
.
accountBank
}}
</el-descriptions-item>
<el-table-column
label=
"税率"
align=
"center"
>
<el-descriptions-item
label=
"税率"
>
<template
slot-scope=
"scope"
>
<el-form-item
label=
""
>
<el-input
v-model=
"scope.row.taxRate"
type=
"number"
min=
"0"
></el-input>
<el-input
v-model=
"invoiceData.taxRate"
></el-input>
</
template
>
</el-form-item>
</el-table-column>
</el-descriptions-item>
<el-table-column
label=
"项目"
align=
"center"
>
<el-descriptions-item
label=
"项目"
>
<
template
slot-scope=
"scope"
>
<el-form-item
label=
""
>
<el-input
v-model=
"scope.row.projectName"
type=
"text"
></el-input>
<el-input
v-model=
"invoiceData.projectName"
></el-input>
</
template
>
</el-form-item>
</el-table-column>
</el-descriptions-item>
</el-table>
</el-descriptions>
</el-card>
</el-card>
<el-card
class=
"card"
>
<el-card
class=
"card"
>
<el-table
v-loading=
"loading"
:data=
"invoiceData.list"
border
class=
"card"
show-summary
:summary-method=
"getSummaries"
>
<el-table
<el-table-column
label=
"订单号"
align=
"center"
prop=
"orderSn"
/>
v-loading=
"loading"
<el-table-column
label=
"品名"
align=
"center"
prop=
"prodName"
/>
:data=
"list"
<el-table-column
label=
"箱数"
align=
"center"
prop=
"num"
/>
border
<el-table-column
label=
"体积/重量"
align=
"center"
>
class=
"card"
show-summary
:summary-method=
"getSummaries"
>
<el-table-column
label=
"订单号"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
label=
"品名"
align=
"center"
prop=
"titleZh"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
volume
+
"
m³/
"
+
scope
.
row
.
weight
+
"
kg
"
}}
</span>
{{
scope
.
row
.
titleZh
||
scope
.
row
.
titleEn
?
scope
.
row
.
titleZh
+
"
(
"
+
scope
.
row
.
titleEn
+
"
)
"
:
''
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"费用类型"
align=
"center"
prop=
"feeType"
>
<el-table-column
label=
"箱数"
align=
"center"
prop=
"num"
/>
<
template
slot-scope=
"scope"
>
<el-table-column
label=
"体积/重量"
align=
"center"
prop=
"weight"
></el-table-column>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"scope.row.feeType"
></dict-tag>
<el-table-column
label=
"费用类型"
align=
"center"
prop=
"feeType"
>
</
template
>
<
template
slot-scope=
"scope"
>
</el-table-column>
<dict-tag
<el-table-column
label=
"单价"
align=
"center"
prop=
"num"
/>
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
<el-table-column
label=
"金额"
align=
"center"
prop=
"num"
/>
:value=
"scope.row.feeType"
<el-table-column
label=
"税额"
align=
"center"
prop=
"num"
/>
></dict-tag>
<el-table-column
label=
"价税合计"
align=
"center"
prop=
"num"
/>
</
template
>
<div
slot=
"append"
class=
"lastRow"
>
</el-table-column>
<div>
收款人
</div>
<el-table-column
label=
"单价"
align=
"center"
prop=
"unitPrice"
/>
<div>
111
</div>
<el-table-column
label=
"总金额"
align=
"center"
prop=
"totalAmount"
/>
<div>
核销人
</div>
<el-table-column
label=
"税额"
align=
"center"
>
<div>
222
</div>
<
template
slot-scope=
"scope"
>
<div>
开票人
</div>
无
<div>
333
</div>
</
template
>
<div></div>
</el-table-column>
<div>
价税合计大写
</div>
<el-table-column
label=
"价税合计"
align=
"center"
>
<div>
444
</div>
<
template
slot-scope=
"scope"
>
</div>
无
</el-table>
</
template
>
</el-card>
</el-table-column>
<el-descriptions
class=
"card"
style=
"width: 50%;"
>
</el-table>
<el-descriptions-item
label=
"备注"
>
</el-card>
<el-input
v-model=
"invoiceData.remarks"
type=
"text"
placeholder=
""
clearable
></el-input>
<el-descriptions
class=
"card"
style=
"width: 50%"
>
</el-descriptions-item>
<el-descriptions-item
label=
"备注"
>
</el-descriptions>
<el-input
<div
slot=
"footer"
class=
"card"
>
v-model=
"invoiceData.invoicingRemark"
<el-button
type=
"primary"
@
click=
"submitForm"
>
确定
</el-button>
type=
"text"
</div>
placeholder=
""
clearable
></el-input>
</el-descriptions-item>
</el-descriptions>
</el-form>
<div
slot=
"footer"
class=
"card"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确定
</el-button>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
getReceiptInvoicing
,
getInvoicingItem
,
updateReceiptInvoicing
}
from
"
@/api/ecw/financial
"
;
import
{
DICT_TYPE
}
from
'
@/utils/dict
'
export
default
{
name
:
"
OpenInvoice
"
,
export
default
{
components
:
{},
name
:
"
OpenInvoice
"
,
data
()
{
components
:
{
return
{
},
loading
:
false
,
data
()
{
invoiceData
:
{},
return
{
id
:
0
,
loading
:
false
,
list
:
[]
invoiceData
:{},
};
}
},
},
created
()
{
created
()
{
if
(
this
.
$route
.
query
.
id
)
{
let
that
=
this
this
.
id
=
this
.
$route
.
query
.
id
;
this
.
getData
();
},
}
methods
:
{
},
/** 查询列表 */
methods
:
{
getList
()
{
getData
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
// 处理查询参数
getReceiptInvoicing
(
this
.
id
).
then
((
res
)
=>
{
this
.
invoiceData
=
res
.
data
;
getReceiptPage
().
then
(
response
=>
{
this
.
invoiceData
.
invoicingTypeId
=
this
.
invoiceData
.
invoicingTypeId
||
''
this
.
invoiceData
=
response
.
data
;
// if (!this.invoiceData.info || this.invoiceData.info.length == 0) {
if
(
!
this
.
invoiceData
.
info
||
this
.
invoiceData
.
info
.
length
==
0
){
// this.$modal.msgError("客户开票资料不能为空,请完善客户开票信息");
this
.
$modal
.
msgError
(
"
客户开票资料不能为空,请完善客户开票信息
"
);
// }
}
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
getInvoicingItem
({
id
:
this
.
id
}).
then
(
res
=>
{
},
const
t
=
{
submitForm
(){
orderNo
:
'
合计
'
,
this
.
open
=
false
;
totalAmount
:
res
.
data
.
reduce
((
total
,
curr
)
=>
total
+
curr
.
totalAmount
,
0
)
},
}
getSummaries
(
param
)
{
this
.
list
=
[...
res
.
data
,
t
]
const
{
columns
,
data
}
=
param
;
})
const
sums
=
[];
},
columns
.
forEach
((
column
,
index
)
=>
{
submitForm
()
{
if
(
index
===
0
)
{
this
.
$refs
.
queryForm
.
validate
(
valid
=>
{
sums
[
index
]
=
'
总价
'
;
if
(
valid
)
{
return
;
updateReceiptInvoicing
(
this
.
invoiceData
).
then
(
res
=>
{
}
else
if
(
index
<
6
){
this
.
open
=
false
;
sums
[
index
]
=
'
N/A
'
;
this
.
$modal
.
msgSuccess
(
"
操作成功
"
);
return
;
this
.
$router
.
back
();
}
})
const
values
=
data
.
map
(
item
=>
Number
(
item
[
column
.
property
]));
}
if
(
!
values
.
every
(
value
=>
isNaN
(
value
)))
{
})
sums
[
index
]
=
values
.
reduce
((
prev
,
curr
)
=>
{
},
const
value
=
Number
(
curr
);
getSummaries
(
param
)
{
if
(
!
isNaN
(
value
))
{
return
[
'
收款人
'
,
this
.
invoiceData
.
payeeName
,
'
核销人
'
,
this
.
invoiceData
.
writeOffName
,
'
开票人
'
,
this
.
invoiceData
.
issuerName
,
''
,
'
价税合计大写
'
,
444
];
return
prev
+
curr
;
},
}
else
{
},
return
prev
;
};
}
</
script
>
},
0
);
sums
[
index
]
+=
'
元
'
;
}
else
{
sums
[
index
]
=
'
N/A
'
;
}
});
return
sums
;
}
},
}
</
script
>
<
style
>
.card
{
margin-top
:
20px
;
}
.dialog-footer
{
padding
:
30px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
space-between
;
height
:
160px
;
}
.card-title
{
font-size
:
18px
;
font-weight
:
bold
;
}
.lastRow
{
border-top
:
1px
solid
#dfe6ec
;
display
:
flex
;
width
:
100%
;
height
:
44px
;
text-align
:
center
;
align-items
:
center
;
}
.lastRow
div
{
flex
:
1
;
height
:
44px
;
line-height
:
44px
;
border-right
:
1px
solid
#dfe6ec
;
}
</
style
>
<
style
scoped
lang=
"scss"
>
.card
{
margin-top
:
20px
;
}
.dialog-footer
{
padding
:
30px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
space-between
;
height
:
160px
;
}
.card-title
{
font-size
:
18px
;
font-weight
:
bold
;
}
.lastRow
{
border-top
:
1px
solid
#dfe6ec
;
display
:
flex
;
width
:
100%
;
height
:
44px
;
text-align
:
center
;
align-items
:
center
;
}
.lastRow
div
{
flex
:
1
;
height
:
44px
;
line-height
:
44px
;
border-right
:
1px
solid
#dfe6ec
;
}
::v-deep
.el-form-item--small.el-form-item
{
margin-bottom
:
0
;
}
</
style
>
src/views/ecw/financial/receiptDetail.vue
View file @
40cbc823
...
@@ -72,12 +72,11 @@
...
@@ -72,12 +72,11 @@
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"核销比例"
align=
"center"
prop=
"totalAmount"
>
<
!-- <
el-table-column label="核销比例" align="center" prop="totalAmount">
<template slot-scope="scope">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}%</span>
<span>{{ scope.row.totalAmount }}%</span>
<!--
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
-->
</template>
</template>
</el-table-column>
</el-table-column>
-->
<!-- <el-table-column label="已收金额" align="center" prop="unitPrice">
<!-- <el-table-column label="已收金额" align="center" prop="unitPrice">
<template slot-scope="scope">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
<span>{{ scope.row.unitPrice }}</span>
...
@@ -277,9 +276,9 @@
...
@@ -277,9 +276,9 @@
<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>
10000
美元
</div>
<div>
{{ remainingAmount.usAmount }}
美元
</div>
<div>
10000美元
</div>
<div>
{{ remainingAmount.rmbAmount }}人民币
</div>
<div>
10000美元
</div>
<div>
{{ remainingAmount.nairaAmount }}奈拉
</div>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"收款账户"
required
prop=
"accountNo"
error=
"收款账户不能为空"
>
<el-form-item
label=
"收款账户"
required
prop=
"accountNo"
error=
"收款账户不能为空"
>
...
@@ -324,7 +323,7 @@
...
@@ -324,7 +323,7 @@
v-if=
"showCurrencyId != addForm.currencyId"
v-if=
"showCurrencyId != addForm.currencyId"
prop=
"rate"
prop=
"rate"
required
required
error=
"
实收
不能为空"
error=
"
汇率
不能为空"
>
>
<
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"
/>
)
...
@@ -333,7 +332,6 @@
...
@@ -333,7 +332,6 @@
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
v-if=
"showCurrencyId != addForm.currencyId"
v-if=
"showCurrencyId != addForm.currencyId"
prop=
"rate"
>
>
<
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"
/>
)
...
@@ -424,6 +422,11 @@ export default {
...
@@ -424,6 +422,11 @@ export default {
nairaCount
:
0
,
nairaCount
:
0
,
writtenOff
:
0
,
writtenOff
:
0
,
WriteOffProportion
:
0
WriteOffProportion
:
0
},
remainingAmount
:
{
usAmount
:
0
,
rmbAmount
:
0
,
nairaAmount
:
0
}
}
}
}
},
},
...
@@ -449,6 +452,11 @@ export default {
...
@@ -449,6 +452,11 @@ export default {
else
return
1
else
return
1
}
}
},
},
watch
:
{
'
addForm.currencyId
'
(
newVal
)
{
this
.
currencyIdChange
(
newVal
)
}
},
async
created
()
{
async
created
()
{
// 获取汇率
// 获取汇率
await
getCurrencyPage
(
this
.
params
).
then
(
res
=>
this
.
currencyList
=
res
.
data
.
list
)
await
getCurrencyPage
(
this
.
params
).
then
(
res
=>
this
.
currencyList
=
res
.
data
.
list
)
...
@@ -489,12 +497,30 @@ export default {
...
@@ -489,12 +497,30 @@ export default {
if
(
this
.
showCurrencyId
===
1
)
{
// 美元
if
(
this
.
showCurrencyId
===
1
)
{
// 美元
this
.
verificationData
.
writtenOff
=
usCount
this
.
verificationData
.
writtenOff
=
usCount
this
.
verificationData
.
WriteOffProportion
=
NP
.
times
(
NP
.
divide
(
usCount
,
this
.
form
.
receivableTotalAmount
),
100
)
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
)
{
// 人民币
}
else
if
(
this
.
showCurrencyId
===
2
)
{
// 人民币
this
.
verificationData
.
writtenOff
=
rmbCount
this
.
verificationData
.
writtenOff
=
rmbCount
this
.
verificationData
.
WriteOffProportion
=
NP
.
times
(
NP
.
divide
(
rmbCount
,
this
.
form
.
receivableTotalAmount
),
100
)
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
)
{
// 奈拉
}
else
if
(
this
.
showCurrencyId
===
3
)
{
// 奈拉
this
.
verificationData
.
writtenOff
=
nairaCount
this
.
verificationData
.
writtenOff
=
nairaCount
this
.
verificationData
.
WriteOffProportion
=
NP
.
times
(
NP
.
divide
(
nairaCount
,
this
.
form
.
receivableTotalAmount
),
100
)
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
()
{
RMBtoUS
()
{
...
@@ -515,6 +541,19 @@ export default {
...
@@ -515,6 +541,19 @@ export default {
NANtoRMB
()
{
NANtoRMB
()
{
return
NP
.
divide
(
this
.
currencyList
.
find
(
v
=>
v
.
titleEn
===
'
NGN
'
).
huilv
,
100
)
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
()
{
getList
()
{
getReceivableItem
({
id
:
this
.
id
}).
then
(
res
=>
{
getReceivableItem
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
detailed
=
res
.
data
.
map
(
v
=>
({
this
.
detailed
=
res
.
data
.
map
(
v
=>
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment