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
1330ab72
Commit
1330ab72
authored
Sep 07, 2022
by
吴滔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单增加优惠功能
parent
a05bc4f6
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
250 additions
and
157 deletions
+250
-157
financial.js
src/api/ecw/financial.js
+21
-3
creatCollection.vue
src/views/ecw/financial/creatCollection.vue
+202
-153
receiptDetail.vue
src/views/ecw/financial/receiptDetail.vue
+27
-1
No files found.
src/api/ecw/financial.js
View file @
1330ab72
...
...
@@ -18,6 +18,15 @@ export function updateReceipt(data) {
})
}
// 获取收款单列表
export
function
getReceiptList
(
query
)
{
return
request
({
url
:
'
/ecw/receipt/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 获取应收款列表
export
function
getReceivableList
(
query
)
{
return
request
({
...
...
@@ -36,10 +45,19 @@ export function getReceivableInfoByIds(query) {
})
}
//
获取收款单列表
export
function
getReceiptList
(
query
)
{
//
修改优惠信息
export
function
updateReceivableDiscountById
(
query
)
{
return
request
({
url
:
'
/ecw/receipt/page
'
,
url
:
'
/ecw/receivable/updateReceivableDiscountById
'
,
method
:
'
post
'
,
data
:
query
})
}
// 得到应收优惠的最后操作人
export
function
getReceivableDiscountLogById
(
query
)
{
return
request
({
url
:
'
/ecw/receivable/getReceivableDiscountLogById
'
,
method
:
'
get
'
,
params
:
query
})
...
...
src/views/ecw/financial/creatCollection.vue
View file @
1330ab72
This diff is collapsed.
Click to expand it.
src/views/ecw/financial/receiptDetail.vue
View file @
1330ab72
...
...
@@ -46,6 +46,11 @@
<dict-tag
:type=
"DICT_TYPE.BOX_SHIPPING_PRICE_UNIT"
:value=
"scope.row.currencyId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"优惠金额"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
discountTotal
?
`${scope.row.discountTotal
}
(${scope.row.discountRemark
}
)`
:
0
}}
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
el
-
descriptions
:
column
=
"
2
"
border
class
=
"
card
"
>
<!--
<
el
-
descriptions
-
item
v
-
for
=
"
(v, index) in form.platformAccountIdList
"
:
label
=
"
`收款账户${index + 1
}
`
"
:
key
=
"
index
"
>
...
...
@@ -156,7 +161,12 @@
<
dict
-
tag
:
type
=
"
DICT_TYPE.BOX_SHIPPING_PRICE_UNIT
"
:
value
=
"
scope.row.currencyId
"
/>
<
/template
>
<
/el-table-column
>
<el-table-column
label=
"应收金额"
align=
"center"
prop=
"receivableAmount"
/>
<!--
<
el
-
table
-
column
label
=
"
应收金额
"
align
=
"
center
"
prop
=
"
receivableAmount
"
/>
-->
<
el
-
table
-
column
label
=
"
应收金额
"
align
=
"
center
"
prop
=
"
receivableAmount
"
>
<
template
slot
-
scope
=
"
scope
"
v
-
if
=
"
scope.row.type !== 'total'
"
>
{{
`${scope.row.receivableAmount - scope.row.discountTotal
}
(${scope.row.receivableAmount
}
- ${scope.row.discountTotal
}
)`
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
width
=
"
220
"
>
<
template
#
header
>
核销基准币种(
<
dict
-
tag
:
type
=
"
DICT_TYPE.BOX_SHIPPING_PRICE_UNIT
"
:
value
=
"
showCurrencyId
"
/>
)汇率
...
...
@@ -509,6 +519,22 @@ export default {
res
.
data
[
res
.
data
.
length
-
1
].
collectionAmount
=
[
dollar
,
rmb
,
naira
]
// this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList])
const
dollarListByList
=
this
.
list
.
filter
(
v
=>
v
.
currencyId
===
1
)
const
discountDollar
=
dollarListByList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
discountTotal
||
0
),
0
)
const
d
=
res
.
data
.
find
(
v
=>
v
.
currencyId
==
1
)
d
&&
(
d
.
discountTotal
=
discountDollar
)
const
rmbListByList
=
this
.
list
.
filter
(
v
=>
v
.
currencyId
===
2
)
const
discountRmb
=
rmbListByList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
discountTotal
||
0
),
0
)
const
r
=
res
.
data
.
find
(
v
=>
v
.
currencyId
==
2
)
r
&&
(
r
.
discountTotal
=
discountRmb
)
const
nairaListByList
=
this
.
list
.
filter
(
v
=>
v
.
currencyId
===
3
)
const
discountNaira
=
nairaListByList
.
reduce
((
total
,
currentValue
)
=>
NP
.
plus
(
total
,
currentValue
.
discountTotal
||
0
),
0
)
const
n
=
res
.
data
.
find
(
v
=>
v
.
currencyId
==
3
)
n
&&
(
n
.
discountTotal
=
discountNaira
)
this
.
$set
(
this
.
form
,
'
receiptAccountList
'
,
[...
res
.
data
])
this
.
$nextTick
(()
=>
{
// this.form.receiptAccountList.forEach((item, index) =>
{
...
...
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