Commit bceba90f authored by 袁玲利's avatar 袁玲利

校园报告鉴权逻辑修改

parent f10bcbba
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
// 鉴权服务项code // 鉴权服务项code
serviceItemCode: [config['ServiceEnum']['Auth10'], config['ServiceEnum']['Auth8'], config[ serviceItemCode: [config['ServiceEnum']['Auth10'], config['ServiceEnum']['Auth8'], config[
'ServiceEnum']['Auth11'], '', config[ 'ServiceEnum']['Auth11'], '', config[
'ServiceEnum']['Auth02']] 'ServiceEnum']['Auth2']]
[index] [index]
} }
}), }),
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</view> </view>
<!-- 遮罩层 --> <!-- 遮罩层 -->
<template v-if="!isVip"> <template v-if="false">
<div class="Covers"> <div class="Covers">
<div class="Covers_head" @click="openAzMenber"> <div class="Covers_head" @click="openAzMenber">
<span> <span>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</template> </template>
</view> </view>
<template v-if="isVip"> <template >
<!-- 生活费额度 --> <!-- 生活费额度 -->
<view class="living"> <view class="living">
<view class="hed"> <view class="hed">
...@@ -223,10 +223,10 @@ ...@@ -223,10 +223,10 @@
<span>消费明细</span> <span>消费明细</span>
</view> </view>
<view class="consume_detail_mesg"> <view class="consume_detail_mesg">
<span>早餐 <text class="prefer_light">{{userDealReportListAndSumObj.zaoSumAmount}}</text> <span>早餐 <text class="prefer_light">{{userDealReportListAndSumObj.zaoSumAmount || 0}}</text>
元,午餐<text 元,午餐<text
class="prefer_light">{{userDealReportListAndSumObj.wuSumAmount}}</text>元,晚餐<text class="prefer_light">{{userDealReportListAndSumObj.wuSumAmount || 0}}</text>元,晚餐<text
class="prefer_light">{{userDealReportListAndSumObj.wanSumAmount}}</text></span> class="prefer_light">{{userDealReportListAndSumObj.wanSumAmount || 0}}</text></span>
</view> </view>
<view class="detail_lists"> <view class="detail_lists">
<view class="listsHead" v-if="userDealReportListAndSumObj.list.length"> <view class="listsHead" v-if="userDealReportListAndSumObj.list.length">
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
<view class="footer_left"> <view class="footer_left">
<view class="footer_left_top">到期后将无法查看完整报告</view> <view class="footer_left_top">到期后将无法查看完整报告</view>
<view class="footer_left_bottom">有效期至<span class="special">{{vipExpiredDt}}</span>,剩余<span <view class="footer_left_bottom">有效期至<span class="special">{{vipExpiredDt}}</span>,剩余<span
class="special">{{homeDataInfo['vipDaysRemaining']}}</span></view> class="special">{{vipDaysRemaining}}</span></view>
</view> </view>
<view class="footer_right" @click="openAzMenber"> <view class="footer_right" @click="openAzMenber">
<span>延长权益</span> <span>延长权益</span>
...@@ -321,6 +321,7 @@ ...@@ -321,6 +321,7 @@
requestGet, requestGet,
requestPost requestPost
} from '../common/request.js' } from '../common/request.js'
import config from '../common/config.js'
export default { export default {
name: 'campusReport', name: 'campusReport',
data() { data() {
...@@ -362,6 +363,7 @@ ...@@ -362,6 +363,7 @@
}, },
homeDataInfo: {}, homeDataInfo: {},
vipExpiredDt: "", // 有效期 vipExpiredDt: "", // 有效期
vipDaysRemaining: 0, //有效天数
} }
}, },
components: { components: {
...@@ -389,30 +391,50 @@ ...@@ -389,30 +391,50 @@
}, },
created() { created() {
this.dataRangeArr = this.repastDateTimeFormat() this.dataRangeArr = this.repastDateTimeFormat()
this.currentDate.month = moment(this.dataRangeArr[this.dataRangeIndex].startDate).month() this.currentDate.month = moment(this.dataRangeArr[this.dataRangeIndex].startDate).month() || 0
this.currentDate.year = moment(this.dataRangeArr[this.dataRangeIndex].startDate).year() this.currentDate.year = moment(this.dataRangeArr[this.dataRangeIndex].startDate).year()
this.currentDate.date = moment(this.dataRangeArr[this.dataRangeIndex].startDate).date() this.currentDate.date = moment(this.dataRangeArr[this.dataRangeIndex].startDate).date()
this.shareDate = moment(this.dataRangeArr[this.dataRangeIndex].startDate).format('YYYY-MM-DD 00:00:00') this.shareDate = moment(this.dataRangeArr[this.dataRangeIndex].startDate).format('YYYY-MM-DD 00:00:00')
this.today.date = (this.currentDate.month + 1) + '月1日' this.today.date = (this.currentDate.month + 1) + '月1日'
console.log(this.currentDate, 'currentDate1111111111111', this.shareDate, 'this.homeDataInfo', this console.log(this.currentDate, 'currentDate1111111111111', this.shareDate, 'this.homeDataInfo', this
.homeDataInfo) .homeDataInfo)
}, },
mounted() { mounted() {
console.log(this.dataRangeArr, 'dataRangeArr') console.log(this.dataRangeArr, 'dataRangeArr')
this.homeDataInfo = JSON.parse(sessionStorage.getItem('HomeDataInfo')) this.homeDataInfo = JSON.parse(sessionStorage.getItem('HomeDataInfo'))
this.QueryProductContractItemDetailResp(config['ServiceEnum']['Auth2']);
this.getCampusConsumerReport() this.getCampusConsumerReport()
if (this.homeDataInfo.vipStatus === 1) { if (this.homeDataInfo.vipStatus === 1) {
this.isVip = true; this.isVip = true;
this.vipExpiredDt = moment(this.homeDataInfo.vipExpiredDt).format('YYYY年MM月DD日')
console.log(this.vipExpiredDt, 'this.vipExpiredDt')
this.initPieCharts()
this.getCateringAbnormalTypeGroupList()
} }
this.getCateringAbnormalTypeGroupList()
console.log(this.isVip, 'isVip') console.log(this.isVip, 'isVip')
this.columns = this.dataRangeArr.map(x => x.month) this.columns = this.dataRangeArr.map(x => x.month)
console.log(this.columns, 'columns') console.log(this.columns, 'columns')
}, },
methods: { methods: {
// 查询消费会员权益项
async QueryProductContractItemDetailResp(serviceItemCode = '1002') {
console.log(config['ServiceEnum']['Auth2'], 'Auth2',this.homeDataInfo)
const data = await requestPost('/cgi-xpay/app/h5/QueryProductContractItemDetail', {
accountId: this.homeDataInfo['accountId'],
serviceItemCode
})
if (data['code'] != 200) {
await Dialog({
title: '温馨提示',
message: data['message'],
confirmButtonText: "知道了"
})
return
}
this.vipExpiredDt = data.data.expiredDt ? (moment(data.data.expiredDt).format('YYYY年MM月DD日')) : ''
this.vipDaysRemaining = data.data.daysRemaining || 0
console.log(data.data, 'result')
},
shareHandler: function() { shareHandler: function() {
let htmlCanvasImg = document.getElementsByClassName("htmlCanvasImg")[0]; let htmlCanvasImg = document.getElementsByClassName("htmlCanvasImg")[0];
if (htmlCanvasImg) { if (htmlCanvasImg) {
...@@ -444,7 +466,7 @@ ...@@ -444,7 +466,7 @@
}, },
// 切换日期 // 切换日期
changeToday(today) { changeToday(today) {
this.today.date = (today.month + 1) + '' + today.date + '' this.today.date = (today.month + 1) + '' + (today.date || '1') + ''
if (Reflect.has(today, 'unrecordedZao')) { if (Reflect.has(today, 'unrecordedZao')) {
this.today.zao = today.unrecordedZao this.today.zao = today.unrecordedZao
} }
...@@ -469,10 +491,11 @@ ...@@ -469,10 +491,11 @@
console.log(this.currentDate, 'currentDate222222222222222', this.shareDate) console.log(this.currentDate, 'currentDate222222222222222', this.shareDate)
console.log(obj, 'obj', this.dataRangeIndex) console.log(obj, 'obj', this.dataRangeIndex)
this.getCampusConsumerReport() this.getCampusConsumerReport()
if (this.homeDataInfo.vipStatus === 1) { // if (this.homeDataInfo.vipStatus === 1) {
this.initPieCharts() // this.initPieCharts()
this.getCateringAbnormalTypeGroupList() this.getCateringAbnormalTypeGroupList()
} // }
this.pickerShow = !this.pickerShow; this.pickerShow = !this.pickerShow;
}, },
choosePicker() { choosePicker() {
...@@ -516,6 +539,7 @@ ...@@ -516,6 +539,7 @@
return return
} }
this.campusConsumerReportInfo = data.data; this.campusConsumerReportInfo = data.data;
this.initPieCharts()
} catch (e) { } catch (e) {
console.warn(e) console.warn(e)
//TODO handle the exception //TODO handle the exception
...@@ -622,9 +646,6 @@ ...@@ -622,9 +646,6 @@
getDataRangeArr() { getDataRangeArr() {
console.log(this.dataRangeArr, 'dataRangeArr') console.log(this.dataRangeArr, 'dataRangeArr')
}, },
init() {
this.initPieCharts();
},
show() { show() {
this.getUserDealReportListAndSum() this.getUserDealReportListAndSum()
this.isShow = !this.isShow; this.isShow = !this.isShow;
...@@ -657,15 +678,15 @@ ...@@ -657,15 +678,15 @@
series: [{ series: [{
type: 'pie', type: 'pie',
data: [{ data: [{
value: this.campusConsumerReportInfo.supermarketAmountF, value: this.campusConsumerReportInfo.supermarketAmountF || 0,
name: '超市' name: '超市'
}, },
{ {
value: this.campusConsumerReportInfo.canteenAmountF, value: this.campusConsumerReportInfo.canteenAmountF || 0,
name: '食堂' name: '食堂'
}, },
{ {
value: this.campusConsumerReportInfo.otherAmountF, value: this.campusConsumerReportInfo.otherAmountF || 0,
name: '其他' name: '其他'
} }
], ],
...@@ -733,13 +754,13 @@ ...@@ -733,13 +754,13 @@
{ {
type: 'pie', type: 'pie',
data: [{ data: [{
value: 620, value: this.campusConsumerReportInfo.supermarketAmountF || 0,
}, },
{ {
value: 240, value: this.campusConsumerReportInfo.canteenAmountF || 0,
}, },
{ {
value: 100, value: this.campusConsumerReportInfo.otherAmountF || 0,
} }
], ],
radius: ['69%', '82%'], radius: ['69%', '82%'],
......
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