Showing
14 changed files
with
960 additions
and
324 deletions
| ... | @@ -42,11 +42,11 @@ export function findCargoAllocationData(data) { | ... | @@ -42,11 +42,11 @@ export function findCargoAllocationData(data) { |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | //手动配舱 | 44 | //手动配舱 |
| 45 | -export function allocationFlight(data){ | 45 | +export function allocationFlight(data) { |
| 46 | return request({ | 46 | return request({ |
| 47 | - url:'/cargo/allocationFlight', | 47 | + url: '/cargo/allocationFlight', |
| 48 | - method:'post', | 48 | + method: 'post', |
| 49 | - data:data | 49 | + data: data |
| 50 | }) | 50 | }) |
| 51 | } | 51 | } |
| 52 | 52 | ||
| ... | @@ -67,4 +67,42 @@ export function releaseCargo(data) { | ... | @@ -67,4 +67,42 @@ export function releaseCargo(data) { |
| 67 | method: 'post', | 67 | method: 'post', |
| 68 | data: data, | 68 | data: data, |
| 69 | }) | 69 | }) |
| 70 | -} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 70 | +} | ||
| 71 | + | ||
| 72 | +//航班号+日期查询航线(手动配舱) | ||
| 73 | +/** | ||
| 74 | + * @param fltDate * 航班日期 | ||
| 75 | + * @param fltNo * 航班号 | ||
| 76 | + */ | ||
| 77 | +export function findFlightRoute(data) { | ||
| 78 | + return request({ | ||
| 79 | + url: '/cargo/findFlightRoute', | ||
| 80 | + method: 'post', | ||
| 81 | + data: data | ||
| 82 | + }) | ||
| 83 | +} | ||
| 84 | + | ||
| 85 | +//航班号+日期查询ACCS航线(手动配舱查询项) | ||
| 86 | +/** | ||
| 87 | + * @param fltDateAccs 航班日期 | ||
| 88 | + * @param fltNoAccs 航班号 | ||
| 89 | + */ | ||
| 90 | +export function getAccsRoute(data) { | ||
| 91 | + return request({ | ||
| 92 | + url: '/dmDataLog/getAccsRoute', | ||
| 93 | + method: 'post', | ||
| 94 | + data: data | ||
| 95 | + }) | ||
| 96 | +} | ||
| 97 | + | ||
| 98 | +//航班号+日期查询ACCS航线(货物查询查询项) | ||
| 99 | +/** | ||
| 100 | + * @param fltNoAccs 航班号 list | ||
| 101 | + */ | ||
| 102 | +export function getFlightsRoutes(data) { | ||
| 103 | + return request({ | ||
| 104 | + url: '/dictionary/getFlightsRoutes', | ||
| 105 | + method: 'post', | ||
| 106 | + data: data | ||
| 107 | + }) | ||
| 108 | +} | ... | ... |
| ... | @@ -129,7 +129,7 @@ export function addFlight(data) { | ... | @@ -129,7 +129,7 @@ export function addFlight(data) { |
| 129 | }) | 129 | }) |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | -//虚拟航班新增 | 132 | +//虚拟航班删除 |
| 133 | /** | 133 | /** |
| 134 | * @param flightNo 航班名称 list * | 134 | * @param flightNo 航班名称 list * |
| 135 | */ | 135 | */ |
| ... | @@ -139,4 +139,68 @@ export function delFlight(data) { | ... | @@ -139,4 +139,68 @@ export function delFlight(data) { |
| 139 | method: 'post', | 139 | method: 'post', |
| 140 | data: data | 140 | data: data |
| 141 | }) | 141 | }) |
| 142 | +} | ||
| 143 | + | ||
| 144 | +//查询航线 | ||
| 145 | +/** | ||
| 146 | + * @param fltNo 航班号 | ||
| 147 | + * @param page 页数 | ||
| 148 | + * @param size 页长 | ||
| 149 | + */ | ||
| 150 | +export function queryRoute(data) { | ||
| 151 | + return request({ | ||
| 152 | + url: '/dictionary/queryRoute', | ||
| 153 | + method: 'post', | ||
| 154 | + data: data | ||
| 155 | + }) | ||
| 156 | +} | ||
| 157 | + | ||
| 158 | +//新增航线 | ||
| 159 | +/** | ||
| 160 | + * @param fltNo 航班号 * | ||
| 161 | + * @param route 航线 * | ||
| 162 | + */ | ||
| 163 | +export function addRoute(data) { | ||
| 164 | + return request({ | ||
| 165 | + url: '/dictionary/addRoute', | ||
| 166 | + method: 'post', | ||
| 167 | + data: data | ||
| 168 | + }) | ||
| 169 | +} | ||
| 170 | + | ||
| 171 | +//删除航线 | ||
| 172 | +/** | ||
| 173 | + * @param id * | ||
| 174 | + */ | ||
| 175 | +export function delRoute(data) { | ||
| 176 | + return request({ | ||
| 177 | + url: '/dictionary/delRoute', | ||
| 178 | + method: 'post', | ||
| 179 | + data: data | ||
| 180 | + }) | ||
| 181 | +} | ||
| 182 | + | ||
| 183 | +//航线排序 | ||
| 184 | +/** | ||
| 185 | + * @param id * | ||
| 186 | + */ | ||
| 187 | +export function orderRoute(data) { | ||
| 188 | + return request({ | ||
| 189 | + url: '/dictionary/orderRoute', | ||
| 190 | + method: 'post', | ||
| 191 | + data: data | ||
| 192 | + }) | ||
| 193 | +} | ||
| 194 | + | ||
| 195 | +//航线删除确认 | ||
| 196 | +/** | ||
| 197 | + * @param fltNo 航班号 | ||
| 198 | + * @param route 航线 | ||
| 199 | + */ | ||
| 200 | +export function checkFlightRoute(data) { | ||
| 201 | + return request({ | ||
| 202 | + url: '/FlightPreserveController/checkFlightRoute', | ||
| 203 | + method: 'post', | ||
| 204 | + data: data | ||
| 205 | + }) | ||
| 142 | } | 206 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -13,25 +13,25 @@ let tableHeaders = { | ... | @@ -13,25 +13,25 @@ let tableHeaders = { |
| 13 | status: 1 | 13 | status: 1 |
| 14 | }, | 14 | }, |
| 15 | { | 15 | { |
| 16 | - columnChineseName: "总重量(KG)", | 16 | + columnChineseName: "航线", |
| 17 | - columnName: "totalWeight", | 17 | + columnName: "route", |
| 18 | columnWidth: "", | 18 | columnWidth: "", |
| 19 | status: 1 | 19 | status: 1 |
| 20 | }, | 20 | }, |
| 21 | { | 21 | { |
| 22 | - columnChineseName: "已配重量(KG)", | 22 | + columnChineseName: "总重量(KG)", |
| 23 | - columnName: "allocationWeight", | 23 | + columnName: "totalWeight", |
| 24 | columnWidth: "", | 24 | columnWidth: "", |
| 25 | status: 1 | 25 | status: 1 |
| 26 | }, | 26 | }, |
| 27 | { | 27 | { |
| 28 | - columnChineseName: "总体积(cm³)", | 28 | + columnChineseName: "已配重量(KG)", |
| 29 | - columnName: "totalVolumn", | 29 | + columnName: "allocationWeight", |
| 30 | columnWidth: "", | 30 | columnWidth: "", |
| 31 | status: 1 | 31 | status: 1 |
| 32 | }, | 32 | }, |
| 33 | { | 33 | { |
| 34 | - columnChineseName: "已配体积(cm³)", | 34 | + columnChineseName: "已配体积(m³)", |
| 35 | columnName: "allocationVolumn", | 35 | columnName: "allocationVolumn", |
| 36 | columnWidth: "", | 36 | columnWidth: "", |
| 37 | status: 1 | 37 | status: 1 |
| ... | @@ -173,6 +173,13 @@ let tableHeaders = { | ... | @@ -173,6 +173,13 @@ let tableHeaders = { |
| 173 | status: 1 | 173 | status: 1 |
| 174 | }, | 174 | }, |
| 175 | { | 175 | { |
| 176 | + columnChineseName: "体积", | ||
| 177 | + columnName: "volume", | ||
| 178 | + columnWidth: "100", | ||
| 179 | + ext1: "sorTable", | ||
| 180 | + status: 1 | ||
| 181 | + }, | ||
| 182 | + { | ||
| 176 | columnChineseName: "收件人国家代码", | 183 | columnChineseName: "收件人国家代码", |
| 177 | columnName: "consigneeCountry", | 184 | columnName: "consigneeCountry", |
| 178 | columnWidth: "150", | 185 | columnWidth: "150", |
| ... | @@ -406,6 +413,12 @@ let tableHeaders = { | ... | @@ -406,6 +413,12 @@ let tableHeaders = { |
| 406 | status: 1 | 413 | status: 1 |
| 407 | }, | 414 | }, |
| 408 | { | 415 | { |
| 416 | + columnChineseName: "航线", | ||
| 417 | + columnName: "router", | ||
| 418 | + columnWidth: "140", | ||
| 419 | + status: 1 | ||
| 420 | + }, | ||
| 421 | + { | ||
| 409 | columnChineseName: "ACCS原航班日期", | 422 | columnChineseName: "ACCS原航班日期", |
| 410 | columnName: "accsFlightDate", | 423 | columnName: "accsFlightDate", |
| 411 | columnWidth: "140", | 424 | columnWidth: "140", |
| ... | @@ -420,7 +433,7 @@ let tableHeaders = { | ... | @@ -420,7 +433,7 @@ let tableHeaders = { |
| 420 | { | 433 | { |
| 421 | columnChineseName: "货物状态", | 434 | columnChineseName: "货物状态", |
| 422 | columnName: "cargoStatus", | 435 | columnName: "cargoStatus", |
| 423 | - columnWidth: "80", | 436 | + columnWidth: "100", |
| 424 | status: 1 | 437 | status: 1 |
| 425 | }, | 438 | }, |
| 426 | { | 439 | { |
| ... | @@ -458,18 +471,6 @@ let tableHeaders = { | ... | @@ -458,18 +471,6 @@ let tableHeaders = { |
| 458 | status: 1 | 471 | status: 1 |
| 459 | }, | 472 | }, |
| 460 | { | 473 | { |
| 461 | - columnChineseName: "航班起飞时间", | ||
| 462 | - columnName: "takeOffTime", | ||
| 463 | - columnWidth: "120", | ||
| 464 | - status: 1 | ||
| 465 | - }, | ||
| 466 | - { | ||
| 467 | - columnChineseName: "Pre-MDE CutOff时间", | ||
| 468 | - columnName: "cutOffTime", | ||
| 469 | - columnWidth: "150", | ||
| 470 | - status: 1 | ||
| 471 | - }, | ||
| 472 | - { | ||
| 473 | columnChineseName: "航班号", | 474 | columnChineseName: "航班号", |
| 474 | columnName: "fltNo", | 475 | columnName: "fltNo", |
| 475 | columnWidth: "100", | 476 | columnWidth: "100", |
| ... | @@ -524,13 +525,7 @@ let tableHeaders = { | ... | @@ -524,13 +525,7 @@ let tableHeaders = { |
| 524 | status: 1 | 525 | status: 1 |
| 525 | }, | 526 | }, |
| 526 | { | 527 | { |
| 527 | - columnChineseName: "总体积(cm³)", | 528 | + columnChineseName: "已配体积(m³)", |
| 528 | - columnName: "totalVolume", | ||
| 529 | - columnWidth: "100", | ||
| 530 | - status: 1 | ||
| 531 | - }, | ||
| 532 | - { | ||
| 533 | - columnChineseName: "已配体积(cm³)", | ||
| 534 | columnName: "alloctedVolume", | 529 | columnName: "alloctedVolume", |
| 535 | columnWidth: "120", | 530 | columnWidth: "120", |
| 536 | status: 1 | 531 | status: 1 |
| ... | @@ -974,25 +969,37 @@ let tableHeaders = { | ... | @@ -974,25 +969,37 @@ let tableHeaders = { |
| 974 | { | 969 | { |
| 975 | columnChineseName: "航班号", | 970 | columnChineseName: "航班号", |
| 976 | columnName: "purposeOfFlightNo", | 971 | columnName: "purposeOfFlightNo", |
| 972 | + columnWidth: "100", | ||
| 973 | + status: 1 | ||
| 974 | + }, | ||
| 975 | + { | ||
| 976 | + columnChineseName: "航班日期", | ||
| 977 | + columnName: "ruleDate", | ||
| 978 | + columnWidth: "150", | ||
| 979 | + status: 1 | ||
| 980 | + }, | ||
| 981 | + { | ||
| 982 | + columnChineseName: "航线优先级", | ||
| 983 | + columnName: "flightRoute", | ||
| 977 | columnWidth: "", | 984 | columnWidth: "", |
| 978 | status: 1 | 985 | status: 1 |
| 979 | }, | 986 | }, |
| 980 | { | 987 | { |
| 981 | columnChineseName: "状态", | 988 | columnChineseName: "状态", |
| 982 | columnName: "status", | 989 | columnName: "status", |
| 983 | - columnWidth: "", | 990 | + columnWidth: "100", |
| 984 | status: 1 | 991 | status: 1 |
| 985 | }, | 992 | }, |
| 986 | { | 993 | { |
| 987 | columnChineseName: "操作人", | 994 | columnChineseName: "操作人", |
| 988 | - columnName: "createUserName", | 995 | + columnName: "updateUserName", |
| 989 | - columnWidth: "", | 996 | + columnWidth: "100", |
| 990 | status: 1 | 997 | status: 1 |
| 991 | }, | 998 | }, |
| 992 | { | 999 | { |
| 993 | columnChineseName: "更新时间", | 1000 | columnChineseName: "更新时间", |
| 994 | - columnName: "createTime", | 1001 | + columnName: "updateTime", |
| 995 | - columnWidth: "", | 1002 | + columnWidth: "150", |
| 996 | status: 1 | 1003 | status: 1 |
| 997 | }, | 1004 | }, |
| 998 | ], | 1005 | ], |
| ... | @@ -1127,6 +1134,12 @@ let tableHeaders = { | ... | @@ -1127,6 +1134,12 @@ let tableHeaders = { |
| 1127 | status: 1 | 1134 | status: 1 |
| 1128 | }, | 1135 | }, |
| 1129 | { | 1136 | { |
| 1137 | + columnChineseName: "当前配载航线", | ||
| 1138 | + columnName: "flightRoute", | ||
| 1139 | + columnWidth: "130", | ||
| 1140 | + status: 1 | ||
| 1141 | + }, | ||
| 1142 | + { | ||
| 1130 | columnChineseName: "ACCS原航班号", | 1143 | columnChineseName: "ACCS原航班号", |
| 1131 | columnName: "dmFlightNbr", | 1144 | columnName: "dmFlightNbr", |
| 1132 | columnWidth: "120", | 1145 | columnWidth: "120", |
| ... | @@ -1247,6 +1260,12 @@ let tableHeaders = { | ... | @@ -1247,6 +1260,12 @@ let tableHeaders = { |
| 1247 | status: 1 | 1260 | status: 1 |
| 1248 | }, | 1261 | }, |
| 1249 | { | 1262 | { |
| 1263 | + columnChineseName: "航线", | ||
| 1264 | + columnName: "flightRoute", | ||
| 1265 | + columnWidth: "", | ||
| 1266 | + status: 1 | ||
| 1267 | + }, | ||
| 1268 | + { | ||
| 1250 | columnChineseName: "申报类别", | 1269 | columnChineseName: "申报类别", |
| 1251 | columnName: "declarationCategory", | 1270 | columnName: "declarationCategory", |
| 1252 | columnWidth: "100", | 1271 | columnWidth: "100", |
| ... | @@ -1350,7 +1369,22 @@ let tableHeaders = { | ... | @@ -1350,7 +1369,22 @@ let tableHeaders = { |
| 1350 | columnWidth: "", | 1369 | columnWidth: "", |
| 1351 | status: 1 | 1370 | status: 1 |
| 1352 | }, | 1371 | }, |
| 1353 | - ] | 1372 | + ], |
| 1373 | + "fltRoute": [ | ||
| 1374 | + { | ||
| 1375 | + columnChineseName: "航班名称", | ||
| 1376 | + columnName: "fltNo", | ||
| 1377 | + columnWidth: "", | ||
| 1378 | + ext1: "slot", | ||
| 1379 | + status: 1 | ||
| 1380 | + }, | ||
| 1381 | + { | ||
| 1382 | + columnChineseName: "航线", | ||
| 1383 | + columnName: "route", | ||
| 1384 | + columnWidth: "", | ||
| 1385 | + status: 1 | ||
| 1386 | + }, | ||
| 1387 | + ], | ||
| 1354 | } | 1388 | } |
| 1355 | 1389 | ||
| 1356 | export default tableHeaders; | 1390 | export default tableHeaders; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -292,4 +292,8 @@ body { | ... | @@ -292,4 +292,8 @@ body { |
| 292 | 292 | ||
| 293 | .el-select-dropdown { | 293 | .el-select-dropdown { |
| 294 | max-width: 300px; | 294 | max-width: 300px; |
| 295 | +} | ||
| 296 | + | ||
| 297 | +.el-select-dropdown__wrap { | ||
| 298 | + max-height: 350px !important; | ||
| 295 | } | 299 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
src/components/Drag/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <!-- 拖拽交换位置效果 --> | ||
| 3 | + <transition-group tag="div" class="container"> | ||
| 4 | + <div class="item" v-for="(item, index) in list" :key="index" draggable="true" | ||
| 5 | + @dragstart="handleDragStart($event, item)" @dragover.prevent="handleDragOver($event, item)" | ||
| 6 | + @dragenter="handleDragEnter($event, item)" @dragend="handleDragEnd($event, item)"> | ||
| 7 | + <svg-icon v-if="!disabled" icon-class="drag-text" class="el-input__icon input-icon" style="color:#bfbfbf" /> | ||
| 8 | + <span>{{ item.route }}</span> | ||
| 9 | + </div> | ||
| 10 | + </transition-group> | ||
| 11 | +</template> | ||
| 12 | + | ||
| 13 | +<script> | ||
| 14 | +// draggable 属性规定元素是否可拖动 | ||
| 15 | +// dragstart 事件在用户开始拖动元素或选择的文本时触发 | ||
| 16 | +// dragover 当某被拖动的对象在另一对象容器范围内拖动时触发此事件 | ||
| 17 | +// dragenter - 当被鼠标拖动的对象进入其容器范围内时触发此事件 | ||
| 18 | +// dragend - 用户完成元素拖动后触发 | ||
| 19 | +export default { | ||
| 20 | + name: 'Toolbar', | ||
| 21 | + props: { | ||
| 22 | + data: { | ||
| 23 | + type: Array, | ||
| 24 | + default: null | ||
| 25 | + }, | ||
| 26 | + disabled: { | ||
| 27 | + type: Boolean, | ||
| 28 | + default: false | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + data() { | ||
| 32 | + return { | ||
| 33 | + list: [], | ||
| 34 | + dragging: null | ||
| 35 | + } | ||
| 36 | + }, | ||
| 37 | + created() { | ||
| 38 | + this.list = this.data | ||
| 39 | + }, | ||
| 40 | + watch: { | ||
| 41 | + data(val) { | ||
| 42 | + if (val) { | ||
| 43 | + this.list = this.data | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + }, | ||
| 47 | + methods: { | ||
| 48 | + handleDragStart(e, item) { | ||
| 49 | + this.disabled ? '' : this.dragging = item; | ||
| 50 | + }, | ||
| 51 | + handleDragEnd(e, item) { | ||
| 52 | + this.disabled ? '' : this.dragging = null | ||
| 53 | + }, | ||
| 54 | + //首先把div变成可以放置的元素,即重写dragenter/dragover | ||
| 55 | + // DataTransfer 对象用来保存,通过拖放动作,拖动到浏览器的数据。 | ||
| 56 | + // 如果dropEffect 属性设定为none,则不允许被拖放到目标元素中。 | ||
| 57 | + handleDragOver(e) { | ||
| 58 | + this.disabled ? '' : e.dataTransfer.dropEffect = 'move'// e.dataTransfer.dropEffect="move";//在dragenter中针对放置目标来设置! | ||
| 59 | + }, | ||
| 60 | + handleDragEnter(e, item) { | ||
| 61 | + if (!this.disabled) { | ||
| 62 | + e.dataTransfer.effectAllowed = "move"//为需要移动的元素设置dragstart事件 | ||
| 63 | + if (item === this.dragging) { | ||
| 64 | + return | ||
| 65 | + } | ||
| 66 | + const newItems = [...this.list] | ||
| 67 | + const src = newItems.indexOf(this.dragging) | ||
| 68 | + const dst = newItems.indexOf(item) | ||
| 69 | + // 替换 | ||
| 70 | + newItems.splice(dst, 0, ...newItems.splice(src, 1)) | ||
| 71 | + // 让item的颜色等于新交换的颜色 | ||
| 72 | + this.list = newItems | ||
| 73 | + this.$emit('drag', newItems) | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + } | ||
| 77 | +} | ||
| 78 | +</script> | ||
| 79 | + | ||
| 80 | +<style lang="scss" scoped> | ||
| 81 | +.container { | ||
| 82 | + max-width: 350px; | ||
| 83 | + min-height: 32px; | ||
| 84 | + max-height: 150px; | ||
| 85 | + overflow-y: scroll; | ||
| 86 | + display: flex; | ||
| 87 | + flex-direction: column; | ||
| 88 | + padding: 0; | ||
| 89 | + border: 1px solid #ccc; | ||
| 90 | + | ||
| 91 | + &::-webkit-scrollbar { | ||
| 92 | + width: 7px; | ||
| 93 | + height: 7px; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + &::-webkit-scrollbar-track { | ||
| 97 | + background-color: #fff; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + &::-webkit-scrollbar-thumb { | ||
| 101 | + background-color: #ccc; | ||
| 102 | + border-radius: 20px; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + &::-webkit-scrollbar-thumb:hover { | ||
| 106 | + background-color: #409eff; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + &::-webkit-scrollbar-track-piece { | ||
| 110 | + background: #F2F6FC; | ||
| 111 | + } | ||
| 112 | +} | ||
| 113 | + | ||
| 114 | +.item { | ||
| 115 | + overflow-x: hidden; | ||
| 116 | + white-space: nowrap; | ||
| 117 | + text-overflow: ellipsis; | ||
| 118 | + /* border-bottom: 1px solid #ccc; */ | ||
| 119 | + cursor: move; | ||
| 120 | + transition: all linear .3s | ||
| 121 | +} | ||
| 122 | + | ||
| 123 | +.item:hover { | ||
| 124 | + background-color: #c6e2ff; | ||
| 125 | +} | ||
| 126 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -11,10 +11,11 @@ import App from './App' | ... | @@ -11,10 +11,11 @@ import App from './App' |
| 11 | import store from './store' | 11 | import store from './store' |
| 12 | import router from './router' | 12 | import router from './router' |
| 13 | import permission from './directive/permission' | 13 | import permission from './directive/permission' |
| 14 | +import i18n from './i18n/index' | ||
| 14 | 15 | ||
| 15 | import './assets/icons' // icon | 16 | import './assets/icons' // icon |
| 16 | import './permission' // permission control | 17 | import './permission' // permission control |
| 17 | -import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree, upCase, nowDate } from "@/utils/FedEx"; | 18 | +import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree, upCase, nowDate, getRoute } from "@/utils/FedEx"; |
| 18 | import { isArray } from "@/utils/validate"; | 19 | import { isArray } from "@/utils/validate"; |
| 19 | import Pagination from "@/components/Pagination"; | 20 | import Pagination from "@/components/Pagination"; |
| 20 | // 自定义表格工具扩展 | 21 | // 自定义表格工具扩展 |
| ... | @@ -22,8 +23,9 @@ import RightToolbar from "@/components/RightToolbar" | ... | @@ -22,8 +23,9 @@ import RightToolbar from "@/components/RightToolbar" |
| 22 | import Table from "@/components/Table" | 23 | import Table from "@/components/Table" |
| 23 | import Tooltip from "@/components/Tooltip" | 24 | import Tooltip from "@/components/Tooltip" |
| 24 | import HeaderSetting from "@/components/HeaderSetting" | 25 | import HeaderSetting from "@/components/HeaderSetting" |
| 26 | +import Drag from "@/components/Drag" | ||
| 25 | import tableHeaders from '@/assets/languages/tableHeaders' | 27 | import tableHeaders from '@/assets/languages/tableHeaders' |
| 26 | -import dictLabels from "@/assets/languages/dictLabels.js"; | 28 | +import dictLabels from "@/assets/languages/dictLabels.js" |
| 27 | import settings from './settings.js' | 29 | import settings from './settings.js' |
| 28 | 30 | ||
| 29 | // 全局方法挂载 | 31 | // 全局方法挂载 |
| ... | @@ -36,6 +38,7 @@ Vue.prototype.download = download | ... | @@ -36,6 +38,7 @@ Vue.prototype.download = download |
| 36 | Vue.prototype.handleTree = handleTree | 38 | Vue.prototype.handleTree = handleTree |
| 37 | Vue.prototype.upCase = upCase | 39 | Vue.prototype.upCase = upCase |
| 38 | Vue.prototype.nowDate = nowDate | 40 | Vue.prototype.nowDate = nowDate |
| 41 | +Vue.prototype.getRoute = getRoute | ||
| 39 | Vue.prototype.isArray = isArray | 42 | Vue.prototype.isArray = isArray |
| 40 | Vue.prototype.tableHeaders = tableHeaders | 43 | Vue.prototype.tableHeaders = tableHeaders |
| 41 | Vue.prototype.dictLabels = dictLabels | 44 | Vue.prototype.dictLabels = dictLabels |
| ... | @@ -63,6 +66,7 @@ Vue.component('RightToolbar', RightToolbar) | ... | @@ -63,6 +66,7 @@ Vue.component('RightToolbar', RightToolbar) |
| 63 | Vue.component('Tables', Table) | 66 | Vue.component('Tables', Table) |
| 64 | Vue.component('Tooltips', Tooltip) | 67 | Vue.component('Tooltips', Tooltip) |
| 65 | Vue.component('HeaderSetting', HeaderSetting) | 68 | Vue.component('HeaderSetting', HeaderSetting) |
| 69 | +Vue.component('Drag', Drag) | ||
| 66 | 70 | ||
| 67 | Vue.use(permission) | 71 | Vue.use(permission) |
| 68 | /** | 72 | /** |
| ... | @@ -92,5 +96,6 @@ new Vue({ | ... | @@ -92,5 +96,6 @@ new Vue({ |
| 92 | el: '#app', | 96 | el: '#app', |
| 93 | router, | 97 | router, |
| 94 | store, | 98 | store, |
| 99 | + i18n, | ||
| 95 | render: h => h(App) | 100 | render: h => h(App) |
| 96 | }) | 101 | }) | ... | ... |
| ... | @@ -2,187 +2,202 @@ | ... | @@ -2,187 +2,202 @@ |
| 2 | * 通用js方法封装处理 | 2 | * 通用js方法封装处理 |
| 3 | * Copyright (c) 2019 FedEx | 3 | * Copyright (c) 2019 FedEx |
| 4 | */ | 4 | */ |
| 5 | - | ||
| 6 | -const baseURL = process.env.VUE_APP_BASE_API | ||
| 7 | - | ||
| 8 | -// 日期格式化 | ||
| 9 | -export function parseTime(time, pattern) { | ||
| 10 | - //debugger | ||
| 11 | - if (arguments.length === 0 || !time) { | ||
| 12 | - return null | ||
| 13 | - } | ||
| 14 | - const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' | ||
| 15 | - let date | ||
| 16 | - if (typeof time === 'object') { | ||
| 17 | - date = time | ||
| 18 | - } else { | ||
| 19 | - if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { | ||
| 20 | - time = parseInt(time) | ||
| 21 | - } else if (typeof time === 'string') { | ||
| 22 | - time = time.replace(new RegExp(/-/gm), '/'); | ||
| 23 | - } | ||
| 24 | - if ((typeof time === 'number') && (time.toString().length === 10)) { | ||
| 25 | - time = time * 1000 | ||
| 26 | - } | ||
| 27 | - date = new Date(time) | ||
| 28 | - } | ||
| 29 | - const formatObj = { | ||
| 30 | - y: date.getFullYear(), | ||
| 31 | - m: date.getMonth() + 1, | ||
| 32 | - d: date.getDate(), | ||
| 33 | - h: date.getHours(), | ||
| 34 | - i: date.getMinutes(), | ||
| 35 | - s: date.getSeconds(), | ||
| 36 | - a: date.getDay() | ||
| 37 | - } | ||
| 38 | - const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { | ||
| 39 | - let value = formatObj[key] | ||
| 40 | - // Note: getDay() returns 0 on Sunday | ||
| 41 | - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } | ||
| 42 | - if (result.length > 0 && value < 10) { | ||
| 43 | - value = '0' + value | ||
| 44 | - } | ||
| 45 | - return value || 0 | ||
| 46 | - }) | ||
| 47 | - return time_str | ||
| 48 | -} | ||
| 49 | - | ||
| 50 | -// 表单重置 | ||
| 51 | -export function resetForm(refName) { | ||
| 52 | - if (this.$refs[refName]) { | ||
| 53 | - this.$refs[refName].resetFields(); | ||
| 54 | - } | ||
| 55 | -} | ||
| 56 | - | ||
| 57 | -// 添加日期范围 | ||
| 58 | -export function addDateRange(params, dateRange, propName) { | ||
| 59 | - var search = params; | ||
| 60 | - search.params = {}; | ||
| 61 | - if (null != dateRange && '' != dateRange) { | ||
| 62 | - if (typeof (propName) === "undefined") { | ||
| 63 | - search.params["beginTime"] = dateRange[0]; | ||
| 64 | - search.params["endTime"] = dateRange[1]; | ||
| 65 | - } else { | ||
| 66 | - search.params["begin" + propName] = dateRange[0]; | ||
| 67 | - search.params["end" + propName] = dateRange[1]; | ||
| 68 | - } | ||
| 69 | - } | ||
| 70 | - return search; | ||
| 71 | -} | ||
| 72 | - | ||
| 73 | -// 回显数据字典 | ||
| 74 | -export function selectDictLabel(datas, value) { | ||
| 75 | - var actions = []; | ||
| 76 | - Object.keys(datas).some((key) => { | ||
| 77 | - if (datas[key].dictValue == ('' + value)) { | ||
| 78 | - actions.push(datas[key].dictLabel); | ||
| 79 | - return true; | ||
| 80 | - } | ||
| 81 | - }) | ||
| 82 | - return actions.join(''); | ||
| 83 | -} | ||
| 84 | - | ||
| 85 | -// 回显数据字典(字符串数组) | ||
| 86 | -export function selectDictLabels(datas, value, separator) { | ||
| 87 | - var actions = []; | ||
| 88 | - var currentSeparator = undefined === separator ? "," : separator; | ||
| 89 | - var temp = value.split(currentSeparator); | ||
| 90 | - Object.keys(value.split(currentSeparator)).some((val) => { | ||
| 91 | - Object.keys(datas).some((key) => { | ||
| 92 | - if (datas[key].dictValue == ('' + temp[val])) { | ||
| 93 | - actions.push(datas[key].dictLabel + currentSeparator); | ||
| 94 | - } | ||
| 95 | - }) | ||
| 96 | - }) | ||
| 97 | - return actions.join('').substring(0, actions.join('').length - 1); | ||
| 98 | -} | ||
| 99 | - | ||
| 100 | -// 通用下载方法 | ||
| 101 | -export function download(fileName) { | ||
| 102 | - window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; | ||
| 103 | -} | ||
| 104 | - | ||
| 105 | -// 字符串格式化(%s ) | ||
| 106 | -export function sprintf(str) { | ||
| 107 | - var args = arguments, flag = true, i = 1; | ||
| 108 | - str = str.replace(/%s/g, function () { | ||
| 109 | - var arg = args[i++]; | ||
| 110 | - if (typeof arg === 'undefined') { | ||
| 111 | - flag = false; | ||
| 112 | - return ''; | ||
| 113 | - } | ||
| 114 | - return arg; | ||
| 115 | - }); | ||
| 116 | - return flag ? str : ''; | ||
| 117 | -} | ||
| 118 | - | ||
| 119 | -// 转换字符串,undefined,null等转化为"" | ||
| 120 | -export function praseStrEmpty(str) { | ||
| 121 | - if (!str || str == "undefined" || str == "null") { | ||
| 122 | - return ""; | ||
| 123 | - } | ||
| 124 | - return str; | ||
| 125 | -} | ||
| 126 | - | ||
| 127 | -/** | ||
| 128 | - * 构造树型结构数据 | ||
| 129 | - * @param {*} data 数据源 | ||
| 130 | - * @param {*} id id字段 默认 'id' | ||
| 131 | - * @param {*} parentId 父节点字段 默认 'parentId' | ||
| 132 | - * @param {*} children 孩子节点字段 默认 'children' | ||
| 133 | - */ | ||
| 134 | -export function handleTree(data, id, parentId, children) { | ||
| 135 | - let config = { | ||
| 136 | - id: id || 'id', | ||
| 137 | - parentId: parentId || 'parentId', | ||
| 138 | - childrenList: children || 'children' | ||
| 139 | - }; | ||
| 140 | - | ||
| 141 | - var childrenListMap = {}; | ||
| 142 | - var nodeIds = {}; | ||
| 143 | - var tree = []; | ||
| 144 | - | ||
| 145 | - for (let d of data) { | ||
| 146 | - let parentId = d[config.parentId]; | ||
| 147 | - if (childrenListMap[parentId] == null) { | ||
| 148 | - childrenListMap[parentId] = []; | ||
| 149 | - } | ||
| 150 | - nodeIds[d[config.id]] = d; | ||
| 151 | - childrenListMap[parentId].push(d); | ||
| 152 | - } | ||
| 153 | - | ||
| 154 | - for (let d of data) { | ||
| 155 | - let parentId = d[config.parentId]; | ||
| 156 | - if (nodeIds[parentId] == null) { | ||
| 157 | - tree.push(d); | ||
| 158 | - } | ||
| 159 | - } | ||
| 160 | - | ||
| 161 | - for (let t of tree) { | ||
| 162 | - adaptToChildrenList(t); | ||
| 163 | - } | ||
| 164 | - | ||
| 165 | - function adaptToChildrenList(o) { | ||
| 166 | - if (childrenListMap[o[config.id]] !== null) { | ||
| 167 | - o[config.childrenList] = childrenListMap[o[config.id]]; | ||
| 168 | - } | ||
| 169 | - if (o[config.childrenList]) { | ||
| 170 | - for (let c of o[config.childrenList]) { | ||
| 171 | - adaptToChildrenList(c); | ||
| 172 | - } | ||
| 173 | - } | ||
| 174 | - } | ||
| 175 | - return tree; | ||
| 176 | -} | ||
| 177 | - | ||
| 178 | -//字符串英文转大写,;转英文; | ||
| 179 | -export function upCase(str) { | ||
| 180 | - let newStr = str.replace(/;/g, ";").toUpperCase().trim(); | ||
| 181 | - return newStr; | ||
| 182 | -} | ||
| 183 | - | ||
| 184 | -//当前日期 | ||
| 185 | -export function nowDate() { | ||
| 186 | - let date = new Date() | ||
| 187 | - return `${date.getFullYear()}-${(date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)}-${(date.getDate()) > 9 ? date.getDate() : '0' + (date.getDate())}` | ||
| 188 | -} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 5 | + import { queryRoute } from '@/api/system/dictionary.js' | ||
| 6 | + | ||
| 7 | + | ||
| 8 | + const baseURL = process.env.VUE_APP_BASE_API | ||
| 9 | + | ||
| 10 | + // 日期格式化 | ||
| 11 | + export function parseTime(time, pattern) { | ||
| 12 | + //debugger | ||
| 13 | + if (arguments.length === 0 || !time) { | ||
| 14 | + return null | ||
| 15 | + } | ||
| 16 | + const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' | ||
| 17 | + let date | ||
| 18 | + if (typeof time === 'object') { | ||
| 19 | + date = time | ||
| 20 | + } else { | ||
| 21 | + if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { | ||
| 22 | + time = parseInt(time) | ||
| 23 | + } else if (typeof time === 'string') { | ||
| 24 | + time = time.replace(new RegExp(/-/gm), '/'); | ||
| 25 | + } | ||
| 26 | + if ((typeof time === 'number') && (time.toString().length === 10)) { | ||
| 27 | + time = time * 1000 | ||
| 28 | + } | ||
| 29 | + date = new Date(time) | ||
| 30 | + } | ||
| 31 | + const formatObj = { | ||
| 32 | + y: date.getFullYear(), | ||
| 33 | + m: date.getMonth() + 1, | ||
| 34 | + d: date.getDate(), | ||
| 35 | + h: date.getHours(), | ||
| 36 | + i: date.getMinutes(), | ||
| 37 | + s: date.getSeconds(), | ||
| 38 | + a: date.getDay() | ||
| 39 | + } | ||
| 40 | + const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { | ||
| 41 | + let value = formatObj[key] | ||
| 42 | + // Note: getDay() returns 0 on Sunday | ||
| 43 | + if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } | ||
| 44 | + if (result.length > 0 && value < 10) { | ||
| 45 | + value = '0' + value | ||
| 46 | + } | ||
| 47 | + return value || 0 | ||
| 48 | + }) | ||
| 49 | + return time_str | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + // 表单重置 | ||
| 53 | + export function resetForm(refName) { | ||
| 54 | + if (this.$refs[refName]) { | ||
| 55 | + this.$refs[refName].resetFields(); | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + // 添加日期范围 | ||
| 60 | + export function addDateRange(params, dateRange, propName) { | ||
| 61 | + var search = params; | ||
| 62 | + search.params = {}; | ||
| 63 | + if (null != dateRange && '' != dateRange) { | ||
| 64 | + if (typeof (propName) === "undefined") { | ||
| 65 | + search.params["beginTime"] = dateRange[0]; | ||
| 66 | + search.params["endTime"] = dateRange[1]; | ||
| 67 | + } else { | ||
| 68 | + search.params["begin" + propName] = dateRange[0]; | ||
| 69 | + search.params["end" + propName] = dateRange[1]; | ||
| 70 | + } | ||
| 71 | + } | ||
| 72 | + return search; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + // 回显数据字典 | ||
| 76 | + export function selectDictLabel(datas, value) { | ||
| 77 | + var actions = []; | ||
| 78 | + Object.keys(datas).some((key) => { | ||
| 79 | + if (datas[key].dictValue == ('' + value)) { | ||
| 80 | + actions.push(datas[key].dictLabel); | ||
| 81 | + return true; | ||
| 82 | + } | ||
| 83 | + }) | ||
| 84 | + return actions.join(''); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + // 回显数据字典(字符串数组) | ||
| 88 | + export function selectDictLabels(datas, value, separator) { | ||
| 89 | + var actions = []; | ||
| 90 | + var currentSeparator = undefined === separator ? "," : separator; | ||
| 91 | + var temp = value.split(currentSeparator); | ||
| 92 | + Object.keys(value.split(currentSeparator)).some((val) => { | ||
| 93 | + Object.keys(datas).some((key) => { | ||
| 94 | + if (datas[key].dictValue == ('' + temp[val])) { | ||
| 95 | + actions.push(datas[key].dictLabel + currentSeparator); | ||
| 96 | + } | ||
| 97 | + }) | ||
| 98 | + }) | ||
| 99 | + return actions.join('').substring(0, actions.join('').length - 1); | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + // 通用下载方法 | ||
| 103 | + export function download(fileName) { | ||
| 104 | + window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + // 字符串格式化(%s ) | ||
| 108 | + export function sprintf(str) { | ||
| 109 | + var args = arguments, flag = true, i = 1; | ||
| 110 | + str = str.replace(/%s/g, function () { | ||
| 111 | + var arg = args[i++]; | ||
| 112 | + if (typeof arg === 'undefined') { | ||
| 113 | + flag = false; | ||
| 114 | + return ''; | ||
| 115 | + } | ||
| 116 | + return arg; | ||
| 117 | + }); | ||
| 118 | + return flag ? str : ''; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + // 转换字符串,undefined,null等转化为"" | ||
| 122 | + export function praseStrEmpty(str) { | ||
| 123 | + if (!str || str == "undefined" || str == "null") { | ||
| 124 | + return ""; | ||
| 125 | + } | ||
| 126 | + return str; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + /** | ||
| 130 | + * 构造树型结构数据 | ||
| 131 | + * @param {*} data 数据源 | ||
| 132 | + * @param {*} id id字段 默认 'id' | ||
| 133 | + * @param {*} parentId 父节点字段 默认 'parentId' | ||
| 134 | + * @param {*} children 孩子节点字段 默认 'children' | ||
| 135 | + */ | ||
| 136 | + export function handleTree(data, id, parentId, children) { | ||
| 137 | + let config = { | ||
| 138 | + id: id || 'id', | ||
| 139 | + parentId: parentId || 'parentId', | ||
| 140 | + childrenList: children || 'children' | ||
| 141 | + }; | ||
| 142 | + | ||
| 143 | + var childrenListMap = {}; | ||
| 144 | + var nodeIds = {}; | ||
| 145 | + var tree = []; | ||
| 146 | + | ||
| 147 | + for (let d of data) { | ||
| 148 | + let parentId = d[config.parentId]; | ||
| 149 | + if (childrenListMap[parentId] == null) { | ||
| 150 | + childrenListMap[parentId] = []; | ||
| 151 | + } | ||
| 152 | + nodeIds[d[config.id]] = d; | ||
| 153 | + childrenListMap[parentId].push(d); | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + for (let d of data) { | ||
| 157 | + let parentId = d[config.parentId]; | ||
| 158 | + if (nodeIds[parentId] == null) { | ||
| 159 | + tree.push(d); | ||
| 160 | + } | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + for (let t of tree) { | ||
| 164 | + adaptToChildrenList(t); | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + function adaptToChildrenList(o) { | ||
| 168 | + if (childrenListMap[o[config.id]] !== null) { | ||
| 169 | + o[config.childrenList] = childrenListMap[o[config.id]]; | ||
| 170 | + } | ||
| 171 | + if (o[config.childrenList]) { | ||
| 172 | + for (let c of o[config.childrenList]) { | ||
| 173 | + adaptToChildrenList(c); | ||
| 174 | + } | ||
| 175 | + } | ||
| 176 | + } | ||
| 177 | + return tree; | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + //字符串英文转大写,;转英文; | ||
| 181 | + export function upCase(str) { | ||
| 182 | + let newStr = str.replace(/;/g, ";").toUpperCase().trim(); | ||
| 183 | + return newStr; | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + //当前日期 | ||
| 187 | + export function nowDate() { | ||
| 188 | + let date = new Date() | ||
| 189 | + return `${date.getFullYear()}-${(date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)}-${(date.getDate()) > 9 ? date.getDate() : '0' + (date.getDate())}` | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + //获取航线 | ||
| 193 | + export function getRoute(val) { | ||
| 194 | + return queryRoute({ fltNo: val }).then(res => { | ||
| 195 | + if (res.code === 200) { | ||
| 196 | + return res.data | ||
| 197 | + } else { | ||
| 198 | + return res.msg | ||
| 199 | + } | ||
| 200 | + }).catch(err => { | ||
| 201 | + console.log(err) | ||
| 202 | + }) | ||
| 203 | + } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="cargoAllocation"> | 2 | <div class="cargoAllocation"> |
| 3 | - <el-form ref="form" v-model="formData" class="form-header" label-position="right" label-width="auto" size="small"> | 3 | + <el-form ref="form" v-model="formData" class="form-header" label-position="right" label-width="auto" size="small" |
| 4 | + @submit.native.prevent> | ||
| 4 | <el-row type="flex" style="flexWrap: wrap !important"> | 5 | <el-row type="flex" style="flexWrap: wrap !important"> |
| 5 | <el-col :span="6"> | 6 | <el-col :span="6"> |
| 6 | <el-form-item label="ACCS原航班日期"> | 7 | <el-form-item label="ACCS原航班日期"> |
| ... | @@ -11,7 +12,8 @@ | ... | @@ -11,7 +12,8 @@ |
| 11 | </el-col> | 12 | </el-col> |
| 12 | <el-col :span="6"> | 13 | <el-col :span="6"> |
| 13 | <el-form-item label="ACCS原航班号"> | 14 | <el-form-item label="ACCS原航班号"> |
| 14 | - <el-input v-model="fltNo" placeholder="请输入ACCS原航班号" class="formItem" clearable></el-input> | 15 | + <el-input v-model="fltNo" placeholder="请输入ACCS原航班号" class="formItem" clearable @change="fltNoChange"> |
| 16 | + </el-input> | ||
| 15 | </el-form-item> | 17 | </el-form-item> |
| 16 | </el-col> | 18 | </el-col> |
| 17 | <el-col :span="6"> | 19 | <el-col :span="6"> |
| ... | @@ -116,6 +118,23 @@ | ... | @@ -116,6 +118,23 @@ |
| 116 | </el-form-item> | 118 | </el-form-item> |
| 117 | </el-col> | 119 | </el-col> |
| 118 | <el-col :span="6"> | 120 | <el-col :span="6"> |
| 121 | + <el-form-item> | ||
| 122 | + <template slot="label"> | ||
| 123 | + <div style="display:inline-block">ACCS航线 | ||
| 124 | + <el-tooltip class="item" effect="dark" content="选择航线需要先输入航班号,才能选择对应得航线" placement="top-start"> | ||
| 125 | + <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span> | ||
| 126 | + </el-tooltip> | ||
| 127 | + </div> | ||
| 128 | + </template> | ||
| 129 | + <el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0" | ||
| 130 | + clearable> | ||
| 131 | + <el-option v-for="item in routeList" :label="item" :value="item" :key="item"> | ||
| 132 | + <Tooltips :content="item" :refName="item"></Tooltips> | ||
| 133 | + </el-option> | ||
| 134 | + </el-select> | ||
| 135 | + </el-form-item> | ||
| 136 | + </el-col> | ||
| 137 | + <el-col :span="6"> | ||
| 119 | <el-form-item label="运单号"> | 138 | <el-form-item label="运单号"> |
| 120 | <el-input class="formItem" type="textarea" :rows="4" placeholder="请输入运单号(回车分割)" :maxlength="12000" | 139 | <el-input class="formItem" type="textarea" :rows="4" placeholder="请输入运单号(回车分割)" :maxlength="12000" |
| 121 | v-model="formData.waybillNo" clearable></el-input> | 140 | v-model="formData.waybillNo" clearable></el-input> |
| ... | @@ -187,7 +206,7 @@ | ... | @@ -187,7 +206,7 @@ |
| 187 | 206 | ||
| 188 | <script> | 207 | <script> |
| 189 | import Dialog from "./info.vue"; | 208 | import Dialog from "./info.vue"; |
| 190 | -import { findConditionData, findCargoAllocationData } from "@/api/cargoSelect"; | 209 | +import { findConditionData, findCargoAllocationData, getAccsRoute } from "@/api/cargoSelect"; |
| 191 | import { allDictData } from "@/api/destinationFlight"; | 210 | import { allDictData } from "@/api/destinationFlight"; |
| 192 | import { downLoadXlsx } from "@/utils/zipdownload"; | 211 | import { downLoadXlsx } from "@/utils/zipdownload"; |
| 193 | 212 | ||
| ... | @@ -203,6 +222,7 @@ export default { | ... | @@ -203,6 +222,7 @@ export default { |
| 203 | fltDateEnd: null, | 222 | fltDateEnd: null, |
| 204 | typeId: null, | 223 | typeId: null, |
| 205 | portName: null, | 224 | portName: null, |
| 225 | + rtoue: null, | ||
| 206 | statusId: null, | 226 | statusId: null, |
| 207 | kindToAllocFlightId: null, | 227 | kindToAllocFlightId: null, |
| 208 | serviceTypeId: null, | 228 | serviceTypeId: null, |
| ... | @@ -230,6 +250,7 @@ export default { | ... | @@ -230,6 +250,7 @@ export default { |
| 230 | SubCategory: [], | 250 | SubCategory: [], |
| 231 | }, //查询条件 | 251 | }, //查询条件 |
| 232 | fltDate: [], | 252 | fltDate: [], |
| 253 | + routeList: [], | ||
| 233 | ursaList: "", | 254 | ursaList: "", |
| 234 | siteNameList: "", | 255 | siteNameList: "", |
| 235 | handingCodes: [], | 256 | handingCodes: [], |
| ... | @@ -263,6 +284,8 @@ export default { | ... | @@ -263,6 +284,8 @@ export default { |
| 263 | } | 284 | } |
| 264 | }, | 285 | }, |
| 265 | activated() { | 286 | activated() { |
| 287 | + this.tableSelection = [] | ||
| 288 | + this.cargoTotal() | ||
| 266 | this.seleData(); | 289 | this.seleData(); |
| 267 | this.select(); | 290 | this.select(); |
| 268 | }, | 291 | }, |
| ... | @@ -485,6 +508,20 @@ export default { | ... | @@ -485,6 +508,20 @@ export default { |
| 485 | this.tableHeader = this.$store.getters.tableHeader['allocationCargo'] | 508 | this.tableHeader = this.$store.getters.tableHeader['allocationCargo'] |
| 486 | }) | 509 | }) |
| 487 | } | 510 | } |
| 511 | + }, | ||
| 512 | + //获取航班号航线 | ||
| 513 | + fltNoChange(val) { | ||
| 514 | + console.log(val) | ||
| 515 | + this.routeList = [] | ||
| 516 | + getAccsRoute({ fltNoAccs: val }).then(res => { | ||
| 517 | + if (res.code === 200) { | ||
| 518 | + this.routeList = res.data | ||
| 519 | + } else { | ||
| 520 | + this.msgWarning(res.msg) | ||
| 521 | + } | ||
| 522 | + }).catch(err => { | ||
| 523 | + console.log(err) | ||
| 524 | + }) | ||
| 488 | } | 525 | } |
| 489 | }, | 526 | }, |
| 490 | computed: { | 527 | computed: { |
| ... | @@ -524,7 +561,7 @@ export default { | ... | @@ -524,7 +561,7 @@ export default { |
| 524 | }; | 561 | }; |
| 525 | </script> | 562 | </script> |
| 526 | 563 | ||
| 527 | -<style lang="scss"> | 564 | +<style lang="scss" scoped> |
| 528 | .tips { | 565 | .tips { |
| 529 | display: inline-block; | 566 | display: inline-block; |
| 530 | color: #606266; | 567 | color: #606266; | ... | ... |
| ... | @@ -11,16 +11,31 @@ | ... | @@ -11,16 +11,31 @@ |
| 11 | :label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter"> | 11 | :label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter"> |
| 12 | </el-table-column> | 12 | </el-table-column> |
| 13 | </el-table> | 13 | </el-table> |
| 14 | - <el-form ref="form" label-position="right" label-width="auto" style="width: 400px; margin: 30px auto" | 14 | + <el-form ref="form" class="form-header" label-position="right" label-width="auto" |
| 15 | - :model="formData" :rules="rules"> | 15 | + style="width: 400px; margin: 30px auto" :model="formData" :rules="rules"> |
| 16 | <el-form-item label="航班号" prop="fltNo"> | 16 | <el-form-item label="航班号" prop="fltNo"> |
| 17 | - <el-input v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="10" style="width: 350px"></el-input> | 17 | + <el-input class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="10" |
| 18 | + style="width: 350px"></el-input> | ||
| 18 | </el-form-item> | 19 | </el-form-item> |
| 19 | <el-form-item label="航班日期:" prop="fltDate"> | 20 | <el-form-item label="航班日期:" prop="fltDate"> |
| 20 | - <el-date-picker v-model="formData.fltDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" | 21 | + <el-date-picker class="formItem" v-model="formData.fltDate" type="date" placeholder="选择日期" |
| 21 | - size="medium" style="width: 350px"> | 22 | + value-format="yyyy-MM-dd" size="medium" style="width: 350px" @change="dateChange"> |
| 22 | </el-date-picker> | 23 | </el-date-picker> |
| 23 | </el-form-item> | 24 | </el-form-item> |
| 25 | + <el-form-item prop="route"> | ||
| 26 | + <template slot="label"> | ||
| 27 | + <div style="display:inline-block">航线: | ||
| 28 | + <el-tooltip class="item" effect="dark" content="选择航线需要先输入航班号和航班日期,才能选择对应得航线" placement="top-start"> | ||
| 29 | + <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span> | ||
| 30 | + </el-tooltip> | ||
| 31 | + </div> | ||
| 32 | + </template> | ||
| 33 | + <el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0"> | ||
| 34 | + <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index"> | ||
| 35 | + <Tooltips :content="item.route" :refName="item.route"></Tooltips> | ||
| 36 | + </el-option> | ||
| 37 | + </el-select> | ||
| 38 | + </el-form-item> | ||
| 24 | </el-form> | 39 | </el-form> |
| 25 | <div slot="footer"> | 40 | <div slot="footer"> |
| 26 | <el-button @click="dialogBeforeClose">取 消</el-button> | 41 | <el-button @click="dialogBeforeClose">取 消</el-button> |
| ... | @@ -31,7 +46,7 @@ | ... | @@ -31,7 +46,7 @@ |
| 31 | </template> | 46 | </template> |
| 32 | 47 | ||
| 33 | <script> | 48 | <script> |
| 34 | -import { allocationFlight } from "@/api/cargoSelect"; | 49 | +import { allocationFlight, findFlightRoute } from "@/api/cargoSelect"; |
| 35 | 50 | ||
| 36 | export default { | 51 | export default { |
| 37 | props: { | 52 | props: { |
| ... | @@ -50,6 +65,7 @@ export default { | ... | @@ -50,6 +65,7 @@ export default { |
| 50 | ids: [], | 65 | ids: [], |
| 51 | fltNo: undefined, | 66 | fltNo: undefined, |
| 52 | fltDate: undefined, | 67 | fltDate: undefined, |
| 68 | + route: undefined, | ||
| 53 | overweight: false, | 69 | overweight: false, |
| 54 | }, | 70 | }, |
| 55 | cargoHeader: [ | 71 | cargoHeader: [ |
| ... | @@ -68,6 +84,7 @@ export default { | ... | @@ -68,6 +84,7 @@ export default { |
| 68 | { name: "创建人", value: "createUserName" }, | 84 | { name: "创建人", value: "createUserName" }, |
| 69 | { name: "创建时间", value: "createTime" }, | 85 | { name: "创建时间", value: "createTime" }, |
| 70 | ], | 86 | ], |
| 87 | + routeList: [], | ||
| 71 | rules: { | 88 | rules: { |
| 72 | fltNo: [ | 89 | fltNo: [ |
| 73 | { | 90 | { |
| ... | @@ -83,6 +100,13 @@ export default { | ... | @@ -83,6 +100,13 @@ export default { |
| 83 | trigger: "blur", | 100 | trigger: "blur", |
| 84 | }, | 101 | }, |
| 85 | ], | 102 | ], |
| 103 | + route: [ | ||
| 104 | + { | ||
| 105 | + required: true, | ||
| 106 | + message: "航线不能为空", | ||
| 107 | + trigger: "blur", | ||
| 108 | + }, | ||
| 109 | + ], | ||
| 86 | }, | 110 | }, |
| 87 | loading: false, | 111 | loading: false, |
| 88 | }; | 112 | }; |
| ... | @@ -93,8 +117,11 @@ export default { | ... | @@ -93,8 +117,11 @@ export default { |
| 93 | ids: [], | 117 | ids: [], |
| 94 | fltNo: undefined, | 118 | fltNo: undefined, |
| 95 | fltDate: undefined, | 119 | fltDate: undefined, |
| 120 | + route: undefined, | ||
| 121 | + flightId: undefined, | ||
| 96 | overweight: false, | 122 | overweight: false, |
| 97 | }; | 123 | }; |
| 124 | + this.routeList = [] | ||
| 98 | }, | 125 | }, |
| 99 | //确定配舱 | 126 | //确定配舱 |
| 100 | submit() { | 127 | submit() { |
| ... | @@ -104,6 +131,11 @@ export default { | ... | @@ -104,6 +131,11 @@ export default { |
| 104 | arr.push(item.id); | 131 | arr.push(item.id); |
| 105 | }); | 132 | }); |
| 106 | this.formData.ids = arr; | 133 | this.formData.ids = arr; |
| 134 | + this.routeList.forEach(item => { | ||
| 135 | + if (item.route === this.formData.route) { | ||
| 136 | + this.formData.flightId = item.id | ||
| 137 | + } | ||
| 138 | + }) | ||
| 107 | if (this.formData.fltNo && this.formData.fltDate) { | 139 | if (this.formData.fltNo && this.formData.fltDate) { |
| 108 | allocationFlight(this.formData).then((res) => { | 140 | allocationFlight(this.formData).then((res) => { |
| 109 | this.loading = false; | 141 | this.loading = false; |
| ... | @@ -165,6 +197,26 @@ export default { | ... | @@ -165,6 +197,26 @@ export default { |
| 165 | } | 197 | } |
| 166 | } | 198 | } |
| 167 | return cellValue | 199 | return cellValue |
| 200 | + }, | ||
| 201 | + //日期选择变化 | ||
| 202 | + dateChange(val) { | ||
| 203 | + let obj = { | ||
| 204 | + fltNo: this.formData.fltNo, | ||
| 205 | + fltDate: val | ||
| 206 | + } | ||
| 207 | + findFlightRoute(obj).then(res => { | ||
| 208 | + if (res.code === 200) { | ||
| 209 | + res.data[0].route.indexOf(';') <= 0 ? | ||
| 210 | + this.routeList = res.data : | ||
| 211 | + res.data[0].route.split(';').forEach(item => { | ||
| 212 | + this.routeList.push({ id: res.data[0].id, route: item }) | ||
| 213 | + }) | ||
| 214 | + } else { | ||
| 215 | + this.msgWarning(res.msg) | ||
| 216 | + } | ||
| 217 | + }).catch(err => { | ||
| 218 | + console.log(err) | ||
| 219 | + }) | ||
| 168 | } | 220 | } |
| 169 | }, | 221 | }, |
| 170 | computed: { | 222 | computed: { | ... | ... |
| ... | @@ -55,14 +55,15 @@ | ... | @@ -55,14 +55,15 @@ |
| 55 | </el-form> | 55 | </el-form> |
| 56 | <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData"> | 56 | <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData"> |
| 57 | <el-table-column label="运单号" align="center" prop="waybillNo" /> | 57 | <el-table-column label="运单号" align="center" prop="waybillNo" /> |
| 58 | + <el-table-column label="申报类别" align="center" prop="typeName" /> | ||
| 59 | + <el-table-column label="件数" align="center" prop="qty" width="70" /> | ||
| 60 | + <el-table-column label="实际重量" align="center" prop="actualWeight" width="100" /> | ||
| 58 | <el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" /> | 61 | <el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" /> |
| 59 | <el-table-column label="航班日期" align="center" prop="fltDate" /> | 62 | <el-table-column label="航班日期" align="center" prop="fltDate" /> |
| 60 | <el-table-column label="航班号" align="center" prop="fltNo" width="100" /> | 63 | <el-table-column label="航班号" align="center" prop="fltNo" width="100" /> |
| 61 | <el-table-column label="航班路线" align="center" prop="route" /> | 64 | <el-table-column label="航班路线" align="center" prop="route" /> |
| 62 | <el-table-column label="配置航班类型" align="center" prop="kindName" width="130" /> | 65 | <el-table-column label="配置航班类型" align="center" prop="kindName" width="130" /> |
| 63 | <el-table-column label="尺寸" align="center" prop="sizeStr" width="70" /> | 66 | <el-table-column label="尺寸" align="center" prop="sizeStr" width="70" /> |
| 64 | - <el-table-column label="件数" align="center" prop="qty" width="70" /> | ||
| 65 | - <el-table-column label="实际重量" align="center" prop="actualWeight" width="100" /> | ||
| 66 | <el-table-column label="创建时间" align="center" prop="createTime" width="180" /> | 67 | <el-table-column label="创建时间" align="center" prop="createTime" width="180" /> |
| 67 | </el-table> | 68 | </el-table> |
| 68 | <pagination v-show="total > 0" :total="total" layout=" prev, pager, next, jumper, sizes,total" | 69 | <pagination v-show="total > 0" :total="total" layout=" prev, pager, next, jumper, sizes,total" | ... | ... |
| ... | @@ -71,10 +71,12 @@ | ... | @@ -71,10 +71,12 @@ |
| 71 | @sortChange="sortChange" @sizeChange="sizeChange"> | 71 | @sortChange="sortChange" @sizeChange="sizeChange"> |
| 72 | <template slot="optionColumn"> | 72 | <template slot="optionColumn"> |
| 73 | <el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center" | 73 | <el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center" |
| 74 | - class-name="small-padding fixed-width" :fixed="tableHeader.length > 10 ? 'right' : false"> | 74 | + class-name="small-padding fixed-width" :fixed="tableHeader.length > 10 ? 'right' : false" width="160"> |
| 75 | <template slot-scope="scope"> | 75 | <template slot-scope="scope"> |
| 76 | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" | 76 | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| 77 | v-hasPermi="['base:flightInfo:update']">修改</el-button> | 77 | v-hasPermi="['base:flightInfo:update']">修改</el-button> |
| 78 | + <el-button size="mini" type="text" icon="el-icon-link" @click="goFlightAllocConfig(scope.row)">查看维度 | ||
| 79 | + </el-button> | ||
| 78 | </template> | 80 | </template> |
| 79 | </el-table-column> | 81 | </el-table-column> |
| 80 | </template> | 82 | </template> |
| ... | @@ -91,35 +93,46 @@ | ... | @@ -91,35 +93,46 @@ |
| 91 | </el-form-item> | 93 | </el-form-item> |
| 92 | </el-col> | 94 | </el-col> |
| 93 | <el-col :span="12"> | 95 | <el-col :span="12"> |
| 96 | + <el-form-item label="该航班预审状态:"> | ||
| 97 | + <el-tag v-if="preAudit" :type="preAudit == '开启' ? 'success' : 'info'" effect="dark">{{ preAudit }} | ||
| 98 | + </el-tag> | ||
| 99 | + </el-form-item> | ||
| 100 | + </el-col> | ||
| 101 | + </el-row> | ||
| 102 | + <el-row> | ||
| 103 | + <el-col :span="12"> | ||
| 94 | <el-form-item label="航班日期" prop="fltDate"> | 104 | <el-form-item label="航班日期" prop="fltDate"> |
| 95 | <el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small" | 105 | <el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small" |
| 96 | v-model="form.fltDate" type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期"> | 106 | v-model="form.fltDate" type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期"> |
| 97 | </el-date-picker> | 107 | </el-date-picker> |
| 98 | </el-form-item> | 108 | </el-form-item> |
| 99 | </el-col> | 109 | </el-col> |
| 100 | - </el-row> | ||
| 101 | - <el-row> | ||
| 102 | <el-col :span="12"> | 110 | <el-col :span="12"> |
| 103 | - <el-form-item label="Pre-MDE CutOff时间" prop="cutOffTime"> | 111 | + <el-form-item label="航班种类" prop="kindId"> |
| 104 | - <el-select class="wid80" v-model="form.cutOffTime" clearable placeholder="选择时间(输入查找选项)" type="string" | 112 | + <el-select class="wid80" v-model="form.kindId" :disabled="formdisabled.kindId" placeholder="请选择航班种类" |
| 105 | - filterable> | 113 | + @change="kindChange"> |
| 106 | - <el-option v-for="item in selectOption.cutOffTime" :key="item" :label="item" :value="item"> | 114 | + <el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName" |
| 115 | + :value="item.id"> | ||
| 107 | </el-option> | 116 | </el-option> |
| 108 | </el-select> | 117 | </el-select> |
| 109 | </el-form-item> | 118 | </el-form-item> |
| 110 | </el-col> | 119 | </el-col> |
| 111 | - <el-col :span="12"> | ||
| 112 | - <el-form-item label="航班路线" prop="route"> | ||
| 113 | - <el-input class="wid80" v-model="form.route" placeholder="请输入航班路线(XXX-XXX字母大写,多组用;分割)" /> | ||
| 114 | - </el-form-item> | ||
| 115 | - </el-col> | ||
| 116 | </el-row> | 120 | </el-row> |
| 117 | <el-row> | 121 | <el-row> |
| 118 | <el-col :span="12"> | 122 | <el-col :span="12"> |
| 119 | - <el-form-item label="航班种类" prop="kindId"> | 123 | + <el-form-item prop="route"> |
| 120 | - <el-select class="wid80" v-model="form.kindId" placeholder="请选择航班种类"> | 124 | + <template slot="label"> |
| 121 | - <el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName" | 125 | + <div style="display:inline-block">航班路线 |
| 122 | - :value="item.id"> | 126 | + <el-tooltip class="item" effect="dark" content="输入航班号后获取航线信息。航班种类为Purple Tail时可以进行多选,切换航班种类后需重新选择航线" |
| 127 | + placement="top-start"> | ||
| 128 | + <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span> | ||
| 129 | + </el-tooltip> | ||
| 130 | + </div> | ||
| 131 | + </template> | ||
| 132 | + <el-select ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route" | ||
| 133 | + placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :multiple='routeMultiple' | ||
| 134 | + :key="routeMultiple"> | ||
| 135 | + <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> | ||
| 123 | </el-option> | 136 | </el-option> |
| 124 | </el-select> | 137 | </el-select> |
| 125 | </el-form-item> | 138 | </el-form-item> |
| ... | @@ -158,19 +171,13 @@ | ... | @@ -158,19 +171,13 @@ |
| 158 | v-model="form.extraWeightPercent"></el-input-number> | 171 | v-model="form.extraWeightPercent"></el-input-number> |
| 159 | </el-form-item> | 172 | </el-form-item> |
| 160 | </el-col> | 173 | </el-col> |
| 161 | - <el-col :span="6"> | 174 | + <el-col :span="12"> |
| 162 | <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> | 175 | <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> |
| 163 | <el-switch class="wid80" @change="LowHighAvailable" v-model="form.highLowPriceFlg" :active-value="1" | 176 | <el-switch class="wid80" @change="LowHighAvailable" v-model="form.highLowPriceFlg" :active-value="1" |
| 164 | :inactive-value="0" active-color="#13ce66"> | 177 | :inactive-value="0" active-color="#13ce66"> |
| 165 | </el-switch> | 178 | </el-switch> |
| 166 | </el-form-item> | 179 | </el-form-item> |
| 167 | </el-col> | 180 | </el-col> |
| 168 | - <el-col :span="6"> | ||
| 169 | - <el-form-item label="该航班预审状态:"> | ||
| 170 | - <el-tag v-if="preAudit" :type="preAudit == '开启' ? 'success' : 'info'" effect="dark">{{ preAudit }} | ||
| 171 | - </el-tag> | ||
| 172 | - </el-form-item> | ||
| 173 | - </el-col> | ||
| 174 | </el-row> | 181 | </el-row> |
| 175 | <el-row> | 182 | <el-row> |
| 176 | <el-col :span="12"> | 183 | <el-col :span="12"> |
| ... | @@ -241,7 +248,7 @@ | ... | @@ -241,7 +248,7 @@ |
| 241 | </div> | 248 | </div> |
| 242 | </el-dialog> | 249 | </el-dialog> |
| 243 | <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false" | 250 | <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false" |
| 244 | - :append-to-body="true" :show-close="false"> | 251 | + :append-to-body="true"> |
| 245 | <el-table :data="gridData"> | 252 | <el-table :data="gridData"> |
| 246 | <el-table-column property="fltNo" label="航班号"></el-table-column> | 253 | <el-table-column property="fltNo" label="航班号"></el-table-column> |
| 247 | <el-table-column property="fltDate" label="航班日期"></el-table-column> | 254 | <el-table-column property="fltDate" label="航班日期"></el-table-column> |
| ... | @@ -314,17 +321,17 @@ export default { | ... | @@ -314,17 +321,17 @@ export default { |
| 314 | trigger: "blur", | 321 | trigger: "blur", |
| 315 | }, | 322 | }, |
| 316 | ], | 323 | ], |
| 317 | - // route: [ | 324 | + route: [ |
| 318 | - // { | 325 | + { |
| 319 | - // required: true, | 326 | + required: true, |
| 320 | - // message: "航班线路不能为空", | 327 | + message: "航班线路不能为空", |
| 321 | - // trigger: "blur", | 328 | + trigger: "blur", |
| 322 | - // }, | 329 | + }, |
| 323 | - // { | 330 | + // { |
| 324 | - // pattern: /^(([\~A-Z]{3,4})(\-[A-Z]{3,4})+)(;{1,1}(([\~A-Z]{3,4})(\-[A-Z]{3,4})+)){0,}$/, | 331 | + // pattern: /^(([\~A-Z]{3,4})(\-[A-Z]{3,4})+)(;{1,1}(([\~A-Z]{3,4})(\-[A-Z]{3,4})+)){0,}$/, |
| 325 | - // message: "请输入正确得航班线路" | 332 | + // message: "请输入正确得航班线路" |
| 326 | - // } | 333 | + // } |
| 327 | - // ] | 334 | + ] |
| 328 | }, | 335 | }, |
| 329 | //原航班规则数据 | 336 | //原航班规则数据 |
| 330 | findAllFltDatList: [], | 337 | findAllFltDatList: [], |
| ... | @@ -338,12 +345,12 @@ export default { | ... | @@ -338,12 +345,12 @@ export default { |
| 338 | fltNo: false, | 345 | fltNo: false, |
| 339 | //航班日期 | 346 | //航班日期 |
| 340 | fltDate: false, | 347 | fltDate: false, |
| 341 | - //航班路线 | ||
| 342 | - route: false, | ||
| 343 | //航班种类 | 348 | //航班种类 |
| 344 | kindId: false, | 349 | kindId: false, |
| 345 | //航班类型 | 350 | //航班类型 |
| 346 | typeId: false, | 351 | typeId: false, |
| 352 | + //航线 | ||
| 353 | + route: false, | ||
| 347 | //原始重量 | 354 | //原始重量 |
| 348 | originalWeight: false, | 355 | originalWeight: false, |
| 349 | }, | 356 | }, |
| ... | @@ -411,6 +418,10 @@ export default { | ... | @@ -411,6 +418,10 @@ export default { |
| 411 | ids: [], | 418 | ids: [], |
| 412 | //目的航班数据 | 419 | //目的航班数据 |
| 413 | sourceFlightAndFlightDate: [], | 420 | sourceFlightAndFlightDate: [], |
| 421 | + //航线数据 | ||
| 422 | + routeList: [], | ||
| 423 | + //航线多选状态 | ||
| 424 | + routeMultiple: false, | ||
| 414 | //航班预审状态 | 425 | //航班预审状态 |
| 415 | preAudit: null, | 426 | preAudit: null, |
| 416 | //高价百分比是否打开 | 427 | //高价百分比是否打开 |
| ... | @@ -444,6 +455,7 @@ export default { | ... | @@ -444,6 +455,7 @@ export default { |
| 444 | } | 455 | } |
| 445 | }, | 456 | }, |
| 446 | activated() { | 457 | activated() { |
| 458 | + this.ids = [] | ||
| 447 | this.findFltConditionData(); | 459 | this.findFltConditionData(); |
| 448 | this.findAllFltData(); | 460 | this.findAllFltData(); |
| 449 | }, | 461 | }, |
| ... | @@ -467,6 +479,7 @@ export default { | ... | @@ -467,6 +479,7 @@ export default { |
| 467 | methods: { | 479 | methods: { |
| 468 | //输入航班号后 | 480 | //输入航班号后 |
| 469 | blurfltNo() { | 481 | blurfltNo() { |
| 482 | + this.routeList = [] | ||
| 470 | if ( | 483 | if ( |
| 471 | this.form.fltNo != null && | 484 | this.form.fltNo != null && |
| 472 | this.form.fltNo != undefined && | 485 | this.form.fltNo != undefined && |
| ... | @@ -493,17 +506,16 @@ export default { | ... | @@ -493,17 +506,16 @@ export default { |
| 493 | //this.form.extraWeightPercent=response.data.extraWeightPercent=0; | 506 | //this.form.extraWeightPercent=response.data.extraWeightPercent=0; |
| 494 | } | 507 | } |
| 495 | //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 | 508 | //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 |
| 496 | - if ( | 509 | + // if ( |
| 497 | - response.data != null && | 510 | + // response.data != null && |
| 498 | - response.data.highLowPriceFlg != null && | 511 | + // response.data.highLowPriceFlg != null && |
| 499 | - response.data.highLowPriceFlg != undefined | 512 | + // response.data.highLowPriceFlg != undefined |
| 500 | - ) { | 513 | + // ) { |
| 501 | - this.form.highLowPriceFlg = response.data.highLowPriceFlg; | 514 | + // this.form.highLowPriceFlg = response.data.highLowPriceFlg; |
| 502 | - } else { | 515 | + // } else { |
| 503 | - this.$set(this.form, "highLowPriceFlg", 1); | 516 | + this.$set(this.form, "highLowPriceFlg", 0); |
| 504 | - //this.form.highLowPriceFlg = true; | 517 | + // //this.form.highLowPriceFlg = true; |
| 505 | - } | 518 | + // } |
| 506 | - //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑; | ||
| 507 | //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 | 519 | //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 |
| 508 | if ( | 520 | if ( |
| 509 | response.data != null && | 521 | response.data != null && |
| ... | @@ -530,7 +542,24 @@ export default { | ... | @@ -530,7 +542,24 @@ export default { |
| 530 | this.msgError(response.msg); | 542 | this.msgError(response.msg); |
| 531 | } | 543 | } |
| 532 | }); | 544 | }); |
| 545 | + //获取航线 | ||
| 546 | + this.getRoute(this.form.fltNo).then(res => { | ||
| 547 | + this.routeList = res.list | ||
| 548 | + }).catch(err => { | ||
| 549 | + console.log(err) | ||
| 550 | + }) | ||
| 551 | + } | ||
| 552 | + }, | ||
| 553 | + //航班种类修改 | ||
| 554 | + kindChange(val) { | ||
| 555 | + if (val === 94076) { | ||
| 556 | + this.form.route = [] | ||
| 557 | + this.routeMultiple = true | ||
| 558 | + } else { | ||
| 559 | + this.form.route = '' | ||
| 560 | + this.routeMultiple = false | ||
| 533 | } | 561 | } |
| 562 | + this.$refs.routeSelect.$forceUpdate() | ||
| 534 | }, | 563 | }, |
| 535 | //查询条件数据源 | 564 | //查询条件数据源 |
| 536 | findFltConditionData() { | 565 | findFltConditionData() { |
| ... | @@ -590,7 +619,7 @@ export default { | ... | @@ -590,7 +619,7 @@ export default { |
| 590 | handleAdd() { | 619 | handleAdd() { |
| 591 | this.reset(); | 620 | this.reset(); |
| 592 | this.findFltConditionData(); | 621 | this.findFltConditionData(); |
| 593 | - this.preAudit = null; | 622 | + this.preAudit = null |
| 594 | this.open = true; | 623 | this.open = true; |
| 595 | this.title = "添加航班信息"; | 624 | this.title = "添加航班信息"; |
| 596 | this.form.id = null; | 625 | this.form.id = null; |
| ... | @@ -602,10 +631,10 @@ export default { | ... | @@ -602,10 +631,10 @@ export default { |
| 602 | this.formdisabled.fltNo = false; | 631 | this.formdisabled.fltNo = false; |
| 603 | //航班日期 | 632 | //航班日期 |
| 604 | this.formdisabled.fltDate = false; | 633 | this.formdisabled.fltDate = false; |
| 605 | - //航班路线 | ||
| 606 | - this.formdisabled.route = false; | ||
| 607 | //航班种类 | 634 | //航班种类 |
| 608 | this.formdisabled.kindId = false; | 635 | this.formdisabled.kindId = false; |
| 636 | + //航线 | ||
| 637 | + this.formdisabled.route = false; | ||
| 609 | //航班类型 | 638 | //航班类型 |
| 610 | this.formdisabled.typeId = false; | 639 | this.formdisabled.typeId = false; |
| 611 | //原始重量 | 640 | //原始重量 |
| ... | @@ -714,10 +743,15 @@ export default { | ... | @@ -714,10 +743,15 @@ export default { |
| 714 | this.formdisabled.fltNo = true; | 743 | this.formdisabled.fltNo = true; |
| 715 | //航班日期 | 744 | //航班日期 |
| 716 | this.formdisabled.fltDate = true; | 745 | this.formdisabled.fltDate = true; |
| 746 | + //航班种类 | ||
| 747 | + this.formdisabled.kindId = true; | ||
| 748 | + //航线 | ||
| 749 | + this.formdisabled.route = true | ||
| 717 | //根据ID查item | 750 | //根据ID查item |
| 718 | findFltById(row).then((response) => { | 751 | findFltById(row).then((response) => { |
| 719 | if (response.code == 200) { | 752 | if (response.code == 200) { |
| 720 | this.form = response.data; | 753 | this.form = response.data; |
| 754 | + this.form.route.split(';') | ||
| 721 | //是否开启高低价 | 755 | //是否开启高低价 |
| 722 | // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; | 756 | // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; |
| 723 | //是否预审 | 757 | //是否预审 |
| ... | @@ -729,6 +763,19 @@ export default { | ... | @@ -729,6 +763,19 @@ export default { |
| 729 | } | 763 | } |
| 730 | }); | 764 | }); |
| 731 | }, | 765 | }, |
| 766 | + //查看航班维度 | ||
| 767 | + goFlightAllocConfig(val) { | ||
| 768 | + let obj = { | ||
| 769 | + handle: 'update', | ||
| 770 | + fltNo: val.fltNo, | ||
| 771 | + fltDate: val.fltDate, | ||
| 772 | + status: 'flightInformationMaintenance' | ||
| 773 | + } | ||
| 774 | + this.$router.push({ | ||
| 775 | + name: 'FlightAllocConfigInfo', | ||
| 776 | + params: obj | ||
| 777 | + }) | ||
| 778 | + }, | ||
| 732 | /** 删除按钮操作 */ | 779 | /** 删除按钮操作 */ |
| 733 | handleDelete(row) { | 780 | handleDelete(row) { |
| 734 | let fIds = []; | 781 | let fIds = []; |
| ... | @@ -797,10 +844,12 @@ export default { | ... | @@ -797,10 +844,12 @@ export default { |
| 797 | // formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; | 844 | // formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; |
| 798 | //总重量更新 | 845 | //总重量更新 |
| 799 | // formdata.totalWeight = this.Weightall() | 846 | // formdata.totalWeight = this.Weightall() |
| 847 | + formdata.route = this.form.route.toString().replace(/,/g, ';') | ||
| 800 | //处理数据 | 848 | //处理数据 |
| 801 | saveOrUpdate(formdata).then((response) => { | 849 | saveOrUpdate(formdata).then((response) => { |
| 802 | if (response.code === 200) { | 850 | if (response.code === 200) { |
| 803 | this.msgSuccess("保存成功"); | 851 | this.msgSuccess("保存成功"); |
| 852 | + this.routeList = [] | ||
| 804 | this.open = false; | 853 | this.open = false; |
| 805 | this.findAllFltData(); | 854 | this.findAllFltData(); |
| 806 | } else { | 855 | } else { |
| ... | @@ -817,6 +866,7 @@ export default { | ... | @@ -817,6 +866,7 @@ export default { |
| 817 | }, | 866 | }, |
| 818 | //取消按钮 | 867 | //取消按钮 |
| 819 | cancel() { | 868 | cancel() { |
| 869 | + this.routeList = [] | ||
| 820 | this.open = false; | 870 | this.open = false; |
| 821 | this.findAllFltData(); | 871 | this.findAllFltData(); |
| 822 | this.findFltConditionData(); | 872 | this.findFltConditionData(); |
| ... | @@ -899,6 +949,10 @@ export default { | ... | @@ -899,6 +949,10 @@ export default { |
| 899 | this.findAllFltData(); | 949 | this.findAllFltData(); |
| 900 | } | 950 | } |
| 901 | }, | 951 | }, |
| 952 | + //航线修改 | ||
| 953 | + routeChange(val) { | ||
| 954 | + this.$forceUpdate() | ||
| 955 | + }, | ||
| 902 | //多选框选中数据 | 956 | //多选框选中数据 |
| 903 | tableSelect(val) { | 957 | tableSelect(val) { |
| 904 | this.ids = val.selection; | 958 | this.ids = val.selection; | ... | ... |
| ... | @@ -4,8 +4,47 @@ | ... | @@ -4,8 +4,47 @@ |
| 4 | append-to-body center> | 4 | append-to-body center> |
| 5 | <el-form ref="add" :model="newDictionary" label-width="auto" label-position="left" size="small" | 5 | <el-form ref="add" :model="newDictionary" label-width="auto" label-position="left" size="small" |
| 6 | :rules="rules" @submit.native.prevent> | 6 | :rules="rules" @submit.native.prevent> |
| 7 | + <!-- 新增虚拟航班 --> | ||
| 8 | + <div v-if="dictName == '虚拟航班'"> | ||
| 9 | + <el-form-item label="所属口岸" prop="portName"> | ||
| 10 | + <el-select v-model="newDictionary.portName" placeholder="选择口岸" disabled> | ||
| 11 | + <el-option v-for="item in $store.state.user.portNames" :label="item" :value="item" | ||
| 12 | + :key="item"> | ||
| 13 | + </el-option> | ||
| 14 | + </el-select> | ||
| 15 | + </el-form-item> | ||
| 16 | + <el-form-item label="航班名称" v-if="status == 'allAdd'" prop="flightNo"> | ||
| 17 | + <el-input type="textarea" v-model="flightNo" :rows="7" maxlength="255" show-word-limit | ||
| 18 | + placeholder="用;分隔,单条航班名长度25"> | ||
| 19 | + </el-input> | ||
| 20 | + </el-form-item> | ||
| 21 | + <el-form-item label="航班名称" prop="flightNo" v-else> | ||
| 22 | + <el-input type="text" v-model="flightNo" placeholder="请输入数据名称" maxlength="25"></el-input> | ||
| 23 | + </el-form-item> | ||
| 24 | + </div> | ||
| 25 | + <!-- 新增航线 --> | ||
| 26 | + <div v-else-if="dictName == '航线'"> | ||
| 27 | + <div v-if="status == 'add'"> | ||
| 28 | + <el-form-item label="航班号" prop="fltNo"> | ||
| 29 | + <el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="50"> | ||
| 30 | + </el-input> | ||
| 31 | + </el-form-item> | ||
| 32 | + <el-form-item label="航线" prop="route"> | ||
| 33 | + <el-input type="text" v-model="newDictionary.route" placeholder="请输入航线" maxlength="40"> | ||
| 34 | + </el-input> | ||
| 35 | + </el-form-item> | ||
| 36 | + </div> | ||
| 37 | + <div v-else-if="status == 'sort'"> | ||
| 38 | + <el-form-item label="航班号" prop="fltNo"> | ||
| 39 | + <el-input type="text" v-model="newDictionary.fltNo" disabled></el-input> | ||
| 40 | + </el-form-item> | ||
| 41 | + <el-form-item label="航线"> | ||
| 42 | + <Drag :data="routeList" @drag="drag"></Drag> | ||
| 43 | + </el-form-item> | ||
| 44 | + </div> | ||
| 45 | + </div> | ||
| 7 | <!-- 新增数据字典 --> | 46 | <!-- 新增数据字典 --> |
| 8 | - <div v-if="dictName != '虚拟航班'"> | 47 | + <div v-else> |
| 9 | <el-form-item label="所属父级" v-if="newDictionary.serviceCodeKey"> | 48 | <el-form-item label="所属父级" v-if="newDictionary.serviceCodeKey"> |
| 10 | <el-input type="text" v-model="newDictionary.serviceCodeKey" placeholder="用回车分隔" disabled> | 49 | <el-input type="text" v-model="newDictionary.serviceCodeKey" placeholder="用回车分隔" disabled> |
| 11 | </el-input> | 50 | </el-input> |
| ... | @@ -32,24 +71,6 @@ | ... | @@ -32,24 +71,6 @@ |
| 32 | </el-form-item> | 71 | </el-form-item> |
| 33 | </div> | 72 | </div> |
| 34 | </div> | 73 | </div> |
| 35 | - <!-- 新增虚拟航班 --> | ||
| 36 | - <div v-else> | ||
| 37 | - <el-form-item label="所属口岸" prop="portName"> | ||
| 38 | - <el-select v-model="newDictionary.portName" placeholder="选择口岸" disabled> | ||
| 39 | - <el-option v-for="item in $store.state.user.portNames" :label="item" :value="item" | ||
| 40 | - :key="item"> | ||
| 41 | - </el-option> | ||
| 42 | - </el-select> | ||
| 43 | - </el-form-item> | ||
| 44 | - <el-form-item label="航班名称" v-if="status == 'allAdd'" prop="flightNo"> | ||
| 45 | - <el-input type="textarea" v-model="flightNo" :rows="7" maxlength="255" show-word-limit | ||
| 46 | - placeholder="用;分隔,单条航班名长度25"> | ||
| 47 | - </el-input> | ||
| 48 | - </el-form-item> | ||
| 49 | - <el-form-item label="航班名称" prop="flightNo" v-else> | ||
| 50 | - <el-input type="text" v-model="flightNo" placeholder="请输入数据名称" maxlength="25"></el-input> | ||
| 51 | - </el-form-item> | ||
| 52 | - </div> | ||
| 53 | </el-form> | 74 | </el-form> |
| 54 | <div slot="footer" class="dialog-footer"> | 75 | <div slot="footer" class="dialog-footer"> |
| 55 | <el-button type="primary" :loading="loading" @click="submit">确 定</el-button> | 76 | <el-button type="primary" :loading="loading" @click="submit">确 定</el-button> |
| ... | @@ -60,7 +81,7 @@ | ... | @@ -60,7 +81,7 @@ |
| 60 | </template> | 81 | </template> |
| 61 | 82 | ||
| 62 | <script> | 83 | <script> |
| 63 | -import { addDict, addDictBatch, addServiceCodeBatch, addFlight } from '@/api/system/dictionary.js' | 84 | +import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, queryRoute, orderRoute } from '@/api/system/dictionary.js' |
| 64 | 85 | ||
| 65 | export default { | 86 | export default { |
| 66 | props: { | 87 | props: { |
| ... | @@ -83,7 +104,7 @@ export default { | ... | @@ -83,7 +104,7 @@ export default { |
| 83 | }, | 104 | }, |
| 84 | data() { | 105 | data() { |
| 85 | return { | 106 | return { |
| 86 | - newDictionary: { flightNo: undefined, chineseName: undefined }, | 107 | + newDictionary: { flightNo: undefined, chineseName: undefined, route: undefined }, |
| 87 | rules: { | 108 | rules: { |
| 88 | chineseName: [ | 109 | chineseName: [ |
| 89 | { | 110 | { |
| ... | @@ -98,8 +119,23 @@ export default { | ... | @@ -98,8 +119,23 @@ export default { |
| 98 | message: "航班名称不能为空", | 119 | message: "航班名称不能为空", |
| 99 | trigger: "blur", | 120 | trigger: "blur", |
| 100 | }, | 121 | }, |
| 101 | - ] | 122 | + ], |
| 123 | + fltNo: [ | ||
| 124 | + { | ||
| 125 | + required: true, | ||
| 126 | + message: "航班号不能为空", | ||
| 127 | + trigger: "blur", | ||
| 128 | + } | ||
| 129 | + ], | ||
| 130 | + route: [ | ||
| 131 | + { | ||
| 132 | + required: true, | ||
| 133 | + message: "航线不能为空", | ||
| 134 | + trigger: "blur", | ||
| 135 | + } | ||
| 136 | + ], | ||
| 102 | }, | 137 | }, |
| 138 | + routeList: [], | ||
| 103 | title: '', | 139 | title: '', |
| 104 | loading: false, | 140 | loading: false, |
| 105 | } | 141 | } |
| ... | @@ -115,6 +151,18 @@ export default { | ... | @@ -115,6 +151,18 @@ export default { |
| 115 | } else if (this.status == 'childrenAdd') { | 151 | } else if (this.status == 'childrenAdd') { |
| 116 | this.newDictionary = this.addDictionary | 152 | this.newDictionary = this.addDictionary |
| 117 | this.title = '新增子集' | 153 | this.title = '新增子集' |
| 154 | + } else if (this.status == 'sort') { | ||
| 155 | + this.newDictionary = this.addDictionary.serviceCodeKey | ||
| 156 | + this.title = '航线排序' | ||
| 157 | + queryRoute({ fltNo: this.newDictionary.fltNo }).then(res => { | ||
| 158 | + if (res.code === 200) { | ||
| 159 | + this.routeList = res.data.list | ||
| 160 | + } else { | ||
| 161 | + this.msgWarning(res.msg) | ||
| 162 | + } | ||
| 163 | + }).catch(err => { | ||
| 164 | + console.log(err) | ||
| 165 | + }) | ||
| 118 | } | 166 | } |
| 119 | // else if (this.status == 'update') { | 167 | // else if (this.status == 'update') { |
| 120 | // if (this.addDictionary.serviceCodeValue) { | 168 | // if (this.addDictionary.serviceCodeValue) { |
| ... | @@ -145,6 +193,23 @@ export default { | ... | @@ -145,6 +193,23 @@ export default { |
| 145 | if (this.status == 'add') { | 193 | if (this.status == 'add') { |
| 146 | if (this.dictName === '虚拟航班') { | 194 | if (this.dictName === '虚拟航班') { |
| 147 | this.flightAdd() | 195 | this.flightAdd() |
| 196 | + } else if (this.dictName === '航线') { | ||
| 197 | + let obj = { | ||
| 198 | + fltNo: this.upCase(this.newDictionary.fltNo), | ||
| 199 | + route: this.upCase(this.newDictionary.route) | ||
| 200 | + } | ||
| 201 | + addRoute(obj).then(res => { | ||
| 202 | + this.loading = false | ||
| 203 | + if (res.code === 200) { | ||
| 204 | + this.msgSuccess(res.msg) | ||
| 205 | + this.close() | ||
| 206 | + } else { | ||
| 207 | + this.msgWarning(res.msg) | ||
| 208 | + } | ||
| 209 | + }).catch(err => { | ||
| 210 | + this.loading = false | ||
| 211 | + console.log(err) | ||
| 212 | + }) | ||
| 148 | } else { | 213 | } else { |
| 149 | addDict(this.newDictionary).then(res => { | 214 | addDict(this.newDictionary).then(res => { |
| 150 | this.loading = false | 215 | this.loading = false |
| ... | @@ -210,6 +275,25 @@ export default { | ... | @@ -210,6 +275,25 @@ export default { |
| 210 | console.log(err) | 275 | console.log(err) |
| 211 | }) | 276 | }) |
| 212 | } | 277 | } |
| 278 | + //航线排序 | ||
| 279 | + else if (this.status == 'sort') { | ||
| 280 | + let arr = [] | ||
| 281 | + this.routeList.forEach(item => { | ||
| 282 | + arr.push(item.id) | ||
| 283 | + }) | ||
| 284 | + orderRoute(arr).then(res => { | ||
| 285 | + this.loading = false | ||
| 286 | + if (res.code === 200) { | ||
| 287 | + this.msgSuccess(res.msg) | ||
| 288 | + this.close() | ||
| 289 | + } else { | ||
| 290 | + this.msgWarning(res.msg) | ||
| 291 | + } | ||
| 292 | + }).catch(err => { | ||
| 293 | + this.loading = false | ||
| 294 | + console.log(err) | ||
| 295 | + }) | ||
| 296 | + } | ||
| 213 | } | 297 | } |
| 214 | }) | 298 | }) |
| 215 | }, | 299 | }, |
| ... | @@ -230,9 +314,14 @@ export default { | ... | @@ -230,9 +314,14 @@ export default { |
| 230 | console.log(err) | 314 | console.log(err) |
| 231 | }) | 315 | }) |
| 232 | }, | 316 | }, |
| 317 | + //航线排序 | ||
| 318 | + drag(val) { | ||
| 319 | + this.routeList = val | ||
| 320 | + }, | ||
| 233 | //关闭 | 321 | //关闭 |
| 234 | close() { | 322 | close() { |
| 235 | this.newDictionary = { chineseName: null, code: null, remark: null } | 323 | this.newDictionary = { chineseName: null, code: null, remark: null } |
| 324 | + this.routeList = [] | ||
| 236 | this.clearValidate('add') | 325 | this.clearValidate('add') |
| 237 | this.$emit('close', false) | 326 | this.$emit('close', false) |
| 238 | }, | 327 | }, |
| ... | @@ -263,6 +352,25 @@ export default { | ... | @@ -263,6 +352,25 @@ export default { |
| 263 | this.newDictionary.flightNo = val | 352 | this.newDictionary.flightNo = val |
| 264 | } | 353 | } |
| 265 | }, | 354 | }, |
| 355 | + }, | ||
| 356 | + fltNo: { | ||
| 357 | + get: function () { | ||
| 358 | + return this.newDictionary.fltNo | ||
| 359 | + }, | ||
| 360 | + set: function (val) { | ||
| 361 | + this.newDictionary.fltNo = this.upCase(val) | ||
| 362 | + }, | ||
| 363 | + }, | ||
| 364 | + route: { | ||
| 365 | + get: function () { | ||
| 366 | + return this.newDictionary.route | ||
| 367 | + }, | ||
| 368 | + set: function (val) { | ||
| 369 | + const reg = /^([0-9a-zA-Z!@#$%^&*()`]{0,100})$/ | ||
| 370 | + if (reg.test(val)) { | ||
| 371 | + this.newDictionary.route = val | ||
| 372 | + } | ||
| 373 | + }, | ||
| 266 | } | 374 | } |
| 267 | } | 375 | } |
| 268 | } | 376 | } | ... | ... |
| ... | @@ -3,8 +3,9 @@ | ... | @@ -3,8 +3,9 @@ |
| 3 | <el-card style="margin-bottom:10px"> | 3 | <el-card style="margin-bottom:10px"> |
| 4 | <!-- cardHeader --> | 4 | <!-- cardHeader --> |
| 5 | <div slot="header" class="clearfix"> | 5 | <div slot="header" class="clearfix"> |
| 6 | - <span style="font-size:16px;font-weight:700">{{ (tableName == 'Site' ? '站点' : tableName == | 6 | + <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' : |
| 7 | - '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表" | 7 | + tableName == |
| 8 | + '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表" | ||
| 8 | }}</span> | 9 | }}</span> |
| 9 | <div style="float: right; padding: 3px 0"> | 10 | <div style="float: right; padding: 3px 0"> |
| 10 | <span class="selectLabel mr10">切换字典表</span> | 11 | <span class="selectLabel mr10">切换字典表</span> |
| ... | @@ -13,6 +14,7 @@ | ... | @@ -13,6 +14,7 @@ |
| 13 | :key="item.id"> | 14 | :key="item.id"> |
| 14 | </el-option> | 15 | </el-option> |
| 15 | <el-option label="虚拟航班" value="虚拟航班"></el-option> | 16 | <el-option label="虚拟航班" value="虚拟航班"></el-option> |
| 17 | + <el-option label="航线" value="航线"></el-option> | ||
| 16 | </el-select> | 18 | </el-select> |
| 17 | </div> | 19 | </div> |
| 18 | </div> | 20 | </div> |
| ... | @@ -21,7 +23,7 @@ | ... | @@ -21,7 +23,7 @@ |
| 21 | @submit.native.prevent> | 23 | @submit.native.prevent> |
| 22 | <el-row :gutter="10" v-if="tableName != 'serviceCode'"> | 24 | <el-row :gutter="10" v-if="tableName != 'serviceCode'"> |
| 23 | <el-col :span="6"> | 25 | <el-col :span="6"> |
| 24 | - <el-form-item label="航班名称" v-if="tableName === '虚拟航班'"> | 26 | + <el-form-item label="航班名称" v-if="tableName === '虚拟航班' || tableName === '航线'"> |
| 25 | <el-input v-model="selectDict.flightNo" size="small" style="width:80%" | 27 | <el-input v-model="selectDict.flightNo" size="small" style="width:80%" |
| 26 | placeholder="请输入航班名称"></el-input> | 28 | placeholder="请输入航班名称"></el-input> |
| 27 | </el-form-item> | 29 | </el-form-item> |
| ... | @@ -38,8 +40,8 @@ | ... | @@ -38,8 +40,8 @@ |
| 38 | v-hasPermi="['system:dictionary:add']"> | 40 | v-hasPermi="['system:dictionary:add']"> |
| 39 | {{ tableName === 'serviceCode' ? '新增父级' : '新增' }} | 41 | {{ tableName === 'serviceCode' ? '新增父级' : '新增' }} |
| 40 | </el-button> | 42 | </el-button> |
| 41 | - <el-button type="primary" icon="el-icon-plus" size="small" @click="addDic({ status: 'allAdd' })" | 43 | + <el-button v-if="tableName != '航线'" type="primary" icon="el-icon-plus" size="small" |
| 42 | - v-hasPermi="['system:dictionary:add']"> | 44 | + @click="addDic({ status: 'allAdd' })" v-hasPermi="['system:dictionary:add']"> |
| 43 | {{ tableName === 'serviceCode' ? '批量新增父级' : '批量新增' }} | 45 | {{ tableName === 'serviceCode' ? '批量新增父级' : '批量新增' }} |
| 44 | </el-button> | 46 | </el-button> |
| 45 | <el-button type="danger" icon="el-icon-delete" size="small" :disabled="nowSelect.length == 0" | 47 | <el-button type="danger" icon="el-icon-delete" size="small" :disabled="nowSelect.length == 0" |
| ... | @@ -48,10 +50,10 @@ | ... | @@ -48,10 +50,10 @@ |
| 48 | </div> | 50 | </div> |
| 49 | </el-form> | 51 | </el-form> |
| 50 | <!-- 表格 --> | 52 | <!-- 表格 --> |
| 51 | - <Tables v-if="tableName != 'serviceCode' && tableName != '虚拟航班'" ductName="dictionary" :selection="true" | 53 | + <Tables v-if="tableName != 'serviceCode' && tableName != '虚拟航班' && tableName != '航线'" ductName="dictionary" |
| 52 | - :selectFixed="false" :order='true' :height="tableHeight" :data="tableData" :headerData="tableHeader" | 54 | + :selection="true" :selectFixed="false" :order='true' :height="tableHeight" :data="tableData" |
| 53 | - :page="selectDict.page" :pageSizes="[20]" :totalCount="total" :loading="loading" | 55 | + :headerData="tableHeader" :page="selectDict.page" :pageSizes="[20]" :totalCount="total" |
| 54 | - @currentChange="currentChange" layout="total,prev, pager, next, jumper, ->" | 56 | + :loading="loading" @currentChange="currentChange" layout="total,prev, pager, next, jumper, ->" |
| 55 | @tableSelect="tableSelection" @tableSelectAll="tableSelectAll"> | 57 | @tableSelect="tableSelection" @tableSelectAll="tableSelectAll"> |
| 56 | <template slot="optionColumn"> | 58 | <template slot="optionColumn"> |
| 57 | <el-table-column label="操作" align="center"> | 59 | <el-table-column label="操作" align="center"> |
| ... | @@ -85,6 +87,28 @@ | ... | @@ -85,6 +87,28 @@ |
| 85 | </el-table-column> | 87 | </el-table-column> |
| 86 | </template> | 88 | </template> |
| 87 | </Tables> | 89 | </Tables> |
| 90 | + <!-- 航线表 --> | ||
| 91 | + <Tables v-else-if="tableName === '航线'" ductName="dictionary" :selection="true" :selectFixed="false" | ||
| 92 | + :order='true' :height="tableHeight" :data="tableData" :headerData="routeTable" :page="selectDict.page" | ||
| 93 | + :pageSizes="[20]" :totalCount="total" :loading="loading" @currentChange="currentChange" | ||
| 94 | + layout="total,prev, pager, next, jumper, ->" @tableSelect="tableSelection" | ||
| 95 | + @tableSelectAll="tableSelectAll"> | ||
| 96 | + <template v-slot:fltNo="scope"> | ||
| 97 | + <el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })"> | ||
| 98 | + {{ | ||
| 99 | + scope.row.fltNo | ||
| 100 | + }}<i class="el-icon-link"></i> </el-link> | ||
| 101 | + </template> | ||
| 102 | + <template slot="optionColumn"> | ||
| 103 | + <el-table-column label="操作" align="center"> | ||
| 104 | + <template slot-scope="scope"> | ||
| 105 | + <el-button size="mini" type="text" style="color:#ff4949" icon="el-icon-delete" | ||
| 106 | + @click="delDict(scope.row)" v-hasPermi="['system:dictionary:delete']">删除 | ||
| 107 | + </el-button> | ||
| 108 | + </template> | ||
| 109 | + </el-table-column> | ||
| 110 | + </template> | ||
| 111 | + </Tables> | ||
| 88 | <!-- serviceCode表格(树形结构) --> | 112 | <!-- serviceCode表格(树形结构) --> |
| 89 | <Tables v-show="tableName === 'serviceCode'" ductName="dictionary" :order='false' :height="tableHeight" | 113 | <Tables v-show="tableName === 'serviceCode'" ductName="dictionary" :order='false' :height="tableHeight" |
| 90 | :data="tableData" :headerData="serviceCodeHeader" :pageSize="selectDict.page" :pageSizes="[20]" | 114 | :data="tableData" :headerData="serviceCodeHeader" :pageSize="selectDict.page" :pageSizes="[20]" |
| ... | @@ -142,7 +166,7 @@ | ... | @@ -142,7 +166,7 @@ |
| 142 | 166 | ||
| 143 | <script> | 167 | <script> |
| 144 | import Dialog from './dialog.vue' | 168 | import Dialog from './dialog.vue' |
| 145 | -import { getDictNameList, getDictionaryList, getServiceCodeList, delServiceCodeCihild, delDict, flightType, delFlight } from '@/api/system/dictionary.js' | 169 | +import { getDictNameList, getDictionaryList, getServiceCodeList, delServiceCodeCihild, delDict, flightType, delFlight, queryRoute, delRoute, checkFlightRoute } from '@/api/system/dictionary.js' |
| 146 | 170 | ||
| 147 | export default { | 171 | export default { |
| 148 | name: 'DictionaryConfig', | 172 | name: 'DictionaryConfig', |
| ... | @@ -159,6 +183,9 @@ export default { | ... | @@ -159,6 +183,9 @@ export default { |
| 159 | },//字典查询条件 | 183 | },//字典查询条件 |
| 160 | tableData: [], | 184 | tableData: [], |
| 161 | tableHeader: this.tableHeaders['dict'],//表头 | 185 | tableHeader: this.tableHeaders['dict'],//表头 |
| 186 | + serviceCodeHeader: this.tableHeaders['dictServiceCode'],//serviceCode主表头 | ||
| 187 | + childrenTableHeader: this.tableHeaders['dictServiceCodeChildren'],//serviceCode子表头 | ||
| 188 | + routeTable: this.tableHeaders['fltRoute'],//航线表头 | ||
| 162 | flightHeader: [ | 189 | flightHeader: [ |
| 163 | { | 190 | { |
| 164 | columnChineseName: "航班号", | 191 | columnChineseName: "航班号", |
| ... | @@ -168,8 +195,6 @@ export default { | ... | @@ -168,8 +195,6 @@ export default { |
| 168 | status: 1 | 195 | status: 1 |
| 169 | } | 196 | } |
| 170 | ],//虚拟航班表头 | 197 | ],//虚拟航班表头 |
| 171 | - serviceCodeHeader: this.tableHeaders['dictServiceCode'],//serviceCode主表头 | ||
| 172 | - childrenTableHeader: this.tableHeaders['dictServiceCodeChildren'],//serviceCode子表头 | ||
| 173 | dictNameList: [],//主表数据 | 198 | dictNameList: [],//主表数据 |
| 174 | addDictionary: {},//选择数据 | 199 | addDictionary: {},//选择数据 |
| 175 | nowSelect: [], | 200 | nowSelect: [], |
| ... | @@ -248,6 +273,22 @@ export default { | ... | @@ -248,6 +273,22 @@ export default { |
| 248 | }).catch(err => { | 273 | }).catch(err => { |
| 249 | console.log(err) | 274 | console.log(err) |
| 250 | }) | 275 | }) |
| 276 | + } else if (this.tableName === '航线') { | ||
| 277 | + let obj = { | ||
| 278 | + fltNo: this.selectDict.flightNo, | ||
| 279 | + page: this.selectDict.page, | ||
| 280 | + size: this.selectDict.size | ||
| 281 | + } | ||
| 282 | + queryRoute(obj).then(res => { | ||
| 283 | + if (res.code === 200) { | ||
| 284 | + this.tableData = res.data.list | ||
| 285 | + this.total = res.data.total | ||
| 286 | + } else { | ||
| 287 | + this.msgWarning(res.msg) | ||
| 288 | + } | ||
| 289 | + }).catch(err => { | ||
| 290 | + console.log(err) | ||
| 291 | + }) | ||
| 251 | } else { | 292 | } else { |
| 252 | getDictionaryList(this.selectDict).then(res => { | 293 | getDictionaryList(this.selectDict).then(res => { |
| 253 | if (res.code === 200) { | 294 | if (res.code === 200) { |
| ... | @@ -284,6 +325,8 @@ export default { | ... | @@ -284,6 +325,8 @@ export default { |
| 284 | this.serviceCodeCihildDel([val.id]) | 325 | this.serviceCodeCihildDel([val.id]) |
| 285 | } else if (this.tableName === '虚拟航班') { | 326 | } else if (this.tableName === '虚拟航班') { |
| 286 | this.flightDel([val.id]) | 327 | this.flightDel([val.id]) |
| 328 | + } else if (this.tableName === '航线') { | ||
| 329 | + this.routeDel({ data: [val], id: [val.id] }) | ||
| 287 | } else { | 330 | } else { |
| 288 | this.dicDel([val.id]) | 331 | this.dicDel([val.id]) |
| 289 | } | 332 | } |
| ... | @@ -298,6 +341,8 @@ export default { | ... | @@ -298,6 +341,8 @@ export default { |
| 298 | this.serviceCodeCihildDel(arr) | 341 | this.serviceCodeCihildDel(arr) |
| 299 | } else if (this.tableName === '虚拟航班') { | 342 | } else if (this.tableName === '虚拟航班') { |
| 300 | this.flightDel(arr) | 343 | this.flightDel(arr) |
| 344 | + } else if (this.tableName === '航线') { | ||
| 345 | + this.routeDel({ data: this.nowSelect, id: arr }) | ||
| 301 | } else { | 346 | } else { |
| 302 | this.dicDel(arr) | 347 | this.dicDel(arr) |
| 303 | } | 348 | } |
| ... | @@ -354,7 +399,7 @@ export default { | ... | @@ -354,7 +399,7 @@ export default { |
| 354 | if (res.code === 200) { | 399 | if (res.code === 200) { |
| 355 | this.msgSuccess(res.msg) | 400 | this.msgSuccess(res.msg) |
| 356 | } else { | 401 | } else { |
| 357 | - this.msgSuccess(res.msg) | 402 | + this.msgWarning(res.msg) |
| 358 | } | 403 | } |
| 359 | this.tableSelect(1) | 404 | this.tableSelect(1) |
| 360 | }).catch(err => { | 405 | }).catch(err => { |
| ... | @@ -362,6 +407,59 @@ export default { | ... | @@ -362,6 +407,59 @@ export default { |
| 362 | }) | 407 | }) |
| 363 | }).catch(() => { }) | 408 | }).catch(() => { }) |
| 364 | }, | 409 | }, |
| 410 | + //航线删除 | ||
| 411 | + routeDel(val) { | ||
| 412 | + this.$confirm("是否要删除记录?", "注意!", { | ||
| 413 | + closeOnClickModal: false, | ||
| 414 | + confirmButtonText: "确定删除", | ||
| 415 | + cancelButtonText: "取消", | ||
| 416 | + type: "warning", | ||
| 417 | + }).then(() => { | ||
| 418 | + let arr = [] | ||
| 419 | + val.data.forEach(item => { | ||
| 420 | + arr.push({ | ||
| 421 | + fltNo: item.fltNo, | ||
| 422 | + route: item.route | ||
| 423 | + }) | ||
| 424 | + }) | ||
| 425 | + checkFlightRoute(arr).then(res => { | ||
| 426 | + if (res.code === 202) { | ||
| 427 | + this.$confirm(res.msg, "注意!", { | ||
| 428 | + closeOnClickModal: false, | ||
| 429 | + confirmButtonText: "确定删除", | ||
| 430 | + cancelButtonText: "取消", | ||
| 431 | + type: "warning", | ||
| 432 | + }).then(() => { | ||
| 433 | + delRoute(val.id).then(res => { | ||
| 434 | + if (res.code === 200) { | ||
| 435 | + this.msgSuccess(res.msg) | ||
| 436 | + } else { | ||
| 437 | + this.msgWarning(res.msg) | ||
| 438 | + } | ||
| 439 | + this.tableSelect(1) | ||
| 440 | + }).catch(err => { | ||
| 441 | + console.log(err) | ||
| 442 | + }) | ||
| 443 | + }).catch() | ||
| 444 | + } else if (res.code === 200) { | ||
| 445 | + delRoute(val.id).then(res => { | ||
| 446 | + if (res.code === 200) { | ||
| 447 | + this.msgSuccess(res.msg) | ||
| 448 | + } else { | ||
| 449 | + this.msgWarning(res.msg) | ||
| 450 | + } | ||
| 451 | + this.tableSelect(1) | ||
| 452 | + }).catch(err => { | ||
| 453 | + console.log(err) | ||
| 454 | + }) | ||
| 455 | + } else { | ||
| 456 | + this.msgWarning(res.msg) | ||
| 457 | + } | ||
| 458 | + }).catch(err => { | ||
| 459 | + console.log(err) | ||
| 460 | + }) | ||
| 461 | + }).catch(() => { }) | ||
| 462 | + }, | ||
| 365 | //切换字典表 | 463 | //切换字典表 |
| 366 | selectChange(val) { | 464 | selectChange(val) { |
| 367 | this.tableName = val | 465 | this.tableName = val | ... | ... |
-
Please register or login to post a comment