mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-12 10:00:57 +08:00
优化代码
This commit is contained in:
parent
e15bcdfb40
commit
27edc8e081
@ -109,7 +109,10 @@
|
|||||||
// pages/payParkingFee/payParkingFee.js
|
// pages/payParkingFee/payParkingFee.js
|
||||||
const context = require("../../context/Java110Context.js");
|
const context = require("../../context/Java110Context.js");
|
||||||
const constant = context.constant;
|
const constant = context.constant;
|
||||||
import {addMonth,formatDate} from '../../utils/DateUtil.js'
|
import {
|
||||||
|
addMonth,
|
||||||
|
formatDate
|
||||||
|
} from '../../utils/DateUtil.js'
|
||||||
|
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
@ -161,7 +164,7 @@
|
|||||||
|
|
||||||
let _communityInfo = context.getCurrentCommunity();
|
let _communityInfo = context.getCurrentCommunity();
|
||||||
let _lastDate = new Date(_fee.endTime);
|
let _lastDate = new Date(_fee.endTime);
|
||||||
let _endTime = addMonth(_lastDate, this.feeMonth);
|
|
||||||
|
|
||||||
this.receivableAmount = _receivableAmount;
|
this.receivableAmount = _receivableAmount;
|
||||||
this.communityId = _communityInfo.communityId;
|
this.communityId = _communityInfo.communityId;
|
||||||
@ -171,7 +174,7 @@
|
|||||||
this.carNum = _fee.carNum;
|
this.carNum = _fee.carNum;
|
||||||
this.feeId = _fee.feeId;
|
this.feeId = _fee.feeId;
|
||||||
this.feePrice = _fee.feePrice;
|
this.feePrice = _fee.feePrice;
|
||||||
this.endTime = formatDate(_endTime);
|
|
||||||
this.ordEndTime = _fee.endTime;
|
this.ordEndTime = _fee.endTime;
|
||||||
this.feeFlag = _fee.feeFlag;
|
this.feeFlag = _fee.feeFlag;
|
||||||
if (this.feeFlag == '2006012') {
|
if (this.feeFlag == '2006012') {
|
||||||
@ -183,7 +186,8 @@
|
|||||||
this.feeMonthList.push(_index * this.paymentCycle + '个月')
|
this.feeMonthList.push(_index * this.paymentCycle + '个月')
|
||||||
}
|
}
|
||||||
this.feeMonthName = this.paymentCycle + '个月';
|
this.feeMonthName = this.paymentCycle + '个月';
|
||||||
|
let _endTime = addMonth(_lastDate, this.feeMonth);
|
||||||
|
this.endTime = formatDate(_endTime);
|
||||||
var pages = getCurrentPages();
|
var pages = getCurrentPages();
|
||||||
var prevPage = pages[pages.length - 2]; //上一个页面
|
var prevPage = pages[pages.length - 2]; //上一个页面
|
||||||
//直接调用上一个页面的setData()方法,把数据存到上一个页面中去
|
//直接调用上一个页面的setData()方法,把数据存到上一个页面中去
|
||||||
|
|||||||
@ -184,7 +184,6 @@
|
|||||||
let _receivableAmount = (_fee.paymentCycle * _amount).toFixed(2);
|
let _receivableAmount = (_fee.paymentCycle * _amount).toFixed(2);
|
||||||
let _communityInfo = context.getCurrentCommunity();
|
let _communityInfo = context.getCurrentCommunity();
|
||||||
let _lastDate = new Date(_fee.endTime);
|
let _lastDate = new Date(_fee.endTime);
|
||||||
let _endTime = addMonth(_lastDate, this.feeMonth);
|
|
||||||
this.receivableAmount = _receivableAmount;
|
this.receivableAmount = _receivableAmount;
|
||||||
this.communityId = _communityInfo.communityId;
|
this.communityId = _communityInfo.communityId;
|
||||||
this.communityName = _communityInfo.communityName;
|
this.communityName = _communityInfo.communityName;
|
||||||
@ -196,7 +195,6 @@
|
|||||||
this.feeId = _fee.feeId;
|
this.feeId = _fee.feeId;
|
||||||
this.amount = _amount;
|
this.amount = _amount;
|
||||||
this.additionalAmount = _fee.additionalAmount;
|
this.additionalAmount = _fee.additionalAmount;
|
||||||
this.endTime = formatDate(_endTime);
|
|
||||||
this.ordEndTime = _fee.endTime;
|
this.ordEndTime = _fee.endTime;
|
||||||
this.feeFlag = _fee.feeFlag;
|
this.feeFlag = _fee.feeFlag;
|
||||||
if(this.feeFlag == '2006012'){
|
if(this.feeFlag == '2006012'){
|
||||||
@ -208,6 +206,8 @@
|
|||||||
}
|
}
|
||||||
this.feeMonthName = this.paymentCycle + '个月';
|
this.feeMonthName = this.paymentCycle + '个月';
|
||||||
this.feeMonth = this.paymentCycle;
|
this.feeMonth = this.paymentCycle;
|
||||||
|
let _endTime = addMonth(_lastDate, this.feeMonth);
|
||||||
|
this.endTime = formatDate(_endTime);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dateChange: function(e) {
|
dateChange: function(e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user