Compare commits
2 Commits
2fc94aad3d
...
3997cb795d
Author | SHA1 | Date | |
---|---|---|---|
|
3997cb795d | ||
|
11a2fe0512 |
@ -6,7 +6,8 @@
|
||||
<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,7 +45,10 @@
|
||||
<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>
|
||||
@ -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>
|
||||
@ -75,7 +81,7 @@
|
||||
</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="拉卡拉交易金额">
|
||||
@ -90,7 +96,7 @@
|
||||
</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>
|
||||
@ -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,21 +144,20 @@ export default {
|
||||
ordersInfo: {},
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
beginTime: '',
|
||||
endTime: '',
|
||||
// 是否为当天时间
|
||||
isSysDate: false,
|
||||
// 收银台订单列表
|
||||
orderList: [],
|
||||
deptList: [],
|
||||
|
||||
|
||||
timeList: [
|
||||
"今日",
|
||||
"近一周",
|
||||
"近一月",
|
||||
"近一年",
|
||||
"自定义",
|
||||
'今日',
|
||||
'近一周',
|
||||
'近一月',
|
||||
'近一年',
|
||||
'自定义'
|
||||
],
|
||||
timeIndex: 0,
|
||||
disabled: true,
|
||||
@ -161,15 +166,15 @@ export default {
|
||||
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',
|
||||
@ -183,53 +188,63 @@ export default {
|
||||
{
|
||||
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] == '自定义') {
|
||||
@ -239,7 +254,7 @@ export default {
|
||||
},
|
||||
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')
|
||||
})
|
||||
},
|
||||
@ -278,11 +293,10 @@ export default {
|
||||
}
|
||||
]
|
||||
}
|
||||
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>
|
||||
|
@ -725,9 +725,10 @@
|
||||
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
|
||||
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