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
8376a94b
Commit
8376a94b
authored
Sep 23, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/superman
parents
800392e6
53da1299
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2189 additions
and
0 deletions
+2189
-0
CostNewPrice.vue
...ponents/TravelManager/TravelNewQuotation/CostNewPrice.vue
+945
-0
DirectNewQuotation.vue
...s/TravelManager/TravelNewQuotation/DirectNewQuotation.vue
+1055
-0
QuotationNewPrice.vue
...ts/TravelManager/TravelNewQuotation/QuotationNewPrice.vue
+171
-0
quoTation.vue
...ponents/TravelManager/TravelQuotationCenter/quoTation.vue
+10
-0
config.js
src/router/config.js
+8
-0
No files found.
src/components/TravelManager/TravelNewQuotation/CostNewPrice.vue
0 → 100644
View file @
8376a94b
<
style
>
@import
"../../../assets/css/newTravelManager.css"
;
.singlePrice
.el-form-item__content
,
.el-form-item__label
{
line-height
:
30px
;}
.CP_halfWi
{
width
:
45%
;}
</
style
>
<
template
>
<div>
<div
class=
"singlePrice clearfix CP_Div"
>
<div
class=
"CP_title"
>
{{
lineName
}}{{
lineTeamName
}}
</div>
<el-form>
<!--
<div
class=
"QuotationFirstDiv"
>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"线路"
>
<el-select
v-model=
"subConfig.LineId"
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"getLineTeamList(subConfig.LineId)"
filterable
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'0'
></el-option>
<el-option
v-for=
"item in LineList"
:label=
'item.LineName'
:value=
'item.LineID'
:key=
'item.LineID'
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"系列"
>
<el-select
v-model=
"subConfig.LineteamId"
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"getCountryId(subConfig.LineteamId)"
filterable
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'0'
></el-option>
<el-option
v-for=
"item in LineTeamList"
:label=
'item.LtName'
:value=
'item.LtID'
:key=
'item.LtID'
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"团队标题"
>
<el-input
v-model=
"subConfig.Title"
type=
"textarea"
:autosize=
"
{minRows: 1, maxRows: 2 }" resize="none" placeholder="请填写团队标题" maxlength="200">
</el-input>
</el-form-item>
</el-col>
</el-row>
<div
class=
"seat-box"
>
<div
class=
"left"
>
座位
</div>
<div
class=
"right"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
>
<el-form-item
prop=
"YSeat"
>
<el-input
placeholder=
"人数"
v-model=
"subConfig.YSeat"
maxlength=
"2"
@
keyup
.
native=
"checkInteger(subConfig,'YSeat'),calcTotalCount()"
>
<template
slot=
"prepend"
>
经济舱/上铺
</
template
>
</el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
prop=
"CSeat"
>
<el-input
placeholder=
"人数"
v-model=
"subConfig.CSeat"
maxlength=
"2"
@
keyup
.
native=
"checkInteger(subConfig,'CSeat'),calcTotalCount()"
>
<
template
slot=
"prepend"
>
商务舱/中铺
</
template
>
</el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
prop=
"FSeat"
>
<el-input
placeholder=
"人数"
v-model=
"subConfig.FSeat"
maxlength=
"2"
@
keyup
.
native=
"checkInteger(subConfig,'FSeat'),calcTotalCount()"
>
<
template
slot=
"prepend"
>
头等舱/下铺
</
template
>
</el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item>
<el-input
placeholder=
"人数"
v-model=
"subConfig.LowNum"
maxlength=
"2"
>
<
template
slot=
"prepend"
>
最低成团人数
</
template
>
</el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
</div>
-->
<table
class=
"CP_comTable"
>
<tr>
<td
class=
"CP_comBack"
width=
"170"
>
币种
</td>
<td
v-for=
'(item,index) in OfferCostPriceObj.CostCurrencyList'
>
{{item.CurrencyName}}
<span>
<i
class=
"iconfont icon-quxiao"
@
click=
"DeleteCurrency(index)"
></i>
</span>
</td>
<td>
<el-form-item
class=
"w100"
>
<el-select
v-model=
'currencyType'
@
change=
"getRate(currencyType),addCurrency()"
>
<el-option
v-for=
"item in currencyTypeArr"
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
</el-form-item>
</td>
</tr>
<tr>
<td
class=
"CP_comBack"
>
汇率
</td>
<td
v-for=
'item in OfferCostPriceObj.CostCurrencyList'
>
<el-input
class=
"w80"
v-model=
'item.ExchangeRate'
@
keyup
.
native=
"checkRate(item,'ExchangeRate')"
></el-input>
</td>
<td>
<el-input
class=
"w100"
v-model=
'queryMsg.RateInput'
@
keyup
.
native=
"checkRate(queryMsg,'RateInput')"
></el-input>
</td>
</tr>
</table>
<table
class=
"CP_comTable"
>
<tr>
<td
class=
"CP_comBack"
width=
"170"
>
人数
</td>
<td
v-for=
"(item,index) in OfferCostPriceObj.CostNumberList"
:key=
'item.subCode'
>
<el-input
class=
"w80"
v-model=
'item.PeopleNumber'
@
keyup
.
native=
"checkInteger(item,'PeopleNumber')"
></el-input>
<span>
<i
class=
"iconfont icon-quxiao"
@
click=
"DeletePNumber(index)"
></i>
</span>
</td>
<td
width=
"150"
>
<el-form-item>
<el-input
class=
"w80"
v-model=
'queryMsg.PeopleNumber'
@
keyup
.
native=
"checkInteger(queryMsg,'PeopleNumber')"
></el-input>
</el-form-item>
<div
class=
"AS_addPeoNumer"
>
<i
class=
"iconfont icon-img_haha"
@
click=
"addPeoNunber"
></i>
</div>
</td>
</tr>
<tr
v-for=
"item in OfferCostPriceObj.CostCurrencyList"
>
<td
class=
"CP_comBack"
>
地接报价({{item.CurrencyName}})
</td>
<td
v-if=
"checkExists(item.CurrencyId)"
v-for=
"childItem in getCurrencyNumberList(item.CurrencyId)"
>
<el-form-item>
<el-input
class=
"w80"
v-model=
'childItem.Money'
@
keyup
.
native=
"checkPrice(childItem,'Money',true),ReCalc()"
></el-input>
</el-form-item>
</td>
<td>
</td>
</tr>
</table>
<el-form-item
label=
"地接项目"
>
<el-checkbox-group
v-model=
"checkedPei"
>
<el-checkbox
v-for=
"checkItem in checkList"
:label=
"checkItem.Id"
:key=
"checkItem.Id"
>
{{checkItem.Name}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<table
class=
"CostPriceTable"
>
<tr>
<th
rowspan=
"2"
width=
'100'
>
Day
</th>
<th
rowspan=
"2"
width=
"200"
>
币种
</th>
<th
rowspan=
"2"
width=
'220'
>
酒店
</th>
<th
rowspan=
"2"
width=
'200'
>
车
</th>
<th
rowspan=
"2"
width=
'220'
>
门票
</th>
<th
colspan=
"3"
width=
'200'
>
餐
</th>
</tr>
<tr>
<th
width=
"90"
>
早
</th>
<th
width=
"90"
>
中
</th>
<th
width=
"90"
>
晚
</th>
</tr>
<tr
v-for=
"subItem in OfferCostPriceObj.CostLocalList"
:key=
"subItem.subCode"
>
<td
align=
"center"
>
{{subItem.DayNum}}
</td>
<td>
<el-form-item>
<el-select
v-model=
'subItem.CurrencyId'
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'defaultSelect'
></el-option>
<el-option
v-for=
"items in OfferCostPriceObj.CostCurrencyList"
:label=
'items.CurrencyName'
:value=
'items.CurrencyId'
:key=
'items.CurrencyId'
>
</el-option>
</el-select>
</el-form-item>
</td>
<td>
<el-input
v-if=
"!showHotel"
type=
'text'
v-model=
"subItem.HotelMoney"
@
keyup
.
native=
"checkPrice(subItem,'HotelMoney')"
></el-input>
</td>
<td>
<span
v-if=
"showCar"
>
{{subItem.CarName}}
</span>
<el-input
type=
'text'
v-model=
"subItem.CarMoney"
@
keyup
.
native=
"checkPrice(subItem,'CarMoney')"
v-if=
"!showCar"
></el-input>
</td>
<td>
<span
v-if=
"showTicket"
class=
"QD_DetailName"
>
{{subItem.TicketName}}
</span>
<el-input
type=
'text'
v-model=
"subItem.TicketMoney"
@
keyup
.
native=
"checkPrice(subItem,'TicketMoney')"
v-if=
"!showTicket"
></el-input>
</td>
<td>
<el-input
type=
"text"
:disabled=
'disabMoney'
v-model=
'subItem.FoodItem[0].money'
@
keyup
.
native=
"checkPrice(subItem.FoodItem[0],'money')"
></el-input>
</td>
<td>
<el-input
type=
"text"
:disabled=
'disabMoney'
v-model=
'subItem.FoodItem[1].money'
@
keyup
.
native=
"checkPrice(subItem.FoodItem[1],'money')"
></el-input>
</td>
<td>
<el-input
type=
"text"
:disabled=
'disabMoney'
v-model=
'subItem.FoodItem[2].money'
@
keyup
.
native=
"checkPrice(subItem.FoodItem[2],'money')"
></el-input>
</td>
</tr>
</table>
<div
class=
"CP_ComTitle"
>
内陆段交通部分
</div>
<table
class=
"CostPriceTable"
>
<tr>
<td
width=
'50'
>
1
</td>
<td
width=
'200'
>
内陆段机位(每人)
</td>
<td
width=
'200'
>
<el-form-item>
<el-select
v-model=
'OfferCostPriceObj.InlandAirTicketCurrency'
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'defaultSelect'
></el-option>
<el-option
v-for=
"items in OfferCostPriceObj.CostCurrencyList"
:label=
'items.CurrencyName'
:value=
'items.CurrencyId'
:key=
'items.CurrencyId'
>
</el-option>
</el-select>
</el-form-item>
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.InlandAirTicketMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'InlandAirTicketMoney')"
></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
2
</td>
<td>
内陆段船票(每人
</td>
<td>
<el-form-item>
<el-select
v-model=
'OfferCostPriceObj.InlandShipTicketCurrency'
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'defaultSelect'
></el-option>
<el-option
v-for=
"items in OfferCostPriceObj.CostCurrencyList"
:label=
'items.CurrencyName'
:value=
'items.CurrencyId'
:key=
'items.CurrencyId'
>
</el-option>
</el-select>
</el-form-item>
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.InlandShipTicketMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'InlandShipTicketMoney')"
></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
3
</td>
<td>
内陆段火车票(每人)
</td>
<td>
<el-form-item>
<el-select
v-model=
'OfferCostPriceObj.InlandTrainTicketCurrency'
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'defaultSelect'
></el-option>
<el-option
v-for=
"items in OfferCostPriceObj.CostCurrencyList"
:label=
'items.CurrencyName'
:value=
'items.CurrencyId'
:key=
'items.CurrencyId'
>
</el-option>
</el-select>
</el-form-item>
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.InlandTrainTicketMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'InlandTrainTicketMoney')"
></el-input>
</el-form-item>
</td>
</tr>
</table>
<div
class=
"CP_ComTitle"
>
杂支部分
</div>
<table
class=
"CostPriceTable"
>
<tr>
<td
width=
'50'
>
1
</td>
<td
width=
'200'
>
签证费(每人)
</td>
<td
colspan=
'3'
>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.VisaMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'VisaMoney')"
></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
2
</td>
<td>
保险费(每人)
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.SafeMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'SafeMoney')"
></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
3
</td>
<td>
领队小费
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.LeaderTripMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'LeaderTripMoney')"
></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
4
</td>
<td>
司机、导游小费
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.DriverGuideMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'DriverGuideMoney')"
></el-input>
</el-form-item>
</td>
</tr>
</table>
<div
class=
"CP_ComTitle"
>
其他支出
</div>
<table
class=
"CostPriceTable"
>
<tr>
<td
width=
'50'
>
1
</td>
<td
width=
'200'
>
销售提成1%
</td>
<td
colspan=
'3'
>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.SalesCommissionMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'SalesCommissionMoney')"
></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
2
</td>
<td>
作业处提成
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.OfficeCommissionMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'OfficeCommissionMoney')"
></el-input>
</el-form-item>
</td>
</tr>
</table>
<div
class=
"CP_ComTitle"
>
机票
</div>
<table
class=
"CostPriceTable"
>
<tr>
<td
width=
'50'
>
机票
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.AirTicketMoeny"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'AirTicketMoeny')"
></el-input>
</el-form-item>
</td>
</tr>
</table>
<div
class=
"CP_ComTitle"
>
收入
</div>
<table
class=
"CostPriceTable"
>
<tr>
<td
width=
'50'
>
1
</td>
<td
width=
'200'
>
客人小费收入
</td>
<td
colspan=
'3'
>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.TripMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'TripMoney',true)"
></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
2
</td>
<td>
导游人头费
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.GuidePeopleMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'GuidePeopleMoney')"
></el-input>
</el-form-item>
</td>
</tr>
</table>
<div
class=
"CP_ComTitle"
>
团负费
</div>
<table
class=
"CostPriceTable"
>
<tr>
<td
width=
'50'
>
KB
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.KBMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'KBMoney',true)"
></el-input>
</el-form-item>
</td>
</tr>
</table>
<div
class=
"CP_ComTitle"
>
领队分摊部分
</div>
<table
class=
"CP_comTable"
>
<tr>
<td
width=
'200'
>
人数
</td>
<td
width=
"200"
></td>
<td
width=
"150"
v-for=
"item in OfferCostPriceObj.CostNumberList"
:key=
"item.subCode"
>
{{item.PeopleNumber}}+1
</td>
</tr>
<tr>
<td>
机票
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.AirTicketShareMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'AirTicketShareMoney')"
></el-input>
</el-form-item>
</td>
<td
v-for=
"item in OfferCostPriceObj.CostNumberList"
:key=
"item.subCode"
>
{{item.AirTicketMoney}}
</td>
</tr>
<tr>
<td>
门票
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.TicketShareMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'TicketShareMoney')"
></el-input>
</el-form-item>
</td>
<td
v-for=
"item in OfferCostPriceObj.CostNumberList"
:key=
"item.subCode"
>
{{item.TicketMoney}}
</td>
</tr>
<tr>
<td>
单房差
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.SingleRoomShareMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'SingleRoomShareMoney')"
></el-input>
</el-form-item>
</td>
<td
v-for=
"item in OfferCostPriceObj.CostNumberList"
:key=
"item.subCode"
>
{{item.SingleRoomMoney}}
</td>
</tr>
<tr>
<td>
内陆段交通
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.InlandTrafficShareMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'InlandTrafficShareMoney')"
></el-input>
</el-form-item>
</td>
<td
v-for=
"item in OfferCostPriceObj.CostNumberList"
:key=
"item.subCode"
>
{{item.InlandTrafficMoney}}
</td>
</tr>
<tr>
<td>
杂费
</td>
<td>
<el-form-item>
<el-input
type=
'text'
class=
"w120"
v-model=
"OfferCostPriceObj.OtherShareMoney"
@
keyup
.
native=
"checkPrice(OfferCostPriceObj,'OtherShareMoney')"
></el-input>
</el-form-item>
</td>
<td
v-for=
"item in OfferCostPriceObj.CostNumberList"
:key=
"item.subCode"
>
{{item.OtherMoney}}
</td>
</tr>
<tr>
<td>
小计
</td>
<td></td>
<td
v-for=
"item in OfferCostPriceObj.CostNumberList"
:key=
"item.subCode"
>
{{item.SubtotalMoney}}
</td>
</tr>
</table>
<div
class=
"Cost_Line"
></div>
<div
class=
"CP_ComTitle Cost_Title"
>
成本统计
</div>
<table
class=
"CostPriceTable"
>
<tr>
<td
width=
'250'
rowspan=
"2"
class=
"CP_comBack"
>
人数统计
</td>
<td
v-for=
"item in OfferCostPriceObj.CostNumberList"
:key=
"item.subCode"
class=
"CP_comBack"
>
{{item.PeopleNumber}}+1
</td>
</tr>
<tr>
<td
v-for=
"item in OfferCostPriceObj.CostNumberList"
:key=
"item.subCode"
>
{{item.TotalMoney}}
</td>
</tr>
</table>
</el-form>
</div>
</div>
</template>
<
script
>
export
default
{
props
:
[
"OfferCostPrice"
,
"lineName"
,
"lineTeamName"
],
data
()
{
return
{
checkedPei
:
[],
//中间值
OfferCostPriceObj
:
""
,
//默认下拉
defaultSelect
:
0
,
queryMsg
:
{
//汇率输入
RateInput
:
""
,
//人数
PeopleNumber
:
""
},
//币种下拉
currencyType
:
""
,
checkList
:
[
{
Id
:
1
,
Name
:
"酒店"
},
{
Id
:
2
,
Name
:
"车辆"
},
{
Id
:
3
,
Name
:
"门票"
},
{
Id
:
4
,
Name
:
"餐厅"
}
],
//各种显示隐藏
showHotel
:
false
,
showCar
:
false
,
showTicket
:
false
,
showFood
:
false
,
disabMoney
:
false
,
//币种汇率数据
currencyArr
:
[],
//币种下拉
currencyTypeArr
:
[],
//基础信息
LineList
:[],
subConfig
:{
LineId
:
0
,
LineteamId
:
0
}
};
},
methods
:
{
ReCalc
()
{
this
.
OfferCostPriceObj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
OfferCostPriceObj
)
);
this
.
$emit
(
"headCallBack"
,
this
.
OfferCostPriceObj
);
},
//添加币种
addCurrency
()
{
var
currencyId
=
this
.
currencyType
;
var
ckedName
;
var
ckedRate
=
this
.
queryMsg
.
RateInput
;
if
(
currencyId
==
""
)
{
this
.
Info
(
"请选择币种"
);
return
;
}
if
(
ckedRate
==
""
)
{
this
.
Info
(
"请输入汇率"
);
return
;
}
this
.
currencyTypeArr
.
forEach
(
x
=>
{
if
(
currencyId
==
x
.
ID
)
{
ckedName
=
x
.
Name
;
}
});
if
(
this
.
$tripUtils
.
isInObjArr
(
this
.
OfferCostPriceObj
.
CostCurrencyList
,
"CurrencyId"
,
currencyId
)
)
{
this
.
Info
(
"币种已经存在"
);
return
;
}
var
CurObj
=
this
.
$tripUtils
.
CostCurrency
();
CurObj
.
CurrencyName
=
ckedName
;
CurObj
.
ExchangeRate
=
ckedRate
;
CurObj
.
CurrencyId
=
currencyId
;
this
.
OfferCostPriceObj
.
CostCurrencyList
.
push
(
CurObj
);
this
.
currencyType
=
""
;
this
.
queryMsg
.
RateInput
=
""
;
let
currencyNumberItem
=
{
Key
:
currencyId
,
currencyNumberList
:
[]
};
if
(
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
.
length
>
0
)
{
if
(
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
[
0
].
currencyNumberList
.
length
>
0
)
{
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
[
0
].
currencyNumberList
.
forEach
(
x
=>
{
let
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
x
));
tempData
.
CurrencyId
=
currencyId
;
tempData
.
Money
=
0.0
;
currencyNumberItem
.
currencyNumberList
.
push
(
tempData
);
}
);
}
}
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
.
push
(
currencyNumberItem
);
},
//添加人数费用
addPeoNunber
()
{
var
PeopleNumber
=
this
.
queryMsg
.
PeopleNumber
;
if
(
PeopleNumber
==
""
)
{
this
.
Info
(
"请输入人数"
);
return
;
}
if
(
this
.
$tripUtils
.
isInObjArr
(
this
.
OfferCostPriceObj
.
CostNumberList
,
"PeopleNumber"
,
PeopleNumber
)
)
{
this
.
Info
(
"人数已经存在"
);
return
;
}
var
CostNumberObj
=
this
.
$tripUtils
.
CostNumber
();
CostNumberObj
.
PeopleNumber
=
PeopleNumber
;
this
.
OfferCostPriceObj
.
CostNumberList
.
push
(
CostNumberObj
);
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
.
forEach
(
x
=>
{
var
CurrencyNumberObj
=
this
.
$tripUtils
.
CurrencyNumber
();
CurrencyNumberObj
.
CurrencyId
=
x
.
Key
;
CurrencyNumberObj
.
PeopleNumber
=
PeopleNumber
;
x
.
currencyNumberList
.
push
(
CurrencyNumberObj
);
});
this
.
queryMsg
.
PeopleNumber
=
""
;
this
.
queryMsg
.
Money
=
""
;
this
.
shortPeopleNumber
();
},
//删除币种
DeleteCurrency
(
index
)
{
let
currencyId
=
this
.
OfferCostPriceObj
.
CostCurrencyList
[
index
]
.
CurrencyId
;
this
.
OfferCostPriceObj
.
CostCurrencyList
.
splice
(
index
,
1
);
if
(
currencyId
>
0
)
{
let
tempCurrencyNumberListExt
=
[];
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
.
forEach
(
x
=>
{
if
(
x
.
Key
!=
currencyId
)
{
tempCurrencyNumberListExt
.
push
(
x
);
}
});
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
=
tempCurrencyNumberListExt
;
}
if
(
this
.
OfferCostPriceObj
.
CostCurrencyList
.
length
===
0
)
{
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
=
[];
}
},
//删除人数
DeletePNumber
(
index
)
{
var
item
=
this
.
OfferCostPriceObj
.
CostNumberList
[
index
];
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
.
forEach
(
itemExt
=>
{
var
array
=
[];
itemExt
.
currencyNumberList
.
forEach
(
childItem
=>
{
if
(
childItem
.
PeopleNumber
!=
item
.
PeopleNumber
)
{
array
.
push
(
childItem
);
}
});
itemExt
.
currencyNumberList
=
array
;
});
this
.
OfferCostPriceObj
.
CostNumberList
.
splice
(
index
,
1
);
},
//获取所有币种
getAllCurrency
()
{
this
.
apipost
(
"financeinfo_post_GetList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
currencyTypeArr
=
res
.
data
.
data
;
}
},
err
=>
{
}
);
},
//币种下拉获取汇率
getRate
(
ID
)
{
this
.
currencyTypeArr
.
forEach
(
x
=>
{
if
(
x
.
ID
==
ID
)
{
this
.
queryMsg
.
RateInput
=
x
.
Rate
;
}
});
},
//计算总价
getSubtotalMoney
()
{
let
that
=
this
;
this
.
OfferCostPriceObj
.
CostNumberList
.
forEach
(
x
=>
{
x
.
SubtotalMoney
=
(
this
.
getConvertMoney
(
x
.
AirTicketMoney
)
+
this
.
getConvertMoney
(
x
.
TicketMoney
)
+
this
.
getConvertMoney
(
x
.
SingleRoomMoney
)
+
this
.
getConvertMoney
(
x
.
InlandTrafficMoney
)
+
this
.
getConvertMoney
(
x
.
OtherMoney
)
).
toFixed
(
2
);
x
.
TotalMoney
=
(
that
.
getLocalTotalMoney
()
+
that
.
getCostTotalMoney
()
+
this
.
getConvertMoney
(
x
.
SubtotalMoney
)
+
this
.
getCurrencyNumberTotalMoney
(
x
.
PeopleNumber
)
).
toFixed
(
2
);
//console.log("价格计算",x.PeopleNumber, this.getCurrencyNumberTotalMoney(x.PeopleNumber))
});
},
//获取地接项目报价
getLocalTotalMoney
()
{
let
totalMoney
=
0.0
;
this
.
OfferCostPriceObj
.
CostLocalList
.
forEach
(
x
=>
{
let
subTotalMoney
=
0.0
;
subTotalMoney
=
(
this
.
getConvertMoney
(
x
.
CarMoney
)
+
this
.
getConvertMoney
(
x
.
HotelMoney
)
+
this
.
getConvertMoney
(
x
.
TicketMoney
)
+
this
.
getConvertMoney
(
x
.
FoodItem
[
0
].
money
)
+
this
.
getConvertMoney
(
x
.
FoodItem
[
1
].
money
)
+
this
.
getConvertMoney
(
x
.
FoodItem
[
2
].
money
))
*
this
.
getCurrencyMoney
(
x
.
CurrencyId
);
totalMoney
+=
subTotalMoney
;
});
return
totalMoney
;
},
//获取汇率
getCurrencyMoney
(
currencyId
)
{
let
currency
=
0.0
;
this
.
OfferCostPriceObj
.
CostCurrencyList
.
forEach
(
x
=>
{
if
(
x
.
CurrencyId
==
currencyId
)
{
currency
=
x
.
ExchangeRate
;
}
});
return
currency
;
},
//获取主成本价
getCostTotalMoney
()
{
let
totalMoney
=
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
InlandAirTicketMoney
)
*
this
.
getCurrencyMoney
(
this
.
OfferCostPriceObj
.
InlandAirTicketCurrency
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
InlandShipTicketMoney
)
*
this
.
getCurrencyMoney
(
this
.
OfferCostPriceObj
.
InlandShipTicketCurrency
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
InlandTrainTicketMoney
)
*
this
.
getCurrencyMoney
(
this
.
OfferCostPriceObj
.
InlandTrainTicketCurrency
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
DriverGuideMoney
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
LeaderTripMoney
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
OfficeCommissionMoney
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
SafeMoney
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
SalesCommissionMoney
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
TripMoney
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
GuidePeopleMoney
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
AirTicketMoeny
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
KBMoney
)
+
this
.
getConvertMoney
(
this
.
OfferCostPriceObj
.
VisaMoney
);
return
totalMoney
;
},
//获取不同人数组合价
getCurrencyNumberTotalMoney
(
peopleNumber
)
{
let
totalMoney
=
0.0
;
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
.
forEach
(
x
=>
{
x
.
currencyNumberList
.
forEach
(
y
=>
{
if
(
peopleNumber
===
y
.
PeopleNumber
)
{
totalMoney
+=
this
.
getConvertMoney
(
y
.
Money
)
*
this
.
getCurrencyMoney
(
y
.
CurrencyId
);
}
});
});
return
totalMoney
;
},
//价格转换器
getConvertMoney
(
value
)
{
if
(
value
===
""
||
value
===
undefined
||
value
===
null
)
{
value
=
0.0
;
}
return
parseFloat
(
value
);
},
//人数排序
shortPeopleNumber
()
{
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
.
forEach
(
x
=>
{
x
.
currencyNumberList
.
sort
(
this
.
$commonUtils
.
createComprisonFunction
(
"PeopleNumber"
)
);
});
this
.
OfferCostPriceObj
.
CostNumberList
.
sort
(
this
.
$commonUtils
.
createComprisonFunction
(
"PeopleNumber"
)
);
},
//判断币种是否相等
checkExists
(
CurrencyId
)
{
var
flag
=
false
;
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
.
forEach
(
item
=>
{
if
(
!
flag
&&
item
.
Key
==
CurrencyId
)
{
flag
=
true
;
}
});
return
flag
;
},
//获取币种对应 的人数报价
getCurrencyNumberList
(
CurrencyId
)
{
let
currencyNumberList
=
[];
let
flag
=
false
;
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
.
forEach
(
item
=>
{
if
(
!
flag
&&
item
.
Key
==
CurrencyId
)
{
flag
=
true
;
currencyNumberList
=
item
.
currencyNumberList
;
}
});
return
currencyNumberList
;
},
initOfferCostPrice
(
offerCostPrice
)
{
this
.
getAllCurrency
();
this
.
OfferCostPriceObj
=
offerCostPrice
;
if
(
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
==
undefined
||
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
==
null
||
!
(
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
.
length
>
0
)
)
{
this
.
OfferCostPriceObj
.
CurrencyNumberListExt
=
[];
}
var
dataArr
=
this
.
OfferCostPriceObj
.
LocalProject
.
split
(
','
);
this
.
checkedPei
=
dataArr
.
map
(
function
(
data
)
{
return
+
data
;
});
this
.
shortPeopleNumber
();
this
.
getSubtotalMoney
();
},
//计算领队分摊
getLeaderShare
()
{
let
that
=
this
;
var
AirTicketShareMoney
=
this
.
OfferCostPriceObj
.
AirTicketShareMoney
;
var
TicketShareMoney
=
this
.
OfferCostPriceObj
.
TicketShareMoney
;
var
SingleRoomShareMoney
=
this
.
OfferCostPriceObj
.
SingleRoomShareMoney
;
var
InlandTrafficShareMoney
=
this
.
OfferCostPriceObj
.
InlandTrafficShareMoney
;
var
OtherShareMoney
=
this
.
OfferCostPriceObj
.
OtherShareMoney
;
this
.
OfferCostPriceObj
.
CostNumberList
.
forEach
(
x
=>
{
x
.
AirTicketMoney
=
(
AirTicketShareMoney
/
x
.
PeopleNumber
).
toFixed
(
2
);
x
.
TicketMoney
=
(
TicketShareMoney
/
x
.
PeopleNumber
).
toFixed
(
2
);
x
.
SingleRoomMoney
=
(
SingleRoomShareMoney
/
x
.
PeopleNumber
).
toFixed
(
2
);
x
.
InlandTrafficMoney
=
(
InlandTrafficShareMoney
/
x
.
PeopleNumber
).
toFixed
(
2
);
x
.
OtherMoney
=
(
OtherShareMoney
/
x
.
PeopleNumber
).
toFixed
(
2
);
});
},
//报价单发生改变从新初始化数据
onChangeInitOfferCostPrice
(
offerCostPrice
)
{
this
.
initOfferCostPrice
(
offerCostPrice
);
},
//获取系列列表
getLineTeamList
(
lineId
)
{
//查询线路名
this
.
initLineName
(
lineId
);
this
.
subConfig
.
LineteamId
=
0
;
let
msg
=
{
lineID
:
lineId
,
isTOOP
:
1
};
var
that
=
this
;
//获取当前选中的对象
let
obj
=
{};
obj
=
that
.
LineList
.
find
(
item
=>
{
return
item
.
LineID
===
lineId
;
});
if
(
obj
!=
undefined
)
{
this
.
subConfig
.
IsDirect
=
obj
.
IsDirect
;
}
this
.
apipost
(
"team_post_GetList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
LineTeamList
=
res
.
data
.
data
;
}
});
},
},
mounted
()
{
this
.
getAllCurrency
();
this
.
initOfferCostPrice
(
this
.
OfferCostPrice
);
},
watch
:
{
OfferCostPriceObj
:
{
handler
:
function
(
val
,
oldVal
)
{
this
.
getLeaderShare
();
this
.
getSubtotalMoney
();
this
.
$emit
(
"headCallBack"
,
this
.
OfferCostPriceObj
);
},
deep
:
true
},
checkedPei
:
{
handler
:
function
(
val
,
oldVal
)
{
if
(
val
.
indexOf
(
1
)
>
-
1
)
{
this
.
showHotel
=
true
;
this
.
OfferCostPriceObj
.
CostLocalList
.
forEach
(
x
=>
{
x
.
HotelMoney
=
0
;
});
}
else
{
this
.
showHotel
=
false
;
}
if
(
val
.
indexOf
(
2
)
>
-
1
)
{
this
.
showCar
=
true
;
this
.
OfferCostPriceObj
.
CostLocalList
.
forEach
(
x
=>
{
x
.
CarMoney
=
0
;
});
}
else
{
this
.
showCar
=
false
;
}
if
(
val
.
indexOf
(
3
)
>
-
1
)
{
this
.
showTicket
=
true
;
this
.
OfferCostPriceObj
.
CostLocalList
.
forEach
(
x
=>
{
x
.
TicketMoney
=
0
;
});
}
else
{
this
.
showTicket
=
false
;
}
if
(
val
.
indexOf
(
4
)
>
-
1
)
{
this
.
showFood
=
true
;
this
.
disabMoney
=
true
;
this
.
OfferCostPriceObj
.
CostLocalList
.
forEach
(
x
=>
{
x
.
FoodItem
.
forEach
(
y
=>
{
y
.
money
=
0
;
});
});
}
else
{
this
.
showFood
=
false
;
this
.
disabMoney
=
false
;
}
this
.
OfferCostPriceObj
.
LocalProject
=
val
.
join
(
','
)
},
deep
:
true
}
}
};
</
script
>
src/components/TravelManager/TravelNewQuotation/DirectNewQuotation.vue
0 → 100644
View file @
8376a94b
<
style
>
.DQ_copyTopDiv
{
width
:
373px
;
height
:
110px
;
font-size
:
12px
;
padding
:
15px
;
overflow
:
auto
;
background-color
:
#f5f5f5
;
}
.DQ_copyTopDiv
::-webkit-scrollbar
{
width
:
4px
;
height
:
8px
;
}
.DQ_copyTopDiv
::-webkit-scrollbar-thumb
{
border-radius
:
4px
;
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
background
:
#c9c9c9
;
}
.DQ_copyTopDiv
::-webkit-scrollbar-track
{
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
4px
;
background
:
#ededed
;
}
.DQ_comSpan
{
display
:
inline-block
;
width
:
40px
;
height
:
20px
;
background-color
:
#2aaef2
;
text-align
:
center
;
line-height
:
20px
;
color
:
#fff
;
}
.DQ_details
{
width
:
100%
;
margin-top
:
10px
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.DQ_dateList
{
margin-top
:
30px
;
}
.DQ_rightDate
{
float
:
right
;
margin-top
:
18px
;
font-size
:
12px
;
}
.DanCheked
{
background-color
:
#2aa872
;
color
:
#fff
!important
;
}
.DQ_Ulist
li
{
list-style-type
:
none
;
display
:
block
;
cursor
:
pointer
;
border
:
1px
solid
#f5f5f5
;
padding
:
3px
;
margin-bottom
:
10px
;
border-radius
:
5px
;
}
.DQckedLi
{
border-color
:
#2aa872
!important
;
}
.DQ_Ulist
li
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
}
.DQ_copyBtn
{
float
:
right
;
margin
:
0
0
0
30px
;
}
.DQ_Otcopy
{
float
:
right
;
}
.DrightList
{
margin-left
:
80px
;
}
.ScienTicket
.el-form-item__content
{
margin-left
:
0
!important
;
}
.EditQuotation
{
position
:
absolute
;
color
:
#e95252
;
right
:
-27px
;
top
:
-18px
;
}
</
style
>
<
template
>
<div
v-if=
"isShow"
class=
"DirectQuotation clearfix"
>
<el-form
label-width=
"100px"
:model=
"currentOffer"
:rules=
"rules"
ref=
"currentOfferFrom"
>
<div
class=
"switchDiv clearfix"
style=
"width:98%;"
>
<div
class=
"DirectPriceCenter"
>
<div
class=
"singlePrice"
style=
"margin-top:20px;"
>
<div
class=
"singleDiv"
>
<span
class=
"TMTitle"
><i></i>
{{
currentOffer
.
OfferName
}}
</span>
<div
class=
"DQ_rightDate"
>
<el-popover
popper-class=
"salsSetPrice"
width=
"400"
trigger=
"click"
>
<div>
<div
class=
"DQ_copyTopDiv"
>
<ul
class=
"DQ_Ulist"
>
<li
v-for=
"item in otherTeamInfo"
:class=
"
{'DQckedLi':item.IsCheck}" @click="getReference(item)"
:key="item.subCode">
{{
item
.
title
}}
</li>
</ul>
</div>
<div
class=
"clearfix DQ_dateList"
>
<div
class=
"DQ_left"
>
<el-form-item
label=
"报价单选择"
style=
"margin-left:-20px;"
>
<el-select
class=
'w200'
v-model=
"offerId"
>
<el-option
v-for=
"item in otherTemObj"
:label=
'item.value'
:value=
'item.offerId'
:key=
'item.offerId'
>
</el-option>
</el-select>
</el-form-item>
</div>
<div
class=
"DQ_right DQ_Otcopy"
>
<input
type=
"button"
class=
"normalBtn"
@
click=
"copyDerect"
value=
"复制"
/>
</div>
</div>
</div>
</el-popover>
</div>
</div>
<div
class=
"leftGou"
>
<div
class=
"Dcircle"
></div>
<div
class=
"DLingCenter"
></div>
<div
class=
"Dcircle DalastCir"
></div>
</div>
<div
class=
"leftGou RightGou"
>
<div
class=
"Dcircle"
></div>
<div
class=
"DLingCenter"
></div>
<div
class=
"Dcircle DalastCir"
></div>
</div>
</div>
<div
class=
"singlePrice clearfix"
>
<CostPrice
ref=
"CostPrice"
@
headCallBack=
"setOfferCostPrice"
:OfferCostPrice=
"currentOffer.OfferCostPrice"
:lineName=
"postData.LineName"
:lineTeamName=
"postData.LtName"
></CostPrice>
</div>
</div>
<div
class=
"DirectRightPrice"
style=
"margin-left:20px;"
>
<div
class=
"dingjiaDiv"
>
<span
class=
"TMTitle"
><i></i>
定价
</span>
</div>
<div>
<div
class=
"Dleftname"
></div>
<div
class=
"DrightList"
>
<el-checkbox
style=
"margin-left:25px;"
v-model=
"currentOffer.QuotationPrice.IsSupportChildren"
:checked=
"currentOffer.QuotationPrice.IsSupportChildren===CheckedVaule"
:true-label=
"CheckedVaule"
:false-label=
"UnCheckedVaule"
>
不支持儿童出游
</el-checkbox>
<el-form-item
label=
"成本人数"
style=
"margin-left:70px;"
>
<el-select
class=
'w120'
v-model=
'currentOffer.QuotationPrice.PeopleNumber'
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'noLimit'
></el-option>
<el-option
v-for=
"item in currentOffer.OfferCostPrice.CostNumberList"
:label=
'item.PeopleNumber'
:value=
'item.PeopleNumber'
:key=
'item.PeopleNumber'
>
</el-option>
</el-select>
</el-form-item>
</div>
</div>
<div
class=
"clearfix"
>
<div
class=
"Dleftname"
>
标准
</div>
<div
class=
"DrightList"
>
<el-form-item
:prop=
"'QuotationPrice.B2BMemberPrice'"
:rules=
"rules.B2BMemberPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.B2BMemberPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'B2BMemberPrice')"
class=
"w200 ComSeat"
>
<template
slot=
"prepend"
>
同行会员
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.B2BPrice'"
:rules=
"rules.B2BPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.B2BPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'B2BPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
同行
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.B2CMemberPrice'"
:rules=
"rules.B2CMemberPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.B2CMemberPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'B2CMemberPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
直客会员
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.B2CPrice'"
:rules=
"rules.B2CPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.B2CPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'B2CPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
直客
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.BabyPrice'"
:rules=
"rules.BabyPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.BabyPrice"
@
keyup
.
native=
"checkInteger(currentOffer.QuotationPrice,'BabyPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
婴儿
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.SingleDMCPrice'"
:rules=
"rules.SingleDMCPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.SingleDMCPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'SingleDMCPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
单地接
</
template
>
</el-input>
</el-form-item>
</div>
</div>
<div
class=
"clearfix"
>
<div
class=
"Dleftname"
>
增收
</div>
<div
class=
"DrightList"
>
<el-form-item
:prop=
"'QuotationPrice.ChildNeedPrice'"
:rules=
"rules.ChildNeedPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.ChildNeedPrice"
@
keyup
.
native=
"checkInteger(currentOffer.QuotationPrice,'ChildNeedPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
儿童占床
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.BabyChargePrice'"
:rules=
"rules.BabyChargePrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.BabyChargePrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'BabyChargePrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
儿童附加费
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.OldManChargePrice'"
:rules=
"rules.OldManChargePrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.OldManChargePrice"
@
keyup
.
native=
"checkInteger(currentOffer.QuotationPrice,'OldManChargePrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
老人附加费
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.VisaPrice'"
:rules=
"rules.VisaPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.VisaPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'VisaPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
签证费
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.SingleRoomPrice'"
:rules=
"rules.SingleRoomPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.SingleRoomPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'SingleRoomPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
单房差
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.SafeMoney'"
:rules=
"rules.SafeMoney"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.SafeMoney"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'SafeMoney')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
保险
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.OtherPrice'"
:rules=
"rules.OtherPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.OtherPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'OtherPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
杂费
</
template
>
</el-input>
</el-form-item>
</div>
</div>
<div
class=
"clearfix"
>
<div
class=
"Dleftname"
>
减免
</div>
<div
class=
"DrightList"
>
<el-form-item
:prop=
"'QuotationPrice.ChildNoNeedPrice'"
:rules=
"rules.ChildNoNeedPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.ChildNoNeedPrice"
@
keyup
.
native=
"checkInteger(currentOffer.QuotationPrice,'ChildNoNeedPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
儿童不占床
</
template
>
</el-input>
</el-form-item>
<el-form-item
style=
"display:none;"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.RebatePrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'RebatePrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
同行返佣
</
template
>
</el-input>
</el-form-item>
<el-form-item
style=
"display:none;"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.DiscountPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'DiscountPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
早鸟优惠
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.BackVisaPrice'"
:rules=
"rules.BackVisaPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.BackVisaPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'BackVisaPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
退签证费
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.BackSafeMoney'"
:rules=
"rules.BackSafeMoney"
style=
"display:none"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.BackSafeMoney"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'BackSafeMoney')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
退保险费
</
template
>
</el-input>
</el-form-item>
</div>
</div>
<div
class=
"DisDirUp"
>
<div
class=
"dingjiaDiv"
>
<span
class=
"TMTitle"
><i></i>
地接合同上传
</span>
</div>
<div>
<el-form-item
style=
"margin-left:-63px;"
>
<el-upload
:http-request=
"uploadFileBtn"
:multiple=
"true"
:show-file-list=
"false"
action=
""
>
<el-button
size=
"small"
type=
"danger"
icon=
"el-icon-upload2"
>
上传
</el-button>
</el-upload>
</el-form-item>
</div>
<div
v-if=
"uploadList.length>0"
>
<el-form-item
label=
"附件列表"
>
<div
class=
"DQ_FileList"
>
<li
v-for=
"item in uploadList"
:key=
"item.subCode"
>
<span
@
click=
"downloadOne(item)"
>
{{item.Name}}--下载
</span>
<i
class=
"el-icon-circle-close-outline"
@
click=
"deleteFile(item)"
></i>
</li>
</div>
</el-form-item>
</div>
</div>
<table
class=
"CostPriceTable ScienTicket"
>
<tr>
<th
width=
"400"
>
景点名
</th>
<th>
门票名
</th>
<th
width=
"200"
>
退款金额
</th>
<th
width=
"150"
>
是否退款
</th>
</tr>
<tr
v-for=
"item in currentOffer.QuotationPrice.QuotationScenicList"
:key=
"item.subCode"
>
<td>
{{item.CouponsName}}
</td>
<td>
{{item.CouponsTicketName}}
</td>
<td>
<el-form-item
v-if=
"item.CanReundMoney==1"
>
<el-input
type=
'text'
v-model=
"item.RefundMoney"
@
keyup
.
native=
"checkPrice(item,'RefundMoney')"
></el-input>
</el-form-item>
</td>
<td>
<el-switch
v-model=
"item.CanReundMoney"
@
change=
"resetRefundMoney(item)"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</td>
</tr>
</table>
</div>
</div>
</el-form>
</div>
</template>
<
script
>
import
CostPrice
from
"../TravelNewQuotation/CostNewPrice"
;
export
default
{
props
:
[
"postConfig"
],
data
()
{
var
FlightIdValidate
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
0
)
{
callback
(
new
Error
(
"请选择机票"
));
}
else
{
callback
();
}
};
return
{
noLimit
:
0
,
currentOffer
:
{},
postData
:
""
,
isSubmit
:
true
,
CheckedVaule
:
2
,
UnCheckedVaule
:
1
,
uploadList
:
[],
rules
:
{
//表单必填验证
B2BMemberPrice
:
[
{
required
:
true
,
message
:
"请填写同业会员价"
,
trigger
:
"blur"
}
],
B2BPrice
:
[
{
required
:
true
,
message
:
"请填写同业价"
,
trigger
:
"blur"
}
],
B2CMemberPrice
:
[
{
required
:
true
,
message
:
"请填写直客会员价"
,
trigger
:
"blur"
}
],
B2CPrice
:
[
{
required
:
true
,
message
:
"请填写直客价"
,
trigger
:
"blur"
}
],
ChildNeedPrice
:
[
{
required
:
true
,
message
:
"请填写占床价"
,
trigger
:
"blur"
}
],
ChildNoNeedPrice
:
[
{
required
:
true
,
message
:
"请填写儿童不占床数"
,
trigger
:
"blur"
}
],
BackVisaPrice
:
[
{
required
:
true
,
message
:
"请填写退签证费"
,
trigger
:
"blur"
}
],
BabyPrice
:
[
{
required
:
true
,
message
:
"请填写婴儿价"
,
trigger
:
"blur"
}
],
BabyChargePrice
:
[
{
required
:
true
,
message
:
"请填写附加费"
,
trigger
:
"blur"
}
],
OldManChargePrice
:
[
{
required
:
true
,
message
:
"请填写占床价"
,
trigger
:
"blur"
}
],
VisaPrice
:
[
{
required
:
true
,
message
:
"请填写签证价"
,
trigger
:
"blur"
}
],
OtherPrice
:
[
{
required
:
true
,
message
:
"请填写杂费"
,
trigger
:
"blur"
}
],
SingleRoomPrice
:
[
{
required
:
true
,
message
:
"请填写单房差"
,
trigger
:
"blur"
}
],
SafeMoney
:
[
{
required
:
true
,
message
:
"请填写保险费"
,
trigger
:
"blur"
}
],
// AirticketMoney: [
// {required: true, message: "请填写机票费", trigger: "blur"}
// ],
SingleDMCPrice
:
[
{
required
:
true
,
message
:
"请填写地接价"
,
trigger
:
"blur"
}
]
// RebatePrice: [
// {required: true, message: "请填写同行返佣", trigger: "blur"}
// ],
// DiscountPrice: [
// {required: true, message: "请填写早鸟优惠", trigger: "blur"}
// ],
},
msg
:
{
QStartDate
:
""
,
QEndDate
:
""
},
QuotationList
:
[
{
label
:
"报价单"
,
Id
:
1
},
{
label
:
"报价单"
,
Id
:
1
}
],
//其他团期信息
otherTeamInfo
:
""
,
otherTemObj
:
[],
configId
:
""
,
offerId
:
""
,
offerList
:
[],
isShow
:
false
//数据初始化后再渲染页面
};
},
methods
:
{
//验证
submitForm
(
type
)
{
//提交创建、修改表单
this
.
modifyTeamValue
();
let
that
=
this
;
let
isSuccess
=
false
;
that
.
$refs
[
"currentOfferFrom"
].
validate
(
valid
=>
{
if
(
valid
)
{
isSuccess
=
valid
;
}
else
{
return
false
;
}
});
if
(
isSuccess
)
{
this
.
postData
.
OfferList
.
forEach
(
x
=>
{
if
(
x
.
StartDate
==
null
||
x
.
StartDate
==
""
||
x
.
EndDate
==
null
||
x
.
EndDate
==
""
)
{
isSuccess
=
false
;
this
.
Error
(
"请完善【"
+
x
.
OfferName
+
"】日期范围信息"
);
return
;
}
var
result
=
this
.
validateTeamQuot
(
x
.
OfferCostPrice
,
x
.
QuotationPrice
);
if
(
result
==
-
1
)
{
isSuccess
=
false
;
this
.
Error
(
"请选择【"
+
x
.
OfferName
+
"】的使用成本人数"
);
return
;
}
else
if
(
result
==
0
)
{
isSuccess
=
false
;
this
.
Error
(
"请完善【"
+
x
.
OfferName
+
"】的报价信息"
);
return
;
}
// else if (result == 2) {
// isSuccess = false;
// this.Info(
// "报价单【" +
// x.OfferNumber +
// "】的同业会员价、同业价、直客会员价、直客价不能小于成本价!"
// );
// return;
// }
});
}
if
(
isSuccess
&&
this
.
isSubmit
)
{
this
.
isSubmit
=
false
;
this
.
$parent
.
updateSubmitState
(
this
.
isSubmit
);
this
.
doSubmitConfig
(
type
);
}
},
//验证团期定价
validateTeamQuot
(
offerCostPrice
,
quotationPrice
)
{
if
(
!
(
quotationPrice
.
PeopleNumber
>
0
))
{
return
-
1
;
//没有选择成本人数
}
// this.$commonUtils.isNullOrEmpty(quotationPrice.RebatePrice) ||
// this.$commonUtils.isNullOrEmpty(quotationPrice.AirticketMoney) ||
// this.$commonUtils.isNullOrEmpty(quotationPrice.DiscountPrice) ||
// this.$commonUtils.isNullOrEmpty(quotationPrice.BackSafeMoney)
if
(
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
B2BMemberPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
B2BPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
B2CMemberPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
B2CPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
BabyChargePrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
BabyPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
ChildNeedPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
ChildNoNeedPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
OldManChargePrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
OtherPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
SafeMoney
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
SingleRoomPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
SingleDMCPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
PeopleNumber
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
VisaPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
BackVisaPrice
)
)
{
return
0
;
}
else
{
var
flag
=
1
;
//验证价格不能小于成本价
offerCostPrice
.
CostNumberList
.
forEach
(
item
=>
{
if
(
flag
==
1
&&
quotationPrice
.
PeopleNumber
===
item
.
PeopleNumber
)
{
if
(
quotationPrice
.
B2BMemberPrice
<
this
.
$commonUtils
.
getConvertMoney
(
item
.
TotalMoney
)
||
quotationPrice
.
B2BPrice
<
this
.
$commonUtils
.
getConvertMoney
(
item
.
TotalMoney
)
||
quotationPrice
.
B2CMemberPrice
<
this
.
$commonUtils
.
getConvertMoney
(
item
.
TotalMoney
)
||
quotationPrice
.
B2CPrice
<
this
.
$commonUtils
.
getConvertMoney
(
item
.
TotalMoney
)
)
{
flag
=
2
;
}
}
});
return
flag
;
}
},
modifyChangeValue
(
postDataTemp
)
{
postDataTemp
.
OfferList
.
forEach
(
x
=>
{
if
(
x
.
OfferNumber
==
this
.
currentOffer
.
OfferNumber
)
{
x
.
OfferId
=
this
.
currentOffer
.
OfferId
;
x
.
ConfigID
=
this
.
currentOffer
.
ConfigID
;
x
.
StartDate
=
this
.
currentOffer
.
StartDate
;
x
.
EndDate
=
this
.
currentOffer
.
EndDate
;
x
.
OfferCostPrice
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
currentOffer
.
OfferCostPrice
)
);
x
.
QuotationPrice
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
currentOffer
.
QuotationPrice
)
);
let
contractUrl
=
[];
this
.
uploadList
.
forEach
(
y
=>
{
let
urlInfo
=
{
Name
:
y
.
Name
,
Url
:
y
.
Url
};
contractUrl
.
push
(
urlInfo
);
});
x
.
QuotationPrice
.
ContractUrl
=
JSON
.
stringify
(
contractUrl
);
x
.
QuotationPrice
.
ContractArray
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
uploadList
)
);
}
});
},
modifyTeamValue
()
{
let
postDataTemp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
postData
));
//修改已变动的数据
this
.
modifyChangeValue
(
postDataTemp
);
this
.
postData
=
postDataTemp
;
},
doSubmitConfig
(
travelState
)
{
this
.
postData
.
TravelState
=
travelState
;
this
.
isSubmit
=
true
;
let
comitData
=
{
ID
:
this
.
postData
.
ID
,
OfferList
:
this
.
postData
.
OfferList
,
TravelState
:
this
.
postData
.
TravelState
,
RemoveChild
:
this
.
postData
.
RemoveChild
};
this
.
apipost
(
"travel_post_SetConfigOfferInfo"
,
comitData
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$router
.
push
({
path
:
"quoTation"
});
this
.
isSubmit
=
true
;
this
.
$parent
.
updateSubmitState
(
this
.
isSubmit
);
}
else
if
(
res
.
data
.
resultCode
==
10009
){
//表单重复提交不处理
}
else
{
this
.
isSubmit
=
true
;
this
.
$parent
.
updateSubmitState
(
this
.
isSubmit
);
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{
}
);
},
firstLoad
()
{
this
.
postData
.
OfferList
.
forEach
((
x
,
index
)
=>
{
if
(
index
==
0
)
{
x
.
IsCheck
=
true
;
this
.
currentOffer
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
postData
.
OfferList
[
index
])
);
if
(
this
.
currentOffer
.
QuotationPrice
.
ContractArray
!=
undefined
&&
this
.
currentOffer
.
QuotationPrice
.
ContractArray
!=
null
)
{
this
.
uploadList
=
this
.
currentOffer
.
QuotationPrice
.
ContractArray
;
}
this
.
initCostLocalHotelSelect
(
this
.
currentOffer
.
OfferCostPrice
,
this
.
postData
);
}
else
{
x
.
IsCheck
=
false
;
}
if
(
x
.
QuotationPrice
.
B2BMemberPrice
==
null
)
{
x
.
QuotationPrice
.
B2BMemberPrice
=
""
;
}
});
this
.
isShow
=
true
;
},
setOfferCostPrice
(
returnValue
)
{
let
offerCostPrice
=
JSON
.
parse
(
JSON
.
stringify
(
returnValue
));
let
currencyNumberList
=
[];
offerCostPrice
.
CurrencyNumberListExt
.
forEach
(
x
=>
{
if
(
x
.
currencyNumberList
.
length
>
0
)
{
x
.
currencyNumberList
.
forEach
(
y
=>
{
currencyNumberList
.
push
(
y
);
});
}
});
offerCostPrice
.
CurrencyNumberList
=
currencyNumberList
;
this
.
currentOffer
.
OfferCostPrice
=
offerCostPrice
;
},
uploadFileBtn
(
file
)
{
//上传
if
(
file
.
file
.
size
>
1024
*
1024
*
100
)
{
this
.
$message
.
warning
(
"文件大小不能超过100M!"
);
return
;
}
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
path
=
"/Upload/DMC/"
;
this
.
$message
.
info
(
"上传中..."
);
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
let
fileSize
=
file
.
file
.
size
<
1024
?
file
.
file
.
size
:
(
file
.
file
.
size
/
1024
).
toFixed
(
0
);
this
.
saveMsg
=
[];
this
.
saveMsg
.
push
({
Path
:
x
.
data
.
FilePath
,
FileName
:
file
.
file
.
name
,
MD5Sign
:
file
.
file
.
uid
,
FileSize
:
fileSize
});
this
.
uploadList
.
push
({
Url
:
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
,
Name
:
file
.
file
.
name
});
});
},
downloadOne
(
obj
)
{
var
Url
=
obj
.
Url
;
let
reg
=
/^http
(
s
)?
:
\/\/(
.*
?)\/
/
;
this
.
downloadFileRename
(
Url
.
replace
(
reg
,
""
),
obj
.
Name
);
},
deleteFile
(
obj
)
{
if
(
this
.
uploadList
.
findIndex
(
item
=>
item
.
Url
===
obj
.
Url
)
!=
-
1
)
{
this
.
uploadList
.
splice
(
this
.
uploadList
.
findIndex
(
item
=>
item
.
Url
===
obj
.
Url
),
1
);
}
},
//初始化地接数据
initCostLocalHotelSelect
(
OfferCostPrice
,
postData
)
{
let
newCostLocalList
=
[];
for
(
let
i
=
1
;
i
<=
postData
.
DayNum
;
i
++
)
{
OfferCostPrice
.
CostLocalList
.
forEach
(
x
=>
{
if
(
x
.
DayNum
===
i
)
{
let
newCostLocal
=
JSON
.
parse
(
JSON
.
stringify
(
x
));
let
hotelArr
=
[];
let
hotelNameArr
=
[];
postData
.
HotelList
.
forEach
(
y
=>
{
if
(
newCostLocal
.
DayNum
===
y
.
DayNum
)
{
let
hotel
=
{
HotelId
:
y
.
HotelId
,
HotelName
:
y
.
HotelName
};
hotelArr
.
push
(
hotel
);
hotelNameArr
.
push
(
y
.
HotelName
);
}
});
newCostLocal
.
HotelArr
=
hotelArr
;
if
(
hotelNameArr
.
length
>
0
)
{
newCostLocal
.
HotelName
=
hotelNameArr
.
join
(
","
);
}
let
TicketNameArr
=
[];
postData
.
ScenicList
.
forEach
(
y
=>
{
if
(
y
.
DayNum
===
i
)
{
TicketNameArr
.
push
(
y
.
CouponsName
);
}
});
if
(
TicketNameArr
.
length
>
0
)
{
newCostLocal
.
TicketName
=
TicketNameArr
.
join
(
","
);
}
newCostLocalList
.
push
(
newCostLocal
);
}
});
}
OfferCostPrice
.
CostLocalList
=
newCostLocalList
;
},
//获取成本价对象
getCostPrice
(
postData
)
{
let
costLocalArr
=
[];
for
(
let
i
=
1
;
i
<=
postData
.
DayNum
;
i
++
)
{
let
costLocal
=
this
.
$tripUtils
.
CostLocal
();
costLocal
.
DayNum
=
i
;
postData
.
HotelList
.
forEach
(
x
=>
{
if
(
x
.
DayNum
===
i
)
{
costLocal
.
HotelNameArr
.
push
(
x
.
HotelName
);
// costLocal.HotelMoney += x.HotelProductPrice;
}
});
if
(
costLocal
.
HotelNameArr
.
length
>
0
)
{
costLocal
.
HotelName
=
costLocal
.
HotelNameArr
.
join
(
","
);
}
postData
.
TrafficList
.
forEach
(
x
=>
{
if
(
x
.
DayNum
===
i
)
{
costLocal
.
CarMoney
+=
x
.
TrafficePrice
;
}
});
postData
.
ScenicList
.
forEach
(
x
=>
{
if
(
x
.
DayNum
===
i
)
{
costLocal
.
TicketNameArr
.
push
(
x
.
CouponsName
);
costLocal
.
TicketMoney
+=
x
.
CouponsTicketPrice
;
}
});
if
(
costLocal
.
TicketNameArr
.
length
>
0
)
{
costLocal
.
TicketName
=
costLocal
.
TicketNameArr
.
join
(
","
);
}
let
morningFood
=
{
foodType
:
1
,
money
:
0.0
};
let
noonFood
=
{
foodType
:
2
,
money
:
0.0
};
let
nightFood
=
{
foodType
:
3
,
money
:
0.0
};
postData
.
DinnerList
.
forEach
(
x
=>
{
if
(
x
.
DayNum
===
i
)
{
if
(
x
.
UseDinnerType
==
"1"
)
{
morningFood
=
{
foodType
:
1
,
money
:
x
.
DiningPrice
};
}
else
if
(
x
.
UseDinnerType
==
"2"
)
{
noonFood
=
{
foodType
:
2
,
money
:
x
.
DiningPrice
};
}
else
if
(
x
.
UseDinnerType
==
"3"
)
{
nightFood
=
{
foodType
:
3
,
money
:
x
.
DiningPrice
};
}
}
});
costLocal
.
FoodItem
.
push
(
morningFood
);
costLocal
.
FoodItem
.
push
(
noonFood
);
costLocal
.
FoodItem
.
push
(
nightFood
);
costLocalArr
.
push
(
costLocal
);
}
let
offerCostPrice
=
this
.
$tripUtils
.
OfferCostPrice
();
offerCostPrice
.
CostLocalList
=
costLocalArr
;
return
offerCostPrice
;
},
//获取报价对象
getQuotationPrice
(
postData
)
{
let
quotationPrice
=
this
.
$tripUtils
.
QuotationPrice
();
let
quotationScenicArr
=
[];
postData
.
ScenicList
.
forEach
(
y
=>
{
let
quotationScenic
=
this
.
$tripUtils
.
QuotationScenic
();
quotationScenic
.
CouponsId
=
y
.
CouponsId
;
quotationScenic
.
CouponsTicketId
=
y
.
CouponsTicketId
;
quotationScenic
.
CouponsName
=
y
.
CouponsName
;
quotationScenic
.
CouponsTicketName
=
y
.
CouponsTicketName
;
if
(
quotationScenic
.
CouponsTicketId
>
0
||
(
quotationScenic
.
CouponsTicketId
===
0
&&
quotationScenic
.
CouponsTicketName
.
length
>
0
))
{
quotationScenicArr
.
push
(
quotationScenic
);
};
});
quotationPrice
.
QuotationScenicList
=
quotationScenicArr
;
return
quotationPrice
;
},
//组装报价景点数据
decorationQuotationScenic
(
postData
)
{
let
isDirect
=
postData
.
IsDirect
;
postData
.
OfferList
.
forEach
((
x
,
index
)
=>
{
x
.
OfferNumber
=
index
+
1
;
//报价单重新排序
if
(
x
.
QuotationPrice
!=
null
)
{
let
quotationScenicArr
=
[];
postData
.
ScenicList
.
forEach
(
y
=>
{
let
scenic
=
""
;
if
(
x
.
QuotationPrice
!=
null
&&
x
.
QuotationPrice
.
QuotationScenicList
!=
null
&&
x
.
QuotationPrice
.
QuotationScenicList
.
length
>
0
)
{
x
.
QuotationPrice
.
QuotationScenicList
.
forEach
(
z
=>
{
if
(
scenic
===
""
)
{
if
(
isDirect
===
1
)
{
if
(
z
.
CouponsId
==
y
.
CouponsId
&&
z
.
CouponsTicketId
==
y
.
CouponsTicketId
)
{
let
quotationScenic
=
this
.
$tripUtils
.
QuotationScenic
();
quotationScenic
.
CouponsId
=
z
.
CouponsId
;
quotationScenic
.
CouponsTicketId
=
z
.
CouponsTicketId
;
quotationScenic
.
CouponsName
=
z
.
CouponsName
;
quotationScenic
.
CouponsTicketName
=
z
.
CouponsTicketName
;
quotationScenic
.
RefundMoney
=
z
.
RefundMoney
;
quotationScenic
.
CanReundMoney
=
z
.
CanReundMoney
;
scenic
=
quotationScenic
;
}
}
else
{
if
(
this
.
$commonUtils
.
getStrValue
(
z
.
CouponsName
)
.
indexOf
(
this
.
$commonUtils
.
getStrValue
(
y
.
CouponsName
)
)
!=
-
1
&&
this
.
$commonUtils
.
getStrValue
(
z
.
CouponsTicketName
)
.
indexOf
(
this
.
$commonUtils
.
getStrValue
(
y
.
CouponsTicketName
)
)
!=
-
1
)
{
let
quotationScenic
=
this
.
$tripUtils
.
QuotationScenic
();
quotationScenic
.
CouponsId
=
z
.
CouponsId
;
quotationScenic
.
CouponsTicketId
=
z
.
CouponsTicketId
;
quotationScenic
.
CouponsName
=
z
.
CouponsName
;
quotationScenic
.
CouponsTicketName
=
z
.
CouponsTicketName
;
quotationScenic
.
RefundMoney
=
z
.
RefundMoney
;
quotationScenic
.
CanReundMoney
=
z
.
CanReundMoney
;
scenic
=
quotationScenic
;
}
}
}
});
if
(
scenic
===
""
)
{
let
quotationScenic
=
this
.
$tripUtils
.
QuotationScenic
();
quotationScenic
.
CouponsId
=
y
.
CouponsId
;
quotationScenic
.
CouponsTicketId
=
y
.
CouponsTicketId
;
quotationScenic
.
CouponsName
=
y
.
CouponsName
;
quotationScenic
.
CouponsTicketName
=
y
.
CouponsTicketName
;
scenic
=
quotationScenic
;
}
}
else
{
let
quotationScenic
=
this
.
$tripUtils
.
QuotationScenic
();
quotationScenic
.
CouponsId
=
y
.
CouponsId
;
quotationScenic
.
CouponsTicketId
=
y
.
CouponsTicketId
;
quotationScenic
.
CouponsName
=
y
.
CouponsName
;
quotationScenic
.
CouponsTicketName
=
y
.
CouponsTicketName
;
scenic
=
quotationScenic
;
}
if
(
scenic
.
CouponsTicketId
>
0
||
(
scenic
.
CouponsTicketId
===
0
&&
scenic
.
CouponsTicketName
.
length
>
0
))
{
quotationScenicArr
.
push
(
scenic
);
};
});
x
.
QuotationPrice
.
QuotationScenicList
=
quotationScenicArr
;
}
});
},
//报价单数据初始化
intiOfficeList
(
postData
)
{
this
.
postData
=
postData
;
this
.
postData
.
OfferList
.
forEach
(
offer
=>
{
offer
.
isShow
=
false
;
});
if
(
this
.
postData
.
OfferList
.
length
==
0
)
{
this
.
offerListAppend
();
}
else
{
this
.
decorationQuotationScenic
(
this
.
postData
);
}
this
.
firstLoad
();
},
//添加报价单
offerListAppend
()
{
let
maxOfferNumber
=
0
;
this
.
postData
.
OfferList
.
forEach
(
x
=>
{
if
(
x
.
OfferNumber
>
maxOfferNumber
)
{
maxOfferNumber
=
x
.
OfferNumber
;
}
x
.
isShow
=
false
;
});
let
offer
=
this
.
$tripUtils
.
OfferObj
();
offer
.
OfferNumber
=
maxOfferNumber
+
1
;
offer
.
OfferName
=
"报价单"
+
(
maxOfferNumber
+
1
);
offer
.
OfferCostPrice
=
this
.
getCostPrice
(
this
.
postData
);
offer
.
QuotationPrice
=
this
.
getQuotationPrice
(
this
.
postData
);
this
.
postData
.
OfferList
.
push
(
offer
);
this
.
postData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
postData
));
},
//复制报价单信息
copyInfo
()
{
var
copyObj
=
{};
this
.
postData
.
OfferList
.
forEach
(
x
=>
{
if
(
x
.
IsCheck
)
{
copyObj
.
ConfigID
=
x
.
ConfigID
;
copyObj
.
EndDate
=
""
;
copyObj
.
IsCheck
=
false
;
copyObj
.
OfferCostPrice
=
x
.
OfferCostPrice
;
copyObj
.
OfferCostPrice
.
CostId
=
0
;
copyObj
.
OfferCostPrice
.
ConfigID
=
0
;
copyObj
.
OfferCostPrice
.
OfferId
=
0
;
copyObj
.
OfferId
=
0
;
copyObj
.
OfferNumber
=
this
.
postData
.
OfferList
.
length
+
1
;
copyObj
.
QuotationPrice
=
x
.
QuotationPrice
;
copyObj
.
QuotationPrice
.
QuotationId
=
0
;
copyObj
.
QuotationPrice
.
OfferId
=
0
;
copyObj
.
QuotationPrice
.
ConfigID
=
0
;
copyObj
.
StartDate
=
""
;
}
});
this
.
postData
.
OfferList
.
push
(
copyObj
);
},
//点击标题
getReference
(
item
)
{
this
.
otherTeamInfo
.
forEach
(
x
=>
{
x
.
IsCheck
=
false
;
});
item
.
IsCheck
=
!
item
.
IsCheck
;
if
(
item
.
configId
!=
this
.
configId
)
{
this
.
configId
=
item
.
configId
;
this
.
offerList
=
[];
}
this
.
otherTemObj
=
[];
item
.
offerList
.
forEach
(
x
=>
{
var
obj
=
{};
obj
.
configId
=
item
.
configId
;
obj
.
offerId
=
x
.
offerId
;
obj
.
value
=
x
.
startDate
+
"至"
+
x
.
endDate
;
this
.
otherTemObj
.
push
(
obj
);
});
},
//复制其他团期信息
copyDerect
()
{
if
(
this
.
offerList
.
length
>
0
)
{
this
.
copyOffer
();
}
else
{
let
msg
=
{
configId
:
this
.
configId
};
this
.
apipost
(
"travel_get_GetTravelOfferInfo"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
offerList
=
res
.
data
.
data
;
this
.
copyOffer
();
}
},
err
=>
{
}
);
}
},
//选择是否退款重置金额
resetRefundMoney
(
item
){
if
(
item
.
CanReundMoney
==
0
){
item
.
RefundMoney
=
0
;
}
},
//复制信息
copyOffer
()
{
//let firstPrice = JSON.parse(JSON.stringify(this.postData.OfferList[0]));
this
.
offerList
.
forEach
(
x
=>
{
if
(
x
.
OfferId
===
this
.
offerId
)
{
let
offer
=
JSON
.
parse
(
JSON
.
stringify
(
x
));
offer
.
ConfigID
=
0
;
offer
.
configID
=
0
;
offer
.
OfferId
=
0
;
offer
.
StartDate
=
""
;
offer
.
EndDate
=
""
;
offer
.
OfferNumber
=
this
.
postData
.
OfferList
.
length
+
1
;
offer
.
IsCheck
=
false
;
offer
.
OfferCostPrice
.
ConfigID
=
0
;
offer
.
OfferCostPrice
.
CostId
=
0
;
offer
.
OfferCostPrice
.
OfferId
=
0
;
offer
.
OfferCostPrice
.
LocalProject
=
""
;
offer
.
OfferCostPrice
.
CostLocalList
=
this
.
getCostPrice
(
this
.
postData
).
CostLocalList
;
offer
.
QuotationPrice
.
ConfigId
=
0
;
offer
.
QuotationPrice
.
OfferId
=
0
;
offer
.
QuotationPrice
.
QuotationId
=
0
;
offer
.
QuotationPrice
.
QuotationScenicList
=
this
.
getQuotationPrice
(
this
.
postData
).
QuotationScenicList
;
this
.
postData
.
OfferList
.
push
(
offer
);
}
});
}
},
created
()
{
this
.
intiOfficeList
(
this
.
postConfig
);
},
filters
:
{
dateFormate
(
date
)
{
let
dateStr
=
date
.
split
(
"-"
);
return
dateStr
[
1
]
+
"月"
+
dateStr
[
2
]
+
"日"
;
},
offerName
(
offerNumber
)
{
return
"报价单"
+
offerNumber
;
}
},
watch
:
{
"postData.OfferList"
:
{
handler
:
function
(
val
,
oldVal
)
{
val
.
forEach
(
x
=>
{
if
(
x
.
OfferNumber
===
this
.
currentOffer
.
OfferNumber
)
{
this
.
currentOffer
.
OfferName
=
x
.
OfferName
;
}
});
},
deep
:
true
}
},
components
:
{
CostPrice
:
CostPrice
}
};
</
script
>
src/components/TravelManager/TravelNewQuotation/QuotationNewPrice.vue
0 → 100644
View file @
8376a94b
<
template
>
<div
v-if=
"isShow"
class=
"DirectQuotation clearfix"
>
<DirectQuotation
ref=
"QuotationPrice"
:postConfig=
"postData"
:dayCostPrice=
"dayCostPriceList"
:otherPrice=
"otherPrice"
></DirectQuotation>
<div
class=
"btnFixedDiv"
>
<div
class=
"toTop"
@
click=
"backTop"
>
<i
class=
"iconfont icon-huidaodingbu"
></i>
</div>
<div
class=
"DTSaveBtn"
:class=
"
{'disClick':!isSubmit}" @click="SaveData(2)">提交
</div>
<div
class=
"DTSaveBtn"
@
click=
"copyQuotationData"
style=
"display:none;"
>
复制
</div>
<div
class=
"DTSaveBtn caogao"
:class=
"
{'disClick':!isSubmit}" @click="SaveData(1)">
<span>
保存
</span>
<span>
草稿
</span>
</div>
</div>
</div>
</
template
>
<
script
>
import
DirectQuotation
from
"../TravelNewQuotation/DirectNewQuotation"
;
export
default
{
data
()
{
return
{
//基本配置
postData
:
{
ID
:
0
,
StartCityId
:
0
,
LineId
:
0
,
LineteamId
:
0
,
Title
:
""
,
IsOrder
:
1
,
IsSubstitution
:
1
,
IsB2B
:
1
,
IsB2C
:
1
,
FSeat
:
""
,
CSeat
:
""
,
YSeat
:
""
,
//最低成团人数
LowNum
:
""
,
//OP备注
OpRemark
:
""
,
//产品经理备注
ProductRecommend
:
""
,
IsDirect
:
0
,
//是否直采(0-否-1-是)【全部默认非直采】
PriceIsDirect
:
1
,
//是否直采报价(1-否-2-是)【全部默认非直采】
PDFAlias
:
""
,
//pdf别名
ImgCover
:
""
,
//封面图
DayNum
:
""
,
//天数
NightNum
:
""
,
//晚数
StartCityId
:
0
,
ReturnArriveCityId
:
0
,
//返回抵达城市
},
dayCostPriceList
:
[],
//报价列表
otherPrice
:
{
CostId
:
0
,
//主键编号
ConfigID
:
0
,
//配置编号
OfferId
:
0
,
//报价单编号
InlandAirTicketCurrency
:
0
,
//内陆段机位币种
InlandAirTicketMoney
:
0
,
//内陆段机位金额(每人)
InlandShipTicketCurrency
:
0
,
//内陆段船票币种
InlandShipTicketMoney
:
0
,
//内陆段船票金额(每人)
InlandTrainTicketCurrency
:
0
,
//内陆段火车币种
InlandTrainTicketMoney
:
0
,
//内陆段火车金额(每人)
VisaMoney
:
0
,
//签证费用(每人)
SafeMoney
:
0
,
//保险费用(每人)
LeaderTripMoney
:
0
,
//领队小费
DriverGuideMoney
:
0
,
//司机导游小费
SalesCommissionMoney
:
0
,
//销售提成
OfficeCommissionMoney
:
0
,
//作业处提成
TripMoney
:
0
,
//小费
GuidePeopleMoney
:
0
,
//导游人头费
AirTicketMoeny
:
0
,
//机票成本费用
KBMoney
:
0
,
//KB人头费
AirTicketShareMoney
:
0
,
//机票分摊费用
TicketShareMoney
:
0
,
//门票分摊费用,
SingleRoomShareMoney
:
0
,
//单房差分摊费用
InlandTrafficShareMoney
:
0
,
//内陆段交通分摊费用
OtherShareMoney
:
0
,
//杂费分摊费用
},
//团报价信息
teamPrice
:{
QuotationId
:
0
,
//主键编号
TeamId
:
0
,
//团期编号
ConfigID
:
0
,
//团队配置编号
OfferId
:
0
,
//报价编号
B2BMemberPrice
:
0
,
//同业会员价
B2BPrice
:
0
,
//同业价格
B2CMemberPrice
:
0
,
//直客会员价,
B2CPrice
:
0
,
//直客价格
ChildNeedPrice
:
0
,
//小孩占床价格,
ChildNoNeedPrice
:
0
,
//小孩不占床价格
BabyPrice
:
0
,
//婴儿价格
BabyChargePrice
:
0
,
//婴儿附加费
OldManChargePrice
:
0
,
//老人附加费
VisaPrice
:
0
,
//签证
OtherPrice
:
0
,
//杂费
SingleRoomPrice
:
0
,
//单房差
SingleDMCPrice
:
0
,
//单地接
RebatePrice
:
0
,
//同行返佣
DiscountPrice
:
0
,
//早鸟优惠
IsSupportChildren
:
1
,
//是否支持儿童出游(1-支持,2-不支持)
SafeMoney
:
0
,
//保险费
PeopleNumber
:
0
,
//人数
AirticketMoney
:
0
,
//机票费用
BackVisaPrice
:
0
,
//退签证费
BackSafeMoney
:
0
,
//退保险费
ContractUrl
:
""
,
//合同地址
}
};
},
methods
:
{
//表单提交
submitForm
(
type
)
{
this
.
$refs
[
"QuotationPrice"
].
submitForm
(
type
);
},
//保存数据
SaveData
()
{
this
.
apipost
(
"travel_post_SetConfigOffer_V2"
,
{
config
:
postData
,
dayCostPriceList
:
dayCostPriceList
,
otherPrice
:
otherPrice
,
teamPrice
:
teamPrice
},
res
=>
{
console
.
log
(
res
.
data
);
if
(
res
.
data
.
resultCode
==
1
)
{}
},
err
=>
{}
);
},
getPostData
()
{
let
configId
=
this
.
$route
.
query
.
configId
;
if
(
configId
>
0
)
{
let
msg
=
{
ID
:
configId
};
this
.
apipost
(
"travel_get_GetMyTravelInfo_V2"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
"res.data.data"
,
res
.
data
);
this
.
postData
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
}
else
{
let
params
=
{
isNoOffer
:
false
};
this
.
$router
.
push
({
name
:
"quoTation"
,
params
:
params
});
}
}
},
created
()
{
this
.
getPostData
();
},
components
:
{
DirectQuotation
:
DirectQuotation
}
};
</
script
>
src/components/TravelManager/TravelQuotationCenter/quoTation.vue
View file @
8376a94b
...
...
@@ -48,6 +48,7 @@
</li>
<li>
<button
class=
"hollowFixedBtn"
@
click=
"getList(),resetPageIndex()"
>
查询
</button>
<button
class=
"hollowFixedBtn"
@
click=
"goMakeQuo('MakeQuotation')"
>
新增
</button>
</li>
</ul>
</div>
...
...
@@ -455,6 +456,15 @@
}
});
},
goMakeQuo
(
path
)
{
this
.
$router
.
push
({
path
:
path
,
query
:
{
blank
:
'y'
,
tab
:
'报价单'
}
});
},
goSubInfo
(
path
,
configId
)
{
this
.
$store
.
commit
(
"pageConditionUpdate"
,
this
.
queryData
);
...
...
src/router/config.js
View file @
8376a94b
...
...
@@ -2669,6 +2669,14 @@ export default {
title
:
'制作报价单'
},
},
{
//新版制作报价单
path
:
'/QuotationNewPrice'
,
name
:
'QuotationNewPrice'
,
component
:
resolve
=>
require
([
'@/components/TravelManager/TravelNewQuotation/QuotationNewPrice'
],
resolve
),
meta
:
{
title
:
'制作报价单'
},
},
{
//团控-我的机票
path
:
'/TravelMyTicket'
,
name
:
'TravelMyTicket'
,
...
...
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