Showing
14 changed files
with
744 additions
and
260 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" | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -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 | } | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment