代客下单修改部分样式

This commit is contained in:
YeMingfei666 2024-10-16 14:16:14 +08:00
parent 7030d60847
commit 72d4862925
3 changed files with 39 additions and 22 deletions

View File

@ -1,9 +1,9 @@
<template> <template>
<view class="page-gray color-333 u-font-28"> <view class="page-gray color-333 u-font-28">
<template v-if="true"> <template v-if="true">
<view class="block"> <view class="block u-p-t-32 u-p-b-32">
<view>桌位号</view> <view>桌位号</view>
<view class="font-bold u-font-40 u-m-t-20"> <view class="font-bold u-font-32 u-m-t-16">
{{table.name||''}} {{table.name||''}}
</view> </view>
</view> </view>
@ -122,7 +122,7 @@
</view> </view>
<view class="block"> <view class="block u-m-b-0">
<view class="u-flex"> <view class="u-flex">
<view></view> <view></view>
<view class="fen font-bold">{{goodsNumber}}</view> <view class="fen font-bold">{{goodsNumber}}</view>
@ -130,9 +130,9 @@
</view> </view>
<view class="goods u-m-t-32"> <view class="goods u-m-t-32">
<view class="item u-m-b-40" @click="changeGoodsSel(index)" v-for="(item,index) in goods.list" <view class="item u-p-b-32" @click="changeGoodsSel(index)" v-for="(item,index) in goods.list"
:key="index"> :key="index">
<view class="u-flex u-row-between"> <view class="u-flex u-row-between ">
<view class="u-flex"> <view class="u-flex">
<image class="img" :src="item.coverImg" mode=""></image> <image class="img" :src="item.coverImg" mode=""></image>
<view class="u-m-l-32"> <view class="u-m-l-32">
@ -173,17 +173,17 @@
{{item.note}} {{item.note}}
</view> </view>
</template> </template>
<scroll-view scroll-x="true" v-if="index==goods.sel"> <scroll-view class="u-m-t-32" scroll-x="true" v-if="index==goods.sel">
<view class="u-m-t-32 u-flex no-wrap u-p-b-12"> <view class=" u-flex no-wrap ">
<!-- <view class="u-flex u-m-r-20 u-m-b-20"> <!-- <view class="u-flex u-m-r-20 u-m-b-20">
<button class="tag" hover-class="hover-class" @tap="showModel('discount')">单品打折</button> <button class="tag" hover-class="hover-class" @tap="showModel('discount')">单品打折</button>
</view> --> </view> -->
<view class="u-flex u-m-r-20 u-m-b-20"> <view class="u-flex u-m-r-20 ">
<!-- <button class="tag" hover-class="hover-class" @tap="showModel('giveFood')">赠菜</button> --> <!-- <button class="tag" hover-class="hover-class" @tap="showModel('giveFood')">赠菜</button> -->
<button class="tag" hover-class="hover-class" <button class="tag" hover-class="hover-class"
@tap="toggleGoodsItemKey(item,index,'isGift')">{{item.isGift?'取消赠送':'赠送'}}</button> @tap="toggleGoodsItemKey(item,index,'isGift')">{{item.isGift?'取消赠送':'赠送'}}</button>
</view> </view>
<view class="u-flex u-m-r-20 u-m-b-20" > <view class="u-flex u-m-r-20 " >
<button class="tag" hover-class="hover-class" <button class="tag" hover-class="hover-class"
@tap="toggleGoodsItemKey(item,index,'isPack')">{{item.isPack?'取消打包':'打包'}}</button> @tap="toggleGoodsItemKey(item,index,'isPack')">{{item.isPack?'取消打包':'打包'}}</button>
</view> </view>
@ -191,13 +191,13 @@
<button class="tag" hover-class="hover-class" <button class="tag" hover-class="hover-class"
@tap="toggleWait(item)">{{item.isWait?'取消等叫':'等叫'}}</button> @tap="toggleWait(item)">{{item.isWait?'取消等叫':'等叫'}}</button>
</view> --> </view> -->
<view class="u-flex u-m-r-20 u-m-b-20"> <view class="u-flex u-m-r-20 ">
<button class="tag" hover-class="hover-class" <button class="tag" hover-class="hover-class"
@tap="showModel('remark',index)">单品备注</button> @tap="showModel('remark',index)">单品备注</button>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class="border-top u-m-t-48 " v-if="index==goods.sel"></view>
</view> </view>
</view> </view>
<view class="border-bottom"> <view class="border-bottom">
@ -234,7 +234,7 @@
</view> </view>
<view style="height: 300rpx;"></view> <view :style="{height:bottomHeight+'px'}"></view>
<view class="safe-bottom fixed"> <view class="safe-bottom fixed">
<!-- <view class="u-m-b-48"> <!-- <view class="u-m-b-48">
<label class="radio"> <label class="radio">
@ -244,7 +244,9 @@
<view class="btn "> <view class="btn ">
<my-button shape="circle" @click="createOrder"> <my-button shape="circle" @click="createOrder">
<view class="font-bold u-font-32">
{{$shop.registerType=='munchies'?'结算': '下单'}} {{$shop.registerType=='munchies'?'结算': '下单'}}
</view>
</my-button> </my-button>
</view> </view>
@ -262,6 +264,7 @@
<script setup> <script setup>
import { import {
onLoad, onLoad,
onReady,
onShow onShow
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import { import {
@ -271,6 +274,7 @@
computed, computed,
watch watch
} from 'vue'; } from 'vue';
import {getSafeBottomHeight} from '@/commons/utils/safe-bottom.js'
import modelDiscount from './components/discount' import modelDiscount from './components/discount'
import giveFood from './components/give-food' import giveFood from './components/give-food'
import oneRemark from './components/remark' import oneRemark from './components/remark'
@ -637,6 +641,13 @@
// updateChoseCount() // updateChoseCount()
}) })
let bottomHeight=ref(100)
onReady(()=>{
getSafeBottomHeight('safe-bottom').then(res=>{
console.log(res);
bottomHeight.value=res
})
})
async function changeUseType() { async function changeUseType() {
const { const {
@ -682,7 +693,7 @@
} }
.page-gray { .page-gray {
padding: 32rpx 28rpx; padding: 32rpx 28rpx 0 28rpx;
} }
.headeimg { .headeimg {
@ -697,7 +708,6 @@
border-radius: 18rpx; border-radius: 18rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.textarea { .textarea {
border-radius: 12rpx 12rpx 12rpx 12rpx; border-radius: 12rpx 12rpx 12rpx 12rpx;
padding: 32rpx 0 32rpx 24rpx; padding: 32rpx 0 32rpx 24rpx;

View File

@ -55,7 +55,9 @@
<view></view> <view></view>
<view>{{allPrice}}</view> <view>{{allPrice}}</view>
</view> </view>
<my-button shape="circle" height="80" width="220" @tap="toConfimOrder">{{table.type=='add'?'确认加菜':'去下单'}} </my-button> <my-button shape="circle" height="80" width="220" @tap="toConfimOrder">
<text class="u-font-32 font-bold">{{table.type=='add'?'确认加菜':'去下单'}} </text>
</my-button>
</view> </view>
</template> </template>

View File

@ -71,7 +71,7 @@
</view> </view>
<view class="class-item" :id="'item' + index" v-for="(item , index) in data.tabbar" <view class="class-item" :id="'item' + index" v-for="(item , index) in data.tabbar"
:key="index"> :key="index">
<view class="item-title"> <view class="item-title" :class="{active:data.current == index}">
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="item-container"> <view class="item-container">
@ -684,7 +684,7 @@
let selGoods=ref({}) let selGoods=ref({})
function chooseGuige(foodsindex, index) { function chooseGuige(foodsindex, index) {
if (!canAddGoods()) { if (!canAddGoods()) {
return infoBox.showToast('先选择桌台', 0.5).then(res => { return infoBox.showToast('先选择桌台', 0.5).then(res => {
chooseTable() chooseTable()
}) })
} }
@ -1164,7 +1164,7 @@
.u-tab-item-active { .u-tab-item-active {
position: relative; position: relative;
color: #000; color: $my-main-color;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
background: #fff; background: #fff;
@ -1173,7 +1173,7 @@
.u-tab-item-active::before { .u-tab-item-active::before {
content: ""; content: "";
position: absolute; position: absolute;
border-left: 4px solid $u-primary; border-left: 4px solid $my-main-color;
left: 0; left: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
@ -1207,7 +1207,10 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
::v-deep .uni-searchbar{
padding-top: 12px!important;
padding-bottom: 16px!important;
}
.right-box { .right-box {
width: 572rpx; width: 572rpx;
// background-color: rgb(250, 250, 250); // background-color: rgb(250, 250, 250);
@ -1230,8 +1233,10 @@
.item-title { .item-title {
font-size: 26rpx; font-size: 26rpx;
color: $u-main-color;
font-weight: bold; font-weight: bold;
&.active{
color: $my-main-color;
}
} }
.item-menu-name { .item-menu-name {