mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
优化停车费缴费周期问题
This commit is contained in:
parent
6888b31298
commit
99c0da393f
@ -107,8 +107,8 @@
|
||||
data() {
|
||||
return {
|
||||
showFeeMonth: false,
|
||||
feeMonthList: ['一个月', '半年', '一年', '两年'],
|
||||
feeMonthName: '一个月',
|
||||
feeMonthList: [],
|
||||
feeMonthName: '',
|
||||
feeMonth: 1,
|
||||
endTime: '',
|
||||
ordEndTime: '',
|
||||
@ -122,7 +122,9 @@
|
||||
communityId: '',
|
||||
communityName: '',
|
||||
feeId: '',
|
||||
appId:''
|
||||
appId:'',
|
||||
feeFlag:'',
|
||||
paymentCycle:1,
|
||||
};
|
||||
},
|
||||
|
||||
@ -155,6 +157,12 @@
|
||||
this.feePrice = _fee.feePrice;
|
||||
this.endTime = util.date.formatDate(_endTime);
|
||||
this.ordEndTime = _fee.endTime;
|
||||
this.feeFlag = _fee.feeFlag;
|
||||
this.paymentCycle = _fee.paymentCycle;
|
||||
for (let _index = 1; _index < 7; _index++) {
|
||||
this.feeMonthList.push(_index * this.paymentCycle + '个月')
|
||||
}
|
||||
this.feeMonthName = this.paymentCycle + '个月';
|
||||
|
||||
var pages = getCurrentPages();
|
||||
var prevPage = pages[pages.length - 2]; //上一个页面
|
||||
@ -162,36 +170,6 @@
|
||||
prevPage.needFefresh = false;
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
@ -202,19 +180,7 @@
|
||||
console.log("onConfirm", e);
|
||||
let _feeMonthName = null;
|
||||
_feeMonthName = this.feeMonthList[e.detail.value];
|
||||
let _feeMonth = 1;
|
||||
|
||||
if (_feeMonthName == '一个月') {
|
||||
_feeMonth = 1;
|
||||
} else if (_feeMonthName == '半年') {
|
||||
_feeMonth = 6;
|
||||
} else if (_feeMonthName == '一年') {
|
||||
_feeMonth = 12;
|
||||
} else if (_feeMonthName == '两年') {
|
||||
_feeMonth = 24;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
let _feeMonth = _feeMonthName.replace("个月","");;
|
||||
|
||||
let _receivableAmount = _feeMonth * this.feePrice ;
|
||||
|
||||
|
||||
@ -85,12 +85,6 @@
|
||||
onLoad: function(options) {
|
||||
context.onLoad(options);
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
@ -104,31 +98,6 @@
|
||||
_that._loadParkingSpace(_owner);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function() {},
|
||||
methods: {
|
||||
payFee: function(_item) {
|
||||
uni.navigateTo({
|
||||
@ -157,7 +126,6 @@
|
||||
_that.parkingSpaces = _parkingSpaces;
|
||||
if (_parkingSpaces.length == 0) {
|
||||
_that.noData = true;
|
||||
|
||||
return;
|
||||
}
|
||||
_that.curParkingSpace = _parkingSpaces[0];
|
||||
@ -203,7 +171,6 @@
|
||||
_fee.endTime = util.date.formatDate(_endTime);
|
||||
_fee.num = _that.curParkingSpace.num;
|
||||
let _now = new Date();
|
||||
|
||||
if (_endTime > _now) {
|
||||
_fee.feeStateName = '正常'
|
||||
} else {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -239,8 +239,8 @@ var util = context.util;var _default =
|
||||
data: function data() {
|
||||
return {
|
||||
showFeeMonth: false,
|
||||
feeMonthList: ['一个月', '半年', '一年', '两年'],
|
||||
feeMonthName: '一个月',
|
||||
feeMonthList: [],
|
||||
feeMonthName: '',
|
||||
feeMonth: 1,
|
||||
endTime: '',
|
||||
ordEndTime: '',
|
||||
@ -254,7 +254,9 @@ var util = context.util;var _default =
|
||||
communityId: '',
|
||||
communityName: '',
|
||||
feeId: '',
|
||||
appId: '' };
|
||||
appId: '',
|
||||
feeFlag: '',
|
||||
paymentCycle: 1 };
|
||||
|
||||
},
|
||||
|
||||
@ -287,6 +289,12 @@ var util = context.util;var _default =
|
||||
this.feePrice = _fee.feePrice;
|
||||
this.endTime = util.date.formatDate(_endTime);
|
||||
this.ordEndTime = _fee.endTime;
|
||||
this.feeFlag = _fee.feeFlag;
|
||||
this.paymentCycle = _fee.paymentCycle;
|
||||
for (var _index = 1; _index < 7; _index++) {
|
||||
this.feeMonthList.push(_index * this.paymentCycle + '个月');
|
||||
}
|
||||
this.feeMonthName = this.paymentCycle + '个月';
|
||||
|
||||
var pages = getCurrentPages();
|
||||
var prevPage = pages[pages.length - 2]; //上一个页面
|
||||
@ -295,38 +303,8 @@ var util = context.util;var _default =
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onReady: function onReady() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function onShow() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function onHide() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function onUnload() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function onPullDownRefresh() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function onReachBottom() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function onShareAppMessage() {},
|
||||
methods: {
|
||||
|
||||
@ -334,19 +312,7 @@ var util = context.util;var _default =
|
||||
console.log("onConfirm", e);
|
||||
var _feeMonthName = null;
|
||||
_feeMonthName = this.feeMonthList[e.detail.value];
|
||||
var _feeMonth = 1;
|
||||
|
||||
if (_feeMonthName == '一个月') {
|
||||
_feeMonth = 1;
|
||||
} else if (_feeMonthName == '半年') {
|
||||
_feeMonth = 6;
|
||||
} else if (_feeMonthName == '一年') {
|
||||
_feeMonth = 12;
|
||||
} else if (_feeMonthName == '两年') {
|
||||
_feeMonth = 24;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
var _feeMonth = _feeMonthName.replace("个月", "");;
|
||||
|
||||
var _receivableAmount = _feeMonth * this.feePrice;
|
||||
|
||||
|
||||
@ -221,15 +221,9 @@ var util = context.util;var noDataPage = function noDataPage() {__webpack_requir
|
||||
onLoad: function onLoad(options) {
|
||||
context.onLoad(options);
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onReady: function onReady() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function onShow() {
|
||||
var _that = this;
|
||||
if (!this.needFefresh) {
|
||||
@ -240,31 +234,6 @@ var util = context.util;var noDataPage = function noDataPage() {__webpack_requir
|
||||
_that._loadParkingSpace(_owner);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function onHide() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function onUnload() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function onPullDownRefresh() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function onReachBottom() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function onShareAppMessage() {},
|
||||
methods: {
|
||||
payFee: function payFee(_item) {
|
||||
uni.navigateTo({
|
||||
@ -293,7 +262,6 @@ var util = context.util;var noDataPage = function noDataPage() {__webpack_requir
|
||||
_that.parkingSpaces = _parkingSpaces;
|
||||
if (_parkingSpaces.length == 0) {
|
||||
_that.noData = true;
|
||||
|
||||
return;
|
||||
}
|
||||
_that.curParkingSpace = _parkingSpaces[0];
|
||||
@ -339,7 +307,6 @@ var util = context.util;var noDataPage = function noDataPage() {__webpack_requir
|
||||
_fee.endTime = util.date.formatDate(_endTime);
|
||||
_fee.num = _that.curParkingSpace.num;
|
||||
var _now = new Date();
|
||||
|
||||
if (_endTime > _now) {
|
||||
_fee.feeStateName = '正常';
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user