代码更新

This commit is contained in:
GaoHao
2025-02-26 19:46:20 +08:00
parent 7519ffced3
commit b4a0393d2d
413 changed files with 7483 additions and 60762 deletions

View File

@@ -67,7 +67,7 @@
<view class="">
<span></span>
<span>取号</span>
<up-icon @tap="confirm" name="close-circle-fill"></up-icon>
<up-icon @tap="datas.show = false" name="close-circle-fill"></up-icon>
</view>
<view class="">
选择桌型
@@ -84,7 +84,7 @@
手机号码
</view>
<view style="margin-bottom: 48rpx;">
<input v-model="datas.phone" type="text" placeholder="填写号码" />
<input v-model="datas.phone" type="text" placeholder="填写号码" maxlength="11"/>
</view>
<up-button text="确认取号" @tap="callTabletakeNumberEvent" type="primary" class="buttomStyle"
shape="circle"></up-button>
@@ -111,19 +111,11 @@
</template>
<script setup>
import {
reactive,
getCurrentInstance,
onMounted
} from 'vue';
import {
callTable,
callTablequeue,
callTabletakeNumber,
callTableput,
callTablecall
} from '@/http/yskApi/requestAll.js';
import { reactive, getCurrentInstance, onMounted } from 'vue';
import go from '@/commons/utils/go.js'
import { getCallTableQueue, getCallTable, callTableTakeNumber, callTableCall, updateCallTableState } from '@/api/callTable.js'
let getrefs = getCurrentInstance()
let datas = reactive({
msgType: "",
@@ -150,50 +142,21 @@
onMounted(() => {
getList()
})
const confirm = () => {
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: 2,
callQueueId: datas.dialId
}).then((res) => {
getList()
})
}
}
function gettypeevent(d) {
datas.selecttopType = d
getList()
}
/**
* 获取列表
*/
function getList() {
callTable({
shopId: uni.getStorageSync('shopId'),
getCallTable({
page: 1,
size: 10,
size: 9999,
callTableId: datas.selecttopType,
state: 1
}).then((res) => {
datas.list = res
datas.selectTabletype = res.records[0]
})
callTablequeue({
shopId: uni.getStorageSync('shopId'),
getCallTableQueue({
page: 1,
size: 9999,
callTableId: datas.selecttopType,
@@ -202,25 +165,21 @@
datas.listType = res
})
}
function quxiaoevent(item) {
callTableput({
shopId: uni.getStorageSync('shopId'),
state: -1,
callQueueId: item.id
}).then((res) => {
getList()
})
}
/**
* 选择桌型
* @param {Object} d
*/
function selectTypeEvent(d) {
datas.selectTabletype = d
}
/**
* 取号
*/
function callTabletakeNumberEvent() {
callTabletakeNumber({
callTableTakeNumber({
callTableId: datas.selectTabletype.id,
shopId: uni.getStorageSync('shopId'),
phone: datas.phone,
note: datas.selectTabletype.note,
name: datas.selectTabletype.name,
@@ -236,23 +195,83 @@
})
}
function showFalse() {
datas.show = true;
}
/**
* 叫号
* @param {Object} item
*/
function profilepicture(item) {
datas.dialId = item.id
callTablecall({
shopId: uni.getStorageSync('shopId'),
callTableCall({
callQueueId: item.id
}).then((res) => {
datas.profilepicturedata = res
getrefs.ctx.$refs.alertDialog.open()
})
}
/**
* 修改叫号状态
* @param {Object} value
*/
function dialogConfirm(value) {
if (value == 1) {
updateCallTableState({
state: 3,
callQueueId: datas.dialId
}).then((res) => {
getList()
})
} else {
// value=2完成
updateCallTableState({
state: 2,
callQueueId: datas.dialId
}).then((res) => {
getList()
})
}
}
/**
* 切换筛选桌型
* @param {Object} d
*/
function gettypeevent(d) {
datas.selecttopType = d
getList()
}
/**
* 取消排队
* @param {Object} item
*/
function quxiaoevent(item) {
updateCallTableState({
state: -1,
callQueueId: item.id
}).then((res) => {
getList()
})
}
/**
* 取号
*/
function showFalse() {
datas.show = true;
}
/**
* 关闭取号成功弹窗
*/
const confirmtow = () => {
datas.showtwo = false;
};
/**
* 前往叫号记录
*/
function toUrl() {
go.to('PAGES_CALLRE_CORD')
}