Commit 45fb6cf0 authored by youjie's avatar youjie

no message

parent 63eca6a3
......@@ -151,10 +151,11 @@ export default {
this.p = n;
if(n&&n.startDate){
this.chosenObj.startDate = n.startDate;
console.log(this.chosenObj.startDate,this.dataAll,'===')
let arr = this.dataAll.filter(x=> x.Date==this.chosenObj.startDate)
this.TicketIds = arr[0].Price.map(x=> {return x.TicketId})
// this.selectedCar = this.dataList.CarTypeList[0].Id
// this.selectedCarObj = this.dataList.CarTypeList[0]
if(arr.length>0){
this.TicketIds = arr[0].Price.map(x=> {return x.TicketId})
}
}
this.calcMoney()
......@@ -170,6 +171,14 @@ export default {
deep: true,
immediate: true
},
Month:{
handler(n, o) {
this.selectedCarObj = this.dataList.CarTypeList[0]
// this.getCarPriceData2()
},
deep: true,
immediate: true
}
},
data() {
return {
......@@ -189,7 +198,7 @@ export default {
if(this.p.startDate){
this.chosenObj.startDate = this.p.startDate;
this.calcMoney()
this.getCarPriceData2()
// this.getCarPriceData2()
}
this.getCarPriceData()
},
......@@ -312,13 +321,11 @@ export default {
remark: "",
};
},
resetHandler(type) {
if(type&&type!=1){
this.selectedCarObj = null
this.selectedAirportObj = null
this.onCarObj = null
this.unCarObj = null
}
resetHandler() {
this.selectedCarObj = null
this.selectedAirportObj = null
this.onCarObj = null
this.unCarObj = null
setTimeout(()=>{
this.p = {};
this.initModel()
......
......@@ -122,10 +122,10 @@ export default {
},
methods: {
init() {
this.createChosenDateHandler();
let startDate = this.prices.length>0&&this.prices[0].startDate?this.prices[0].startDate:''
let firstMonth = date.formatDate(
new Date(this.prices[0].startDate),
new Date(startDate),
"YYYY/MM"
);
console.log(firstMonth)
......
......@@ -173,11 +173,12 @@
<span class="f12 text-grey-6"></span>
</div>
<div v-else class="text-subtitle1 text-grey-6">暫無報價</div>
<!-- :disable="priceList.length>0?false:true" -->
<q-btn
color="primary"
label="選擇方案"
unelevated
:disable="priceList.length>0?false:true"
@click="goScrollHandler(priceListHeight)"
:class="{ 'q-mt-md full-width': $q.platform.is.desktop }"
/>
......@@ -271,6 +272,7 @@
:price="currentPrice"
@reset="resetHandler"
@getPriceList="getPriceList"
ref="orderPreview"
></order-preview>
</div>
......@@ -278,9 +280,9 @@
<div class="text-h6 q-pt-lg" v-if="$q.platform.is.mobile">
所選方案詳情
</div>
<!-- v-if="priceList && priceList.length > 0" -->
<div
class="bg-white rounded-borders q-mt-md"
v-if="priceList && priceList.length > 0"
>
<div class="q-pa-md row">
<div class="col">
......@@ -309,12 +311,13 @@
</div>
<div class="" v-if="$q.platform.is.desktop">
<div class="row items-center">
<span class="product-price text-h6 q-mr-md"
<span v-if="priceList.length>0&&priceList[0].originalB2CPrice > 0" class="product-price text-h6 q-mr-md"
>CNY
{{
moneyFormat(priceList[0].originalB2CPrice, 0)
}}</span
>
<span v-else class="col"></span>
<q-btn
color="primary"
outline
......@@ -323,7 +326,7 @@
class="q-px-lg"
/>
</div>
<div class="text-info q-mt-md text-right">
<div class="text-info q-mt-md text-right" v-if="priceList.length>0">
最早可預訂日期:{{ priceList[0].startDate }}
</div>
</div>
......@@ -356,6 +359,7 @@
<calendar
:priceList="priceList"
@change="changeChosenDateHandler"
@getQuotationData="getCarPriceData2"
ref="calendar"
></calendar>
</div>
......@@ -367,6 +371,7 @@
:price="currentPrice"
@reset="resetHandler"
@getPriceList="getPriceList"
ref="orderPreview"
></order-preview>
</div>
</div>
......@@ -980,7 +985,11 @@ export default {
);
},
// 获取车的详情
getCarPriceData2() {
getCarPriceData2(time) {
if(time){
this.currentYM.str = time
this.$refs.orderPreview.resetHandler()
}
this.priceList = []
this.apipost(
"b2c_get_GetCarSingleProductMonthPrice",
......@@ -1005,9 +1014,19 @@ export default {
if(date.formatDate(Date.now(), 'YYYY-MM-DD')!=x.Date){
arr.push(dataObj)
}
}
})
if(arr.length==0){
let dataObj = {
startDate: this.currentYM.str,
originalB2CPrice: '',
remainNum: 0,
Count: 0,
isSupportChildren: 0,
safeMoney: 0,
}
arr.push(dataObj)
}
this.priceList = JSON.parse(JSON.stringify(arr))
}
......
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