订单管理页面
This commit is contained in:
120
pagesOrder/index/compoents/order-item.vue
Normal file
120
pagesOrder/index/compoents/order-item.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<template>
|
||||
<view class="bg-fff item" @click="toDetail">
|
||||
<view class="u-flex u-p-b-22 border-bottom u-col-bottom u-row-between">
|
||||
<view class="u-flex u-col-bottom">
|
||||
<view class="u-font-40 color-333">{{data.tableName}}</view>
|
||||
<view class="u-m-l-22">{{data.masterId}}</view>
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
<view>
|
||||
<text :class="[data.status]">{{returnStatus(data.status)}}</text>
|
||||
</view>
|
||||
<view class="color-main u-m-l-24">
|
||||
<text>
|
||||
{{sendTypeFilter(data.sendType)}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-t-26">
|
||||
<view class="u-flex u-col-bottom u-font-24 color-999">
|
||||
<up-avatar :size="33"></up-avatar>
|
||||
<view class="u-m-l-16">{{formatTime(data.createdAt)}}</view>
|
||||
</view>
|
||||
<view class="u-m-t-32">
|
||||
<view class="u-font-32">1种商品,共1件</view>
|
||||
<view class="border-bottom u-p-b-32">
|
||||
<view class="u-flex u-row-between u-m-t-24" v-for="(item,index) in data.detailList" :key="index">
|
||||
<view>
|
||||
<view class="color-666"> {{item.productName}}</view>
|
||||
<view class="color-999 u-font-24 u-m-t-8">
|
||||
{{item.productSkuName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
<view>×1</view>
|
||||
<view class="u-m-l-24">¥15.00</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="u-flex u-row-between border-bottom u-m-t-32 u-p-b-32">
|
||||
<view>订单备注</view>
|
||||
<view>{{data.remark||'无'}}</view>
|
||||
</view>
|
||||
<view class="u-m-t-32">
|
||||
<view class="u-flex u-row-right">
|
||||
<text>小计¥</text>
|
||||
<text class="font-bold u-font-32">{{data.orderAmount}}</text>
|
||||
</view>
|
||||
<view class="u-flex u-row-right u-m-t-24">
|
||||
<view class="print">重新打印</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dayjs from 'dayjs';
|
||||
import orderEnum from '@/commons/orderEnum.js'
|
||||
import go from '@/commons/utils/go.js'
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
index: {
|
||||
type: [String, Number],
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
function formatTime(time){
|
||||
return dayjs(time).format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
function returnStatus(status) {
|
||||
const item = orderEnum.status.find(v => v.key == status)
|
||||
return item ? item.label : ''
|
||||
}
|
||||
|
||||
function sendTypeFilter(t) {
|
||||
if (t) {
|
||||
return orderEnum.sendType.find(item => item.key == t).label;
|
||||
} else {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
function toDetail(){
|
||||
go.to('PAGES_ORDER_DETAIL',{
|
||||
id:props.data.id
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.border-bottom {
|
||||
border-bottom: 1rpx solid #E5E5E5;
|
||||
}
|
||||
|
||||
.u-font-40 {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 16rpx 24rpx 32rpx 24rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.unpaid {
|
||||
color: #FD7B49;
|
||||
}
|
||||
.print{
|
||||
padding: 6rpx 14rpx 8rpx 18rpx;
|
||||
border:1px solid $my-main-color;
|
||||
color:$my-main-color;
|
||||
font-size: 24rpx;
|
||||
border-radius: 100rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user