订单相关修改同步test

This commit is contained in:
GaoHao
2024-10-16 09:05:52 +08:00
parent 3288d1ed9b
commit 3ad4d7af68
16 changed files with 363 additions and 4678 deletions

View File

@@ -208,10 +208,10 @@
<!-- 购物车 -->
<shoppingCart ref="shoppingCart" :shopId="shopId" :tableCode="tableCode" :cartLists_count="cartLists_count" :cartLists="cartLists" :showCart="showCart" @addCart="addCart" @close="close"></shoppingCart>
<shoppingCart v-if="tableCode&&shopId" ref="shoppingCart" :shopId="shopId" :tableCode="tableCode" :cartLists_count="cartLists_count" :cartLists="cartLists" :showCart="showCart" @addCart="addCart" @close="close"></shoppingCart>
<!-- 购物车结算 -->
<shoppingCartBilling ref="shoppingCartBilling" :orderdetailFlag="orderdetailFlag" :cartListsdatashow="cartListsdatashow" :shopId="shopId" :tableCode="tableCode" :dinersNum="dinersNum" :storeInfo="shopInfo.storeInfo" :cartLists_count="cartLists_count" :cartLists="cartLists" :showCart="showCart" @isOpen="isOpen"></shoppingCartBilling>
<shoppingCartBilling v-if="tableCode&&shopId" ref="shoppingCartBilling" :cartListsdatashow="cartListsdatashow" :shopId="shopId" :tableCode="tableCode" :storeInfo="shopInfo.storeInfo" :cartLists_count="cartLists_count" :cartLists="cartLists" :showCart="showCart" @isOpen="isOpen"></shoppingCartBilling>
<view class="placedOrderTip" @click="placedOrder" v-if="tableCode&&shopInfo.shopTableInfo&&shopInfo.shopTableInfo.orderId&&shopInfo.storeInfo.registerType == 'restaurant'"><u-avatar :src="src" shape="circle"></u-avatar><view style="margin-left: 8rpx;">已下单菜品</view></view>
@@ -372,9 +372,8 @@
scrollxleft: true,
forceUpdate: false,
shopExtend: null,
shopId: null,
tableCode: null,
dinersNum: null,
shopId: "",
tableCode: "",
}
},
onPageScroll(e) {
@@ -414,10 +413,8 @@
if ( e.tableCode ) {
this.tableCode = e.tableCode
}
if ( e.dinersNum ) {
this.dinersNum = e.dinersNum;
}
},
onUnload() {
if (this.socketTicket) {
this.socketTicket.Close()
@@ -434,13 +431,21 @@
},
async onShow() {
let _this = this;
this.orderdetailFlag = true;
uni.pageScrollTo({
scrollTop: 0,
duration: 0
});
_this.getLocation()
this.$nextTick(() => {
uni.pageScrollTo({
scrollTop: 0,
duration: 0
});
if ( this.shopId ) {
this.productqueryProduct() //list 数据
this.getShopUserInfo() //list 数据
this.handlemessage() //监听websocket返回
this.getShopExtend();
} else {
this.getLocation()
}
});
},
methods: {
/**
@@ -586,7 +591,7 @@
searchStatus (e) {
if ( e == "searchClick" ) {
uni.navigateTo({
url: `/pages/order_food/order_food_search?tableCode=${this.tableCode}&dinersNum=${this.dinersNum}&shopId=${this.shopId}`
url: `/pages/order_food/order_food_search?tableCode=${this.tableCode}&shopId=${this.shopId}`
});
}
},