code review:订单列表

(cherry picked from commit b8ca5800c6)
This commit is contained in:
YunaiV 2023-08-26 11:41:43 +08:00 committed by shizhong
parent 0e36aea9ff
commit b55b9966d6
4 changed files with 33 additions and 29 deletions

View File

@ -346,22 +346,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
} }
] ]
}, },
{
path: '/product/property',
component: Layout,
name: 'Property',
meta: {
hidden: true
},
children: [
{
path: 'value/:propertyId(\\d+)',
component: () => import('@/views/mall/product/property/value/index.vue'),
name: 'ProductPropertyValue',
meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' }
}
]
},
{ {
path: '/product', path: '/product',
component: Layout, component: Layout,
@ -408,6 +392,19 @@ const remainingRouter: AppRouteRecordRaw[] = [
title: '商品详情', title: '商品详情',
activeMenu: '/product/product-spu' activeMenu: '/product/product-spu'
} }
},
{
path: 'property/value/:propertyId(\\d+)',
component: () => import('@/views/mall/product/property/value/index.vue'),
name: 'ProductPropertyValue',
meta: {
noCache: true,
hidden: true,
canTo: true,
icon: 'ep:view',
title: '商品属性值',
activeMenu: '/product/property'
}
} }
] ]
}, },

View File

@ -157,7 +157,7 @@ export enum DICT_TYPE {
TRADE_ORDER_TYPE = 'trade_order_type', // 订单 - 类型 TRADE_ORDER_TYPE = 'trade_order_type', // 订单 - 类型
TRADE_ORDER_STATUS = 'trade_order_status', // 订单 - 状态 TRADE_ORDER_STATUS = 'trade_order_status', // 订单 - 状态
TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status', // 订单项 - 售后状态 TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status', // 订单项 - 售后状态
TRADE_DELIVERY_TYPE = 'delivery_type', // 配送方式 TRADE_DELIVERY_TYPE = 'trade_delivery_type', // 配送方式
// ========== MALL - 营销模块 ========== // ========== MALL - 营销模块 ==========
PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型 PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型

View File

@ -34,6 +34,7 @@ import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express'
import * as TradeOrderApi from '@/api/mall/trade/order' import * as TradeOrderApi from '@/api/mall/trade/order'
import { copyValueToTarget } from '@/utils' import { copyValueToTarget } from '@/utils'
// TODO @puhui999 Form index.vue componentscomponents 使
defineOptions({ name: 'OrderDeliveryForm' }) defineOptions({ name: 'OrderDeliveryForm' })
const { t } = useI18n() // const { t } = useI18n() //

View File

@ -64,6 +64,9 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- TODO @puhui999要不加个 deliveryType 筛选配送方式然后如果选了快递就有快递公司筛选如果选了自提就有自提门店然后把他们这 3 坐在一个 el-form-item
目的是有的时候会筛选门店然后做核销这个时候就需要筛选自提门店
-->
<el-form-item label="快递公司" prop="type"> <el-form-item label="快递公司" prop="type">
<el-select v-model="queryParams.logisticsId" class="!w-280px" clearable placeholder="全部"> <el-select v-model="queryParams.logisticsId" class="!w-280px" clearable placeholder="全部">
<el-option <el-option
@ -125,16 +128,11 @@
</ContentWrap> </ContentWrap>
<!-- 列表 --> <!-- 列表 -->
<!-- TODO @puhui999列表有可能尽量对齐 https://gitee.com/niushop_team/niushop_b2c_v5_stand/raw/master/image/back_end5.png
1订单号订单类型订单来源支付时间那一行直接做到订单项的数据中
2商品信息商品原价那一行应该是在最顶上一行不用每个订单项都写一条
3然后点击展开和收拢订单项可以不做哈
-->
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column class-name="order-table-col"> <el-table-column class-name="order-table-col">
<template #header> <template #header>
<!-- TODO @phui999小屏幕下会有偏移后续看看 -->
<div class="flex items-center" style="width: 100%"> <div class="flex items-center" style="width: 100%">
<div class="ml-100px mr-200px">商品信息</div> <div class="ml-100px mr-200px">商品信息</div>
<div class="mr-60px">单价()/数量</div> <div class="mr-60px">单价()/数量</div>
@ -170,11 +168,15 @@
/> />
<span>支付方式</span> <span>支付方式</span>
<dict-tag <dict-tag
v-if="scope.row.payChannelCode"
:type="DICT_TYPE.PAY_CHANNEL_CODE" :type="DICT_TYPE.PAY_CHANNEL_CODE"
:value="scope.row.payChannelCode" :value="scope.row.payChannelCode"
class="mr-20px" class="mr-20px"
/> />
<span class="mr-20px">支付时间{{ formatDate(scope.row.payTime) }}</span> <v-else class="mr-20px" v-else>未支付</v-else>
<span class="mr-20px" v-if="scope.row.payTime">
支付时间{{ formatDate(scope.row.payTime) }}
</span>
<span>订单类型</span> <span>订单类型</span>
<dict-tag :type="DICT_TYPE.TRADE_ORDER_TYPE" :value="scope.row.type" /> <dict-tag :type="DICT_TYPE.TRADE_ORDER_TYPE" :value="scope.row.type" />
</div> </div>
@ -249,6 +251,11 @@
<dict-tag :type="DICT_TYPE.TRADE_DELIVERY_TYPE" :value="scope.row.deliveryType" /> <dict-tag :type="DICT_TYPE.TRADE_DELIVERY_TYPE" :value="scope.row.deliveryType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="订单状态" width="120">
<template #default>
<dict-tag :type="DICT_TYPE.TRADE_ORDER_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="160"> <el-table-column align="center" fixed="right" label="操作" width="160">
<template #default> <template #default>
<!-- TODO 权限后续补齐 --> <!-- TODO 权限后续补齐 -->
@ -264,7 +271,7 @@
</el-button> </el-button>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<!--判断下 物流类型 + 状态快递 + 待发货时展示发货按钮 --> <!-- 如果是快递并且未发货展示发货按钮 -->
<el-dropdown-item <el-dropdown-item
v-if="scope.row.deliveryType === 1 && scope.row.status === 10" v-if="scope.row.deliveryType === 1 && scope.row.status === 10"
command="delivery" command="delivery"
@ -272,9 +279,8 @@
<Icon icon="ep:takeaway-box" /> <Icon icon="ep:takeaway-box" />
发货 发货
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item command="orderRemarks"> <el-dropdown-item command="remark">
<Icon icon="ep:chat-line-square" /> <Icon icon="ep:chat-line-square" /> 备注
订单备注
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
@ -464,6 +470,6 @@ onMounted(async () => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep(.order-table-col > .cell) { :deep(.order-table-col > .cell) {
padding: 0px; padding: 0;
} }
</style> </style>