<template>
|
<div class="base-page-wrapper order-detail">
|
<el-bus-title title="订单信息" size="small"></el-bus-title>
|
<el-bus-form
|
ref="form"
|
label-width="auto"
|
:content="formContent"
|
readonly
|
></el-bus-form>
|
<el-bus-title title="商品信息" size="small"></el-bus-title>
|
<el-table :data="goodsList">
|
<el-table-column label="商品名称" prop="flowerName"></el-table-column>
|
<el-table-column label="商品分类" prop="flowerCategory"></el-table-column>
|
<el-table-column label="级别" prop="flowerLevelStr"></el-table-column>
|
<el-table-column label="颜色" prop="flowerColor"></el-table-column>
|
<el-table-column label="规格" prop="flowerUnit"></el-table-column>
|
<el-table-column label="数量" prop="num"></el-table-column>
|
<el-table-column label="单价" prop="price"></el-table-column>
|
<el-table-column label="供应商" prop="supplierName"></el-table-column>
|
</el-table>
|
<template v-if="afterSaleList && afterSaleList.length > 0">
|
<el-bus-title title="售后信息" size="small" class="mt-20"></el-bus-title>
|
<el-table :data="afterSaleList">
|
<el-table-column
|
label="商品名称"
|
prop="flowerName"
|
min-width="150"
|
fixed="left"
|
></el-table-column>
|
<el-table-column
|
label="级别"
|
prop="flowerLevelStr"
|
min-width="120"
|
></el-table-column>
|
<el-table-column
|
label="颜色"
|
prop="flowerColor"
|
min-width="120"
|
></el-table-column>
|
<el-table-column
|
label="原因"
|
prop="reason"
|
min-width="200"
|
></el-table-column>
|
<el-table-column
|
label="售后时间"
|
prop="createTime"
|
min-width="180"
|
></el-table-column>
|
<el-table-column
|
label="处理时间"
|
prop="auditTime"
|
min-width="180"
|
></el-table-column>
|
<el-table-column
|
label="处理状态"
|
prop="statusStr"
|
min-width="120"
|
></el-table-column>
|
<el-table-column
|
label="实际退款"
|
prop="totalFee"
|
min-width="120"
|
></el-table-column>
|
<el-table-column label="操作" width="120" fixed="right">
|
<template #default="{ row }">
|
<el-button type="text" @click="toDetail(row.id)"
|
>查看详情</el-button
|
>
|
</template>
|
</el-table-column>
|
</el-table>
|
</template>
|
<div class="text-center mt-20">
|
<el-button class="min-w-100" @click="goBack">返回</el-button>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
formContent: [
|
{
|
type: 'row',
|
items: [
|
{ label: '订单号:', id: 'orderNo', type: 'input' },
|
{ label: '用户账号:', id: 'createName', type: 'input' },
|
{ label: '收货人:', id: 'customer', type: 'input' },
|
{ label: '收货人电话:', id: 'customerTel', type: 'input' },
|
{ label: '收货地址:', id: 'customerWholeAddress', type: 'input' },
|
{ label: '下单时间:', id: 'createTime', type: 'input' },
|
{ label: '支付时间:', id: 'paymentTime', type: 'input' },
|
{ label: '商品金额:', id: 'flowerAmount', type: 'input' },
|
{ label: '打包费:', id: 'packingFee', type: 'input' },
|
{ label: '运费:', id: 'transportFee', type: 'input' },
|
{ label: '订单金额:', id: 'totalAmount', type: 'input' },
|
{ label: '订单状态:', id: 'statusBackendStr', type: 'input' },
|
{ label: '库区:', id: 'warehouseName', type: 'input' },
|
{ label: '库位:', id: 'warehouseLocationCode', type: 'input' },
|
],
|
},
|
],
|
goodsList: [],
|
afterSaleList: [],
|
}
|
},
|
head() {
|
return {
|
title: '订单详情',
|
}
|
},
|
mounted() {
|
this.getDetail()
|
this.getGoodsList()
|
this.getAfterSaleList()
|
},
|
methods: {
|
goBack() {
|
this.$router.back()
|
},
|
async getDetail() {
|
const { code, data } = await this.$elBusHttp.request(
|
'flower/api/partner/order/list/view',
|
{ params: { id: this.$route.params.id } }
|
)
|
if (code === 0) {
|
data.customerWholeAddress = `${data.customerProvince || ''}${
|
data.customerCity || ''
|
}${data.customerRegion || ''}${data.customerAddress || ''}`
|
this.$refs.form.updateForm(data)
|
}
|
},
|
async getGoodsList() {
|
const { code, data } = await this.$elBusHttp.request(
|
'flower/api/partner/order/item/list',
|
{ params: { id: this.$route.params.id } }
|
)
|
if (code === 0) {
|
this.goodsList = data || []
|
}
|
},
|
async getAfterSaleList() {
|
const { code, data } = await this.$elBusHttp.request(
|
'flower/api/partner/sales/list',
|
{ params: { orderId: this.$route.params.id, current: 1, size: 2000 } }
|
)
|
if (code === 0) {
|
this.afterSaleList = data.records || []
|
}
|
},
|
toDetail(id) {
|
this.$router.push(`/order/after-sale/view/${id}`)
|
},
|
},
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.order-detail {
|
.el-bus-title {
|
margin-bottom: 10px;
|
}
|
}
|
</style>
|