Commit 8cc86484 authored by huangyuanyuan's avatar huangyuanyuan

update

parents 02160386 89ae17d7
<style>
.choosed span {
background-color: #1bc594 !important;
}
.illegal span {
background-color: #c0ebd1;
}
.TPLine {
display: inline-block;
width: 510px;
height: 1px;
border-bottom: 1px dashed #bfbfbf;
}
.TP_rightDate {
margin-left: 50px;
}
.TPDateContent .currentInput {
background-color: transparent;
}
.TP_tips {
display: inline-block;
padding: 5px;
border: 1px solid #d1d1d1;
position: relative;
border-radius: 4px;
margin-right: 10px;
cursor: pointer;
}
.TP_dateContent {
width: 600px;
height: auto;
margin: 30px 0 0 120px;
min-height: 30px;
position: relative;
}
.TP_cancel {
position: absolute;
color: #e95252;
display: inline-block;
width: 16px;
background-color: #fff;
border-radius: 50%;
height: 16px;
right: -8px;
top: -11px;
}
.TP_DateList {
width: 500px;
margin: 10px 0 0 120px;
}
.ckedSpan {
background-color: #2aa872;
color: #fff;
}
.TP_toLeft {
position: absolute;
top: 20px;
cursor: pointer;
left: 0;
}
.TravelPrice .days .liList {
cursor: pointer;
}
.TP_childContent {
position: absolute;
left: 20px;
top: 20px;
}
.TP_Right {
position: absolute;
top: 20px;
cursor: pointer;
right: 0;
}
.TP_Sendprepend {
float: left;
width: 110px;
height: 34px;
border: 1px solid #dcdfe6;
text-align: center;
line-height: 34px;
background-color: #f5f7fa;
color: #909399;
font-size: 14px;
margin: 3px -11px 0 10px;
}
.TravelPrice .days .checked1 {
border: 1px solid #2aa872 !important;
}
.TravelPrice .days .checked2 {
border: 1px solid #e95252 !important;
}
.TP_shangchuan .el-form-item__label {
width: auto !important;
margin-left: 23px;
}
.TravelPrice .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.TravelPrice .avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 148px;
height: 148px;
line-height: 148px;
text-align: center;
}
.TravelPrice .avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.TravelPrice .avatar-uploader img {
width: 148px;
height: 148px;
display: block;
}
.TravelPrice .avatar-uploader:hover .TP_delImg {
display: block;
}
.TP_delImg {
display: inline-block;
width: 32px;
height: 32px;
position: absolute;
z-index: 999;
top: 60px;
display: none;
line-height: 32px;
border-radius: 50%;
left: 60px;
background-color: gray;
}
.TP_delImg:hover {
color: #e95252;
background: #fff;
}
.TPright .SaleBranchList .el-input__inner {
height: 34px !important;
}
.TPSetInfo .multiple_input .el-input__inner {
margin-top: 3px;
}
.SimulateDrop-box {
width: 288px;
min-height: 34px;
position: relative;
padding: 5px 21px 5px 6px;
float: left;
margin: 4px 0 0 10px;
border: 1px solid #d1d1d1;
}
._TravelPriceDetails table {
padding: 10px 0 0 20px;
background-color: #ededed;
border-collapse: collapse;
border: 1px solid #d2d2d2;
font-size: 12px;
margin: 0 20px 5px 0;
min-width: 800px;
}
._TravelPriceDetails table ._color_666 {
background-color: #ededed;
color: #666666;
padding: 5px;
}
._TravelPriceDetails table td {
background-color: #ffffff;
padding: 9px 30px;
color: #333333;
text-align: center;
border: 1px solid #d2d2d2;
}
._TravelPriceDetails table td._d_name {
background-color: #ededed;
}
.SimulaDrop {
position: absolute;
top: 3px;
right: 10px;
color: #c0c4cc;
}
.SD_flight {
display: inline-block;
height: 24px;
margin:0 3px 3px 0;
padding: 0 8px;
line-height: 22px;
background-color: #f0f2f5;
}
.TP_flightBtn {
float: right;
margin-right: 45px;
}
.TC-config {
color: #999999;
font-size: 12px;
height: 20px;
line-height: 20px;
}
.TCSwitchtitle {
display: inline-block;
vertical-align: top;
width: 86px;
text-align: right;
margin-top: 2px;
color: #606266;
}
.TCswitch {
width: 280px;
}
.TP_Airticktid {
text-decoration: underline;
cursor: pointer;
}
.TP_noneed {
position: relative;
top: 10px;
margin: 20px 0 30px 11px;
}
.Tp_hotelDialog{
width:900px;
}
.TphotelTable{
width:100%;
margin:auto;
text-align: center;
font-size: 12px;
color: #333;
border-collapse: collapse;
background-color: #fff;
border: 1px solid #d1d1d1;
}
.TphotelTable th{
background: #E6E6E6;
padding:8px 0;
color: #333;
border: 1px solid #d1d1d1;
font-weight:bold;
}
.TphotelTable tr td{
background-color:#fff;
/* padding:8px 0; */
border: 1px solid #d1d1d1;
}
.Tp_btn{
color: #fff;
height: 25px;
background: #E95252;
border: 1px solid #E95252;
cursor: pointer;
border-radius: 15px;
margin-left: 10px;
}
.tp_divList{
width:100%;
min-height:30px;
border-bottom: 1px dashed #ccc;
}
.tp_divList div{
text-align: left;
padding:0 20px;
margin-top:5px;
}
.tp_divList:last-child{
border:0;
}
</style>
<template>
<div>
<div class="TravelPrice clearfix" :class="{'foldHeight':isFold==1}">
<span class="TMTitle">
<i></i>团期设置
</span>
<span class="foldList" @click="fold" v-if="isFold==''">点击折叠</span>
<span class="foldList" @click="fold" v-if="isFold==1">点击展开</span>
<div class="TPLeft">
<div class="Travel_Nav">
<span class="Travel_TT">选择团期</span>
<span class="Travel_Line"></span>
</div>
<div class="clearfix">
<div class="TPDateContent" id="DayAll">
<div class="month">
<ul>
<li>
<i class="arrow monthminus" @click="currentYear-=1,getDateString(),initCalendar(dateString)">&lt;</i>
<input type="text" v-model="currentYear" disabled class="currentInput" @input="getDateString(),initCalendar(dateString)">
<i class="arrow monthadd" @click="currentYear+=1,getDateString(),initCalendar(dateString)">&gt;</i>
</li>
<li>
<i class="arrow monthminus" @click="pickPre(currentYear,currentMonth)">&lt;</i>
<input type="text" v-model="currentMonth" disabled class="currentInput" @input="getDateString(),initCalendar(dateString)">
<i class="arrow monthadd" @click="pickNext(currentYear,currentMonth)">&gt;</i>
</li>
</ul>
</div>
<!-- 星期 -->
<ul class="weekdays">
<li>{{$t('hotel.hotel_Monday')}}</li>
<li>{{$t('hotel.hotel_Tuesday')}}</li>
<li>{{$t('hotel.hotel_Wednesday')}}</li>
<li>{{$t('hotel.hotel_Thursday')}}</li>
<li>{{$t('hotel.hotel_Friday')}}</li>
<li>{{$t('hotel.hotel_Saturday')}}</li>
<li>{{$t('hotel.hotel_Sunday')}}</li>
</ul>
<!-- 日期 -->
<ul class="days">
<li class="liList" v-for="(dayobject,index) in days" :key="dayobject.subCode">
<span v-if="dayobject.checkState==$calendarUtils.checkState.noChecked" class="other-month">{{dayobject.day.getDate()}}</span>
<span v-if="dayobject.checkState==$calendarUtils.checkState.checked" class="checked1" @click="clickedDay(dayobject)">{{dayobject.day.getDate()}}</span>
<span v-else-if="dayobject.checkState==$calendarUtils.checkState.hasValue" @click="clickedDay(dayobject)">{{dayobject.day.getDate()}}</span>
</li>
</ul>
</div>
</div>
</div>
<div class="TPright"></div>
<div class="TPCenter">
<div class="TPNoDiv">
<span class="Travel_TT">报价&库存&机票绑定</span>
<span class="TPNotice">(注意:公司已开启价格预警机制,最低销售价格不能低于2000.00元)</span>
<span class="TPLine"></span>
</div>
<div class="TP_rightDate">
<div class="TP_dateContent">
<span class="TP_toLeft" @click="priceLeftMove">
<i class="iconfont icon-previewleft"></i>
</span>
<div class="TP_childContent">
<span class="TP_tips" :class="{'ckedSpan':item.Checked}" @click="getDateInfo(item)" v-for="(item,index) in showPriceList"
:key="index">
{{item.StartDate}}
<span class="TP_cancel" @click.stop="delDateList(item)">
<i class="iconfont icon-quxiao"></i>
</span>
</span>
</div>
<span class="TP_Right" @click="priceRightMove">
<i class="iconfont icon-arrow-right"></i>
</span>
</div>
<div class="TP_DateList"></div>
</div>
<div>
<div class="TPSetInfo clearfix">
<el-form label-width="10px">
<div class="clearfix">
<div class="leftSetInfo">
<span class="TPbaseSet">基本报价设置</span>
<span class="TPsecondTitle">标准</span>
</div>
<div class="TPright">
<div class="TP_noneed">
<el-checkbox v-model="priceData.IsSupportChildren" :true-label="CheckedVaule" :false-label="UnCheckedVaule">支持儿童出游
</el-checkbox>
<el-checkbox v-model="priceData.IsBookTeam" :true-label="CheckedVaule" :false-label="UnCheckedVaule" style="display:none;" >订团
</el-checkbox>
<input type="button" class="normalBtn" value="酒店使用情况" @click="outerVisible=true" style="display:none;" />
</div>
<el-form-item prop="B2BMemberPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.B2BMemberPrice" @keyup.native="checkPrice(priceData,'B2BMemberPrice')">
<template slot="prepend">同行会员</template>
</el-input>
</el-form-item>
<el-form-item prop="B2BPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.B2BPrice" @keyup.native="checkPrice(priceData,'B2BPrice')">
<template slot="prepend">同行</template>
</el-input>
</el-form-item>
<el-form-item prop="B2CMemberPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.B2CMemberPrice" @keyup.native="checkPrice(priceData,'B2CMemberPrice')">
<template slot="prepend">直客会员</template>
</el-input>
</el-form-item>
<el-form-item prop="B2CPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.B2CPrice" @keyup.native="checkPrice(priceData,'B2CPrice')">
<template slot="prepend">直客</template>
</el-input>
</el-form-item>
<el-form-item prop="BabyPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.BabyPrice" @keyup.native="checkInteger(priceData,'BabyPrice')">
<template slot="prepend">婴儿</template>
</el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.SingleDMCPrice" @keyup.native="checkPrice(priceData,'SingleDMCPrice')">
<template slot="prepend">单地接</template>
</el-input>
</el-form-item>
</div>
</div>
<div class="clearfix">
<div class="leftSetInfo">
<span class="TPbaseSet">其他报价设置</span>
<span class="TPsecondTitle">增收</span>
</div>
<div class="TPright">
<el-form-item prop="ChildNeedPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.ChildNeedPrice" @keyup.native="checkInteger(priceData,'ChildNeedPrice')">
<template slot="prepend">儿童占床</template>
</el-input>
</el-form-item>
<el-form-item prop="BabyChargePrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.BabyChargePrice" @keyup.native="checkPrice(priceData,'BabyChargePrice')">
<template slot="prepend">儿童附加费</template>
</el-input>
</el-form-item>
<el-form-item prop="OldManChargePrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.OldManChargePrice"
@keyup.native="checkPrice(priceData,'OldManChargePrice')">
<template slot="prepend">老人附加费</template>
</el-input>
</el-form-item>
<el-form-item prop="VisaPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.VisaPrice" @keyup.native="checkPrice(priceData,'VisaPrice')">
<template slot="prepend">签证费</template>
</el-input>
</el-form-item>
<el-form-item prop="SingleRoomPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.SingleRoomPrice" @keyup.native="checkPrice(priceData,'SingleRoomPrice')">
<template slot="prepend">单房差</template>
</el-input>
</el-form-item>
<el-form-item prop="SafeMoney">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.SafeMoney" @keyup.native="checkInteger(priceData,'SafeMoney')">
<template slot="prepend">保险</template>
</el-input>
</el-form-item>
<el-form-item prop="OtherPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.OtherPrice" @keyup.native="checkPrice(priceData,'OtherPrice')">
<template slot="prepend">杂费</template>
</el-input>
</el-form-item>
</div>
</div>
<div class="clearfix">
<div class="leftSetInfo">
<span class="TPbaseSet"></span>
<span class="TPsecondTitle">减免</span>
</div>
<div class="TPright">
<el-form-item prop="ChildNoNeedPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.ChildNoNeedPrice" @keyup.native="checkInteger(priceData,'ChildNoNeedPrice')">
<template slot="prepend">儿童不占床</template>
</el-input>
</el-form-item>
<el-form-item prop="BackVisaPrice">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.BackVisaPrice" @keyup.native="checkInteger(priceData,'BackVisaPrice')">
<template slot="prepend">退签证费</template>
</el-input>
</el-form-item>
<el-form-item style="display:none;">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.RebatePrice" @keyup.native="checkPrice(priceData,'RebatePrice')">
<template slot="prepend">同行返佣</template>
</el-input>
</el-form-item>
<el-form-item style="display:none;">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.DiscountPrice" @keyup.native="checkPrice(priceData,'DiscountPrice')">
<template slot="prepend">早鸟优惠</template>
</el-input>
</el-form-item>
</div>
</div>
<div class="clearfix">
<div class="leftSetInfo">
<span class="TPbaseSet">设置</span>
<span class="TPsecondTitle"></span>
</div>
<div class="TPright clearfix">
<el-form-item prop="ClearOrderHour">
<el-input placeholder="请输入" class="w190 ComSeat" v-model="priceData.ClearOrderHour" @keyup.native="checkInteger(priceData,'ClearOrderHour')"
@blur="checkInteger(priceData,'ClearOrderHour')">
<template slot="prepend">自动清位</template>
</el-input>
</el-form-item>
<span class="TP_Sendprepend">送签时间</span>
<el-form-item prop="SendVisaTime" style="margin-top:1px;">
<el-date-picker clearable class="w150" v-model="priceData.SendVisaTime" type="date" value-format="yyyy-MM-dd"
:placeholder="$t('admin.admin_choDate')"></el-date-picker>
</el-form-item>
<el-form-item prop="OutBranchId" style="margin-top:1px;">
<span class="TP_Sendprepend" style="margin:3px -1px 0 0">出团公司</span>
<el-select class="w180" v-model="priceData.OutBranchId">
<el-option :label="$t('pub.unlimitedSel')" :value="SelectOtherDefault"></el-option>
<el-option v-for="item in companyList" :key="item.id" :label="item.bName" :value="item.id"></el-option>
</el-select>
</el-form-item>
</div>
<div class="TPright clearfix">
<el-form-item prop="YSeat">
<el-input placeholder="人数" class="w190" v-model="priceData.YSeat" @keyup.native="checkInteger(priceData,'YSeat')">
<template slot="prepend">经济舱/上铺</template>
</el-input>
</el-form-item>
<el-form-item prop="CSeat">
<el-input placeholder="人数" class="w260" v-model="priceData.CSeat" @keyup.native="checkInteger(priceData,'CSeat')">
<template slot="prepend">商务舱/中铺</template>
</el-input>
</el-form-item>
<el-form-item prop="FSeat">
<el-input placeholder="人数" class="w290" v-model="priceData.FSeat" @keyup.native="checkInteger(priceData,'FSeat')">
<template slot="prepend">头等舱/下铺</template>
</el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="人数" class="w190" v-model="priceData.Inventory">
<template slot="prepend">最低成团人数</template>
</el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="人数" class="w260" v-model="priceData.LeaderNum">
<template slot="prepend">领队人数</template>
</el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="可销售机票数量" class="w290" v-model="priceData.CanSellTicketNum" maxlength="2"
@keyup.native="checkInteger(priceData,'CanSellTicketNum')" @change="CheckSellTicketNum(priceData)">
<template slot="prepend">可销售机票数量</template>
</el-input>
</el-form-item>
</div>
<div class="TPright clearfix">
<el-form-item prop="GatherTime">
<el-input placeholder="请输入" class="w290 ComSeat" v-model="priceData.GatherTime">
<template slot="prepend">集合时间</template>
</el-input>
</el-form-item>
<el-form-item prop="GatherAddress">
<el-input placeholder="请输入" class="w460 ComSeat" v-model="priceData.GatherAddress">
<template slot="prepend">集合地点</template>
</el-input>
</el-form-item>
<el-form-item>
<span class="TP_Sendprepend" style="margin-left:0;width:120px;">销售状态</span>
<el-select class="w180" v-model="priceData.TCSaleState">
<el-option v-for="item in TeamList" :key="item.Id" :label="item.name" :value="item.Id"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入" class="w460 ComSeat" v-model="priceData.GatherTag">
<template slot="prepend">集合标识</template>
</el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入" class="w460 ComSeat" v-model="priceData.AirportService">
<template slot="prepend">机场服务</template>
</el-input>
</el-form-item>
</div>
<div class="clearfix">
<div class="leftSetInfo">
<span class="TPbaseSet"></span>
<span class="TPsecondTitle">机票绑定</span>
</div>
<div class="TPright clearfix">
<el-popover popper-class="_TravelPriceDetails" trigger="click">
<div>
<div style="margin-bottom:20px;">
开始日期
<el-date-picker class="w150" type="date" v-model="QFlightDateStart" :picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd" placeholder></el-date-picker>
结束日期
<el-date-picker class="w150" type="date" v-model="QFlightDateEnd" :picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd" placeholder></el-date-picker>
<button class="normalBtn" @click.stop="getSelectFilght()">查询</button>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="_color_666">选择</td>
<td class="_color_666">航班号</td>
<td class="_color_666">航空公司</td>
<td class="_color_666">航段</td>
<td class="_color_666">时间</td>
<td class="_color_666">PNR</td>
<td class="_color_666">使用数量/剩余数量</td>
<td class="_color_666">绑定机位数</td>
</tr>
<tr v-for="fitem in selectFilghtList">
<td>
<el-checkbox v-model="fitem.IsSelected===true" @change="getSelect(fitem)"></el-checkbox>
</td>
<td><span class="TP_Airticktid" @click="goUrl('TicketManager',fitem.AirticketId)">{{fitem.FlightNumber}}</span>
</td>
<td>{{fitem.AlName}}</td>
<td>{{fitem.DepartureName}}-{{fitem.ArrivalCityName}}</td>
<td>{{fitem.FlightDate}} {{fitem.Departure_time}}</td>
<td>{{fitem.PNR}}</td>
<td>{{fitem.UseAmount}} / {{fitem.RemainNum}}</td>
<td>
<el-input class="w80" placeholder="机位数" @keyup.native="getFlightBindNum(fitem)" v-model="fitem.BindNum"></el-input>
</td>
</tr>
</table>
</div>
<div slot="reference" class="SimulateDrop-box">
<span class="SD_flight" v-for="item in FinfoList">{{item.name}} {{item.date}}</span>
<i class="iconfont icon-arrow-down SimulaDrop"></i>
</div>
</el-popover>
<el-form-item style="margin-top:1px;">
<span class="TP_Sendprepend" style="margin:3px -1px 0 0">销售公司</span>
<el-select class="w350 multiple_input" :class="{'SaleBranchList':priceData.SaleBranchIdArray==''}"
v-model="priceData.SaleBranchIdArray" multiple>
<el-option v-for="item in companyList" :key="item.id" :label="item.bName" :value="item.id"></el-option>
</el-select>
</el-form-item>
</div>
</div>
<div class="clearfix">
<div class="leftSetInfo">
<span class="TPbaseSet" style="width:62px;"></span>
<span class="TPsecondTitle" style="width:66px;">op对外备注</span>
</div>
<div class="TPright" style="float:left;">
<el-form-item style="margin-top:-20px;">
<el-input v-model="priceData.OPRemark" type="textarea" :autosize="{minRows: 3, maxRows: 3 }"
resize="none" class="w760" placeholder="op对外备注"></el-input>
</el-form-item>
<el-form-item>
<div>
<span class="TCSwitchtitle">订单操作</span>
<span class="TCswitch">
<el-switch v-model="priceData.IsOrder" :active-value="inActive" :inactive-value="notInActive"></el-switch>
<div class="TC-config">关闭后,业务人员将不能操作订单</div>
</span>
</div>
</el-form-item>
<el-form-item>
<div>
<span class="TCSwitchtitle">同行在线预订</span>
<span class="TCswitch">
<el-switch v-model="priceData.IsB2B" :active-value="inActive" :inactive-value="notInActive"></el-switch>
<div class="TC-config">产品将会直接推送到B2B站点</div>
</span>
</div>
</el-form-item>
</div>
<div class="TPright" style="float:left;">
<el-form-item>
<div>
<span class="TCSwitchtitle">报名候补</span>
<span class="TCswitch">
<el-switch v-model="priceData.IsSubstitution" :active-value="inActive" :inactive-value="notInActive"></el-switch>
<div class="TC-config">关闭后不可超收人数</div>
</span>
</div>
</el-form-item>
<el-form-item>
<div>
<span class="TCSwitchtitle">直客在线预订</span>
<span class="TCswitch">
<el-switch v-model="priceData.IsB2C" :active-value="inActive" :inactive-value="notInActive"></el-switch>
<div class="TC-config">产品将会直接推送到B2C站点</div>
</span>
</div>
</el-form-item>
</div>
</div>
</div>
</el-form>
</div>
<div class="TPNotice">注:以上报价均会根据客户所选类型做价差处理</div>
</div>
</div>
<TravelPriceFlightList @headCallBack="setDisDirectFlight" ref="TravelFlightList" :priceData="priceData"
:AirTicketId="priceData.AirTicketId" :DeleteAirticketIds="priceData.DeleteAirticketIds" :selectFilghtList="selectFilghtList"></TravelPriceFlightList>
</div>
<el-dialog custom-class='Tp_hotelDialog' title="酒店使用情况" :visible.sync="outerVisible" center>
<!-- <table class="TphotelTable" border="0" cellspacing='1' v-if="priceData.TCID>0">
<tr v-if="priceData.PriceHotelList" v-for="item in priceData.PriceHotelList">
<td style="background-color:#E6E6E6;color:#333;" width="120">{{item.UseDay}}</td>
<td>
<div class="tp_divList" v-for="(subItem,index) in item.SubList">
<div>
{{index+1}}.{{subItem.HotelName}}&nbsp;&nbsp;【<span style="color:#E95252;">库存:{{subItem.RemainingInventory}}</span>】&nbsp;&nbsp;
<el-checkbox v-model="item.CheckList[index].CheckStatus" @change="changeHotelStatus(item,index),changeHotelList()"></el-checkbox>
</div>
</div>
</td>
<td>
<el-select class="w180" v-model="item.NewHotelId" @visible-change="getHotelList(item,$event)" @change="changeHotelList()" filterable>
<el-option :key="0" label="请选择" :value="0"></el-option>
<el-option v-for="subItem in item.HotelList" :key="subItem.ID" :label="subItem.Name" :value="subItem.ID">
<span style="float: left">{{subItem.Name}}</span>
<span style="float: right; color:red; font-size: 13px">{{ subItem.Inventory }}</span>
</el-option>
</el-select>
</td>
</tr>
</table>
<div slot="footer" class="dialog-footer">
<button class="normalBtn" type="primary">{{$t('pub.saveBtn')}}</button> &nbsp;
<button class="hollowFixedBtn" @click="outerVisible = false">{{$t('pub.cancelBtn')}}</button>
</div> -->
</el-dialog>
</div>
</template>
<script>
import TravelPriceFlightList from "../TravelGroupControl/TravelPriceFlightList.vue";
export default {
props: ["priceList", "priceIsDirect", "OfferList", "PostConfig", "modifyTcid"],
data() {
return {
outerVisible: false,
currentDay: 1,
currentMonth: 1,
currentYear: 1970,
uploadList: [],
CheckedVaule: 1, //选中值
UnCheckedVaule: 2, //没选中
//日期数组
days: [],
dateString: "2016-01-02",
inActive: 1,
notInActive: 0,
//选中状态
chooseDay: "",
DateArr: [],
priceData: {
AdImage: {
Url: "",
Name: ""
},
SaleBranchIdArray: []
},
returnPriceList: this.priceList,
//酒店列表
HotelList: [],
companyList: [],
offerList: [],
selectFilghtList: [],
FinfoList: [],
//下拉框默认值
SelectDefaultValue: 0,
SelectOtherDefault: -1,
isFold: "",
rules: {
Inventory: [{
required: true,
message: "请填写首次入库数",
trigger: "change"
}],
ClearOrderHour: [{
required: true,
message: "请填写自动清位",
trigger: "change"
}],
SendVisaTime: [{
required: true,
message: "请选择送签时间",
trigger: "change"
}]
},
TeamList: [{
Id: 1,
name: "一般团"
},
{
Id: 2,
name: "促销团"
},
{
Id: 3,
name: "主推团"
}
],
currentPriceIndex: 0, //当前团期索引位置
showPriceList: [],
priceShowCount: 6, //团期展示条数
QFlightDateStart: '', //航班查询开始日期
QFlightDateEnd: '', //航班查询结束日期
pickerBeginDateBefore: {
disabledDate: time => {
let endTime = new Date(this.QFlightDateEnd);
return endTime.getTime() < time.getTime();
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.QFlightDateStart);
return startTime.getTime() >= time.getTime();
}
}
};
},
methods: {
//点击折叠
fold() {
if (this.isFold == "") {
this.isFold = 1;
} else {
this.isFold = "";
}
},
//年月点击切换
getDateString: function () {
this.dateString = this.$calendarUtils.formatDate(
this.currentYear,
this.currentMonth,
1
);
},
//点击选中日历日期
clickedDay(item) {
this.chooseDay = this.getDayStr(item.day);
switch (item.checkState) {
case this.$calendarUtils.checkState.hasValue:
item.checkState = this.$calendarUtils.checkState.checked;
var objItem = "";
if (this.returnPriceList.length > 0) {
objItem = JSON.parse(JSON.stringify(this.returnPriceList[0]));
objItem.OPRemark = "";
objItem.AirTicketId = 0;
objItem.AirticketBindList = [];
objItem.Checked = false;
objItem.StartDate = this.chooseDay;
objItem.TCID = 0;
objItem.PriceFlight = JSON.parse(
JSON.stringify(this.PostConfig.FlightList)
);
} else {
objItem = {
TCID: 0,
AirTicketId: 0,
AirticketMoney: 0,
B2BMemberPrice: 0,
B2BPrice: 0,
B2CMemberPrice: 0,
B2CPrice: 0,
BabyChargePrice: 0,
BabyPrice: 0,
ChildNeedPrice: 0,
ChildNoNeedPrice: 0,
ConfigId: 0,
DiscountPrice: 0,
IsSupportChildren: 1,
OfferId: 0,
OldManChargePrice: 0,
OtherPrice: 0,
PeopleNum: 0,
RebatePrice: 0,
SafeMoney: 0,
SingleDMCPrice: 0,
SingleRoomPrice: 0,
VisaPrice: 0,
BackVisaPrice: 0,
BackSafeMoney: 0,
ContractUrl: "",
ContractArray: [],
OutBranchId: 0,
GatherTime: "",
GatherAddress: "",
AdImage: "",
YSeat: 0,
CSeat: 0,
FSeat: 0,
Inventory: 0,
StartDate: this.chooseDay,
ClearOrderHour: "",
SendVisaTime: "",
Checked: false,
SaleBranchId: "", //销售公司编号
//销售公司数组
SaleBranchIdArray: [],
//op备注
OPRemark: "",
//销售状态
TCSaleState: 1,
LeaderNum: 0,
IsOrder: 0,
IsB2B: 0,
IsB2C: 0,
IsSubstitution: 1,
AirticketBindList: [],
PriceFlight: JSON.parse(
JSON.stringify(this.PostConfig.FlightList)
),
//删除的绑定的航班编号
DeleteAirticketIds: "",
GatherTag: "", //集合标识
AirportService: "", //机场服务
//可销售机票数量
CanSellTicketNum: 2,
//是否订团,0-不订,1需要订
IsBookTeam: 0,
//是否重新生成行程数据
IsNew: false,
//选中的酒店数组
ChooseHotelArray: [],
};
}
this.returnPriceList.push(objItem);
this.initDatePickerCheched();
this.returnPriceList.sort(
this.$commonUtils.createComprisonFunction("StartDate")
);
this.getDateInfo(objItem);
break;
}
},
//单团期修改重置日历选中
initDatePickerCheched() {
},
RemovePrice(dateStr) {
var array = [];
this.returnPriceList.forEach(dayItem => {
if (dayItem.StartDate != dateStr) {
array.push(dayItem);
}
});
this.returnPriceList = array;
},
initCalendar: function (cur) {
var newDays = this.$calendarUtils.createCalendar(cur);
this.currentDay = newDays.CurrentDay;
this.currentYear = newDays.CurrentYear;
this.currentMonth = newDays.CurrentMonth;
this.days.length = 0;
var dateArray = newDays.DayArray;
for (var i = 0; i < dateArray.length; i++) {
var d = dateArray[i].day;
var dayobject = {};
dayobject.day = d;
dayobject.checkState = this.$calendarUtils.checkState.hasValue;
this.days.push(dayobject);
}
this.initDate();
},
//初始化数据状态
initDate() {
if (this.days != null) {
this.days.forEach(dayItem => {
var myDate = this.$calendarUtils.formatDate(
dayItem.day.getFullYear(),
dayItem.day.getMonth() + 1,
dayItem.day.getDate()
);
dayItem.checkState = this.$calendarUtils.checkState.hasValue;
if (this.checkPriceExit(myDate)) {
dayItem.checkState = this.$calendarUtils.checkState.checked;
}
});
}
this.initDatePickerCheched();
},
//点击左箭头切换年月
pickPre: function (year, month) {
var d = new Date(this.$calendarUtils.formatDate(year, month, 1));
d.setDate(0);
this.initCalendar(
this.$calendarUtils.formatDate(d.getFullYear(), d.getMonth() + 1, 1)
);
},
//点击右箭头切换年月
pickNext: function (year, month) {
var d = new Date(this.$calendarUtils.formatDate(year, month, 1));
d.setDate(35);
this.initCalendar(
this.$calendarUtils.formatDate(d.getFullYear(), d.getMonth() + 1, 1)
);
},
initFlightData() {
this.selectFilghtList = [];
this.FinfoList = [];
if (this.priceData.AirticketBindList.length > 0) {
this.QFlightDateStart = this.priceData.AirticketBindList[0].FlightDate;
this.QFlightDateEnd = this.priceData.AirticketBindList[this.priceData.AirticketBindList.length - 1].FlightDate;
this.getSelectFilght();
} else {
this.QFlightDateStart = this.daysCalculate(this.priceData.StartDate, -1);
this.QFlightDateEnd = this.daysCalculate(this.priceData.StartDate, 1);
this.getSelectFilght();
}
},
//日期计算
daysCalculate(date, addDay) {
var date = new Date(date); //获取当前时间
date.setDate(date.getDate() + addDay);
return date.Format("yyyy-MM-dd");
},
getSelectFilght() {
let createBy = this.priceData.CreateBy;
if (createBy == undefined || createBy == 0) {
let userInfo = this.getLocalStorage();
createBy = userInfo.EmployeeId;
}
let msg = {
QFlightDateStart: this.QFlightDateStart,
QFlightDateEnd: this.QFlightDateEnd,
CreateBy: createBy,
AirTicketId: this.priceData.AirTicketId
};
let that = this;
this.apipost(
"TravelAirTicket_Get_GetSelfPurchaseList",
msg,
res => {
if (res.data.resultCode == 1) {
let resultFilghtList = res.data.data;
that.selectFilghtList = [];
resultFilghtList.forEach(x => {
that.selectFilghtList.push(x);
});
//通过返回数据初始化下拉选中
that.FinfoList = [];
if (that.priceData.AirticketBindList != null) {
that.priceData.AirticketBindList.forEach(x => {
that.selectFilghtList.forEach(y => {
if (x.PurchaseId == y.Id && x.BindNum > 0) {
y.IsSelected = true;
y.BindNum = x.BindNum;
that.FinfoList.push({
name: y.AlName,
date: y.FlightDate
});
}
});
});
}
that.$forceUpdate();
} else {
this.$message({
type: "error",
message: res.data.message
});
}
},
err => {}
);
},
compareDay(day) {
var _string = this.getDayStr(day);
if (_string == this.chooseDay) {
return true;
} else {
return false;
}
},
validateForm() {
//表单验证
let flag = true;
if (
this.returnPriceList == null ||
this.returnPriceList == undefined ||
this.returnPriceList.length === 0
) {
this.Error("请选择团期");
flag = false;
}
if (flag) {
this.returnPriceList.forEach(x => {
if (flag) {
if (!this.validateTeamQuot(x)) {
flag = false;
}
}
});
}
return flag;
},
//数据验证
validateTeamQuot(quotationPrice) {
if (
this.isNullOrEmpty(quotationPrice.B2BMemberPrice) ||
this.isNullOrEmpty(quotationPrice.B2BPrice) ||
this.isNullOrEmpty(quotationPrice.B2CMemberPrice) ||
this.isNullOrEmpty(quotationPrice.B2CPrice) ||
this.isNullOrEmpty(quotationPrice.BabyChargePrice) ||
this.isNullOrEmpty(quotationPrice.BabyPrice) ||
this.isNullOrEmpty(quotationPrice.ChildNeedPrice) ||
this.isNullOrEmpty(quotationPrice.ChildNoNeedPrice) ||
this.isNullOrEmpty(quotationPrice.OldManChargePrice) ||
this.isNullOrEmpty(quotationPrice.OtherPrice) ||
this.isNullOrEmpty(quotationPrice.SingleRoomPrice) ||
this.isNullOrEmpty(quotationPrice.VisaPrice) ||
this.isNullOrEmpty(quotationPrice.SingleDMCPrice) ||
this.isNullOrEmpty(quotationPrice.BackVisaPrice) ||
this.isNullOrEmpty(quotationPrice.OutBranchId)
) {
return false;
} else {
return true;
}
},
isNullOrEmpty(value) {
if (value === null || value === "") {
return true;
} else {
return false;
}
},
getDayStr(date) {
var _string = this.$calendarUtils.formatDate(
date.getFullYear(),
date.getMonth() + 1,
date.getDate()
);
return _string;
},
setDisDirectFlight(obj) {
this.priceData.PriceFlight = JSON.parse(JSON.stringify(obj.priceFlight));
this.priceData.DeleteAirticketIds = obj.DeleteAirticketIdArray.join(',');
},
//删除标签
delDateList(item) {
var StartDateStr = item.StartDate;
var that = this;
that.Confirm("是否删除?删除后不能恢复!", function () {
if (item.TCID > 0) {
that.apipost(
"travel_post_RemoveTravelPrice", {
TCID: item.TCID
},
res => {
if (res.data.resultCode == 1) {
that.deletePrice(StartDateStr);
} else {
that.Info(res.data.message);
}
},
null
);
} else {
that.deletePrice(StartDateStr)
}
});
},
//删除团期
deletePrice(StartDateStr) {
this.days.forEach(dayItem => {
var dateStr = this.getDayStr(dayItem.day);
if (dateStr == StartDateStr) {
dayItem.checkState = this.$calendarUtils.checkState.hasValue;
}
});
var array = [];
let deleteIsChecked = false;
this.returnPriceList.forEach(priceItem => {
if (priceItem.StartDate != StartDateStr) {
array.push(priceItem);
} else {
if (priceItem.Checked) {
deleteIsChecked = true;
}
}
});
this.returnPriceList = array;
if (deleteIsChecked && this.returnPriceList.length > 0) {
this.returnPriceList[0].Checked = true;
}
},
//选中的日期点击事件
getDateInfo(item) {
this.returnPriceList.forEach(x => {
x.Checked = false;
});
item.Checked = true;
this.priceData = item;
this.initFlightData();
},
//左移动获取展示的团期
priceLeftMove() {
if (this.currentPriceIndex > 0) {
this.currentPriceIndex--;
this.initShowPriceList();
}
},
//右移动获取展示的团期
priceRightMove() {
if (
this.currentPriceIndex <
this.returnPriceList.length - this.priceShowCount
) {
this.currentPriceIndex++;
this.initShowPriceList();
}
},
//初始化显示团期数据
initShowPriceList() {
let showPriceList = [];
let getCount = 0; //获取到得数量
this.showPriceList = showPriceList;
for (
let i = this.currentPriceIndex; i < this.returnPriceList.length && getCount < this.priceShowCount; i++
) {
showPriceList.push(this.returnPriceList[i]);
getCount++;
}
},
//修改时判断初始化团期是否存在
checkPriceExit(date) {
let isExit = false;
this.priceList.forEach(price => {
if (this.$commonUtils.CompareDate(price.StartDate, date) === 0) {
if (this.modifyTcid > 0) {
if (price.TCID == this.modifyTcid) {
isExit = true;
}
} else {
isExit = true;
}
}
});
return isExit;
},
getCompanyList() {
//出团公司
this.apipost(
"sellorder_post_GetBranchList", {},
res => {
if (res.data.resultCode == 1) {
this.companyList = res.data.data;
}
},
err => {}
);
},
//选中航班选择框
getSelect(item) {
item.IsSelected = !item.IsSelected;
this.FinfoList = [];
this.selectFilghtList.forEach(x => {
if (x.IsSelected) {
this.FinfoList.push({
name: x.AlName,
date: x.FlightDate
});
var isExsit = false;
this.priceData.AirticketBindList.forEach(y => {
if (x.Id == y.PurchaseId) {
isExsit = true;
y.BindNum = x.BindNum;
}
});
if (!isExsit) {
this.priceData.AirticketBindList.push({
AirTicketId: x.AirticketId,
BindNum: x.BindNum,
ID: 0,
PurchaseId: x.Id,
FlightDate: x.FlightDate
});
}
} else {
var flag = true;
for (var i = 0; i < this.priceData.AirticketBindList.length; i++) {
if (
this.priceData.AirticketBindList[i].PurchaseId === x.Id &&
flag
) {
flag = false;
this.priceData.AirticketBindList.splice(i, 1);
}
}
}
});
this.priceData.AirticketBindList.sort(
this.$commonUtils.createComprisonFunction("FlightDate")
);
},
//改变输入框的值
getFlightBindNum() {
var TotalSeat =
parseInt(this.priceData.YSeat) +
parseInt(this.priceData.CSeat) +
parseInt(this.priceData.FSeat);
this.selectFilghtList.forEach((x, index) => {
if (x.IsSelected) {
this.priceData.AirticketBindList.forEach(y => {
if (x.Id == y.PurchaseId) {
y.BindNum = x.BindNum;
}
});
}
});
},
goUrl(path, id) {
this.$router.push({
name: path,
query: {
"id": id,
blank: 'y',
tab: '票务管理'
}
})
},
//检查机位数是否超过设置的可销售数量
CheckSellTicketNum(item) {
var totalNum = 0;
if (item.YSeat && item.YSeat != '') {
totalNum += Number(item.YSeat);
}
if (item.CSeat && item.CSeat != '') {
totalNum += Number(item.CSeat);
}
if (item.FSeat && item.FSeat != '') {
totalNum += Number(item.FSeat);
}
var canSellNum = 0;
if (item.CanSellTicketNum && item.CanSellTicketNum != '') {
canSellNum = Number(item.CanSellTicketNum);
}
if (totalNum < canSellNum) {
this.Info("可销售机票数量不能超过本团机位数!")
item.CanSellTicketNum = 0;
}
},
//每一天只能选择一个酒店
changeHotelStatus(item, index) {
item.CheckList.forEach((subItem, subIndex) => {
if (subIndex != index) {
subItem.CheckStatus = false;
}
});
},
//获取选择的酒店
changeHotelList() {
this.priceData.ChooseHotelArray = [];
if (this.priceData.PriceHotelList != null && this.priceData.PriceHotelList.length > 0) {
this.priceData.PriceHotelList.forEach(x => {
var obj = {
HotelId: 0,
DayNum: 0
}
if (x.NewHotelId > 0) {
obj.HotelId = x.NewHotelId;
obj.DayNum = x.DayNum;
this.priceData.ChooseHotelArray.push(obj);
} else {
x.CheckList.forEach((y, index) => {
if (y.CheckStatus) {
obj.HotelId = x.SubList[index].HotelId;
obj.DayNum = x.SubList[index].DayNum
this.priceData.ChooseHotelArray.push(obj);
}
})
}
});
if (this.priceData.ChooseHotelArray != null && this.priceData.ChooseHotelArray.length > 0) {
this.priceData.IsNew = true;
}
}
},
//获取酒店信息
getHotelList(item, event) {
if (event) {
var msg = {
Country: 651,
sDate: item.UseDay,
IsMoreThanZero:1
};
this.apipost(
"hotel_post_GetHasStockHotelList", msg,
res => {
if (res.data.resultCode == 1) {
item.HotelList = res.data.data;
}
},
err => {}
);
}
}
},
mounted() {
var dateObj = this.$calendarUtils.getCurrentDate();
this.currentYear = dateObj.CurrentYear;
this.currentMonth = dateObj.CurrentMonth;
this.initCalendar();
this.getCompanyList();
},
watch: {
priceList: {
//深度监听,可监听到对象、数组的变化
handler: function (val, oldVal) {
this.returnPriceList = JSON.parse(JSON.stringify(this.priceList));
//当团期修改
if (this.modifyTcid > 0) {
let priceList = [];
this.returnPriceList.forEach(x => {
if (x.TCID == this.modifyTcid) {
priceList = [];
x.ConfigID = 0;
priceList.push(x);
}
});
this.returnPriceList = priceList;
}
this.returnPriceList.sort(
this.$commonUtils.createComprisonFunction("StartDate")
);
this.returnPriceList.forEach((x, index) => {
if (index == 0) {
this.priceData = this.returnPriceList[index];
x["Checked"] = true;
this.chooseDay = this.priceData.StartDate;
this.initFlightData();
} else {
x["Checked"] = false;
}
this.DateArr.push(x.StartDate);
});
this.initCalendar();
},
deep: true
},
returnPriceList: {
//深度监听,可监听到对象、数组的变化
handler: function (val, oldVal) {
this.initShowPriceList();
this.$emit("headCallBack", this.returnPriceList);
},
deep: true
},
//监听报价单日期
OfferList: {
//深度监听,可监听到对象、数组的变化
handler: function (val, oldVal) {
this.initCalendar();
},
deep: true
}
},
components: {
TravelPriceFlightList: TravelPriceFlightList
}
};
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment