优化停车位信息

This commit is contained in:
java110 2020-08-28 16:29:50 +08:00
parent a7c7bce738
commit 1b807f53f9
6 changed files with 298 additions and 5 deletions

8
app.js
View File

@ -34,10 +34,10 @@ let opts = {
//app.use('/callComponent',proxy('https://app.demo.winqi.cn/',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012/',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
//app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
//app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
app.use('/app',proxy('http://192.168.1.16:8012',opts));
//app.listen(3000);
app.use(express.json());

View File

@ -0,0 +1,19 @@
<div class="modal fade" id="deleteOwnerCarModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">请确认您的操作!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<tr align="center"><th>确认是否删除!</th></tr>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" >点错了</button>
<button type="button" class="btn btn-primary" v-on:click="deleteOwnerCar()">确认删除</button>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,44 @@
(function(vc){
vc.extends({
propTypes: {
notifyLoadDataComponentName:vc.propTypes.string
},
data:{
deleteOwnerCarInfo:{}
},
_initEvent:function(){
vc.on('deleteOwnerCar','openOwnerCarModel',function(_ownerInfo){
vc.component.deleteOwnerCarInfo = _ownerInfo;
$('#deleteOwnerCarModel').modal('show');
});
},
methods:{
closedeleteOwnerCarModel:function(){
$('#deleteOwnerCarModel').modal('hide');
},
deleteOwnerCar:function(){
vc.component.deleteOwnerCarInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.apiPost(
'owner.deleteOwnerCars',
JSON.stringify(vc.component.deleteOwnerCarInfo),
{
emulateJSON:true
},
function(json,res){
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if(res.status == 200){
//关闭model
$('#deleteOwnerCarModel').modal('hide');
vc.emit($props.notifyLoadDataComponentName,'listOwnerCarData',{});
return ;
}
vc.component.deleteOwnerCarnfo.errorInfo = json;
},
function(errInfo,error){
vc.toast(errInfo);
// vc.component.deleteOwnerCarnfo.errorInfo = errInfo;
});
}
}
});
})(window.vc);

View File

@ -0,0 +1,151 @@
<div>
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>查询条件</h5>
<div class="ibox-tools" style="top:10px;">
<!-- <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
v-on:click="_moreCondition()">{{listOwnerCarInfo.moreCondition == true?'隐藏':'更多'}}
</button> -->
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group input-group">
<input type="text" placeholder="请输入车牌号" v-model="listOwnerCarInfo.conditions.carNum"
class="form-control">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请填写车位编号" class=" form-control"
v-model="listOwnerCarInfo.num">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<select class="custom-select" v-model="listOwnerCarInfo.conditions.state">
<option selected value="">必填,请选择车位状态</option>
<option value="1001">正常</option>
<option value="2002">欠费状态</option>
<option value="3003">车位释放</option>
</select>
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryMethod()"><i
class="fa fa-search"></i> 查询
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>车辆信息</h5>
<div class="ibox-tools" style="top:10px;">
<form>
<div class="form-row">
<div class="col">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_openAddParkingSpaceModal(-1)">
<i class="fa fa-plus"></i>
添加
</button>
</div>
</div>
</form>
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th>车牌号</th>
<th data-hide="phone">车辆品牌</th>
<th data-hide="phone">车辆类型</th>
<th data-hide="phone">颜色</th>
<th data-hide="phone">业主</th>
<th data-hide="phone">车位</th>
<th data-hide="phone">起租时间</th>
<th data-hide="phone">截止时间</th>
<th data-hide="phone">状态</th>
<th class="text-right">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="car in listOwnerCarInfo.ownerCars">
<td>
{{car.carNum}}
</td>
<td>
{{car.carBrand}}
</td>
<td>
{{car.carType}}
</td>
<td>
{{car.carColor}}
</td>
<td>
{{car.ownerName}}({{car.link}})
</td>
<td v-if="car.areaNum">
{{car.areaNum}}车场{{car.num}}车位
</td>
<td v-else>
</td>
<td>
{{car.startTime}}
</td>
<td>
{{car.endTime}}
</td>
<td>
{{car.state}}
</td>
<td class="text-right">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openEditParkingSpaceModel(car)">修改</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDelOwnerCarModel(car)">删除</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
<vc:create path="property/addParkingSpace" notifyLoadDataComponentName="lisOwnerCar"></vc:create>
<vc:create path="property/editParkingSpace" notifyLoadDataComponentName="lisOwnerCar"></vc:create>
<vc:create path="property/deleteOwnerCar" notifyLoadDataComponentName="lisOwnerCar"></vc:create>
</div>

View File

@ -0,0 +1,79 @@
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
listOwnerCarInfo: {
ownerCars: [],
total: 0,
records: 1,
num: '',
moreCondition: false,
conditions: {
carNum: '',
num: '',
state:''
}
}
},
_initMethod: function () {
$that._listOwnerCar(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('lisOwnerCar', 'listOwnerCarData', function () {
$that._listOwnerCar(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
$that._listOwnerCar(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listOwnerCar: function (_page, _row) {
var param = {
params: {
page: _page,
row: _row,
communityId: vc.getCurrentCommunity().communityId,
}
}
//发送get请求
vc.http.apiGet('owner.queryOwnerCars',
param,
function (json, res) {
var _json = JSON.parse(json);
$that.listOwnerCarInfo.total = _json.total;
$that.listOwnerCarInfo.records = _json.records;
$that.listOwnerCarInfo.ownerCars = _json.data;
vc.emit('pagination', 'init', {
total: $that.listOwnerCarInfo.records,
dataCount: $that.listOwnerCarInfo.total,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openToHireParkingSpaceModel:function(_parkingSpace){ //出租
vc.jumpToPage('/admin.html#/pages/property/hireParkingSpace?'+vc.objToGetParam(_parkingSpace));
},
_queryMethod: function () {
$that._listOwnerCar(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if ($that.listOwnerCarInfo.moreCondition) {
$that.listOwnerCarInfo.moreCondition = false;
} else {
$that.listOwnerCarInfo.moreCondition = true;
}
},
_openDelOwnerCarModel:function(_car){
vc.emit('deleteOwnerCar','openOwnerCarModel',_car);
},
}
})
})(window.vc);

View File

@ -29,7 +29,7 @@
<th class="text-center">费用类型</th>
<th class="text-center">房屋面积</th>
<th class="text-center">单价</th>
<th class="text-center">附加费</th>
<th class="text-center">附加费/固定费</th>
<th class="text-center">应收金额</th>
<th class="text-center">建账时间</th>
<th class="text-center">计费起始时间</th>