Elements-SY

modify

...@@ -3,7 +3,7 @@ import request from '@/utils/request' ...@@ -3,7 +3,7 @@ import request from '@/utils/request'
3 //查询航班航线 3 //查询航班航线
4 //查询航线 4 //查询航线
5 /** 5 /**
6 - * @param fltNo 航班号 6 + * @param fltNo 航班号
7 */ 7 */
8 export function queryRouteByFltNo(data) { 8 export function queryRouteByFltNo(data) {
9 return request({ 9 return request({
...@@ -17,7 +17,7 @@ export function queryRouteByFltNo(data) { ...@@ -17,7 +17,7 @@ export function queryRouteByFltNo(data) {
17 /** 17 /**
18 * @param purposeOfFlightNo 航班号 18 * @param purposeOfFlightNo 航班号
19 * @param flightDate 航班日期 19 * @param flightDate 航班日期
20 - * @param status 状态 20 + * @param status 状态
21 * @param start 开始位置 * 21 * @param start 开始位置 *
22 * @param limit 每页长度 * 22 * @param limit 每页长度 *
23 */ 23 */
...@@ -121,15 +121,12 @@ export function saveOrUpdateSpecifyDateRoute(data) { ...@@ -121,15 +121,12 @@ export function saveOrUpdateSpecifyDateRoute(data) {
121 } 121 }
122 122
123 // id查询目的航班 123 // id查询目的航班
124 -export function findByFlightId(id) { 124 +export function findByFlightId(data) {
125 - const data = {
126 - id
127 - }
128 return request({ 125 return request({
129 - url: '/destinationFlight/findByFlightId', 126 + url: "/destinationFlight/findByFlightId",
130 - method: 'post', 127 + method: "post",
131 - data: data 128 + data: data,
132 - }) 129 + });
133 } 130 }
134 131
135 //航班号查航班 132 //航班号查航班
...@@ -142,4 +139,4 @@ export function findDestinationFltRuleByActualFlight(actualFlight) { ...@@ -142,4 +139,4 @@ export function findDestinationFltRuleByActualFlight(actualFlight) {
142 // method: 'post', 139 // method: 'post',
143 // data: data 140 // data: data
144 // }) 141 // })
145 -}
...\ No newline at end of file ...\ No newline at end of file
142 +}
......
...@@ -2,12 +2,35 @@ ...@@ -2,12 +2,35 @@
2 <el-card> 2 <el-card>
3 <div class="row"> 3 <div class="row">
4 <div class="col-6"> 4 <div class="col-6">
5 - <draggable class="list-group" tag="ul" v-model="routeList" v-bind="dragOptions" @start="dragStart" @end="dragEnd"> 5 + <draggable
6 + class="list-group"
7 + tag="ul"
8 + v-model="routeList"
9 + v-bind="dragOptions"
10 + @start="dragStart"
11 + @end="dragEnd"
12 + >
6 <transition-group type="transition" name="flip-list"> 13 <transition-group type="transition" name="flip-list">
7 - <li class="list-group-item" v-for="item in routeList" :key="item.routePriority"> 14 + <li
8 - <i :class="item.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin' 15 + class="list-group-item"
9 - " @click="item.fixed = !item.fixed" aria-hidden="true"></i> 16 + v-for="(item, i) in routeList"
10 - {{ item.route }} 17 + :key="item.route"
18 + >
19 + <i
20 + :class="
21 + item.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
22 + "
23 + @click="item.fixed = !item.fixed"
24 + aria-hidden="true"
25 + ></i>
26 + <span v-if="item.isEtesRoute == 'Y' || item.etesRule == 'Y'"
27 + ><i class="route-count">{{ ++i }}</i
28 + >{{ item.route }}ET86航线】</span
29 + >
30 + <span v-else
31 + ><i class="route-count">{{ ++i }}</i
32 + >{{ item.route }}</span
33 + >
11 </li> 34 </li>
12 </transition-group> 35 </transition-group>
13 </draggable> 36 </draggable>
...@@ -34,13 +57,13 @@ export default { ...@@ -34,13 +57,13 @@ export default {
34 animation: 200, 57 animation: 200,
35 group: "description", 58 group: "description",
36 disabled: false, 59 disabled: false,
37 - ghostClass: "ghost" 60 + ghostClass: "ghost",
38 - } 61 + };
39 }, 62 },
40 }, 63 },
41 }, 64 },
42 components: { 65 components: {
43 - draggable 66 + draggable,
44 }, 67 },
45 data() { 68 data() {
46 return {}; 69 return {};
...@@ -49,12 +72,12 @@ export default { ...@@ -49,12 +72,12 @@ export default {
49 methods: { 72 methods: {
50 // 排序 73 // 排序
51 sort() { 74 sort() {
52 - this.routeList = this.routeList.sort((a, b) => a.routePriority - b.routePriority); 75 + this.routeList = this.routeList.sort(
76 + (a, b) => a.routePriority - b.routePriority
77 + );
53 }, 78 },
54 // 开始拖拽 79 // 开始拖拽
55 - dragStart() { 80 + dragStart() {},
56 -
57 - },
58 // 结束拖拽 81 // 结束拖拽
59 dragEnd() { 82 dragEnd() {
60 this.$emit("dragEnd", this.routeList); 83 this.$emit("dragEnd", this.routeList);
...@@ -62,48 +85,44 @@ export default { ...@@ -62,48 +85,44 @@ export default {
62 }, 85 },
63 }; 86 };
64 </script> 87 </script>
65 -
66 <style lang="scss"> 88 <style lang="scss">
67 .el-card__body { 89 .el-card__body {
68 padding: 15px 10px 0px 10px !important; 90 padding: 15px 10px 0px 10px !important;
69 } 91 }
70 -
71 .list-group { 92 .list-group {
72 min-height: 20px; 93 min-height: 20px;
73 max-height: 150px; 94 max-height: 150px;
74 overflow: auto; 95 overflow: auto;
75 margin-top: 0; 96 margin-top: 0;
76 padding: 0; 97 padding: 0;
77 -
78 &::-webkit-scrollbar { 98 &::-webkit-scrollbar {
79 width: 7px; 99 width: 7px;
80 height: 7px; 100 height: 7px;
81 } 101 }
82 -
83 &::-webkit-scrollbar-track { 102 &::-webkit-scrollbar-track {
84 background-color: #fff; 103 background-color: #fff;
85 } 104 }
86 -
87 &::-webkit-scrollbar-thumb { 105 &::-webkit-scrollbar-thumb {
88 background-color: #ccc; 106 background-color: #ccc;
89 border-radius: 20px; 107 border-radius: 20px;
90 } 108 }
91 -
92 &::-webkit-scrollbar-thumb:hover { 109 &::-webkit-scrollbar-thumb:hover {
93 background-color: #409eff; 110 background-color: #409eff;
94 } 111 }
95 -
96 &::-webkit-scrollbar-track-piece { 112 &::-webkit-scrollbar-track-piece {
97 - background: #F2F6FC; 113 + background: #f2f6fc;
98 } 114 }
99 } 115 }
100 -
101 .list-group-item { 116 .list-group-item {
102 cursor: move; 117 cursor: move;
103 padding: 5px 0px; 118 padding: 5px 0px;
104 } 119 }
105 -
106 .list-group-item i { 120 .list-group-item i {
107 cursor: pointer; 121 cursor: pointer;
108 } 122 }
123 +.route-count {
124 + font-family: initial;
125 + font-style: inherit;
126 + margin-right: 15px;
127 +}
109 </style> 128 </style>
......
...@@ -20,221 +20,228 @@ ...@@ -20,221 +20,228 @@
20 :align="rowAlign" 20 :align="rowAlign"
21 :tag="rowTag" 21 :tag="rowTag"
22 > 22 >
23 - <el-col 23 + <span v-for="item in tempFormConfig" :key="item.name">
24 - v-for="item in tempFormConfig" 24 + <el-col
25 - :span="item.span" 25 + v-if="!item.hidden"
26 - :offset="item.offset" 26 + :span="item.span"
27 - :tag="item.tag" 27 + :offset="item.offset"
28 - :push="item.push" 28 + :tag="item.tag"
29 - :pull="item.pull" 29 + :push="item.push"
30 - :xs="item.xs" 30 + :pull="item.pull"
31 - :sm="item.sm" 31 + :xs="item.xs"
32 - :md="item.md" 32 + :sm="item.sm"
33 - :lg="item.lg" 33 + :md="item.md"
34 - :xl="item.xl" 34 + :lg="item.lg"
35 - :style="{ width: item.colWidth }" 35 + :xl="item.xl"
36 - :key="item.prop" 36 + :style="{ width: item.colWidth }"
37 - >
38 - <el-form-item
39 - :label="item.label"
40 - :prop="item.prop"
41 - :rules="item.rules"
42 - :label-width="item.labelWidth"
43 > 37 >
44 - <slot v-if="item.type === 'slot'"></slot> 38 + <el-form-item
45 - <!-- 输入框 --> 39 + :label="item.label"
46 - <el-input 40 + :prop="item.prop"
47 - v-if="item.type === 'Input'" 41 + :rules="item.rules"
48 - v-model.trim="tempQueryForm[item.prop]" 42 + :label-width="item.labelWidth"
49 - :style="{ width: item.inputWidth }"
50 - :disabled="item.disable"
51 - :placeholder="
52 - item.placeholder ? item.placeholder : '请输入' + item.label
53 - "
54 - v-on:[item.trigger]="
55 - (e) => {
56 - inputEvent(e, item);
57 - }
58 - "
59 - @keyup.enter.native="toEnterSearch"
60 - clearable
61 > 43 >
62 - </el-input> 44 + <slot v-if="item.type === 'slot'"></slot>
63 - <template v-if="view"> 45 + <!-- 输入框 -->
64 - <span v-text="tempQueryForm[item.prop]"></span> 46 + <el-input
65 - </template> 47 + v-if="item.type === 'Input'"
66 - <!-- 数字输入框 --> 48 + v-model.trim="tempQueryForm[item.prop]"
67 - <el-input 49 + :style="{ width: item.inputWidth }"
68 - v-if="item.type === 'inputNumber'" 50 + :disabled="item.disable"
69 - type="number" 51 + :placeholder="
70 - :min="item.min" 52 + item.placeholder ? item.placeholder : '请输入' + item.label
71 - :max="item.max" 53 + "
72 - v-model.trim="tempQueryForm[item.prop]" 54 + v-on:[item.trigger]="
73 - :style="{ width: item.inputWidth }" 55 + (e) => {
74 - :disabled="item.disable" 56 + inputEvent(e, item);
75 - :placeholder=" 57 + }
76 - item.placeholder ? item.placeholder : '请输入' + item.label 58 + "
77 - " 59 + @keyup.enter.native="toEnterSearch"
78 - v-on:keyup.enter="value = value.replace(/^-?[0-9]\d*$/, '')" 60 + clearable
79 - clearable 61 + >
80 - > 62 + </el-input>
81 - </el-input> 63 + <template v-if="view">
82 - <!-- InputNumber 计数器 --> 64 + <span v-text="tempQueryForm[item.prop]"></span>
83 - <el-input-number 65 + </template>
84 - v-if="item.type === 'Number'" 66 + <!-- 数字输入框 -->
85 - v-model.trim="tempQueryForm[item.prop]" 67 + <el-input
86 - :min="0" 68 + v-if="item.type === 'inputNumber'"
87 - :max="10" 69 + type="number"
88 - :size="item.size" 70 + :min="item.min"
89 - :style="{ width: item.inputWidth }" 71 + :max="item.max"
90 - label="描述文字" 72 + v-model.trim="tempQueryForm[item.prop]"
91 - ></el-input-number> 73 + :style="{ width: item.inputWidth }"
92 - 74 + :disabled="item.disable"
93 - <template v-if="view"> 75 + :placeholder="
94 - <span v-text="tempQueryForm[item.prop]"></span> 76 + item.placeholder ? item.placeholder : '请输入' + item.label
95 - </template> 77 + "
96 - 78 + v-on:keyup.enter="value = value.replace(/^-?[0-9]\d*$/, '')"
97 - <!-- 下拉选择 --> 79 + clearable
98 - <el-select
99 - v-if="item.type === 'Select'"
100 - :multiple="item.multiple"
101 - :filterable="item.filterable"
102 - v-model.trim="tempQueryForm[item.prop]"
103 - :style="{ width: item.inputWidth }"
104 - :disabled="item.disable"
105 - :loading="searchLoading"
106 - :placeholder="
107 - item.placeholder ? item.placeholder : '请选择' + item.label
108 - "
109 - clearable
110 - >
111 - <el-option
112 - v-for="op in item.options.data"
113 - :label="op[item.options.label] || op.label"
114 - :value="op[item.options.value] || op.value"
115 - :key="op[item.options.value] || op.value"
116 > 80 >
117 - </el-option> 81 + </el-input>
118 - </el-select> 82 + <!-- InputNumber 计数器 -->
83 + <el-input-number
84 + v-if="item.type === 'Number'"
85 + v-model.trim="tempQueryForm[item.prop]"
86 + :min="0"
87 + :max="10"
88 + :size="item.size"
89 + :style="{ width: item.inputWidth }"
90 + label="描述文字"
91 + ></el-input-number>
119 92
120 - <!-- 远程搜索 --> 93 + <template v-if="view">
121 - <template v-if="item.type === 'Search'"> 94 + <span v-text="tempQueryForm[item.prop]"></span>
122 - <el-autocomplete 95 + </template>
96 +
97 + <!-- 下拉选择 -->
98 + <el-select
99 + v-if="item.type === 'Select'"
100 + :multiple="item.multiple"
101 + :filterable="item.filterable"
123 v-model.trim="tempQueryForm[item.prop]" 102 v-model.trim="tempQueryForm[item.prop]"
124 :style="{ width: item.inputWidth }" 103 :style="{ width: item.inputWidth }"
125 - :debounce="1500" 104 + :disabled="item.disable"
126 - :fetch-suggestions="querySearchAsync" 105 + :loading="searchLoading"
127 :placeholder=" 106 :placeholder="
128 item.placeholder ? item.placeholder : '请选择' + item.label 107 item.placeholder ? item.placeholder : '请选择' + item.label
129 " 108 "
130 - @focus="focusKey(item)"
131 - @select="selectSearch"
132 clearable 109 clearable
133 - ></el-autocomplete> 110 + >
134 - </template> 111 + <el-option
112 + v-for="op in item.options.data"
113 + :label="op[item.options.label] || op.label"
114 + :value="op[item.options.value] || op.value"
115 + :key="op[item.options.value] || op.value"
116 + >
117 + </el-option>
118 + </el-select>
135 119
136 - <!-- 日期 --> 120 + <!-- 远程搜索 -->
137 - <el-date-picker 121 + <template v-if="item.type === 'Search'">
138 - v-if="item.type === 'Date'" 122 + <el-autocomplete
139 - v-model.trim="tempQueryForm[item.prop]" 123 + v-model.trim="tempQueryForm[item.prop]"
140 - :style="{ width: item.inputWidth }" 124 + :style="{ width: item.inputWidth }"
141 - :disabled="item.disable" 125 + :debounce="1500"
142 - :placeholder="item.placeholder ? item.placeholder : '请选择日期'" 126 + :fetch-suggestions="querySearchAsync"
143 - :value-format="item.format" 127 + :placeholder="
144 - clearable 128 + item.placeholder ? item.placeholder : '请选择' + item.label
145 - > 129 + "
146 - </el-date-picker> 130 + @focus="focusKey(item)"
131 + @select="selectSearch"
132 + clearable
133 + ></el-autocomplete>
134 + </template>
147 135
148 - <!-- 时间 --> 136 + <!-- 日期 -->
149 - <el-time-select 137 + <el-date-picker
150 - v-if="item.type === 'Time'" 138 + v-if="item.type === 'Date'"
151 - v-model.trim="tempQueryForm[item.prop]" 139 + v-model.trim="tempQueryForm[item.prop]"
152 - :style="{ width: item.inputWidth }" 140 + :style="{ width: item.inputWidth }"
153 - :disabled="item.disable" 141 + :disabled="item.disable"
154 - :placeholder="item.placeholder ? item.placeholder : '请选择时间'" 142 + :placeholder="
155 - clearable 143 + item.placeholder ? item.placeholder : '请选择日期'
156 - > 144 + "
157 - </el-time-select> 145 + :value-format="item.format"
146 + clearable
147 + >
148 + </el-date-picker>
158 149
159 - <!-- 日期时间 --> 150 + <!-- 时间 -->
160 - <el-date-picker 151 + <el-time-select
161 - v-if="item.type === 'DateTime'" 152 + v-if="item.type === 'Time'"
162 - type="datetime" 153 + v-model.trim="tempQueryForm[item.prop]"
163 - v-model.trim="tempQueryForm[item.prop]" 154 + :style="{ width: item.inputWidth }"
164 - :disabled="item.disable" 155 + :disabled="item.disable"
165 - :placeholder="item.placeholder ? item.placeholder : '请选择日期'" 156 + :placeholder="
166 - clearable 157 + item.placeholder ? item.placeholder : '请选择时间'
167 - > 158 + "
168 - </el-date-picker> 159 + clearable
160 + >
161 + </el-time-select>
169 162
170 - <!-- 日期范围 --> 163 + <!-- 日期时间 -->
171 - <el-date-picker 164 + <el-date-picker
172 - v-if="item.type === 'datetimerange'" 165 + v-if="item.type === 'DateTime'"
173 - type="datetimerange" 166 + type="datetime"
174 - v-model.trim="tempQueryForm[item.prop]" 167 + v-model.trim="tempQueryForm[item.prop]"
175 - :style="{ width: item.inputWidth }" 168 + :disabled="item.disable"
176 - :disabled="item.disable" 169 + :placeholder="
177 - range-separator="至" 170 + item.placeholder ? item.placeholder : '请选择日期'
178 - start-placeholder="开始日期" 171 + "
179 - end-placeholder="结束日期" 172 + clearable
180 - clearable 173 + >
181 - > 174 + </el-date-picker>
182 - </el-date-picker>
183 175
184 - <!-- 单选框 普通的样式 Radio 的尺寸,仅在 border 为真时有效--> 176 + <!-- 日期范围 -->
185 - <template v-if="item.type === 'radio'"> 177 + <el-date-picker
186 - <el-radio 178 + v-if="item.type === 'datetimerange'"
179 + type="datetimerange"
187 v-model.trim="tempQueryForm[item.prop]" 180 v-model.trim="tempQueryForm[item.prop]"
188 - v-for="op in item.options.data" 181 + :style="{ width: item.inputWidth }"
189 :disabled="item.disable" 182 :disabled="item.disable"
190 - :border="tempQueryForm[item.border]" 183 + range-separator="至"
191 - :size="tempQueryForm[item.size]" 184 + start-placeholder="开始日期"
192 - :label="op[item.options.label] || op.label" 185 + end-placeholder="结束日期"
193 - :value="op[item.options.value] || op.value" 186 + clearable
194 - :key="op[item.options.value] || op.value" 187 + >
195 - ></el-radio> 188 + </el-date-picker>
196 - </template>
197 189
198 - <!-- 单选框 按钮样式 --> 190 + <!-- 单选框 普通的样式 Radio 的尺寸,仅在 border 为真时有效-->
199 - <el-radio-group 191 + <template v-if="item.type === 'radio'">
200 - v-if="item.type === 'radioButtom'" 192 + <el-radio
201 - v-model.trim="tempQueryForm[item.prop]" 193 + v-model.trim="tempQueryForm[item.prop]"
202 - :size="tempQueryForm[item.size]" 194 + v-for="op in item.options.data"
203 - :disabled="item.disable" 195 + :disabled="item.disable"
204 - > 196 + :border="tempQueryForm[item.border]"
205 - <el-radio-button 197 + :size="tempQueryForm[item.size]"
206 - v-for="op in item.options.data" 198 + :label="op[item.options.label] || op.label"
207 - :label="op[item.options.label] || op.label" 199 + :value="op[item.options.value] || op.value"
208 - :value="op[item.options.value] || op.value" 200 + :key="op[item.options.value] || op.value"
209 - :key="op[item.options.value] || op.value" 201 + ></el-radio>
210 - ></el-radio-button> 202 + </template>
211 - </el-radio-group>
212 203
213 - <!-- 文本框 --> 204 + <!-- 单选框 按钮样式 -->
214 - <el-input 205 + <el-radio-group
215 - v-if="item.type === 'textarea'" 206 + v-if="item.type === 'radioButtom'"
216 - v-model.trim="tempQueryForm[item.prop]" 207 + v-model.trim="tempQueryForm[item.prop]"
217 - type="textarea" 208 + :size="tempQueryForm[item.size]"
218 - :style="{ width: item.inputWidth }" 209 + :disabled="item.disable"
219 - :disabled="item.disable" 210 + >
220 - :rows="item.row" 211 + <el-radio-button
221 - :autosize="item.autosize" 212 + v-for="op in item.options.data"
222 - :placeholder=" 213 + :label="op[item.options.label] || op.label"
223 - item.placeholder ? item.placeholder : '请输入' + item.label 214 + :value="op[item.options.value] || op.value"
224 - " 215 + :key="op[item.options.value] || op.value"
225 - clearable 216 + ></el-radio-button>
226 - > 217 + </el-radio-group>
227 - </el-input>
228 218
229 - <!-- 多选框 --> 219 + <!-- 文本框 -->
230 - <template v-if="item.type === 'Checkbox'"> 220 + <el-input
231 - <el-checkbox 221 + v-if="item.type === 'textarea'"
232 - v-model="tempQueryForm[item.prop]" 222 + v-model.trim="tempQueryForm[item.prop]"
233 - :disabled="item.disabled" 223 + type="textarea"
234 - ></el-checkbox> 224 + :style="{ width: item.inputWidth }"
235 - </template> 225 + :disabled="item.disable"
236 - </el-form-item> 226 + :rows="item.row"
237 - </el-col> 227 + :autosize="item.autosize"
228 + :placeholder="
229 + item.placeholder ? item.placeholder : '请输入' + item.label
230 + "
231 + clearable
232 + >
233 + </el-input>
234 +
235 + <!-- 多选框 -->
236 + <template v-if="item.type === 'Checkbox'">
237 + <el-checkbox
238 + v-model="tempQueryForm[item.prop]"
239 + :disabled="item.disabled"
240 + ></el-checkbox>
241 + </template>
242 + </el-form-item>
243 + </el-col>
244 + </span>
238 <!-- 查询按钮 de--> 245 <!-- 查询按钮 de-->
239 <span v-show="inline & hiddenFormBtn"> 246 <span v-show="inline & hiddenFormBtn">
240 <el-form-item v-show="show"> 247 <el-form-item v-show="show">
...@@ -458,6 +465,4 @@ export default { ...@@ -458,6 +465,4 @@ export default {
458 }, 465 },
459 }; 466 };
460 </script> 467 </script>
461 -<style lang="scss" scoped> 468 +<style lang="scss" scoped></style>
462 -
463 -</style>
......
...@@ -90,7 +90,7 @@ export const constantRoutes = [ ...@@ -90,7 +90,7 @@ export const constantRoutes = [
90 path: "/routeInfo", 90 path: "/routeInfo",
91 component: (resolve) => 91 component: (resolve) =>
92 require([ 92 require([
93 - "@/views/allocationConfig/flightAllocConfig/routeInfo", 93 + "@/views/allocationConfig/flightAllocConfig/flightRouteInfo",
94 ], resolve), 94 ], resolve),
95 name: "routeInfo", 95 name: "routeInfo",
96 meta: { title: "航班配舱", icon: "user" }, 96 meta: { title: "航班配舱", icon: "user" },
......
...@@ -471,50 +471,45 @@ export function restTableHeight($refs) { ...@@ -471,50 +471,45 @@ export function restTableHeight($refs) {
471 * }) 471 * })
472 */ 472 */
473 export function removeDuplicates(arr, keys) { 473 export function removeDuplicates(arr, keys) {
474 - const dict = {}; 474 + let duplicate, dateTime;
475 - const result = {
476 - repeat: [],
477 - unique: [],
478 - };
479 - let duplicate = keys;
480 if (typeof keys == "object") { 475 if (typeof keys == "object") {
481 duplicate = keys.duplicate; 476 duplicate = keys.duplicate;
477 + dateTime = keys.dateTime;
482 } 478 }
483 // 去重 479 // 去重
484 - result.unique = arr.reduce((res, currentValue) => { 480 + let map = new Map();
485 - if (!dict[currentValue[duplicate]]) { 481 + for (let i = 0; i < arr.length; i++) {
486 - dict[currentValue[duplicate]] = true; 482 + let item = arr[i];
487 - res.push(currentValue); 483 + if (
488 - } else { 484 + !map.has(item[duplicate]) ||
489 - result.repeat.push(currentValue); 485 + new Date(map.get(item[duplicate])[dateTime]) < new Date(item[dateTime])
486 + ) {
487 + map.set(item[duplicate], item);
490 } 488 }
491 - return res; 489 + }
492 - }, []); 490 + const result = Array.from(map.values());
493 // 返回去重结果 491 // 返回去重结果
494 if (typeof keys == "string") return result; 492 if (typeof keys == "string") return result;
495 // 排序 493 // 排序
496 if (typeof keys == "object") { 494 if (typeof keys == "object") {
497 if (keys.sort) { 495 if (keys.sort) {
498 if (keys.sortType.toLowerCase().trim() == "number") { 496 if (keys.sortType.toLowerCase().trim() == "number") {
499 - if (result.repeat.length) { 497 + if (result.length) {
500 - result.repeat = sortFn("repeat"); 498 + result = sortFn();
501 - }
502 - if (result.unique.length) {
503 - result.unique = sortFn("unique");
504 } 499 }
505 // 返回排序去重结果 500 // 返回排序去重结果
506 } 501 }
507 } 502 }
508 - return result; 503 + return result;
509 } 504 }
510 // 排序方法 505 // 排序方法
511 - function sortFn(attr) { 506 + function sortFn() {
512 - if (isNaN(Number(result[attr][0][keys.sortAttr]))) { 507 + if (isNaN(Number(result[0][keys.sortAttr]))) {
513 - return result[attr].sort((a, b) => 508 + return result.sort((a, b) =>
514 a[keys.sortAttr].localeCompare(b[keys.sortAttr]) 509 a[keys.sortAttr].localeCompare(b[keys.sortAttr])
515 ); // 按字母排序 510 ); // 按字母排序
516 } else { 511 } else {
517 - return result[attr].sort((a, b) => a[keys.sortAttr] - b[keys.sortAttr]); // 按数字排序 512 + return result.sort((a, b) => a[keys.sortAttr] - b[keys.sortAttr]); // 按数字排序
518 } 513 }
519 } 514 }
520 } 515 }
......
...@@ -5,418 +5,436 @@ ...@@ -5,418 +5,436 @@
5 accordion 5 accordion
6 v-model="activeNames" 6 v-model="activeNames"
7 @change="collapseChange" 7 @change="collapseChange"
8 + v-loading="loading"
8 > 9 >
9 - <el-collapse-item 10 + <div
11 + class="collapse-item-header"
10 v-for="(item, index) in routesInfo" 12 v-for="(item, index) in routesInfo"
11 :key="item.route" 13 :key="item.route"
12 - :name="index"
13 > 14 >
14 - <!-- 航线名 --> 15 + <el-collapse-item :name="index" v-if="showFlightRoute(item)">
15 - <template slot="title"> 16 + <!-- 航线名 -->
16 - <strong>{{ item.route }}</strong> 17 + <template slot="title">
17 - </template> 18 + <strong>{{ item.route }}</strong>
18 - <!-- 航线设置信息 --> 19 + </template>
19 - <div class="route-info info-item"> 20 + <!-- 航线设置信息 -->
20 - <el-card class="route-info-card"> 21 + <div class="route-info info-item">
21 - <!-- 有数据时 --> 22 + <el-card class="route-info-card">
22 - <section v-if="item.config"> 23 + <!-- 有数据时 -->
23 - <div slot="header" class="route-config-header"> 24 + <section v-if="item.config">
24 - <el-button 25 + <div slot="header" class="route-config-header">
25 - type="primary" 26 + <el-button
26 - size="mini" 27 + type="primary"
27 - :disabled="item.status == '3' || status" 28 + size="mini"
28 - :loading="item.loading" 29 + :disabled="pageName || item.status == '3' || status"
29 - >保 存</el-button 30 + :loading="item.loading"
30 - > 31 + @click="saveSubmit(item)"
31 - <el-button 32 + >保 存</el-button
32 - v-if="showBtnRule(item)" 33 + >
33 - type="primary" 34 + <el-button
34 - size="mini" 35 + v-if="showBtnRule(item)"
35 - icon="el-icon-video-pause" 36 + type="primary"
36 - :loading="item.loading" 37 + size="mini"
37 - :disabled="status" 38 + icon="el-icon-video-pause"
38 - >{{ item.status | statusBtn }}</el-button 39 + :loading="item.loading"
39 - > 40 + :disabled="pageName || status"
40 - <el-button 41 + @click="onOffSubmit(item)"
41 - v-if="showBtnRule(item)" 42 + >{{ item.status | statusBtn }}</el-button
42 - type="danger" 43 + >
43 - size="mini" 44 + <el-button
44 - icon="el-icon-delete" 45 + v-if="showBtnRule(item)"
45 - :disabled="item.status !== '3' || status" 46 + type="danger"
46 - :loading="item.loading" 47 + size="mini"
47 - >删 除</el-button 48 + icon="el-icon-delete"
48 - > 49 + :disabled="pageName || item.status !== '3' || status"
49 - <span class="flight-route-title"> 50 + :loading="item.loading"
50 - {{ item.ruleDate ? "日期级别规则" : "普通规则" }}</span 51 + @click="deleteSubmit(item)"
51 - > 52 + >删 除</el-button
52 - </div> 53 + >
53 - <el-divider></el-divider> 54 + <span class="flight-route-title">
54 - <div class="route-config-info"> 55 + {{ item.ruleDate ? "日期级别规则" : "普通规则" }}</span
55 - <el-form label-position="right" label-width="120px"> 56 + >
56 - <el-row> 57 + </div>
57 - <el-col :span="24"> 58 + <el-divider></el-divider>
58 - <el-form-item label="始发站"> 59 + <div class="route-config-info">
59 - <el-col :span="2"> 60 + <el-form label-position="right" label-width="120px">
60 - <el-radio-group 61 + <el-row>
61 - v-model="item.isLocation" 62 + <el-col :span="24">
62 - @change="changeLocation" 63 + <el-form-item label="始发站">
63 - :disabled="status" 64 + <el-col :span="2">
64 - > 65 + <el-radio-group
65 - <el-radio label="1">包含始发站</el-radio> 66 + v-model="item.isLocation"
66 - <el-radio label="2">不包含始发站</el-radio> 67 + @change="changeLocation"
67 - </el-radio-group> 68 + :disabled="pageName || status"
68 - </el-col> 69 + >
69 - <el-col :span="10"> 70 + <el-radio label="1">包含始发站</el-radio>
70 - <el-input 71 + <el-radio label="2">不包含始发站</el-radio>
71 - v-if="item.isLocation == '1'" 72 + </el-radio-group>
72 - :disabled="status" 73 + </el-col>
73 - type="textarea"
74 - v-model="item.location"
75 - :rows="4"
76 - placeholder="始发站之间用回车符分隔"
77 - style="width: 500px"
78 - >
79 - </el-input>
80 - <el-input
81 - v-else
82 - :disabled="status"
83 - type="textarea"
84 - v-model="item.notLocation"
85 - :rows="4"
86 - placeholder="始发站之间用回车符分隔"
87 - style="width: 500px"
88 - >
89 - </el-input>
90 - </el-col>
91 - </el-form-item>
92 - </el-col>
93 - <el-col :span="24">
94 - <el-form-item label="目的站">
95 - <el-col :span="2">
96 - <el-radio-group
97 - :disabled="status"
98 - v-model="item.isDestinationSite"
99 - @change="changeDestinationSite"
100 - >
101 - <el-radio label="1">包含目的站</el-radio>
102 - <el-radio label="2">不包含目的站</el-radio>
103 - </el-radio-group>
104 - </el-col>
105 - <el-col :span="10">
106 - <el-input
107 - v-if="item.isDestinationSite == '1'"
108 - :disabled="status"
109 - type="textarea"
110 - v-model="item.destinationSite"
111 - :rows="4"
112 - placeholder="目的站之间用回车符分隔"
113 - style="width: 500px"
114 - >
115 - </el-input>
116 - <el-input
117 - v-else
118 - :disabled="status"
119 - type="textarea"
120 - v-model="item.notDestinationSite"
121 - :rows="4"
122 - placeholder="目的站之间用回车符分隔"
123 - style="width: 500px"
124 - >
125 - </el-input>
126 - </el-col>
127 - </el-form-item>
128 - </el-col>
129 - <el-col :span="24">
130 - <el-col :span="10">
131 - <el-form-item label="URSA包含">
132 - <el-input
133 - :disabled="status"
134 - type="textarea"
135 - v-model="item.includeUrsa"
136 - :rows="4"
137 - placeholder="URSA之间用分号分隔,例:F2;F3;P_"
138 - >
139 - </el-input>
140 - </el-form-item>
141 - </el-col>
142 - <el-col :span="10">
143 - <el-form-item label="URSA不包含">
144 - <el-input
145 - :disabled="status"
146 - type="textarea"
147 - v-model="item.notIncludeUrsa"
148 - :rows="4"
149 - placeholder="URSA之间用分号分隔,例:F2;F3;P_"
150 - >
151 - </el-input>
152 - </el-form-item>
153 - </el-col>
154 - </el-col>
155 - <el-col :span="24">
156 - <el-col :span="9">
157 - <el-form-item label="件数">
158 <el-col :span="10"> 74 <el-col :span="10">
159 <el-input 75 <el-input
160 - :disabled="status" 76 + v-if="item.isLocation == '1'"
161 - class="numberInput" 77 + :disabled="pageName || status"
162 - v-model.trim="item.minNumOfPieces" 78 + type="textarea"
79 + v-model="item.location"
80 + :rows="4"
81 + placeholder="始发站之间用回车符分隔"
82 + style="width: 500px"
163 > 83 >
164 </el-input> 84 </el-input>
165 - <span
166 - ref="minNumOfPieces"
167 - class="el-form-item__error"
168 - ></span>
169 - </el-col>
170 - <el-col style="text-align: center" :span="1"
171 - >-</el-col
172 - >
173 - <el-col :span="10">
174 <el-input 85 <el-input
175 - :disabled="status" 86 + v-else
176 - class="numberInput" 87 + :disabled="pageName || status"
177 - v-model.trim="item.maxNumOfPieces" 88 + type="textarea"
89 + v-model="item.notLocation"
90 + :rows="4"
91 + placeholder="始发站之间用回车符分隔"
92 + style="width: 500px"
178 > 93 >
179 </el-input> 94 </el-input>
180 </el-col> 95 </el-col>
181 </el-form-item> 96 </el-form-item>
182 </el-col> 97 </el-col>
183 - <el-col :span="9"> 98 + <el-col :span="24">
184 - <el-form-item label="重量(KG)"> 99 + <el-form-item label="目的站">
100 + <el-col :span="2">
101 + <el-radio-group
102 + :disabled="pageName || status"
103 + v-model="item.isDestinationSite"
104 + @change="changeDestinationSite"
105 + >
106 + <el-radio label="1">包含目的站</el-radio>
107 + <el-radio label="2">不包含目的站</el-radio>
108 + </el-radio-group>
109 + </el-col>
185 <el-col :span="10"> 110 <el-col :span="10">
186 <el-input 111 <el-input
187 - :disabled="status" 112 + v-if="item.isDestinationSite == '1'"
188 - class="numberInput" 113 + :disabled="pageName || status"
189 - v-model.trim="item.minWeight" 114 + type="textarea"
115 + v-model="item.destinationSite"
116 + :rows="4"
117 + placeholder="目的站之间用回车符分隔"
118 + style="width: 500px"
190 > 119 >
191 </el-input> 120 </el-input>
192 - <span
193 - ref="minWeight"
194 - class="el-form-item__error"
195 - ></span>
196 - </el-col>
197 - <el-col style="text-align: center" :span="1"
198 - >-</el-col
199 - >
200 - <el-col :span="10">
201 <el-input 121 <el-input
202 - :disabled="status" 122 + v-else
203 - class="numberInput" 123 + :disabled="pageName || status"
204 - v-model.trim="item.maxWeight" 124 + type="textarea"
125 + v-model="item.notDestinationSite"
126 + :rows="4"
127 + placeholder="目的站之间用回车符分隔"
128 + style="width: 500px"
205 > 129 >
206 </el-input> 130 </el-input>
207 </el-col> 131 </el-col>
208 </el-form-item> 132 </el-form-item>
209 </el-col> 133 </el-col>
210 - </el-col> 134 + <el-col :span="24">
211 - <el-col :span="24"> 135 + <el-col :span="10">
212 - <el-form-item label="申报类别"> 136 + <el-form-item label="URSA包含">
213 - <el-card shadow="never" style="width: 95%"> 137 + <el-input
214 - <el-checkbox-group 138 + :disabled="pageName || status"
215 - :disabled="status" 139 + type="textarea"
216 - v-model="item.typeOfGoods" 140 + v-model="item.includeUrsa"
217 - @change="changeCargoType" 141 + :rows="4"
218 - > 142 + placeholder="URSA之间用分号分隔,例:F2;F3;P_"
219 - <el-row> 143 + >
220 - <el-col 144 + </el-input>
221 - v-for="item in cargoType" 145 + </el-form-item>
222 - :span="2" 146 + </el-col>
223 - :key="item.id" 147 + <el-col :span="10">
148 + <el-form-item label="URSA不包含">
149 + <el-input
150 + :disabled="pageName || status"
151 + type="textarea"
152 + v-model="item.notIncludeUrsa"
153 + :rows="4"
154 + placeholder="URSA之间用分号分隔,例:F2;F3;P_"
155 + >
156 + </el-input>
157 + </el-form-item>
158 + </el-col>
159 + </el-col>
160 + <el-col :span="24">
161 + <el-col :span="9">
162 + <el-form-item label="件数">
163 + <el-col :span="10">
164 + <el-input
165 + :disabled="pageName || status"
166 + class="numberInput"
167 + v-model.trim="item.minNumOfPieces"
168 + placeholder="最少件数"
169 + >
170 + </el-input>
171 + <span
172 + ref="minNumOfPieces"
173 + class="el-form-item__error"
174 + ></span>
175 + </el-col>
176 + <el-col style="text-align: center" :span="1"
177 + >-</el-col
178 + >
179 + <el-col :span="10">
180 + <el-input
181 + :disabled="pageName || status"
182 + class="numberInput"
183 + v-model.trim="item.maxNumOfPieces"
184 + placeholder="最多件数"
185 + >
186 + </el-input>
187 + </el-col>
188 + </el-form-item>
189 + </el-col>
190 + <el-col :span="9">
191 + <el-form-item label="重量(KG)">
192 + <el-col :span="10">
193 + <el-input
194 + :disabled="pageName || status"
195 + class="numberInput"
196 + v-model.trim="item.minWeight"
197 + placeholder="最小重量"
198 + >
199 + </el-input>
200 + <span
201 + ref="minWeight"
202 + class="el-form-item__error"
203 + ></span>
204 + </el-col>
205 + <el-col style="text-align: center" :span="1"
206 + >-</el-col
207 + >
208 + <el-col :span="10">
209 + <el-input
210 + :disabled="pageName || status"
211 + class="numberInput"
212 + v-model.trim="item.maxWeight"
213 + placeholder="最大重量"
224 > 214 >
225 - <el-checkbox 215 + </el-input>
226 - :label="item.chineseName" 216 + </el-col>
227 - :name="item.chineseName" 217 + </el-form-item>
228 - :key="item.code" 218 + </el-col>
219 + </el-col>
220 + <el-col :span="24">
221 + <el-form-item label="申报类别">
222 + <el-card shadow="never" style="width: 95%">
223 + <el-checkbox-group
224 + :disabled="pageName || status"
225 + v-model="item.typeOfGoods"
226 + @change="changeCargoType"
227 + >
228 + <el-row>
229 + <el-col
230 + v-for="item in cargoType"
231 + :span="2"
232 + :key="item.id"
229 > 233 >
230 - <Tooltips 234 + <el-checkbox
231 - :content="item.chineseName" 235 + v-if="item.status === 1"
232 - :refName="item.code" 236 + :label="item.chineseName"
237 + :name="item.chineseName"
238 + :key="item.code"
233 > 239 >
234 - </Tooltips> 240 + <Tooltips
235 - </el-checkbox> 241 + :content="item.chineseName"
236 - </el-col> 242 + :refName="item.code"
237 - </el-row> 243 + >
238 - </el-checkbox-group> 244 + </Tooltips>
239 - </el-card> 245 + </el-checkbox>
240 - </el-form-item> 246 + </el-col>
241 - </el-col> 247 + </el-row>
242 - <el-col :span="24"> 248 + </el-checkbox-group>
243 - <el-form-item label="货物类型"> 249 + </el-card>
244 - <el-card shadow="never" style="width: 95%"> 250 + </el-form-item>
245 - <el-checkbox-group 251 + </el-col>
246 - :disabled="status" 252 + <el-col :span="24">
247 - v-model="item.cargoType" 253 + <el-form-item label="货物类型">
248 - @change="changeCargoStatus" 254 + <el-card shadow="never" style="width: 95%">
249 - > 255 + <el-checkbox-group
250 - <el-row> 256 + :disabled="pageName || status"
251 - <el-col 257 + v-model="item.cargoType"
252 - :span="3" 258 + @change="changeCargoStatus"
253 - v-for="item in cargoStatus" 259 + >
254 - :key="item.id" 260 + <el-row>
255 - > 261 + <el-col
256 - <el-checkbox 262 + :span="3"
257 - :label="item.chineseName" 263 + v-for="item in cargoStatus"
258 - :name="item.chineseName" 264 + :key="item.id"
259 - :key="item.code"
260 - disabled
261 > 265 >
262 - <Tooltips 266 + <el-checkbox
263 - :content="item.chineseName" 267 + v-if="item.status === 1"
264 - :refName="item.code" 268 + :label="item.chineseName"
269 + :name="item.chineseName"
270 + :key="item.code"
271 + disabled
265 > 272 >
266 - </Tooltips> 273 + <Tooltips
267 - </el-checkbox> 274 + :content="item.chineseName"
268 - </el-col> 275 + :refName="item.code"
269 - </el-row> 276 + >
270 - </el-checkbox-group> 277 + </Tooltips>
271 - </el-card> 278 + </el-checkbox>
272 - </el-form-item> 279 + </el-col>
273 - </el-col> 280 + </el-row>
274 - <el-col :span="24"> 281 + </el-checkbox-group>
275 - <el-form-item label="取件扫描号"> 282 + </el-card>
276 - <el-card shadow="never" style="width: 95%"> 283 + </el-form-item>
277 - <el-checkbox-group 284 + </el-col>
278 - :disabled="status" 285 + <el-col :span="24">
279 - v-model="item.puporpuxCode" 286 + <el-form-item label="取件扫描号">
280 - @change="changePuporpux" 287 + <el-card shadow="never" style="width: 95%">
281 - > 288 + <el-checkbox-group
282 - <el-row> 289 + :disabled="pageName || status"
283 - <el-col 290 + v-model="item.puporpuxCode"
284 - :span="2" 291 + @change="changePuporpux"
285 - v-for="item in puporpux" 292 + >
286 - :key="item.id" 293 + <el-row>
287 - > 294 + <el-col
288 - <el-checkbox 295 + :span="2"
289 - :label="item.chineseName" 296 + v-for="item in puporpux"
290 - :name="item.chineseName" 297 + :key="item.id"
291 - :key="item.code"
292 > 298 >
293 - <Tooltips 299 + <el-checkbox
294 - :content="item.chineseName" 300 + v-if="item.status === 1"
295 - :refName="item.code" 301 + :label="item.chineseName"
302 + :name="item.chineseName"
303 + :key="item.code"
296 > 304 >
297 - </Tooltips> 305 + <Tooltips
298 - </el-checkbox> 306 + :content="item.chineseName"
299 - </el-col> 307 + :refName="item.code"
300 - </el-row> 308 + >
301 - </el-checkbox-group> 309 + </Tooltips>
302 - </el-card> 310 + </el-checkbox>
303 - </el-form-item> 311 + </el-col>
304 - </el-col> 312 + </el-row>
305 - <el-col :span="24"> 313 + </el-checkbox-group>
306 - <el-form-item label="Service Code"> 314 + </el-card>
307 - <el-card shadow="never" style="width: 95%"> 315 + </el-form-item>
308 - <el-checkbox-group 316 + </el-col>
309 - :disabled="status" 317 + <el-col :span="24">
310 - v-model="item.serviceCode" 318 + <el-form-item label="Service Code">
311 - @change="changeServiceCode" 319 + <el-card shadow="never" style="width: 95%">
312 - > 320 + <el-checkbox-group
313 - <el-row> 321 + :disabled="pageName || status"
314 - <el-col 322 + v-model="item.serviceCode"
315 - :span="2" 323 + @change="changeServiceCode"
316 - v-for="item in serviceCode" 324 + >
317 - :key="item.id" 325 + <el-row>
318 - > 326 + <el-col
319 - <el-checkbox 327 + :span="2"
320 - :label="item.chineseName" 328 + v-for="item in serviceCode"
321 - :name="item.chineseName" 329 + :key="item.id"
322 - :key="item.code"
323 > 330 >
324 - <Tooltips 331 + <el-checkbox
325 - :content="item.chineseName" 332 + v-if="item.status === 1"
326 - :refName="item.code" 333 + :label="item.chineseName"
334 + :name="item.chineseName"
335 + :key="item.code"
327 > 336 >
328 - </Tooltips> 337 + <Tooltips
329 - </el-checkbox> 338 + :content="item.chineseName"
330 - </el-col> 339 + :refName="item.code"
331 - </el-row> 340 + >
332 - </el-checkbox-group> 341 + </Tooltips>
333 - </el-card> 342 + </el-checkbox>
334 - </el-form-item> 343 + </el-col>
335 - </el-col> 344 + </el-row>
336 - <el-col :span="24"> 345 + </el-checkbox-group>
337 - <el-form-item label="Handling Code"> 346 + </el-card>
338 - <el-card shadow="never" style="width: 95%"> 347 + </el-form-item>
339 - <el-checkbox-group 348 + </el-col>
340 - :disabled="status" 349 + <el-col :span="24">
341 - v-model="item.handlingCode" 350 + <el-form-item label="Handling Code">
342 - @change="changeHandlingCode" 351 + <el-card shadow="never" style="width: 95%">
343 - > 352 + <el-checkbox-group
344 - <el-row> 353 + :disabled="pageName || status"
345 - <el-col 354 + v-model="item.handlingCode"
346 - :span="2" 355 + @change="changeHandlingCode"
347 - v-for="item in handlingCode" 356 + >
348 - :key="item.id" 357 + <el-row>
349 - > 358 + <el-col
350 - <el-checkbox 359 + :span="2"
351 - :label="item.chineseName" 360 + v-for="item in handlingCode"
352 - :name="item.chineseName" 361 + :key="item.id"
353 - :key="item.code"
354 > 362 >
355 - <Tooltips 363 + <el-checkbox
356 - :content="item.chineseName" 364 + v-if="item.status === 1"
357 - :refName="item.code" 365 + :label="item.chineseName"
366 + :name="item.chineseName"
367 + :key="item.code"
358 > 368 >
359 - </Tooltips> 369 + <Tooltips
360 - </el-checkbox> 370 + :content="item.chineseName"
361 - </el-col> 371 + :refName="item.code"
362 - </el-row> 372 + >
363 - </el-checkbox-group> 373 + </Tooltips>
364 - </el-card> 374 + </el-checkbox>
365 - </el-form-item> 375 + </el-col>
366 - </el-col> 376 + </el-row>
367 - <el-col :span="24"> 377 + </el-checkbox-group>
368 - <el-form-item label="Sub Category"> 378 + </el-card>
369 - <el-card shadow="never" style="width: 95%"> 379 + </el-form-item>
370 - <el-checkbox-group 380 + </el-col>
371 - :disabled="status" 381 + <el-col :span="24">
372 - v-model="item.subCategory" 382 + <el-form-item label="Sub Category">
373 - @change="changeSubCategory" 383 + <el-card shadow="never" style="width: 95%">
374 - > 384 + <el-checkbox-group
375 - <el-row> 385 + :disabled="pageName || status"
376 - <el-col 386 + v-model="item.subCategory"
377 - :span="2" 387 + @change="changeSubCategory"
378 - v-for="item in subCategory" 388 + >
379 - :key="item.id" 389 + <el-row>
380 - > 390 + <el-col
381 - <el-checkbox 391 + :span="2"
382 - :label="item.chineseName" 392 + v-for="item in subCategory"
383 - :name="item.chineseName" 393 + :key="item.id"
384 - :key="item.code"
385 > 394 >
386 - <Tooltips 395 + <el-checkbox
387 - :content="item.chineseName" 396 + v-if="item.status === 1"
388 - :refName="item.code" 397 + :label="item.chineseName"
398 + :name="item.chineseName"
399 + :key="item.code"
389 > 400 >
390 - </Tooltips> 401 + <Tooltips
391 - </el-checkbox> 402 + :content="item.chineseName"
392 - </el-col> 403 + :refName="item.code"
393 - </el-row> 404 + >
394 - </el-checkbox-group> 405 + </Tooltips>
395 - </el-card> 406 + </el-checkbox>
396 - </el-form-item> 407 + </el-col>
397 - </el-col> 408 + </el-row>
398 - </el-row> 409 + </el-checkbox-group>
399 - </el-form> 410 + </el-card>
411 + </el-form-item>
412 + </el-col>
413 + </el-row>
414 + </el-form>
415 + </div>
416 + </section>
417 + <!-- 没有数据时 -->
418 + <div class="no-data" v-else>
419 + <el-empty description="未设置规则!">
420 + <el-button
421 + type="primary"
422 + size="small"
423 + :disabled="pageName"
424 + @click="addRouteRule(index)"
425 + >新增规则</el-button
426 + >
427 + </el-empty>
400 </div> 428 </div>
401 - </section> 429 + </el-card>
402 - <!-- 没有数据时 --> 430 + </div>
403 - <div class="no-data" v-else> 431 + </el-collapse-item>
404 - <el-empty description="未设置规则!"> 432 + </div>
405 - <el-button
406 - type="primary"
407 - size="small"
408 - @click="addRouteRule(index)"
409 - >新增规则</el-button
410 - >
411 - </el-empty>
412 - </div>
413 - </el-card>
414 - </div>
415 - </el-collapse-item>
416 </el-collapse> 433 </el-collapse>
417 </div> 434 </div>
418 </template> 435 </template>
419 <script> 436 <script>
437 +// import { inputBlurValidate } from "@/utils/mixins";
420 export default { 438 export default {
421 name: "routeInfo", 439 name: "routeInfo",
422 props: { 440 props: {
...@@ -460,17 +478,32 @@ export default { ...@@ -460,17 +478,32 @@ export default {
460 type: Boolean, 478 type: Boolean,
461 default: false, 479 default: false,
462 }, 480 },
481 + loading: {
482 + // 折叠面板
483 + type: Boolean,
484 + default: false,
485 + },
463 }, 486 },
487 + // mixins: [inputBlurValidate],
464 data() { 488 data() {
465 return { 489 return {
466 activeNames: [0], // 展开指定项 490 activeNames: [0], // 展开指定项
467 }; 491 };
468 }, 492 },
469 - computed: {}, 493 + computed: {
494 + pageName() {
495 + if (
496 + this.$route.query.pageName == "dmLog" ||
497 + this.$route.query.pageName == "flightRandConfig" ||
498 + this.$route.query.dataStatus == "view"
499 + ) {
500 + return true;
501 + }
502 + },
503 + },
470 filters: { 504 filters: {
471 // 状态:0 无效,1 有效 2 配置中 3 停用 505 // 状态:0 无效,1 有效 2 配置中 3 停用
472 statusBtn(status) { 506 statusBtn(status) {
473 - // console.log(this)
474 if (status == "0") { 507 if (status == "0") {
475 return "无 效"; 508 return "无 效";
476 } else if (status == "1") { 509 } else if (status == "1") {
...@@ -484,6 +517,15 @@ export default { ...@@ -484,6 +517,15 @@ export default {
484 }, 517 },
485 mounted() {}, 518 mounted() {},
486 methods: { 519 methods: {
520 + // 航线回显逻辑:如果航线无效并且没有数据,则不展示该航线
521 + showFlightRoute(item) {
522 + if (this.$route.query.status == "3" && item.config == false) {
523 + return false;
524 + } else {
525 + return true;
526 + }
527 + },
528 + // 航线操作按钮回显逻辑
487 showBtnRule(item) { 529 showBtnRule(item) {
488 /* 530 /*
489 展示保存按钮、开启按钮/停用按钮、删除按钮逻辑如下: 531 展示保存按钮、开启按钮/停用按钮、删除按钮逻辑如下:
...@@ -498,7 +540,10 @@ export default { ...@@ -498,7 +540,10 @@ export default {
498 */ 540 */
499 if (item.status == "3" || (item.status == "1" && item.ruleDate)) { 541 if (item.status == "3" || (item.status == "1" && item.ruleDate)) {
500 return true; 542 return true;
501 - } else if (item.status == "1" && this.$route.query.querySpecifyData == "2") { 543 + } else if (
544 + item.status == "1" &&
545 + this.$route.query.querySpecifyData == "2"
546 + ) {
502 // 航班配舱设置非日期级别情况下 547 // 航班配舱设置非日期级别情况下
503 return true; 548 return true;
504 } else if (item.status == "2") { 549 } else if (item.status == "2") {
...@@ -547,36 +592,70 @@ export default { ...@@ -547,36 +592,70 @@ export default {
547 addRouteRule(index) { 592 addRouteRule(index) {
548 this.$emit("addRlue", index); 593 this.$emit("addRlue", index);
549 }, 594 },
595 + // 保存
596 + saveSubmit(item) {
597 + this.$emit("save", item);
598 + },
599 + // 开启/暂停
600 + onOffSubmit(item) {
601 + this.$emit("onOff", item);
602 + },
603 + // 删除
604 + deleteSubmit(item) {
605 + this.$emit("delete", item);
606 + },
550 }, 607 },
551 }; 608 };
552 </script> 609 </script>
553 <style lang="scss"> 610 <style lang="scss">
611 +.collapse-item-header {
612 + padding-left: 40px;
613 +}
614 +.el-collapse {
615 + border: 0 !important;
616 +}
554 .el-collapse-item__header { 617 .el-collapse-item__header {
555 background-color: #d9ecff !important; 618 background-color: #d9ecff !important;
556 border-bottom: 1px solid #ccc; 619 border-bottom: 1px solid #ccc;
557 - padding-left: 40px; 620 + padding: 0 10px 0 30px;
621 +}
622 +.el-collapse-item__wrap {
623 + border-bottom: 0 !important;
624 +}
625 +.el-collapse-item {
626 + border-bottom: 1px solid #ccc;
558 } 627 }
628 +.el-collapse-item:last-child {
559 629
630 +}
560 .route-container { 631 .route-container {
561 strong { 632 strong {
562 font-size: 14px; 633 font-size: 14px;
563 } 634 }
564 -
565 .route-info { 635 .route-info {
566 .route-info-card { 636 .route-info-card {
567 section { 637 section {
568 padding: 12px 70px; 638 padding: 12px 70px;
569 -
570 .route-config-header { 639 .route-config-header {
571 .flight-route-title { 640 .flight-route-title {
572 margin-left: 8px; 641 margin-left: 8px;
573 } 642 }
574 } 643 }
575 } 644 }
576 -
577 .route-config-info { 645 .route-config-info {
578 } 646 }
579 } 647 }
580 } 648 }
581 } 649 }
650 +.el-form-item__error {
651 + color: #ff4949;
652 + font-size: 12px;
653 + line-height: 1;
654 + padding-top: 4px;
655 + position: absolute;
656 + top: 100%;
657 + left: 0;
658 + font-weight: 500;
659 + width: 100% !important;
660 +}
582 </style> 661 </style>
......
...@@ -8,6 +8,7 @@ export const formConfig = [ ...@@ -8,6 +8,7 @@ export const formConfig = [
8 span: 5, 8 span: 5,
9 trigger: "blur", 9 trigger: "blur",
10 labelWidth: "55px", 10 labelWidth: "55px",
11 + disable: false,
11 }, 12 },
12 { 13 {
13 label: "航班日期", 14 label: "航班日期",
...@@ -18,6 +19,8 @@ export const formConfig = [ ...@@ -18,6 +19,8 @@ export const formConfig = [
18 format: "yyyy-MM-dd", 19 format: "yyyy-MM-dd",
19 colWidth: "23%", 20 colWidth: "23%",
20 inputWidth: "100%", 21 inputWidth: "100%",
22 + disable: false,
23 + hidden: false,
21 }, 24 },
22 { 25 {
23 label: "航线", 26 label: "航线",
...@@ -28,6 +31,8 @@ export const formConfig = [ ...@@ -28,6 +31,8 @@ export const formConfig = [
28 span: 5, 31 span: 5,
29 labelWidth: "40px", 32 labelWidth: "40px",
30 trigger: "blur", // 事件名 33 trigger: "blur", // 事件名
34 + disable: false,
35 + hidden: false,
31 }, 36 },
32 { 37 {
33 label: "航线优先级", 38 label: "航线优先级",
...@@ -43,8 +48,10 @@ export const formConfig = [ ...@@ -43,8 +48,10 @@ export const formConfig = [
43 // 航线规则表单 48 // 航线规则表单
44 export const routeRuleForm = { 49 export const routeRuleForm = {
45 config: true, 50 config: true,
46 - remark: true, 51 + purposeOfFlightNo: "LP001",
47 flightRoute: "", // 飞行航线 52 flightRoute: "", // 飞行航线
53 + routeSpecifyDateSeq: "", // 航线优先级
54 + declarationCategory: "",
48 location: null, // 包含始发站 55 location: null, // 包含始发站
49 notLocation: null, // 不包含始发站 56 notLocation: null, // 不包含始发站
50 destinationSite: null, // 包含目的站 57 destinationSite: null, // 包含目的站
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
25 </el-col> 25 </el-col>
26 <el-col> 26 <el-col>
27 <route-info 27 <route-info
28 + ref="routeInfo"
28 :routesInfo="routesInfo" 29 :routesInfo="routesInfo"
29 :cargoType="cargoType" 30 :cargoType="cargoType"
30 :cargoStatus="cargoStatus" 31 :cargoStatus="cargoStatus"
...@@ -33,16 +34,13 @@ ...@@ -33,16 +34,13 @@
33 :handlingCode="handlingCode" 34 :handlingCode="handlingCode"
34 :subCategory="subCategory" 35 :subCategory="subCategory"
35 :status="getRouter" 36 :status="getRouter"
36 - @collapse="collapseChange" 37 + :loading="loading"
37 @location="changeLocation" 38 @location="changeLocation"
38 @destinationSite="changeDestinationSite" 39 @destinationSite="changeDestinationSite"
39 - @cargoType="changeCargoType"
40 - @cargoStatus="changeCargoStatus"
41 - @puporpux="changePuporpux"
42 - @serviceCode="changeServiceCode"
43 - @handlingCode="changeHandlingCode"
44 - @subCategory="changeSubCategory"
45 @addRlue="addRlue" 40 @addRlue="addRlue"
41 + @save="saveSubmit"
42 + @onOff="onOffSubmit"
43 + @delete="deleteSubmit"
46 > 44 >
47 </route-info> 45 </route-info>
48 </el-col> 46 </el-col>
...@@ -51,22 +49,17 @@ ...@@ -51,22 +49,17 @@
51 </template> 49 </template>
52 <script> 50 <script>
53 import YlForm from "@/components/YlForm"; 51 import YlForm from "@/components/YlForm";
54 -import RouteInfo from "./components/routeInfo"; 52 +import RouteInfo from "../components/routeInfo";
55 import YlDraggable from "@/components/YlDraggable"; 53 import YlDraggable from "@/components/YlDraggable";
56 import { formConfig, routeRuleForm } from "./formConfig"; 54 import { formConfig, routeRuleForm } from "./formConfig";
57 -import { removeDuplicates, filterRepeat } from "@/utils";
58 import { 55 import {
59 - allDictData, // 获取全部字典
60 - findDestinationFltRuleByFlightNo, // 航线维度设置详情
61 - findByFlightId, // 通过id查询目的航班维度配置详情
62 updateOrAddFlight, // 修改 56 updateOrAddFlight, // 修改
63 delFlightId, // 删除航线规则配置 57 delFlightId, // 删除航线规则配置
64 enableOrDisable, // 是否停用/开启航线规则配置 58 enableOrDisable, // 是否停用/开启航线规则配置
65 batchUpdateOrAddFlight, // 更新航线优先级 59 batchUpdateOrAddFlight, // 更新航线优先级
66 queryRouteByFltNo, // 通过航班号查询航线 60 queryRouteByFltNo, // 通过航班号查询航线
67 } from "@/api/destinationFlight"; 61 } from "@/api/destinationFlight";
68 -import indexMixins from "./mixins"; 62 +import indexMixins from "../mixins";
69 -import { routeData, routeInfo } from "./routeData";
70 export default { 63 export default {
71 components: { 64 components: {
72 YlForm, 65 YlForm,
...@@ -76,11 +69,12 @@ export default { ...@@ -76,11 +69,12 @@ export default {
76 mixins: [indexMixins], 69 mixins: [indexMixins],
77 data() { 70 data() {
78 return { 71 return {
72 + loading: false, // 折叠面板
79 dragOptions: { 73 dragOptions: {
80 // 航线优先级拖拽配置 74 // 航线优先级拖拽配置
81 animation: 200, 75 animation: 200,
82 group: "description", 76 group: "description",
83 - disabled: false, // 是否禁止拖拽 77 + disabled: true, // 是否禁止拖拽
84 ghostClass: "ghost", 78 ghostClass: "ghost",
85 }, 79 },
86 formConfig: formConfig, // 表单配置项 80 formConfig: formConfig, // 表单配置项
...@@ -103,112 +97,64 @@ export default { ...@@ -103,112 +97,64 @@ export default {
103 created() { 97 created() {
104 this.getAllDictData(); // 获取全部字典 98 this.getAllDictData(); // 获取全部字典
105 let _this = this; 99 let _this = this;
100 + const parmas = {
101 + querySpecifyData: this.$route.query.querySpecifyData || "", // 查询特殊数据字段
102 + purposeOfFlightNo: this.$route.query.purposeOfFlightNo || "", // 航班号
103 + flightDate: this.$route.query.flightDate || "", // 飞行日期
104 + flightRouteListStr: this.$route.query.flightRouteListStr || "", // 飞行航线集合
105 + status: this.$route.query.status || "", // 状态
106 + };
107 + let dataStatus = this.$route.query.dataStatus || "";
108 + if (dataStatus == "add") {
109 + formConfig.map((item) => {
110 + if (item.type !== "slot") {
111 + item.disable = false;
112 + if (item.label == "航班日期" || item.label == "航线") {
113 + item.hidden = true;
114 + item.hidden = true;
115 + }
116 + }
117 + });
118 + } else {
119 + //
120 + formConfig.map((item) => {
121 + if (item.type !== "slot") {
122 + item.disable = true;
123 + if (item.label == "航班日期" || item.label == "航线") {
124 + item.hidden = false;
125 + item.hidden = false;
126 + }
127 + }
128 + });
129 + }
130 + this.queryForm = this.$route.query; // 获取跳转过来的参数
106 // 航班配舱维度规则设置查询条件 131 // 航班配舱维度规则设置查询条件
107 let queryCondition = { 132 let queryCondition = {
108 - querySpecifyData: _this.$route.query.querySpecifyData, // 查询特殊数据字段
109 - purposeOfFlightNo: _this.$route.query.purposeOfFlightNo, // 航班号
110 - flightDate: _this.$route.query.flightDate, // 飞行日期
111 - flightRouteListStr: _this.$route.query.flightRouteListStr, // 飞行航线集合
112 // 航班配舱设置 133 // 航班配舱设置
113 flightAllocConfig: { 134 flightAllocConfig: {
114 noDateParmas: { 135 noDateParmas: {
115 flightDate: "", 136 flightDate: "",
116 flightRoute: "", 137 flightRoute: "",
117 - purposeOfFlightNo: this.purposeOfFlightNo, 138 + purposeOfFlightNo: parmas.purposeOfFlightNo,
118 status: "", 139 status: "",
119 }, 140 },
120 dateParmas: { 141 dateParmas: {
121 - flightDate: this.flightDate, 142 + flightDate: parmas.flightDate,
122 flightRoute: "", 143 flightRoute: "",
123 flightRouteListStr: "", 144 flightRouteListStr: "",
124 - purposeOfFlightNo: this.purposeOfFlightNo, 145 + purposeOfFlightNo: parmas.purposeOfFlightNo,
125 status: "", 146 status: "",
126 }, 147 },
127 queryParmas: function () { 148 queryParmas: function () {
128 // 非日期级别 149 // 非日期级别
129 - if (this.querySpecifyData == "2") { 150 + if (parmas.querySpecifyData == "2") {
130 - _this 151 + _this.noDateLevelData(this.noDateParmas);
131 - .noDateLevelRoute(this.noDateParmas)
132 - .then(({ routeList, dataList }) => {
133 - const result = routeList.map((item1) => {
134 - const item2 = dataList.find((item2) => {
135 - if (item1.route === item2.flightRoute) {
136 - item2.config = true;
137 - return item2;
138 - }
139 - });
140 - if (item2) {
141 - // 有数据的合并对象,
142 - return { ...item1, ...item2 };
143 - } else {
144 - item1.config = false;
145 - return item1; // 没有的返回当前的
146 - }
147 - });
148 -
149 - // 处理属性
150 - result.map((item) => {
151 - if (item.config) {
152 - _this.hasOwnProperty(item, "typeOfGoods");
153 - _this.hasOwnProperty(item, "puporpuxCode");
154 - _this.hasOwnProperty(item, "serviceCode");
155 - _this.hasOwnProperty(item, "handlingCode");
156 - _this.hasOwnProperty(item, "subCategory");
157 - _this.setattrVal(item); // 设置属性值
158 - }
159 - });
160 - _this.routesInfo = result;
161 - });
162 } 152 }
163 // 日期级别 153 // 日期级别
164 - if (this.querySpecifyData == "1") { 154 + if (parmas.querySpecifyData == "1") {
165 - _this.dateLevelRoute(this.dateParmas).then((res) => { 155 + _this.dateLevelData({
166 - const { configFlag, dateFlightRoute } = res; 156 + dateParmas: this.dateParmas,
167 - if (configFlag == false) { 157 + noDateParmas: this.noDateParmas,
168 - // 航班航线有规则配置的
169 - const dateListHas = dateFlightRoute.filter(
170 - (item) => item.config == true
171 - );
172 - // 航班航线没有规则配置的
173 - const dateListNo = dateFlightRoute.filter(
174 - (item) => item.config == false
175 - );
176 - _this
177 - .noDateLevelRoute(this.noDateParmas)
178 - .then(({ dataList }) => {
179 - console.log(dateListNo);
180 - console.log(dataList);
181 -
182 - const result = dateListNo.map((item1) => {
183 - const item2 = dataList.find((item2) => {
184 - if (item1.route === item2.flightRoute) {
185 - item2.config = true;
186 - return item2;
187 - }
188 - });
189 - if (item2) {
190 - // 有数据的合并对象,
191 - return { ...item1, ...item2 };
192 - } else {
193 - item1.config = false;
194 - return item1; // 没有的返回当前的
195 - }
196 - });
197 - let dateList = dateListHas.concat(result);
198 - // 处理属性
199 - dateList.map((item) => {
200 - if (item.config) {
201 - _this.hasOwnProperty(item, "typeOfGoods");
202 - _this.hasOwnProperty(item, "puporpuxCode");
203 - _this.hasOwnProperty(item, "serviceCode");
204 - _this.hasOwnProperty(item, "handlingCode");
205 - _this.hasOwnProperty(item, "subCategory");
206 - _this.setattrVal(item); // 设置属性值
207 - }
208 - });
209 - _this.routesInfo = dateList;
210 - });
211 - }
212 }); 158 });
213 } 159 }
214 }, 160 },
...@@ -216,24 +162,30 @@ export default { ...@@ -216,24 +162,30 @@ export default {
216 // 航班信息维护 162 // 航班信息维护
217 flightInformationMaintenance: { 163 flightInformationMaintenance: {
218 noDateParmas: { 164 noDateParmas: {
219 - purposeOfFlightNo: this.purposeOfFlightNo, 165 + purposeOfFlightNo: parmas.purposeOfFlightNo,
220 - flightRouteListStr: this.flightRouteListStr, 166 + flightRouteListStr: parmas.flightRouteListStr,
221 status: "", 167 status: "",
222 }, 168 },
223 dateParmas: { 169 dateParmas: {
224 - purposeOfFlightNo: this.purposeOfFlightNo, 170 + purposeOfFlightNo: parmas.purposeOfFlightNo,
225 - flightDate: this.flightDate, 171 + flightDate: parmas.flightDate,
226 - flightRouteListStr: this.flightRouteListStr, 172 + flightRouteListStr: parmas.flightRouteListStr,
227 status: "", 173 status: "",
228 }, 174 },
229 queryParmas: function () { 175 queryParmas: function () {
230 // White Tail 176 // White Tail
231 if (_this.$route.query.flightKindName == "White Tail") { 177 if (_this.$route.query.flightKindName == "White Tail") {
232 - _this.noDateLevelRoute(this.noDateParmas); 178 + _this.dateLevelData({
179 + dateParmas: this.dateParmas,
180 + noDateParmas: this.noDateParmas,
181 + });
233 } 182 }
234 // Purple Tail 183 // Purple Tail
235 if (_this.$route.query.flightKindName == "Purple Tail") { 184 if (_this.$route.query.flightKindName == "Purple Tail") {
236 - _this.dateLevelRoute(this.dateParmas); 185 + _this.dateLevelData({
186 + dateParmas: this.dateParmas,
187 + noDateParmas: this.noDateParmas,
188 + });
237 } 189 }
238 }, 190 },
239 }, 191 },
...@@ -242,98 +194,78 @@ export default { ...@@ -242,98 +194,78 @@ export default {
242 noDateParmas: { 194 noDateParmas: {
243 flightRoute: "", 195 flightRoute: "",
244 flightRouteListStr: "", 196 flightRouteListStr: "",
245 - purposeOfFlightNo: this.purposeOfFlightNo, 197 + purposeOfFlightNo: parmas.purposeOfFlightNo,
246 status: "", 198 status: "",
247 }, 199 },
248 dateParmas: { 200 dateParmas: {
249 - flightDate: this.flightDate, 201 + flightDate: parmas.flightDate,
250 flightRoute: "", 202 flightRoute: "",
251 - purposeOfFlightNo: this.purposeOfFlightNo, 203 + purposeOfFlightNo: parmas.purposeOfFlightNo,
252 status: "", 204 status: "",
253 }, 205 },
254 queryParmas: function () { 206 queryParmas: function () {
255 // 普通级别 207 // 普通级别
256 if (_this.$route.query.pageName == "flightRandConfig") { 208 if (_this.$route.query.pageName == "flightRandConfig") {
257 - _this.noDateLevelRoute(this.noDateParmas); 209 + _this.dateLevelData({
258 - _this.dateLevelRoute(this.dateParmas); 210 + dateParmas: this.dateParmas,
211 + noDateParmas: this.noDateParmas,
212 + });
213 + }
214 + },
215 + },
216 + // 【系统日志】DM数据处理
217 + dmLog: {
218 + queryParmas: function () {
219 + if (_this.$route.query.pageName == "dmLog") {
220 + _this.getFindByFlightId({
221 + id: _this.$route.query.id,
222 + });
259 } 223 }
260 }, 224 },
261 }, 225 },
262 }; 226 };
227 + /*
228 + queryCondition只负责接收参数和数据调用
229 + */
263 // 航班配舱设置 230 // 航班配舱设置
264 queryCondition.flightAllocConfig.queryParmas(); 231 queryCondition.flightAllocConfig.queryParmas();
265 // 航班信息维护 232 // 航班信息维护
266 queryCondition.flightInformationMaintenance.queryParmas(); 233 queryCondition.flightInformationMaintenance.queryParmas();
267 // 航班顺位设置 234 // 航班顺位设置
268 queryCondition.flightRandConfig.queryParmas(); 235 queryCondition.flightRandConfig.queryParmas();
236 + // 【系统日志】DM数据处理
237 + queryCondition.dmLog.queryParmas();
269 }, 238 },
270 mounted() {}, 239 mounted() {},
271 methods: { 240 methods: {
272 - // 普通级别的 241 + getQueryRouteByFltNo(parmas) {
273 - noDateLevelRoute(parmas) { 242 + queryRouteByFltNo(parmas)
274 - return new Promise((resolve, reject) => { 243 + .then((res) => {
275 - findDestinationFltRuleByFlightNo(parmas) 244 + const { code, data } = res;
276 - .then((res) => { 245 + if (code == 200) {
277 - const { code, data, msg } = res; 246 + if (data.list.length) {
278 - if (code != 200) { 247 + let isEtesRoute = data.list.filter(
279 - this.msgError(msg); 248 + (item) => item.isEtesRoute == "N"
280 - return; 249 + ); // 过滤ET86航线
281 - } 250 + const routes = [];
282 - let routeList = data.routeList; // 航班航线基本信息 251 + isEtesRoute.map((item) => {
283 - // 普通级别航班航线维度规则详情 252 + routes.push({ config: false, route: item.route });
284 - const dataList = removeDuplicates(data.list, { 253 + });
285 - duplicate: "flightRoute", // 去重字段 254 + this.routeList = data.list;
286 - sort: false, // 是否要排序 255 + this.routesInfo = routes;
287 - sortType: "Number", // 排序类型
288 - sortAttr: "routePriority", // 排序字段
289 - });
290 - resolve({ routeList: routeList, dataList: dataList.unique });
291 - })
292 - .catch(() => {});
293 - });
294 - },
295 - // 日期级别的
296 - dateLevelRoute(parmas) {
297 - return new Promise((resolve, reject) => {
298 - findDestinationFltRuleByFlightNo(parmas).then((res) => {
299 - const { code, data, msg } = res;
300 - if (code != 200) {
301 - this.msgError(msg);
302 - return;
303 - }
304 - this.routeList = data.routeList; // 航班航线基本信息
305 - // 日期级别航班航线维度规则详情
306 - const dataList = removeDuplicates(data.list, {
307 - duplicate: "flightRoute", // 去重字段
308 - sort: false, // 是否要排序
309 - sortType: "Number", // 排序类型
310 - sortAttr: "routePriority", // 排序字段
311 - });
312 - let config = false; // 有缺省的航线配置
313 - const result = this.routeList.map((item1) => {
314 - const item2 = dataList.unique.find((item2) => {
315 - if (item2.flightRoute === item1.route) {
316 - config = item2.config = true;
317 - if (this.$route.query.pageName == "flightAllocConfig") {
318 - item2.remark = true;
319 - } else {
320 - item2.remark = false;
321 - }
322 - return item2;
323 - }
324 - }); // 返回当前相等的一条数据
325 - if (item2) {
326 - return { ...item1, ...item2 };
327 } else { 256 } else {
328 - config = item1.config = false; 257 + this.routeList = [];
329 - return item1; // 没有的返回当前的 258 + this.msgError("暂无航线");
330 } 259 }
331 - }); 260 + }
332 - let configFlag = result.every((item) => item.config == true); 261 + })
333 - // 返回日期级别查询结果 262 + .catch(() => {});
334 - resolve({ configFlag: configFlag, dateFlightRoute: result }); 263 + },
335 - }); 264 + // 航班号输入框失焦事件
336 - }); 265 + blurEvent({ purposeOfFlightNo }) {
266 + routeRuleForm.flightRoute = this.upCase(purposeOfFlightNo);
267 + this.getQueryRouteByFltNo({ fltNo: this.upCase(purposeOfFlightNo) });
268 + this.queryForm.purposeOfFlightNo = this.upCase(purposeOfFlightNo);
337 }, 269 },
338 // 新增规则 270 // 新增规则
339 addRlue(index) { 271 addRlue(index) {
...@@ -344,7 +276,132 @@ export default { ...@@ -344,7 +276,132 @@ export default {
344 ...routeRuleForm, 276 ...routeRuleForm,
345 }; 277 };
346 this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据 278 this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据
347 - console.log("新增规则:", this.routesInfo); 279 + },
280 + // 保存
281 + saveSubmit(item) {
282 + let parmas = JSON.parse(JSON.stringify(item));
283 + this.returnString(parmas, "cargoType");
284 + this.returnString(parmas, "typeOfGoods");
285 + this.returnString(parmas, "puporpuxCode");
286 + this.returnString(parmas, "serviceCode");
287 + this.returnString(parmas, "handlingCode");
288 + this.returnString(parmas, "subCategory");
289 + if (parmas.minWeight || parmas.maxWeight) {
290 + if (
291 + !/^(0|[1-9]\d*)(.\d{1,5})?$/.test(
292 + parmas.minWeight || parmas.maxWeight
293 + )
294 + ) {
295 + this.msgWarning("请输入有效重量,小数保留5位");
296 + return;
297 + }
298 + }
299 + if (parmas.minNumOfPieces || parmas.maxNumOfPieces) {
300 + if (!/^\d+$/.test(parmas.minNumOfPieces || parmas.maxNumOfPieces)) {
301 + this.msgWarning("请输入有效件数");
302 + return;
303 + }
304 + }
305 + if (parmas.minNumOfPieces && parmas.maxNumOfPieces) {
306 + if (Number(parmas.minNumOfPieces) > Number(parmas.maxNumOfPieces)) {
307 + this.msgWarning("最小件数不能大于最大件数");
308 + return;
309 + }
310 + }
311 + if (parmas.minWeight && parmas.maxWeight) {
312 + if (Number(parmas.minWeight) > Number(parmas.maxWeight)) {
313 + this.msgWarning("最小重量不能大于最大重量");
314 + return;
315 + }
316 + }
317 + let keys = [
318 + "location",
319 + "notLocation",
320 + "destinationSite",
321 + "notDestinationSite",
322 + "includeUrsa",
323 + "notIncludeUrsa",
324 + "minNumOfPieces",
325 + "maxNumOfPieces",
326 + "minWeight",
327 + "maxWeight",
328 + "typeOfGoods",
329 + "cargoType",
330 + "puporpuxCode",
331 + "serviceCode",
332 + "handlingCode",
333 + "subCategory",
334 + ];
335 + let validate = keys.some((key) => parmas[key]);
336 + if (validate) {
337 + this.loading = true;
338 + updateOrAddFlight(parmas)
339 + .then((res) => {
340 + const { code, msg } = res;
341 + if (code == 200) {
342 + this.$forceUpdate();
343 + this.msgSuccess("保存成功!");
344 + } else {
345 + this.msgWarning(msg);
346 + }
347 + this.loading = false;
348 + })
349 + .catch(() => {
350 + this.loading = false;
351 + });
352 + }else{
353 + this.msgWarning('未添加规则信息,请添加后再保存!')
354 + }
355 + },
356 + // 开启/暂停
357 + onOffSubmit(item) {
358 + this.loading = true;
359 + let tip = item.status == "1" ? "停用" : "启用";
360 + this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
361 + confirmButtonText: "确定",
362 + cancelButtonText: "取消",
363 + type: "warning",
364 + }).then(() => {
365 + enableOrDisable({ id: item.id, status: item.status })
366 + .then((res) => {
367 + const { code, msg } = res;
368 + if (code == 200) {
369 + this.$forceUpdate();
370 + this.msgSuccess(tip + "成功");
371 + } else {
372 + this.msgWarning(msg);
373 + }
374 + this.loading = false;
375 + })
376 + .catch(() => {
377 + this.loading = false;
378 + });
379 + });
380 + },
381 + // 删除
382 + deleteSubmit(item) {
383 + this.loading = true;
384 + this.$confirm("是否确认删除此航班规则?", "警告", {
385 + confirmButtonText: "确定",
386 + cancelButtonText: "取消",
387 + showCancelButton: true,
388 + type: "warning",
389 + }).then(() => {
390 + delFlightId({ id: item.id })
391 + .then((res) => {
392 + const { code, msg } = res;
393 + if (code == 200) {
394 + this.$forceUpdate();
395 + this.msgSuccess(msg);
396 + } else {
397 + this.msgWarning(msg);
398 + }
399 + this.loading = false;
400 + })
401 + .catch(() => {
402 + this.loading = false;
403 + });
404 + });
348 }, 405 },
349 }, 406 },
350 }; 407 };
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form ref="flightAllocForm" :model="queryParams" class="form-header" size="small" label-position="right" 3 + <el-form
4 - label-width="auto" @submit.native.prevent> 4 + ref="flightAllocForm"
5 + :model="queryParams"
6 + class="form-header"
7 + size="small"
8 + label-position="right"
9 + label-width="auto"
10 + @submit.native.prevent
11 + >
5 <el-row> 12 <el-row>
6 <el-col :span="6"> 13 <el-col :span="6">
7 <el-form-item label="航班号"> 14 <el-form-item label="航班号">
8 - <el-input class="formItem" v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList"> 15 + <el-input
16 + class="formItem"
17 + v-model.trim="purposeOfFlightNo"
18 + placeholder="航班号"
19 + @keyup.enter.native="getList"
20 + >
9 </el-input> 21 </el-input>
10 </el-form-item> 22 </el-form-item>
11 </el-col> 23 </el-col>
12 <el-col :span="6"> 24 <el-col :span="6">
13 <el-form-item label="航班日期"> 25 <el-form-item label="航班日期">
14 - <el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期" 26 + <el-date-picker
15 - value-format="yyyy-MM-dd" clearable :disabled="queryParams.querySpecifyData == '2'"> 27 + class="formItem"
28 + v-model="queryParams.flightDate"
29 + type="date"
30 + placeholder="选择日期"
31 + value-format="yyyy-MM-dd"
32 + clearable
33 + :disabled="queryParams.querySpecifyData == '2'"
34 + >
16 </el-date-picker> 35 </el-date-picker>
17 </el-form-item> 36 </el-form-item>
18 </el-col> 37 </el-col>
19 <el-col :span="4"> 38 <el-col :span="4">
20 <el-form-item label="状态"> 39 <el-form-item label="状态">
21 - <el-select class="formItem" v-model="queryParams.status" placeholder="状态"> 40 + <el-select
41 + class="formItem"
42 + v-model="queryParams.status"
43 + placeholder="状态"
44 + >
22 <el-option label="有效" value="1"></el-option> 45 <el-option label="有效" value="1"></el-option>
23 <el-option label="停用" value="3"></el-option> 46 <el-option label="停用" value="3"></el-option>
24 </el-select> 47 </el-select>
...@@ -26,34 +49,76 @@ ...@@ -26,34 +49,76 @@
26 </el-col> 49 </el-col>
27 </el-row> 50 </el-row>
28 <div> 51 <div>
29 - <el-button type="primary" icon="el-icon-search" :loading="loading" @click="getList" size="mini">查询</el-button> 52 + <el-button
30 - <el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']" 53 + type="primary"
31 - @click=" 54 + icon="el-icon-search"
32 - $router.push({ 55 + :loading="loading"
33 - name: 'FlightAllocConfigInfo', 56 + @click="getList"
34 - params: { handle: 'add', fltNo: 'new', fltDate: ' ', status: null, routeStatus: '' }, 57 + size="mini"
35 - }) 58 + >查询</el-button
36 - ">添加</el-button> 59 + >
37 - <el-switch style="margin-left: 10px;" v-model="queryParams.querySpecifyData" inactive-text="日期查询" active-value="1" 60 + <el-button
38 - inactive-value="2" active-color="#13ce66" inactive-color="#909399" @change="switchChange"></el-switch> 61 + class="mb20"
62 + type="primary"
63 + icon="el-icon-plus"
64 + size="mini"
65 + v-hasPermi="['allocation:alloc:add']"
66 + @click="addFlightRouteConfig"
67 + >添加</el-button
68 + >
69 + <el-switch
70 + style="margin-left: 10px"
71 + v-model="queryParams.querySpecifyData"
72 + inactive-text="日期查询"
73 + active-value="1"
74 + inactive-value="2"
75 + active-color="#13ce66"
76 + inactive-color="#909399"
77 + @change="switchChange"
78 + ></el-switch>
39 </div> 79 </div>
40 </el-form> 80 </el-form>
41 - <Tables ref="newTables" ductName="FlightAlloc" :data="flyList" :headerData="tableHeaders['flightAlloc']" :order="true" 81 + <Tables
42 - :totalCount="total" :loading="loading" :limitSize="queryParams.limit" :limitStart="queryParams.start" 82 + ref="newTables"
43 - :page="curPage" :pageSizes="[20]" :height="tableHeight" @currentChange="currentChange"> 83 + ductName="FlightAlloc"
84 + :data="flyList"
85 + :headerData="tableHeaders['flightAlloc']"
86 + :order="true"
87 + :totalCount="total"
88 + :loading="loading"
89 + :limitSize="queryParams.limit"
90 + :limitStart="queryParams.start"
91 + :page="curPage"
92 + :pageSizes="[20]"
93 + :height="tableHeight"
94 + @currentChange="currentChange"
95 + >
44 <template v-slot:ruleDate="scope"> 96 <template v-slot:ruleDate="scope">
45 - <el-link v-if="scope.row.ruleDate" type="primary" @click="toRouteOrder(scope.row)"> 97 + <el-link
46 - {{ 98 + v-if="scope.row.ruleDate"
47 - scope.row.ruleDate 99 + type="primary"
48 - }}<i class="el-icon-link"></i> </el-link> 100 + @click="toRouteOrder(scope.row)"
101 + >
102 + {{ scope.row.ruleDate }}<i class="el-icon-link"></i>
103 + </el-link>
49 </template> 104 </template>
50 <template slot="optionColumn"> 105 <template slot="optionColumn">
51 <el-table-column label="操作" align="center" width="150"> 106 <el-table-column label="操作" align="center" width="150">
52 <template slot-scope="scope"> 107 <template slot-scope="scope">
53 - <el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row, 'view')">查看 108 + <el-button
109 + type="text"
110 + size="mini"
111 + icon="el-icon-view"
112 + @click="handleClick(scope.row, 'view')"
113 + >查看
54 </el-button> 114 </el-button>
55 - <el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']" 115 + <el-button
56 - @click="handleClick(scope.row, 'edit')">修改 116 + type="text"
117 + size="mini"
118 + icon="el-icon-edit"
119 + v-hasPermi="['allocation:alloc:update']"
120 + @click="handleClick(scope.row, 'edit')"
121 + >修改
57 </el-button> 122 </el-button>
58 <!-- <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949" 123 <!-- <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949"
59 v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button> 124 v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button>
...@@ -70,22 +135,20 @@ ...@@ -70,22 +135,20 @@
70 </template> 135 </template>
71 136
72 <script> 137 <script>
73 -import { 138 +import { findFlightDimRuleByFlightNo } from "@/api/destinationFlight";
74 - findFlightDimRuleByFlightNo 139 +import Dialog from "./dialog.vue";
75 -} from "@/api/destinationFlight";
76 -import Dialog from './dialog.vue'
77 140
78 export default { 141 export default {
79 name: "FlightAllocConfig", 142 name: "FlightAllocConfig",
80 components: { 143 components: {
81 - Dialog 144 + Dialog,
82 }, 145 },
83 data() { 146 data() {
84 return { 147 return {
85 queryParams: { 148 queryParams: {
86 purposeOfFlightNo: null, 149 purposeOfFlightNo: null,
87 flightDate: undefined, 150 flightDate: undefined,
88 - querySpecifyData: '2', 151 + querySpecifyData: "2",
89 status: "1", 152 status: "1",
90 start: 0, 153 start: 0,
91 limit: 20, 154 limit: 20,
...@@ -113,13 +176,14 @@ export default { ...@@ -113,13 +176,14 @@ export default {
113 // }) 176 // })
114 }, 177 },
115 mounted() { 178 mounted() {
116 - this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200 179 + this.tableHeight =
180 + window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200;
117 }, 181 },
118 activated() { 182 activated() {
119 - this.getList() 183 + this.getList();
120 }, 184 },
121 deactivated() { 185 deactivated() {
122 - this.flyList = [] 186 + this.flyList = [];
123 }, 187 },
124 methods: { 188 methods: {
125 getList() { 189 getList() {
...@@ -129,18 +193,35 @@ export default { ...@@ -129,18 +193,35 @@ export default {
129 this.queryParams.start = 0; 193 this.queryParams.start = 0;
130 } 194 }
131 this.loading = true; 195 this.loading = true;
132 - findFlightDimRuleByFlightNo(this.queryParams).then(res => { 196 + findFlightDimRuleByFlightNo(this.queryParams)
133 - this.loading = false 197 + .then((res) => {
134 - if (res.code === 200) { 198 + this.loading = false;
135 - this.flyList = res.data.list 199 + if (res.code === 200) {
136 - this.total = res.data.totalCount 200 + this.flyList = res.data.list;
137 - } else { 201 + this.total = res.data.totalCount;
138 - this.msgWarning(res.msg) 202 + } else {
139 - } 203 + this.msgWarning(res.msg);
140 - }).catch(err => { 204 + }
141 - this.loading = false 205 + })
142 - console.log(err) 206 + .catch((err) => {
143 - }) 207 + this.loading = false;
208 + console.log(err);
209 + });
210 + },
211 + // 添加
212 + addFlightRouteConfig() {
213 + this.$router.push({
214 + path: "/routeInfo",
215 + query: {
216 + flightDate: '', // 跳转的时候默认当天日期
217 + purposeOfFlightNo: '',
218 + flightRouteListStr: '',
219 + status: '',
220 + pageName: "flightAllocConfig",
221 + dataStatus: "add",
222 + disable: '',
223 + },
224 + });
144 }, 225 },
145 //跳转到查看,修改页面 226 //跳转到查看,修改页面
146 handleClick({ purposeOfFlightNo, ruleDate, flightRoute, status }, name) { 227 handleClick({ purposeOfFlightNo, ruleDate, flightRoute, status }, name) {
...@@ -153,7 +234,8 @@ export default { ...@@ -153,7 +234,8 @@ export default {
153 status: status, 234 status: status,
154 pageName: "flightAllocConfig", 235 pageName: "flightAllocConfig",
155 dataStatus: name, 236 dataStatus: name,
156 - querySpecifyData: this.queryParams.querySpecifyData 237 + querySpecifyData: this.queryParams.querySpecifyData,
238 + disable: true,
157 }, 239 },
158 }); 240 });
159 }, 241 },
...@@ -161,25 +243,25 @@ export default { ...@@ -161,25 +243,25 @@ export default {
161 toRouteOrder(val) { 243 toRouteOrder(val) {
162 this.colData = { 244 this.colData = {
163 fltNo: val.purposeOfFlightNo, 245 fltNo: val.purposeOfFlightNo,
164 - fltDate: val.ruleDate 246 + fltDate: val.ruleDate,
165 - } 247 + };
166 - this.open = true 248 + this.open = true;
167 }, 249 },
168 //开关改变 250 //开关改变
169 switchChange(val) { 251 switchChange(val) {
170 - if (val == '2') { 252 + if (val == "2") {
171 - this.queryParams.flightDate = undefined 253 + this.queryParams.flightDate = undefined;
172 } 254 }
173 }, 255 },
174 close() { 256 close() {
175 - this.open = false 257 + this.open = false;
176 }, 258 },
177 //翻页 259 //翻页
178 currentChange(val) { 260 currentChange(val) {
179 - this.curPage = val.page 261 + this.curPage = val.page;
180 this.queryParams.start = val.start; 262 this.queryParams.start = val.start;
181 this.getList(); 263 this.getList();
182 - } 264 + },
183 }, 265 },
184 computed: { 266 computed: {
185 purposeOfFlightNo: { 267 purposeOfFlightNo: {
...@@ -193,5 +275,3 @@ export default { ...@@ -193,5 +275,3 @@ export default {
193 }, 275 },
194 }; 276 };
195 </script> 277 </script>
196 -
197 -
......
1 import { 1 import {
2 allDictData, // 获取全部字典 2 allDictData, // 获取全部字典
3 + findDestinationFltRuleByFlightNo, // 航线维度设置详情
4 + findByFlightId, // 通过id查询目的航班维度配置详情
3 } from "@/api/destinationFlight"; 5 } from "@/api/destinationFlight";
6 +import { routeRuleForm } from "../flightRouteInfo/formConfig";
7 +import { removeDuplicates } from "@/utils";
4 export default { 8 export default {
5 computed: { 9 computed: {
6 // 获取路由参数 10 // 获取路由参数
7 getRouter() { 11 getRouter() {
8 - if (this.$route.query.dataStatus == "view") { 12 + if (this.$route.query.name == "add") {
9 - return true; 13 + return "保存";
10 - } else if (this.$route.query.dataStatus == "edit") { 14 + } else if (this.$route.query.name == "edit") {
11 - return false; 15 + return "修改";
12 } else { 16 } else {
13 return false; 17 return false;
14 } 18 }
...@@ -28,13 +32,328 @@ export default { ...@@ -28,13 +32,328 @@ export default {
28 this.cargoType = data.cargoType; // 申报类别 32 this.cargoType = data.cargoType; // 申报类别
29 this.cargoStatus = data.cargoStatus; // 货物类型 33 this.cargoStatus = data.cargoStatus; // 货物类型
30 this.puporpux = data.puporpux; // 取件扫描号 34 this.puporpux = data.puporpux; // 取件扫描号
31 - this.serviceCode = data.serviceCode; // Service Code 35 + this.serviceCode = this.dicSort(
32 - this.handlingCode = data.handlingCode; // Handling Code 36 + data.serviceCode.sort((a, b) =>
33 - this.subCategory = data.subCategory; // Sub Category 37 + a.chineseName.localeCompare(b.chineseName)
38 + )
39 + ); // Service Code
40 + this.handlingCode = this.dicSort(
41 + this.sorttodo(data.handlingCode, "BLANK")
42 + ); // Handling Code
43 + this.subCategory = this.dicSort(
44 + this.sorttodo(data.subCategory, "Blank")
45 + ); // Sub Category
46 + })
47 + .catch(() => {});
48 + },
49 + // 【接口调用和数据去重整合】普通级别
50 + noDateLevelRoute(parmas) {
51 + return new Promise((resolve, reject) => {
52 + findDestinationFltRuleByFlightNo(parmas)
53 + .then((res) => {
54 + const { code, data, msg } = res;
55 + if (code != 200) {
56 + this.msgError(msg);
57 + return;
58 + }
59 + let noDateRouteList = data.routeList.filter(
60 + (item) => item.etesRule == "N"
61 + ); // 航班航线基本信息(过滤ET86航线的)
62 + // 普通级别航班航线维度规则详情
63 + const noDateDataList = removeDuplicates(data.list, {
64 + duplicate: "flightRoute", // 去重字段
65 + dateTime: "createTime", // 从重复的数据中根据时间取最新的一条
66 + sort: false, // 是否要排序
67 + sortType: "Number", // 排序类型
68 + sortAttr: "routePriority", // 排序字段
69 + });
70 + // 整合飞行航线配置信息
71 + const mergeNoDateRouteInfo = this.mergeFlightRouteConfigObj(
72 + noDateRouteList,
73 + noDateDataList
74 + );
75 + let noDateConfigFlag = mergeNoDateRouteInfo.every(
76 + (item) => item.config == true
77 + );
78 + resolve({
79 + noDateConfigFlag,
80 + noDateRouteList,
81 + mergeNoDateRouteInfo,
82 + });
83 + })
84 + .catch(() => {});
85 + });
86 + },
87 + // 【接口调用和数据去重整合】日期级别
88 + dateLevelRoute(parmas) {
89 + return new Promise((resolve, reject) => {
90 + findDestinationFltRuleByFlightNo(parmas)
91 + .then((res) => {
92 + const { code, data, msg } = res;
93 + if (code != 200) {
94 + this.msgError(msg);
95 + return;
96 + }
97 + let dateRouteList = data.routeList.filter(
98 + (item) => item.etesRule == "N"
99 + ); // 航班航线基本信息(过滤ET86航线的)
100 + // 日期级别航班航线维度规则详情
101 + const dateDataList = removeDuplicates(data.list, {
102 + duplicate: "flightRoute", // 去重字段
103 + dateTime: "createTime", // 从重复的数据中根据时间取最新的一条
104 + sort: false, // 是否要排序
105 + sortType: "Number", // 排序类型
106 + sortAttr: "routePriority", // 排序字段
107 + });
108 + // 整合飞行航线配置信息,对没有航线配置信息的也已经做了config为false的处理;
109 + const mergeDateRouteInfo = this.mergeFlightRouteConfigObj(
110 + dateRouteList,
111 + dateDataList
112 + );
113 + /*
114 + 【dateConfigFlag】:
115 + 判断日期级别的航线有没有航线配置的数据,如果其中一条没有返回false,
116 + 然后再接着调用非日期级别的查询做数据处理;
117 + */
118 + let dateConfigFlag = mergeDateRouteInfo.every(
119 + (item) => item.config == true
120 + );
121 + // 返回日期级别查询结果
122 + resolve({
123 + dateConfigFlag,
124 + dateRouteList,
125 + mergeDateRouteInfo,
126 + });
127 + })
128 + .catch(() => {});
129 + });
130 + },
131 + // 根据航班号ID查看航班航线配置详情
132 + getFindByFlightId(parmas) {
133 + findByFlightId(parmas)
134 + .then((res) => {
135 + const { code, data, msg } = res;
136 + if (code != 200) {
137 + this.msgError(msg);
138 + return;
139 + }
140 + const routeList = [data.list];
141 + // 航班航线维度规则详情
142 + const dataList = removeDuplicates(routeList, {
143 + duplicate: "flightRoute", // 去重字段
144 + dateTime: "createTime", // 从重复的数据中根据时间取最新的一条
145 + sort: false, // 是否要排序
146 + sortType: "Number", // 排序类型
147 + sortAttr: "routePriority", // 排序字段
148 + });
149 + routeList.map((item) => {
150 + if (item.flightRoute) {
151 + item.route = item.flightRoute;
152 + }
153 + });
154 + // 整合飞行航线配置信息,对没有航线配置信息的也已经做了config为false的处理;
155 + const mergeRouteInfo = this.mergeFlightRouteConfigObj(
156 + routeList,
157 + dataList
158 + );
159 + // 处理属性
160 + mergeRouteInfo.map((item) => {
161 + if (item.config) {
162 + this.hasOwnProperty(item, "typeOfGoods");
163 + this.hasOwnProperty(item, "puporpuxCode");
164 + this.hasOwnProperty(item, "serviceCode");
165 + this.hasOwnProperty(item, "handlingCode");
166 + this.hasOwnProperty(item, "subCategory");
167 + this.setattrVal(item); // 设置属性值
168 + }
169 + });
170 + this.routeList = routeList; // 航班航线列表
171 + this.routesInfo = mergeRouteInfo; // 航班航线配置信息列表
34 }) 172 })
35 .catch(() => {}); 173 .catch(() => {});
36 }, 174 },
37 - // 判断对象是否存在某个属性,并且把这个属性值使用分号分隔 175 + // 拿到【接口调用和数据去重整合】的数据做数据页面显示处理:非日期级别
176 + noDateLevelData(noDateParmas) {
177 + this.noDateLevelRoute(noDateParmas).then(
178 + ({ noDateConfigFlag, noDateRouteList, mergeNoDateRouteInfo }) => {
179 + // 满足非日期级别航线的配置信息
180 + // 处理属性
181 + mergeNoDateRouteInfo.map((item) => {
182 + if (item.config) {
183 + this.hasOwnProperty(item, "typeOfGoods");
184 + this.hasOwnProperty(item, "puporpuxCode");
185 + this.hasOwnProperty(item, "serviceCode");
186 + this.hasOwnProperty(item, "handlingCode");
187 + this.hasOwnProperty(item, "subCategory");
188 + this.setattrVal(item); // 设置属性值
189 + }
190 + });
191 + this.routeList = noDateRouteList; // 航班航线列表
192 + this.routesInfo = mergeNoDateRouteInfo; // 航班航线配置信息列表
193 + }
194 + );
195 + },
196 + // 拿到【接口调用和数据去重整合】的数据做数据页面显示处理:日期级别
197 + dateLevelData({ dateParmas, noDateParmas }) {
198 + this.dateLevelRoute(dateParmas).then((res) => {
199 + const { dateConfigFlag, dateRouteList, mergeDateRouteInfo } = res;
200 + if (dateConfigFlag) {
201 + // 日期级别当前航班航线配置没有缺省的,就不用再去查询非日期级别了
202 + // 处理属性
203 + mergeDateRouteInfo.map((item) => {
204 + if (item.config) {
205 + this.hasOwnProperty(item, "typeOfGoods");
206 + this.hasOwnProperty(item, "puporpuxCode");
207 + this.hasOwnProperty(item, "serviceCode");
208 + this.hasOwnProperty(item, "handlingCode");
209 + this.hasOwnProperty(item, "subCategory");
210 + this.setattrVal(item); // 设置属性值
211 + }
212 + });
213 + this.routeList = dateRouteList; // 航班航线列表
214 + this.routesInfo = mergeDateRouteInfo; // 航班航线配置信息列表
215 + }
216 + if (dateConfigFlag == false) {
217 + // 航班航线有规则配置的
218 + const dateListHas = mergeDateRouteInfo.filter(
219 + (item) => item.config == true
220 + );
221 + // 航班航线没有规则配置的
222 + const dateListNo = mergeDateRouteInfo.filter(
223 + (item) => item.config == false
224 + );
225 + this.noDateLevelRoute(noDateParmas).then(
226 + ({ noDateConfigFlag, noDateRouteList, mergeNoDateRouteInfo }) => {
227 + // 航班种类
228 + this.flightKindName({
229 + noDateConfigFlag,
230 + noDateRouteList,
231 + mergeNoDateRouteInfo,
232 + dateRouteList,
233 + dateListHas,
234 + dateListNo,
235 + });
236 + }
237 + );
238 + }
239 + });
240 + },
241 + // 航班种类
242 + flightKindName({
243 + noDateConfigFlag,
244 + noDateRouteList,
245 + mergeNoDateRouteInfo,
246 + dateRouteList,
247 + dateListHas,
248 + dateListNo,
249 + }) {
250 + if (this.$route.query.flightKindName == "White Tail") {
251 + // White Tail只展示当前查询的一条
252 + const route = this.$route.query.flightRouteListStr;
253 + let noDateRouteInfo, result;
254 + this.routeList = dateRouteList;
255 + // 从日期取
256 + if (dateListHas.length) {
257 + const dateRouteInfo = dateListHas.filter(
258 + (item) => item.flightRoute == route
259 + );
260 + result = dateRouteInfo; // 航班航线配置信息列表
261 + } else {
262 + // 从非日期级别取
263 + noDateRouteInfo = mergeNoDateRouteInfo.filter(
264 + (item) => item.flightRoute == route
265 + );
266 + result = noDateRouteInfo; // 航班航线配置信息列表
267 + }
268 + if (result.length) {
269 + // 处理属性
270 + result.map((item) => {
271 + if (item.config) {
272 + this.hasOwnProperty(item, "typeOfGoods");
273 + this.hasOwnProperty(item, "puporpuxCode");
274 + this.hasOwnProperty(item, "serviceCode");
275 + this.hasOwnProperty(item, "handlingCode");
276 + this.hasOwnProperty(item, "subCategory");
277 + this.setattrVal(item); // 设置属性值
278 + }
279 + });
280 + this.routesInfo = result;
281 + } else {
282 + // 日期级别和非日期级别都没有配置信息的时候,
283 + // 从数据整合的里面取一个对应的航线数据作为回显暂无数据处理。
284 + noDateRouteInfo = mergeNoDateRouteInfo.filter(
285 + (item) => item.route == route
286 + );
287 + this.routesInfo = noDateRouteInfo;
288 + }
289 + } else {
290 + // 日期级别和航班种类为Purple Tail的时候
291 + // 日期级别的时候要注意dateListNo里没有flightRoute字段,也就是说只有航班航线没有航班航线配置信息;
292 + // 其次是非日期级别mergeNoDateRouteInfo也可能没有对应的数据,没有flightRoute字段。
293 + // 那么这个时候使用mergeFlightRouteConfigObj方法就会出问题。
294 + const result = this.mergeFlightRouteConfigObj(
295 + dateListNo,
296 + mergeNoDateRouteInfo
297 + );
298 + let dateList = dateListHas.concat(result);
299 + // 处理属性
300 + dateList.map((item) => {
301 + if (item.config) {
302 + this.hasOwnProperty(item, "typeOfGoods");
303 + this.hasOwnProperty(item, "puporpuxCode");
304 + this.hasOwnProperty(item, "serviceCode");
305 + this.hasOwnProperty(item, "handlingCode");
306 + this.hasOwnProperty(item, "subCategory");
307 + this.setattrVal(item); // 设置属性值
308 + }
309 + });
310 + this.routeList = dateRouteList;
311 + this.routesInfo = dateList;
312 + }
313 + },
314 + // 整合飞行航线配置信息
315 + mergeFlightRouteConfigObj(routeList, dataList) {
316 + if (dataList.length) {
317 + let flightRoute1 = routeList.some((obj) =>
318 + obj.hasOwnProperty("flightRoute")
319 + );
320 + let flightRoute2 = dataList.some((obj) =>
321 + obj.hasOwnProperty("flightRoute")
322 + );
323 + const result = routeList.map((item1) => {
324 + const item2 = dataList.find((item2) => {
325 + if (flightRoute1) {
326 + if (item2.route === item1.flightRoute) {
327 + item2.config = true;
328 + return item2;
329 + }
330 + } else if (flightRoute2) {
331 + if (item2.flightRoute === item1.route) {
332 + item2.config = true;
333 + return item2;
334 + }
335 + }
336 + }); // 返回当前相等的一条数据
337 + if (item2) {
338 + return { ...item1, ...item2 };
339 + } else {
340 + item1.config = false;
341 + return item1; // 没有的返回当前的
342 + }
343 + });
344 + return result;
345 + } else {
346 + // 没有航班航线配置的情况下
347 + const result = routeList.map((item) => {
348 + item.config = false;
349 + if (item) {
350 + return item;
351 + }
352 + });
353 + return result;
354 + }
355 + },
356 + // 回显时所用:判断对象是否存在某个属性,并且把这个属性值使用分号分隔
38 hasOwnProperty(item, key) { 357 hasOwnProperty(item, key) {
39 if (item.hasOwnProperty(key)) { 358 if (item.hasOwnProperty(key)) {
40 if (item[key]) { 359 if (item[key]) {
...@@ -44,6 +363,45 @@ export default { ...@@ -44,6 +363,45 @@ export default {
44 } 363 }
45 } 364 }
46 }, 365 },
366 + // 保存提交时所用:改方法主要用于提交保存时,再把数组转换成字符串,与hasOwnProperty相反
367 + returnString(parmas, key) {
368 + if (parmas.hasOwnProperty(key)) {
369 + if (parmas[key].length) {
370 + parmas[key] = parmas[key].join(";");
371 + } else {
372 + parmas[key] = null;
373 + }
374 + }
375 + },
376 + //排序
377 + sorttodo(arr, chineseName) {
378 + var index = 1,
379 + newArr = [],
380 + length = arr.length;
381 + for (var i = 0; i < length; i++) {
382 + if (arr[i].chineseName === chineseName) {
383 + newArr[0] = arr[i];
384 + } else {
385 + newArr[index++] = arr[i];
386 + }
387 + }
388 + return newArr;
389 + },
390 + // 数据字典排序
391 + dicSort(val) {
392 + let status1 = [];
393 + let status0 = [];
394 + let arr = [];
395 + val.forEach((item) => {
396 + if (item.status == 1) {
397 + status1.push(item);
398 + } else {
399 + status0.push(item);
400 + }
401 + });
402 + arr = status1.concat(status0);
403 + return arr;
404 + },
47 // 设置属性值 405 // 设置属性值
48 setattrVal(item) { 406 setattrVal(item) {
49 if (item.location) { 407 if (item.location) {
...@@ -66,46 +424,54 @@ export default { ...@@ -66,46 +424,54 @@ export default {
66 if (item.destinationSite == null && item.notDestinationSite == null) { 424 if (item.destinationSite == null && item.notDestinationSite == null) {
67 item.isDestinationSite = "1"; 425 item.isDestinationSite = "1";
68 } 426 }
427 + let routes = [];
428 + if (this.routeList.length) {
429 + this.routeList.map((item) => {
430 + routes.push(item.route);
431 + });
432 + routeRuleForm.routeSpecifyDateSeq = routes.join(";");
433 + }
69 }, 434 },
70 // 失焦事件 435 // 失焦事件
71 blurEvent({ originOfFlightNo }) { 436 blurEvent({ originOfFlightNo }) {
72 this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo); 437 this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo);
73 }, 438 },
74 - // 当前激活面板改变时触发
75 - collapseChange(name) {
76 - // console.log(name);
77 - },
78 // 始发站 439 // 始发站
79 changeLocation(val) { 440 changeLocation(val) {
80 - console.log("始发站:", val); 441 + // console.log("始发站:", val);
81 }, 442 },
82 // 目的站 443 // 目的站
83 changeDestinationSite(val) { 444 changeDestinationSite(val) {
84 - console.log("目的站:", val); 445 + // console.log("目的站:", val);
85 - },
86 - // 申报类别
87 - changeCargoType(arr) {
88 - console.log("申报类别:", arr);
89 - },
90 - // 货物类型
91 - changeCargoStatus(arr) {
92 - console.log("货物类型:", arr);
93 - },
94 - // 取件扫描号
95 - changePuporpux(arr) {
96 - console.log("取件扫描号:", arr);
97 - },
98 - // Service Code
99 - changeServiceCode(arr) {
100 - console.log("Service Code:", arr);
101 - },
102 - // Handling Code
103 - changeHandlingCode(arr) {
104 - console.log("Handling Code:", arr);
105 - },
106 - // Sub Category
107 - changeSubCategory(arr) {
108 - console.log("Sub Category:", arr);
109 }, 446 },
110 }, 447 },
111 }; 448 };
449 +/*
450 + 【整个航班航线维度设置的回显逻辑以及数据处理思路】如下:
451 + 1:获取航班航线列表和航班航线配置信息列表。
452 + 2:如果航班航线配置信息列表有数据,先做航线去重。
453 + 3:拿航班航线列表和航班航线配置信息列表去做遍历,判断当前航班航线在航班航线配置信息列表中有没有对应的数据。
454 + 如果有给当前航班航线设置一个属性值为true的config属性,并且把当前航班航线与航线配置信息列表中对应的对象合并,
455 + 如果当前航班航线没有在航线配置列表中找到,那么直接给航班航线列表中的这条航线数据设置一个属性值为false的config属性。
456 + 4:当把航班航线列表和航班航线配置信息列表数据整合到一块以后,那么在做数据渲染的时候就可以根据config值来显示当前航班航线有没有航线配置信息,
457 + 从而显示暂无数据用来去展示“新增规则”按钮。
458 + 此外config属性还有一个作用就是在做日期级别航线查询的时候,如果日期级别的航线没有航线配置信息会走一次非日期级别的航线配置信息查询,
459 + 那么当有了这个config属性,如果在做日期级别航线配置信息查询的时候,当前日期级别航班航线列表与航班航线配置信息列表做遍历查询时,
460 + 且航班航线列表每一个航线都有航班航线配置信息,那么就可以使用every对航班航线列表与航班配置信息列表做数据整合之后做遍历。
461 + 当返回true时,那么就不需要再走一次非日期级别的航线配置信息查询了,当返回false说明航班航线列表中存在没有航班航线的配置信息,
462 + 那么这个时候就可以根据config属性值为false走一次非日期级别的航线配置信息查询;
463 + 5:【航班配舱设置】逻辑:根据路由跳转传参过来的querySpecifyData值,如果querySpecifyData等于2的时候就是非日期级别,
464 + 那么只需要走非日期级别的查询即可,如果querySpecifyData属性值等于1的时候,说明是日期级别的,那么则走日期级别的查询,
465 + 但是当航班航线列表和航班航线配置信息列表做数据整合之后返回的数组中的JSON对象中config属性值有一个为false,
466 + 那么如同上述第4条提的,就需要再走一次非日期级别的航线配置信息查询;反之则不需要;
467 + 6:【航班信息维护】逻辑:和上述第5条查询的区别之处是根据航班种类flightKindName字段是White Tail还是Purple Tail,
468 + 但是不管是哪种航班类型都是先走日期级别的航班航线配置信息查询,当有config属性值有一个为false的时候还需要走一次非日期级别的航班航线配置信息查询。
469 + 但是有一点就是White Tail只查询一条航班航线配置信息,根据从航班信息维护White Tail类型查看维度,
470 + 做路由跳转传参带过来的航线首先在日期级别航线配置信息中遍历查询有没有该航班航线的配置信息,如果有,
471 + 那么则不需要再走一次非日期级别的航班航线配置信息查询,如果没有那么则再走一次非日期航班航线配置信息查询。
472 + 但是航线优先级显示的航线还是取日期级别航班航线列表中的航线。
473 + 7:航班航线信息列表和航班航线配置信息列表在做完航班航线配置信息列表去重之后和航班航线列表做数据整合之后,
474 + 还要对所有关于显示的数据做处理,比如页面上所有关于checkbox的勾选框radio单选框;
475 + 8: 在保存提交的时候对所有关于页面checkbox的勾选框做数据处理
476 +
477 +*/
......
1 -export const routeData1 = {
2 - code: 200,
3 - msg: "操作成功",
4 - data: {
5 - list: [
6 - {
7 - id: 3337,
8 - createTime: "2023-09-21 09:50:01",
9 - createUserId: "5749",
10 - createUserName: "wjh",
11 - updateTime: null,
12 - updateUserName: null,
13 - purposeOfFlightNo: "JC001",
14 - location: null,
15 - includeUrsa: "P_",
16 - notIncludeUrsa: null,
17 - minNumOfPieces: null,
18 - maxNumOfPieces: null,
19 - minWeight: null,
20 - maxWeight: null,
21 - serviceCode: null,
22 - declarationCategory: null,
23 - typeOfGoods: null,
24 - subCategory: null,
25 - status: "1",
26 - whetherHistory: "0",
27 - historyId: null,
28 - updateUserId: null,
29 - notLocation: null,
30 - handlingCode: null,
31 - portName: "PVG",
32 - puporpuxCode: null,
33 - flightRoute: "USA",
34 - routePriority: "1",
35 - ruleDate: "2023-09-21",
36 - routeSpecifyDateSeq: "USA;SEYB",
37 - destinationSite: null,
38 - notDestinationSite: null,
39 - },
40 - {
41 - id: 3338,
42 - createTime: "2023-09-21 09:50:03",
43 - createUserId: "5749",
44 - createUserName: "wjh",
45 - updateTime: null,
46 - updateUserName: null,
47 - purposeOfFlightNo: "JC001",
48 - location: null,
49 - includeUrsa: "P_",
50 - notIncludeUrsa: null,
51 - minNumOfPieces: null,
52 - maxNumOfPieces: null,
53 - minWeight: null,
54 - maxWeight: null,
55 - serviceCode: null,
56 - declarationCategory: null,
57 - typeOfGoods: null,
58 - subCategory: null,
59 - status: "1",
60 - whetherHistory: "0",
61 - historyId: null,
62 - updateUserId: null,
63 - notLocation: null,
64 - handlingCode: null,
65 - portName: "PVG",
66 - puporpuxCode: null,
67 - flightRoute: "SEYB",
68 - routePriority: "2",
69 - ruleDate: "2023-09-21",
70 - routeSpecifyDateSeq: "USA;SEYB",
71 - destinationSite: null,
72 - notDestinationSite: null,
73 - },
74 - ],
75 - routeList: [
76 - {
77 - fltNo: "JC001",
78 - route: "USA",
79 - routePriority: "1",
80 - },
81 - {
82 - fltNo: "JC001",
83 - route: "SEYB",
84 - routePriority: "2",
85 - },
86 - ],
87 - },
88 -};
89 -
90 -export const routeData2 = {
91 - code: 200,
92 - msg: "操作成功",
93 - data: {
94 - list: [
95 - {
96 - id: 3335,
97 - createTime: "2023-09-21 09:49:40",
98 - createUserId: "5749",
99 - createUserName: "wjh",
100 - updateTime: "2023-09-21 09:56:12",
101 - updateUserName: "wjh",
102 - purposeOfFlightNo: "JC001",
103 - location: null,
104 - includeUrsa: "P_",
105 - notIncludeUrsa: null,
106 - minNumOfPieces: null,
107 - maxNumOfPieces: null,
108 - minWeight: null,
109 - maxWeight: null,
110 - serviceCode: null,
111 - declarationCategory: null,
112 - typeOfGoods: null,
113 - subCategory: null,
114 - status: "1",
115 - whetherHistory: "0",
116 - historyId: null,
117 - updateUserId: 5749,
118 - notLocation: null,
119 - handlingCode: null,
120 - portName: "PVG",
121 - puporpuxCode: null,
122 - flightRoute: "USA",
123 - routePriority: "1",
124 - ruleDate: null,
125 - routeSpecifyDateSeq: "USA;SEYB;LKE",
126 - destinationSite: null,
127 - notDestinationSite: null,
128 - },
129 - {
130 - id: 3336,
131 - createTime: "2023-09-21 09:49:46",
132 - createUserId: "5749",
133 - createUserName: "wjh",
134 - updateTime: "2023-09-21 09:56:12",
135 - updateUserName: "wjh",
136 - purposeOfFlightNo: "JC001",
137 - location: null,
138 - includeUrsa: "P_",
139 - notIncludeUrsa: null,
140 - minNumOfPieces: null,
141 - maxNumOfPieces: null,
142 - minWeight: null,
143 - maxWeight: null,
144 - serviceCode: null,
145 - declarationCategory: null,
146 - typeOfGoods: null,
147 - subCategory: null,
148 - status: "1",
149 - whetherHistory: "0",
150 - historyId: null,
151 - updateUserId: 5749,
152 - notLocation: null,
153 - handlingCode: null,
154 - portName: "PVG",
155 - puporpuxCode: null,
156 - flightRoute: "SEYB",
157 - routePriority: "2",
158 - ruleDate: null,
159 - routeSpecifyDateSeq: "USA;SEYB;LKE",
160 - destinationSite: null,
161 - notDestinationSite: null,
162 - },
163 - ],
164 - routeList: [
165 - {
166 - fltNo: "JC001",
167 - route: "USA",
168 - routePriority: "1",
169 - },
170 - {
171 - fltNo: "JC001",
172 - route: "SEYB",
173 - routePriority: "2",
174 - },
175 - {
176 - fltNo: "JC001",
177 - route: "LKE",
178 - routePriority: "3",
179 - },
180 - ],
181 - },
182 -};
...@@ -285,6 +285,7 @@ export default { ...@@ -285,6 +285,7 @@ export default {
285 flightRouteListStr: route, 285 flightRouteListStr: route,
286 status: "", 286 status: "",
287 pageName: "flightRandConfig", 287 pageName: "flightRandConfig",
288 + disable: true,
288 }, 289 },
289 }); 290 });
290 }, 291 },
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" 3 + <el-form
4 - size="small"> 4 + class="form-header"
5 + :model="queryParams"
6 + ref="queryForm"
7 + label-position="right"
8 + label-width="auto"
9 + size="small"
10 + >
5 <el-row> 11 <el-row>
6 <el-col :span="6"> 12 <el-col :span="6">
7 <el-form-item label="航班日期从" prop="fltDateStart"> 13 <el-form-item label="航班日期从" prop="fltDateStart">
8 - <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateStart" type="date" 14 + <el-date-picker
9 - placeholder="选择日期"> 15 + class="formItem"
16 + value-format="yyyy-MM-dd"
17 + v-model="queryParams.fltDateStart"
18 + type="date"
19 + placeholder="选择日期"
20 + >
10 </el-date-picker> 21 </el-date-picker>
11 </el-form-item> 22 </el-form-item>
12 </el-col> 23 </el-col>
13 <el-col :span="6"> 24 <el-col :span="6">
14 <el-form-item label="到" prop="fltDateEnd"> 25 <el-form-item label="到" prop="fltDateEnd">
15 - <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateEnd" type="date" 26 + <el-date-picker
16 - placeholder="选择日期"> 27 + class="formItem"
28 + value-format="yyyy-MM-dd"
29 + v-model="queryParams.fltDateEnd"
30 + type="date"
31 + placeholder="选择日期"
32 + >
17 </el-date-picker> 33 </el-date-picker>
18 </el-form-item> 34 </el-form-item>
19 </el-col> 35 </el-col>
20 <el-col :span="6"> 36 <el-col :span="6">
21 <el-form-item label="航班号" prop="fltNo"> 37 <el-form-item label="航班号" prop="fltNo">
22 - <el-input class="formItem" v-model="queryParams.fltNo" placeholder="请输入航班号" clearable /> 38 + <el-input
39 + class="formItem"
40 + v-model="queryParams.fltNo"
41 + placeholder="请输入航班号"
42 + clearable
43 + />
23 </el-form-item> 44 </el-form-item>
24 </el-col> 45 </el-col>
25 <el-col :span="6"> 46 <el-col :span="6">
26 <el-form-item label="航班类型" prop="typeId"> 47 <el-form-item label="航班类型" prop="typeId">
27 - <el-select class="formItem" v-model="queryParams.typeId" placeholder="请选择航班类型" clearable> 48 + <el-select
28 - <el-option v-for="dict in selectOption.flightTypelist" :key="dict.id" :label="dict.chineseName" 49 + class="formItem"
29 - :value="dict.id" /> 50 + v-model="queryParams.typeId"
51 + placeholder="请选择航班类型"
52 + clearable
53 + >
54 + <el-option
55 + v-for="dict in selectOption.flightTypelist"
56 + :key="dict.id"
57 + :label="dict.chineseName"
58 + :value="dict.id"
59 + />
30 </el-select> 60 </el-select>
31 </el-form-item> 61 </el-form-item>
32 </el-col> 62 </el-col>
33 <el-col :span="6"> 63 <el-col :span="6">
34 <el-form-item label="航班状态" prop="statusId"> 64 <el-form-item label="航班状态" prop="statusId">
35 - <el-select class="formItem" v-model="queryParams.statusId" placeholder="请选择航班状态" clearable> 65 + <el-select
36 - <el-option v-for="dict in selectOption.flightStatuslist" :key="dict.id" :label="dict.chineseName" 66 + class="formItem"
37 - :value="dict.id" /> 67 + v-model="queryParams.statusId"
68 + placeholder="请选择航班状态"
69 + clearable
70 + >
71 + <el-option
72 + v-for="dict in selectOption.flightStatuslist"
73 + :key="dict.id"
74 + :label="dict.chineseName"
75 + :value="dict.id"
76 + />
38 </el-select> 77 </el-select>
39 </el-form-item> 78 </el-form-item>
40 </el-col> 79 </el-col>
41 <el-col :span="6"> 80 <el-col :span="6">
42 <el-form-item label="航班种类" prop="flightKindId"> 81 <el-form-item label="航班种类" prop="flightKindId">
43 - <el-select class="formItem" v-model="queryParams.flightKindId" placeholder="请选择航班种类" clearable> 82 + <el-select
44 - <el-option v-for="dict in selectOption.flightKindlist" :key="dict.id" :label="dict.chineseName" 83 + class="formItem"
45 - :value="dict.id" /> 84 + v-model="queryParams.flightKindId"
85 + placeholder="请选择航班种类"
86 + clearable
87 + >
88 + <el-option
89 + v-for="dict in selectOption.flightKindlist"
90 + :key="dict.id"
91 + :label="dict.chineseName"
92 + :value="dict.id"
93 + />
46 </el-select> 94 </el-select>
47 </el-form-item> 95 </el-form-item>
48 </el-col> 96 </el-col>
49 </el-row> 97 </el-row>
50 - <el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索 98 + <el-button
99 + class="mt10"
100 + type="primary"
101 + icon="el-icon-search"
102 + size="mini"
103 + :loading="loading"
104 + @click="handleQuery"
105 + >搜索
51 </el-button> 106 </el-button>
52 - <el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 107 + <el-button
53 - <el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" 108 + class="mt10"
54 - v-hasPermi="['base:flightInfo:add']"> 109 + icon="el-icon-refresh"
55 - 新增</el-button> 110 + size="mini"
56 - <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 111 + @click="resetQuery"
57 - @click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button> 112 + >重置</el-button
58 - <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 113 + >
59 - @click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button> 114 + <el-button
60 - <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 115 + class="mt10"
61 - @click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button> 116 + type="primary"
62 - <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 117 + icon="el-icon-plus"
63 - @click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button> 118 + size="mini"
64 - <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 119 + @click="handleAdd"
65 - @click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启 120 + v-hasPermi="['base:flightInfo:add']"
121 + >
122 + 新增</el-button
123 + >
124 + <el-button
125 + class="mt10"
126 + type="primary"
127 + icon="el-icon-circle-check"
128 + size="mini"
129 + :disabled="ids.length == 0"
130 + @click="handleFlightStatus('flightStatus10')"
131 + v-hasPermi="['base:flightInfo:open']"
132 + >自动配舱开启</el-button
133 + >
134 + <el-button
135 + class="mt10"
136 + type="primary"
137 + icon="el-icon-circle-close"
138 + size="mini"
139 + :disabled="ids.length == 0"
140 + @click="handleFlightStatus('flightStatus80')"
141 + v-hasPermi="['base:flightInfo:close']"
142 + >自动配舱关闭</el-button
143 + >
144 + <el-button
145 + class="mt10"
146 + type="primary"
147 + icon="el-icon-circle-check"
148 + size="mini"
149 + :disabled="ids.length == 0"
150 + @click="autoPushBatch('open')"
151 + v-hasPermi="['base:flightInfo:autoPushOpen']"
152 + >自动推送开启</el-button
153 + >
154 + <el-button
155 + class="mt10"
156 + type="primary"
157 + icon="el-icon-circle-close"
158 + size="mini"
159 + :disabled="ids.length == 0"
160 + @click="autoPushBatch('close')"
161 + v-hasPermi="['base:flightInfo:autoPushClose']"
162 + >自动推送关闭</el-button
163 + >
164 + <el-button
165 + class="mt10"
166 + type="primary"
167 + icon="el-icon-circle-check"
168 + size="mini"
169 + :disabled="ids.length == 0"
170 + @click="whiteListSwitchStatus(1)"
171 + v-hasPermi="['base:flightInfo:whiteOpen']"
172 + >白名单自动配舱开启
66 </el-button> 173 </el-button>
67 - <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 174 + <el-button
68 - @click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭 175 + class="mt10"
176 + type="primary"
177 + icon="el-icon-circle-close"
178 + size="mini"
179 + :disabled="ids.length == 0"
180 + @click="whiteListSwitchStatus(0)"
181 + v-hasPermi="['base:flightInfo:whiteClose']"
182 + >白名单自动配舱关闭
69 </el-button> 183 </el-button>
70 - <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 184 + <el-button
71 - @click="BlackListSwitchStatus(1)">黑名单自动配舱开启 185 + class="mt10"
186 + type="primary"
187 + icon="el-icon-circle-check"
188 + size="mini"
189 + :disabled="ids.length == 0"
190 + @click="BlackListSwitchStatus(1)"
191 + >黑名单自动配舱开启
72 </el-button> 192 </el-button>
73 - <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 193 + <el-button
74 - @click="BlackListSwitchStatus(0)">黑名单自动配舱关闭 194 + class="mt10"
195 + type="primary"
196 + icon="el-icon-circle-close"
197 + size="mini"
198 + :disabled="ids.length == 0"
199 + @click="BlackListSwitchStatus(0)"
200 + >黑名单自动配舱关闭
75 </el-button> 201 </el-button>
76 - <el-button class="mt10" type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" 202 + <el-button
77 - @click="handleDelete" v-hasPermi="['base:flightInfo:delete']">删除 203 + class="mt10"
204 + type="danger"
205 + icon="el-icon-delete"
206 + size="mini"
207 + :disabled="ids.length == 0"
208 + @click="handleDelete"
209 + v-hasPermi="['base:flightInfo:delete']"
210 + >删除
78 </el-button> 211 </el-button>
79 </el-form> 212 </el-form>
80 - <Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader" 213 + <Tables
81 - :order="true" :selection="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limitSize" 214 + ref="flightInfoTable"
82 - :page="queryParams.pageNum" :shiftKey="shiftKey" :height="tableHeight" :pageSizes="[20, 30, 40, 50, 100]" 215 + ductName="FlightInformation"
83 - @tableSelect="tableSelect" @tableSelectAll="tableSelectAll" @currentChange="currentChange" @sortChange="sortChange" 216 + :data="findAllFltDatList"
84 - @sizeChange="sizeChange"> 217 + :headerData="tableHeader"
218 + :order="true"
219 + :selection="true"
220 + :totalCount="total"
221 + :loading="loading"
222 + :limitSize="queryParams.limitSize"
223 + :page="queryParams.pageNum"
224 + :shiftKey="shiftKey"
225 + :height="tableHeight"
226 + :pageSizes="[20, 30, 40, 50, 100]"
227 + @tableSelect="tableSelect"
228 + @tableSelectAll="tableSelectAll"
229 + @currentChange="currentChange"
230 + @sortChange="sortChange"
231 + @sizeChange="sizeChange"
232 + >
85 <template slot="optionColumn"> 233 <template slot="optionColumn">
86 - <el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center" 234 + <el-table-column
87 - class-name="small-padding fixed-width" :fixed="tableHeader.length > 10 ? 'right' : false" width="160"> 235 + v-if="findAllFltDatList.length > 0"
236 + label="操作"
237 + align="center"
238 + class-name="small-padding fixed-width"
239 + :fixed="tableHeader.length > 10 ? 'right' : false"
240 + width="160"
241 + >
88 <template slot-scope="scope"> 242 <template slot-scope="scope">
89 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" 243 + <el-button
90 - v-hasPermi="['base:flightInfo:update']">修改</el-button> 244 + size="mini"
91 - <el-button size="mini" type="text" icon="el-icon-link" @click="goFlightAllocConfig(scope.row)">查看维度 245 + type="text"
246 + icon="el-icon-edit"
247 + @click="handleUpdate(scope.row)"
248 + v-hasPermi="['base:flightInfo:update']"
249 + >修改</el-button
250 + >
251 + <el-button
252 + size="mini"
253 + type="text"
254 + icon="el-icon-link"
255 + @click="goFlightAllocConfig(scope.row)"
256 + >查看维度
92 </el-button> 257 </el-button>
93 </template> 258 </template>
94 </el-table-column> 259 </el-table-column>
95 </template> 260 </template>
96 </Tables> 261 </Tables>
97 <!-- 添加或修改对话框 --> 262 <!-- 添加或修改对话框 -->
98 - <el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true" 263 + <el-dialog
99 - :show-close="false" @close="cancel"> 264 + :title="title"
100 - <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto" size="small"> 265 + :visible.sync="open"
266 + width="60%"
267 + :close-on-click-modal="false"
268 + :append-to-body="true"
269 + :show-close="false"
270 + @close="cancel"
271 + >
272 + <el-form
273 + ref="form"
274 + :model="form"
275 + :rules="rules"
276 + label-position="right"
277 + label-width="auto"
278 + size="small"
279 + >
101 <el-row> 280 <el-row>
102 <el-col :span="12"> 281 <el-col :span="12">
103 <el-form-item label="航班号" prop="fltNo"> 282 <el-form-item label="航班号" prop="fltNo">
104 - <el-input class="wid80" @blur="blurfltNo" :disabled="formdisabled.fltNo" v-model="form.fltNo" 283 + <el-input
105 - placeholder="请输入航班号" maxlength="20" /> 284 + class="wid80"
285 + @blur="blurfltNo"
286 + :disabled="formdisabled.fltNo"
287 + v-model="form.fltNo"
288 + placeholder="请输入航班号"
289 + maxlength="20"
290 + />
106 </el-form-item> 291 </el-form-item>
107 </el-col> 292 </el-col>
108 <el-col :span="12"> 293 <el-col :span="12">
109 <el-form-item label="该航班预审状态:"> 294 <el-form-item label="该航班预审状态:">
110 - <el-tag v-if="preAudit" :type="preAudit == '开启' ? 'success' : 'info'" effect="dark">{{ preAudit }} 295 + <el-tag
296 + v-if="preAudit"
297 + :type="preAudit == '开启' ? 'success' : 'info'"
298 + effect="dark"
299 + >{{ preAudit }}
111 </el-tag> 300 </el-tag>
112 </el-form-item> 301 </el-form-item>
113 </el-col> 302 </el-col>
...@@ -115,56 +304,135 @@ ...@@ -115,56 +304,135 @@
115 <el-row> 304 <el-row>
116 <el-col :span="12"> 305 <el-col :span="12">
117 <el-form-item label="航班日期" prop="fltDate"> 306 <el-form-item label="航班日期" prop="fltDate">
118 - <el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small" v-model="form.fltDate" 307 + <el-date-picker
119 - type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期"> 308 + class="wid80"
309 + :disabled="formdisabled.fltDate"
310 + clearable
311 + size="small"
312 + v-model="form.fltDate"
313 + type="date"
314 + value-format="yyyy-MM-dd"
315 + placeholder="选择航班日期"
316 + >
120 </el-date-picker> 317 </el-date-picker>
121 </el-form-item> 318 </el-form-item>
122 </el-col> 319 </el-col>
123 <el-col :span="12"> 320 <el-col :span="12">
124 <el-form-item label="航班种类" prop="kindId"> 321 <el-form-item label="航班种类" prop="kindId">
125 - <el-select class="wid80" v-model="form.kindId" :disabled="formdisabled.kindId" placeholder="请选择航班种类" 322 + <el-select
126 - @change="kindChange"> 323 + class="wid80"
127 - <el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName" 324 + v-model="form.kindId"
128 - :value="item.id"> 325 + :disabled="formdisabled.kindId"
326 + placeholder="请选择航班种类"
327 + @change="kindChange"
328 + >
329 + <el-option
330 + v-for="item in selectOption.flightKindlist"
331 + :key="item.id"
332 + :label="item.chineseName"
333 + :value="item.id"
334 + >
129 </el-option> 335 </el-option>
130 </el-select> 336 </el-select>
131 </el-form-item> 337 </el-form-item>
132 </el-col> 338 </el-col>
133 </el-row> 339 </el-row>
134 - <el-row style="margin-bottom:5px"> 340 + <el-row style="margin-bottom: 5px">
135 <el-col :span="12"> 341 <el-col :span="12">
136 <el-form-item> 342 <el-form-item>
137 <template slot="label"> 343 <template slot="label">
138 - <div style="display:inline-block"> 344 + <div style="display: inline-block">
139 - <span class="error-route">*</span> 345 + <span class="error-route">*</span>
140 - 航班路线 346 + 航班路线
141 - <el-tooltip class="item" effect="dark" content="输入航班号后获取航线信息。航班种类为Purple Tail时可以进行多选,切换航班种类后需重新选择航线" 347 + <el-tooltip
142 - placement="top-start"> 348 + class="item"
143 - <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span> 349 + effect="dark"
350 + content="输入航班号后获取航线信息。航班种类为Purple Tail时可以进行多选,切换航班种类后需重新选择航线"
351 + placement="top-start"
352 + >
353 + <span
354 + class="el-icon-warning"
355 + style="color: #1890ff; font-size: 16px"
356 + ></span>
144 </el-tooltip> 357 </el-tooltip>
145 </div> 358 </div>
146 </template> 359 </template>
147 - <el-select v-if="routeMultiple" ref="routeSelect" class="wid80" v-model="form.route" 360 + <el-select
148 - :disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" @blur="blurRoute" 361 + v-if="routeMultiple"
149 - :loading="routeLoading" :multiple='true' :key="routeMultiple"> 362 + ref="routeSelect"
150 - <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> 363 + class="wid80"
364 + v-model="form.route"
365 + :disabled="formdisabled.route"
366 + placeholder="请选择航线"
367 + no-data-text="未查询到航线"
368 + @change="routeChange"
369 + @blur="blurRoute"
370 + :loading="routeLoading"
371 + :multiple="true"
372 + :key="routeMultiple"
373 + >
374 + <el-option
375 + v-for="item in routeList"
376 + :key="item.id"
377 + :label="item.route"
378 + :value="item.isEtesRoute"
379 + >
380 + <span style="float: left">{{ item.route }}</span>
381 + <span style="float: right; color: #8492a6; font-size: 13px">{{
382 + item.isEtesRoute == 'Y' ? '【ET86】航线' : ''
383 + }}</span>
151 </el-option> 384 </el-option>
152 </el-select> 385 </el-select>
153 - <el-select v-if="routeMultiple == false" ref="routeSelect" class="wid80" v-model="form.route" 386 + <el-select
154 - :disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" @blur="blurRoute" 387 + v-if="routeMultiple == false"
155 - :loading="routeLoading" :multiple='false' :key="routeMultiple"> 388 + ref="routeSelect"
156 - <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> 389 + class="wid80"
390 + v-model="form.route"
391 + :disabled="formdisabled.route"
392 + placeholder="请选择航线"
393 + no-data-text="未查询到航线"
394 + @change="routeChange"
395 + @blur="blurRoute"
396 + :loading="routeLoading"
397 + :multiple="false"
398 + :key="routeMultiple"
399 + >
400 + <el-option
401 + v-for="item in routeList"
402 + :key="item.id"
403 + :label="item.route"
404 + :value="item.isEtesRoute"
405 + >
406 + <span style="float: left">{{ item.route }}</span>
407 + <span style="float: right; color: #8492a6; font-size: 13px">{{
408 + item.isEtesRoute == 'Y' ? '【ET86】航线' : ''
409 + }}</span>
157 </el-option> 410 </el-option>
158 </el-select> 411 </el-select>
159 - <span ref="errorRoute" class="el-form-item__error" v-show="routeError">航班路线不能为空</span> 412 + <span
413 + ref="errorRoute"
414 + class="el-form-item__error"
415 + v-show="routeError"
416 + >航班路线不能为空</span
417 + >
160 </el-form-item> 418 </el-form-item>
161 - <div class="formTips" v-if="title == '修改航班信息'">注意!:移除航线,相对应日期级别航线维度会同时删除</div> 419 + <div class="formTips" v-if="title == '修改航班信息'">
420 + 注意!:移除航线,相对应日期级别航线维度会同时删除
421 + </div>
162 </el-col> 422 </el-col>
163 <el-col :span="12"> 423 <el-col :span="12">
164 <el-form-item label="航班类型" prop="typeId"> 424 <el-form-item label="航班类型" prop="typeId">
165 - <el-select class="wid80" v-model="form.typeId" placeholder="请选择航班类型"> 425 + <el-select
166 - <el-option v-for="item in selectOption.flightTypelist" :key="item.id" :label="item.chineseName" 426 + class="wid80"
167 - :value="item.id"> 427 + v-model="form.typeId"
428 + placeholder="请选择航班类型"
429 + >
430 + <el-option
431 + v-for="item in selectOption.flightTypelist"
432 + :key="item.id"
433 + :label="item.chineseName"
434 + :value="item.id"
435 + >
168 </el-option> 436 </el-option>
169 </el-select> 437 </el-select>
170 </el-form-item> 438 </el-form-item>
...@@ -173,31 +441,60 @@ ...@@ -173,31 +441,60 @@
173 <el-row> 441 <el-row>
174 <el-col :span="12"> 442 <el-col :span="12">
175 <el-form-item label="航班状态" prop="statusId"> 443 <el-form-item label="航班状态" prop="statusId">
176 - <el-select class="wid80" :disabled="true" v-model="form.statusId" placeholder="请选择航班状态"> 444 + <el-select
177 - <el-option v-for="item in selectOption.flightStatuslist" :key="item.id" :label="item.chineseName" 445 + class="wid80"
178 - :value="item.id"> 446 + :disabled="true"
447 + v-model="form.statusId"
448 + placeholder="请选择航班状态"
449 + >
450 + <el-option
451 + v-for="item in selectOption.flightStatuslist"
452 + :key="item.id"
453 + :label="item.chineseName"
454 + :value="item.id"
455 + >
179 </el-option> 456 </el-option>
180 </el-select> 457 </el-select>
181 </el-form-item> 458 </el-form-item>
182 </el-col> 459 </el-col>
183 <el-col :span="12"> 460 <el-col :span="12">
184 <el-form-item label="原始重量(KG)" prop="originalWeight"> 461 <el-form-item label="原始重量(KG)" prop="originalWeight">
185 - <el-input-number class="wid80" @change="LowHighAvailable" :min="0" :precision="0" placeholder="请输入原始重量(KG)" 462 + <el-input-number
186 - v-model="form.originalWeight" v-input-filter></el-input-number> 463 + class="wid80"
464 + @change="LowHighAvailable"
465 + :min="0"
466 + :precision="0"
467 + placeholder="请输入原始重量(KG)"
468 + v-model="form.originalWeight"
469 + v-input-filter
470 + ></el-input-number>
187 </el-form-item> 471 </el-form-item>
188 </el-col> 472 </el-col>
189 </el-row> 473 </el-row>
190 <el-row> 474 <el-row>
191 <el-col :span="12"> 475 <el-col :span="12">
192 <el-form-item label="额外增重百分比" prop="extraWeightPercent"> 476 <el-form-item label="额外增重百分比" prop="extraWeightPercent">
193 - <el-input-number class="wid80" @change="LowHighAvailable" :min="0" :precision="0" placeholder="请输入额外增重百分比" 477 + <el-input-number
194 - v-model="form.extraWeightPercent" v-input-filter></el-input-number> 478 + class="wid80"
479 + @change="LowHighAvailable"
480 + :min="0"
481 + :precision="0"
482 + placeholder="请输入额外增重百分比"
483 + v-model="form.extraWeightPercent"
484 + v-input-filter
485 + ></el-input-number>
195 </el-form-item> 486 </el-form-item>
196 </el-col> 487 </el-col>
197 <el-col :span="12"> 488 <el-col :span="12">
198 <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> 489 <el-form-item label="是否开启高低价" prop="highLowPriceFlg">
199 - <el-switch class="wid80" @change="LowHighAvailable" v-model="form.highLowPriceFlg" :active-value="1" 490 + <el-switch
200 - :inactive-value="0" active-color="#13ce66"> 491 + class="wid80"
492 + @change="LowHighAvailable"
493 + v-model="form.highLowPriceFlg"
494 + :active-value="1"
495 + :inactive-value="0"
496 + active-color="#13ce66"
497 + >
201 </el-switch> 498 </el-switch>
202 </el-form-item> 499 </el-form-item>
203 </el-col> 500 </el-col>
...@@ -205,72 +502,120 @@ ...@@ -205,72 +502,120 @@
205 <el-row> 502 <el-row>
206 <el-col :span="12"> 503 <el-col :span="12">
207 <el-form-item label="今日航班预审状态" prop="isNeedRequired"> 504 <el-form-item label="今日航班预审状态" prop="isNeedRequired">
208 - <el-select class="wid80" v-model="form.isNeedRequired" placeholder=""> 505 + <el-select
209 - <el-option label="未设置" :value="2"> 506 + class="wid80"
210 - </el-option> 507 + v-model="form.isNeedRequired"
211 - <el-option label="开启" :value="1"> 508 + placeholder=""
212 - </el-option> 509 + >
213 - <el-option label="关闭" :value="0"> 510 + <el-option label="未设置" :value="2"> </el-option>
214 - </el-option> 511 + <el-option label="开启" :value="1"> </el-option>
512 + <el-option label="关闭" :value="0"> </el-option>
215 </el-select> 513 </el-select>
216 </el-form-item> 514 </el-form-item>
217 </el-col> 515 </el-col>
218 <el-col :span="12"> 516 <el-col :span="12">
219 <el-form-item label="高价百分比" prop="highPriceWeightPercent"> 517 <el-form-item label="高价百分比" prop="highPriceWeightPercent">
220 - <el-input-number class="wid80" :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" 518 + <el-input-number
221 - placeholder="开启高低价后可修改" v-model="form.highPriceWeightPercent"></el-input-number> 519 + class="wid80"
520 + :disabled="ishighPriceWeightPercent"
521 + @change="LowHighAvailable"
522 + placeholder="开启高低价后可修改"
523 + v-model="form.highPriceWeightPercent"
524 + ></el-input-number>
222 </el-form-item> 525 </el-form-item>
223 </el-col> 526 </el-col>
224 </el-row> 527 </el-row>
225 <el-row> 528 <el-row>
226 <el-col :span="12"> 529 <el-col :span="12">
227 <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> 530 <el-form-item label="低价百分比" prop="lowPriceWeightPercent">
228 - <el-input-number class="wid80" :disabled="true" placeholder="开启高低价后计算" 531 + <el-input-number
229 - v-model="form.lowPriceWeightPercent"></el-input-number> 532 + class="wid80"
533 + :disabled="true"
534 + placeholder="开启高低价后计算"
535 + v-model="form.lowPriceWeightPercent"
536 + ></el-input-number>
230 </el-form-item> 537 </el-form-item>
231 </el-col> 538 </el-col>
232 <el-col :span="12"> 539 <el-col :span="12">
233 <el-form-item label="高价可配重量" prop="highAvailableWeight"> 540 <el-form-item label="高价可配重量" prop="highAvailableWeight">
234 - <el-input-number class="wid80" :disabled="true" placeholder="开启高低价后计算" v-model="form.highAvailableWeight" 541 + <el-input-number
235 - :precision="2"></el-input-number> 542 + class="wid80"
543 + :disabled="true"
544 + placeholder="开启高低价后计算"
545 + v-model="form.highAvailableWeight"
546 + :precision="2"
547 + ></el-input-number>
236 </el-form-item> 548 </el-form-item>
237 </el-col> 549 </el-col>
238 </el-row> 550 </el-row>
239 <el-row> 551 <el-row>
240 <el-col :span="12"> 552 <el-col :span="12">
241 <el-form-item label="低价可配重量" prop="lowAvailableWeight"> 553 <el-form-item label="低价可配重量" prop="lowAvailableWeight">
242 - <el-input-number class="wid80" :disabled="true" placeholder="开启高低价后计算" v-model="form.lowAvailableWeight" 554 + <el-input-number
243 - :precision="2"></el-input-number> 555 + class="wid80"
556 + :disabled="true"
557 + placeholder="开启高低价后计算"
558 + v-model="form.lowAvailableWeight"
559 + :precision="2"
560 + ></el-input-number>
244 </el-form-item> 561 </el-form-item>
245 </el-col> 562 </el-col>
246 <el-col :span="12"> 563 <el-col :span="12">
247 <el-form-item label="高价已配重量" prop="highAllocatedWeight"> 564 <el-form-item label="高价已配重量" prop="highAllocatedWeight">
248 - <el-input-number class="wid80" :disabled="true" placeholder="请输入高价已配重量" v-model="form.highAllocatedWeight" 565 + <el-input-number
249 - :precision="2"></el-input-number> 566 + class="wid80"
567 + :disabled="true"
568 + placeholder="请输入高价已配重量"
569 + v-model="form.highAllocatedWeight"
570 + :precision="2"
571 + ></el-input-number>
250 </el-form-item> 572 </el-form-item>
251 </el-col> 573 </el-col>
252 </el-row> 574 </el-row>
253 <el-row> 575 <el-row>
254 <el-col :span="12"> 576 <el-col :span="12">
255 <el-form-item label="低价已配重量" prop="lowAllocatedWeight"> 577 <el-form-item label="低价已配重量" prop="lowAllocatedWeight">
256 - <el-input-number class="wid80" :disabled="true" placeholder="请输入低价已配重量" v-model="form.lowAllocatedWeight" 578 + <el-input-number
257 - :precision="2"></el-input-number> 579 + class="wid80"
580 + :disabled="true"
581 + placeholder="请输入低价已配重量"
582 + v-model="form.lowAllocatedWeight"
583 + :precision="2"
584 + ></el-input-number>
258 </el-form-item> 585 </el-form-item>
259 </el-col> 586 </el-col>
260 <el-col :span="12"> 587 <el-col :span="12">
261 <el-form-item label="已配总重量" prop="alloctedWeight"> 588 <el-form-item label="已配总重量" prop="alloctedWeight">
262 - <el-input-number class="wid80" :disabled="true" placeholder="请输入已配总重量" v-model="form.alloctedWeight" 589 + <el-input-number
263 - :precision="2"></el-input-number> 590 + class="wid80"
591 + :disabled="true"
592 + placeholder="请输入已配总重量"
593 + v-model="form.alloctedWeight"
594 + :precision="2"
595 + ></el-input-number>
264 </el-form-item> 596 </el-form-item>
265 </el-col> 597 </el-col>
266 <el-col :span="12"> 598 <el-col :span="12">
267 <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight"> 599 <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight">
268 - <el-input-number class="wid80" v-model="form.accountTotalWeight" disabled placeholder="配置特殊规则后计算" /> 600 + <el-input-number
601 + class="wid80"
602 + v-model="form.accountTotalWeight"
603 + disabled
604 + placeholder="配置特殊规则后计算"
605 + />
269 </el-form-item> 606 </el-form-item>
270 </el-col> 607 </el-col>
271 <el-col :span="12"> 608 <el-col :span="12">
272 - <el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight"> 609 + <el-form-item
273 - <el-input-number class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" /> 610 + label="特殊规则已配重量"
611 + prop="accountAllocatedWeight"
612 + >
613 + <el-input-number
614 + class="wid80"
615 + v-model="form.accountAllocatedWeight"
616 + disabled
617 + placeholder="配置特殊规则后计算"
618 + />
274 </el-form-item> 619 </el-form-item>
275 </el-col> 620 </el-col>
276 </el-row> 621 </el-row>
...@@ -280,12 +625,22 @@ ...@@ -280,12 +625,22 @@
280 <el-button @click="cancel">取 消</el-button> 625 <el-button @click="cancel">取 消</el-button>
281 </div> 626 </div>
282 </el-dialog> 627 </el-dialog>
283 - <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false" 628 + <el-dialog
284 - :append-to-body="true" :close-on-press-escape="false"> 629 + title="未删除成功航班"
630 + width="40%"
631 + center
632 + :visible.sync="dialogTableVisible"
633 + :close-on-click-modal="false"
634 + :append-to-body="true"
635 + :close-on-press-escape="false"
636 + >
285 <el-table :data="gridData"> 637 <el-table :data="gridData">
286 <el-table-column property="fltNo" label="航班号"></el-table-column> 638 <el-table-column property="fltNo" label="航班号"></el-table-column>
287 <el-table-column property="fltDate" label="航班日期"></el-table-column> 639 <el-table-column property="fltDate" label="航班日期"></el-table-column>
288 - <el-table-column property="alloctedWeight" label="已配重量"></el-table-column> 640 + <el-table-column
641 + property="alloctedWeight"
642 + label="已配重量"
643 + ></el-table-column>
289 </el-table> 644 </el-table>
290 </el-dialog> 645 </el-dialog>
291 </div> 646 </div>
...@@ -302,11 +657,11 @@ import { ...@@ -302,11 +657,11 @@ import {
302 updateStatusBatch, 657 updateStatusBatch,
303 updateAutoPushBatch, 658 updateAutoPushBatch,
304 updateWhiteListSwitchBatch, 659 updateWhiteListSwitchBatch,
305 - updateBlackListSwitchBatch 660 + updateBlackListSwitchBatch,
306 } from "@/api/findAllFltData"; 661 } from "@/api/findAllFltData";
307 -import { getpreAudit } from '@/api/system/preReview.js' 662 +import { getpreAudit } from "@/api/system/preReview.js";
308 -import { queryRouteByFltNo } from '@/api/destinationFlight.js' 663 +import { queryRouteByFltNo } from "@/api/destinationFlight.js";
309 - 664 +import { queryRoute } from "@/api/system/dictionary.js";
310 export default { 665 export default {
311 name: "FlightInformationMaintenance", 666 name: "FlightInformationMaintenance",
312 data() { 667 data() {
...@@ -355,14 +710,14 @@ export default { ...@@ -355,14 +710,14 @@ export default {
355 { 710 {
356 required: true, 711 required: true,
357 message: "原始重量(KG)不能为空", 712 message: "原始重量(KG)不能为空",
358 - trigger: ["change","blur"], 713 + trigger: ["change", "blur"],
359 }, 714 },
360 ], 715 ],
361 }, 716 },
362 //原航班规则数据 717 //原航班规则数据
363 findAllFltDatList: [], 718 findAllFltDatList: [],
364 //表头 719 //表头
365 - tableHeader: this.tableHeaders['FlightInformation'], 720 + tableHeader: this.tableHeaders["FlightInformation"],
366 //删除失败数据 721 //删除失败数据
367 gridData: [], 722 gridData: [],
368 //form属性禁用状态 723 //form属性禁用状态
...@@ -499,7 +854,7 @@ export default { ...@@ -499,7 +854,7 @@ export default {
499 }, 854 },
500 created() { 855 created() {
501 //查询条件数据源 856 //查询条件数据源
502 - this.queryParams.fltDateStart = this.nowDate() 857 + this.queryParams.fltDateStart = this.nowDate();
503 if (this.$store.state.tagsView.cachedViews.length == 0) { 858 if (this.$store.state.tagsView.cachedViews.length == 0) {
504 this.findFltConditionData(); 859 this.findFltConditionData();
505 this.findAllFltData(); 860 this.findAllFltData();
...@@ -514,7 +869,7 @@ export default { ...@@ -514,7 +869,7 @@ export default {
514 // }) 869 // })
515 }, 870 },
516 activated() { 871 activated() {
517 - this.ids = [] 872 + this.ids = [];
518 this.findFltConditionData(); 873 this.findFltConditionData();
519 this.findAllFltData(); 874 this.findAllFltData();
520 }, 875 },
...@@ -532,22 +887,22 @@ export default { ...@@ -532,22 +887,22 @@ export default {
532 this.shiftKey = false; 887 this.shiftKey = false;
533 } 888 }
534 }); 889 });
535 - this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120; 890 + this.tableHeight =
891 + window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120;
536 }, 892 },
537 methods: { 893 methods: {
538 //输入航班号后 894 //输入航班号后
539 blurfltNo() { 895 blurfltNo() {
540 -
541 // this.routeList = [] 896 // this.routeList = []
542 - this.form.accountTotalWeight = 0 897 + this.form.accountTotalWeight = 0;
543 - this.form.accountAllocatedWeight = 0 898 + this.form.accountAllocatedWeight = 0;
544 if ( 899 if (
545 this.form.fltNo != null && 900 this.form.fltNo != null &&
546 this.form.fltNo != undefined && 901 this.form.fltNo != undefined &&
547 this.form.fltNo != "" 902 this.form.fltNo != ""
548 ) { 903 ) {
549 this.form.fltNo = this.form.fltNo.toUpperCase(); 904 this.form.fltNo = this.form.fltNo.toUpperCase();
550 - this.perStatus(this.form.fltNo) 905 + this.perStatus(this.form.fltNo);
551 findFltCommonConf(this.form).then((response) => { 906 findFltCommonConf(this.form).then((response) => {
552 if (response.code == 200) { 907 if (response.code == 200) {
553 //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 908 //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑
...@@ -603,30 +958,28 @@ export default { ...@@ -603,30 +958,28 @@ export default {
603 this.msgError(response.msg); 958 this.msgError(response.msg);
604 } 959 }
605 }); 960 });
606 - this.routeLoading = true 961 + this.routeLoading = true;
607 //获取航线 962 //获取航线
608 - queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => { 963 + queryRouteByFltNo({ fltNo: this.form.fltNo })
609 - this.routeLoading = false 964 + .then((res) => {
610 - if (res.code === 200) { 965 + this.routeLoading = false;
611 - if(res.data.list.length){ 966 + if (res.code === 200) {
612 - let isEtesRoute = res.data.list.filter((item) => item.isEtesRoute == "N"); // 过滤ET86航线 967 + if (res.data.list.length) {
613 - this.routeList = isEtesRoute 968 + this.routeList = res.data.list;
614 - if (isEtesRoute.length == 0) {
615 - this.form.route = "";
616 } 969 }
970 + if (res.data.list.length == 0) {
971 + this.form.route = "";
972 + this.routeList = [];
973 + this.msgError("该航班没有设置航线");
974 + }
975 + } else {
976 + this.msgWarning(res.msg);
617 } 977 }
618 - if (res.data.list.length == 0) { 978 + })
619 - this.form.route = ""; 979 + .catch((err) => {
620 - this.routeList = [] 980 + this.routeLoading = false;
621 - this.msgError("该航班没有设置航线"); 981 + console.log(err);
622 - } 982 + });
623 - } else {
624 - this.msgWarning(res.msg)
625 - }
626 - }).catch(err => {
627 - this.routeLoading = false
628 - console.log(err)
629 - })
630 } else { 983 } else {
631 this.form.route = ""; 984 this.form.route = "";
632 this.routeList = []; 985 this.routeList = [];
...@@ -634,18 +987,18 @@ export default { ...@@ -634,18 +987,18 @@ export default {
634 }, 987 },
635 //航班种类修改 988 //航班种类修改
636 kindChange(val) { 989 kindChange(val) {
637 - this.selectOption.flightKindlist.forEach(item => { 990 + this.selectOption.flightKindlist.forEach((item) => {
638 if (item.id == val) { 991 if (item.id == val) {
639 - if (item.chineseName.indexOf('White') >= 0) { 992 + if (item.chineseName.indexOf("White") >= 0) {
640 - this.routeMultiple = false 993 + this.routeMultiple = false;
641 - this.form.route = '' 994 + this.form.route = "";
642 - } else if (item.chineseName.indexOf('Purple') >= 0) { 995 + } else if (item.chineseName.indexOf("Purple") >= 0) {
643 - this.routeMultiple = true 996 + this.routeMultiple = true;
644 - this.form.route = [] 997 + this.form.route = [];
645 } 998 }
646 - this.routeError = true 999 + this.routeError = true;
647 } 1000 }
648 - }) 1001 + });
649 // this.$refs.routeSelect.$forceUpdate() 1002 // this.$refs.routeSelect.$forceUpdate()
650 }, 1003 },
651 //查询条件数据源 1004 //查询条件数据源
...@@ -665,15 +1018,24 @@ export default { ...@@ -665,15 +1018,24 @@ export default {
665 }, 1018 },
666 //获取航班预审状态 1019 //获取航班预审状态
667 perStatus(val) { 1020 perStatus(val) {
668 - getpreAudit({ fltNo: val, page: 1, size: 20 }).then(res => { 1021 + getpreAudit({ fltNo: val, page: 1, size: 20 })
669 - if (res.code === 200) { 1022 + .then((res) => {
670 - this.preAudit = res.data.list.length == 0 ? '关闭' : res.data.list[0].status == 0 ? '关闭' : res.data.list[0].status == 1 ? '开启' : '' 1023 + if (res.code === 200) {
671 - } else { 1024 + this.preAudit =
672 - this.msgWarning(res.msg) 1025 + res.data.list.length == 0
673 - } 1026 + ? "关闭"
674 - }).catch(err => { 1027 + : res.data.list[0].status == 0
675 - console.log(err) 1028 + ? "关闭"
676 - }) 1029 + : res.data.list[0].status == 1
1030 + ? "开启"
1031 + : "";
1032 + } else {
1033 + this.msgWarning(res.msg);
1034 + }
1035 + })
1036 + .catch((err) => {
1037 + console.log(err);
1038 + });
677 }, 1039 },
678 /** 航班信息维护查询*/ 1040 /** 航班信息维护查询*/
679 findAllFltData() { 1041 findAllFltData() {
...@@ -706,7 +1068,7 @@ export default { ...@@ -706,7 +1068,7 @@ export default {
706 handleAdd() { 1068 handleAdd() {
707 this.reset(); 1069 this.reset();
708 this.findFltConditionData(); 1070 this.findFltConditionData();
709 - this.preAudit = null 1071 + this.preAudit = null;
710 this.open = true; 1072 this.open = true;
711 this.title = "添加航班信息"; 1073 this.title = "添加航班信息";
712 this.form.id = null; 1074 this.form.id = null;
...@@ -728,8 +1090,8 @@ export default { ...@@ -728,8 +1090,8 @@ export default {
728 this.formdisabled.originalWeight = false; 1090 this.formdisabled.originalWeight = false;
729 this.routeError = false; 1091 this.routeError = false;
730 this.$nextTick(() => { 1092 this.$nextTick(() => {
731 - this.$refs.form.clearValidate() 1093 + this.$refs.form.clearValidate();
732 - }) 1094 + });
733 }, 1095 },
734 //计算高低价可配 1096 //计算高低价可配
735 LowHighAvailable() { 1097 LowHighAvailable() {
...@@ -749,8 +1111,10 @@ export default { ...@@ -749,8 +1111,10 @@ export default {
749 this.$set( 1111 this.$set(
750 this.form, 1112 this.form,
751 "highAvailableWeight", 1113 "highAvailableWeight",
752 - (Weight - this.form.accountTotalWeight - (this.form.alloctedWeight - this.form.accountAllocatedWeight)) * 1114 + (Weight -
753 - (this.form.highPriceWeightPercent / 100) 1115 + this.form.accountTotalWeight -
1116 + (this.form.alloctedWeight - this.form.accountAllocatedWeight)) *
1117 + (this.form.highPriceWeightPercent / 100)
754 ); 1118 );
755 this.$set( 1119 this.$set(
756 this.form, 1120 this.form,
...@@ -773,7 +1137,7 @@ export default { ...@@ -773,7 +1137,7 @@ export default {
773 this.form, 1137 this.form,
774 "highAvailableWeight", 1138 "highAvailableWeight",
775 (Weight - this.form.alloctedWeight) * 1139 (Weight - this.form.alloctedWeight) *
776 - (this.form.highPriceWeightPercent / 100) 1140 + (this.form.highPriceWeightPercent / 100)
777 ); 1141 );
778 } 1142 }
779 } else { 1143 } else {
...@@ -785,7 +1149,10 @@ export default { ...@@ -785,7 +1149,10 @@ export default {
785 this.$set( 1149 this.$set(
786 this.form, 1150 this.form,
787 "lowAvailableWeight", 1151 "lowAvailableWeight",
788 - (Weight - this.form.accountTotalWeight - (this.form.alloctedWeight - this.form.accountAllocatedWeight)) - this.form.highAvailableWeight 1152 + Weight -
1153 + this.form.accountTotalWeight -
1154 + (this.form.alloctedWeight - this.form.accountAllocatedWeight) -
1155 + this.form.highAvailableWeight
789 ); 1156 );
790 //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; 1157 //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight;
791 } else if ( 1158 } else if (
...@@ -817,7 +1184,9 @@ export default { ...@@ -817,7 +1184,9 @@ export default {
817 Weightall() { 1184 Weightall() {
818 let Weight = 0; 1185 let Weight = 0;
819 if (this.form.extraWeightPercent > 0) { 1186 if (this.form.extraWeightPercent > 0) {
820 - Weight = this.form.originalWeight * (this.form.extraWeightPercent / 100) + this.form.originalWeight; 1187 + Weight =
1188 + this.form.originalWeight * (this.form.extraWeightPercent / 100) +
1189 + this.form.originalWeight;
821 } else { 1190 } else {
822 Weight = this.form.originalWeight; 1191 Weight = this.form.originalWeight;
823 } 1192 }
...@@ -825,13 +1194,13 @@ export default { ...@@ -825,13 +1194,13 @@ export default {
825 }, 1194 },
826 /** 修改按钮操作 */ 1195 /** 修改按钮操作 */
827 handleUpdate(row) { 1196 handleUpdate(row) {
828 - if(row.statusName == "已删除"){ 1197 + if (row.statusName == "已删除") {
829 this.msgError("已删除不可操作"); 1198 this.msgError("已删除不可操作");
830 - return 1199 + return;
831 } 1200 }
832 this.reset(); 1201 this.reset();
833 this.findFltConditionData(); 1202 this.findFltConditionData();
834 - this.perStatus(row.fltNo) 1203 + this.perStatus(row.fltNo);
835 this.open = true; 1204 this.open = true;
836 this.title = "修改航班信息"; 1205 this.title = "修改航班信息";
837 //航班号 1206 //航班号
...@@ -845,7 +1214,7 @@ export default { ...@@ -845,7 +1214,7 @@ export default {
845 findFltById(row).then((response) => { 1214 findFltById(row).then((response) => {
846 if (response.code == 200) { 1215 if (response.code == 200) {
847 this.form = response.data; 1216 this.form = response.data;
848 - this.form.route = this.form.route.split(';') 1217 + this.form.route = this.form.route.split(";");
849 //是否开启高低价 1218 //是否开启高低价
850 // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; 1219 // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false;
851 //是否预审 1220 //是否预审
...@@ -854,126 +1223,144 @@ export default { ...@@ -854,126 +1223,144 @@ export default {
854 // this.LowHighAvailable(); 1223 // this.LowHighAvailable();
855 1224
856 //航线 1225 //航线
857 - this.selectOption.flightKindlist.forEach(item => { 1226 + this.selectOption.flightKindlist.forEach((item) => {
858 if (item.id == this.form.kindId) { 1227 if (item.id == this.form.kindId) {
859 - if (item.chineseName.indexOf('White') >= 0) { 1228 + if (item.chineseName.indexOf("White") >= 0) {
860 - this.formdisabled.route = true 1229 + this.formdisabled.route = true;
861 - } else if (item.chineseName.indexOf('Purple') >= 0) { 1230 + } else if (item.chineseName.indexOf("Purple") >= 0) {
862 - this.formdisabled.route = false 1231 + this.formdisabled.route = false;
863 - this.routeMultiple = true 1232 + this.routeMultiple = true;
864 //获取航线 1233 //获取航线
865 - queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => { 1234 + queryRouteByFltNo({ fltNo: this.form.fltNo })
866 - this.routeLoading = false 1235 + .then((res) => {
867 - if (res.code === 200) { 1236 + this.routeLoading = false;
868 - if(res.data.list.length){ 1237 + if (res.code === 200) {
869 - let isEtesRoute = res.data.list.filter((item) => item.isEtesRoute == "N"); // 过滤ET86航线 1238 + if (res.data.list.length) {
870 - this.routeList = isEtesRoute 1239 + this.routeList = res.data.list;
871 - }else{ 1240 + } else {
872 - this.routeList = [] 1241 + this.routeList = [];
1242 + }
1243 + } else {
1244 + this.msgWarning(res.msg);
873 } 1245 }
874 - } else { 1246 + })
875 - this.msgWarning(res.msg) 1247 + .catch((err) => {
876 - } 1248 + this.routeLoading = false;
877 - }).catch(err => { 1249 + console.log(err);
878 - this.routeLoading = false 1250 + });
879 - console.log(err)
880 - })
881 } 1251 }
882 } 1252 }
883 - }) 1253 + });
884 - this.ishighPriceWeightPercent = this.form.highLowPriceFlg === 1 ? false : true 1254 + this.ishighPriceWeightPercent =
1255 + this.form.highLowPriceFlg === 1 ? false : true;
885 } else { 1256 } else {
886 this.msgError(response.msg); 1257 this.msgError(response.msg);
887 } 1258 }
888 }); 1259 });
889 }, 1260 },
890 - //查看航班维度 1261 + /*
891 - goFlightAllocConfig(val) { 1262 + 查看航班维度
892 - if(val.statusName == "已删除"){ 1263 + 不仅分为航班种类又分当前航班航线是不是ET86,
1264 + 如果航班航种类是Purple Tail,遍历航班航线查询的是不是全都是ET86航线,如果全部是ET86航线,那么不做跳转。
1265 + 如果是White Tail也就是只差当前的一条航班航线,如果当前航班航线是ET86航线那么就不做跳转;
1266 + */
1267 + goFlightAllocConfig(row) {
1268 + if (row.statusName == "已删除") {
893 this.msgError("已删除不可操作"); 1269 this.msgError("已删除不可操作");
894 - return 1270 + return;
895 } 1271 }
896 - /* 1272 + let params = {
897 - 航班信息维护跳转过来,不管是White Tail还是Purple Tail: 1273 + fltNo: row.fltNo,
898 - Purple Tail 1274 + page: 1,
899 - { 1275 + size: 20,
900 - purposeOfFlightNo: "LK002", 1276 + };
901 - flightDate: "2023-09-27", 1277 + let routeInfo = {
902 - flightRouteListStr: "PVG;PEK;PVG-PEK", 1278 + fltNo: "",
903 - status: "" 1279 + isEtesRoute: false,
904 - } 1280 + fltRoute: "",
905 - White Tail 1281 + };
906 - { 1282 + queryRoute(params)
907 - purposeOfFlightNo: "LK002", 1283 + .then((res) => {
908 - flightRouteListStr: "PVG;PEK;PVG-PEK", 1284 + const { code, data } = res;
909 - status: "" 1285 + const et86RouteList = [];
910 - } 1286 + if (code == 200) {
911 - 航班配舱设置: 1287 + if (data.list.length) {
912 - 非日期级别 1288 + // Purple Tail是不是全部是ET86航线
913 - { 1289 + routeInfo.isEtesRoute = data.list.every(
914 - flightDate: "" 1290 + (item) => item.isEtesRoute == "Y"
915 - flightRoute: "" 1291 + );
916 - purposeOfFlightNo: "A381" 1292 + // 有没有ET86航线
917 - status: "" 1293 + const isEtesRoute = data.list.filter(
918 - } 1294 + (item) => item.isEtesRoute == "Y"
919 - 有日期级别 1295 + );
920 - { 1296 + // 处理alert提示语展示数据
921 - flightDate: "" 1297 + if (isEtesRoute.length) {
922 - flightRoute: "" 1298 + isEtesRoute.map((item) => {
923 - purposeOfFlightNo: "A381" 1299 + et86RouteList.push(item.route);
924 - status: "" 1300 + });
925 - } 1301 + routeInfo.fltNo = row.fltNo;
926 - { 1302 + routeInfo.fltRoute = et86RouteList;
927 - flightDate: "2023-09-21" 1303 + }
928 - flightRoute: "" 1304 + // White Tail 当前航线在航班航线中是否为ET86航线
929 - flightRouteListStr: "", 1305 + if (row.flightKindName == "White Tail") {
930 - purposeOfFlightNo: "A381" 1306 + if (isEtesRoute.length) {
931 - status: "" 1307 + let whiteEt86 = isEtesRoute.filter(
932 - } 1308 + (item) => item.route == row.route
933 - 航班顺位 1309 + );
934 - { 1310 + routeInfo.isEtesRoute = whiteEt86.length;
935 - flightDate: "2023-07-01" 1311 + }
936 - flightRoute: "" 1312 + }
937 - purposeOfFlightNo: "LP003" 1313 + } else {
938 - status: "" 1314 + this.msgError("暂无当前航班航线");
939 - } 1315 + }
940 - { 1316 + if (routeInfo.isEtesRoute) {
941 - flightRoute: "" 1317 + let msg = routeInfo.fltNo + ": " + routeInfo.fltRoute.join(";");
942 - flightRouteListStr: "", 1318 + this.$alert(
943 - purposeOfFlightNo: "LP003" 1319 + `当前${msg}为ET86航线,可在ET86规则设置查看`,
944 - status: "" 1320 + "提示",
945 - } 1321 + {
946 - */ 1322 + confirmButtonText: "关闭",
947 - this.$router.push({ 1323 + callback: (action) => {},
948 - path: "/routeInfo", 1324 + }
949 - query: { 1325 + );
950 - flightDate: val.fltDate, 1326 + return;
951 - purposeOfFlightNo: val.fltNo, 1327 + }
952 - flightRouteListStr: val.route, 1328 + this.$router.push({
953 - status: val.status, 1329 + path: "/routeInfo",
954 - flightKindName: val.flightKindName, 1330 + query: {
955 - pageName: "flightInformationMaintenance", 1331 + flightDate: row.fltDate,
956 - }, 1332 + purposeOfFlightNo: row.fltNo,
957 - }); 1333 + flightRouteListStr: row.route,
1334 + status: row.status,
1335 + flightKindName: row.flightKindName,
1336 + pageName: "flightInformationMaintenance",
1337 + disable: true,
1338 + },
1339 + });
1340 + }
1341 + })
1342 + .catch(() => {});
958 }, 1343 },
959 // 航班状态 1344 // 航班状态
960 flightState(multipleSelection, statusName) { 1345 flightState(multipleSelection, statusName) {
961 - let flightState = multipleSelection.some(item => item.statusName == statusName); 1346 + let flightState = multipleSelection.some(
1347 + (item) => item.statusName == statusName
1348 + );
962 if (flightState) { 1349 if (flightState) {
963 this.msgError(`勾选的航班,航班状态为${statusName},不可操作该按钮`); 1350 this.msgError(`勾选的航班,航班状态为${statusName},不可操作该按钮`);
964 } else { 1351 } else {
965 - flightState = false 1352 + flightState = false;
966 } 1353 }
967 - return flightState 1354 + return flightState;
968 }, 1355 },
969 /** 删除按钮操作 */ 1356 /** 删除按钮操作 */
970 handleDelete(row) { 1357 handleDelete(row) {
971 let fIds = []; 1358 let fIds = [];
972 - this.ids.forEach(item => { 1359 + this.ids.forEach((item) => {
973 - fIds.push(item.id) 1360 + fIds.push(item.id);
974 }); 1361 });
975 // 航班状态 1362 // 航班状态
976 - if (this.flightState(this.ids, "已删除")) return 1363 + if (this.flightState(this.ids, "已删除")) return;
977 this.$confirm("是否确认删除所选数据?", "警告", { 1364 this.$confirm("是否确认删除所选数据?", "警告", {
978 confirmButtonText: "确定", 1365 confirmButtonText: "确定",
979 cancelButtonText: "取消", 1366 cancelButtonText: "取消",
...@@ -995,28 +1382,28 @@ export default { ...@@ -995,28 +1382,28 @@ export default {
995 .then(() => { 1382 .then(() => {
996 this.dialogTableVisible = true; 1383 this.dialogTableVisible = true;
997 }) 1384 })
998 - .catch(() => { }); 1385 + .catch(() => {});
999 } else { 1386 } else {
1000 this.msgSuccess(response.msg); 1387 this.msgSuccess(response.msg);
1001 } 1388 }
1002 }) 1389 })
1003 - .catch(() => { }); 1390 + .catch(() => {});
1004 }, 1391 },
1005 1392
1006 /** 提交按钮 */ 1393 /** 提交按钮 */
1007 submitForm: function () { 1394 submitForm: function () {
1008 this.$refs["form"].validate((valid) => { 1395 this.$refs["form"].validate((valid) => {
1009 - if(this.form.route == undefined){ 1396 + if (this.form.route == undefined) {
1010 - this.routeError = true; 1397 + this.routeError = true;
1011 - return 1398 + return;
1012 - } 1399 + }
1013 - if(this.form.route.length || this.form.route !== undefined){ 1400 + if (this.form.route.length || this.form.route !== undefined) {
1014 - this.routeError = false; 1401 + this.routeError = false;
1015 - } 1402 + }
1016 1403
1017 - if(this.form.route.length == 0){ 1404 + if (this.form.route.length == 0) {
1018 - this.routeError = true; 1405 + this.routeError = true;
1019 - return 1406 + return;
1020 } 1407 }
1021 if (valid) { 1408 if (valid) {
1022 let formdata = JSON.parse(JSON.stringify(this.form)); 1409 let formdata = JSON.parse(JSON.stringify(this.form));
...@@ -1049,15 +1436,18 @@ export default { ...@@ -1049,15 +1436,18 @@ export default {
1049 // formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; 1436 // formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0;
1050 //总重量更新 1437 //总重量更新
1051 // formdata.totalWeight = this.Weightall() 1438 // formdata.totalWeight = this.Weightall()
1052 - formdata.route = this.form.route.toString().replace(/,/g, ';') 1439 + formdata.route = this.form.route.toString().replace(/,/g, ";");
1053 - if(this.form.extraWeightPercent == undefined || this.form.extraWeightPercent == null){ 1440 + if (
1054 - formdata.extraWeightPercent = 0 1441 + this.form.extraWeightPercent == undefined ||
1442 + this.form.extraWeightPercent == null
1443 + ) {
1444 + formdata.extraWeightPercent = 0;
1055 } 1445 }
1056 //处理数据 1446 //处理数据
1057 saveOrUpdate(formdata).then((response) => { 1447 saveOrUpdate(formdata).then((response) => {
1058 if (response.code === 200) { 1448 if (response.code === 200) {
1059 this.msgSuccess("保存成功"); 1449 this.msgSuccess("保存成功");
1060 - this.routeList = [] 1450 + this.routeList = [];
1061 this.open = false; 1451 this.open = false;
1062 this.findAllFltData(); 1452 this.findAllFltData();
1063 } else { 1453 } else {
...@@ -1074,11 +1464,11 @@ export default { ...@@ -1074,11 +1464,11 @@ export default {
1074 }, 1464 },
1075 //取消按钮 1465 //取消按钮
1076 cancel() { 1466 cancel() {
1077 - this.routeError = false 1467 + this.routeError = false;
1078 - this.routeList = [] 1468 + this.routeList = [];
1079 - this.ishighPriceWeightPercent = true 1469 + this.ishighPriceWeightPercent = true;
1080 - this.routeMultiple = false 1470 + this.routeMultiple = false;
1081 - this.routeLoading = false 1471 + this.routeLoading = false;
1082 this.open = false; 1472 this.open = false;
1083 this.findAllFltData(); 1473 this.findAllFltData();
1084 this.findFltConditionData(); 1474 this.findFltConditionData();
...@@ -1098,28 +1488,28 @@ export default { ...@@ -1098,28 +1488,28 @@ export default {
1098 //批量开启/关闭航班 1488 //批量开启/关闭航班
1099 handleFlightStatus(status) { 1489 handleFlightStatus(status) {
1100 // 航班状态 1490 // 航班状态
1101 - if (this.flightState(this.ids, "已删除")) return 1491 + if (this.flightState(this.ids, "已删除")) return;
1102 let handle = status == "flightStatus80" ? "关闭" : "开启"; 1492 let handle = status == "flightStatus80" ? "关闭" : "开启";
1103 - let state = this.ids.some(item => item.statusName == `已${handle}`); 1493 + let state = this.ids.some((item) => item.statusName == `已${handle}`);
1104 - if(state){ 1494 + if (state) {
1105 this.msgError(`勾选的航班,航班状态为已${handle},不可操作该按钮`); 1495 this.msgError(`勾选的航班,航班状态为已${handle},不可操作该按钮`);
1106 - return 1496 + return;
1107 } 1497 }
1108 let data = { 1498 let data = {
1109 updateIds: [], 1499 updateIds: [],
1110 }; 1500 };
1111 - this.ids.map(item => { 1501 + this.ids.map((item) => {
1112 data.status = status; 1502 data.status = status;
1113 - if (status === 'flightStatus80') { 1503 + if (status === "flightStatus80") {
1114 - if (item.statusName === '已开启') { 1504 + if (item.statusName === "已开启") {
1115 - data.updateIds.push(item.id) 1505 + data.updateIds.push(item.id);
1116 } 1506 }
1117 } else { 1507 } else {
1118 - if (item.statusName === '已关闭') { 1508 + if (item.statusName === "已关闭") {
1119 - data.updateIds.push(item.id) 1509 + data.updateIds.push(item.id);
1120 } 1510 }
1121 } 1511 }
1122 - }) 1512 + });
1123 if (data.updateIds.length > 0) { 1513 if (data.updateIds.length > 0) {
1124 updateStatusBatch(data).then((response) => { 1514 updateStatusBatch(data).then((response) => {
1125 if (response.code === 200) { 1515 if (response.code === 200) {
...@@ -1134,7 +1524,7 @@ export default { ...@@ -1134,7 +1524,7 @@ export default {
1134 //自动推送开关 1524 //自动推送开关
1135 autoPushBatch(status) { 1525 autoPushBatch(status) {
1136 // 航班状态 1526 // 航班状态
1137 - if (this.flightState(this.ids, "已删除")) return 1527 + if (this.flightState(this.ids, "已删除")) return;
1138 let msg = status == "open" ? "开启" : "关闭"; 1528 let msg = status == "open" ? "开启" : "关闭";
1139 let data = { 1529 let data = {
1140 updateIds: [], 1530 updateIds: [],
...@@ -1162,7 +1552,7 @@ export default { ...@@ -1162,7 +1552,7 @@ export default {
1162 this.msgError(res.msg); 1552 this.msgError(res.msg);
1163 } 1553 }
1164 }) 1554 })
1165 - .catch(err => { 1555 + .catch((err) => {
1166 this.msgError(err); 1556 this.msgError(err);
1167 }); 1557 });
1168 } else { 1558 } else {
...@@ -1173,61 +1563,65 @@ export default { ...@@ -1173,61 +1563,65 @@ export default {
1173 //白名单配舱开关 1563 //白名单配舱开关
1174 whiteListSwitchStatus(val) { 1564 whiteListSwitchStatus(val) {
1175 // 航班状态 1565 // 航班状态
1176 - if (this.flightState(this.ids, "已删除")) return 1566 + if (this.flightState(this.ids, "已删除")) return;
1177 let obj = { 1567 let obj = {
1178 - updateIds: [] 1568 + updateIds: [],
1179 - } 1569 + };
1180 - obj.status = val 1570 + obj.status = val;
1181 - this.ids.forEach(item => { 1571 + this.ids.forEach((item) => {
1182 - obj.updateIds.push(item.id) 1572 + obj.updateIds.push(item.id);
1183 - }) 1573 + });
1184 - updateWhiteListSwitchBatch(obj).then(res => { 1574 + updateWhiteListSwitchBatch(obj)
1185 - if (res.code === 200) { 1575 + .then((res) => {
1186 - this.msgSuccess(res.msg) 1576 + if (res.code === 200) {
1187 - this.findAllFltData() 1577 + this.msgSuccess(res.msg);
1188 - } else { 1578 + this.findAllFltData();
1189 - this.msgWarning(res.msg) 1579 + } else {
1190 - } 1580 + this.msgWarning(res.msg);
1191 - }).catch(err => { 1581 + }
1192 - console.log(err) 1582 + })
1193 - }) 1583 + .catch((err) => {
1584 + console.log(err);
1585 + });
1194 }, 1586 },
1195 //黑名单配舱开关 1587 //黑名单配舱开关
1196 BlackListSwitchStatus(val) { 1588 BlackListSwitchStatus(val) {
1197 // 航班状态 1589 // 航班状态
1198 - if (this.flightState(this.ids, "已删除")) return 1590 + if (this.flightState(this.ids, "已删除")) return;
1199 let obj = { 1591 let obj = {
1200 - updateIds: [] 1592 + updateIds: [],
1201 - } 1593 + };
1202 - obj.status = val 1594 + obj.status = val;
1203 - this.ids.forEach(item => { 1595 + this.ids.forEach((item) => {
1204 - obj.updateIds.push(item.id) 1596 + obj.updateIds.push(item.id);
1205 - }) 1597 + });
1206 - updateBlackListSwitchBatch(obj).then(res => { 1598 + updateBlackListSwitchBatch(obj)
1207 - if (res.code === 200) { 1599 + .then((res) => {
1208 - this.msgSuccess(res.msg) 1600 + if (res.code === 200) {
1209 - this.findAllFltData() 1601 + this.msgSuccess(res.msg);
1210 - } else { 1602 + this.findAllFltData();
1211 - this.msgWarning(res.msg) 1603 + } else {
1212 - } 1604 + this.msgWarning(res.msg);
1213 - }).catch(err => { 1605 + }
1214 - console.log(err) 1606 + })
1215 - }) 1607 + .catch((err) => {
1608 + console.log(err);
1609 + });
1216 }, 1610 },
1217 //航线修改 1611 //航线修改
1218 routeChange(val) { 1612 routeChange(val) {
1219 - if(this.form.route.length){ 1613 + if (this.form.route.length) {
1220 - this.routeError = false; 1614 + this.routeError = false;
1221 - }else{ 1615 + } else {
1222 - this.routeError = true; 1616 + this.routeError = true;
1223 } 1617 }
1224 - this.$forceUpdate() 1618 + this.$forceUpdate();
1225 }, 1619 },
1226 - blurRoute(){ 1620 + blurRoute() {
1227 - if(this.form.route.length){ 1621 + if (this.form.route !== undefined && this.form.route.length) {
1228 - this.routeError = false; 1622 + this.routeError = false;
1229 - }else{ 1623 + } else {
1230 - this.routeError = true; 1624 + this.routeError = true;
1231 } 1625 }
1232 }, 1626 },
1233 //多选框选中数据 1627 //多选框选中数据
...@@ -1250,11 +1644,11 @@ export default { ...@@ -1250,11 +1644,11 @@ export default {
1250 //每页长度 1644 //每页长度
1251 sizeChange(val) { 1645 sizeChange(val) {
1252 this.queryParams.limitSize = val; 1646 this.queryParams.limitSize = val;
1253 - this.queryParams.pageNum = 1 1647 + this.queryParams.pageNum = 1;
1254 this.findAllFltData(); 1648 this.findAllFltData();
1255 }, 1649 },
1256 setClose() { 1650 setClose() {
1257 - this.tableHeader = this.tableHeaders['FlightInformation'] 1651 + this.tableHeader = this.tableHeaders["FlightInformation"];
1258 }, 1652 },
1259 }, 1653 },
1260 computed: { 1654 computed: {
...@@ -1265,19 +1659,19 @@ export default { ...@@ -1265,19 +1659,19 @@ export default {
1265 set: function (val) { 1659 set: function (val) {
1266 this.form.route = this.upCase(val); 1660 this.form.route = this.upCase(val);
1267 }, 1661 },
1268 - } 1662 + },
1269 - } 1663 + },
1270 }; 1664 };
1271 </script> 1665 </script>
1272 1666
1273 <style> 1667 <style>
1274 .el-table--striped .el-table__body tr.el-table__row--striped.current-row td, 1668 .el-table--striped .el-table__body tr.el-table__row--striped.current-row td,
1275 -.el-table__body tr.current-row>td { 1669 +.el-table__body tr.current-row > td {
1276 background-color: #a0cfff; 1670 background-color: #a0cfff;
1277 } 1671 }
1278 1672
1279 -.el-table--striped .el-table__body tr.hover-row.el-table__row--striped>td, 1673 +.el-table--striped .el-table__body tr.hover-row.el-table__row--striped > td,
1280 -.el-table__body tr.hover-row>td { 1674 +.el-table__body tr.hover-row > td {
1281 background-color: #d9ecff !important; 1675 background-color: #d9ecff !important;
1282 } 1676 }
1283 1677
...@@ -1286,7 +1680,7 @@ export default { ...@@ -1286,7 +1680,7 @@ export default {
1286 color: #ff4949; 1680 color: #ff4949;
1287 text-align: right; 1681 text-align: right;
1288 } 1682 }
1289 -.error-route{ 1683 +.error-route {
1290 color: #ff4949; 1684 color: #ff4949;
1291 } 1685 }
1292 </style> 1686 </style>
......
...@@ -803,10 +803,7 @@ export default { ...@@ -803,10 +803,7 @@ export default {
803 if (latestView) { 803 if (latestView) {
804 this.$router.push(latestView.fullPath); 804 this.$router.push(latestView.fullPath);
805 } else { 805 } else {
806 - // now the default is to redirect to the home page if there is no tags-view,
807 - // you can adjust it according to your needs.
808 if (view.name === "Dashboard") { 806 if (view.name === "Dashboard") {
809 - // to reload home page
810 this.$router.replace({ path: "/redirect" + view.fullPath }); 807 this.$router.replace({ path: "/redirect" + view.fullPath });
811 } else { 808 } else {
812 this.$router.push("/"); 809 this.$router.push("/");
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form ref="dmLogForm" class="form-header" :model="selectForm" label-width="auto" size="small" 3 + <el-form
4 - @submit.native.prevent> 4 + ref="dmLogForm"
5 + class="form-header"
6 + :model="selectForm"
7 + label-width="auto"
8 + size="small"
9 + @submit.native.prevent
10 + >
5 <el-row type="flex" style="flex-wrap: wrap !important"> 11 <el-row type="flex" style="flex-wrap: wrap !important">
6 <el-col :span="6"> 12 <el-col :span="6">
7 <el-form-item label="ACCS原航班号"> 13 <el-form-item label="ACCS原航班号">
8 - <el-input v-model.trim="fltNo" class="formItem" placeholder="请输入航班号" clearable></el-input> 14 + <el-input
15 + v-model.trim="fltNo"
16 + class="formItem"
17 + placeholder="请输入航班号"
18 + clearable
19 + ></el-input>
9 </el-form-item> 20 </el-form-item>
10 </el-col> 21 </el-col>
11 <el-col :span="6"> 22 <el-col :span="6">
12 <el-form-item label="数据接收日期" prop="createTime"> 23 <el-form-item label="数据接收日期" prop="createTime">
13 - <el-date-picker v-model="selectForm.createTime" class="formItem" type="date" placeholder="选择日期" 24 + <el-date-picker
14 - :value-format="valueFormat" clearable> 25 + v-model="selectForm.createTime"
26 + class="formItem"
27 + type="date"
28 + placeholder="选择日期"
29 + :value-format="valueFormat"
30 + clearable
31 + >
15 </el-date-picker> 32 </el-date-picker>
16 </el-form-item> 33 </el-form-item>
17 </el-col> 34 </el-col>
18 <el-col :span="6"> 35 <el-col :span="6">
19 <el-form-item label="运单号"> 36 <el-form-item label="运单号">
20 - <el-input v-model="selectForm.awbNbr" class="formItem" placeholder="请输入运单号" clearable></el-input> 37 + <el-input
38 + v-model="selectForm.awbNbr"
39 + class="formItem"
40 + placeholder="请输入运单号"
41 + clearable
42 + ></el-input>
21 </el-form-item> 43 </el-form-item>
22 </el-col> 44 </el-col>
23 <el-col :span="6"> 45 <el-col :span="6">
24 <el-form-item label="处理状态级别"> 46 <el-form-item label="处理状态级别">
25 - <el-select v-model="selectForm.status" class="formItem" placeholder="不限" clearable> 47 + <el-select
48 + v-model="selectForm.status"
49 + class="formItem"
50 + placeholder="不限"
51 + clearable
52 + >
26 <el-option label="未处理" value="0"></el-option> 53 <el-option label="未处理" value="0"></el-option>
27 <el-option label="处理成功" value="1"></el-option> 54 <el-option label="处理成功" value="1"></el-option>
28 <el-option label="无需处理" value="2"></el-option> 55 <el-option label="无需处理" value="2"></el-option>
...@@ -34,52 +61,85 @@ ...@@ -34,52 +61,85 @@
34 </el-col> 61 </el-col>
35 <el-col :span="6"> 62 <el-col :span="6">
36 <el-form-item label="ACCS原航班日期"> 63 <el-form-item label="ACCS原航班日期">
37 - <el-date-picker v-model="selectForm.fltDate" class="formItem" type="date" placeholder="选择日期" 64 + <el-date-picker
38 - :value-format="valueFormat" clearable> 65 + v-model="selectForm.fltDate"
66 + class="formItem"
67 + type="date"
68 + placeholder="选择日期"
69 + :value-format="valueFormat"
70 + clearable
71 + >
39 </el-date-picker> 72 </el-date-picker>
40 </el-form-item> 73 </el-form-item>
41 </el-col> 74 </el-col>
42 <el-col :span="6"> 75 <el-col :span="6">
43 <el-form-item label="回推ACCS结果"> 76 <el-form-item label="回推ACCS结果">
44 - <el-select v-model="selectForm.sendLogSendResult" class="formItem" placeholder="不限" clearable> 77 + <el-select
45 - <el-option label="未推" value="0"> 78 + v-model="selectForm.sendLogSendResult"
46 - </el-option> 79 + class="formItem"
47 - <el-option label="推送成功" value="1"> 80 + placeholder="不限"
48 - </el-option> 81 + clearable
49 - <el-option label="推送失败" value="2"> 82 + >
50 - </el-option> 83 + <el-option label="未推" value="0"> </el-option>
84 + <el-option label="推送成功" value="1"> </el-option>
85 + <el-option label="推送失败" value="2"> </el-option>
51 </el-select> 86 </el-select>
52 </el-form-item> 87 </el-form-item>
53 </el-col> 88 </el-col>
54 </el-row> 89 </el-row>
55 <div class="ml20" style="display: flex"> 90 <div class="ml20" style="display: flex">
56 - <el-button type="primary" size="mini" icon="el-icon-search" :loading="loading" @click="selectDMData(0)">查询 91 + <el-button
92 + type="primary"
93 + size="mini"
94 + icon="el-icon-search"
95 + :loading="loading"
96 + @click="selectDMData(0)"
97 + >查询
57 </el-button> 98 </el-button>
58 </div> 99 </div>
59 </el-form> 100 </el-form>
60 - <Tables ref="dmLogTables" ductName="logDmData" :order="true" :data="data" :headerData="tableHeader" 101 + <Tables
61 - tableAlign="center" :showOverflowTooltip="false" :height="tableHeight" :page="selectForm.page" 102 + ref="dmLogTables"
62 - :limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total" :loading="loading" 103 + ductName="logDmData"
63 - @currentChange="currentChange"> 104 + :order="true"
105 + :data="data"
106 + :headerData="tableHeader"
107 + tableAlign="center"
108 + :showOverflowTooltip="false"
109 + :height="tableHeight"
110 + :page="selectForm.page"
111 + :limitSize="selectForm.size"
112 + :pageSizes="[100]"
113 + :totalCount="total"
114 + :loading="loading"
115 + @currentChange="currentChange"
116 + >
64 <template v-slot:awbNbr="scope"> 117 <template v-slot:awbNbr="scope">
65 <el-link type="primary" @click="gotoWeatherTable(scope.row)"> 118 <el-link type="primary" @click="gotoWeatherTable(scope.row)">
66 - {{ 119 + {{ scope.row.awbNbr }}<i class="el-icon-link"></i>
67 - scope.row.awbNbr 120 + </el-link>
68 - }}<i class="el-icon-link"></i> </el-link>
69 </template> 121 </template>
70 <template v-slot:flightFltNo="scope"> 122 <template v-slot:flightFltNo="scope">
71 - <el-link v-if="scope.row.allocDimId" type="primary" 123 + <el-link
72 - @click="$router.push({ name: 'FlightAllocConfigInfo', params: { id: scope.row.allocDimId, handle: 'detail', fltNo: scope.row.flightFltNo, fltDate: scope.row.flightFltDate ? scope.row.flightFltDate : ' ', routeStatus: 'dmLog', route: scope.row.currentFlightRoute ? scope.row.currentFlightRoute : ' ', status: ' ', createStatus: 1, } })"> 124 + v-if="scope.row.allocDimId"
73 - {{ 125 + type="primary"
74 - scope.row.flightFltNo 126 + @click="viewRouteConfig(scope.row)"
75 - }}<i class="el-icon-link"></i> </el-link> 127 + >
128 + {{ scope.row.flightFltNo }}<i class="el-icon-link"></i>
129 + </el-link>
76 <span v-else>{{ scope.row.flightFltNo }}</span> 130 <span v-else>{{ scope.row.flightFltNo }}</span>
77 </template> 131 </template>
78 <template v-slot:remarksDetail="scope"> 132 <template v-slot:remarksDetail="scope">
79 - <span v-if="scope.row.remarksDetail == null || scope.row.remarksDetail == ''">{{ scope.row.remarksDetail 133 + <span
80 - }}</span> 134 + v-if="
135 + scope.row.remarksDetail == null || scope.row.remarksDetail == ''
136 + "
137 + >{{ scope.row.remarksDetail }}</span
138 + >
81 <div v-else> 139 <div v-else>
82 - <div v-for="item in scope.row.remarksDetail.split('\\r\\n')">{{ item }}</div> 140 + <div v-for="item in scope.row.remarksDetail.split('\\r\\n')">
141 + {{ item }}
142 + </div>
83 </div> 143 </div>
84 </template> 144 </template>
85 </Tables> 145 </Tables>
...@@ -100,7 +160,7 @@ export default { ...@@ -100,7 +160,7 @@ export default {
100 size: 100, 160 size: 100,
101 }, 161 },
102 data: [], 162 data: [],
103 - tableHeader: this.tableHeaders['DM'], 163 + tableHeader: this.tableHeaders["DM"],
104 portList: [], 164 portList: [],
105 rules: { 165 rules: {
106 createTime: [ 166 createTime: [
...@@ -122,14 +182,14 @@ export default { ...@@ -122,14 +182,14 @@ export default {
122 }, 182 },
123 created() { 183 created() {
124 this.selectForm.createTime = this.nowDate(); 184 this.selectForm.createTime = this.nowDate();
125 - // this.$nextTick(()=>{ 185 + // this.$nextTick(()=>{
126 - // let height = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130; 186 + // let height = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
127 - // if(height < 300){ 187 + // if(height < 300){
128 - // this.tableHeight = 300; 188 + // this.tableHeight = 300;
129 - // }else{ 189 + // }else{
130 - // this.tableHeight = height; 190 + // this.tableHeight = height;
131 - // } 191 + // }
132 - // }) 192 + // })
133 }, 193 },
134 activated() { 194 activated() {
135 this.selectDMData(); 195 this.selectDMData();
...@@ -138,7 +198,8 @@ export default { ...@@ -138,7 +198,8 @@ export default {
138 this.data = []; 198 this.data = [];
139 }, 199 },
140 mounted() { 200 mounted() {
141 - this.tableHeight = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130; 201 + this.tableHeight =
202 + window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
142 }, 203 },
143 methods: { 204 methods: {
144 //数据查询 205 //数据查询
...@@ -151,32 +212,37 @@ export default { ...@@ -151,32 +212,37 @@ export default {
151 getDmDataList(this.selectForm).then((res) => { 212 getDmDataList(this.selectForm).then((res) => {
152 this.loading = false; 213 this.loading = false;
153 if (res.code === 200) { 214 if (res.code === 200) {
154 - this.total = res.data.total 215 + this.total = res.data.total;
155 if (res.data.total === 0) { 216 if (res.data.total === 0) {
156 - this.msgWarning('未查询到数据') 217 + this.msgWarning("未查询到数据");
157 } else { 218 } else {
158 this.data = res.data.list; 219 this.data = res.data.list;
159 } 220 }
160 } else { 221 } else {
161 - this.msgWarning(res.msg) 222 + this.msgWarning(res.msg);
162 } 223 }
163 }); 224 });
164 }, 225 },
165 //跳转流水 226 //跳转流水
166 gotoWeatherTable(val) { 227 gotoWeatherTable(val) {
167 - getDmFlowInformation('accsId=' + val.dmAccsId).then(res => { 228 + getDmFlowInformation("accsId=" + val.dmAccsId)
168 - if (res.code === 200) { 229 + .then((res) => {
169 - if (res.data.list.length > 0) { 230 + if (res.code === 200) {
170 - this.$router.push({ name: 'weatherTable', params: { data: res.data.list, awbNbr: val.awbNbr } }) 231 + if (res.data.list.length > 0) {
232 + this.$router.push({
233 + name: "weatherTable",
234 + params: { data: res.data.list, awbNbr: val.awbNbr },
235 + });
236 + } else {
237 + this.msgWarning("未查询到该条数据的流水");
238 + }
171 } else { 239 } else {
172 - this.msgWarning('未查询到该条数据的流水') 240 + this.msgWarning(res.msg);
173 } 241 }
174 - } else { 242 + })
175 - this.msgWarning(res.msg) 243 + .catch((err) => {
176 - } 244 + console.log(err);
177 - }).catch(err => { 245 + });
178 - console.log(err)
179 - })
180 }, 246 },
181 //分页 247 //分页
182 currentChange(val) { 248 currentChange(val) {
...@@ -204,6 +270,20 @@ export default { ...@@ -204,6 +270,20 @@ export default {
204 item.index = index; 270 item.index = index;
205 }); 271 });
206 }, 272 },
273 + // 当前配载航班号跳转查看航线配置详情
274 + viewRouteConfig(row) {
275 + this.$router.push({
276 + path: "/routeInfo",
277 + query: {
278 + id: row.allocDimId,
279 + purposeOfFlightNo: row.flightFltNo,
280 + flightDate: row.flightFltDate,
281 + flightRouteListStr: row.currentFlightRoute,
282 + pageName: "dmLog",
283 + disable: true,
284 + },
285 + });
286 + },
207 }, 287 },
208 computed: { 288 computed: {
209 fltNo: { 289 fltNo: {
......