Commit 5c755ec1 authored by aifen@azjy1.onexmail.com's avatar aifen@azjy1.onexmail.com

Merge branch 'V1.7.3_report_feature' into develop

parents f4152181 12242611
......@@ -317,7 +317,7 @@
class="consumer-details-sum">
<view v-for="(e,i) in item.consumerDetailsSumArr" class="consumer-details-sum-item"
:class="i?'':'consumer-details-sum-type'">
{{e}}
<text :style="{color:item.calculateType=='较上月'?trendColorList[i]:''}"> {{e}} </text>
</view>
</view>
</view>
......@@ -444,12 +444,14 @@
class="consume-total">{{consumerAmountObj.gtgraderate}}%</text>的同学<text
v-if="isReasonable">,请及时评估生活费是否合理</text></text> -->
<text v-if="consumerDetailCalculateObj.totalData>0">消费总额<text
class="consume-total">{{livingExpensesAllowance.userConsumeAmount}}</text>元,同比上{{['',''][reportTypeIndex]}}<text
class="consume-total">{{livingExpensesAllowance.userConsumeAmount}}</text><text
v-if="livingExpensesAllowance.gradeAverageAmount>0">,同比上{{['',''][reportTypeIndex]}}<text
class="consume-total">{{livingExpensesAllowance.lastMonthRateStr}}
<van-icon :class="livingExpensesAllowance.lastMonthRate>0?'':'livingCostUp'"
name="down" />
</text>
</text>
</text>
<text v-else>
所选日期内暂无消费
</text>
......@@ -1214,6 +1216,7 @@
cateringNumber: '', // 就餐次数
notCateringNumber: '', //未就餐次数
},
trendColorList: [],
// 就餐情况
diningSituations: {
diningSituationsDate: '',
......@@ -1522,7 +1525,6 @@
this.queryConsumerDetail(this.dataRangeArr[this.dataRangeIndex].startDate, this.dataRangeArr[this
.dataRangeIndex].endDate);
this.queryConsumerSummaryAmount();
this.queryLivingCostsAmount();
this.queryIsDredgeMember(1002, 1).then(() => {
if (this.isOpen) {
this.queryConsumerSummaryAmount(1).then(e => this.piechart());
......@@ -1562,7 +1564,6 @@
// })
} else {
this.queryConsumerSummaryAmount();
this.queryLivingCostsAmount();
this.queryDayConsumerTrend();
}
})
......@@ -2593,20 +2594,30 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
})
this.campusConsumerDetailObj.campusConsumerDetailCalculateList.sort(this
.sortCalculateType);
let tmpColorList = [''];
this.campusConsumerDetailObj.campusConsumerDetailCalculateList.forEach((e, index) => {
e.calculateType = ['均值(元)', '较上月', '就餐(次)', '未就餐(次)', '总计(元)'][e
e.calculateType = ['就餐(次)', '未就餐(次)', '均值(元)', '较上月', '总计(元)'][e
.calculateType -
1
];
if (e.calculateType == '较上月') {
for (let item in e) {
if (item != 'calculateType') {
if (e[item] > 0) {
tmpColorList.push('#FA2B00');
} else if (e[item] > 0) {
tmpColorList.push('#00A367');
} else {
tmpColorList.push('');
}
e[item] = e[item] > 0 ? e[item] +
'%↑' : (e[item] < 0 ? e[item].toString().slice(1) + '%↓' :
0);
}
}
}
this.trendColorList = JSON.parse(JSON.stringify(tmpColorList));
e.consumerDetailsSumArr = Object.values(e);
})
if (this.campusConsumerDetailObj.campusConsumerDetailCalculateList[4]) {
......@@ -2618,15 +2629,15 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
this.consumerDetailCalculateObj.totalData = this.campusConsumerDetailObj
.campusConsumerDetailCalculateList[4].totalAmount;
}
if (this.campusConsumerDetailObj.campusConsumerDetailCalculateList[2]) {
if (this.campusConsumerDetailObj.campusConsumerDetailCalculateList[0]) {
// 就餐次数
this.consumerDetailCalculateObj.cateringNumber = this.campusConsumerDetailObj
.campusConsumerDetailCalculateList[2].totalAmount;
.campusConsumerDetailCalculateList[0].totalAmount;
}
if (this.campusConsumerDetailObj.campusConsumerDetailCalculateList[3]) {
if (this.campusConsumerDetailObj.campusConsumerDetailCalculateList[1]) {
// 未就餐次数
this.consumerDetailCalculateObj.notCateringNumber = this.campusConsumerDetailObj
.campusConsumerDetailCalculateList[3].totalAmount;
.campusConsumerDetailCalculateList[1].totalAmount;
}
}
} else if (data.code == 500) { // 暂无消费数据
......@@ -2646,7 +2657,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
this.campusConsumerDetailObj.campusConsumerDetailList = JSON.parse(JSON.stringify(
tmpDetailList));
let tmpCalculatList = [];
let calculateTypeList = ['均值(元)', '较上月', '就餐(次)', '未就餐(次)', '总计(元)'];
let calculateTypeList = ['就餐(次)', '未就餐(次)', '均值(元)', '较上月', '总计(元)'];
calculateTypeList.forEach(e => {
tmpCalculatList.push({
"calculateType": e,
......@@ -2660,6 +2671,13 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
});
this.campusConsumerDetailObj.campusConsumerDetailCalculateList = JSON.parse(JSON.stringify(
tmpCalculatList));
this.trendColorList = ['', '', '', '', '', ''];
this.consumerDetailCalculateObj = {
canteenData: '', // 食堂消费
totalData: '', // 总消费
cateringNumber: '', // 就餐次数
notCateringNumber: '', //未就餐次数
};
} else {
uni.showToast({
icon: "none",
......@@ -2731,7 +2749,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
if (obj1.num > obj2.num) {
temp = JSON.parse(JSON.stringify(obj1));
obj1 = JSON.parse(JSON.stringify(obj2));
obj2.num = JSON.parse(JSON.stringify(temp));
obj2 = JSON.parse(JSON.stringify(temp));
}
if (obj2.num > obj3.num) {
temp = JSON.parse(JSON.stringify(obj2));
......
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