jinhui.wang

航班展示修正

......@@ -34,8 +34,8 @@
params: { handle: 'add', fltNo: 'new', fltDate: ' ', status: null, routeStatus: '' },
})
">添加</el-button>
<el-switch style="margin-left: 10px;" v-model="queryParams.querySpecifyData" inactive-text="日期查询" active-value="1" inactive-value="2" active-color="#13ce66"
inactive-color="#909399" @change="switchChange"></el-switch>
<el-switch style="margin-left: 10px;" v-model="queryParams.querySpecifyData" inactive-text="日期查询" active-value="1"
inactive-value="2" active-color="#13ce66" inactive-color="#909399" @change="switchChange"></el-switch>
</div>
</el-form>
<Tables ref="newTables" ductName="FlightAlloc" :data="flyList" :headerData="tableHeaders['flightAlloc']" :order="true"
......@@ -114,7 +114,7 @@ export default {
// })
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200
this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200
},
activated() {
this.getList()
......@@ -152,7 +152,7 @@ export default {
fltDate: fltDate != null ? fltDate : ' ',
route: ' ',
routeStatus: 'FlightAllocConfig',
status: status,
status: status == '3' ? '3' : ' ',
createStatus: 1
}
this.$router.push({
......
......@@ -47,8 +47,7 @@
</el-form-item>
</el-col>
</el-row>
<el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading"
@click="handleQuery">搜索
<el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索
</el-button>
<el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
......@@ -81,8 +80,8 @@
<Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader"
:order="true" :selection="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limitSize"
:page="queryParams.pageNum" :shiftKey="shiftKey" :height="tableHeight" :pageSizes="[20, 30, 40, 50, 100]"
@tableSelect="tableSelect" @tableSelectAll="tableSelectAll" @currentChange="currentChange"
@sortChange="sortChange" @sizeChange="sizeChange">
@tableSelect="tableSelect" @tableSelectAll="tableSelectAll" @currentChange="currentChange" @sortChange="sortChange"
@sizeChange="sizeChange">
<template slot="optionColumn">
<el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center"
class-name="small-padding fixed-width" :fixed="tableHeader.length > 10 ? 'right' : false" width="160">
......@@ -116,8 +115,8 @@
<el-row>
<el-col :span="12">
<el-form-item label="航班日期" prop="fltDate">
<el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small"
v-model="form.fltDate" type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期">
<el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small" v-model="form.fltDate"
type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期">
</el-date-picker>
</el-form-item>
</el-col>
......@@ -143,15 +142,15 @@
</el-tooltip>
</div>
</template>
<el-select v-if="routeMultiple" ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route"
placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :loading="routeLoading"
:multiple='true' :key="routeMultiple">
<el-select v-if="routeMultiple" ref="routeSelect" class="wid80" v-model="form.route"
:disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange"
:loading="routeLoading" :multiple='true' :key="routeMultiple">
<el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
</el-option>
</el-select>
<el-select v-if="routeMultiple == false" ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route"
placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :loading="routeLoading"
:multiple='false' :key="routeMultiple">
<el-select v-if="routeMultiple == false" ref="routeSelect" class="wid80" v-model="form.route"
:disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange"
:loading="routeLoading" :multiple='false' :key="routeMultiple">
<el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
</el-option>
</el-select>
......@@ -482,7 +481,7 @@ export default {
shiftKey: false,
};
},
directives: {
directives: {
// 处理加减天数
"input-filter": {
bind: function (el, binding, { context }) {
......@@ -617,7 +616,7 @@ export default {
this.routeLoading = false
if (res.code === 200) {
this.routeList = res.data.list
if(res.data.list.length == 0){
if (res.data.list.length == 0) {
this.form.route = "";
this.msgError("该航班没有设置航线");
}
......@@ -628,7 +627,7 @@ export default {
this.routeLoading = false
console.log(err)
})
}else{
} else {
this.form.route = "";
this.routeList = [];
}
......@@ -729,9 +728,9 @@ export default {
this.formdisabled.typeId = false;
//原始重量
this.formdisabled.originalWeight = false;
this.$nextTick(()=>{
this.$refs.form.clearValidate()
})
this.$nextTick(() => {
this.$refs.form.clearValidate()
})
},
//计算高低价可配
LowHighAvailable() {
......@@ -898,14 +897,14 @@ export default {
})
},
// 航班状态
flightState(multipleSelection, statusName){
let flightState = multipleSelection.some(item=>item.statusName == statusName);
if(flightState){
this.msgError(`勾选的航班,航班状态为${statusName},不可操作该按钮`);
}else{
flightState = false
}
return flightState
flightState(multipleSelection, statusName) {
let flightState = multipleSelection.some(item => item.statusName == statusName);
if (flightState) {
this.msgError(`勾选的航班,航班状态为${statusName},不可操作该按钮`);
} else {
flightState = false
}
return flightState
},
/** 删除按钮操作 */
handleDelete(row) {
......@@ -913,8 +912,8 @@ export default {
this.ids.forEach(item => {
fIds.push(item.id)
});
// 航班状态
if(this.flightState(this.ids, "已删除")) return
// 航班状态
if (this.flightState(this.ids, "已删除")) return
this.$confirm("是否确认删除所选数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -1022,7 +1021,7 @@ export default {
//批量开启/关闭航班
handleFlightStatus(status) {
// 航班状态
      if(this.flightState(this.ids, "已删除")) return
if (this.flightState(this.ids, "已删除")) return
let handle = status == "flightStatus80" ? "关闭" : "开启";
let data = {
updateIds: [],
......@@ -1053,7 +1052,7 @@ export default {
//自动推送开关
autoPushBatch(status) {
// 航班状态
      if(this.flightState(this.ids, "已删除")) return
if (this.flightState(this.ids, "已删除")) return
let msg = status == "open" ? "开启" : "关闭";
let data = {
updateIds: [],
......@@ -1092,7 +1091,7 @@ export default {
//白名单配舱开关
whiteListSwitchStatus(val) {
// 航班状态
      if(this.flightState(this.ids, "已删除")) return
if (this.flightState(this.ids, "已删除")) return
let obj = {
updateIds: []
}
......@@ -1114,7 +1113,7 @@ export default {
//黑名单配舱开关
BlackListSwitchStatus(val) {
// 航班状态
      if(this.flightState(this.ids, "已删除")) return
if (this.flightState(this.ids, "已删除")) return
let obj = {
updateIds: []
}
......