提交更新

parent b830be2d
......@@ -143,8 +143,8 @@
</view>
<view class="school-report-context-card-two-calendar">
<van-calendar :formatter="formatter" :min-date="minDate" :max-date="maxDate"
:default-date="minDate" :show-title="false" :show-subtitle="false"
:show-mark="false" :poppable="false" :show-confirm="false" :style="{ height: '575rpx' }"
:default-date="minDate" :show-title="false" :show-subtitle="false" :show-mark="false"
:poppable="false" :show-confirm="false" :style="{ height: '575rpx' }"
@select="dateSelect" />
</view>
<view class="school-report-context-card-two-details">
......@@ -450,15 +450,53 @@
}
},
mounted() {
if(new Date().getTime()<=new Date('2022/06/30').getTime()){
this.isOpen=true;
this.memberInfo.invalidDateStr='2022年6月30日';
this.memberInfo.differDay=dayjs('2022/06/30').diff(dayjs(),'day');
this.containerHeight = 4200;
}else{
this.queryIsDredgeMember();
}
// this.queryIsDredgeMember();
this.queryIsDredgeMember().then(() => {
if (this.isOpen) {
this.queryMemberValidTime().then(e => {
if (new Date(this.memberInfo.invalidDate).getTime() <= new Date('2022/06/30')
.getTime()) {
this.isOpen = true;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.containerHeight = 4200;
this.queryStudentConsumerPreference(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else {
this.queryIsDredgeMember(1).then(() => {
if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this
.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex));
} else {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
}
});
}
})
} else {
if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isOpen = true;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.containerHeight = 4200;
this.queryStudentConsumerPreference(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else {
this.queryIsDredgeMember(1).then(() => {
if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex));
} else {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
}
});
}
}
});
let tmpArr = []
// 获取时间
for (let i = 0; i <= 11; i++) {
......@@ -477,13 +515,6 @@
this.maxDate = new Date(this.dataRangeArr[this.dataRangeIndex].endDate);
this.diningSituations.diningSituationsRequestDate = this.dataRangeArr[this.dataRangeIndex].startDate;
this.diningSituations.diningSituationsDate = this.formatDate(this.minDate);
if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
}
this.queryCampusStudentInfo();
this.queryNotRepastDetails(this.diningSituations.diningSituationsRequestDate, this.diningSituations
.diningSituationsRequestDate, 1);
......@@ -1011,7 +1042,7 @@
}
},
// 是否开通消费报告
async queryIsDredgeMember() {
async queryIsDredgeMember(num) {
try {
let data = await this.$http.get({
url: gHost +
......@@ -1030,12 +1061,14 @@
return
}
this.isOpen = data.obj.status;
if (this.isOpen) {
this.queryMemberValidTime();
this.containerHeight = 4200;
} else {
this.queryMemberConsumerAmount();
this.containerHeight = 2340;
if (num == 1) {
if (this.isOpen) {
this.queryMemberValidTime();
this.containerHeight = 4200;
} else {
this.queryMemberConsumerAmount();
this.containerHeight = 2340;
}
}
} catch (e) {
//TODO handle the exception
......@@ -1097,6 +1130,7 @@
return
}
this.memberInfo.differDay = data.obj.differDay;
this.memberInfo.invalidDate = data.obj.invalidDate;
let month = data.obj.invalidDate.slice(5, 6) == 0 ? data
.obj.invalidDate.slice(6, 7) : data.obj
.invalidDate.slice(5, 7);
......@@ -1122,10 +1156,10 @@
console.log('skip success')
},
fail: function fail(_fail) {
console.warn(_fail);
uni.showModal({
content: JSON.stringify(_fail)
});
console.warn(_fail);
uni.showModal({
content: JSON.stringify(_fail)
});
}
});
},
......@@ -1432,22 +1466,23 @@
.school-report-context-card-two-calendar {
height: 575rpx;
/deep/ .van-calendar__weekdays{
width: 690rpx;
/deep/ .van-calendar__weekdays {
background: #F7FAF8;
}
/deep/ .van-calendar__weekday{
/deep/ .van-calendar__weekday {
text-align: left;
padding-left: 30rpx;
box-sizing: border-box;
}
/deep/ .van-calendar__weekday:first-of-type{
/deep/ .van-calendar__weekday:first-of-type {
color: rgba(0, 0, 0, 0.25);
}
/deep/ .van-calendar__weekday:last-of-type{
/deep/ .van-calendar__weekday:last-of-type {
color: rgba(0, 0, 0, 0.25);
}
......@@ -1746,7 +1781,7 @@
#consumer-trend-line {
position: absolute;
top: 120rpx;
z-index:100;
z-index: 100;
}
.consumer-trend-line-icon {
......
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