提交更新

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