Skip to content

Commit 83501f9

Browse files
YunaiVgitee-org
authored andcommitted
!279 交易:核销订单
Merge pull request !279 from 疯狂的世界/dev
2 parents 40ec1b0 + ff01eff commit 83501f9

File tree

6 files changed

+343
-16
lines changed

6 files changed

+343
-16
lines changed

src/api/mall/trade/order/index.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,28 @@ export interface ProductPropertiesVO {
108108
valueName?: string // 属性值的名称
109109
}
110110

111+
/** 交易订单统计 */
112+
export interface TradeOrderSummaryRespVO {
113+
/** 订单数量 */
114+
orderCount?: number
115+
/** 订单金额 */
116+
orderPayPrice?: string
117+
/** 退款单数 */
118+
afterSaleCount?: number
119+
/** 退款金额 */
120+
afterSalePrice?: string
121+
}
122+
111123
// 查询交易订单列表
112-
export const getOrderPage = async (params) => {
124+
export const getOrderPage = async (params: any) => {
113125
return await request.get({ url: `/trade/order/page`, params })
114126
}
115127

128+
// 查询交易订单统计
129+
export const getOrderSummary = async (params: any) => {
130+
return await request.get<TradeOrderSummaryRespVO>({ url: `/trade/order/summary`, params })
131+
}
132+
116133
// 查询交易订单详情
117134
export const getOrder = async (id: number | null) => {
118135
return await request.get({ url: `/trade/order/get-detail?id=` + id })

src/views/mall/statistics/trade/components/TradeTrendValue.vue renamed to src/components/SummaryCard/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
import { propTypes } from '@/utils/propTypes'
3636
import { toNumber } from 'lodash-es'
3737
38-
/** 交易状况统计值组件 */
39-
defineOptions({ name: 'TradeTrendValue' })
38+
/** 统计卡片 */
39+
defineOptions({ name: 'SummaryCard' })
4040
4141
defineProps({
4242
title: propTypes.string.def(''),

src/views/mall/statistics/member/index.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="flex flex-col">
33
<el-row :gutter="16" class="summary">
44
<el-col :sm="6" :xs="12" v-loading="loading">
5-
<TradeTrendValue
5+
<SummaryCard
66
title="累计会员数"
77
icon="fa-solid:users"
88
icon-color="bg-blue-100"
@@ -11,7 +11,7 @@
1111
/>
1212
</el-col>
1313
<el-col :sm="6" :xs="12" v-loading="loading">
14-
<TradeTrendValue
14+
<SummaryCard
1515
title="累计充值人数"
1616
icon="fa-solid:user"
1717
icon-color="bg-purple-100"
@@ -20,7 +20,7 @@
2020
/>
2121
</el-col>
2222
<el-col :sm="6" :xs="12" v-loading="loading">
23-
<TradeTrendValue
23+
<SummaryCard
2424
title="累计充值金额"
2525
icon="fa-solid:money-check-alt"
2626
icon-color="bg-yellow-100"
@@ -31,7 +31,7 @@
3131
/>
3232
</el-col>
3333
<el-col :sm="6" :xs="12" v-loading="loading">
34-
<TradeTrendValue
34+
<SummaryCard
3535
title="累计消费金额"
3636
icon="fa-solid:yen-sign"
3737
icon-color="bg-green-100"
@@ -120,7 +120,7 @@
120120
</template>
121121
<script lang="ts" setup>
122122
import * as MemberStatisticsApi from '@/api/mall/statistics/member'
123-
import TradeTrendValue from '../trade/components/TradeTrendValue.vue'
123+
import SummaryCard from '@/components/SummaryCard/index.vue'
124124
import { EChartsOption } from 'echarts'
125125
import china from '@/assets/map/json/china.json'
126126
import { fenToYuan } from '@/utils'

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<!-- 统计值 -->
7777
<el-row :gutter="16">
7878
<el-col :md="6" :sm="12" :xs="24">
79-
<TradeTrendValue
79+
<SummaryCard
8080
title="营业额"
8181
tooltip="商品支付金额、充值金额"
8282
icon="fa-solid:yen-sign"
@@ -94,7 +94,7 @@
9494
/>
9595
</el-col>
9696
<el-col :md="6" :sm="12" :xs="24">
97-
<TradeTrendValue
97+
<SummaryCard
9898
title="商品支付金额"
9999
tooltip="用户购买商品的实际支付金额,包括微信支付、余额支付、支付宝支付、线下支付金额(拼团商品在成团之后计入,线下支付订单在后台确认支付后计入)"
100100
icon="fa-solid:shopping-cart"
@@ -112,7 +112,7 @@
112112
/>
113113
</el-col>
114114
<el-col :md="6" :sm="12" :xs="24">
115-
<TradeTrendValue
115+
<SummaryCard
116116
title="充值金额"
117117
tooltip="用户成功充值的金额"
118118
icon="fa-solid:money-check-alt"
@@ -130,7 +130,7 @@
130130
/>
131131
</el-col>
132132
<el-col :md="6" :sm="12" :xs="24">
133-
<TradeTrendValue
133+
<SummaryCard
134134
title="支出金额"
135135
tooltip="余额支付金额、支付佣金金额、商品退款金额"
136136
icon="ep:warning-filled"
@@ -148,7 +148,7 @@
148148
/>
149149
</el-col>
150150
<el-col :md="6" :sm="12" :xs="24">
151-
<TradeTrendValue
151+
<SummaryCard
152152
title="余额支付金额"
153153
tooltip="用户下单时使用余额实际支付的金额"
154154
icon="fa-solid:wallet"
@@ -166,7 +166,7 @@
166166
/>
167167
</el-col>
168168
<el-col :md="6" :sm="12" :xs="24">
169-
<TradeTrendValue
169+
<SummaryCard
170170
title="支付佣金金额"
171171
tooltip="后台给推广员支付的推广佣金,以实际支付为准"
172172
icon="fa-solid:award"
@@ -184,7 +184,7 @@
184184
/>
185185
</el-col>
186186
<el-col :md="6" :sm="12" :xs="24">
187-
<TradeTrendValue
187+
<SummaryCard
188188
title="商品退款金额"
189189
tooltip="用户成功退款的商品金额"
190190
icon="fa-solid:times-circle"
@@ -212,7 +212,7 @@
212212
<script lang="ts" setup>
213213
import * as TradeStatisticsApi from '@/api/mall/statistics/trade'
214214
import TradeStatisticValue from './components/TradeStatisticValue.vue'
215-
import TradeTrendValue from './components/TradeTrendValue.vue'
215+
import SummaryCard from '@/components/SummaryCard/index.vue'
216216
import { EChartsOption } from 'echarts'
217217
import { DataComparisonRespVO } from '@/api/mall/statistics/common'
218218
import { TradeSummaryRespVO, TradeTrendSummaryRespVO } from '@/api/mall/statistics/trade'

0 commit comments

Comments
 (0)