代码优化
This commit is contained in:
@@ -210,7 +210,7 @@
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-24" v-if="orderInfo.status == 'unpaid'||orderInfo.status == 'done'">
|
||||
<my-button @tap="printOrder" type="cancel" :color="color.ColorMain">重新打印</my-button>
|
||||
<my-button @tap="printOrder" type="cancel" :color="$utils.ColorMain">重新打印</my-button>
|
||||
</view>
|
||||
</view>
|
||||
<up-popup :round="10" :show="pop.youhui" mode="center" closeOnClickOverlay @close="youhuiDetailHide">
|
||||
@@ -268,7 +268,6 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, reactive } from 'vue';
|
||||
import color from '@/commons/color.js'
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
||||
import { isTui, isTuiCai, isGift, canTuiKuan, canTuicai, mathFloorPrice } from '@/commons/utils/goodsUtil.js'
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<view class="default-box-padding bg-fff border-r-12 u-m-t-24">
|
||||
<view class="u-flex u-row-between">
|
||||
<view>订单状态</view>
|
||||
<view>{{returnStatus(data.status)}}</view>
|
||||
<view>{{$dict.getDiceName(data.status,'orderStatus')}}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>订单类型</view>
|
||||
<view>{{returnUseType(data.dineMode)}}</view>
|
||||
<view>{{$dict.getDiceName(data.dineMode,'dineMode')}}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>桌位号</view>
|
||||
@@ -18,7 +18,7 @@
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>支付方式</view>
|
||||
<view>{{returnPayType(data.payType)||''}}</view>
|
||||
<view>{{$dict.getDiceName(data.payType,'payType')||''}}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>下单时间</view>
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import orderEnum from '@/commons/orderEnum.js'
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -63,35 +63,7 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
const payTypeList = [
|
||||
{name: '主扫', type:'main_scan'},
|
||||
{name: '被扫', type:'back_scan'},
|
||||
{name: '微信小程序', type:'wechat_mini'},
|
||||
{name: '支付宝小程序', type:'alipay_mini'},
|
||||
{name: '会员支付', type:'vip_pay'},
|
||||
{name: '现金支付', type:'cash_pay'},
|
||||
]
|
||||
const payTypeName = ref(null)
|
||||
|
||||
/**
|
||||
* 获取支付方式
|
||||
*/
|
||||
function returnPayType(payType) {
|
||||
let item = payTypeList.find( v=> v.type == payType )
|
||||
return item ? item.name : ''
|
||||
}
|
||||
|
||||
function returnStatus(status) {
|
||||
const item = orderEnum.status.find(v => v.key == status)
|
||||
return item ? item.label : ''
|
||||
}
|
||||
|
||||
function returnUseType(useType) {
|
||||
if (!useType) {
|
||||
return ''
|
||||
}
|
||||
return useType == "take-out" ? '自取' : '堂食';
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -13,10 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive
|
||||
} from 'vue';
|
||||
import color from '@/commons/color.js'
|
||||
import { reactive } from 'vue';
|
||||
const itemStyle = reactive({
|
||||
color: 'rgb(255,0,0)'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user