Skip to content

Commit b8ca580

Browse files
committed
code review:订单列表
1 parent 2605cb7 commit b8ca580

File tree

4 files changed

+33
-29
lines changed

4 files changed

+33
-29
lines changed

src/router/modules/remaining.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -346,22 +346,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
346346
}
347347
]
348348
},
349-
{
350-
path: '/product/property',
351-
component: Layout,
352-
name: 'Property',
353-
meta: {
354-
hidden: true
355-
},
356-
children: [
357-
{
358-
path: 'value/:propertyId(\\d+)',
359-
component: () => import('@/views/mall/product/property/value/index.vue'),
360-
name: 'ProductPropertyValue',
361-
meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' }
362-
}
363-
]
364-
},
365349
{
366350
path: '/product',
367351
component: Layout,
@@ -408,6 +392,19 @@ const remainingRouter: AppRouteRecordRaw[] = [
408392
title: '商品详情',
409393
activeMenu: '/product/product-spu'
410394
}
395+
},
396+
{
397+
path: 'property/value/:propertyId(\\d+)',
398+
component: () => import('@/views/mall/product/property/value/index.vue'),
399+
name: 'ProductPropertyValue',
400+
meta: {
401+
noCache: true,
402+
hidden: true,
403+
canTo: true,
404+
icon: 'ep:view',
405+
title: '商品属性值',
406+
activeMenu: '/product/property'
407+
}
411408
}
412409
]
413410
},

src/utils/dict.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export enum DICT_TYPE {
156156
TRADE_ORDER_TYPE = 'trade_order_type', // 订单 - 类型
157157
TRADE_ORDER_STATUS = 'trade_order_status', // 订单 - 状态
158158
TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status', // 订单项 - 售后状态
159-
TRADE_DELIVERY_TYPE = 'delivery_type', // 配送方式
159+
TRADE_DELIVERY_TYPE = 'trade_delivery_type', // 配送方式
160160

161161
// ========== MALL - 营销模块 ==========
162162
PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型

src/views/mall/trade/order/components/OrderDeliveryForm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express'
3434
import * as TradeOrderApi from '@/api/mall/trade/order'
3535
import { copyValueToTarget } from '@/utils'
3636
37+
// TODO @puhui999:要不 Form 保持和别的模块一样,和 index.vue 放在一个目录下,不作为 components;components 更多要支持给多个模块使用哈。
3738
defineOptions({ name: 'OrderDeliveryForm' })
3839
3940
const { t } = useI18n() // 国际化

src/views/mall/trade/order/index.vue

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
/>
6565
</el-select>
6666
</el-form-item>
67+
<!-- TODO @puhui999:要不加个 deliveryType 筛选;配送方式;然后如果选了快递,就有【快递公司】筛选;如果选了自提,就有【自提门店】;然后把他们这 3 个,坐在一个 el-form-item 里;
68+
目的是;有的时候,会筛选门店,然后做核销;这个时候,就需要筛选自提门店;
69+
-->
6770
<el-form-item label="快递公司" prop="type">
6871
<el-select v-model="queryParams.logisticsId" class="!w-280px" clearable placeholder="全部">
6972
<el-option
@@ -125,16 +128,11 @@
125128
</ContentWrap>
126129

127130
<!-- 列表 -->
128-
<!-- TODO @puhui999:列表有可能尽量对齐 https://gitee.com/niushop_team/niushop_b2c_v5_stand/raw/master/image/back_end5.png 哇,主要感觉视觉上有点无法分辨一个订单项,是和哪个订单关联。
129-
130-
1、订单号、订单类型、订单来源、支付时间那一行,直接做到订单项的数据中
131-
2、商品信息、商品原价那一行,应该是在最顶上一行,不用每个订单项都写一条
132-
3、然后点击展开和收拢订单项,可以不做哈。
133-
-->
134131
<ContentWrap>
135132
<el-table v-loading="loading" :data="list">
136133
<el-table-column class-name="order-table-col">
137134
<template #header>
135+
<!-- TODO @phui999:小屏幕下,会有偏移,后续看看 -->
138136
<div class="flex items-center" style="width: 100%">
139137
<div class="ml-100px mr-200px">商品信息</div>
140138
<div class="mr-60px">单价(元)/数量</div>
@@ -170,11 +168,15 @@
170168
/>
171169
<span>支付方式:</span>
172170
<dict-tag
171+
v-if="scope.row.payChannelCode"
173172
:type="DICT_TYPE.PAY_CHANNEL_CODE"
174173
:value="scope.row.payChannelCode"
175174
class="mr-20px"
176175
/>
177-
<span class="mr-20px">支付时间:{{ formatDate(scope.row.payTime) }}</span>
176+
<v-else class="mr-20px" v-else>未支付</v-else>
177+
<span class="mr-20px" v-if="scope.row.payTime">
178+
支付时间:{{ formatDate(scope.row.payTime) }}
179+
</span>
178180
<span>订单类型:</span>
179181
<dict-tag :type="DICT_TYPE.TRADE_ORDER_TYPE" :value="scope.row.type" />
180182
</div>
@@ -249,6 +251,11 @@
249251
<dict-tag :type="DICT_TYPE.TRADE_DELIVERY_TYPE" :value="scope.row.deliveryType" />
250252
</template>
251253
</el-table-column>
254+
<el-table-column align="center" label="订单状态" width="120">
255+
<template #default>
256+
<dict-tag :type="DICT_TYPE.TRADE_ORDER_STATUS" :value="scope.row.status" />
257+
</template>
258+
</el-table-column>
252259
<el-table-column align="center" fixed="right" label="操作" width="160">
253260
<template #default>
254261
<!-- TODO 权限后续补齐 -->
@@ -264,17 +271,16 @@
264271
</el-button>
265272
<template #dropdown>
266273
<el-dropdown-menu>
267-
<!--判断下 物流类型 + 状态,快递 + 待发货时展示【发货】按钮 -->
274+
<!-- 如果是【快递】,并且【未发货】,则展示【发货】按钮 -->
268275
<el-dropdown-item
269276
v-if="scope.row.deliveryType === 1 && scope.row.status === 10"
270277
command="delivery"
271278
>
272279
<Icon icon="ep:takeaway-box" />
273280
发货
274281
</el-dropdown-item>
275-
<el-dropdown-item command="orderRemarks">
276-
<Icon icon="ep:chat-line-square" />
277-
订单备注
282+
<el-dropdown-item command="remark">
283+
<Icon icon="ep:chat-line-square" /> 备注
278284
</el-dropdown-item>
279285
</el-dropdown-menu>
280286
</template>
@@ -464,6 +470,6 @@ onMounted(async () => {
464470
</script>
465471
<style lang="scss" scoped>
466472
:deep(.order-table-col > .cell) {
467-
padding: 0px;
473+
padding: 0;
468474
}
469475
</style>

0 commit comments

Comments
 (0)