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
7d05fec7
Commit
7d05fec7
authored
Aug 28, 2023
by
houjn@hikoon.cn
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release' of
http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator
parents
348394df
0007ce83
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
96 deletions
+68
-96
detail.vue
src/views/ecw/offer/detail.vue
+46
-59
edit.vue
src/views/ecw/offer/edit.vue
+22
-37
No files found.
src/views/ecw/offer/detail.vue
View file @
7d05fec7
...
@@ -183,7 +183,7 @@
...
@@ -183,7 +183,7 @@
<el-descriptions
:column=
"5"
border
>
<el-descriptions
:column=
"5"
border
>
<el-descriptions-item
:label=
"$t('保价费')"
>
<el-descriptions-item
:label=
"$t('保价费')"
>
{{list.estCostVO?list.estCostVO.insuranceFee: 0}} {{
$t('美元')
}}
{{list.estCostVO?list.estCostVO.insuranceFee: 0}} {{
selectedRouter ? currentcyMap[selectedRouter.currencyUnit || 1] : ''
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('总运费')"
>
<el-descriptions-item
:label=
"$t('总运费')"
>
<
template
v-if=
"freightFeeList.length>0"
v-for=
"item in freightFeeList"
>
<
template
v-if=
"freightFeeList.length>0"
v-for=
"item in freightFeeList"
>
...
@@ -431,6 +431,11 @@
...
@@ -431,6 +431,11 @@
return
this
.
$l
(
row
,
'
prodTitle
'
)
return
this
.
$l
(
row
,
'
prodTitle
'
)
}
}
},
},
selectedRouter
(){
// otherService 1 送货上门,2非控货订单代收货款
if
(
!
this
.
list
.
lineId
)
return
null
return
this
.
routerList
.
find
(
item
=>
item
.
id
==
this
.
list
.
lineId
)
},
currentcyMap
(){
currentcyMap
(){
let
map
=
{}
let
map
=
{}
this
.
currencyList
.
forEach
(
item
=>
{
this
.
currencyList
.
forEach
(
item
=>
{
...
@@ -491,32 +496,32 @@
...
@@ -491,32 +496,32 @@
originalFeeList
(){
originalFeeList
(){
let
arr
=
[]
let
arr
=
[]
this
.
clearanceFeeList
.
forEach
(
item
=>
{
this
.
clearanceFeeList
.
forEach
(
item
=>
{
let
it
=
{...
item
}
let
it
=
{
src
:
this
.
$t
(
'
清关费
'
),
currencyId
:
item
.
currencyId
,
amount
:
Decimal
(
item
.
amount
)
}
let
freight
=
this
.
freightFeeList
.
find
(
fee
=>
fee
.
currencyId
==
item
.
currencyId
)
let
freight
=
this
.
freightFeeList
.
find
(
fee
=>
fee
.
currencyId
==
item
.
currencyId
)
if
(
freight
){
if
(
freight
){
it
.
amount
+=
freight
.
amount
it
.
amount
=
it
.
amount
.
plus
(
freight
.
amount
)
}
}
arr
.
push
(
it
)
arr
.
push
(
it
)
})
})
// 判断是否有运费单位不在清关费里的
this
.
freightFeeList
.
forEach
(
item
=>
{
this
.
freightFeeList
.
forEach
(
item
=>
{
if
(
!
arr
.
find
(
items
=>
items
.
currencyId
==
item
.
currencyId
)){
if
(
!
arr
.
find
(
arrItem
=>
arrItem
.
currencyId
==
item
.
currencyId
)){
let
its
=
{...
item
}
arr
.
push
({
// let freights = this.clearanceFeeList.find(fee => fee.currencyId == item.currencyId)
src
:
this
.
$t
(
'
未计算的运费
'
),
// if(freights){
currencyId
:
item
.
currencyId
,
// its.amount += freights.amount
amount
:
Decimal
(
item
.
amount
)
// }
})
arr
.
push
(
its
)
}
}
})
})
return
arr
return
arr
},
},
// 预计费用(原价 - 优惠金额)
// 预计费用(原价 - 优惠金额)
estimatedCosts
(){
estimatedCosts
(){
let
arr
=
[]
let
arr
=
[]
let
withInsuranceFee
=
false
let
withOtherFee
=
false
this
.
originalFeeList
.
forEach
(
item
=>
{
this
.
originalFeeList
.
forEach
(
item
=>
{
let
it
=
{
let
it
=
{
currencyId
:
item
.
currencyId
,
currencyId
:
item
.
currencyId
,
...
@@ -526,56 +531,38 @@
...
@@ -526,56 +531,38 @@
if
(
coupon
){
if
(
coupon
){
it
.
amount
=
it
.
amount
.
minus
(
coupon
.
reduceAmount
)
it
.
amount
=
it
.
amount
.
minus
(
coupon
.
reduceAmount
)
}
}
// if(this.list.otherFee && this.list.otherFeeCurrencyId == item.currencyId){
// it.amount = it.amount.plus(this.list.otherFee)
// withOtherFee = true
// }
let
otherFee
=
this
.
otherFeeList
.
find
(
fee
=>
fee
.
currencyId
==
item
.
currencyId
)
if
(
otherFee
){
it
.
amount
=
it
.
amount
.
plus
(
otherFee
.
amount
||
0
)
withOtherFee
=
true
}
// 保价费(美元)
if
(
item
.
currencyId
==
1
&&
this
.
fee
&&
this
.
fee
.
insuranceFee
){
it
.
amount
=
it
.
amount
.
plus
(
this
.
fee
.
insuranceFee
)
withInsuranceFee
=
true
}
arr
.
push
(
it
)
arr
.
push
(
it
)
})
})
// 累加保价费
// 如果没有累加其他费用,则另外增加货币
const
insuranceFeeIndex
=
arr
.
findIndex
(
item
=>
item
.
currencyId
==
this
.
insuranceFeeCurrency
)
if
(
!
withOtherFee
&&
this
.
list
.
otherFee
){
const
insuranceFee
=
this
.
list
&&
this
.
list
.
estCostVO
&&
this
.
list
.
estCostVO
.
insuranceFee
let
fee
=
{
if
(
insuranceFeeIndex
>
-
1
){
currencyId
:
this
.
list
.
otherFeeCurrencyId
,
arr
[
insuranceFeeIndex
].
amount
=
arr
[
insuranceFeeIndex
].
amount
.
plus
(
insuranceFee
||
0
)
amount
:
Decimal
(
this
.
list
.
otherFee
)
}
else
{
arr
.
push
({
currencyId
:
this
.
insuranceFeeCurrency
,
amount
:
Decimal
(
insuranceFee
||
0
)
})
}
}
// 如果保价费跟其他费用是同一种货币(都是美元)
// 累加其他费用
if
(
!
withInsuranceFee
&&
this
.
fee
&&
this
.
fee
.
insuranceFee
&&
this
.
list
.
otherFeeCurrencyId
==
1
){
const
otherFeeIndex
=
arr
.
findIndex
(
item
=>
item
.
currencyId
==
this
.
list
.
otherFeeCurrencyId
)
fee
.
amount
=
fee
.
amount
.
plus
(
this
.
fee
.
insuranceFee
)
if
(
otherFeeIndex
>
-
1
){
}
arr
[
otherFeeIndex
].
amount
=
arr
[
otherFeeIndex
].
amount
.
plus
(
this
.
list
.
otherFee
||
0
)
arr
.
push
(
fee
)
}
else
{
}
if
(
this
.
list
.
otherFee
>
0
){
// 没有累加保价费(没有美元计价)但是有保价费则需要加上去
if
(
!
withInsuranceFee
&&
this
.
fee
&&
this
.
fee
.
insuranceFee
){
arr
.
push
({
arr
.
push
({
currencyId
:
1
,
currencyId
:
this
.
list
.
otherFeeCurrencyId
,
amount
:
Decimal
(
this
.
fee
.
insuranceFee
)
amount
:
Decimal
(
this
.
list
.
otherFee
||
0
)
})
})
}
}
this
.
otherFeeList
.
forEach
(
item
=>
{
if
(
!
arr
.
find
(
items
=>
items
.
currencyId
==
item
.
currencyId
)){
let
its
=
{...
item
}
// let freights = this.clearanceFeeList.find(fee => fee.currencyId == item.currencyId)
// if(freights){
// its.amount += freights.amount
// }
arr
.
push
(
its
)
}
}
})
return
arr
return
arr
}
},
// 保价费单位(路线里设置,默认美元)
insuranceFeeCurrency
()
{
return
this
.
selectedRouter
?.
currencyUnit
||
1
;
},
},
},
created
()
{
created
()
{
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
...
...
src/views/ecw/offer/edit.vue
View file @
7d05fec7
...
@@ -310,7 +310,7 @@
...
@@ -310,7 +310,7 @@
<el-descriptions
:column=
"5"
border
>
<el-descriptions
:column=
"5"
border
>
<el-descriptions-item
:label=
"$t('保价费')"
>
<el-descriptions-item
:label=
"$t('保价费')"
>
{{fee.insuranceFee || 0}} {{
$t('美元')
}}
{{fee.insuranceFee || 0}} {{
selectedRouter ? currencyMap[selectedRouter.currencyUnit || 1] : ''
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('总运费')"
>
<el-descriptions-item
:label=
"$t('总运费')"
>
<
template
v-for=
"item in freightFeeList"
>
<
template
v-for=
"item in freightFeeList"
>
...
@@ -730,8 +730,6 @@ export default {
...
@@ -730,8 +730,6 @@ export default {
// 预计费用(原价 - 优惠金额 + 其他费用 + 保价费)
// 预计费用(原价 - 优惠金额 + 其他费用 + 保价费)
estimatedCosts
(){
estimatedCosts
(){
let
arr
=
[]
let
arr
=
[]
let
withInsuranceFee
=
false
let
withOtherFee
=
false
this
.
originalFeeList
.
forEach
(
item
=>
{
this
.
originalFeeList
.
forEach
(
item
=>
{
let
it
=
{
let
it
=
{
currencyId
:
item
.
currencyId
,
currencyId
:
item
.
currencyId
,
...
@@ -741,50 +739,33 @@ export default {
...
@@ -741,50 +739,33 @@ export default {
if
(
coupon
){
if
(
coupon
){
it
.
amount
=
it
.
amount
.
minus
(
coupon
.
reduceTotalAmount
)
it
.
amount
=
it
.
amount
.
minus
(
coupon
.
reduceTotalAmount
)
}
}
if
(
this
.
form
.
otherFee
&&
this
.
form
.
otherFeeCurrencyId
==
item
.
currencyId
){
it
.
amount
=
it
.
amount
.
plus
(
this
.
form
.
otherFee
)
withOtherFee
=
true
}
// 保价费(美元)
if
(
item
.
currencyId
==
1
&&
this
.
fee
&&
this
.
fee
.
insuranceFee
){
it
.
amount
=
it
.
amount
.
plus
(
this
.
fee
.
insuranceFee
)
withInsuranceFee
=
true
}
arr
.
push
(
it
)
arr
.
push
(
it
)
})
})
// 没有累加保价费(没有美元计价)但是有保价费则需要加上去
// 累加保价费
if
(
!
withInsuranceFee
&&
this
.
fee
&&
this
.
fee
.
insuranceFee
){
const
insuranceFeeIndex
=
arr
.
findIndex
(
item
=>
item
.
currencyId
==
this
.
insuranceFeeCurrency
)
let
fee
=
Decimal
(
this
.
fee
.
insuranceFee
)
if
(
insuranceFeeIndex
>
-
1
){
// 如果没有美元费用,且保价费和其他费用币种相同(都是美元)
arr
[
insuranceFeeIndex
].
amount
=
arr
[
insuranceFeeIndex
].
amount
.
plus
(
this
.
fee
.
insuranceFee
||
0
)
if
(
this
.
form
.
otherFeeCurrencyId
==
1
&&
this
.
form
.
otherFee
){
}
else
{
withOtherFee
=
true
fee
=
fee
.
plus
(
new
Decimal
(
this
.
form
.
otherFee
||
0
))
}
arr
.
push
({
arr
.
push
({
currencyId
:
1
,
currencyId
:
this
.
insuranceFeeCurrency
,
amount
:
fee
amount
:
Decimal
(
this
.
fee
.
insuranceFee
||
0
)
})
})
}
}
// 如果没有累加其他费用,则另外增加货币
// 累加其他费用
if
(
!
withOtherFee
&&
this
.
form
.
otherFee
){
const
otherFeeIndex
=
arr
.
findIndex
(
item
=>
item
.
currencyId
==
this
.
form
.
otherFeeCurrencyId
)
let
fee
=
{
if
(
otherFeeIndex
>
-
1
){
arr
[
otherFeeIndex
].
amount
=
arr
[
otherFeeIndex
].
amount
.
plus
(
this
.
form
.
otherFee
||
0
)
}
else
{
if
(
this
.
form
.
otherFee
>
0
){
arr
.
push
({
currencyId
:
this
.
form
.
otherFeeCurrencyId
,
currencyId
:
this
.
form
.
otherFeeCurrencyId
,
amount
:
Decimal
(
this
.
form
.
otherFee
)
amount
:
Decimal
(
this
.
form
.
otherFee
||
0
)
}
})
// 如果保价费跟其他费用是同一种货币(都是美元)
if
(
!
withInsuranceFee
&&
this
.
fee
&&
this
.
fee
.
insuranceFee
&&
this
.
form
.
otherFeeCurrencyId
==
1
){
fee
.
amount
=
fee
.
amount
.
plus
(
this
.
fee
.
insuranceFee
)
}
}
arr
.
push
(
fee
)
}
}
return
arr
return
arr
},
},
// 路线开通的服务
// 路线开通的服务
...
@@ -792,6 +773,10 @@ export default {
...
@@ -792,6 +773,10 @@ export default {
if
(
!
this
.
selectedRouter
||
!
this
.
selectedRouter
.
otherService
)
return
[]
if
(
!
this
.
selectedRouter
||
!
this
.
selectedRouter
.
otherService
)
return
[]
return
this
.
selectedRouter
.
otherService
.
split
(
'
,
'
)
return
this
.
selectedRouter
.
otherService
.
split
(
'
,
'
)
},
},
// 保价费单位(路线里设置,默认美元)
insuranceFeeCurrency
()
{
return
this
.
selectedRouter
?.
currencyUnit
||
1
;
},
// 是否可以添加商品
// 是否可以添加商品
canAddProduct
(){
canAddProduct
(){
if
(
!
this
.
form
.
lineId
){
if
(
!
this
.
form
.
lineId
){
...
...
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