Commit 53a09adb authored by 吴春's avatar 吴春

解决冲突

parents f2934f2f ab21585c
...@@ -183,7 +183,8 @@ module.exports = function( /* ctx */ ) { ...@@ -183,7 +183,8 @@ module.exports = function( /* ctx */ ) {
plugins: [ plugins: [
"Meta", "Meta",
"Notify", "Notify",
'Loading' 'Loading',
'Dialog'
] ]
}, },
......
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
}; };
</script> </script>
<style> <style>
@import url("//at.alicdn.com/t/c/font_1890699_gbysegbhucu.css"); @import url("//at.alicdn.com/t/c/font_1890699_5zxmcxmwvtf.css");
@font-face { @font-face {
font-family: "oswald"; font-family: "oswald";
src: url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf"); src: url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf");
......
...@@ -26,9 +26,7 @@ Vue.prototype.domainManager = function() { ...@@ -26,9 +26,7 @@ Vue.prototype.domainManager = function() {
domainUrl = "http://testapi.oytour.com"; domainUrl = "http://testapi.oytour.com";
} else if (domainNameUrl.indexOf('oytour') !== -1) { } else if (domainNameUrl.indexOf('oytour') !== -1) {
// domainUrl = "http://reborn.oytour.com"; // domainUrl = "http://reborn.oytour.com";
// domainUrl = 'http://192.168.10.11:8083' domainUrl = 'http://192.168.10.206:8015' //'http://192.168.10.206:8015' ''http://192.168.10.11:8083' '
domainUrl = 'http://192.168.10.206'
//''http://192.168.10.11:8083' '
} }
var obj = { var obj = {
//主地址 //主地址
......
This diff is collapsed.
...@@ -20,7 +20,78 @@ ...@@ -20,7 +20,78 @@
</div> </div>
</div> </div>
</template> </template>
<div class="text-grey-6 f12 q-my-md">選擇數量</div> <div class="text-grey-6 f12 q-my-md">住宿日期</div>
<div v-for="(x,index) in roomGroup" :key="index">
<div v-for="(y,i) in x.rateGroup" :key="i">
<div class="row items-end">
<div class="col" :class="{'column':$q.platform.is.mobile}">
<div>
<span class="text-subtitle2 text-weight-bold">{{ selectedObj?getMealType(selectedObj.meals):''}}</span>
<span class="text-grey-6 f12 q-ml-sm">{{y.stayDate}}</span></span>
</div>
<div v-if="$q.platform.is.mobile">
<span class="text-grey-7 product-price" style="font-size: 13px">
<template v-if="y.perAdultRateBySetCurrency">
CNY{{y.perAdultRateBySetCurrency}}/人
</template>
<template v-else="y.totalPerRoomRateBySetCurrency">
CNY{{y.totalPerRoomRateBySetCurrency}}/晚
</template>
<!-- CNY {{ selectedObj?getPrice2(selectedObj.chargeableRateInfoPerPersonForANightBySetCurrency):0 }} /人均 -->
</span>
</div>
</div>
<div class="row items-end">
<span v-if="$q.platform.is.desktop" class="text-grey-7 product-price" style="font-size: 13px">
<template v-if="y.perAdultRateBySetCurrency">
CNY{{y.perAdultRateBySetCurrency}}/人
</template>
<template v-else="y.totalPerRoomRateBySetCurrency">
CNY{{y.totalPerRoomRateBySetCurrency}}/晚
</template>
<!-- CNY {{selectedObj? getPrice2(selectedObj.chargeableRateInfoPerPersonForANightBySetCurrency):0 }} /人均 -->
</span>
<!-- <q-input
style="width: 150px"
@input="changePeople"
v-model="chosenObj.Count"
class="col"
:class="{
'q-ml-sm q-px-none q-pl-none': $q.platform.is.desktop,
}"
mask="#"
reverse-fill-mask
dense
standout
readonly
>
<template v-slot:prepend>
<q-btn
color="primary"
size="sm"
class="q-px-none"
flat
icon="remove"
@click="addPeople('Count', -1)"
/>
</template>
<template v-slot:append>
<q-btn
color="primary"
size="sm"
class="q-px-none"
flat
icon="add"
@click="addPeople('Count', 1)"
/>
</template>
</q-input> -->
</div>
</div>
</div>
</div>
<!-- <div class="text-grey-6 f12 q-my-md">選擇數量</div>
<div class="row items-end"> <div class="row items-end">
<div class="col" :class="{'column':$q.platform.is.mobile}"> <div class="col" :class="{'column':$q.platform.is.mobile}">
<div> <div>
...@@ -73,7 +144,7 @@ ...@@ -73,7 +144,7 @@
</template> </template>
</q-input> </q-input>
</div> </div>
</div> </div> -->
</div> </div>
<div class="q-mt-md q-pt-md" style="border-top: 1px dashed #eee"> <div class="q-mt-md q-pt-md" style="border-top: 1px dashed #eee">
<div class="row items-center"> <div class="row items-center">
...@@ -135,6 +206,7 @@ export default { ...@@ -135,6 +206,7 @@ export default {
chosenObj: null, chosenObj: null,
sumPrice:0, sumPrice:0,
selectedObj: null, selectedObj: null,
roomGroup: null
}; };
}, },
created() { created() {
...@@ -143,7 +215,7 @@ export default { ...@@ -143,7 +215,7 @@ export default {
methods: { methods: {
goOrderHandler(){ goOrderHandler(){
let order = { let order = {
msg: JSON.stringify(this.msg), msg: this.msg,
// hotelId: this.msg.hotelId, // hotelId: this.msg.hotelId,
// arrivalDate: this.msg.arrivalDate, // arrivalDate: this.msg.arrivalDate,
// departureDate: this.msg.departureDate, // departureDate: this.msg.departureDate,
...@@ -152,7 +224,7 @@ export default { ...@@ -152,7 +224,7 @@ export default {
id: this.p.id, id: this.p.id,
selectedObjId: this.selectedObj.id, selectedObjId: this.selectedObj.id,
roomOptionCd: this.selectedObj.roomOptionCd, roomOptionCd: this.selectedObj.roomOptionCd,
chosenObj: this.chosenObj, Count: this.chosenObj.Count,
sumPrice: this.sumPrice sumPrice: this.sumPrice
} }
let key = this.$md5(JSON.stringify(order)) let key = this.$md5(JSON.stringify(order))
...@@ -167,11 +239,110 @@ export default { ...@@ -167,11 +239,110 @@ export default {
}, },
handleSelect(item){ handleSelect(item){
this.selectedObj = item this.selectedObj = item
console.log(this.selectedObj,'-----') this.sumPrice = 0
setTimeout(()=>{ setTimeout(()=>{
this.calcMoney() this.getData()
// this.calcMoney()
},100) },100)
}, },
getData() {
let msg = JSON.parse(JSON.stringify(this.msg))
msg.roomOptionCd = this.selectedObj.roomOptionCd
this.$q.loading.show();
this.apipost(
"dmc_post_Get_GetJAPAN_RoomsList",
msg,
(r) => {
this.$q.loading.hide();
if (r.data.resultCode == 1) {
let rateGrouoLen = 0;
if(Object.prototype.toString.call(r.data.data.roomGroup) == '[object Object]'){
let arr = [];
arr.push(r.data.data.roomGroup);
this.roomGroup=arr;
}
this.roomGroup.forEach(x=>{
if(Object.prototype.toString.call(x.rateGroup) == '[object Object]'){
let arr = [];
arr.push(x.rateGroup);
x.rateGroup= arr;
}
let tt = 0;
let tt2 = 0;
let AdultTotalPrice = 0;
let childToTalPrice = 0;
let AdultCount = 0;
let childCount = 0;
let AdultJapanPrice = 0;
let ChildJapanPrice = 0;
let AdultJapanCount = 0;
let childJapanCount = 0;
//原始成人
let oldAount=0;
let childAount=0;
let oldAuditPrice=0;
let oldChildPrice=0;
// this.TotalChildCount+=x.roomChildCount*x.rateGroup.length;
rateGrouoLen+= x.rateGroup.length;
// this.chekedChildCount = this.numberOfChildren*rateGrouoLen;
//无价格 只有房间价格
this.sumPrice = 0
let onlyRoomPrice=0;
let onlyJanpnase=0;
x.rateGroup.forEach(z=>{
if(z.perAdultRateBySetCurrency){
z.oldAuditPrice = z.perAdultRateBySetCurrency;
z.oldchildPrice = z.perChildRateBySetCurrency;
z.perAdultRateBySetCurrency = Math.ceil(z.perAdultRateBySetCurrency/r.data.data.JapanIncrease);
z.perChildRateBySetCurrency = Math.ceil(z.perChildRateBySetCurrency/r.data.data.JapanIncrease);
if(x.roomAdultCount>0){
AdultTotalPrice+=parseFloat(z.perAdultRateBySetCurrency);
oldAuditPrice+=parseFloat(z.oldAuditPrice);
AdultJapanPrice+=parseFloat(z.perAdultRate);
}
if(x.roomChildCount>0){
childToTalPrice+=parseFloat(z.perChildRateBySetCurrency);
oldChildPrice+=parseFloat(z.oldchildPrice);
ChildJapanPrice+=parseFloat(z.perChildRate);
}
}
if(z.totalPerRoomRateBySetCurrency){
z.totalPerRoomRateBySetCurrency = Math.ceil(z.totalPerRoomRateBySetCurrency/r.data.data.JapanIncrease);
onlyRoomPrice+=parseFloat(z.totalPerRoomRateBySetCurrency);
onlyJanpnase+=parseFloat(z.totalPerRoomRate);
}
})
AdultCount+=AdultTotalPrice*x.roomAdultCount;
childCount+=childToTalPrice*x.roomChildCount;
// AdultCount+=AdultTotalPrice;
// childCount+=childToTalPrice;
oldAount+=oldAuditPrice;
childAount+=childAount;
// this.parameters.totalChargeableRateInfo += parseFloat(AdultCount+childCount+onlyRoomPrice);
// this.parameters.OldTotalPrice+=parseFloat(oldAount+childAount+onlyRoomPrice);
AdultJapanCount+=AdultJapanPrice*x.roomAdultCount;
childJapanCount+=ChildJapanPrice*x.roomChildCount;
// this.SettlementPrice=this.parameters.totalChargeableRateInfo;
// this.SettlementPrice=this.parameters.totalChargeableRateInfo;
// let price=this.parameters.totalChargeableRateInfo;
this.sumPrice += parseFloat(AdultJapanCount+childJapanCount+onlyJanpnase);
console.log(this.sumPrice,'----')
})
}
})
},
initModel() { initModel() {
this.sumPrice=0 this.sumPrice=0
this.chosenObj = { this.chosenObj = {
......
<<<<<<< HEAD
<style> <style>
.q-ml-lg .block {
margin-right: 12px;
}
</style> </style>
=======
>>>>>>> f1c336638dd7e228f10cc6497760343026d24a12
<style scoped> <style scoped>
.header-box { .header-box {
max-width: 1200px; max-width: 1200px;
......
<style>
.q-ml-lg .block {
margin-right: 12px;
}
</style>
<style scoped> <style scoped>
.header-box { .header-box {
max-width: 1200px; max-width: 1200px;
......
...@@ -597,17 +597,28 @@ ...@@ -597,17 +597,28 @@
</template> </template>
<script> <script>
import auth from "src/components/common/auth.vue"; // import auth from "src/components/common/auth.vue";
import { slider, slideritem } from "vue-concise-slider"; import { slider, slideritem } from "vue-concise-slider";
import calendar from "../components/trip/calendar.vue"; import calendar from "../components/trip/calendar.vue";
import OrderPreview from "src/components/car/orderPreview.vue"; import OrderPreview from "src/components/car/orderPreview.vue";
import smaple from "src/components/trip/smaple.vue"; // import smaple from "src/components/trip/smaple.vue";
import Trip from "src/components/trip/trip.vue"; // import Trip from "src/components/trip/trip.vue";
import block from "src/components/trip/block/index"; // import block from "src/components/trip/block/index";
import { date } from "quasar"; import { date } from "quasar";
import componentsMap from "../components/car/Map.vue"; import componentsMap from "../components/car/Map.vue";
import * as dayjs from "dayjs"; // import * as dayjs from "dayjs";
export default { export default {
components: {
slider,
slideritem,
calendar,
OrderPreview,
// smaple,
// Trip,
// block,
componentsMap,
// auth,
},
props: [], props: [],
data() { data() {
return { return {
...@@ -718,17 +729,6 @@ export default { ...@@ -718,17 +729,6 @@ export default {
zoomDiyContext: 1, zoomDiyContext: 1,
}; };
}, },
components: {
slider,
slideritem,
calendar,
OrderPreview,
smaple,
Trip,
block,
componentsMap,
auth,
},
watch: { watch: {
days: { days: {
handler: function (val, oldval) { handler: function (val, oldval) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<style lang="scss" scoped>
</style>
<template>
<div>价格详情
<div
class="rounded-borders bg-white q-pa-md"
style="width: 300px"
:style="{
width:
$q.screen.width < 1200 || $q.platform.is.mobile
? 'unset'
: '300px',
position:$q.platform.is.mobile?'unset':'sticky',
top:$q.platform.is.mobile?'unset':'50px',
}"
>
<div class="text-subtitle1 text-weight-bolder">付款明細</div>
<!-- <div class="q-mt-md text-grey-6">
<div class="row q-pb-xs no-wrap" v-if="AirportObj&&AirportObj.Name">
<div style="width: 80px">{{details.CarType==1?'接':'送'}}機機場:</div>
<div class="q-ml-md ellipsis-2-lines">{{AirportObj.Name}}</div>
</div>
<div class="row q-pb-xs no-wrap" v-if="AirportObj&&AirportObj.Name">
<div style="width: 80px">{{details.CarType==1?'抵達':'起飛'}}時間:</div>
<div class="q-ml-md ellipsis-2-lines">{{parameters.FlightTime}}</div>
</div>
<div class="row q-pb-xs no-wrap" v-if="parameters.GetonAddress">
<div style="width: 80px">上車點:</div>
<div class="q-ml-md ellipsis-2-lines">{{parameters.GetonAddress}}</div>
</div>
<div class="row q-pb-xs no-wrap" v-if="parameters.GetoffAddress">
<div style="width: 80px">下車點:</div>
<div class="q-ml-md ellipsis-2-lines">{{parameters.GetoffAddress}}</div>
</div>
<div class="row">
<div style="width: 80px">
接駁日期:</div>
<div class="q-ml-md">
{{parameters.OrderDate}}
</div>
</div>
</div>
<q-separator color="grey-2" class="q-my-md"/> -->
<div class="text-grey-9">
<!-- <div class="row q-mb-sm" v-if="chosenObj.Count>0&&CarObj">
<div class="col">{{CarObj.CarName}} x {{ chosenObj.Count }}</div>
<div>{{details.CurrencyCode}} {{ moneyFormat(OrderDate.originalB2CPrice,2) }}</div>
</div> -->
<hr
style="border: none; border-top: 1px dashed #eee !important"
class="bg-transparent q-mb-sm"
/>
<div class="row q-mb-sm items-center">
<div class="col">總金額</div>
<div class="text-subtitle2 text-weight-bolder text-primary">
CNY {{ moneyFormat(sumPrice, 2) }}
</div>
</div>
<hr style="border:none;border-top:1px dashed #EEE !important;" class="bg-transparent q-mb-sm" />
<div class="row q-mb-sm items-center">
<div class="col">優惠金額</div>
<div
class="text-subtitle2 text-weight-bolder text-teal"
v-if="DiscountsMoney > 0"
>
CNY - {{ moneyFormat(DiscountsMoney, 2) }}
</div>
<div class="text-grey-5" v-else>暫無優惠</div>
</div>
<hr style="border:none;border-top:1px dashed #EEE !important;" class="bg-transparent q-mb-sm" />
<div class="row q-mb-sm items-center">
<div class="col">支付金額</div>
<div class="text-h6 text-weight-bolder text-primary product-price">{{details.CurrencyCode}} {{ moneyFormat(Money,2) }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
orderInfo: {
type: Object,
default: () => ({})
}
},
data() {
return {
details: null,
sumPrice: 0,//总金额
DiscountsMoney: 0,//优惠金额
Money: 0, // 支付金額
}
},
mounted() {
this.getCarData()
this.getCarOrder()
},
methods: {
// 获取团的详情
getGroupData() {
// this.$q.loading.show();
this.apipost(
"b2c_get_GetCarSingleProductDetail",
{ ProductId: this.orderInfo.GoodsId },
(r) => {
if (r.data.resultCode == 1) {
this.dataList = r.data.data;
this.emitAddress()
} else {
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
// this.$q.loading.hide();
},
null
);
},
// 获取车的详情
getCarData() {
// this.$q.loading.show();
this.apipost(
"b2c_get_GetCarSingleProductDetail",
{ ProductId: this.orderInfo.GoodsId },
(r) => {
if (r.data.resultCode == 1) {
this.dataList = r.data.data;
this.details = r.data.data;
} else {
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
// this.$q.loading.hide();
},
null
);
},
getCarOrder() {
this.$q.loading.show();
this.apipost(
"CarSingle_post_GetTYMyCarOrderInfo",
{ OrderId: this.orderInfo.ErpOrderId },
(r) => {
if (r.data.resultCode == 1) {
this.dataList = r.data.data;
this.Money = r.data.data.Money;
} else {
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
this.$q.loading.hide();
},
null
);
},
emitAddress() {
const {PlaceList} = this.dataList
PlaceList.findItem(item => item.id === this.id)
this.$emit('address', this.dataList)
}
}
}
</script>
\ No newline at end of file
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
<div class="q-mt-lg row"> <div class="q-mt-lg row">
<div class="col"> <div class="col">
<div class="row items-center"> <div class="row items-center">
<q-icon name="iconfont icontishi" size="32px" color="warning" /> <q-icon name="iconfont iconsuccess" :class="`${orderIcon}`" size="32px" :color="`${iconColor}`" />
<div class="q-ml-md text-h6 text-orange text-weight-bold">待支付</div> <div class="q-ml-md text-h6 text-weight-bold" :class="`text-${iconColor}`">{{["","待付款","已付款", "已完成", "已取消"][detail.OrderStatus]}}</div>
</div> </div>
<div class="q-mt-md f12 text-grey-6">請在您下單成功後30分鐘內完成支付,否則訂單會被系統自動取消</div> <div class="q-mt-md f12 text-grey-6">請在您下單成功後30分鐘內完成支付,否則訂單會被系統自動取消</div>
</div> </div>
<div class=""> <div class="">
<div class="f12 text-grey-6">訂單編號:#D2022325159852</div> <div class="f12 text-grey-6">訂單編號:#{{detail.OrderNo}}</div>
<div class="f12 text-grey-6 q-mt-md">下單日期:2023年3月14日 19:02</div> <div class="f12 text-grey-6 q-mt-md">下單日期:{{detail.CreateTime}}</div>
</div> </div>
</div> </div>
<q-separator color="grey-2" class="q-my-md" /> <q-separator color="grey-2" class="q-my-md" />
...@@ -20,9 +20,13 @@ ...@@ -20,9 +20,13 @@
<div class="text-subtitle1 col"> <div class="text-subtitle1 col">
<span>應付金額:</span> <span>應付金額:</span>
<span class="text-subtitle2">CNY</span> <span class="text-subtitle2">CNY</span>
<span class="q-ml-sm text-weight-bolder">{{ moneyFormat('3580.00',2) }}</span> <span class="q-ml-sm text-weight-bolder">{{ moneyFormat(detail.TotalPrice,2) }}</span>
</div> </div>
<div class=""> <div class="">
<q-btn color="primary" outline dense class="q-mr-md q-px-md">
<i class="iconfont iconmessage1"></i>联系客服</q-btn>
<q-btn color="primary" outline dense class="q-mr-md q-px-md">
<i class="iconfont iconiconfontscan"></i>扫码咨询</q-btn>
<q-btn color="primary" outline dense label="取消訂單" class="q-mr-md q-px-md"/> <q-btn color="primary" outline dense label="取消訂單" class="q-mr-md q-px-md"/>
<q-btn color="primary" unelevated dense label="前往付款" class="q-px-md"/> <q-btn color="primary" unelevated dense label="前往付款" class="q-px-md"/>
</div> </div>
...@@ -33,19 +37,19 @@ ...@@ -33,19 +37,19 @@
<div class="text-subtitle1 text-weight-bolder">商品訊息</div> <div class="text-subtitle1 text-weight-bolder">商品訊息</div>
<div class="row q-mt-md"> <div class="row q-mt-md">
<q-img <q-img
src="http://imgfile.oytour.com/Upload/DMC/202302280651141800000000003.jpg" :src="detail.GoodsPic"
class="rounded-borders q-mr-md" class="rounded-borders q-mr-md"
spinner-color="grey-2" spinner-color="grey-2"
style="width: 150px" style="width: 150px"
/> />
<div class="col"> <div class="col">
<div class="text-body1 ellipsis">忠清北道私人包車一日遊|玉笋峰悬索桥 & 单轨列车登飞凤山(滑翔伞) & 朴达岭 & 国弓体验</div> <div class="text-body1 ellipsis">{{detail.GoodsName}}</div>
<div class="q-mt-sm text-grey-6">2023-03-15從成都出發 成人x2; </div> <div class="q-mt-sm text-grey-6">2023-03-15從成都出發 成人x2; </div>
<div class="q-mt-sm text-dark"> <div class="q-mt-sm text-dark">
出行日期:2023年3月30日(本地时间) 出行日期:{{detail.SelectStartTime}}(本地时间)
</div> </div>
<div class="q-mt-sm text-grey-6"> <div class="q-mt-sm text-grey-6">
商品類型:包車 商品類型:{{detail.GoodsType}}
</div> </div>
</div> </div>
</div> </div>
...@@ -57,19 +61,19 @@ ...@@ -57,19 +61,19 @@
<div class="row q-col-gutter-md q-mt-md"> <div class="row q-col-gutter-md q-mt-md">
<div class="col-6"> <div class="col-6">
<div class="f12 text-grey-6">姓氏</div> <div class="f12 text-grey-6">姓氏</div>
<div class="q-mt-sm text-body1"></div> <div class="q-mt-sm text-body1">{{detail.SurName}}</div>
</div> </div>
<div class="col-6"> <div class="col-6">
<div class="f12 text-grey-6">名字</div> <div class="f12 text-grey-6">名字</div>
<div class="q-mt-sm text-body1"></div> <div class="q-mt-sm text-body1">{{detail.Name}}</div>
</div> </div>
<div class="col-6"> <div class="col-6">
<div class="f12 text-grey-6">手機號碼</div> <div class="f12 text-grey-6">手機號碼</div>
<div class="q-mt-sm text-body1">86-17308037817</div> <div class="q-mt-sm text-body1">{{detail.ContactNumber}}</div>
</div> </div>
<div class="col-6"> <div class="col-6">
<div class="f12 text-grey-6">邮箱 (用于接收订单确认邮件)</div> <div class="f12 text-grey-6">邮箱 (用于接收订单确认邮件)</div>
<div class="q-mt-sm text-body1">alex9012@vip.qq.com</div> <div class="q-mt-sm text-body1">{{detail.Mailbox}}</div>
</div> </div>
</div> </div>
<div> <div>
...@@ -81,13 +85,85 @@ ...@@ -81,13 +85,85 @@
</div> </div>
</q-card> </q-card>
<q-card class="rounded-borders q-pa-md q-mt-md" flat>
<div class="text-subtitle1 text-weight-bolder">使用地点</div>
<div class="q-pa-md" :class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}">
<componentsMap :AddressObj="detail"/>
</div>
<carPriceDetail v-if="detail.OrderNo" :orderInfo="detail"></carPriceDetail>
</q-card>
<div v-if="(!orderNo || orderNo == '') && !loading" class="text-center q-my-xl">
<none-data
iconType="order"
title="沒有找到您的訂單信息哦"
subtitle="趕緊去挑選心儀的旅遊產品吧,三秒後自動跳轉到首頁"
></none-data>
</div>
</div> </div>
</template> </template>
<script> <script>
import componentsMap from "../../../components/car/Map.vue";
import carPriceDetail from './carPriceDetail.vue'
export default { export default {
components: {componentsMap, carPriceDetail},
data() {
return {
detail: {},
orderIcon: '',
iconColor: '',
orderNo: '',
loading: true,
}
},
created() {},
mounted() {
const {orderNo} = this.$route.params
if(orderNo) {
this.getOrderDetail(orderNo)
} else {
this.goHomeHandler()
}
},
methods: {
goHomeHandler(){
this.loading=false
setTimeout(() => {
location.href = location.origin;
}, 3000);
},
getOrderDetail(orderNo) {
this.apipost(
"GetDetailsByOrderNo_post",
{OrderNo: orderNo
},
(res) => {
if (res.data.resultCode == 1) {
this.detail = res.data.data
this.orderIcon = ["","icontime1","iconsuccess", "iconsuccess", "icontishi"][this.detail.OrderStatus]
this.iconColor = ["","blue","blue", "green", "grey"][this.detail.OrderStatus]
console.log('get detail', this.orderIcon, this.iconColor)
this.orderNo=OrderNo
this.orderInfo=r.data.data
this.loading=false
} else {
// this.$notify(res.data.message);
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
}
} }
</script> </script>
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
><img class="q-mr-sm" style="width: 28px;" src="../../assets/img/address-add.png" />添加郵寄地址</q-btn> ><img class="q-mr-sm" style="width: 28px;" src="../../assets/img/address-add.png" />添加郵寄地址</q-btn>
</div> </div>
</div> </div>
<q-dialog content-style="width: 900px" v-model="isShowDialog"> <q-dialog v-model="isShowDialog">
<div class="bg-white dialog-box" style="width: 800px; padding: 20px"> <div class="bg-white dialog-box" style="width: 800px; padding: 20px">
<div class="f22 bold">{{form.Id ? '编辑': '添加'}}邮寄地址</div> <div class="f22 bold">{{form.Id ? '编辑': '添加'}}邮寄地址</div>
<form @submit.prevent.stop="submit" class="q-gutter-md"> <form @submit.prevent.stop="submit" class="q-gutter-md">
......
...@@ -138,8 +138,8 @@ ...@@ -138,8 +138,8 @@
/> />
</div> </div>
<q-dialog content-style="width: 900px" v-model="isShowDialog"> <q-dialog v-model="isShowDialog">
<div class="bg-white dialog-box" style="width: 800px; padding: 20px"> <div class="bg-white dialog-box" style="padding: 20px">
<div class="f22 bold">{{ form.Id ? "编辑" : "新增" }}出行人信息</div> <div class="f22 bold">{{ form.Id ? "编辑" : "新增" }}出行人信息</div>
<form @submit.prevent.stop="submit" class="q-gutter-md"> <form @submit.prevent.stop="submit" class="q-gutter-md">
<div> <div>
......
...@@ -195,7 +195,7 @@ const routes = [{ ...@@ -195,7 +195,7 @@ const routes = [{
import ('pages/pay/paysuccess.vue') import ('pages/pay/paysuccess.vue')
}, },
{ {
path: '/orderinfo/:orderno', //訂單詳情 path: '/orderinfo/:orderNo', //訂單詳情
meta: { title: '訂單詳情', isUserCenter: false, needLogin: true, }, meta: { title: '訂單詳情', isUserCenter: false, needLogin: true, },
component: () => component: () =>
import ('pages/usercenter/order/orderDetail.vue') import ('pages/usercenter/order/orderDetail.vue')
......
...@@ -2,7 +2,6 @@ const EnumHelper = { ...@@ -2,7 +2,6 @@ const EnumHelper = {
ParseToEnum(TEnum, value, comparison = '') { ParseToEnum(TEnum, value, comparison = '') {
if (Object.isFrozen) { if (Object.isFrozen) {
let t = Object.values(TEnum) let t = Object.values(TEnum)
console.log(t, Symbol(1) == 1)
let r = t.find(x => (comparison != '' && x[comparison] == value) || (comparison == '' && x == value)) let r = t.find(x => (comparison != '' && x[comparison] == value) || (comparison == '' && x == value))
return r return r
} else { } else {
......
...@@ -2,23 +2,33 @@ const ListProductTypeEnum = Object.freeze({ ...@@ -2,23 +2,33 @@ const ListProductTypeEnum = Object.freeze({
TRIP: { TRIP: {
value: 1, value: 1,
desc: '線路旅遊' desc: '線路旅遊',
bgColor: 'bg-pink-2',
color: 'text-pink'
}, },
SCENIC: { SCENIC: {
value: 2, value: 2,
desc: '景點門票' desc: '景點門票',
bgColor: 'bg-purple-2',
color: 'text-purple'
}, },
HOTEL: { HOTEL: {
value: 3, value: 3,
desc: '酒店住宿' desc: '酒店住宿',
bgColor: 'bg-indigo-2',
color: 'text-indigo'
}, },
CAR: { CAR: {
value: 4, value: 4,
desc: '目的地用車' desc: '目的地用車',
bgColor: 'bg-teal-2',
color: 'text-teal'
}, },
JALAN: { JALAN: {
value: 5, value: 5,
desc: '酒店住宿' desc: '酒店住宿',
bgColor: 'bg-indigo-2',
color: 'text-indigo'
}, },
}) })
......
const OrderStatusEnum = Object.freeze({
UN_PAY: {
value: 1,
desc: '待付款',
icon: 'iconfont icontime1',
color: 'text-orange'
},
PAYED: {
value: 2,
desc: '待出行',
icon: 'iconfont iconflag',
color: 'text-green'
},
FINISH: {
value: 3,
desc: '已完成',
icon: 'iconfont iconsuccess',
color: 'text-dark'
},
CANCEL: {
value: 4,
desc: '已取消',
icon: 'iconfont iconminus',
color: 'text-grey-6'
}
})
export default OrderStatusEnum
\ No newline at end of file
import EnumHelper from "./enumhelper"
import ListProductTypeEnum from "./listProductType"
const ProductTypeEnum = Object.freeze({ const ProductTypeEnum = Object.freeze({
/** /**
* 一日游 * 一日游
...@@ -112,4 +115,29 @@ const ProductTypeEnum = Object.freeze({ ...@@ -112,4 +115,29 @@ const ProductTypeEnum = Object.freeze({
}) })
export default ProductTypeEnum const mappingRules = [
\ No newline at end of file [-1],
[1, 2, 3],
[4, 5, 6, 7],
[-1],
[12, 13, 14],
[8, 9, 10, 11]
]
const mappingListType = (value) => {
let val = mappingRules.findIndex(x => {
return x.indexOf(value) != -1
})
if (val && val > 0) {
return EnumHelper.ParseToEnum(ListProductTypeEnum, val, 'value')
}
return {}
}
const transProductEnum = (value) => {
return mappingRules[value]
}
export default ProductTypeEnum
export { mappingListType, transProductEnum }
\ 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