Commit e744f93a authored by zhengke's avatar zhengke

修改停车场

parent 5b819837
<template> <template>
<div> <div class="busStockManager">
<div class="query-box" style="border-bottom: none;"> <div class="query-box" style="border-bottom: none;">
<ul> <ul>
<li><span> <li><span>
...@@ -8,6 +8,25 @@ ...@@ -8,6 +8,25 @@
@keyup.native.enter="getList();resetPageIndex()" placeholder="停车场"></el-input> @keyup.native.enter="getList();resetPageIndex()" placeholder="停车场"></el-input>
</span> </span>
</li> </li>
<li>
<span>
<em>{{$t('system.quety_area')}}</em>
<el-select v-model="msg.Country" clearable class="w150" filterable @change="getProvinceList(msg.Country,1)"
:placeholder="$t('hotel.hotel_country')">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in countryList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
<el-select v-model="msg.Province" class="w150" filterable @change="getProvinceList(msg.Province,2)"
:placeholder="$t('hotel.hotel_province')">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in provinceList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
<el-select v-model="msg.City" class="w150" filterable :placeholder="$t('hotel.hotel_city')">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in cityList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</span>
</li>
<li> <li>
<input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()" /> <input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()" />
<input type="button" class="normalBtn" value="新增" @click="IsShow=true" /> <input type="button" class="normalBtn" value="新增" @click="IsShow=true" />
...@@ -30,7 +49,7 @@ ...@@ -30,7 +49,7 @@
<td> <td>
{{item.Id}} {{item.Id}}
</td> </td>
<td style="text-align:left"> <td style="text-align:left;padding:0 20px;">
{{item.ParkName}} {{item.ParkName}}
<br /> <br />
{{item.Address}} {{item.Address}}
...@@ -47,12 +66,22 @@ ...@@ -47,12 +66,22 @@
{{item.UpdateDateStr}} {{item.UpdateDateStr}}
</td> </td>
<td> <td>
<a style="cursor:pointer;" @click="IsShow=true,GetPark(item.Id)">修改</a> <el-tooltip class="item" effect="dark" content="修改" placement="top-start">
<a style="cursor:pointer;" @click="delPark(item.Id)">删除</a> <el-button type="primary" icon="el-icon-edit" @click="IsShow=true,GetPark(item.Id)" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button type="danger" icon="el-icon-delete"
@click="delPark(item.Id)" circle></el-button>
</el-tooltip>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<div class="noDataNotice" v-if="!DataList||DataList.length==0">
<i class="iconfont icon-kong"></i>
<p>没有找到你需要的数据</p>
</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage" <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> layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="msg.total"></el-pagination>
...@@ -70,44 +99,55 @@ ...@@ -70,44 +99,55 @@
<el-col :span="5"> <el-col :span="5">
<el-form-item label="停车场"> <el-form-item label="停车场">
<el-input v-model="PostMsg.ParkName"></el-input> <el-input v-model="PostMsg.ParkName" class="w210"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="国家"> <el-form-item label="国家">
<el-input v-model="PostMsg.Country"></el-input> <el-select v-model="PostMsg.Country" clearable class="w210" filterable @change="getAddProvince(PostMsg.Country,1)"
:placeholder="$t('hotel.hotel_country')">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in countryList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="省份"> <el-form-item label="省份">
<el-input v-model="PostMsg.Province"></el-input> <el-select v-model="PostMsg.Province" filterable class="w210" @change="getAddProvince(PostMsg.Province,2)"
:placeholder="$t('hotel.hotel_province')">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in provinceList2" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="城市"> <el-form-item label="城市">
<el-input v-model="PostMsg.City"></el-input> <el-select v-model="PostMsg.City" filterable class="w210" :placeholder="$t('hotel.hotel_city')">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in cityList2" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="详细地址"> <el-form-item label="详细地址">
<el-input v-model="PostMsg.Address"></el-input> <el-input v-model="PostMsg.Address" class="w210"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="经度"> <el-form-item label="经度">
<el-input v-model="PostMsg.Lng"></el-input> <el-input v-model="PostMsg.Lng" class="w210"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="纬度"> <el-form-item label="纬度">
<el-input v-model="PostMsg.Lat"></el-input> <el-input v-model="PostMsg.Lat" class="w210"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="库存数量"> <el-form-item label="库存数量">
<el-input v-model="PostMsg.StockNum"></el-input> <el-input v-model="PostMsg.StockNum" @keyup.native="checkInteger(PostMsg,'StockNum')" class="w210"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
...@@ -142,7 +182,13 @@ ...@@ -142,7 +182,13 @@
Lng: "", Lng: "",
Lat: "", Lat: "",
StockNum: 0, StockNum: 0,
} },
countryList:[],
provinceList:[],
cityList:[],
provinceList2:[],
cityList2:[]
} }
}, },
methods: { methods: {
...@@ -172,6 +218,13 @@ ...@@ -172,6 +218,13 @@
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.PostMsg = res.data.data; this.PostMsg = res.data.data;
console.log(this.PostMsg);
if(this.PostMsg.Country>0){
this.getPrivince(this.PostMsg.Country,1);
}
if(this.PostMsg.Province>0){
this.getPrivince(this.PostMsg.Province,2);
}
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
...@@ -218,8 +271,89 @@ ...@@ -218,8 +271,89 @@
}); });
} }
}, },
//获取国家
getCountryList() {
this.apipost(
"dict_post_Destination_GetCountry", {},
res => {
this.countryList = res.data.data;
},
err => {}
);
},
getProvinceList(ID, type) {
//根据省份获取城市
let msg = {
Id: ID
};
if (type == 1) {
this.msg.Province = "";
this.msg.City = "";
} else if (type == 2) {
this.msg.City = "";
}
if (this.msg.Country !== "") {
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList = res.data.data;
} else if (type == 2) {
this.cityList = res.data.data;
}
},
err => {}
);
}
},
getAddProvince(ID, type) {
//根据省份获取城市
let msg = {
Id: ID
};
if (type == 1) {
this.PostMsg.Province = "";
this.PostMsg.City = "";
} else if (type == 2) {
this.PostMsg.City = "";
}
if (this.PostMsg.Country !== "") {
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList2 = res.data.data;
} else if (type == 2) {
this.cityList2 = res.data.data;
}
},
err => {}
);
}
},
//初始化对应下拉
getPrivince(ID,type){
let msg = {
Id: ID
};
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList2 = res.data.data;
} else if (type == 2) {
this.cityList2 = res.data.data;
}
},
err => {}
);
}
}, },
mounted() { mounted() {
this.getCountryList();
this.getList(); this.getList();
} }
} }
...@@ -275,47 +409,10 @@ ...@@ -275,47 +409,10 @@
cursor: pointer; cursor: pointer;
} }
.busStatistics_tripDetails { .busStockManager .w150 .el-input{
padding: 0; width:150px;
box-shadow: 0px 1px 3px 0px #dedede;
max-height: 400px;
overflow-y: auto;
}
.busStatistics_tripDetails .popper__arrow::after {
border-bottom-color: #ededed !important;
} }
.busStockManager .el-button.is-circle{
.busStatistics_tripDetails table { padding:5px;
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> </style>
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