|
|
@@ -1,7 +1,6 @@
|
|
|
<template>
|
|
|
<div class="order-manage admin-page">
|
|
|
- <div class="header">
|
|
|
- <h2 class="admin-page-title">订单管理</h2>
|
|
|
+ <PageHeader title="订单管理">
|
|
|
<div class="filters filter-bar">
|
|
|
<el-input v-model="keyword" placeholder="搜索商品/订单号..." prefix-icon="el-icon-search" clearable @keyup.enter.native="handleSearch" @clear="handleSearch" style="width:220px;" />
|
|
|
<el-date-picker
|
|
|
@@ -28,7 +27,7 @@
|
|
|
</el-select>
|
|
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </PageHeader>
|
|
|
|
|
|
<div class="adm-table-wrap">
|
|
|
<el-table height="100%" :data="list" v-loading="loading" border stripe>
|
|
|
@@ -48,20 +47,20 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="quantity" label="数量" width="60" align="center" />
|
|
|
- <el-table-column label="金额" width="100">
|
|
|
+ <el-table-column label="金额" width="100" align="right">
|
|
|
<template slot-scope="{ row }">
|
|
|
- {{ formatPrice(row.totalAmount) }}
|
|
|
+ <span class="adm-num">{{ formatPrice(row.totalAmount) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" width="100">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag :type="statusType(row.status)">{{ statusLabel(row.status) }}</el-tag>
|
|
|
+ <StatusTag :type="statusType(row.status)" :text="statusLabel(row.status)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="履约状态" width="120">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag v-if="row.fulfillStatus" :type="fulfillType(row.fulfillStatus)" size="mini">{{ fulfillLabel(row.fulfillStatus) }}</el-tag>
|
|
|
- <span v-else style="color:#999;">-</span>
|
|
|
+ <StatusTag v-if="row.fulfillStatus" size="mini" :type="fulfillType(row.fulfillStatus)" :text="fulfillLabel(row.fulfillStatus)" />
|
|
|
+ <span v-else style="color:var(--adm-text-45);">-</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="paymentMethod" label="支付方式" width="100">
|
|
|
@@ -117,7 +116,7 @@
|
|
|
<el-descriptions-item label="总金额">{{ formatPrice(detail.totalAmount) }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="优惠金额">{{ detail.discountAmount ? formatPrice(detail.discountAmount) : '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="订单状态">
|
|
|
- <el-tag :type="statusType(detail.status)">{{ statusLabel(detail.status) }}</el-tag>
|
|
|
+ <StatusTag :type="statusType(detail.status)" :text="statusLabel(detail.status)" />
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="支付方式">{{ payMethodLabel(detail.paymentMethod) }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="支付时间">{{ detail.paidAt ? formatTime(detail.paidAt) : '-' }}</el-descriptions-item>
|
|
|
@@ -127,7 +126,7 @@
|
|
|
{{ deliveryMethodLabel(detail.deliveryMethod) }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="履约状态" v-if="detail.fulfillStatus">
|
|
|
- <el-tag :type="fulfillType(detail.fulfillStatus)" size="mini">{{ fulfillLabel(detail.fulfillStatus) }}</el-tag>
|
|
|
+ <StatusTag size="mini" :type="fulfillType(detail.fulfillStatus)" :text="fulfillLabel(detail.fulfillStatus)" />
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="收货人" v-if="getJsonField(detail.addressSnapshot, 'receiverName') !== '-'">{{ getJsonField(detail.addressSnapshot, 'receiverName') }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="联系电话" v-if="getJsonField(detail.addressSnapshot, 'phone') !== '-'">{{ getJsonField(detail.addressSnapshot, 'phone') }}</el-descriptions-item>
|
|
|
@@ -422,32 +421,9 @@ export default {
|
|
|
|
|
|
<style scoped>
|
|
|
.order-manage { padding: 20px; }
|
|
|
-.header {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- margin-bottom: 20px;
|
|
|
- flex-wrap: wrap;
|
|
|
-}
|
|
|
-.header h2 { margin: 0; }
|
|
|
.filters {
|
|
|
display: flex;
|
|
|
gap: 10px;
|
|
|
align-items: center;
|
|
|
}
|
|
|
-
|
|
|
-.sort-header {
|
|
|
- cursor: pointer;
|
|
|
- user-select: none;
|
|
|
- font-weight: 500;
|
|
|
- font-size: 12px;
|
|
|
-}
|
|
|
-.sort-header:hover {
|
|
|
- color: #409eff;
|
|
|
-}
|
|
|
-.sort-tag {
|
|
|
- margin-left: 8px;
|
|
|
- cursor: pointer;
|
|
|
- white-space: nowrap;
|
|
|
-}
|
|
|
</style>
|