排队
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<ul class="callRecord">
|
<ul class="callRecord">
|
||||||
<li>
|
<li v-for="item in datas.list" :key="item.id">
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
A6
|
{{item.callNum}}
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
(1-2人)
|
({{item.note}})
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rightTop">
|
<view :class="[item.state==3?'rightTopstyle':'rightTop']">
|
||||||
已完成
|
{{filterEvent(item.state)}}
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
时间
|
时间
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
2024-05-11 10:22:15
|
{{item.callTime}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
@@ -26,38 +26,7 @@
|
|||||||
手机号
|
手机号
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
153092768942
|
{{item.phone}}
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<view>
|
|
||||||
<view>
|
|
||||||
A6
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
(1-2人)
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="rightTop">
|
|
||||||
已完成
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<view>
|
|
||||||
<view>
|
|
||||||
时间
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
2024-05-11 10:22:15
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<view>
|
|
||||||
手机号
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
153092768942
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -67,15 +36,34 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
onMounted
|
onMounted,
|
||||||
|
reactive
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
import {
|
||||||
callTablecallRecord,
|
callTablecallRecord,
|
||||||
} from '@/http/yskApi/requestAll.js';
|
} from '@/http/yskApi/requestAll.js';
|
||||||
|
let datas = reactive({
|
||||||
|
list: ""
|
||||||
|
})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function filterEvent(i) {
|
||||||
|
// -1已取消 0排队中 1叫号中 2已入座 3 已过号
|
||||||
|
if (i == -1) {
|
||||||
|
return '已取消'
|
||||||
|
} else if (i == 0) {
|
||||||
|
return '排队中'
|
||||||
|
} else if (i == 1) {
|
||||||
|
return '叫号中'
|
||||||
|
} else if (i == 2) {
|
||||||
|
return '已入座'
|
||||||
|
} else if (i == 3) {
|
||||||
|
return '已过号 '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
callTablecallRecord({
|
callTablecallRecord({
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync('shopId'),
|
||||||
@@ -83,6 +71,7 @@
|
|||||||
size: 9999
|
size: 9999
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res, '调试1')
|
console.log(res, '调试1')
|
||||||
|
datas.list = res.records
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -180,6 +169,25 @@
|
|||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rightTopstyle {
|
||||||
|
position: absolute;
|
||||||
|
right: 0rpx;
|
||||||
|
top: 0;
|
||||||
|
|
||||||
|
width: 94rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
text-align: center;
|
||||||
|
background: #9a9a9a;
|
||||||
|
border-radius: 0rpx 8rpx 0rpx 8rpx;
|
||||||
|
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<view v-for='item in datas.list.records' :key="item.id" @tap="gettypeevent(item.id)"
|
<view v-for='item in datas.list.records' :key="item.id" @tap="gettypeevent(item.id)"
|
||||||
:class="[[datas.selecttopType==item.id?'active':'']]">
|
:class="[[datas.selecttopType==item.id?'active':'']]">
|
||||||
<view style="border-bottom: 1px dashed #ccc;line-height: 70rpx;">{{item.name}}</view>
|
<view style="border-bottom: 1px dashed #ccc;line-height: 70rpx;">{{item.name}}</view>
|
||||||
<view style="line-height: 50rpx;">{{item.totalCount}}桌</view>
|
<view style="line-height: 50rpx;color: #999;">{{item.totalCount}}桌({{item.note}})</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="userinfo">
|
<view class="userinfo">
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<span>{{item.waitingCount}}桌</span>
|
<span>{{item.waitingCount}}桌</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="userinfo2">
|
<view class="userinfo2">
|
||||||
<view>{{item.note}}</view>
|
<view>{{item.name}}{{item.note}}</view>
|
||||||
<button type="primary" class="mini-btn" size="mini" style="border-radius: 200rpx;" @tap="quxiaoevent(item)"
|
<button type="primary" class="mini-btn" size="mini" style="border-radius: 200rpx;" @tap="quxiaoevent(item)"
|
||||||
plain="true">取消</button>
|
plain="true">取消</button>
|
||||||
<button class="mini-btn" type="primary" style="border-radius: 200rpx;" @tap="profilepicture(item)"
|
<button class="mini-btn" type="primary" style="border-radius: 200rpx;" @tap="profilepicture(item)"
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
<!-- 播报弹窗 -->
|
<!-- 播报弹窗 -->
|
||||||
<uni-popup ref="alertDialog" type="dialog">
|
<uni-popup ref="alertDialog" type="dialog">
|
||||||
<uni-popup-dialog :type="datas.msgType" cancelText="完成" confirmText="过号" confirmText-color="#000" title="播报"
|
<uni-popup-dialog :type="datas.msgType" cancelText="完成" confirmText="过号" confirmText-color="#000" title="播报"
|
||||||
content="通知消息已发送" @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
|
content="通知消息已发送" @confirm="dialogConfirm(1)" @close="dialogConfirm(2)"></uni-popup-dialog>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
<!-- 取号遮罩层 -->
|
<!-- 取号遮罩层 -->
|
||||||
<up-popup :show="datas.show" :round="18" mode="center" @close="close" @open="open">
|
<up-popup :show="datas.show" :round="18" mode="center" @close="close" @open="open">
|
||||||
@@ -78,7 +78,23 @@
|
|||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
<!-- 取号成功 -->
|
<!-- 取号成功 -->
|
||||||
<up-toast ref="uToastRef"></up-toast>
|
<up-popup :show="datas.showtwo" :round="18" mode="center" @close="close" @open="open">
|
||||||
|
<view class="zhezhaopops">
|
||||||
|
<view class="">
|
||||||
|
<span></span>
|
||||||
|
<span>取号成功</span>
|
||||||
|
<up-icon @tap="confirmtow" name="close-circle-fill"></up-icon>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{datas.showtowData.callNum}}
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{datas.showtowData.tableName}} ({{datas.showtowData.tableNote}})
|
||||||
|
</view>
|
||||||
|
<up-button text="确认" @tap="confirmtow" type="primary" class="buttomStyle" shape="circle"></up-button>
|
||||||
|
</view>
|
||||||
|
</up-popup>
|
||||||
|
<!-- <up-toast ref="uToastRef"></up-toast> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -100,6 +116,8 @@
|
|||||||
msgType: "",
|
msgType: "",
|
||||||
// 关闭取号弹窗
|
// 关闭取号弹窗
|
||||||
show: false,
|
show: false,
|
||||||
|
showtwo: false,
|
||||||
|
showtowData: "",
|
||||||
// 桌形列表
|
// 桌形列表
|
||||||
list: [],
|
list: [],
|
||||||
// 正在排号
|
// 正在排号
|
||||||
@@ -110,6 +128,8 @@
|
|||||||
phone: null,
|
phone: null,
|
||||||
// 顶部全部\大桌选择
|
// 顶部全部\大桌选择
|
||||||
selecttopType: '',
|
selecttopType: '',
|
||||||
|
// 选中拨号的id
|
||||||
|
dialId: ""
|
||||||
})
|
})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
@@ -117,6 +137,30 @@
|
|||||||
const confirm = () => {
|
const confirm = () => {
|
||||||
datas.show = false;
|
datas.show = false;
|
||||||
};
|
};
|
||||||
|
const confirmtow = () => {
|
||||||
|
datas.showtwo = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
function dialogConfirm(value) {
|
||||||
|
if (value == 1) {
|
||||||
|
callTableput({
|
||||||
|
shopId: uni.getStorageSync('shopId'),
|
||||||
|
state: 3,
|
||||||
|
callQueueId: datas.dialId
|
||||||
|
}).then((res) => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// value=2完成
|
||||||
|
callTableput({
|
||||||
|
shopId: uni.getStorageSync('shopId'),
|
||||||
|
state: 1,
|
||||||
|
callQueueId: datas.dialId
|
||||||
|
}).then((res) => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function gettypeevent(d) {
|
function gettypeevent(d) {
|
||||||
datas.selecttopType = d
|
datas.selecttopType = d
|
||||||
@@ -167,16 +211,21 @@
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
datas.show = false;
|
datas.show = false;
|
||||||
|
datas.showtwo = true;
|
||||||
|
datas.showtowData = res
|
||||||
|
datas.phone = ''
|
||||||
|
getList()
|
||||||
// 取号成功
|
// 取号成功
|
||||||
getrefs.ctx.$refs.uToastRef.show({
|
// getrefs.ctx.$refs.uToastRef.show({
|
||||||
type: 'default',
|
// type: 'default',
|
||||||
title: '默认主题',
|
// title: '默认主题',
|
||||||
message: "取号成功",
|
// message: "取号成功",
|
||||||
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png',
|
// iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png',
|
||||||
complete() {
|
// complete() {
|
||||||
getList()
|
// datas.phone = ''
|
||||||
}
|
// getList()
|
||||||
});
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -187,6 +236,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function profilepicture(item) {
|
function profilepicture(item) {
|
||||||
|
datas.dialId = item.id
|
||||||
callTablecall({
|
callTablecall({
|
||||||
shopId: uni.getStorageSync('shopId'),
|
shopId: uni.getStorageSync('shopId'),
|
||||||
callQueueId: item.id
|
callQueueId: item.id
|
||||||
@@ -296,14 +346,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bottomBUtton {
|
.bottomBUtton {
|
||||||
width: 530rpx;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 200rpx;
|
||||||
|
background-color: #fff;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 160rpx;
|
bottom: 0;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%);
|
transform: translate(-50%);
|
||||||
|
padding-top: 24rpx;
|
||||||
|
|
||||||
>button {
|
>button {
|
||||||
|
width: 530rpx;
|
||||||
background: #318AFE;
|
background: #318AFE;
|
||||||
border-radius: 200rpx;
|
border-radius: 200rpx;
|
||||||
}
|
}
|
||||||
@@ -371,6 +424,51 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.zhezhaopops {
|
||||||
|
padding: 34rpx 32rpx;
|
||||||
|
width: 594rpx;
|
||||||
|
height: 508rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
// border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||||
|
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||||
|
|
||||||
|
>view:first-child {
|
||||||
|
|
||||||
|
.df;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
>span:nth-child(2) {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>view:nth-child(2) {
|
||||||
|
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 80rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-top: 64rpx;
|
||||||
|
margin-left: 34%;
|
||||||
|
}
|
||||||
|
|
||||||
|
>view:nth-child(3) {
|
||||||
|
margin-top: 48rpx;
|
||||||
|
margin-left: 34%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.buttomStyle {
|
||||||
|
margin-top: 48rpx;
|
||||||
|
width: 506rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.df {
|
.df {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user