Commit 50dec480 authored by aifen@azjy1.onexmail.com's avatar aifen@azjy1.onexmail.com

Merge branch 'develop' into uat

parents b8757d1b e8d7bd6d
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
<view class="school-report-context"> <view class="school-report-context">
<view class="school-report-context-tab"> <view class="school-report-context-tab">
<view class="school-report-context-tab-item"> <view class="school-report-context-tab-item">
<view v-if="isService" class="school-report-context-tab-item-one" :class="tabIndex==1?'active':''" <view v-if="isService" class="school-report-context-tab-item-one"
@tap="tabTap(1)"> :class="tabIndex==1?'active':''" @tap="tabTap(1)">
<text>消费报告</text> <text>消费报告</text>
</view> </view>
<view v-if="isAttendanceService" class="school-report-context-tab-item-one" <view v-if="isAttendanceService" class="school-report-context-tab-item-one"
...@@ -103,8 +103,9 @@ ...@@ -103,8 +103,9 @@
</view> </view>
</view> </view>
<view class="school-report-context-card-one-context-txt"> <view class="school-report-context-card-one-context-txt">
消费 <text class="txt-important">{{consumerAmountObj.consumerAmount}}</text>元,超过全校 消费 <text
<text class="txt-important">{{consumerAmountObj.exceedRate}}%</text> class="txt-important">{{consumerAmountObj.consumergrossamount}}</text>元,超过全校
<text class="txt-important">{{consumerAmountObj.gtgraderate}}%</text>
的同学<text v-if="isReasonable">,请及时评估生活费是否合理</text> 的同学<text v-if="isReasonable">,请及时评估生活费是否合理</text>
</view> </view>
</view> </view>
...@@ -285,15 +286,15 @@ ...@@ -285,15 +286,15 @@
<view class="school-report-context-card-four-conclusion"> <view class="school-report-context-card-four-conclusion">
<view class="school-report-context-card-four-conclusion-item"> <view class="school-report-context-card-four-conclusion-item">
<text>消费<text <text>消费<text
class="consume-total">{{consumerAmountObj.consumerAmount}}</text>元,超过全校<text class="consume-total">{{consumerAmountObj.consumergrossamount}}</text>元,超过同年级<text
class="consume-total">{{consumerAmountObj.exceedRate}}%</text>的同学<text class="consume-total">{{consumerAmountObj.gtgraderate}}%</text>的同学<text
v-if="isReasonable">,请及时评估生活费是否合理</text></text> v-if="isReasonable">,请及时评估生活费是否合理</text></text>
</view> </view>
</view> </view>
<view class="consume-total-img"> <view class="consume-total-img">
<view class="school-average" :style="{height:schoolAverageHeight+'rpx'}"> <view class="school-average" :style="{height:schoolAverageHeight+'rpx'}">
<view class="school-average-num"> <view class="school-average-num">
<text>{{consumerAmountObj.schoolAmount}}</text> <text>{{consumerAmountObj.schoolavgamount}}</text>
</view> </view>
<view class="school-average-img"> <view class="school-average-img">
<image src="../../static/images/greenArrow.png" mode=""></image> <image src="../../static/images/greenArrow.png" mode=""></image>
...@@ -301,20 +302,31 @@ ...@@ -301,20 +302,31 @@
</view> </view>
<view class="user-consume" :style="{height:userConsumeHeight+'rpx'}"> <view class="user-consume" :style="{height:userConsumeHeight+'rpx'}">
<view class="user-consume-num"> <view class="user-consume-num">
<text>{{consumerAmountObj.consumerAmount}}</text> <text>{{consumerAmountObj.consumergrossamount}}</text>
</view> </view>
<view class="user-consume-img"> <view class="user-consume-img">
<image src="../../static/images/yellowArrow.png" mode=""></image> <image src="../../static/images/yellowArrow.png" mode=""></image>
</view> </view>
</view> </view>
<view class="school-average" :style="{height:gradeAverageHeight+'rpx'}">
<view class="school-average-num">
<text>{{consumerAmountObj.gradeavgamount}}</text>
</view>
<view class="school-average-img">
<image src="../../static/images/greenArrow.png" mode=""></image>
</view>
</view>
</view> </view>
<view class="consume-total-img-des"> <view class="consume-total-img-des">
<view class="consume-total-img-des-item school-average-des"> <view class="consume-total-img-des-item">
<text>全校平均</text> <text>全校平均</text>
</view> </view>
<view class="consume-total-img-des-item"> <view class="consume-total-img-des-item consume-des">
<text>本人消费</text> <text>本人消费</text>
</view> </view>
<view class="consume-total-img-des-item">
<text>全年级平均</text>
</view>
</view> </view>
</view> </view>
<view v-if="tabIndex==1&&isOpen" class="school-report-context-card-five"> <view v-if="tabIndex==1&&isOpen" class="school-report-context-card-five">
...@@ -785,6 +797,7 @@ ...@@ -785,6 +797,7 @@
isReasonable: false, isReasonable: false,
schoolAverageHeight: '', schoolAverageHeight: '',
userConsumeHeight: '', userConsumeHeight: '',
gradeAverageHeight: '',
// 消费趋势 // 消费趋势
consumerTrend: {}, consumerTrend: {},
isAbnormal: false, isAbnormal: false,
...@@ -812,9 +825,10 @@ ...@@ -812,9 +825,10 @@
}, },
attendanceReportDatail: [], attendanceReportDatail: [],
// 会员信息 // 会员信息
queryMemberServcieItemList: [],
// 消费 // 消费
isOpen: false, isOpen: false,
isService:false, isService: false,
// 出入校 // 出入校
isAttendanceOpen: false, isAttendanceOpen: false,
isAttendanceService: false, isAttendanceService: false,
...@@ -836,14 +850,23 @@ ...@@ -836,14 +850,23 @@
return return
} }
this.showReport = true; this.showReport = true;
// 有无消费报告入口
if (new Date().getTime() <= new Date('2022/06/30').getTime()) { if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isService=true; this.isService = true;
}else{ } else {
this.queryIsDredgeMember(1001); this.queryMemberServcieItem().then(() => {
if (this.queryMemberServcieItemList.length) {
this.isService = this.queryMemberServcieItemList.indexOf(1002) == -1 ? false : true;
}
})
} }
// 有无进出校公话服务 // 有无进出校、公话入口
this.queryIsDredgeMember(2001); this.queryMemberServcieItem().then(() => {
this.queryIsDredgeMember(3001); if (this.queryMemberServcieItemList.length) {
this.isAttendanceService = this.queryMemberServcieItemList.indexOf(3002) == -1 ? false : true;
this.isPubTalkService = this.queryMemberServcieItemList.indexOf(2002) == -1 ? false : true;
}
})
// 消费报告 // 消费报告
this.queryIsDredgeMember(1002).then(() => { this.queryIsDredgeMember(1002).then(() => {
if (this.isOpen) { if (this.isOpen) {
...@@ -853,13 +876,13 @@ ...@@ -853,13 +876,13 @@
this.isOpen = true; this.isOpen = true;
this.flag = 0; this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日'; this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day'); this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day') + 1;
this.containerHeight = 4200; this.containerHeight = 4200;
this.queryStudentConsumerPreference(1).then(e => this.piechart()); this.queryConsumerSummaryAmount(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex)); this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else { } else {
this.queryIsDredgeMember(1002, 1).then(() => { this.queryIsDredgeMember(1002, 1).then(() => {
this.queryStudentConsumerPreference(1).then(e => this this.queryConsumerSummaryAmount(1).then(e => this
.piechart()); .piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex)); .reportTypeIndex));
...@@ -871,13 +894,13 @@ ...@@ -871,13 +894,13 @@
this.isOpen = true; this.isOpen = true;
this.flag = 0; this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日'; this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day'); this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day') + 1;
this.containerHeight = 4200; this.containerHeight = 4200;
this.queryStudentConsumerPreference(1).then(e => this.piechart()); this.queryConsumerSummaryAmount(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex)); this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else { } else {
this.queryIsDredgeMember(1002, 1).then(() => { this.queryIsDredgeMember(1002, 1).then(() => {
this.queryStudentConsumerPreference(); this.queryConsumerSummaryAmount();
this.queryDayConsumerTrend(); this.queryDayConsumerTrend();
}); });
} }
...@@ -914,7 +937,6 @@ ...@@ -914,7 +937,6 @@
this.diningSituations.notRepastDetails = {}; this.diningSituations.notRepastDetails = {};
} }
}); });
this.queryConsumerTrend();
}, },
methods: { methods: {
// 当天6:30 ~ 9:00,11:30 ~ 12:00, 17:30 ~ 19:00属于高峰期 // 当天6:30 ~ 9:00,11:30 ~ 12:00, 17:30 ~ 19:00属于高峰期
...@@ -938,22 +960,49 @@ ...@@ -938,22 +960,49 @@
}, },
tabTap: function(num) { tabTap: function(num) {
this.tabIndex = num; this.tabIndex = num;
this.tabTapHandler(this.tabIndex);
},
tabTapHandler: function(num, flag) {
this.minDate = new Date(this.dataRangeArr[this.dataRangeIndex].startDate);
this.maxDate = new Date(this.dataRangeArr[this.dataRangeIndex].endDate);
if (num == 1) { if (num == 1) {
this.diningSituations.diningSituationsDate = this.formatDate(this.minDate);
this.diningSituations.diningSituationsRequestDate = this.dataRangeArr[this.dataRangeIndex]
.startDate;
let tmpDate = this.formatDateTwo(this.minDate);
this.queryNotRepastDetails(this.dataRangeArr[this.dataRangeIndex].startDate, this.dataRangeArr[this
.dataRangeIndex].endDate).then(() => {
if (this.diningSituations.notRepastDetailsDTOS) {
let today = this.diningSituations.notRepastDetailsDTOS.filter(e => e.repastDate ===
tmpDate)[
0];
this.diningSituations.notRepastDetails = today;
} else {
this.diningSituations.notRepastDetails = {};
}
});
this.queryConsumerSummaryAmount();
this.$nextTick(() => { this.$nextTick(() => {
if (this.isOpen) { if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this.piechart()); this.queryConsumerSummaryAmount(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex)); .reportTypeIndex));
} else { } else {
this.queryStudentConsumerPreference(); this.queryConsumerSummaryAmount();
this.queryDayConsumerTrend(); this.queryDayConsumerTrend();
} }
}) })
} else if (num == 2) { } else if (num == 2) {
if (flag) {
this.attendanceSituations.attendanceDate = this.formatDate(this.minDate);
this.statisAttendanceAbnormal();
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate);
} else {
this.memberInfo.differDay = ''; this.memberInfo.differDay = '';
this.memberInfo.invalidDateStr = ''; this.memberInfo.invalidDateStr = '';
this.memberInfo.leastAmount = ''; this.memberInfo.leastAmount = '';
this.queryIsDredgeMember(3002).then(() => { this.queryIsDredgeMember(3002).then(() => {
this.attendanceSituations.attendanceDate = this.formatDate(this.minDate);
this.statisAttendanceAbnormal(); this.statisAttendanceAbnormal();
if (this.isAttendanceOpen) { if (this.isAttendanceOpen) {
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate) this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate)
...@@ -966,22 +1015,47 @@ ...@@ -966,22 +1015,47 @@
}); });
} }
}) })
}
} else {
if (flag) {
if (this.isPubTalkOpen) {
this.getPubTalkReport().then(() => {
this.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
})
} else {
this.getPubTalkReport().then(() => {
this.$nextTick(() => {
this.callNumberBarchart();
})
})
}
} else { } else {
this.memberInfo.differDay = ''; this.memberInfo.differDay = '';
this.memberInfo.invalidDateStr = ''; this.memberInfo.invalidDateStr = '';
this.memberInfo.leastAmount = ''; this.memberInfo.leastAmount = '';
this.queryIsDredgeMember(2002).then(e => { this.queryIsDredgeMember(2002).then(e => {
if (isPubTalkOpen) { if (this.isPubTalkOpen) {
this.getPubTalkReport().then(() => {
this.$nextTick(() => { this.$nextTick(() => {
this.callNumberBarchart(); this.callNumberBarchart();
this.callDurationBarchart(); this.callDurationBarchart();
this.leaveMessageBarchart(); this.leaveMessageBarchart();
}) })
})
} else { } else {
this.getPubTalkReport().then(() => {
this.$nextTick(() => {
this.callNumberBarchart(); this.callNumberBarchart();
})
})
} }
}) })
} }
}
}, },
toImage: function() { toImage: function() {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -1046,44 +1120,7 @@ ...@@ -1046,44 +1120,7 @@
} }
this.dataRangeArr = tmpArr; this.dataRangeArr = tmpArr;
} }
this.minDate = new Date(this.dataRangeArr[this.dataRangeIndex].startDate); this.tabTapHandler(this.tabIndex, 1);
this.maxDate = new Date(this.dataRangeArr[this.dataRangeIndex].endDate);
if (this.tabIndex == 1) {
this.diningSituations.diningSituationsDate = this.formatDate(this.minDate);
this.diningSituations.diningSituationsRequestDate = this.dataRangeArr[this.dataRangeIndex]
.startDate;
let tmpDate = this.formatDateTwo(this.minDate);
this.queryNotRepastDetails(this.dataRangeArr[this.dataRangeIndex].startDate, this.dataRangeArr[this
.dataRangeIndex].endDate).then(() => {
if (this.diningSituations.notRepastDetailsDTOS) {
let today = this.diningSituations.notRepastDetailsDTOS.filter(e => e.repastDate ===
tmpDate)[0];
this.diningSituations.notRepastDetails = today;
} else {
this.diningSituations.notRepastDetails = {};
}
});
this.queryConsumerTrend();
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 (this.tabIndex == 2) {
this.attendanceSituations.attendanceDate = this.formatDate(this.minDate);
this.statisAttendanceAbnormal();
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate);
} else {
this.getPubTalkReport().then(() => {
this.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
})
}
}, },
formatter(day) { formatter(day) {
const year = day.date.getFullYear(); const year = day.date.getFullYear();
...@@ -1615,7 +1652,8 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -1615,7 +1652,8 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
schoolId: getQueryParams('schoolId'), schoolId: getQueryParams('schoolId'),
userId: getQueryParams('userId'), userId: getQueryParams('userId'),
startDate, startDate,
endDate endDate,
timeType: this.dataRangeIndex == 0 ? 2 : 1
}) })
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
...@@ -1651,17 +1689,62 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -1651,17 +1689,62 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}) })
} }
}, },
// 查询学生消费偏好类型 // 三对象排序
async queryStudentConsumerPreference(num) { numsort(obj1, obj2, obj3) {
var temp;
if (obj1.num > obj2.num) {
temp = JSON.parse(JSON.stringify(obj1));
obj1 = JSON.parse(JSON.stringify(obj2));
obj2.num = JSON.parse(JSON.stringify(temp));
}
if (obj2.num > obj3.num) {
temp = JSON.parse(JSON.stringify(obj2));
obj2 = JSON.parse(JSON.stringify(obj3));
obj3 = JSON.parse(JSON.stringify(temp));
}
if (obj1.num > obj2.num) {
temp = JSON.parse(JSON.stringify(obj1));
obj1 = JSON.parse(JSON.stringify(obj2));
obj2 = JSON.parse(JSON.stringify(temp));
}
return [{
name: obj1.name,
value: obj1.num,
tag: 0
}, {
name: obj2.name,
value: obj2.num,
tag: 1
}, {
name: obj3.name,
value: obj3.num,
tag: 2
}];
},
// 数组中数据的个数
counterArray(arr) {
var obj = {}
arr.forEach(function(v, k) {
if (obj[v]) {
obj[v]++;
} else {
obj[v] = 1;
}
})
return obj;
},
// 查询消费总额及学生消费偏好类型
async queryConsumerSummaryAmount(num) {
try { try {
let data = await this.$http.get({ let data = await this.$http.get({
url: gHost + url: gHost +
'/report-push/campus-consumer-report/queryStudentConsumerPreference' '/report-push/campus-consumer-report/queryConsumerSummaryAmount'
}, { }, {
schoolId: getQueryParams('schoolId'), schoolId: getQueryParams('schoolId'),
userId: getQueryParams('userId'), userId: getQueryParams('userId'),
startDate: this.dataRangeArr[this.dataRangeIndex].startDate, startDate: this.dataRangeArr[this.dataRangeIndex].startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate, endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
timeType: this.dataRangeIndex == 0 ? 2 : 1
}) })
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
...@@ -1672,63 +1755,48 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -1672,63 +1755,48 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
return return
} }
if (!data.obj) return; if (!data.obj) return;
const tmpObj = data.obj; if (data.obj.length) {
this.isEatLow = tmpObj.canteenAmount / tmpObj.grossAmount < 0.5 ? true : false; const tmpObj = data.obj[0];
this.isEatLow = tmpObj.canteenamount / tmpObj.consumergrossamount < 0.5 ? true : false;
if (num) { if (num) {
this.pieDatas = [ this.pieDatas = [
[{ [{
name: '正餐', name: '正餐',
value: tmpObj.canteenAmount value: tmpObj.canteenamount
}, { }, {
name: '超市', name: '超市',
value: tmpObj.supermarketAmount value: tmpObj.supermarketamount
}, { }, {
name: '其他', name: '其他',
value: tmpObj.otherAmount value: tmpObj.otheramount
}] }]
] ]
} }
} catch (e) { this.consumerAmountObj = tmpObj;
//TODO handle the exception this.isReasonable = this.consumerAmountObj.gtgraderate >= 40 && this
console.log(e); .consumerAmountObj.gtgraderate <=
uni.showToast({ 60 ? false : true;
icon: "none", const sortArr = this.numsort({
mask: true, name: 'schoolAverageHeight',
title: e.message num: this.consumerAmountObj.schoolavgamount
})
}
},
// 查询生活费额度
async queryConsumerTrend() {
try {
let data = await this.$http.get({
url: gHost +
'/report-push/campus-consumer-report/queryConsumerTrend'
}, { }, {
schoolId: getQueryParams('schoolId'), name: 'userConsumeHeight',
userId: getQueryParams('userId'), num: this.consumerAmountObj.consumergrossamount
startDate: this.dataRangeArr[this.dataRangeIndex].startDate, }, {
endDate: this.dataRangeArr[this.dataRangeIndex].endDate, name: 'gradeAverageHeight',
}) num: this.consumerAmountObj.gradeavgamount
if (data.code != 200) { });
uni.showToast({ const tempArr = [this.consumerAmountObj.schoolavgamount, this.consumerAmountObj
icon: "none", .consumergrossamount,
mask: true, this.consumerAmountObj.gradeavgamount
title: data.msg ];
const heightArr = Object.keys(this.counterArray(tempArr)).length == 1 ? [139, 139, 139] : (
Object.keys(this.counterArray(tempArr)).length == 2 ? [139, 139, 160] : [139, 160, 192]
);
sortArr.forEach(e => {
this[e.name] = heightArr[e.tag]
}) })
return
} }
if (!data.obj) return;
this.consumerAmountObj = data.obj;
this.isReasonable = this.consumerAmountObj.exceedRate >= 40 && this
.consumerAmountObj.exceedRate <=
60 ? false : true;
this.schoolAverageHeight = this.consumerAmountObj.schoolAmount <= this
.consumerAmountObj
.consumerAmount ? 139 : 192;
this.userConsumeHeight = this.consumerAmountObj.consumerAmount <= this
.consumerAmountObj
.schoolAmount ? 139 : 192;
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
console.log(e); console.log(e);
...@@ -1751,6 +1819,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -1751,6 +1819,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
startDate: this.dataRangeArr[this.dataRangeIndex] startDate: this.dataRangeArr[this.dataRangeIndex]
.startDate, .startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate, endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
timeType: this.dataRangeIndex == 0 ? 2 : 1
}) })
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
...@@ -1878,12 +1947,14 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -1878,12 +1947,14 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
var tempList = data.data; var tempList = data.data;
if (tempList && tempList.length) { if (tempList && tempList.length) {
tempList.forEach(e => { tempList.forEach(e => {
if (e.attendDetailReportDTOList && e.attendDetailReportDTOList.length) {
e.attendDetailReportDTOList.forEach(c => { e.attendDetailReportDTOList.forEach(c => {
c.border = c.describeContent && c c.border = c.describeContent && c
.describeContent != '当日早到冠军' ? .describeContent != '当日早到冠军' ?
'4rpx solid #F9793F' : '4rpx solid #F9793F' :
'4rpx solid rgba(0, 0, 0, 0.25)' '4rpx solid rgba(0, 0, 0, 0.25)'
}) })
}
}) })
this.attendanceReportDatail = tempList || []; this.attendanceReportDatail = tempList || [];
} else { } else {
...@@ -1919,17 +1990,12 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -1919,17 +1990,12 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
return return
} }
switch (serviceItemCode) { switch (serviceItemCode) {
case 1001:
this.isService = data.obj.status;
break;
case 1002: case 1002:
this.isOpen = data.obj.status; this.isOpen = data.obj.status;
if (!this.isOpen) { if (!this.isOpen) {
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) {
...@@ -1942,9 +2008,6 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -1942,9 +2008,6 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
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) {
...@@ -1978,6 +2041,40 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -1978,6 +2041,40 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}) })
} }
}, },
// 查询是否开通服务项(入口展示服务项)
async queryMemberServcieItem() {
try {
let data = await this.$http.get({
url: gHost +
'/report-push/member-info/queryMemberServcieItem'
}, {
schoolId: getQueryParams('schoolId'),
userId: getQueryParams('userId'),
})
if (data.code != 200) {
uni.showToast({
icon: "none",
mask: true,
title: data.msg
})
return
}
const tempList = data.obj || [];
if (tempList.length) {
this.queryMemberServcieItemList = tempList.map(e => e.serviceCode);
} else {
this.queryMemberServcieItemList = [];
}
} catch (e) {
//TODO handle the exception
console.log(e);
uni.showToast({
icon: "none",
mask: true,
title: e.message
})
}
},
// 查询会员消费金额 // 查询会员消费金额
async queryMemberConsumerAmount(serviceItemCode) { async queryMemberConsumerAmount(serviceItemCode) {
try { try {
...@@ -3170,7 +3267,6 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -3170,7 +3267,6 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
width: 110rpx; width: 110rpx;
background: linear-gradient(360deg, #04B871 0%, #07D66A 100%); background: linear-gradient(360deg, #04B871 0%, #07D66A 100%);
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
margin-right: 74rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
...@@ -3200,6 +3296,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -3200,6 +3296,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
align-items: center; align-items: center;
padding: 14rpx 0 0; padding: 14rpx 0 0;
box-sizing: border-box; box-sizing: border-box;
margin: 0 74rpx 0;
.user-consume-img { .user-consume-img {
width: 52rpx; width: 52rpx;
...@@ -3219,7 +3316,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -3219,7 +3316,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.consume-total-img-des { .consume-total-img-des {
margin: 16rpx 0 0; margin: 16rpx 0 0;
display: flex; display: flex;
justify-content: center; padding-left: 100rpx;
.consume-total-img-des-item { .consume-total-img-des-item {
height: 40rpx; height: 40rpx;
...@@ -3229,8 +3326,8 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -3229,8 +3326,8 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
color: rgba(0, 0, 0, 0.5); color: rgba(0, 0, 0, 0.5);
line-height: 40rpx; line-height: 40rpx;
&.school-average-des { &.consume-des {
margin-right: 74rpx; margin: 0 64rpx 0 74rpx;
} }
} }
} }
...@@ -3263,13 +3360,12 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -3263,13 +3360,12 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
#consumer-trend-line { #consumer-trend-line {
position: absolute; position: absolute;
top: 120rpx; top: 120rpx;
left: 10rpx;
z-index: 100; z-index: 100;
} }
.consumer-trend-line-icon { .consumer-trend-line-icon {
position: absolute; position: absolute;
top: 547rpx; top: 558rpx;
left: 271rpx; left: 271rpx;
height: 40rpx; height: 40rpx;
......
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