@@ -46,11 +46,11 @@ | |||
src="{{telJpgUrl}}" mode="widthFix" /> | |||
<view class="telText">电话</view> | |||
</view> | |||
<view class="certificationBox" tt:if="{{item.latitude&&item.longitude}}" bindtap="goCertification" | |||
<!-- <view class="certificationBox" tt:if="{{item.latitude&&item.longitude}}" bindtap="goCertification" | |||
data-id="{{item.id}}"> | |||
<image class="certificationImg" src="../../assets/imgData/certification.png" mode="widthFix" /> | |||
<view class="telText">资质</view> | |||
</view> | |||
</view> --> | |||
</view> | |||
<view class="siteBox" tt:if="{{item.latitude&&item.longitude}}" bindtap="goMap" data-item="{{item}}"> | |||
<view class="siteText">{{item.addr}}</view> | |||
@@ -17,7 +17,8 @@ Page({ | |||
pickedStartTime: "请选择", | |||
pickedEndTime: "请选择", | |||
describeStr: "", | |||
status: "" | |||
status: "", | |||
isShowBtns: false | |||
}, | |||
onLoad(options) { | |||
console.log(options, 'options'); | |||
@@ -41,6 +42,7 @@ Page({ | |||
}, | |||
chooseAddress() { | |||
if (!this.data.isShowBtns) return | |||
let that = this; | |||
tt.chooseLocation({ | |||
success: function (res) { | |||
@@ -228,15 +230,21 @@ Page({ | |||
} | |||
}).then(res => { | |||
console.log(res, 'getOrderReservationDetail'); | |||
const status = res.data.status | |||
that.setData({ | |||
pickedAddress: res.data.userAddress || '请选择地址', | |||
pickedDate: util.timestampToTime(res.data.startDate, 'YYYY-MM-DD'), | |||
pickedStartTime: util.timestampToTime(res.data.startDate, 'hh:mm'), | |||
pickedEndTime: util.timestampToTime(res.data.endDate, 'hh:mm'), | |||
describeStr: res.data.describeStr, | |||
status: res.data.status, | |||
status, | |||
appointmentText: res.data.status == 1 ? "重新预约" : "修改预约" | |||
}) | |||
if (status == 0 || status == 1 || status == 2 || status == 3) { | |||
that.setData({ | |||
isShowBtns: true | |||
}) | |||
} | |||
}).catch(err => { | |||
console.log(err, 'getOrderReservationDetail'); | |||
}) | |||
@@ -15,22 +15,30 @@ | |||
</view> | |||
<view class="datePickerFlex"> | |||
<picker mode="date" start="{{ startTime }}" end="{{ endTime }}" bindchange='chooseDate'>选择服务日期:</picker> | |||
<picker mode="date" start="{{ startTime }}" end="{{ endTime }}" bindchange='chooseDate' class="address"> | |||
<picker mode="date" start="{{ startTime }}" end="{{ endTime }}" disabled="{{ !isShowBtns }}" | |||
bindchange='chooseDate'>选择服务日期:</picker> | |||
<picker mode="date" start="{{ startTime }}" end="{{ endTime }}" disabled="{{ !isShowBtns }}" | |||
bindchange='chooseDate' class="address"> | |||
{{ pickedDate }}</picker> | |||
</view> | |||
<view class="datePickerFlex"> | |||
<picker mode="time" bindchange='chooseTime'>预计上门时间:</picker> | |||
<picker mode="time" bindchange='chooseStartTime' class="address">{{ pickedStartTime }}</picker> | |||
<picker mode="time" disabled="{{ !isShowBtns }}" bindchange='chooseTime'>预计上门时间:</picker> | |||
<picker mode="time" disabled="{{ !isShowBtns }}" bindchange='chooseStartTime' class="address">{{ pickedStartTime | |||
}}</picker> | |||
- | |||
<picker mode="time" start="{{ pickedStartTime }}" bindchange='chooseEndTime' class="address">{{ pickedEndTime }} | |||
<picker mode="time" start="{{ pickedStartTime }}" disabled="{{ !isShowBtns }}" bindchange='chooseEndTime' | |||
class="address">{{ pickedEndTime }} | |||
</picker> | |||
</view> | |||
<view class="textarea"> | |||
<textarea class="describe" placeholder="备注:说点什么吧" bindinput="describing" value="{{ describeStr }}"></textarea> | |||
<textarea class="describe" placeholder="备注:说点什么吧" disabled="{{ !isShowBtns }}" bindinput="describing" | |||
value="{{ describeStr }}"></textarea> | |||
</view> | |||
<button class="confirm" type="primary" bindtap="confirm">{{ appointmentText }}</button> | |||
<button tt:if="{{ id && status != 1 }}" type="primary" bindtap="cancel">取消预约</button> | |||
<block tt:if="{{isShowBtns}}"> | |||
<button class="confirm" type="primary" bindtap="confirm">{{ appointmentText }}</button> | |||
<button tt:if="{{ id && status != 1 }}" type="primary" bindtap="cancel">取消预约</button> | |||
</block> | |||
</view> |
@@ -302,7 +302,7 @@ Page({ | |||
} | |||
if (item.key == 'Description') { | |||
if (item.key == 'Description' && item.isRequired) { | |||
tempObj.Description = JSON.parse(item.data) | |||
} | |||
if (item.key == "can_no_use_date") { | |||
@@ -323,6 +323,7 @@ Page({ | |||
console.log(this.data.data, "data"); | |||
} | |||
}).catch(err => { | |||
console.log(err, 'err'); | |||
tt.showToast({ | |||
title: err.message, | |||
icon: 'none', | |||
@@ -100,7 +100,8 @@ Page({ | |||
mallList: [], | |||
imId: "", | |||
goodId: "", | |||
IMorderId: "" | |||
IMorderId: "", | |||
use_num_per_consume: "" | |||
}, | |||
/** | |||
@@ -863,16 +864,26 @@ Page({ | |||
if (tempAppoinObj.need_appointment) { | |||
let subscribeSing = ""; | |||
if (tempAppoinObj.ahead_time_type == 1) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_day_num}天致电商家预约` | |||
subscribeSing = `需提前${tempAppoinObj.ahead_day_num}天预约` | |||
} else if (tempAppoinObj.ahead_time_type == 2) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_hour_num}小时致电商家预约` | |||
subscribeSing = `需提前${tempAppoinObj.ahead_hour_num}小时预约` | |||
} else if (tempAppoinObj.ahead_time_type == 3) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_minute_num}分钟致电商家预约` | |||
subscribeSing = `需提前${tempAppoinObj.ahead_minute_num}分钟预约` | |||
} | |||
tempObj.subscribeSing = subscribeSing | |||
} | |||
} | |||
if (item.key == "limit_use_rule") { | |||
console.log(item, 'item'); | |||
if (item.data != '') { | |||
let tempAppoinObj = JSON.parse(item.data) | |||
that.setData({ | |||
use_num_per_consume: tempAppoinObj.use_num_per_consume || "" | |||
}) | |||
} | |||
} | |||
if (item.key == "Notification") { | |||
if (item.data != '') { | |||
tempObj.curLsit = JSON.parse(item.data) | |||
@@ -896,7 +907,7 @@ Page({ | |||
} | |||
if (item.key == 'Description') { | |||
if (item.key == 'Description' && item.isRequired) { | |||
tempObj.Description = JSON.parse(item.data) | |||
} | |||
if (item.key == "can_no_use_date") { | |||
@@ -916,6 +927,7 @@ Page({ | |||
tt.setStorageSync('mallTenantId', mallTenantId) | |||
} | |||
}).catch(err => { | |||
console.log(err, 'err'); | |||
tt.showToast({ | |||
title: err.message, | |||
icon: 'none', | |||
@@ -150,26 +150,30 @@ | |||
<view class="Hchild">• {{soldStartTime}}至{{soldEndTime}}</view> | |||
</view> | |||
<view tt:if="{{data.type != 69}}" class="timeText">可用时间</view> | |||
<view tt:if="{{data.type != 69}}" class="Hchild">• 商家营业时间内到店使用</view> | |||
<view class="timeText">可用时间</view> | |||
<view class="Hchild">• 商家营业时间内使用</view> | |||
<view class="Hchild" tt:if="{{data.can_no_use_date.weekend}}">• 周末不支持使用</view> | |||
<view class="Hchild" tt:if="{{data.can_no_use_date.HolidaysFlag}}">• 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用 | |||
</view> | |||
<view class="timeText">购买限制</view> | |||
<view class="Hchild">• 每个用户限购{{data.useLimitQuantity}}单</view> | |||
<view tt:if="{{ order.useLimitQuantity }}" class="timeText">购买限制</view> | |||
<view tt:if="{{ order.useLimitQuantity }}" class="Hchild">• 每个用户限购{{order.useLimitQuantity}}单</view> | |||
<view tt:if="{{ use_num_per_consume }}" class="timeText">使用限制</view> | |||
<view tt:if="{{ use_num_per_consume }}" class="Hchild">• 每个用户仅可用{{use_num_per_consume}}张</view> | |||
<view class="timeText">预约消费</view> | |||
<view class="Hchild" tt:if="{{!data.subscribeSing}}">• 无需预约,高峰时段可能等位</view> | |||
<view class="Hchild" tt:if="{{!data.subscribeSing}}">• 无需预约</view> | |||
<view class="Hchild" tt:if="{{data.subscribeSing}}">• {{data.subscribeSing}}</view> | |||
<view class="timeText" tt:if="{{data.rec_person_num_max}}">适用人数</view> | |||
<view class="Hchild" tt:if="{{data.rec_person_num_max}}">• 该团购劵最多{{data.rec_person_num_max}}人使用</view> | |||
<view class="Hchild" tt:if="{{data.rec_person_num_max}}">• 该优惠劵最多{{data.rec_person_num_max}}人使用</view> | |||
<view class="timeText">温馨提示</view> | |||
<view class="Hchild">• 团购券不支持配送或外卖</view> | |||
<view class="Hchild" tt:if="{{data.pack}}">• 该团购商品{{data.pack=='false'?'不支持':'支持'}}打包</view> | |||
<view tt:if="{{ data.pack || data.besides || data.superimposed_discounts || data.private_room }}" | |||
class="timeText">温馨提示</view> | |||
<!-- <view class="Hchild">• 该优惠券不支持配送或外卖</view> --> | |||
<view class="Hchild" tt:if="{{data.pack}}">• 该优惠商品{{data.pack=='false'?'不支持':'支持'}}打包</view> | |||
<view class="Hchild" tt:if="{{data.besides}}">• {{data.besides=="false"?'不可以':'可以'}}外带餐食</view> | |||
<view class="Hchild" tt:if="{{data.superimposed_discounts}}">• | |||
@@ -6,14 +6,14 @@ const util = require("../../../utils/util"); | |||
const imgurl = require("../../../utils/imgurl"); | |||
Page({ | |||
data: { | |||
couponIds:"", | |||
couponChannelId:"", | |||
showPage:false, | |||
data:{}, | |||
spuIdObj:{}, | |||
priceAndStockObj:{}, | |||
validStartDate:"", | |||
validEndDate:"", | |||
couponIds: "", | |||
couponChannelId: "", | |||
showPage: false, | |||
data: {}, | |||
spuIdObj: {}, | |||
priceAndStockObj: {}, | |||
validStartDate: "", | |||
validEndDate: "", | |||
}, | |||
onLoad: function (options) { | |||
@@ -37,161 +37,163 @@ Page({ | |||
}; | |||
Http.get(parmer).then(res => { | |||
that.setData({ | |||
couponId: res.data.couponId | |||
}) | |||
/** | |||
* activityStatus==0 活动未开始 | |||
* activityStatus==1 活动已开始 | |||
* flag == endclock 说明倒计时已经结束 | |||
*/ | |||
if (res.data.endTime && res.data.beginTime) { | |||
that.setData({ | |||
couponId: res.data.couponId | |||
begin_time: res.data.beginTime, | |||
end_time: res.data.endTime, | |||
activityStatus: res.data.actStatus ? res.data.actStatus : '' | |||
}) | |||
/** | |||
* activityStatus==0 活动未开始 | |||
* activityStatus==1 活动已开始 | |||
* flag == endclock 说明倒计时已经结束 | |||
*/ | |||
if (res.data.endTime && res.data.beginTime) { | |||
that.setData({ | |||
begin_time: res.data.beginTime, | |||
end_time: res.data.endTime, | |||
activityStatus: res.data.actStatus ? res.data.actStatus : '' | |||
}) | |||
if (res.data.actStatus == 0 && flag != 'endclock') { | |||
that.countdown(res.data.beginTime); | |||
} else if (res.data.actStatus != 0 && flag != 'endclock') { | |||
that.countdown(res.data.endTime); | |||
if (res.data.actStatus == 0 && flag != 'endclock') { | |||
that.countdown(res.data.beginTime); | |||
} else if (res.data.actStatus != 0 && flag != 'endclock') { | |||
that.countdown(res.data.endTime); | |||
} else { | |||
clearInterval(that.data.setInterval) | |||
} | |||
if (res.data.actStatus == 0) { | |||
var beginTime = util.formatTime(res.data.beginTime, "yyyy-MM-dd hh:mm:ss"); | |||
if (util.timechuo(beginTime).indexOf('-') == 0) { | |||
that.setData({ | |||
beginTime: "活动已结束", | |||
}); | |||
} else { | |||
clearInterval(that.data.setInterval) | |||
that.setData({ | |||
beginTime: util.timechuo(beginTime) | |||
}); | |||
} | |||
if (res.data.actStatus == 0) { | |||
var beginTime = util.formatTime(res.data.beginTime, "yyyy-MM-dd hh:mm:ss"); | |||
if (util.timechuo(beginTime).indexOf('-') == 0) { | |||
that.setData({ | |||
beginTime: "活动已结束", | |||
}); | |||
} else { | |||
that.setData({ | |||
beginTime: util.timechuo(beginTime) | |||
}); | |||
} | |||
} else { | |||
var endTime = util.formatTime(res.data.endTime, "yyyy-MM-dd hh:mm:ss"); | |||
if (util.timechuo(endTime).indexOf('-') == 0) { | |||
that.setData({ | |||
endtime: "活动已结束", | |||
}); | |||
} else { | |||
var endTime = util.formatTime(res.data.endTime, "yyyy-MM-dd hh:mm:ss"); | |||
if (util.timechuo(endTime).indexOf('-') == 0) { | |||
that.setData({ | |||
endtime: "活动已结束", | |||
}); | |||
} else { | |||
that.setData({ | |||
endtime: util.timechuo(endTime) | |||
}); | |||
} | |||
that.setData({ | |||
endtime: util.timechuo(endTime) | |||
}); | |||
} | |||
} | |||
tt.hideLoading(); | |||
} | |||
tt.hideLoading(); | |||
that.setData({ | |||
data: res.data, | |||
}); | |||
if (res.data.type == 10) { | |||
that.setData({ | |||
salePriceStr: res.data.salePriceStr, | |||
pickEndDate: util.formatTime(res.data.pickEndDate, "yyyy-MM-dd"), | |||
pickStartDate: util.formatTime(res.data.pickStartDate, "yyyy-MM-dd"), | |||
priceStr: res.data.priceStr, | |||
tailPriceStr: res.data.tailPriceStr, | |||
origPriceStr: res.data.origPriceStr | |||
}) | |||
} | |||
if (res.data.validType == 1) { | |||
that.setData({ | |||
data: res.data, | |||
soldStartTime: util.timestampToTime(res.data.soldStartTime, "YYYY-MM-DD") || null, | |||
soldEndTime: util.timestampToTime(res.data.soldEndTime, "YYYY-MM-DD") || null, | |||
validStartDate: util.timestampToTime(res.data.validStartDate, "YYYY-MM-DD"), | |||
validEndDate: util.timestampToTime(res.data.validEndDate, "YYYY-MM-DD"), | |||
pickStartDate: util.formatTime(res.data.pickStartDate, "yyyy-MM-dd"), | |||
pickEndDate: util.formatTime(res.data.pickEndDate, "yyyy-MM-dd"), | |||
}); | |||
if (res.data.type == 10) { | |||
} else { | |||
if (res.data.validDays) { | |||
that.setData({ | |||
salePriceStr: res.data.salePriceStr, | |||
pickEndDate: util.formatTime(res.data.pickEndDate, "yyyy-MM-dd"), | |||
pickStartDate: util.formatTime(res.data.pickStartDate, "yyyy-MM-dd"), | |||
priceStr: res.data.priceStr, | |||
tailPriceStr: res.data.tailPriceStr, | |||
origPriceStr: res.data.origPriceStr | |||
}) | |||
} | |||
if (res.data.validType == 1) { | |||
that.setData({ | |||
validStartDate: util.formatTime(res.data.validStartDate, "yyyy-MM-dd"), | |||
validEndDate: util.formatTime(res.data.validEndDate, "yyyy-MM-dd"), | |||
pickStartDate: util.formatTime(res.data.pickStartDate, "yyyy-MM-dd"), | |||
pickEndDate: util.formatTime(res.data.pickEndDate, "yyyy-MM-dd"), | |||
validDays: res.data.validDays | |||
}); | |||
} else { | |||
if (res.data.validDays) { | |||
that.setData({ | |||
validDays: res.data.validDays | |||
}); | |||
} | |||
} | |||
} | |||
if (res.data.itemGroup) { | |||
let tempObj = this.data.data | |||
tempObj.itemGroup = JSON.parse(tempObj.itemGroup) | |||
this.setData({ | |||
data: tempObj | |||
}) | |||
console.log(this.data.data, "data"); | |||
} | |||
if (res.data.itemGroup) { | |||
let tempObj = this.data.data | |||
tempObj.itemGroup = JSON.parse(tempObj.itemGroup) | |||
this.setData({ | |||
data: tempObj | |||
}) | |||
console.log(this.data.data, "data"); | |||
} | |||
if (res.data.productAttrs && res.data.skuAttrs) { | |||
let tempObj = this.data.data | |||
tempObj.productAttrs = JSON.parse(tempObj.productAttrs) | |||
tempObj.skuAttrs = JSON.parse(tempObj.skuAttrs) | |||
tempObj.productAttrs.map(item => { | |||
if (res.data.productAttrs && res.data.skuAttrs) { | |||
let tempObj = this.data.data | |||
tempObj.productAttrs = JSON.parse(tempObj.productAttrs) | |||
tempObj.skuAttrs = JSON.parse(tempObj.skuAttrs) | |||
tempObj.productAttrs.map(item => { | |||
if (item.key == "appointment") { | |||
let tempAppoinObj = JSON.parse(item.data) | |||
if (tempAppoinObj.need_appointment) { | |||
let subscribeSing = ""; | |||
if (tempAppoinObj.ahead_time_type == 1) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_day_num}天致电商家预约` | |||
} else if (tempAppoinObj.ahead_time_type == 2) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_hour_num}小时致电商家预约` | |||
} else if (tempAppoinObj.ahead_time_type == 3) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_minute_num}分钟致电商家预约` | |||
} | |||
tempObj.subscribeSing = subscribeSing | |||
if (item.key == "appointment") { | |||
let tempAppoinObj = JSON.parse(item.data) | |||
if (tempAppoinObj.need_appointment) { | |||
let subscribeSing = ""; | |||
if (tempAppoinObj.ahead_time_type == 1) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_day_num}天预约` | |||
} else if (tempAppoinObj.ahead_time_type == 2) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_hour_num}小时预约` | |||
} else if (tempAppoinObj.ahead_time_type == 3) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_minute_num}分钟预约` | |||
} | |||
tempObj.subscribeSing = subscribeSing | |||
} | |||
if (item.key == "Notification") { | |||
if (item.data != '') { | |||
tempObj.curLsit = JSON.parse(item.data) | |||
} | |||
} | |||
if (item.key == "bring_out_meal") { | |||
tempObj.besides = item.data | |||
} | |||
if (item.key == "free_pack") { | |||
tempObj.pack = item.data | |||
} | |||
} | |||
if (item.key == "superimposed_discounts") { | |||
tempObj.superimposed_discounts = item.data | |||
} | |||
if (item.key == "private_room") { | |||
tempObj.private_room = item.data | |||
} | |||
if (item.key == "rec_person_num_max") { | |||
tempObj.rec_person_num_max = item.data | |||
if (item.key == "Notification") { | |||
if (item.data != '') { | |||
tempObj.curLsit = JSON.parse(item.data) | |||
} | |||
} | |||
if (item.key == "bring_out_meal") { | |||
tempObj.besides = item.data | |||
} | |||
if (item.key == "free_pack") { | |||
tempObj.pack = item.data | |||
} | |||
if (item.key == "superimposed_discounts") { | |||
tempObj.superimposed_discounts = item.data | |||
} | |||
if (item.key == "private_room") { | |||
tempObj.private_room = item.data | |||
} | |||
if (item.key == "rec_person_num_max") { | |||
tempObj.rec_person_num_max = item.data | |||
} | |||
if (item.key == 'Description') { | |||
tempObj.Description = JSON.parse(item.data) | |||
} | |||
if (item.key == "can_no_use_date") { | |||
tempObj.can_no_use_date = JSON.parse(item.data) | |||
} | |||
}) | |||
if (item.key == 'Description' && item.isRequired) { | |||
tempObj.Description = JSON.parse(item.data) | |||
} | |||
if (item.key == "can_no_use_date") { | |||
tempObj.can_no_use_date = JSON.parse(item.data) | |||
} | |||
}) | |||
tempObj.skuAttrs.map(item => { | |||
if (item.key == "commodity") { | |||
if (item.data != '') { | |||
tempObj.itemGroup = JSON.parse(item.data) | |||
} | |||
tempObj.skuAttrs.map(item => { | |||
if (item.key == "commodity") { | |||
if (item.data != '') { | |||
tempObj.itemGroup = JSON.parse(item.data) | |||
} | |||
}) | |||
this.setData({ | |||
data: tempObj | |||
}) | |||
console.log(this.data.data, "data"); | |||
} | |||
}).catch(err => { | |||
tt.showToast({ | |||
title: err.message, | |||
icon: 'none', | |||
duration: 2000, | |||
mask: false | |||
}); | |||
}) | |||
} | |||
}) | |||
this.setData({ | |||
data: tempObj | |||
}) | |||
console.log(this.data.data, "data"); | |||
} | |||
}).catch(err => { | |||
tt.showToast({ | |||
title: err.message, | |||
icon: 'none', | |||
duration: 2000, | |||
mask: false | |||
}); | |||
}) | |||
}, | |||
}) |
@@ -1,39 +1,48 @@ | |||
<view class='notes'> | |||
<view class="notesH">购买须知</view> | |||
<view class="timeText">有效期</view> | |||
<view class="Hchild">• {{validStartDate}}至{{validEndDate}}</view> | |||
<view class="timeText">可用时间</view> | |||
<view class="Hchild">• 商家营业时间内到店使用</view> | |||
<view class="Hchild" tt:if="{{data.can_no_use_date.weekend}}">• 周末不支持使用</view> | |||
<view class="Hchild" tt:if="{{data.can_no_use_date.HolidaysFlag}}">• 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用</view> | |||
<view class="timeText">购买限制</view> | |||
<view class="Hchild">• 每个用户限购{{data.useLimitQuantity}}单</view> | |||
<view class="timeText">预约消费</view> | |||
<!-- <view class="Hchild">• 无需预约,高峰时段可能等位</view> --> | |||
<view class="Hchild" tt:if="{{!data.subscribeSing}}">• 无需预约,高峰时段可能等位</view> | |||
<view class="Hchild" tt:if="{{data.subscribeSing}}">• {{data.subscribeSing}}</view> | |||
<view class="timeText" tt:if="{{data.rec_person_num_max}}">适用人数</view> | |||
<view class="Hchild" tt:if="{{data.rec_person_num_max}}">• 该团购劵最多{{data.rec_person_num_max}}人使用</view> | |||
<view class="timeText">温馨提示</view> | |||
<view class="Hchild">• 团购券不支持配送或外卖</view> | |||
<view class="Hchild" tt:if="{{data.pack}}">• 该团购商品{{data.pack=='false'?'不支持':'支持'}}打包</view> | |||
<view class="Hchild" tt:if="{{data.besides}}">• {{data.besides=="false"?'不可以':'可以'}}外带餐食</view> | |||
<view class="Hchild" tt:if="{{data.superimposed_discounts}}">• {{data.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠</view> | |||
<view class="Hchild" tt:if="{{data.private_room}}">• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间</view> | |||
<view class="notesH">使用规则</view> | |||
<text tt:if="{{curHtml==''}}" class="notesText">{{data.remark}}</text> | |||
<view tt:if="{{curHtml!=''}}"> | |||
<rich-text nodes="{{curHtml}}"></rich-text> | |||
</view> | |||
<view tt:if="{{data.curLsit}}" tt:for="{{data.curLsit}}" tt:key="{{index}}"> | |||
<view class="timeText" tt:if="{{item.title!=''}}">{{item.title}}</view> | |||
<text class="Hchild">{{item.content}}</text> | |||
</view> | |||
</view> | |||
<view class="notesH">购买须知</view> | |||
<view class="timeText">使用期</view> | |||
<view class="Hchild">• {{validStartDate}}至{{validEndDate}}</view> | |||
<view tt:if="{{soldStartTime && soldEndTime}}"> | |||
<view class="timeText">售卖期</view> | |||
<view class="Hchild">• {{soldStartTime}}至{{soldEndTime}}</view> | |||
</view> | |||
<view class="timeText">可用时间</view> | |||
<view class="Hchild">• 商家营业时间内使用</view> | |||
<view class="Hchild" tt:if="{{data.can_no_use_date.weekend}}">• 周末不支持使用</view> | |||
<view class="Hchild" tt:if="{{data.can_no_use_date.HolidaysFlag}}">• 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用</view> | |||
<view tt:if="{{ order.useLimitQuantity }}" class="timeText">购买限制</view> | |||
<view tt:if="{{ order.useLimitQuantity }}" class="Hchild">• 每个用户限购{{order.useLimitQuantity}}单</view> | |||
<view class="timeText">预约消费</view> | |||
<!-- <view class="Hchild">• 无需预约,高峰时段可能等位</view> --> | |||
<view class="Hchild" tt:if="{{!data.subscribeSing}}">• 无需预约</view> | |||
<view class="Hchild" tt:if="{{data.subscribeSing}}">• {{data.subscribeSing}}</view> | |||
<view class="timeText" tt:if="{{data.rec_person_num_max}}">适用人数</view> | |||
<view class="Hchild" tt:if="{{data.rec_person_num_max}}">• 该优惠劵最多{{data.rec_person_num_max}}人使用</view> | |||
<view tt:if="{{ data.pack || data.besides || data.superimposed_discounts || data.private_room }}" class="timeText"> | |||
温馨提示</view> | |||
<!-- <view class="Hchild">• 该优惠券不支持配送或外卖</view> --> | |||
<view class="Hchild" tt:if="{{data.pack}}">• 该优惠商品{{data.pack=='false'?'不支持':'支持'}}打包</view> | |||
<view class="Hchild" tt:if="{{data.besides}}">• {{data.besides=="false"?'不可以':'可以'}}外带餐食</view> | |||
<view class="Hchild" tt:if="{{data.superimposed_discounts}}">• | |||
{{data.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠</view> | |||
<view class="Hchild" tt:if="{{data.private_room}}">• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间</view> | |||
<view class="notesH">使用规则</view> | |||
<text tt:if="{{curHtml==''}}" class="notesText">{{data.remark}}</text> | |||
<view tt:if="{{curHtml!=''}}"> | |||
<rich-text nodes="{{curHtml}}"></rich-text> | |||
</view> | |||
<view tt:if="{{data.curLsit}}" tt:for="{{data.curLsit}}" tt:key="{{index}}"> | |||
<view class="timeText" tt:if="{{item.title!=''}}">{{item.title}}</view> | |||
<text class="Hchild">{{item.content}}</text> | |||
</view> | |||
</view> |
@@ -65,7 +65,8 @@ Page({ | |||
appointStart: "", | |||
appointEnd: "", | |||
appointmentId: "", | |||
appointmentStatus: "" | |||
appointmentStatus: "", | |||
use_num_per_consume: "" | |||
}, | |||
imCallback(e) { | |||
@@ -207,6 +208,7 @@ Page({ | |||
if (res.data) { | |||
const appointStart = util.timestampToTime(res.data.startDate, 'YYYY-MM-DD hh:mm:ss') | |||
const appointEnd = util.timestampToTime(res.data.endDate, 'hh:mm:ss') | |||
console.log(appointStart, appointEnd); | |||
const appointmentId = res.data.id | |||
const appointmentStatus = res.data.status | |||
that.setData({ | |||
@@ -462,15 +464,23 @@ Page({ | |||
if (tempAppoinObj.need_appointment) { | |||
let subscribeSing = ""; | |||
if (tempAppoinObj.ahead_time_type == 1) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_day_num}天致电商家预约` | |||
subscribeSing = `需提前${tempAppoinObj.ahead_day_num}天预约` | |||
} else if (tempAppoinObj.ahead_time_type == 2) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_hour_num}小时致电商家预约` | |||
subscribeSing = `需提前${tempAppoinObj.ahead_hour_num}小时预约` | |||
} else if (tempAppoinObj.ahead_time_type == 3) { | |||
subscribeSing = `需提前${tempAppoinObj.ahead_minute_num}分钟致电商家预约` | |||
subscribeSing = `需提前${tempAppoinObj.ahead_minute_num}分钟预约` | |||
} | |||
tempData.subscribeSing = subscribeSing | |||
} | |||
} | |||
if (item.key == "limit_use_rule") { | |||
if (item.data != '') { | |||
let tempAppoinObj = JSON.parse(item.data) | |||
that.setData({ | |||
use_num_per_consume: tempAppoinObj.use_num_per_consume || "" | |||
}) | |||
} | |||
} | |||
if (item.key == "Notification") { | |||
@@ -496,7 +506,7 @@ Page({ | |||
} | |||
if (item.key == 'Description') { | |||
if (item.key == 'Description' && item.isRequired) { | |||
tempData.Description = JSON.parse(item.data) | |||
} | |||
if (item.key == "can_no_use_date") { | |||
@@ -128,6 +128,18 @@ | |||
tt:if="{{ isAppointment && ( appointmentStatus == 1 || appointmentStatus == 2 || appointmentStatus == 3 ) }}" | |||
class="fr" style="color: #d4a971;">预约已取消 | |||
</text> | |||
<text tt:if="{{ isAppointment && appointmentStatus == 4 }}" class="fr" style="color: #d4a971;">预约派单中 | |||
</text> | |||
<text tt:if="{{ isAppointment && appointmentStatus == 5 }}" class="fr" style="color: #d4a971;">预约已派单 | |||
</text> | |||
<text tt:if="{{ isAppointment && appointmentStatus == 6 }}" class="fr" style="color: #d4a971;">预约派单中 | |||
</text> | |||
<text tt:if="{{ isAppointment && appointmentStatus == 7 }}" class="fr" style="color: #d4a971;">预约派单中 | |||
</text> | |||
<text tt:if="{{ isAppointment && appointmentStatus == 8 }}" class="fr" style="color: #d4a971;">服务已完成 | |||
</text> | |||
<text tt:if="{{ isAppointment && appointmentStatus == 9 }}" class="fr" style="color: #d4a971;">已评价 | |||
</text> | |||
</view> | |||
</view> | |||
@@ -222,27 +234,38 @@ | |||
购买须知 | |||
</view> | |||
<view class="timeText">有效期</view> | |||
<view class="timeText">使用期</view> | |||
<view class="Hchild">• {{order.validStartDate}}至{{order.validEndDate}}</view> | |||
<view tt:if="{{order.soldStartTime && order.soldEndTime}}"> | |||
<view class="timeText">售卖期</view> | |||
<view class="Hchild">• {{order.soldStartTime}}至{{order.soldEndTime}}</view> | |||
</view> | |||
<view class="timeText">可用时间</view> | |||
<view class="Hchild">• 商家营业时间内到店使用</view> | |||
<view class="Hchild">• 商家营业时间内使用</view> | |||
<view class="Hchild" tt:if="{{order.can_no_use_date.weekend}}">• 周末不支持使用</view> | |||
<view class="Hchild" tt:if="{{order.can_no_use_date.HolidaysFlag}}">• 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用 | |||
</view> | |||
<view class="timeText">购买限制</view> | |||
<view class="Hchild">• 每个用户限购{{order.useLimitQuantity}}单</view> | |||
<view tt:if="{{ order.useLimitQuantity }}" class="timeText">购买限制</view> | |||
<view tt:if="{{ order.useLimitQuantity }}" class="Hchild">• 每个用户限购{{order.useLimitQuantity}}单</view> | |||
<view tt:if="{{ use_num_per_consume }}" class="timeText">使用限制</view> | |||
<view tt:if="{{ use_num_per_consume }}" class="Hchild">• 每个用户仅可用{{use_num_per_consume}}张</view> | |||
<view class="timeText">预约消费</view> | |||
<view class="Hchild" tt:if="{{!order.subscribeSing}}">• 无需预约,高峰时段可能等位</view> | |||
<view class="Hchild" tt:if="{{!order.subscribeSing}}">• 无需预约</view> | |||
<view class="Hchild" tt:if="{{order.subscribeSing}}">• {{order.subscribeSing}}</view> | |||
<view class="timeText" tt:if="{{order.rec_person_num_max}}">适用人数</view> | |||
<view class="Hchild" tt:if="{{order.rec_person_num_max}}">• 该团购劵最多{{order.rec_person_num_max}}人使用</view> | |||
<view class="Hchild" tt:if="{{order.rec_person_num_max}}">• 该优惠劵最多{{order.rec_person_num_max}}人使用</view> | |||
<view tt:if="{{ order.pack || order.besides || order.superimposed_discounts || | |||
order.private_room }}" class="timeText"> | |||
温馨提示</view> | |||
<view class="timeText">温馨提示</view> | |||
<view class="Hchild">• 团购券不支持配送或外卖</view> | |||
<view class="Hchild" tt:if="{{order.pack}}">• 该团购商品{{order.pack=='false'?'不支持':'支持'}}打包</view> | |||
<view class="Hchild" tt:if="{{order.pack}}">• 该优惠商品{{order.pack=='false'?'不支持':'支持'}}打包</view> | |||
<view class="Hchild" tt:if="{{order.besides}}">• {{order.besides=="false"?'不可以':'可以'}}外带餐食</view> | |||
<view class="Hchild" tt:if="{{order.superimposed_discounts}}">• | |||
@@ -308,11 +331,11 @@ | |||
<view class="Hchild" tt:if="{{order.subscribeSing}}">• {{order.subscribeSing}}</view> | |||
<view class="timeText" tt:if="{{order.rec_person_num_max}}">适用人数</view> | |||
<view class="Hchild" tt:if="{{order.rec_person_num_max}}">• 该团购劵最多{{order.rec_person_num_max}}人使用</view> | |||
<view class="Hchild" tt:if="{{order.rec_person_num_max}}">• 该优惠劵最多{{order.rec_person_num_max}}人使用</view> | |||
<view class="timeText">温馨提示</view> | |||
<view class="Hchild">• 团购券不支持配送或外卖</view> | |||
<view class="Hchild" tt:if="{{order.pack}}">• 该团购商品{{order.pack=='false'?'不支持':'支持'}}打包</view> | |||
<view class="Hchild">• 该优惠券不支持配送或外卖</view> | |||
<view class="Hchild" tt:if="{{order.pack}}">• 该优惠商品{{order.pack=='false'?'不支持':'支持'}}打包</view> | |||
<view class="Hchild" tt:if="{{order.besides}}">• {{order.besides=="false"?'不可以':'可以'}}外带餐食</view> | |||
<view class="Hchild" tt:if="{{order.superimposed_discounts}}">• | |||
@@ -834,6 +834,7 @@ radio { | |||
background: #fff; | |||
overflow: hidden; | |||
padding-bottom: 10rpx; | |||
margin-bottom: 20rpx; | |||
} | |||
.groupTitleBox { | |||
@@ -683,7 +683,7 @@ Page({ | |||
} | |||
if (item.key == 'Description') { | |||
if (item.key == 'Description' && item.isRequired) { | |||
tempObj.Description = JSON.parse(item.data) | |||
} | |||
if (item.key == "can_no_use_date") { | |||