From e3f250fff07ee496c54050d1ed28041c9786d0fd Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 17 Jun 2023 21:02:29 +0800 Subject: [PATCH] =?UTF-8?q?code=20review=EF=BC=9A=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/order/index.ts | 1 + src/api/mall/trade/order/type/orderType.ts | 4 + src/utils/dict.ts | 20 +-- src/views/mall/trade/order/index.vue | 174 ++++++++++----------- 4 files changed, 100 insertions(+), 99 deletions(-) diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index 5a401030..9d0fab2e 100644 --- a/src/api/mall/trade/order/index.ts +++ b/src/api/mall/trade/order/index.ts @@ -1,6 +1,7 @@ import request from '@/config/axios' // 获得交易订单分页 +// TODO @xiaobai:改成 getOrderPage export const getOrderList = (params: PageParam) => { return request.get({ url: '/trade/order/page', params }) } diff --git a/src/api/mall/trade/order/type/orderType.ts b/src/api/mall/trade/order/type/orderType.ts index cba4fbff..759d9f9a 100644 --- a/src/api/mall/trade/order/type/orderType.ts +++ b/src/api/mall/trade/order/type/orderType.ts @@ -1,3 +1,6 @@ +// TODO @xiaobai:这个放到 order/index.ts 里哈 +// TODO @xiaobai:注释放到变量后面,这样简洁一点 +// TODO @xiaobai:这个改成 TradeOrderRespVO export interface TradeOrderPageItemRespVO { // 订单编号 id: number @@ -85,6 +88,7 @@ export interface TradeOrderPageItemRespVO { items: TradeOrderItemBaseVO[] } +// TODO @xiaobai:这个改成 TradeOrderItemRespVO /** * 交易订单项 Base VO,提供给添加、修改、详细的子 VO 使用 * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 56d7c4c4..fda02848 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -156,6 +156,13 @@ export enum DICT_TYPE { // ========== MALL - 交易模块 ========== EXPRESS_CHARGE_MODE = 'trade_delivery_express_charge_mode', //快递的计费方式 + TRADE_AFTER_SALE_STATUS = 'trade_after_sale_status', // 售后 - 状态 + TRADE_AFTER_SALE_WAY = 'trade_after_sale_way', // 售后 - 方式 + TRADE_AFTER_SALE_TYPE = 'trade_after_sale_type', // 售后 - 类型 + TRADE_ORDER_TYPE = 'trade_order_type', // 订单 - 类型 + TRADE_ORDER_STATUS = 'trade_order_status', // 订单 - 状态 + TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status', // 订单项 - 售后状态 + TERMINAL = 'terminal', // 终端 // ========== MALL - 营销模块 ========== PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型 @@ -164,16 +171,5 @@ export enum DICT_TYPE { PROMOTION_COUPON_STATUS = 'promotion_coupon_status', // 优惠劵的状态 PROMOTION_COUPON_TAKE_TYPE = 'promotion_coupon_take_type', // 优惠劵的领取方式 PROMOTION_ACTIVITY_STATUS = 'promotion_activity_status', // 优惠活动的状态 - PROMOTION_CONDITION_TYPE = 'promotion_condition_type', // 营销的条件类型枚举 - - //===add by 20230530==== - // ========== MALL - ORDER 模块 ========== - TRADE_AFTER_SALE_STATUS = 'trade_after_sale_status', // 售后 - 状态 - TRADE_AFTER_SALE_WAY = 'trade_after_sale_way', // 售后 - 方式 - TRADE_AFTER_SALE_TYPE = 'trade_after_sale_type', // 售后 - 类型 - TRADE_ORDER_TYPE = 'trade_order_type', // 订单 - 类型 - TRADE_ORDER_STATUS = 'trade_order_status', // 订单 - 状态 - TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status', // 订单项 - 售后状态 - - TERMINAL = 'terminal' + PROMOTION_CONDITION_TYPE = 'promotion_condition_type' // 营销的条件类型枚举 } diff --git a/src/views/mall/trade/order/index.vue b/src/views/mall/trade/order/index.vue index 61b22856..cd051a2b 100644 --- a/src/views/mall/trade/order/index.vue +++ b/src/views/mall/trade/order/index.vue @@ -64,9 +64,8 @@ /> - - + 重置 - 导出TODO @@ -110,9 +109,9 @@ - + + -