Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
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
罗超
SuperMan
Commits
c7ae06fd
Commit
c7ae06fd
authored
Jul 18, 2025
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报价单变更
parent
e9e2182f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1416 additions
and
85 deletions
+1416
-85
CostNewPriceAudit.vue
...ts/TravelManager/TravelNewQuotation/CostNewPriceAudit.vue
+601
-85
changeOfferExchangeRate.vue
src/components/commonPage/changeOfferExchangeRate.vue
+387
-0
changeOfferOtherCost.vue
src/components/commonPage/changeOfferOtherCost.vue
+428
-0
No files found.
src/components/TravelManager/TravelNewQuotation/CostNewPriceAudit.vue
View file @
c7ae06fd
...
...
@@ -153,8 +153,19 @@
</tr>
<tr>
<td
class=
"CP_ComTitle2 CostcomCenter"
>
{{$t('hotel.hotel_CurrentRate')}}
</td>
<td
v-for=
'(item,index) in CostCurrencyList'
:key=
"index+20000"
>
<td
v-for=
'(item,index) in CostCurrencyList'
:key=
"index+20000"
style=
" white-space: nowrap;"
>
{{item.ExchangeRate}}
<
template
v-if=
"item.OtherChangeModel!=null"
>
<font
style=
"color:red;"
>
<template
v-if=
"item.OtherChangeModel.HotelChangeValue>0"
>
+
{{
item
.
OtherChangeModel
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
item
.
OtherChangeModel
.
HotelChangeValue
}}
</
template
>
</font></template>
<!-- </br><a v-if="IsEdit==3" style="color:blue;cursor:pointer"
@click="showOfferChange(3,item,index)">{{$t('objFill.dayofferchange')}}</a> -->
</td>
<td
:colspan=
"13-2-CostCurrencyList.length+1"
>
</td>
...
...
@@ -163,6 +174,18 @@
<td
class=
"CP_ComTitle2 CostcomCenter"
>
{{$t('admin.admin_personNumber')}}
</td>
<td
v-for=
"(item,index) in CostNumberList"
:key=
"index+30000"
>
{{item.PeopleNumber}}
<
template
v-if=
"item.OtherChangeModel!=null"
>
<font
style=
"color:red;"
>
<template
v-if=
"item.OtherChangeModel.HotelChangeValue>0"
>
+
{{
item
.
OtherChangeModel
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
item
.
OtherChangeModel
.
HotelChangeValue
}}
</
template
>
</font></template>
<!-- <br/>
<a v-if="IsEdit==3" style="color:blue;cursor:pointer"
@click="showOfferChange(3,item,index)">{{$t('objFill.dayofferchange')}}</a> -->
</td>
<td
:colspan=
"13-2-CostNumberList.length+1"
>
</td>
...
...
@@ -204,7 +227,7 @@
{{
GetDayStr
(
subItem
.
DayNum
-
1
)
}}
<br
/>
<a
v-if=
"IsEdit==3"
style=
"color:blue;cursor:pointer"
@
click=
"showOfferChange(1,subItem)"
>
{{
$t
(
'objFill.dayofferchange'
)
}}
</a>
@
click=
"showOfferChange(1,subItem
,subIndex
)"
>
{{
$t
(
'objFill.dayofferchange'
)
}}
</a>
</td>
<td
align=
"center"
>
{{
getCurrencyName
(
subItem
.
CurrencyId
)
}}
...
...
@@ -409,6 +432,7 @@
<
template
v-else
>
{{
getDayChangeXiaoJi
(
1
,
1
)
}}
</
template
>
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(1,1))+Number(getDayChangeXiaoJi(1,1))}}
</font>
</template>
...
...
@@ -481,147 +505,360 @@
<!--酒店小计-->
<td
colspan=
"2"
>
{{$t('objFill.jiudianxj')}}: {{getDayXiaoJi(1,2)}}
<
template
v-if=
"getDayChangeXiaoJi(1,2)!=0"
>
<
template
v-if=
"getDayChangeXiaoJi(1,2)!=0
||getRateChangeXiaoJi(1)!=0
"
>
<font
style=
"color:red;"
>
<template
v-if=
"getDayChangeXiaoJi(1,2)>0"
>
+
{{
getDayChangeXiaoJi
(
1
,
2
)
}}
<template
v-if=
"getDayChangeXiaoJi(1,2)!=0"
>
<template
v-if=
"getDayChangeXiaoJi(1,2)>0"
>
+
{{
getDayChangeXiaoJi
(
1
,
2
)
}}
</
template
>
<
template
v-else
>
{{
getDayChangeXiaoJi
(
1
,
2
)
}}
</
template
>
</template>
<
template
v-if=
"getRateChangeXiaoJi(1)!=0"
>
<template
v-if=
"getRateChangeXiaoJi(1)>0"
>
+
{{
getRateChangeXiaoJi
(
1
)
}}
</
template
>
<
template
v-else
>
{{
get
DayChangeXiaoJi
(
1
,
2
)
}}
{{
get
RateChangeXiaoJi
(
1
)
}}
</
template
>
</template>
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(1,2))+Number(getDayChangeXiaoJi(1,2))}}
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(1,2))+Number(getDayChangeXiaoJi(1,2))
+Number(getRateChangeXiaoJi(1))
}}
</font>
</template>
</td>
<!--车资小计-->
<td
colspan=
"2"
>
{{$t('objFill.chezhixj')}}:{{getDayXiaoJi(2,2)}}
<
template
v-if=
"getDayChangeXiaoJi(2,2)!=0"
>
<
template
v-if=
"getDayChangeXiaoJi(2,2)!=0
||getRateChangeXiaoJi(2)!=0
"
>
<font
style=
"color:red;"
>
<template
v-if=
"getDayChangeXiaoJi(2,2)>0"
>
+
{{
getDayChangeXiaoJi
(
2
,
2
)
}}
<template
v-if=
"getDayChangeXiaoJi(2,2)!=0"
>
<template
v-if=
"getDayChangeXiaoJi(2,2)>0"
>
+
{{
getDayChangeXiaoJi
(
2
,
2
)
}}
</
template
>
<
template
v-else
>
{{
getDayChangeXiaoJi
(
2
,
2
)
}}
</
template
>
</template>
<
template
v-else
>
{{
getDayChangeXiaoJi
(
2
,
2
)
}}
<
template
v-if=
"getRateChangeXiaoJi(2)!=0"
>
<template
v-if=
"getRateChangeXiaoJi(2)>0"
>
+
{{
getRateChangeXiaoJi
(
2
)
}}
</
template
>
<
template
v-else
>
{{
getRateChangeXiaoJi
(
2
)
}}
</
template
>
</template>
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(2,2))+Number(getDayChangeXiaoJi(2,2))}}
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(2,2))+Number(getDayChangeXiaoJi(2,2))
+Number(getRateChangeXiaoJi(2))
}}
</font>
</template>
</td>
<!--餐小计-->
<td
colspan=
"2"
>
{{$t('objFill.canxj')}}: {{getDayXiaoJi(4,2)}}
<
template
v-if=
"getDayChangeXiaoJi(4,2)!=0"
>
<
template
v-if=
"getDayChangeXiaoJi(4,2)!=0
||getRateChangeXiaoJi(4)!=0
"
>
<font
style=
"color:red;"
>
<template
v-if=
"getDayChangeXiaoJi(4,2)>0"
>
+
{{
getDayChangeXiaoJi
(
4
,
2
)
}}
<template
v-if=
"getDayChangeXiaoJi(4,2)!=0"
>
<template
v-if=
"getDayChangeXiaoJi(4,2)>0"
>
+
{{
getDayChangeXiaoJi
(
4
,
2
)
}}
</
template
>
<
template
v-else
>
{{
getDayChangeXiaoJi
(
4
,
2
)
}}
</
template
>
</template>
<
template
v-else
>
{{
getDayChangeXiaoJi
(
4
,
2
)
}}
<
template
v-if=
"getRateChangeXiaoJi(4)!=0"
>
<template
v-if=
"getRateChangeXiaoJi(4)>0"
>
+
{{
getRateChangeXiaoJi
(
4
)
}}
</
template
>
<
template
v-else
>
{{
getRateChangeXiaoJi
(
4
)
}}
</
template
>
</template>
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(4,2))+Number(getDayChangeXiaoJi(4,2))}}
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(4,2))+Number(getDayChangeXiaoJi(4,2))
+Number(getRateChangeXiaoJi(4))
}}
</font>
</template>
</td>
<!--门票小计-->
<td
colspan=
"2"
>
{{$t('objFill.menpiaoxj')}}: {{getDayXiaoJi(3,2)}}
<
template
v-if=
"getDayChangeXiaoJi(3,2)!=0"
>
<
template
v-if=
"getDayChangeXiaoJi(3,2)!=0
||getRateChangeXiaoJi(3)!=0
"
>
<font
style=
"color:red;"
>
<template
v-if=
"getDayChangeXiaoJi(3,2)>0"
>
+
{{
getDayChangeXiaoJi
(
3
,
2
)
}}
</
template
>
<
template
v-else
>
{{
getDayChangeXiaoJi
(
3
,
2
)
}}
</
template
>
<template
v-if=
"getDayChangeXiaoJi(3,2)!=0"
>
<template
v-if=
"getDayChangeXiaoJi(3,2)>0"
>
+
{{
getDayChangeXiaoJi
(
3
,
2
)
}}
</
template
>
<
template
v-else
>
{{
getDayChangeXiaoJi
(
3
,
2
)
}}
</
template
>
</template>
<
template
v-if=
"getRateChangeXiaoJi(3)!=0"
>
<template
v-if=
"getRateChangeXiaoJi(3)>0"
>
+
{{
getRateChangeXiaoJi
(
3
)
}}
</
template
>
<
template
v-else
>
{{
getRateChangeXiaoJi
(
3
)
}}
</
template
>
</template>
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(3,2))+Number(getDayChangeXiaoJi(3,2))}}
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(3,2))+Number(getDayChangeXiaoJi(3,2))
+Number(getRateChangeXiaoJi(3))
}}
</font>
</template>
</td>
<!--其它费用小计-->
<td
colspan=
"2"
>
{{$t('objFill.zazhixj')}}: {{getDayXiaoJi(9,2)}}
<
template
v-if=
"
getDayChangeXiaoJi(9,2
)!=0"
>
<
template
v-if=
"
(getDayChangeXiaoJi(9,2)!=0||getRateChangeXiaoJi(9)
)!=0"
>
<font
style=
"color:red;"
>
<template
v-if=
"getDayChangeXiaoJi(9,2)>0"
>
+
{{
getDayChangeXiaoJi
(
9
,
2
)
}}
</
template
>
<
template
v-else
>
{{
getDayChangeXiaoJi
(
9
,
2
)
}}
</
template
>
<template
v-if=
"getDayChangeXiaoJi(9,2)!=0"
>
<template
v-if=
"getDayChangeXiaoJi(9,2)>0"
>
+
{{
getDayChangeXiaoJi
(
9
,
2
)
}}
</
template
>
<
template
v-else
>
{{
getDayChangeXiaoJi
(
9
,
2
)
}}
</
template
>
</template>
<
template
v-if=
"getRateChangeXiaoJi(9)!=0"
>
<template
v-if=
"getRateChangeXiaoJi(9)>0"
>
+
{{
getRateChangeXiaoJi
(
9
)
}}
</
template
>
<
template
v-else
>
{{
getRateChangeXiaoJi
(
9
)
}}
</
template
>
</template>
</font>
=
<font
style=
"color:red;"
>
{{Number(getDayXiaoJi(9,2))+Number(getDayChangeXiaoJi(9,2))}}
</font>
=
<font
style=
"color:red;"
>
{{Number(getDayXiaoJi(9,2))+Number(getDayChangeXiaoJi(9,2))
+Number(getRateChangeXiaoJi(9))
}}
</font>
</template>
</td>
</tr>
<tr>
<td
colspan=
"13"
>
{{$t('objFill.qitacbrmb')}}
</td>
<td
colspan=
"13"
>
{{$t('objFill.qitacbrmb')}}
<!-- <a v-if="IsEdit==3" style="color:blue;cursor:pointer"
@click="showOfferChange(4,teamPrice,0)">{{$t('objFill.dayofferchange')}}</a> -->
</td>
</tr>
<tr>
<td
colspan=
"2"
>
<el-form-item
:label=
"$t('active.cl_jipiao')"
>
{{OtherPrice.AirTicketMoeny}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===3"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
<td>
<el-form-item
:label=
"$t('objFill.zhongduanjp')"
>
{{OtherPrice.InlandAirTicketMoney}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===4"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
<td
colspan=
"2"
>
<el-form-item
:label=
"$t('objFill.v101.dmc.meildhvpmr')"
>
{{OtherPrice.InlandTrainTicketMoney}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===5"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
<td
colspan=
"2"
>
<el-form-item
:label=
"$t('salesModule.Union')"
>
{{teamPrice.UnionPrice}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===6"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
<td
colspan=
"2"
>
<el-form-item
:label=
"$t('objFill.qitafeiyong')"
>
{{OtherPrice.OtherShareMoney}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===7"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
<td
colspan=
"2"
>
<el-form-item
:label=
"$t('objFill.qitafeiyongsm')"
>
{{OtherPrice.OtherRemark}}
</el-form-item>
</td>
<td
colspan=
"2"
rowspan=
"2"
>
{{$t('objFill.xiaojijpzdsjly')}}:
<br
/>
{{getCostTotalMoney()}}
<br
/>
{{getCostTotalMoney()}}
<font
style=
"color:red;"
>
<
template
v-if=
"getChangeCostTotalMoney()!=0"
>
{{
getChangeCostTotalMoney
()
}}
</
template
>
</font>
</td>
</tr>
<tr>
<td
colspan=
"2"
>
<el-form-item
:label=
"$t('objFill.shuijin')"
>
{{teamPrice.TaxPrice}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===8"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
<td>
<el-form-item
:label=
"$t('objFill.guoye')"
>
{{teamPrice.NightPrice}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===9"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
<td
colspan=
"2"
>
<el-form-item
:label=
"$t('objFill.lingduidyft')"
>
{{OtherPrice.AirTicketShareMoney}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===10"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
<td
colspan=
"2"
>
<el-form-item
:label=
"$t('active.cl_qianzheng')"
>
{{teamPrice.VisaPrice}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===11"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
<td
colspan=
"2"
>
<el-form-item
:label=
"$t('Operation.Op_insurance')"
>
{{OtherPrice.SafeMoney}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===12"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
<td
colspan=
"2"
>
<el-form-item
:label=
"`KB`+$t('objFill.rentoufei')"
>
{{OtherPrice.KBMoney}}
<font
style=
"color:red;"
>
<
template
v-if=
"OtherChangeList!=null&&OtherChangeList.length>0"
>
<template
v-for=
"(oItem,oIndex) in OtherChangeList"
>
<template
v-if=
"oItem.ChangeType===13"
>
<template
v-if=
"oItem.HotelChangeValue>0"
>
+
{{
oItem
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
oItem
.
HotelChangeValue
}}
</
template
>
</template>
</template>
</template>
</font>
</el-form-item>
</td>
</tr>
...
...
@@ -768,7 +1005,14 @@
{{
$t
(
'fnc.a_heji'
)
}}
</td>
<td>
{{
subItem
.
PeopleNumber
}}
{{
subItem
.
PeopleNumber
}}
<template
v-if=
"subItem.OtherChangeModel!=null"
>
<font
style=
"color:red;"
>
<template
v-if=
"subItem.OtherChangeModel.HotelChangeValue>0"
>
+
{{
subItem
.
OtherChangeModel
.
HotelChangeValue
}}
</
template
>
<
template
v-else
>
{{
subItem
.
OtherChangeModel
.
HotelChangeValue
}}
</
template
>
</font></template>
</td>
<td>
{{getDayXiaoJi(1,1)}}
...
...
@@ -834,66 +1078,106 @@
</td>
<td
style=
"white-space:nowrap;"
>
{{getLocalJpyTotalMoney(subItem.PeopleNumber)}}
<
template
v-if=
"
getLocalJpyChangeTotalMoney(subItem.PeopleNumber
)!=0"
>
<
template
v-if=
"
(getLocalJpyChangeTotalMoney(subItem.PeopleNumber)!=0||getPeopleNumJpyChangeTotalMoney(subItem)
)!=0"
>
<font
style=
"color:red;"
>
<template
v-if=
"getLocalJpyChangeTotalMoney(subItem.PeopleNumber)>0"
>
+
{{
getLocalJpyChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
<template
v-if=
"getLocalJpyChangeTotalMoney(subItem.PeopleNumber)!=0"
>
<template
v-if=
"getLocalJpyChangeTotalMoney(subItem.PeopleNumber)>0"
>
+
{{
getLocalJpyChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
<
template
v-else
>
{{
getLocalJpyChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
</template>
<
template
v-else
>
{{
getLocalJpyChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
<
template
v-if=
"getPeopleNumJpyChangeTotalMoney(subItem)!=0"
>
<template
v-if=
"getPeopleNumJpyChangeTotalMoney(subItem)>0"
>
+
{{
getPeopleNumJpyChangeTotalMoney
(
subItem
)
}}
</
template
>
<
template
v-else
>
{{
getPeopleNumJpyChangeTotalMoney
(
subItem
)
}}
</
template
>
</template>
</font>
=
<font
style=
"color:red"
>
{{(Number(getLocalJpyTotalMoney(subItem.PeopleNumber))+Number(getLocalJpyChangeTotalMoney(subItem.PeopleNumber))).toFixed(2)}}
{{(Number(getLocalJpyTotalMoney(subItem.PeopleNumber))+Number(getLocalJpyChangeTotalMoney(subItem.PeopleNumber))
+Number(getPeopleNumJpyChangeTotalMoney(subItem))
).toFixed(2)}}
</font>
</template>
</td>
<td
colspan=
"2"
>
<
template
v-if=
"teamPrice&&teamPrice.SingleDMCPrice&&teamPrice.SingleDMCPrice>0"
>
{{
teamPrice
.
SingleDMCPrice
}}
<template
v-if=
"
getLocalChangeTotalMoney(subItem.PeopleNumber
)!=0"
>
<template
v-if=
"
(getLocalChangeTotalMoney(subItem.PeopleNumber)!=0||getPeopleNumberChangeTotalMoney(subItem)
)!=0"
>
<font
style=
"color:red;"
>
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)>0"
>
+
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
<
template
v-else
>
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)!=0"
>
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)>0"
>
+
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
<
template
v-else
>
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
</template>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
<
template
v-else
>
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</template>
</font>
=
<font
style=
"color:red"
>
{{Number(teamPrice.SingleDMCPrice)+Number(getLocalChangeTotalMoney(subItem.PeopleNumber))}}
{{Number(teamPrice.SingleDMCPrice)+Number(get
PeopleNumberChangeTotalMoney(subItem))+Number(get
LocalChangeTotalMoney(subItem.PeopleNumber))}}
</font>
</template>
</template>
<
template
v-else-if=
"postConfig.LineId==14||postConfig.LineId==118"
>
{{
getLocalTotalMoney
(
subItem
.
PeopleNumber
)
}}
<template
v-if=
"
getLocalChangeTotalMoney(subItem.PeopleNumber
)!=0"
>
<template
v-if=
"
(getLocalChangeTotalMoney(subItem.PeopleNumber)+getPeopleNumberChangeTotalMoney(subItem)
)!=0"
>
<font
style=
"color:red;"
>
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)>0"
>
+
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
<
template
v-else
>
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)!=0"
>
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)>0"
>
+
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
<
template
v-else
>
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
</template>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
<
template
v-else
>
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</template>
</font>
=
<font
style=
"color:red"
>
{{Number(getLocalTotalMoney(subItem.PeopleNumber))+Number(getLocalChangeTotalMoney(subItem.PeopleNumber))}}
{{Number(getLocalTotalMoney(subItem.PeopleNumber))+Number(getLocalChangeTotalMoney(subItem.PeopleNumber))
+Number(getPeopleNumberChangeTotalMoney(subItem))
}}
</font>
</template>
</template>
<
template
v-else-if=
"postConfig.LineId==168"
>
{{
getLocalTotalMoney
(
subItem
.
PeopleNumber
)
}}
<template
v-if=
"
getLocalChangeTotalMoney(subItem.PeopleNumber
)!=0"
>
<template
v-if=
"
(getLocalChangeTotalMoney(subItem.PeopleNumber)+getPeopleNumberChangeTotalMoney(subItem)
)!=0"
>
<font
style=
"color:red;"
>
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)>0"
>
+
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
<
template
v-else
>
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)!=0"
>
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)>0"
>
+
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
<
template
v-else
>
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
</template>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
<
template
v-else
>
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</template>
</font>
=
<font
style=
"color:red"
>
{{Number(getLocalTotalMoney(subItem.PeopleNumber))+Number(getLocalChangeTotalMoney(subItem.PeopleNumber))}}
{{Number(getLocalTotalMoney(subItem.PeopleNumber))+Number(getLocalChangeTotalMoney(subItem.PeopleNumber))
+Number(getPeopleNumberChangeTotalMoney(subItem))
}}
</font>
</template>
</template>
...
...
@@ -903,17 +1187,35 @@
</td>
<td
colspan=
"2"
>
{{subItem.TotalMoney}}
<
template
v-if=
"
getLocalChangeTotalMoney(subItem.PeopleNumber
)!=0"
>
<
template
v-if=
"
(getLocalChangeTotalMoney(subItem.PeopleNumber))!=0||getPeopleNumberChangeTotalMoney(subItem)!=0||getChangeCostTotalMoney(
)!=0"
>
<font
style=
"color:red;"
>
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)>0"
>
+
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)!=0"
>
<template
v-if=
"getLocalChangeTotalMoney(subItem.PeopleNumber)>0"
>
+
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
<
template
v-else
>
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
</template>
<
template
v-else
>
{{
getLocalChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
<
template
v-else
>
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</template>
<
template
v-if=
"getChangeCostTotalMoney()!=0"
>
<template
v-if=
"getChangeCostTotalMoney()>0"
>
+
{{
getChangeCostTotalMoney
()
}}
</
template
>
<
template
v-else
>
{{
getChangeCostTotalMoney
()
}}
</
template
>
</template>
</font>
=
<font
style=
"color:red"
>
{{
Number(subItem.TotalMoney)+Number(getLocalChangeTotalMoney(subItem.PeopleNumber)
)}}
{{
(Number(subItem.TotalMoney)+Number(getLocalChangeTotalMoney(subItem.PeopleNumber))+Number(getPeopleNumberChangeTotalMoney(subItem))+Number(getChangeCostTotalMoney())).toFixed(2
)}}
</font>
</template>
</td>
...
...
@@ -926,7 +1228,7 @@
<
template
v-if=
"postConfig.OutBranchId==1245"
>
<template
v-if=
"subItem.SaleList&&subItem.SaleList.length>0"
>
<template
v-for=
"(tItem,tIndex) in subItem.SaleList"
>
<br
/>
<font
:key=
"`s_`+subIndex+`t_`+tIndex"
style=
"color:blue;"
>
{{
tItem
.
ItemName
}}
:
{{
tItem
.
ItemPrice
}}
</font>
<br/>
<font
:key=
"`s_`+subIndex+`t_`+tIndex"
style=
"color:blue;"
>
{{
tItem
.
ItemName
}}
:
{{
tItem
.
ItemPrice
}}
</font>
</
template
>
</template>
</template>
...
...
@@ -1050,6 +1352,35 @@
</p>
</template>
</template>
<
template
v-for=
"(cItem,cIndex) in CostCurrencyList"
>
<template
v-if=
"cItem.OtherChangeModel!=null&&cItem.OtherChangeModel.HotelChangeValue!=0"
>
<p
:key=
"cIndex"
>
{{
cItem
.
CurrencyName
}}
汇率:
{{
cItem
.
OtherChangeModel
.
HotelChangeRemark
}}
(
<font
style=
"color:red"
>
{{
cItem
.
OtherChangeModel
.
HotelChangeValue
}}
</font>
)
<template
v-if=
"CostNumberList!=null&&CostNumberList.length>0"
>
<template
v-if=
"CostNumberList[cIndex]!=null&&CostNumberList[cIndex].Id>0"
>
<template
v-if=
"CostNumberList[cIndex].OtherChangeModel!=null&&CostNumberList[cIndex].OtherChangeModel.HotelChangeValue!=0"
>
人数
{{
CostNumberList
[
cIndex
].
PeopleNumber
}}
{{
CostNumberList
[
cIndex
].
OtherChangeModel
.
HotelChangeRemark
}}
(
<font
style=
"color:red"
>
{{
CostNumberList
[
cIndex
].
OtherChangeModel
.
HotelChangeValue
>
0
?
"+"
:
""
}}{{
CostNumberList
[
cIndex
].
OtherChangeModel
.
HotelChangeValue
}}
</font>
)
</
template
>
</template>
</template>
</p>
</template>
</template>
<
template
v-for=
"(cItem,cIndex) in OtherChangeList"
>
<template
v-if=
"cItem.IsChange"
>
<p
:key=
"cIndex"
>
其它成本(人民币)
<template
>
{{
getChangeTypeText
(
cItem
.
ChangeType
)
}}
:
{{
cItem
.
HotelChangeRemark
}}
(
<font
style=
"color:red"
>
{{
cItem
.
HotelChangeValue
}}
</font>
)
</
template
>
</p>
</template>
</template>
</td>
<td
colspan=
"3"
>
{{$t('objFill.dangqiantdlx')}}:
<
template
v-if=
"postConfig.TeamTypeName=='小包团'"
>
...
...
@@ -1078,14 +1409,31 @@
<div
class=
"Cost_Line"
></div>
</el-form>
</div>
<el-dialog
custom-class=
'w1006'
:title=
"dialogDiningTitle"
:visible
.
sync=
"changMsg.isShowChangeOffer"
center
modal
>
<changeOffer
v-if=
"changMsg.isShowChangeOffer"
:qMsg=
"changMsg"
@
success=
"refreshPage"
@
closeDialog=
"closeDialog"
>
</changeOffer>
</el-dialog>
<
template
v-if=
"changMsg.EditType==3"
>
<el-dialog
custom-class=
'w1006'
:title=
"dialogDiningTitle"
:visible
.
sync=
"changMsg.isShowChangeOffer"
center
modal
>
<changeOfferExchangeRate
v-if=
"changMsg.isShowChangeOffer"
:OfferCurrency=
"changMsg"
:costNumberList=
"CostNumberList"
:costCurrencyList=
"CostCurrencyList"
@
success=
"refreshPage"
@
closeDialog=
"closeDialog"
>
</changeOfferExchangeRate>
</el-dialog>
</
template
>
<
template
v-else-if=
"changMsg.EditType==4"
>
<el-dialog
custom-class=
'w1006'
:title=
"dialogDiningTitle"
:visible
.
sync=
"changMsg.isShowChangeOffer"
center
modal
>
<changeOfferOtherCost
v-if=
"changMsg.isShowChangeOffer"
:OfferCurrency=
"changMsg"
:otherPrice=
"OtherPrice"
:teamPrice=
"teamPrice"
@
success=
"refreshPage"
@
closeDialog=
"closeDialog"
>
</changeOfferOtherCost>
</el-dialog>
</
template
>
<
template
v-else
>
<el-dialog
custom-class=
'w1006'
:title=
"dialogDiningTitle"
:visible
.
sync=
"changMsg.isShowChangeOffer"
center
modal
>
<changeOffer
v-if=
"changMsg.isShowChangeOffer"
:qMsg=
"changMsg"
@
success=
"refreshPage"
@
closeDialog=
"closeDialog"
>
</changeOffer>
</el-dialog>
</
template
>
</div>
</template>
<
script
>
import
changeOffer
from
'@/components/commonPage/changeOffer'
import
changeOffer
from
'@/components/commonPage/changeOffer'
;
import
changeOfferExchangeRate
from
'@/components/commonPage/changeOfferExchangeRate'
import
changeOfferOtherCost
from
'@/components/commonPage/changeOfferOtherCost'
export
default
{
//IsEdit(1-查看,2-审核,3-OP变更,4-变更审核)
props
:
[
"postConfig"
,
"IsEdit"
],
...
...
@@ -1093,6 +1441,7 @@
return
{
AduitMsg
:
{},
//审核信息
OtherPrice
:
{},
OtherChangeList
:[],
dayCostPrice
:
[],
CostCurrencyList
:
[],
CostNumberList
:
[],
...
...
@@ -1130,6 +1479,8 @@
},
components
:
{
changeOffer
:
changeOffer
,
changeOfferExchangeRate
:
changeOfferExchangeRate
,
changeOfferOtherCost
:
changeOfferOtherCost
,
},
methods
:
{
switchOffer
(
dateStr
)
{
...
...
@@ -1147,6 +1498,7 @@
})
if
(
selectOfferObj
)
{
this
.
OtherPrice
=
selectOfferObj
.
otherPrice
;
this
.
OtherChangeList
=
selectOfferObj
.
otherChangeList
;
this
.
teamPrice
=
selectOfferObj
.
teamPrice
;
this
.
CostNumberList
=
selectOfferObj
.
CostNumberList
;
this
.
offerDataObj
=
selectOfferObj
;
...
...
@@ -1171,17 +1523,28 @@
}
},
/**
* EditType:1-行程相关变更,2-基础数据变更
* EditType:1-行程相关变更,2-基础数据变更
,3-汇率/人数,4-其他成本变更
*/
showOfferChange
(
EditType
,
item
)
{
showOfferChange
(
EditType
,
item
,
index
)
{
this
.
changMsg
.
isShowChangeOffer
=
true
;
this
.
changMsg
.
OfferId
=
item
.
OfferId
;
this
.
changMsg
.
EditType
=
EditType
;
this
.
dialogDiningTitle
=
"报价单变更"
if
(
item
&&
item
.
DayNum
)
{
this
.
changMsg
.
DayNum
=
item
.
DayNum
;
this
.
changMsg
.
checkObj
=
item
;
if
(
EditType
==
3
){
this
.
dialogDiningTitle
=
"汇率/人数变更"
var
costCurrency
=
this
.
CostCurrencyList
[
index
];
}
else
if
(
EditType
==
4
)
{
this
.
dialogDiningTitle
=
"其他成本变更"
}
else
{
this
.
dialogDiningTitle
=
"报价单变更"
if
(
item
&&
item
.
DayNum
)
{
this
.
changMsg
.
DayNum
=
item
.
DayNum
;
this
.
changMsg
.
checkObj
=
item
;
}
}
},
GetDayStr
(
dayNum
)
{
var
str
=
""
;
...
...
@@ -1303,6 +1666,74 @@
}
return
xiaoJi
.
toFixed
(
0
);
},
//获取汇率/人数变更合计
getRateChangeXiaoJi
(
type
)
{
var
xiaoJi
=
0
;
if
(
this
.
CostCurrencyList
&&
this
.
CostCurrencyList
.
length
>
0
&&
this
.
dayCostPrice
&&
this
.
dayCostPrice
.
length
>
0
)
{
this
.
CostCurrencyList
.
forEach
(
currency
=>
{
if
(
currency
.
OtherChangeModel
!=
null
&&
currency
.
OtherChangeModel
.
HotelChangeValue
!=
0
){
var
currencyRate
=
currency
.
OtherChangeModel
.
HotelChangeValue
;
// 查找 dayCostPrice 中 CurrencyId 匹配当前 currency 的项
const
matchedItems
=
this
.
dayCostPrice
.
filter
(
item
=>
item
.
CurrencyId
===
currency
.
CurrencyId
);
// 对匹配到的项进行处理
matchedItems
.
forEach
(
item
=>
{
//酒店
if
(
type
==
1
)
{
var
hotelPrice
=
Number
(
item
.
HotelCostPrice
);
if
(
item
.
IsHotelChange
)
{
hotelPrice
+=
Number
(
item
.
HotelChangeValue
)
;
}
xiaoJi
+=
Number
(
hotelPrice
)
*
Number
(
currencyRate
);
}
//车
if
(
type
==
2
)
{
var
busPrice
=
Number
(
item
.
BusCostPrice
);
if
(
item
.
IsBusChange
)
{
busPrice
+=
Number
(
item
.
BusChangeValue
)
;
}
xiaoJi
+=
Number
(
item
.
PassFee
)
*
Number
(
currencyRate
);
xiaoJi
+=
Number
(
busPrice
)
*
Number
(
currencyRate
);
}
//景点
if
(
type
==
3
)
{
var
scenicPrice
=
Number
(
item
.
ScenicCostPrice
);
if
(
item
.
IsScenicChange
)
{
scenicPrice
+=
Number
(
item
.
ScenicChangeValue
)
;
}
xiaoJi
+=
Number
(
scenicPrice
)
*
Number
(
currencyRate
);
}
//早餐
if
(
type
==
4
)
{
var
breakfastPrice
=
Number
(
item
.
BreakfastCostPrice
);
if
(
item
.
IsBreakfastChange
)
{
breakfastPrice
+=
Number
(
item
.
BreakfastChangeValue
)
;
}
xiaoJi
+=
Number
(
breakfastPrice
)
*
Number
(
currencyRate
);
var
lunchPrice
=
Number
(
item
.
LunchCostPrice
)
;
if
(
item
.
IsLunchChange
)
{
lunchPrice
+=
Number
(
item
.
LunchChangeValue
)
;
}
xiaoJi
+=
Number
(
lunchPrice
)
*
Number
(
currencyRate
);
var
dinnerPrice
=
Number
(
item
.
DinnerCostPrice
)
;
if
(
item
.
IsDinnerChange
)
{
dinnerPrice
+=
Number
(
item
.
DinnerChangeValue
)
;
}
xiaoJi
+=
Number
(
dinnerPrice
)
*
Number
(
currencyRate
);
}
if
(
type
==
9
)
{
var
otherPrice
=
Number
(
item
.
OtherPrice
)
;
if
(
item
.
IsOtherChange
)
{
otherPrice
+=
Number
(
item
.
OtherChangeValue
)
;
}
xiaoJi
+=
Number
(
otherPrice
)
*
Number
(
currencyRate
)
}
});
}
});
}
return
xiaoJi
.
toFixed
(
0
);
},
//其它成本价格
getCostTotalMoney
()
{
//机票+中段机票+税金+领队导游分摊+联运+过夜+保险
...
...
@@ -1319,6 +1750,35 @@
this
.
getConvertMoney
(
this
.
OtherPrice
.
KBMoney
)
return
totalMoney
;
},
//其它成本价格变更
getChangeCostTotalMoney
()
{
let
totalMoney
=
0.0
;
//机票+中段机票+税金+领队导游分摊+联运+过夜+保险
if
(
this
.
OtherChangeList
!=
null
&&
this
.
OtherChangeList
.
length
>
0
){
this
.
OtherChangeList
.
forEach
(
item
=>
{
totalMoney
+=
Number
(
this
.
getConvertMoney
(
item
.
HotelChangeValue
)
)
});
}
return
totalMoney
.
toFixed
(
2
);
},
getChangeTypeText
(
type
)
{
const
typeMap
=
{
1
:
'汇率'
,
2
:
'人数'
,
3
:
'机票'
,
4
:
'中段机票'
,
5
:
'火车票(每人)'
,
6
:
'联运'
,
7
:
'其他费用'
,
8
:
'税金'
,
9
:
'过夜'
,
10
:
'领队导游分摊'
,
11
:
'签证'
,
12
:
'保险'
,
13
:
'KB人头费'
};
return
typeMap
[
type
]
||
'未知类型'
;
},
//获取汇率
getCurrencyMoney
(
currencyId
)
{
let
currency
=
1
;
...
...
@@ -1329,6 +1789,17 @@
});
return
currency
;
},
//获取汇率变更
getCurrencyChange
(
currencyId
)
{
let
currency
=
1
;
this
.
CostCurrencyList
.
forEach
(
x
=>
{
if
(
x
.
CurrencyId
==
currencyId
)
{
if
(
x
.
OtherChangeModel
!=
null
&&
x
.
OtherChangeModel
.
HotelChangeValue
!=
0
)
currency
=
x
.
ExchangeRate
+
x
.
OtherChangeModel
.
HotelChangeValue
;
}
});
return
currency
;
},
//获取币种名称
getCurrencyName
(
currencyId
)
{
let
CurrencyName
=
""
;
...
...
@@ -1399,7 +1870,52 @@
var
canPrice
=
Number
(
this
.
getDayChangeXiaoJi
(
4
,
1
));
//早餐
var
otherPrice
=
Number
(
this
.
getDayChangeXiaoJi
(
9
,
1
))
/
PeopleNumber
;
//其它费用
totalMoney
=
busFee
+
hotelPrice
+
sencePrice
+
canPrice
+
otherPrice
;
return
totalMoney
.
toFixed
(
2
);
},
//地接成本(日元)
getPeopleNumJpyChangeTotalMoney
(
subItem
)
{
let
totalMoney
=
0.0
;
var
peopleNumber
=
Number
(
subItem
.
PeopleNumber
);
if
(
subItem
.
OtherChangeModel
!=
null
&&
subItem
.
OtherChangeModel
.
HotelChangeValue
!=
0
){
peopleNumber
+=
Number
(
subItem
.
OtherChangeModel
.
HotelChangeValue
);
var
busFee
=
Number
(
this
.
getDayXiaoJi
(
2
,
1
))
/
peopleNumber
;
var
otherPrice
=
Number
(
this
.
getDayXiaoJi
(
9
,
1
))
/
peopleNumber
;
//其它费用
totalMoney
=
busFee
+
otherPrice
;
//hotelPrice + sencePrice + canPrice +
if
(
subItem
.
OtherChangeModel
.
HotelChangeValue
>
0
){
totalMoney
=
Number
(
totalMoney
)
*
Number
(
-
1
);
}
}
return
totalMoney
.
toFixed
(
2
);
},
getPeopleNumberChangeTotalMoney
(
subItem
)
{
let
totalMoney
=
0.0
;
//汇率的变更
var
hotelPrice
=
Number
(
this
.
getRateChangeXiaoJi
(
1
));
//酒店费用
var
sencePrice
=
Number
(
this
.
getRateChangeXiaoJi
(
3
));
//景点费用
var
canPrice
=
Number
(
this
.
getRateChangeXiaoJi
(
4
));
//餐
var
otherPrice
=
Number
(
this
.
getRateChangeXiaoJi
(
9
))
/
Number
(
subItem
.
PeopleNumber
);
//其它费用
var
busFee
=
Number
(
this
.
getRateChangeXiaoJi
(
2
))
/
Number
(
subItem
.
PeopleNumber
);
//车费
totalMoney
=
busFee
+
hotelPrice
+
sencePrice
+
canPrice
+
otherPrice
;
var
peopleNumber
=
subItem
.
PeopleNumber
;
if
(
subItem
.
PeopleNumber
<=
0
)
{
peopleNumber
=
1
;
}
//人数的变更
if
(
subItem
.
OtherChangeModel
!=
null
&&
subItem
.
OtherChangeModel
.
HotelChangeValue
!=
0
){
peopleNumber
+=
Number
(
subItem
.
OtherChangeModel
.
HotelChangeValue
);
console
.
log
(
peopleNumber
,
"otherPrice"
,
this
.
getRateChangeXiaoJi
(
9
));
console
.
log
(
peopleNumber
,
"busFee"
,
this
.
getRateChangeXiaoJi
(
2
));
if
(
subItem
.
OtherChangeModel
.
HotelChangeValue
>
0
){
totalMoney
-=
Number
(
this
.
getRateChangeXiaoJi
(
9
))
/
Number
(
peopleNumber
);
//其它费用
totalMoney
-=
Number
(
this
.
getRateChangeXiaoJi
(
2
))
/
Number
(
peopleNumber
);
//车费
}
else
{
totalMoney
+=
Number
(
this
.
getRateChangeXiaoJi
(
9
))
/
Number
(
peopleNumber
);
//其它费用
totalMoney
+=
Number
(
this
.
getRateChangeXiaoJi
(
2
))
/
Number
(
peopleNumber
);
//车费
}
}
return
totalMoney
.
toFixed
(
2
);
},
getchange
()
{
this
.
getLeaderShare
();
...
...
src/components/commonPage/changeOfferExchangeRate.vue
0 → 100644
View file @
c7ae06fd
<
style
>
.changeOffer
{
width
:
100%
;
text-align
:
center
;
margin-bottom
:
20px
;
border-bottom
:
1px
solid
#d1d1d1
;
padding
:
0
20px
10px
20px
;
}
.changeOffer
.CP_ComTitle2
{
color
:
#106BAF
;
font-weight
:
bold
;
background-color
:
#D1EEEE
;
white-space
:
nowrap
;
}
.changeOffer
.CostcomCenter
{
text-align
:
center
;
}
.changeOfferTable
{
border-collapse
:
collapse
;
}
.changeOfferTable
tr
td
{
height
:
40px
;
border
:
1px
solid
#106BAF
!important
;
border-collapse
:
collapse
;
padding
:
0
3px
;
text-align
:
center
;
}
.changeOfferTable
.el-input
.el-input__inner
{
height
:
25px
!important
;
border
:
none
;
border-bottom
:
1px
solid
#606266
;
padding-left
:
5px
!important
;
}
.changeOfferTable
.el-input-group__append
,
.el-input-group__prepend
{
background
:
#fff
;
border-bottom
:
1px
solid
#606266
;
}
</
style
>
<
template
>
<div
class=
"changeOffer"
>
<div>
<table
class=
"changeOfferTable"
>
<tr>
<td
style=
"width:105px;"
class=
"CP_ComTitle2 CostcomCenter"
>
币种
</td>
<td
style=
"width:100px;"
class=
"CP_ComTitle2 CostcomCenter"
>
汇率
</td>
<td
style=
"width:100px;"
class=
"CP_ComTitle2 CostcomCenter"
>
汇率变更值
</td>
<td
style=
"width:100px;"
class=
"CP_ComTitle2 CostcomCenter"
>
人数
</td>
<td
style=
"width:100px;"
class=
"CP_ComTitle2 CostcomCenter"
>
人数变更值
</td>
<td
style=
"width:500px;"
class=
"CP_ComTitle2 CostcomCenter"
>
变更备注
</td>
<td
style=
"width:100px;"
class=
"CP_ComTitle2 CostcomCenter"
>
<a
style=
"color:blue;cursor:pointer;"
@
click=
"AddOfferObj()"
v-show=
"dataList.length
<costCurrencyList
.
length
"
>
添加
</a>
</td>
</tr>
<tbody>
<tr
v-for=
"(item,index) in dataList"
:key=
"index"
>
<td>
<el-select
v-model=
"item.CurrencyId"
filterable
@
change=
"handleCheckChange(index,item)"
placeholder=
"请选择"
>
<!--
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
"0"
></el-option>
-->
<el-option
v-for=
"item in costCurrencyList"
:key=
"item.CurrencyId"
:label=
"item.CurrencyName"
:value=
"item.CurrencyId"
>
</el-option>
</el-select>
</td>
<td>
{{
item
.
ExchangeRate
}}
</td>
<td>
<el-input
v-model=
"item.NewExchangeRate"
style=
"width:100px;"
max=
"6"
></el-input>
</td>
<td>
{{
item
.
PeopleNumber
}}
</td>
<td>
<el-input
v-model=
"item.NewPeopleNumber"
style=
"width:100px;"
max=
"6"
></el-input>
</td>
<td
style=
"padding:5px;text-align:left;"
>
<el-input
placeholder=
"请输入内容"
v-model=
"item.ChangeRemarks"
class=
"input-with-select"
>
</el-input>
</td>
<td>
<a
style=
"color:red;cursor:pointer;"
@
click=
"DeleteOfferChange(item,index)"
>
删除
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div
style=
"display:flex;justify-content:center;align-items:center;margin-top:20px;"
>
<input
type=
"button"
class=
"normalBtn"
@
click=
"saveOfferChange()"
:value=
"$t('restaurant.res_confirm')"
/>
<input
type=
"button"
class=
"normalBtn"
@
click=
"closeOfferDig()"
:value=
"$t('pub.closeSel')"
/>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
[
"OfferCurrency"
,
"costNumberList"
,
"costCurrencyList"
],
data
()
{
return
{
loading
:
false
,
dataList
:
[],
datas
:
{
ChangeId
:
0
,
OfferId
:
0
,
EidtType
:
3
,
DayNum
:
0
,
ChangeType
:
8
,
ChangeValue
:
0
,
ChangeRemarks
:
""
,
OldPrice
:
0
,
DJPrice
:
0
,
CostId
:
0
,
PeopleNumber
:
0
,
ExchangeRate
:
0
,
CurrencyId
:
''
,
NewExchangeRate
:
0
,
NewPeopleNumber
:
0
,
},
};
},
watch
:{
},
methods
:
{
handleCheckChange
(
index
,
nowItem
)
{
var
flag
=
false
;
if
(
this
.
dataList
&&
this
.
dataList
.
length
>
0
)
{
this
.
dataList
.
forEach
((
qitem
,
qIndex
)
=>
{
if
(
!
flag
&&
qIndex
!=
index
)
{
if
(
qitem
.
CurrencyId
==
nowItem
.
CurrencyId
)
{
flag
=
true
;
}
}
})
}
if
(
flag
)
{
this
.
Error
(
"已存在此项币种,请选择其他变更币种!"
);
nowItem
.
CurrencyId
=
''
;
return
;
}
if
(
this
.
costCurrencyList
!=
null
&&
this
.
costCurrencyList
.
length
>
0
)
{
var
typeIndex
=
this
.
dataList
[
index
];
var
costCurrency
=
this
.
costCurrencyList
.
find
(
item
=>
item
.
CurrencyId
==
typeIndex
.
CurrencyId
);
//币种信息
//查找人数信息
var
costNumber
=
{};
if
(
this
.
costNumberList
.
length
>
index
){
costNumber
=
this
.
costNumberList
[
index
];
}
else
{
costNumber
=
this
.
costNumberList
[
0
];
}
// 使用find方法查找value为3的对象
let
hasCurrencyId
=
this
.
dataList
.
findIndex
(
item
=>
item
.
CurrencyId
===
nowItem
.
CurrencyId
)
const
nowData
=
this
.
dataList
[
hasCurrencyId
];
// 创建深拷贝(避免引用问题)
const
newData
=
JSON
.
parse
(
JSON
.
stringify
(
nowData
));
newData
.
PeopleNumber
=
costNumber
.
PeopleNumber
;
newData
.
CostId
=
costNumber
.
Id
;
newData
.
NewPeopleNumber
=
Number
(
0
)
-
Number
(
newData
.
PeopleNumber
);
//costNumber.PeopleNumber;
newData
.
ExchangeRate
=
costCurrency
.
ExchangeRate
;
newData
.
NewExchangeRate
=
Number
(
0
)
-
Number
(
newData
.
ExchangeRate
);
//costCurrency.ExchangeRate;
newData
.
ChangeRemarks
=
""
;
console
.
log
(
"newData"
,
newData
);
// 替换原对象
this
.
$set
(
this
.
dataList
,
hasCurrencyId
,
newData
);
this
.
getOfferChange
();
}
},
AddOfferObj
()
{
var
obj
=
{
ChangeId
:
0
,
OfferId
:
0
,
EidtType
:
3
,
DayNum
:
0
,
ChangeType
:
8
,
ChangeValue
:
0
,
ChangeRemarks
:
""
,
OldPrice
:
0
,
DJPrice
:
0
,
CostId
:
0
,
PeopleNumber
:
0
,
ExchangeRate
:
0
,
CurrencyId
:
''
,
NewExchangeRate
:
0
,
NewPeopleNumber
:
0
,
}
obj
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
obj
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
if
(
this
.
dataList
.
length
<
this
.
costCurrencyList
.
length
){
this
.
dataList
.
push
(
obj
);
}
},
//删除报价单变更项
DeleteOfferChange
(
item
,
index
)
{
var
that
=
this
;
this
.
Confirm
(
'是否要删除此项变更内容?'
,
function
()
{
// if (item.ChangeId > 0) {
// var pMsg = {
// ChangeId: item.ChangeId
// };
// that.apipost(
// "travel_post_RemoveChangeOffer", pMsg,
// res => {
// if (res.data.resultCode == 1) {
// that.Success(that.$t('objFill.v101.hote.shanchucg'));
// that.getOfferChange();
// } else {
// that.Error(that.$t('objFill.v101.hote.shanchusb'));
// }
// }
// );
// } else {
that
.
dataList
.
splice
(
index
,
1
);
// }
})
},
//关闭弹窗
closeOfferDig
()
{
this
.
$emit
(
"closeDialog"
);
},
//向父组件传递选中酒店
saveOfferChange
()
{
var
tempMsg
=
[];
var
changeList
=
[];
if
(
this
.
dataList
!=
null
&&
this
.
dataList
.
length
>
0
){
this
.
dataList
.
forEach
(
item
=>
{
if
(
item
.
CurrencyId
!=
""
&&
item
.
CurrencyId
>
0
){
changeList
.
push
(
{
CurrencyId
:
item
.
CurrencyId
,
OfferId
:
item
.
OfferId
,
CostId
:
item
.
CostId
,
PeopleNumber
:
item
.
NewPeopleNumber
,
ExchangeRate
:
item
.
NewExchangeRate
,
ChangeRemarks
:
item
.
ChangeRemarks
,
});
}
});
if
(
changeList
==
null
||
changeList
.
length
==
0
){
this
.
Error
(
"请选择变更类型"
);
return
;
}
tempMsg
.
push
({
ChangeId
:
this
.
dataList
[
0
].
ChangeId
,
OfferId
:
this
.
dataList
[
0
].
OfferId
,
EidtType
:
this
.
dataList
[
0
].
EidtType
,
DayNum
:
0
,
ChangeType
:
this
.
dataList
[
0
].
ChangeType
,
ChangeValue
:
0
,
ChangeRemarks
:
''
,
OldPrice
:
0
,
DJPrice
:
0
,
ChangeContent
:
JSON
.
stringify
(
changeList
),
HotelList
:[]
});
this
.
apipost
(
"travel_post_SetChangeOffer"
,
tempMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getOfferChange
()
this
.
Success
(
res
.
data
.
message
);
this
.
$emit
(
"success"
,
1
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
});
}
else
{
var
searchParmeters
=
{
EidtType
:
0
,
OfferId
:
0
,
DayNum
:
0
,
};
searchParmeters
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
searchParmeters
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
searchParmeters
.
DayNum
=
0
;
this
.
apipost
(
"travel_post_RemoveChangeOfferByEidtType"
,
searchParmeters
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getOfferChange
()
this
.
Success
(
res
.
data
.
message
);
this
.
$emit
(
"success"
,
1
);
}
else
{
this
.
Error
(
that
.
$t
(
'objFill.v101.hote.shanchusb'
));
}
}
);
}
},
//查询价格变更信息
getOfferChange
()
{
this
.
loading
=
true
;
var
searchParmeters
=
{
EidtType
:
0
,
OfferId
:
0
,
DayNum
:
0
,
};
searchParmeters
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
searchParmeters
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
searchParmeters
.
DayNum
=
0
;
this
.
apipost
(
"travel_post_GetChangeOfferList"
,
searchParmeters
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempArray
=
res
.
data
.
data
;
if
(
tempArray
!=
null
&&
tempArray
.
length
>
0
){
tempArray
.
forEach
(
item
=>
{
var
ChangeContentList
=
JSON
.
parse
(
item
.
ChangeContent
);
ChangeContentList
.
forEach
(
ChangeContentModel
=>
{
let
hasCurrencyId
=
this
.
dataList
.
findIndex
(
itemd
=>
itemd
.
CurrencyId
===
ChangeContentModel
.
CurrencyId
)
console
.
log
(
"hasCurrencyId"
,
hasCurrencyId
);
if
(
hasCurrencyId
!=-
1
){
const
nowData
=
this
.
dataList
[
hasCurrencyId
];
// 创建深拷贝(避免引用问题)
const
newData
=
JSON
.
parse
(
JSON
.
stringify
(
nowData
));
newData
.
NewPeopleNumber
=
ChangeContentModel
.
PeopleNumber
;
newData
.
NewExchangeRate
=
ChangeContentModel
.
ExchangeRate
;
newData
.
ChangeRemarks
=
ChangeContentModel
.
ChangeRemarks
;
newData
.
ChangeId
=
item
.
ChangeId
;
newData
.
CostId
=
ChangeContentModel
.
CostId
;
// 替换原对象
this
.
$set
(
this
.
dataList
,
hasCurrencyId
,
newData
);
}
else
{
var
obj
=
{
ChangeId
:
item
.
ChangeId
,
OfferId
:
0
,
EidtType
:
3
,
DayNum
:
0
,
ChangeType
:
8
,
ChangeValue
:
0
,
ChangeRemarks
:
ChangeContentModel
.
ChangeRemarks
,
OldPrice
:
0
,
DJPrice
:
0
,
CostId
:
ChangeContentModel
.
CostId
,
PeopleNumber
:
0
,
ExchangeRate
:
0
,
CurrencyId
:
ChangeContentModel
.
CurrencyId
,
NewExchangeRate
:
ChangeContentModel
.
ExchangeRate
,
NewPeopleNumber
:
ChangeContentModel
.
PeopleNumber
,
}
let
hasOCurrencyId
=
this
.
costCurrencyList
.
findIndex
(
item
=>
item
.
CurrencyId
===
ChangeContentModel
.
CurrencyId
)
obj
.
ExchangeRate
=
this
.
costCurrencyList
[
hasOCurrencyId
].
ExchangeRate
;
//查找人数信息
var
costNumber
=
{};
if
(
this
.
costNumberList
.
length
>
hasOCurrencyId
){
costNumber
=
this
.
costNumberList
[
hasOCurrencyId
];
}
else
{
costNumber
=
this
.
costNumberList
[
0
];
}
obj
.
PeopleNumber
=
costNumber
.
PeopleNumber
;
obj
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
obj
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
this
.
dataList
.
push
(
obj
);
}
});
});
}
}
});
},
},
created
()
{
},
mounted
()
{
this
.
getOfferChange
();
}
};
</
script
>
src/components/commonPage/changeOfferOtherCost.vue
0 → 100644
View file @
c7ae06fd
<
style
>
.changeOffer
{
width
:
100%
;
text-align
:
center
;
margin-bottom
:
20px
;
border-bottom
:
1px
solid
#d1d1d1
;
padding
:
0
20px
10px
20px
;
}
.changeOffer
.CP_ComTitle2
{
color
:
#106BAF
;
font-weight
:
bold
;
background-color
:
#D1EEEE
;
white-space
:
nowrap
;
}
.changeOffer
.CostcomCenter
{
text-align
:
center
;
}
.changeOfferTable
{
border-collapse
:
collapse
;
}
.changeOfferTable
tr
td
{
height
:
40px
;
border
:
1px
solid
#106BAF
!important
;
border-collapse
:
collapse
;
padding
:
0
3px
;
text-align
:
center
;
}
.changeOfferTable
.el-input
.el-input__inner
{
height
:
25px
!important
;
border
:
none
;
border-bottom
:
1px
solid
#606266
;
padding-left
:
5px
!important
;
}
.changeOfferTable
.el-input-group__append
,
.el-input-group__prepend
{
background
:
#fff
;
border-bottom
:
1px
solid
#606266
;
}
</
style
>
<
template
>
<div
class=
"changeOffer"
>
<div>
<table
class=
"changeOfferTable"
>
<tr>
<td
style=
"width:105px;"
class=
"CP_ComTitle2 CostcomCenter"
>
变更类型
</td>
<td
style=
"width:100px;"
class=
"CP_ComTitle2 CostcomCenter"
>
原值
</td>
<td
style=
"width:100px;"
class=
"CP_ComTitle2 CostcomCenter"
>
变更值
</td>
<td
style=
"width:500px;"
class=
"CP_ComTitle2 CostcomCenter"
>
变更备注
</td>
<td
style=
"width:100px;"
class=
"CP_ComTitle2 CostcomCenter"
>
<a
style=
"color:blue;cursor:pointer;"
@
click=
"AddOfferObj()"
v-show=
"dataList.length
<OhterChangeTypeList
.
length
"
>
添加
</a>
</td>
</tr>
<tbody>
<tr
v-for=
"(item,index) in dataList"
:key=
"index"
>
<td>
<el-select
v-model=
"item.OtherChangeType"
filterable
@
change=
"handleCheckChange(index,item)"
placeholder=
"请选择"
>
<!--
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
"0"
></el-option>
-->
<el-option
v-for=
"item in OhterChangeTypeList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</td>
<td>
{{
item
.
OldValue
}}
</td>
<td>
<el-input
v-model=
"item.OtherChangeValue"
style=
"width:100px;"
max=
"6"
></el-input>
</td>
<td
style=
"padding:5px;text-align:left;"
>
<el-input
placeholder=
"请输入内容"
v-model=
"item.ChangeRemarks"
class=
"input-with-select"
>
</el-input>
</td>
<td>
<a
style=
"color:red;cursor:pointer;"
@
click=
"DeleteOfferChange(item,index)"
>
删除
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div
style=
"display:flex;justify-content:center;align-items:center;margin-top:20px;"
>
<input
type=
"button"
class=
"normalBtn"
@
click=
"saveOfferChange()"
:value=
"$t('restaurant.res_confirm')"
/>
<input
type=
"button"
class=
"normalBtn"
@
click=
"closeOfferDig()"
:value=
"$t('pub.closeSel')"
/>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
[
"OfferCurrency"
,
"otherPrice"
,
"teamPrice"
],
data
()
{
return
{
loading
:
false
,
dataList
:
[],
datas
:
{
ChangeId
:
0
,
OfferId
:
0
,
EidtType
:
4
,
DayNum
:
0
,
ChangeType
:
9
,
ChangeValue
:
0
,
ChangeRemarks
:
""
,
OldPrice
:
0
,
DJPrice
:
0
,
OtherChangeType
:
''
,
//变更类型1-汇率,2-人数,3-机票,4中段机票,5-火车票(每人),6-联运,7-其他费用,8-税金,9-过夜,10-领队导游分摊,11-签证,12-保险,13-KB人头费
OtherChangeValue
:
0
,
OldValue
:
0
,
},
OhterChangeTypeList
:[
// { id: 0, name: "全部" },
// { id: 1, name: "汇率" },
// { id: 2, name: "人数" },
{
id
:
3
,
name
:
"机票"
},
{
id
:
4
,
name
:
"中段机票"
},
{
id
:
5
,
name
:
"火车票(每人)"
},
{
id
:
6
,
name
:
"联运"
},
{
id
:
7
,
name
:
"其他费用"
},
{
id
:
8
,
name
:
"税金"
},
{
id
:
9
,
name
:
"过夜"
},
{
id
:
10
,
name
:
"领队导游分摊"
},
{
id
:
11
,
name
:
"签证"
},
{
id
:
12
,
name
:
"保险"
},
{
id
:
13
,
name
:
"KB人头费"
}]
};
},
watch
:{
// OfferCurrency:{
// handler(n,o){
// this.datas = JSON.parse(JSON.stringify(n))
// },
// deep: true,
// immediate: true,
// }
},
methods
:
{
handleCheckChange
(
index
,
nowItem
)
{
var
flag
=
false
;
if
(
this
.
dataList
&&
this
.
dataList
.
length
>
0
)
{
this
.
dataList
.
forEach
((
qitem
,
qIndex
)
=>
{
if
(
!
flag
&&
qIndex
!=
index
)
{
if
(
qitem
.
OtherChangeType
==
nowItem
.
OtherChangeType
)
{
flag
=
true
;
}
}
})
}
if
(
flag
)
{
this
.
Error
(
"已存在此项变更,请选择其他变更项目!"
);
nowItem
.
OtherChangeType
=
''
;
return
;
}
var
typeIndex
=
this
.
dataList
[
index
];
var
costCurrency
=
this
.
OhterChangeTypeList
.
find
(
item
=>
item
.
id
==
typeIndex
.
OtherChangeType
);
//币种信息
// 使用find方法查找value为3的对象
let
hasCurrencyId
=
this
.
dataList
.
findIndex
(
item
=>
item
.
OtherChangeType
===
costCurrency
.
id
)
if
(
hasCurrencyId
===-
1
){
return
;
}
const
nowData
=
this
.
dataList
[
hasCurrencyId
];
// 创建深拷贝(避免引用问题)
const
newData
=
JSON
.
parse
(
JSON
.
stringify
(
nowData
));
//teamPrice
if
(
costCurrency
.
id
==
3
){
newData
.
OldValue
=
this
.
otherPrice
.
AirTicketMoeny
;
newData
.
OtherChangeValue
=
this
.
otherPrice
.
AirTicketMoeny
;
}
else
if
(
costCurrency
.
id
==
4
){
newData
.
OldValue
=
this
.
otherPrice
.
InlandAirTicketMoney
;
newData
.
OtherChangeValue
=
this
.
otherPrice
.
InlandAirTicketMoney
;
}
else
if
(
costCurrency
.
id
==
5
){
newData
.
OldValue
=
this
.
otherPrice
.
InlandTrainTicketMoney
;
newData
.
OtherChangeValue
=
this
.
otherPrice
.
InlandTrainTicketMoney
;
}
else
if
(
costCurrency
.
id
==
6
){
newData
.
OldValue
=
this
.
teamPrice
.
UnionPrice
;
newData
.
OtherChangeValue
=
this
.
teamPrice
.
UnionPrice
;
}
else
if
(
costCurrency
.
id
==
7
){
newData
.
OldValue
=
this
.
otherPrice
.
OtherShareMoney
;
newData
.
OtherChangeValue
=
this
.
otherPrice
.
OtherShareMoney
;
}
else
if
(
costCurrency
.
id
==
8
){
newData
.
OldValue
=
this
.
teamPrice
.
TaxPrice
;
newData
.
OtherChangeValue
=
this
.
teamPrice
.
TaxPrice
;
}
else
if
(
costCurrency
.
id
==
9
){
newData
.
OldValue
=
this
.
teamPrice
.
NightPrice
;
newData
.
OtherChangeValue
=
this
.
teamPrice
.
NightPrice
;
}
else
if
(
costCurrency
.
id
==
10
){
newData
.
OldValue
=
this
.
otherPrice
.
AirTicketShareMoney
;
newData
.
OtherChangeValue
=
this
.
otherPrice
.
AirTicketShareMoney
;
}
else
if
(
costCurrency
.
id
==
11
){
newData
.
OldValue
=
this
.
teamPrice
.
VisaPrice
;
newData
.
OtherChangeValue
=
this
.
teamPrice
.
VisaPrice
;
}
else
if
(
costCurrency
.
id
==
12
){
newData
.
OldValue
=
this
.
otherPrice
.
SafeMoney
;
newData
.
OtherChangeValue
=
this
.
otherPrice
.
SafeMoney
;
}
else
{
newData
.
OldValue
=
this
.
otherPrice
.
KBMoney
;
newData
.
OtherChangeValue
=
this
.
otherPrice
.
KBMoney
;
}
newData
.
ChangeRemarks
=
""
;
if
(
newData
.
OtherChangeValue
!=
0
){
newData
.
OtherChangeValue
=
Number
(
newData
.
OtherChangeValue
)
*-
1
;
}
// 替换原对象
this
.
$set
(
this
.
dataList
,
hasCurrencyId
,
newData
);
this
.
getOfferChange
();
},
AddOfferObj
()
{
var
obj
=
{
ChangeId
:
0
,
OfferId
:
0
,
EidtType
:
4
,
DayNum
:
0
,
ChangeType
:
9
,
ChangeValue
:
0
,
ChangeRemarks
:
""
,
OldPrice
:
0
,
DJPrice
:
0
,
OtherChangeType
:
''
,
//变更类型1-汇率,2-人数,3-机票,4中段机票,5-火车票(每人),6-联运,7-其他费用,8-税金,9-过夜,10-领队导游分摊,11-签证,12-保险,13-KB人头费
OtherChangeValue
:
0
,
OldValue
:
0
,
}
obj
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
obj
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
if
(
this
.
dataList
.
length
<
this
.
OhterChangeTypeList
.
length
){
this
.
dataList
.
push
(
obj
);
}
},
//删除报价单变更项
DeleteOfferChange
(
item
,
index
)
{
var
that
=
this
;
this
.
Confirm
(
'是否要删除此项变更内容?'
,
function
()
{
that
.
dataList
.
splice
(
index
,
1
);
})
},
//关闭弹窗
closeOfferDig
()
{
this
.
$emit
(
"closeDialog"
);
},
//向父组件传递选中酒店
saveOfferChange
()
{
var
tempMsg
=
[];
var
changeList
=
[];
if
(
this
.
dataList
!=
null
&&
this
.
dataList
.
length
>
0
){
this
.
dataList
.
forEach
(
item
=>
{
if
(
item
.
OtherChangeType
!=
""
&&
item
.
OtherChangeType
>
0
){
changeList
.
push
(
{
ChangeType
:
item
.
OtherChangeType
,
ChangeValue
:
item
.
OtherChangeValue
,
ChangeRemarks
:
item
.
ChangeRemarks
,
});
}
});
if
(
changeList
==
null
||
changeList
.
length
==
0
){
this
.
Error
(
"请选择变更类型"
);
return
;
}
tempMsg
.
push
({
ChangeId
:
this
.
dataList
[
0
].
ChangeId
,
OfferId
:
this
.
dataList
[
0
].
OfferId
,
EidtType
:
this
.
dataList
[
0
].
EidtType
,
DayNum
:
0
,
ChangeType
:
this
.
dataList
[
0
].
ChangeType
,
ChangeValue
:
0
,
ChangeRemarks
:
""
,
OldPrice
:
0
,
DJPrice
:
0
,
ChangeContent
:
JSON
.
stringify
(
changeList
),
HotelList
:[]
});
this
.
apipost
(
"travel_post_SetChangeOffer"
,
tempMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getOfferChange
()
this
.
Success
(
res
.
data
.
message
);
this
.
$emit
(
"success"
,
1
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
});
}
else
{
var
searchParmeters
=
{
EidtType
:
0
,
OfferId
:
0
,
DayNum
:
0
,
};
searchParmeters
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
searchParmeters
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
searchParmeters
.
DayNum
=
0
;
this
.
apipost
(
"travel_post_RemoveChangeOfferByEidtType"
,
searchParmeters
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getOfferChange
()
this
.
Success
(
res
.
data
.
message
);
this
.
$emit
(
"success"
,
1
);
}
else
{
this
.
Error
(
that
.
$t
(
'objFill.v101.hote.shanchusb'
));
}
}
);
}
},
//查询价格变更信息
getOfferChange
()
{
this
.
loading
=
true
;
var
searchParmeters
=
{
EidtType
:
0
,
OfferId
:
0
,
DayNum
:
0
,
};
searchParmeters
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
searchParmeters
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
searchParmeters
.
DayNum
=
0
;
this
.
apipost
(
"travel_post_GetChangeOfferList"
,
searchParmeters
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempArray
=
res
.
data
.
data
;
if
(
tempArray
!=
null
&&
tempArray
.
length
>
0
){
tempArray
.
forEach
(
item
=>
{
if
(
item
.
ChangeContent
.
length
>
0
){
var
ChangeContentList
=
JSON
.
parse
(
item
.
ChangeContent
)
ChangeContentList
.
forEach
(
ChangeContentModel
=>
{
// 使用find方法查找value为3的对象
let
hasCurrencyId
=
this
.
dataList
.
findIndex
(
itemd
=>
itemd
.
OtherChangeType
===
ChangeContentModel
.
ChangeType
)
if
(
hasCurrencyId
!=-
1
){
const
nowData
=
this
.
dataList
[
hasCurrencyId
];
// 创建深拷贝(避免引用问题)
const
newData
=
JSON
.
parse
(
JSON
.
stringify
(
nowData
));
newData
.
OtherChangeValue
=
ChangeContentModel
.
ChangeValue
;
newData
.
ChangeRemarks
=
ChangeContentModel
.
ChangeRemarks
;
newData
.
ChangeId
=
item
.
ChangeId
;
// 替换原对象
this
.
$set
(
this
.
dataList
,
hasCurrencyId
,
newData
);
}
else
{
var
obj
=
{
ChangeId
:
item
.
ChangeId
,
OfferId
:
0
,
EidtType
:
4
,
DayNum
:
0
,
ChangeType
:
9
,
ChangeValue
:
0
,
ChangeRemarks
:
ChangeContentModel
.
ChangeRemarks
,
OldPrice
:
0
,
DJPrice
:
0
,
OtherChangeType
:
ChangeContentModel
.
ChangeType
,
//变更类型1-汇率,2-人数,3-机票,4中段机票,5-火车票(每人),6-联运,7-其他费用,8-税金,9-过夜,10-领队导游分摊,11-签证,12-保险,13-KB人头费
OtherChangeValue
:
ChangeContentModel
.
ChangeValue
,
OldValue
:
0
,
}
if
(
ChangeContentModel
.
ChangeType
==
3
){
obj
.
OldValue
=
this
.
otherPrice
.
AirTicketMoeny
;
}
else
if
(
ChangeContentModel
.
ChangeType
==
4
){
obj
.
OldValue
=
this
.
otherPrice
.
InlandAirTicketMoney
;
}
else
if
(
ChangeContentModel
.
ChangeType
==
5
){
obj
.
OldValue
=
this
.
otherPrice
.
InlandTrainTicketMoney
;
}
else
if
(
ChangeContentModel
.
ChangeType
==
6
){
obj
.
OldValue
=
this
.
teamPrice
.
UnionPrice
;
}
else
if
(
ChangeContentModel
.
ChangeType
==
7
){
obj
.
OldValue
=
this
.
otherPrice
.
OtherShareMoney
;
}
else
if
(
ChangeContentModel
.
ChangeType
==
8
){
obj
.
OldValue
=
this
.
teamPrice
.
TaxPrice
;
}
else
if
(
ChangeContentModel
.
ChangeType
==
9
){
obj
.
OldValue
=
this
.
teamPrice
.
NightPrice
;
}
else
if
(
ChangeContentModel
.
ChangeType
==
10
){
obj
.
OldValue
=
this
.
otherPrice
.
AirTicketShareMoney
;
}
else
if
(
ChangeContentModel
.
ChangeType
==
11
){
obj
.
OldValue
=
this
.
teamPrice
.
VisaPrice
;
}
else
if
(
ChangeContentModel
.
ChangeType
==
12
){
obj
.
OldValue
=
this
.
otherPrice
.
SafeMoney
;
}
else
{
obj
.
OldValue
=
this
.
otherPrice
.
KBMoney
;
}
obj
.
ChangeId
=
this
.
OfferCurrency
.
ChangeId
;
obj
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
obj
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
this
.
dataList
.
push
(
obj
);
}
});
}
});
}
}
});
},
},
created
()
{
this
.
getOfferChange
();
},
mounted
()
{
}
};
</
script
>
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