feat(custom): 新增订单统计,用户统计
This commit is contained in:
@@ -3,16 +3,26 @@
|
||||
<n-row gutter="12">
|
||||
<n-col :span="24">
|
||||
<div flex>
|
||||
<n-card w-500>
|
||||
<n-statistic label="订单流水" tabular-nums>
|
||||
<n-card w-200 rounded-5>
|
||||
<n-statistic label="交易额(元)" tabular-nums>
|
||||
<n-number-animation :from="0" :to="cardData.total" />
|
||||
</n-statistic>
|
||||
</n-card>
|
||||
<n-card ml-10 w-500>
|
||||
<n-card ml-10 w-200 rounded-5>
|
||||
<n-statistic label="订单数量" tabular-nums>
|
||||
<n-number-animation :from="0" :to="cardData.count" />
|
||||
</n-statistic>
|
||||
</n-card>
|
||||
<n-card ml-10 w-200 rounded-5>
|
||||
<n-statistic label="赠送豆子" tabular-nums>
|
||||
<n-number-animation :from="0" :to="cardData.pulse" />
|
||||
</n-statistic>
|
||||
</n-card>
|
||||
<n-card ml-10 w-200 rounded-5>
|
||||
<n-statistic label="总佣金" tabular-nums>
|
||||
<n-number-animation :from="0" :to="cardData.commission" />
|
||||
</n-statistic>
|
||||
</n-card>
|
||||
</div>
|
||||
</n-col>
|
||||
<n-col :span="24" mt-10>
|
||||
@@ -34,7 +44,7 @@
|
||||
<n-input-group>
|
||||
<n-select
|
||||
v-model:value="queryData.selectKey"
|
||||
:style="{ width: '7%' }"
|
||||
:style="{ width: '10%' }"
|
||||
:options="selectOptions"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
@@ -182,6 +192,39 @@ const columns = ref([
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '赠送豆子',
|
||||
align: 'center',
|
||||
key: 'pulse_number',
|
||||
},
|
||||
{
|
||||
title: '赠送积分',
|
||||
align: 'center',
|
||||
key: 'integral',
|
||||
},
|
||||
{
|
||||
title: '推广积分',
|
||||
align: 'center',
|
||||
key: 'commission_number',
|
||||
},
|
||||
{
|
||||
title: '分佣类型',
|
||||
align: 'center',
|
||||
slot: 'commission_type',
|
||||
render: (row) => {
|
||||
switch (row.commission_type) {
|
||||
case 1:
|
||||
return h('span', '百分比')
|
||||
case 2:
|
||||
return h('span', '固定金额')
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '分佣比例',
|
||||
align: 'center',
|
||||
key: 'commission',
|
||||
},
|
||||
{
|
||||
title: '下单时间',
|
||||
align: 'center',
|
||||
@@ -208,6 +251,8 @@ const cardData = ref({
|
||||
total: 0,
|
||||
service: 0,
|
||||
count: 0,
|
||||
commission: 0,
|
||||
pulse: 0,
|
||||
})
|
||||
|
||||
const pagination = ref({
|
||||
@@ -261,6 +306,8 @@ const getList = async () => {
|
||||
cardData.value.total = res.data.number
|
||||
cardData.value.service = res.data.commission
|
||||
cardData.value.count = res.data.total
|
||||
cardData.value.commission = res.data.total_commission
|
||||
cardData.value.pulse = res.data.total_pulse
|
||||
} catch (error) {
|
||||
$message.error(error.msg)
|
||||
throw error
|
||||
|
||||
Reference in New Issue
Block a user