Compare commits
2 Commits
2fc94aad3d
...
3997cb795d
Author | SHA1 | Date | |
---|---|---|---|
|
3997cb795d | ||
|
11a2fe0512 |
@ -2,11 +2,12 @@
|
||||
<template>
|
||||
<div style="padding-top: 20px; padding-right: 20px; background: #f6f8f9;padding-bottom: 15px">
|
||||
<div class="card-change2-1" style="" shadow="never">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px" >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
||||
<div class="d-s" style="margin-bottom: 0px;justify-content: space-between">
|
||||
<div class="d-s">
|
||||
<div class="anniu-h" :class="{ 'anniu-act': index == timeIndex }" v-for="(item,index) in timeList"
|
||||
:key="index" @click="editColor(index)">
|
||||
:key="index" @click="editColor(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</div>
|
||||
<el-date-picker
|
||||
@ -18,7 +19,8 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:disabled="disabled"
|
||||
@click="handleQuery">
|
||||
@click="handleQuery"
|
||||
>
|
||||
</el-date-picker>
|
||||
<div style="margin-left: 15px;margin-top: 17px">
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
@ -43,11 +45,14 @@
|
||||
<div class="wrap-boxs">
|
||||
<div class="k_" id="k_1">
|
||||
<div class="size_">交易金额汇总数(元)/交易笔数</div>
|
||||
<div class="title_">{{ orderStatistics.payMoney?orderStatistics.payMoney:0 }}/{{ orderStatistics.count }}</div>
|
||||
<div class="title_">{{ orderStatistics.payMoney ? orderStatistics.payMoney : 0 }}/{{
|
||||
orderStatistics.count
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="k_" id="k_2" v-for="item in orderStatistics.fenxiByDaili2ByData">
|
||||
<div class="size_">{{ item.paymentChannel}}交易金额(元)</div>
|
||||
<div class="title_">{{ item.payMoneyChannel?item.payMoneyChannel:0 }}</div>
|
||||
<div class="size_">{{ item.paymentChannel }}交易金额(元)</div>
|
||||
<div class="title_">{{ item.payMoneyChannel ? item.payMoneyChannel : 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -55,7 +60,8 @@
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="orderList"
|
||||
style="width: 100%">
|
||||
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="parentName" label="所属机构"></el-table-column>
|
||||
@ -65,39 +71,39 @@
|
||||
<template>
|
||||
<el-table-column align="center" prop="fuYouAmount" label="富友交易金额">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.fuYouAmount || 0}}</span>
|
||||
<span>{{ scope.row.fuYouAmount || 0 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="fuYouCount" label="富友交易笔数">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.fuYouCount || 0}}</span>
|
||||
<span>{{ scope.row.fuYouCount || 0 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="fuYouAmount" label="富友交易占比">
|
||||
<template slot-scope="scope">
|
||||
<span>{{(scope.row.fuYouAmount/(scope.row.payMoney)).toFixed(2) + '%' || 0}}</span>
|
||||
<span>{{ formatPercentage(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="laKaLaAmount" label="拉卡拉交易金额">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.laKaLaAmount || 0}}</span>
|
||||
<span>{{ scope.row.laKaLaAmount || 0 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="laKaLaCount" label="拉卡拉交易笔数">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.laKaLaCount || 0}}</span>
|
||||
<span>{{ scope.row.laKaLaCount || 0 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="count92" label="拉卡拉交易占比">
|
||||
<template slot-scope="scope">
|
||||
<span>{{(scope.row.laKaLaAmount/(scope.row.payMoney)).toFixed(2) + '%' || 0}}</span>
|
||||
<span>{{ formatPercentage2(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="date" label="统计日期">
|
||||
<template>
|
||||
{{this.value2[0]}} 至 {{this.value2[1]}}
|
||||
{{ this.value2[0] }} 至 {{ this.value2[1] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -122,15 +128,15 @@ import {
|
||||
getRunningWaterByTissueApi,
|
||||
getTissueByDataApi,
|
||||
getTradingPageApi
|
||||
} from "@/api/allOrder";
|
||||
import {getFenXiOilOrderDataApi, getFenXiOilOrderListApi} from "@/api/financialStatement/yunyingfenxi";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
} from '@/api/allOrder'
|
||||
import { getFenXiOilOrderDataApi, getFenXiOilOrderListApi } from '@/api/financialStatement/yunyingfenxi'
|
||||
import { parseTime } from '@/utils/fuint'
|
||||
|
||||
export default {
|
||||
name: "dai_yunyingfenxi-paym",
|
||||
name: 'dai_yunyingfenxi-paym',
|
||||
data() {
|
||||
return {
|
||||
radio1: "油号选错",
|
||||
radio1: '油号选错',
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
// 员工列表
|
||||
@ -138,38 +144,37 @@ export default {
|
||||
ordersInfo: {},
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
beginTime: '',
|
||||
endTime: '',
|
||||
// 是否为当天时间
|
||||
isSysDate: false,
|
||||
// 收银台订单列表
|
||||
orderList: [],
|
||||
deptList: [],
|
||||
|
||||
|
||||
timeList: [
|
||||
"今日",
|
||||
"近一周",
|
||||
"近一月",
|
||||
"近一年",
|
||||
"自定义",
|
||||
'今日',
|
||||
'近一周',
|
||||
'近一月',
|
||||
'近一年',
|
||||
'自定义'
|
||||
],
|
||||
timeIndex: 0,
|
||||
disabled:true,
|
||||
disabled: true,
|
||||
value2: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
orderNo: "",
|
||||
status: "",
|
||||
payType: "",
|
||||
payChannel: "",
|
||||
deptType: "3",
|
||||
storeId: "",
|
||||
deptId: "",
|
||||
beginTime: '',
|
||||
endTime: '',
|
||||
orderNo: '',
|
||||
status: '',
|
||||
payType: '',
|
||||
payChannel: '',
|
||||
deptType: '3',
|
||||
storeId: '',
|
||||
deptId: ''
|
||||
},
|
||||
orderStatistics: {
|
||||
count: '0',
|
||||
@ -177,69 +182,79 @@ export default {
|
||||
payMoney: '0',
|
||||
fenxiByDaili2ByData: [
|
||||
{
|
||||
paymentChannel:'富友',
|
||||
payMoneyChannel:'0'
|
||||
paymentChannel: '富友',
|
||||
payMoneyChannel: '0'
|
||||
},
|
||||
{
|
||||
paymentChannel:'拉卡拉',
|
||||
payMoneyChannel:'0'
|
||||
},
|
||||
paymentChannel: '拉卡拉',
|
||||
payMoneyChannel: '0'
|
||||
}
|
||||
]
|
||||
},
|
||||
total: 0,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let start = new Date();
|
||||
let start = new Date()
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start, new Date()];
|
||||
this.dateRange = [start, new Date()]
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
let start1 = new Date();
|
||||
let start1 = new Date()
|
||||
start1.setHours(0)
|
||||
start1.setMinutes(0)
|
||||
start1.setSeconds(0)
|
||||
start1.setMilliseconds(0)
|
||||
this.value2 = [parseTime(start1), parseTime(new Date())];
|
||||
this.getList();
|
||||
this.getDeptList();
|
||||
this.value2 = [parseTime(start1), parseTime(new Date())]
|
||||
this.getList()
|
||||
this.getDeptList()
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
formatPercentage(row) {
|
||||
const percentage = (row.fuYouAmount / row.payMoney) * 100
|
||||
return percentage.toFixed(2) + '%' || '0%'
|
||||
},
|
||||
formatPercentage2(row) {
|
||||
const percentage = (row.laKaLaAmount / row.payMoney) * 100
|
||||
return percentage.toFixed(2) + '%' || '0%'
|
||||
},
|
||||
|
||||
editColor(index) {
|
||||
this.timeIndex = index
|
||||
this.disabled = true
|
||||
if (this.timeList[index] == '今日') {
|
||||
let start = new Date();
|
||||
let start = new Date()
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start, new Date()];
|
||||
this.value2 = [start, new Date()]
|
||||
} else if (this.timeList[index] == '近一周') {
|
||||
let nowDate = new Date();
|
||||
let nowDate = new Date()
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
||||
} else if (this.timeList[index] == '近一月') {
|
||||
let nowDate = new Date();
|
||||
let nowDate = new Date()
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
||||
this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
||||
} else if (this.timeList[index] == '近一年') {
|
||||
let nowDate = new Date();
|
||||
let nowDate = new Date()
|
||||
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
|
||||
this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
||||
}else if (this.timeList[index]=='自定义'){
|
||||
} else if (this.timeList[index] == '自定义') {
|
||||
this.disabled = false
|
||||
}
|
||||
this.handleQuery()
|
||||
},
|
||||
getDeptList() {
|
||||
getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => {
|
||||
this.deptList = response.data.records;
|
||||
this.deptList = response.data.records
|
||||
})
|
||||
},
|
||||
exportExcelCashier() {
|
||||
@ -249,7 +264,7 @@ export default {
|
||||
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'});
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
|
||||
this.$download.saveAs(blob, '交易明细统计.xLsx')
|
||||
})
|
||||
},
|
||||
@ -263,26 +278,25 @@ export default {
|
||||
}
|
||||
getFenxiByDailiByDataApi(this.addDateRange(this.queryParams, this.value2)).then(res => {
|
||||
this.orderStatistics = res.data
|
||||
if(this.orderStatistics.fenxiByDaili2ByData.length==0) {
|
||||
if (this.orderStatistics.fenxiByDaili2ByData.length == 0) {
|
||||
this.orderStatistics.fenxiByDaili2ByData = [{
|
||||
paymentChannel:'交易',
|
||||
payMoneyChannel:'0'
|
||||
paymentChannel: '交易',
|
||||
payMoneyChannel: '0'
|
||||
},
|
||||
{
|
||||
paymentChannel: '富友',
|
||||
payMoneyChannel: '0'
|
||||
},
|
||||
{
|
||||
paymentChannel:'富友',
|
||||
payMoneyChannel:'0'
|
||||
},
|
||||
{
|
||||
paymentChannel:'拉卡拉',
|
||||
payMoneyChannel:'0'
|
||||
paymentChannel: '拉卡拉',
|
||||
payMoneyChannel: '0'
|
||||
}
|
||||
]
|
||||
}
|
||||
console.log("res.data1111", res.data)
|
||||
console.log('res.data1111', res.data)
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 获取列表信息
|
||||
getList(val) {
|
||||
let dateRange = []
|
||||
@ -291,39 +305,39 @@ export default {
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
getFenxiByDailiApi(this.addDateRange(this.queryParams, this.value2)).then(response => {
|
||||
this.orderList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.orderList = response.data.records
|
||||
this.total = response.data.total
|
||||
this.isSysDate = false
|
||||
})
|
||||
this.getOrderStatistics()
|
||||
},
|
||||
getOrdersInfo(data) {
|
||||
this.dialogVisible = true;
|
||||
this.dialogVisible = true
|
||||
this.ordersInfo = data
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
this.queryParams.page = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.dateRange = []
|
||||
this.queryParams = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 10
|
||||
}
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
let start1 = new Date();
|
||||
this.beginTime = ''
|
||||
this.endTime = ''
|
||||
let start1 = new Date()
|
||||
start1.setHours(0)
|
||||
start1.setMinutes(0)
|
||||
start1.setSeconds(0)
|
||||
start1.setMilliseconds(0)
|
||||
this.value2 = [parseTime(start1), parseTime(new Date())];
|
||||
this.value2 = [parseTime(start1), parseTime(new Date())]
|
||||
this.timeIndex = 0
|
||||
this.handleQuery();
|
||||
},
|
||||
this.handleQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -379,14 +393,14 @@ export default {
|
||||
#k_1 {
|
||||
background: url("../imgs/k1.png");
|
||||
background-repeat: no-repeat; /* 禁止背景图片重复 */
|
||||
background-size:100% 100%;
|
||||
background-size: 100% 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#k_2 {
|
||||
background: url("../imgs/k2.png");
|
||||
background-repeat: no-repeat; /* 禁止背景图片重复 */
|
||||
background-size:100% 100%;
|
||||
background-size: 100% 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
@ -723,11 +723,12 @@
|
||||
|
||||
<select id="getPaymentChannelData" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
|
||||
SELECT
|
||||
sum(CASE WHEN payment_channel = '富友' THEN pay_money ELSE 0 END) fuYouAmount,
|
||||
sum(CASE WHEN payment_channel = '拉卡拉' THEN pay_money ELSE 0 END) laKaLaAmount,
|
||||
count(CASE WHEN payment_channel = '富友' THEN 1 ELSE 0 END) AS fuYouCount,
|
||||
count(CASE WHEN payment_channel = '拉卡拉' THEN 1 ELSE 0 END) AS laKaLaCount
|
||||
from all_order_info
|
||||
sum( CASE WHEN payment_channel = '富友' THEN pay_money ELSE 0 END ) fuYouAmount,
|
||||
sum( CASE WHEN payment_channel = '拉卡拉' THEN pay_money ELSE 0 END ) laKaLaAmount,
|
||||
COUNT(CASE WHEN payment_channel = '富友' THEN 1 END) AS fuYouCount,
|
||||
COUNT(CASE WHEN payment_channel = '拉卡拉' THEN 1 END) AS laKaLaCount
|
||||
FROM
|
||||
all_order_info
|
||||
where
|
||||
store_id = #{order.storeId}
|
||||
<if test="order.beginTime != null and order.beginTime != ''"><!-- 开始时间检索 -->
|
||||
|
Loading…
Reference in New Issue
Block a user