1.修复购物车清空已下单商品的问题
2.转桌/并桌只显示已下单商品
This commit is contained in:
@@ -97,7 +97,7 @@
|
||||
</div>
|
||||
<!-- 购物车操作栏 -->
|
||||
<cartOperation :item="cartListActiveItem" @confirm="(res) => addCart(res, 'edit')" @delete="delCartHandle"
|
||||
@pending="pendingCart" @clearCart="clearCartHandle" />
|
||||
@pending="pendingCart" @clearCart="clearCartHandle" @merging="showTableMerging" />
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="top">
|
||||
@@ -165,6 +165,8 @@
|
||||
<pendingCartModal ref="pendingCartModalRef" @select="pendingCartHandle" />
|
||||
<!-- 检查版本升级 -->
|
||||
<updateDialog />
|
||||
<!-- 合并/转桌 -->
|
||||
<tableMerging ref="tableMergingRef" @success="addCart" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -185,6 +187,7 @@ import cartOperation from "@/views/home/components/cartOperation.vue";
|
||||
import settleAccount from "@/views/home/components/settleAccount.vue";
|
||||
import fastCashier from "@/views/home/components/fastCashier.vue";
|
||||
import pendingCartModal from "@/views/home/components/pendingCartModal.vue";
|
||||
import tableMerging from '@/views/home/components/tableMerging.vue'
|
||||
import useStorage from '@/utils/useStorage'
|
||||
import { formatDecimal } from '@/utils/index.js'
|
||||
|
||||
@@ -209,6 +212,7 @@ import member from "@/views/member/index.vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
import { useShop } from '@/store/shop.js'
|
||||
import TableMerging from "./components/tableMerging.vue";
|
||||
|
||||
const shopStore = useShop()
|
||||
|
||||
@@ -224,6 +228,7 @@ const goodsRef = ref(null);
|
||||
const pendingCartModalRef = ref(null);
|
||||
const settleAccountRef = ref(null);
|
||||
const fastCashierRef = ref(null);
|
||||
const tableMergingRef = ref(null)
|
||||
|
||||
const allSelected = ref(false);
|
||||
|
||||
@@ -493,7 +498,7 @@ async function queryCartAjax() {
|
||||
|
||||
cartInfo.value = res.amount;
|
||||
pendingCartNum.value = res.num;
|
||||
goodsRef.value.updateData();
|
||||
// goodsRef.value.updateData();
|
||||
|
||||
let i = 0;
|
||||
res.list.map((item) => {
|
||||
@@ -568,6 +573,12 @@ function clearMember() {
|
||||
createCodeAjax()
|
||||
}
|
||||
|
||||
// 显示转桌/并桌
|
||||
function showTableMerging() {
|
||||
let data = cartList.value.filter(item => item.placeNum)
|
||||
tableMergingRef.value.show(data)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
createCodeAjax()
|
||||
shopStore.queryShopInfo()
|
||||
|
||||
Reference in New Issue
Block a user