
【原 因】:详情复框 组件 【过 程】: 【影 响】: # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
82 lines
1.9 KiB
Vue
82 lines
1.9 KiB
Vue
<template>
|
||
<view class="m-l-24 m-r-24 m-t-24 p-24 bg-w rad8 boxshadow">
|
||
<view class="m-b-24 borderBDas flex msb mub">
|
||
<view class="fb fz36 l-h-18">{{tit}}</view>
|
||
<view class="fcb fz24 l-h-12">订单号:{{order.order_sn}}</view>
|
||
</view>
|
||
<view class="m-t-24 flex msb">
|
||
<view class="flex3 ofh">
|
||
<scroll-view class="scroll-view_H" scroll-x="true">
|
||
<view class="scroll-view-item_H m-r-12" v-for="(ps,index) in order.product_snapshot" :key="index">
|
||
<u--image :src="ps.spu_photo[0]" width="147rpx" height="110rpx" radius="4rpx" />
|
||
</view>
|
||
</scroll-view>
|
||
</view>
|
||
<view class="flex1 fcb fz24 flex mr md">
|
||
共{{order.total_num}}件
|
||
</view>
|
||
</view>
|
||
<view class="fz28 borderBDas p-b-12 p-t-12" v-if="order!==null">
|
||
<view class="flex msb l-h-18">
|
||
<view>商品小计</view>
|
||
<view>¥{{order.total_price | formatPrice}}</view>
|
||
</view>
|
||
<view class="flex msb l-h-18">
|
||
<view>外送费</view>
|
||
<view>¥{{order.transport_price | formatPrice}}</view>
|
||
</view>
|
||
<view class="flex msb l-h-18">
|
||
<view>打包服务费</view>
|
||
<view>¥{{order.pack_price | formatPrice}}</view>
|
||
</view>
|
||
</view>
|
||
<view class="flex mr mac l-h-18 m-t-24">
|
||
<view class="fcb fz24">合计</view>
|
||
<view class="m-l-12 fz36 fb" v-if="fullPrice!==null">¥{{fullPrice | formatPrice}}</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
formatPrice
|
||
} from '@/utils/index.js'
|
||
export default {
|
||
name: "orderCon",
|
||
data() {
|
||
return {
|
||
|
||
}
|
||
},
|
||
props: {
|
||
tit: {
|
||
type: String
|
||
},
|
||
order: {
|
||
type: Object
|
||
}
|
||
},
|
||
filters: {
|
||
formatPrice, //价格 格式化
|
||
},
|
||
methods: {
|
||
formatPrice, //格式化价格
|
||
},
|
||
computed: {
|
||
//订单总价格
|
||
fullPrice() {
|
||
if (this.order) {
|
||
return this.formatPrice(Number(this.order.transport_price) + Number(this.order.pack_price) + Number(
|
||
this.order.total_price))
|
||
} else {
|
||
return 0
|
||
}
|
||
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
|
||
</style> |