<template>
|
<div>
|
<el-row :gutter="20">
|
<el-col :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">售价合计</div>
|
<div class="statistic-num">{{ statistic.orderAmount }}</div>
|
</el-card>
|
</el-col>
|
<el-col :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">底价合计</div>
|
<div class="statistic-num">{{ statistic.supplierAmount }}</div>
|
</el-card>
|
</el-col>
|
<el-col :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">打包费</div>
|
<div class="statistic-num">{{ statistic.packingFee }}</div>
|
</el-card>
|
</el-col>
|
<el-col :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">运费</div>
|
<div class="statistic-num">{{ statistic.transportFee }}</div>
|
</el-card>
|
</el-col>
|
<el-col :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">区间加价</div>
|
<div class="statistic-num">{{ statistic.markupOne }}</div>
|
</el-card>
|
</el-col>
|
<el-col v-if="isPartner" :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">平台加价</div>
|
<div class="statistic-num">{{ statistic.markupTwo }}</div>
|
</el-card>
|
</el-col>
|
<el-col v-if="isPartner" :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">合伙人加价</div>
|
<div class="statistic-num">{{ statistic.markupPartner }}</div>
|
</el-card>
|
</el-col>
|
<el-col :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">质检退款</div>
|
<div class="statistic-num">{{ statistic.deductAmount }}</div>
|
</el-card>
|
</el-col>
|
<el-col :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">售后退款</div>
|
<div class="statistic-num">{{ statistic.salesAmount }}</div>
|
</el-card>
|
</el-col>
|
<el-col :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">优惠券金额</div>
|
<div class="statistic-num">{{ statistic.memberCouponAmount }}</div>
|
</el-card>
|
</el-col>
|
<el-col :span="4" class="mb-10">
|
<el-card>
|
<div class="statistic-title">利润合计</div>
|
<div class="statistic-num">{{ statistic.profitAmount }}</div>
|
</el-card>
|
</el-col>
|
</el-row>
|
<el-bus-crud v-bind="tableConfig" />
|
</div>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
statistic: {},
|
tableConfig: {
|
url: `flower/api/bill/list/${this.$route.params.type}`,
|
hasNew: false,
|
hasEdit: false,
|
hasDelete: false,
|
hasView: false,
|
oprationAttrs: {
|
width: 120,
|
fixed: 'right',
|
},
|
beforeRequest: async (params) => {
|
const { code, data } = await this.$elBusHttp.request(
|
`flower/api/bill/statistics/${this.$route.params.type}`,
|
{ params }
|
)
|
if (code === 0) {
|
this.statistic = data || {}
|
}
|
},
|
columns: [
|
{ label: '序号', type: 'index', minWidth: 60 },
|
{ label: '花款(售价)', prop: 'orderAmount', minWidth: 150 },
|
{ label: '花款(底价)', prop: 'supplierAmount', minWidth: 150 },
|
{ label: '发货数', prop: 'num', minWidth: 150 },
|
{ label: '打包费', prop: 'packingFee', minWidth: 150 },
|
{ label: '运费', prop: 'transportFee', minWidth: 150 },
|
{ label: '区间加价', prop: 'markupOne', minWidth: 150 },
|
{
|
label: '平台加价',
|
prop: 'markupTwo',
|
minWidth: 150,
|
hidden: () => this.$route.params.type !== 'partner',
|
},
|
{
|
label: '合伙人加价',
|
prop: 'markupPartner',
|
minWidth: 150,
|
hidden: () => this.$route.params.type !== 'partner',
|
},
|
{ label: '质检退款', prop: 'deductAmount', minWidth: 150 },
|
{ label: '售后退款', prop: 'salesAmount', minWidth: 150 },
|
{ label: '优惠券金额', prop: 'memberCouponAmount', minWidth: 150 },
|
{ label: '利润合计', prop: 'profitAmount', minWidth: 150 },
|
{
|
label: '账单日期',
|
prop: 'billDate',
|
minWidth: 150,
|
fixed: 'right',
|
},
|
],
|
searchForm: [
|
{
|
type: 'row',
|
items: [
|
{
|
label: '账单日期',
|
id: 'startDate',
|
component: 'el-bus-date-range',
|
commonFormat: true,
|
commonFormatProps: ['startDate', 'endDate'],
|
customClass: 'in-bus-form',
|
},
|
],
|
},
|
],
|
extraButtons: [
|
{
|
text: '明细',
|
atClick: (row) => {
|
const url = this.$router.resolve(
|
`/bill/${this.$route.params.type}/${row.id}`
|
).href
|
window.open(url, '_blank')
|
},
|
},
|
],
|
},
|
}
|
},
|
head() {
|
return {
|
title: this.isPartner ? '合伙人账单结算' : '普通用户账单结算',
|
}
|
},
|
computed: {
|
isPartner() {
|
return this.$route.params.type === 'partner'
|
},
|
},
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
@import '@/assets/statistic/index.scss';
|
</style>
|