update:新增店铺开业筹备预订单,以及正常休息的店铺不在营业时间可以下第二天之后的预订单

This commit is contained in:
lihaoyuan 2025-11-15 10:13:28 +08:00
parent f716e5641e
commit 27d2d0b231
3 changed files with 50 additions and 17 deletions

View File

@ -4,7 +4,7 @@
<view @tap="Modal" :class="{ mask: model }"></view> <view @tap="Modal" :class="{ mask: model }"></view>
<!-- 弹窗主体 --> <!-- 弹窗主体 -->
<view <view
:style="{ height: barHidth + 'rpx' }"
class="active" class="active"
:class="{ add: model }" :class="{ add: model }"
> >
@ -214,6 +214,7 @@ export default {
} }
.add { .add {
height: 380px;
transform: translateY(0); transform: translateY(0);
} }

View File

@ -136,8 +136,9 @@
<view class="distribution" v-if="(true)" style="display: flex;flex-direction: column;"> <view class="distribution" v-if="(true)" style="display: flex;flex-direction: column;">
<view class="check" style="width: 100%;"> <view class="check" style="width: 100%;">
<view style="width:100%;height: 40px;display: flex; border: 1px gray solid;border-radius: 5px;padding-left: 6px;margin: 3px 0px;align-items: center;" <view style="width:100%;height: 40px;display: flex; border: 1px gray solid;border-radius: 5px;padding-left: 6px;margin: 3px 0px;align-items: center;"
:class="{ active: activeTab === 'immediate' }" v-if="!shouldHideImmediateDelivery"
@click="setActiveTab('immediate')"> :class="{ active: activeTab === 'immediate' }"
@click="setActiveTab('immediate')">
<text style="width: 30%;">立即配送</text> <text style="width: 30%;">立即配送</text>
<text style="width: 70%;">{{ immediateDeliveryTime }}</text> <text style="width: 70%;">{{ immediateDeliveryTime }}</text>
</view> </view>
@ -810,6 +811,7 @@ export default {
items: [], items: [],
UserMembership: {}, UserMembership: {},
}, },
store_ids_time:0,
selectedTime:"", selectedTime:"",
dateTitle:"", dateTitle:"",
activeTab: "immediate", activeTab: "immediate",
@ -823,7 +825,7 @@ export default {
paymentData: {}, paymentData: {},
integral: "", integral: "",
discount: 0, discount: 0,
immediateDeliveryTime:"", immediateDeliveryTime:"",
disbursements: "", disbursements: "",
IsUseCoupon: 1, IsUseCoupon: 1,
canSelfpick: 0, // canSelfpick: 0, //
@ -908,15 +910,24 @@ export default {
loginPopup, loginPopup,
deliveryTimeOp deliveryTimeOp
}, },
computed: mapState([ computed: {
"Config", ...mapState([
"StateCode", "Config",
"notice", "StateCode",
"plantformInfo", "notice",
"shopInfo", "plantformInfo",
"userInfo", "shopInfo",
"hasLogin", "userInfo",
]), "hasLogin",
]),
shouldHideImmediateDelivery() {
const forbidStates = [3, 12];
// itemsstore_biz_state12
return this.submitinfo.items.some(store_item =>
forbidStates.includes(store_item.store_biz_state)
);
}
},
onLoad: async function (options) { onLoad: async function (options) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.__("订单提交"), title: this.__("订单提交"),
@ -1074,6 +1085,10 @@ export default {
}); });
}, },
setActiveTab(tab) { setActiveTab(tab) {
//
if (tab === 'immediate' && this.shouldHideImmediateDelivery) {
return;
}
this.activeTab = tab; this.activeTab = tab;
if (tab === 'immediate') { if (tab === 'immediate') {
this.selectedTime = ""; this.selectedTime = "";
@ -1241,7 +1256,7 @@ export default {
url: this.Config.URL.cart.getTimeSlots, // url: this.Config.URL.cart.getTimeSlots, //
method: 'GET', method: 'GET',
data: { data: {
store_ids: 80 store_ids: this.store_ids_time||''
} }
}); });
@ -1375,6 +1390,12 @@ export default {
data: params, data: params,
success: function (data, status, msg, code) { success: function (data, status, msg, code) {
if (200 == status) { if (200 == status) {
// ID
const storeIds = data.items.map(store => store.store_id).join(',');
that.setData({ store_ids_time: storeIds });
//
that.getTimeSlots();
for (var i = 0; i <= data.transportIds.length; i++) { for (var i = 0; i <= data.transportIds.length; i++) {
if (data.transportIds[i] == 10) { if (data.transportIds[i] == 10) {
that.delivery = true; that.delivery = true;
@ -1437,7 +1458,13 @@ export default {
that.setData({ that.setData({
order_amount: data.orderSelMoneyAmount, order_amount: data.orderSelMoneyAmount,
}); });
//
if (that.shouldHideImmediateDelivery) {
that.setData({
activeTab: 'scheduled',
booking_state: 2
});
}
// //
if (ud_id > 0) { if (ud_id > 0) {
//that.checkDelivery(ud_id); //that.checkDelivery(ud_id);
@ -2320,6 +2347,11 @@ submitorder: function (e) {
}, },
mounted() { mounted() {
this.calculateImmediateDeliveryTime(); this.calculateImmediateDeliveryTime();
//
if (this.shouldHideImmediateDelivery) {
this.activeTab = 'scheduled';
this.booking_state = 2;
}
}, },
}; };
</script> </script>

View File

@ -878,7 +878,7 @@
<view class="is-rest" v-if="store_info.store_biz_state == 2"></view> <view class="is-rest" v-if="store_info.store_biz_state == 2"></view>
<view class="m-footer-btn bottom-safearea" :class="ProductInfo.is_virtual ? 'm-fg-btn' : ''" v-if="(ProductInfo.activityType!='GROUPBOOKING') && store_info.store_biz_state == 1"> <view class="m-footer-btn bottom-safearea" :class="ProductInfo.is_virtual ? 'm-fg-btn' : ''" v-if="(ProductInfo.activityType!='GROUPBOOKING') && store_info.store_biz_state != 2">
<block v-if="(ProductInfo.is_virtual)"> <block v-if="(ProductInfo.is_virtual)">
<view class="m-footer-btn-list"> <view class="m-footer-btn-list">
@ -1028,7 +1028,7 @@
</block> </block>
</view> </view>
<view class="m-footer-btn m-fg-btn bottom-safearea" v-if="(ProductInfo.activityType=='GROUPBOOKING') && store_info.store_biz_state == 1"> <view class="m-footer-btn m-fg-btn bottom-safearea" v-if="(ProductInfo.activityType=='GROUPBOOKING')">
<view class="m-footer-btn-list"> <view class="m-footer-btn-list">
<view class="m-footer-btn-item" style="width: 50%;" :data-id="(proId)" :data-name="(store_info.store_name)" :data-keyword="(ProductInfo.keyWord)" :data-appid="(AppId)" :data-appurl="(chatUrl)" v-if="(Config.MULTISHOP_ENABLE && !if_saas_status && !isStoreFlag)"> <view class="m-footer-btn-item" style="width: 50%;" :data-id="(proId)" :data-name="(store_info.store_name)" :data-keyword="(ProductInfo.keyWord)" :data-appid="(AppId)" :data-appurl="(chatUrl)" v-if="(Config.MULTISHOP_ENABLE && !if_saas_status && !isStoreFlag)">
<navigator redirect="true" :url="'/pagesub/index/store?store_id=' + (ProductInfo.store_id)" class="u-go-home1"> <navigator redirect="true" :url="'/pagesub/index/store?store_id=' + (ProductInfo.store_id)" class="u-go-home1">