Commit 55f322f1 authored by 黄奎's avatar 黄奎

航班修改

parent 570ad2e9
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<li> <li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="resetPageIndex(),getList()" /> <input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="resetPageIndex(),getList()" />
&nbsp; &nbsp;
<input type="button" class="normalBtn" :value="$t('pub.addBtn')" @click="outerVisible = true,editVisible = false"/> <input type="button" class="normalBtn" :value="$t('pub.addBtn')" @click="outerVisible = true,editVisible = false" />
&nbsp; &nbsp;
<input type="button" class="normalBtn" value="删除" @click="PostDeleteArray()" /> <input type="button" class="normalBtn" value="删除" @click="PostDeleteArray()" />
</li> </li>
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
<td> <td>
<el-row> <el-row>
<el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start"> <el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start">
<el-button type="primary" icon="el-icon-edit" circle @click="editVisible = true,outerVisible=false"></el-button> <el-button type="primary" icon="el-icon-edit" circle @click="editVisible = true,outerVisible=false,ClickItem(item)"></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start"> <el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start">
<el-button type="danger" icon="el-icon-delete" circle @click="DeleteSingleChild(item)"></el-button> <el-button type="danger" icon="el-icon-delete" circle @click="DeleteSingleChild(item)"></el-button>
...@@ -156,8 +156,8 @@ ...@@ -156,8 +156,8 @@
<el-dialog custom-class='flightAddCompany' title="新增效期" :visible.sync="outerVisible" center> <el-dialog custom-class='flightAddCompany' title="新增效期" :visible.sync="outerVisible" center>
<el-form> <el-form>
<div class="flightDateSearch"> <div class="flightDateSearch">
日期:<el-date-picker clearable class="w135" v-model="PostData.StartDate" 日期:<el-date-picker clearable class="w135" v-model="PostData.StartDate" type="date" :picker-options="beforeCheck"
type="date" :picker-options="beforeCheck" value-format="yyyy-MM-dd" :placeholder="$t('admin.admin_choDate')"></el-date-picker> - 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" <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> value-format="yyyy-MM-dd" :placeholder="$t('admin.admin_choDate')"></el-date-picker>
<el-select v-model="PostData.UpdateType" class="w100" style="margin-top:20px;"> <el-select v-model="PostData.UpdateType" class="w100" style="margin-top:20px;">
...@@ -191,24 +191,21 @@ ...@@ -191,24 +191,21 @@
<el-dialog custom-class='flightAddCompany' title="修改效期" :visible.sync="editVisible" center> <el-dialog custom-class='flightAddCompany' title="修改效期" :visible.sync="editVisible" center>
<el-form> <el-form>
<div class="flightDateSearch"> <div class="flightDateSearch">
日期: 日期:{{UpdateMsg.FDate}}
<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> </div>
<table class="flightChildTable" style="border-collapse: collapse;text-align:left;"> <table class="flightChildTable" style="border-collapse: collapse;text-align:left;">
<tr> <tr>
<td> <td>
<div class="FweekList"> <div class="FweekList">
<span>全部</span> <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,'')"></el-input> <el-input class="w135" onkeyup="value=value.replace(/[^\d^\:]+/g,'')" v-model="UpdateMsg.CArrivalTime"></el-input>
<el-input class="w135" onkeyup="value=value.replace(/[^\d^\:]+/g,'')"></el-input>
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="normalBtn" type="primary" @click="">{{$t('pub.saveBtn')}}</button> &nbsp; <button class="normalBtn" type="primary" @click="UpdateFlightChild()">{{$t('pub.saveBtn')}}</button> &nbsp;
<button class="hollowFixedBtn" @click="editVisible = false">{{$t('pub.cancelBtn')}}</button> <button class="hollowFixedBtn" @click="editVisible = false">{{$t('pub.cancelBtn')}}</button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -299,6 +296,12 @@ ...@@ -299,6 +296,12 @@
CheckStatus: false CheckStatus: false
} }
], ],
UpdateMsg: {
ID: 0,
FDate: "",
CDepartTime: "",
CArrivalTime: ""
},
beforeCheck: { beforeCheck: {
disabledDate: time => { disabledDate: time => {
...@@ -357,19 +360,19 @@ ...@@ -357,19 +360,19 @@
var isSubmit = true; var isSubmit = true;
if (this.PostData.UpdateType == 1) { if (this.PostData.UpdateType == 1) {
this.PostData.SubList.push(this.dateObj2[0]); this.PostData.SubList.push(this.dateObj2[0]);
if(this.PostData.StartDate==''){ if (this.PostData.StartDate == '') {
this.Error('请选择开始日期'); this.Error('请选择开始日期');
return; return;
} }
if(this.PostData.EndDate==''){ if (this.PostData.EndDate == '') {
this.Error('请选择结束日期'); this.Error('请选择结束日期');
return; return;
} }
if(this.dateObj2[0].CDepartTime==''){ if (this.dateObj2[0].CDepartTime == '') {
this.Error('请填写出发时间'); this.Error('请填写出发时间');
return; return;
} }
if(this.dateObj2[0].CArrivalTime==''){ if (this.dateObj2[0].CArrivalTime == '') {
this.Error('请填写到达时间'); this.Error('请填写到达时间');
return; return;
}; };
...@@ -377,39 +380,39 @@ ...@@ -377,39 +380,39 @@
this.dateObj.forEach(item => { this.dateObj.forEach(item => {
if (item.CheckStatus) { if (item.CheckStatus) {
this.PostData.SubList.push(item); this.PostData.SubList.push(item);
if(this.PostData.StartDate==''){ if (this.PostData.StartDate == '') {
this.Error('请选择开始日期'); this.Error('请选择开始日期');
isSubmit = false; isSubmit = false;
} }
if(this.PostData.EndDate==''){ if (this.PostData.EndDate == '') {
this.Error('请选择结束日期'); this.Error('请选择结束日期');
isSubmit = false; isSubmit = false;
} }
if(item.CDepartTime==''){ if (item.CDepartTime == '') {
this.Error('请填写周'+item.WeekDayStr+'开始时间'); this.Error('请填写周' + item.WeekDayStr + '开始时间');
isSubmit = false; isSubmit = false;
} }
if(item.CArrivalTime==''){ if (item.CArrivalTime == '') {
this.Error('请填写周'+item.WeekDayStr+'到达时间'); this.Error('请填写周' + item.WeekDayStr + '到达时间');
isSubmit = false; isSubmit = false;
} }
}else{ } else {
if(this.PostData.StartDate==''){ if (this.PostData.StartDate == '') {
this.Error('请选择开始日期'); this.Error('请选择开始日期');
isSubmit = false; isSubmit = false;
} }
if(this.PostData.EndDate==''){ if (this.PostData.EndDate == '') {
this.Error('请选择结束日期'); this.Error('请选择结束日期');
isSubmit = false; isSubmit = false;
} }
if(this.PostData.SubList.length==0){ if (this.PostData.SubList.length == 0) {
this.Error('请选择星期'); this.Error('请选择星期');
isSubmit = false; isSubmit = false;
} }
} }
}); });
} }
if(isSubmit){ if (isSubmit) {
this.apipost( this.apipost(
"flight_get_SetFlightChild", "flight_get_SetFlightChild",
this.PostData, this.PostData,
...@@ -470,6 +473,33 @@ ...@@ -470,6 +473,33 @@
err => {} err => {}
); );
}); });
},
//点击航班信息
ClickItem(item) {
this.UpdateMsg.ID = item.ID;
this.UpdateMsg.FDate = item.FDateStr;
this.UpdateMsg.CDepartTime = item.CDepartTime;
this.UpdateMsg.CArrivalTime = item.CArrivalTime;
},
//更新航班信息
UpdateFlightChild() {
this.apipost(
"flight_get_UpdateChildFlight",
this.UpdateMsg,
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
this.UpdateMsg.ID = 0;
this.UpdateMsg.FDate = "";
this.UpdateMsg.CDepartTime = "";
this.UpdateMsg.CArrivalTime = "";
} else {
this.Error(res.data.message);
}
},
err => {}
);
} }
}, },
mounted() { mounted() {
......
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