345 行
13 KiB
HTML
可执行文件
345 行
13 KiB
HTML
可执行文件
<!--[1.8.50]-->
|
||
<style>
|
||
th::selection {
|
||
background-color: transparent;
|
||
}
|
||
|
||
th, td {
|
||
text-align: center;
|
||
padding: 8px 5px;
|
||
color: #313131;
|
||
}
|
||
|
||
th {
|
||
color: #333;
|
||
font-weight: bold;
|
||
border: 1px solid #DCDFE6;
|
||
font-size: 14px;
|
||
}
|
||
|
||
td {
|
||
color: #666;
|
||
border: 1px solid #DCDFE6;
|
||
font-size: 12px;
|
||
position: relative;
|
||
}
|
||
|
||
table {
|
||
width: 100%;
|
||
background-color: white;
|
||
}
|
||
|
||
.none {
|
||
width: 100%;
|
||
height: 1px;
|
||
background-color: #ccc;
|
||
}
|
||
|
||
.title {
|
||
color: #333;
|
||
font-weight: bold;
|
||
font-size: 14px;
|
||
}
|
||
|
||
tr {
|
||
background-color: #f9fafc;
|
||
}
|
||
|
||
.title-tr {
|
||
background-color: #F3F9FF;
|
||
}
|
||
|
||
tbody > tr:nth-child(6n+1) {
|
||
background-color: #fff;
|
||
}
|
||
|
||
tbody > tr:nth-child(6n+2) {
|
||
background-color: #fff;
|
||
}
|
||
|
||
tbody > tr:nth-child(6n+3) {
|
||
background-color: #fff;
|
||
}
|
||
|
||
tbody > tr:hover {
|
||
background-color: #eee;
|
||
}
|
||
|
||
.data-search p {
|
||
line-height: 30px;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.table-bar {
|
||
width: 100%;
|
||
height: calc(100vh - 280px);
|
||
border: 1px solid #DCDFE6;
|
||
}
|
||
</style>
|
||
<div id="statisticsVue" v-cloak>
|
||
<el-form size="small" :inline="true">
|
||
<el-form-item>
|
||
|
||
<date-picker-range :date-time.sync="date"
|
||
:hms="false"
|
||
:auto-fill-hms="true"
|
||
:picker-range="0"></date-picker-range>
|
||
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<el-button type="primary" @click="handleCurrentChange(1)">搜索</el-button>
|
||
<el-button v-if="storeAuth.data_export==1 && operate.export" @click="exportData">导出</el-button>
|
||
</el-form-item>
|
||
</el-form>
|
||
<p>注:1.后台编辑资料余额增加为店内赠送金额</p>
|
||
|
||
<el-scrollbar class="table-bar" v-loading="loading">
|
||
<div style="width: 5600px">
|
||
<table border="1">
|
||
<thead>
|
||
<tr class="title-tr">
|
||
<th rowspan="3">日期</th>
|
||
<th rowspan="3">渠道</th>
|
||
<th rowspan="3">净销售额</th>
|
||
<th rowspan="3">销售额</th>
|
||
<th rowspan="3">销售笔数</th>
|
||
<th rowspan="3">退款金额</th>
|
||
<th rowspan="3">退款笔数</th>
|
||
<th colspan="4" rowspan="2">微信支付</th>
|
||
<th colspan="4" rowspan="2">会员卡支付</th>
|
||
<th colspan="4" rowspan="2">支付宝支付</th>
|
||
<th colspan="4" rowspan="2">现金支付</th>
|
||
<th v-if="other_pay.length > 0" :colspan="other_pay.length * 4">其他支付</th>
|
||
<th colspan="15">会员充值</th>
|
||
</tr>
|
||
<tr class="title-tr">
|
||
<template v-if="other_pay.length > 0">
|
||
<th colspan="4" v-for="(item,index) in other_pay">{{item.name}}</th>
|
||
</template>
|
||
<th rowspan="2">类型</th>
|
||
<th colspan="3">店内</th>
|
||
<th rowspan="2">门店会员余额退款</th>
|
||
<th rowspan="2">收银员会员余额退款</th>
|
||
<th rowspan="2">门店后台赠送</th>
|
||
<th rowspan="2">门店小助手赠送</th>
|
||
<th rowspan="2">门店后台扣除</th>
|
||
<th rowspan="2">门店小助手扣除</th>
|
||
<th rowspan="2">收银员收银端扣除</th>
|
||
<th rowspan="2">收银员小助手扣除</th>
|
||
<th rowspan="2">实际充值金额</th>
|
||
<th rowspan="2">赠送金额</th>
|
||
<th rowspan="2">总扣除金额</th>
|
||
</tr>
|
||
<tr class="title-tr">
|
||
<!--微信、会员余额、支付宝、现金-->
|
||
<template v-for="item in [1,2,3,4]">
|
||
<th>销售金额</th>
|
||
<th>销售笔数</th>
|
||
<th>退款金额</th>
|
||
<th>退款笔数</th>
|
||
</template>
|
||
<!--其他支付-->
|
||
<template v-if="other_pay.length > 0" v-for="(item,index) in other_pay">
|
||
<th>销售金额</th>
|
||
<th>销售笔数</th>
|
||
<th>退款金额</th>
|
||
<th>退款笔数</th>
|
||
</template>
|
||
<!--充值方式-->
|
||
<th>微信</th>
|
||
<th>支付宝</th>
|
||
<th>现金</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<template v-for="(item,index) in dataList">
|
||
<tr>
|
||
<td rowspan="3" class="title">{{item.date}}</td>
|
||
<td class="title">小计</td>
|
||
<td class="title">{{item.total.money}}</td>
|
||
<td class="title">{{item.total.sell_money}}</td>
|
||
<td class="title">{{item.total.sell_num}}</td>
|
||
<td class="title">{{item.total.refund_money}}</td>
|
||
<td class="title">{{item.total.refund_num}}</td>
|
||
|
||
<td>{{item.wechat.sell_money}}</td>
|
||
<td>{{item.wechat.sell_num}}</td>
|
||
<td>{{item.wechat.refund_money}}</td>
|
||
<td>{{item.wechat.refund_num}}</td>
|
||
|
||
<td>{{item.vip.sell_money}}</td>
|
||
<td>{{item.vip.sell_num}}</td>
|
||
<td>{{item.vip.refund_money}}</td>
|
||
<td>{{item.vip.refund_num}}</td>
|
||
|
||
<td>{{item.alipay.sell_money}}</td>
|
||
<td>{{item.alipay.sell_num}}</td>
|
||
<td>{{item.alipay.refund_money}}</td>
|
||
<td>{{item.alipay.refund_num}}</td>
|
||
|
||
<td>{{item.cash.sell_money}}</td>
|
||
<td>{{item.cash.sell_num}}</td>
|
||
<td>{{item.cash.refund_money}}</td>
|
||
<td>{{item.cash.refund_num}}</td>
|
||
|
||
<template v-if="other_pay.length > 0" v-for="(val,key) in item.other">
|
||
<td>{{val.sell_money}}</td>
|
||
<td>{{val.sell_num}}</td>
|
||
<td>{{val.refund_money}}</td>
|
||
<td>{{val.refund_num}}</td>
|
||
</template>
|
||
|
||
<td rowspan="2">充值</td>
|
||
|
||
<td rowspan="2">{{item.line_recharge.wechat_recharge}}</td>
|
||
<td rowspan="2">{{item.line_recharge.alipay_recharge}}</td>
|
||
<td rowspan="2">{{item.line_recharge.cash_recharge}}</td>
|
||
|
||
<td rowspan="3">{{item.update_balance.store_refund}}</td>
|
||
<td rowspan="3">{{item.update_balance.cashier_refund}}</td>
|
||
|
||
<td rowspan="3">{{item.update_balance.store_admin_give}}</td>
|
||
<td rowspan="3">{{item.update_balance.store_aide_give}}</td>
|
||
<td rowspan="3">{{item.update_balance.store_admin_reduce}}</td>
|
||
<td rowspan="3">{{item.update_balance.store_aide_reduce}}</td>
|
||
<td rowspan="3">{{item.update_balance.cashier_reduce}}</td>
|
||
<td rowspan="3">{{item.update_balance.cashier_aide_reduce}}</td>
|
||
|
||
<td :rowspan="3">{{item.update_balance.recharge_all_money}}</td>
|
||
<td :rowspan="3">{{item.update_balance.give_all_money}}</td>
|
||
<td :rowspan="3">{{item.update_balance.reduce_all_money}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>店内</td>
|
||
<td>{{item.total.line_money}}</td>
|
||
<td>{{item.total.line_sell_money}}</td>
|
||
<td>{{item.total.line_sell_num}}</td>
|
||
<td>{{item.total.line_refund_money}}</td>
|
||
<td>{{item.total.line_refund_num}}</td>
|
||
|
||
<td>{{item.wechat.line_sell_money}}</td>
|
||
<td>{{item.wechat.line_sell_num}}</td>
|
||
<td>{{item.wechat.line_refund_money}}</td>
|
||
<td>{{item.wechat.line_refund_num}}</td>
|
||
|
||
<td>{{item.vip.line_sell_money}}</td>
|
||
<td>{{item.vip.line_sell_num}}</td>
|
||
<td>{{item.vip.line_refund_money}}</td>
|
||
<td>{{item.vip.line_refund_num}}</td>
|
||
|
||
<td>{{item.alipay.line_sell_money}}</td>
|
||
<td>{{item.alipay.line_sell_num}}</td>
|
||
<td>{{item.alipay.line_refund_money}}</td>
|
||
<td>{{item.alipay.line_refund_num}}</td>
|
||
|
||
<td>{{item.cash.line_sell_money}}</td>
|
||
<td>{{item.cash.line_sell_num}}</td>
|
||
<td>{{item.cash.line_refund_money}}</td>
|
||
<td>{{item.cash.line_refund_num}}</td>
|
||
|
||
<template v-if="other_pay.length > 0" v-for="(val,key) in item.other">
|
||
<td>{{val.line_sell_money}}</td>
|
||
<td>{{val.line_sell_num}}</td>
|
||
<td>{{val.line_refund_money}}</td>
|
||
<td>{{val.line_refund_num}}</td>
|
||
</template>
|
||
</tr>
|
||
<tr>
|
||
<td>商城</td>
|
||
<td>{{item.total.online_money}}</td>
|
||
<td>{{item.total.online_sell_money}}</td>
|
||
<td>{{item.total.online_sell_num}}</td>
|
||
<td>{{item.total.online_refund_money}}</td>
|
||
<td>{{item.total.online_refund_num}}</td>
|
||
|
||
<td>{{item.wechat.online_sell_money}}</td>
|
||
<td>{{item.wechat.online_sell_num}}</td>
|
||
<td>{{item.wechat.online_refund_money}}</td>
|
||
<td>{{item.wechat.online_refund_num}}</td>
|
||
|
||
<td>{{item.vip.online_sell_money}}</td>
|
||
<td>{{item.vip.online_sell_num}}</td>
|
||
<td>{{item.vip.online_refund_money}}</td>
|
||
<td>{{item.vip.online_refund_num}}</td>
|
||
<td :colspan="other_pay.length*4+8">
|
||
<div class="none"></div>
|
||
</td>
|
||
<td>赠送</td>
|
||
<td>{{item.line_recharge.wechat_give}}</td>
|
||
<td>{{item.line_recharge.alipay_give}}</td>
|
||
<td>{{item.line_recharge.cash_give}}</td>
|
||
</tr>
|
||
</template>
|
||
|
||
<tr v-if="!dataList.length">
|
||
<td :colspan="33+other_pay.length*4">暂无销售数据</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</el-scrollbar>
|
||
<el-pagination
|
||
@current-change="handleCurrentChange"
|
||
:current-page="currentPage"
|
||
:page-size="5"
|
||
layout="total, prev, pager, next, jumper"
|
||
:total="currentLen">
|
||
</el-pagination>
|
||
</div>
|
||
<script>
|
||
var statisticsVue = new Vue({
|
||
el: '#statisticsVue',
|
||
data() {
|
||
return {
|
||
dataList: [],
|
||
other_pay: [],
|
||
date: '',
|
||
loading: false,
|
||
operate: {},
|
||
currentPage: 1,
|
||
currentLen: 0,
|
||
}
|
||
},
|
||
methods: {
|
||
handleCurrentChange(val) {
|
||
this.currentPage = val;
|
||
this.getDataList();
|
||
},
|
||
getDataList() {
|
||
this.loading = true;
|
||
this.sendRequest('Retail/Home/getStoreSaleDataList', {
|
||
data: {
|
||
date: this.date,
|
||
page: this.currentPage,
|
||
},
|
||
success: (res) => {
|
||
if (res.status == 1) {
|
||
this.dataList = [];
|
||
this.dataList = res.data.store_data;
|
||
this.other_pay = res.data.other_pay;
|
||
this.currentLen = res.data.count;
|
||
this.$nextTick(() => {
|
||
this.loading = false;
|
||
})
|
||
} else {
|
||
this.$message.error(res.message)
|
||
this.loading = false;
|
||
}
|
||
}
|
||
});
|
||
},
|
||
exportData() {
|
||
location.href = "{:U('Exporttable/exportOneStoreSaleData')}?date=" + this.date;
|
||
},
|
||
},
|
||
created() {
|
||
this.getDataList();
|
||
this.checkOperateAuth({
|
||
export: '/index.php/Retail/Exporttable/exportOneStoreSaleData',
|
||
}, (data) => {
|
||
this.operate = data;
|
||
})
|
||
},
|
||
})
|
||
|
||
</script> |