Commit 11d27849 authored by 黄奎's avatar 黄奎

页面修改

parent 77c5608e
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
@import "../../assets/css/trip/index.css"; @import "../../assets/css/trip/index.css";
</style> </style>
<template> <template>
<div class="trip-box-commonTeam" v-loading="loading"> <div class="trip-box-commonTeam" v-loading="loading">
<div class="item-title"> <div class="item-title">
...@@ -15,7 +14,8 @@ ...@@ -15,7 +14,8 @@
<div class="trip-block-commonTeam" v-for="(item,i) in tripList" :key="i"> <div class="trip-block-commonTeam" v-for="(item,i) in tripList" :key="i">
<div class="trip-title"> <div class="trip-title">
<div> <div>
<p class="day">{{$t('tips.di')}}<span v-if='item.dayNum<10'>0</span>{{item.dayNum}}{{$t('hotel.hotel_day')}}</p> <p class="day">{{$t('tips.di')}}<span v-if='item.dayNum<10'>0</span>{{item.dayNum}}{{$t('hotel.hotel_day')}}
</p>
<template v-if="startDate&&startDate!=''"> <template v-if="startDate&&startDate!=''">
<p>{{GetDayStr(startDate,item.dayNum-1)}}</p> <p>{{GetDayStr(startDate,item.dayNum-1)}}</p>
</template> </template>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
var msg = { var msg = {
configId: id, configId: id,
tcid: nTCID, tcid: nTCID,
isClick:1//不算统计 isClick: 1 //不算统计
}; };
if (id !== undefined) { if (id !== undefined) {
//根据ID 获取行程内容 //根据ID 获取行程内容
...@@ -222,12 +222,12 @@ ...@@ -222,12 +222,12 @@
dayItem.dayArray = dayArray; dayItem.dayArray = dayArray;
dayList.push(dayItem); dayList.push(dayItem);
}); });
this.tripList = dayList; this.tripList = dayList;
this.init(); this.init();
} }
}, },
setDate: function (j) { setDate: function (j) {
let stDate = ""; let stDate = "";
if (this.priceList && this.priceList.length > 0) { if (this.priceList && this.priceList.length > 0) {
stDate = this.priceList[0].startDate; stDate = this.priceList[0].startDate;
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
} }
}, },
init() { init() {
this.tripList.forEach((x, j) => { this.tripList.forEach((x, j) => {
let useDinnerTypeBy = '' let useDinnerTypeBy = ''
let jin = [], let jin = [],
jiu = [], jiu = [],
...@@ -392,11 +392,7 @@ ...@@ -392,11 +392,7 @@
x.jiu2 = jiu2 x.jiu2 = jiu2
if (jin.length > 0) { if (jin.length > 0) {
details = jin details = jin
} } else if (dadian.length > 0) {
// else if (jiu.length > 0) {
// // details = jiu
// }
else if (dadian.length > 0) {
details = dadian details = dadian
} else if (jiao.length > 0) { } else if (jiao.length > 0) {
if (j == this.tripList.length - 1) { if (j == this.tripList.length - 1) {
......
...@@ -489,13 +489,14 @@ ...@@ -489,13 +489,14 @@
</style> </style>
<template> <template>
<!--财务单据显示团队信息-->
<div class="flexOne"> <div class="flexOne">
<div class="_teamProductModule" v-loading='loading'> <div class="_teamProductModule" v-loading='loading'>
<template v-if="list.length!=0"> <template v-if="list.length!=0">
<dir class="_new_item" v-for="(item,index) in list" :key="index" <dir class="_new_item" v-for="(item,index) in list" :key="index"
:class="index!=list.length-1?'_border_bottom':''"> :class="index!=list.length-1?'_border_bottom':''">
<p class="_tit"> <p class="_tit">
<span class="_tcid_num">团号:{{item.TCID}}</span> <span class="_tcid_num">团号:{{item.TCNUM}} ({{item.TCID}})</span>
</p> </p>
<div class="_new_item_i"> <div class="_new_item_i">
<p class="_new_item_i_line"> <p class="_new_item_i_line">
...@@ -643,195 +644,30 @@ ...@@ -643,195 +644,30 @@
暂无数据 暂无数据
</div> </div>
</div> </div>
<el-dialog custom-class='ComTeamPlan_info_box' :title="tripTitle" :visible.sync="outerVisible" center> <el-dialog custom-class='ComTeamPlan_info_box' :title="tripTitle" :visible.sync="outerVisible" center
:modal="false">
<commonTeamInfo1 ref="comTeam"></commonTeamInfo1> <commonTeamInfo1 ref="comTeam"></commonTeamInfo1>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import commonTeamInfo from "./commonTeamInfo.vue"; import commonTeamInfo from "./commonTeamInfo.vue";
import carousel from "./carouselT.vue";
export default { export default {
props: ["ID"], props: ["ID"],
data() { data() {
return { return {
pickerOptions0: { loading: true, //数据加载
disabledDate: (time) => { outerVisible: false, //是否显示行程
let starTime = new Date(this.starTime)
return time.getTime() > starTime.getTime()
}
},
pickerOptions1: {
disabledDate: (time) => {
let endTime = new Date(this.endTime)
return time.getTime() < endTime.getTime() - 5.64e7
}
},
userId: '',
customerId: '',
createByInfo: '',
isUpdateSharePeople: false,
starTime: '',
endTime: '',
stratPrice: '',
stratPriceShow: false,
returnPrice: '',
returnPriceShow: false,
minPrice: 0,
loading: true,
loading2: false,
isShowLayer: false,
outerVisible: false,
tripTitle: '', tripTitle: '',
currentPage: 1,
total: 0,
addObj: {},
addMsg: {
OrderId: '0',
TCID: '0',
CustomerType: '',
GroupType: '',
ContactName: '',
ContactMobile: '',
CustomerId: '',
DepartureCityId: '',
ReturnArriveCityId: '',
IsIntermodal: '2',
IsReturnIntermodal: '2',
Unit_Price: '0',
TC_Price: '0',
ManNum: '0',
ChirdNum: '0',
ChirdNeedBedNum: '0',
BabyNum: '0',
OldPeopleNum: '0',
SingleRoomNum: '0',
PreferPrice: 0,
YSeatNum: '0',
ESeatNum: '0',
FSeatNum: '0',
Commission: '0',
ClientSource: '',
BrandId: '',
TradeWay: '2',
PlatformOrder: '',
GuestNum: 0,
IsChildrenTour: '0',
IsBirdDiscount: '0',
PredictRoomNum: '0',
BigRoomNum: '0',
TripleRoomNum: '0',
TradeDate: '',
CostType: '',
Remarks: '',
VisaNum: '0',
SafeNum: '0',
AirticketNum: '0',
ScenicRefundArr: [],
GoCityTime: '',
BackCityTime: '',
CommissionSharePeople: '-1',
CommissionShareMoney: '0',
},
employeeMsg: {
BranchId: '-1',
IsLeave: 0
},
employeeList: [],
rules: {
CustomerType: [{
required: true,
message: '请选择客户类型',
trigger: 'change'
}],
CustomerId: [{
required: false,
message: '请选择客户门店',
trigger: 'change'
}],
DepartureCityId: [{
required: true,
message: '请选择出发城市',
trigger: 'change'
}],
GroupType: [{
required: true,
message: '请选择参团类型',
trigger: 'change'
}],
ClientSource: [{
required: true,
message: '请选择客人来源',
trigger: 'change'
}],
TradeWay: [{
required: true,
message: '请选择交易方式',
trigger: 'change'
}],
ContactName: [{
required: true,
message: '请输入联系人姓名',
trigger: 'blur'
}],
ContactMobile: [{
required: true,
message: '请输入联系人电话',
trigger: 'blur'
},
{
pattern: /^(0|86|17951)?(13[0-9]|15[012356789]|17[012356789]|18[0-9]|19[0-9]|14[57])[0-9]{8}$/,
message: '请输入正确的手机'
}
],
},
msg: {
pageIndex: 1,
pageSize: 10,
LineId: '-1',
LineTeamId: '-1',
TCID: '',
StartTime: '',
EndTime: '',
BranchId: '-1',
CityId: '-1',
DaysTrip: '',
SalePlat: [],
minGroupSize: '',
maxGroupSize: '',
minApplySize: '',
maxApplySize: '',
FlightID: '-1'
},
defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"',
list: [], list: [],
LineList: [],
LineTeamList: [],
airlineList: [],
companyList: [],
salePlace: [],
startCityList: [],
startCityList1: [],
tripDetails: [], tripDetails: [],
khlxList: [],
ctlxList: [],
ddlyList: [],
ddztList: [],
khmdList: [],
ssptList: [],
jyfsList: [],
fylxList: [],
ScenicRefundList: [],
ScenicRefundMoney: 0,
TCIDList: [],
} }
}, },
components: { components: {
commonTeamInfo1: commonTeamInfo, commonTeamInfo1: commonTeamInfo,
carousel: carousel
}, },
filters: { filters: {
//价格格式化
priceFormat(value) { priceFormat(value) {
if (value == null) { if (value == null) {
return 0.00; return 0.00;
...@@ -849,269 +685,11 @@ ...@@ -849,269 +685,11 @@
}, },
}, },
methods: { methods: {
//获取航班信息
getDetails(index) { getDetails(index) {
this.tripDetails = this.list[index].flightList; this.tripDetails = this.list[index].flightList;
}, },
getUnionTravelPrice(obj, type) { //获取行程信息
let msg = {}
msg.TCID = obj.TCID
msg.Type = type
if (type == 1) {
msg.StartCityId = this.addMsg.DepartureCityId
msg.CityTime = this.addMsg.GoCityTime
if (this.addMsg.IsIntermodal == 2) {
this.stratPrice = '0'
this.stratPriceShow = false
this.getTotalPrice()
} else {
this.apipost('sellorder_get_GetUnionTravelPrice', msg, res => {
if (res.data.resultCode == 1) {
this.stratPrice = res.data.data.Price
if (this.stratPrice == 0) {
this.stratPriceShow = false
} else {
this.stratPriceShow = true
}
this.getTotalPrice()
}
}, err => {})
}
} else {
msg.StartCityId = this.addMsg.ReturnArriveCityId
msg.CityTime = this.addMsg.BackCityTime
if (this.addMsg.IsReturnIntermodal == 2) {
this.returnPrice = '0'
this.returnPriceShow = true
this.getTotalPrice()
} else {
this.apipost('sellorder_get_GetUnionTravelPrice', msg, res => {
if (res.data.resultCode == 1) {
this.returnPrice = res.data.data.Price
if (this.returnPrice == 0) {
this.returnPriceShow = false
} else {
this.returnPriceShow = true
}
this.getTotalPrice()
}
}, err => {})
}
}
},
getTicheng() { //提成
let num = Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum)
let yh = 0
if (num > 0) {
this.apipost('sellorder_get_GetOrderMinPrice', {
ltID: this.addObj.ltID,
Num: num
}, res => {
yh = res.data.data
}, err => {})
}
// let cj='成交单价-最低成交价格(标准单价-符合人数[成人,儿童,老人]条件的最高少价)'
let chajia = Number(this.addMsg.Unit_Price) - (this.addMsg.TC_Price - yh)
let ewtc = chajia > 0 ? chajia * 0.5 * num : chajia * num //额外提成
this.addMsg.Commission = (Number(this.addMsg.PreferPrice) * 0.01 + ewtc).toFixed(2)
this.addMsg.CommissionShareMoney = '0'
if ((this.addMsg.CustomerType == 1 || this.addMsg.CustomerType == 2) && this.addMsg.CommissionSharePeople !=
'') {
if (this.addMsg.CommissionSharePeople != '-1') {
if (this.addMsg.Commission > 0) {
this.addMsg.CommissionShareMoney = this.addMsg.Commission / 2
this.addMsg.Commission = this.addMsg.Commission - this.addMsg.CommissionShareMoney
} else {
this.addMsg.CommissionShareMoney = '0'
}
}
}
},
getTotalPrice() {
if (this.addObj.IsBirdDiscount == 1) { //早鸟优惠
//this.addMsg.Unit_Price //成交单价
//BabyPrice 婴儿价
//BabyChargePrice 儿童附加费
//OldManChargePrice 老人 附加费
//DiscountPrice 早鸟优惠
let chengren = Number(this.addMsg.ManNum) * (Number(this.addMsg.Unit_Price) - this.addObj.DiscountPrice)
let ertong = Number(this.addMsg.ChirdNum) * (Number(this.addMsg.Unit_Price) - this.addObj.DiscountPrice + this
.addObj.BabyChargePrice)
let yinger = Number(this.addMsg.BabyNum) * this.addObj.BabyPrice
let laoren = Number(this.addMsg.OldPeopleNum) * (Number(this.addMsg.Unit_Price) - this.addObj.DiscountPrice +
this.addObj.OldManChargePrice)
let zafeiqianzhen = this.addObj.OtherPrice * (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) +
Number(this.addMsg.OldPeopleNum)) + this.addObj.VisaPrice * (Number(this.addMsg.AirticketNum) + Number(
this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum)) - this.addObj
.BackVisaPrice * ((Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg
.ChirdNum) + Number(this.addMsg.BabyNum) + Number(this.addMsg.OldPeopleNum)) - Number(this.addMsg
.VisaNum))
let danfang = Number(this.addMsg.SingleRoomNum) * this.addObj.SingleRoomPrice
let ertongbed = this.addObj.ChildNeedPrice * Number(this.addMsg.ChirdNeedBedNum) + this.addObj
.ChildNoNeedPrice * (Number(this.addMsg.ChirdNum) - Number(this.addMsg.ChirdNeedBedNum))
let lianyun = (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum)) *
(Number(this.stratPrice) + Number(this.returnPrice))
let dandijie = this.addObj.SingleDMCPrice * Number(this.addMsg.AirticketNum)
this.addMsg.PreferPrice = dandijie + lianyun + chengren + ertong + yinger + laoren + zafeiqianzhen + danfang +
ertongbed - this.ScenicRefundMoney * (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(
this.addMsg.OldPeopleNum));
} else {
let chengren = Number(this.addMsg.ManNum) * (Number(this.addMsg.Unit_Price))
let ertong = Number(this.addMsg.ChirdNum) * (Number(this.addMsg.Unit_Price) + this.addObj.BabyChargePrice)
let yinger = Number(this.addMsg.BabyNum) * this.addObj.BabyPrice
let laoren = Number(this.addMsg.OldPeopleNum) * (Number(this.addMsg.Unit_Price) + this.addObj
.OldManChargePrice)
let zafeiqianzhen = this.addObj.OtherPrice * (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) +
Number(this.addMsg.OldPeopleNum)) + this.addObj.VisaPrice * (Number(this.addMsg.AirticketNum) + Number(
this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum)) - this.addObj
.BackVisaPrice * ((Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg
.ChirdNum) + Number(this.addMsg.BabyNum) + Number(this.addMsg.OldPeopleNum)) - Number(this.addMsg
.VisaNum))
let danfang = Number(this.addMsg.SingleRoomNum) * this.addObj.SingleRoomPrice
let ertongbed = this.addObj.ChildNeedPrice * Number(this.addMsg.ChirdNeedBedNum) + this.addObj
.ChildNoNeedPrice * (Number(this.addMsg.ChirdNum) - Number(this.addMsg.ChirdNeedBedNum))
let lianyun = (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum)) *
(Number(this.stratPrice) + Number(this.returnPrice))
let dandijie = this.addObj.SingleDMCPrice * Number(this.addMsg.AirticketNum)
this.addMsg.PreferPrice = dandijie + lianyun + chengren + ertong + yinger + laoren + zafeiqianzhen + danfang +
ertongbed - this.ScenicRefundMoney * (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(
this.addMsg.OldPeopleNum));
}
this.getTicheng()
},
submitForm(addMsg) { //提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
this.saveOrder()
} else {
return false;
}
});
},
cancelSubmit() {
this.isShowLayer = false
this.$refs['addMsg'].resetFields();
this.clearMsg()
},
clearMsg() {
this.addMsg.OrderId = '0'
this.addMsg.TCID = '0'
this.addMsg.IsIntermodal = '2'
this.addMsg.IsReturnIntermodal = '2'
this.addMsg.Unit_Price = '0'
this.addMsg.TC_Price = '0'
this.addMsg.ManNum = '0'
this.addMsg.ChirdNum = '0'
this.addMsg.ChirdNeedBedNum = '0'
this.addMsg.BabyNum = '0'
this.addMsg.OldPeopleNum = '0'
this.addMsg.SingleRoomNum = '0'
this.addMsg.PreferPrice = '0'
this.addMsg.YSeatNum = '0'
this.addMsg.ESeatNum = '0'
this.addMsg.FSeatNum = '0'
this.addMsg.Commission = '0'
this.addMsg.BrandId = ''
this.addMsg.TradeWay = '2'
this.addMsg.GuestNum = '0'
this.addMsg.IsChildrenTour = '0'
this.addMsg.OrderId = '0'
this.addMsg.IsBirdDiscount = '0'
this.addMsg.PredictRoomNum = '0'
this.addMsg.BigRoomNum = '0'
this.addMsg.TripleRoomNum = '0'
this.addMsg.TradeDate = ''
this.addMsg.CostType = ''
this.addMsg.PlatformOrder = ''
this.ddlyList = []
this.addMsg.Remarks = ''
this.addMsg.MinOrderPrice = ''
this.addMsg.VisaNum = '0';
this.addMsg.SafeNum = '0';
this.addMsg.AirticketNum = '0';
this.addMsg.ScenicRefundArr = [];
this.ScenicRefundMoney = 0;
this.addMsg.CommissionSharePeople = '-1'
this.addMsg.CommissionShareMoney = '0'
},
saveOrder() {
//验证人数和机位数
if ((Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum)) != Number(
this.addMsg.YSeatNum) + Number(this.addMsg.ESeatNum) + Number(this.addMsg.FSeatNum)) {
this.$message.warning('人数和机位数不相等!')
return
}
if ((Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this
.addMsg.OldPeopleNum) + Number(this.addMsg.BabyNum)) < Number(this.addMsg.VisaNum)) {
this.$message.warning('签证数量不能大于人数总和!')
return
}
if ((Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this
.addMsg.OldPeopleNum) + Number(this.addMsg.BabyNum)) < Number(this.addMsg.SafeNum)) {
this.$message.warning('保险数量不能大于人数总和!')
return
}
// if((Number(this.addMsg.ManNum)+Number(this.addMsg.ChirdNum)+Number(this.addMsg.OldPeopleNum)+Number(this.addMsg.BabyNum))<Number(this.addMsg.AirticketNum))
// {
// this.$message.warning('机票数量不能大于人数总和!')
// return
// }
if (Number(this.addMsg.ChirdNeedBedNum) > Number(this.addMsg.ChirdNum)) {
this.$message.warning('儿童占床不能大于儿童数!')
return
}
if (Number(this.addMsg.ChirdNum) - Number(this.addMsg.ChirdNeedBedNum) + Number(this.addMsg.BabyNum) > Number(
this.addMsg.ManNum) + Number(this.addMsg.OldPeopleNum) + Number(this.addMsg.ChirdNeedBedNum)) {
this.$message.warning('儿童占床数量不足!')
return
}
if (this.userId == this.createByInfo) {
if (this.addMsg.CommissionSharePeople == '-1') {
this.addMsg.CommissionShareMoney = '0'
}
}
this.addMsg.TCID = this.addObj.TCID
this.addMsg.GuestNum = Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg
.OldPeopleNum) + Number(this.addMsg.BabyNum) + Number(this.addMsg.AirticketNum)
this.addMsg.IsChildrenTour = this.addObj.IsSupportChildren
this.addMsg.IsBirdDiscount = this.addObj.IsBirdDiscount
this.apipost('sellorder_post_SetOrderInfo_02', this.addMsg, res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message)
this.$refs['addMsg'].resetFields();
this.getList()
this.clearMsg()
this.isShowLayer = false
} else {
this.$message.error(res.data.message)
}
}, err => {})
},
getScenicRefund(TCID) {
this.apipost('sellorder_get_GetScenicRefundList', {
TCID
}, res => {
if (res.data.resultCode == 1) {
this.ScenicRefundList = res.data.data
this.ScenicRefundList.forEach(item => {
item['ScenicName'] = item.CouponsName + ' -¥' + this.moneyFormat(item.RefundMoney);
})
}
}, err => {})
},
getJourney(id, title) { getJourney(id, title) {
var that = this; var that = this;
this.tripTitle = title; this.tripTitle = title;
...@@ -1120,6 +698,7 @@ ...@@ -1120,6 +698,7 @@
}); });
that.outerVisible = true; that.outerVisible = true;
}, },
//获取团队详情
getList(ID) { getList(ID) {
this.loading = true this.loading = true
this.apipost('TaskManagemnet_get_GetSellProductCenterForFinance', { this.apipost('TaskManagemnet_get_GetSellProductCenterForFinance', {
...@@ -1127,21 +706,17 @@ ...@@ -1127,21 +706,17 @@
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.loading = false; this.loading = false;
this.total = res.data.data.count;
let data = res.data.data; let data = res.data.data;
data.forEach(x => { data.forEach(x => {
x.tableShowTeam = false; x.tableShowTeam = false;
}) })
this.list = data this.list = data
} else {
this.$message.error(res.data.message)
} }
}, err => {}) })
}, },
}, },
mounted() { mounted() {
this.userId = this.getLocalStorage().EmployeeId
this.msg.BranchId = this.getLocalStorage().RB_Branch_id.toString()
this.getList(this.ID) this.getList(this.ID)
} }
} }
......
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