fix: 更新优惠券页面,订单列表页面,代客下单页面
This commit is contained in:
@@ -32,8 +32,8 @@
|
||||
<div v-if="item.typeEnum == 'weight'" class="specSnap">
|
||||
¥{{ currentPrice }}/{{ item.unit }}
|
||||
</div>
|
||||
<div v-if="item.specSnap" class="specSnap">
|
||||
{{ item.specSnap }}
|
||||
<div v-if="item.specInfo" class="specSnap">
|
||||
{{ item.specInfo }}
|
||||
</div>
|
||||
<div v-if="item.proGroupInfo" class="specSnapss">
|
||||
<span>{{ item.groupType == 0 ? "固定套餐" : "可选套餐" }}:</span>
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 10px"></div>
|
||||
<div class="flex u-p-t-6">
|
||||
<div class="flex">
|
||||
<div class="order-number-box u-font-12">
|
||||
<div class="" v-if="isSeatFee">X{{ item.totalNumber }}</div>
|
||||
<div class="" v-else>X{{ item.number }}</div>
|
||||
|
||||
@@ -206,6 +206,12 @@ import productApi from "@/api/product/index";
|
||||
import tableApi from "@/api/account/table";
|
||||
import $status from "@/views/tool/table/status.js";
|
||||
import orderApi from "@/api/order/order";
|
||||
|
||||
import { useCartsStore } from "@/store/modules/carts";
|
||||
const carts = useCartsStore();
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
//就餐人数
|
||||
let perpole = ref("");
|
||||
const refDinerNumber = ref();
|
||||
@@ -246,11 +252,12 @@ async function createOrder() {
|
||||
userId: "",
|
||||
seatNum: 0,
|
||||
packFee: 0,
|
||||
originAmount: 29,
|
||||
originAmount: refCart.value.carts.payMoney * 1,
|
||||
tableCode: refCart.value.carts.table_code,
|
||||
dineMode: diners.sel == 0 ? "dine-in" : "take-out",
|
||||
remark: "",
|
||||
placeNum: "",
|
||||
seatNum: perpole.value * 1,
|
||||
placeNum: 1,
|
||||
waitCall: false,
|
||||
vipPrice: false,
|
||||
});
|
||||
@@ -419,7 +426,7 @@ function getCategoryList() {
|
||||
const refSelSku = ref(null);
|
||||
|
||||
const goods = reactive({
|
||||
list: [],
|
||||
list: carts.goods,
|
||||
query: {
|
||||
categoryId: "",
|
||||
name: "",
|
||||
@@ -435,6 +442,7 @@ async function getGoods() {
|
||||
...goods.query,
|
||||
});
|
||||
goods.list = res.records;
|
||||
refCart.value.carts.goods = goods.list;
|
||||
goodsMapisFinish.value = true;
|
||||
}
|
||||
|
||||
@@ -488,17 +496,11 @@ function goodsClick(item) {
|
||||
// 多规格选择确认
|
||||
function skuSelConfirm(item) {
|
||||
console.log(item);
|
||||
const listItem = refCart.value.carts.list.find(
|
||||
(v) => v.product_id == item.product_id && v.sku_id == item.sku_id
|
||||
);
|
||||
if (listItem) {
|
||||
refCart.value.carts.update({ ...listItem, ...item });
|
||||
} else {
|
||||
addCarts(item);
|
||||
}
|
||||
addCarts(item);
|
||||
}
|
||||
|
||||
//购物车
|
||||
|
||||
const refCart = ref(null);
|
||||
function clearCarts() {
|
||||
ElMessageBox.alert("确定要清空点餐列表吗?", "提示", {
|
||||
@@ -524,7 +526,16 @@ function init() {
|
||||
getCategoryList();
|
||||
getGoods();
|
||||
}
|
||||
init();
|
||||
|
||||
onMounted(async () => {
|
||||
const { id } = route.query;
|
||||
if (id) {
|
||||
orderApi.getHistoryList({
|
||||
orderId: id,
|
||||
});
|
||||
}
|
||||
init();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user