Commit 8508ac43 authored by zhengke's avatar zhengke

w

parent df18e365
......@@ -65,7 +65,7 @@
.FweekList{
width:100%;
margin-top:5px;
padding-bottom: 5px;
padding:0 0 5px 42px;
border-bottom:1px solid #d1d1d1;
}
.FweekList:last-child{
......@@ -73,7 +73,6 @@
}
.flightChildTable{
width:100%;
text-align: center;
}
.flightChildTable td{
border: 1px solid #d1d1d1;
......@@ -93,6 +92,9 @@
background-color:#E95252;
border-color:#E95252;
}
.flightDateSearch{
margin-bottom:10px;
}
</style>
<template>
<div class="flexOne flightMg">
......@@ -108,7 +110,7 @@
<li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="resetPageIndex(),getList()" />
&nbsp;
<input type="button" class="normalBtn" :value="$t('pub.addBtn')" @click="outerVisible = true,dialogTitle='新增效期'" />
<input type="button" class="normalBtn" :value="$t('pub.addBtn')" @click="outerVisible = true,editVisible = false"/>
&nbsp;
<input type="button" class="normalBtn" value="删除" @click="PostDeleteArray()" />
</li>
......@@ -136,10 +138,10 @@
<td>
<el-row>
<el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start">
<el-button type="primary" icon="el-icon-edit" circle @click="outerVisible = true,dialogTitle='修改航班',updateData(item.ID)"></el-button>
<el-button type="primary" icon="el-icon-edit" circle @click="editVisible = true,outerVisible=false"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start">
<el-button type="primary" icon="el-icon-delete" circle @click="DeleteSingleChild(item)"></el-button>
<el-button type="danger" icon="el-icon-delete" circle @click="DeleteSingleChild(item)"></el-button>
</el-tooltip>
</el-row>
</td>
......@@ -151,35 +153,30 @@
<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>
<el-dialog custom-class='flightAddCompany' :title="dialogTitle" :visible.sync="outerVisible" center>
<el-dialog custom-class='flightAddCompany' title="新增效期" :visible.sync="outerVisible" center>
<el-form>
<table class="flightChildTable" style="border-collapse: collapse;">
<tr>
<td width="350">
<div style="float:left;margin:20px 0 20px 30px;">
<div style="margin-bottom:5px;">开始日期:<el-date-picker clearable class="w135" v-model="PostData.StartDate"
type="date" :picker-options="beforeCheck" value-format="yyyy-MM-dd" :placeholder="$t('admin.admin_choDate')"></el-date-picker>
</div>
<div>
结束日期:<el-date-picker clearable class="w135" v-model="PostData.EndDate" type="date" :picker-options="afterCheck"
<div class="flightDateSearch">
日期:<el-date-picker clearable class="w135" v-model="PostData.StartDate"
type="date" :picker-options="beforeCheck" value-format="yyyy-MM-dd" :placeholder="$t('admin.admin_choDate')"></el-date-picker> -
<el-date-picker clearable class="w135" v-model="PostData.EndDate" type="date" :picker-options="afterCheck"
value-format="yyyy-MM-dd" :placeholder="$t('admin.admin_choDate')"></el-date-picker>
</div>
</div>
<el-select v-model="PostData.UpdateType" class="w100" style="margin-top:20px;">
<el-option :value="1" label="全部"></el-option>
<el-option :value="2" label="星期"></el-option>
</el-select>
</td>
</div>
<table class="flightChildTable" style="border-collapse: collapse;text-align:left;">
<tr>
<td>
<div v-if="PostData.UpdateType==1" class="FweekList" v-for="subItem in dateObj2">
<span>{{subItem.WeekDayStr}}</span>
<el-input class="w135" v-model="subItem.CDepartTime"></el-input>
<el-input class="w135" v-model="subItem.CArrivalTime"></el-input>
<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>
<div v-if="PostData.UpdateType==2" class="FweekList" v-for="subItem in dateObj">
<el-checkbox @change='changeItem(subItem)' v-model='subItem.CheckStatus'>{{subItem.WeekDayStr}}</el-checkbox>
<el-input class="w135" v-model="subItem.CDepartTime"></el-input>
<el-input class="w135" v-model="subItem.CArrivalTime"></el-input>
<el-checkbox v-model='subItem.CheckStatus'>{{subItem.WeekDayStr}}</el-checkbox>
<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>
</td>
</tr>
......@@ -190,6 +187,32 @@
<button class="hollowFixedBtn" @click="outerVisible = false">{{$t('pub.cancelBtn')}}</button>
</div>
</el-dialog>
<el-dialog custom-class='flightAddCompany' title="修改效期" :visible.sync="editVisible" center>
<el-form>
<div class="flightDateSearch">
日期:
<el-date-picker clearable class="w135" type="date" value-format="yyyy-MM-dd" disabled :placeholder="$t('admin.admin_choDate')"></el-date-picker> -
<el-date-picker clearable class="w135" type="date" value-format="yyyy-MM-dd" disabled :placeholder="$t('admin.admin_choDate')"></el-date-picker>
</div>
<table class="flightChildTable" style="border-collapse: collapse;text-align:left;">
<tr>
<td>
<div class="FweekList">
<span>全部</span>
<el-input class="w135" onkeyup="value=value.replace(/[^\d^\:]+/g,'')"></el-input>
<el-input class="w135" onkeyup="value=value.replace(/[^\d^\:]+/g,'')"></el-input>
</div>
</td>
</tr>
</table>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="normalBtn" type="primary" @click="">{{$t('pub.saveBtn')}}</button> &nbsp;
<button class="hollowFixedBtn" @click="editVisible = false">{{$t('pub.cancelBtn')}}</button>
</div>
</el-dialog>
</div>
</template>
<script>
......@@ -198,6 +221,7 @@
return {
checked: false,
outerVisible: false,
editVisible: false,
msg: {
//请求数据参数
pageIndex: 1,
......@@ -219,7 +243,6 @@
},
//删除数组
DeleteArray: [],
dialogTitle: '',
dateObj2: [{
WeekDayStr: '全部',
WeekDay: 0,
......@@ -306,10 +329,6 @@
};
},
methods: {
changeItem(subItem)
{
subItem.CheckStatus=!subItem.CheckStatus;
},
//获取列表数据
getList() {
this.loading = true;
......@@ -335,15 +354,62 @@
},
SaveData() {
this.PostData.SubList = [];
var isSubmit = true;
if (this.PostData.UpdateType == 1) {
this.PostData.SubList.push(this.dateObj2[0]);
if(this.PostData.StartDate==''){
this.Error('请选择开始日期');
return;
}
if(this.PostData.EndDate==''){
this.Error('请选择结束日期');
return;
}
if(this.dateObj2[0].CDepartTime==''){
this.Error('请填写出发时间');
return;
}
if(this.dateObj2[0].CArrivalTime==''){
this.Error('请填写到达时间');
return;
};
} else {
this.dateObj.forEach(item => {
if (item.CheckStatus) {
this.PostData.SubList.push(item);
if(this.PostData.StartDate==''){
this.Error('请选择开始日期');
isSubmit = false;
}
if(this.PostData.EndDate==''){
this.Error('请选择结束日期');
isSubmit = false;
}
if(item.CDepartTime==''){
this.Error('请填写周'+item.WeekDayStr+'开始时间');
isSubmit = false;
}
if(item.CArrivalTime==''){
this.Error('请填写周'+item.WeekDayStr+'到达时间');
isSubmit = false;
}
}else{
if(this.PostData.StartDate==''){
this.Error('请选择开始日期');
isSubmit = false;
}
if(this.PostData.EndDate==''){
this.Error('请选择结束日期');
isSubmit = false;
}
if(this.PostData.SubList.length==0){
this.Error('请选择星期');
isSubmit = false;
}
}
});
}
if(isSubmit){
this.apipost(
"flight_get_SetFlightChild",
this.PostData,
......@@ -361,12 +427,14 @@
item.CArrivalTime = "";
});
this.getList();
this.outerVisible = false;
} else {
this.Error(res.data.message);
}
},
err => {}
);
}
},
//翻页功能按钮
handleCurrentChange(val) {
......
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