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
287dce52
Commit
287dce52
authored
Jul 12, 2023
by
我在何方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建收款单优化
parent
06ec585a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
26 deletions
+23
-26
creatCollection.vue
src/views/ecw/financial/creatCollection.vue
+23
-26
No files found.
src/views/ecw/financial/creatCollection.vue
View file @
287dce52
...
...
@@ -972,7 +972,9 @@ export default {
collectionAmount
:
[]
}
]
}
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
res
.
data
])
console
.
log
(
res
.
data
)
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
res
.
data
)
this
.
$nextTick
(()
=>
{
// const dollarList = this.list.filter(v => v.currencyId === 1)
// const discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
...
...
@@ -989,11 +991,14 @@ export default {
// const n = this.form.receiptAccountList.find(v => v.currencyId == 3)
// n && (n.discountTotal = discountNaira)
this
.
form
.
receiptAccountList
.
forEach
((
item
,
index
)
=>
{
this
.
rateChange
(
item
,
index
)
//
this.form.receiptAccountList.forEach((item, index) =>
{
//
this.rateChange(item, index)
}
);
this
.
calculation
()
//
}
);
if
(
this
.
form
.
receiptAccountList
.
length
>
0
){
this
.
editReceiptAccountList
()
}
// this.calculation()
}
)
}
)
}
,
...
...
@@ -1052,34 +1057,26 @@ export default {
this
.
form
.
receiptAccountList
[
this
.
form
.
receiptAccountList
.
length
-
1
].
writeOffAmount
=
writeOffAmountTotal
}
,
rateChange
(
row
,
index
)
{
console
.
log
(
row
)
row
.
receivableAmount
&&
(
row
.
collectionAmount
=
Math
.
round
(
NP
.
times
(
row
.
collectionRate
||
0
,
NP
.
minus
(
row
.
receivableAmount
,
row
.
discountTotal
||
0
))))
this
.
form
.
receiptAccountList
[
index
]
=
{...
row
}
setTimeout
(()
=>
{
// 收款总计
var
amountList
=
[]
this
.
currencyList
.
forEach
((
item
,
index
)
=>
{
var
dollarList
=
this
.
form
.
receiptAccountList
.
filter
(
v
=>
v
.
collectionCurrencyId
==
item
.
id
)
if
(
dollarList
.
length
>
0
){
var
dollar
=
Math
.
round
(
dollarList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
collectionAmount
),
0
))
amountList
.
push
({
currencyId
:
item
.
id
,
currencyNameEn
:
item
.
titleEn
,
currencyNameZh
:
item
.
titleZh
,
amount
:
dollar
}
)
}
}
)
// const dollarList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 1)
// const dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
// const rmbList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 3)
// const rmb = rmbList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
// const nairaList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 2)
// const naira = nairaList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
// const faList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 6)
// const fa = faList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
this
.
form
.
receiptAccountList
[
this
.
form
.
receiptAccountList
.
length
-
1
].
collectionAmount
=
amountList
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
this
.
form
.
receiptAccountList
])
this
.
editReceiptAccountList
()
}
,
100
)
}
,
editReceiptAccountList
(){
var
amountList
=
[]
this
.
currencyList
.
forEach
((
item
,
index
)
=>
{
var
dollarList
=
this
.
form
.
receiptAccountList
.
filter
(
v
=>
v
.
collectionCurrencyId
==
item
.
id
)
if
(
dollarList
.
length
>
0
){
var
dollar
=
Math
.
round
(
dollarList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
collectionAmount
),
0
))
amountList
.
push
({
currencyId
:
item
.
id
,
currencyNameEn
:
item
.
titleEn
,
currencyNameZh
:
item
.
titleZh
,
amount
:
dollar
}
)
}
}
)
this
.
form
.
receiptAccountList
[
this
.
form
.
receiptAccountList
.
length
-
1
].
collectionAmount
=
amountList
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
this
.
form
.
receiptAccountList
])
}
,
//明细改变税率
changeTaxRate
(
row
,
index
){
var
pointArr
=
[]
...
...
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