修改订单部分逻辑代码,提取公共方法
This commit is contained in:
@@ -23,10 +23,10 @@
|
||||
|
||||
<view class="">
|
||||
<view class="u-flex">
|
||||
<view class="tui" v-if="item.status=='return'||item.status=='refund'">
|
||||
已退
|
||||
<view class="tui" v-if="isTui(item)">
|
||||
{{item.status=='refunding'?'退款中':'已退'}}
|
||||
</view>
|
||||
<view :class="{'line-th':item.status=='return'||item.status=='refund'}">{{item.name||item.productName}}
|
||||
<view :class="{'line-th':item.status=='return'||item.status=='refund'||item.status=='refunding'}">{{item.name||item.productName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-m-t-8">
|
||||
@@ -49,7 +49,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-text-right u-m-t-28">
|
||||
<template v-if="item.status=='return'||item.gift||item.status=='refund'">
|
||||
<template v-if="isTui(item)">
|
||||
<view>¥0.00</view>
|
||||
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}
|
||||
</view>
|
||||
@@ -62,20 +62,18 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="orderInfo.status=='unpaid'&&orderInfo.useType!='dine-in-before'">
|
||||
<view class="u-flex u-row-right gap-20 u-m-t-24" v-if="item.status!='return'">
|
||||
<template v-if="canTuicai(orderInfo,item)">
|
||||
<view class="u-flex u-row-right gap-20 u-m-t-24">
|
||||
<!-- <my-button :height="60" color="#333" plain type="cancel" shape="circle">更多操作</my-button> -->
|
||||
<my-button :width="128" :height="48" plain shape="circle" @tap="tuicai(item,index)"><text
|
||||
class="no-wrap">退菜</text></my-button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="item.status!='refund'&&!item.gift">
|
||||
<template v-if="orderInfo.status=='closed'||orderInfo.status=='refund'">
|
||||
<view class="u-flex u-row-right gap-20 u-m-t-20" v-if="item.status!='return'">
|
||||
<template v-if="canTuiKuan(orderInfo,item)">
|
||||
<view class="u-flex u-row-right gap-20 u-m-t-20">
|
||||
<my-button :width="128" :height="48" plain shape="circle"
|
||||
@tap="tuikuan(item,index)"><text class="no-wrap">退款</text> </my-button>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</view>
|
||||
@@ -149,6 +147,7 @@
|
||||
import {
|
||||
hasPermission
|
||||
} from '@/commons/utils/hasPermission.js'
|
||||
import {isTui,canTuiKuan,canTuicai} from '@/commons/utils/goodsUtil.js'
|
||||
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
|
||||
|
||||
function returnTotalMoney(item) {
|
||||
|
||||
Reference in New Issue
Block a user