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
98880691
Commit
98880691
authored
Aug 26, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建报价单支持路线设置的保费币种
parent
c1f871c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
37 deletions
+20
-37
edit.vue
src/views/ecw/offer/edit.vue
+20
-37
No files found.
src/views/ecw/offer/edit.vue
View file @
98880691
...
...
@@ -310,7 +310,7 @@
<el-descriptions
:column=
"5"
border
>
<el-descriptions-item
:label=
"$t('保价费')"
>
{{fee.insuranceFee || 0}} {{
$t('美元')
}}
{{fee.insuranceFee || 0}} {{
selectedRouter ? currencyMap[selectedRouter.currencyUnit || 1] : ''
}}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('总运费')"
>
<
template
v-for=
"item in freightFeeList"
>
...
...
@@ -730,8 +730,6 @@ export default {
// 预计费用(原价 - 优惠金额 + 其他费用 + 保价费)
estimatedCosts
(){
let
arr
=
[]
let
withInsuranceFee
=
false
let
withOtherFee
=
false
this
.
originalFeeList
.
forEach
(
item
=>
{
let
it
=
{
currencyId
:
item
.
currencyId
,
...
...
@@ -741,50 +739,31 @@ export default {
if
(
coupon
){
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
)
})
// 没有累加保价费(没有美元计价)但是有保价费则需要加上去
if
(
!
withInsuranceFee
&&
this
.
fee
&&
this
.
fee
.
insuranceFee
){
let
fee
=
Decimal
(
this
.
fee
.
insuranceFee
)
// 如果没有美元费用,且保价费和其他费用币种相同(都是美元)
if
(
this
.
form
.
otherFeeCurrencyId
==
1
&&
this
.
form
.
otherFee
){
withOtherFee
=
true
fee
=
fee
.
plus
(
new
Decimal
(
this
.
form
.
otherFee
||
0
))
}
// 累加保价费
const
insuranceFeeIndex
=
arr
.
findIndex
(
item
=>
item
.
currencyId
==
this
.
insuranceFeeCurrency
)
if
(
insuranceFeeIndex
>
-
1
){
arr
[
insuranceFeeIndex
].
amount
=
arr
[
insuranceFeeIndex
].
amount
.
plus
(
this
.
fee
.
insuranceFee
||
0
)
}
else
{
arr
.
push
({
currencyId
:
1
,
amount
:
fee
currencyId
:
this
.
insuranceFeeCurrency
,
amount
:
Decimal
(
this
.
fee
.
insuranceFee
||
0
)
})
}
// 如果没有累加其他费用,则另外增加货币
if
(
!
withOtherFee
&&
this
.
form
.
otherFee
){
let
fee
=
{
// 累加其他费用
const
otherFeeIndex
=
arr
.
findIndex
(
item
=>
item
.
currencyId
==
this
.
form
.
otherFeeCurrencyId
)
if
(
otherFeeIndex
>
-
1
){
arr
[
otherFeeIndex
].
amount
=
arr
[
otherFeeIndex
].
amount
.
plus
(
this
.
form
.
otherFee
||
0
)
}
else
{
arr
.
push
({
currencyId
:
this
.
form
.
otherFeeCurrencyId
,
amount
:
Decimal
(
this
.
form
.
otherFee
)
}
// 如果保价费跟其他费用是同一种货币(都是美元)
if
(
!
withInsuranceFee
&&
this
.
fee
&&
this
.
fee
.
insuranceFee
&&
this
.
form
.
otherFeeCurrencyId
==
1
){
fee
.
amount
=
fee
.
amount
.
plus
(
this
.
fee
.
insuranceFee
)
}
arr
.
push
(
fee
)
amount
:
Decimal
(
this
.
form
.
otherFee
||
0
)
})
}
return
arr
},
// 路线开通的服务
...
...
@@ -792,6 +771,10 @@ export default {
if
(
!
this
.
selectedRouter
||
!
this
.
selectedRouter
.
otherService
)
return
[]
return
this
.
selectedRouter
.
otherService
.
split
(
'
,
'
)
},
// 保价费单位(路线里设置,默认美元)
insuranceFeeCurrency
()
{
return
this
.
selectedRouter
?.
currencyUnit
||
1
;
},
// 是否可以添加商品
canAddProduct
(){
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