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
32ce666e
Commit
32ce666e
authored
May 12, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
dc3caee0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
841 additions
and
114 deletions
+841
-114
HotelProductManage2.vue
src/components/Hotel/HotelProductManage2.vue
+2
-1
QuotationPrice_SWT.vue
...s/TravelManager/TravelNewQuotation/QuotationPrice_SWT.vue
+839
-113
No files found.
src/components/Hotel/HotelProductManage2.vue
View file @
32ce666e
...
@@ -177,7 +177,8 @@
...
@@ -177,7 +177,8 @@
<el-input-number
v-model=
"msg2.FreeRoomNum"
:precision=
"2"
:min=
"0"
<el-input-number
v-model=
"msg2.FreeRoomNum"
:precision=
"2"
:min=
"0"
@
keyup
.
native=
"checkPrice(msg2,'FreeRoomNum')"
maxlength=
"10"
></el-input-number>
@
keyup
.
native=
"checkPrice(msg2,'FreeRoomNum')"
maxlength=
"10"
></el-input-number>
</el-form-item>
</el-form-item>
</el-col
<el-col
:span="6"
>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
:label=
"$t('ground.biaozhunjiancb')"
>
<el-form-item
:label=
"$t('ground.biaozhunjiancb')"
>
<el-input-number
v-model=
"msg2.CostPrice"
:precision=
"2"
:min=
"0"
<el-input-number
v-model=
"msg2.CostPrice"
:precision=
"2"
:min=
"0"
@
keyup
.
native=
"checkPrice(msg2,'CostPrice')"
maxlength=
"10"
></el-input-number>
@
keyup
.
native=
"checkPrice(msg2,'CostPrice')"
maxlength=
"10"
></el-input-number>
...
...
src/components/TravelManager/TravelNewQuotation/QuotationPrice_SWT.vue
View file @
32ce666e
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
<thead>
<thead>
<tr>
<tr>
<td
colspan=
"10"
>
<td
colspan=
"10"
>
<button
class=
"hollowFixedBtn"
@
click=
"SaveData()"
>
保存
</button>
<button
class=
"hollowFixedBtn"
@
click=
"SaveData()"
>
保存
</button>
</td>
</td>
</tr>
</tr>
...
@@ -39,7 +38,7 @@
...
@@ -39,7 +38,7 @@
<tbody
title=
"线路.系列.团名"
>
<tbody
title=
"线路.系列.团名"
>
<tr>
<tr>
<td
colspan=
"2"
class=
"ComTitle"
>
<td
colspan=
"2"
class=
"ComTitle"
>
线
路
線
路
</td>
</td>
<td
colspan=
"3"
>
<td
colspan=
"3"
>
<el-select
v-model=
"postData.LineId"
class=
'w200'
filterable
:placeholder=
"$t('pub.pleaseSel')"
<el-select
v-model=
"postData.LineId"
class=
'w200'
filterable
:placeholder=
"$t('pub.pleaseSel')"
...
@@ -62,7 +61,7 @@
...
@@ -62,7 +61,7 @@
</tr>
</tr>
<tr>
<tr>
<td
colspan=
"2"
class=
"ComTitle"
>
<td
colspan=
"2"
class=
"ComTitle"
>
团
名
團
名
</td>
</td>
<td
colspan=
"8"
>
<td
colspan=
"8"
>
<el-input
v-model=
"postData.Title"
placeholder=
"出團名稱"
></el-input>
<el-input
v-model=
"postData.Title"
placeholder=
"出團名稱"
></el-input>
...
@@ -76,7 +75,7 @@
...
@@ -76,7 +75,7 @@
TO:
TO:
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
天
数
天
數
</td>
</td>
<td>
<td>
<el-input
v-model=
"postData.AirLineName"
placeholder=
"台中連發"
></el-input>
<el-input
v-model=
"postData.AirLineName"
placeholder=
"台中連發"
></el-input>
...
@@ -84,7 +83,7 @@
...
@@ -84,7 +83,7 @@
<td>
<td>
</td>
</td>
<td
rowspan=
"3"
class=
"ComTitle"
>
<td
rowspan=
"3"
class=
"ComTitle"
>
航班
时间
航班
時間:
</td>
</td>
<td>
<td>
<template
v-if=
"postData.SWTFlightList&&postData.SWTFlightList.length>=1"
>
<template
v-if=
"postData.SWTFlightList&&postData.SWTFlightList.length>=1"
>
...
@@ -110,7 +109,8 @@
...
@@ -110,7 +109,8 @@
maxlength=
"2"
></el-input>
maxlength=
"2"
></el-input>
</td>
</td>
<td>
<td>
<el-date-picker
v-model=
"postData.StartDate"
type=
"date"
clearable
placeholder=
"2020/09/30前走完行程"
>
<el-date-picker
v-model=
"postData.StartDate"
type=
"date"
value-format=
"yyyy-MM-dd"
clearable
placeholder=
"2020/09/30前走完行程"
>
</el-date-picker>
</el-date-picker>
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
...
@@ -138,15 +138,15 @@
...
@@ -138,15 +138,15 @@
</tr>
</tr>
<tr>
<tr>
<td
colspan=
"3"
class=
"ComTitle"
>
<td
colspan=
"3"
class=
"ComTitle"
>
适用人数
適用人數:
</td>
</td>
<td>
<td>
<el-input
v-model=
"postData.GuestNum"
@
keyup
.
native=
"checkInteger(postData,'GuestNum')
"
placeholder=
"旅客人数
"
<el-input
v-model=
"postData.GuestNum"
@
keyup
.
native=
"checkInteger(postData,'GuestNum')
,GetPeople()
"
maxlength=
"2"
></el-input>
placeholder=
"旅客人数"
maxlength=
"2"
></el-input>
</td>
</td>
<td>
<td>
<el-input
v-model=
"postData.FocNum"
@
keyup
.
native=
"checkInteger(postData,'FocNum')
"
placeholder=
"FOC
"
<el-input
v-model=
"postData.FocNum"
@
keyup
.
native=
"checkInteger(postData,'FocNum')
,GetPeople()
"
maxlength=
"2"
></el-input>
placeholder=
"FOC"
maxlength=
"2"
></el-input>
</td>
</td>
<td>
<td>
<
template
v-if=
"postData.SWTFlightList&&postData.SWTFlightList.length>=3"
>
<
template
v-if=
"postData.SWTFlightList&&postData.SWTFlightList.length>=3"
>
...
@@ -287,8 +287,6 @@
...
@@ -287,8 +287,6 @@
<el-input
v-model=
"postData.SURCHARGE"
placeholder=
" (09/02,12/24.31)公眾假期價格另議"
maxlength=
"100"
></el-input>
<el-input
v-model=
"postData.SURCHARGE"
placeholder=
" (09/02,12/24.31)公眾假期價格另議"
maxlength=
"100"
></el-input>
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
酒店减免:
<el-input
v-model=
"postData.HotelDisNum"
@
keyup
.
native=
"checkInteger(postData,'HotelDisNum')"
placeholder=
"FOC"
maxlength=
"2"
></el-input>
</td>
</td>
<td
colspan=
"2"
>
<td
colspan=
"2"
>
</td>
</td>
...
@@ -296,7 +294,18 @@
...
@@ -296,7 +294,18 @@
</tbody>
</tbody>
<tbody
title=
"酒店"
>
<tbody
title=
"酒店"
>
<tr>
<tr>
<td
colspan=
"10"
>
<td
colspan=
"7"
>
飯店
</td>
<td>
酒店減免:
</td>
<td>
<el-input
v-model=
"postData.HotelDisNum"
@
keyup
.
native=
"checkInteger(postData,'HotelDisNum'),GetHotelCalc()"
placeholder=
"酒店減免"
maxlength=
"2"
>
</el-input>
</td>
<td>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -304,7 +313,7 @@
...
@@ -304,7 +313,7 @@
飯店
飯店
</td>
</td>
<td
class=
"ComTitle"
colspan=
"2"
>
<td
class=
"ComTitle"
colspan=
"2"
>
酒店名称
飯店名稱
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
美金
美金
...
@@ -319,10 +328,10 @@
...
@@ -319,10 +328,10 @@
房/人數
房/人數
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
减
免人數
減
免人數
</td>
</td>
<td
class=
"ComTitle"
colspan=
"2"
>
<td
class=
"ComTitle"
colspan=
"2"
>
合
计
合
計
</td>
</td>
</tr>
</tr>
<tr
v-for=
"(hItem,hIndex) in postData.SWTHotelList"
:key=
"hIndex"
>
<tr
v-for=
"(hItem,hIndex) in postData.SWTHotelList"
:key=
"hIndex"
>
...
@@ -330,18 +339,25 @@
...
@@ -330,18 +339,25 @@
D{{hItem.DayNum}}
D{{hItem.DayNum}}
</td>
</td>
<td>
<td>
<el-select
v-model=
"hItem.HotelId"
class=
'w200'
filterable
:placeholder=
"$t('pub.pleaseSel')"
>
<el-select
v-model=
"hItem.HotelId"
class=
'w200'
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
visible-change=
"GetHotelList($event,hItem)"
@
change=
"GetHotelItem(hItem),GetHotelCalc()"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'0'
></el-option>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'0'
></el-option>
<el-option
v-for=
"(subItem,subIndex) in hItem.HotelList"
:value=
"subItem.ID"
:label=
"subItem.Name"
:key=
"subIndex"
></el-option>
</el-select>
</el-select>
</td>
</td>
<td>
<td>
{{hItem.USPrice}}
<el-input
v-model=
"hItem.USPrice"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(hItem,'USPrice'),GetHotelCalc()"
placeholder=
"美金"
></el-input>
</td>
</td>
<td>
<td>
{{hItem.VNDPrice}}
<el-input
v-model=
"hItem.VNDPrice"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(hItem,'VNDPrice'),GetHotelCalc()"
placeholder=
"越盾"
>
</el-input>
</td>
</td>
<td>
<td>
{{hItem.Times}}
<el-input
v-model=
"hItem.Times"
@
keyup
.
native=
"checkInteger(hItem,'Times'),GetHotelCalc()"
placeholder=
"次/N數"
maxlength=
"1"
></el-input>
</td>
</td>
<td>
<td>
{{hItem.TotalNum}}
{{hItem.TotalNum}}
...
@@ -357,6 +373,32 @@
...
@@ -357,6 +373,32 @@
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
<tbody
title=
"酒店合计"
>
<tr>
<td
colspan=
"2"
>
</td>
<td>
</td>
<td>
US合計:{{HotelSum.USPriceSum}}
</td>
<td>
VND合計:{{HotelSum.VNDPriceSum}}
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
{{HotelSum.USTotalSum}}
</td>
<td>
{{HotelSum.VNDTotalSum}}
</td>
</tr>
</tbody>
<tbody
title=
"餐食"
>
<tbody
title=
"餐食"
>
<tr>
<tr>
<td
colspan=
"10"
>
<td
colspan=
"10"
>
...
@@ -367,22 +409,21 @@
...
@@ -367,22 +409,21 @@
餐食
餐食
</td>
</td>
<td>
<td>
餐食減免:
</td>
</td>
<td>
<td>
<el-input
v-model=
"postData.DinnerDisNum"
@
keyup
.
native=
"checkInteger(postData,'DinnerDisNum'),GetDinnerCalc()"
placeholder=
"餐食減免"
maxlength=
"2"
>
</el-input>
</td>
</td>
<td>
<td>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
<td
colspan=
"2"
>
</td>
<td>
</td>
<td
class=
"ComTitle"
>
地 區
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
單 位
餐食名稱
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
美金
美金
...
@@ -394,43 +435,95 @@
...
@@ -394,43 +435,95 @@
次/N數
次/N數
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
人數
人數/FOC
</td>
<td
class=
"ComTitle"
>
減免人數
</td>
</td>
<td
class=
"ComTitle"
colspan=
"2"
>
<td
class=
"ComTitle"
colspan=
"2"
>
合
计
合
計
</td>
</td>
</tr>
</tr>
<
template
v-for=
"(subItem,subIndex) in postData.SWTDinnerList"
>
<tr
v-for=
"(childItem,childIndex) in subItem.SubDinnerList"
>
<td
v-if=
"childIndex==0"
:rowspan=
"3"
>
D
{{
subItem
.
DayNum
}}
</td>
<td>
<template
v-if=
"childItem.DinnerType==1"
>
早餐
</
template
>
<
template
v-if=
"childItem.DinnerType==2"
>
午餐
</
template
>
<
template
v-if=
"childItem.DinnerType==3"
>
晚餐
</
template
>
</td>
<td>
<el-select
v-model=
"childItem.DinnerId"
class=
'w200'
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
visible-change=
"GetDinnerList($event,subItem,childItem)"
@
change=
"GetDinnerItem(childItem),GetDinnerCalc()"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'0'
></el-option>
<el-option
v-for=
"(qitem,qindex) in childItem.DinnerList"
:value=
"qitem.ID"
:label=
"qitem.Name"
:key=
"qindex"
></el-option>
</el-select>
</td>
<td>
<el-input
v-model=
"childItem.USPrice"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(childItem,'USPrice'),GetDinnerCalc()"
placeholder=
"美金"
></el-input>
</td>
<td>
<el-input
v-model=
"childItem.VNDPrice"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(childItem,'VNDPrice'),GetDinnerCalc()"
placeholder=
"越盾"
>
</el-input>
</td>
<td>
<el-input
v-model=
"childItem.Times"
@
keyup
.
native=
"checkInteger(childItem,'Times'),GetDinnerCalc()"
placeholder=
"次/N數"
maxlength=
"1"
></el-input>
</td>
<td>
{{childItem.TotalNum}}/ {{childItem.FOCNum}}
</td>
<td>
{{childItem.DinnerDisNum}}
</td>
<td>
{{childItem.USSubTotal}}
</td>
<td>
{{childItem.VNDSubTotal}}
</td>
</tr>
</template>
</tbody>
<tbody
title=
"餐厅合计"
>
<tr>
<tr>
<td>
<td
colspan=
"2"
>
D1
</td>
</td>
<td>
<td>
</td>
</td>
<td>
<td>
US合計:{{DinnerSum.USPriceSum}}
</td>
</td>
<td>
<td>
VND合計:{{DinnerSum.VNDPriceSum}}
</td>
</td>
<td>
<td>
</td>
</td>
<td>
<td>
</td>
</td>
<td>
<td>
1
</td>
</td>
<td>
<td>
1
{{DinnerSum.USTotalSum}}
</td>
</td>
<td
colspan=
"2"
>
<td>
0
{{DinnerSum.VNDTotalSum}}
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
<tbody
title=
"景點門票"
>
<tbody
title=
"景點門票"
>
<tr>
<tr>
<td
colspan=
"10"
>
<td
colspan=
"10"
>
...
@@ -441,22 +534,21 @@
...
@@ -441,22 +534,21 @@
景點門票
景點門票
</td>
</td>
<td>
<td>
景點減免:
</td>
</td>
<td>
<td>
<el-input
v-model=
"postData.TicketDisNum"
@
keyup
.
native=
"checkInteger(postData,'TicketDisNum'),GetScenicCalc()"
placeholder=
"景點減免"
maxlength=
"2"
>
</el-input>
</td>
</td>
<td>
<td>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
<td
class=
"ComTitle"
colspan=
"2"
>
</td>
<td>
</td>
<td
class=
"ComTitle"
>
地 區
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
單 位
景點門票
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
美金
美金
...
@@ -470,37 +562,84 @@
...
@@ -470,37 +562,84 @@
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
房/人數
房/人數
</td>
</td>
<td
class=
"ComTitle"
>
減免人數
</td>
<td
class=
"ComTitle"
colspan=
"2"
>
<td
class=
"ComTitle"
colspan=
"2"
>
合计
合计
</td>
</td>
</tr>
</tr>
<
template
v-for=
"(subItem,subIndex) in postData.SWTTicketList"
>
<tr
v-for=
"(childItem,childIndex) in subItem.SubTicketList"
>
<td
v-if=
"childIndex==0"
:rowspan=
"subItem.SubTicketList.length"
colspan=
"2"
>
D
{{
subItem
.
DayNum
}}
</td>
<td>
<template
v-if=
"childIndex==0"
>
<a
style=
"cursor:pointer;color:blue;"
@
click=
"AddTicket(subItem)"
>
添加
</a>
</
template
>
<
template
v-if=
"childIndex!=0"
>
<a
style=
"cursor:pointer;color:blue;"
@
click=
"DeleteTicket(subItem,childIndex)"
>
删除
</a>
</
template
>
<el-select
v-model=
"childItem.CouponsId"
class=
'w200'
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
visible-change=
"GetScenicList($event,subItem,childItem)"
@
change=
"GetScenicItem(childItem),GetScenicCalc()"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'0'
></el-option>
<el-option
v-for=
"(qitem,qindex) in childItem.TicketList"
:value=
"qitem.ID"
:label=
"qitem.Name"
:key=
"qindex"
></el-option>
</el-select>
</td>
<td>
<el-input
v-model=
"childItem.USPrice"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(childItem,'USPrice'),GetScenicCalc()"
placeholder=
"美金"
></el-input>
</td>
<td>
<el-input
v-model=
"childItem.VNDPrice"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(childItem,'VNDPrice'),GetScenicCalc()"
placeholder=
"越盾"
>
</el-input>
</td>
<td>
<el-input
v-model=
"childItem.Times"
@
keyup
.
native=
"checkInteger(childItem,'Times'),GetScenicCalc()"
placeholder=
"次/N數"
maxlength=
"1"
></el-input>
</td>
<td>
{{childItem.TotalNum}}/ {{childItem.FOCNum}}
</td>
<td>
{{childItem.TicketDisNum}}
</td>
<td>
{{childItem.USSubTotal}}
</td>
<td>
{{childItem.VNDSubTotal}}
</td>
</tr>
</template>
</tbody>
<tbody
title=
"景点门票合计"
>
<tr>
<tr>
<td>
<td
colspan=
"2"
>
D1
</td>
</td>
<td>
<td>
</td>
</td>
<td>
<td>
US合計:{{TicketSum.USPriceSum}}
</td>
</td>
<td>
<td>
VND合計:{{TicketSum.VNDPriceSum}}
</td>
</td>
<td>
<td>
</td>
</td>
<td>
<td>
</td>
</td>
<td>
<td>
1
</td>
</td>
<td>
<td>
1
{{TicketSum.USTotalSum}}
</td>
</td>
<td
colspan=
"2"
>
<td>
0
{{TicketSum.VNDTotalSum}}
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
...
@@ -515,21 +654,22 @@
...
@@ -515,21 +654,22 @@
車資
車資
</td>
</td>
<td>
<td>
車型:
</td>
</td>
<td>
<td>
<el-select
v-model=
"postData.BusPriceId"
class=
'w200'
filterable
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'0'
></el-option>
<el-option
v-for=
"(qitem,qindex) in BusTypeList"
:value=
"qitem.Id"
:label=
"qitem.newName"
:key=
"qindex"
>
</el-option>
</el-select>
</td>
</td>
<td>
<td>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
<td
colspan=
"2"
>
</td>
<td>
</td>
<td
class=
"ComTitle"
>
車資
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
colspan=
"2"
>
行程
行程
</td>
</td>
<td
class=
"ComTitle"
>
<td
class=
"ComTitle"
>
...
@@ -548,33 +688,66 @@
...
@@ -548,33 +688,66 @@
合计
合计
</td>
</td>
</tr>
</tr>
<
template
v-for=
"(subItem,subIndex) in postData.SWTBusList"
>
<tr
v-for=
"(childItem,childIndex) in subItem.SubBusList"
>
<td
v-if=
"childIndex==0"
:rowspan=
"subItem.SubBusList.length"
colspan=
"2"
>
D
{{
subItem
.
DayNum
}}
</td>
<td
colspan=
"2"
>
<template
v-if=
"childIndex==0"
>
<a
style=
"cursor:pointer;color:blue;"
@
click=
"AddBus(subItem)"
>
添加
</a>
</
template
>
<
template
v-if=
"childIndex!=0"
>
<a
style=
"cursor:pointer;color:blue;"
@
click=
"DeleteBus(subItem,childIndex)"
>
删除
</a>
</
template
>
<el-select
v-model=
"childItem.BusConfigId"
class=
'w200'
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
visible-change=
"GetBusConfigList($event,subItem,childItem)"
@
change=
"GetBusItem(childItem),GetBusCalc()"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'0'
></el-option>
<el-option
v-for=
"(qitem,qindex) in childItem.BusList"
:value=
"qitem.Id"
:label=
"qitem.Trip"
:key=
"qindex"
></el-option>
</el-select>
</td>
<td>
<el-input
v-model=
"childItem.Kilometre"
maxlength=
"10"
@
keyup
.
native=
"checkInteger(childItem,'Kilometre')"
placeholder=
"公里數"
></el-input>
</td>
<td>
<el-input
v-model=
"childItem.VNDPrice"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(childItem,'VNDPrice'),GetBusCalc()"
placeholder=
"越盾"
>
</el-input>
</td>
<td>
<el-input
v-model=
"childItem.Times"
@
keyup
.
native=
"checkInteger(childItem,'Times'),GetBusCalc()"
placeholder=
"次/N數"
maxlength=
"1"
></el-input>
</td>
<td>
<el-input
v-model=
"childItem.Price"
@
keyup
.
native=
"checkPrice(childItem,'Price'),GetBusCalc()"
placeholder=
"次/N數"
maxlength=
"1"
></el-input>
</td>
<td
colspan=
"2"
>
{{childItem.VNDSubTotal}}
</td>
</tr>
</template>
</tbody>
<tbody
title=
"车资合计"
>
<tr>
<tr>
<td>
<td
colspan=
"2"
>
D1
</td>
<td>
</td>
<td>
</td>
</td>
<td>
<td
colspan=
"2"
>
</td>
</td>
<td>
<td>
{{BusSum.TotalKM}}
</td>
</td>
<td>
<td>
</td>
</td>
<td>
<td>
1
</td>
</td>
<td>
<td>
1
</td>
</td>
<td
colspan=
"2"
>
<td
colspan=
"2"
>
0
{{BusSum.VNDTotalSum}}
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
...
@@ -662,8 +835,7 @@
...
@@ -662,8 +835,7 @@
return
{
return
{
LineList
:
[],
//线路列表
LineList
:
[],
//线路列表
LineTeamList
:
[],
//系列列表
LineTeamList
:
[],
//系列列表
HotelList
:
[],
//酒店列表
DefaultCurrencyId
:
17
,
//默认为越南盾
DInnerList
:
[],
//餐厅列表
//基本配置
//基本配置
postData
:
{
postData
:
{
Id
:
0
,
Id
:
0
,
...
@@ -693,13 +865,41 @@
...
@@ -693,13 +865,41 @@
SWTDinnerList
:
[],
//餐厅信息
SWTDinnerList
:
[],
//餐厅信息
TicketDisNum
:
0
,
//景点免人数
TicketDisNum
:
0
,
//景点免人数
SWTTicketList
:
[],
//景点信息
SWTTicketList
:
[],
//景点信息
BusPriceId
:
0
,
//车辆报价编号
SWTBusList
:
[],
//车资明细
SWTBusList
:
[],
//车资明细
SWTShipList
:
[],
//船明细
SWTShipList
:
[],
//船明细
SWTOtherPayList
:
[],
//杂支信息
SWTOtherPayList
:
[],
//杂支信息
SWTSelfFeeList
:
[],
//自费明细
SWTSelfFeeList
:
[],
//自费明细
SWTTipFeeList
:
[],
//小费明细
SWTTipFeeList
:
[],
//小费明细
},
},
loading
:
false
BusTypeList
:
[],
//车辆类型
//酒店统计
HotelSum
:
{
USPriceSum
:
0
,
//美金单价统计
VNDPriceSum
:
0
,
//越盾单价统计
USTotalSum
:
0
,
//美金合计
VNDTotalSum
:
0
,
//越盾合计
},
//餐厅统计
DinnerSum
:
{
USPriceSum
:
0
,
//美金单价统计
VNDPriceSum
:
0
,
//越盾单价统计
USTotalSum
:
0
,
//美金合计
VNDTotalSum
:
0
,
//越盾合计
},
//景点门票统计
TicketSum
:
{
USPriceSum
:
0
,
//美金单价统计
VNDPriceSum
:
0
,
//越盾单价统计
USTotalSum
:
0
,
//美金合计
VNDTotalSum
:
0
,
//越盾合计
},
//车资统计
BusSum
:
{
TotalKM
:
0
,
//美金单价统计
VNDTotalSum
:
0
,
//越盾合计
},
loading
:
false
,
};
};
},
},
methods
:
{
methods
:
{
...
@@ -754,11 +954,6 @@
...
@@ -754,11 +954,6 @@
}
}
return
obj
;
return
obj
;
},
},
//酒店JSON格式
getHotelJson
()
{
var
obj
=
{};
return
obj
;
},
getData
()
{
getData
()
{
let
Id
=
0
;
let
Id
=
0
;
if
(
this
.
$route
.
query
.
Id
)
{
if
(
this
.
$route
.
query
.
Id
)
{
...
@@ -811,8 +1006,37 @@
...
@@ -811,8 +1006,37 @@
}
else
{
}
else
{
this
.
postData
.
SWTGuideList
.
push
(
this
.
getLeaderGuideJson
());
this
.
postData
.
SWTGuideList
.
push
(
this
.
getLeaderGuideJson
());
}
}
//酒店
this
.
postData
.
HotelDisNum
=
jsonData
.
HotelDisNum
;
if
(
jsonData
.
SWTHotelList
)
{
if
(
jsonData
.
SWTHotelList
)
{
this
.
postData
.
SWTHotelList
=
jsonData
.
SWTHotelList
;
this
.
postData
.
SWTHotelList
=
jsonData
.
SWTHotelList
;
this
.
GetHotelCalc
();
}
else
{
this
.
createHotel
();
}
//餐厅
this
.
postData
.
DinnerDisNum
=
jsonData
.
DinnerDisNum
;
if
(
jsonData
.
SWTDinnerList
)
{
this
.
postData
.
SWTDinnerList
=
jsonData
.
SWTDinnerList
;
this
.
GetDinnerCalc
()
}
else
{
this
.
createDinner
();
}
//景点
this
.
postData
.
TicketDisNum
=
jsonData
.
TicketDisNum
;
if
(
jsonData
.
SWTTicketList
)
{
this
.
postData
.
SWTTicketList
=
jsonData
.
SWTTicketList
;
this
.
GetScenicCalc
();
}
else
{
this
.
createTicket
();
}
//车资
this
.
postData
.
BusPriceId
=
jsonData
.
BusPriceId
;
if
(
jsonData
.
SWTBusList
)
{
this
.
postData
.
SWTBusList
=
jsonData
.
SWTBusList
;
this
.
GetBusCalc
();
}
else
{
this
.
createBus
();
}
}
}
}
}
}
...
@@ -829,27 +1053,363 @@
...
@@ -829,27 +1053,363 @@
}
}
});
});
},
},
//人数改变
GetPeople
()
{
if
(
this
.
postData
.
SWTHotelList
&&
this
.
postData
.
SWTHotelList
.
length
>
0
)
{
this
.
postData
.
SWTHotelList
.
forEach
(
item
=>
{
item
.
TotalNum
=
this
.
getPeopleNum
.
hotelNum
;
});
this
.
GetHotelCalc
()
}
if
(
this
.
postData
.
SWTDinnerList
&&
this
.
postData
.
SWTDinnerList
.
length
>
0
)
{
this
.
postData
.
SWTDinnerList
.
forEach
(
rootItem
=>
{
rootItem
.
SubDinnerList
.
forEach
(
iten
=>
{
item
.
TotalNum
=
this
.
getPeopleNum
.
totalNum
;
item
.
FOCNum
=
this
.
getPeopleNum
.
focNum
;
})
});
this
.
GetDinnerCalc
()
}
if
(
this
.
postData
.
SWTTicketList
&&
this
.
postData
.
SWTTicketList
.
length
>
0
)
{
this
.
postData
.
SWTTicketList
.
forEach
(
rootItem
=>
{
rootItem
.
SubDinnerList
.
forEach
(
iten
=>
{
item
.
TotalNum
=
this
.
getPeopleNum
.
totalNum
;
item
.
FOCNum
=
this
.
getPeopleNum
.
focNum
;
})
});
this
.
GetScenicCalc
()
}
},
//获取酒店列表
//获取酒店列表
GetHotelList
()
{
GetHotelList
(
event
,
item
)
{
this
.
apipost
(
"travel_post_SetBaoJiaDanSwtService"
,
this
.
postData
,
res
=>
{
var
newDate
=
""
;
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
this
.
postData
.
StartDate
)
{
var
newDay
=
Number
(
item
.
DayNum
-
1
);
newDate
=
this
.
$commonUtils
.
AddDay
(
this
.
postData
.
StartDate
,
newDay
)
}
if
(
event
)
{
var
hMsg
=
{
QCountry
:
"1252"
,
sDate
:
newDate
};
this
.
apipost
(
"hotel_post_GetSwtHotelPriceList"
,
hMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
item
.
HotelList
=
res
.
data
.
data
;
}
});
}
},
//获取选中的酒店数据
GetHotelItem
(
currentItem
)
{
var
that
=
this
;
if
(
currentItem
.
HotelId
!=
0
)
{
//获取当前选中的对象
let
obj
=
{};
obj
=
currentItem
.
HotelList
.
find
(
item
=>
{
return
item
.
ID
===
currentItem
.
HotelId
;
//筛选出匹配数据
});
if
(
obj
!=
undefined
)
{
currentItem
.
VNDPrice
=
0
;
currentItem
.
USPrice
=
0
;
if
(
obj
.
CurrencyId
==
this
.
DefaultCurrencyId
)
{
if
(
obj
.
CostPrice
)
{
currentItem
.
VNDPrice
=
obj
.
CostPrice
;
}
}
else
{
if
(
obj
.
CostPrice
)
{
currentItem
.
USPrice
=
obj
.
CostPrice
;
}
}
currentItem
.
HotelName
=
obj
.
Name
;
}
}
});
}
},
//酒店计算
GetHotelCalc
()
{
if
(
this
.
postData
.
SWTHotelList
&&
this
.
postData
.
SWTHotelList
.
length
>
0
)
{
var
subUSPrice
=
0
;
var
subVNDPrice
=
0
;
var
totalUSPrice
=
0
;
var
totalVNDPrice
=
0
;
this
.
postData
.
SWTHotelList
.
forEach
(
item
=>
{
var
c_usprice
=
0
;
if
(
item
.
USPrice
)
{
c_usprice
=
item
.
USPrice
;
}
var
c_vndprice
=
0
;
if
(
item
.
VNDPrice
)
{
c_vndprice
=
item
.
VNDPrice
}
subUSPrice
+=
Number
(
c_usprice
);
subVNDPrice
+=
Number
(
c_vndprice
);
var
c_HotelDisNum
=
0
;
if
(
this
.
postData
.
HotelDisNum
)
{
c_HotelDisNum
=
this
.
postData
.
HotelDisNum
;
}
item
.
HotelDisNum
=
c_HotelDisNum
;
var
c_times
=
0
;
if
(
item
.
Times
)
{
c_times
=
item
.
Times
;
}
var
c_totalNum
=
0
;
if
(
item
.
TotalNum
)
{
c_totalNum
=
item
.
TotalNum
;
}
item
.
USSubTotal
=
(
parseFloat
(
c_usprice
)
*
parseFloat
(
c_times
)
*
(
c_totalNum
-
c_HotelDisNum
)).
toFixed
(
2
);
item
.
VNDSubTotal
=
(
parseFloat
(
c_vndprice
)
*
parseFloat
(
c_times
)
*
(
c_totalNum
-
c_HotelDisNum
))
.
toFixed
(
2
);
totalUSPrice
+=
parseFloat
(
item
.
USSubTotal
);
totalVNDPrice
+=
parseFloat
(
item
.
VNDSubTotal
);
});
this
.
HotelSum
.
USPriceSum
=
subUSPrice
.
toFixed
(
2
);
this
.
HotelSum
.
VNDPriceSum
=
subVNDPrice
.
toFixed
(
2
);
this
.
HotelSum
.
USTotalSum
=
totalUSPrice
.
toFixed
(
2
);
this
.
HotelSum
.
VNDTotalSum
=
totalVNDPrice
.
toFixed
(
2
);
}
},
},
//获取餐厅列表
//获取餐厅列表
GetDinnerList
()
{
GetDinnerList
(
event
,
item
,
subitem
)
{
this
.
apipost
(
"travel_post_SetBaoJiaDanSwtService"
,
this
.
postData
,
res
=>
{
var
newDate
=
""
;
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
this
.
postData
.
StartDate
)
{
var
newDay
=
Number
(
item
.
DayNum
-
1
);
newDate
=
this
.
$commonUtils
.
AddDay
(
this
.
postData
.
StartDate
,
newDay
)
}
if
(
event
)
{
var
hMsg
=
{
QCountrys
:
"1252"
,
StatisticsSTime
:
newDate
};
this
.
apipost
(
"dining_post_GetSWTDinnerListService"
,
hMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
subitem
.
DinnerList
=
res
.
data
.
data
;
}
});
}
},
//获取选中的餐厅数据
GetDinnerItem
(
currentItem
)
{
var
that
=
this
;
if
(
currentItem
.
DinnerId
!=
0
)
{
//获取当前选中的对象
let
obj
=
{};
obj
=
currentItem
.
DinnerList
.
find
(
item
=>
{
return
item
.
ID
===
currentItem
.
DinnerId
;
//筛选出匹配数据
});
if
(
obj
!=
undefined
)
{
currentItem
.
VNDPrice
=
0
;
currentItem
.
USPrice
=
0
;
if
(
obj
.
CurrencyId
==
this
.
DefaultCurrencyId
)
{
if
(
obj
.
CostPrice
)
{
currentItem
.
VNDPrice
=
obj
.
CostPrice
;
}
}
else
{
if
(
obj
.
CostPrice
)
{
currentItem
.
USPrice
=
obj
.
CostPrice
;
}
}
currentItem
.
DinnerName
=
obj
.
Name
;
}
}
},
//餐厅计算
GetDinnerCalc
()
{
if
(
this
.
postData
.
SWTDinnerList
&&
this
.
postData
.
SWTDinnerList
.
length
>
0
)
{
var
subUSPrice
=
0
;
var
subVNDPrice
=
0
;
var
totalUSPrice
=
0
;
var
totalVNDPrice
=
0
;
this
.
postData
.
SWTDinnerList
.
forEach
(
rootItem
=>
{
rootItem
.
SubDinnerList
.
forEach
(
item
=>
{
var
c_usprice
=
0
;
if
(
item
.
USPrice
)
{
c_usprice
=
item
.
USPrice
;
}
var
c_vndprice
=
0
;
if
(
item
.
VNDPrice
)
{
c_vndprice
=
item
.
VNDPrice
}
subUSPrice
+=
Number
(
c_usprice
);
subVNDPrice
+=
Number
(
c_vndprice
);
var
c_DinnerDisNum
=
0
;
if
(
this
.
postData
.
DinnerDisNum
)
{
c_DinnerDisNum
=
this
.
postData
.
DinnerDisNum
;
}
item
.
DinnerDisNum
=
c_DinnerDisNum
;
var
c_times
=
0
;
if
(
item
.
Times
)
{
c_times
=
item
.
Times
;
}
var
c_totalNum
=
0
;
if
(
item
.
TotalNum
)
{
c_totalNum
=
item
.
TotalNum
;
}
item
.
USSubTotal
=
(
parseFloat
(
c_usprice
)
*
parseFloat
(
c_times
)
*
(
c_totalNum
-
c_DinnerDisNum
))
.
toFixed
(
2
);
item
.
VNDSubTotal
=
(
parseFloat
(
c_vndprice
)
*
parseFloat
(
c_times
)
*
(
c_totalNum
-
c_DinnerDisNum
))
.
toFixed
(
2
);
totalUSPrice
+=
parseFloat
(
item
.
USSubTotal
);
totalVNDPrice
+=
parseFloat
(
item
.
VNDSubTotal
);
})
});
this
.
DinnerSum
.
USPriceSum
=
subUSPrice
.
toFixed
(
2
);
this
.
DinnerSum
.
VNDPriceSum
=
subVNDPrice
.
toFixed
(
2
);
this
.
DinnerSum
.
USTotalSum
=
totalUSPrice
.
toFixed
(
2
);
this
.
DinnerSum
.
VNDTotalSum
=
totalVNDPrice
.
toFixed
(
2
);
}
},
//获取景点列表
GetScenicList
(
event
,
item
,
subitem
)
{
var
newDate
=
""
;
if
(
this
.
postData
.
StartDate
)
{
var
newDay
=
Number
(
item
.
DayNum
-
1
);
newDate
=
this
.
$commonUtils
.
AddDay
(
this
.
postData
.
StartDate
,
newDay
)
}
if
(
event
)
{
var
hMsg
=
{
QCountrys
:
"1252"
,
StatisticsSTime
:
newDate
};
this
.
apipost
(
"ticketcoupons_post_GetSWTScienListService"
,
hMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
subitem
.
TicketList
=
res
.
data
.
data
;
}
});
}
},
//添加景点
AddTicket
(
item
)
{
item
.
SubTicketList
.
push
(
this
.
getTicketJson
());
},
//删除景点
DeleteTicket
(
item
,
subIndex
)
{
item
.
SubTicketList
.
splice
(
subIndex
,
1
);
},
//获取选中的景点数据
GetScenicItem
(
currentItem
)
{
var
that
=
this
;
if
(
currentItem
.
CouponsId
!=
0
)
{
//获取当前选中的对象
let
obj
=
{};
obj
=
currentItem
.
TicketList
.
find
(
item
=>
{
return
item
.
ID
===
currentItem
.
CouponsId
;
//筛选出匹配数据
});
if
(
obj
!=
undefined
)
{
currentItem
.
VNDPrice
=
0
;
currentItem
.
USPrice
=
0
;
if
(
obj
.
CurrencyId
==
this
.
DefaultCurrencyId
)
{
if
(
obj
.
CostPrice
)
{
currentItem
.
VNDPrice
=
obj
.
CostPrice
;
}
}
else
{
if
(
obj
.
CostPrice
)
{
currentItem
.
USPrice
=
obj
.
CostPrice
;
}
}
currentItem
.
CouponsName
=
obj
.
Name
;
}
}
});
}
},
//景点计算
GetScenicCalc
()
{
if
(
this
.
postData
.
SWTTicketList
&&
this
.
postData
.
SWTTicketList
.
length
>
0
)
{
var
subUSPrice
=
0
;
var
subVNDPrice
=
0
;
var
totalUSPrice
=
0
;
var
totalVNDPrice
=
0
;
this
.
postData
.
SWTTicketList
.
forEach
(
rootItem
=>
{
rootItem
.
SubTicketList
.
forEach
(
item
=>
{
var
c_usprice
=
0
;
if
(
item
.
USPrice
)
{
c_usprice
=
item
.
USPrice
;
}
var
c_vndprice
=
0
;
if
(
item
.
VNDPrice
)
{
c_vndprice
=
item
.
VNDPrice
}
subUSPrice
+=
Number
(
c_usprice
);
subVNDPrice
+=
Number
(
c_vndprice
);
var
c_DinnerDisNum
=
0
;
if
(
this
.
postData
.
TicketDisNum
)
{
c_DinnerDisNum
=
this
.
postData
.
TicketDisNum
;
}
item
.
DinnerDisNum
=
c_DinnerDisNum
;
var
c_times
=
0
;
if
(
item
.
Times
)
{
c_times
=
item
.
Times
;
}
var
c_totalNum
=
0
;
if
(
item
.
TotalNum
)
{
c_totalNum
=
item
.
TotalNum
;
}
item
.
USSubTotal
=
(
parseFloat
(
c_usprice
)
*
parseFloat
(
c_times
)
*
(
c_totalNum
-
c_DinnerDisNum
))
.
toFixed
(
2
);
item
.
VNDSubTotal
=
(
parseFloat
(
c_vndprice
)
*
parseFloat
(
c_times
)
*
(
c_totalNum
-
c_DinnerDisNum
))
.
toFixed
(
2
);
totalUSPrice
+=
parseFloat
(
item
.
USSubTotal
);
totalVNDPrice
+=
parseFloat
(
item
.
VNDSubTotal
);
})
});
this
.
TicketSum
.
USPriceSum
=
subUSPrice
.
toFixed
(
2
);
this
.
TicketSum
.
VNDPriceSum
=
subVNDPrice
.
toFixed
(
2
);
this
.
TicketSum
.
USTotalSum
=
totalUSPrice
.
toFixed
(
2
);
this
.
TicketSum
.
VNDTotalSum
=
totalVNDPrice
.
toFixed
(
2
);
}
},
//车资计算
GetBusCalc
()
{
if
(
this
.
postData
.
SWTBusList
&&
this
.
postData
.
SWTBusList
.
length
>
0
)
{
var
subKMs
=
0
;
var
totalVNDPrice
=
0
;
this
.
postData
.
SWTBusList
.
forEach
(
rootItem
=>
{
rootItem
.
SubBusList
.
forEach
(
item
=>
{
var
c_Kilometre
=
0
;
if
(
item
.
Kilometre
)
{
c_Kilometre
=
item
.
Kilometre
}
subKMs
+=
Number
(
c_Kilometre
)
var
c_times
=
0
;
if
(
item
.
Times
)
{
c_times
=
item
.
Times
;
}
var
c_price
=
0
;
if
(
item
.
Price
)
{
c_price
=
item
.
Price
;
}
item
.
VNDSubTotal
=
(
parseFloat
(
c_Kilometre
)
*
parseFloat
(
c_times
)
*
parseFloat
(
c_price
))
.
toFixed
(
2
);
totalVNDPrice
+=
parseFloat
(
item
.
VNDSubTotal
);
})
});
this
.
BusSum
.
TotalKM
=
subKMs
.
toFixed
(
2
);
this
.
BusSum
.
VNDTotalSum
=
totalVNDPrice
.
toFixed
(
2
);
}
},
/*获取车辆类型列表*/
getBusTypeList
()
{
this
.
apipost
(
"bus_get_GetBusTypePriceList"
,
{
StartDate
:
this
.
postData
.
StartDate
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
BusTypeList
=
res
.
data
.
data
;
this
.
BusTypeList
.
forEach
(
item
=>
{
item
[
'newName'
]
=
item
.
AreaTypeStr
+
'-'
+
item
.
BusTypeStr
});
}
},
null
);
},
},
//生成酒店数据
//生成酒店数据
createHotel
()
{
createHotel
()
{
if
(
this
.
postData
.
DayNum
>
this
.
postData
.
SWTHotelList
.
length
)
{
if
(
this
.
postData
.
DayNum
>
this
.
postData
.
SWTHotelList
.
length
)
{
console
.
log
(
"111"
)
for
(
for
(
var
i
=
this
.
postData
.
SWTHotelList
.
length
;
i
<
this
.
postData
.
DayNum
;
i
++
var
i
=
this
.
postData
.
SWTHotelList
.
length
;
i
<
this
.
postData
.
DayNum
;
i
++
)
{
)
{
...
@@ -860,42 +1420,208 @@
...
@@ -860,42 +1420,208 @@
HotelName
:
""
,
//酒店名称
HotelName
:
""
,
//酒店名称
USPrice
:
0
,
//美元
USPrice
:
0
,
//美元
VNDPrice
:
0
,
//越南盾
VNDPrice
:
0
,
//越南盾
TotalNum
:
Number
(
this
.
postData
.
GuestNum
)
+
Number
(
this
.
postData
.
FocNum
),
//总人
数
TotalNum
:
this
.
getPeopleNum
.
hotelNum
,
//总房间
数
Times
:
1
,
//次数
Times
:
1
,
//次数
USSubTotal
:
0
,
//美元小计
USSubTotal
:
0
,
//美元小计
VNDSubTotal
:
0
,
//越南盾小计
VNDSubTotal
:
0
,
//越南盾小计
HotelDisNum
:
this
.
postData
.
HotelDisNum
,
//减免人数
HotelDisNum
:
this
.
postData
.
HotelDisNum
,
//减免人数
HotelList
:
[],
};
};
this
.
postData
.
SWTHotelList
.
push
(
dayItem
);
this
.
postData
.
SWTHotelList
.
push
(
dayItem
);
}
}
}
else
{
}
else
{
console
.
log
(
"删除多余的项"
)
this
.
postData
.
SWTHotelList
.
length
=
this
.
postData
.
DayNum
;
//删除多余的项
}
for
(
var
i
=
this
.
postData
.
DayNum
;
i
<
this
.
postData
.
SWTHotelList
.
length
;
i
++
)
{
},
var
dayObj
=
this
.
postData
.
SWTHotelList
[
i
];
//生成餐厅
// dayObj.dayArray.forEach((subItem, subIndex) => {
createDinner
()
{
// this.commonRemove(subItem.childItem.DayNum, subIndex);
if
(
this
.
postData
.
DayNum
>
this
.
postData
.
SWTDinnerList
.
length
)
{
// });
for
(
var
i
=
this
.
postData
.
SWTDinnerList
.
length
;
i
<
this
.
postData
.
DayNum
;
i
++
)
{
//去掉以前默认的交通
var
dayItem
=
{
DayNum
:
i
+
1
,
SubDinnerList
:
[]
};
for
(
var
j
=
1
;
j
<=
3
;
j
++
)
{
dayItem
.
SubDinnerList
.
push
({
DinnerType
:
j
,
//用餐类型[1-早餐,2-午餐,3-晚餐]
DinnerId
:
0
,
//餐厅编号
DinnerName
:
""
,
//餐厅名称
USPrice
:
0
,
//美元
VNDPrice
:
0
,
//越南盾
TotalNum
:
this
.
getPeopleNum
.
totalNum
,
//总人数
FOCNum
:
this
.
getPeopleNum
.
focNum
,
//FOC人数
Times
:
1
,
//次数
USSubTotal
:
0
,
//美元小计
VNDSubTotal
:
0
,
//越南盾小计
DinnerDisNum
:
this
.
postData
.
DinnerDisNum
,
//减免人数
DinnerList
:
[],
//餐厅下拉列表[前台使用]
});
}
this
.
postData
.
SWTDinnerList
.
push
(
dayItem
);
}
}
// this.postData.SWTHotelList.length = this.postData.DayNum;
}
else
{
this
.
postData
.
SWTDinnerList
.
length
=
this
.
postData
.
DayNum
;
}
}
}
},
getTicketJson
()
{
var
obj
=
{
CouponsId
:
0
,
//景点名称
CouponsName
:
""
,
//景点名称
USPrice
:
0
,
//美元
VNDPrice
:
0
,
//越南盾
TotalNum
:
this
.
getPeopleNum
.
totalNum
,
//总人数
FOCNum
:
this
.
getPeopleNum
.
focNum
,
//FOC人数
Times
:
1
,
//次数
USSubTotal
:
0
,
//美元小计
VNDSubTotal
:
0
,
//越南盾小计
TicketDisNum
:
this
.
postData
.
TicketDisNum
,
//减免人数
TicketList
:
[],
//餐厅下拉列表[前台使用]
}
return
obj
;
},
//生成景点
createTicket
()
{
if
(
this
.
postData
.
DayNum
>
this
.
postData
.
SWTTicketList
.
length
)
{
for
(
var
i
=
this
.
postData
.
SWTTicketList
.
length
;
i
<
this
.
postData
.
DayNum
;
i
++
)
{
//去掉以前默认的交通
var
dayItem
=
{
DayNum
:
i
+
1
,
SubTicketList
:
[]
};
dayItem
.
SubTicketList
.
push
(
this
.
getTicketJson
());
this
.
postData
.
SWTTicketList
.
push
(
dayItem
);
}
}
else
{
this
.
postData
.
SWTTicketList
.
length
=
this
.
postData
.
DayNum
;
}
},
//添加用车
AddBus
(
item
)
{
item
.
SubBusList
.
push
(
this
.
getBusJson
());
},
//删除用车
DeleteBus
(
item
,
subIndex
)
{
item
.
SubBusList
.
splice
(
subIndex
,
1
);
},
//获取车资列表
GetBusConfigList
(
event
,
item
,
subitem
)
{
if
(
event
)
{
var
qmsg
=
{
QPriceId
:
""
}
if
(
this
.
postData
.
BusPriceId
)
{
qmsg
.
QPriceId
=
this
.
postData
.
BusPriceId
;
}
this
.
apipost
(
"buspriceconfig_post_GetBusPriceConfigListService"
,
qmsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
subitem
.
BusList
=
res
.
data
.
data
;
}
});
}
},
//获取选中的车资
GetBusItem
(
currentItem
)
{
var
that
=
this
;
if
(
currentItem
.
CouponsId
!=
0
)
{
//获取当前选中的对象
let
obj
=
{};
obj
=
currentItem
.
BusList
.
find
(
item
=>
{
return
item
.
Id
===
currentItem
.
BusConfigId
;
//筛选出匹配数据
});
if
(
obj
!=
undefined
)
{
currentItem
.
VNDPrice
=
0
;
currentItem
.
Price
=
0
;
currentItem
.
Kilometre
=
0
;
if
(
obj
.
KMPrice
)
{
currentItem
.
KMPrice
=
obj
.
KMPrice
;
}
if
(
obj
.
AllDayPrice
)
{
currentItem
.
Price
=
obj
.
AllDayPrice
;
}
if
(
obj
.
Kilometre
)
{
currentItem
.
Kilometre
=
obj
.
Kilometre
;
}
currentItem
.
Trip
=
obj
.
Trip
;
}
}
},
//车资JSON
getBusJson
()
{
var
obj
=
{
BusConfigId
:
0
,
//车资配置编号
Trip
:
""
,
//行程
Kilometre
:
0
,
//公里数
VNDPrice
:
0
,
//越南盾
TotalNum
:
this
.
getPeopleNum
.
totalNum
,
//总人数
Times
:
1
,
//次数
Price
:
0
,
//单价
VNDSubTotal
:
0
,
//越南盾小计
BusList
:
[],
//车下拉列表[前台使用]
}
return
obj
;
},
//车资部分
createBus
()
{
if
(
this
.
postData
.
DayNum
>
this
.
postData
.
SWTBusList
.
length
)
{
for
(
var
i
=
this
.
postData
.
SWTBusList
.
length
;
i
<
this
.
postData
.
DayNum
;
i
++
)
{
//去掉以前默认的交通
var
dayItem
=
{
DayNum
:
i
+
1
,
SubBusList
:
[]
};
dayItem
.
SubBusList
.
push
(
this
.
getBusJson
());
this
.
postData
.
SWTBusList
.
push
(
dayItem
);
}
}
else
{
this
.
postData
.
SWTBusList
.
length
=
this
.
postData
.
DayNum
;
}
},
},
},
created
()
{
created
()
{
},
},
mounted
()
{
mounted
()
{
this
.
getBusTypeList
();
this
.
getLineList
();
this
.
getLineList
();
this
.
getData
();
this
.
getData
();
},
},
computed
:
{
computed
:
{
//人数计算
getPeopleNum
()
{
var
totalNum
=
0
;
//总人数【旅客人数+FOC人数】
var
focNum
=
0
;
//FOC人数
if
(
this
.
postData
.
GuestNum
)
{
totalNum
+=
Number
(
this
.
postData
.
GuestNum
);
}
if
(
this
.
postData
.
FocNum
)
{
totalNum
+=
Number
(
this
.
postData
.
FocNum
);
focNum
=
Number
(
this
.
postData
.
FocNum
);
}
//酒店房间数
var
hotelNum
=
(
parseFloat
(
totalNum
)
/
2.0
).
toFixed
(
1
);
var
obj
=
{
totalNum
:
totalNum
,
focNum
:
focNum
,
hotelNum
:
hotelNum
,
}
return
obj
;
}
},
},
watch
:
{
watch
:
{
//监听天数变化
//监听天数变化
'postData.DayNum'
:
{
'postData.DayNum'
:
{
handler
(
newVal
,
oldVal
)
{
handler
(
newVal
,
oldVal
)
{
this
.
createHotel
();
this
.
createHotel
();
this
.
createDinner
();
this
.
createTicket
();
this
.
createBus
();
},
},
deep
:
true
deep
:
true
}
}
...
...
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