trade:微调 order 列表界面

This commit is contained in:
YunaiV
2023-10-01 23:44:38 +08:00
parent a5808c9e9c
commit 588ce1c9ae
8 changed files with 28 additions and 27 deletions

View File

@@ -75,11 +75,11 @@
</template>
</el-table-column>
<el-table-column label="商品原价" prop="price" width="150">
<template #default="{ row }">{{ floatToFixed2(row.price) }}</template>
<template #default="{ row }">{{ fenToYuan(row.price) }}</template>
</el-table-column>
<el-table-column label="数量" prop="count" width="100" />
<el-table-column label="合计" prop="payPrice" width="150">
<template #default="{ row }">{{ floatToFixed2(row.payPrice) }}</template>
<template #default="{ row }">{{ fenToYuan(row.payPrice) }}</template>
</el-table-column>
<el-table-column label="售后状态" prop="afterSaleStatus" width="120">
<template #default="{ row }">
@@ -97,32 +97,32 @@
</el-descriptions>
<el-descriptions :column="6">
<el-descriptions-item label="商品总额: ">
{{ floatToFixed2(formData.totalPrice!) }}
{{ fenToYuan(formData.totalPrice!) }}
</el-descriptions-item>
<el-descriptions-item label="运费金额: ">
{{ floatToFixed2(formData.deliveryPrice!) }}
{{ fenToYuan(formData.deliveryPrice!) }}
</el-descriptions-item>
<el-descriptions-item label="订单调价: ">
{{ floatToFixed2(formData.adjustPrice!) }}
{{ fenToYuan(formData.adjustPrice!) }}
</el-descriptions-item>
<el-descriptions-item>
<template #label><span style="color: red">商品优惠: </span></template>
{{ floatToFixed2(formData.couponPrice!) }}
{{ fenToYuan(formData.couponPrice!) }}
</el-descriptions-item>
<el-descriptions-item>
<template #label><span style="color: red">订单优惠: </span></template>
{{ floatToFixed2(formData.discountPrice!) }}
{{ fenToYuan(formData.discountPrice!) }}
</el-descriptions-item>
<el-descriptions-item>
<template #label><span style="color: red">积分抵扣: </span></template>
{{ floatToFixed2(formData.pointPrice!) }}
{{ fenToYuan(formData.pointPrice!) }}
</el-descriptions-item>
<el-descriptions-item v-for="item in 5" :key="item" label-class-name="no-colon" />
<!-- 占位 -->
<el-descriptions-item label="应付金额: ">
{{ floatToFixed2(formData.payPrice!) }}
{{ fenToYuan(formData.payPrice!) }}
</el-descriptions-item>
</el-descriptions>
@@ -187,7 +187,7 @@
</template>
<script lang="ts" setup>
import * as TradeOrderApi from '@/api/mall/trade/order'
import { floatToFixed2 } from '@/utils'
import { fenToYuan } from '@/utils'
import { formatDate } from '@/utils/formatTime'
import { DICT_TYPE, getDictLabel, getDictObj } from '@/utils/dict'
import OrderUpdateRemarkForm from '@/views/mall/trade/order/form/OrderUpdateRemarkForm.vue'
@@ -243,11 +243,11 @@ const updatePrice = () => {
/** 获得详情 */
const { params } = useRoute() // 查询参数
const getDetail = async () => {
const id = params.orderId as unknown as number
const id = params.id as unknown as number
if (id) {
const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO
// 没有表单信息则关闭页面返回
if (res === null) {
if (!res) {
message.error('交易订单不存在')
close()
}