增加台桌增减菜功能

This commit is contained in:
2026-04-09 16:16:52 +08:00
parent 5032b86d69
commit e51e2f4298
2 changed files with 562 additions and 478 deletions

View File

@@ -15,41 +15,48 @@
</view>
</view>
<view class="u-flex u-flex-col u-row-center u-col-center bg-fff bottom">
<template v-if="data.status != 'using'">
<view class="u-font-32" :style="{ color: returnStutasColor(data.status) }">{{ returnStutasText(data.status) }}~</view>
<template v-if="data.status != 'unsettled'">
<view class="u-font-32" :style="{ color: returnStutasColor(data.status) }">
{{ returnStutasText(data.status) }}~</view>
</template>
<view class="w-full u-p-l-16 u-p-r-16 u-p-t-16 u-font-24">
<template v-if="data.status == 'using' && data.orderId">
<template v-if="data.status == 'unsettled' && data.orderId">
<view class="color-666 u-text-left u-p-b-20 border-bottom">
<view class="">
<text>已点</text>
<text class="u-m-l-20 color-333">{{ data.productNum || 0 }}</text>
<text>就餐人数</text>
<text class="u-m-l-20 color-333">{{ data.personNum}}/{{data.maxCapacity}}</text>
</view>
<view class="u-m-t-10">
<text>金额</text>
<text class="u-m-l-20 color-333">{{ data.totalAmount || 0 }} </text>
<text class="u-m-l-20 color-333">{{ data.orderAmount || 0 }} </text>
</view>
<view class="u-m-t-10">
<!-- <view class="u-m-t-10">
<text>待结</text>
<text class="u-m-l-20 color-333">{{ data.totalAmount || 0 }} </text>
</view>
</view> -->
</view>
<view class="u-flex u-row-between u-font-20 u-p-b-20 u-p-t-20">
<text class="color-333">开台时间</text>
<text class="color-666">{{ data.useTime }}</text>
<!-- <text class="color-666">{{ data.orderCreateTime }}</text> -->
<text class="color-666">{{ formatTime(data.orderCreateTime) }}</text>
</view>
</template>
<template v-else>
<view class="u-flex u-row-center u-m-t-16">
<template v-if="data.id">
<template v-if="data.status == 'unbind'">
<my-button color="#333" :width="200" :height="56" type="default" @click="bind">绑定码牌</my-button>
<my-button color="#333" :width="200" :height="56" type="default"
@click="bind">绑定码牌</my-button>
</template>
<template v-if="data.status == 'idle' || (data.status == 'using' && !data.orderId)">
<my-button color="#333" :width="150" :height="56" type="default" @click="diancan">选择</my-button>
<template v-if="data.status == 'idle' || (data.status == 'unsettled' && !data.orderId)">
<my-button color="#333" :width="150" :height="56" type="default"
@click="diancan">选择</my-button>
</template>
<template v-if="data.status == 'cleaning'">
<my-button color="#333" :width="150" :height="56" type="default" @click="qingtai">清台</my-button>
<my-button color="#333" :width="150" :height="56" type="default"
@click="qingtai">清台</my-button>
</template>
</template>
<my-button v-else :width="150" :height="56" type="default" disabled>选择</my-button>
@@ -61,124 +68,165 @@
</template>
<script setup>
import { computed, ref } from 'vue';
import myButton from '@/components/my-components/my-button';
import go from '@/commons/utils/go.js';
import { hasPermission } from '@/commons/utils/hasPermission.js';
import { shopTableClear } from '@/http/api/table.js';
import {
computed,onUnmounted,
ref
} from 'vue';
import myButton from '@/components/my-components/my-button';
import go from '@/commons/utils/go.js';
import {
hasPermission
} from '@/commons/utils/hasPermission.js';
import {
shopTableClear
} from '@/http/api/table.js';
const emits = defineEmits(['more', 'update', 'bind']);
const props = defineProps({
data: {
type: Object,
default: () => {
return {};
const emits = defineEmits(['more', 'update', 'bind']);
const props = defineProps({
data: {
type: Object,
default: () => {
return {};
}
},
areaMap: {
type: Object,
default: () => {}
}
},
areaMap: {
type: Object,
default: () => {}
});
const computedClass = computed(() => {
return props.data.status;
});
function returnStutasText(key) {
const item = uni.$dict.tableStatus[key];
return item ? item.label : '';
}
});
const computedClass = computed(() => {
return props.data.status;
});
function returnStutasColor(key) {
const item = uni.$dict.tableStatus[key];
return item ? item.type : '';
}
const nowTime = ref(new Date().getTime());
// 定时器 ID用于销毁
let timer = null;
// 启动实时更新时间uniapp 全端稳定)
function updateTime() {
timer = setInterval(() => {
nowTime.value = new Date().getTime();
}, 1000); // 1秒刷新一次足够用
}
updateTime();
// 页面销毁时清除定时器(必须加!)
onUnmounted(() => {
if (timer) {
clearInterval(timer);
timer = null;
}
});
// 时间格式化工具(完全不变,逻辑一样)
function formatTime(str) {
if (!str) return "";
const targetTime = new Date(str).getTime();
const milliseconds = nowTime.value - targetTime;
if (milliseconds <= 0) return "已结束";
const days = Math.floor(milliseconds / (1000 * 60 * 60 * 24));
const hours = Math.floor((milliseconds % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((milliseconds % (1000 * 60 * 60)) / (1000 * 60));
return `${days ? days + "天" : ""} ${hours ? hours + "时" : ""} ${minutes + "分"}`;
}
/**
* 更多
*/
function more() {
if (props.data.status == 'done') {
return uni.showToast({
icon: 'none',
title: '桌台关闭中!'
});
}
emits('more');
}
function returnStutasText(key) {
const item = uni.$dict.tableStatus[key];
return item ? item.label : '';
}
/**
* 绑定码牌
*/
function bind() {
emits('bind', props.data);
}
function returnStutasColor(key) {
const item = uni.$dict.tableStatus[key];
return item ? item.type : '';
}
/**
* 更多
*/
function more() {
if (props.data.status == 'done') {
return uni.showToast({
icon: 'none',
title: '桌台关闭中!'
/**
* 选择下单
*/
async function diancan() {
hasPermission('允许下单').then((res) => {
console.log(res);
if (res) {
const useType = props.status == 'unsettled' ? props.data.useType : undefined;
console.log(props.data);
go.to('PAGES_CREATE_ORDER', props.data);
}
});
}
emits('more');
}
/**
* 绑定码牌
*/
function bind() {
emits('bind', props.data);
}
/**
* 选择下单
*/
async function diancan() {
hasPermission('允许下单').then((res) => {
console.log(res);
if (res) {
const useType = props.status == 'using' ? props.data.useType : undefined;
console.log(props.data);
go.to('PAGES_CREATE_ORDER', props.data);
}
});
}
/**
* 清台
*/
function qingtai() {
let item = props.data;
uni.showModal({
title: '提示',
content: '确定要清台:' + item.name + '',
success(res) {
if (res.confirm) {
shopTableClear({
id: item.id
}).then((res) => {
uni.$utils.showToast('清台成功');
emits('update');
});
/**
* 清台
*/
function qingtai() {
let item = props.data;
uni.showModal({
title: '提示',
content: '确定要清台:' + item.name + '',
success(res) {
if (res.confirm) {
shopTableClear({
id: item.id
}).then((res) => {
uni.$utils.showToast('清台成功');
emits('update');
});
}
}
}
});
}
});
}
</script>
<style lang="scss" scoped>
.item {
width: 330rpx;
box-sizing: border-box;
overflow: hidden;
box-shadow: 1px 1px 0 #eee;
border-color: #eee;
.item {
width: 330rpx;
box-sizing: border-box;
overflow: hidden;
box-shadow: 1px 1px 0 #eee;
border-color: #eee;
.bottom {
min-height: 224rpx;
}
.bottom {
min-height: 224rpx;
}
.my-bg-main {
padding: 24rpx 28rpx;
.my-bg-main {
padding: 24rpx 28rpx;
.tag {
background-color: rgba(255, 255, 255, 0.7);
font-size: 24rpx;
color: $my-main-color;
border-radius: 8rpx;
padding: 2rpx 10rpx;
.tag {
background-color: rgba(255, 255, 255, 0.7);
font-size: 24rpx;
color: $my-main-color;
border-radius: 8rpx;
padding: 2rpx 10rpx;
}
}
&.unsettled {
.tag {
color: rgb(250, 85, 85);
}
}
}
&.using {
.tag {
color: rgb(250, 85, 85);
}
}
}
</style>
</style>

View File

@@ -5,25 +5,19 @@
<view class="input-wrapper">
<view class="input-main">
<view class="u-flex u-p-r-30 u-font-28" @click="pageData.statusShow = !pageData.statusShow">
<text class="u-m-r-10 u-line-1" :class="{ 'color-main': pageData.query.status != '' }" style="max-width: 100rpx">{{ pageData.statusName }}</text>
<text class="u-m-r-10 u-line-1" :class="{ 'color-main': pageData.query.status != '' }"
style="max-width: 100rpx">{{ pageData.statusName }}</text>
<up-icon name="arrow-down" size="16"></up-icon>
</view>
<uni-easyinput
clearable
class="jeepay-search"
:inputBorder="false"
trim="all"
placeholder="搜索"
v-model="pageData.query.name"
@clear="searchConfirm"
@confirm="searchConfirm"
>
<uni-easyinput clearable class="jeepay-search" :inputBorder="false" trim="all" placeholder="搜索"
v-model="pageData.query.name" @clear="searchConfirm" @confirm="searchConfirm">
<template #prefixIcon>
<image src="@/static/iconImg/icon-search.svg" class="input-icon" />
</template>
</uni-easyinput>
<view class="u-m-l-4">
<button class="" type="text" @click="searchConfirm"><text class="color-333">搜索</text></button>
<button class="" type="text" @click="searchConfirm"><text
class="color-333">搜索</text></button>
<!-- <button class="" type="text" ><text class="color-main font-bold">清台设置</text></button> -->
</view>
</view>
@@ -39,7 +33,8 @@
<!-- <view class="u-m-t-10">0/12</view> -->
</view>
</view>
<view class="item u-p-20" :class="{ sel: pageData.area.sel === item.id }" @tap="changeAreaSel(item)" v-for="(item, index) in pageData.area.list" :key="index">
<view class="item u-p-20" :class="{ sel: pageData.area.sel === item.id }" @tap="changeAreaSel(item)"
v-for="(item, index) in pageData.area.list" :key="index">
<view class="box">
<view class="up-line-1">{{ item.name }}</view>
<!-- <view class="u-m-t-10">0/12</view> -->
@@ -51,408 +46,449 @@
<template v-if="pageData.tabList.length">
<view class="u-flex u-flex-wrap u-row-between">
<view class="u-m-b-30" v-for="(item, index) in pageData.tabList" :key="index">
<table-item @bind="scanCode" @update="getTable" :areaMap="pageData.areaMap" @more="moreShow(item)" :data="item"></table-item>
<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.totalElements" :size="pageData.query.size" @change="pageChange"></my-pagination>
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements"
:size="pageData.query.size" @change="pageChange"></my-pagination>
</template>
<my-img-empty v-if="pageData.hasAjax && !pageData.tabList.length" tips="未找到相关桌台"></my-img-empty>
</view>
</view>
</view>
<my-action-sheet :active="4" @itemClick="actionSheetClick" ref="refMoreSheet" :list="actionSheet.list" :title="actionSheet.title">
<my-action-sheet :active="4" @itemClick="actionSheetClick" ref="refMoreSheet" :list="actionSheet.list"
:title="actionSheet.title">
<template #title>
<view class="color-999 u-p-30 u-text-center border-bottom">桌号{{ actionSheet.title }}</view>
</template>
</my-action-sheet>
<up-picker :show="pageData.statusShow" :columns="pageData.statusList" keyName="label" @cancel="pageData.statusShow = false" @confirm="confirmStatus"></up-picker>
<up-picker :show="pageData.statusShow" :columns="pageData.statusList" keyName="label"
@cancel="pageData.statusShow = false" @confirm="confirmStatus"></up-picker>
</template>
<script setup>
import { onLoad, onReady, onShow } from '@dcloudio/uni-app';
import { ref, reactive, computed, watch } from 'vue';
import {
onLoad,
onReady,
onShow
} from '@dcloudio/uni-app';
import {
ref,
reactive,
computed,
watch
} from 'vue';
import tableItem from './components/table-item';
import tableItem from './components/table-item';
import go from '@/commons/utils/go.js';
import myActionSheet from '@/components/my-components/my-action-sheet';
import { hasPermission } from '@/commons/utils/hasPermission.js';
import go from '@/commons/utils/go.js';
import myActionSheet from '@/components/my-components/my-action-sheet';
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';
import { getHistoryOrder } from '@/http/api/order.js';
import {
getShopTable,
shopTableBind,
shopTableClear
} from '@/http/api/table.js';
import {
getShopArea
} from '@/http/api/area.js';
import {
printOrder
} from '@/http/api/order.js';
import {
getHistoryOrder
} from '@/http/api/order.js';
const pageData = reactive({
statusShow: false,
hasAjax: false,
areaMap: {},
query: {
page: 1,
size: 10,
status: '',
areaId: '',
name: ''
},
totalElements: 0,
statusList: [
[
{
key: '',
label: '全部'
},
...uni.$utils.objToArrary(uni.$dict.tableStatus)
]
],
statusName: '全部',
tabList: [],
area: {
list: [],
sel: ''
},
orderInfo: null
});
const pageData = reactive({
statusShow: false,
hasAjax: false,
areaMap: {},
query: {
page: 1,
size: 10,
status: '',
areaId: '',
name: ''
},
totalElements: 0,
statusList: [
[{
key: '',
label: '全部'
},
...uni.$utils.objToArrary(uni.$dict.tableStatus)
]
],
statusName: '全部',
tabList: [],
area: {
list: [],
sel: ''
},
orderInfo: null
});
const refMoreSheet = ref(null);
const actionSheet = reactive({
list: ['结账', '清台', '增减菜', '换台', '打印订单', '历史订单', '绑定码牌'],
title: '',
selTable: ''
});
const refMoreSheet = ref(null);
const actionSheet = reactive({
list: ['结账', '清台', '增减菜', '换台', '打印订单', '历史订单', '绑定码牌'],
title: '',
selTable: ''
});
watch(
() => pageData.area.sel,
(newval) => {
watch(
() => pageData.area.sel,
(newval) => {
pageData.query.page = 1;
getTable();
}
);
onShow((opt) => {
getData();
});
function getData() {
getTable();
getArea();
}
/**
* 获取桌台列表
*/
async function getTable() {
const res = await getShopTable(pageData.query);
pageData.hasAjax = true;
pageData.tabList = res.records;
pageData.totalElements = res.totalRow;
}
/**
* 获取区域
*/
async function getArea() {
const res = await getShopArea({
name: '',
page: 1,
size: 300
});
pageData.area.list = res.records;
pageData.areaMap = res.records.reduce((prve, cur) => {
prve[cur.id] = cur.name;
return prve;
}, {});
}
/**
* 类型选择
* @param {Object} e
*/
function confirmStatus(e) {
pageData.statusShow = false;
pageData.query.status = e.value[0].key;
pageData.statusName = e.value[0].label;
getTable();
}
/**
* 区域选择确定
* @param {Object} item
*/
function changeAreaSel(item) {
pageData.area.sel = item.id;
pageData.query.areaId = item.id;
}
/**
* 更多操作打开
* @param {Object} table
*/
function moreShow(table) {
actionSheet.title = table.name;
actionSheet.selTable = table;
refMoreSheet.value.open();
if (actionSheet.selTable.orderId) {
getHistoryOrder({
orderId: actionSheet.selTable.orderId
}).then((res) => {
pageData.orderInfo = res;
});
}
}
/**
* 更多操作选择
* @param {Object} index
*/
async function actionSheetClick(index) {
console.log(index);
const item = actionSheet.selTable;
if (index == 0) {
if (!item.orderId) {
return uni.$utils.showToast('该桌台暂无要结账的订单!');
}
const canJieZhang = await hasPermission('允许收款');
if (!canJieZhang) {
return;
}
return toPay(item);
}
if (index == 1) {
//清台
return uni.showModal({
title: '提示',
content: '确定要清台:' + item.name + '',
success(res) {
if (res.confirm) {
shopTableClear({
id: item.id
}).then((res) => {
uni.$utils.showToast('清台成功');
pageData.query.page = 1;
getTable();
});
}
}
});
}
if (index == 2) {
if (item.status == 'idle' || item.status == 'unsettled') {
return go.to('PAGES_CREATE_ORDER', item);
}else{
return uni.$utils.showToast('当前台桌不可增减菜!');
}
// return uni.$utils.showToast('待开放,请敬请期待!');
}
if (index == 3) {
return uni.$utils.showToast('待开放,请敬请期待!');
}
if (index == 4) {
//打印订单
if (!item.orderId) {
return uni.$utils.showToast('该桌台暂无要打印的订单!');
}
let res = await printOrder({
id: actionSheet.selTable.orderId,
type: pageData.orderInfo.status == 'unpaid' ? 1 : 0
});
return;
}
if (index == 6) {
//绑定码牌
scanCode(item);
return;
}
uni.$utils.showToast('待开放,请敬请期待!');
}
/**
* 去结账
* @param {Object} item
*/
function toPay(item) {
go.to('PAGES_ORDER_PAY', {
tableId: item.id,
tableName: item.name,
orderId: item.orderId,
discount: 1,
userId: item.userId
});
}
/**
* 绑定码牌
* @param {Object} item
*/
function scanCode(item) {
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
let params = getQueryString(res.result);
shopTableBind({
tableCode: params.code,
id: item.id
}).then((res) => {
uni.$utils.showToast('桌台绑定成功');
setTimeout(() => {
getTable();
}, 1500);
});
}
});
}
/**
* 解码
* @param {Object} url
*/
function getQueryString(url) {
let params = {};
// 正则表达式来匹配URL中的查询字符串
let reg = /(?:\?|#|&){1}([^=]*)=([^&]*)/g;
url.replace(reg, (match, key, value) => {
params[key] = value;
});
return params;
}
/**
* 搜索
*/
function searchConfirm() {
pageData.query.page = 1;
getTable();
}
);
onShow((opt) => {
getData();
});
function getData() {
getTable();
getArea();
}
/**
* 获取桌台列表
*/
async function getTable() {
const res = await getShopTable(pageData.query);
pageData.hasAjax = true;
pageData.tabList = res.records;
pageData.totalElements = res.totalRow;
}
/**
* 获取区域
*/
async function getArea() {
const res = await getShopArea({ name: '', page: 1, size: 300 });
pageData.area.list = res.records;
pageData.areaMap = res.records.reduce((prve, cur) => {
prve[cur.id] = cur.name;
return prve;
}, {});
}
/**
* 类型选择
* @param {Object} e
*/
function confirmStatus(e) {
pageData.statusShow = false;
pageData.query.status = e.value[0].key;
pageData.statusName = e.value[0].label;
getTable();
}
/**
* 区域选择确定
* @param {Object} item
*/
function changeAreaSel(item) {
pageData.area.sel = item.id;
pageData.query.areaId = item.id;
}
/**
* 更多操作打开
* @param {Object} table
*/
function moreShow(table) {
actionSheet.title = table.name;
actionSheet.selTable = table;
refMoreSheet.value.open();
if (actionSheet.selTable.orderId) {
getHistoryOrder({ orderId: actionSheet.selTable.orderId }).then((res) => {
pageData.orderInfo = res;
});
/**
* 页数改变事件
* @param {Object} page
*/
function pageChange(page) {
pageData.query.page = page;
getTable();
}
}
/**
* 更多操作选择
* @param {Object} index
*/
async function actionSheetClick(index) {
console.log(index);
const item = actionSheet.selTable;
if (index == 0) {
if (!item.orderId) {
return uni.$utils.showToast('该桌台暂无要结账的订单!');
}
const canJieZhang = await hasPermission('允许收款');
if (!canJieZhang) {
return;
}
return toPay(item);
}
if (index == 1) {
//清台
return uni.showModal({
title: '提示',
content: '确定要清台:' + item.name + '',
success(res) {
if (res.confirm) {
shopTableClear({
id: item.id
}).then((res) => {
uni.$utils.showToast('清台成功');
pageData.query.page = 1;
getTable();
});
}
}
});
}
if (index == 2) {
return uni.$utils.showToast('待开放,请敬请期待!');
}
if (index == 3) {
return uni.$utils.showToast('待开放,请敬请期待!');
}
if (index == 4) {
//打印订单
if (!item.orderId) {
return uni.$utils.showToast('该桌台暂无要打印的订单!');
}
let res = await printOrder({ id: actionSheet.selTable.orderId, type: pageData.orderInfo.status == 'unpaid' ? 1 : 0 });
return;
}
if (index == 6) {
//绑定码牌
scanCode(item);
return;
}
uni.$utils.showToast('待开放,请敬请期待!');
}
/**
* 去结账
* @param {Object} item
*/
function toPay(item) {
go.to('PAGES_ORDER_PAY', {
tableId: item.id,
tableName: item.name,
orderId: item.orderId,
discount: 1,
userId: item.userId
});
}
/**
* 绑定码牌
* @param {Object} item
*/
function scanCode(item) {
uni.scanCode({
onlyFromCamera: true,
success: function (res) {
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
let params = getQueryString(res.result);
shopTableBind({
tableCode: params.code,
id: item.id
}).then((res) => {
uni.$utils.showToast('桌台绑定成功');
setTimeout(() => {
getTable();
}, 1500);
});
}
});
}
/**
* 解码
* @param {Object} url
*/
function getQueryString(url) {
let params = {};
// 正则表达式来匹配URL中的查询字符串
let reg = /(?:\?|#|&){1}([^=]*)=([^&]*)/g;
url.replace(reg, (match, key, value) => {
params[key] = value;
});
return params;
}
/**
* 搜索
*/
function searchConfirm() {
pageData.query.page = 1;
getTable();
}
/**
* 页数改变事件
* @param {Object} page
*/
function pageChange(page) {
pageData.query.page = page;
getTable();
}
</script>
<style lang="scss" scoped>
.fixed-top {
z-index: 10;
}
.input-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 26rpx;
background-color: $J-bg-ff;
.fixed-top {
z-index: 10;
}
.input-main {
flex: 1;
.input-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
height: 64rpx;
padding-top: 26rpx;
background-color: $J-bg-ff;
image {
padding: 22rpx;
width: 26rpx;
height: 26rpx;
}
input {
.input-main {
flex: 1;
font-size: 27rpx;
}
display: flex;
align-items: center;
height: 64rpx;
::v-deep uni-button {
font-size: 28rpx;
color: $my-main-color;
background: rgba(255, 255, 255, 1);
}
image {
padding: 22rpx;
width: 26rpx;
height: 26rpx;
}
::v-deep.uni-easyinput {
.uni-easyinput__content {
background-color: $J-bg-f5 !important;
border-radius: $J-b-r12;
input {
flex: 1;
font-size: 27rpx;
}
.uni-easyinput__content-input {
padding-left: 0 !important;
::v-deep uni-button {
font-size: 28rpx;
color: $my-main-color;
background: rgba(255, 255, 255, 1);
}
.uni-input-input {
border-radius: $J-b-r12 !important;
overflow: hidden !important;
::v-deep.uni-easyinput {
.uni-easyinput__content {
background-color: $J-bg-f5 !important;
border-radius: $J-b-r12;
.uni-easyinput__content-input {
padding-left: 0 !important;
.uni-input-input {
border-radius: $J-b-r12 !important;
overflow: hidden !important;
}
}
.uni-input-placeholder {
font-size: 27rpx;
}
.uni-icons {
color: rgba(230, 230, 230, 1) !important;
}
}
.uni-input-placeholder {
font-size: 27rpx;
}
.uni-icons {
color: rgba(230, 230, 230, 1) !important;
}
}
}
}
}
.table-type {
flex-wrap: wrap;
padding: 0 10rpx 0 10rpx;
.table-type {
flex-wrap: wrap;
padding: 0 10rpx 0 10rpx;
.item {
width: 25%;
margin-bottom: 10rpx;
.item {
width: 25%;
margin-bottom: 10rpx;
.box {
position: relative;
padding: 10rpx;
border-radius: 10rpx;
&::after {
position: absolute;
display: block;
content: '';
top: 0;
bottom: 0;
width: 2px;
border-radius: 2px;
right: -20rpx;
background-color: rgba(255, 255, 255, 0.5);
}
}
&:nth-of-type(4n) {
.box::after {
background-color: transparent;
}
}
&.sel {
.box {
background-color: rgba(255, 255, 255, 0.6);
position: relative;
padding: 10rpx;
border-radius: 10rpx;
&::after {
position: absolute;
display: block;
content: '';
top: 0;
bottom: 0;
width: 2px;
border-radius: 2px;
right: -20rpx;
background-color: rgba(255, 255, 255, 0.5);
}
}
&:nth-of-type(4n) {
.box::after {
background-color: transparent;
}
}
&.sel {
.box {
background-color: rgba(255, 255, 255, 0.6);
}
}
}
}
}
.search-box {
background-color: #fff;
padding: 16rpx 0;
display: flex;
.search-btn {
padding: 0 30rpx;
box-sizing: border-box;
.search-box {
background-color: #fff;
padding: 16rpx 0;
display: flex;
align-items: center;
// width: 164rpx;
transition: all 0.3s ease-in-out;
background-color: rgb(247, 247, 247);
border-radius: 100px;
.search-btn {
padding: 0 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
// width: 164rpx;
transition: all 0.3s ease-in-out;
background-color: rgb(247, 247, 247);
border-radius: 100px;
}
}
}
.status {
position: absolute;
top: 100%;
left: 0;
right: 0;
z-index: 10;
background-color: #fff;
}
.status {
position: absolute;
top: 100%;
left: 0;
right: 0;
z-index: 10;
background-color: #fff;
}
.icon-arrow-down-fill {
width: 16rpx;
height: 10rpx;
}
.icon-arrow-down-fill {
width: 16rpx;
height: 10rpx;
}
.list {
// margin-top: 52px;
}
</style>
.list {
// margin-top: 52px;
}
</style>