代码更新

This commit is contained in:
GaoHao
2025-03-04 18:30:16 +08:00
parent fd0c452a76
commit 4f65b08c06
32 changed files with 622 additions and 1616 deletions

View File

@@ -88,6 +88,7 @@
$table,
tableswitch
} from '@/http/yskApi/table.js'
import { getShopTable } from '@/api/table.js'
let datas = reactive({
current: 0,
item: "",
@@ -108,10 +109,28 @@
})
onLoad((opt) => {
datas.item = JSON.parse(opt.item)
console.log(datas.item)
})
onShow(() => {
gettableList()
})
/**
* 获取桌台
*/
async function gettableList() {
const res = await getShopTable({
status: 'idle',
})
let arr = []
res.records.forEach((ele) => {
if (ele.status == 'using' && props.tableId != ele.tableId) {
arr.push(ele)
}
});
datas.tableList = arr
}
async function confirm() {
// 是否选择其他桌
if (datas.selecttableList) {
@@ -167,20 +186,7 @@
datas.current = e.currentIndex
}
}
// 获取桌台
async function gettableList() {
const res = await $table.get({
page: 1,
size: 999
})
let arr = []
res.content.forEach((ele) => {
if (ele.status == 'using' && props.tableId != ele.tableId) {
arr.push(ele)
}
});
datas.tableList = arr
}
function formatPrice(n) {
return Number(n).toFixed(2)