Commit eaa60976 authored by 黄奎's avatar 黄奎

新增停车场管理页面

parent ff61f631
<template>
<div>
<div class="query-box" style="border-bottom: none;">
<ul>
<li><span>
<em>停车场</em>
<el-input maxlength="50" v-model="msg.ParkName" class="permiss-input w150"
@keyup.native.enter="getList();resetPageIndex()" placeholder="停车场"></el-input>
</span>
</li>
<li>
<input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()" />
<input type="button" class="normalBtn" value="新增" @click="IsShow=true" />
</li>
</ul>
</div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; " class="ownScrollbarStyle">
<table style="width: 100%;" border="0" cellspacing="1" cellpadding="0" class="busManagerTalbe"
v-loading='msg.loading'>
<tr>
<th width="5%">序号</th>
<th width="5%">停车场名称/停车场地址</th>
<th width="10%">地区</th>
<th width="10%">总库存/使用库存/剩余库存</th>
<th width="10%">操作人</th>
<th width="10%">操作</th>
</tr>
<tr v-for="(item,index) in DataList">
<td>
{{item.Id}}
</td>
<td style="text-align:left">
{{item.ParkName}}
<br />
{{item.Address}}
</td>
<td>
{{item.CountryName}}-{{item.ProvinceName}}-{{item.CityName}}-{{item.DistrictName}}
</td>
<td>
{{item.StockNum}}/{{item.UseNum}}/{{item.ShengYu}}
</td>
<td>
{{item.CreatyByName}}
<br />
{{item.UpdateDateStr}}
</td>
<td>
<a style="cursor:pointer;" @click="IsShow=true,GetPark(item.Id)">修改</a>
<a style="cursor:pointer;" @click="delPark(item.Id)">删除</a>
</td>
</tr>
</table>
</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="msg.total"></el-pagination>
<div class="combottomDiv" v-if="IsShow">
<el-row>
<el-col :span="18">
<div class="combottomTitle">停车场管理</div>
</el-col>
<el-col :span="4" class="Bus_BtnList">
<input type="button" class="hollowFixedBtn" @click="IsShow=false" value="取消" />
<input type="button" class="normalBtn" value="保存" @click="SaveData()" />
</el-col>
</el-row>
<el-form label-width="100px">
<el-col :span="5">
<el-form-item label="停车场">
<el-input v-model="PostMsg.ParkName"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="国家">
<el-input v-model="PostMsg.Country"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="省份">
<el-input v-model="PostMsg.Province"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="城市">
<el-input v-model="PostMsg.City"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="详细地址">
<el-input v-model="PostMsg.Address"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="经度">
<el-input v-model="PostMsg.Lng"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="纬度">
<el-input v-model="PostMsg.Lat"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="库存数量">
<el-input v-model="PostMsg.StockNum"></el-input>
</el-form-item>
</el-col>
</el-form>
</div>
</div>
</template>
<script>
export default {
data() {
return {
msg: {
ParkName: "",
pageIndex: 1,
pageSize: 15,
loading: false,
currentPage: 1,
total: 0,
},
DataList: [],
IsShow: false,
PostMsg: {
Id: 0,
ParkName: "",
Country: 0,
Province: 0,
City: 0,
District: 0,
Address: "",
Lng: "",
Lat: "",
StockNum: 0,
}
}
},
methods: {
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.msg.currentPage = 1;
},
getList() {
this.msg.loading = true;
this.apipost('buspark_get_GetPageList', this.msg, res => {
this.msg.loading = false;
if (res.data.resultCode == 1) {
this.msg.total = res.data.data.count;
this.DataList = res.data.data.pageData;
} else {
this.$message.error(res.data.message)
}
}, err => {})
},
GetPark(Id) {
this.apipost('buspark_get_GetPark', {
ID: Id
}, res => {
if (res.data.resultCode == 1) {
this.PostMsg = res.data.data;
} else {
this.$message.error(res.data.message)
}
}, err => {})
},
SaveData() {
this.apipost('buspark_post_SetPark', this.PostMsg, res => {
if (res.data.resultCode == 1) {
this.IsShow = false;
this.Success(res.data.message);
this.PostMsg.Id = 0;
this.PostMsg.ParkName = "";
this.PostMsg.Country = 0;
this.PostMsg.Province = 0;
this.PostMsg.City = 0;
this.PostMsg.District = 0;
this.PostMsg.Address = "";
this.PostMsg.Lng = "";
this.PostMsg.Lat = "";
this.PostMsg.StockNum = 0;
this.getList();
} else {
this.$message.error(res.data.message)
}
}, err => {})
},
//删除停车场
delPark(Id) {
if (Id > 0) {
var that = this;
this.Confirm("是否删除?", function () {
var msg = {
ID: Id
};
that.apipost("buspark_post_RemovePark", msg,
res => {
if (res.data.resultCode == 1) {
that.Success('删除成功!');
that.getList();
} else {
that.Error(res.data.data);
}
}, null);
});
}
},
},
mounted() {
this.getList();
}
}
</script>
<style>
.busManagerTalbe {
background: #ccc;
}
.busManagerTalbe tr th {
background: #E6E6E6;
height: 40px;
font-size: 12px;
color: #333;
}
.busManagerTalbe tr {
background: #fff;
text-align: center;
height: 40px;
}
.busManagerTalbe tr:nth-child(2n+1) {
background: #fafafa;
}
.busManagerTalbe tr td {
font-size: 12px;
}
.busManagerTalbe tr td .pDateStyle {
border-bottom: 1px solid #ccc;
min-height: 24px;
line-height: 24px;
margin-top: 0;
box-sizing: content-box;
padding: 0 10px;
}
.busManagerTalbe tr td .pDateStyle:last-child {
border-bottom: none;
}
.busManagerTalbe tr td .link p:hover {
text-decoration: underline;
cursor: pointer;
}
.busManagerTalbe tr td .link span:hover {
text-decoration: underline;
cursor: pointer;
}
.busStatistics_tripDetails {
padding: 0;
box-shadow: 0px 1px 3px 0px #dedede;
max-height: 400px;
overflow-y: auto;
}
.busStatistics_tripDetails .popper__arrow::after {
border-bottom-color: #ededed !important;
}
.busStatistics_tripDetails table {
padding: 10px 0 0 20px;
background-color: #ededed;
border-collapse: collapse;
border: 1px solid #d2d2d2;
font-size: 12px;
}
.busStatistics_tripDetails table th {
background-color: #ededed;
padding: 5px;
}
.busStatistics_tripDetails table td {
background-color: #ffffff;
padding: 9px 15px;
color: #333333;
border: 1px solid #d2d2d2;
}
.busStatistics_tripDetails table td._d_name {
background-color: #ededed;
}
.busStatistics_tripDetails table ._color_666 {
color: #666666;
}
.busStatistics_tripDetails table tr._color_666 th {
padding: 9px 15px;
}
</style>
...@@ -1369,7 +1369,16 @@ export default { ...@@ -1369,7 +1369,16 @@ export default {
meta: { meta: {
title: '车资分摊管理' title: '车资分摊管理'
}, },
}, { },
, {
path: '/busStockManager',
name: 'busStockManager',
component: resolve => require(['@/components/busManagement/busStockManager'], resolve),
meta: {
title: '停车场管理'
},
},
{
path: '/visaList', //签证列表 path: '/visaList', //签证列表
name: 'visaList', name: 'visaList',
component: resolve => require(['@/components/VisaCenter/visaList'], resolve), component: resolve => require(['@/components/VisaCenter/visaList'], resolve),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment