Commit ced1583d authored by 黄奎's avatar 黄奎

新增页面

parent 68ed7368
<style>
@import "../../../assets/css/newTravelManager.css";
.CostNewPrice .el-form-item__content,
.CostNewPrice .el-form-item__label {
line-height: 30px;
}
.CostNewPrice .CP_halfWi {
width: 45%;
}
.CostNewPrice .QuotationFirstDiv1 {
padding-top: 30px;
}
.CostNewPrice .CP_ComTitle2 {
color: #106BAF;
font-weight: bold;
background-color: #D1EEEE;
white-space: nowrap;
}
.CostNewTable {
border-collapse: collapse;
}
.CostNewTable td {
height: 40px;
border: 1px solid #106BAF !important;
border-collapse: collapse;
padding: 0 3px;
}
.CostNewTable .el-input .el-input__inner {
height: 25px !important;
border: none;
border-bottom: 1px solid #606266;
padding-left: 5px !important;
}
.CP_ComTitle {
color: #106BAF;
}
.w70 {
width: 70px !important;
}
.CostcomCenter {
text-align: center;
}
.txtRightCost {
text-align: right;
padding-right: 10px;
}
.CostNewPrice .el-form-item {
margin-bottom: 0 !important;
}
.select-tag {
font-weight: bold;
color: #f12a2a;
}
</style>
<template>
<div class="DirectQuotation clearfix" v-loading="loading">
<div class="singlePrice DirectPriceCenter">
<el-form>
<div class="QuotationFirstDiv1">
<table>
<tr>
<th>
{{$t('objFill.v101.kaituants')}}
</th>
<th colspan="5" style="text-align:left;line-height:40px;">
<p style="color:red;font-weight:bold;">
1.{{$t('objFill.v101.changuitdyshnp')}}&nbsp;&nbsp;
2.{{$t('objFill.v101.xiaobtcgbjd')}}&nbsp;&nbsp;
3.{{$t('objFill.v101.dangdybxyjp')}}
</p>
</th>
</tr>
<tr>
<td width="80" class="txtRightCost">{{$t('objFill.v101.chutuanleix')}}</td>
<td>
<el-select class="multiple_input" v-model="postData.TeamType" @change="changeTeamType()"
style="width:100px;">
<el-option v-for='item in teamList' :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
<template v-if="postData.TeamType==0||postData.TeamType==1">
{{$t('objFill.tuanduilx')}}
<el-select class="multiple_input" v-model="postData.PriceTeamType" style="width:100px;">
<template v-for="item in TeamListArr">
<template v-if="postData.TeamType==0">
<el-option v-if="item.Id==1||item.Id==2||item.Id==3||item.Id==9" :key="item.Id"
:label="item.Name" :value="item.Id">
</el-option>
</template>
<template v-if="postData.TeamType==1">
<el-option v-if="item.Id==3||item.Id==2" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</template>
</template>
</el-select>
</template>
</td>
<td width="80" class="txtRightCost">{{$t('advmanager.v_line')}}</td>
<td>
<el-select style="width:100%" v-model="postData.LineId" :placeholder="$t('pub.pleaseSel')"
@change="changeLine()" filterable>
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option v-for="item in getLineList" :label='item.LineName' :value='item.LineID' :key='item.LineID'>
</el-option>
</el-select>
</td>
<td width="80" class="txtRightCost">{{$t('advmanager.v_xilie')}}</td>
<td>
<el-select style="width:100%;" v-model="postData.LineteamId" :placeholder="$t('pub.pleaseSel')"
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>
</td>
</tr>
<tr>
<td colspan="6" style="height:20px;">
</td>
</tr>
<tr>
<td width="80" class="txtRightCost">{{$t('scen.sc_cp')}}</td>
<td>
<el-select class="multiple_input" v-model="postData.OutBranchId" filterable style="width:265px;">
<el-option v-for='item in companyList' :key="item.id" :label="item.bName" :value="item.id">
</el-option>
</el-select>
</td>
<td width="80" class="txtRightCost">{{$t('visa.v_xcdays')}}</td>
<td>
<el-input class="w240 LowNum" v-model="postData.DayNum"
@keyup.native="checkInteger(postData,'DayNum');createDayTripPrice()" maxlength="2">
<template slot="append">{{$t('hotel.hotel_day')}}</template>
</el-input>
<el-input class="w120 LowNum" v-model="postData.NightNum" style="display:none;"
@keyup.native="checkInteger(postData,'NightNum')" maxlength="2">
<template slot="append">{{$t('Operation.Op_night')}}</template>
</el-input>
</td>
<td width="80" class="txtRightCost">{{$t('fnc.khmingcheng')}}</td>
<td>
<el-input v-model="postData.CustomerName" type="text" :placeholder="$t('fnc.khmingcheng')"
maxlength="200">
</el-input>
</td>
</tr>
<tr>
<td colspan="6" style="height:20px;">
</td>
</tr>
<tr>
<td width="80" class="txtRightCost">{{$t('sm.tuanduibiaoti')}}</td>
<td colspan="3">
<el-input v-model="postData.Title" type="textarea" :autosize="{minRows: 1, maxRows: 2 }" resize="none"
:placeholder="$t('objFill.v101.qingtxtdbti')" maxlength="200"></el-input>
</td>
<td width="80" class="txtRightCost">{{$t('Airticket.Air_StartTime')}}</td>
<td>
<el-date-picker type="dates" v-model="postData.OutDateTimeList" value-format="yyyy-MM-dd" placeholder>
</el-date-picker>
</td>
</tr>
<tr>
<td colspan="8" style="height:20px;">
</td>
</tr>
<tr>
<td width="80" class="txtRightCost">已选日期</td>
<td colspan="5">
<template v-if="postData.OutDateTimeList&&postData.OutDateTimeList.length>0">
<el-tag v-for="(item,oIndex) in postData.OutDateTimeList" :key="item" closable
style="margin-right:5px;" @close="handleClose(oIndex)">
{{item}}
</el-tag>
</template>
</td>
</tr>
</table>
</div>
<br />
<CostNewPriceForm v-if="haveData" ref="CostNewPrice" :postConfig="postData" :AllCurrencyList="AllCurrencyList"
@success="refreshPage">
</CostNewPriceForm>
</el-form>
</div>
<div class="btnFixedDiv" v-if="haveData">
<div class="toTop">
<i class="iconfont icon-huidaodingbu"></i>
</div>
<div class="DTSaveBtn" :class="{'disClick':!isSubmit}" @click="SaveData(2)">{{$t('fnc.tijiao')}}</div>
<div class="DTSaveBtn" style="display:none;">{{$t('objFill.copy')}}</div>
<div class="DTSaveBtn caogao" :class="{'disClick':!isSubmit}" @click="SaveData(1)">
<span>{{$t('pub.saveBtn')}}</span>
<span>{{$t('objFill.caogao')}}</span>
</div>
</div>
</div>
</template>
<script>
import CostNewPriceForm from "../TravelNewQuotation/CostNewPriceForm";
export default {
components: {
CostNewPriceForm: CostNewPriceForm,
},
computed: {
//线路筛选
getLineList() {
var chooseLineList = [];
//散拼
if (this.postData.TeamType == 0 || this.postData.TeamType == 5) {
chooseLineList = this.LineList.filter(qItem => qItem.LineDirection == 2);
} //小包团
else if (this.postData.TeamType == 1) {
chooseLineList = this.LineList.filter(qItem => qItem.Is_PacketGroup == 1);
}
//当地游
else if (this.postData.TeamType == 2) {
chooseLineList = this.LineList.filter(qItem => qItem.LineDirection == 3);
}
return chooseLineList;
},
},
data() {
return {
haveData: false,
//基本配置
postData: {
ID: 0,
TCID: 0,
OfferId: 0,
StartCityId: 0,
LineId: 0,
LineteamId: 0,
Title: "",
IsOrder: 1,
IsSubstitution: 1,
IsB2B: 1,
IsB2C: 1,
FSeat: 0,
CSeat: 0,
YSeat: 0,
//最低成团人数
LowNum: 0,
//OP备注
OpRemark: "",
//产品经理备注
ProductRecommend: "",
IsDirect: 0, //是否直采(0-否-1-是)【全部默认非直采】
PriceIsDirect: 1, //是否直采报价(1-否-2-是)【全部默认非直采】
PDFAlias: "", //pdf别名
ImgCover: "", //封面图
DayNum: 0, //天数
NightNum: 0, //晚数
StartCityId: 0,
ReturnArriveCityId: 0, //返回抵达城市
CustomerName: "", //客户名称
TeamType: 0, //出团类型
PriceTeamType: 0, //团队类型
TravelState: 1, //团控状态(1-草稿,2-待审核,3-审核通过,4-审核拒绝,5已撤销)
OutBranchId: "", //出团公司
OutDateTime: "", //出发时间
OutDateTimeList: [], //出发时间
OfferPayType: 0, //报价单付款方式
SaleOfferPayType: 0, //售价付款方式
OPId: "", //主OP
AssistantId: "", //助理OP[格式:1,2,3]
AssistantList: [], //助理OP数组
OfferArray: [{
CostCurrencyList: [],
CostNumberList: [], //报价人数
CurrencyNumberListExt: [], //币种和人数列表
dayCostPriceList: [], //行程报价
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, //单地接(成本)
SingleDMCTCPrice: 0, //单地接团售价
RebatePrice: 0, //同行返佣
DiscountPrice: 0, //早鸟优惠
IsSupportChildren: 1, //是否支持儿童出游(1-支持,2-不支持)
SafeMoney: 0, //保险费
PeopleNumber: 0, //人数
AirticketMoney: 0, //机票费用
BackVisaPrice: 0, //退签证费
BackSafeMoney: 0, //退保险费
ContractUrl: "", //合同地址
PriceRemark: "", //定价备注
ContractArray: [],
TaxPrice: 0, //税金
UnionPrice: 0, //联运价格
NightPrice: 0, //过夜费
}, //团队价格信息
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, //杂费分摊费用
OtherRemark: "", //其他价格备注
VisaMoneyCurrencyId: 0, //签证费币种
SafeMoneyCurrencyId: 0, //保险费币种
LeaderTripMoneyCurrencyId: 0, //领队小费币种
DriverGuideMoneyCurrencyId: 0, //司机小费币种
LeaderGuideDriveZhuSu: 0, //领队导游住宿费
GuideMoneyCurrencyId: 0, //导游小费币种
GuideMoney: 0, //导游小费
InternationalAirTicket: 0, //国际段机票
InternationalAirTicketCurrency: 0, //国际段机票币种
GuideComplement: 0, //导游回补
TipComplement: 0, //小费回补
}, //其他报价
}]
},
isSubmit: true,
LineList: [], //线路列表
LineTeamList: [], //系列列表
teamList: [], //团队类型列表
TeamListArr: [], //团队子类型
companyList: [], //出团公司列表
AllCurrencyList: [], //币种列表
loading: false
};
},
methods: {
//删除日期
handleClose(index) {
this.postData.OutDateTimeList.splice(index, 1);
},
changeTeamType() {
this.postData.LineId = 0;
this.postData.LineteamId = 0;
this.postData.PriceTeamType = '';
if (this.postData.TeamType == 0) {
this.postData.PriceTeamType = 1;
} else if (this.postData.TeamType == 1) {
this.postData.PriceTeamType = 3;
}
},
//获取所有币种
getAllCurrency() {
this.apipost(
"financeinfo_post_GetList", {},
res => {
if (res.data.resultCode == 1) {
this.AllCurrencyList = res.data.data;
this.AllCurrencyList.forEach(item => {
if (item.ID == 3) {
//徐总说日元默认加0.002
item.CurrentRate = Number(item.CurrentRate) + Number(0.002);
}
});
}
});
},
//出团公司
getCompanyList() {
this.apipost(
"sellorder_post_GetBranchList", {},
res => {
if (res.data.resultCode == 1) {
this.companyList = res.data.data;
}
});
},
//线路切换
changeLine() {
this.getLineTeamList(this.postData.LineId, 1);
},
//获取系列列表
getLineTeamList(lineId, isClear) {
if (isClear && isClear == 1) {
this.postData.LineteamId = 0;
}
let msg = {
lineID: lineId,
isTOOP: 1
};
this.apipost("team_post_GetList", msg, res => {
if (res.data.resultCode == 1) {
this.LineTeamList = res.data.data;
}
});
},
//获取团队类型
getPriceTeamList() {
this.apipost("travel_get_GetTravelPriceTeamTypeList", {}, res => {
if (res.data.resultCode == 1) {
this.TeamListArr = res.data.data;
} else {
this.Error(res.data.message);
}
}, err => {});
},
createDayTripPrice() {
var tempArray = this.createDayTripPriceItem(this.postData.OfferArray[0].dayCostPriceList);
this.postData.OfferArray[0].dayCostPriceList = tempArray;
this.$forceUpdate()
},
//生成行程报价
createDayTripPriceItem(dayCostPriceList) {
if (this.postData.DayNum > dayCostPriceList.length) {
for (var i = dayCostPriceList.length; i < this.postData.DayNum; i++) {
//去掉以前默认的交通
var dayItem = {
Id: 0, //主键编号
OfferId: 0, //报价单编号
ConfigId: 0, //配置编号
Title: "", //行程大点
DayNum: i + 1, //行程天数
CurrencyId: 0, //币种
HotelCostPrice: 0, //酒店报价
BusCostPrice: 0, //车辆报价
ScenicCostPrice: 0, //景点报价
BreakfastCostPrice: 0, //早餐报价
LunchCostPrice: 0, //午餐报价
DinnerCostPrice: 0, //晚餐报价
ContainDinnerType: 0, //含餐类型(1-含早餐,2-含晚餐,3-含早晚)
PassFee: 0, //过路费
HotelName: "", //酒店名称
RebatePrice: 0, //回佣
OtherPrice: 0, //其它费用(保险、司导杂费等)
DinnerIds: "", //晚餐Id
DinnerName: "", //晚餐名称
LunchIds: "", //午餐编号
LunchName: "", //午餐名称
TicketIds: "", //景点编号
ScenicList: [{
TicketId: 0,
TicketName: "",
TicketCostPrice: 0
}, {
TicketId: 0,
TicketName: "",
TicketCostPrice: 0
}, {
TicketId: 0,
TicketName: "",
TicketCostPrice: 0
}], //景点JSON数据
TicketName: "", //景点名称
OtherName: "", //其它杂支名称
BreakfastName: "", //早餐名称
};
dayCostPriceList.push(dayItem);
}
} else {
dayCostPriceList.length = this.postData.DayNum;
}
return dayCostPriceList
},
//保存数据
SaveData(type) {
this.postData.TravelState = type;
// 线路必填
if (!this.postData.LineId) {
this.$message.error(this.$t('rule.qxzxuanlu'))
return;
}
if (this.postData.OPId <= 0 || this.postData.OPId == '') {
this.$message.error(this.$t('objFill.v101.qingshurzop'))
return;
}
this.postData.AssistantId = "";
var flag = false;
if (this.postData.AssistantList && this.postData.AssistantList.length > 0) {
this.postData.AssistantId = this.postData.AssistantList.join(',');
this.postData.AssistantList.forEach(sItem => {
if (sItem == this.postData.OPId && !flag) {
flag = true;
}
});
}
if (flag) {
this.Error(this.$t('objFill.v101.zhulopbnhzopcx'));
return;
}
var postMsg = {
config: this.postData,
OfferArray: this.postData.OfferArray
};
this.loading = true;
this.apipost(
"travel_post_SetConfigOffer_V3", postMsg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.goUrl('newQuotation');
} else {
this.ErrorHtml(res.data.message);
}
});
},
goUrl(path) {
this.$router.push({
path: path,
query: {
}
});
},
refreshPage() {
this.getPostData();
},
getPostData() {
this.haveData = false;
let offerId = 0;
if (this.$route.query.offerid) {
offerId = this.$route.query.offerid;
}
let msg = {
offerId: offerId,
TCID: 0,
};
if (this.$route.query.TCID && this.$route.query.TCID > 0) {
msg.TCID = this.$route.query.TCID
}
this.loading = true;
this.apipost(
"travel_get_GetMyTravelInfo_V4", msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
var tempData = res.data.data;
if (tempData.ID && tempData.ID > 0) {
this.postData.ID = tempData.ID;
}
if (tempData.LineId && tempData.LineId > 0) {
this.postData.LineId = tempData.LineId;
}
if (tempData.LineteamId && tempData.LineteamId > 0) {
this.postData.LineteamId = tempData.LineteamId;
}
if (tempData.CSeat && tempData.CSeat > 0) {
this.postData.CSeat = tempData.CSeat;
}
if (tempData.FSeat && tempData.FSeat > 0) {
this.postData.FSeat = tempData.FSeat;
}
if (tempData.YSeat && tempData.YSeat > 0) {
this.postData.YSeat = tempData.YSeat;
}
if (tempData.LowNum && tempData.LowNum > 0) {
this.postData.LowNum = tempData.LowNum;
}
if (tempData.Title && tempData.Title != '') {
this.postData.Title = tempData.Title;
}
if (tempData.DayNum && tempData.DayNum > 0) {
this.postData.DayNum = tempData.DayNum;
}
if (tempData.NightNum && tempData.NightNum > 0) {
this.postData.NightNum = tempData.NightNum;
}
if (tempData.CustomerName) {
this.postData.CustomerName = tempData.CustomerName;
}
if (tempData.OutDateTime) {
this.postData.OutDateTime = tempData.OutDateTime;
}
if (tempData.OutBranchName && tempData.OutBranchName != '') {
this.postData.OutBranchId = Number(tempData.OutBranchId);
}
this.postData.TeamType = tempData.TeamType;
this.postData.PriceTeamType = tempData.PriceTeamType;
this.postData.TravelState = tempData.TravelState;
this.LineList = tempData.LineList;
if (tempData && tempData.OfferArray && tempData.OfferArray.length > 0) {
this.postData.OfferArray[0].dayCostPriceList = tempData.OfferArray[0].dayCostPriceList;
this.postData.OfferArray[0].CurrencyNumberListExt = tempData.OfferArray[0].CurrencyNumberListExt;
this.postData.OfferArray[0].teamPrice = tempData.OfferArray[0].teamPrice;
this.postData.OfferArray[0].otherPrice = tempData.OfferArray[0].otherPrice;
this.postData.OfferArray[0].CostNumberList = tempData.OfferArray[0].CostNumberList;
this.postData.OfferArray[0].CostCurrencyList = tempData.OfferArray[0].CostCurrencyList;
this.postData.OPId = tempData.OfferArray[0].OPId;
var tempA_Array = tempData.OfferArray[0].AssistantList;
if (tempA_Array && tempA_Array.length > 0) {
tempA_Array.forEach(aItem => {
this.postData.AssistantList.push(aItem.Id);
})
}
}
this.haveData = true;
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
//团队类型
getTeamList() {
this.apipost(
"travel_GetTeamTypeEnumList", {},
res => {
if (res.data.resultCode == 1) {
this.teamList = res.data.data;
}
});
},
},
created() {
if (this.$route.query.offerid && this.$route.query.offerid > 0) {
this.postData.OfferId = this.$route.query.offerid;
}
//从团控列表跳转信息
if (this.$route.query.TCID && this.$route.query.TCID > 0) {
this.postData.TCID = this.$route.query.TCID
}
//团控列表跳转参数结束
this.getCompanyList();
this.getTeamList();
this.getLineTeamList();
this.getAllCurrency();
this.getPriceTeamList();
},
mounted() {
this.getPostData();
}
};
</script>
......@@ -3796,6 +3796,14 @@ export default {
title: '制作报价单'
},
},
{ //新版制作报价单
path: '/EditOffer',
name: 'EditOffer',
component: resolve => require(['@/components/TravelManager/TravelNewQuotation/EditOffer'], resolve),
meta: {
title: '制作报价单'
},
},
{ //报价单变更
path: '/OfferChange',
name: 'OfferChange',
......
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