Elements-SY

Merge branch 'et86' into fix-issues

...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
136 </el-col> 136 </el-col>
137 <el-col :span="6"> 137 <el-col :span="6">
138 <el-form-item label="运单号"> 138 <el-form-item label="运单号">
139 - <el-input class="formItem" type="textarea" :rows="4" placeholder="请输入运单号(回车分割)" :maxlength="12000" 139 + <el-input class="formItem" type="textarea" :rows="1" placeholder="请输入运单号(回车分割)" :maxlength="12000"
140 v-model="formData.waybillNo" clearable></el-input> 140 v-model="formData.waybillNo" clearable></el-input>
141 </el-form-item> 141 </el-form-item>
142 </el-col> 142 </el-col>
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
34 params: { handle: 'add', fltNo: 'new', fltDate: ' ', status: null, routeStatus: '' }, 34 params: { handle: 'add', fltNo: 'new', fltDate: ' ', status: null, routeStatus: '' },
35 }) 35 })
36 ">添加</el-button> 36 ">添加</el-button>
37 - <el-switch style="margin-left: 10px;" v-model="queryParams.querySpecifyData" inactive-text="日期查询" active-value="1" inactive-value="2" active-color="#13ce66" 37 + <el-switch style="margin-left: 10px;" v-model="queryParams.querySpecifyData" inactive-text="日期查询" active-value="1"
38 - inactive-color="#909399" @change="switchChange"></el-switch> 38 + inactive-value="2" active-color="#13ce66" inactive-color="#909399" @change="switchChange"></el-switch>
39 </div> 39 </div>
40 </el-form> 40 </el-form>
41 <Tables ref="newTables" ductName="FlightAlloc" :data="flyList" :headerData="tableHeaders['flightAlloc']" :order="true" 41 <Tables ref="newTables" ductName="FlightAlloc" :data="flyList" :headerData="tableHeaders['flightAlloc']" :order="true"
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
114 // }) 114 // })
115 }, 115 },
116 mounted() { 116 mounted() {
117 - this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200 117 + this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200
118 }, 118 },
119 activated() { 119 activated() {
120 this.getList() 120 this.getList()
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
152 fltDate: fltDate != null ? fltDate : ' ', 152 fltDate: fltDate != null ? fltDate : ' ',
153 route: ' ', 153 route: ' ',
154 routeStatus: 'FlightAllocConfig', 154 routeStatus: 'FlightAllocConfig',
155 - status: status, 155 + status: status == '3' ? '3' : ' ',
156 createStatus: 1 156 createStatus: 1
157 } 157 }
158 this.$router.push({ 158 this.$router.push({
......
...@@ -51,16 +51,17 @@ ...@@ -51,16 +51,17 @@
51 v-if="routeSatus != 'flightInformationMaintenanceWhite Tail' && routeSatus != 'dmLog'" 51 v-if="routeSatus != 'flightInformationMaintenanceWhite Tail' && routeSatus != 'dmLog'"
52 class="backgroundCollapse" :value="infoForm.list.length > 0 ? routeList[0].route : ''" 52 class="backgroundCollapse" :value="infoForm.list.length > 0 ? routeList[0].route : ''"
53 style="min-height:500px;width:95%;margin:0 auto 50px" accordion v-loading="loading"> 53 style="min-height:500px;width:95%;margin:0 auto 50px" accordion v-loading="loading">
54 - <el-collapse-item v-for="(routeItem, index) in routeList" :key="index" :name="routeItem.route"> 54 + <el-collapse-item v-for="( routeItem, index ) in routeList " :key="index" :name="routeItem.route"
55 + v-if="($route.params.status == '3' && infoRouteList.includes(routeItem.route)) || (routeSatus == 'flightInformationMaintenancePurple Tail' && infoRouteList.includes(routeItem.route)) || ($route.params.status != '3' && routeSatus != 'flightInformationMaintenancePurple Tail')">
55 <template slot="title"> 56 <template slot="title">
56 <span class="fontWeight">{{ routeItem.route }}</span> 57 <span class="fontWeight">{{ routeItem.route }}</span>
57 </template> 58 </template>
58 - <template v-for="(val, idx) in infoForm.list"> 59 + <template v-for="( val, idx ) in infoForm.list ">
59 <el-card shadow="always" style="min-height:350px" v-if="val.flightRoute === routeItem.route" 60 <el-card shadow="always" style="min-height:350px" v-if="val.flightRoute === routeItem.route"
60 :key="idx"> 61 :key="idx">
61 <div> 62 <div>
62 <el-empty description="未设置规则!" v-if="!val.isLocation"> 63 <el-empty description="未设置规则!" v-if="!val.isLocation">
63 - <el-button type="primary" size="small" @click="newRoute(idx)">新增规则 64 + <el-button type="primary" size="small" @click="newRoute(idx, val.flightRoute)">新增规则
64 </el-button> 65 </el-button>
65 </el-empty> 66 </el-empty>
66 <el-row class="rowPadding" v-else> 67 <el-row class="rowPadding" v-else>
...@@ -149,7 +150,7 @@ ...@@ -149,7 +150,7 @@
149 <el-col :span="10"> 150 <el-col :span="10">
150 <el-input class="numberInput" v-model.trim="val.minNumOfPieces" 151 <el-input class="numberInput" v-model.trim="val.minNumOfPieces"
151 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 152 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
152 - @input="change($event)" @blur="inputBlurMinPieces($event)"> 153 + @input="change($event)">
153 </el-input> 154 </el-input>
154 <span ref="minNumOfPieces" class="el-form-item__error"></span> 155 <span ref="minNumOfPieces" class="el-form-item__error"></span>
155 </el-col> 156 </el-col>
...@@ -157,7 +158,7 @@ ...@@ -157,7 +158,7 @@
157 <el-col :span="10"> 158 <el-col :span="10">
158 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces" 159 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
159 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 160 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
160 - @input="change($event)" @blur="inputBlurMaxPieces($event)"> 161 + @input="change($event)">
161 </el-input> 162 </el-input>
162 </el-col> 163 </el-col>
163 </el-form-item> 164 </el-form-item>
...@@ -167,7 +168,7 @@ ...@@ -167,7 +168,7 @@
167 <el-col :span="10"> 168 <el-col :span="10">
168 <el-input class="numberInput" v-model.trim="val.minWeight" 169 <el-input class="numberInput" v-model.trim="val.minWeight"
169 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 170 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
170 - @input="change($event)" @blur="inputBlurMinWeight($event)"> 171 + @input="change($event)">
171 </el-input> 172 </el-input>
172 <span ref="minWeight" class="el-form-item__error"></span> 173 <span ref="minWeight" class="el-form-item__error"></span>
173 </el-col> 174 </el-col>
...@@ -175,7 +176,7 @@ ...@@ -175,7 +176,7 @@
175 <el-col :span="10"> 176 <el-col :span="10">
176 <el-input class="numberInput" v-model.trim="val.maxWeight" 177 <el-input class="numberInput" v-model.trim="val.maxWeight"
177 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 178 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
178 - @input="change($event)" @blur="inputBlurMaxWeight($event)"> 179 + @input="change($event)">
179 </el-input> 180 </el-input>
180 </el-col> 181 </el-col>
181 </el-form-item> 182 </el-form-item>
...@@ -186,7 +187,7 @@ ...@@ -186,7 +187,7 @@
186 <el-card shadow="never" style="width: 95%"> 187 <el-card shadow="never" style="width: 95%">
187 <el-checkbox-group v-model="val.typeOfGoods" @change="change"> 188 <el-checkbox-group v-model="val.typeOfGoods" @change="change">
188 <el-row> 189 <el-row>
189 - <el-col v-for="item in checkBoxItem.cargoType" :span="2" 190 + <el-col v-for=" item in checkBoxItem.cargoType " :span="2"
190 :key="item.id"> 191 :key="item.id">
191 <el-checkbox v-if="item.status === 1" :label="item.chineseName" 192 <el-checkbox v-if="item.status === 1" :label="item.chineseName"
192 :name="item.chineseName" :key="item.code"> 193 :name="item.chineseName" :key="item.code">
...@@ -204,7 +205,7 @@ ...@@ -204,7 +205,7 @@
204 <el-card shadow="never" style="width: 95%"> 205 <el-card shadow="never" style="width: 95%">
205 <el-checkbox-group v-model="val.declarationCategory" @change="change"> 206 <el-checkbox-group v-model="val.declarationCategory" @change="change">
206 <el-row> 207 <el-row>
207 - <el-col v-for="item in checkBoxItem.cargoStatus" :span="3" 208 + <el-col v-for=" item in checkBoxItem.cargoStatus " :span="3"
208 :key="item.id"> 209 :key="item.id">
209 <el-checkbox v-if="item.status === 1" :label="item.chineseName" 210 <el-checkbox v-if="item.status === 1" :label="item.chineseName"
210 :name="item.chineseName" :key="item.code" disabled> 211 :name="item.chineseName" :key="item.code" disabled>
...@@ -222,7 +223,7 @@ ...@@ -222,7 +223,7 @@
222 <el-card shadow="never" style="width: 95%"> 223 <el-card shadow="never" style="width: 95%">
223 <el-checkbox-group v-model="val.puporpuxCode" @change="change"> 224 <el-checkbox-group v-model="val.puporpuxCode" @change="change">
224 <el-row> 225 <el-row>
225 - <el-col :span="2" v-for="item in checkBoxItem.puporpux" 226 + <el-col :span="2" v-for=" item in checkBoxItem.puporpux "
226 :key="item.id"> 227 :key="item.id">
227 <el-checkbox 228 <el-checkbox
228 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)" 229 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
...@@ -243,7 +244,7 @@ ...@@ -243,7 +244,7 @@
243 <el-card shadow="never" style="width: 95%"> 244 <el-card shadow="never" style="width: 95%">
244 <el-checkbox-group v-model="val.serviceCode" @change="change"> 245 <el-checkbox-group v-model="val.serviceCode" @change="change">
245 <el-row> 246 <el-row>
246 - <el-col v-for="item in checkBoxItem.serviceCode" :span="2" 247 + <el-col v-for=" item in checkBoxItem.serviceCode " :span="2"
247 :key="item.id"> 248 :key="item.id">
248 <el-checkbox 249 <el-checkbox
249 v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)" 250 v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)"
...@@ -263,7 +264,7 @@ ...@@ -263,7 +264,7 @@
263 <el-form-item label="Handling Code"> 264 <el-form-item label="Handling Code">
264 <el-card shadow="never" style="width: 95%"> 265 <el-card shadow="never" style="width: 95%">
265 <el-checkbox-group v-model="val.handlingCode" @change="change"> 266 <el-checkbox-group v-model="val.handlingCode" @change="change">
266 - <div class="checkboxItem" v-for="item in checkBoxItem.handlingCode" 267 + <div class="checkboxItem" v-for=" item in checkBoxItem.handlingCode "
267 :key="item.id"> 268 :key="item.id">
268 <el-checkbox 269 <el-checkbox
269 v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)" 270 v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)"
...@@ -282,7 +283,7 @@ ...@@ -282,7 +283,7 @@
282 <el-form-item label="Sub Category"> 283 <el-form-item label="Sub Category">
283 <el-card shadow="never" style="width: 95%"> 284 <el-card shadow="never" style="width: 95%">
284 <el-checkbox-group v-model="val.subCategory" @change="change"> 285 <el-checkbox-group v-model="val.subCategory" @change="change">
285 - <div class="checkboxItem" v-for="item in checkBoxItem.subCategory" 286 + <div class="checkboxItem" v-for=" item in checkBoxItem.subCategory "
286 :key="item.id"> 287 :key="item.id">
287 <el-checkbox 288 <el-checkbox
288 v-if="item.status === 1 || val.subCategory.includes(item.chineseName)" 289 v-if="item.status === 1 || val.subCategory.includes(item.chineseName)"
...@@ -303,10 +304,10 @@ ...@@ -303,10 +304,10 @@
303 </template> 304 </template>
304 </el-collapse-item> 305 </el-collapse-item>
305 </el-collapse> 306 </el-collapse>
306 - <el-card v-else shadow="always" v-for="(val, idx) in infoForm.list" :key="idx" style="min-height:350px"> 307 + <el-card v-else shadow="always" v-for="( val, idx ) in infoForm.list " :key="idx" style="min-height:350px">
307 <div> 308 <div>
308 <el-empty description="未设置规则!" v-if="!val.isLocation"> 309 <el-empty description="未设置规则!" v-if="!val.isLocation">
309 - <el-button type="primary" size="small" @click="newRoute(idx)">新增规则 310 + <el-button type="primary" size="small" @click="newRoute(idx, routeList[idx].route)">新增规则
310 </el-button> 311 </el-button>
311 </el-empty> 312 </el-empty>
312 <el-row class="rowPadding" v-else> 313 <el-row class="rowPadding" v-else>
...@@ -391,7 +392,7 @@ ...@@ -391,7 +392,7 @@
391 <el-col :span="10"> 392 <el-col :span="10">
392 <el-input class="numberInput" v-model.trim="val.minNumOfPieces" 393 <el-input class="numberInput" v-model.trim="val.minNumOfPieces"
393 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 394 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
394 - @input="change($event)" @blur="inputBlurMinPieces($event)"> 395 + @input="change($event)">
395 </el-input> 396 </el-input>
396 <span ref="minNumOfPieces" class="el-form-item__error"></span> 397 <span ref="minNumOfPieces" class="el-form-item__error"></span>
397 </el-col> 398 </el-col>
...@@ -399,7 +400,7 @@ ...@@ -399,7 +400,7 @@
399 <el-col :span="10"> 400 <el-col :span="10">
400 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces" 401 <el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
401 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 402 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
402 - @input="change($event)" @blur="inputBlurMaxPieces($event)"> 403 + @input="change($event)">
403 </el-input> 404 </el-input>
404 </el-col> 405 </el-col>
405 </el-form-item> 406 </el-form-item>
...@@ -409,7 +410,7 @@ ...@@ -409,7 +410,7 @@
409 <el-col :span="10"> 410 <el-col :span="10">
410 <el-input class="numberInput" v-model.trim="val.minWeight" 411 <el-input class="numberInput" v-model.trim="val.minWeight"
411 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 412 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
412 - @input="change($event)" @blur="inputBlurMinWeight($event)"> 413 + @input="change($event)">
413 </el-input> 414 </el-input>
414 <span ref="minWeight" class="el-form-item__error"></span> 415 <span ref="minWeight" class="el-form-item__error"></span>
415 </el-col> 416 </el-col>
...@@ -417,7 +418,7 @@ ...@@ -417,7 +418,7 @@
417 <el-col :span="10"> 418 <el-col :span="10">
418 <el-input class="numberInput" v-model.trim="val.maxWeight" 419 <el-input class="numberInput" v-model.trim="val.maxWeight"
419 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" 420 oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
420 - @input="change($event)" @blur="inputBlurMaxWeight($event)"> 421 + @input="change($event)">
421 </el-input> 422 </el-input>
422 </el-col> 423 </el-col>
423 </el-form-item> 424 </el-form-item>
...@@ -428,7 +429,7 @@ ...@@ -428,7 +429,7 @@
428 <el-card shadow="never" style="width: 95%"> 429 <el-card shadow="never" style="width: 95%">
429 <el-checkbox-group v-model="val.typeOfGoods" @change="change"> 430 <el-checkbox-group v-model="val.typeOfGoods" @change="change">
430 <el-row> 431 <el-row>
431 - <el-col v-for="item in checkBoxItem.cargoType" :span="2" :key="item.id"> 432 + <el-col v-for=" item in checkBoxItem.cargoType " :span="2" :key="item.id">
432 <el-checkbox v-if="item.status === 1" :label="item.chineseName" 433 <el-checkbox v-if="item.status === 1" :label="item.chineseName"
433 :name="item.chineseName" :key="item.code"> 434 :name="item.chineseName" :key="item.code">
434 <Tooltips :content="item.chineseName" :refName="item.code"> 435 <Tooltips :content="item.chineseName" :refName="item.code">
...@@ -445,7 +446,7 @@ ...@@ -445,7 +446,7 @@
445 <el-card shadow="never" style="width: 95%"> 446 <el-card shadow="never" style="width: 95%">
446 <el-checkbox-group v-model="val.declarationCategory" @change="change"> 447 <el-checkbox-group v-model="val.declarationCategory" @change="change">
447 <el-row> 448 <el-row>
448 - <el-col v-for="item in checkBoxItem.cargoStatus" :span="3" :key="item.id"> 449 + <el-col v-for=" item in checkBoxItem.cargoStatus " :span="3" :key="item.id">
449 <el-checkbox v-if="item.status === 1" :label="item.chineseName" 450 <el-checkbox v-if="item.status === 1" :label="item.chineseName"
450 :name="item.chineseName" disabled :key="item.code"> 451 :name="item.chineseName" disabled :key="item.code">
451 <Tooltips :content="item.chineseName" :refName="item.code"> 452 <Tooltips :content="item.chineseName" :refName="item.code">
...@@ -462,7 +463,7 @@ ...@@ -462,7 +463,7 @@
462 <el-card shadow="never" style="width: 95%"> 463 <el-card shadow="never" style="width: 95%">
463 <el-checkbox-group v-model="val.puporpuxCode" @change="change"> 464 <el-checkbox-group v-model="val.puporpuxCode" @change="change">
464 <el-row> 465 <el-row>
465 - <el-col :span="2" v-for="item in checkBoxItem.puporpux" :key="item"> 466 + <el-col :span="2" v-for=" item in checkBoxItem.puporpux " :key="item">
466 <el-checkbox 467 <el-checkbox
467 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)" 468 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
468 :label="item.chineseName" :name="item.chineseName" 469 :label="item.chineseName" :name="item.chineseName"
...@@ -482,7 +483,7 @@ ...@@ -482,7 +483,7 @@
482 <el-card shadow="never" style="width: 95%"> 483 <el-card shadow="never" style="width: 95%">
483 <el-checkbox-group v-model="val.serviceCode" @change="change"> 484 <el-checkbox-group v-model="val.serviceCode" @change="change">
484 <el-row> 485 <el-row>
485 - <el-col v-for="item in checkBoxItem.serviceCode" :span="2" :key="item.id"> 486 + <el-col v-for=" item in checkBoxItem.serviceCode " :span="2" :key="item.id">
486 <el-checkbox 487 <el-checkbox
487 v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)" 488 v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)"
488 :label="item.chineseName" :name="item.chineseName" 489 :label="item.chineseName" :name="item.chineseName"
...@@ -501,7 +502,8 @@ ...@@ -501,7 +502,8 @@
501 <el-form-item label="Handling Code"> 502 <el-form-item label="Handling Code">
502 <el-card shadow="never" style="width: 95%"> 503 <el-card shadow="never" style="width: 95%">
503 <el-checkbox-group v-model="val.handlingCode" @change="change"> 504 <el-checkbox-group v-model="val.handlingCode" @change="change">
504 - <div class="checkboxItem" v-for="item in checkBoxItem.handlingCode" :key="item.id"> 505 + <div class="checkboxItem" v-for=" item in checkBoxItem.handlingCode "
506 + :key="item.id">
505 <el-checkbox 507 <el-checkbox
506 v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)" 508 v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)"
507 :label="item.chineseName" :name="item.chineseName" 509 :label="item.chineseName" :name="item.chineseName"
...@@ -519,7 +521,8 @@ ...@@ -519,7 +521,8 @@
519 <el-form-item label="Sub Category"> 521 <el-form-item label="Sub Category">
520 <el-card shadow="never" style="width: 95%"> 522 <el-card shadow="never" style="width: 95%">
521 <el-checkbox-group v-model="val.subCategory" @change="change"> 523 <el-checkbox-group v-model="val.subCategory" @change="change">
522 - <div class="checkboxItem" v-for="item in checkBoxItem.subCategory" :key="item.id"> 524 + <div class="checkboxItem" v-for=" item in checkBoxItem.subCategory "
525 + :key="item.id">
523 <el-checkbox 526 <el-checkbox
524 v-if="item.status === 1 || val.subCategory.includes(item.chineseName)" 527 v-if="item.status === 1 || val.subCategory.includes(item.chineseName)"
525 :label="item.chineseName" :name="item.chineseName" 528 :label="item.chineseName" :name="item.chineseName"
...@@ -551,10 +554,10 @@ import { ...@@ -551,10 +554,10 @@ import {
551 findByFlightId, 554 findByFlightId,
552 queryRouteByFltNo 555 queryRouteByFltNo
553 } from "@/api/destinationFlight"; 556 } from "@/api/destinationFlight";
554 -import { inputBlurValidate } from "@/utils/mixins"; 557 +// import { inputBlurValidate } from "@/utils/mixins";
555 export default { 558 export default {
556 name: 'FlightAllocConfigInfo', 559 name: 'FlightAllocConfigInfo',
557 - mixins: [inputBlurValidate], 560 + // mixins: [inputBlurValidate],
558 data() { 561 data() {
559 return { 562 return {
560 infoForm: { 563 infoForm: {
...@@ -581,6 +584,7 @@ export default { ...@@ -581,6 +584,7 @@ export default {
581 }, 584 },
582 ] 585 ]
583 }, 586 },
587 + infoRouteList: [],
584 status: '', 588 status: '',
585 routeSatus: '', 589 routeSatus: '',
586 isEmpty: false, 590 isEmpty: false,
...@@ -599,32 +603,14 @@ export default { ...@@ -599,32 +603,14 @@ export default {
599 this.fltNoDisabled = true 603 this.fltNoDisabled = true
600 this.infoForm.fltNo = this.$route.params.fltNo 604 this.infoForm.fltNo = this.$route.params.fltNo
601 this.infoForm.fltDate = this.$route.params.fltDate 605 this.infoForm.fltDate = this.$route.params.fltDate
606 + this.infoForm.route = this.$route.params.route
602 if (this.$route.params.status) { 607 if (this.$route.params.status) {
603 if (this.routeSatus == 'dmLog') { 608 if (this.routeSatus == 'dmLog') {
604 - this.infoForm.route = this.$route.params.route
605 this.getIdDimension(this.$route.params.id) 609 this.getIdDimension(this.$route.params.id)
606 } else { 610 } else {
607 - let obj = { 611 + this.getRouteDimension(this.getSreachData())
608 - fltNo: this.$route.params.fltNo,
609 - fltDate: this.$route.params.fltDate,
610 - status: this.$route.params.status ? this.$route.params.status : ''
611 - }
612 -
613 - if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
614 - this.infoForm.route = this.$route.params.route
615 - obj.route = this.$route.params.route
616 - obj.flightRouteListStr = this.$route.params.route
617 - } else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
618 - this.infoForm.route = ''
619 - obj.route = ''
620 - obj.flightRouteListStr = this.$route.params.route
621 - } else {
622 - obj.route = this.$route.params.route ? this.$route.params.route : ''
623 - }
624 - this.getRouteDimension(obj)
625 } 612 }
626 } 613 }
627 -
628 } else { 614 } else {
629 this.infoForm.fltNo = '' 615 this.infoForm.fltNo = ''
630 this.infoForm.fltDate = null 616 this.infoForm.fltDate = null
...@@ -646,22 +632,7 @@ export default { ...@@ -646,22 +632,7 @@ export default {
646 if (this.routeSatus == 'dmLog') { 632 if (this.routeSatus == 'dmLog') {
647 this.getIdDimension(this.$route.params.id) 633 this.getIdDimension(this.$route.params.id)
648 } else { 634 } else {
649 - let obj = { 635 + this.getRouteDimension(this.getSreachData()) // 修改时 & 详情时
650 - fltNo: this.$route.params.fltNo,
651 - fltDate: this.$route.params.fltDate,
652 - status: this.$route.params.status ? this.$route.params.status : ''
653 - }
654 -
655 - if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
656 - obj.route = this.$route.params.route
657 - obj.flightRouteListStr = this.$route.params.route
658 - } else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
659 - obj.route = ''
660 - obj.flightRouteListStr = this.$route.params.route
661 - } else {
662 - obj.route = this.$route.params.route ? this.$route.params.route : ''
663 - }
664 - this.getRouteDimension(obj) // 修改时 & 详情时
665 } 636 }
666 } 637 }
667 }, 638 },
...@@ -748,24 +719,79 @@ export default { ...@@ -748,24 +719,79 @@ export default {
748 }) 719 })
749 } else { 720 } else {
750 //航班类型为Purple Tail则显示所有航线维度 721 //航班类型为Purple Tail则显示所有航线维度
751 - this.routeList.forEach((route, sub) => { 722 + let arr = this.$route.params.route.split(';')
752 - let routeStatus = 1 723 + this.infoRouteList = arr
753 - res.data.list.forEach(item => { 724 + let params = {
754 - if (route.route === item.flightRoute) { 725 + purposeOfFlightNo: this.infoForm.fltNo,
755 - //航线对应插入数据 726 + flightRoute: this.infoForm.route,
756 - routeStatus = 2 727 + flightRouteListStr: this.$route.params.route,
757 - this.infoForm.list.push(this.dataHandle(item)) 728 + status: this.$route.params.status
758 - } 729 + }
730 + findDestinationFltRuleByFlightNo(params).then(response => {
731 + let infoRouteList = []
732 + response.data.list.forEach(item => {
733 + //航线对应插入数据
734 + infoRouteList.push(item.flightRoute)
759 }) 735 })
760 - if (routeStatus == 1) { 736 + if (response.data.list.length > 0) {
761 - //否则插入占位基础数据 737 + this.routeList.forEach((route, sub) => {
762 - this.infoForm.list.push({ 738 + if (arr.includes(route.route)) {
763 - purposeOfFlightNo: this.infoForm.fltNo, 739 + let routeStatus = 1
764 - ruleDate: this.infoForm.fltDate, 740 + res.data.list.forEach(item => {
765 - flightRoute: route.route, 741 + if (route.route === item.flightRoute) {
766 - routePriority: route.routePriority, 742 + //航线对应插入数据
743 + routeStatus = 2
744 + this.infoForm.list.push(this.dataHandle(item))
745 + }
746 + })
747 + if (routeStatus == 1) {
748 + if (infoRouteList.includes(route.route)) {
749 + response.data.list.forEach(item => {
750 + if (item.flightRoute == route.route) {
751 + item.id = undefined
752 + item.status = undefined
753 + routeStatus = 2
754 + this.infoForm.list.push(
755 + this.dataHandle(item)
756 + )
757 + }
758 + })
759 + } else {
760 + //否则插入占位基础数据
761 + this.infoForm.list.push({
762 + purposeOfFlightNo: this.infoForm.fltNo,
763 + ruleDate: this.infoForm.fltDate,
764 + flightRoute: route.route,
765 + routePriority: route.routePriority,
766 + })
767 + this.newRoute(sub, route.route)
768 + }
769 + }
770 + }
771 + })
772 + } else {
773 + this.routeList.forEach((route, sub) => {
774 + if (arr.includes(route.route)) {
775 + let routeStatus = 1
776 + res.data.list.forEach(item => {
777 + if (route.route === item.flightRoute) {
778 + //航线对应插入数据
779 + routeStatus = 2
780 + this.infoForm.list.push(this.dataHandle(item))
781 + }
782 + })
783 + if (routeStatus == 1) {
784 + //否则插入占位基础数据
785 + this.infoForm.list.push({
786 + purposeOfFlightNo: this.infoForm.fltNo,
787 + ruleDate: this.infoForm.fltDate,
788 + flightRoute: route.route,
789 + routePriority: route.routePriority,
790 + })
791 + this.newRoute(sub, route.route)
792 + }
793 + }
767 }) 794 })
768 - this.newRoute(sub)
769 } 795 }
770 }) 796 })
771 } 797 }
...@@ -774,71 +800,122 @@ export default { ...@@ -774,71 +800,122 @@ export default {
774 if (this.routeSatus == 'FlightAllocConfig') { 800 if (this.routeSatus == 'FlightAllocConfig') {
775 let infoRouteList = [] 801 let infoRouteList = []
776 res.data.list.forEach(dateItem => { 802 res.data.list.forEach(dateItem => {
777 - this.infoForm.list.push( 803 + if (!infoRouteList.includes(JSON.parse(JSON.stringify(dateItem.flightRoute)))) {
778 - this.dataHandle(dateItem) 804 + infoRouteList.push(JSON.parse(JSON.stringify(dateItem.flightRoute)))
779 - ) 805 + }
780 - infoRouteList.push(dateItem.flightRoute)
781 }) 806 })
782 - //判断是否有日期,看是否需要查询无日期维度 807 + //非停用展示
783 - if (obj.flightDate != null && obj.flightDate != '' && obj.flightDate != ' ') { 808 + if (val.status != '3') {
784 - findDestinationFltRuleByFlightNo({ 809 + //判断是否有日期,看是否需要查询无日期维度
785 - purposeOfFlightNo: this.infoForm.fltNo, 810 + if (obj.flightDate != null && obj.flightDate != '' && obj.flightDate != ' ') {
786 - fltDate: '', 811 + findDestinationFltRuleByFlightNo({
787 - flightRoute: this.infoForm.route, 812 + purposeOfFlightNo: this.infoForm.fltNo,
788 - flightRouteListStr: this.$route.params.route, 813 + fltDate: '',
789 - status: this.$route.params.status 814 + flightRoute: this.infoForm.route,
790 - }).then(resData => { 815 + flightRouteListStr: this.$route.params.route,
791 - if (resData.data.list.length > 0) { 816 + status: this.$route.params.status
792 - this.routeList.forEach((route, sub) => { 817 + }).then(resData => {
793 - if (!infoRouteList.includes(route.route)) { 818 + if (resData.data.list.length > 0) {
819 + this.routeList.forEach((route, sub) => {
820 + if (!infoRouteList.includes(route.route)) {
821 + let routeStatus = 1
822 + resData.data.list.forEach(item => {
823 + if (item.flightRoute == route.route) {
824 + item.id = undefined
825 + item.status = undefined
826 + routeStatus = 2
827 + this.infoForm.list.push(
828 + this.dataHandle(item)
829 + )
830 + }
831 + })
832 + if (routeStatus == 1) {
833 + // 否则插入占位基础数据
834 + this.infoForm.list.push({
835 + purposeOfFlightNo: this.infoForm.fltNo,
836 + ruleDate: this.infoForm.fltDate,
837 + flightRoute: route.route,
838 + routePriority: route.routePriority,
839 + })
840 + this.newRoute(sub, route.route)
841 + }
842 + } else {
843 + infoRouteList.forEach((item, index) => {
844 + if (item == route.route) {
845 + this.infoForm.list.push(
846 + this.dataHandle(JSON.parse(JSON.stringify(res.data.list[index])))
847 + )
848 + }
849 + })
850 + }
851 + })
852 + } else {
853 + this.routeList.forEach((route) => {
794 let routeStatus = 1 854 let routeStatus = 1
795 - resData.data.list.forEach(item => { 855 + infoRouteList.forEach((item, index) => {
796 - if (item.flightRoute == route.route) { 856 + if (item == route.route) {
797 - item.id = undefined
798 - item.status = undefined
799 routeStatus = 2 857 routeStatus = 2
800 this.infoForm.list.push( 858 this.infoForm.list.push(
801 - this.dataHandle(item) 859 + this.dataHandle(JSON.parse(JSON.stringify(res.data.list[index])))
802 ) 860 )
803 } 861 }
804 }) 862 })
805 if (routeStatus == 1) { 863 if (routeStatus == 1) {
806 - // 否则插入占位基础数据
807 this.infoForm.list.push({ 864 this.infoForm.list.push({
808 purposeOfFlightNo: this.infoForm.fltNo, 865 purposeOfFlightNo: this.infoForm.fltNo,
809 ruleDate: this.infoForm.fltDate, 866 ruleDate: this.infoForm.fltDate,
810 flightRoute: route.route, 867 flightRoute: route.route,
811 routePriority: route.routePriority, 868 routePriority: route.routePriority,
812 }) 869 })
813 - this.newRoute(sub)
814 } 870 }
815 - } 871 + })
816 - }) 872 + }
817 - } 873 + }).catch(err => {
818 - else { 874 + this.isEmpty = true
819 - this.routeList.forEach((route) => { 875 + console.log(err)
876 + })
877 + } else {
878 + // 航班配舱设置普通规则
879 + this.routeList.forEach((route, sub) => {
880 + if (!infoRouteList.includes(route.route)) {
820 this.infoForm.list.push({ 881 this.infoForm.list.push({
821 purposeOfFlightNo: this.infoForm.fltNo, 882 purposeOfFlightNo: this.infoForm.fltNo,
822 ruleDate: this.infoForm.fltDate, 883 ruleDate: this.infoForm.fltDate,
823 flightRoute: route.route, 884 flightRoute: route.route,
824 routePriority: route.routePriority, 885 routePriority: route.routePriority,
825 }) 886 })
826 - }) 887 + } else {
827 - } 888 + let routeStatus = 1
828 - }).catch(err => { 889 + res.data.list.forEach(item => {
829 - this.isEmpty = true 890 + if (item.flightRoute == route.route) {
830 - console.log(err) 891 + // item.id = undefined
831 - }) 892 + // item.status = undefined
893 + routeStatus = 2
894 + this.infoForm.list.push(
895 + this.dataHandle(item)
896 + )
897 + }
898 + })
899 + if (routeStatus == 1) {
900 + // 否则插入占位基础数据
901 + this.infoForm.list.push({
902 + purposeOfFlightNo: this.infoForm.fltNo,
903 + ruleDate: this.infoForm.fltDate,
904 + flightRoute: route.route,
905 + routePriority: route.routePriority,
906 + })
907 + this.newRoute(sub, route.route)
908 + }
909 + }
910 + })
911 + }
832 } else { 912 } else {
833 - this.routeList.forEach((route, sub) => { 913 + //停用展示
834 - if (!infoRouteList.includes(route.route)) { 914 + res.data.list.forEach(dateItem => {
835 - this.infoForm.list.push({ 915 + this.infoRouteList.push(dateItem.flightRoute)
836 - purposeOfFlightNo: this.infoForm.fltNo, 916 + this.infoForm.list.push(
837 - ruleDate: this.infoForm.fltDate, 917 + this.dataHandle(JSON.parse(JSON.stringify(dateItem)))
838 - flightRoute: route.route, 918 + )
839 - routePriority: route.routePriority,
840 - })
841 - }
842 }) 919 })
843 } 920 }
844 } else { 921 } else {
...@@ -850,43 +927,73 @@ export default { ...@@ -850,43 +927,73 @@ export default {
850 status: this.$route.params.status 927 status: this.$route.params.status
851 } 928 }
852 findDestinationFltRuleByFlightNo(params).then(response => { 929 findDestinationFltRuleByFlightNo(params).then(response => {
853 - // 航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度) 930 + if (response.data.list.length > 0) {
854 - this.routeList.forEach((route, sub) => { 931 + let infoRouteList = []
855 - let routeStatus = 1
856 res.data.list.forEach(item => { 932 res.data.list.forEach(item => {
857 - if (route.route === item.flightRoute) { 933 + //航线对应插入数据
858 - //航线对应插入数据 934 + infoRouteList.push(item.flightRoute)
859 - routeStatus = 2
860 - // item.id = undefined
861 - // item.status = undefined
862 - this.infoForm.list.push(this.dataHandle(item))
863 - }
864 }) 935 })
865 - if (routeStatus == 1) { 936 + // 航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
866 - //日期下无维度的,查询是否存在无日期维度,有则占位展示,无则使用新增占位 937 + this.routeList.forEach((route, sub) => {
867 - response.data.list.forEach(item => { 938 + if (!infoRouteList.includes(route.route)) {
868 - if (route.route === item.flightRoute) { 939 + let routeStatus = 1
869 - item.id = undefined 940 + //日期下无维度的,查询是否存在无日期维度,有则占位展示,无则使用新增占位
870 - item.status = undefined 941 + response.data.list.forEach(item => {
871 - item.flightRoute = this.infoForm.route 942 + let obj = JSON.parse(JSON.stringify(item))
872 - this.routeList.forEach(route => { 943 + if (obj.flightRoute == route.route) {
873 - if (route.route === this.infoForm.route) { 944 + obj.id = undefined
874 - item.routePriority = route.routePriority 945 + obj.status = undefined
875 - } 946 + routeStatus = 2
947 + // obj.flightRoute = this.infoForm.route
948 + // this.routeList.forEach(route => {
949 + // if (route.route === this.infoForm.route) {
950 + // obj.routePriority = route.routePriority
951 + // }
952 + // })
953 + this.infoForm.list.push(this.dataHandle(obj))
954 + }
955 + })
956 + if (routeStatus == 1) {
957 + //否则插入占位基础数据
958 + this.infoForm.list.push({
959 + purposeOfFlightNo: this.infoForm.fltNo,
960 + ruleDate: this.infoForm.fltDate,
961 + flightRoute: route.route,
962 + routePriority: route.routePriority,
876 }) 963 })
877 - this.infoForm.list.push(this.dataHandle(item)) 964 + this.newRoute(sub, route.route)
965 + }
966 + } else {
967 + infoRouteList.forEach((item, index) => {
968 + if (item == route.route) {
969 + this.infoForm.list.push(
970 + this.dataHandle(JSON.parse(JSON.stringify(res.data.list[index])))
971 + )
972 + }
973 + })
974 + }
975 + })
976 + } else {
977 + this.routeList.forEach((route) => {
978 + let routeStatus = 1
979 + infoRouteList.forEach((item, index) => {
980 + if (item == route.route) {
981 + routeStatus = 2
982 + this.infoForm.list.push(
983 + this.dataHandle(JSON.parse(JSON.stringify(res.data.list[index])))
984 + )
878 } 985 }
879 }) 986 })
880 - //否则插入占位基础数据 987 + if (routeStatus == 1) {
881 - this.infoForm.list.push({ 988 + this.infoForm.list.push({
882 - purposeOfFlightNo: this.infoForm.fltNo, 989 + purposeOfFlightNo: this.infoForm.fltNo,
883 - ruleDate: this.infoForm.fltDate, 990 + ruleDate: this.infoForm.fltDate,
884 - flightRoute: route.route, 991 + flightRoute: route.route,
885 - routePriority: route.routePriority, 992 + routePriority: route.routePriority,
886 - }) 993 + })
887 - this.newRoute(sub) 994 + }
888 - } 995 + })
889 - }) 996 + }
890 }) 997 })
891 } 998 }
892 } 999 }
...@@ -922,26 +1029,31 @@ export default { ...@@ -922,26 +1029,31 @@ export default {
922 this.infoForm.list.push(this.dataHandle(item)) 1029 this.infoForm.list.push(this.dataHandle(item))
923 }) 1030 })
924 } else { 1031 } else {
1032 + let arr = this.$route.params.route.split(';')
1033 + this.infoRouteList = arr
925 //航班类型Purple Tail展示全部航线维度 1034 //航班类型Purple Tail展示全部航线维度
926 - let routesStatus = 1
927 this.routeList.forEach(route => { 1035 this.routeList.forEach(route => {
928 - response.data.list.forEach(item => { 1036 + if (arr.includes(route.route)) {
929 - if (route.route === item.flightRoute) { 1037 + let routesStatus = 1
930 - routesStatus = 2 1038 + response.data.list.forEach(item => {
931 - item.id = undefined 1039 + let obj = JSON.parse(JSON.stringify(item))
932 - item.status = undefined 1040 + if (route.route === item.flightRoute) {
933 - item.flightRoute = this.infoForm.route 1041 + routesStatus = 2
934 - item.routePriority = route.routePriority 1042 + obj.id = undefined
935 - this.infoForm.list.push(this.dataHandle(item)) 1043 + obj.status = undefined
936 - } 1044 + obj.flightRoute = route.route
937 - }) 1045 + obj.routePriority = route.routePriority
938 - if (routesStatus == 1) { 1046 + this.infoForm.list.push(this.dataHandle(obj))
939 - this.infoForm.list.push({ 1047 + }
940 - purposeOfFlightNo: this.infoForm.fltNo,
941 - ruleDate: this.infoForm.fltDate,
942 - flightRoute: route.route,
943 - routePriority: route.routePriority,
944 }) 1048 })
1049 + if (routesStatus == 1) {
1050 + this.infoForm.list.push({
1051 + purposeOfFlightNo: this.infoForm.fltNo,
1052 + ruleDate: this.infoForm.fltDate,
1053 + flightRoute: route.route,
1054 + routePriority: route.routePriority,
1055 + })
1056 + }
945 } 1057 }
946 }) 1058 })
947 } 1059 }
...@@ -960,15 +1072,19 @@ export default { ...@@ -960,15 +1072,19 @@ export default {
960 } 1072 }
961 }) 1073 })
962 } else { 1074 } else {
1075 + let arr = this.$route.params.route.split(';')
1076 + this.infoRouteList = arr
963 //航班类型Purple Tail展示全部航线维度 1077 //航班类型Purple Tail展示全部航线维度
964 // this.isEmpty = true 1078 // this.isEmpty = true
965 this.routeList.forEach((route) => { 1079 this.routeList.forEach((route) => {
966 - this.infoForm.list.push({ 1080 + if (arr.includes(route.route)) {
967 - purposeOfFlightNo: this.infoForm.fltNo, 1081 + this.infoForm.list.push({
968 - ruleDate: this.infoForm.fltDate, 1082 + purposeOfFlightNo: this.infoForm.fltNo,
969 - flightRoute: route.route, 1083 + ruleDate: this.infoForm.fltDate,
970 - routePriority: route.routePriority, 1084 + flightRoute: route.route,
971 - }) 1085 + routePriority: route.routePriority,
1086 + })
1087 + }
972 }) 1088 })
973 } 1089 }
974 } 1090 }
...@@ -1037,11 +1153,6 @@ export default { ...@@ -1037,11 +1153,6 @@ export default {
1037 findDestinationFltRuleByFlightNo(query).then(result => { 1153 findDestinationFltRuleByFlightNo(query).then(result => {
1038 const { code, data } = result; 1154 const { code, data } = result;
1039 if (code == 200) { 1155 if (code == 200) {
1040 - let newRoute = JSON.parse(JSON.stringify(this.routeList.concat(data.routeList)))
1041 - const resRoute = newRoute.filter((item, index, self) => {
1042 - return self.findIndex(t => JSON.stringify(t) === JSON.stringify(item)) === index;
1043 - });
1044 - this.routeList = Array.from(new Set(resRoute));
1045 if (data.routeList.length) { 1156 if (data.routeList.length) {
1046 this.routeList.forEach(route => { 1157 this.routeList.forEach(route => {
1047 let routesStatus = 1 1158 let routesStatus = 1
...@@ -1113,6 +1224,25 @@ export default { ...@@ -1113,6 +1224,25 @@ export default {
1113 } 1224 }
1114 } 1225 }
1115 }, 1226 },
1227 + //查询参数获取
1228 + getSreachData() {
1229 + let obj = {
1230 + fltNo: this.$route.params.fltNo,
1231 + fltDate: this.$route.params.fltDate,
1232 + status: this.$route.params.status ? this.$route.params.status : ''
1233 + }
1234 +
1235 + if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
1236 + obj.route = this.$route.params.route
1237 + obj.flightRouteListStr = this.$route.params.route
1238 + } else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
1239 + obj.route = ''
1240 + obj.flightRouteListStr = this.$route.params.route
1241 + } else {
1242 + obj.route = this.$route.params.route ? this.$route.params.route : ''
1243 + }
1244 + return obj
1245 + },
1116 //保存 1246 //保存
1117 submit(val) { 1247 submit(val) {
1118 let routeArr = [] 1248 let routeArr = []
...@@ -1146,7 +1276,7 @@ export default { ...@@ -1146,7 +1276,7 @@ export default {
1146 data.routePriority = item.routePriority 1276 data.routePriority = item.routePriority
1147 } 1277 }
1148 }) 1278 })
1149 - data.flightRoute = this.infoForm.route 1279 + // data.flightRoute = this.infoForm.route
1150 } else { 1280 } else {
1151 data.flightRoute = this.routeList[val].route 1281 data.flightRoute = this.routeList[val].route
1152 data.routePriority = this.routeList[val].routePriority 1282 data.routePriority = this.routeList[val].routePriority
...@@ -1158,6 +1288,7 @@ export default { ...@@ -1158,6 +1288,7 @@ export default {
1158 this.$forceUpdate() 1288 this.$forceUpdate()
1159 this.msgSuccess('保存成功!') 1289 this.msgSuccess('保存成功!')
1160 this.infoForm.list[val] = this.dataHandle(res.data) 1290 this.infoForm.list[val] = this.dataHandle(res.data)
1291 + // this.getRouteDimension(this.getSreachData())
1161 } else { 1292 } else {
1162 this.msgWarning(res.msg) 1293 this.msgWarning(res.msg)
1163 } 1294 }
...@@ -1198,7 +1329,9 @@ export default { ...@@ -1198,7 +1329,9 @@ export default {
1198 }).catch(() => { 1329 }).catch(() => {
1199 this.loading = false 1330 this.loading = false
1200 }); 1331 });
1201 - }); 1332 + }).catch(() => {
1333 + this.loading = false
1334 + });;
1202 } 1335 }
1203 } else { 1336 } else {
1204 this.infoForm.list[val] = { 1337 this.infoForm.list[val] = {
...@@ -1210,10 +1343,10 @@ export default { ...@@ -1210,10 +1343,10 @@ export default {
1210 } 1343 }
1211 }, 1344 },
1212 //新增 1345 //新增
1213 - newRoute(val) { 1346 + newRoute(val, route, list) {
1214 this.infoForm.list[val].purposeOfFlightNo = this.infoForm.fltNo 1347 this.infoForm.list[val].purposeOfFlightNo = this.infoForm.fltNo
1215 this.infoForm.list[val].ruleDate = this.infoForm.fltDate 1348 this.infoForm.list[val].ruleDate = this.infoForm.fltDate
1216 - this.infoForm.list[val].flightRoute = this.routeList[val].route 1349 + this.infoForm.list[val].flightRoute = route
1217 this.infoForm.list[val].routePriority = this.routeList[val].routePriority 1350 this.infoForm.list[val].routePriority = this.routeList[val].routePriority
1218 this.infoForm.list[val].isLocation = '1' 1351 this.infoForm.list[val].isLocation = '1'
1219 this.infoForm.list[val].isDestinationSite = '1' 1352 this.infoForm.list[val].isDestinationSite = '1'
......
...@@ -47,8 +47,7 @@ ...@@ -47,8 +47,7 @@
47 </el-form-item> 47 </el-form-item>
48 </el-col> 48 </el-col>
49 </el-row> 49 </el-row>
50 - <el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading" 50 + <el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索
51 - @click="handleQuery">搜索
52 </el-button> 51 </el-button>
53 <el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 52 <el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
54 <el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" 53 <el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
...@@ -81,8 +80,8 @@ ...@@ -81,8 +80,8 @@
81 <Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader" 80 <Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader"
82 :order="true" :selection="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limitSize" 81 :order="true" :selection="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limitSize"
83 :page="queryParams.pageNum" :shiftKey="shiftKey" :height="tableHeight" :pageSizes="[20, 30, 40, 50, 100]" 82 :page="queryParams.pageNum" :shiftKey="shiftKey" :height="tableHeight" :pageSizes="[20, 30, 40, 50, 100]"
84 - @tableSelect="tableSelect" @tableSelectAll="tableSelectAll" @currentChange="currentChange" 83 + @tableSelect="tableSelect" @tableSelectAll="tableSelectAll" @currentChange="currentChange" @sortChange="sortChange"
85 - @sortChange="sortChange" @sizeChange="sizeChange"> 84 + @sizeChange="sizeChange">
86 <template slot="optionColumn"> 85 <template slot="optionColumn">
87 <el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center" 86 <el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center"
88 class-name="small-padding fixed-width" :fixed="tableHeader.length > 10 ? 'right' : false" width="160"> 87 class-name="small-padding fixed-width" :fixed="tableHeader.length > 10 ? 'right' : false" width="160">
...@@ -116,8 +115,8 @@ ...@@ -116,8 +115,8 @@
116 <el-row> 115 <el-row>
117 <el-col :span="12"> 116 <el-col :span="12">
118 <el-form-item label="航班日期" prop="fltDate"> 117 <el-form-item label="航班日期" prop="fltDate">
119 - <el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small" 118 + <el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small" v-model="form.fltDate"
120 - v-model="form.fltDate" type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期"> 119 + type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期">
121 </el-date-picker> 120 </el-date-picker>
122 </el-form-item> 121 </el-form-item>
123 </el-col> 122 </el-col>
...@@ -143,15 +142,15 @@ ...@@ -143,15 +142,15 @@
143 </el-tooltip> 142 </el-tooltip>
144 </div> 143 </div>
145 </template> 144 </template>
146 - <el-select v-if="routeMultiple" ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route" 145 + <el-select v-if="routeMultiple" ref="routeSelect" class="wid80" v-model="form.route"
147 - placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :loading="routeLoading" 146 + :disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange"
148 - :multiple='true' :key="routeMultiple"> 147 + :loading="routeLoading" :multiple='true' :key="routeMultiple">
149 <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> 148 <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
150 </el-option> 149 </el-option>
151 </el-select> 150 </el-select>
152 - <el-select v-if="routeMultiple == false" ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route" 151 + <el-select v-if="routeMultiple == false" ref="routeSelect" class="wid80" v-model="form.route"
153 - placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :loading="routeLoading" 152 + :disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange"
154 - :multiple='false' :key="routeMultiple"> 153 + :loading="routeLoading" :multiple='false' :key="routeMultiple">
155 <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> 154 <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
156 </el-option> 155 </el-option>
157 </el-select> 156 </el-select>
...@@ -188,8 +187,8 @@ ...@@ -188,8 +187,8 @@
188 <el-row> 187 <el-row>
189 <el-col :span="12"> 188 <el-col :span="12">
190 <el-form-item label="额外增重百分比" prop="extraWeightPercent"> 189 <el-form-item label="额外增重百分比" prop="extraWeightPercent">
191 - <el-input-number class="wid80" @change="LowHighAvailable" :precision="0" placeholder="请输入额外增重百分比" 190 + <el-input-number class="wid80" @change="LowHighAvailable" :min="0" :precision="0" placeholder="请输入额外增重百分比"
192 - v-model="form.extraWeightPercent"></el-input-number> 191 + v-model="form.extraWeightPercent" v-input-filter></el-input-number>
193 </el-form-item> 192 </el-form-item>
194 </el-col> 193 </el-col>
195 <el-col :span="12"> 194 <el-col :span="12">
...@@ -359,7 +358,7 @@ export default { ...@@ -359,7 +358,7 @@ export default {
359 route: [ 358 route: [
360 { 359 {
361 required: true, 360 required: true,
362 - message: "航班路线不能为空", 361 + message: "航班路线不能为空",
363 trigger: "change", 362 trigger: "change",
364 }, 363 },
365 // { 364 // {
...@@ -482,7 +481,7 @@ export default { ...@@ -482,7 +481,7 @@ export default {
482 shiftKey: false, 481 shiftKey: false,
483 }; 482 };
484 }, 483 },
485 - directives: { 484 + directives: {
486 // 处理加减天数 485 // 处理加减天数
487 "input-filter": { 486 "input-filter": {
488 bind: function (el, binding, { context }) { 487 bind: function (el, binding, { context }) {
...@@ -617,7 +616,7 @@ export default { ...@@ -617,7 +616,7 @@ export default {
617 this.routeLoading = false 616 this.routeLoading = false
618 if (res.code === 200) { 617 if (res.code === 200) {
619 this.routeList = res.data.list 618 this.routeList = res.data.list
620 - if(res.data.list.length == 0){ 619 + if (res.data.list.length == 0) {
621 this.form.route = ""; 620 this.form.route = "";
622 this.msgError("该航班没有设置航线"); 621 this.msgError("该航班没有设置航线");
623 } 622 }
...@@ -628,7 +627,7 @@ export default { ...@@ -628,7 +627,7 @@ export default {
628 this.routeLoading = false 627 this.routeLoading = false
629 console.log(err) 628 console.log(err)
630 }) 629 })
631 - }else{ 630 + } else {
632 this.form.route = ""; 631 this.form.route = "";
633 this.routeList = []; 632 this.routeList = [];
634 } 633 }
...@@ -639,15 +638,12 @@ export default { ...@@ -639,15 +638,12 @@ export default {
639 if (item.id == val) { 638 if (item.id == val) {
640 if (item.chineseName.indexOf('White') >= 0) { 639 if (item.chineseName.indexOf('White') >= 0) {
641 this.routeMultiple = false 640 this.routeMultiple = false
642 - // this.rules.route[0].type = 'string'
643 this.form.route = '' 641 this.form.route = ''
644 - // this.rules.route[0].required = true;
645 } else if (item.chineseName.indexOf('Purple') >= 0) { 642 } else if (item.chineseName.indexOf('Purple') >= 0) {
646 this.routeMultiple = true 643 this.routeMultiple = true
647 - // this.rules.route[0].type = 'array'
648 this.form.route = [] 644 this.form.route = []
649 - // this.rules.route[0].required = true;
650 } 645 }
646 + this.validateFieldForm()
651 } 647 }
652 }) 648 })
653 // this.$refs.routeSelect.$forceUpdate() 649 // this.$refs.routeSelect.$forceUpdate()
...@@ -730,9 +726,9 @@ export default { ...@@ -730,9 +726,9 @@ export default {
730 this.formdisabled.typeId = false; 726 this.formdisabled.typeId = false;
731 //原始重量 727 //原始重量
732 this.formdisabled.originalWeight = false; 728 this.formdisabled.originalWeight = false;
733 - this.$nextTick(()=>{ 729 + this.$nextTick(() => {
734 - this.$refs.form.clearValidate() 730 + this.$refs.form.clearValidate()
735 - }) 731 + })
736 }, 732 },
737 //计算高低价可配 733 //计算高低价可配
738 LowHighAvailable() { 734 LowHighAvailable() {
...@@ -899,14 +895,14 @@ export default { ...@@ -899,14 +895,14 @@ export default {
899 }) 895 })
900 }, 896 },
901 // 航班状态 897 // 航班状态
902 - flightState(multipleSelection, statusName){ 898 + flightState(multipleSelection, statusName) {
903 - let flightState = multipleSelection.some(item=>item.statusName == statusName); 899 + let flightState = multipleSelection.some(item => item.statusName == statusName);
904 - if(flightState){ 900 + if (flightState) {
905 - this.msgError(`勾选的航班,航班状态为${statusName},不可操作该按钮`); 901 + this.msgError(`勾选的航班,航班状态为${statusName},不可操作该按钮`);
906 - }else{ 902 + } else {
907 - flightState = false 903 + flightState = false
908 - } 904 + }
909 - return flightState 905 + return flightState
910 }, 906 },
911 /** 删除按钮操作 */ 907 /** 删除按钮操作 */
912 handleDelete(row) { 908 handleDelete(row) {
...@@ -914,8 +910,8 @@ export default { ...@@ -914,8 +910,8 @@ export default {
914 this.ids.forEach(item => { 910 this.ids.forEach(item => {
915 fIds.push(item.id) 911 fIds.push(item.id)
916 }); 912 });
917 - // 航班状态 913 + // 航班状态
918 - if(this.flightState(this.ids, "已删除")) return 914 + if (this.flightState(this.ids, "已删除")) return
919 this.$confirm("是否确认删除所选数据?", "警告", { 915 this.$confirm("是否确认删除所选数据?", "警告", {
920 confirmButtonText: "确定", 916 confirmButtonText: "确定",
921 cancelButtonText: "取消", 917 cancelButtonText: "取消",
...@@ -946,6 +942,7 @@ export default { ...@@ -946,6 +942,7 @@ export default {
946 }, 942 },
947 /** 提交按钮 */ 943 /** 提交按钮 */
948 submitForm: function () { 944 submitForm: function () {
945 + this.validateFieldForm()
949 this.$refs["form"].validate((valid) => { 946 this.$refs["form"].validate((valid) => {
950 if (valid) { 947 if (valid) {
951 let formdata = JSON.parse(JSON.stringify(this.form)); 948 let formdata = JSON.parse(JSON.stringify(this.form));
...@@ -1023,7 +1020,7 @@ export default { ...@@ -1023,7 +1020,7 @@ export default {
1023 //批量开启/关闭航班 1020 //批量开启/关闭航班
1024 handleFlightStatus(status) { 1021 handleFlightStatus(status) {
1025 // 航班状态 1022 // 航班状态
1026 -      if(this.flightState(this.ids, "已删除")) return 1023 + if (this.flightState(this.ids, "已删除")) return
1027 let handle = status == "flightStatus80" ? "关闭" : "开启"; 1024 let handle = status == "flightStatus80" ? "关闭" : "开启";
1028 let data = { 1025 let data = {
1029 updateIds: [], 1026 updateIds: [],
...@@ -1054,7 +1051,7 @@ export default { ...@@ -1054,7 +1051,7 @@ export default {
1054 //自动推送开关 1051 //自动推送开关
1055 autoPushBatch(status) { 1052 autoPushBatch(status) {
1056 // 航班状态 1053 // 航班状态
1057 -      if(this.flightState(this.ids, "已删除")) return 1054 + if (this.flightState(this.ids, "已删除")) return
1058 let msg = status == "open" ? "开启" : "关闭"; 1055 let msg = status == "open" ? "开启" : "关闭";
1059 let data = { 1056 let data = {
1060 updateIds: [], 1057 updateIds: [],
...@@ -1093,7 +1090,7 @@ export default { ...@@ -1093,7 +1090,7 @@ export default {
1093 //白名单配舱开关 1090 //白名单配舱开关
1094 whiteListSwitchStatus(val) { 1091 whiteListSwitchStatus(val) {
1095 // 航班状态 1092 // 航班状态
1096 -      if(this.flightState(this.ids, "已删除")) return 1093 + if (this.flightState(this.ids, "已删除")) return
1097 let obj = { 1094 let obj = {
1098 updateIds: [] 1095 updateIds: []
1099 } 1096 }
...@@ -1115,7 +1112,7 @@ export default { ...@@ -1115,7 +1112,7 @@ export default {
1115 //黑名单配舱开关 1112 //黑名单配舱开关
1116 BlackListSwitchStatus(val) { 1113 BlackListSwitchStatus(val) {
1117 // 航班状态 1114 // 航班状态
1118 -      if(this.flightState(this.ids, "已删除")) return 1115 + if (this.flightState(this.ids, "已删除")) return
1119 let obj = { 1116 let obj = {
1120 updateIds: [] 1117 updateIds: []
1121 } 1118 }
...@@ -1134,12 +1131,22 @@ export default { ...@@ -1134,12 +1131,22 @@ export default {
1134 console.log(err) 1131 console.log(err)
1135 }) 1132 })
1136 }, 1133 },
1134 + // 对部分表单字段进行校验的方法
1135 + validateFieldForm(){
1136 + this.$refs.form.validateField(['route'], (flag) => {})
1137 + if(this.form.route.length){
1138 + this.$nextTick(()=>{
1139 + this.$refs.form.clearValidate()
1140 + })
1141 + }
1142 + },
1137 //航线修改 1143 //航线修改
1138 routeChange(val) { 1144 routeChange(val) {
1145 + this.validateFieldForm()
1139 if(val.length){ 1146 if(val.length){
1140 - this.rules.route[0].required = false; 1147 + this.$nextTick(()=>{
1141 - }else{ 1148 + this.$refs.form.clearValidate()
1142 - // this.rules.route[0].required = true; 1149 + })
1143 } 1150 }
1144 this.$forceUpdate() 1151 this.$forceUpdate()
1145 }, 1152 },
......