优化店铺切换商品展示
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
<el-table :data="tableData.list" height="540px" v-loading="tableData.loading"
|
||||
v-if="tableData.type == 2">
|
||||
<el-table-column label="抖音订单号" prop="d_order_id" width="240"></el-table-column>
|
||||
<el-table-column label="总金额" prop="pay_amount" width="100">
|
||||
<el-table-column label="总金额" prop="pay_amount">
|
||||
<template v-slot="scope">
|
||||
<span style="color: var(--primary-color);">¥{{ scope.row.pay_amount }}</span>
|
||||
</template>
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
¥{{ formatDecimal(+props.item.discount_sale_amount, 2, true) }}
|
||||
</span>
|
||||
<span class="dis" v-else>
|
||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice : +props.item.lowPrice, 2,
|
||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice || +props.item.lowPrice :
|
||||
+props.item.lowPrice, 2,
|
||||
true) }}
|
||||
</span>
|
||||
<span v-if="props.item.discount_sale_amount">
|
||||
@@ -26,7 +27,7 @@
|
||||
<div class="price" v-else>
|
||||
<template v-if="+props.item.discount_sale_amount">
|
||||
<span class="dis">
|
||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice : +props.item.lowPrice,
|
||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice || +props.item.lowPrice : +props.item.lowPrice,
|
||||
2, true) }}
|
||||
</span>
|
||||
<span>
|
||||
@@ -40,7 +41,7 @@
|
||||
</span>
|
||||
</template>
|
||||
<span>
|
||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice : +props.item.lowPrice,
|
||||
¥{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice || +props.item.lowPrice : +props.item.lowPrice,
|
||||
2,
|
||||
true) }}
|
||||
</span>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<template v-else>
|
||||
<el-text tag="del" class="del" size="small">¥{{ item.skuList[0].salePrice
|
||||
}}</el-text>
|
||||
<el-text>¥{{ item.skuList[0].memberPrice }}</el-text>
|
||||
<el-text>¥{{ +item.skuList[0].memberPrice || item.skuList[0].salePrice }}</el-text>
|
||||
</template>
|
||||
</div>
|
||||
<div class="show_more_btn" v-if="showEditor">
|
||||
|
||||
@@ -243,7 +243,6 @@ function show(t) {
|
||||
setTimeout(() => {
|
||||
payCardRef.value.reset()
|
||||
}, 100)
|
||||
// if (t = 1) cartList.value = [...goodsStore.cartList];
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
||||
@@ -270,6 +270,8 @@ async function createOrderHandle(t = 0) {
|
||||
goodsStore.orderListInfo = res
|
||||
|
||||
if (t == 1) {
|
||||
// 向其他端发送清空购物车消息
|
||||
goodsStore.operateCart({ table_code: goodsStore.orderListInfo.tableCode }, "cleanup");
|
||||
settleAccountRef.value.show(t)
|
||||
} else {
|
||||
goodsStore.clearCart()
|
||||
|
||||
@@ -149,8 +149,10 @@ import { useRouter } from "vue-router";
|
||||
import { useUser } from "@/store/user.js";
|
||||
import { formatDecimal } from '@/utils/index.js'
|
||||
import { usePrint } from "@/store/print.js";
|
||||
import { useGoods } from "@/store/goods.js";
|
||||
import { staffPermission } from '@/api/user.js'
|
||||
|
||||
const goodsStore = useGoods();
|
||||
const printStore = usePrint();
|
||||
const store = useUser();
|
||||
const router = useRouter();
|
||||
@@ -200,6 +202,7 @@ async function logoutHandle() {
|
||||
try {
|
||||
loading.value = true;
|
||||
await store.logout()
|
||||
goodsStore.clearAllGoods()
|
||||
ElMessage.success("交班成功");
|
||||
setTimeout(() => {
|
||||
router.replace({
|
||||
|
||||
Reference in New Issue
Block a user