|
|
@ -5,7 +5,7 @@ |
|
|
|
<view class="title text-overflow">{{ pInfo.title }}</view> |
|
|
|
<view> |
|
|
|
<view style="padding: 20rpx 0 10rpx;" v-if="allSeldDate.length > 0">{{showDate.date}} {{ShowDateDay(new Date(showDate.date).getDay())}}</view> |
|
|
|
<view v-if="timesArr.length > 0">{{ showDate.startTime }}-{{ showDate.endTime }} 入园</view> |
|
|
|
<view v-if="showDate.startTime">{{ showDate.startTime }}-{{ showDate.endTime }} 入园</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="top-edit" @click="changeSku">修改 ></view> |
|
|
@ -403,8 +403,8 @@ |
|
|
|
let res = await this.Post({ |
|
|
|
specifications_id: skuId, |
|
|
|
date: this.showDate.date, |
|
|
|
start_time:this.showDate.startTime, |
|
|
|
end_time:this.showDate.endTime |
|
|
|
start_time:this.showDate.startTime||'', |
|
|
|
end_time:this.showDate.endTime||'' |
|
|
|
}, '/api/goods/getSpecificationsPriceCalendarAndTime') |
|
|
|
if (res.code == 1) { |
|
|
|
return {code:1,...res.data} |
|
|
@ -581,21 +581,21 @@ |
|
|
|
}) |
|
|
|
|
|
|
|
// 如果只有一张票给默认值 |
|
|
|
if (!this.setDefault && this.addressList.length>0) { |
|
|
|
if (!this.setDefault ) { |
|
|
|
// 找符合条件的 |
|
|
|
let currentData = this.pInfo.specifications[0] |
|
|
|
let person0 = currentData.selPeople[0] |
|
|
|
let person = currentData.selPerson |
|
|
|
let currentPerson = {} |
|
|
|
if (!currentData.is_card) { |
|
|
|
person.tel = JSON.parse(uni.getStorageSync('userInfo')).mobile |
|
|
|
} else if(this.addressList.length>0) { |
|
|
|
|
|
|
|
if (this.addressList.some(v=>v.is_default=='1')) { |
|
|
|
currentPerson = this.addressList.find(v=>v.is_default=='1') |
|
|
|
} else { |
|
|
|
currentPerson = this.addressList[0] |
|
|
|
} |
|
|
|
|
|
|
|
if (!currentData.is_card) { |
|
|
|
person.tel = JSON.parse(uni.getStorageSync('userInfo')).mobile |
|
|
|
} else { |
|
|
|
person.id = currentPerson.id |
|
|
|
person.id_number = currentPerson.id_number |
|
|
|
person.name = currentPerson.name |
|
|
@ -847,10 +847,17 @@ |
|
|
|
specifications_id: this.sInfo.id, |
|
|
|
date: date, |
|
|
|
}, '/api/goods/getTimeStock').then(res => { |
|
|
|
if (res.data.length > 0) { |
|
|
|
if (Array.isArray(res.data)) { |
|
|
|
this.timesArr = res.data || [] |
|
|
|
this.seldTimeIndex = -1 |
|
|
|
} |
|
|
|
if (res.data.length > 0) { |
|
|
|
this.seldTimeIndex = this.timesArr.findIndex(item => item.stock_number > 0) |
|
|
|
} |
|
|
|
// if (res.data.length > 0) { |
|
|
|
// this.timesArr = res.data || [] |
|
|
|
// this.seldTimeIndex = this.timesArr.findIndex(item => item.stock_number > 0) |
|
|
|
// } |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 选择日期 |
|
|
@ -923,8 +930,8 @@ |
|
|
|
/*---------------------------价格日历-----------------------------------*/ |
|
|
|
order() { |
|
|
|
let use_date = this.allSeldDate[this.seldDateIndex].date |
|
|
|
let start_time =this.timesArr[this.seldTimeIndex].start_time |
|
|
|
let end_time = this.timesArr[this.seldTimeIndex].end_time |
|
|
|
let start_time =(this.timesArr[this.seldTimeIndex]||{}).start_time |
|
|
|
let end_time = (this.timesArr[this.seldTimeIndex]||{}).end_time |
|
|
|
let goods = [] |
|
|
|
|
|
|
|
|
|
|
@ -944,8 +951,8 @@ |
|
|
|
num: sku.buyNum, |
|
|
|
// contact_id: sku.selPeople.filter(v=>v.id).map(v=>v.id), |
|
|
|
date: use_date, |
|
|
|
start_time: start_time, |
|
|
|
end_time: end_time, |
|
|
|
start_time: start_time||'', |
|
|
|
end_time: end_time||'', |
|
|
|
reserve_mobile: sku.selPerson.tel, |
|
|
|
} |
|
|
|
goods.push(param) |
|
|
|