diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index 9413b73c..d4a22944 100644 --- a/src/api/mall/trade/order/index.ts +++ b/src/api/mall/trade/order/index.ts @@ -15,11 +15,11 @@ export interface OrderVO { cancelTime?: Date | null // 订单取消时间 cancelType?: number | null // 取消类型 remark?: string // 商家备注 - payOrderId: number | null // 支付订单编号 + payOrderId?: number | null // 支付订单编号 payed?: boolean // 是否已支付 payTime?: Date | null // 付款时间 payChannelCode?: string // 支付渠道 - originalPrice?: number | null // 商品原价(总) + totalPrice?: number | null // 商品原价(总) orderPrice?: number | null // 订单原价(总) discountPrice?: number | null // 订单优惠(总) deliveryPrice?: number | null // 运费金额 @@ -44,12 +44,19 @@ export interface OrderVO { pointPrice?: number | null // 积分抵扣的金额 receiverAreaName?: string //收件人地区名字 items?: OrderItemRespVO[] // 订单项列表 - //用户信息 + // 用户信息 user?: { id?: number | null nickname?: string avatar?: string } + // 订单操作日志 + orderLog: orderLog[] +} + +export interface orderLog { + content?: string + createTime?: Date } export interface OrderItemRespVO { @@ -94,6 +101,11 @@ export const getOrder = async (id: number | null) => { return await request.get({ url: `/trade/order/get-detail?id=` + id }) } +// 查询交易订单物流详情 +export const getExpressTrackList = async (id: number | null) => { + return await request.get({ url: `/trade/order/get-express-track-list?id=` + id }) +} + export interface DeliveryVO { id: number // 订单编号 logisticsId: number | null // 物流公司编号 diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/detail/index.vue index ef2d9958..e2f790f1 100644 --- a/src/views/mall/trade/order/detail/index.vue +++ b/src/views/mall/trade/order/detail/index.vue @@ -2,32 +2,32 @@ - {{ orderInfo.no }} + {{ formData.no }} - + 秒杀活动 - + - {{ orderInfo.receiverName }} - {{ orderInfo.userRemark }} + {{ formData.receiverName }} + {{ formData.userRemark }} - + - {{ orderInfo.receiverMobile }} - {{ orderInfo.remark }} - {{ orderInfo.payOrderId }} + {{ formData.receiverMobile }} + {{ formData.remark }} + {{ formData.payOrderId }} - + - + - {{ orderInfo.receiverAreaName }} {{ orderInfo.receiverDetailAddress }} + {{ formData.receiverAreaName }} {{ formData.receiverDetailAddress }} - + 调整价格 @@ -59,7 +59,7 @@ - + {{ row.spuName }} @@ -91,111 +91,75 @@ - {{ floatToFixed2(orderInfo.totalPrice) }}元 + {{ floatToFixed2(formData.totalPrice!) }}元 - {{ floatToFixed2(orderInfo.deliveryPrice) }}元 + {{ floatToFixed2(formData.deliveryPrice!) }}元 - {{ floatToFixed2(orderInfo.updatePrice) }}元 + {{ floatToFixed2(formData.adjustPrice!) }}元 商品优惠: - {{ floatToFixed2(orderInfo.couponPrice) }}元 + {{ floatToFixed2(formData.couponPrice!) }}元 订单优惠: - {{ floatToFixed2(orderInfo.discountPrice) }}元 + {{ floatToFixed2(formData.discountPrice!) }}元 积分抵扣: - {{ floatToFixed2(orderInfo.pointPrice) }}元 + {{ floatToFixed2(formData.pointPrice!) }}元 - {{ floatToFixed2(orderInfo.payPrice) }}元 + {{ floatToFixed2(formData.payPrice!) }}元 - - - - - - - {{ activity.content }} - - - - - - - - - - - - - - - - - - {{ goodInfo.name }} - - {{ goodInfo.count }} - - - - - - - - - - - - {{ activity.content }} - - - - - - - {{ pkgInfo[pkgChild.valueKey] }} - - - - - - - + + + {{ deliveryExpressList.find((item) => item.id === formData.logisticsId)?.name }} + + {{ formData.logisticsNo }} + + {{ formatDate(formData.deliveryTime!) }} + + + + + + + + + + + {{ express.content }} + + + + + + + + + {{ log.content }} + + + + @@ -207,82 +171,21 @@