|
|
@@ -6,8 +6,8 @@
|
|
|
<span class="mr-4">订单编号: {{ order.orderId }} <el-button link type="primary" size="small"
|
|
|
@click="handleCopy(order.orderId)">复制</el-button></span>
|
|
|
<span class="mr-4">创建时间: {{ order.createTime }}</span>
|
|
|
- <span class="mr-4">支付渠道: {{ order.payChannel }}</span>
|
|
|
- <span class="mr-4">订单来源: {{ order.source }}</span>
|
|
|
+ <span class="mr-4">支付渠道: {{ getPayType(order.payType) }}</span>
|
|
|
+ <span class="mr-4">订单来源: 商城小程序</span>
|
|
|
<span class="flag-icon" v-if="order.flag"><el-icon>
|
|
|
<Flag />
|
|
|
</el-icon></span>
|
|
|
@@ -18,28 +18,29 @@
|
|
|
<div class="order-body">
|
|
|
<!-- Products Column -->
|
|
|
<div class="col-products-wrapper">
|
|
|
- <div v-for="(product, idx) in order.products" :key="idx" class="product-row">
|
|
|
+ <div v-for="(product, idx) in order.detailList" :key="idx" class="product-row">
|
|
|
<div class="col-product product-info mr-2">
|
|
|
- <el-image :src="product.image" class="product-img" fit="cover" />
|
|
|
+ <el-image :src="product.cover" class="product-img" fit="cover" />
|
|
|
<div class="product-detail">
|
|
|
- <div class="product-title">{{ product.title }}</div>
|
|
|
+ <div class="product-title">{{ product.bookName }}</div>
|
|
|
<div class="product-isbn">ISBN: <span class="link">{{ product.isbn }}</span>
|
|
|
<el-icon class="cursor-pointer" @click="handleCopy(product.isbn)">
|
|
|
<CopyDocument />
|
|
|
- </el-icon> (品相: {{ product.condition }})
|
|
|
+ </el-icon> (品相: {{ getConditionText(product.conditionType) }})
|
|
|
</div>
|
|
|
<div class="product-tags">
|
|
|
- <span class="tag">回收折扣: {{ product.discount }}折</span>
|
|
|
- <span class="tag success">(回收状态: {{ product.recycleStatus }})</span>
|
|
|
+ <span class="tag">回收折扣: {{ product.discount || 1 }}折</span>
|
|
|
+ <span class="tag success">(回收状态: {{ getRecycleStatusText(product.recycleStatus) }})</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-price">¥ {{ product.price }}</div>
|
|
|
- <div class="col-qty">x{{ product.qty }}</div>
|
|
|
+ <div class="col-qty">x1</div>
|
|
|
<div class="col-aftersales">
|
|
|
<span
|
|
|
- :class="{ 'text-blue': product.refundStatus === '退款成功', 'text-red': product.refundStatus === '退款取消' }">{{
|
|
|
- product.refundStatus }}</span>
|
|
|
+ :class="{ 'text-blue': product.status === '3', 'text-red': product.status === '2' }">
|
|
|
+ {{ getDetailStatusText(product.status) }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -47,21 +48,21 @@
|
|
|
<!-- Merged Columns -->
|
|
|
<div class="col-merged col-buyer">
|
|
|
<div class="buyer-info">
|
|
|
- <el-avatar :size="30" :src="order.buyer.avatar" />
|
|
|
- <div class="buyer-name">{{ order.buyer.name }}</div>
|
|
|
- <div class="buyer-phone">{{ order.buyer.phone }}</div>
|
|
|
+ <el-avatar :size="30" :src="order.avatar" />
|
|
|
+ <div class="buyer-name">{{ order.userNick }}</div>
|
|
|
+ <div class="buyer-phone">{{ order.receiverMobile }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-merged col-payment">
|
|
|
- <div class="payment-amount">¥ {{ order.payment.total }}</div>
|
|
|
- <div class="shipping-fee">(含邮费: ¥ {{ order.payment.shipping }})</div>
|
|
|
+ <div class="payment-amount">¥ {{ order.totalMoney }}</div>
|
|
|
+ <div class="shipping-fee">(含邮费: ¥ {{ order.expressMoney }})</div>
|
|
|
</div>
|
|
|
<div class="col-merged col-logistics">
|
|
|
- <div>{{ order.logistics.company }}</div>
|
|
|
- <div>{{ order.logistics.no }}</div>
|
|
|
+ <div>{{ order.expressName }}</div>
|
|
|
+ <div>{{ order.waybillCode }}</div>
|
|
|
</div>
|
|
|
<div class="col-merged col-status">
|
|
|
- <div :class="getStatusColor(order.status)">{{ order.status }}</div>
|
|
|
+ <div :class="getStatusColor(order.status)">{{ getStatusText(order.status) }}</div>
|
|
|
<el-button link type="primary" @click="$emit('view-detail', order)">[查看详情]</el-button>
|
|
|
</div>
|
|
|
<div class="col-merged col-action">
|
|
|
@@ -71,9 +72,9 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- Buyer Note -->
|
|
|
- <div class="buyer-note" v-if="order.buyerNote">
|
|
|
+ <div class="buyer-note" v-if="order.remark">
|
|
|
<span class="note-label">买家备注:</span>
|
|
|
- <span class="note-content">{{ order.buyerNote }}</span>
|
|
|
+ <span class="note-content">{{ order.remark }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -103,186 +104,241 @@ const handleCopy = async (text) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const getStatusText = (status) => {
|
|
|
+ const statusMap = {
|
|
|
+ '1': '等待买家付款',
|
|
|
+ '2': '等待卖家发货',
|
|
|
+ '3': '等待买家确认收货',
|
|
|
+ '4': '已完成',
|
|
|
+ '5': '退款成功',
|
|
|
+ '6': '退款中',
|
|
|
+ '7': '已取消'
|
|
|
+ };
|
|
|
+ return statusMap[status] || status;
|
|
|
+};
|
|
|
+
|
|
|
const getStatusColor = (status) => {
|
|
|
- if (status === '退款成功') return 'text-red';
|
|
|
- if (status === '等待买家确认收货') return 'text-red';
|
|
|
+ // Implement color logic if needed, e.g. return 'text-red'
|
|
|
return '';
|
|
|
};
|
|
|
+
|
|
|
+const getDetailStatusText = (status) => {
|
|
|
+ const map = {
|
|
|
+ '1': '正常',
|
|
|
+ '2': '退款中',
|
|
|
+ '3': '已退款'
|
|
|
+ };
|
|
|
+ return map[status] || '';
|
|
|
+};
|
|
|
+
|
|
|
+const getConditionText = (type) => {
|
|
|
+ const map = {
|
|
|
+ '1': '良好',
|
|
|
+ '2': '中等',
|
|
|
+ '3': '次品',
|
|
|
+ '4': '全新'
|
|
|
+ };
|
|
|
+ return map[type] || '-';
|
|
|
+};
|
|
|
+
|
|
|
+const getRecycleStatusText = (status) => {
|
|
|
+ const map = {
|
|
|
+ '1': '正在回收',
|
|
|
+ '2': '暂停回收',
|
|
|
+ '3': '未加入回收书单',
|
|
|
+ '4': '黑名单',
|
|
|
+ '5': '手动暂停'
|
|
|
+ };
|
|
|
+ return map[status] || '-';
|
|
|
+};
|
|
|
+
|
|
|
+const getPayType = (type) => {
|
|
|
+ if (!type) {
|
|
|
+ return '-';
|
|
|
+ }
|
|
|
+ const map = {
|
|
|
+ '1': '余额',
|
|
|
+ '2': '微信',
|
|
|
+ '3': '支付宝'
|
|
|
+ };
|
|
|
+ return map[type] || type;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
+<style scoped>
|
|
|
.order-item {
|
|
|
- border: 1px solid #ebeef5;
|
|
|
- margin-bottom: 15px;
|
|
|
-
|
|
|
- .order-header {
|
|
|
- background-color: #f0f9eb; // Light blue/greenish background like screenshot
|
|
|
- padding: 8px 15px;
|
|
|
- font-size: 13px;
|
|
|
- color: #606266;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .urge-tag {
|
|
|
- background-color: #f56c6c;
|
|
|
- color: #fff;
|
|
|
- padding: 1px 5px;
|
|
|
- border-radius: 2px;
|
|
|
- font-size: 12px;
|
|
|
- margin-left: 10px;
|
|
|
- }
|
|
|
- }
|
|
|
+ border: 1px solid #e4e7ed;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ font-size: 13px;
|
|
|
+}
|
|
|
|
|
|
- .order-body {
|
|
|
- display: flex;
|
|
|
- border-top: 1px solid #ebeef5;
|
|
|
-
|
|
|
- .col-products-wrapper {
|
|
|
- flex: 4; // Takes up 4 columns worth of space (Product, Price, Qty, Aftersales)
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- }
|
|
|
-
|
|
|
- .product-row {
|
|
|
- display: flex;
|
|
|
- border-bottom: 1px solid #ebeef5;
|
|
|
-
|
|
|
- &:last-child {
|
|
|
- border-bottom: none;
|
|
|
- }
|
|
|
-
|
|
|
- padding: 10px 0;
|
|
|
-
|
|
|
- .col-product {
|
|
|
- flex: 1.5;
|
|
|
- }
|
|
|
-
|
|
|
- .col-price {
|
|
|
- flex: 0.5;
|
|
|
- }
|
|
|
-
|
|
|
- .col-qty {
|
|
|
- flex: 0.5;
|
|
|
- }
|
|
|
-
|
|
|
- .col-aftersales {
|
|
|
- flex: 0.5;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .col-merged {
|
|
|
- border-left: 1px solid #ebeef5;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- padding: 10px;
|
|
|
- text-align: center;
|
|
|
- font-size: 13px;
|
|
|
- }
|
|
|
- }
|
|
|
+.order-header {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ padding: 10px 20px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ border-bottom: 1px solid #e4e7ed;
|
|
|
+}
|
|
|
|
|
|
- .buyer-note {
|
|
|
- background-color: #fff0f0;
|
|
|
- padding: 8px 15px;
|
|
|
- font-size: 12px;
|
|
|
- color: #f56c6c;
|
|
|
- border-top: 1px solid #ebeef5;
|
|
|
-
|
|
|
- .note-label {
|
|
|
- font-weight: bold;
|
|
|
- margin-right: 5px;
|
|
|
- }
|
|
|
- }
|
|
|
+.order-body {
|
|
|
+ display: flex;
|
|
|
+ align-items: stretch;
|
|
|
+}
|
|
|
+
|
|
|
+.col-products-wrapper {
|
|
|
+ flex: 1;
|
|
|
+ min-width: 0;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ border-right: 1px solid #e4e7ed;
|
|
|
+}
|
|
|
+
|
|
|
+.product-row {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 15px 0;
|
|
|
+ border-bottom: 1px solid #ebeef5;
|
|
|
+}
|
|
|
+
|
|
|
+.product-row:last-child {
|
|
|
+ border-bottom: none;
|
|
|
}
|
|
|
|
|
|
-// Column Widths
|
|
|
.col-product {
|
|
|
- flex: 1.5;
|
|
|
- text-align: left !important;
|
|
|
- padding-left: 15px !important;
|
|
|
+ flex: 1;
|
|
|
+ min-width: 200px;
|
|
|
+ padding-left: 20px;
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+
|
|
|
+.product-img {
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.product-detail {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.product-title {
|
|
|
+ font-weight: 500;
|
|
|
+ margin-bottom: 4px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
}
|
|
|
|
|
|
.col-price {
|
|
|
- flex: 0.5;
|
|
|
+ width: 100px;
|
|
|
+ flex: none;
|
|
|
+ text-align: center;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
}
|
|
|
|
|
|
.col-qty {
|
|
|
- flex: 0.5;
|
|
|
+ width: 80px;
|
|
|
+ flex: none;
|
|
|
+ text-align: center;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
}
|
|
|
|
|
|
.col-aftersales {
|
|
|
- flex: 0.5;
|
|
|
+ width: 100px;
|
|
|
+ flex: none;
|
|
|
+ text-align: center;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+.col-merged {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ border-right: 1px solid #e4e7ed;
|
|
|
+ padding: 10px;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+
|
|
|
+.col-merged:last-child {
|
|
|
+ border-right: none;
|
|
|
}
|
|
|
|
|
|
.col-buyer {
|
|
|
- flex: 0.8;
|
|
|
+ width: 150px;
|
|
|
+ flex: none;
|
|
|
}
|
|
|
|
|
|
.col-payment {
|
|
|
- flex: 0.8;
|
|
|
+ width: 120px;
|
|
|
+ flex: none;
|
|
|
}
|
|
|
|
|
|
.col-logistics {
|
|
|
- flex: 1;
|
|
|
+ width: 150px;
|
|
|
+ flex: none;
|
|
|
}
|
|
|
|
|
|
.col-status {
|
|
|
- flex: 0.8;
|
|
|
+ width: 120px;
|
|
|
+ flex: none;
|
|
|
}
|
|
|
|
|
|
.col-action {
|
|
|
- flex: 0.8;
|
|
|
+ width: 120px;
|
|
|
+ flex: none;
|
|
|
}
|
|
|
|
|
|
-// Product Styles
|
|
|
-.product-info {
|
|
|
- display: flex;
|
|
|
- align-items: flex-start;
|
|
|
-
|
|
|
- .product-img {
|
|
|
- width: 60px;
|
|
|
- height: 60px;
|
|
|
- margin-right: 10px;
|
|
|
- border-radius: 2px;
|
|
|
- }
|
|
|
+.buyer-note {
|
|
|
+ background-color: #fff8e6;
|
|
|
+ padding: 8px 20px;
|
|
|
+ color: #e6a23c;
|
|
|
+ border-top: 1px solid #faecd8;
|
|
|
+}
|
|
|
|
|
|
- .product-detail {
|
|
|
- font-size: 13px;
|
|
|
-
|
|
|
- .product-title {
|
|
|
- color: #303133;
|
|
|
- margin-bottom: 4px;
|
|
|
- }
|
|
|
-
|
|
|
- .product-isbn {
|
|
|
- color: #909399;
|
|
|
- margin-bottom: 4px;
|
|
|
-
|
|
|
- .link {
|
|
|
- color: #409eff;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .product-tags {
|
|
|
- .tag {
|
|
|
- color: #67c23a;
|
|
|
- margin-right: 5px;
|
|
|
-
|
|
|
- &.success {
|
|
|
- color: #67c23a;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+.text-blue {
|
|
|
+ color: #409eff;
|
|
|
}
|
|
|
|
|
|
.text-red {
|
|
|
color: #f56c6c;
|
|
|
}
|
|
|
|
|
|
-.text-blue {
|
|
|
- color: #409eff;
|
|
|
+.flag-icon {
|
|
|
+ color: #f56c6c;
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.urge-tag {
|
|
|
+ background-color: #f56c6c;
|
|
|
+ color: #fff;
|
|
|
+ padding: 2px 6px;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 12px;
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.tag {
|
|
|
+ background-color: #f0f2f5;
|
|
|
+ padding: 2px 6px;
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-right: 5px;
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
+
|
|
|
+.tag.success {
|
|
|
+ background-color: #f0f9eb;
|
|
|
+ color: #67c23a;
|
|
|
}
|
|
|
</style>
|