fee update

This commit is contained in:
unknown 2020-01-17 23:36:46 +08:00
parent 8d3ad387c5
commit 3057cee191
3 changed files with 70 additions and 51 deletions

View File

@ -2,6 +2,7 @@ const context = require('../../context/Java110Context.js');
const constant = context.constant;
const util = context.util;
Page({
data: {
rooms: [],
@ -123,20 +124,24 @@ Page({
let _tmpEndTime = _fee.endTime.replace(/\-/g, "/")
let _endTime = new Date(_tmpEndTime);
_parkingSpaces[_psIndex].endTime = util.date.formatDate(_endTime);
_room[_psIndex].endTime = util.date.formatDate(_endTime);
let _now = new Date();
if (_endTime > _now) {
_parkingSpaces[_psIndex].feeStateName = '正常'
_room[_psIndex].feeStateName = '正常'
_room[_psIndex].state = 'N'
} else {
_parkingSpaces[_psIndex].feeStateName = '欠费'
_room[_psIndex].feeStateName = '欠费'
_room[_psIndex].state = 'Y'
}
_parkingSpaces[_psIndex].additionalAmount = _fee.additionalAmount;
_parkingSpaces[_psIndex].feeId = _fee.feeId;
_room[_psIndex].additionalAmount = _fee.additionalAmount;
_room[_psIndex].feeId = _fee.feeId;
_room[_psIndex].ownerName = _fee.ownerName;
console.log("_room[_psIndex]=", _room[_psIndex])
_that.setData({
parkingSpaces: _parkingSpaces
rooms: _room
});
});
}
@ -152,7 +157,8 @@ Page({
page: 1,
row: 10,
roomId: _room.roomId,
communityId: _owner.communityId
communityId: _owner.communityId,
feeTypeCd: '888800010001'
}
context.request({
url: constant.url.queryFeeByOwner,
@ -160,7 +166,7 @@ Page({
method: "GET",
data: _objData, //动态数据
success: function (res) {
console.log(res);
console.log("res====>>>",res);
if (res.statusCode == 200) {
//成功情况下跳转
let _roomFee = res.data;

View File

@ -1,22 +1,34 @@
<view class="user-container">
<view wx:for="{{rooms}}" wx:for-index="idx" wx:for-item="item" class="notice" data-item="{{item}}" bindtap="gotoDetail">
<view class="title">
<view>{{item.fee_type_cd}}</view>
</view>
<view class="main">
<view>
<view class="text"> 小区名字: {{communityName}}</view>
<view class="text"> 小区ID: {{communityId}}</view>
<view class="text"> 房间ID: {{item.roomId}}</view>
<view class="text"> 房间号: {{item.roomNum}}</view>
<view class="text"> 单元ID: {{item.unitId}}</view>
<view class="text"> 总金额: {{item.amount}}</view>
<view>
<view class="block__title">物业费信息</view>
<view class="ppfl_c" wx:for="{{rooms}}" wx:for-index="idx" wx:for-item="item" >
<van-panel title="{{item.unitNum}}单元{{item.roomNum}}号房间" desc="" status="{{item.feeStateName}}状态" use-footer-slot>
<view class="ppfl_context">
<van-row >
<van-col span="5">小区:</van-col>
<van-col span="15">{{communityName}}</van-col>
</van-row>
<van-row >
<van-col span="5">业主:</van-col>
<van-col span="7">{{item.ownerName}}</van-col>
</van-row>
<van-row >
<van-col span="5">总金额:</van-col>
<van-col span="7">{{item.additionalAmount}}</van-col>
</van-row>
<van-row >
<van-col span="5">到期时间:</van-col>
<van-col span="7">{{item.endTime}}</van-col>
</van-row>
</view>
<text>{{}}</text>
<view>
<!-- <view>
<button class="button" size="mini" type="default" catchtap="gotoDetail" data-item="{{item}}">付款</button>
<button class="button" size="mini" type="default" catchtap="gotoDetail" data-item="{{item}}">反馈</button>
</view> -->
<view slot="footer" class="ppfl_footer">
<van-button size="small" class="ppfl_footer_his" data-item="{{item}}">缴费历史</van-button>
<van-button size="small" type="primary" wx:if="{{item.state == 'Y'}}" bind:click="payFee" data-item="{{item}}">缴费</van-button>
</view>
</view>
</van-panel>
</view>
</view>

View File

@ -1,32 +1,33 @@
.user-container {
padding: 25rpx 10rpx;
background-color: #F0F0F0;
.ppfl_footer{
text-align: right;
}
.ppfl_footer .ppfl_footer_his{
margin-right: 20rpx;
}
/*border: 1px solid black;*/
.ppfl_c{
padding: 0rpx 20rpx 20rpx 20rpx;
}
.notice {
margin: 10rpx 7rpx;
padding: 25rpx;
background-color: #ffffff;
border-radius: 7rpx;
/* display: flex;
justify-content: space-between;
align-items: flex-end; */
.block__title {
margin: 0;
font-weight: 400;
font-size: 14px;
color: rgba(69,90,100,.6);
padding: 40rpx 30rpx 20rpx;
}
.title {
border-bottom: 1rpx solid #dedede;
font-weight: 700;
font-size: 34rpx;
color: #5f5e5e;
display: flex;
justify-content: space-between;
.ppfl_context{
padding: 20rpx 40rpx 40rpx 40rpx;
font-size: 28rpx;
color: #8a8a8a;
}
.text{
padding: 4rpx 0;
font-size: 30rpx;
}
.main{
display: flex;
justify-content: space-between;
align-items: flex-end;
.ppfl_context .ppfl_context_row{
margin-top: 30rpx;
}
.button_up_blank{
height: 40rpx;
}