lion 3 years ago
parent 1728d3ff69
commit 94fbbb6d85

@ -9,6 +9,14 @@ export function index(params){
})
}
export function reporttotal(params){
return request({
method:'get',
url:'/api/admin/product-type/total',
params
})
}
export function store(data){
return request({
method:'post',

@ -28,11 +28,20 @@
<Input v-model="select.money_min" style="width: 90px;" clearable placeholder="开始金额" />
<span>~</span>
<Input v-model="select.money_max" style="width: 90px;margin-right: 10px;" clearable placeholder="结束金额" />
</div>
</div>
<div class="select-content-item">
<!-- <div class="select-content-item-label">日期</div> -->
<div>
<el-date-picker style="width: 260px;margin-right: 10px;height:32px;line-height:32px" @change="changeCreatedDate" v-model="select.createdDate" type="daterange"
:picker-options="pickerOptions" value-format="yyyy-MM-dd" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" align="right">
</el-date-picker>
</div>
</div>
<Button icon="ios-search" type="primary" style="margin-right: 10px;" @click="getFlow"></Button>
<Button icon="ios-repeat" type="primary" style="margin-right: 10px;"
@click="select = {pageIndex:1,pageSize:10,merchantId:'',type:''},getFlow()">全部
@click="select = {pageIndex:1,pageSize:10,merchantId:'',type:'',start_date:'',end_date:''},getFlow()">全部
</Button>
<Button icon="ios-download" type="primary" style="margin-right: 10px;" @click="downloadExel"></Button>
</div>
@ -82,7 +91,33 @@
},
merchants: [],
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
total: 0,
list: [],
table: [{
@ -148,7 +183,9 @@
merchant_id: this.select.merchantId,
type: this.select.type,
serial: this.select.serial,
is_export: 1
is_export: 1,
start_date:this.select.start_date,
end_date:this.select.end_date
},
'财务流水.xlsx')
},
@ -156,6 +193,10 @@
pageChange(e) {
this.select.pageIndex = e
this.getFlow()
},
changeCreatedDate(e) {
this.select.start_date = e[0];
this.select.end_date = e[1];
},
async getMerchant() {
@ -182,11 +223,27 @@
}
</script>
<style scoped>
/deep/ .el-date-editor .el-range__icon{
line-height: 25px;
}
/deep/ .el-date-editor .el-range-separator{
line-height: 25px;
}
/deep/ .el-date-editor .el-range__close-icon{
line-height: 25px;
}
</style>
<style scoped lang="scss">
@media screen and (max-width: 1190px) {
.select {
margin-bottom: 6px;
}
}
}
// .select-content-item{
// v::deep .el-date-editor .el-range__icon{
// line-height: 25px;
// }
// }
</style>

@ -38,7 +38,8 @@
<div class="select-content-item-label">订单状态</div>
<div>
<template v-for="(value,key) of orderItemStates">
<el-tag size="small" v-if="key!='unpaid'"
<!-- <el-tag size="small" v-if="key!='unpaid'" -->
<el-tag size="small"
:effect="select.orderStates.key === key ? 'dark' : 'plain'"
@click="select.orderStates = {key,value}" style="margin-right: 6px;">{{value}}</el-tag>
</template>

@ -0,0 +1,89 @@
<template>
<div style="padding: 0 20px">
<div ref="lxHeader">
<lx-header icon="md-apps" text="会员订单统计" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
</lx-header>
</div>
<xy-table :total="total" :isPage='false' :list="list"
:table-item="table">
<template slot="btns">
<div></div>
</template>
</xy-table>
</div>
</template>
<script>
import {
reporttotal
} from '@/api/type'
import {
Message
} from 'element-ui'
export default {
components: {
},
data() {
return {
select: {
},
total: 0,
list: [],
table: [{
prop: 'name',
label: '产品类型',
},
{
prop: 'total_order',
label: '累计下单数'
},
{
prop: 'max_order',
label: '多次下单数'
},
]
}
},
methods: {
async getTotal() {
const res = await reporttotal({
})
this.total = res.total
this.list = res
}
},
mounted() {
this.getTotal()
}
}
</script>
<style scoped lang="scss">
.selector {
display: flex;
flex-wrap: wrap;
align-items: center;
align-content: center;
&-item {
display: flex;
align-items: center;
align-content: center;
margin-top: 6px;
margin-right: 10px;
&__label {
word-break: keep-all;
}
}
}
</style>
Loading…
Cancel
Save