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
68d5c6bf
Commit
68d5c6bf
authored
Oct 09, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人数汇率变更
parent
dc9e4a58
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
294 additions
and
309 deletions
+294
-309
CostNewPriceAudit.vue
...ts/TravelManager/TravelNewQuotation/CostNewPriceAudit.vue
+117
-101
changeOfferExchangeRate.vue
src/components/commonPage/changeOfferExchangeRate.vue
+177
-208
No files found.
src/components/TravelManager/TravelNewQuotation/CostNewPriceAudit.vue
View file @
68d5c6bf
...
@@ -165,8 +165,8 @@
...
@@ -165,8 +165,8 @@
</
template
>
</
template
>
</font>
</font>
</template>
</template>
<
!-- </br
><a v-if="IsEdit==3" style="color:blue;cursor:pointer"
<
br
/
><a
v-if=
"IsEdit==3"
style=
"color:blue;cursor:pointer"
@click="showOfferChange(3,item,index)">{{$t('objFill.dayofferchange')}}</a>
-->
@
click=
"showOfferChange(3,item,index)"
>
{{$t('objFill.dayofferchange')}}
</a>
</td>
</td>
<td
:colspan=
"13-2-CostCurrencyList.length+1"
>
<td
:colspan=
"13-2-CostCurrencyList.length+1"
>
</td>
</td>
...
@@ -185,9 +185,9 @@
...
@@ -185,9 +185,9 @@
</
template
>
</
template
>
</font>
</font>
</template>
</template>
<
!-- <br
/>
<
br
/>
<a
v-if=
"IsEdit==3"
style=
"color:blue;cursor:pointer"
<a
v-if=
"IsEdit==3"
style=
"color:blue;cursor:pointer"
@click="showOfferChange(3,item,index)">{{$t('objFill.dayofferchange')}}</a>
-->
@
click=
"showOfferChange(3,item,index)"
>
{{$t('objFill.dayofferchange')}}
</a>
</td>
</td>
<td
:colspan=
"13-2-CostNumberList.length+1"
>
<td
:colspan=
"13-2-CostNumberList.length+1"
>
</td>
</td>
...
@@ -333,7 +333,6 @@
...
@@ -333,7 +333,6 @@
</font><br
/>
</font><br
/>
</template>
</template>
</template>
</template>
</td>
</td>
<td
style=
"white-space:nowrap;"
>
<td
style=
"white-space:nowrap;"
>
<
template
v-if=
"subItem.BreakfastCostPrice>0||subItem.IsBreakfastChange"
>
<
template
v-if=
"subItem.BreakfastCostPrice>0||subItem.IsBreakfastChange"
>
...
@@ -391,7 +390,9 @@
...
@@ -391,7 +390,9 @@
v-if=
"(childItem.TicketName&&childItem.TicketName!='')||(childItem.NewTicketName&&childItem.NewTicketName!='')"
>
v-if=
"(childItem.TicketName&&childItem.TicketName!='')||(childItem.NewTicketName&&childItem.NewTicketName!='')"
>
<font>
<font>
{{
childIndex
+
1
}}
、
{{
childIndex
+
1
}}
、
<font
v-if=
"childItem.TicketName!=''"
:style=
"(childItem.TicketCostPrice+childItem.NewTicketCostPrice==0)?'text-decoration: line-through;':''"
>
{{
childItem
.
TicketName
}}
</font>
<font
v-if=
"childItem.TicketName!=''"
:style=
"(childItem.TicketCostPrice+childItem.NewTicketCostPrice==0)?'text-decoration: line-through;':''"
>
{{
childItem
.
TicketName
}}
</font>
<font
v-if=
"childItem.NewTicketName&&childItem.NewTicketName!=''"
style=
"color:red;"
>
<font
v-if=
"childItem.NewTicketName&&childItem.NewTicketName!=''"
style=
"color:red;"
>
{{
childItem
.
NewTicketName
}}
</font>
{{
childItem
.
NewTicketName
}}
</font>
</font>
</font>
...
@@ -463,7 +464,6 @@
...
@@ -463,7 +464,6 @@
<
template
v-else
>
<
template
v-else
>
{{
getDayChangeXiaoJi
(
1
,
1
)
}}
{{
getDayChangeXiaoJi
(
1
,
1
)
}}
</
template
>
</
template
>
</font>
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(1,1))+Number(getDayChangeXiaoJi(1,1))}}
</font>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(1,1))+Number(getDayChangeXiaoJi(1,1))}}
</font>
</template>
</template>
...
@@ -547,14 +547,17 @@
...
@@ -547,14 +547,17 @@
</
template
>
</
template
>
</template>
</template>
<
template
v-if=
"getRateChangeXiaoJi(1)!=0"
>
<
template
v-if=
"getRateChangeXiaoJi(1)!=0"
>
<el-tooltip
content=
"汇率变更"
>
<font
style=
"color:#ef5b9c;"
>
<template
v-if=
"getRateChangeXiaoJi(1)>0"
>
<template
v-if=
"getRateChangeXiaoJi(1)>0"
>
+
{{
getRateChangeXiaoJi
(
1
)
}}
+
{{
getRateChangeXiaoJi
(
1
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
{{
getRateChangeXiaoJi
(
1
)
}}
{{
getRateChangeXiaoJi
(
1
)
}}
</
template
>
</
template
>
</font>
</el-tooltip>
</template>
</template>
</font>
</font>
=
<font
style=
"color:red"
>
=
<font
style=
"color:red"
>
{{Number(getDayXiaoJi(1,2))+Number(getDayChangeXiaoJi(1,2))+Number(getRateChangeXiaoJi(1))}}
</font>
{{Number(getDayXiaoJi(1,2))+Number(getDayChangeXiaoJi(1,2))+Number(getRateChangeXiaoJi(1))}}
</font>
...
@@ -574,12 +577,16 @@
...
@@ -574,12 +577,16 @@
</
template
>
</
template
>
</template>
</template>
<
template
v-if=
"getRateChangeXiaoJi(2)!=0"
>
<
template
v-if=
"getRateChangeXiaoJi(2)!=0"
>
<el-tooltip
content=
"汇率变更"
>
<font
style=
"color:#ef5b9c;"
>
<template
v-if=
"getRateChangeXiaoJi(2)>0"
>
<template
v-if=
"getRateChangeXiaoJi(2)>0"
>
+
{{
getRateChangeXiaoJi
(
2
)
}}
+
{{
getRateChangeXiaoJi
(
2
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
{{
getRateChangeXiaoJi
(
2
)
}}
{{
getRateChangeXiaoJi
(
2
)
}}
</
template
>
</
template
>
</font>
</el-tooltip>
</template>
</template>
</font>
</font>
=
<font
style=
"color:red"
>
=
<font
style=
"color:red"
>
...
@@ -600,12 +607,16 @@
...
@@ -600,12 +607,16 @@
</
template
>
</
template
>
</template>
</template>
<
template
v-if=
"getRateChangeXiaoJi(4)!=0"
>
<
template
v-if=
"getRateChangeXiaoJi(4)!=0"
>
<el-tooltip
content=
"汇率变更"
>
<font
style=
"color:#ef5b9c;"
>
<template
v-if=
"getRateChangeXiaoJi(4)>0"
>
<template
v-if=
"getRateChangeXiaoJi(4)>0"
>
+
{{
getRateChangeXiaoJi
(
4
)
}}
+
{{
getRateChangeXiaoJi
(
4
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
{{
getRateChangeXiaoJi
(
4
)
}}
{{
getRateChangeXiaoJi
(
4
)
}}
</
template
>
</
template
>
</font>
</el-tooltip>
</template>
</template>
</font>
</font>
=
<font
style=
"color:red"
>
=
<font
style=
"color:red"
>
...
@@ -626,12 +637,16 @@
...
@@ -626,12 +637,16 @@
</
template
>
</
template
>
</template>
</template>
<
template
v-if=
"getRateChangeXiaoJi(3)!=0"
>
<
template
v-if=
"getRateChangeXiaoJi(3)!=0"
>
<el-tooltip
content=
"汇率变更"
>
<font
style=
"color:#ef5b9c;"
>
<template
v-if=
"getRateChangeXiaoJi(3)>0"
>
<template
v-if=
"getRateChangeXiaoJi(3)>0"
>
+
{{
getRateChangeXiaoJi
(
3
)
}}
+
{{
getRateChangeXiaoJi
(
3
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
{{
getRateChangeXiaoJi
(
3
)
}}
{{
getRateChangeXiaoJi
(
3
)
}}
</
template
>
</
template
>
</font>
</el-tooltip>
</template>
</template>
</font>
</font>
=
<font
style=
"color:red"
>
=
<font
style=
"color:red"
>
...
@@ -652,12 +667,16 @@
...
@@ -652,12 +667,16 @@
</
template
>
</
template
>
</template>
</template>
<
template
v-if=
"getRateChangeXiaoJi(9)!=0"
>
<
template
v-if=
"getRateChangeXiaoJi(9)!=0"
>
<el-tooltip
content=
"汇率变更"
>
<font
style=
"color:#ef5b9c;"
>
<template
v-if=
"getRateChangeXiaoJi(9)>0"
>
<template
v-if=
"getRateChangeXiaoJi(9)>0"
>
+
{{
getRateChangeXiaoJi
(
9
)
}}
+
{{
getRateChangeXiaoJi
(
9
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
{{
getRateChangeXiaoJi
(
9
)
}}
{{
getRateChangeXiaoJi
(
9
)
}}
</
template
>
</
template
>
</font>
</el-tooltip>
</template>
</template>
</font>
</font>
=
<font
style=
"color:red;"
>
=
<font
style=
"color:red;"
>
...
@@ -770,7 +789,6 @@
...
@@ -770,7 +789,6 @@
<td
colspan=
"2"
>
<td
colspan=
"2"
>
<el-form-item
:label=
"$t('objFill.qitafeiyongsm')"
>
<el-form-item
:label=
"$t('objFill.qitafeiyongsm')"
>
{{OtherPrice.OtherRemark}}
{{OtherPrice.OtherRemark}}
</el-form-item>
</el-form-item>
</td>
</td>
<td
colspan=
"2"
rowspan=
"2"
>
<td
colspan=
"2"
rowspan=
"2"
>
...
@@ -1116,28 +1134,23 @@
...
@@ -1116,28 +1134,23 @@
</td>
</td>
<td
style=
"white-space:nowrap;"
>
<td
style=
"white-space:nowrap;"
>
{{getLocalJpyTotalMoney(subItem.PeopleNumber)}}
{{getLocalJpyTotalMoney(subItem.PeopleNumber)}}
<
template
<
template
v-if=
"(getLocalJpyChangeTotalMoney(subItem)!=0)!=0"
>
v-if=
"(getLocalJpyChangeTotalMoney(subItem.PeopleNumber)!=0||getPeopleNumJpyChangeTotalMoney(subItem))!=0"
>
<font
style=
"color:red;"
>
<font
style=
"color:red;"
>
<template
v-if=
"getLocalJpyChangeTotalMoney(subItem.PeopleNumber)!=0"
>
<template
v-if=
"getLocalJpyChangeTotalMoney(subItem)!=0"
>
<template
v-if=
"getLocalJpyChangeTotalMoney(subItem.PeopleNumber)>0"
>
<el-tooltip
content=
"地接费用变更金额"
>
+
{{
getLocalJpyChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
<font>
</
template
>
<template
v-if=
"getLocalJpyChangeTotalMoney(subItem)>0"
>
<
template
v-else
>
+
{{
getLocalJpyChangeTotalMoney
(
subItem
)
}}
{{
getLocalJpyChangeTotalMoney
(
subItem
.
PeopleNumber
)
}}
</
template
>
</template>
<
template
v-if=
"getPeopleNumJpyChangeTotalMoney(subItem)!=0"
>
<template
v-if=
"getPeopleNumJpyChangeTotalMoney(subItem)>0"
>
+
{{
getPeopleNumJpyChangeTotalMoney
(
subItem
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
{{
getPeopleNum
JpyChangeTotalMoney
(
subItem
)
}}
{{
getLocal
JpyChangeTotalMoney
(
subItem
)
}}
</
template
>
</
template
>
</font>
</el-tooltip>
</template>
</template>
</font>
</font>
=
<font
style=
"color:red"
>
=
<font
style=
"color:red"
>
{{(Number(getLocalJpyTotalMoney(subItem.PeopleNumber))+Number(getLocalJpyChangeTotalMoney(subItem
.PeopleNumber))+Number(getPeopleNumJpyChangeTotalMoney(subItem
))).toFixed(2)}}
{{(Number(getLocalJpyTotalMoney(subItem.PeopleNumber))+Number(getLocalJpyChangeTotalMoney(subItem))).toFixed(2)}}
</font>
</font>
</template>
</template>
</td>
</td>
...
@@ -1156,12 +1169,16 @@
...
@@ -1156,12 +1169,16 @@
</
template
>
</
template
>
</template>
</template>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<el-tooltip
content=
"人数汇率变更"
>
<font
style=
"color:#ef5b9c;"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</
template
>
</font>
</el-tooltip>
</template>
</template>
</font>
</font>
=
<font
style=
"color:red"
>
=
<font
style=
"color:red"
>
...
@@ -1183,12 +1200,16 @@
...
@@ -1183,12 +1200,16 @@
</
template
>
</
template
>
</template>
</template>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<el-tooltip
content=
"人数汇率变更"
>
<font
style=
"color:#ef5b9c;"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</
template
>
</font>
</el-tooltip>
</template>
</template>
</font>
</font>
=
<font
style=
"color:red"
>
=
<font
style=
"color:red"
>
...
@@ -1210,12 +1231,16 @@
...
@@ -1210,12 +1231,16 @@
</
template
>
</
template
>
</template>
</template>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<el-tooltip
content=
"人数汇率变更"
>
<font
style=
"color:#ef5b9c;"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</
template
>
</font>
</el-tooltip>
</template>
</template>
</font>
</font>
=
<font
style=
"color:red"
>
=
<font
style=
"color:red"
>
...
@@ -1241,12 +1266,16 @@
...
@@ -1241,12 +1266,16 @@
</
template
>
</
template
>
</template>
</template>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<
template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)!=0"
>
<el-tooltip
content=
"人数汇率变更"
>
<font
style=
"color:#ef5b9c;"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
<template
v-if=
"getPeopleNumberChangeTotalMoney(subItem)>0"
>
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
+
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
{{
getPeopleNumberChangeTotalMoney
(
subItem
)
}}
</
template
>
</
template
>
</font>
</el-tooltip>
</template>
</template>
<
template
v-if=
"getChangeCostTotalMoney()!=0"
>
<
template
v-if=
"getChangeCostTotalMoney()!=0"
>
<template
v-if=
"getChangeCostTotalMoney()>0"
>
<template
v-if=
"getChangeCostTotalMoney()>0"
>
...
@@ -1595,7 +1624,6 @@
...
@@ -1595,7 +1624,6 @@
this
.
changMsg
.
checkObj
=
item
;
this
.
changMsg
.
checkObj
=
item
;
}
}
}
}
},
},
GetDayStr
(
dayNum
)
{
GetDayStr
(
dayNum
)
{
var
str
=
""
;
var
str
=
""
;
...
@@ -1911,10 +1939,14 @@
...
@@ -1911,10 +1939,14 @@
return
totalMoney
.
toFixed
(
2
);
return
totalMoney
.
toFixed
(
2
);
},
},
//获取地接项目变更金额
//获取地接项目变更金额
getLocalJpyChangeTotalMoney
(
PeopleNumber
)
{
getLocalJpyChangeTotalMoney
(
subItem
)
{
var
PeopleNumber
=
subItem
.
PeopleNumber
;
if
(
PeopleNumber
<=
0
)
{
if
(
PeopleNumber
<=
0
)
{
PeopleNumber
=
1
;
PeopleNumber
=
1
;
}
}
if
(
subItem
.
OtherChangeModel
!=
null
&&
subItem
.
OtherChangeModel
.
HotelChangeValue
!=
0
)
{
PeopleNumber
+=
Number
(
subItem
.
OtherChangeModel
.
HotelChangeValue
);
}
let
totalMoney
=
0.0
;
let
totalMoney
=
0.0
;
var
busFee
=
Number
(
this
.
getDayChangeXiaoJi
(
2
,
1
))
/
PeopleNumber
;
var
busFee
=
Number
(
this
.
getDayChangeXiaoJi
(
2
,
1
))
/
PeopleNumber
;
var
hotelPrice
=
Number
(
this
.
getDayChangeXiaoJi
(
1
,
1
));
//酒店费用
var
hotelPrice
=
Number
(
this
.
getDayChangeXiaoJi
(
1
,
1
));
//酒店费用
...
@@ -1924,21 +1956,6 @@
...
@@ -1924,21 +1956,6 @@
totalMoney
=
busFee
+
hotelPrice
+
sencePrice
+
canPrice
+
otherPrice
;
totalMoney
=
busFee
+
hotelPrice
+
sencePrice
+
canPrice
+
otherPrice
;
return
totalMoney
.
toFixed
(
2
);
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
)
{
getPeopleNumberChangeTotalMoney
(
subItem
)
{
let
totalMoney
=
0.0
;
let
totalMoney
=
0.0
;
//汇率的变更
//汇率的变更
...
@@ -1955,8 +1972,7 @@
...
@@ -1955,8 +1972,7 @@
//人数的变更
//人数的变更
if
(
subItem
.
OtherChangeModel
!=
null
&&
subItem
.
OtherChangeModel
.
HotelChangeValue
!=
0
)
{
if
(
subItem
.
OtherChangeModel
!=
null
&&
subItem
.
OtherChangeModel
.
HotelChangeValue
!=
0
)
{
peopleNumber
+=
Number
(
subItem
.
OtherChangeModel
.
HotelChangeValue
);
peopleNumber
+=
Number
(
subItem
.
OtherChangeModel
.
HotelChangeValue
);
// console.log(peopleNumber, "otherPrice", this.getRateChangeXiaoJi(9));
// console.log(peopleNumber, "busFee", this.getRateChangeXiaoJi(2));
if
(
subItem
.
OtherChangeModel
.
HotelChangeValue
>
0
)
{
if
(
subItem
.
OtherChangeModel
.
HotelChangeValue
>
0
)
{
totalMoney
-=
Number
(
this
.
getRateChangeXiaoJi
(
9
))
/
Number
(
peopleNumber
);
//其它费用
totalMoney
-=
Number
(
this
.
getRateChangeXiaoJi
(
9
))
/
Number
(
peopleNumber
);
//其它费用
totalMoney
-=
Number
(
this
.
getRateChangeXiaoJi
(
2
))
/
Number
(
peopleNumber
);
//车费
totalMoney
-=
Number
(
this
.
getRateChangeXiaoJi
(
2
))
/
Number
(
peopleNumber
);
//车费
...
...
src/components/commonPage/changeOfferExchangeRate.vue
View file @
68d5c6bf
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<
template
>
<
template
>
<div
class=
"changeOffer"
>
<div
class=
"changeOffer"
>
<div>
<div>
<table
class=
"changeOfferTable"
>
<table
class=
"changeOfferTable"
>
<tr>
<tr>
<td
style=
"width:105px;"
class=
"CP_ComTitle2 CostcomCenter"
>
币种
</td>
<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>
...
@@ -57,18 +57,15 @@
...
@@ -57,18 +57,15 @@
<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:500px;"
class=
"CP_ComTitle2 CostcomCenter"
>
变更备注
</td>
<td
style=
"width:100px;"
class=
"CP_ComTitle2 CostcomCenter"
>
<td
style=
"width:100px;"
class=
"CP_ComTitle2 CostcomCenter"
>
<a
style=
"color:blue;cursor:pointer;"
@
click=
"AddOfferObj()"
v-show=
"dataList.length
<costCurrencyList
.
length
"
>
添加
</a>
<a
style=
"color:blue;cursor:pointer;"
@
click=
"AddOfferObj()"
v-show=
"dataList.length
<costCurrencyList
.
length
"
>
添加
</a>
</td>
</td>
</tr>
</tr>
<tbody>
<tbody>
<tr
v-for=
"(item,index) in dataList"
:key=
"index"
>
<tr
v-for=
"(item,index) in dataList"
:key=
"index"
>
<td>
<td>
<el-select
v-model=
"item.CurrencyId"
filterable
@
change=
"handleCheckChange(index,item)"
placeholder=
"请选择"
>
<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"
<el-option
v-for=
"item in costCurrencyList"
:key=
"item.CurrencyId"
:label=
"item.CurrencyName"
:value=
"item.CurrencyId"
>
:value=
"item.CurrencyId"
>
</el-option>
</el-option>
</el-select>
</el-select>
...
@@ -104,34 +101,16 @@
...
@@ -104,34 +101,16 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
"OfferCurrency"
,
"costNumberList"
,
"costCurrencyList"
],
props
:
[
"OfferCurrency"
,
"costNumberList"
,
"costCurrencyList"
],
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
loading
:
false
,
dataList
:
[],
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
:{
watch
:
{},
},
methods
:
{
methods
:
{
handleCheckChange
(
index
,
nowItem
)
{
handleCheckChange
(
index
,
nowItem
)
{
var
flag
=
false
;
var
flag
=
false
;
if
(
this
.
dataList
&&
this
.
dataList
.
length
>
0
)
{
if
(
this
.
dataList
&&
this
.
dataList
.
length
>
0
)
{
this
.
dataList
.
forEach
((
qitem
,
qIndex
)
=>
{
this
.
dataList
.
forEach
((
qitem
,
qIndex
)
=>
{
...
@@ -145,33 +124,30 @@
...
@@ -145,33 +124,30 @@
if
(
flag
)
{
if
(
flag
)
{
this
.
Error
(
"已存在此项币种,请选择其他变更币种!"
);
this
.
Error
(
"已存在此项币种,请选择其他变更币种!"
);
nowItem
.
CurrencyId
=
''
;
nowItem
.
CurrencyId
=
''
;
return
;
return
;
}
}
if
(
this
.
costCurrencyList
!=
null
&&
this
.
costCurrencyList
.
length
>
0
)
{
if
(
this
.
costCurrencyList
!=
null
&&
this
.
costCurrencyList
.
length
>
0
)
{
var
typeIndex
=
this
.
dataList
[
index
];
var
typeIndex
=
this
.
dataList
[
index
];
var
costCurrency
=
this
.
costCurrencyList
.
find
(
item
=>
item
.
CurrencyId
==
typeIndex
.
CurrencyId
);
//币种信息
var
costCurrency
=
this
.
costCurrencyList
.
find
(
item
=>
item
.
CurrencyId
==
typeIndex
.
CurrencyId
);
//币种信息
//查找人数信息
//查找人数信息
var
costNumber
=
{};
var
costNumber
=
{};
if
(
this
.
costNumberList
.
length
>
index
){
if
(
this
.
costNumberList
.
length
>
index
)
{
costNumber
=
this
.
costNumberList
[
index
];
costNumber
=
this
.
costNumberList
[
index
];
}
}
else
{
else
{
costNumber
=
this
.
costNumberList
[
0
];
costNumber
=
this
.
costNumberList
[
0
];
}
}
// 使用find方法查找value为3的对象
// 使用find方法查找value为3的对象
let
hasCurrencyId
=
this
.
dataList
.
findIndex
(
item
=>
item
.
CurrencyId
===
nowItem
.
CurrencyId
)
let
hasCurrencyId
=
this
.
dataList
.
findIndex
(
item
=>
item
.
CurrencyId
===
nowItem
.
CurrencyId
)
const
nowData
=
this
.
dataList
[
hasCurrencyId
];
const
nowData
=
this
.
dataList
[
hasCurrencyId
];
// 创建深拷贝(避免引用问题)
// 创建深拷贝(避免引用问题)
const
newData
=
JSON
.
parse
(
JSON
.
stringify
(
nowData
));
const
newData
=
JSON
.
parse
(
JSON
.
stringify
(
nowData
));
newData
.
PeopleNumber
=
costNumber
.
PeopleNumber
;
newData
.
PeopleNumber
=
costNumber
.
PeopleNumber
;
newData
.
CostId
=
costNumber
.
Id
;
newData
.
CostId
=
costNumber
.
Id
;
newData
.
NewPeopleNumber
=
Number
(
0
)
-
Number
(
newData
.
PeopleNumber
);
//costNumber.PeopleNumber;
newData
.
NewPeopleNumber
=
0
;
//costNumber.PeopleNumber;
newData
.
ExchangeRate
=
costCurrency
.
ExchangeRate
;
newData
.
ExchangeRate
=
costCurrency
.
ExchangeRate
;
newData
.
NewExchangeRate
=
Number
(
0
)
-
Number
(
newData
.
ExchangeRate
);
//costCurrency.ExchangeRate;
newData
.
NewExchangeRate
=
0
;
//costCurrency.ExchangeRate;
newData
.
ChangeRemarks
=
"人数/汇率变更"
;
newData
.
ChangeRemarks
=
""
;
console
.
log
(
"newData"
,
newData
);
// 替换原对象
// 替换原对象
this
.
$set
(
this
.
dataList
,
hasCurrencyId
,
newData
);
this
.
$set
(
this
.
dataList
,
hasCurrencyId
,
newData
);
this
.
getOfferChange
();
this
.
getOfferChange
();
...
@@ -179,25 +155,25 @@
...
@@ -179,25 +155,25 @@
},
},
AddOfferObj
()
{
AddOfferObj
()
{
var
obj
=
{
var
obj
=
{
ChangeId
:
0
,
ChangeId
:
0
,
OfferId
:
0
,
OfferId
:
0
,
EidtType
:
3
,
EidtType
:
3
,
DayNum
:
0
,
DayNum
:
0
,
ChangeType
:
8
,
ChangeType
:
8
,
ChangeValue
:
0
,
ChangeValue
:
0
,
ChangeRemarks
:
"
"
,
ChangeRemarks
:
"人数/汇率变更
"
,
OldPrice
:
0
,
OldPrice
:
0
,
DJPrice
:
0
,
DJPrice
:
0
,
CostId
:
0
,
CostId
:
0
,
PeopleNumber
:
0
,
PeopleNumber
:
0
,
ExchangeRate
:
0
,
ExchangeRate
:
0
,
CurrencyId
:
''
,
CurrencyId
:
''
,
NewExchangeRate
:
0
,
NewExchangeRate
:
0
,
NewPeopleNumber
:
0
,
NewPeopleNumber
:
0
,
}
}
obj
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
obj
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
obj
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
obj
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
if
(
this
.
dataList
.
length
<
this
.
costCurrencyList
.
length
)
{
if
(
this
.
dataList
.
length
<
this
.
costCurrencyList
.
length
)
{
this
.
dataList
.
push
(
obj
);
this
.
dataList
.
push
(
obj
);
}
}
},
},
...
@@ -231,36 +207,37 @@
...
@@ -231,36 +207,37 @@
},
},
//向父组件传递选中酒店
//向父组件传递选中酒店
saveOfferChange
()
{
saveOfferChange
()
{
var
tempMsg
=
[];
var
tempMsg
=
[];
var
changeList
=
[];
var
changeList
=
[];
if
(
this
.
dataList
!=
null
&&
this
.
dataList
.
length
>
0
)
{
if
(
this
.
dataList
!=
null
&&
this
.
dataList
.
length
>
0
)
{
this
.
dataList
.
forEach
(
item
=>
{
this
.
dataList
.
forEach
(
item
=>
{
if
(
item
.
CurrencyId
!=
""
&&
item
.
CurrencyId
>
0
){
if
(
item
.
CurrencyId
!=
""
&&
item
.
CurrencyId
>
0
)
{
changeList
.
push
(
{
changeList
.
push
({
CurrencyId
:
item
.
CurrencyId
,
CurrencyId
:
item
.
CurrencyId
,
OfferId
:
item
.
OfferId
,
OfferId
:
item
.
OfferId
,
CostId
:
item
.
CostId
,
CostId
:
item
.
CostId
,
PeopleNumber
:
item
.
NewPeopleNumber
,
PeopleNumber
:
item
.
NewPeopleNumber
,
ExchangeRate
:
item
.
NewExchangeRate
,
ExchangeRate
:
item
.
NewExchangeRate
,
ChangeRemarks
:
item
.
ChangeRemarks
,
});
ChangeRemarks
:
item
.
ChangeRemarks
,
});
}
}
});
});
if
(
changeList
==
null
||
changeList
.
length
==
0
)
{
if
(
changeList
==
null
||
changeList
.
length
==
0
)
{
this
.
Error
(
"请选择变更类型"
);
this
.
Error
(
"请选择变更类型"
);
return
;
return
;
}
}
tempMsg
.
push
({
tempMsg
.
push
({
ChangeId
:
this
.
dataList
[
0
].
ChangeId
,
ChangeId
:
this
.
dataList
[
0
].
ChangeId
,
OfferId
:
this
.
dataList
[
0
].
OfferId
,
OfferId
:
this
.
dataList
[
0
].
OfferId
,
EidtType
:
this
.
dataList
[
0
].
EidtType
,
EidtType
:
this
.
dataList
[
0
].
EidtType
,
DayNum
:
0
,
DayNum
:
0
,
ChangeType
:
this
.
dataList
[
0
].
ChangeType
,
ChangeType
:
this
.
dataList
[
0
].
ChangeType
,
ChangeValue
:
0
,
ChangeValue
:
0
,
ChangeRemarks
:
'
'
,
ChangeRemarks
:
'人数/汇率变更
'
,
OldPrice
:
0
,
OldPrice
:
0
,
DJPrice
:
0
,
DJPrice
:
0
,
ChangeContent
:
JSON
.
stringify
(
changeList
),
ChangeContent
:
JSON
.
stringify
(
changeList
),
HotelList
:[]
HotelList
:
[]
});
});
this
.
apipost
(
"travel_post_SetChangeOffer"
,
tempMsg
,
res
=>
{
this
.
apipost
(
"travel_post_SetChangeOffer"
,
tempMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
...
@@ -271,8 +248,7 @@
...
@@ -271,8 +248,7 @@
this
.
Error
(
res
.
data
.
message
);
this
.
Error
(
res
.
data
.
message
);
}
}
});
});
}
}
else
{
else
{
var
searchParmeters
=
{
var
searchParmeters
=
{
EidtType
:
0
,
EidtType
:
0
,
OfferId
:
0
,
OfferId
:
0
,
...
@@ -294,9 +270,6 @@
...
@@ -294,9 +270,6 @@
}
}
);
);
}
}
},
},
//查询价格变更信息
//查询价格变更信息
getOfferChange
()
{
getOfferChange
()
{
...
@@ -313,65 +286,61 @@
...
@@ -313,65 +286,61 @@
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempArray
=
res
.
data
.
data
;
var
tempArray
=
res
.
data
.
data
;
if
(
tempArray
!=
null
&&
tempArray
.
length
>
0
){
if
(
tempArray
!=
null
&&
tempArray
.
length
>
0
)
{
tempArray
.
forEach
(
item
=>
{
tempArray
.
forEach
(
item
=>
{
var
ChangeContentList
=
JSON
.
parse
(
item
.
ChangeContent
);
var
ChangeContentList
=
JSON
.
parse
(
item
.
ChangeContent
);
ChangeContentList
.
forEach
(
ChangeContentModel
=>
{
ChangeContentList
.
forEach
(
ChangeContentModel
=>
{
let
hasCurrencyId
=
this
.
dataList
.
findIndex
(
itemd
=>
itemd
.
CurrencyId
===
ChangeContentModel
.
CurrencyId
)
let
hasCurrencyId
=
this
.
dataList
.
findIndex
(
itemd
=>
itemd
.
CurrencyId
===
console
.
log
(
"hasCurrencyId"
,
hasCurrencyId
);
ChangeContentModel
.
CurrencyId
)
if
(
hasCurrencyId
!=-
1
)
{
if
(
hasCurrencyId
!=
-
1
)
{
const
nowData
=
this
.
dataList
[
hasCurrencyId
];
const
nowData
=
this
.
dataList
[
hasCurrencyId
];
// 创建深拷贝(避免引用问题)
// 创建深拷贝(避免引用问题)
const
newData
=
JSON
.
parse
(
JSON
.
stringify
(
nowData
));
const
newData
=
JSON
.
parse
(
JSON
.
stringify
(
nowData
));
newData
.
NewPeopleNumber
=
ChangeContentModel
.
PeopleNumber
;
newData
.
NewPeopleNumber
=
ChangeContentModel
.
PeopleNumber
;
newData
.
NewExchangeRate
=
ChangeContentModel
.
ExchangeRate
;
newData
.
NewExchangeRate
=
ChangeContentModel
.
ExchangeRate
;
newData
.
ChangeRemarks
=
ChangeContentModel
.
ChangeRemarks
;
newData
.
ChangeRemarks
=
ChangeContentModel
.
ChangeRemarks
;
newData
.
ChangeId
=
item
.
ChangeId
;
newData
.
ChangeId
=
item
.
ChangeId
;
newData
.
CostId
=
ChangeContentModel
.
CostId
;
newData
.
CostId
=
ChangeContentModel
.
CostId
;
// 替换原对象
// 替换原对象
this
.
$set
(
this
.
dataList
,
hasCurrencyId
,
newData
);
this
.
$set
(
this
.
dataList
,
hasCurrencyId
,
newData
);
}
}
else
{
else
{
var
obj
=
{
var
obj
=
{
ChangeId
:
item
.
ChangeId
,
ChangeId
:
item
.
ChangeId
,
OfferId
:
0
,
OfferId
:
0
,
EidtType
:
3
,
EidtType
:
3
,
DayNum
:
0
,
DayNum
:
0
,
ChangeType
:
8
,
ChangeType
:
8
,
ChangeValue
:
0
,
ChangeValue
:
0
,
ChangeRemarks
:
ChangeContentModel
.
ChangeRemarks
,
ChangeRemarks
:
ChangeContentModel
.
ChangeRemarks
,
OldPrice
:
0
,
OldPrice
:
0
,
DJPrice
:
0
,
DJPrice
:
0
,
CostId
:
ChangeContentModel
.
CostId
,
CostId
:
ChangeContentModel
.
CostId
,
PeopleNumber
:
0
,
PeopleNumber
:
0
,
ExchangeRate
:
0
,
ExchangeRate
:
0
,
CurrencyId
:
ChangeContentModel
.
CurrencyId
,
CurrencyId
:
ChangeContentModel
.
CurrencyId
,
NewExchangeRate
:
ChangeContentModel
.
ExchangeRate
,
NewExchangeRate
:
ChangeContentModel
.
ExchangeRate
,
NewPeopleNumber
:
ChangeContentModel
.
PeopleNumber
,
NewPeopleNumber
:
ChangeContentModel
.
PeopleNumber
,
}
}
let
hasOCurrencyId
=
this
.
costCurrencyList
.
findIndex
(
item
=>
item
.
CurrencyId
===
ChangeContentModel
.
CurrencyId
)
let
hasOCurrencyId
=
this
.
costCurrencyList
.
findIndex
(
item
=>
item
.
CurrencyId
===
ChangeContentModel
.
CurrencyId
)
obj
.
ExchangeRate
=
this
.
costCurrencyList
[
hasOCurrencyId
].
ExchangeRate
;
obj
.
ExchangeRate
=
this
.
costCurrencyList
[
hasOCurrencyId
].
ExchangeRate
;
//查找人数信息
//查找人数信息
var
costNumber
=
{};
var
costNumber
=
{};
if
(
this
.
costNumberList
.
length
>
hasOCurrencyId
){
if
(
this
.
costNumberList
.
length
>
hasOCurrencyId
)
{
costNumber
=
this
.
costNumberList
[
hasOCurrencyId
];
costNumber
=
this
.
costNumberList
[
hasOCurrencyId
];
}
}
else
{
else
{
costNumber
=
this
.
costNumberList
[
0
];
costNumber
=
this
.
costNumberList
[
0
];
}
}
obj
.
PeopleNumber
=
costNumber
.
PeopleNumber
;
obj
.
PeopleNumber
=
costNumber
.
PeopleNumber
;
obj
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
obj
.
OfferId
=
this
.
OfferCurrency
.
OfferId
;
obj
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
obj
.
EidtType
=
this
.
OfferCurrency
.
EditType
;
this
.
dataList
.
push
(
obj
);
this
.
dataList
.
push
(
obj
);
}
}
});
});
});
});
}
}
}
}
});
});
},
},
...
...
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