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
9ec367df
Commit
9ec367df
authored
Jul 06, 2023
by
我在何方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款单海运2.2
parent
da68387c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
23 deletions
+33
-23
creatCollection.vue
src/views/ecw/financial/creatCollection.vue
+30
-21
receiptDetail.vue
src/views/ecw/financial/receiptDetail.vue
+3
-2
No files found.
src/views/ecw/financial/creatCollection.vue
View file @
9ec367df
...
...
@@ -102,6 +102,7 @@
</el-col>
<el-table
v-loading=
"loadings"
:data=
"list"
border
:key=
"isUpdate"
>
<el-table-column
:label=
"$t('订单号')"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
:label=
"$t('自编号')"
align=
"center"
prop=
"selfNo"
/>
<el-table-column
:label=
"$t('唛头')"
align=
"center"
prop=
"marks"
/>
<el-table-column
:label=
"$t('品名')"
align=
"center"
prop=
"title"
>
<template
slot-scope=
"scope"
>
...
...
@@ -763,7 +764,7 @@ export default {
codePage
:
{
pageNo
:
1
,
pageSize
:
100
}
,
pages
:
1
}
;
...
...
@@ -780,6 +781,11 @@ export default {
}
else
{
this
.
removeData
()
}
getUserProfile
().
then
(
res
=>
{
this
.
discountForm
.
author
=
res
.
data
.
username
this
.
form
.
departmentId
=
res
.
data
.
deptId
this
.
form
.
salesmanId
=
res
.
data
.
id
}
)
}
,
directives
:
{
'
el-select-loadmore
'
:
{
...
...
@@ -798,8 +804,10 @@ export default {
}
}
,
async
created
()
{
getUserProfile
().
then
(
res
=>
{
await
getUserProfile
().
then
(
res
=>
{
this
.
discountForm
.
author
=
res
.
data
.
username
this
.
form
.
departmentId
=
res
.
data
.
deptId
this
.
form
.
salesmanId
=
res
.
data
.
id
}
)
// 获取汇率
await
getCurrencyPage
(
this
.
params
).
then
(
res
=>
this
.
currencyList
=
res
.
data
.
list
)
...
...
@@ -842,20 +850,21 @@ export default {
getTradeCityList
().
then
((
res
)
=>
(
that
.
tradeCityList
=
res
.
data
));
this
.
getCodeList
()
listSimpleDepts
().
then
((
res
)
=>
{
res
.
data
.
forEach
((
item
)
=>
{
if
(
item
.
parentId
==
0
)
{
that
.
deptArr
.
push
(
item
);
}
else
{
that
.
deptData
.
push
(
item
);
}
}
);
that
.
deptData
=
res
.
data
// res.data.forEach((item) =>
{
// if (item.parentId == 0)
{
// that.deptArr.push(item);
//
}
else
{
// that.deptData.push(item);
//
}
//
}
);
that
.
deptData
.
forEach
((
value
)
=>
{
var
dept
=
that
.
deptArr
.
filter
((
itt
)
=>
itt
.
id
==
value
.
parentId
);
if
(
dept
.
length
>
0
)
{
value
.
name
=
dept
[
0
].
name
+
"
|
"
+
value
.
name
;
}
}
);
//
that.deptData.forEach((value) =>
{
// var dept = res.data
.filter((itt) => itt.id == value.parentId);
//
if (dept.length > 0)
{
//
value.name = dept[0].name + " | " + value.name;
//
}
//
}
);
}
);
}
,
computed
:
{
...
...
@@ -1004,14 +1013,14 @@ export default {
this
.
rateChange
(
row
,
index
)
}
,
writeOffRateChange
(
row
,
index
)
{
row
.
writeOffAmount
=
NP
.
times
(
row
.
writeOffRate
||
0
,
NP
.
minus
(
row
.
receivableAmount
,
row
.
discountTotal
)).
toFixed
(
2
)
row
.
writeOffAmount
=
Math
.
round
(
NP
.
times
(
row
.
writeOffRate
||
0
,
NP
.
minus
(
row
.
receivableAmount
,
row
.
discountTotal
))
)
const
writeOffAmountTotal
=
this
.
form
.
receiptAccountList
.
filter
(
v
=>
v
.
type
!==
'
total
'
).
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
writeOffAmount
||
0
),
0
)
this
.
form
.
receiptAccountList
[
this
.
form
.
receiptAccountList
.
length
-
1
].
writeOffAmount
=
writeOffAmountTotal
}
,
rateChange
(
row
,
index
)
{
console
.
log
(
row
)
row
.
receivableAmount
&&
(
row
.
collectionAmount
=
NP
.
times
(
row
.
collectionRate
||
0
,
NP
.
minus
(
row
.
receivableAmount
,
row
.
discountTotal
||
0
)).
toFixed
(
2
))
row
.
receivableAmount
&&
(
row
.
collectionAmount
=
Math
.
round
(
NP
.
times
(
row
.
collectionRate
||
0
,
NP
.
minus
(
row
.
receivableAmount
,
row
.
discountTotal
||
0
))
))
this
.
form
.
receiptAccountList
[
index
]
=
{...
row
}
setTimeout
(()
=>
{
...
...
@@ -1020,7 +1029,7 @@ export default {
this
.
currencyList
.
forEach
((
item
,
index
)
=>
{
var
dollarList
=
this
.
form
.
receiptAccountList
.
filter
(
v
=>
v
.
collectionCurrencyId
==
item
.
id
)
if
(
dollarList
.
length
>
0
){
var
dollar
=
dollarList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
collectionAmount
),
0
).
toFixed
(
2
)
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
}
)
}
}
)
...
...
@@ -1084,7 +1093,7 @@ export default {
{
discountTotal
:
discountDollar
,
currencyId
:
item
.
id
,
receivableAmount
:
dollar
,
receivableAmount
:
Math
.
round
(
dollar
)
,
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
,
...
...
@@ -1159,7 +1168,7 @@ export default {
const
totalt
=
this
.
form
.
receiptAccountList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
writeOffAmount
||
0
),
0
)
this
.
form
.
receiptAccountList
=
[...
this
.
form
.
receiptAccountList
,
{
type
:
'
total
'
,
writeOffAmount
:
totalt
.
toFixed
(
2
),
writeOffAmount
:
Math
.
round
(
totalt
),
collectionAmount
:
[
this
.
form
.
receiptAccountList
.
discountNaira
,
0
,
0
]
}
]
...
...
@@ -1203,7 +1212,7 @@ export default {
const
index
=
this
.
form
.
receiptAccountList
.
findIndex
(
v
=>
v
.
currencyId
==
type
)
const
t
=
this
.
form
.
receiptAccountList
[
index
]
if
(
t
)
{
t
.
writeOffAmount
=
NP
.
times
(
t
.
writeOffRate
||
0
,
usCount
).
toFixed
(
2
)
t
.
writeOffAmount
=
Math
.
round
(
NP
.
times
(
t
.
writeOffRate
||
0
,
usCount
)
)
this
.
rateChange
(
t
,
index
)
}
}
,
...
...
src/views/ecw/financial/receiptDetail.vue
View file @
9ec367df
...
...
@@ -18,6 +18,7 @@
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
应收明细
'
)
}}
</div>
<el-table
:data=
"list"
border
>
<el-table-column
:label=
"$t('订单号')"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
:label=
"$t('自编号')"
align=
"center"
prop=
"selfNo"
/>
<el-table-column
:label=
"$t('唛头')"
align=
"center"
prop=
"marks"
/>
<el-table-column
:label=
"$t('品名')"
align=
"center"
prop=
"title"
>
<template
slot-scope=
"scope"
>
...
...
@@ -311,6 +312,7 @@
<
/el-descriptions-item
>
<
/el-descriptions
>
<
/el-card
>
<!--
<
div
style
=
"
margin: 20px 0;font-size:16px
"
>
备注:收款单已全部核销,总金额差值小于
5
$
,
允许全部核销,核销比例应为
100
%<
/div> --
>
<
div
slot
=
"
footer
"
style
=
"
margin: 20px 0
"
>
<
el
-
button
v
-
if
=
"
form.state!=7&&form.state!=9&&form.state!=10&&form.state!=11&&form.state != 4&&form.state != 5 && form.state != 6
"
type
=
"
primary
"
@
click
=
"
toEdit
"
v
-
hasPermi
=
"
['ecw:payment:detail:edit']
"
>
{{
$t
(
'
编辑
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
form.state!=7&&form.state!=9&&form.state!=10&&form.state!=11&&form.state != 4&&form.state != 5 && form.state != 6
"
type
=
"
primary
"
@
click
=
"
verificationAll
"
v
-
hasPermi
=
"
['ecw:payment:detail:allWriteOff']
"
>
{{
$t
(
'
全部核销
'
)
}}
<
/el-button
>
...
...
@@ -494,7 +496,6 @@
<
el
-
form
-
item
:
label
=
"
$t('水单号')
"
prop
=
"
billNo
"
:
rules
=
"
{ required: true, trigger: ['blur', 'change'], message: $t('水单号不能为空')
}
"
>
<
el
-
input
v
-
if
=
"
!isView
"
v
-
model
=
"
addForm.billNo
"
style
=
"
width: 220px
"
><
/el-input
>
<
span
v
-
else
>
{{
addForm
.
billNo
}}
<
/span
>
...
...
@@ -679,7 +680,7 @@ export default {
}
// total = NP.plus(total, item.writeOffAmount)
}
)
let
portion
=
NP
.
divide
(
total
,
amountTotal
)
console
.
log
(
portion
);
if
(
!
portion
)
return
0
...
...
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