From cd4b4cd3228a95fcc827ddfdccaf3949d2546a7c Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 16 Oct 2023 22:03:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=EF=BC=9AReview=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/statistics/member.ts | 10 +++++----- src/api/mall/statistics/pay.ts | 8 +++++++- src/api/mall/statistics/trade.ts | 2 +- src/views/mall/home/components/OperationDataCard.vue | 3 ++- src/views/mall/home/index.vue | 4 ++-- src/views/mall/statistics/trade/index.vue | 6 +++--- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/api/mall/statistics/member.ts b/src/api/mall/statistics/member.ts index 28d5a78c..92af031e 100644 --- a/src/api/mall/statistics/member.ts +++ b/src/api/mall/statistics/member.ts @@ -58,8 +58,8 @@ export interface MemberTerminalStatisticsRespVO { export interface MemberCountRespVO { /** 用户访问量 */ visitUserCount: string - /** 新增用户数量 */ - createUserCount: number + /** 注册用户数量 */ + registerUserCount: number } /** 会员注册数量 Response VO */ @@ -86,21 +86,21 @@ export const getMemberAnalyse = (params: MemberAnalyseReqVO) => { // 按照省份,查询会员统计列表 export const getMemberAreaStatisticsList = () => { return request.get({ - url: '/statistics/member/get-area-statistics-list' + url: '/statistics/member/area-statistics-list' }) } // 按照性别,查询会员统计列表 export const getMemberSexStatisticsList = () => { return request.get({ - url: '/statistics/member/get-sex-statistics-list' + url: '/statistics/member/sex-statistics-list' }) } // 按照终端,查询会员统计列表 export const getMemberTerminalStatisticsList = () => { return request.get({ - url: '/statistics/member/get-terminal-statistics-list' + url: '/statistics/member/terminal-statistics-list' }) } diff --git a/src/api/mall/statistics/pay.ts b/src/api/mall/statistics/pay.ts index 1593f38d..f5d14c9d 100644 --- a/src/api/mall/statistics/pay.ts +++ b/src/api/mall/statistics/pay.ts @@ -1,6 +1,12 @@ import request from '@/config/axios' +/** 支付统计 */ +export interface PaySummaryRespVO { + /** 充值金额,单位分 */ + rechargePrice: number +} + /** 获取钱包充值金额 */ export const getWalletRechargePrice = async () => { - return await request.get({ url: `/statistics/pay/wallet-recharge-price` }) + return await request.get({ url: `/statistics/pay/summary` }) } diff --git a/src/api/mall/statistics/trade.ts b/src/api/mall/statistics/trade.ts index ef2a2b2b..5e620a6e 100644 --- a/src/api/mall/statistics/trade.ts +++ b/src/api/mall/statistics/trade.ts @@ -25,7 +25,7 @@ export interface TradeTrendSummaryRespVO { expensePrice: number orderWalletPayPrice: number brokerageSettlementPrice: number - orderRefundPrice: number + afterSaleRefundPrice: number } /** 交易订单数量 Response VO */ diff --git a/src/views/mall/home/components/OperationDataCard.vue b/src/views/mall/home/components/OperationDataCard.vue index cae09a3e..3efac9bf 100644 --- a/src/views/mall/home/components/OperationDataCard.vue +++ b/src/views/mall/home/components/OperationDataCard.vue @@ -70,7 +70,8 @@ const getProductData = async () => { /** 查询钱包充值数据 */ const getWalletRechargeData = async () => { - data.rechargePrice.value = await PayStatisticsApi.getWalletRechargePrice() + const paySummary = await PayStatisticsApi.getWalletRechargePrice(); + data.rechargePrice.value = paySummary.rechargePrice } /** diff --git a/src/views/mall/home/index.vue b/src/views/mall/home/index.vue index ede05bff..feaa46a9 100644 --- a/src/views/mall/home/index.vue +++ b/src/views/mall/home/index.vue @@ -32,8 +32,8 @@ diff --git a/src/views/mall/statistics/trade/index.vue b/src/views/mall/statistics/trade/index.vue index b7dfc667..744bcd1e 100644 --- a/src/views/mall/statistics/trade/index.vue +++ b/src/views/mall/statistics/trade/index.vue @@ -192,11 +192,11 @@ icon-bg-color="text-blue-500" prefix="¥" :decimals="2" - :value="fenToYuan(trendSummary?.value?.orderRefundPrice || 0)" + :value="fenToYuan(trendSummary?.value?.afterSaleRefundPrice || 0)" :percent=" calculateRelativeRate( - trendSummary?.value?.orderRefundPrice, - trendSummary?.reference?.orderRefundPrice + trendSummary?.value?.afterSaleRefundPrice, + trendSummary?.reference?.afterSaleRefundPrice ) " /> From 6204ce6c1b70c5c878f3e21de6d286935ed8ef15 Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 16 Oct 2023 22:09:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=EF=BC=9Atrade=5Fstatisti?= =?UTF-8?q?cs=20=E5=AD=97=E6=AE=B5=E3=80=90order=5Fwallet=5Fpay=5Fprice?= =?UTF-8?q?=E3=80=91=E6=94=B9=E4=B8=BA=E3=80=90wallet=5Fpay=5Fprice?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/statistics/trade.ts | 2 +- src/views/mall/statistics/trade/index.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/mall/statistics/trade.ts b/src/api/mall/statistics/trade.ts index 5e620a6e..94052597 100644 --- a/src/api/mall/statistics/trade.ts +++ b/src/api/mall/statistics/trade.ts @@ -23,7 +23,7 @@ export interface TradeTrendSummaryRespVO { orderPayPrice: number rechargePrice: number expensePrice: number - orderWalletPayPrice: number + walletPayPrice: number brokerageSettlementPrice: number afterSaleRefundPrice: number } diff --git a/src/views/mall/statistics/trade/index.vue b/src/views/mall/statistics/trade/index.vue index 744bcd1e..aff190b0 100644 --- a/src/views/mall/statistics/trade/index.vue +++ b/src/views/mall/statistics/trade/index.vue @@ -156,11 +156,11 @@ icon-bg-color="text-cyan-500" prefix="¥" :decimals="2" - :value="fenToYuan(trendSummary?.value?.orderWalletPayPrice || 0)" + :value="fenToYuan(trendSummary?.value?.walletPayPrice || 0)" :percent=" calculateRelativeRate( - trendSummary?.value?.orderWalletPayPrice, - trendSummary?.reference?.orderWalletPayPrice + trendSummary?.value?.walletPayPrice, + trendSummary?.reference?.walletPayPrice ) " /> From e3a0cfe5e934f2d4863012821545864c845cdbf2 Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 16 Oct 2023 22:18:51 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/home/components/OperationDataCard.vue | 2 +- src/views/mall/home/components/TradeTrendCard.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/mall/home/components/OperationDataCard.vue b/src/views/mall/home/components/OperationDataCard.vue index 3efac9bf..b905203b 100644 --- a/src/views/mall/home/components/OperationDataCard.vue +++ b/src/views/mall/home/components/OperationDataCard.vue @@ -70,7 +70,7 @@ const getProductData = async () => { /** 查询钱包充值数据 */ const getWalletRechargeData = async () => { - const paySummary = await PayStatisticsApi.getWalletRechargePrice(); + const paySummary = await PayStatisticsApi.getWalletRechargePrice() data.rechargePrice.value = paySummary.rechargePrice } diff --git a/src/views/mall/home/components/TradeTrendCard.vue b/src/views/mall/home/components/TradeTrendCard.vue index 6aa9fdcc..a8cab828 100644 --- a/src/views/mall/home/components/TradeTrendCard.vue +++ b/src/views/mall/home/components/TradeTrendCard.vue @@ -186,7 +186,7 @@ const getOrderCountTrendComparison = async ( dates.push(item.value.date) if (series.length === 2) { series[0].data.push(fenToYuan(item?.value?.orderPayPrice || 0)) // 当前金额 - series[1].data.push(fenToYuan(item?.value?.orderPayCount || 0)) // 对照数量 + series[1].data.push(fenToYuan(item?.value?.orderPayCount || 0)) // 当前数量 } else { series[0].data.push(fenToYuan(item?.reference?.orderPayPrice || 0)) // 对照金额 series[1].data.push(fenToYuan(item?.value?.orderPayPrice || 0)) // 当前金额 From 6fc232b758f5d540389be60367b6866ded7ec5aa Mon Sep 17 00:00:00 2001 From: owen Date: Tue, 17 Oct 2023 16:09:36 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BA=A4=E6=98=93=EF=BC=9A=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=A0=B8=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/order/index.ts | 41 +++++-- src/views/mall/trade/order/detail/index.vue | 9 +- .../mall/trade/order/form/OrderPickUpForm.vue | 108 ++++++++++++++++++ src/views/mall/trade/order/index.vue | 12 ++ 4 files changed, 160 insertions(+), 10 deletions(-) create mode 100644 src/views/mall/trade/order/form/OrderPickUpForm.vue diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index ea78275f..999757bd 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' export interface OrderVO { + // ========== 订单基本信息 ========== id?: number | null // 订单编号 no?: string // 订单流水号 createTime?: Date | null // 下单时间 @@ -15,35 +16,43 @@ export interface OrderVO { cancelTime?: Date | null // 订单取消时间 cancelType?: number | null // 取消类型 remark?: string // 商家备注 + + // ========== 价格 + 支付基本信息 ========== payOrderId?: number | null // 支付订单编号 - payed?: boolean // 是否已支付 + payStatus?: boolean // 是否已支付 payTime?: Date | null // 付款时间 payChannelCode?: string // 支付渠道 totalPrice?: number | null // 商品原价(总) - orderPrice?: number | null // 订单原价(总) discountPrice?: number | null // 订单优惠(总) deliveryPrice?: number | null // 运费金额 adjustPrice?: number | null // 订单调价(总) payPrice?: number | null // 应付金额(总) + // ========== 收件 + 物流基本信息 ========== deliveryType?: number | null // 发货方式 + pickUpStoreId?: number // 自提门店编号 + pickUpVerifyCode?: string // 自提核销码 deliveryTemplateId?: number | null // 配送模板编号 - logisticsId?: number | null | null // 发货物流公司编号 + logisticsId?: number | null // 发货物流公司编号 logisticsNo?: string // 发货物流单号 - deliveryStatus?: number | null // 发货状态 deliveryTime?: Date | null // 发货时间 receiveTime?: Date | null // 收货时间 receiverName?: string // 收件人名称 receiverMobile?: string // 收件人手机 - receiverAreaId?: number | null // 收件人地区编号 receiverPostCode?: number | null // 收件人邮编 + receiverAreaId?: number | null // 收件人地区编号 + receiverAreaName?: string //收件人地区名字 receiverDetailAddress?: string // 收件人详细地址 + + // ========== 售后基本信息 ========== afterSaleStatus?: number | null // 售后状态 refundPrice?: number | null // 退款金额 + + // ========== 营销基本信息 ========== couponId?: number | null // 优惠劵编号 couponPrice?: number | null // 优惠劵减免金额 - vipPrice?: number | null // VIP 减免金额 pointPrice?: number | null // 积分抵扣的金额 - receiverAreaName?: string //收件人地区名字 + vipPrice?: number | null // VIP 减免金额 + items?: OrderItemRespVO[] // 订单项列表 // 下单用户信息 user?: { @@ -142,5 +151,21 @@ export const updateOrderAddress = async (data: any) => { // 订单核销 export const pickUpOrder = async (id: number) => { - return await request.put({ url: `/trade/order/pick-up?id=${id}` }) + return await request.put({ url: `/trade/order/pick-up-by-id?id=${id}` }) +} + +// 订单核销 +export const pickUpOrderByVerifyCode = async (pickUpVerifyCode: string) => { + return await request.put({ + url: `/trade/order/pick-up-by-verify-code`, + params: { pickUpVerifyCode } + }) +} + +// 查询核销码对应的订单 +export const getOrderByPickUpVerifyCode = async (pickUpVerifyCode: string) => { + return await request.get({ + url: `/trade/order/get-by-pick-up-verify-code`, + params: { pickUpVerifyCode } + }) } diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/detail/index.vue index 58939dbc..a68eecbc 100644 --- a/src/views/mall/trade/order/detail/index.vue +++ b/src/views/mall/trade/order/detail/index.vue @@ -54,7 +54,7 @@ @@ -235,6 +235,7 @@ import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express' import { useTagsViewStore } from '@/store/modules/tagsView' import { DeliveryTypeEnum, TradeOrderStatusEnum } from '@/utils/constants' import * as DeliveryPickUpStoreApi from '@/api/mall/trade/delivery/pickUpStore' +import { propTypes } from '@/utils/propTypes' defineOptions({ name: 'TradeOrderDetail' }) @@ -294,8 +295,12 @@ const handlePickUp = async () => { /** 获得详情 */ const { params } = useRoute() // 查询参数 +const props = defineProps({ + id: propTypes.number.def(undefined), // 订单ID + showPickUp: propTypes.bool.def(true) // 显示核销按钮 +}) +const id = (params.id || props.id) as unknown as number const getDetail = async () => { - const id = params.id as unknown as number if (id) { const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO // 没有表单信息则关闭页面返回 diff --git a/src/views/mall/trade/order/form/OrderPickUpForm.vue b/src/views/mall/trade/order/form/OrderPickUpForm.vue new file mode 100644 index 00000000..529263c4 --- /dev/null +++ b/src/views/mall/trade/order/form/OrderPickUpForm.vue @@ -0,0 +1,108 @@ + + diff --git a/src/views/mall/trade/order/index.vue b/src/views/mall/trade/order/index.vue index 33d98548..653bfcb9 100644 --- a/src/views/mall/trade/order/index.vue +++ b/src/views/mall/trade/order/index.vue @@ -156,6 +156,10 @@ 重置 + + + 核销 + @@ -347,6 +351,7 @@ +