更新订单管理模块
This commit is contained in:
@@ -2,7 +2,12 @@
|
||||
<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>
|
||||
<my-button plain shape="circle" :width="160" :height="56">退菜</my-button>
|
||||
<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>
|
||||
@@ -18,6 +23,10 @@
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
orderInfo:{
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
table:{
|
||||
type: Object,
|
||||
default: () => {}
|
||||
@@ -27,9 +36,16 @@
|
||||
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>
|
||||
|
||||
@@ -17,15 +17,23 @@
|
||||
<view class="u-p-l-30 u-flex-1">
|
||||
<view class="u-flex u-row-between u-col-top">
|
||||
|
||||
<view class="u-flex">
|
||||
<view class="tui" v-if="item.status=='return'">
|
||||
已退
|
||||
<view class="">
|
||||
<view class="u-flex">
|
||||
<view class="tui" v-if="item.status=='return'">
|
||||
已退
|
||||
</view>
|
||||
<view :class="{'line-th':item.status=='return'}">{{item.name||item.productName}}</view>
|
||||
</view>
|
||||
<view :class="{'line-th':item.status=='return'}">{{item.name||item.productName}}</view>
|
||||
<view class="color-999 u-font-24 u-m-t-10">{{item.productSkuName||''}}</view>
|
||||
</view>
|
||||
<view class="u-text-right">
|
||||
<view>¥{{item.salePrice||item.price}}</view>
|
||||
<view v-if="item.status=='return'" class="line-th color-666 u-font-24">¥{{item.salePrice||item.price}}</view>
|
||||
<template v-if="item.status=='return'">
|
||||
<view >¥0.00</view>
|
||||
<view class="line-th color-666 u-font-24">¥{{item.salePrice||item.price}}</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view >¥{{item.salePrice||item.price}}</view>
|
||||
</template>
|
||||
<view class="u-m-t-10 u-font-24">X{{item.number||item.num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-20">
|
||||
<view>订单类型</view>
|
||||
<view>堂食</view>
|
||||
<view>{{returnUseType(data.useType)}}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-20">
|
||||
<view>桌位号</view>
|
||||
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-20">
|
||||
<view>下单时间</view>
|
||||
<view ><up-text v-if="data.createdAt" mode="date" :text="data.createdAt"></up-text></view>
|
||||
<view><up-text v-if="data.createdAt" mode="date" :text="data.createdAt"></up-text></view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-20">
|
||||
<view>订单编号</view>
|
||||
@@ -46,19 +46,28 @@
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
table:{
|
||||
table: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
seatFee:{
|
||||
seatFee: {
|
||||
type: Object,
|
||||
default: () => {totalNumber:0}
|
||||
default: () => {
|
||||
totalNumber: 0
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function returnStatus(status){
|
||||
const item=orderEnum.status.find(v=>v.key==status)
|
||||
return item?item.label:''
|
||||
|
||||
function returnStatus(status) {
|
||||
const item = orderEnum.status.find(v => v.key == status)
|
||||
return item ? item.label : ''
|
||||
}
|
||||
|
||||
function returnUseType(useType) {
|
||||
if (!useType) {
|
||||
return ''
|
||||
}
|
||||
return useType == "takeout" ? '堂食' : '自取';
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user