|
@@ -20,25 +20,25 @@
|
|
</view>
|
|
</view>
|
|
<view class="report-content">
|
|
<view class="report-content">
|
|
<template v-if="currentType.value === 1">
|
|
<template v-if="currentType.value === 1">
|
|
- <TollCollectorPerformance :currentDate="curDate"/>
|
|
|
|
|
|
+ <TollCollectorPerformance ref="tollCollectorPerformance"/>
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 2">
|
|
<template v-else-if="currentType.value === 2">
|
|
- <SectionBerth :currentDate="curDate"/>
|
|
|
|
|
|
+ <SectionBerth ref="sectionBerth"/>
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 3">
|
|
<template v-else-if="currentType.value === 3">
|
|
- <ParkingReallyIncome :currentDate="curDate"/>
|
|
|
|
|
|
+ <ParkingReallyIncome ref="parkingReallyIncome"/>
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 4">
|
|
<template v-else-if="currentType.value === 4">
|
|
- <ArrearsReport :currentDate="curDate"/>
|
|
|
|
|
|
+ <ArrearsReport ref="arrearsReport" />
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 5">
|
|
<template v-else-if="currentType.value === 5">
|
|
- <RevenueReport :currentDate="curDate"/>
|
|
|
|
|
|
+ <RevenueReport ref="revenueReport" />
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 6">
|
|
<template v-else-if="currentType.value === 6">
|
|
- <ReallyReceivable :currentDate="curDate"/>
|
|
|
|
|
|
+ <ReallyReceivable ref="reallyReceivable"/>
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 7">
|
|
<template v-else-if="currentType.value === 7">
|
|
- <CheckWorkAttendance :currentDate="curDate"/>
|
|
|
|
|
|
+ <CheckWorkAttendance ref="checkWorkAttendance" />
|
|
</template>
|
|
</template>
|
|
</view>
|
|
</view>
|
|
<!-- 报表类型 -->
|
|
<!-- 报表类型 -->
|
|
@@ -77,69 +77,104 @@
|
|
return {
|
|
return {
|
|
tabList: [{
|
|
tabList: [{
|
|
label: '年',
|
|
label: '年',
|
|
- value: 1
|
|
|
|
|
|
+ value: 2
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '月',
|
|
label: '月',
|
|
- value: 2
|
|
|
|
|
|
+ value: 1
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '日',
|
|
label: '日',
|
|
- value: 3
|
|
|
|
|
|
+ value: 0
|
|
}
|
|
}
|
|
],
|
|
],
|
|
currentType: {},
|
|
currentType: {},
|
|
- tabCur: 1,
|
|
|
|
|
|
+ tabCur: 2,
|
|
typePicker: false,
|
|
typePicker: false,
|
|
typeList: [[
|
|
typeList: [[
|
|
{
|
|
{
|
|
text: '收费员业绩统计',
|
|
text: '收费员业绩统计',
|
|
- value: 1
|
|
|
|
|
|
+ value: 1,
|
|
|
|
+ key: 'tollCollectorPerformance'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '路段泊位统计',
|
|
text: '路段泊位统计',
|
|
- value: 2
|
|
|
|
|
|
+ value: 2,
|
|
|
|
+ key: 'sectionBerth'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '停车场实收统计',
|
|
text: '停车场实收统计',
|
|
- value: 3
|
|
|
|
|
|
+ value: 3,
|
|
|
|
+ key: 'parkingReallyIncome'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '欠费统计',
|
|
text: '欠费统计',
|
|
- value: 4
|
|
|
|
|
|
+ value: 4,
|
|
|
|
+ key: 'arrearsReport'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '营收统计',
|
|
text: '营收统计',
|
|
- value: 5
|
|
|
|
|
|
+ value: 5,
|
|
|
|
+ key: 'revenueReport'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '应收实收分析',
|
|
text: '应收实收分析',
|
|
- value: 6
|
|
|
|
|
|
+ value: 6,
|
|
|
|
+ key: 'reallyReceivable'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '考勤统计',
|
|
text: '考勤统计',
|
|
- value: 7
|
|
|
|
|
|
+ value: 7,
|
|
|
|
+ key: 'checkWorkAttendance'
|
|
}
|
|
}
|
|
]],
|
|
]],
|
|
// 日期
|
|
// 日期
|
|
curDate: [],
|
|
curDate: [],
|
|
|
|
+ // 参数
|
|
|
|
+ params: {
|
|
|
|
+ reportType: 2,
|
|
|
|
+ queryDate: '',
|
|
|
|
+ title: ''
|
|
|
|
+ },
|
|
// 年
|
|
// 年
|
|
yearPicker: false,
|
|
yearPicker: false,
|
|
yearList: this.getYearList(),
|
|
yearList: this.getYearList(),
|
|
defaultYear: [4],
|
|
defaultYear: [4],
|
|
- title: '2022年',
|
|
|
|
|
|
+ currentYear: '',
|
|
|
|
+ yearObj: {},
|
|
// 月
|
|
// 月
|
|
monthPicker: false,
|
|
monthPicker: false,
|
|
monthList: this.getMonthList(),
|
|
monthList: this.getMonthList(),
|
|
defaultMonth: [],
|
|
defaultMonth: [],
|
|
|
|
+ currentMonth: '01',
|
|
|
|
+ monthObj: {},
|
|
// 日
|
|
// 日
|
|
dayPicker: false,
|
|
dayPicker: false,
|
|
dayList: this.getDayList(),
|
|
dayList: this.getDayList(),
|
|
- defaultDay: []
|
|
|
|
|
|
+ defaultDay: [],
|
|
|
|
+ currentDay: '01',
|
|
|
|
+ dayObj: {}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
this.currentType = this.typeList[0][0]
|
|
this.currentType = this.typeList[0][0]
|
|
|
|
+ if (this.currentType.value === 5 || this.currentType.value === 7) {
|
|
|
|
+ let today = uni.$u.timeFormat(new Date(), 'yyyy-mm-dd')
|
|
|
|
+ this.curDate = [today, today]
|
|
|
|
+ } else {
|
|
|
|
+ this.curDate = []
|
|
|
|
+ }
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ if (this.currentType.value === 6) {
|
|
|
|
+ this.currentYear = this.yearList[0][4].value
|
|
|
|
+ this.yearObj = this.yearList[0][4]
|
|
|
|
+ this.params.title = this.yearList[0][4].text
|
|
|
|
+ this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.params)
|
|
|
|
+ } else {
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.curDate)
|
|
|
|
+ }
|
|
|
|
+ }, 500)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
getYearList() {
|
|
getYearList() {
|
|
@@ -150,8 +185,8 @@
|
|
]
|
|
]
|
|
for (let i = year - 4; i < year + 1; i++) {
|
|
for (let i = year - 4; i < year + 1; i++) {
|
|
const obj = {
|
|
const obj = {
|
|
- text: i + '年',
|
|
|
|
- value: i
|
|
|
|
|
|
+ text: String(i),
|
|
|
|
+ value: String(i)
|
|
}
|
|
}
|
|
list[0].push(obj)
|
|
list[0].push(obj)
|
|
}
|
|
}
|
|
@@ -165,20 +200,28 @@
|
|
]
|
|
]
|
|
for (let i = 1; i < 13; i++) {
|
|
for (let i = 1; i < 13; i++) {
|
|
const obj = {
|
|
const obj = {
|
|
- text: i + '月',
|
|
|
|
- value: i
|
|
|
|
|
|
+ text: String(i),
|
|
|
|
+ value: String(i)
|
|
|
|
+ }
|
|
|
|
+ if (i < 10) {
|
|
|
|
+ obj.text = '0' + i
|
|
|
|
+ obj.value = '0' + i
|
|
}
|
|
}
|
|
list[0].push(obj)
|
|
list[0].push(obj)
|
|
}
|
|
}
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- this.defaultMonth = [month]
|
|
|
|
|
|
+ this.defaultMonth = [0]
|
|
}, 1000)
|
|
}, 1000)
|
|
return list
|
|
return list
|
|
},
|
|
},
|
|
getDayList() {
|
|
getDayList() {
|
|
const date = new Date()
|
|
const date = new Date()
|
|
const year = date.getFullYear()
|
|
const year = date.getFullYear()
|
|
- const month = date.getMonth()
|
|
|
|
|
|
+ let month = date.getMonth()
|
|
|
|
+ if (this.monthObj) {
|
|
|
|
+ month = parseInt(this.monthObj.value)
|
|
|
|
+ month = String(month)
|
|
|
|
+ }
|
|
const day = date.getDate()
|
|
const day = date.getDate()
|
|
const dayLen = (new Date(year, month, 0)).getDate()
|
|
const dayLen = (new Date(year, month, 0)).getDate()
|
|
const list = [
|
|
const list = [
|
|
@@ -186,48 +229,87 @@
|
|
]
|
|
]
|
|
for (let i = 1; i < dayLen + 1; i++) {
|
|
for (let i = 1; i < dayLen + 1; i++) {
|
|
const obj = {
|
|
const obj = {
|
|
- text: i + '日',
|
|
|
|
- value: i
|
|
|
|
|
|
+ text: String(i),
|
|
|
|
+ value: String(i)
|
|
|
|
+ }
|
|
|
|
+ if (i < 10) {
|
|
|
|
+ obj.text = '0' + i
|
|
|
|
+ obj.value = '0' + i
|
|
}
|
|
}
|
|
list[0].push(obj)
|
|
list[0].push(obj)
|
|
}
|
|
}
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- this.defaultDay = [day - 1]
|
|
|
|
|
|
+ this.defaultDay = [0]
|
|
}, 1000)
|
|
}, 1000)
|
|
return list
|
|
return list
|
|
},
|
|
},
|
|
tabClick(item) {
|
|
tabClick(item) {
|
|
this.tabCur = item.value
|
|
this.tabCur = item.value
|
|
switch (item.value) {
|
|
switch (item.value) {
|
|
- case 1:
|
|
|
|
|
|
+ case 2:
|
|
this.yearPicker = true
|
|
this.yearPicker = true
|
|
break
|
|
break
|
|
- case 2:
|
|
|
|
|
|
+ case 1:
|
|
this.monthPicker = true
|
|
this.monthPicker = true
|
|
break
|
|
break
|
|
- case 3:
|
|
|
|
|
|
+ case 0:
|
|
this.dayPicker = true
|
|
this.dayPicker = true
|
|
break
|
|
break
|
|
}
|
|
}
|
|
|
|
+ this.params.reportType = this.tabCur
|
|
},
|
|
},
|
|
typeConfirm(e) {
|
|
typeConfirm(e) {
|
|
- console.log(e)
|
|
|
|
this.currentType = e.value[0]
|
|
this.currentType = e.value[0]
|
|
this.typePicker = false
|
|
this.typePicker = false
|
|
|
|
+ if (this.currentType.value === 5 || this.currentType.value === 7) {
|
|
|
|
+ let today = uni.$u.timeFormat(new Date(), 'yyyy-mm-dd')
|
|
|
|
+ this.curDate = [today, today]
|
|
|
|
+ } else {
|
|
|
|
+ this.curDate = []
|
|
|
|
+ }
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ if (this.currentType.value === 6) {
|
|
|
|
+ this.currentYear = this.yearList[0][4].value
|
|
|
|
+ this.yearObj = this.yearList[0][4]
|
|
|
|
+ this.params.title = this.yearList[0][4].text
|
|
|
|
+ this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.params)
|
|
|
|
+ } else {
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.curDate)
|
|
|
|
+ }
|
|
|
|
+ }, 500)
|
|
},
|
|
},
|
|
dateChange(e) {
|
|
dateChange(e) {
|
|
- console.log(e)
|
|
|
|
|
|
+ this.curDate = e
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.curDate)
|
|
},
|
|
},
|
|
yearConfirm(e) {
|
|
yearConfirm(e) {
|
|
this.defaultYear = [e.indexs[0]]
|
|
this.defaultYear = [e.indexs[0]]
|
|
|
|
+ this.currentYear = e.value[0].value
|
|
|
|
+ this.params.title = e.value[0].text
|
|
|
|
+ this.yearObj = e.value[0]
|
|
|
|
+ this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.params)
|
|
this.yearPicker = false
|
|
this.yearPicker = false
|
|
},
|
|
},
|
|
monthConfirm(e) {
|
|
monthConfirm(e) {
|
|
this.defaultMonth = [e.indexs[0]]
|
|
this.defaultMonth = [e.indexs[0]]
|
|
|
|
+ this.currentMonth = e.value[0].value
|
|
|
|
+ this.monthObj = e.value[0]
|
|
|
|
+ this.params.title = `${this.yearObj.text}-${this.monthObj.text}`
|
|
|
|
+ this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.params)
|
|
this.monthPicker = false
|
|
this.monthPicker = false
|
|
|
|
+ this.dayList = this.getDayList()
|
|
},
|
|
},
|
|
dayConfirm(e) {
|
|
dayConfirm(e) {
|
|
this.defaultDay = [e.indexs[0]]
|
|
this.defaultDay = [e.indexs[0]]
|
|
|
|
+ this.title = e.value[0].text
|
|
|
|
+ this.currentDay = e.value[0].value
|
|
|
|
+ this.dayObj = e.value[0]
|
|
|
|
+ this.params.title = `${this.yearObj.text}-${this.monthObj.text}-${this.dayObj.text}`
|
|
|
|
+ this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.params)
|
|
this.dayPicker = false
|
|
this.dayPicker = false
|
|
}
|
|
}
|
|
}
|
|
}
|