<template>
|
<div class="pb50" v-loading="loading">
|
<!--订单进度-->
|
<!--内容-->
|
<div class="common-seach-wrap ww100">
|
<el-form size="small" :inline="true" :model="formInline" class="demo-form-inline ww100">
|
<div class="date_section d-b-c">
|
<div class="flex-1">
|
<el-form-item label="选择店铺">
|
<el-select size="small" v-model="formInline.shop_supplier_id" placeholder="请选择" @change="handleClick">
|
<el-option label="全部" :value="0"></el-option>
|
<el-option v-for="(item, index) in supplierList" :key="index" :label="item.name"
|
:value="item.shop_supplier_id"></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="查询日期">
|
<el-radio-group v-model="formInline.type" size="medium" @change="handleClick">
|
<el-radio-button :label="1">今天</el-radio-button>
|
<el-radio-button :label="2">近七天</el-radio-button>
|
<!-- <el-radio-button :label="3">近十五天</el-radio-button> -->
|
<el-radio-button :label="5">当月</el-radio-button>
|
<el-radio-button :label="4">自定义时间</el-radio-button>
|
</el-radio-group>
|
</el-form-item>
|
</div>
|
<div>
|
<el-form-item label="起始时间" v-if="formInline.type==4">
|
<div class="block">
|
<span class="demonstration"></span>
|
<el-date-picker @change="handleClick" size="small" v-model="formInline.time" type="daterange"
|
value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
|
</el-date-picker>
|
</div>
|
</el-form-item>
|
</div>
|
<el-form-item><el-button size="small" type="success" @click="onExport">导出</el-button></el-form-item>
|
</div>
|
</el-form>
|
</div>
|
|
<div class="common-form">收入统计表</div>
|
<el-table size="small" :data="tableData" border style="width: 100%" v-loading="loading">
|
<el-table-column header-align="center" align="center" type="day" prop="day" label="日期"></el-table-column>
|
<el-table-column header-align="center" align="center" prop="pay_balance" label="余额支付"></el-table-column>
|
<el-table-column header-align="center" align="center" prop="pay_wx" label="付呗支付"></el-table-column>
|
<el-table-column header-align="center" align="center" prop="pay_cash" label="线下支付"></el-table-column>
|
<el-table-column header-align="center" align="center" prop="pay_other" label="其他支付"></el-table-column>
|
<el-table-column header-align="center" align="center" prop="coupon" label="优惠券"></el-table-column>
|
<el-table-column header-align="center" align="center" prop="fullreduce" label="满减金额"></el-table-column>
|
<el-table-column header-align="center" align="center" prop="points" label="积分金额"></el-table-column>
|
<el-table-column header-align="center" align="center" prop="refund_money" label="退款金额"></el-table-column>
|
</el-table>
|
|
</div>
|
</template>
|
|
<script>
|
import StatisticsApi from '@/api/statistics.js';
|
import qs from 'qs';
|
export default {
|
data() {
|
return {
|
active: 0,
|
/*是否加载完成*/
|
loading: true,
|
formInline: {
|
order_type: 0,
|
type: 1,
|
shop_supplier_id: 0,
|
time: '',
|
persona_id:0
|
},
|
supplierList: [],
|
personaList:[],
|
tableData: [],
|
};
|
},
|
created() {
|
/*获取列表*/
|
this.getParams();
|
},
|
methods: {
|
/*获取参数*/
|
getParams() {
|
let self = this;
|
let params = self.formInline;
|
params.page = self.curPage;
|
params.list_rows = self.pageSize;
|
self.loading = true;
|
StatisticsApi.getIncomeOrderDate(params,
|
true
|
)
|
.then(data => {
|
self.detail = data.data.detail;
|
self.supplierList = data.data.supplierList;
|
self.personaList = data.data.personaList;
|
self.tableData = data.data.list;
|
self.loading = false;
|
})
|
.catch(error => {
|
self.loading = false;
|
});
|
},
|
|
/*切换菜单*/
|
handleClick() {
|
let self = this;
|
if (self.formInline.type == 4 && !self.formInline.time) {
|
return
|
}
|
self.curPage = 1;
|
self.getParams()
|
},
|
/*渠道身份*/
|
personaClick() {
|
let self = this;
|
self.curPage = 1;
|
self.getParams()
|
},
|
onExport: function() {
|
let baseUrl = window.location.protocol + '//' + window.location.host;
|
window.location.href = baseUrl + '/index.php/shop/statistics.Income/export?' + qs.stringify(this.formInline);
|
},
|
selectId(e) {
|
this.formInline.shop_supplier_id = e;
|
this.getParams()
|
},
|
}
|
};
|
</script>
|
<style lang="scss">
|
.el-row {
|
margin-bottom: 20px;
|
|
&:last-child {
|
margin-bottom: 0;
|
}
|
}
|
|
.el-col {
|
border-radius: 4px;
|
}
|
|
.grid-content {
|
padding: 20px;
|
border-radius: 4px;
|
min-height: 36px;
|
}
|
|
.bg-purple {
|
background: #f4f4f4;
|
}
|
|
.table-wrap {
|
padding: 20px;
|
padding-top: 0;
|
}
|
|
.common-form-data {
|
margin-left: 15px;
|
font-weight: 500;
|
}
|
|
.tips {
|
padding: 15px;
|
margin-bottom: 20px;
|
}
|
|
.tips_tit {
|
font-size: 22px;
|
margin-bottom: 10px;
|
}
|
|
.tips_txt {
|
line-height: 25px;
|
color: #666;
|
font-size: 14px;
|
}
|
|
.detail_prici {
|
font-size: 20px;
|
color: #000;
|
font-weight: bold;
|
margin-top: 10px;
|
max-width: 250px;
|
}
|
</style>
|