车位申请及结果展示

This commit is contained in:
shane 2021-10-19 00:11:49 +08:00
parent 53eb18ce18
commit 6120c14a7b
6 changed files with 44 additions and 83 deletions

View File

@ -11,7 +11,7 @@ class AppConstant {
* 应用信息主要是用来和后端服务交互时的时候用
*/
// #ifdef MP-WEIXIN
static appId = "992019111758490006";
static appId = "992020061452450002";
static appSecurity = "";
// #endif

View File

@ -154,9 +154,9 @@ const queryRentingPool= baseUrl + 'app/renting/queryRentingPool'; //查询房源
const queryParkingSpaces= baseUrl + 'app/parkingSpace.queryParkingSpaces'; //查询空闲车位
const saveOwnerCar= baseUrl + 'app/owner.saveOwnerCar'; //申请车位接口
const saveOwnerCar= baseUrl + 'app/parkingSpaceApply.saveParkingSpaceApply'; //申请车位接口owner.saveOwnerCar原来的
const queryOwnerCars= baseUrl + 'app/owner.queryOwnerCars'; //查询业主车辆
const queryOwnerCars= baseUrl + 'app/parkingSpaceApply.listParkingSpaceApply'; //查询业主车辆
// 查询申请类型(空置房)
const queryApplyRoomDiscountType = baseUrl + 'app/applyRoomDiscount/queryApplyRoomDiscountType';
// 提交申请

View File

@ -110,7 +110,7 @@ export default {
saveApplyRoomDiscount: baseUrl + "app/applyRoomDiscount/saveApplyRoomDiscount",
openDoor: baseUrl + "app/machine/openDoor",
getQrCode: baseUrl + "app/machine/getQRcode",
queryOwnerCars: baseUrl + "app/owner.queryOwnerCars",
queryOwnerCars: baseUrl + "app/parkingSpaceApply.listParkingSpaceApply",
saveRoomRenovation: baseUrl + "app/roomRenovation/saveRoomRenovation",
queryRoomRenovation: baseUrl + "app/roomRenovation/queryRoomRenovation",
updateRoomRenovationState: baseUrl + "app/roomRenovation/updateRoomRenovationState",

View File

@ -1,6 +1,6 @@
{
"name" : "益掌通",
"appid" : "__UNI__18DB294",
"appid" : "__UNI__B2311EC",
"description" : "hc智慧家园小程序 是 HC小区开源项目的一个分支项目主要给业主使用其中包括缴物业费缴停车费投诉建议家庭成员维护房屋保修\r 房屋出租,公告查看,小区圈等功能。",
"versionName" : "1.0.0",
"versionCode" : "100",

View File

@ -1,13 +1,5 @@
<template>
<view>
<view class="cu-form-group">
<view class="title">空闲车位</view>
<picker bindchange="PickerChange" :value="index" :range="parkingSpaces" @change="choosePickerSpace">
<view class="picker">
{{parkingSpacesName?parkingSpacesName:'请选择'}}
</view>
</picker>
</view>
<view class="cu-form-group">
<view class="title">车牌号</view>
<input v-model="carNum" style="text-align:right"></input>
@ -29,18 +21,7 @@
</view>
</picker>
</view>
<view class="cu-form-group">
<view class="title">租用类型</view>
<picker bindchange="PickerChange" disabled="disabled" :value="index" :range="rentTypes" @change="chooseRentTypes">
<view class="picker">
{{rentTypeName?rentTypeName:'请选择'}}
</view>
</picker>
</view>
<view class="cu-form-group" v-if="rentTypeCode == 'S'">
<view class="title">起租日期</view>
<picker mode="date" :value="startDate" @change="startDateChange">
<view class="picker">
@ -49,7 +30,7 @@
</picker>
</view>
<view class="cu-form-group" v-if="rentTypeCode == 'S'">
<view class="cu-form-group">
<view class="title">结组日期</view>
<picker mode="date" :value="endDate" @change="endDateChange">
<view class="picker">
@ -94,22 +75,17 @@
ownerId:'',
storeId:'',
userId:'',
applyPersonName:'',
applyPersonLink:'',
applyPersonId:'',
parkingSpaces: [],
parkingSpaceIds: [],
parkingSpacesName: '',
//
carTypes: ['家用小汽车', '客车', '货车'],
carTypeCodes: ['9901', '9902', '9903'],
carTypeCode: '',
carTypeName: '',
rentTypes: ['出售车辆', '月租车'],
rentTypeCodes: ['H', 'S'],
rentTypeCode: 'S',
rentTypeName: '月租车',
page: 1,
row: 20,
@ -118,20 +94,21 @@
onLoad: function(options) {
let _this = this;
context.getOwner(function(_owner) {
console.log("_owner",_owner);
_this.communityId = _owner.communityId;
_this.ownerId = _owner.memberId;
_this.userId = _owner.userId;
_this.applyPersonName = _owner.appUserName;
_this.applyPersonLink = _owner.link;
_this.applyPersonId = _owner.userId;
_this.listParkingSpace();
});
let param = {
"communityId":_this.communityId
}
getProperty().then(function(res){
_this.storeId = res.storeId
});
},
methods: {
listParkingSpace: function() {
context.request({
url: constant.url.queryParkingSpaces,
@ -165,7 +142,7 @@
this.parkingSpacesName = this.parkingSpaces[checkInIndex];
},
endDateChange: function(e) {
this.endate = e.detail.value
this.endDate = e.detail.value
},
//
chooseCarTypes: function(e) {
@ -173,18 +150,13 @@
this.carTypeCode = this.carTypeCodes[index];
this.carTypeName = this.carTypes[index];
},
chooseRentTypes: function(e) {
let index = e.target.value;
this.rentTypeCode = this.rentTypeCodes[index];
this.rentTypeName = this.rentTypes[index];
},
startDateChange: function(e) {
this.startDate = e.detail.value
console.log(this.startDate);
},
submitApply:function(){
let obj = {
"psId": this.psId,
"carNum": this.carNum,
"carBrand": this.carBrand,
"carColor": this.carColor,
@ -192,19 +164,18 @@
"startTime": this.startDate,
"endTime": this.endDate,
"carType":this.carTypeCode,
"carNumType":this.rentTypeCode,
"communityId":this.communityId,
"ownerId":this.ownerId,
"storeId":this.storeId,
"state":"1001",
"applyPersonName":this.applyPersonName,
"applyPersonLink":this.applyPersonLink,
"applyPersonId":this.applyPersonId,
"userId":this.userId
};
let msg = "";
if (obj.psId == "") {
msg = "请选择空闲车位";
} else if (obj.carNum == "") {
if (obj.carNum == "") {
msg = "请填写车牌号";
} else if (obj.carBrand == "") {
msg = "请填写车辆品牌";
@ -212,26 +183,13 @@
msg = "请填写车辆颜色";
}else if(obj.carType == ""){
msg = "请选择车辆类型";
}else if(obj.carNumType == ''){
msg = "请选择租用类型";
}
if(obj.rentTypeCode == 'S'){
if(obj.startTime == '2020-01-01'){
msg = "请选择租用开始日期";
}
if(obj.endTime == '2020-01-01'){
msg = "请选择租用结束日期";
}
if(obj.startTime == '2020-01-01'){
msg = "请选择起租日期";
}
if(obj.rentTypeCode == 'H'){
obj.startTime = '';
obj.endTime = '';
if(obj.endTime == '2020-01-01'){
msg = "请选择结租日期";
}
if(msg != ""){
wx.showToast({
title: msg,
@ -241,7 +199,6 @@
return;
}
context.request({
url: constant.url.saveOwnerCar,
header: context.getHeaders(),
@ -249,13 +206,18 @@
data: obj,
success: function(res) {
let _json = res.data;
if (_json.code == 0) {
wx.showToast({
title: "提交成功",
title: "提交成功,可到 我的-生活服务-车位信息 中查看进度",
icon: 'none',
duration: 2000
duration: 5000,
success: function() {
setTimeout(function() {
uni.navigateBack({})
}, 5000) //
},
})
uni.navigateBack({})
// wx.redirectTo({
// url: '/pages/complaintList/complaintList',
// });

View File

@ -11,18 +11,13 @@
</view>
</scroll-view>
</view>
<view v-if="noData == false">
<view v-if="noData == false" style="margin-top: 100upx;">
<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 v-if="item.areaNum != null" 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>
@ -39,6 +34,10 @@
<view class="text-gray">结租时间</view>
<view class="text-gray">{{item.endTime}}</view>
</view>
<view class="flex margin-top-xs justify-between">
<view class="text-gray">备注</view>
<view class="text-gray">{{item.remark}}</view>
</view>
</view>
</view>
<view v-else>
@ -62,16 +61,16 @@
data() {
return {
parkingType: [{
"name": '正常',
"name": '待审核',
"code": 1001
}, {
"name": '车位释放欠费',
"name": '待缴费',
"code": 2002
}, {
"name": '车位释放',
"name": '完成',
"code": 3003
}, {
"name": '预约中',
"name": '申请失败',
"code": 4004
}],
code: '1001',