校园报告tab展示提交更新

parent 76d16ac3
......@@ -812,6 +812,7 @@
},
attendanceReportDatail: [],
// 会员信息
queryMemberServcieItemList: [],
// 消费
isOpen: false,
isService: false,
......@@ -836,14 +837,23 @@
return
}
this.showReport = true;
// 有无消费报告入口
if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isService = true;
} else {
this.queryIsDredgeMember(1001);
this.queryMemberServcieItem().then(() => {
if (this.queryMemberServcieItemList.length) {
this.isService = this.queryMemberServcieItemList.indexOf(1002) == -1 ? false : true;
}
// 有无进出校公话服务
this.queryIsDredgeMember(2001);
this.queryIsDredgeMember(3001);
})
}
// 有无进出校、公话入口
this.queryMemberServcieItem().then(() => {
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(() => {
if (this.isOpen) {
......@@ -1098,7 +1108,7 @@
}
this.dataRangeArr = tmpArr;
}
this.tabTapHandler(this.tabIndex,1);
this.tabTapHandler(this.tabIndex, 1);
},
formatter(day) {
const year = day.date.getFullYear();
......@@ -1936,17 +1946,12 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
return
}
switch (serviceItemCode) {
case 1001:
this.isService = data.obj.status;
break;
case 1002:
this.isOpen = data.obj.status;
if (!this.isOpen) {
this.flag = 1;
}
break;
case 2001:
this.isPubTalkService = data.obj.status;
case 2002:
this.isPubTalkOpen = data.obj.status;
if (this.isPubTalkOpen) {
......@@ -1959,9 +1964,6 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
this.flag = 3;
}
break;
case 3001:
this.isAttendanceService = data.obj.status;
break;
case 3002:
this.isAttendanceOpen = data.obj.status;
if (this.isAttendanceOpen) {
......@@ -1995,6 +1997,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) {
try {
......
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