拉取代码
This commit is contained in:
parent
9821d970a3
commit
00e77f4fce
|
|
@ -17,4 +17,53 @@ export function dateProduct(params) {
|
|||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 桌型列表
|
||||
export function callTable(params) {
|
||||
return request({
|
||||
url: '/callTable',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 排队列表
|
||||
export function callTablequeue(params) {
|
||||
return request({
|
||||
url: '/callTable/queue',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 取号
|
||||
export function callTabletakeNumber(data) {
|
||||
return request({
|
||||
url: '/callTable/takeNumber',
|
||||
method: 'post',
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function callTablecallRecord(params) {
|
||||
return request({
|
||||
url: '/callTable/callRecord',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function callTableput(data) {
|
||||
return request({
|
||||
url: `/callTable/updateState`,
|
||||
method: "put",
|
||||
data
|
||||
});
|
||||
}
|
||||
// 叫号
|
||||
export function callTablecall(data) {
|
||||
return request({
|
||||
url: `/callTable/call`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 32 32"><defs><style>.a{fill:#fff;stroke:#707070;}.b{clip-path:url(#a);}.c{fill:#f8f8f8;}.d{fill:#e9ecee;}</style><clipPath id="a"><circle class="a" cx="16" cy="16" r="16" transform="translate(-7196 16482)"/></clipPath></defs><g class="b" transform="translate(7196 -16482)"><rect class="c" width="33" height="33" rx="3" transform="translate(-7196 16481)"/><path class="d" d="M73.653,35.487a7.5,7.5,0,1,0-7.634-7.5A7.579,7.579,0,0,0,73.653,35.487Zm1.984.722h-3.4c-5.315,0-10.8,3.084-10.8,8.306v1.724c0,2.729,4.255,2.729,9.64,2.729H76.8c5.173,0,9.64,0,9.64-2.73V44.514c0-5.22-5.487-8.305-10.8-8.305Z" transform="translate(-7253.44 16465.031)"/></g></svg>
|
||||
|
After Width: | Height: | Size: 770 B |
|
|
@ -0,0 +1,187 @@
|
|||
<template>
|
||||
<ul class="callRecord">
|
||||
<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>
|
||||
</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>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onMounted
|
||||
} from 'vue';
|
||||
import {
|
||||
callTablecallRecord,
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
function getList() {
|
||||
callTablecallRecord({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
page: 1,
|
||||
size: 9999
|
||||
}).then((res) => {
|
||||
console.log(res, '调试1')
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.callRecord {
|
||||
|
||||
>li {
|
||||
width: 694rpx;
|
||||
height: 166rpx;
|
||||
margin: 32rpx auto;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
>view:first-child {
|
||||
padding: 0 58rpx;
|
||||
|
||||
>view:first-child {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 56rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
height: 120rpx;
|
||||
border-left: 2rpx solid #E5E5E5;
|
||||
padding-left: 32rpx;
|
||||
|
||||
>view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 24rpx;
|
||||
|
||||
>view:first-child {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
width: 90rpx;
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rightTop {
|
||||
position: absolute;
|
||||
right: 0rpx;
|
||||
top: 0;
|
||||
|
||||
width: 94rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
background: #4394FD;
|
||||
border-radius: 0rpx 8rpx 0rpx 8rpx;
|
||||
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,378 @@
|
|||
<template>
|
||||
<view class="pageLineUpTop">
|
||||
<view :class="[[datas.selecttopType==''?'active':'']]" @tap="gettypeevent('')">
|
||||
<view style="border-bottom: 1px dashed #ccc;line-height: 70rpx;">全部</view>
|
||||
<view style="line-height: 50rpx;">{{datas.list.totalCount}}桌</view>
|
||||
</view>
|
||||
<view v-for='item in datas.list.records' :key="item.id" @tap="gettypeevent(item.id)"
|
||||
:class="[[datas.selecttopType==item.id?'active':'']]">
|
||||
<view style="border-bottom: 1px dashed #ccc;line-height: 70rpx;">{{item.name}}</view>
|
||||
<view style="line-height: 50rpx;">{{item.totalCount}}桌</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="userinfo">
|
||||
<view>用户</view>
|
||||
<span>号码</span>
|
||||
<span>等待</span>
|
||||
</view>
|
||||
<view class="userinfoBox" v-for="item in datas.listType.records" :key="item.id">
|
||||
<view class="userinfo1">
|
||||
<view>
|
||||
<image src="./avation.svg" style="width: 64rpx;height: 64rpx;margin-right: 16rpx;" mode=""></image>
|
||||
<view>
|
||||
<view>
|
||||
{{item.phone}}
|
||||
</view>
|
||||
<view>
|
||||
{{item.callTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<span>{{item.callNum}}</span>
|
||||
<span>{{item.waitingCount}}桌</span>
|
||||
</view>
|
||||
<view class="userinfo2">
|
||||
<view>{{item.note}}</view>
|
||||
<button type="primary" class="mini-btn" size="mini" style="border-radius: 200rpx;" @tap="quxiaoevent(item)"
|
||||
plain="true">取消</button>
|
||||
<button class="mini-btn" type="primary" style="border-radius: 200rpx;" @tap="profilepicture(item)"
|
||||
size="mini">播报</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottomBUtton">
|
||||
<button class="mini-btn" type="primary" @tap="showFalse">取号</button>
|
||||
<button type="text" class="mini-btn" plain="true" @tap="toUrl">叫号记录</button>
|
||||
</view>
|
||||
<!-- 播报弹窗 -->
|
||||
<uni-popup ref="alertDialog" type="dialog">
|
||||
<uni-popup-dialog :type="datas.msgType" cancelText="完成" confirmText="过号" confirmText-color="#000" title="播报"
|
||||
content="通知消息已发送" @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
<!-- 取号遮罩层 -->
|
||||
<up-popup :show="datas.show" :round="18" mode="center" @close="close" @open="open">
|
||||
<view class="zhezhaopop">
|
||||
<view class="">
|
||||
<span></span>
|
||||
<span>取号</span>
|
||||
<up-icon @tap="confirm" name="close-circle-fill"></up-icon>
|
||||
</view>
|
||||
<view class="">
|
||||
选择桌型
|
||||
</view>
|
||||
<view class="pageLineUpTop">
|
||||
<view v-for='item in datas.list.records' :key="item.id"
|
||||
:class="[datas.selectTabletype.id==item.id?'active':'']" @tap="selectTypeEvent(item)">
|
||||
<view style="border-bottom: 1px dashed #ccc;line-height: 70rpx;">{{item.name}}</view>
|
||||
<view style="line-height: 50rpx;">等待{{item.totalCount}}桌</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="">
|
||||
手机号码
|
||||
</view>
|
||||
<view class="">
|
||||
<input v-model="datas.phone" type="text" placeholder="填写号码" />
|
||||
</view>
|
||||
<up-button text="确认取号" @tap="callTabletakeNumberEvent" type="primary" class="buttomStyle"
|
||||
shape="circle"></up-button>
|
||||
</view>
|
||||
</up-popup>
|
||||
<!-- 取号成功 -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
getCurrentInstance,
|
||||
onMounted
|
||||
} from 'vue';
|
||||
import {
|
||||
callTable,
|
||||
callTablequeue,
|
||||
callTabletakeNumber,
|
||||
callTableput,
|
||||
callTablecall
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
import go from '@/commons/utils/go.js'
|
||||
let getrefs = getCurrentInstance()
|
||||
let datas = reactive({
|
||||
msgType: "",
|
||||
// 关闭取号弹窗
|
||||
show: false,
|
||||
// 桌形列表
|
||||
list: [],
|
||||
// 正在排号
|
||||
listType: [],
|
||||
// 选中的桌型
|
||||
selectTabletype: undefined,
|
||||
// 手机号
|
||||
phone: null,
|
||||
// 顶部全部\大桌选择
|
||||
selecttopType: '',
|
||||
})
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
const confirm = () => {
|
||||
datas.show = false;
|
||||
};
|
||||
|
||||
function gettypeevent(d) {
|
||||
datas.selecttopType = d
|
||||
getList()
|
||||
}
|
||||
|
||||
function getList() {
|
||||
callTable({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
page: 1,
|
||||
size: 10,
|
||||
}).then((res) => {
|
||||
datas.list = res
|
||||
datas.selectTabletype = res.records[0]
|
||||
})
|
||||
callTablequeue({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
page: 1,
|
||||
size: 9999,
|
||||
callTableId: datas.selecttopType,
|
||||
state: 0
|
||||
}).then((res) => {
|
||||
datas.listType = res
|
||||
})
|
||||
}
|
||||
|
||||
function quxiaoevent(item) {
|
||||
callTableput({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
state: -1,
|
||||
callQueueId: item.id
|
||||
}).then((res) => {
|
||||
getList()
|
||||
})
|
||||
}
|
||||
|
||||
function selectTypeEvent(d) {
|
||||
datas.selectTabletype = d
|
||||
}
|
||||
|
||||
function callTabletakeNumberEvent() {
|
||||
callTabletakeNumber({
|
||||
callTableId: datas.selectTabletype.id,
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
phone: datas.phone,
|
||||
note: datas.selectTabletype.note,
|
||||
name: datas.selectTabletype.name,
|
||||
}).then((res) => {
|
||||
if (res) {
|
||||
datas.show = false;
|
||||
// 取号成功
|
||||
getrefs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
title: '默认主题',
|
||||
message: "取号成功",
|
||||
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png',
|
||||
complete() {
|
||||
getList()
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function showFalse() {
|
||||
datas.show = true;
|
||||
}
|
||||
|
||||
function profilepicture(item) {
|
||||
callTablecall({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
callQueueId: item.id
|
||||
}).then(() => {
|
||||
// datas.msgType = type
|
||||
getrefs.ctx.$refs.alertDialog.open()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function toUrl() {
|
||||
go.to('PAGES_CALLRE_CORD')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
page {
|
||||
height: 100%;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.pageLineUpTop {
|
||||
.df;
|
||||
justify-content: space-around;
|
||||
margin: 36rpx 0;
|
||||
|
||||
>view {
|
||||
width: 208rpx;
|
||||
height: 136rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
|
||||
>view {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border: 2rpx solid #318AFE;
|
||||
|
||||
>view:first-child {
|
||||
color: #318AFE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.userinfo {
|
||||
width: 750rpx;
|
||||
height: 84rpx;
|
||||
background: #E9E9E9;
|
||||
border-radius: 12rpx 12rpx 0rpx 0rpx;
|
||||
padding: 0 44rpx;
|
||||
.df;
|
||||
justify-content: space-between;
|
||||
|
||||
>view:first-child {
|
||||
width: 300rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.userinfoBox {
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.userinfo1 {
|
||||
width: 750rpx;
|
||||
height: 84rpx;
|
||||
background: #fff;
|
||||
border-radius: 12rpx 12rpx 0rpx 0rpx;
|
||||
padding: 0 44rpx;
|
||||
.df;
|
||||
justify-content: space-between;
|
||||
padding-top: 32rpx;
|
||||
|
||||
>view:first-child {
|
||||
width: 280rpx;
|
||||
.df;
|
||||
}
|
||||
}
|
||||
|
||||
.userinfo2 {
|
||||
width: 750rpx;
|
||||
height: 84rpx;
|
||||
background: #fff;
|
||||
border-radius: 12rpx 12rpx 0rpx 0rpx;
|
||||
padding: 58rpx 0;
|
||||
padding-left: 44rpx;
|
||||
.df;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
// margin-top: 32rpx;
|
||||
|
||||
>view:first-child {
|
||||
margin-right: 260rpx;
|
||||
background: #E5E5E5;
|
||||
width: 130rpx;
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
text-align: center;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottomBUtton {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
position: fixed;
|
||||
bottom: 160rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
|
||||
>button {
|
||||
background: #318AFE;
|
||||
border-radius: 200rpx;
|
||||
}
|
||||
|
||||
>button:last-child {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border: none;
|
||||
color: #318AFE;
|
||||
}
|
||||
}
|
||||
|
||||
.zhezhaopop {
|
||||
padding: 34rpx 32rpx;
|
||||
width: 594rpx;
|
||||
height: 668rpx;
|
||||
background: #FFFFFF;
|
||||
// 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) {
|
||||
margin-top: 48rpx;
|
||||
}
|
||||
|
||||
>view:nth-child(3) {
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
>view:nth-child(4) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
>view:nth-child(5) {
|
||||
margin-top: 22rpx;
|
||||
|
||||
>input {
|
||||
width: 500rpx;
|
||||
height: 84rpx;
|
||||
padding-left: 24rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
// margin-top: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.buttomStyle {
|
||||
margin-top: 48rpx;
|
||||
width: 506rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.df {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
42
pages.json
42
pages.json
|
|
@ -1220,21 +1220,39 @@
|
|||
{
|
||||
"root": "pageSalesSummary",
|
||||
"pages": [{
|
||||
"pageId": "PAGES_SALES_SUMMARY",
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "销售汇总"
|
||||
"pageId": "PAGES_SALES_SUMMARY",
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "销售汇总"
|
||||
}
|
||||
}, {
|
||||
"pageId": "PAGES_PRODUCT_SALES_RANKING",
|
||||
"path": "productSalesRanking",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品销售排行"
|
||||
}
|
||||
}
|
||||
},{
|
||||
"pageId": "PAGES_PRODUCT_SALES_RANKING",
|
||||
"path": "productSalesRanking",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品销售排行"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pageLineUp",
|
||||
"pages": [{
|
||||
"pageId": "PAGES_LINE_UP",
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "排队"
|
||||
}
|
||||
},{
|
||||
"pageId": "PAGES_CALLRE_CORD",
|
||||
"path": "callRecord",
|
||||
"style": {
|
||||
"navigationBarTitleText": "叫号记录"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"root": "pageConsumables",
|
||||
"pages": [{
|
||||
|
|
|
|||
|
|
@ -71,6 +71,10 @@
|
|||
title: '桌台',
|
||||
icon: '/static/indexImg/icon-table.svg',
|
||||
pageUrl: 'PAGES_TABLE'
|
||||
},{
|
||||
title: '排队',
|
||||
icon: '/static/indexImg/icon-table.svg',
|
||||
pageUrl: 'PAGES_LINE_UP'
|
||||
},
|
||||
{
|
||||
title: '代客下单',
|
||||
|
|
|
|||
Loading…
Reference in New Issue