Commit a8773473 authored by 华国豪's avatar 华国豪 🙄

新增订单预览页面

parent ce871272
<style>
@import "../../assets/mall/OrderInvoice.css";
</style>
<template>
<el-row class="OrderInvoice" v-loading="loadingDataList">
<el-col :span="20" :offset="2" class="_content">
<trade
:ID="ID"
:tcid="tcid"
:numPeople="numPeople"
v-if="tcid && ID"
></trade>
<div class="baidumap" id="allmap"></div>
</el-col>
</el-row>
</template>
<script>
import trade from '../trade/order/indexTwo'
import bus from '../../plugins/event-bus'
export default {
components: {
trade,
},
data() {
return {
ID: null,
tcid: null,
numPeople: JSON.parse(this.$route.query.numPeople),
value: "1",
input10: "",
radio: "1",
type: 2,
addId: 2,
CustomerInfo: {},
city: 0,
pre: '',
clickDate: '',
loadingDataList: false,
priceList: [],
dataList: [],
};
},
computed: {},
created() {
this.ID = decodeURIComponent(this.$route.query.id)
this.tcid = decodeURIComponent(this.$route.query.tcid)
this.numPeople = JSON.parse(this.$route.query.numPeople)
},
mounted() {
this.b2b_get_GetCustomerInfo();
},
methods: {
b2b_get_GetCustomerInfo() {
let msg = {};
this.apipost(
"b2b_get_GetCustomerInfo",
msg,
r => {
if (r.data.resultCode == 1) {
this.CustomerInfo = r.data.data;
} else {
this.$message.error(r.data.message);
}
},
null
);
},
}
};
</script>
\ No newline at end of file
......@@ -23,7 +23,7 @@
<div v-show="isShowPic">
<img :src="payPic" style="float: left; margin-right: 15px; width: 150px; height: 150px; border: 1px solid #ccc;" />
<p style="padding-right: 10px; font-size: 12px; line-height: 20px; margin-bottom: 10px;">
<span style="color: #E95252;">{{payWay=="1"?'微信':'支付宝'}}</span>二维码有效时间为5分钟,为了不影响客户支付,请及时转发,以免失效
<span style="color: #E95252;">{{payWay=="1"?'微信':'支付宝'}}</span>二维码有效时间为1小时,为了不影响客户支付,请及时转发,以免失效
</p>
<p class="fz12 color333">倒计时</p>
<p style="color: #E95252; font-weight: bold; font-size: 12px; margin: 8px 0;" >{{descMin}}{{descSecond}}</p>
......
......@@ -194,7 +194,7 @@
</el-col>
</el-col>
</el-row>
<trade :priceList='dataList.priceList' :trip='dataList' v-if="dataList.priceList && dataList.priceList.length>0"></trade>
<trade :priceList='dataList.priceList' :trip='dataList' :numPeople="null" v-if="dataList.priceList && dataList.priceList.length>0"></trade>
<div ref="nav">
<el-row>
<el-col :span="20" :offset="2">
......
......@@ -6,7 +6,7 @@
<div class="yuding">
<el-row>
<el-col class="_trip_xiangqing">
<template v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer.customerId'>
<template v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer &&customer.customerId'>
<p >航班</p>
<div class="_info_trip" v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer.customerId'>
<table border="0" cellspacing="0" cellpadding="0">
......@@ -71,7 +71,7 @@
</el-button>
</el-col>
</el-col>
<el-col class="_trip_xiangqing" v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer.customerId'>
<el-col class="_trip_xiangqing" v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer && customer.customerId'>
<!-- <p>团期</p> -->
<!-- <div class="place-box">
<el-row :gutter="40">
......@@ -193,7 +193,7 @@
import moment from 'moment'
import bus from '../../../plugins/event-bus'
export default {
props:['priceList','trip'],
props:['priceList','trip','numPeople'],
data () {
let that=this
return {
......@@ -375,7 +375,7 @@ export default {
}else{
this.chosenObj.unicoArr.isSup=-2
}
this.$forceUpdate()
},
saveOrder(){
if(!this.customer){
......@@ -392,6 +392,25 @@ export default {
this.isCommit=false
return false
}
let nowPath = this.$route.path
if (nowPath.indexOf('detailTwo')!==-1){
let ID = decodeURIComponent(this.$route.params.id)
let tcid = decodeURIComponent(this.$route.params.tcid)
let numPeople = {
crCount: this.chosenObj.crCount,
etCount: this.chosenObj.etCount,
lrCount: this.chosenObj.lrCount,
etbzcCount: this.chosenObj.etbzcCount,
etzc: this.chosenObj.etzc,
startDate: this.chosenObj.startDate,
remark: this.chosenObj.remark,
}
this.$router.push({
path: '/OrderInvoiceTwo',
query: {id: encodeURIComponent(ID), tcid: tcid, numPeople: JSON.stringify(numPeople)}
})
return
}
let youhuiMoney=0
this.trip.lineTeamDiscountList.forEach(x=>{
if(x.startNum<=sumSeat&&sumSeat<=x.endNum){
......@@ -547,9 +566,9 @@ export default {
err => {}
);
},
getB2BSellByCustomerId(){
getB2BSellByCustomerId(){
this.apipost('b2b_get_GetCustomerSummary',{},r=>{
if(r.data.resultCode==1){
if(r.data.resultCode==1){
this.customer = r.data.data
let msg = {customerId:r.data.data.customerId,lineId:this.trip.lineId}
this.apipost(
......@@ -561,7 +580,7 @@ export default {
err => {}
);
}else{
this.customer = null
}
},null)
// this.apipost(
......
<style>
@import url('../../../assets/trip/trade/index.css');
</style>
<template>
<div class="trade" v-loading="loadingDataList">
<el-row class="_steps">
<el-col :span="8" class>
<el-row class="_step_active">
<el-col :span="10" class="_line">
<div></div>
</el-col>
<el-col :span="4" class="_exp">
<i class="iconfont icon-ico_lvyouchanpin"></i>
<p class="_step_name">1.选择产品</p>
</el-col>
<el-col :span="10" class="_line">
<div></div>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row class="_step_active">
<el-col :span="10" class="_line">
<div></div>
</el-col>
<el-col :span="4" class="_exp">
<i class="iconfont icon-ico-dingdanyulan"></i>
<p class="_step_name">2.订单预览</p>
</el-col>
<el-col :span="10" class="_line">
<div></div>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="10" class="_line">
<div></div>
</el-col>
<el-col :span="4" class="_exp">
<i class="iconfont icon-ico-querendingdan"></i>
<p class="_step_name">3.确认订单</p>
</el-col>
<el-col :span="10" class="_line">
<div></div>
</el-col>
</el-row>
</el-col>
</el-row>
<div class="yuding">
<el-row>
<el-col class="_trip_xiangqing">
<template v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer &&customer.customerId'>
<p >航班</p>
<div class="_info_trip" v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer.customerId'>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th>航空公司</th>
<th>航班号</th>
<th>起飞</th>
<th>到达</th>
</tr>
<tr v-for='(x,i) in trip.currentPriceInfo.priceFlight' :key="i">
<td>{{x.alName}}</td>
<td>{{x.flightNumber}}</td>
<td>{{x.departureAirPortName}} {{x.startDate}} {{x.departureTime}}</td>
<td>{{x.arrivalAirPortName}} {{x.startDate}} {{x.arrivalTime}}</td>
</tr>
</table>
</div>
<p>团期</p>
<div class="place-box">
<el-row :gutter="40">
<el-col :span="6"><i class="iconfont icon-icon06"></i>价格: {{trip.currentPriceInfo.b2BMemberPrice.toFixed(2)}}</el-col>
<el-col :span="6"><i class="iconfont icon-zuowei"></i>剩余席位: <span class="red">{{trip.currentPriceInfo.surplusCSeat+trip.currentPriceInfo.surplusFSeat+trip.currentPriceInfo.surplusYSeat}}</span></el-col>
<el-col :span="6"><i class="iconfont icon-lvkehoubu"></i>候补: <span class="red">暂不支持</span></el-col>
</el-row>
</div>
</template>
<el-col :span='4'>
<label>出发: </label>
<el-date-picker size="small" value-format='yyyy-MM-dd' v-model='chosenObj.startDate' type="date" placeholder="选择出发日期" :picker-options="pickerOptions" @change="changeStartDate(1)">
</el-date-picker>
</el-col>
<el-col :span='4'>
<label>成人</label>
<el-input-number :min="0" :max='sumSeat-chosenObj.etCount-chosenObj.lrCount' v-model="chosenObj.crCount" size="small"></el-input-number>
</el-col>
<el-col :span='4' v-show="false">
<label class="underline">儿童: </label>
<el-input-number :min="0" :max='sumSeat-chosenObj.crCount-chosenObj.lrCount-chosenObj.etbzcCount' v-model="chosenObj.etCount" size="small"></el-input-number>
</el-col>
<el-col :span='4'>
<label class="underline">儿童不占床: </label>
<el-input-number :min="0" :max='sumSeat-chosenObj.crCount-chosenObj.lrCount-chosenObj.etzc' v-model="chosenObj.etbzcCount" size="small"></el-input-number>
</el-col>
<el-col :span='4'>
<label class="underline">儿童占床: </label>
<el-input-number :min="0" :max='sumSeat-chosenObj.crCount-chosenObj.lrCount-chosenObj.etbzcCount' v-model="chosenObj.etzc" size="small"></el-input-number>
</el-col>
<el-col :span='4'>
<label>婴儿</label>
<el-input-number :min="0" v-model="chosenObj.yeCount" size="small"></el-input-number>
</el-col>
<!-- <el-col :span='4'>
<label>老人</label>:
<el-input-number :min="0" @change="peopleMax(3)" :max='sumSeat-chosenObj.etCount-chosenObj.crCount' v-model="chosenObj.lrCount" size="small"></el-input-number>
</el-col> -->
<el-col :span='4' class="right-btn">
<span class="sumPrice" v-if='chosenObj.startDate && chosenObj.startDate!=""'><small></small>{{price}}</span>
<span class="sumPrice" v-if='!chosenObj.startDate || chosenObj.startDate==""'>--</span>
<!-- <el-button type="danger" size="small" @click="saveOrder" :loading="isCommit">
开始预订
</el-button> -->
</el-col>
</el-col>
<el-col class="_trip_xiangqing" v-if='chosenObj.startDate!="" && chosenObj.startDate!=null && customer && customer.customerId'>
<div class="place-box">
<el-row :gutter="40">
<el-col :span="6"><i class="iconfont icon-chengshi"></i>集合出发城市: {{trip.startCityName}}</el-col>
<el-col :span="6"><i class="iconfont icon-p-setplace"></i>集合详细地址: {{priceFlight.gatherAddress}}</el-col>
<el-col :span="6"><i class="iconfont icon-hanglixiang"></i>集合时间: {{priceFlight.startDate}} {{priceFlight.gatherTime}}</el-col>
<el-col :span="6"><i class="iconfont icon-chengshi"></i>返回抵达城市: {{trip.returnArriveCityName}}</el-col>
</el-row>
</div>
<div class="tips" v-if='chosenObj.isUnico'>注:价格出现提示为“提交订单后获取报价”,则表示该城市没有默认的联运报价,需要你提交订单以后进行实时报价</div>
<p v-if="zaoniao>0">早鸟优惠</p>
<div v-if="zaoniao>0">恭喜你成功领取到早鸟优惠,优惠金额为:¥<span class="red" style='font-size:18px'>{{zaoniao}}</span></div>
<p>备注</p>
<div>
<el-input v-model="chosenObj.remark" placeholder="你可以在此处输入需要备注的信息" rows="3" type='textarea' :autosize='{minRows:3,maxRows:30}'></el-input>
</div>
</el-col>
<el-col class="_trip_xiangqing">
<p>优惠券</p>
<el-select v-model="value8" filterable placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
</el-row>
<div class="no-login" v-if="!this.customer">
需要你登录以后才能预定哦!登录后还能享受更加优惠的价格,<span class="link" @click="goLogin">立即登录吧</span>
</div>
</div>
<div class="_invoice">
<p>发票信息</p>
<div class="_is_invoice">
<span>是否需要发票</span>
<el-radio v-model="radio" label="1"></el-radio>
<el-radio v-model="radio" label="2"></el-radio>
</div>
<div class="_invoice_type" v-if="radio=='1'">
<span :class="type==1?'_active':''" @click="type=1">电子发票</span>
<span :class="type==2?'_active':''" @click="type=2">纸质发票</span>
</div>
<div class="_invoice_type_1" v-if="radio=='1'">
<div>
<span>发票抬头</span>
<el-input class="w100" size="mini" placeholder="企业" v-model="input10" clearable></el-input>
<el-input class="w300" size="mini" placeholder="请输入企业名称" v-model="input10" clearable></el-input>
</div>
<div>
<span>纳税人识别号</span>
<el-input class="w410" size="mini" placeholder="企业" v-model="input10" clearable></el-input>
</div>
<div class="_tips">
<p>
<span class="iconfont icon-tishi"></span>
<span
class="_tips_text"
>按照国税总局公告,自2017年7月1日起,企业索取的增值税普通发票需填写纳税人识别号,不符合规定的发票,不得作为合法税收凭证。</span>
</p>
</div>
<div>
<span>发票明细</span>
<el-input class="w150" size="mini" placeholder="旅游服务费" v-model="input10" clearable></el-input>
</div>
</div>
<div class="_tips" v-if="radio=='1'">
<p>*您的发票将于返程后5个工作日开具并邮寄给您,请注意查收。</p>
<p>*本发票金额仅包含非保险部分,保险可至“我的携程-旅游度假订单”开具增值税电子发票。</p>
</div>
<div class="_ems" v-if="type==2&&radio=='1'">
<div>
<span>
快递
<span class="hgh_font_color_org">¥10</span>
</span>
</div>
<div class="_addr">
<p>选择常用地址</p>
<ul class="clearfix">
<li
class="_addr_item"
:class="addId==1?'_active':''"
@click="addId==1?addId=2:addId=1"
>
<p class="_n">{{CustomerInfo.customerName}}</p>
<p class="_a">{{CustomerInfo.address}}</p>
<span v-show="addId==1" class="el-icon-check"></span>
</li>
<li class="_add_addr">
<p class="el-icon-plus"></p>
<p>新增地址</p>
</li>
</ul>
</div>
</div>
</div>
<div class="_buttom">
<el-button type="primary" size="mini" @click>确认订单</el-button>
</div>
</div>
</template>
<script>
import moment from 'moment'
import bus from '../../../plugins/event-bus'
export default {
props:['ID','tcid','numPeople'],
data () {
let that=this
return {
value: "1",
input10: "",
radio: "1",
type: 2,
addId: 2,
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
value8: '',
pickerOptions:{
disabledDate(time) {
let isHave=true
that.priceList.forEach(x=>{
if(x.startDate==moment(time).format('YYYY-MM-DD') && x.tcState==3) {
isHave=false
return false
}
})
return isHave
}
},
pickerOptionTwo:{
disabledDate(time) {
return time > new Date(that.chosenObj.startDate)
}
},
pickerOptionThr:{
disabledDate(time) {
return time < moment(that.chosenObj.startDate).add(that.trip.dayNum, 'days').valueOf()
}
},
provinces: [],
props: {
value: 'ID',
label:'Name',
children: 'cities'
},
chosenObj:{
startDate:'',
crCount:2,
etCount:0,
yeCount:0,
lrCount:0,
etbzcCount:0,
etzc:0,
df:0,
dcf:0,
srf:0,
isUnico:false,
unicoDep:{
city:null,
date:null,
price:0,
isSup:-2
},
unicoArr:{
city:null,
date:null,
price:0,
isSup:-2
},
remark:''
},
price:0,
priceFlight:{},
unicos:[],
customer:{},
zaoniao:0,
sumSeat:0,
isCommit:false,
priceList: null,
trip: null,
pre: 0,
loadingDataList: false,
CustomerInfo: {},
}
},
watch: {
chosenObj:{
handler(n,o){
this.calcMoney()
},
deep:true
},
},
mounted () {
this.getProvince()
this.b2b_get_GetCustomerInfo()
},
created() {
this.chosenObj.crCount = this.numPeople.crCount
this.chosenObj.etbzcCount = this.numPeople.etbzcCount
this.chosenObj.etzc = this.numPeople.etzc
this.chosenObj.lrCount = this.numPeople.lrCount
this.chosenObj.startDate = this.numPeople.startDate
this.chosenObj.remark = this.numPeople.remark
this.getList(this.numPeople.startDate)
},
methods: {
goLogin(){
this.$router.push({ path:'/login?type=1',query:{path:this.$route.name,id:encodeURIComponent(this.$route.params.id)} })
},
outGetTripDate(tripDate){
this.chosenObj.startDate=tripDate
this.changeStartDate()
},
changeStartDate(t){
if(this.chosenObj.startDate&&this.chosenObj.startDate!=''){
this.priceList.forEach((x, i)=>{
if(x.startDate==this.chosenObj.startDate){
this.priceFlight=x
let msg = {configId:this.priceList[i].configIDDes, cityId:this.city, preview:this.pre, tcid:this.priceList[i].tcid}
this.getDataT(msg, 2)
this.getUnicos(this.priceList[i].tcid)
}
})
}
},
calcMoney(){
if(!this.trip) return
this.chosenObj.etCount = this.chosenObj.etbzcCount + this.chosenObj.etzc
if(!this.trip.currentPriceInfo.b2BMemberPrice){
this.priceList.forEach(x=>{
if(x.startDate==this.chosenObj.startDate){
this.priceFlight=x
}
})
}
let money=this.trip.currentPriceInfo.b2BMemberPrice*this.chosenObj.crCount
money+=this.trip.currentPriceInfo.b2BMemberPrice*this.chosenObj.etCount
money+=this.trip.currentPriceInfo.babyChargePrice*this.chosenObj.etCount
money+=this.trip.currentPriceInfo.childNeedPrice*this.chosenObj.etzc
if(this.chosenObj.etbzcCount>0)
money-=this.trip.currentPriceInfo.childNoNeedPrice*this.chosenObj.etbzcCount
money+=this.trip.currentPriceInfo.b2BMemberPrice*this.chosenObj.lrCount
money+=this.trip.currentPriceInfo.oldManChargePrice*this.chosenObj.lrCount
money+=this.trip.currentPriceInfo.babyPrice*this.chosenObj.yeCount
money+=this.trip.currentPriceInfo.singleRoomPrice*this.chosenObj.df
let sumCount=this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.lrCount
money+=this.trip.currentPriceInfo.visaPrice*sumCount
money+=this.trip.currentPriceInfo.otherPrice*sumCount
if(this.trip.currentPriceInfo.discountPric && this.trip.currentPriceInfo.discountPric>0){
this.zaoniao=this.trip.currentPriceInfo.discountPrice*sumCount
}
money-=this.zaoniao
this.price=money
//unicoArr
//unicoDep
if(this.chosenObj.unicoDep.city && this.chosenObj.unicoDep.date){
this.apipost('sellorder_get_GetUnionTravelPrice',{
TCID:this.trip.currentPriceInfo.tcid,
StartCityId:this.chosenObj.unicoDep.city[this.chosenObj.unicoDep.city.length-1],
Type:1,
CityTime:this.chosenObj.unicoDep.date,
OrderId:0
},r=>{
this.chosenObj.unicoDep.isSup=r.data.data.IsUnion
this.chosenObj.unicoDep.price=r.data.data.Price
money+=r.data.data.Price*sumCount
this.price=money
})
}else{
this.chosenObj.unicoDep.isSup=-2
}
if(this.chosenObj.unicoArr.city && this.chosenObj.unicoArr.date){
this.apipost('sellorder_get_GetUnionTravelPrice',{
TCID:this.trip.currentPriceInfo.tcid,
StartCityId:this.chosenObj.unicoArr.city[this.chosenObj.unicoArr.city.length-1],
Type:1,
CityTime:this.chosenObj.unicoArr.date,
OrderId:0
},r=>{
this.chosenObj.unicoArr.isSup=r.data.data.IsUnion
this.chosenObj.unicoArr.price=r.data.data.Price
money+=r.data.data.Price*sumCount
this.price=money
})
}else{
this.chosenObj.unicoArr.isSup=-2
}
this.$forceUpdate()
},
saveOrder(){
if(!this.customer){
return this.$message.error('请登录!')
}
if(this.chosenObj.startDate==''){
this.Error("请选择团期")
return false
}
this.isCommit=true
let sumSeat=this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.lrCount
if(sumSeat==0){
this.Error("请填写报名人数")
this.isCommit=false
return false
}
let youhuiMoney=0
this.trip.lineTeamDiscountList.forEach(x=>{
if(x.startNum<=sumSeat&&sumSeat<=x.endNum){
youhuiMoney=x.discountAmount
return false
}
})
let y=0,f=0,c=0,fcnt=0
if(sumSeat>this.trip.currentPriceInfo.surplusYSeat){
y=this.trip.currentPriceInfo.surplusYSeat
sumSeat=this.prictrip.currentPriceInfoeFlight.surplusYSeat-sumSeat
}else{
y=sumSeat
sumSeat=0
}
if(sumSeat>0){
if(sumSeat>this.trip.currentPriceInfo.surplusFSeat){
f=this.trip.currentPriceInfo.surplusFSeat
sumSeat=this.trip.currentPriceInfo.surplusFSeat-sumSeat
}else{
f=sumSeat
sumSeat=0
}
}
if(sumSeat>0){
if(sumSeat>this.trip.currentPriceInfo.surplusYSeat){
c=this.trip.currentPriceInfo.surplusYSeat
sumSeat=this.trip.currentPriceInfo.surplusYSeat-sumSeat
}else{
c=sumSeat
sumSeat=0
}
}
let sumFang=this.chosenObj.crCount+this.chosenObj.etzc+this.chosenObj.lrCount
sumFang=sumFang-this.chosenObj.df-(this.chosenObj.dcf*2)-(this.chosenObj.srf*3)
if(sumFang>0){
fcnt=parseFloat(sumFang)/2.0+this.chosenObj.dcf+this.chosenObj.df+this.chosenObj.srf
}
fcnt+=this.chosenObj.dcf+this.chosenObj.df+this.chosenObj.srf
let msg={
OrderId:0,
TCID:this.trip.currentPriceInfo.tcid,
CustomerType:this.customer.gradeLevel,
GroupType:1,
ContactName:this.customer.customerName,
ContactMobile:this.customer.contactNumber,
CustomerId:this.customer.customerId,
DepartureCityId:this.chosenObj.unicoDep.city&&this.chosenObj.unicoDep.city.length>0?this.chosenObj.unicoDep.city[this.chosenObj.unicoDep.city.length-1]:this.trip.startCityId,
IsIntermodal:(this.chosenObj.unicoDep.city&&this.chosenObj.unicoDep.city.length>0&&this.chosenObj.unicoDep.date)?1:2,
Unit_Price:this.trip.currentPriceInfo.b2BMemberPrice,
TC_Price:this.trip.currentPriceInfo.b2BMemberPrice,
ManNum:this.chosenObj.crCount,
ChirdNum:this.chosenObj.etCount,
ChirdNeedBedNum:this.chosenObj.etzc,
BabyNum:this.chosenObj.yeCount,
OldPeopleNum:this.chosenObj.lrCount,
SingleRoomNum:this.chosenObj.df,
PreferPrice:this.price,
YSeatNum:y,
ESeatNum:f,
FSeatNum:c,
Commission:((parseFloat(youhuiMoney)/2.0)+(parseFloat(this.price)*0.01)).toFixed(2),//todo 提成
ClientSource:2,
BrandId:0,
TradeWay:0,
PlatformOrder:'',
GuestNum:this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.lrCount,
IsChildrenTour:this.trip.currentPriceInfo.isSupportChildren,
IsBirdDiscount:this.zaoniao>0?1:2,
PredictRoomNum:fcnt,
BigRoomNum:this.chosenObj.dcf,
TripleRoomNum:this.chosenObj.srf,
TradeDate:moment().format('YYYY-MM-DD'),
CostType:0,
MinOrderPrice:0,
Remarks:this.chosenObj.remark,
VisaNum:this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.lrCount,
SafeNum:this.chosenObj.crCount+this.chosenObj.etCount+this.chosenObj.lrCount,
AirticketNum:0,
ReturnArriveCityId:this.chosenObj.unicoArr.city&&this.chosenObj.unicoArr.city.length>0?this.chosenObj.unicoArr.city[this.chosenObj.unicoArr.city.length-1]:this.trip.returnArriveCityId,
IsReturnIntermodal:(this.chosenObj.unicoArr.city&&this.chosenObj.unicoArr.city.length>0&&this.chosenObj.unicoArr.date)?1:2,
GoCityTime:this.chosenObj.unicoDep.city&&this.chosenObj.unicoDep.city.length>0&&this.chosenObj.unicoDep.date?this.chosenObj.unicoDep.date:'',
BackCityTime:this.chosenObj.unicoArr.city&&this.chosenObj.unicoArr.city.length>0&&this.chosenObj.unicoArr.date?this.chosenObj.unicoArr.date:'',
ScenicRefundArr:[],
CommissionSharePeople:0,
CommissionShareMoney:0,
OrderSource:2
}
this.apipost("sellorder_post_SetOrderInfoForB2B",msg,
res => {
if(res.data.message=='操作成功!'){
this.$router.push({ path:'/PsOrder' })
}else{
this.Error(res.data.message)
}
},
err => {});
},
handleItemChange(val) {
let index=0
this.provinces.forEach((x,i)=>{
if(x.ID==val[0]){
index=i
return false
}
})
let msg = {
Id: val[0]
};
this.apipost(
"b2b_get_GetDestinationGetChildList",
msg,
res => {
res.data.data.forEach(x=>{
this.provinces[index].cities.push({
ID:x.ID,
Name:x.Name
})
})
},
err => {}
);
},
getProvince(val) {
let msg = {
Id: 2
};
this.apipost(
"b2b_get_GetDestinationGetChildList",
msg,
res => {
res.data.data.forEach(x=>{
this.provinces.push({
ID:x.ID,
Name:x.Name,
cities:[]
})
})
},
err => {}
);
},
getUnicos(tcid) {
let msg = {tcid:tcid}
this.apipost(
"b2b_get_GetTeamUnionInfo",
msg,
res => {
this.unicos = res.data.data
},
err => {}
);
},
getB2BSellByCustomerId(){
this.apipost('b2b_get_GetCustomerSummary',{},r=>{
if(r.data.resultCode==1){
this.customer = r.data.data
let msg = {customerId:r.data.data.customerId,lineId:this.trip.lineId}
this.apipost(
"app_customer_GetB2BSellByCustomerId",
msg,
res => {
},
err => {}
);
}else{
this.customer = null
}
},null)
// this.apipost(
// "app_customer_GetB2BSellByCustomerId",
// msg,
// res => {
// this.unicos = res.data.data
// },
// err => {}
// );
},
getList(days) {
this.apipost("b2b_get_site", {}, res => {
let data = res.data.data;
let city = 0;
for (let i = 0; i < data.length; i++) {
if (data[i].companyId == localStorage.site) {
city = data[i].cityId;
this.city = city;
break;
}
}
let msg = {
configId: this.ID,
cityId: city,
preview: this.pre,
tcid: this.tcid
};
this.getData(msg, days);
});
},
getData: function(msg, days) {
this.loadingDataList = true;
this.apipost(
"b2b_get_GetB2BTravelInfoV1",
msg,
r => {
if (r.data.resultCode == 1) {
let data = r.data.data;
let priceList = data.priceList;
for ( let i = 0; i < priceList.length; i++) {
if (days===priceList[i].startDate){
let msg = {configId:priceList[i].configIDDes, cityId:this.city, preview:this.pre, tcid:priceList[i].tcid}
this.getDataT(msg)
}
}
} else {
this.$message.error(r.data.message);
}
this.loadingDataList = false;
},
null
);
},
getDataT: function(msg, type) {
this.loadingDataList = true;
this.apipost(
"b2b_get_GetB2BTravelInfoV1",
msg,
r => {
if (r.data.resultCode == 1) {
let data = r.data.data;
this.priceList = data.priceList;
this.trip = data;
if (!type) {
this.chosenObj.crCount = this.numPeople.crCount
this.chosenObj.etbzcCount = this.numPeople.etbzcCount
this.chosenObj.etzc = this.numPeople.etzc
this.chosenObj.lrCount = this.numPeople.lrCount
} else {
this.chosenObj.crCount = 0
this.chosenObj.etbzcCount = 0
this.chosenObj.etzc = 0
this.chosenObj.lrCount = 0
}
this.sumSeat = this.trip.currentPriceInfo.surplusCSeat+this.trip.currentPriceInfo.surplusFSeat+this.trip.currentPriceInfo.surplusYSeat
this.getB2BSellByCustomerId()
} else {
this.$message.error(r.data.message);
}
this.loadingDataList = false;
},
null
);
},
b2b_get_GetCustomerInfo() {
let msg = {};
this.apipost(
"b2b_get_GetCustomerInfo",
msg,
r => {
if (r.data.resultCode == 1) {
this.CustomerInfo = r.data.data;
} else {
this.$message.error(r.data.message);
}
},
null
);
},
}
}
</script>
......@@ -131,7 +131,16 @@ export default new Router({
component: resolve =>
require(["@/components/PersonalCenter/OrderInvoice"], resolve),
meta: {
title: "发票信息"
title: "订单预览"
}
},
{
path: "/OrderInvoiceTwo",
name: "OrderInvoiceTwo",
component: resolve =>
require(["@/components/PersonalCenter/OrderInvoiceTwo"], resolve),
meta: {
title: "订单预览"
}
},
{
......
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