mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-12 10:00:57 +08:00
物业费 界面数据展示开发完成
This commit is contained in:
parent
f10f4f42a0
commit
e4548f3b0f
@ -14,9 +14,13 @@ Page({
|
|||||||
feeMonthList:['一个月','半年','一年','两年'],
|
feeMonthList:['一个月','半年','一年','两年'],
|
||||||
feeMonthName:'一个月',
|
feeMonthName:'一个月',
|
||||||
feeMonth:1,
|
feeMonth:1,
|
||||||
endTime:'2020-01-07',
|
endTime:'',
|
||||||
amount:80,
|
amount:0,
|
||||||
receivableAmount:0.00
|
receivableAmount:0.00,
|
||||||
|
additionalAmount:0,
|
||||||
|
|
||||||
|
communityId:'',
|
||||||
|
communityName:''
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -24,9 +28,20 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
let _receivableAmount = this.data.feeMonth * this.data.amount * 100;
|
let _fee = JSON.parse(options.fee);
|
||||||
|
console.log('_fee',_fee);
|
||||||
|
let _receivableAmount = this.data.feeMonth * _fee.additionalAmount * 100;
|
||||||
|
let _communityInfo = context.getCurrentCommunity();
|
||||||
this.setData({
|
this.setData({
|
||||||
receivableAmount: _receivableAmount
|
receivableAmount: _receivableAmount,
|
||||||
|
communityId: _communityInfo.communityId,
|
||||||
|
communityName:_communityInfo.communityName,
|
||||||
|
num:_fee.num,
|
||||||
|
typeCdName:_fee.typeCdName,
|
||||||
|
carNum: _fee.carNum,
|
||||||
|
feeId:_fee.feeId,
|
||||||
|
additionalAmount: _fee.additionalAmount,
|
||||||
|
endTime: _fee.endTime
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -100,17 +115,17 @@ Page({
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
let _receivableAmount = _feeMonth * this.data.amount * 100;
|
let _receivableAmount = _feeMonth * this.data.additionalAmount * 100;
|
||||||
|
|
||||||
// let _lastDate = util.date.getDate(this.data.endTime);
|
let _lastDate = new Date(this.data.endTime);
|
||||||
// let _newDate = util.date.addMonth(_lastDate, _feeMonth);
|
let _newDate = util.date.addMonth(_lastDate, _feeMonth);
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
showFeeMonth: false,
|
showFeeMonth: false,
|
||||||
feeMonthName: _feeMonthName,
|
feeMonthName: _feeMonthName,
|
||||||
receivableAmount: _receivableAmount,
|
receivableAmount: _receivableAmount,
|
||||||
feeMonth: _feeMonth,
|
feeMonth: _feeMonth,
|
||||||
// endTime: util.date.formatTime(_newDate)
|
endTime: util.date.formatDate(_newDate)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onFeeMonthChange: function (e) {
|
onFeeMonthChange: function (e) {
|
||||||
|
|||||||
@ -3,17 +3,17 @@
|
|||||||
<view class="block__title">车位信息</view>
|
<view class="block__title">车位信息</view>
|
||||||
<view class="ppf_item">
|
<view class="ppf_item">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-cell title="小区" value="格兰小镇" />
|
<van-cell title="小区" value="{{communityName}}" />
|
||||||
<van-cell title="车位编号" value="6号车位" />
|
<van-cell title="车位编号" value="{{num}}号车位" />
|
||||||
<van-cell title="车位类型" value="地上停车位" />
|
<van-cell title="车位类型" value="{{typeCdName}}" />
|
||||||
<van-cell title="车牌号" value="青AGK916" />
|
<van-cell title="车牌号" value="{{carNum}}" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</view>
|
</view>
|
||||||
<view class="block__title">费用信息</view>
|
<view class="block__title">费用信息</view>
|
||||||
<view class="ppf_item">
|
<view class="ppf_item">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-cell title="费用编号" value="902019103018590010" />
|
<van-cell title="费用编号" value="{{feeId}}" />
|
||||||
<van-cell title="金额" value="{{amount}}元/月"/>
|
<van-cell title="金额" value="{{additionalAmount}}元/月"/>
|
||||||
<van-cell title="周期" value="{{feeMonthName}}" bind:click="chooseMonth" is-link/>
|
<van-cell title="周期" value="{{feeMonthName}}" bind:click="chooseMonth" is-link/>
|
||||||
<van-cell title="到期时间" value="{{endTime}}" />
|
<van-cell title="到期时间" value="{{endTime}}" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
|
|||||||
@ -73,9 +73,10 @@ Page({
|
|||||||
onShareAppMessage: function () {
|
onShareAppMessage: function () {
|
||||||
|
|
||||||
},
|
},
|
||||||
payFee:function(){
|
payFee:function(e){
|
||||||
|
let _item = e.target.dataset.item;
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/payParkingFee/payParkingFee',
|
url: '/pages/payParkingFee/payParkingFee?fee=' + JSON.stringify(_item),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
_loadParkingSpace:function(_owner){
|
_loadParkingSpace:function(_owner){
|
||||||
@ -120,6 +121,8 @@ Page({
|
|||||||
}else{
|
}else{
|
||||||
_parkingSpaces[_psIndex].feeStateName = '欠费'
|
_parkingSpaces[_psIndex].feeStateName = '欠费'
|
||||||
}
|
}
|
||||||
|
_parkingSpaces[_psIndex].additionalAmount = _fee.additionalAmount;
|
||||||
|
_parkingSpaces[_psIndex].feeId = _fee.feeId;
|
||||||
_that.setData({
|
_that.setData({
|
||||||
parkingSpaces: _parkingSpaces
|
parkingSpaces: _parkingSpaces
|
||||||
});
|
});
|
||||||
|
|||||||
@ -18,14 +18,14 @@
|
|||||||
</van-row>
|
</van-row>
|
||||||
<van-row class="ppfl_context_row">
|
<van-row class="ppfl_context_row">
|
||||||
<van-col span="5">每月金额:</van-col>
|
<van-col span="5">每月金额:</van-col>
|
||||||
<van-col span="7">80元</van-col>
|
<van-col span="7">{{item.additionalAmount}}元</van-col>
|
||||||
<van-col span="5">到期时间:</van-col>
|
<van-col span="5">到期时间:</van-col>
|
||||||
<van-col span="7">{{item.endTime}}</van-col>
|
<van-col span="7">{{item.endTime}}</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</view>
|
||||||
<view slot="footer" class="ppfl_footer">
|
<view slot="footer" class="ppfl_footer">
|
||||||
<van-button size="small" class="ppfl_footer_his" data-item="{{item}}">缴费历史</van-button>
|
<van-button size="small" class="ppfl_footer_his" data-item="{{item}}">缴费历史</van-button>
|
||||||
<van-button size="small" type="primary" bind:click="payFee" data-item="{{item}}">缴费</van-button>
|
<van-button size="small" type="primary" wx:if="{{item.state == 'H'}}" bind:click="payFee" data-item="{{item}}">缴费</van-button>
|
||||||
</view>
|
</view>
|
||||||
</van-panel>
|
</van-panel>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ const constant = context.constant;
|
|||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据时
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
typeArr: [{
|
typeArr: [{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user