diff --git a/src/pages/order/detail.vue b/src/pages/order/detail.vue index a1140ec..bad3a30 100644 --- a/src/pages/order/detail.vue +++ b/src/pages/order/detail.vue @@ -37,6 +37,9 @@ 商品名称 + 规格 + 长x宽 + 总面积(m²) 数量 单价 小计 @@ -47,6 +50,9 @@ class="item-row" > {{ item.productName }} + {{ item.productSpec || '-' }} + {{ item.length || '-' }}x{{ item.width || '-' }} + {{ calcArea(item) }} {{ item.quantity }} ¥{{ item.price }} ¥{{ (item.price * item.quantity).toFixed(2) }} @@ -170,6 +176,13 @@ export default { if (!time) return '' return time.substring(0, 16).replace('T', ' ') }, + calcArea(item) { + if (item.length && item.width && item.quantity) { + const area = (item.length * item.width * item.quantity / 1000000).toFixed(4) + return area + ' m²' + } + return '-' + }, getPaymentMethod(method) { const map = { 'cash': '现金', @@ -345,7 +358,8 @@ export default { display: flex; padding: 20rpx 0; border-bottom: 1rpx solid #f8f8f8; - font-size: 26rpx; + font-size: 24rpx; + align-items: center; } .item-row.header { @@ -357,10 +371,29 @@ export default { .item-name { flex: 2; + min-width: 120rpx; +} + +.item-specs { + flex: 1; + text-align: center; + color: #999; +} + +.item-dims { + flex: 1; + text-align: center; +} + +.item-area { + flex: 1; + text-align: center; + color: #667eea; + font-weight: 500; } .item-qty { - flex: 1; + flex: 0.8; text-align: center; }