oil-station/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/oil.vue
DESKTOP-369JRHT\12997 38be315171 no message
2024-07-23 14:50:57 +08:00

315 lines
9.9 KiB
Vue

<!-- 收银台订单-->
<template>
<div style="margin-top: 0px">
<el-card class="box-card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
<el-form-item label="" prop="deptId" style="width: 180px">
<el-select
v-model="queryParams.deptId"
clearable
placeholder="所属机构"
>
<el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId">
</el-option>
</el-select>
</el-form-item>
<el-form-item class="" style="float: right;">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<div class="wrap-box">
<div class="k_" id="k_1">
<div class="size_">累计交易金额(万元)</div>
<div class="title_">{{orderStatistics.amount}}</div>
</div>
<div class="k_" id="k_2">
<div class="size_">累计交易升数</div>
<div class="title_">{{orderStatistics.num}}</div>
</div>
<div class="k_" id="k_3">
<div class="size_">92#汽油交易金额(万元)</div>
<div class="title_">{{orderStatistics.amount92}}</div>
</div>
<div class="k_" id="k_4">
<div class="size_">95#汽油交易金额(万元)</div>
<div class="title_">{{orderStatistics.amount95}}</div>
</div>
<div class="k_" id="k_5">
<div class="size_">98#汽油交易金额(万元)</div>
<div class="title_">{{orderStatistics.amount98}}</div>
</div>
<div class="k_" id="k_5">
<div class="size_">0#柴油交易金额(万元)</div>
<div class="title_">{{orderStatistics.amount0}}</div>
</div>
</div>
</el-card>
<el-card class="box-card">
<div class="table-box">
<el-table
:data="orderList"
style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column align="center" prop="storeName" label="机构名称"></el-table-column>
<el-table-column align="center" prop="payAmount" label="累计交易金额(万元)"></el-table-column>
<el-table-column align="center" prop="sum" label="累计交易笔数"></el-table-column>
<el-table-column align="center" prop="oilNum" label="累计交易升数"></el-table-column>
<el-table-column align="center" label="92#汽油">
<el-table-column align="center" prop="amount92" label="交易金额(万元)"></el-table-column>
<el-table-column align="center" prop="count92" label="交易笔数"></el-table-column>
<el-table-column align="center" prop="num92" label="交易升数"></el-table-column>
</el-table-column>
<el-table-column align="center" label="95#汽油">
<el-table-column align="center" prop="amount95" label="交易金额(万元)"></el-table-column>
<el-table-column align="center" prop="count95" label="交易笔数"></el-table-column>
<el-table-column prop="num95" label="交易升数"></el-table-column>
</el-table-column>
<el-table-column align="center" label="98#汽油">
<el-table-column align="center" prop="amount98" label="交易金额(万元)"></el-table-column>
<el-table-column align="center" prop="count98" label="交易笔数" ></el-table-column>
<el-table-column align="center" prop="num98" label="交易升数" ></el-table-column>
</el-table-column>
<el-table-column align="center" label="0#柴油">
<el-table-column align="center" prop="amount0" label="交易金额(万元)" ></el-table-column>
<el-table-column align="center" prop="count0" label="交易笔数" ></el-table-column>
<el-table-column align="center" prop="num0" label="交易升数" ></el-table-column>
</el-table-column>
<el-table-column align="center" prop="date" label="统计日期" >
<template>
<!-- {{this.beginTime}} -{{this.endTime}}-->
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-card>
</div>
</template>
<script>
import {
exportExcelTradingApi,
getRunningWaterByTissueApi,
getTissueByDataApi,
getTradingPageApi
} from "@/api/allOrder";
import {getFenXiOilOrderDataApi, getFenXiOilOrderListApi} from "@/api/financialStatement/yunyingfenxi";
export default {
name: "yunyingfenxi-oil",
data(){
return{
radio1:"油号选错",
loading:false,
dialogVisible:false,
// 员工列表
staffList:[],
ordersInfo:{},
// 日期范围
dateRange: [],
beginTime:"",
endTime:"",
// 是否为当天时间
isSysDate:false,
// 收银台订单列表
orderList:[],
deptList:[],
// 查询参数
queryParams: {
page: 1,
pageSize: 10,
beginTime:"",
endTime:"",
orderNo:"",
status:"",
payType:"",
payChannel:"",
deptType:"3",
storeId:"",
deptId:"",
},
orderStatistics:{
amount:'0',
num:'0',
amount92:'0',
amount95:'0',
amount98:'0',
amount0:'0',
},
total:0,
}
},
created() {
let start = new Date();
start.setHours(0)
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
this.dateRange = [start,new Date()];
this.beginTime = start
this.endTime = new Date()
this.isSysDate = true
this.getList();
this.getDeptList();
},
methods:{
getDeptList() {
getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then( response => {
this.deptList = response.data.records;
})
},
exportExcelCashier() {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
exportExcelTradingApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
this.$download.saveAs(blob,'交易明细统计.xLsx')
})
},
// 获取订单统计信息
getOrderStatistics() {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
getFenXiOilOrderDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
this.orderStatistics = res.data
console.log("res.data1111",res.data)
})
},
// 获取列表信息
getList(val){
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
getFenXiOilOrderListApi(this.addDateRange(this.queryParams,dateRange)).then( response => {
this.orderList = response.data.records;
this.total = response.data.total;
this.isSysDate = false
})
this.getOrderStatistics()
},
getOrdersInfo(data) {
this.dialogVisible = true;
this.ordersInfo = data
},
// 搜索按钮操作
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
// 重置按钮操作
resetQuery() {
this.dateRange = [];
this.queryParams = {
page: 1,
pageSize: 10,
}
this.beginTime = ""
this.endTime = ""
this.handleQuery();
},
}
}
</script>
<style scoped>
.box-card{
width: 100%;
margin: 0px 20px 20px 20px;
}
.el-form--inline .el-form-item {
margin-right: 20px;
}
.table-box{
width: 100%;
}
.wrap-box{
width: 100%;
display: flex;
align-items: center;
margin-bottom: 15px;
}
.k_{
width: 200px;
height: 80px;
margin-right: 20px;
box-sizing: border-box;
padding: 15px 10px;
color: #333333;
}
.size_{
font-weight: 400;
font-size: 14px;
color: #333333;
margin-bottom: 10px;
}
.title_{
font-weight: 600;
font-size: 24px;
color: #333333;
}
#k_1{
background: url("../imgs/k1.png");
background-size: cover; /* 背景图片铺满盒子 */
background-repeat: no-repeat; /* 禁止背景图片重复 */
}
#k_2{
background: url("../imgs/k2.png");
background-size: cover; /* 背景图片铺满盒子 */
background-repeat: no-repeat; /* 禁止背景图片重复 */
}
#k_3{
background: url("../imgs/k3.png");
background-size: cover; /* 背景图片铺满盒子 */
background-repeat: no-repeat; /* 禁止背景图片重复 */
}
#k_4{
background: url("../imgs/k4.png");
background-size: cover; /* 背景图片铺满盒子 */
background-repeat: no-repeat; /* 禁止背景图片重复 */
}
#k_5{
background: url("../imgs/k5.png");
background-size: cover; /* 背景图片铺满盒子 */
background-repeat: no-repeat; /* 禁止背景图片重复 */
}
#k_6{
background: url("../imgs/k6.png");
background-size: cover; /* 背景图片铺满盒子 */
background-repeat: no-repeat; /* 禁止背景图片重复 */
}
#k_7{
background: url("../imgs/k7.png");
background-size: cover; /* 背景图片铺满盒子 */
background-repeat: no-repeat; /* 禁止背景图片重复 */
}
</style>