<template>
	<view class="default-box-padding bg-fff border-r-12 u-m-t-20">
		<view class="u-flex u-row-between">
			<view class="font-bold">附加费</view>
			<template v-if="orderInfo.status=='unpaid'">
				<my-button plain shape="circle" :width="160" :height="56" @click="tuicai">退菜</my-button>
			</template>
			<template v-if="orderInfo.status=='closed'">
				<my-button plain shape="circle" :width="160" :height="56"  @click="tuikuan">退款</my-button>
			</template>
		</view>
		<view class="u-flex u-row-between u-m-t-20">
			<view>{{data.name||'餐位费'}}</view>
			<view>x{{data.number}}</view>
			<view>￥{{data.number}}</view>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps({
		data: {
			type: Object,
			default: () => {}
		},
		orderInfo:{
			type: Object,
			default: () => {}
		},
		table:{
			type: Object,
			default: () => {}
		}
	})
	
	const statusMap={
		unpaid:'未支付'
	}
	const emits=defineEmits(['tuicai','tuikuan','printOrder'])
	function returnStatus(status){
		return statusMap[status]||''
	}
	function tuikuan(){
		emits('tuikuan',props.data)
	}
	function tuicai(){
		emits('tuicai',props.data)
	}
</script>

<style lang="scss" scoped>
</style>