新增阶结算订单
This commit is contained in:
parent
c198f81483
commit
5deec59c38
|
|
@ -0,0 +1,20 @@
|
||||||
|
<!-- 结算订单 -->
|
||||||
|
<template>
|
||||||
|
<el-drawer size="100%" :with-header="false" direction="ttb" v-model="dialogVisible">
|
||||||
|
<div class="drawer_wrap">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
const dialogVisible = ref(true)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.drawer_wrap {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="operation_wrap">
|
<div class="operation_wrap">
|
||||||
<div class="item">
|
<div class="item" @click="numberChange('sub')">
|
||||||
<el-icon class="icon">
|
<el-icon class="icon">
|
||||||
<SemiSelect />
|
<SemiSelect />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="item number" @click="takeFoodCodeRef.show()">
|
<div class="item number" @click="takeFoodCodeRef.show()">
|
||||||
<el-text class="num">{{ props.item.number || 1 }}</el-text>
|
<el-text class="num">{{ props.item.number || 1 }}</el-text>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item" @click="numberChange('add')">
|
||||||
<el-icon class="icon add">
|
<el-icon class="icon add">
|
||||||
<CloseBold />
|
<CloseBold />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
|
@ -66,7 +66,22 @@ const emit = defineEmits(['confirm'])
|
||||||
|
|
||||||
const takeFoodCodeRef = ref(null)
|
const takeFoodCodeRef = ref(null)
|
||||||
|
|
||||||
// 修改数量
|
// 加减修改数量
|
||||||
|
function numberChange(t) {
|
||||||
|
switch (t) {
|
||||||
|
case 'sub':
|
||||||
|
props.item.number--
|
||||||
|
break;
|
||||||
|
case 'add':
|
||||||
|
props.item.number++
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
emit('confirm', props.item)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 输入修改数量
|
||||||
function updateNumber(num) {
|
function updateNumber(num) {
|
||||||
props.item.number = num
|
props.item.number = num
|
||||||
emit('confirm', props.item)
|
emit('confirm', props.item)
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,8 @@
|
||||||
<remarkModal ref="remarkRef" />
|
<remarkModal ref="remarkRef" />
|
||||||
<!-- 修改取餐号 -->
|
<!-- 修改取餐号 -->
|
||||||
<takeFoodCode ref="takeFoodCodeRef" title="修改取餐号" placeholder="请输入取餐号" @success="takeFoodCodeSuccess" />
|
<takeFoodCode ref="takeFoodCodeRef" title="修改取餐号" placeholder="请输入取餐号" @success="takeFoodCodeSuccess" />
|
||||||
|
<!-- 结算订单 -->
|
||||||
|
<settleAccount />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -87,6 +89,7 @@ import { useUser } from "@/store/user.js"
|
||||||
import remarkModal from '@/components/remarkModal.vue'
|
import remarkModal from '@/components/remarkModal.vue'
|
||||||
import takeFoodCode from '@/components/takeFoodCode.vue'
|
import takeFoodCode from '@/components/takeFoodCode.vue'
|
||||||
import cartOperation from '@/views/home/components/cartOperation.vue'
|
import cartOperation from '@/views/home/components/cartOperation.vue'
|
||||||
|
import settleAccount from '@/components/settleAccount.vue'
|
||||||
|
|
||||||
import { createCart, queryCart, createCode } from '@/api/product'
|
import { createCart, queryCart, createCode } from '@/api/product'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue