确认订单更新

This commit is contained in:
2025-09-28 13:57:18 +08:00
parent 53dcd1f788
commit a8c2096096
7 changed files with 49 additions and 20 deletions

View File

@@ -72,7 +72,6 @@
isShow.value = res.isOrder
list.value = res.rechargeDetailList.filter(v=>v.amount>cartStore.orderCostSummary.finalPayAmount)
if(list.value.length){
sel.value=0
updateSel()
}
}
@@ -80,7 +79,6 @@
watch(()=>cartStore.orderCostSummary.finalPayAmount,(newval)=>{
list.value=$riginList.filter(v=>v.amount>newval)
if(list.value.length){
sel.value=0
updateSel()
}
})

View File

@@ -365,6 +365,7 @@
cartStore.setDinnerType(item.val)
// this.getchoseEatModel('tabClick', index, item);
}
cartStore.setDinnerType(tebtypeList[is_type.value].val)
// 操作优惠卷
const dataprocessing = (data) => {

View File

@@ -169,7 +169,7 @@
//充值相关
const rechargeItem=ref(null)
const rechargeItem=ref({id:''})
const rechargeId=ref(null)
function updateRechargeId(e){
@@ -192,6 +192,11 @@
let res = await APIgetOrderById({
orderId: listinfo.id
})
console.log('onMessage:APIgetOrderById',res);
if(res){
// cartStore.carts=[];
// cartStore.setOldOrder(res)
}
if (noPayStatus[res.status]) {
uni.showToast({
title: noPayStatus[res.status],
@@ -582,7 +587,10 @@
// 清空购物车
if (res) {
Object.assign(listinfo, res)
// cartStore.carts=[];
// cartStore.setOldOrder(res)
getOrderInfoAfterCalcInit(res)
cartsSocket.sendMessage({
type: 'shopping',
table_code: uni.cache.get('tableCode'),
@@ -638,7 +646,13 @@
// 购物车有数据
if (!cartStore.isEmpty) {
const res = await createOrder()
//历史订单数据
const res1= await APIgetOrderById({
orderId: res.id
})
cartStore.setOldOrder(res1)
}
goToPay()
} else {
@@ -794,6 +808,7 @@
})
pay(payRes)
}else{
console.log('微信支付');
await storeMemberpay.actionsltPayOrder({
checkOrderPay,
payType: paymentmethod.payType,
@@ -803,6 +818,7 @@
}
} catch (error) {
console.log('error',error);
pay_unlock()
//TODO handle the exception
}
@@ -918,10 +934,13 @@
url: '/pages/product/index'
})
}
const packfee=computed(()=>{
return cartStore.orderCostSummary.packFee
})
//不计算各种折扣前的实付金额
const shifu = computed(() => {
const payAmount = listinfo.payAmount ? listinfo.payAmount * 1 : 0
return payAmount + cartStore.totalPrice * 1 + 0;
return payAmount + cartStore.totalPrice * 1 + packfee.value * 1
})
//减去各种折扣后的金额
const lastPayMoney = computed(() => {
@@ -963,6 +982,7 @@
if (shopInfoRes) {
cartStore.shopInfo = shopInfoRes.shopInfo;
}
await cartStore.goodsInit()
// * 获取会员信息
await storeuser.actionsproductqueryProduct()
await nextTick()