提交更新

parent a836e44d
......@@ -45,11 +45,11 @@
@tap="tabTap(1)">
<text>消费报告</text>
</view>
<view v-if="isAttendanceOpen" class="school-report-context-tab-item-one"
<view v-if="isAttendanceService" class="school-report-context-tab-item-one"
:class="tabIndex==2?'active':''" @tap="tabTap(2)">
<text>出入校报告</text>
</view>
<view v-if="isPubTalkOpen" class="school-report-context-tab-item-one"
<view v-if="isPubTalkService" class="school-report-context-tab-item-one"
:class="tabIndex==3?'active':''" @tap="tabTap(3)">
<text>公话报告</text>
</view>
......@@ -816,8 +816,10 @@
isOpen: false,
// 出入校
isAttendanceOpen: false,
isAttendanceService: false,
// 公话
isPubTalkOpen: false,
isPubTalkService: false,
flag: 0,
memberInfo: {
leastAmount: '',
......@@ -833,13 +835,9 @@
return
}
this.showReport = true;
if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isAttendanceOpen = true;
this.isPubTalkOpen = true;
} else {
this.queryIsDredgeMember(2002);
this.queryIsDredgeMember(3002);
}
// 有无进出校公话服务
this.queryIsDredgeMember(2001);
this.queryIsDredgeMember(3001);
// 消费报告
this.queryIsDredgeMember(1002).then(() => {
if (this.isOpen) {
......@@ -950,108 +948,31 @@
this.memberInfo.invalidDateStr = '';
this.memberInfo.leastAmount = '';
this.queryIsDredgeMember(3002).then(() => {
this.statisAttendanceAbnormal();
if (this.isAttendanceOpen) {
if (new Date(this.memberInfo.invalidDate).getTime() <= new Date('2022/06/30')
.getTime()) {
this.isAttendanceOpen = true;
this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.statisAttendanceAbnormal();
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate)
.then(e => {
if (this.attendanceReportDatail.length) {
this.containerHeight = 2762;
} else {
this.containerHeight = 1904;
}
});
} else {
this.queryIsDredgeMember(3002, 2);
this.statisAttendanceAbnormal();
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate)
.then(e => {
if (this.attendanceReportDatail.length) {
this.containerHeight = 2762;
} else {
this.containerHeight = 1904;
}
});
}
} else {
if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isAttendanceOpen = true;
this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.statisAttendanceAbnormal();
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate)
.then(e => {
if (this.attendanceReportDatail.length) {
this.containerHeight = 2762;
} else {
this.containerHeight = 1904;
}
});
} else {
this.queryIsDredgeMember(3002, 2);
}
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate)
.then(e => {
if (this.attendanceReportDatail.length) {
this.containerHeight = 2762;
} else {
this.containerHeight = 1904;
}
});
}
})
} else {
this.memberInfo.differDay = '';
this.memberInfo.invalidDateStr = '';
this.memberInfo.leastAmount = '';
this.queryIsDredgeMember(2002).then(() => {
if (this.isPubTalkOpen) {
if (new Date(this.memberInfo.invalidDate).getTime() <= new Date('2022/06/30')
.getTime()) {
this.isPubTalkOpen = true;
this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.containerHeight = 3290;
this.getPubTalkReport().then(e => {
this.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
})
} else {
this.queryIsDredgeMember(2002, 3).then(() => {
this.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
});
}
this.queryIsDredgeMember(2002).then(e => {
if (isPubTalkOpen) {
this.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
} else {
if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isPubTalkOpen = true;
this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.containerHeight = 3290;
this.getPubTalkReport().then(e => {
this.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
})
} else {
this.queryIsDredgeMember(2002, 3).then(() => {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
this.getPubTalkReport().then(e => {
this.$nextTick(() => {
this.callNumberBarchart();
})
})
});
}
this.callNumberBarchart();
}
})
}
......@@ -1832,6 +1753,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
title: data.msg
})
return
}
if (!data.obj) return;
var exceptionDate = data.obj.exceptionDate;
......@@ -1951,7 +1873,8 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
if (tempList && tempList.length) {
tempList.forEach(e => {
e.attendDetailReportDTOList.forEach(c => {
c.border = c.describeContent && c.describeContent != '当日早到冠军' ?
c.border = c.describeContent && c
.describeContent != '当日早到冠军' ?
'4rpx solid #F9793F' :
'4rpx solid rgba(0, 0, 0, 0.25)'
})
......@@ -1996,15 +1919,32 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
this.flag = 1;
}
break;
case 2001:
this.isPubTalkService = data.obj.status;
case 2002:
this.isPubTalkOpen = data.obj.status;
if (!this.isPubTalkOpen) {
if (this.isPubTalkOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 3290;
this.flag = 0;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 2130;
this.flag = 3;
}
break;
case 3001:
this.isAttendanceService = data.obj.status;
break;
case 3002:
this.isAttendanceOpen = data.obj.status;
if (!this.isAttendanceOpen) {
if (this.isAttendanceOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 2762;
this.flag = 0;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 1944;
this.flag = 2;
}
break;
......@@ -2018,24 +1958,6 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 2340;
}
} else if (num == 2) {
if (this.isAttendanceOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 2762;
this.flag = 0;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 1944;
}
} else if (num == 3) {
if (this.isPubTalkOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 3290;
this.flag = 0;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 2130;
}
}
} catch (e) {
//TODO handle the exception
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment