code review:订单详情

This commit is contained in:
YunaiV 2023-06-17 21:12:20 +08:00
parent e3f250fff0
commit 91c53e2e3f

View File

@ -81,8 +81,8 @@
v-for="property in row.properties" v-for="property in row.properties"
:key="property.propertyId" :key="property.propertyId"
> >
{{ property.propertyName }}{{ property.valueName }}</el-tag {{ property.propertyName }}{{ property.valueName }}
> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="originalUnitPrice" label="单价(元)" width="180"> <el-table-column prop="originalUnitPrice" label="单价(元)" width="180">
@ -113,15 +113,15 @@
<!-- <el-descriptions-item v-for="item in 5" label-class-name="no-colon" :key="item" /> --> <!-- <el-descriptions-item v-for="item in 5" label-class-name="no-colon" :key="item" /> -->
</el-descriptions> </el-descriptions>
<el-descriptions column="6"> <el-descriptions column="6">
<el-descriptions-item label="商品总额: " <el-descriptions-item label="商品总额: ">
>{{ (order.originalPrice / 100.0).toFixed(2) }}</el-descriptions-item {{ (order.originalPrice / 100.0).toFixed(2) }}
> </el-descriptions-item>
<el-descriptions-item label="运费金额: " <el-descriptions-item label="运费金额: ">
>{{ (order.deliveryPrice / 100.0).toFixed(2) }}</el-descriptions-item {{ (order.deliveryPrice / 100.0).toFixed(2) }}
> </el-descriptions-item>
<el-descriptions-item label="订单调价: " <el-descriptions-item label="订单调价: ">
>{{ (order.adjustPrice / 100.0).toFixed(2) }}</el-descriptions-item {{ (order.adjustPrice / 100.0).toFixed(2) }}
> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label><span style="color: red">商品优惠: </span></template> <template #label><span style="color: red">商品优惠: </span></template>
{{ ((order.originalPrice - order.originalPrice) / 100.0).toFixed(2) }} {{ ((order.originalPrice - order.originalPrice) / 100.0).toFixed(2) }}
@ -158,6 +158,7 @@
</el-descriptions-item> </el-descriptions-item>
<!-- 物流信息 --> <!-- 物流信息 -->
<!-- TODO @xiaobai改成一个包裹哈目前只允许发货一次 -->
<el-descriptions-item v-if="group.key === 'expressInfo'" labelClassName="no-colon"> <el-descriptions-item v-if="group.key === 'expressInfo'" labelClassName="no-colon">
<el-tabs type="card"> <el-tabs type="card">
<!-- 循环包裹物流信息 --> <!-- 循环包裹物流信息 -->
@ -186,12 +187,12 @@
:src="goodInfo.imgUrl" :src="goodInfo.imgUrl"
/> />
<el-descriptions :column="1"> <el-descriptions :column="1">
<el-descriptions-item labelClassName="no-colon">{{ <el-descriptions-item labelClassName="no-colon">
goodInfo.name {{goodInfo.name }}
}}</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="数量">{{ <el-descriptions-item label="数量">
goodInfo.count {{goodInfo.count }}
}}</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
</template> </template>
@ -225,6 +226,7 @@
</ContentWrap> </ContentWrap>
</template> </template>
<script lang="ts" name="TradeOrderDetail" setup> <script lang="ts" name="TradeOrderDetail" setup>
// TODO @xiaobai order order/detail index.vue
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import * as TradeOrderApi from '@/api/mall/trade/order' import * as TradeOrderApi from '@/api/mall/trade/order'
const message = useMessage() // const message = useMessage() //
@ -238,7 +240,7 @@ const loading = ref(false)
const order = ref<any>({ const order = ref<any>({
items: [], items: [],
user: {} user: {}
}) // }) //
const detailGroups = ref([ const detailGroups = ref([
{ {
@ -305,7 +307,7 @@ const detailInfo = ref({
], ],
goodsInfo: [] // tableData goodsInfo: [] // tableData
}) })
// // TODO @xiaobaigetDetail
const getlist = async () => { const getlist = async () => {
dialogVisible.value = true dialogVisible.value = true
loading.value = true loading.value = true