订单相关修改同步test
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop-item-remark" v-if="item.productId!=-999">
|
||||
<!-- <view class="shop-item-remark" v-if="item.productId!=-999">
|
||||
<view class="label">备注</view>
|
||||
<u--input
|
||||
placeholder="商品备注(选填)"
|
||||
@@ -48,7 +48,7 @@
|
||||
v-model="item.note"
|
||||
@blur="productBlur(item)"
|
||||
></u--input>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -60,31 +60,53 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
props:{
|
||||
cartLists:{
|
||||
type: Object
|
||||
},
|
||||
cartLists_count: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
showCart:{
|
||||
type: Boolean
|
||||
},
|
||||
shopId:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
tableCode:{
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
props:{
|
||||
cartLists:{
|
||||
type: Object
|
||||
},
|
||||
cartLists_count: {
|
||||
type: String
|
||||
},
|
||||
showCart:{
|
||||
type: Boolean
|
||||
|
||||
watch:{
|
||||
tableCode:{
|
||||
immediate: true,
|
||||
handler (newVal) {
|
||||
console.log(newVal)
|
||||
console.log("tableCode1==",this.tableCode)
|
||||
}
|
||||
},
|
||||
shopId:{
|
||||
type: String
|
||||
immediate: true,
|
||||
handler (newVal) {
|
||||
console.log(newVal)
|
||||
console.log("shopId1==",this.shopId)
|
||||
}
|
||||
},
|
||||
tableCode:{
|
||||
type: String
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
console.log("tableCode3==",this.tableCode)
|
||||
console.log("shopId3==",this.shopId)
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -101,6 +123,8 @@
|
||||
* @param {Object} a
|
||||
*/
|
||||
async cartListadd(item, index, c) {
|
||||
console.log(this.shopId)
|
||||
console.log(this.tableCode)
|
||||
try {
|
||||
if ( c == "+" && item.isVip == 1){
|
||||
return;
|
||||
@@ -116,6 +140,7 @@
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
"tableId": this.tableCode,
|
||||
}
|
||||
|
||||
this.$emit("addCart",params)
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
}
|
||||
},
|
||||
props:{
|
||||
|
||||
cartListsdatashow: {
|
||||
type: Boolean
|
||||
},
|
||||
@@ -49,15 +48,24 @@
|
||||
shopId:{
|
||||
type: String
|
||||
},
|
||||
dinersNum:{
|
||||
type: String
|
||||
},
|
||||
tableCode:{
|
||||
type: String
|
||||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
console.log("tableCode==",this.tableCode)
|
||||
console.log("shopId==",this.shopId)
|
||||
},
|
||||
watch:{
|
||||
tableCode(newVal, oldValue) {
|
||||
console.log(newVal)
|
||||
console.log("tableCode2==",this.tableCode)
|
||||
},
|
||||
shopId(newVal, oldValue) {
|
||||
console.log(newVal)
|
||||
console.log("shopId2==",this.tableCode)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -80,8 +88,9 @@
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pagesOrder/confirm_order/index?storeInfo=${encodeURIComponent(JSON.stringify(this.storeInfo))}&cartLists=${JSON.stringify(this.cartLists)}&tableCode=${this.tableCode||''}&dinersNum=${this.dinersNum||''}`
|
||||
url: `/pagesOrder/confirm_order/index?storeInfo=${encodeURIComponent(JSON.stringify(this.storeInfo))}&cartLists=${JSON.stringify(this.cartLists)}&tableCode=${this.tableCode||''}`
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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}`
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -91,10 +91,10 @@
|
||||
</view>
|
||||
|
||||
<!-- 购物车 -->
|
||||
<shoppingCart ref="shoppingCart" :shopId="shopId" :tableCode="tableCode" :cartLists_count="cartLists_count" :cartLists="cartLists" :showCart="showCart" @addCart="addCart" @close="close"></shoppingCart>
|
||||
<shoppingCart v-if="shopId&&tableCode" ref="shoppingCart" :shopId="shopId" :tableCode="tableCode" :cartLists_count="cartLists_count" :cartLists="cartLists" :showCart="showCart" @addCart="addCart" @close="close"></shoppingCart>
|
||||
|
||||
<!-- 购物车结算 -->
|
||||
<shoppingCartBilling ref="shoppingCartBilling" :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="shopId&&tableCode" ref="shoppingCartBilling" :cartListsdatashow="cartListsdatashow" :shopId="shopId" :tableCode="tableCode" :storeInfo="shopInfo.storeInfo" :cartLists_count="cartLists_count" :cartLists="cartLists" :showCart="showCart" @isOpen="isOpen"></shoppingCartBilling>
|
||||
|
||||
<!-- 规格 -->
|
||||
<u-popup :show="showShopsku" :round="20" mode="bottom" @close="showShopsku = false;pagemetashow=false"
|
||||
@@ -213,7 +213,6 @@
|
||||
|
||||
shopId: null,
|
||||
tableCode: null,
|
||||
dinersNum: null,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@@ -229,7 +228,6 @@
|
||||
onLoad(e) {
|
||||
if ( e.shopId ) { this.shopId = e.shopId }
|
||||
if ( e.tableCode ) { this.tableCode = e.tableCode }
|
||||
if ( e.dinersNum ) { this.dinersNum = e.dinersNum }
|
||||
},
|
||||
onUnload() {
|
||||
if (this.socketTicket) {
|
||||
@@ -252,6 +250,7 @@
|
||||
|
||||
this.productqueryShop();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user