优化台桌结算不结算购物车信息
This commit is contained in:
@@ -144,6 +144,10 @@ const props = defineProps({
|
||||
member: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'cart' // cart 代客下单 table 桌台结算 order 订单结算
|
||||
}
|
||||
});
|
||||
|
||||
@@ -244,7 +248,7 @@ async function printOrderLable(isBefore = false) {
|
||||
|
||||
// 订单已支付
|
||||
function paySuccess() {
|
||||
if (isPrint.value) printOrderLable()
|
||||
// if (isPrint.value) printOrderLable()
|
||||
emits('success')
|
||||
dialogVisible.value = false;
|
||||
ElMessage.success('支付成功')
|
||||
@@ -258,9 +262,14 @@ function paySuccess() {
|
||||
|
||||
const payCardRef = ref(null)
|
||||
function show(t) {
|
||||
goodsStore.payType = props.type
|
||||
dialogVisible.value = true;
|
||||
cartInfo.value = { ...goodsStore.cartInfo }
|
||||
orderList.value = [...goodsStore.cartList, ...goodsStore.orderList.map(item => item.goods).flat()]
|
||||
if (props.type === 'table') {
|
||||
orderList.value = goodsStore.orderList.map(item => item.goods).flat()
|
||||
} else {
|
||||
orderList.value = [...goodsStore.cartList, ...goodsStore.orderList.map(item => item.goods).flat()]
|
||||
}
|
||||
|
||||
console.log('orderListInfo===================', { ...goodsStore.orderListInfo });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user