合并桌问题与称重退款
This commit is contained in:
@@ -112,14 +112,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="goods.list[0].tableId">
|
<!-- <template v-if="goods.list[0].tableId&&goods.list[0].orderId">
|
||||||
<!-- 不免餐位费 -->
|
|
||||||
<view class="block" @tap="rotatingTables"
|
<view class="block" @tap="rotatingTables"
|
||||||
style="display: flex;align-items: center;justify-content: space-between;">
|
style="display: flex;align-items: center;justify-content: space-between;">
|
||||||
<view>转桌/并桌</view>
|
<view>转桌/并桌</view>
|
||||||
<uni-icons type="right" color="#999" size="16"></uni-icons>
|
<uni-icons type="right" color="#999" size="16"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template> -->
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -8,15 +8,17 @@
|
|||||||
请选择其他桌:
|
请选择其他桌:
|
||||||
</view>
|
</view>
|
||||||
<view class="uni-list">
|
<view class="uni-list">
|
||||||
<radio-group @change="radioChange">
|
<radio-group @change="radioChange" v-if="datas.tableList.length">
|
||||||
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in datas.tableList" :key="index">
|
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in datas.tableList" :key="index">
|
||||||
<view class="u-m-t-48 u-m-b-48" v-if="item.status=='using'">
|
<view class="u-m-t-48 u-m-b-48">
|
||||||
<radio :value="item" /> {{item.name}}
|
<radio :value="item.tableId" /> {{item.name}}
|
||||||
</view>
|
</view>
|
||||||
</label>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
|
<view v-else>
|
||||||
|
暂无数据
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="uni-list" v-if="datas.current==0">
|
<view class="uni-list" v-if="datas.current==0">
|
||||||
<view class="u-m-t-48">
|
<view class="u-m-t-48">
|
||||||
请选择需要转桌的菜品:
|
请选择需要转桌的菜品:
|
||||||
@@ -25,7 +27,7 @@
|
|||||||
<label class="uni-list-cell uni-list-cell-pd" v-for="(item,index) in datas.item" :key="index">
|
<label class="uni-list-cell uni-list-cell-pd" v-for="(item,index) in datas.item" :key="index">
|
||||||
<view class="u-flex u-m-t-48 u-m-b-48" style="justify-content: space-between;align-items: center;">
|
<view class="u-flex u-m-t-48 u-m-b-48" style="justify-content: space-between;align-items: center;">
|
||||||
<view class="u-flex">
|
<view class="u-flex">
|
||||||
<checkbox :value="item.id" />
|
<checkbox :value="item.cartId" />
|
||||||
<image class="img" v-if="item.coverImg" :src="item.coverImg" mode=""></image>
|
<image class="img" v-if="item.coverImg" :src="item.coverImg" mode=""></image>
|
||||||
|
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
@@ -96,13 +98,14 @@
|
|||||||
item: {
|
item: {
|
||||||
type: Array
|
type: Array
|
||||||
},
|
},
|
||||||
|
tableId: {
|
||||||
|
type: String
|
||||||
|
}
|
||||||
})
|
})
|
||||||
onLoad((opt) => {
|
onLoad((opt) => {
|
||||||
// console.log(JSON.parse(opt.item) ,'调试1')
|
|
||||||
datas.item = JSON.parse(opt.item)
|
datas.item = JSON.parse(opt.item)
|
||||||
})
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
console.log(11111)
|
|
||||||
gettableList()
|
gettableList()
|
||||||
})
|
})
|
||||||
async function confirm() {
|
async function confirm() {
|
||||||
@@ -116,11 +119,18 @@
|
|||||||
useType: datas.item[0].useType,
|
useType: datas.item[0].useType,
|
||||||
cartIds: datas.changeTable,
|
cartIds: datas.changeTable,
|
||||||
currentTableId: datas.item[0].tableId,
|
currentTableId: datas.item[0].tableId,
|
||||||
targetTableId: datas.selecttableList.tableId
|
targetTableId: datas.selecttableList
|
||||||
})
|
})
|
||||||
if (res) {
|
if (res) {
|
||||||
go.back()
|
uni.navigateBack({
|
||||||
|
delta: 2
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择菜品或桌号!',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let res = await tableswitch({
|
let res = await tableswitch({
|
||||||
@@ -128,12 +138,19 @@
|
|||||||
useType: datas.item[0].useType,
|
useType: datas.item[0].useType,
|
||||||
isFull: true,
|
isFull: true,
|
||||||
currentTableId: datas.item[0].tableId,
|
currentTableId: datas.item[0].tableId,
|
||||||
targetTableId: datas.selecttableList.tableId
|
targetTableId: datas.selecttableList
|
||||||
})
|
})
|
||||||
if (res) {
|
if (res) {
|
||||||
go.back()
|
uni.navigateBack({
|
||||||
|
delta: 2
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择菜品或桌号!',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +169,13 @@
|
|||||||
page: 1,
|
page: 1,
|
||||||
size: 999
|
size: 999
|
||||||
})
|
})
|
||||||
datas.tableList = res.content
|
let arr = []
|
||||||
|
res.content.forEach((ele) => {
|
||||||
|
if (ele.status == 'using' && props.tableId != ele.tableId) {
|
||||||
|
arr.push(ele)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
datas.tableList = arr
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatPrice(n) {
|
function formatPrice(n) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<text class="">桌号:</text>
|
<text class="">桌号:</text>
|
||||||
<text class="">{{orderInfo.tableName||""}}</text>
|
<text class="">{{orderInfo.tableName||""}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class=" font-bold u-p-b-32 border-bottom u-m-b-24">
|
<view class=" font-bold u-p-b-32 border-bottom u-m-b-24" v-if="orderInfo.tableName">
|
||||||
<view class="block" @tap="rotatingTables"
|
<view class="block" @tap="rotatingTables"
|
||||||
style="display: flex;align-items: center;justify-content: space-between;">
|
style="display: flex;align-items: center;justify-content: space-between;">
|
||||||
<view>转桌/并桌</view>
|
<view>转桌/并桌</view>
|
||||||
@@ -571,11 +571,15 @@
|
|||||||
res.salePrice = res.price
|
res.salePrice = res.price
|
||||||
// 数量 number
|
// 数量 number
|
||||||
res.number = res.num
|
res.number = res.num
|
||||||
|
res.masterId = props.orderInfo.masterId
|
||||||
|
res.useType = props.orderInfo.useType
|
||||||
|
res.tableId = props.orderInfo.tableId
|
||||||
arr.push(res)
|
arr.push(res)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesCreateOrder/confirm-order/rotatingTables?item=' + JSON.stringify(arr),
|
url: '/pagesCreateOrder/confirm-order/rotatingTables?item=' + JSON.stringify(arr) + '&tableId=' + props
|
||||||
|
.orderInfo.tableId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const goodsNumber = computed(() => {
|
const goodsNumber = computed(() => {
|
||||||
|
|||||||
@@ -6,22 +6,23 @@
|
|||||||
{{data.productName}}
|
{{data.productName}}
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-m-t-32" :class="{'gray':data.productId=='-999'}">
|
<view class="u-flex u-m-t-32" :class="{'gray':data.productId=='-999'}">
|
||||||
<up-number-box :min="1" :max="data.num" :buttonSize="44" v-model="number" integer :disabled="data.productId=='-999'">
|
<up-number-box :min="0" :max="data.num" :buttonSize="44" v-model="number" integer
|
||||||
|
:disabled="data.productId=='-999'">
|
||||||
<template #minus>
|
<template #minus>
|
||||||
<view class="minus number-box-btn">
|
<view class="minus number-box-btn">
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template #input>
|
<template #input>
|
||||||
<view class="u-flex-1 u-row-center u-text-center input">
|
<view class="u-flex-1 u-row-center u-text-center input">
|
||||||
<up-input
|
<up-input :disabled="data.productId=='-999'" @change="parseIntNumber($event,false)"
|
||||||
:disabled="data.productId=='-999'"
|
@blur="parseIntNumber($event,true)" v-model="number" border="none"
|
||||||
@change="parseIntNumber($event,false)" @blur="parseIntNumber($event,true)"
|
type="number"></up-input>
|
||||||
v-model="number" border="none" type="number"></up-input>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template #plus>
|
<template #plus>
|
||||||
<view class="plus number-box-btn">
|
<view class="plus number-box-btn">
|
||||||
<up-icon v-if="data.productId=='-999'" name="plus" color="#ccc" size="16" bold></up-icon>
|
<up-icon v-if="data.productId=='-999'" name="plus" color="#ccc" size="16"
|
||||||
|
bold></up-icon>
|
||||||
<up-icon v-else name="plus" color="#999" size="16" bold></up-icon>
|
<up-icon v-else name="plus" color="#999" size="16" bold></up-icon>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -50,8 +51,7 @@
|
|||||||
<view class="u-p-t-18 u-p-l-30 u-p-r-30 u-p-b-10">
|
<view class="u-p-t-18 u-p-l-30 u-p-r-30 u-p-b-10">
|
||||||
<my-button box-shadow shape="circle" @tap="confirm">确认退菜</my-button>
|
<my-button box-shadow shape="circle" @tap="confirm">确认退菜</my-button>
|
||||||
<view class="u-m-t-10">
|
<view class="u-m-t-10">
|
||||||
<my-button @tap="onModelClose" shape="circle" bgColor="#fff" type="cancel"
|
<my-button @tap="onModelClose" shape="circle" bgColor="#fff" type="cancel" box-shadow>取消</my-button>
|
||||||
box-shadow>取消</my-button>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
productId:'-999'
|
productId: '-999'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
const emits = defineEmits(['update:show', 'confirm'])
|
const emits = defineEmits(['update:show', 'confirm'])
|
||||||
let model = ref(null)
|
let model = ref(null)
|
||||||
let modelShow = ref(props.show)
|
let modelShow = ref(props.show)
|
||||||
let number = ref(1)
|
let number = ref(0)
|
||||||
const tags = ref([{
|
const tags = ref([{
|
||||||
label: "点错",
|
label: "点错",
|
||||||
checked: false
|
checked: false
|
||||||
@@ -108,8 +108,11 @@
|
|||||||
if (newval > props.data.num) {
|
if (newval > props.data.num) {
|
||||||
newval = props.data.num
|
newval = props.data.num
|
||||||
}
|
}
|
||||||
if (newval < 1) {
|
// 判断是否是称重商品。如果是可以输入小数
|
||||||
newval = 1
|
if (props.data.isWeight != 1) {
|
||||||
|
if (newval < 1) {
|
||||||
|
newval = 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isNow) {
|
if (isNow) {
|
||||||
number.value = parseInt(newval)
|
number.value = parseInt(newval)
|
||||||
@@ -138,10 +141,10 @@
|
|||||||
function toggleModelShow(show) {
|
function toggleModelShow(show) {
|
||||||
modelShow.value = show ? true : false
|
modelShow.value = show ? true : false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function onModelClose() {
|
function onModelClose() {
|
||||||
number.value=1
|
number.value = 1
|
||||||
modelShow.value = false
|
modelShow.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,17 +154,17 @@
|
|||||||
|
|
||||||
function open() {
|
function open() {
|
||||||
model.value.open()
|
model.value.open()
|
||||||
if(props.data.productId=='-999'){
|
if (props.data.productId == '-999') {
|
||||||
number.value=props.data.num
|
number.value = props.data.num
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
model.value.close()
|
model.value.close()
|
||||||
tags.value.map(v=>{
|
tags.value.map(v => {
|
||||||
v.checked=false
|
v.checked = false
|
||||||
})
|
})
|
||||||
form.note=''
|
form.note = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirm() {
|
function confirm() {
|
||||||
@@ -206,12 +209,14 @@
|
|||||||
::v-deep .uni-input-input {
|
::v-deep .uni-input-input {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.gray{
|
|
||||||
.minus::after{
|
.gray {
|
||||||
|
.minus::after {
|
||||||
border-color: #ccc;
|
border-color: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.minus {
|
.minus {
|
||||||
&::after {
|
&::after {
|
||||||
content: '';
|
content: '';
|
||||||
|
|||||||
Reference in New Issue
Block a user