Commit 2de8851c authored by 王悦's avatar 王悦
parents 15348186 64236d34
<style>
.flightMg .flightAddCompany {
width: 900px;
.flightChild .flightAddCompany {
width: 600px;
min-height:300px;
}
.flightMg .cn_name .el-form-item:nth-child(1) {
width: 55%;
float: left;
}
.flightMg .cn_name .el-form-item:nth-child(2) {
width: 45%;
float: left;
}
.flightMg .cn_name .el-form-item:nth-child(2) .el-form-item__content {
margin: 0 !important;
}
.flightMg .cn_name .el-form-item:nth-child(2) .el-form-item__content input {
border-radius: 0;
border-top-right-radius: 17px;
border-bottom-right-radius: 17px;
}
.flightMg .flightMg .cn_name .name_input .el-form-item__content,
.cn_name .name_input .el-form-item__content .el-input input {
width: 108.5px;
}
.flightMg .el-dialog__header {
background-color: #e95252;
}
.flightMg .el-dialog__header .el-dialog__title {
color: white;
font-size: 14px;
}
.flightMg .el-dialog__header .el-dialog__close {
color: #d23131;
}
.flightMg .el-pagination {
text-align: center;
padding-top: 10px;
}
.flightMg .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #e95252;
color: #fff;
}
.flightMg_info {
margin-bottom: 0;
}
.flightMg_info_tips {
color: #999999;
font-size: 12px;
text-align: center;
}
.flightMg_delete_icon .el-input__suffix {
right: 15px;
}
.flightMg .time .el-input--prefix .el-input__inner {
padding-left: 30px;
}
.flightMg .query-box li label {
display: inline-block;
min-width: 80px;
text-align: right;
font-style: normal;
margin: 0 20px 0 0;
}
.FweekList{
.flightChild .FweekList{
width:100%;
margin-top:5px;
padding:0 0 5px 42px;
border-bottom:1px solid #d1d1d1;
border-bottom:1px dashed #d1d1d1;
}
.FweekList:last-child{
.flightChild .FweekList:last-child{
border:0;
}
.flightChildTable{
.flightChild .flightChildTable{
width:100%;
}
.flightChildTable td{
/* .flightChildTable td{
border: 1px solid #d1d1d1;
}
.flightaddICon{
float:right;
width:30px;
height:30px;
line-height: 30px;
border-radius:50%;
cursor: pointer;
border:1px solid #d1d1d1;
margin:20px 20px 0 0;
}
.flightaddICon:hover{
color:#fff;
background-color:#E95252;
border-color:#E95252;
}
.flightDateSearch{
margin-bottom:10px;
} */
.flightChild .flightDateSearch{
margin:0 0 10px 46px;
}
</style>
<template>
<div class="flexOne flightMg">
<div class="flexOne flightChild">
<div class="query-box">
<ul>
<li>
......@@ -118,7 +44,11 @@
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th width="">编号</th>
<th width="">
<label for="label" @change="getCkAll">
<input type="checkbox" id="label" v-model="ckedAll" >全选
</label>
</th>
<th width="">日期</th>
<th>航班号</th>
<th>起飞时间</th>
......@@ -128,7 +58,7 @@
<tr v-for="(item,index) in DataList" :key="index">
<td>
<label>
<input :value="item.ID" style="vertical-align: middle;" v-model="DeleteArray" type="checkbox">
<input :value="item.ID" style="vertical-align: middle;" v-model="item.checked" type="checkbox"/>
</label>
</td>
<td>{{item.FDateStr}}</td>
......@@ -169,7 +99,7 @@
<tr>
<td>
<div v-if="PostData.UpdateType==1" class="FweekList" v-for="subItem in dateObj2">
<span>{{subItem.WeekDayStr}}</span>
<span>{{subItem.WeekDayStr}}</span>
<el-input class="w135" v-model="subItem.CDepartTime" onkeyup="value=value.replace(/[^\d^\:]+/g,'')"></el-input>
<el-input class="w135" v-model="subItem.CArrivalTime" onkeyup="value=value.replace(/[^\d^\:]+/g,'')"></el-input>
</div>
......@@ -190,13 +120,11 @@
<el-dialog custom-class='flightAddCompany' title="修改效期" :visible.sync="editVisible" center>
<el-form>
<div class="flightDateSearch">
日期:{{UpdateMsg.FDate}}
</div>
<table class="flightChildTable" style="border-collapse: collapse;text-align:left;">
<tr>
<td width="140">日期&nbsp;{{UpdateMsg.FDate}}</td>
<td>
<div class="FweekList">
<div class="FweekList" style="padding-left:0;">
<el-input class="w135" onkeyup="value=value.replace(/[^\d^\:]+/g,'')" v-model="UpdateMsg.CDepartTime"></el-input>
<el-input class="w135" onkeyup="value=value.replace(/[^\d^\:]+/g,'')" v-model="UpdateMsg.CArrivalTime"></el-input>
</div>
......@@ -219,6 +147,7 @@
checked: false,
outerVisible: false,
editVisible: false,
ckedAll:false,
msg: {
//请求数据参数
pageIndex: 1,
......@@ -344,6 +273,9 @@
this.msg.total = res.data.data.count;
this.noData = !this.msg.total > 0;
this.DataList = res.data.data.pageData;
this.DataList.forEach(x=>{
x.checked=false;
})
} else {
this.Error(res.data.message);
}
......@@ -351,6 +283,19 @@
err => {}
);
},
//点击全选
getCkAll(){
var that=this;
if(that.ckedAll){
this.DataList.forEach(x=>{
x.checked = true;
})
}else{
this.DataList.forEach(x=>{
x.checked = false;
})
}
},
//提交创建、修改表单
submitForm(addMsg) {
this.SaveData();
......@@ -449,15 +394,41 @@
this.msg.pageIndex = 1;
this.msg.currentPage = 1;
},
//单独删除
DeleteSingleChild(item) {
this.DeleteArray = [];
this.DeleteArray.push(item.ID);
this.PostDeleteArray();
var that = this;
var DeleteArray = [];
DeleteArray.push(item.ID);
that.Confirm("是否删除", function () {
that.apipost(
"flight_get_RemoveFlightChild",
DeleteArray,
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
err => {}
);
});
},
//删除数组
//批量或者勾选删除
PostDeleteArray() {
var that = this;
this.Confirm("是否删除", function () {
that.DeleteArray = [];
that.DataList.forEach(item=>{
if(item.checked){
that.DeleteArray.push(item.ID);
}
})
if(that.DeleteArray.length==0){
this.Error('请勾选删除项');
return;
}
that.Confirm("是否删除", function () {
that.apipost(
"flight_get_RemoveFlightChild",
that.DeleteArray,
......@@ -466,6 +437,7 @@
that.Success(res.data.message);
that.getList();
that.DeleteArray = [];
that.ckedAll=false;
} else {
that.Error(res.data.message);
}
......
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