feat: 叫号模块
This commit is contained in:
@@ -15,13 +15,10 @@
|
|||||||
<el-form-item label="桌型">
|
<el-form-item label="桌型">
|
||||||
<div style="width: 100%">
|
<div style="width: 100%">
|
||||||
<div>
|
<div>
|
||||||
<el-button
|
<el-button type="primary" @click="
|
||||||
type="primary"
|
|
||||||
@click="
|
|
||||||
showLocation = true;
|
showLocation = true;
|
||||||
title = '新增';
|
title = '新增';
|
||||||
"
|
">
|
||||||
>
|
|
||||||
添加
|
添加
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,21 +45,11 @@
|
|||||||
<h2>通知模板</h2>
|
<h2>通知模板</h2>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="140px" label-position="left">
|
<el-form ref="form" :model="form" :rules="rules" label-width="140px" label-position="left">
|
||||||
<el-form-item label="排队成功提醒">
|
<el-form-item label="排队成功提醒">
|
||||||
<el-input
|
<el-input v-model="form.successMsg" placeholder="请输入排队成功提醒" disabled style="width: 500px"></el-input>
|
||||||
v-model="form.successMsg"
|
|
||||||
placeholder="请输入排队成功提醒"
|
|
||||||
disabled
|
|
||||||
style="width: 500px"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排队即将排到通知">
|
<el-form-item label="排队即将排到通知">
|
||||||
<div>
|
<div>
|
||||||
<el-input
|
<el-input v-model="form.nearMsg" placeholder="请输入排队成功提醒" disabled style="width: 500px"></el-input>
|
||||||
v-model="form.nearMsg"
|
|
||||||
placeholder="请输入排队成功提醒"
|
|
||||||
disabled
|
|
||||||
style="width: 500px"
|
|
||||||
></el-input>
|
|
||||||
<div class="duoshaozhuo">
|
<div class="duoshaozhuo">
|
||||||
<div>前面等待</div>
|
<div>前面等待</div>
|
||||||
<el-input v-model="form.nearNum" placeholder="" disabled></el-input>
|
<el-input v-model="form.nearNum" placeholder="" disabled></el-input>
|
||||||
@@ -71,12 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排队到号提醒">
|
<el-form-item label="排队到号提醒">
|
||||||
<el-input
|
<el-input v-model="form.callingMsg" placeholder="请输入排队到号提醒" disabled style="width: 500px"></el-input>
|
||||||
v-model="form.callingMsg"
|
|
||||||
placeholder="请输入排队到号提醒"
|
|
||||||
disabled
|
|
||||||
style="width: 500px"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -107,18 +89,10 @@
|
|||||||
<el-input v-model="forms.start" placeholder="请输入开始号码"></el-input>
|
<el-input v-model="forms.start" placeholder="请输入开始号码"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="临近几桌提醒">
|
<el-form-item label="临近几桌提醒">
|
||||||
<el-input-number
|
<el-input-number step-strictly v-model="forms.nearNum" placeholder="请输入临近几桌提醒"></el-input-number>
|
||||||
step-strictly
|
|
||||||
v-model="forms.nearNum"
|
|
||||||
placeholder="请输入临近几桌提醒"
|
|
||||||
></el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="过号保留">
|
<el-form-item label="过号保留">
|
||||||
<el-input
|
<el-input v-model="forms.postponeNum" :disabled="!forms.isPostpone" placeholder="请输入名称">
|
||||||
v-model="forms.postponeNum"
|
|
||||||
:disabled="!forms.isPostpone"
|
|
||||||
placeholder="请输入名称"
|
|
||||||
>
|
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<div>
|
<div>
|
||||||
<span><el-checkbox v-model="forms.isPostpone">开启顺延</el-checkbox></span>
|
<span><el-checkbox v-model="forms.isPostpone">开启顺延</el-checkbox></span>
|
||||||
@@ -131,13 +105,10 @@
|
|||||||
<el-form-item label="" width="120">
|
<el-form-item label="" width="120">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div style="display: flex; gap: 10px">
|
<div style="display: flex; gap: 10px">
|
||||||
<el-button
|
<el-button plain @click="
|
||||||
plain
|
|
||||||
@click="
|
|
||||||
showLocation = false;
|
showLocation = false;
|
||||||
forms = {};
|
forms = {};
|
||||||
"
|
">
|
||||||
>
|
|
||||||
取消
|
取消
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="submitE">确定</el-button>
|
<el-button type="primary" @click="submitE">确定</el-button>
|
||||||
@@ -218,8 +189,11 @@ export default {
|
|||||||
const res = await callTableApi.deleteTable({
|
const res = await callTableApi.deleteTable({
|
||||||
callTableId: item.id,
|
callTableId: item.id,
|
||||||
});
|
});
|
||||||
ElSubMenu.success("删除成功");
|
console.log(res, '挑食 ');
|
||||||
|
if (res) {
|
||||||
this.init();
|
this.init();
|
||||||
|
ElSubMenu.success("删除成功");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,30 +6,27 @@
|
|||||||
<div>全部</div>
|
<div>全部</div>
|
||||||
<div>{{ tableData.totalCount || 0 }}桌</div>
|
<div>{{ tableData.totalCount || 0 }}桌</div>
|
||||||
<div class="postionStyle" v-if="selecttopType == ''">
|
<div class="postionStyle" v-if="selecttopType == ''">
|
||||||
<el-icon style="transform: translateY(-4px)" color="#fff"><Check /></el-icon>
|
<el-icon style="transform: translateY(-4px)" color="#fff">
|
||||||
|
<Check />
|
||||||
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li v-for="item in tableData.records" :key="item.id" @click="gettypeevent(item.id)"
|
||||||
v-for="item in tableData.records"
|
:class="[[selecttopType == item.id ? 'active' : '']]">
|
||||||
:key="item.id"
|
|
||||||
@click="gettypeevent(item.id)"
|
|
||||||
:class="[[selecttopType == item.id ? 'active' : '']]"
|
|
||||||
>
|
|
||||||
<div>{{ item.name }}</div>
|
<div>{{ item.name }}</div>
|
||||||
<div>{{ item.totalCount || 0 }}桌</div>
|
<div>{{ item.totalCount || 0 }}桌</div>
|
||||||
<div class="postionStyle" v-if="selecttopType == item.id">
|
<div class="postionStyle" v-if="selecttopType == item.id">
|
||||||
<el-icon style="transform: translateY(-4px)" color="#fff"><Check /></el-icon>
|
<el-icon style="transform: translateY(-4px)" color="#fff">
|
||||||
|
<Check />
|
||||||
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="buttonstyle">
|
<div class="buttonstyle">
|
||||||
<el-button
|
<el-button type="primary" @click="
|
||||||
type="primary"
|
|
||||||
@click="
|
|
||||||
dialogVisibles = true;
|
dialogVisibles = true;
|
||||||
phone = '';
|
phone = '';
|
||||||
"
|
">
|
||||||
>
|
|
||||||
取号
|
取号
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button plain type="primary" @click="toUrl">叫号记录</el-button>
|
<el-button plain type="primary" @click="toUrl">叫号记录</el-button>
|
||||||
@@ -65,10 +62,7 @@
|
|||||||
<el-dialog title="提示" v-model="dialogVisible" center width="30%">
|
<el-dialog title="提示" v-model="dialogVisible" center width="30%">
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<div style="font-size: 16px">正在叫号,请稍等</div>
|
<div style="font-size: 16px">正在叫号,请稍等</div>
|
||||||
<div
|
<div v-if="profilepicturedata.state == 1" style="color: #52c41a; font-size: 16px; margin-top: 17px">
|
||||||
v-if="profilepicturedata.state == 1"
|
|
||||||
style="color: #52c41a; font-size: 16px; margin-top: 17px"
|
|
||||||
>
|
|
||||||
已发送至用户
|
已发送至用户
|
||||||
<i class="el-icon-circle-check" style="color: #52c41a"></i>
|
<i class="el-icon-circle-check" style="color: #52c41a"></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -79,31 +73,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button
|
<el-button style="
|
||||||
style="
|
|
||||||
width: 176px;
|
width: 176px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
background: #f7f7fa;
|
background: #f7f7fa;
|
||||||
box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.02);
|
box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.02);
|
||||||
border-radius: 2px 2px 2px 2px;
|
border-radius: 2px 2px 2px 2px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0);
|
border: 1px solid rgba(255, 255, 255, 0);
|
||||||
"
|
" @click="dialogConfirm(2)">
|
||||||
@click="dialogConfirm(2)"
|
|
||||||
>
|
|
||||||
完成
|
完成
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="primary" style="
|
||||||
type="primary"
|
|
||||||
style="
|
|
||||||
width: 189px;
|
width: 189px;
|
||||||
height: 45px;
|
height: 45px;
|
||||||
background: #ff4d4f;
|
background: #ff4d4f;
|
||||||
box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.02);
|
box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.02);
|
||||||
border-radius: 2px 2px 2px 2px;
|
border-radius: 2px 2px 2px 2px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.28);
|
border: 1px solid rgba(255, 255, 255, 0.28);
|
||||||
"
|
" @click="dialogConfirm(3)">
|
||||||
@click="dialogConfirm(3)"
|
|
||||||
>
|
|
||||||
过号
|
过号
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
@@ -113,26 +100,20 @@
|
|||||||
<el-dialog title="取号" v-model="dialogVisibles" width="30%">
|
<el-dialog title="取号" v-model="dialogVisibles" width="30%">
|
||||||
<div>
|
<div>
|
||||||
<div style="color: #000">选择桌型</div>
|
<div style="color: #000">选择桌型</div>
|
||||||
<ul
|
<ul class="lineUpBoxUl" :class="[tableData.records.length > 2 ? 'dfs' : 'dfas']" style="margin-top: 10px">
|
||||||
class="lineUpBoxUl"
|
<li v-for="item in tableData.records" :key="item.id" @click="selectTabletype = item"
|
||||||
:class="[tableData.records.length > 2 ? 'dfs' : 'dfas']"
|
:class="[[selectTabletype.id == item.id ? 'active' : '']]">
|
||||||
style="margin-top: 10px"
|
|
||||||
>
|
|
||||||
<li
|
|
||||||
v-for="item in tableData.records"
|
|
||||||
:key="item.id"
|
|
||||||
@click="selectTabletype = item"
|
|
||||||
:class="[[selectTabletype.id == item.id ? 'active' : '']]"
|
|
||||||
>
|
|
||||||
<div>{{ item.name }}</div>
|
<div>{{ item.name }}</div>
|
||||||
<div>{{ item.totalCount }}桌</div>
|
<div>{{ item.totalCount }}桌</div>
|
||||||
<div class="postionStyle" v-if="selectTabletype.id == item.id">
|
<div class="postionStyle" v-if="selectTabletype.id == item.id">
|
||||||
<el-icon style="transform: translateY(-4px)" color="#fff"><Check /></el-icon>
|
<el-icon style="transform: translateY(-4px)" color="#fff">
|
||||||
|
<Check />
|
||||||
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div style="margin-top: 20px; color: #000">手机号码</div>
|
<div style="margin-top: 20px; color: #000">手机号码</div>
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px; border:1px solid #999">
|
||||||
<input v-model="phone" style="height: 30px" type="text" placeholder="填写号码" />
|
<input v-model="phone" style="height: 30px" type="text" placeholder="填写号码" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -178,9 +159,19 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
await this.getlist();
|
await this.getlist();
|
||||||
await this.getTableData();
|
// 获取桌台
|
||||||
|
await this.getTable();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async getTable() {
|
||||||
|
const res = await callTableApi.getTable({
|
||||||
|
page: 1,
|
||||||
|
size: 9999,
|
||||||
|
});
|
||||||
|
this.tableData.records = res.records
|
||||||
|
this.selectTabletype = res.records[0]
|
||||||
|
},
|
||||||
|
// 确认叫号
|
||||||
async callTabletakeNumberEvent() {
|
async callTabletakeNumberEvent() {
|
||||||
const res = await callTableApi.getTakeNumber({
|
const res = await callTableApi.getTakeNumber({
|
||||||
callTableId: this.selectTabletype.id,
|
callTableId: this.selectTabletype.id,
|
||||||
@@ -189,7 +180,6 @@ export default {
|
|||||||
name: this.selectTabletype.name,
|
name: this.selectTabletype.name,
|
||||||
});
|
});
|
||||||
if (res.callNum) {
|
if (res.callNum) {
|
||||||
this.getTableData();
|
|
||||||
this.getlist();
|
this.getlist();
|
||||||
this.dialogVisibles = false;
|
this.dialogVisibles = false;
|
||||||
}
|
}
|
||||||
@@ -212,7 +202,7 @@ export default {
|
|||||||
|
|
||||||
async profilepicture(d) {
|
async profilepicture(d) {
|
||||||
this.handleSpeak("请" + d.callNum + "用餐");
|
this.handleSpeak("请" + d.callNum + "用餐");
|
||||||
let res = await callTablecall({
|
let res = await callTableApi.callTableCall({
|
||||||
shopId: localStorage.getItem("shopId"),
|
shopId: localStorage.getItem("shopId"),
|
||||||
callQueueId: d.id,
|
callQueueId: d.id,
|
||||||
});
|
});
|
||||||
@@ -224,40 +214,25 @@ export default {
|
|||||||
},
|
},
|
||||||
gettypeevent(d) {
|
gettypeevent(d) {
|
||||||
this.selecttopType = d;
|
this.selecttopType = d;
|
||||||
this.getTableData();
|
|
||||||
this.getlist();
|
this.getlist();
|
||||||
},
|
},
|
||||||
async dialogConfirm(value, item) {
|
async dialogConfirm(value, item) {
|
||||||
if (value == 1) {
|
if (value == 1) {
|
||||||
const res = await callTableput({
|
const res = await callTableApi.updateTableState({
|
||||||
shopId: localStorage.getItem("shopId"),
|
shopId: localStorage.getItem("shopId"),
|
||||||
state: -1,
|
state: -1,
|
||||||
callQueueId: item.id,
|
callQueueId: item.id,
|
||||||
});
|
});
|
||||||
if (res) {
|
if (res) {
|
||||||
this.getTableData();
|
|
||||||
this.getlist();
|
this.getlist();
|
||||||
}
|
}
|
||||||
} else if (value == 2) {
|
} else {
|
||||||
const res = await callTableput({
|
const res = await callTableApi.updateTableState({
|
||||||
shopId: localStorage.getItem("shopId"),
|
shopId: localStorage.getItem("shopId"),
|
||||||
state: 2,
|
state: value,
|
||||||
callQueueId: this.profilepictureInfo.id,
|
callQueueId: this.profilepictureInfo.id,
|
||||||
});
|
});
|
||||||
if (res) {
|
if (res) {
|
||||||
this.getTableData();
|
|
||||||
this.getlist();
|
|
||||||
this.dialogVisible = false;
|
|
||||||
}
|
|
||||||
} else if (value == 3) {
|
|
||||||
const res = await callTableput({
|
|
||||||
shopId: localStorage.getItem("shopId"),
|
|
||||||
|
|
||||||
state: 3,
|
|
||||||
callQueueId: this.profilepictureInfo.id,
|
|
||||||
});
|
|
||||||
if (res) {
|
|
||||||
this.getTableData();
|
|
||||||
this.getlist();
|
this.getlist();
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
}
|
}
|
||||||
@@ -266,21 +241,6 @@ export default {
|
|||||||
toUrl() {
|
toUrl() {
|
||||||
this.$router.push({ path: "/application/lineUpRecord" });
|
this.$router.push({ path: "/application/lineUpRecord" });
|
||||||
},
|
},
|
||||||
// 获取商品列表
|
|
||||||
async getTableData() {
|
|
||||||
try {
|
|
||||||
const res = await callTableApi.getTableNumberList({
|
|
||||||
page: 1,
|
|
||||||
size: 10,
|
|
||||||
});
|
|
||||||
// this.tableData.loading = false
|
|
||||||
this.tableData = res;
|
|
||||||
this.selectTabletype = res.records[0];
|
|
||||||
// this.tableData.total = res.totalElements
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async getlist() {
|
async getlist() {
|
||||||
const res = await callTableApi.getTableNumberList({
|
const res = await callTableApi.getTableNumberList({
|
||||||
page: 1,
|
page: 1,
|
||||||
@@ -314,8 +274,7 @@ li {
|
|||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lineUpBox {
|
.lineUpBox {}
|
||||||
}
|
|
||||||
|
|
||||||
.lineUpBoxTop {
|
.lineUpBoxTop {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -326,6 +285,7 @@ li {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
>li {
|
>li {
|
||||||
border-radius: 4px 4px 4px 4px;
|
border-radius: 4px 4px 4px 4px;
|
||||||
border: 1px solid #dddfe6;
|
border: 1px solid #dddfe6;
|
||||||
@@ -455,6 +415,7 @@ li {
|
|||||||
position: relative;
|
position: relative;
|
||||||
min-width: 110px;
|
min-width: 110px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
>div {
|
>div {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
color: #999;
|
color: #999;
|
||||||
|
|||||||
Reference in New Issue
Block a user