feat: 代客下单修改,订单列表详情退款修改

This commit is contained in:
2025-03-05 13:39:06 +08:00
parent a7b7c1cd7e
commit ed9a3335c8
8 changed files with 195 additions and 100 deletions

View File

@@ -13,7 +13,7 @@
<div>清空</div>
</template>
<template #input>
<div class="u-p-l-20 u-p-r-20 u-flex w-full">
<div class="u-flex w-full">
<el-input
placeholder="请输入就餐人数"
v-model="number"
@@ -27,8 +27,8 @@
</template>
</key-board>
<div class="confirm_btns">
<el-button @click="close">取消</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
<el-button size="large" @click="close">取消</el-button>
<el-button size="large" type="primary" @click="confirm">确定</el-button>
</div>
</div>
</el-dialog>

View File

@@ -7,7 +7,7 @@
<div class="u-m-l-12">
<p>
<span class="name u-font-16">{{ user.nickName }}</span>
<span class="vip" v-if="user.isVip">>VIP{{ user.isVip }}</span>
<span class="vip" v-if="user.isVip">VIP{{ user.isVip }}</span>
</p>
<p class="u-font-14 color-666 u-m-t-10">
<span class="money">余额{{ user.amount }}</span>

View File

@@ -97,7 +97,9 @@
<span>就餐人数{{ perpole || "-" }} </span>
<el-icon><ArrowRight /></el-icon>
</div>
<a @click="clearCarts" style="color: #1890ff">清空</a>
<el-button link type="primary" :disabled="carts.isEmpty" @click="clearCarts">
清空
</el-button>
</div>
<!-- 购物车 -->
<cartsList
@@ -324,7 +326,11 @@ async function createOrder(key) {
refresh();
return;
}
if (res.userId) {
const userRes = await shopUserApi.get({ userId: res.userId });
user.value = userRes;
carts.changeUser(userRes);
}
if (res.id) {
// 获取历史订单数据
const res1 = await orderApi.getHistoryList({
@@ -391,8 +397,9 @@ function getTableList() {
tableList.value = res.records.filter((v) => v.tableCode);
});
}
function getTableDetail(table_code) {
tableApi.get(table_code);
async function getTableDetail(params) {
const res = await tableApi.get(params);
return res;
}
function tablesearchInput() {}
//返回桌台状态颜色
@@ -407,7 +414,7 @@ function returnTableLabel(key) {
}
function tableClick(item) {
console.log(item);
getTableDetail(item.tableCode);
getTableDetail({ tableCode: item.tableCode });
table.value = item;
carts.changeTable(item.tableCode);