feat: 代客下单修改,订单列表详情退款修改
This commit is contained in:
@@ -6,7 +6,7 @@ const Api = {
|
|||||||
|
|
||||||
calcOrderUsablePoints(params: any) {
|
calcOrderUsablePoints(params: any) {
|
||||||
return request<any>({
|
return request<any>({
|
||||||
url: `${baseURL}/member-points/calc-usable-points`,
|
url: `${baseURL}/memberPoints/calcUsablePoints`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
@@ -14,7 +14,7 @@ const Api = {
|
|||||||
// 004-根据抵扣金额计算所需积分
|
// 004-根据抵扣金额计算所需积分
|
||||||
calcMoneyUsablePoints(params: any) {
|
calcMoneyUsablePoints(params: any) {
|
||||||
return request<any>({
|
return request<any>({
|
||||||
url: `${baseURL}/member-points/calc-used-points`,
|
url: `${baseURL}/memberPoints/calcUsedPoints`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
@@ -22,7 +22,7 @@ const Api = {
|
|||||||
// 003-根据积分计算可抵扣金额
|
// 003-根据积分计算可抵扣金额
|
||||||
calcPointsToMoney(params: any) {
|
calcPointsToMoney(params: any) {
|
||||||
return request<any>({
|
return request<any>({
|
||||||
url: `${baseURL}/member-points/calc-deduction-amount`,
|
url: `${baseURL}/memberPoints/calcDeductionAmount`,
|
||||||
method: "get",
|
method: "get",
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
const baseURL = "/account/admin/points/basic-setting";
|
const baseURL = "/account/admin/points/basicSetting";
|
||||||
// 积分-配置
|
// 积分-配置
|
||||||
const AuthAPI = {
|
const AuthAPI = {
|
||||||
// 积分基本设置详情
|
// 积分基本设置详情
|
||||||
|
|||||||
@@ -54,7 +54,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="显示样式">
|
<el-form-item label="显示样式">
|
||||||
<div class="style_wrap">
|
<div class="style_wrap">
|
||||||
<div class="item style1" :class="{ active: Elform.browseMode == 'list' }" @click="Elform.browseMode = 'list'">
|
<div
|
||||||
|
class="item style1"
|
||||||
|
:class="{ active: Elform.browseMode == 'list' }"
|
||||||
|
@click="Elform.browseMode = 'list'"
|
||||||
|
>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="cover"></div>
|
<div class="cover"></div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
@@ -72,7 +76,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item style2" :class="{ active: Elform.browseMode == 'grid' }" @click="Elform.browseMode = 'grid'">
|
<div
|
||||||
|
class="item style2"
|
||||||
|
:class="{ active: Elform.browseMode == 'grid' }"
|
||||||
|
@click="Elform.browseMode = 'grid'"
|
||||||
|
>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="cover"></div>
|
<div class="cover"></div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
@@ -99,37 +107,35 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue'
|
import { reactive } from "vue";
|
||||||
import API from '../index'
|
import API from "../index";
|
||||||
// do not use same name with ref
|
// do not use same name with ref
|
||||||
const Elform = reactive({
|
const Elform = reactive({
|
||||||
"enableRewards": 1,
|
enableRewards: 1,
|
||||||
"rewardsGroup": "all",
|
rewardsGroup: "all",
|
||||||
"consumeAmount": 0,
|
consumeAmount: 0,
|
||||||
"enableDeduction": 1,
|
enableDeduction: 1,
|
||||||
"deductionGroup": 'all',
|
deductionGroup: "all",
|
||||||
"minPaymentAmount": 0,
|
minPaymentAmount: 0,
|
||||||
"maxDeductionRatio": 0,
|
maxDeductionRatio: 0,
|
||||||
"equivalentPoints": 0,
|
equivalentPoints: 0,
|
||||||
"enablePointsMall": 1,
|
enablePointsMall: 1,
|
||||||
"browseMode": "list",
|
browseMode: "list",
|
||||||
})
|
});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList();
|
||||||
})
|
});
|
||||||
async function getList() {
|
async function getList() {
|
||||||
const res = await API.getBasicSetting({})
|
const res = await API.getBasicSetting({});
|
||||||
for (const key in Elform) {
|
Object.assign(Elform, res);
|
||||||
Elform[key] = res[key]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
const res = await API.BasicSettingadd(Elform)
|
const res = await API.BasicSettingadd(Elform);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '成功',
|
message: "成功",
|
||||||
type: 'success',
|
type: "success",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -144,7 +150,7 @@ async function onSubmit() {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
$color: #3F9EFF;
|
$color: #3f9eff;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -159,7 +165,7 @@ async function onSubmit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
background-color: #D9D9D9;
|
background-color: #d9d9d9;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.style1 {
|
&.style1 {
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div v-loading="loading">
|
||||||
<el-drawer title="订单详情" size="60%" v-model="drawer" direction="rtl" v-loading="loading">
|
<el-drawer title="订单详情" size="60%" v-model="drawer" direction="rtl" @close="reset">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="title" style="text-align: center">【收银订单】</div>
|
<div class="title" style="text-align: center">【收银订单】</div>
|
||||||
<div class="container">
|
<div class="container" v-if="user">
|
||||||
<div class="info_content">
|
<div class="info_content">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="label">会员信息</div>
|
<div class="label">会员信息</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div>会员昵称:-</div>
|
<div>会员昵称:-{{ user.nickName || "" }}</div>
|
||||||
<div>联系电话:-</div>
|
<div>联系电话:-{{ user.phone || "" }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<h3>服务员下单</h3>
|
||||||
|
</div>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="t">订单状态</div>
|
<div class="t">订单状态</div>
|
||||||
@@ -73,7 +76,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div>打包费:{{ detail.packFee || "-" }}</div>
|
<div>打包费:{{ detail.packFee || "-" }}</div>
|
||||||
<div>订单原价:¥{{ detail.originAmount }}</div>
|
<div>订单原价:¥{{ detail.originAmount }}</div>
|
||||||
<div>优惠金额:¥{{ youHuiJinE }}</div>
|
<div>优惠金额:¥{{ detail.discountAmount }}</div>
|
||||||
<div>
|
<div>
|
||||||
实收金额:
|
实收金额:
|
||||||
<span style="color: red">¥{{ detail.payAmount }}</span>
|
<span style="color: red">¥{{ detail.payAmount }}</span>
|
||||||
@@ -98,7 +101,13 @@
|
|||||||
<div style="margin-bottom: 16px; font-size: 16px">商品信息</div>
|
<div style="margin-bottom: 16px; font-size: 16px">商品信息</div>
|
||||||
<template v-for="(item, index) in detail.detailMap" :key="index">
|
<template v-for="(item, index) in detail.detailMap" :key="index">
|
||||||
<h4>第{{ index }}次下单</h4>
|
<h4>第{{ index }}次下单</h4>
|
||||||
<el-table :data="item">
|
<el-table
|
||||||
|
:data="item"
|
||||||
|
:ref="'refTable' + index"
|
||||||
|
@selection-change="selectionChange"
|
||||||
|
@row-click="rowClick($event, index)"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="商品">
|
<el-table-column label="商品">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div class="shop_info">
|
<div class="shop_info">
|
||||||
@@ -125,18 +134,21 @@
|
|||||||
<template v-slot="scope">x{{ scope.row.num }}</template>
|
<template v-slot="scope">x{{ scope.row.num }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单价">
|
<el-table-column label="单价">
|
||||||
<template v-slot="scope">¥{{ scope.row.price }}</template>
|
<template v-slot="scope">¥{{ scope.row.unitPrice }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="小计">
|
<el-table-column label="小计">
|
||||||
<template v-slot="scope">¥{{ scope.row.payAmount }}</template>
|
<template v-slot="scope">¥{{ scope.row.payAmount }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="实付">
|
||||||
|
<template v-slot="scope">¥{{ scope.row.payAmount }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<template v-if="detail.status != 'unpaid'">
|
<template v-if="detail.status != 'unpaid'">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="canTuikuan(scope.row)"
|
v-if="canTuikuan(scope.row)"
|
||||||
link
|
link
|
||||||
size="mini"
|
size="small"
|
||||||
@click="tuikuan(scope.row)"
|
@click="tuikuan(scope.row)"
|
||||||
>
|
>
|
||||||
<span>退款</span>
|
<span>退款</span>
|
||||||
@@ -147,7 +159,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
v-if="canTuicai(scope.row)"
|
v-if="canTuicai(scope.row)"
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="small"
|
||||||
@click="tuiCai(scope.row)"
|
@click="tuiCai(scope.row)"
|
||||||
>
|
>
|
||||||
<span>退菜</span>
|
<span>退菜</span>
|
||||||
@@ -158,6 +170,14 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
|
<div class="u-p-20 u-flex u-row-right">
|
||||||
|
<el-checkbox
|
||||||
|
v-model="allSelected"
|
||||||
|
@change="allSelectedChange"
|
||||||
|
label="全选"
|
||||||
|
></el-checkbox>
|
||||||
|
<el-button type="danger" class="u-m-l-20" @click.stop="tuikuan('all')">退款</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
@@ -177,6 +197,7 @@ import { ElMessage } from "element-plus";
|
|||||||
import { returnOptionsLabel } from "../config/config";
|
import { returnOptionsLabel } from "../config/config";
|
||||||
import * as $util from "../order_goods_util.js";
|
import * as $util from "../order_goods_util.js";
|
||||||
import orderApi from "@/api/order/order";
|
import orderApi from "@/api/order/order";
|
||||||
|
import shopUserApi from "@/api/account/shopUser";
|
||||||
import orderEnum from "./orderEnum";
|
import orderEnum from "./orderEnum";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
export default {
|
export default {
|
||||||
@@ -185,6 +206,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
allSelected: false,
|
||||||
|
user: "",
|
||||||
orderEnum,
|
orderEnum,
|
||||||
drawer: false,
|
drawer: false,
|
||||||
type: "1",
|
type: "1",
|
||||||
@@ -230,6 +253,26 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
rowClick(row, index) {
|
||||||
|
this.$refs["refTable" + index][0].toggleRowSelection(row);
|
||||||
|
},
|
||||||
|
selectionChange(e) {
|
||||||
|
console.log(e);
|
||||||
|
},
|
||||||
|
allSelectedChange(newval) {
|
||||||
|
for (let i in this.detail.detailMap) {
|
||||||
|
this.detail.detailMap[i].forEach((item) => {
|
||||||
|
if (newval) {
|
||||||
|
this.$refs["refTable" + i][0].toggleRowSelection(item, true);
|
||||||
|
} else {
|
||||||
|
this.$refs["refTable" + i][0].toggleRowSelection(item, false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.user = "";
|
||||||
|
},
|
||||||
returnPayType(payType) {
|
returnPayType(payType) {
|
||||||
if (!payType) {
|
if (!payType) {
|
||||||
return "";
|
return "";
|
||||||
@@ -304,9 +347,19 @@ export default {
|
|||||||
this.update();
|
this.update();
|
||||||
},
|
},
|
||||||
tuikuan(item) {
|
tuikuan(item) {
|
||||||
|
let arr = [];
|
||||||
|
if (item === "all") {
|
||||||
|
for (let i in this.detail.detailMap) {
|
||||||
|
arr.push(...this.$refs["refTable" + i][0].getSelectionRows());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
arr = [item];
|
||||||
|
}
|
||||||
|
if (arr.length == 0) {
|
||||||
|
return ElMessage.error("请选择要退款的商品");
|
||||||
|
}
|
||||||
this.selGoods = item;
|
this.selGoods = item;
|
||||||
console.log(item);
|
this.$refs.refReturnMoney.open(arr, this.detail);
|
||||||
this.$refs.refReturnMoney.open({ ...item, priceAmount: item.canReturnAmount });
|
|
||||||
},
|
},
|
||||||
tuiCai(item) {
|
tuiCai(item) {
|
||||||
this.selGoods = item;
|
this.selGoods = item;
|
||||||
@@ -337,7 +390,13 @@ export default {
|
|||||||
async tbOrderInfoDetail(id) {
|
async tbOrderInfoDetail(id) {
|
||||||
try {
|
try {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const res = await orderApi.getHistoryList({ orderId: id });
|
const res = await orderApi.get({ orderId: id });
|
||||||
|
if (res.userId) {
|
||||||
|
shopUserApi.get({ userId: res.userId }).then((res1) => {
|
||||||
|
this.user = res1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.detail = res;
|
this.detail = res;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -1,35 +1,59 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="退款" width="410px" v-model="show" @close="reset" :modal="modal">
|
<el-dialog title="修改退款金额" width="410px" v-model="show" @close="reset" :modal="modal">
|
||||||
<div class="u-flex font-bold color-333">
|
<div class="u-flex u-col-top">
|
||||||
{{ goods.productName }}
|
<span class="u-m-0">退款商品</span>
|
||||||
|
<div class="u-p-l-20 goods-list">
|
||||||
|
<div
|
||||||
|
class="u-flex u-font-12 goods-list-item"
|
||||||
|
v-for="(goods, index) in goodsList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<span class="">
|
||||||
|
{{ goods.productName }}
|
||||||
|
</span>
|
||||||
|
<span class="color-999 u-m-l-10">x{{ goods.num || "" }}</span>
|
||||||
|
<span class="color-333 u-m-l-10 u-font-600">
|
||||||
|
{{ goods.payAmount || "" }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="u-flex color-999 u-m-t-4">
|
<div class="u-flex u-col-top u-m-t-22">
|
||||||
{{ goods.productSkuName || "" }}
|
<h4span class="u-m-0">支付金额</h4span>
|
||||||
|
<div class="u-p-l-20">
|
||||||
|
{{ detail.payAmount }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="u-flex u-col-top u-m-t-22">
|
||||||
|
<span class="u-m-0">优惠金额</span>
|
||||||
|
<div class="u-p-l-20">
|
||||||
|
{{ detail.discountAmount }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="u-p-b-16 u-m-t-22">
|
||||||
|
<div class="flex u-row-between">
|
||||||
|
<span>线下收款</span>
|
||||||
|
<div class="u-flex u-flex-1 u-p-l-20">
|
||||||
|
<el-input type="number" v-model="number" :min="min" :max="max">
|
||||||
|
<template #append>可退1元</template>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="u-flex u-col-top u-m-t-22">
|
||||||
|
<span class="u-m-0">退款金额</span>
|
||||||
|
<div class="u-p-l-20">
|
||||||
|
<span class="color-red">¥ {{ detail.discountAmount }}</span>
|
||||||
|
<span class="color-666 u-m-l-4">(退款商品金额:260.16)</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="u-flex u-col-top u-m-t-22">
|
||||||
|
<span class="u-m-0">退回优惠券</span>
|
||||||
|
<div class="u-p-l-20">
|
||||||
|
<span class="color-666 u-m-l-4">该订单未使用优惠券</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="u-p-b-16 border-bottom">
|
|
||||||
<div class="flex u-row-between">
|
|
||||||
<span>退款数量</span>
|
|
||||||
<div class="u-flex">
|
|
||||||
<el-input-number v-model="number" :min="min" :max="max"></el-input-number>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="u-font-12 color-999 u-m-t-8" v-if="isSeatFee">
|
|
||||||
<div>
|
|
||||||
<span class="color-red">*</span>
|
|
||||||
<span>客座费只能全退</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="u-m-t-12 u-font-12 color-999">菜品已点数量 {{ max }} 份</div>
|
|
||||||
<div class="u-flex u-m-t-12">
|
|
||||||
<span>支付金额</span>
|
|
||||||
<span class="">¥{{ goods.payAmount }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="u-flex u-m-t-12">
|
|
||||||
<span>退款金额</span>
|
|
||||||
<span class="color-red font-bold">¥{{ tuikuanJine }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="u-p-b-16 border-bottom">
|
<div class="u-p-b-16 border-bottom">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<span class="u-m-r-12">是否现金</span>
|
<span class="u-m-r-12">是否现金</span>
|
||||||
@@ -55,12 +79,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="u-m-t-20">
|
<div class="u-m-t-20">
|
||||||
<el-input v-model="note" size="medium" placeholder="请输入自定义备注"></el-input>
|
<el-input v-model="note" placeholder="请输入自定义备注"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div>
|
<div>
|
||||||
<el-button size="medium" @click="close">取消</el-button>
|
<el-button @click="close">取消</el-button>
|
||||||
<el-button size="medium" type="primary" @click="confirm">确定</el-button>
|
<el-button type="primary" @click="confirm">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -81,6 +105,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
detail: "",
|
||||||
|
goodsList: [],
|
||||||
cash: false,
|
cash: false,
|
||||||
isFloat: false,
|
isFloat: false,
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -128,23 +154,10 @@ export default {
|
|||||||
}
|
}
|
||||||
this.note = tag + "," + this.note;
|
this.note = tag + "," + this.note;
|
||||||
},
|
},
|
||||||
open(item) {
|
open(goods, detailInfo) {
|
||||||
this.goods = item ? item : this.goods;
|
this.goodsList = goods;
|
||||||
console.log(item);
|
|
||||||
if (item && item.isWeight) {
|
|
||||||
//称重商品
|
|
||||||
this.isFloat = true;
|
|
||||||
this.number = item.num;
|
|
||||||
}
|
|
||||||
if (item && !item.isWeight) {
|
|
||||||
if (item.productId != "-999") {
|
|
||||||
this.number = 1;
|
|
||||||
} else {
|
|
||||||
this.number = item.num;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.show = true;
|
this.show = true;
|
||||||
|
this.detail = detailInfo;
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
@@ -209,4 +222,14 @@ export default {
|
|||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
.goods-list-item {
|
||||||
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
|
background: #f0f2f5;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
.goods-list-item:not(:first-child) {
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<div>清空</div>
|
<div>清空</div>
|
||||||
</template>
|
</template>
|
||||||
<template #input>
|
<template #input>
|
||||||
<div class="u-p-l-20 u-p-r-20 u-flex w-full">
|
<div class="u-flex w-full">
|
||||||
<el-input
|
<el-input
|
||||||
placeholder="请输入就餐人数"
|
placeholder="请输入就餐人数"
|
||||||
v-model="number"
|
v-model="number"
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</key-board>
|
</key-board>
|
||||||
<div class="confirm_btns">
|
<div class="confirm_btns">
|
||||||
<el-button @click="close">取消</el-button>
|
<el-button size="large" @click="close">取消</el-button>
|
||||||
<el-button type="primary" @click="confirm">确定</el-button>
|
<el-button size="large" type="primary" @click="confirm">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div class="u-m-l-12">
|
<div class="u-m-l-12">
|
||||||
<p>
|
<p>
|
||||||
<span class="name u-font-16">{{ user.nickName }}</span>
|
<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>
|
||||||
<p class="u-font-14 color-666 u-m-t-10">
|
<p class="u-font-14 color-666 u-m-t-10">
|
||||||
<span class="money">余额:{{ user.amount }}</span>
|
<span class="money">余额:{{ user.amount }}</span>
|
||||||
|
|||||||
@@ -97,7 +97,9 @@
|
|||||||
<span>就餐人数:{{ perpole || "-" }} 位</span>
|
<span>就餐人数:{{ perpole || "-" }} 位</span>
|
||||||
<el-icon><ArrowRight /></el-icon>
|
<el-icon><ArrowRight /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
<a @click="clearCarts" style="color: #1890ff">清空</a>
|
<el-button link type="primary" :disabled="carts.isEmpty" @click="clearCarts">
|
||||||
|
清空
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 购物车 -->
|
<!-- 购物车 -->
|
||||||
<cartsList
|
<cartsList
|
||||||
@@ -324,7 +326,11 @@ async function createOrder(key) {
|
|||||||
refresh();
|
refresh();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (res.userId) {
|
||||||
|
const userRes = await shopUserApi.get({ userId: res.userId });
|
||||||
|
user.value = userRes;
|
||||||
|
carts.changeUser(userRes);
|
||||||
|
}
|
||||||
if (res.id) {
|
if (res.id) {
|
||||||
// 获取历史订单数据
|
// 获取历史订单数据
|
||||||
const res1 = await orderApi.getHistoryList({
|
const res1 = await orderApi.getHistoryList({
|
||||||
@@ -391,8 +397,9 @@ function getTableList() {
|
|||||||
tableList.value = res.records.filter((v) => v.tableCode);
|
tableList.value = res.records.filter((v) => v.tableCode);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getTableDetail(table_code) {
|
async function getTableDetail(params) {
|
||||||
tableApi.get(table_code);
|
const res = await tableApi.get(params);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
function tablesearchInput() {}
|
function tablesearchInput() {}
|
||||||
//返回桌台状态颜色
|
//返回桌台状态颜色
|
||||||
@@ -407,7 +414,7 @@ function returnTableLabel(key) {
|
|||||||
}
|
}
|
||||||
function tableClick(item) {
|
function tableClick(item) {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
getTableDetail(item.tableCode);
|
getTableDetail({ tableCode: item.tableCode });
|
||||||
|
|
||||||
table.value = item;
|
table.value = item;
|
||||||
carts.changeTable(item.tableCode);
|
carts.changeTable(item.tableCode);
|
||||||
|
|||||||
Reference in New Issue
Block a user