This commit is contained in:
905166056 2021-08-10 10:19:03 +08:00
parent 060d03d305
commit 7a203c4e3b
3 changed files with 19 additions and 3 deletions

View File

@ -222,5 +222,15 @@ export default {
second = '0' + second;
}
return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
},
/**
* @param {Object} date日期 Y-m-d H:i:s
* @param {Object} days 天数
*/
decSomeDays: function(date, days){
let timestamp = new Date(date.replace(/-/g, '/')).getTime();
let decstamp = 60 * 60 * 24 * 1000 * days;
return this.formatDate(new Date(timestamp - decstamp));
}
}

View File

@ -11,7 +11,7 @@
</view>
<view class="cu-form-group">
<view class="title">到期时间</view>
{{feeInfo.endTime}}
{{feeInfo.deadlineTime}}
</view>
<view class="cu-form-group">
<view class="title">费用标识</view>
@ -53,6 +53,7 @@
queryFeeDetail
} from '../../api/fee/fee.js';
import {getCurrentCommunity} from '../../api/community/community.js'
import dateUtil from '../../lib/java110/utils/date.js'
export default {
data() {
return {
@ -117,7 +118,12 @@
}
let _fees = res.data.fees;
_that.feeInfo = _fees[0];
// -1
if(_that.feeInfo.feeFlag == '1003006'){
_that.feeInfo.deadlineTime = dateUtil.decSomeDays(_that.feeInfo.deadlineTime, 1);
}else{
_that.feeInfo.deadlineTime = dateUtil.formatDate(new Date(_that.feeInfo.deadlineTime.replace(/-/g, '/')));
}
})
},
}

View File

@ -154,7 +154,6 @@
return;
}
let _that = this;
_that.receivableAmount = 0.0;
let _objData = {
payObjId: this.roomInfo.roomId,
payObjType: '3333',
@ -175,6 +174,7 @@
_that.fees = [];
})
.then(function(_fees) {
_that.receivableAmount = 0.0;
_fees.forEach(function(_item) {
_that.receivableAmount += _item.feePrice;