tapd相关修改更新
This commit is contained in:
@@ -12,8 +12,9 @@
|
||||
<up-icon name="arrow-down" size="16"></up-icon>
|
||||
</view>
|
||||
<uni-easyinput clearable class='jeepay-search' :inputBorder="false"
|
||||
trim="all"
|
||||
placeholder="搜索" v-model="search.keyword"
|
||||
trim="all"
|
||||
placeholder="搜索"
|
||||
v-model="pageData.query.name"
|
||||
@clear="searchConfirm"
|
||||
@confirm="searchConfirm">
|
||||
<template #prefixIcon>
|
||||
@@ -29,7 +30,7 @@
|
||||
<view @tap="changestatusActive(index,item)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
|
||||
v-for="(item,index) in status.list" :key="index">
|
||||
<view>{{item.label}}</view>
|
||||
<uni-icons v-if="status.active===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
|
||||
<uni-icons v-if="status.active===index" type="checkmarkempty" :color="$utils.ColorMain"></uni-icons>
|
||||
</view>
|
||||
<view :style="{height: status.bottomHeight+'px'}"></view>
|
||||
</view>
|
||||
@@ -58,7 +59,7 @@
|
||||
<table-item @bind="scanCode" @update="getTable" :areaMap="pageData.areaMap" @more="moreShow(item)" :data="item"></table-item>
|
||||
</view>
|
||||
</view>
|
||||
<my-pagination :page="pageData.query.page" :totalElements="pageData.query.totalElements" :size="pageData.query.size"
|
||||
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size"
|
||||
@change="pageChange"></my-pagination>
|
||||
</template>
|
||||
|
||||
@@ -79,27 +80,20 @@
|
||||
<script setup>
|
||||
import { onLoad, onReady, onShow, } from '@dcloudio/uni-app';
|
||||
import { ref, reactive, computed, watch } from 'vue';
|
||||
import {
|
||||
$table,
|
||||
$tableArea,
|
||||
$bind
|
||||
} from '@/http/yskApi/table.js'
|
||||
|
||||
import { objToArrary } from '@/commons/utils/returrn-data.js'
|
||||
import { $status } from '@/commons/table-status.js'
|
||||
import color from '@/commons/color';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import myMask from '@/components/my-components/my-mask'
|
||||
import addTable from './components/add-table'
|
||||
import myActionSheet from '@/components/my-components/my-action-sheet';
|
||||
import tableItem from './components/table-item'
|
||||
import * as $fun from './util.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
||||
import { getShopTable, shopTableBind, shopTableClear } from '@/http/api/table.js'
|
||||
import { getShopArea } from '@/http/api/area.js'
|
||||
import { printOrder } from '@/http/api/order.js'
|
||||
|
||||
const statusList = objToArrary($status)
|
||||
console.log(statusList)
|
||||
statusList.unshift({
|
||||
key: '',
|
||||
label: '全部'
|
||||
@@ -119,8 +113,9 @@
|
||||
size: 10,
|
||||
status: '',
|
||||
areaId: '',
|
||||
totalElements:0
|
||||
name: '',
|
||||
},
|
||||
totalElements:0,
|
||||
tabList: [],
|
||||
area: {
|
||||
list: [],
|
||||
@@ -128,7 +123,6 @@
|
||||
}
|
||||
})
|
||||
const search = reactive({
|
||||
keyword: '',
|
||||
show: false
|
||||
})
|
||||
const refMoreSheet = ref(null)
|
||||
@@ -166,7 +160,7 @@
|
||||
const res = await getShopTable(pageData.query)
|
||||
pageData.hasAjax = true
|
||||
pageData.tabList = res.records
|
||||
pageData.query.totalElements= res.totalRow
|
||||
pageData.totalElements = res.totalRow
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,9 +203,9 @@
|
||||
const item = actionSheet.selTable
|
||||
if (index == 0) {
|
||||
if (!item.orderId) {
|
||||
return infoBox.showToast('该桌台暂无要结账的订单!')
|
||||
return uni.$utils.showToast('该桌台暂无要结账的订单!')
|
||||
}
|
||||
const canJieZhang=await hasPermission('允许收款')
|
||||
const canJieZhang = await hasPermission('允许收款')
|
||||
if(!canJieZhang){
|
||||
return
|
||||
}
|
||||
@@ -227,7 +221,7 @@
|
||||
shopTableClear({
|
||||
id: item.id,
|
||||
}).then(res => {
|
||||
infoBox.showToast('清台成功')
|
||||
uni.$utils.showToast('清台成功')
|
||||
pageData.query.page = 1
|
||||
getTable()
|
||||
})
|
||||
@@ -236,14 +230,17 @@
|
||||
})
|
||||
}
|
||||
if (index == 2) {
|
||||
return infoBox.showToast('待开放,请敬请期待!')
|
||||
return uni.$utils.showToast('待开放,请敬请期待!')
|
||||
}
|
||||
if (index == 3) {
|
||||
return infoBox.showToast('待开放,请敬请期待!')
|
||||
return uni.$utils.showToast('待开放,请敬请期待!')
|
||||
}
|
||||
if (index == 4) {
|
||||
//打印订单
|
||||
const res = await $fun.printOrder(actionSheet.selTable.tableId)
|
||||
if (!item.orderId) {
|
||||
return uni.$utils.showToast('该桌台暂无要打印的订单!')
|
||||
}
|
||||
let res = await printOrder( {id: actionSheet.selTable.orderId } )
|
||||
return
|
||||
}
|
||||
if (index == 6) {
|
||||
@@ -251,7 +248,7 @@
|
||||
scanCode(item)
|
||||
return
|
||||
}
|
||||
infoBox.showToast('待开放,请敬请期待!')
|
||||
uni.$utils.showToast('待开放,请敬请期待!')
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -275,7 +272,7 @@
|
||||
function scanCode(item) {
|
||||
console.log(item)
|
||||
if ( item.tableCode != '') {
|
||||
infoBox.showToast('当前桌台已绑定')
|
||||
uni.$utils.showToast('当前桌台已绑定')
|
||||
return;
|
||||
}
|
||||
uni.scanCode({
|
||||
@@ -288,7 +285,7 @@
|
||||
"tableCode": params.code,
|
||||
"id": item.id,
|
||||
}).then(res => {
|
||||
infoBox.showToast('桌台绑定成功')
|
||||
uni.$utils.showToast('桌台绑定成功')
|
||||
setTimeout(()=>{
|
||||
getTable()
|
||||
},1500)
|
||||
|
||||
Reference in New Issue
Block a user