| | |
| | | <div style="padding: 10px 10px 0px 10px;"> |
| | | <el-form :inline="true" :model="searchForm"> |
| | | <el-form-item label="车牌号"> |
| | | <el-input v-model="searchForm.carNo"></el-input> |
| | | <el-input v-model="searchForm.carNo" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="类型"> |
| | | <el-select v-model="searchForm.type" placeholder="请选择" clearable> |
| | | <el-option label="永久" :value="0"></el-option> |
| | | <el-option label="月票" :value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="选择结束时间"> |
| | | <div class="date-box"> |
| | | <el-date-picker type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" |
| | | v-model="searchForm.date" placeholder="" clearable> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="small" @click="onSearch" icon="el-icon-search">查询</el-button> |
| | | <el-button type="primary" size="small" @click="onAdd" icon="el-icon-plus">增加</el-button> |
| | |
| | | </el-form> |
| | | </div> |
| | | |
| | | <el-table :data="pageData.rows" v-loading="pageData.isLoading" border style="width:100%;border:1px solid #bcbec2;"> |
| | | <el-table :height="tableHeight" :data="pageData.rows" v-loading="pageData.isLoading" border style="width:100%;border:1px solid #bcbec2;"> |
| | | <el-table-column type="index" width="50" label="序号" align="center"> </el-table-column> |
| | | <el-table-column prop="carNo" label="车牌号" align="center" width="150"></el-table-column> |
| | | <el-table-column prop="type" label="类型" align="center" width="100"> |
| | |
| | | <el-form-item label="月票结束日期" prop="endTime" v-if="flag2"> |
| | | <el-date-picker placeholder="选择时间" v-model="formData.endTime"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="停车场" prop="parkId" v-if="flag2"> |
| | | <el-select v-model="formData.parkId"> |
| | | <el-form-item label="停车场" prop="parkIds" v-if="flag2"> |
| | | <el-select v-model="ids" multiple clearable> |
| | | <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | flag:false, |
| | | flag2:false, |
| | | searchForm: { |
| | | name: '' |
| | | name: '', |
| | | carNo:'', |
| | | type:null, |
| | | date: null |
| | | }, |
| | | pageData: this.$byutil.defaultPageData(), |
| | | formData: { |
| | |
| | | type: 0, |
| | | endTime: '', |
| | | startTime: '', |
| | | parkId:null |
| | | parkIds: null, |
| | | name: '', |
| | | }, |
| | | urlPath:this.$systemconfig.basePath + '/whiteList/', |
| | | ids:[], |
| | | urlPath:this.$systemconfig.basePath + '/ffzf/whiteList/', |
| | | table1:[], |
| | | tableHeight:500, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.loadData(); |
| | | this.$byutil.postData(this, this.$systemconfig.basePath+'/park/findAll', this.formData, res => { |
| | | this.table1 = res.obj; |
| | | this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => { |
| | | this.table1 = res.data; |
| | | }) |
| | | this.tableHeight = window.innerHeight - 260 |
| | | }, |
| | | methods: { |
| | | selectChange(value){ |
| | |
| | | onSave(){ |
| | | this.$refs['formData'].validate((valid) => { |
| | | if (valid) { |
| | | this.formData.parkIds = this.ids.join(",") |
| | | this.$byutil.postData(this, this.urlPath+'save', this.formData, res => { |
| | | this.$refs['formData'].resetFields(); |
| | | this.flag=false; |
| | | this.$message({message: res.message, type: 'success'}); |
| | | this.$message({message:'保存成功', type: 'success'}); |
| | | this.loadData(); |
| | | }) |
| | | } else { |
| | |
| | | }); |
| | | }, |
| | | loadData() { |
| | | this.$byutil.loadPageData(this, this.urlPath+'findPage', this.searchForm); |
| | | this.$byutil.loadPageData(this, this.urlPath+'findPageNew', this.searchForm); |
| | | }, |
| | | onSearch() { |
| | | this.pageData = this.$byutil.defaultPageData(); |
| | |
| | | }, |
| | | onAdd() { |
| | | this.flag=true; |
| | | this.flag2=false; |
| | | this.$refs['formData'].resetFields(); |
| | | this.formData = { |
| | | carNo: '', |
| | | type: 0, |
| | | endTime: '', |
| | | startTime: '', |
| | | parkId:null |
| | | parkIds: null |
| | | } |
| | | }, |
| | | onEdit(row) { |
| | | this.flag=true; |
| | | this.ids = [] |
| | | this.formData = row; |
| | | if(row.type==1){ |
| | | this.flag2=true; |
| | | this.ids = this.formData.parkIds.split(",") |
| | | this.ids = this.ids.map(function(data){ |
| | | return +data; |
| | | }); |
| | | this.flag2=true; |
| | | } |
| | | }, |
| | | onDelete(row) { |
| | | this.$byutil.deleteData(this,this.urlPath+"delete",{id:row.id}, res => { |
| | | this.$message({message: res.message, type: 'success'}); |
| | | this.$message({message: '删除成功', type: 'success'}); |
| | | this.loadData(); |
| | | }) |
| | | }, |
| | |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | </style> |