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

Merge branch 'v_req_9.2' into uat

parents 5842ecc8 b87d946f
......@@ -89,12 +89,12 @@
"disableHostCheck": true,
"proxy": {
"/": {
"target": "https://uat-pay.xiaopay.net",
"target": "https://fpdev.xiaopay.net",
"changeOrigin": true,
"secure": false
},
"/cgi-xpay": {
"target": "https://uat-pay.xiaopay.net",
"target": "https://fpdev.xiaopay.net",
"changeOrigin": true,
"secure": false,
"pathRewrite": {
......
......@@ -134,7 +134,7 @@
class="txt-important"> {{consumerSummaryAmountOBj.canteenamount}} </text> 元,超市和其他场景消费 <text
class="txt-important">{{consumerSummaryAmountOBj.superAndOtherAmount}}</text>元。孩子在食堂消费<text
class="txt-important">占比过低</text>,要注意均衡饮食习惯哦~</view>
<view v-else>食堂消费 <text
<view class="school-report-context-card-one-context-txt" v-else>食堂消费 <text
class="txt-important"> {{consumerSummaryAmountOBj.canteenamount}} </text> 元,超市和其他场景消费<text
class="txt-important"> {{consumerSummaryAmountOBj.superAndOtherAmount}}</text> 元。按时就餐均衡饮食,要继续保持哦~</view>
</view>
......@@ -1893,7 +1893,7 @@ export default {
},
// 当天11:00 ~ 13:00属于高峰期
isPeakPeriod() {
let first = this.timeIn("11:00:00", "11:01:00");
let first = this.timeIn("11:00:00", "13:00:00");
return first;
},
nodataClick: function () {
......@@ -2122,17 +2122,36 @@ export default {
this.dataRangeIndex = e.target.value;
this.getDataRangeArr(this.reportTypeIndex);
},
// 获取一年中的所有周
getAllWeeksInYear(year) {
let currentDate = dayjs(new Date(year, 0, 1)); // 设置为年份的第一天
const weeks = [];
while (currentDate.year() === year) {
const startOfWeek = currentDate.startOf('week');
const endOfWeek = currentDate.endOf('week');
weeks.push({
startDate: startOfWeek.format('YYYY-MM-DD'),
endDate: endOfWeek.format('YYYY-MM-DD')
});
currentDate = currentDate.add(1, 'week');
}
return weeks;
},
getDataRangeArr: async function (num) {
if (num) {
// 一年 52周 周报
let tmpArr = [];
for (let i = 1; i <= 52; i++) {
let startWeek = dayjs().subtract(i, "week").startOf("week");
// 设置 locale,将一周的开始日设置为周一 (1)
let startWeek = dayjs().subtract(i, "week").startOf("week").add(1, 'day');
let endWeek =
dayjs().$d.getTime() >
dayjs().subtract(i, "week").endOf("week").$d.getTime()
? dayjs().subtract(i, "week").endOf("week")
: dayjs();
endWeek = endWeek.add(1, 'day');
tmpArr.push({
week:
startWeek.format("YYYY/MM/DD") +
......@@ -3401,10 +3420,10 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
) {
// 食堂消费=总消费-其他消费
this.consumerDetailCalculateObj.canteenData =
this.campusConsumerDetailObj
(this.campusConsumerDetailObj
.campusConsumerDetailCalculateList[4].totalAmount -
this.campusConsumerDetailObj
.campusConsumerDetailCalculateList[4].otherAmount;
.campusConsumerDetailCalculateList[4].otherAmount).toFixed(2);
// 总消费
this.consumerDetailCalculateObj.totalData =
this.campusConsumerDetailObj.campusConsumerDetailCalculateList[4].totalAmount;
......@@ -5067,6 +5086,7 @@ uni-page-wrapper {
.school-report-context-card-one-context-item {
display: inline-flex;
line-height: 40rpx;
font-size: 14px;
.school-report-context-card-one-context-dot {
margin-left: 27rpx;
......
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