完成订单详情
This commit is contained in:
@@ -203,10 +203,12 @@
|
||||
|
||||
// 计算购物车商品费用
|
||||
const totalPrices = computed(() => {
|
||||
|
||||
let combinedArray = [];
|
||||
for (const key in props.orderinfo.detailMap) {
|
||||
if (props.orderinfo.detailMap.hasOwnProperty(key)) {
|
||||
combinedArray = props.orderinfo.detailMap[key];
|
||||
let subArray = props.orderinfo .detailMap[key];
|
||||
combinedArray = [...combinedArray, ...subArray]
|
||||
}
|
||||
}
|
||||
// 购物车总数价格
|
||||
@@ -214,13 +216,12 @@
|
||||
// 是否启用会员价 0否1是
|
||||
if (shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1) {
|
||||
// memberPrice会员价
|
||||
return total + parseFloat(item.memberPrice) * parseFloat(item.num);
|
||||
return total + (parseFloat(item.memberPrice) * parseFloat(item.num - item.returnNum));
|
||||
} else {
|
||||
// salePrice销售价
|
||||
return total + parseFloat(item.price) * parseFloat(item.num);
|
||||
return total + (parseFloat(item.price) * parseFloat(item.num - item.returnNum));
|
||||
}
|
||||
}, 0);
|
||||
console.log(cartone)
|
||||
// 购物车总数价格
|
||||
let cart = props.cartList.reduce((total, item) => {
|
||||
// 是否启用会员价 0否1是
|
||||
@@ -246,7 +247,6 @@
|
||||
tableFeeTotals = Math.ceil(parseFloat(dinersNum) * parseFloat(tableFee) *
|
||||
100) / 100;
|
||||
}
|
||||
console.log(tableFeeTotals)
|
||||
return Math.floor(tableFeeTotals * 100) / 100 ? Math.floor(tableFeeTotals * 100) / 100 : 0;
|
||||
});
|
||||
|
||||
@@ -266,7 +266,6 @@
|
||||
// 监听送餐/打包切换
|
||||
const tabClick = (item, index) => {
|
||||
is_type.value = index
|
||||
console.log(props.cartList)
|
||||
// this.getchoseEatModel('tabClick', index, item);
|
||||
}
|
||||
|
||||
@@ -295,10 +294,9 @@
|
||||
remark: remark.value, //备注
|
||||
placeNum: props.orderinfo.placeNum + 1, //当前订单下单次数
|
||||
waitCall: '', //是否等叫 0 否 1 等叫
|
||||
orderId: props.orderinfo.id
|
||||
|
||||
orderId: props.orderinfo.id,
|
||||
userId: uni.cache.get('userInfo').id || '' //
|
||||
})
|
||||
console.log(res)
|
||||
// 清空购物车
|
||||
emits('customevent', {
|
||||
type: 'shopping',
|
||||
|
||||
@@ -723,7 +723,7 @@
|
||||
|
||||
//获取多规格数据
|
||||
const clickspecifications = async (item, index, indexs, type) => {
|
||||
console.log(item, index, indexs, type)
|
||||
// console.log(item, index, indexs, type)
|
||||
// 数量清零
|
||||
shopCartNumber.value = 0
|
||||
// 初始化
|
||||
@@ -883,7 +883,7 @@
|
||||
// 购物车数据更新从新请求
|
||||
if (Message.type == 'product') {
|
||||
isDataLoaded.value = false;
|
||||
await productqueryProduct()
|
||||
uni.$u.debounce(productqueryProduct(), 500)
|
||||
// 数据可以更新
|
||||
}
|
||||
|
||||
@@ -1110,6 +1110,7 @@
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
await proxy.$onLaunched;
|
||||
// 获取当前页面栈
|
||||
const pages = getCurrentPages();
|
||||
// 获取当前页面实例
|
||||
@@ -1119,6 +1120,7 @@
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
if (options.q) {
|
||||
console.log(options.q)
|
||||
const store = productStore();
|
||||
await store.scanCodeactions(options.q)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user