Skip to content

Commit

Permalink
车位申请界面
Browse files Browse the repository at this point in the history
  • Loading branch information
mrzcc committed Sep 25, 2020
1 parent b3a743e commit 6a0caed
Show file tree
Hide file tree
Showing 5 changed files with 236 additions and 2 deletions.
5 changes: 4 additions & 1 deletion constant/UrlConstant.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ const queryParkingSpaces= baseUrl + 'app/parkingSpace.queryParkingSpaces'; //查

const saveOwnerCar= baseUrl + 'app/owner.saveOwnerCar'; //申请车位接口

const queryOwnerCars= baseUrl + 'app/owner.queryOwnerCars'; //查询业主车辆



/**
Expand Down Expand Up @@ -249,6 +251,7 @@ module.exports = {
toOweFeePay:toOweFeePay,

queryParkingSpaces:queryParkingSpaces,
saveOwnerCar:saveOwnerCar
saveOwnerCar:saveOwnerCar,
queryOwnerCars:queryOwnerCars

};
8 changes: 7 additions & 1 deletion pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,13 @@
"style" : {
"navigationBarTitleText": "欠费缴费"
}
}
},
{
"path" : "pages/parkingInfo/parkingInfo",
"style" : {
"navigationBarTitleText": "车位申请进度"
}
}
],
"tabBar": {
"color": "#272636",
Expand Down
12 changes: 12 additions & 0 deletions pages/my/my.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@
<text class="text-grey">我的报修单</text>
</view>
</view>

<view class="cu-item arrow" @click="myParking()">
<view class="content">
<text class="cuIcon-cameraadd text-orange"></text>
<text class="text-grey">车位信息</text>
</view>
</view>

<view class="cu-item arrow" @click="mySettings()">
<view class="content">
Expand Down Expand Up @@ -247,6 +254,11 @@
},
ckeckUserInfo: function() {
return context.checkLoginStatus();
},
myParking:function(){
wx.navigateTo({
url: '/pages/parkingInfo/parkingInfo',
});
}
}
Expand Down
33 changes: 33 additions & 0 deletions pages/parkingInfo/parkingInfo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.ppfl_footer{
text-align: right;
}
.ppfl_footer .ppfl_footer_his{
margin-right: 20rpx;
}

.ppfl_c{
padding: 0rpx 20rpx 20rpx 20rpx;
}

.block__title {
margin: 0;
font-weight: 400;
font-size: 14px;
color: rgba(69,90,100,.6);
padding: 40rpx 30rpx 20rpx;
}

.ppfl_context{
padding: 20rpx 40rpx 40rpx 40rpx;
font-size: 28rpx;
color: #8a8a8a;
}

.ppfl_context .ppfl_context_row{
margin-top: 30rpx;
}


.button_up_blank{
height: 40rpx;
}
180 changes: 180 additions & 0 deletions pages/parkingInfo/parkingInfo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
<template>
<view>
<view>
<view class="header_fixed">
<scroll-view class="bg-white nav">
<view class="flex text-center">
<view class="cu-item flex-sub" :class="item.code==code?'text-green cur':''" v-for="(item,index) in parkingType"
:key="index" @tap="switchParkingSpace(item)" :data-id="index">
{{item.name}}
</view>
</view>
</scroll-view>
</view>
<view v-if="noData == false">
<view v-for="(item,index) in parkings" :key="index"
class="bg-white margin-bottom margin-right-xs radius margin-left-xs padding-top padding-left padding-right">

<view class="flex margin-top justify-between">
<view class="text-gray">车位</view>
<view class="text-gray">{{item.areaNum}}{{item.num}}</view>
</view>
<view class="flex margin-top justify-between">
<view class="text-gray">状态</view>
<view class="text-gray">{{item.stateName}}</view>
</view>
<view class="flex margin-top-xs justify-between">
<view class="text-gray">车牌号</view>
<view class="text-gray">{{item.carNum}}</view>
</view>
<view class="flex margin-top-xs justify-between">
<view class="text-gray">车辆品牌</view>
<view class="text-gray">{{item.carBrand}}</view>
</view>
<view class="flex margin-top-xs justify-between">
<view class="text-gray">起租时间</view>
<view class="text-gray">{{item.createTime}}</view>
</view>
<view class="flex margin-top-xs justify-between">
<view class="text-gray">结租时间</view>
<view class="text-gray">{{item.endTime}}</view>
</view>
</view>
</view>
<view v-else>
<no-data-page></no-data-page>
</view>
</view>
</view>
</template>

<script>
const context = require("../../context/Java110Context.js");
const constant = context.constant;
import {
formatDate
} from '../../utils/DateUtil.js'
import noDataPage from '@/components/no-data-page/no-data-page.vue'
export default {
data() {
return {
parkingType: [{
"name": '正常',
"code": 1001
}, {
"name": '车位释放欠费',
"code": 2002
}, {
"name": '车位释放',
"code": 3003
}, {
"name": '预约中',
"code": 4004
}],
code: '1001',
moreParkingSpaces: [],
needFefresh: true,
parkings:[],
communityId:'',
noData: false,
page: 1,
row: 20,
ownerId: '',
userId: '',
};
},
components: {
noDataPage
},
onLoad: function(options) {
context.onLoad(options);
},
onShow: function() {
let _that = this;
if (!this.needFefresh) {
this.needFefresh = true;
return;
}
context.getOwner(function(_owner) {
_that.communityId = _owner.communityId;
_that.ownerId = _owner.memberId;
_that.userId = _owner.userId;
_that.listParkingSpace();
});
},
methods: {
listParkingSpace: function() {
context.request({
url: constant.url.queryOwnerCars,
header: context.getHeaders(),
method: "GET",
data: {
"page": this.page,
"row": this.row,
"communityId": this.communityId,
"state": this.code,
"ownerId":this.ownerId
},
success: (res) => {
let data = res.data.data;
if(data.length == 0){
this.noData = true;
}
this.parkings = data;
},
fail(res) {
wx.showToast({
title: "服务器异常了",
icon: 'none',
duration: 2000
})
}
});
},
switchParkingSpace: function(_parkingSpace) {
this.code = _parkingSpace.code;
this.noData = false;
this.listParkingSpace();
}
}
};
</script>
<style>
@import "./parkingInfo.css";
.solid-bottom::after {
border-bottom: 2upx solid rgba(0, 0, 0, 0.1);
}
.solid-top::after {
border-top: 2upx solid rgba(0, 0, 0, 0.1);
}
.margin-header-top {
height: 100upx;
}
/* #ifdef APP-PLUS || MP-WEIXIN */
.header_fixed {
position: fixed;
top: 0upx;
left: 0;
width: 100%;
z-index: 2;
}
/* #endif */
/* #ifdef H5 */
.header_fixed {
position: fixed;
top: 80upx;
left: 0;
width: 100%;
z-index: 2;
}
/* #endif */
</style>

0 comments on commit 6a0caed

Please sign in to comment.