jinhui.wang

ver:1.7,新维度页面增加,增加货站 品名 航班页面,货物查询手动配舱增加航线,首页增加航线。。

1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 2
3 -//目的航班规则接口 3 +//查询航班航线
4 +//查询航线
5 +/**
6 + * @param fltNo 航班号
7 + */
8 +export function queryRouteByFltNo(data) {
9 + return request({
10 + url: '/dictionary/queryRouteByFltNo',
11 + method: 'post',
12 + data: data
13 + })
14 +}
4 15
5 // 查询航班列表 16 // 查询航班列表
6 -export function findFlightNo(query) { 17 +/**
18 + * @param purposeOfFlightNo 航班号
19 + * @param flightDate 航班日期
20 + * @param status 状态
21 + * @param start 开始位置 *
22 + * @param limit 每页长度 *
23 + */
24 +export function findFlightDimRuleByFlightNo(query) {
7 return request({ 25 return request({
8 - url: '/destinationFlight/findFlightNo', 26 + url: '/destinationFlight/findFlightDimRuleByFlightNo',
9 method: 'post', 27 method: 'post',
10 data: query 28 data: query
11 }) 29 })
12 } 30 }
13 31
14 -// id查询目的航班 32 +// 获取航班下航线维度(维度修改)
15 -export function findByFlightId(id) { 33 +/**
16 - const data = { 34 + * @param purposeOfFlightNo 航班号
17 - id 35 + * @param flightDate 航班日期
18 - } 36 + * @param flightRoute 航线
37 + */
38 +export function findDestinationFltRuleByFlightNo(query) {
19 return request({ 39 return request({
20 - url: '/destinationFlight/findByFlightId', 40 + url: '/destinationFlight/findDestinationFltRuleByFlightNo',
21 method: 'post', 41 method: 'post',
22 - data: data 42 + data: query
23 }) 43 })
24 } 44 }
25 45
26 -//航班号查航班 46 +//航班优先级修改
27 -export function findDestinationFltRuleByActualFlight(actualFlight){ 47 +export function batchUpdateOrAddFlight(data) {
28 - const data = {
29 - actualFlight
30 - }
31 return request({ 48 return request({
32 - url:'/sourceFlight/findDestinationFltRuleByActualFlight', 49 + url: '/destinationFlight/batchUpdateOrAddFlight',
33 - method:'post', 50 + method: 'post',
34 - data:data 51 + data: data
35 }) 52 })
36 } 53 }
37 54
38 - 55 +//新增修改规则设置
39 -export function updateOrAddFlight(form){ 56 +export function updateOrAddFlight(form) {
40 - //处理数据
41 - form.typeOfGoods = form.typeOfGoods.join(';');
42 - form.declarationCategory = form.declarationCategory.join(';');
43 - form.serviceCode = form.serviceCode.join(';');
44 - form.subCategory = form.subCategory.join(';');
45 - form.handlingCode = form.handlingCode.join(';');
46 -
47 -
48 return request({ 57 return request({
49 - url:'/destinationFlight/updateOrAddFlight', 58 + url: '/destinationFlight/updateOrAddFlight',
50 method: 'post', 59 method: 'post',
51 - data:form 60 + data: form
52 }) 61 })
53 } 62 }
54 63
55 //删除规则 64 //删除规则
56 -export function delFlightId(id){ 65 +export function delFlightId(id) {
57 const data = { 66 const data = {
58 id 67 id
59 } 68 }
...@@ -65,7 +74,7 @@ export function delFlightId(id){ ...@@ -65,7 +74,7 @@ export function delFlightId(id){
65 } 74 }
66 75
67 //启用/停止规则 76 //启用/停止规则
68 -export function enableOrDisable(id, status){ 77 +export function enableOrDisable(id, status) {
69 //statsu 1-有效 3-停用 78 //statsu 1-有效 3-停用
70 const data = { 79 const data = {
71 id, 80 id,
...@@ -78,43 +87,59 @@ export function enableOrDisable(id, status){ ...@@ -78,43 +87,59 @@ export function enableOrDisable(id, status){
78 }) 87 })
79 } 88 }
80 89
81 - 90 +//获取全部字典
82 -//申报类别 91 +export function allDictData() {
83 -export function cargoTypeData(){
84 return request({ 92 return request({
85 - url: '/destinationFlight/cargoTypeData', 93 + url: '/destinationFlight/allDictData',
86 method: 'post' 94 method: 'post'
87 }) 95 })
88 } 96 }
89 97
90 -//货物类型 98 +//维度航线优先级查询
91 -export function cargoStatusData(){ 99 +/**
100 + * @param fltNo 航班号
101 + * @param routeDate 航班日期
102 + */
103 +export function allRouteQuery(data) {
92 return request({ 104 return request({
93 - url: '/destinationFlight/cargoStatusData', 105 + url: '/specifyDateRoute/query',
94 - method: 'post' 106 + method: 'post',
107 + data: data
95 }) 108 })
96 } 109 }
97 110
98 -//ServiceCode 111 +//维度航线优先级修改
99 -export function serviceCodeData(){ 112 +/**
113 + * @param list 航线排序集合
114 + */
115 +export function saveOrUpdateSpecifyDateRoute(data) {
100 return request({ 116 return request({
101 - url: '/destinationFlight/serviceCodeData', 117 + url: '/specifyDateRoute/saveOrUpdateSpecifyDateRoute',
102 - method: 'post' 118 + method: 'post',
119 + data: data
103 }) 120 })
104 } 121 }
105 122
106 -//SubCategory 123 +// id查询目的航班
107 -export function subCategoryData(){ 124 +export function findByFlightId(id) {
125 + const data = {
126 + id
127 + }
108 return request({ 128 return request({
109 - url: '/destinationFlight/subCategoryData', 129 + url: '/destinationFlight/findByFlightId',
110 - method: 'post' 130 + method: 'post',
131 + data: data
111 }) 132 })
112 } 133 }
113 134
114 -//获取全部字典 135 +//航班号查航班
115 -export function allDictData(){ 136 +export function findDestinationFltRuleByActualFlight(actualFlight) {
116 - return request({ 137 + // const data = {
117 - url: '/destinationFlight/allDictData', 138 + // actualFlight
118 - method: 'post' 139 + // }
119 - }) 140 + // return request({
141 + // url: '/sourceFlight/findDestinationFltRuleByActualFlight',
142 + // method: 'post',
143 + // data: data
144 + // })
120 } 145 }
...\ No newline at end of file ...\ No newline at end of file
......
1 +import request from '@/utils/request'
2 +
3 +//批量导入
4 +export function importGoods(file, type) {
5 + let formData = new FormData();
6 + formData.append("file", file);
7 + formData.append("type", type);
8 + return request({
9 + url: '/goods/importGoods',
10 + method: 'post',
11 + data: formData
12 + })
13 +}
14 +
15 +//批量添加品名货站
16 +/**
17 + * @param goodsStation * 货站名
18 + * @param goodsList * 货品名list
19 + */
20 +export function batchAddGoods(data) {
21 + return request({
22 + url: '/goods/batchAddGoods',
23 + method: 'post',
24 + data: data
25 + })
26 +}
27 +
28 +//批量删除品名货站
29 +/**
30 + * @param idList * id集合
31 + */
32 +export function batchDeleteGoods(data) {
33 + return request({
34 + url: '/goods/batchDeleteGoods',
35 + method: 'post',
36 + data: data
37 + })
38 +}
39 +
40 +//查询品名
41 +/**
42 + * @param page * 页数
43 + * @param size * 页长
44 + * @param goodsStation 货站名
45 + */
46 +export function searchGoods(data) {
47 + return request({
48 + url: '/goods/searchGoods',
49 + method: 'post',
50 + data: data
51 + })
52 +}
...\ No newline at end of file ...\ No newline at end of file
1 +import request from '@/utils/request'
2 +
3 +//查询货站航班
4 +/**
5 + * @param page * 页数
6 + * @param size * 页长
7 + * @param goodsStation 货站名称
8 + */
9 +export function searchStationFlight(data) {
10 + return request({
11 + url: '/stationFlight/searchStationFlight',
12 + method: 'post',
13 + data: data
14 + })
15 +}
16 +
17 +//批量添加货站航班
18 +/**
19 + * @param goodsStation * 货站名称
20 + * @param flightList * 航班号集合
21 + */
22 +export function batchAddStationFlight(data) {
23 + return request({
24 + url: '/stationFlight/batchAddStationFlight',
25 + method: 'post',
26 + data: data
27 + })
28 +}
29 +
30 +//批量删除货站航班
31 +/**
32 + * @param id * id集合
33 + */
34 +export function batchDeleteGoods(data) {
35 + return request({
36 + url: '/stationFlight/batchDeleteGoods',
37 + method: 'post',
38 + data: data
39 + })
40 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -86,7 +86,7 @@ let ductLabels = { ...@@ -86,7 +86,7 @@ let ductLabels = {
86 "2_2": "已处理(数据丢弃)", 86 "2_2": "已处理(数据丢弃)",
87 "2_3": "已处理(数据丢弃)", 87 "2_3": "已处理(数据丢弃)",
88 "2_4": "已处理(数据丢弃)", 88 "2_4": "已处理(数据丢弃)",
89 - "3_1": "已处理(异常处理)", 89 + // "3_1": "已处理(异常处理)",
90 "3_2": "处理失败(系统异常)", 90 "3_2": "处理失败(系统异常)",
91 "3_3": "处理失败(系统异常)", 91 "3_3": "处理失败(系统异常)",
92 "3_4": "处理失败(系统异常)", 92 "3_4": "处理失败(系统异常)",
......
...@@ -32,7 +32,7 @@ let tableHeaders = { ...@@ -32,7 +32,7 @@ let tableHeaders = {
32 }, 32 },
33 { 33 {
34 columnChineseName: "已配体积(m³)", 34 columnChineseName: "已配体积(m³)",
35 - columnName: "allocationVolumn", 35 + columnName: "allocatedVolume",
36 columnWidth: "", 36 columnWidth: "",
37 status: 1 37 status: 1
38 }, 38 },
...@@ -234,6 +234,13 @@ let tableHeaders = { ...@@ -234,6 +234,13 @@ let tableHeaders = {
234 status: 1 234 status: 1
235 }, 235 },
236 { 236 {
237 + columnChineseName: "终配航线",
238 + columnName: "finalFlightRoute",
239 + columnWidth: "140",
240 + ext1: "sorTable",
241 + status: 1,
242 + },
243 + {
237 columnChineseName: "二配航班号", 244 columnChineseName: "二配航班号",
238 columnName: "twoMatchFlightNo", 245 columnName: "twoMatchFlightNo",
239 columnWidth: "120", 246 columnWidth: "120",
...@@ -248,6 +255,13 @@ let tableHeaders = { ...@@ -248,6 +255,13 @@ let tableHeaders = {
248 status: 1 255 status: 1
249 }, 256 },
250 { 257 {
258 + columnChineseName: "二配航线",
259 + columnName: "twoFlightRoute",
260 + columnWidth: "140",
261 + ext1: "sorTable",
262 + status: 1,
263 + },
264 + {
251 columnChineseName: "预配航班号", 265 columnChineseName: "预配航班号",
252 columnName: "preplanFlightNo", 266 columnName: "preplanFlightNo",
253 columnWidth: "120", 267 columnWidth: "120",
...@@ -414,7 +428,7 @@ let tableHeaders = { ...@@ -414,7 +428,7 @@ let tableHeaders = {
414 }, 428 },
415 { 429 {
416 columnChineseName: "航线", 430 columnChineseName: "航线",
417 - columnName: "router", 431 + columnName: "flightRoute",
418 columnWidth: "140", 432 columnWidth: "140",
419 status: 1 433 status: 1
420 }, 434 },
...@@ -976,6 +990,7 @@ let tableHeaders = { ...@@ -976,6 +990,7 @@ let tableHeaders = {
976 columnChineseName: "航班日期", 990 columnChineseName: "航班日期",
977 columnName: "ruleDate", 991 columnName: "ruleDate",
978 columnWidth: "150", 992 columnWidth: "150",
993 + ext1: 'slot',
979 status: 1 994 status: 1
980 }, 995 },
981 { 996 {
...@@ -1135,7 +1150,7 @@ let tableHeaders = { ...@@ -1135,7 +1150,7 @@ let tableHeaders = {
1135 }, 1150 },
1136 { 1151 {
1137 columnChineseName: "当前配载航线", 1152 columnChineseName: "当前配载航线",
1138 - columnName: "flightRoute", 1153 + columnName: "currentFlightRoute",
1139 columnWidth: "130", 1154 columnWidth: "130",
1140 status: 1 1155 status: 1
1141 }, 1156 },
...@@ -1268,7 +1283,7 @@ let tableHeaders = { ...@@ -1268,7 +1283,7 @@ let tableHeaders = {
1268 { 1283 {
1269 columnChineseName: "申报类别", 1284 columnChineseName: "申报类别",
1270 columnName: "declarationCategory", 1285 columnName: "declarationCategory",
1271 - columnWidth: "100", 1286 + columnWidth: "80",
1272 status: 1 1287 status: 1
1273 }, 1288 },
1274 { 1289 {
...@@ -1280,13 +1295,13 @@ let tableHeaders = { ...@@ -1280,13 +1295,13 @@ let tableHeaders = {
1280 { 1295 {
1281 columnChineseName: "增加重量", 1296 columnChineseName: "增加重量",
1282 columnName: "increaseWeight", 1297 columnName: "increaseWeight",
1283 - columnWidth: "100", 1298 + columnWidth: "90",
1284 status: 1 1299 status: 1
1285 }, 1300 },
1286 { 1301 {
1287 columnChineseName: "减轻重量", 1302 columnChineseName: "减轻重量",
1288 columnName: "reduceWeight", 1303 columnName: "reduceWeight",
1289 - columnWidth: "100", 1304 + columnWidth: "90",
1290 status: 1 1305 status: 1
1291 }, 1306 },
1292 { 1307 {
...@@ -1385,6 +1400,185 @@ let tableHeaders = { ...@@ -1385,6 +1400,185 @@ let tableHeaders = {
1385 status: 1 1400 status: 1
1386 }, 1401 },
1387 ], 1402 ],
1403 + //货站-品名
1404 + "goodsStation": [
1405 + {
1406 + columnChineseName: "口岸",
1407 + columnName: "portName",
1408 + columnWidth: "",
1409 + ext1: "",
1410 + status: 1
1411 + },
1412 + {
1413 + columnChineseName: "货站名称",
1414 + columnName: "goodsStation",
1415 + columnWidth: "",
1416 + ext1: "",
1417 + status: 1
1418 + },
1419 + {
1420 + columnChineseName: "品名",
1421 + columnName: "goodsName",
1422 + columnWidth: "",
1423 + ext1: "",
1424 + status: 1
1425 + },
1426 + {
1427 + columnChineseName: "操作人",
1428 + columnName: "updateUserName",
1429 + columnWidth: "",
1430 + ext1: "",
1431 + status: 1
1432 + },
1433 + {
1434 + columnChineseName: "操作时间",
1435 + columnName: "updateTime",
1436 + columnWidth: "",
1437 + ext1: "",
1438 + status: 1
1439 + },
1440 + {
1441 + columnChineseName: "创建日期",
1442 + columnName: "createTime",
1443 + columnWidth: "",
1444 + ext1: "",
1445 + status: 1
1446 + },
1447 + ],
1448 + //货站-航班
1449 + "goodsStationFlight": [
1450 + {
1451 + columnChineseName: "口岸",
1452 + columnName: "portName",
1453 + columnWidth: "",
1454 + ext1: "",
1455 + status: 1
1456 + },
1457 + {
1458 + columnChineseName: "货站名称",
1459 + columnName: "goodsStation",
1460 + columnWidth: "",
1461 + ext1: "",
1462 + status: 1
1463 + },
1464 + {
1465 + columnChineseName: "航班号",
1466 + columnName: "fltNo",
1467 + columnWidth: "",
1468 + ext1: "",
1469 + status: 1
1470 + },
1471 + {
1472 + columnChineseName: "操作人",
1473 + columnName: "updateUserName",
1474 + columnWidth: "",
1475 + ext1: "",
1476 + status: 1
1477 + },
1478 + {
1479 + columnChineseName: "操作时间",
1480 + columnName: "updateTime",
1481 + columnWidth: "",
1482 + ext1: "",
1483 + status: 1
1484 + },
1485 + {
1486 + columnChineseName: "创建日期",
1487 + columnName: "createTime",
1488 + columnWidth: "",
1489 + ext1: "",
1490 + status: 1
1491 + },
1492 + ],
1493 + //特殊配舱规则
1494 + "superAllocation": [
1495 + {
1496 + columnChineseName: "ShipperAccount",
1497 + columnName: "shipperAccount",
1498 + columnWidth: "",
1499 + ext1: "",
1500 + status: 1
1501 + },
1502 + {
1503 + columnChineseName: "原航班",
1504 + columnName: "accsFlightNo",
1505 + columnWidth: "150",
1506 + ext1: "",
1507 + status: 1
1508 + },
1509 + {
1510 + columnChineseName: "操作人",
1511 + columnName: "updateUserName",
1512 + columnWidth: "100",
1513 + ext1: "",
1514 + status: 1
1515 + },
1516 + {
1517 + columnChineseName: "操作时间",
1518 + columnName: "updateTime",
1519 + columnWidth: "200",
1520 + ext1: "",
1521 + status: 1
1522 + },
1523 + ],
1524 + "newSuperAllocation": [
1525 + {
1526 + columnChineseName: "航班日期",
1527 + columnName: "",
1528 + columnWidth: "",
1529 + ext1: "",
1530 + status: 1
1531 + },
1532 + {
1533 + columnChineseName: "航班号",
1534 + columnName: "",
1535 + columnWidth: "",
1536 + ext1: "",
1537 + status: 1
1538 + },
1539 + {
1540 + columnChineseName: "航线",
1541 + columnName: "",
1542 + columnWidth: "",
1543 + ext1: "",
1544 + status: 1
1545 + },
1546 + {
1547 + columnChineseName: "URSA",
1548 + columnName: "",
1549 + columnWidth: "",
1550 + ext1: "",
1551 + status: 1
1552 + },
1553 + {
1554 + columnChineseName: "申报类型",
1555 + columnName: "",
1556 + columnWidth: "",
1557 + ext1: "",
1558 + status: 1
1559 + },
1560 + {
1561 + columnChineseName: "服务类型",
1562 + columnName: "",
1563 + columnWidth: "",
1564 + ext1: "",
1565 + status: 1
1566 + },
1567 + {
1568 + columnChineseName: "预留仓位",
1569 + columnName: "",
1570 + columnWidth: "",
1571 + ext1: "",
1572 + status: 1
1573 + },
1574 + {
1575 + columnChineseName: "已配仓位",
1576 + columnName: "",
1577 + columnWidth: "",
1578 + ext1: "",
1579 + status: 1
1580 + },
1581 + ]
1388 } 1582 }
1389 1583
1390 export default tableHeaders; 1584 export default tableHeaders;
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -294,6 +294,17 @@ body { ...@@ -294,6 +294,17 @@ body {
294 max-width: 300px; 294 max-width: 300px;
295 } 295 }
296 296
297 +.backgroundCollapse {
298 + .el-collapse-item__header {
299 + background-color: #d9ecff !important;
300 + border-bottom: 1px solid #ccc;
301 + }
302 +}
303 +
304 +.numberInput {
305 + width: 100% !important;
306 +}
307 +
297 .el-select-dropdown__wrap { 308 .el-select-dropdown__wrap {
298 max-height: 350px !important; 309 max-height: 350px !important;
299 } 310 }
...\ No newline at end of file ...\ No newline at end of file
......
1 <template> 1 <template>
2 <el-breadcrumb class="app-breadcrumb" separator="/"> 2 <el-breadcrumb class="app-breadcrumb" separator="/">
3 <transition-group name="breadcrumb"> 3 <transition-group name="breadcrumb">
4 - <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path"> 4 + <el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
5 - <span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span> 5 + <span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title
6 + }}</span>
6 <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a> 7 <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
7 </el-breadcrumb-item> 8 </el-breadcrumb-item>
8 </transition-group> 9 </transition-group>
...@@ -35,9 +36,9 @@ export default { ...@@ -35,9 +36,9 @@ export default {
35 const first = matched[0] 36 const first = matched[0]
36 37
37 if (!this.isDashboard(first)) { 38 if (!this.isDashboard(first)) {
38 - matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched) 39 + matched = [{ path: '/index', meta: { title: '首页' } }].concat(matched)
39 } 40 }
40 - 41 +
41 42
42 this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) 43 this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
43 }, 44 },
...@@ -46,7 +47,7 @@ export default { ...@@ -46,7 +47,7 @@ export default {
46 if (!name) { 47 if (!name) {
47 return false 48 return false
48 } 49 }
49 - return name.trim() === '首页' 50 + return name.trim() === 'Index'
50 }, 51 },
51 handleLink(item) { 52 handleLink(item) {
52 const { redirect, path } = item 53 const { redirect, path } = item
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
19 export default { 19 export default {
20 name: 'Toolbar', 20 name: 'Toolbar',
21 props: { 21 props: {
22 - data: { 22 + routes: {
23 type: Array, 23 type: Array,
24 default: null 24 default: null
25 }, 25 },
...@@ -35,12 +35,12 @@ export default { ...@@ -35,12 +35,12 @@ export default {
35 } 35 }
36 }, 36 },
37 created() { 37 created() {
38 - this.list = this.data 38 + this.list = this.routes
39 }, 39 },
40 watch: { 40 watch: {
41 - data(val) { 41 + routes(val) {
42 if (val) { 42 if (val) {
43 - this.list = this.data 43 + this.list = val
44 } 44 }
45 } 45 }
46 }, 46 },
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
81 .container { 81 .container {
82 max-width: 350px; 82 max-width: 350px;
83 min-height: 32px; 83 min-height: 32px;
84 - max-height: 150px; 84 + // max-height: 150px;
85 overflow-y: scroll; 85 overflow-y: scroll;
86 display: flex; 86 display: flex;
87 flex-direction: column; 87 flex-direction: column;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 <i slot="suffix" class="el-icon-search el-input__icon" /> 5 <i slot="suffix" class="el-icon-search el-input__icon" />
6 </el-input> 6 </el-input>
7 <div class="icon-list"> 7 <div class="icon-list">
8 - <div v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)"> 8 + <div :class="name == item?'selectIcon':''" v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)">
9 <svg-icon :icon-class="item" style="height: 30px;width: 16px;" /> 9 <svg-icon :icon-class="item" style="height: 30px;width: 16px;" />
10 <span>{{ item }}</span> 10 <span>{{ item }}</span>
11 </div> 11 </div>
...@@ -31,6 +31,7 @@ export default { ...@@ -31,6 +31,7 @@ export default {
31 } 31 }
32 }, 32 },
33 selectedIcon(name) { 33 selectedIcon(name) {
34 + this.name = name
34 this.$emit('selected', name) 35 this.$emit('selected', name)
35 document.body.click() 36 document.body.click()
36 }, 37 },
...@@ -65,4 +66,7 @@ export default { ...@@ -65,4 +66,7 @@ export default {
65 } 66 }
66 } 67 }
67 } 68 }
69 + .selectIcon{
70 + border:1px solid #ccc;
71 + }
68 </style> 72 </style>
......
1 <template> 1 <template>
2 <div class="top-right-btn"> 2 <div class="top-right-btn">
3 <el-row> 3 <el-row>
4 - <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> 4 + <el-tooltip
5 - <el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()" /> 5 + class="item"
6 + effect="dark"
7 + :content="showSearch ? '隐藏搜索' : '显示搜索'"
8 + placement="top"
9 + >
10 + <el-button
11 + :size="size"
12 + circle
13 + icon="el-icon-search"
14 + @click="toggleSearch()"
15 + />
6 </el-tooltip> 16 </el-tooltip>
7 <el-tooltip class="item" effect="dark" content="刷新" placement="top"> 17 <el-tooltip class="item" effect="dark" content="刷新" placement="top">
8 - <el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" /> 18 + <el-button
19 + :size="size"
20 + circle
21 + icon="el-icon-refresh"
22 + @click="refresh()"
23 + />
9 </el-tooltip> 24 </el-tooltip>
10 - <el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns"> 25 + <el-tooltip
11 - <el-button size="mini" circle icon="el-icon-menu" @click="showColumn()" /> 26 + class="item"
27 + effect="dark"
28 + content="显隐列"
29 + placement="top"
30 + v-if="columns"
31 + >
32 + <el-button
33 + :size="size"
34 + circle
35 + icon="el-icon-menu"
36 + @click="showColumn()"
37 + />
12 </el-tooltip> 38 </el-tooltip>
13 </el-row> 39 </el-row>
14 <el-dialog :title="title" :visible.sync="open" append-to-body> 40 <el-dialog :title="title" :visible.sync="open" append-to-body>
...@@ -42,6 +68,10 @@ export default { ...@@ -42,6 +68,10 @@ export default {
42 columns: { 68 columns: {
43 type: Array, 69 type: Array,
44 }, 70 },
71 + size: {
72 + type: String,
73 + default: "mini",
74 + },
45 }, 75 },
46 created() { 76 created() {
47 // 显隐列初始默认隐藏列 77 // 显隐列初始默认隐藏列
......
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
6 :style="activeStyle(tag)" @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''" 6 :style="activeStyle(tag)" @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''"
7 @contextmenu.prevent.native="openMenu(tag, $event)"> 7 @contextmenu.prevent.native="openMenu(tag, $event)">
8 {{ tag.title }} 8 {{ tag.title }}
9 - <span 9 + <span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
10 - v-if="tag.name != 'FlightAllocConfigAdd' && tag.name != 'FlightAllocConfigInfo' && tag.name != 'weatherTable' && !isAffix(tag)"
11 - class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
12 </router-link> 10 </router-link>
13 </scroll-pane> 11 </scroll-pane>
14 <ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu"> 12 <ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
......
...@@ -73,19 +73,13 @@ export const constantRoutes = [ ...@@ -73,19 +73,13 @@ export const constantRoutes = [
73 hidden: true, 73 hidden: true,
74 children: [ 74 children: [
75 { 75 {
76 - path: '/info/:handle/:id', 76 + path: '/info/:handle/:fltNo-:fltDate',
77 component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve), 77 component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
78 name: 'FlightAllocConfigInfo', 78 name: 'FlightAllocConfigInfo',
79 meta: { title: '航班配舱', icon: 'user' } 79 meta: { title: '航班配舱', icon: 'user' }
80 }, 80 },
81 { 81 {
82 - path: '/info/:handle', 82 + path: '/weatherTable/:awbNbr',
83 - component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
84 - name: 'FlightAllocConfigAdd',
85 - meta: { title: '新增配舱', icon: 'user' }
86 - },
87 - {
88 - path: '/weatherTable',
89 component: (resolve) => require(['@/views/systemLog/dmLog/weatherTable'], resolve), 83 component: (resolve) => require(['@/views/systemLog/dmLog/weatherTable'], resolve),
90 name: 'weatherTable', 84 name: 'weatherTable',
91 meta: { title: '流水表', icon: 'user' } 85 meta: { title: '流水表', icon: 'user' }
......
...@@ -58,5 +58,5 @@ module.exports = { ...@@ -58,5 +58,5 @@ module.exports = {
58 /** 58 /**
59 * 版本号 59 * 版本号
60 */ 60 */
61 - version: 'version:1.6.0' 61 + version: 'version:1.7.0'
62 } 62 }
......
...@@ -178,12 +178,12 @@ ...@@ -178,12 +178,12 @@
178 <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" 178 <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
179 v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading" 179 v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading"
180 :disabled="tableData.length <= 0">{{ 180 :disabled="tableData.length <= 0">{{
181 - downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果" 181 + downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
182 }}</el-button> 182 }}</el-button>
183 <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" 183 <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
184 v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading" 184 v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading"
185 :disabled="tableData.length <= 0">{{ 185 :disabled="tableData.length <= 0">{{
186 - downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果" 186 + downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
187 }}</el-button> 187 }}</el-button>
188 <el-button type="primary" size="mini" v-hasPermi="['allocation:cargo:allocation']" @click="addFit" 188 <el-button type="primary" size="mini" v-hasPermi="['allocation:cargo:allocation']" @click="addFit"
189 :disabled="tableSelection.length <= 0">添加到航班</el-button> 189 :disabled="tableSelection.length <= 0">添加到航班</el-button>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
15 style="width: 400px; margin: 30px auto" :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 class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="10" 17 <el-input class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="10"
18 - style="width: 350px"></el-input> 18 + style="width: 350px" @change="dateChange"></el-input>
19 </el-form-item> 19 </el-form-item>
20 <el-form-item label="航班日期:" prop="fltDate"> 20 <el-form-item label="航班日期:" prop="fltDate">
21 <el-date-picker class="formItem" v-model="formData.fltDate" type="date" placeholder="选择日期" 21 <el-date-picker class="formItem" v-model="formData.fltDate" type="date" placeholder="选择日期"
...@@ -200,23 +200,32 @@ export default { ...@@ -200,23 +200,32 @@ export default {
200 }, 200 },
201 //日期选择变化 201 //日期选择变化
202 dateChange(val) { 202 dateChange(val) {
203 - let obj = { 203 + this.routeList = []
204 - fltNo: this.formData.fltNo, 204 + if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') {
205 - fltDate: val 205 + if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') {
206 - } 206 + let obj = {
207 - findFlightRoute(obj).then(res => { 207 + fltNo: this.formData.fltNo,
208 - if (res.code === 200) { 208 + fltDate: this.formData.fltDate,
209 - res.data[0].route.indexOf(';') <= 0 ? 209 + }
210 - this.routeList = res.data : 210 + findFlightRoute(obj).then(res => {
211 - res.data[0].route.split(';').forEach(item => { 211 + if (res.code === 200) {
212 - this.routeList.push({ id: res.data[0].id, route: item }) 212 + res.data[0].route.indexOf(';') <= 0 ?
213 - }) 213 + this.routeList = res.data :
214 + res.data[0].route.split(';').forEach(item => {
215 + this.routeList.push({ id: res.data[0].id, route: item })
216 + })
217 + } else {
218 + this.msgWarning(res.msg)
219 + }
220 + }).catch(err => {
221 + console.log(err)
222 + })
214 } else { 223 } else {
215 - this.msgWarning(res.msg) 224 + this.msgWarning('航班日期不能为空')
216 } 225 }
217 - }).catch(err => { 226 + } else {
218 - console.log(err) 227 + this.msgWarning('航班号不能为空')
219 - }) 228 + }
220 } 229 }
221 }, 230 },
222 computed: { 231 computed: {
...@@ -233,4 +242,5 @@ export default { ...@@ -233,4 +242,5 @@ export default {
233 </script> 242 </script>
234 243
235 <style> 244 <style>
245 +
236 </style> 246 </style>
...\ No newline at end of file ...\ No newline at end of file
......
1 +<template>
2 + <div>
3 + <el-dialog title="航线优先级排序" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
4 + append-to-body center>
5 + <el-form ref="routeOrder" label-width="auto" label-position="left" size="small" @submit.native.prevent>
6 + <el-form-item label="航班号:" prop="fltNo">
7 + <span>{{ fltNo }}</span>
8 + </el-form-item>
9 + <el-form-item label="航班日期:" prop="fltDate">
10 + <span>{{ fltDate }}</span>
11 + </el-form-item>
12 + <el-form-item label="航线优先级" prop="route">
13 + <Drag :routes="routeList" @drag="drag"></Drag>
14 + </el-form-item>
15 + </el-form>
16 + <div slot="footer" class="dialog-footer">
17 + <el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
18 + <el-button @click="close">取 消</el-button>
19 + </div>
20 + </el-dialog>
21 + </div>
22 +</template>
23 +
24 +<script>
25 +import { allRouteQuery, saveOrUpdateSpecifyDateRoute } from "@/api/destinationFlight";
26 +
27 +export default {
28 + name: "",
29 + props: {
30 + open: {
31 + type: Boolean,
32 + default: false
33 + },
34 + fltData: {
35 + type: Object,
36 + default: null
37 + }
38 + },
39 + data() {
40 + return {
41 + fltNo: '',
42 + fltDate: '',
43 + routeList: [],
44 + submitData: [],
45 + loading: false
46 + }
47 + },
48 + watch: {
49 + open(val) {
50 + if (val) {
51 + this.fltNo = this.fltData.fltNo
52 + this.fltDate = this.fltData.fltDate
53 + allRouteQuery({
54 + fltNo: this.fltNo,
55 + routeDate: this.fltDate
56 + }).then(res => {
57 + if (res.code === 200) {
58 + this.routeList = res.data.list
59 + this.submitData = res.data.list
60 + } else {
61 + this.msgWarning(res.msg)
62 + }
63 + }).catch(err => {
64 + console.log(err)
65 + })
66 + }
67 + }
68 + },
69 + methods: {
70 + submit() {
71 + saveOrUpdateSpecifyDateRoute(this.submitData).then(res => {
72 + if (res.code === 200) {
73 + this.msgSuccess('保存成功')
74 + this.close()
75 + } else {
76 + this.msgWarning(res.msg)
77 + }
78 + }).catch(err => {
79 + console.log(err)
80 + })
81 + },
82 + close() {
83 + this.$emit('close')
84 + },
85 + drag(val) {
86 + val.forEach((item, index) => {
87 + item.ordinal = index + 1
88 + })
89 + this.submitData = val
90 + }
91 + }
92 +}
93 +
94 +</script>
95 +
96 +<style lang="scss" scoped>
97 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 <template> 1 <template>
2 <div> 2 <div>
3 <el-form ref="flightAllocForm" :inline="true" :model="queryParams" class="form-header" size="medium" 3 <el-form ref="flightAllocForm" :inline="true" :model="queryParams" class="form-header" size="medium"
4 - label-position="right" label-width="auto"> 4 + label-position="right" label-width="auto" @submit.native.prevent>
5 <el-form-item label="航班号"> 5 <el-form-item label="航班号">
6 <el-input v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList"></el-input> 6 <el-input v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList"></el-input>
7 </el-form-item> 7 </el-form-item>
8 + <el-form-item label="航班日期">
9 + <el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期"
10 + value-format="yyyy-MM-dd" clearable>
11 + </el-date-picker>
12 + </el-form-item>
8 <el-form-item label="状态"> 13 <el-form-item label="状态">
9 <el-select v-model="queryParams.status" placeholder="状态"> 14 <el-select v-model="queryParams.status" placeholder="状态">
10 <el-option label="有效" value="1"></el-option> 15 <el-option label="有效" value="1"></el-option>
...@@ -18,8 +23,8 @@ ...@@ -18,8 +23,8 @@
18 <el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']" 23 <el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']"
19 @click=" 24 @click="
20 $router.push({ 25 $router.push({
21 - name: 'FlightAllocConfigAdd', 26 + name: 'FlightAllocConfigInfo',
22 - params: { handle: 'add' }, 27 + params: { handle: 'add', fltNo: 'new', fltDate: ' ',status:null },
23 }) 28 })
24 ">添加</el-button> 29 ">添加</el-button>
25 </div> 30 </div>
...@@ -28,47 +33,61 @@ ...@@ -28,47 +33,61 @@
28 :order="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limit" 33 :order="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limit"
29 :limitStart="queryParams.start" :page="curPage" :pageSizes="[20]" :height="tableHeight" 34 :limitStart="queryParams.start" :page="curPage" :pageSizes="[20]" :height="tableHeight"
30 @currentChange="currentChange"> 35 @currentChange="currentChange">
36 + <template v-slot:ruleDate="scope">
37 + <el-link v-if="scope.row.ruleDate" type="primary" @click="toRouteOrder(scope.row)">
38 + {{
39 + scope.row.ruleDate
40 + }}<i class="el-icon-link"></i> </el-link>
41 + </template>
31 <template slot="optionColumn"> 42 <template slot="optionColumn">
32 - <el-table-column label="操作" prop="id" align="center"> 43 + <el-table-column label="操作" align="center" width="150">
33 <template slot-scope="scope"> 44 <template slot-scope="scope">
34 - <el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row.id, 'detail')">查看 45 + <el-button type="text" size="mini" icon="el-icon-view"
46 + @click="handleClick(scope.row.purposeOfFlightNo, 'detail', scope.row.ruleDate, scope.row.status)">查看
35 </el-button> 47 </el-button>
36 <el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']" 48 <el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']"
37 - @click="handleClick(scope.row.id, 'update')">修改</el-button> 49 + @click="handleClick(scope.row.purposeOfFlightNo, 'update', scope.row.ruleDate, scope.row.status)">修改
38 - <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949" 50 + </el-button>
51 + <!-- <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949"
39 v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button> 52 v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button>
40 <el-button type="text" size="mini" icon="el-icon-video-pause" v-hasPermi="['allocation:alloc:openClose']" 53 <el-button type="text" size="mini" icon="el-icon-video-pause" v-hasPermi="['allocation:alloc:openClose']"
41 @click="changeStatus(scope.row.id, 3)" v-if="scope.row.status == '1'">停用</el-button> 54 @click="changeStatus(scope.row.id, 3)" v-if="scope.row.status == '1'">停用</el-button>
42 <el-button type="text" size="mini" icon="el-icon-video-play" v-hasPermi="['allocation:alloc:openClose']" 55 <el-button type="text" size="mini" icon="el-icon-video-play" v-hasPermi="['allocation:alloc:openClose']"
43 - @click="changeStatus(scope.row.id, 1)" v-else>启用</el-button> 56 + @click="changeStatus(scope.row.id, 1)" v-else>启用</el-button> -->
44 </template> 57 </template>
45 </el-table-column> 58 </el-table-column>
46 </template> 59 </template>
47 </Tables> 60 </Tables>
61 + <Dialog :fltData="colData" :open="open" @close="close"></Dialog>
48 </div> 62 </div>
49 </template> 63 </template>
50 64
51 <script> 65 <script>
52 import { 66 import {
53 - findFlightNo, 67 + findFlightDimRuleByFlightNo
54 - delFlightId,
55 - enableOrDisable,
56 } from "@/api/destinationFlight"; 68 } from "@/api/destinationFlight";
69 +import Dialog from './dialog.vue'
57 70
58 export default { 71 export default {
59 name: "FlightAllocConfig", 72 name: "FlightAllocConfig",
73 + components: {
74 + Dialog
75 + },
60 data() { 76 data() {
61 return { 77 return {
62 queryParams: { 78 queryParams: {
63 - purposeOfFlightNo: "", 79 + purposeOfFlightNo: null,
80 + flightDate: undefined,
64 status: "1", 81 status: "1",
65 start: 0, 82 start: 0,
66 limit: 20, 83 limit: 20,
67 }, 84 },
68 flyList: [], 85 flyList: [],
86 + colData: {},
69 curPage: 1, 87 curPage: 1,
70 total: 0, 88 total: 0,
71 tableHeight: null, 89 tableHeight: null,
90 + open: false,
72 loading: false, 91 loading: false,
73 }; 92 };
74 }, 93 },
...@@ -94,66 +113,36 @@ export default { ...@@ -94,66 +113,36 @@ export default {
94 this.queryParams.start = 0; 113 this.queryParams.start = 0;
95 } 114 }
96 this.loading = true; 115 this.loading = true;
97 - findFlightNo(this.queryParams).then((response) => { 116 + findFlightDimRuleByFlightNo(this.queryParams).then(res => {
98 - if (response.code != 200) { 117 + this.loading = false
99 - this.msgWarning(response.msg) 118 + if (res.code === 200) {
100 - return; 119 + this.flyList = res.data.list
120 + this.total = res.data.totalCount
121 + } else {
122 + this.msgWarning(res.msg)
101 } 123 }
102 - this.flyList = response.data.list; 124 + }).catch(err => {
103 - this.total = response.data.totalCount; 125 + this.loading = false
104 - this.loading = false; 126 + console.log(err)
105 - }); 127 + })
106 }, 128 },
107 //跳转到查看,修改页面 129 //跳转到查看,修改页面
108 - handleClick(flightiId, handle) { 130 + handleClick(fltNo, handle, fltDate, status) {
109 this.$router.push({ 131 this.$router.push({
110 name: "FlightAllocConfigInfo", 132 name: "FlightAllocConfigInfo",
111 - params: { handle: handle, id: flightiId }, 133 + params: { handle: handle, fltNo: fltNo, fltDate: fltDate ? fltDate : null, status: status },
112 }); 134 });
113 }, 135 },
114 - //删除规则 136 + //航班优先级修改
115 - del(id, status) { 137 + toRouteOrder(val) {
116 - if (status == "1") { 138 + this.colData = {
117 - this.$confirm("航班规则生效中,无法删除,请停用后再操作", "警告", { 139 + fltNo: val.purposeOfFlightNo,
118 - confirmButtonText: "确定", 140 + fltDate: val.ruleDate
119 - showCancelButton: false,
120 - type: "warning",
121 - });
122 - } else {
123 - this.$confirm("是否确认删除此航班规则?", "警告", {
124 - confirmButtonText: "确定",
125 - cancelButtonText: "取消",
126 - showCancelButton: true,
127 - type: "warning",
128 - }).then(() => {
129 - delFlightId(id)
130 - .then((res) => {
131 - res.code === 200 ? this.msgSuccess(res.msg) : this.msgWarning(res.msg)
132 - this.getList()
133 - })
134 - .catch(() => { });
135 - });
136 } 141 }
142 + this.open = true
137 }, 143 },
138 - //启用,停用 144 + close() {
139 - changeStatus(id, status) { 145 + this.open = false
140 - let tip = status === 1 ? "启用" : "停用";
141 - this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
142 - confirmButtonText: "确定",
143 - cancelButtonText: "取消",
144 - type: "warning",
145 - }).then(() => {
146 - enableOrDisable(id, status)
147 - .then((res) => {
148 - if (res.code != 200) {
149 - this.msgError(res.msg);
150 - } else {
151 - this.getList();
152 - this.msgSuccess(tip + "成功");
153 - }
154 - })
155 - .catch(() => { });
156 - });
157 }, 146 },
158 //翻页 147 //翻页
159 currentChange(val) { 148 currentChange(val) {
......
1 <template> 1 <template>
2 - <div style="margin: 40px" v-loading="loading"> 2 + <div style="padding:20px;min-height: 300px;">
3 - <div v-if="isEmpty"> 3 + <el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button>
4 - <el-empty description="找不到这条数据!"></el-empty> 4 + <!-- 空状态 -->
5 - <el-button size="small" @click="close">返回</el-button> 5 + <div v-if="isEmpty">
6 - </div> 6 + <el-empty description="未查询到数据!"></el-empty>
7 - <template v-else> 7 + </div>
8 - <el-form ref="form" :model="form" label-width="200px" size="small" :disabled="disable" :rules="rules"> 8 + <el-form v-else ref="infoForm" :model="infoForm" label-position="right" label-width="120px" size="small"
9 - <el-row :gutter="20"> 9 + :disabled="disabled" :rules="rules" @submit.native.prevent>
10 - <el-col :span="12"> 10 + <!-- 表头设置 -->
11 - <el-form-item label="航班号" prop="purposeOfFlightNo"> 11 + <el-row class="mb20">
12 - <el-input v-model.trim="form.purposeOfFlightNo" maxlength="10" style="width: 60%" 12 + <el-col :span="6">
13 - :disabled="nameDisabled"></el-input> 13 + <el-form-item label="航班号" prop="fltNo">
14 - </el-form-item> 14 + <el-input v-model.tirm="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled">
15 - </el-col> 15 + </el-input>
16 - </el-row> 16 + </el-form-item>
17 - <el-form-item>
18 - <el-row :gutter="20">
19 - <el-col :span="6">
20 - <el-radio v-model="isLocation" label="1" size="mini">站点包含</el-radio>
21 - <el-radio v-model="isLocation" label="2" size="mini">站点不包含</el-radio>
22 - </el-col>
23 - </el-row>
24 - </el-form-item>
25 - <el-form-item label="站点包含" v-show="isLocation == 1">
26 - <el-input type="textarea" v-model="form.location" :rows="6" resize="none" style="width: 600px"
27 - placeholder="站点之间用回车符分隔"></el-input>
28 - </el-form-item>
29 - <el-form-item label="站点不包含" v-show="isLocation == 2">
30 - <el-input type="textarea" v-model="form.notLocation" :rows="6" resize="none" style="width: 600px"
31 - placeholder="站点之间用回车符分隔"></el-input>
32 - </el-form-item>
33 - <el-row :gutter="20">
34 - <el-col :span="10">
35 - <el-form-item label="URSA包含" prop="includeUrsa">
36 - <el-input type="textarea" v-model="form.includeUrsa" :rows="6" resize="none"
37 - placeholder="URSA之间用分号分隔,例:F2;F3;P_"></el-input>
38 - </el-form-item>
39 - </el-col>
40 - <el-col :span="10">
41 - <el-form-item label="URSA不包含" prop="notIncludeUrsa">
42 - <el-input type="textarea" v-model="form.notIncludeUrsa" :rows="6" resize="none"
43 - placeholder="URSA之间用分号分隔,例:F2;F3;P_"></el-input>
44 - </el-form-item>
45 - </el-col>
46 - </el-row>
47 - <el-form-item label="件数">
48 - <el-col :span="3">
49 - <el-input class="numberInput" v-model.trim="minNumOfPieces"></el-input>
50 - </el-col>
51 - <el-col style="text-align: center" :span="1">-</el-col>
52 - <el-col :span="3">
53 - <el-input class="numberInput" v-model.trim="maxNumOfPieces"></el-input>
54 - </el-col>
55 - </el-form-item>
56 - <el-form-item label="重量">
57 - <el-col :span="3">
58 - <el-input class="numberInput" v-model.trim="minWeight"></el-input>
59 - </el-col>
60 - <el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
61 - <el-col style="text-align: center" :span="1">-</el-col>
62 - <el-col :span="3">
63 - <el-input class="numberInput" v-model.trim="maxWeight"></el-input>
64 - </el-col>
65 - <el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
66 - </el-form-item>
67 - <el-form-item label="申报类别">
68 - <el-card shadow="never" style="width: 80%">
69 - <el-checkbox-group v-model="form.typeOfGoods">
70 - <el-row>
71 - <el-col :span="2" v-for="item in cargoType" :key="item.id">
72 - <el-checkbox v-if="item.status === 1" :label="item.chineseName" :name="item.chineseName">
73 - </el-checkbox>
74 - </el-col>
75 - </el-row>
76 - </el-checkbox-group>
77 - </el-card>
78 - </el-form-item>
79 - <el-form-item label="货物类型">
80 - <el-card shadow="never" style="width: 80%">
81 - <el-checkbox-group v-model="form.declarationCategory">
82 - <el-row>
83 - <el-col :span="3" v-for="item in cargoStatus" :key="item.id">
84 - <el-checkbox v-if="item.status === 1" :label="item.chineseName" :name="item.chineseName" disabled>
85 - </el-checkbox>
86 </el-col> 17 </el-col>
87 - </el-row> 18 + <el-col :span="6" v-if="infoForm.fltDate != null">
88 - </el-checkbox-group> 19 + <el-form-item label="航班日期" prop="fltDate">
89 - </el-card> 20 + <el-date-picker class="wid80" v-model="infoForm.fltDate" size="small" type="date"
90 - </el-form-item> 21 + value-format="yyyy-MM-dd" placeholder="选择航班日期" clearable :disabled="fltNoDisabled">
91 - <el-form-item label="Service Code"> 22 + </el-date-picker>
92 - <el-card shadow="never" style="width: 80%"> 23 + </el-form-item>
93 - <el-checkbox-group v-model="form.serviceCode">
94 - <el-row>
95 - <el-col :span="2" v-for="item in serviceCode" :key="item.id">
96 - <el-checkbox v-if="item.status === 1 || form.serviceCode.includes(item.chineseName)"
97 - :label="item.chineseName" :name="item.chineseName"
98 - :disabled="form.serviceCode.includes(item.chineseName) && item.status === 0">
99 - <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
100 - </el-checkbox>
101 </el-col> 24 </el-col>
102 - </el-row> 25 + <el-col :span="7">
103 - </el-checkbox-group> 26 + <el-form-item prop="route" label="航线:">
104 - </el-card> 27 + <Drag :routes="routeList" :disabled="true" @drag="drag">
105 - </el-form-item> 28 + </Drag>
106 - <el-form-item label="Handling Code"> 29 + </el-form-item>
107 - <el-card shadow="never" style="width: 80%">
108 - <el-checkbox-group v-model="form.handlingCode">
109 - <el-row>
110 - <el-col :span="3" v-for="item in handlingCode" :key="item.id">
111 - <el-checkbox v-if="item.status === 1 || form.handlingCode.includes(item.chineseName)"
112 - :label="item.chineseName" :name="item.chineseName"
113 - :disabled="form.handlingCode.includes(item.chineseName) && item.status === 0">
114 - <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
115 - </el-checkbox>
116 </el-col> 30 </el-col>
117 - </el-row> 31 + <!-- <el-button v-if="status == 'update' && infoForm.fltDate != null" type="primary" size="small"
118 - </el-checkbox-group> 32 + @click="setRoutes" :disabled="allSubmitDisabled">航线优先级保存</el-button> -->
119 - </el-card> 33 + </el-row>
120 - </el-form-item> 34 + <!-- <div class="routeTip">
121 - <el-form-item label="Sub Category"> 35 + <span class="el-icon-warning-outline" style="color:#ff4949"></span>
122 - <el-card shadow="never" style="width: 80%"> 36 + 航班优先级只有在设置日期的维度下才可修改,若修改没有日期的维度请到数据字典航线表修改对应航班的优先级
123 - <el-checkbox-group v-model="form.subCategory"> 37 + </div> -->
124 - <el-row> 38 + <!-- 航线维度设置 -->
125 - <el-col :span="3" v-for="item in subCategory" :key="item.id"> 39 + <el-divider content-position="left">航线维度设置</el-divider>
126 - <el-checkbox v-if="item.status === 1 || form.subCategory.includes(item.chineseName)" 40 + <!-- <div class="routeTip"> -->
127 - :label="item.chineseName" :name="item.chineseName" 41 + <!-- <span class="el-icon-warning-outline" style="color:#ff4949"></span> -->
128 - :disabled="form.subCategory.includes(item.chineseName) && item.status === 0"> 42 + <!-- 新增航线维度时,不添加维度的航线,等同于没有限制规则,配舱时以航线优先级顺序配舱! -->
129 - <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> 43 + <!-- </div> -->
130 - </el-checkbox> 44 + <el-collapse ref="routeCollapse"
131 - </el-col> 45 + v-if="routeSatus != 'flightInformationMaintenanceWhite Tail' && routeSatus != 'dmLog'"
132 - </el-row> 46 + class="backgroundCollapse" :value="infoForm.list.length > 0 ? routeList[0].route : ''"
133 - </el-checkbox-group> 47 + style="min-height:500px;width:95%;margin:0 auto 50px" accordion v-loading="loading">
134 - </el-card> 48 + <el-collapse-item v-for="(routeItem, index) in routeList" :key="index" :name="routeItem.route">
135 - </el-form-item> 49 + <template slot="title">
136 - </el-form> 50 + <span class="fontWeight">{{ routeItem.route }}</span>
137 - <div style="marginLeft: 200px"> 51 + </template>
138 - <el-button type="primary" size="small" 52 + <el-card shadow="always" v-for="(val, idx) in infoForm.list" :key="idx"
139 - v-if="$route.params.handle != 'detail' && $route.params.handle != 'DMdetail'" @click="submit('form')" 53 + v-if="val.flightRoute === routeItem.route" style="min-height:350px">
140 - :loading="btnLoading"> 54 + <div>
141 - <span v-if="$route.params.handle === 'add'">添加</span> 55 + <el-empty description="未设置规则!" v-if="!val.isLocation">
142 - <span v-else>保存</span> 56 + <el-button type="primary" size="small" @click="newRoute(idx)">新增规则
143 - </el-button> 57 + </el-button>
144 - <el-button size="small" @click="close">取消</el-button> 58 + </el-empty>
145 - </div> 59 + <el-row class="rowPadding" v-else>
146 - </template> 60 + <el-button type="primary" size="mini" @click="submit(idx)">保 存</el-button>
147 - </div> 61 + <el-button type="primary" v-if="val.status === '1'" size="mini"
62 + icon="el-icon-video-pause" @click="changeStatus(idx)">
63 + 停 用</el-button>
64 + <el-button type="primary" v-if="val.status === '3'" size="mini"
65 + icon="el-icon-video-pause" @click="changeStatus(idx)">
66 + 启 用</el-button>
67 + <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete"
68 + @click="del(idx)">删 除
69 + </el-button>
70 + <el-divider></el-divider>
71 + <el-col :span="24">
72 + <el-form-item label="站点">
73 + <el-col :span="4">
74 + <el-radio-group v-model="val.isLocation" @change="change">
75 + <el-radio label="1">站点包含</el-radio>
76 + <el-radio label="2">站点不包含</el-radio>
77 + </el-radio-group>
78 + </el-col>
79 + <el-col :span="10">
80 + <el-input v-if="val.isLocation == '1'" v-model="val.location"
81 + type="textarea" :rows="4" resize="none" style="width: 500px"
82 + placeholder="站点之间用回车符分隔">
83 + </el-input>
84 + <el-input v-else v-model="val.notLocation" type="textarea" :rows="4"
85 + resize="none" style="width: 500px" placeholder="站点之间用回车符分隔">
86 + </el-input>
87 + </el-col>
88 + </el-form-item>
89 + </el-col>
90 + <el-col :span="24">
91 + <el-col :span="12">
92 + <el-form-item label="URSA包含">
93 + <el-input v-model="val.includeUrsa" type="textarea" :rows="4" resize="none"
94 + style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_">
95 + </el-input>
96 + </el-form-item>
97 + </el-col>
98 + <el-col :span="12">
99 + <el-form-item label="URSA不包含">
100 + <el-input v-model="val.notIncludeUrsa" type="textarea" :rows="4"
101 + resize="none" style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_">
102 + </el-input>
103 + </el-form-item>
104 + </el-col>
105 + </el-col>
106 + <el-col :span="24">
107 + <el-col :span="9">
108 + <el-form-item label="件数">
109 + <el-col :span="10">
110 + <el-input class="numberInput" v-model.trim="val.minNumOfPieces"
111 + oninput="value=value.replace(/[^\d\.\-]/g,'')">
112 + </el-input>
113 + </el-col>
114 + <el-col style="text-align: center" :span="1">-</el-col>
115 + <el-col :span="10">
116 + <el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
117 + oninput="value=value.replace(/[^\d\.\-]/g,'')">
118 + </el-input>
119 + </el-col>
120 + </el-form-item>
121 + </el-col>
122 + <el-col :span="9">
123 + <el-form-item label="重量(KG)">
124 + <el-col :span="10">
125 + <el-input class="numberInput" v-model.trim="val.minWeight"
126 + oninput="value=value.replace(/[^\d\.\-]/g,'')">
127 + </el-input>
128 + </el-col>
129 + <el-col style="text-align: center" :span="1">-</el-col>
130 + <el-col :span="10">
131 + <el-input class="numberInput" v-model.trim="val.maxWeight"
132 + oninput="value=value.replace(/[^\d\.\-]/g,'')">
133 + </el-input>
134 + </el-col>
135 + </el-form-item>
136 + </el-col>
137 + </el-col>
138 + <el-col :span="24">
139 + <el-form-item label="申报类别">
140 + <el-card shadow="never" style="width: 95%">
141 + <el-checkbox-group v-model="val.typeOfGoods" @change="change">
142 + <el-row>
143 + <el-col v-for="item in checkBoxItem.cargoType" :span="2"
144 + :key="item.id">
145 + <el-checkbox v-if="item.status === 1" :label="item.chineseName"
146 + :name="item.chineseName" :key="item.code">
147 + <Tooltips :content="item.chineseName" :refName="item.code">
148 + </Tooltips>
149 + </el-checkbox>
150 + </el-col>
151 + </el-row>
152 + </el-checkbox-group>
153 + </el-card>
154 + </el-form-item>
155 + </el-col>
156 + <el-col :span="24">
157 + <el-form-item label="货物类型">
158 + <el-card shadow="never" style="width: 95%">
159 + <el-checkbox-group v-model="val.declarationCategory" @change="change">
160 + <el-row>
161 + <el-col v-for="item in checkBoxItem.cargoStatus" :span="3"
162 + :key="item.id">
163 + <el-checkbox v-if="item.status === 1" :label="item.chineseName"
164 + :name="item.chineseName" disabled :key="item.code">
165 + <Tooltips :content="item.chineseName" :refName="item.code">
166 + </Tooltips>
167 + </el-checkbox>
168 + </el-col>
169 + </el-row>
170 + </el-checkbox-group>
171 + </el-card>
172 + </el-form-item>
173 + </el-col>
174 + <el-col :span="24">
175 + <el-form-item label="取件扫描号">
176 + <el-card shadow="never" style="width: 95%">
177 + <el-checkbox-group v-model="val.puporpuxCode" @change="change">
178 + <el-row>
179 + <el-col :span="2" v-for="item in checkBoxItem.puporpux">
180 + <el-checkbox
181 + v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
182 + :label="item.chineseName" :name="item.chineseName"
183 + :disabled="val.puporpuxCode.includes(item.chineseName) && item.status == 0"
184 + :key="item.code">
185 + <Tooltips :content="item.chineseName" :refName="item.code">
186 + </Tooltips>
187 + </el-checkbox>
188 + </el-col>
189 + </el-row>
190 + </el-checkbox-group>
191 + </el-card>
192 + </el-form-item>
193 + </el-col>
194 + <el-col :span="24">
195 + <el-form-item label="Service Code">
196 + <el-card shadow="never" style="width: 95%">
197 + <el-checkbox-group v-model="val.serviceCode" @change="change">
198 + <el-row>
199 + <el-col v-for="item in checkBoxItem.serviceCode" :span="2"
200 + :key="item.id">
201 + <el-checkbox
202 + v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)"
203 + :label="item.chineseName" :name="item.chineseName"
204 + :disabled="val.serviceCode.includes(item.chineseName) && item.status == 0"
205 + :key="item.code">
206 + <Tooltips :content="item.chineseName" :refName="item.code">
207 + </Tooltips>
208 + </el-checkbox>
209 + </el-col>
210 + </el-row>
211 + </el-checkbox-group>
212 + </el-card>
213 + </el-form-item>
214 + </el-col>
215 + <el-col :span="24">
216 + <el-form-item label="Handling Code">
217 + <el-card shadow="never" style="width: 95%">
218 + <el-checkbox-group v-model="val.handlingCode" @change="change">
219 + <el-row>
220 + <el-col v-for="item in checkBoxItem.handlingCode" :span="2"
221 + :key="item.id">
222 + <el-checkbox
223 + v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)"
224 + :label="item.chineseName" :name="item.chineseName"
225 + :disabled="val.handlingCode.includes(item.chineseName) && item.status == 0"
226 + :key="item.code">
227 + <Tooltips :content="item.chineseName" :refName="item.code">
228 + </Tooltips>
229 + </el-checkbox>
230 + </el-col>
231 + </el-row>
232 + </el-checkbox-group>
233 + </el-card>
234 + </el-form-item>
235 + </el-col>
236 + <el-col :span="24">
237 + <el-form-item label="Sub Category">
238 + <el-card shadow="never" style="width: 95%">
239 + <el-checkbox-group v-model="val.subCategory" @change="change">
240 + <el-row>
241 + <el-col v-for="item in checkBoxItem.subCategory" :span="2"
242 + :key="item.id">
243 + <el-checkbox
244 + v-if="item.status === 1 || val.subCategory.includes(item.chineseName)"
245 + :label="item.chineseName" :name="item.chineseName"
246 + :disabled="val.subCategory.includes(item.chineseName) && item.status == 0"
247 + :key="item.code">
248 + <Tooltips :content="item.chineseName" :refName="item.code">
249 + </Tooltips>
250 + </el-checkbox>
251 + </el-col>
252 + </el-row>
253 + </el-checkbox-group>
254 + </el-card>
255 + </el-form-item>
256 + </el-col>
257 + </el-row>
258 + </div>
259 + </el-card>
260 + </el-collapse-item>
261 + </el-collapse>
262 + <el-card v-else shadow="always" v-for="(val, idx) in infoForm.list" :key="idx" style="min-height:350px">
263 + <div>
264 + <el-empty description="未设置规则!" v-if="!val.isLocation">
265 + <el-button type="primary" size="small" @click="newRoute(idx)">新增规则
266 + </el-button>
267 + </el-empty>
268 + <el-row class="rowPadding" v-else>
269 + <el-button type="primary" size="mini" @click="submit(idx)">保 存</el-button>
270 + <el-button type="primary" v-if="val.status === '1'" size="mini" icon="el-icon-video-pause"
271 + @click="changeStatus(idx)">
272 + 停 用</el-button>
273 + <el-button type="primary" v-if="val.status === '3'" size="mini" icon="el-icon-video-pause"
274 + @click="changeStatus(idx)">
275 + 启 用</el-button>
276 + <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" @click="del(idx)">删 除
277 + </el-button>
278 + <el-divider></el-divider>
279 + <el-col :span="24">
280 + <el-form-item label="站点">
281 + <el-col :span="4">
282 + <el-radio-group v-model="val.isLocation" @change="change">
283 + <el-radio label="1">站点包含</el-radio>
284 + <el-radio label="2">站点不包含</el-radio>
285 + </el-radio-group>
286 + </el-col>
287 + <el-col :span="10">
288 + <el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea"
289 + :rows="4" resize="none" style="width: 500px" placeholder="站点之间用回车符分隔">
290 + </el-input>
291 + <el-input v-else v-model="val.notLocation" type="textarea" :rows="4" resize="none"
292 + style="width: 500px" placeholder="站点之间用回车符分隔">
293 + </el-input>
294 + </el-col>
295 + </el-form-item>
296 + </el-col>
297 + <el-col :span="24">
298 + <el-col :span="12">
299 + <el-form-item label="URSA包含">
300 + <el-input v-model="val.includeUrsa" type="textarea" :rows="4" resize="none"
301 + style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_">
302 + </el-input>
303 + </el-form-item>
304 + </el-col>
305 + <el-col :span="12">
306 + <el-form-item label="URSA不包含">
307 + <el-input v-model="val.notIncludeUrsa" type="textarea" :rows="4" resize="none"
308 + style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_">
309 + </el-input>
310 + </el-form-item>
311 + </el-col>
312 + </el-col>
313 + <el-col :span="24">
314 + <el-col :span="9">
315 + <el-form-item label="件数">
316 + <el-col :span="10">
317 + <el-input class="numberInput" v-model.trim="val.minNumOfPieces"
318 + oninput="value=value.replace(/[^\d\.\-]/g,'')">
319 + </el-input>
320 + </el-col>
321 + <el-col style="text-align: center" :span="1">-</el-col>
322 + <el-col :span="10">
323 + <el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
324 + oninput="value=value.replace(/[^\d\.\-]/g,'')">
325 + </el-input>
326 + </el-col>
327 + </el-form-item>
328 + </el-col>
329 + <el-col :span="9">
330 + <el-form-item label="重量(KG)">
331 + <el-col :span="10">
332 + <el-input class="numberInput" v-model.trim="val.minWeight"
333 + oninput="value=value.replace(/[^\d\.\-]/g,'')">
334 + </el-input>
335 + </el-col>
336 + <el-col style="text-align: center" :span="1">-</el-col>
337 + <el-col :span="10">
338 + <el-input class="numberInput" v-model.trim="val.maxWeight"
339 + oninput="value=value.replace(/[^\d\.\-]/g,'')">
340 + </el-input>
341 + </el-col>
342 + </el-form-item>
343 + </el-col>
344 + </el-col>
345 + <el-col :span="24">
346 + <el-form-item label="申报类别">
347 + <el-card shadow="never" style="width: 95%">
348 + <el-checkbox-group v-model="val.typeOfGoods" @change="change">
349 + <el-row>
350 + <el-col v-for="item in checkBoxItem.cargoType" :span="2" :key="item.id">
351 + <el-checkbox v-if="item.status === 1" :label="item.chineseName"
352 + :name="item.chineseName" :key="item.code">
353 + <Tooltips :content="item.chineseName" :refName="item.code">
354 + </Tooltips>
355 + </el-checkbox>
356 + </el-col>
357 + </el-row>
358 + </el-checkbox-group>
359 + </el-card>
360 + </el-form-item>
361 + </el-col>
362 + <el-col :span="24">
363 + <el-form-item label="货物类型">
364 + <el-card shadow="never" style="width: 95%">
365 + <el-checkbox-group v-model="val.declarationCategory" @change="change">
366 + <el-row>
367 + <el-col v-for="item in checkBoxItem.cargoStatus" :span="3" :key="item.id">
368 + <el-checkbox v-if="item.status === 1" :label="item.chineseName"
369 + :name="item.chineseName" disabled :key="item.code">
370 + <Tooltips :content="item.chineseName" :refName="item.code">
371 + </Tooltips>
372 + </el-checkbox>
373 + </el-col>
374 + </el-row>
375 + </el-checkbox-group>
376 + </el-card>
377 + </el-form-item>
378 + </el-col>
379 + <el-col :span="24">
380 + <el-form-item label="取件扫描号">
381 + <el-card shadow="never" style="width: 95%">
382 + <el-checkbox-group v-model="val.puporpuxCode" @change="change">
383 + <el-row>
384 + <el-col :span="2" v-for="item in checkBoxItem.puporpux">
385 + <el-checkbox
386 + v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
387 + :label="item.chineseName" :name="item.chineseName"
388 + :disabled="val.puporpuxCode.includes(item.chineseName) && item.status == 0"
389 + :key="item.code">
390 + <Tooltips :content="item.chineseName" :refName="item.code">
391 + </Tooltips>
392 + </el-checkbox>
393 + </el-col>
394 + </el-row>
395 + </el-checkbox-group>
396 + </el-card>
397 + </el-form-item>
398 + </el-col>
399 + <el-col :span="24">
400 + <el-form-item label="Service Code">
401 + <el-card shadow="never" style="width: 95%">
402 + <el-checkbox-group v-model="val.serviceCode" @change="change">
403 + <el-row>
404 + <el-col v-for="item in checkBoxItem.serviceCode" :span="2" :key="item.id">
405 + <el-checkbox
406 + v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)"
407 + :label="item.chineseName" :name="item.chineseName"
408 + :disabled="val.serviceCode.includes(item.chineseName) && item.status == 0"
409 + :key="item.code">
410 + <Tooltips :content="item.chineseName" :refName="item.code">
411 + </Tooltips>
412 + </el-checkbox>
413 + </el-col>
414 + </el-row>
415 + </el-checkbox-group>
416 + </el-card>
417 + </el-form-item>
418 + </el-col>
419 + <el-col :span="24">
420 + <el-form-item label="Handling Code">
421 + <el-card shadow="never" style="width: 95%">
422 + <el-checkbox-group v-model="val.handlingCode" @change="change">
423 + <el-row>
424 + <el-col v-for="item in checkBoxItem.handlingCode" :span="2" :key="item.id">
425 + <el-checkbox
426 + v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)"
427 + :label="item.chineseName" :name="item.chineseName"
428 + :disabled="val.handlingCode.includes(item.chineseName) && item.status == 0"
429 + :key="item.code">
430 + <Tooltips :content="item.chineseName" :refName="item.code">
431 + </Tooltips>
432 + </el-checkbox>
433 + </el-col>
434 + </el-row>
435 + </el-checkbox-group>
436 + </el-card>
437 + </el-form-item>
438 + </el-col>
439 + <el-col :span="24">
440 + <el-form-item label="Sub Category">
441 + <el-card shadow="never" style="width: 95%">
442 + <el-checkbox-group v-model="val.subCategory" @change="change">
443 + <el-row>
444 + <el-col v-for="item in checkBoxItem.subCategory" :span="2" :key="item.id">
445 + <el-checkbox
446 + v-if="item.status === 1 || val.subCategory.includes(item.chineseName)"
447 + :label="item.chineseName" :name="item.chineseName"
448 + :disabled="val.subCategory.includes(item.chineseName) && item.status == 0"
449 + :key="item.code">
450 + <Tooltips :content="item.chineseName" :refName="item.code">
451 + </Tooltips>
452 + </el-checkbox>
453 + </el-col>
454 + </el-row>
455 + </el-checkbox-group>
456 + </el-card>
457 + </el-form-item>
458 + </el-col>
459 + </el-row>
460 + </div>
461 + </el-card>
462 + </el-form>
463 + </div>
148 </template> 464 </template>
149 465
150 <script> 466 <script>
151 import { 467 import {
152 - findByFlightId, 468 + findDestinationFltRuleByFlightNo,
153 - updateOrAddFlight, 469 + updateOrAddFlight,
154 - allDictData, 470 + allDictData,
155 - findDestinationFltRuleByActualFlight, 471 + delFlightId,
472 + enableOrDisable,
473 + batchUpdateOrAddFlight,
474 + findByFlightId,
475 + queryRouteByFltNo
156 } from "@/api/destinationFlight"; 476 } from "@/api/destinationFlight";
157 477
158 export default { 478 export default {
159 - name: "", 479 + name: 'FlightAllocConfigInfo',
160 - data() { 480 + data() {
161 - return { 481 + return {
162 - form: { 482 + infoForm: {
163 - minNumOfPieces: undefined, 483 + fltNo: '',
164 - maxNumOfPieces: undefined, 484 + fltDate: null,
165 - minWeight: undefined, 485 + route: null,
166 - maxWeight: undefined, 486 + list: [],
167 - typeOfGoods: [], 487 + },
168 - declarationCategory: [], 488 + routeList: [],
169 - serviceCode: [], 489 + checkBoxItem: {
170 - subCategory: [], 490 + cargoType: [],
171 - handlingCode: [], 491 + cargoStatus: [],
172 - }, 492 + puporpux: [],
173 - rules: { 493 + serviceCode: [],
174 - purposeOfFlightNo: [ 494 + handlingCode: [],
175 - { 495 + subCategory: []
176 - required: true, 496 + },
177 - message: "请输入航班号", 497 + rules: {
178 - trigger: "blur", 498 + "fltNo": [
179 - }, 499 + {
180 - ], 500 + required: true,
181 - }, 501 + message: "航班号不能为空",
182 - typeOfGoods: [], 502 + trigger: "blur",
183 - declarationCategory: [], 503 + },
184 - formServiceCode: [], 504 + ]
185 - formHandlingCode: [], 505 + },
186 - formSubCategory: [], 506 + status: '',
187 - cargoType: [], 507 + routeSatus: '',
188 - cargoStatus: [], 508 + isEmpty: false,
189 - serviceCode: [], 509 + disabled: false,
190 - handlingCode: [], 510 + allSubmitDisabled: false,
191 - subCategory: [], 511 + fltNoDisabled: false,
192 - isLocation: "1", 512 + loading: true,
193 - disable: false,
194 - nameDisabled: false,
195 - btnLoading: false,
196 - loading: true,
197 - isEmpty: false,
198 - routeName: "",
199 - dataId: "",
200 - handleName: "",
201 - };
202 - },
203 - created() {
204 - this.routeName = this.$route.name;
205 - this.dataId = this.$route.params.id;
206 - this.handleName = this.$route.params.handle;
207 - this.dictData();
208 - if (this.handleName === "detail" || this.handleName === 'DMdetail') {
209 - this.disable = true;
210 - }
211 -
212 - if (this.handleName != "add") {
213 - this.nameDisabled = true;
214 - let id = this.$route.params.id;
215 - if (
216 - sessionStorage.getItem("flightInfo" + id) &&
217 - this.$route.name == "FlightAllocConfigInfo" &&
218 - this.handleName != "detail" &&
219 - this.handleName != "DMdetail"
220 - ) {
221 - this.loading = false;
222 - this.form = JSON.parse(
223 - sessionStorage.getItem("flightInfo" + this.$route.params.id)
224 - );
225 - if (this.form.notLocation != null || this.form.notLocation == "") {
226 - this.isLocation = "2";
227 - } else {
228 - this.isLocation = "1";
229 } 513 }
230 - } else { 514 + },
231 - if (isNaN(Number(this.dataId))) { 515 + created() {
232 - findDestinationFltRuleByActualFlight(this.dataId).then((response) => { 516 + this.dictData()
233 - if (response.code != 200) { 517 + this.status = this.$route.params.handle
234 - this.msgWarning(response.msg) 518 + this.$route.params.handle === 'detail' ? this.disabled = true : this.disabled = false
235 - this.isEmpty = true; 519 + this.$route.params.routeStatus ? this.routeSatus = this.$route.params.routeStatus : ''
236 - } else if (response.data == null) { 520 + if (this.$route.params.handle != 'add') {
237 - this.isEmpty = true; 521 + this.fltNoDisabled = true
238 - } else { 522 + this.infoForm.fltNo = this.$route.params.fltNo
239 - let info = response.data; 523 + this.infoForm.fltDate = this.$route.params.fltDate
240 - info.typeOfGoods = info.typeOfGoods 524 + this.infoForm.route = this.$route.params.route
241 - ? info.typeOfGoods.split(";") 525 + if (this.routeSatus == 'dmLog') {
242 - : []; 526 + this.getIdDimension(this.$route.params.id)
243 - info.declarationCategory = info.declarationCategory
244 - ? info.declarationCategory.split(";")
245 - : [];
246 - info.serviceCode = info.serviceCode
247 - ? info.serviceCode.split(";")
248 - : [];
249 - info.handlingCode = info.handlingCode
250 - ? info.handlingCode.split(";")
251 - : [];
252 - info.subCategory = info.subCategory
253 - ? info.subCategory.split(";")
254 - : [];
255 - this.form = info;
256 - if (info.notLocation != null || info.notLocation == "") {
257 - this.isLocation = "2";
258 - } else {
259 - this.isLocation = "1";
260 - }
261 - }
262 - this.loading = false;
263 - }).catch(() => {
264 - this.loading = false;
265 - })
266 - } else {
267 - //货物信息
268 - findByFlightId(this.dataId).then((response) => {
269 - if (response.code != 200) {
270 - this.msgWarning(response.msg)
271 - this.isEmpty = true;
272 } else { 527 } else {
273 - let info = response.data.list; 528 + this.getRouteDimension({ fltNo: this.$route.params.fltNo, fltDate: this.$route.params.fltDate, route: this.$route.params.route ? this.$route.params.route : '', status: this.$route.params.status })
274 - info.typeOfGoods = info.typeOfGoods
275 - ? info.typeOfGoods.split(";")
276 - : [];
277 - info.declarationCategory = info.declarationCategory
278 - ? info.declarationCategory.split(";")
279 - : [];
280 - info.serviceCode = info.serviceCode
281 - ? info.serviceCode.split(";")
282 - : [];
283 - info.handlingCode = info.handlingCode
284 - ? info.handlingCode.split(";")
285 - : [];
286 - info.subCategory = info.subCategory
287 - ? info.subCategory.split(";")
288 - : [];
289 - this.form = info;
290 - if (info.notLocation != null || info.notLocation == "") {
291 - this.isLocation = "2";
292 - } else {
293 - this.isLocation = "1";
294 - }
295 } 529 }
296 - this.loading = false;
297 - }).catch(() => {
298 - this.loading = false;
299 - })
300 - }
301 - }
302 - } else {
303 - this.loading = false;
304 - }
305 - if (this.$route.name == "FlightAllocConfigAdd") {
306 - if (sessionStorage.getItem("flightAdd")) {
307 - this.form = JSON.parse(sessionStorage.getItem("flightAdd"));
308 - if (this.form.notLocation != null || this.form.notLocation == "") {
309 - this.isLocation = "2";
310 - } else {
311 - this.isLocation = "1";
312 - }
313 - }
314 - }
315 - },
316 - methods: {
317 - //排序
318 - sorttodo(arr, chineseName) {
319 - var index = 1,
320 - newArr = [],
321 - length = arr.length;
322 - for (var i = 0; i < length; i++) {
323 - if (arr[i].chineseName === chineseName) {
324 - newArr[0] = arr[i];
325 } else { 530 } else {
326 - newArr[index++] = arr[i]; 531 + this.infoForm.fltNo = ''
532 + this.infoForm.fltDate = null
533 + this.infoForm.route = null
327 } 534 }
328 - }
329 - return newArr;
330 }, 535 },
331 - 536 + mounted() {
332 - submit(form) { 537 + this.loading = false
333 - this.$refs[form].validate((valid) => { 538 + },
334 - if (!valid) { 539 + watch: {
335 - return false; 540 + $route: {
336 - } 541 + handler(to, from) {
337 - }); 542 + let route = ''
338 - 543 + if (from.name == 'FlightInformationMaintenance') {
339 - this.btnLoading = true; 544 + this.routeSatus = 'flightInformationMaintenance'
340 - if (this.handleName === "update") { 545 + route = this.infoForm.list[0].flightRoute
341 - //修改,获取id 546 + } else if (from.name == 'DmLog') {
342 - this.form.id = this.$route.params.id; 547 + this.routeSatus = 'dmLog'
343 - } 548 + route = this.infoForm.list[0].flightRoute
344 - 549 + this.getIdDimension(this.infoForm.list[0].id)
345 - //调用接口 550 + } else {
346 - this.typeOfGoods = this.form.typeOfGoods; 551 + this.routeSatus = null
347 - this.declarationCategory = this.form.declarationCategory; 552 + }
348 - this.formServiceCode = this.form.serviceCode; 553 + if (to.name == 'FlightAllocConfigInfo' && from.name != 'DmLog') {
349 - this.formHandlingCode = this.form.handlingCode; 554 + this.getRouteDimension({ fltNo: this.infoForm.fltNo, fltDate: this.infoForm.fltDate, route: route ? route : '', status: this.$route.params.status })
350 - this.formSubCategory = this.form.subCategory; 555 + }
351 - if (this.form.purposeOfFlightNo) { 556 + if (this.$route.params.handle == 'add') {
352 - this.form.purposeOfFlightNo = this.form.purposeOfFlightNo.toUpperCase(); 557 + this.getRoutes(this.infoForm.fltNo)
353 - } 558 + }
354 - if (this.isLocation == 1) { 559 + },
355 - this.form.notLocation = ""; 560 + deep: true
356 - } else { 561 + },
357 - this.form.location = ""; 562 + },
358 - } 563 + methods: {
359 - 564 + //页面选项
360 - if ( 565 + dictData() {
361 - this.form.includeUrsa && 566 + allDictData().then((res) => {
362 - this.form.includeUrsa.length != 0 && 567 + if (res.code != 200) {
363 - this.form.notIncludeUrsa && 568 + this.msgError(res.msg)
364 - this.form.notIncludeUrsa.length != 0 569 + return;
365 - ) { 570 + }
366 - let include = this.form.includeUrsa.split(";"); 571 + this.checkBoxItem.cargoType = res.data.cargoType;
367 - let notInclude = this.form.notIncludeUrsa.split(";"); 572 + this.checkBoxItem.cargoStatus = res.data.cargoStatus;
368 - let errorList = []; 573 + this.checkBoxItem.puporpux = res.data.puporpux;
369 - notInclude.forEach((element) => { 574 + this.checkBoxItem.serviceCode = this.dicSort(res.data.serviceCode.sort((a, b) =>
370 - if (element.indexOf("_") > 0) { 575 + a.chineseName.localeCompare(b.chineseName)
371 - errorList.push(element); 576 + ));
372 - } else { 577 + this.checkBoxItem.handlingCode = this.dicSort(this.sorttodo(res.data.handlingCode, "BLANK"));
373 - let flag = 0; 578 + this.checkBoxItem.subCategory = this.dicSort(this.sorttodo(res.data.subCategory, "Blank"));
374 - for (let i = 0; i < include.length; i++) { 579 + });
375 - if ( 580 + },
376 - element == "" || 581 + //id查询维度信息
377 - (include[i].indexOf("_") > 0 && 582 + getIdDimension(val) {
378 - include[i].substring(0, 1) == element.substring(0, 1)) 583 + this.routeList = []
379 - ) { 584 + this.infoForm.list = []
380 - flag = 1; 585 + findByFlightId(val).then(res => {
381 - break; 586 + if (res.code === 200) {
382 - } 587 + if (res.data.list) {
588 + this.routeList.push(
589 + {
590 + fltNo: res.data.list.purposeOfFlightNo,
591 + route: res.data.list.flightRoute,
592 + routePriority: '1'
593 + }
594 + )
595 + this.infoForm.fltNo = res.data.list.purposeOfFlightNo
596 + this.infoForm.fltDate = res.data.list.ruleDate
597 + this.infoForm.route = res.data.list.flightRoute
598 + this.infoForm.list.push(this.dataHandle(res.data.list))
599 + } else {
600 + this.isEmpty = true
601 + }
602 + } else {
603 + this.msgWarning("为查询到数据!")
604 + this.isEmpty = true
605 + }
606 + }).catch(err => {
607 + console.log(err)
608 + this.isEmpty = true
609 + })
610 + },
611 + //获取航班航线维度
612 + getRouteDimension(val) {
613 + this.routeList = []
614 + this.infoForm.list = []
615 + let obj = {
616 + purposeOfFlightNo: val.fltNo,
617 + flightDate: val.fltDate,
618 + flightRoute: val.route,
619 + status: val.status ? val.status : ''
383 } 620 }
384 - if (flag == 0) { 621 + if (this.$route.params.handle != 'add') {
385 - errorList.push(element); 622 + findDestinationFltRuleByFlightNo(obj).then(res => {
623 + if (res.code === 200) {
624 + this.routeList = res.data.routeList
625 + if (res.data.list.length > 0) {
626 + //请求到数据
627 + if (this.infoForm.route != null && this.infoForm.route != null) {
628 + //航线不为空,对应到这条航线下的这条维度(直接处理插入数据)
629 + if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
630 + //如果是从航班维护界面跳转且航班类型为White Tail则直接显示当前航线维度
631 + res.data.list.forEach(item => {
632 + this.infoForm.list.push(this.dataHandle(item))
633 + })
634 + } else {
635 + //航班类型为Purple Tail则显示所有航线维度
636 + this.routeList.forEach(route => {
637 + let routeStatus = 1
638 + res.data.list.forEach(item => {
639 + if (route.route === item.flightRoute) {
640 + //航线对应插入数据
641 + routeStatus = 2
642 + this.infoForm.list.push(this.dataHandle(item))
643 + }
644 + })
645 + if (routeStatus == 1) {
646 + //否则插入占位基础数据
647 + this.infoForm.list.push({
648 + purposeOfFlightNo: this.infoForm.fltNo,
649 + ruleDate: this.infoForm.fltDate,
650 + flightRoute: route.route,
651 + routePriority: route.routePriority,
652 + })
653 + }
654 + })
655 + }
656 + } else {
657 + //航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
658 + this.routeList.forEach(route => {
659 + let routeStatus = 1
660 + res.data.list.forEach(item => {
661 + if (route.route === item.flightRoute) {
662 + //航线对应插入数据
663 + routeStatus = 2
664 + this.infoForm.list.push(this.dataHandle(item))
665 + }
666 + })
667 + if (routeStatus == 1) {
668 + //否则插入占位基础数据
669 + this.infoForm.list.push({
670 + purposeOfFlightNo: this.infoForm.fltNo,
671 + ruleDate: this.infoForm.fltDate,
672 + flightRoute: route.route,
673 + routePriority: route.routePriority,
674 + })
675 + }
676 + })
677 + }
678 + } else {
679 + //未请求到数据
680 + if (this.infoForm.route != null && this.infoForm.route != '') {
681 + //航线不为空,获取该航线下无日期通用维度设置
682 + findDestinationFltRuleByFlightNo({
683 + purposeOfFlightNo: this.infoForm.fltNo,
684 + flightRoute: this.infoForm.route,
685 + status: this.$route.params.status
686 + }).then(response => {
687 + if (response.data.list.length > 0) {
688 + //查询到通用维度,去除id status,航线赋值,航线优先级赋值
689 + if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
690 + //航班类型White Tail只展示当前航线维度
691 + response.data.list.forEach(item => {
692 + item.id = undefined
693 + item.status = undefined
694 + item.flightRoute = this.infoForm.route
695 + this.routeList.forEach(route => {
696 + if (route.route === this.infoForm.route) {
697 + item.routePriority = route.routePriority
698 + }
699 + })
700 + this.infoForm.list.push(this.dataHandle(item))
701 + })
702 + } else {
703 + //航班类型Purple Tail展示全部航线维度
704 + let routesStatus = 1
705 + this.routeList.forEach(route => {
706 + response.data.list.forEach(item => {
707 + if (route.route === item.flightRoute) {
708 + routesStatus = 2
709 + item.id = undefined
710 + item.status = undefined
711 + item.flightRoute = this.infoForm.route
712 + item.routePriority = route.routePriority
713 + this.infoForm.list.push(this.dataHandle(item))
714 + }
715 + })
716 + if (routesStatus == 1) {
717 + this.infoForm.list.push({
718 + purposeOfFlightNo: this.infoForm.fltNo,
719 + ruleDate: this.infoForm.fltDate,
720 + flightRoute: route.route,
721 + routePriority: route.routePriority,
722 + })
723 + }
724 + })
725 + }
726 + } else {
727 + //未查询到,插入占位基础数据使用户新建
728 + if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
729 + //航班类型White Tail只展示当前航线维度
730 + this.routeList.forEach((item) => {
731 + if (item.route === this.infoForm.route) {
732 + this.infoForm.list.push({
733 + purposeOfFlightNo: this.infoForm.fltNo,
734 + ruleDate: this.infoForm.fltDate,
735 + flightRoute: this.infoForm.route,
736 + routePriority: item.routePriority,
737 + })
738 + }
739 + })
740 + } else {
741 + //航班类型Purple Tail展示全部航线维度
742 + this.isEmpty = true
743 + // this.routeList.forEach((route) => {
744 + // this.infoForm.list.push({
745 + // purposeOfFlightNo: this.infoForm.fltNo,
746 + // ruleDate: this.infoForm.fltDate,
747 + // flightRoute: route.route,
748 + // routePriority: route.routePriority,
749 + // })
750 + // })
751 + }
752 + }
753 + }).catch(err => {
754 + this.isEmpty = true
755 + console.log(err)
756 + })
757 + } else {
758 + //航线为空,提示未找到维度数据
759 + if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
760 + findDestinationFltRuleByFlightNo({
761 + purposeOfFlightNo: this.infoForm.fltNo,
762 + flightRoute: this.infoForm.route,
763 + status: this.$route.params.status
764 + }).then(response => {
765 + if (response.data.list.length > 0) {
766 + this.routeList.forEach(route => {
767 + let routeStatus = 1
768 + response.data.list.forEach(item => {
769 + if (item.flightRoute == route.route) {
770 + routeStatus = 2
771 + item.id = undefined
772 + item.status = undefined
773 + item.routePriority = route.routePriority
774 + this.infoForm.list.push(
775 + this.dataHandle(item)
776 + )
777 + }
778 + })
779 + if (routeStatus == 1) {
780 + this.infoForm.list.push({
781 + purposeOfFlightNo: this.infoForm.fltNo,
782 + ruleDate: this.infoForm.fltDate,
783 + flightRoute: route.route,
784 + routePriority: route.routePriority,
785 + })
786 + }
787 + })
788 + } else {
789 + this.isEmpty = true
790 + }
791 + }).catch(err => {
792 + this.isEmpty = true
793 + console.log(err)
794 + })
795 + }
796 + }
797 + }
798 + } else {
799 + this.msgWarning(res.msg)
800 + }
801 + }).catch(err => {
802 + console.log(err)
803 + })
386 } 804 }
387 - } 805 + },
388 - }); 806 + //新增获取航线
389 - if (errorList.length != 0) { 807 + getRoutes(val) {
390 - this.msgWarning("URSA不包含中[" + errorList + "]错误,URSA不包含必须属于URSA包含中的类型") 808 + this.routeList = []
391 - this.btnLoading = false; 809 + this.infoForm.list = []
392 - return; 810 + if (this.status == 'add') {
393 - } 811 + if (val != '' || val != null) {
394 - } 812 + this.infoForm.fltNo = this.upCase(val)
395 - let service = [] 813 + queryRouteByFltNo({ fltNo: this.infoForm.fltNo }).then(res => {
396 - this.serviceCode.forEach(item => { 814 + if (res.code === 200) {
397 - if (item.status === 1 && this.form.serviceCode.includes(item.chineseName)) { 815 + if (res.data.list.length > 0) {
398 - service.push(item.chineseName) 816 + this.routeList = res.data.list
399 - } 817 + res.data.list.forEach(item => {
400 - }) 818 + this.infoForm.list.push({
401 - this.form.serviceCode = service 819 + purposeOfFlightNo: this.infoForm.fltNo,
402 - let hand = [] 820 + ruleDate: this.infoForm.fltDate,
403 - this.handlingCode.forEach(item => { 821 + flightRoute: item.route,
404 - if (item.status === 1 && this.form.handlingCode.includes(item.chineseName)) { 822 + routePriority: item.ordinal
405 - hand.push(item.chineseName) 823 + })
406 - } 824 + })
407 - }) 825 + } else {
408 - this.form.handlingCode = hand 826 + this.routeList = []
409 - let sub = [] 827 + this.infoForm.list = []
410 - this.subCategory.forEach(item => { 828 + }
411 - if (item.status === 1 && this.form.subCategory.includes(item.chineseName)) { 829 + } else {
412 - sub.push(item.chineseName) 830 + this.msgWarning(res.msg)
413 - } 831 + }
414 - }) 832 + }).catch(err => {
833 + console.log(err)
834 + })
835 + }
836 + }
837 + },
838 + //保存
839 + submit(val) {
840 + this.loading = true
841 + let routeArr = []
842 + let data = this.setDataHandle(this.infoForm.list[val])
843 + this.routeList.forEach((item, idx) => {
844 + routeArr.push(item.route)
845 + })
846 + data.routeSpecifyDateSeq = routeArr.join(';')
847 + data.ruleDate = this.infoForm.fltDate
848 + this.infoForm.list[val].routePriority = this.routeList[val].routePriority
849 + if (this.infoForm.route != null && this.infoForm.route != '') {
850 + this.routeList.forEach(item => {
851 + if (item.route == this.infoForm.route) {
852 + data.routePriority = item.routePriority
853 + }
854 + })
855 + data.flightRoute = this.infoForm.route
856 + } else {
857 + data.flightRoute = this.routeList[val].route
858 + data.routePriority = this.routeList[val].routePriority
859 + }
860 + updateOrAddFlight(data).then(res => {
861 + this.loading = false
862 + if (res.code === 200) {
863 + this.fltNoDisabled = true
864 + this.msgSuccess('保存成功!')
865 + this.infoForm.list[val] = this.dataHandle(res.data)
866 + this.$forceUpdate()
867 + } else {
868 + this.msgWarning(res.msg)
869 + }
870 + }).catch(err => {
871 + console.log(err)
872 + })
873 + },
874 + //删除
875 + del(val) {
876 + if (this.infoForm.list[val].id) {
877 + if (this.infoForm.list[val].status == "1") {
878 + this.$confirm("航班规则生效中,无法删除,请停用后再操作", "警告", {
879 + confirmButtonText: "确定",
880 + showCancelButton: false,
881 + type: "warning",
882 + });
883 + } else {
884 + this.loading = true
885 + this.$confirm("是否确认删除此航班规则?", "警告", {
886 + confirmButtonText: "确定",
887 + cancelButtonText: "取消",
888 + showCancelButton: true,
889 + type: "warning",
890 + }).then(() => {
891 + delFlightId(this.infoForm.list[val].id)
892 + .then((res) => {
893 + this.loading = false
894 + res.code === 200 ? this.msgSuccess(res.msg) : this.msgWarning(res.msg)
895 + let obj = {
896 + purposeOfFlightNo: this.infoForm.fltNo,
897 + ruleDate: this.infoForm.fltDate,
898 + flightRoute: this.infoForm.list[val].flightRoute,
899 + routePriority: this.infoForm.list[val].routePriority,
900 + }
901 + this.infoForm.list[val] = obj
902 + this.$forceUpdate()
903 + }).catch(() => {
904 + this.loading = false
905 + });
906 + });
907 + }
908 + } else {
909 + this.infoForm.list[val] = {
910 + purposeOfFlightNo: this.infoForm.fltNo,
911 + ruleDate: this.infoForm.fltDate,
912 + flightRoute: this.routeList[val].route,
913 + routePriority: this.routeList[val].routePriority,
914 + }
915 + }
916 + },
917 + //新增
918 + newRoute(val) {
919 + this.infoForm.list[val].purposeOfFlightNo = this.infoForm.fltNo
920 + this.infoForm.list[val].ruleDate = this.infoForm.fltDate
921 + this.infoForm.list[val].flightRoute = this.routeList[val].route
922 + this.infoForm.list[val].routePriority = this.routeList[val].routePriority
923 + this.infoForm.list[val].isLocation = '1'
924 + this.infoForm.list[val].typeOfGoods = []
925 + this.infoForm.list[val].declarationCategory = []
926 + this.infoForm.list[val].puporpuxCode = []
927 + this.infoForm.list[val].serviceCode = []
928 + this.infoForm.list[val].handlingCode = []
929 + this.infoForm.list[val].subCategory = []
930 + console.log(this.infoForm)
931 + this.$forceUpdate()
932 + },
933 + //启用,停用
934 + changeStatus(idx) {
935 + this.loading = true
936 + let status = this.infoForm.list[idx].status
937 + let tip = status === '1' ? "停用" : "启用";
938 + this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
939 + confirmButtonText: "确定",
940 + cancelButtonText: "取消",
941 + type: "warning",
942 + }).then(() => {
943 + status == '1' ? status = '3' : status = '1'
944 + enableOrDisable(this.infoForm.list[idx].id, status)
945 + .then((res) => {
946 + this.loading = false
947 + if (res.code != 200) {
948 + this.msgError(res.msg);
949 + } else {
950 + this.msgSuccess(tip + "成功");
951 + this.infoForm.list[idx] = this.dataHandle(res.data)
952 + this.$forceUpdate()
953 + }
954 + })
955 + .catch(() => {
956 + this.loading = false
957 + });
958 + }).catch(() => {
959 + this.loading = false
960 + })
961 + },
962 + //保存航班优先级
963 + setRoutes() {
964 + this.loading = true
965 + let routeArr = []
966 + let arr = []
967 + let infoForm = this.infoForm.list
968 + this.routeList.forEach((item, idx) => {
969 + routeArr.push(item.route)
970 + this.infoForm.list[idx].routePriority = item.routePriority
971 + })
972 + infoForm.forEach((val, index) => {
973 + val.routeSpecifyDateSeq = routeArr.join(';')
974 + val.routePriority = this.routeList[index].routePriority
975 + this.setDataHandle(val) ? arr.push(this.setDataHandle(val)) : ''
976 + })
977 + this.$confirm("是否要保存,如果保存下方的维度会一同进行保存!", "警告", {
978 + confirmButtonText: "确定",
979 + cancelButtonText: "取消",
980 + type: "warning",
981 + }).then(() => {
982 + batchUpdateOrAddFlight(arr).then(res => {
983 + this.loading = false
984 + if (res.code === 200) {
985 + res.data.forEach((item, idx) => {
986 + this.infoForm.list[idx] = this.dataHandle(item)
987 + })
988 + this.$forceUpdate()
989 + } else {
990 + this.msgWarning(res.msg)
991 + }
992 + }).catch(err => {
993 + this.loading = false
994 + console.log(err)
995 + })
996 + }).catch(() => {
997 + this.infoForm.list.map((item, idx) => {
998 + if (item.isLocation) {
999 + this.infoForm.list[idx] = this.dataHandle(item)
1000 + }
1001 + })
1002 + this.$forceUpdate()
1003 + this.loading = false
1004 + })
1005 + },
1006 + //航线优先级修改
1007 + drag(val) {
1008 + this.routeList = val
1009 + // this.routeList.map((item, index) => {
1010 + // item.routePriority = val[index].routePriority
1011 + // })
1012 + },
1013 + //刷新控件
1014 + change(e) {
1015 + this.$forceUpdate()
1016 + },
1017 + //数据处理
1018 + dataHandle(val) {
1019 + val.isLocation = '1'
1020 + val.location ? val.isLocation = '1' : ''
1021 + val.notLocation ? val.isLocation = '2' : ''
1022 + val.maxNumOfPieces == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最大件数
1023 + val.maxWeight == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最大重量
1024 + val.minNumOfPieces == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最小件数
1025 + val.minWeight == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最小件数
1026 + val.typeOfGoods != null ? val.typeOfGoods = val.typeOfGoods.split(';') : val.typeOfGoods = []//申报类型
1027 + val.declarationCategory != null ? val.declarationCategory = val.declarationCategory.split(';') : val.declarationCategory = []//货物类型
1028 + val.puporpuxCode != null ? val.puporpuxCode = val.puporpuxCode.split(';') : val.puporpuxCode = []//取件扫描码
1029 + val.serviceCode != null ? val.serviceCode = val.serviceCode.split(';') : val.serviceCode = []//serviceCode
1030 + val.handlingCode != null ? val.handlingCode = val.handlingCode.split(';') : val.handlingCode = []//handlingCode
1031 + val.subCategory != null ? val.subCategory = val.subCategory.split(';') : val.subCategory = []//subCategory
1032 + return val
1033 + },
1034 + //提交数据处理
1035 + setDataHandle(val) {
1036 + let obj = {}
1037 + if (val.isLocation) {
1038 + obj = val
1039 + obj.isLocation == '1' ? obj.notLocation = '' : obj.location = ''
415 1040
416 - if (this.form.includeUrsa && this.form.includeUrsa.length != 0) { 1041 + if (obj.notLocation && obj.notLocation.length != 0) {
417 - this.form.includeUrsa = this.upCase(this.form.includeUrsa) 1042 + obj.notLocation = obj.notLocation.toUpperCase()
418 - } 1043 + }
419 1044
420 - if (this.form.notIncludeUrsa && this.form.notIncludeUrsa.length != 0) { 1045 + if (obj.location && obj.location.length != 0) {
421 - this.form.notIncludeUrsa = this.upCase(this.form.notIncludeUrsa) 1046 + obj.location = obj.location.toUpperCase()
422 - } 1047 + }
423 1048
424 - this.form.subCategory = sub 1049 + if (obj.includeUrsa && obj.includeUrsa.length != 0) {
425 - updateOrAddFlight(this.form).then((response) => { 1050 + obj.includeUrsa = obj.includeUrsa.toUpperCase()
426 - if (response.code === 200) { 1051 + }
427 - this.msgSuccess('成功')
428 - this.close();
429 - } else {
430 - this.msgWarning(response.msg)
431 - this.btnLoading = false;
432 - }
433 - });
434 - this.form.typeOfGoods = this.typeOfGoods;
435 - this.form.declarationCategory = this.declarationCategory;
436 - this.form.serviceCode = this.formServiceCode;
437 - this.form.handlingCode = this.formHandlingCode;
438 - this.form.subCategory = this.formSubCategory;
439 - },
440 1052
441 - close() { 1053 + if (obj.notIncludeUrsa && obj.notIncludeUrsa.length != 0) {
442 - this.removes(); 1054 + obj.notIncludeUrsa = obj.notIncludeUrsa.toUpperCase()
443 - this.$store.state.tagsView.visitedViews.splice( 1055 + }
444 - this.$store.state.tagsView.visitedViews.findIndex(
445 - (item) => item.path === this.$route.path
446 - ),
447 - );
448 - if (this.handleName === 'DMdetail') {
449 - this.$router.push({ name: "DmLog" })
450 - } else {
451 - this.$router.push({ name: "FlightAllocConfig" })
452 - }
453 - },
454 1056
455 - removes() { 1057 + let puporpux = []
456 - if (this.routeName == "FlightAllocConfigAdd") { 1058 + this.checkBoxItem.puporpux.forEach(item => {
457 - sessionStorage.setItem("flightAdd", "remove"); 1059 + if (item.status === 1 && obj.puporpuxCode.includes(item.chineseName)) {
458 - } else { 1060 + puporpux.push(item.chineseName)
459 - sessionStorage.setItem("flightInfo" + this.dataId, "remove"); 1061 + }
460 - } 1062 + })
461 - },
462 1063
463 - dictData() { 1064 + let service = []
464 - allDictData().then((response) => { 1065 + this.checkBoxItem.serviceCode.forEach(item => {
465 - if (response.code != 200) { 1066 + if (item.status === 1 && obj.serviceCode.includes(item.chineseName)) {
466 - this.msgError(response.msg) 1067 + service.push(item.chineseName)
467 - return; 1068 + }
468 - } 1069 + })
469 - let dict = response.data;
470 - this.cargoType = dict.cargoType;
471 - this.cargoStatus = dict.cargoStatus;
472 - this.serviceCode = this.dicSort(dict.serviceCode.sort((a, b) =>
473 - a.chineseName.localeCompare(b.chineseName)
474 - ));
475 - this.handlingCode = this.dicSort(this.sorttodo(dict.handlingCode, "BLANK"));
476 - this.subCategory = this.dicSort(this.sorttodo(dict.subCategory, "Blank"));
477 - });
478 - },
479 1070
480 - dicSort(val) { 1071 + let hand = []
481 - let status1 = [] 1072 + this.checkBoxItem.handlingCode.forEach(item => {
482 - let status0 = [] 1073 + if (item.status === 1 && obj.handlingCode.includes(item.chineseName)) {
483 - let arr = [] 1074 + hand.push(item.chineseName)
484 - val.forEach(item => { 1075 + }
485 - if (item.status == 1) { 1076 + })
486 - status1.push(item)
487 - } else {
488 - status0.push(item)
489 - }
490 - })
491 - arr = status1.concat(status0)
492 - return arr
493 - }
494 - },
495 1077
496 - beforeDestroy() { 1078 + let sub = []
497 - if (this.routeName == "FlightAllocConfigAdd") { 1079 + this.checkBoxItem.subCategory.forEach(item => {
498 - if (sessionStorage.getItem("flightAdd") == "remove") { 1080 + if (item.status === 1 && obj.subCategory.includes(item.chineseName)) {
499 - sessionStorage.removeItem("flightAdd"); 1081 + sub.push(item.chineseName)
500 - } else { 1082 + }
501 - sessionStorage.setItem("flightAdd", JSON.stringify(this.form)); 1083 + })
502 - } 1084 + obj.typeOfGoods = obj.typeOfGoods.toString().replace(/,/g, ';')
503 - } else { 1085 + obj.declarationCategory = obj.declarationCategory.toString(';').replace(/,/g, ';')
504 - if (sessionStorage.getItem("flightInfo" + this.dataId) == "remove") { 1086 + obj.puporpuxCode = puporpux.toString().replace(/,/g, ';')
505 - sessionStorage.removeItem("flightInfo" + this.dataId); 1087 + obj.serviceCode = service.toString().replace(/,/g, ';')
506 - } else { 1088 + obj.handlingCode = hand.toString().replace(/,/g, ';')
507 - if (this.handleName != "detail" && this.handleName != "DMdetail") { 1089 + obj.subCategory = sub.toString().replace(/,/g, ';')
508 - sessionStorage.setItem(
509 - "flightInfo" + this.dataId,
510 - JSON.stringify(this.form)
511 - );
512 - }
513 - }
514 - }
515 - },
516 1090
517 - computed: { 1091 + return obj
518 - includeUrsa: { 1092 + }
519 - get: function () { 1093 + },
520 - return this.form.includeUrsa; 1094 + //排序
521 - }, 1095 + sorttodo(arr, chineseName) {
522 - set: function (val) { 1096 + var index = 1,
523 - this.form.includeUrsa = this.upCase(val); 1097 + newArr = [],
524 - }, 1098 + length = arr.length;
525 - }, 1099 + for (var i = 0; i < length; i++) {
526 - notIncludeUrsa: { 1100 + if (arr[i].chineseName === chineseName) {
527 - get: function () { 1101 + newArr[0] = arr[i];
528 - return this.form.notIncludeUrsa; 1102 + } else {
529 - }, 1103 + newArr[index++] = arr[i];
530 - set: function (val) { 1104 + }
531 - this.form.notIncludeUrsa = this.upCase(val); 1105 + }
532 - }, 1106 + return newArr
533 - }, 1107 + },
534 - minNumOfPieces: { 1108 + dicSort(val) {
535 - get: function () { 1109 + let status1 = []
536 - return this.form.minNumOfPieces; 1110 + let status0 = []
537 - }, 1111 + let arr = []
538 - set: function (val) { 1112 + val.forEach(item => {
539 - const reg = /^[1-9]{0,}$/ 1113 + if (item.status == 1) {
540 - if (reg.test(val)) { 1114 + status1.push(item)
541 - this.form.minNumOfPieces = val 1115 + } else {
542 - } 1116 + status0.push(item)
543 - if (val == 0 || val == null || val == "-") { 1117 + }
544 - this.form.minNumOfPieces = undefined; 1118 + })
545 - } 1119 + arr = status1.concat(status0)
546 - }, 1120 + return arr
547 - }, 1121 + },
548 - maxNumOfPieces: { 1122 + //返回
549 - get: function () { 1123 + close() {
550 - return this.form.maxNumOfPieces; 1124 + this.$store.state.tagsView.visitedViews.splice(
551 - }, 1125 + this.$store.state.tagsView.visitedViews.findIndex(
552 - set: function (val) { 1126 + (item) => item.path === this.$route.path
553 - const reg = /^[1-9]{0,}$/ 1127 + ),
554 - if (reg.test(val)) { 1128 + );
555 - this.form.maxNumOfPieces = val 1129 + this.$router.push({ name: 'FlightAllocConfig' })
556 - } 1130 + },
557 - if (val == 0 || val == null || val == "-") {
558 - this.form.maxNumOfPieces = undefined;
559 - }
560 - },
561 - },
562 - minWeight: {
563 - get: function () {
564 - return this.form.minWeight;
565 - },
566 - set: function (val) {
567 - const reg = /^\d{1,1}\d*\.{0,1}\d{0,}$/
568 - console.log(reg.test(val))
569 - if (val == null || val == "-") {
570 - this.form.minWeight = undefined;
571 - } else if (!isNaN(val)) {
572 - this.form.minWeight = val;
573 - }
574 - },
575 - },
576 - maxWeight: {
577 - get: function () {
578 - return this.form.maxWeight;
579 - },
580 - set: function (val) {
581 - if (val == null || val == "-") {
582 - this.form.maxWeight = undefined;
583 - } else if (!isNaN(val)) {
584 - this.form.maxWeight = val;
585 - }
586 - },
587 }, 1131 },
588 - }, 1132 + computed: {}
589 -};
590 -</script>
591 -<style rel="stylesheet/scss" lang="scss">
592 -.el-textarea.is-disabled .el-textarea__inner {
593 - background-color: rgba(255, 255, 255, 0.5);
594 - color: #303133;
595 -}
596 -
597 -.el-input.is-disabled .el-input__inner {
598 - background-color: rgba(255, 255, 255, 0.5);
599 - color: #303133;
600 -}
601 -
602 -.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
603 - background-color: rgba(255, 255, 255, 0.5);
604 } 1133 }
1134 +</script>
605 1135
606 -.el-checkbox__input.is-disabled+span.el-checkbox__label { 1136 +<style lang="scss" scoped>
607 - color: #303133; 1137 +.fontWeight {
1138 + font-size: 16px;
1139 + font-weight: 700;
1140 + text-indent: 2em;
608 } 1141 }
609 1142
610 -.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after { 1143 +.rowPadding {
611 - border-color: #303133; 1144 + padding: 10px 50px;
1145 + font-size: 12px;
612 } 1146 }
613 1147
614 -.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner { 1148 +.routeTip {
615 - border-color: #606266; 1149 + margin-left: 35px;
1150 + margin-bottom: 20px;
1151 + font-size: 16px;
1152 + color: #ff4949;
616 } 1153 }
617 1154
618 .numberInput { 1155 .numberInput {
619 - input { 1156 + input {
620 - text-align: center; 1157 + text-align: center;
621 - } 1158 + }
622 } 1159 }
623 -</style> 1160 +</style>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -768,8 +768,10 @@ export default { ...@@ -768,8 +768,10 @@ export default {
768 let obj = { 768 let obj = {
769 handle: 'update', 769 handle: 'update',
770 fltNo: val.fltNo, 770 fltNo: val.fltNo,
771 - fltDate: val.fltDate, 771 + fltDate: val.fltDate ? val.fltDate : null,
772 - status: 'flightInformationMaintenance' 772 + route: val.flightKindName != 'Purple Tail' ? val.route : '',
773 + routeStatus: 'flightInformationMaintenance' + val.flightKindName,
774 + status: '1'
773 } 775 }
774 this.$router.push({ 776 this.$router.push({
775 name: 'FlightAllocConfigInfo', 777 name: 'FlightAllocConfigInfo',
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
16 </el-col> 16 </el-col>
17 </el-row> 17 </el-row>
18 </el-form> 18 </el-form>
19 - <Tables ref="cargoLog" ductName="cargoLog" :order="false" :data="data.tableData" :headerData="tableHeader" 19 + <Tables ref="cargoLog" ductName="cargoLog" :order="false" :border='false' :data="data.tableData"
20 - tableAlign="center" :showOverflowTooltip="false" :height="tableHeight" :page="selectData.page" 20 + :headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false" :height="tableHeight"
21 - :limitSize="selectData.size" :pageSizes="[100]" :pagination="false" :loading="loading" 21 + :page="selectData.page" :limitSize="selectData.size" :pageSizes="[100]" :pagination="false"
22 - @currentChange="currentChange"> 22 + :loading="loading" @currentChange="currentChange">
23 </Tables> 23 </Tables>
24 <div slot="footer" class="dialog-footer"> 24 <div slot="footer" class="dialog-footer">
25 <el-button @click="close">关 闭</el-button> 25 <el-button @click="close">关 闭</el-button>
...@@ -93,4 +93,5 @@ export default { ...@@ -93,4 +93,5 @@ export default {
93 </script> 93 </script>
94 94
95 <style scoped> 95 <style scoped>
96 +
96 </style> 97 </style>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
49 <el-col :span="6"> 49 <el-col :span="6">
50 <el-form-item label="配载航班号"> 50 <el-form-item label="配载航班号">
51 <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :rows="4" 51 <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :rows="4"
52 - clearable></el-input> 52 + clearable @change="planeNoChange"></el-input>
53 </el-form-item> 53 </el-form-item>
54 </el-col> 54 </el-col>
55 <el-col :span="6"> 55 <el-col :span="6">
...@@ -129,6 +129,24 @@ ...@@ -129,6 +129,24 @@
129 </el-select> 129 </el-select>
130 </el-form-item> 130 </el-form-item>
131 </el-col> 131 </el-col>
132 + <el-col :span="6">
133 + <el-form-item>
134 + <template slot="label">
135 + <div style="display:inline-block">配载航线
136 + <el-tooltip class="item" effect="dark" content="选择航线需要先输入配载航班号,才能选择对应得航线" placement="top-start">
137 + <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span>
138 + </el-tooltip>
139 + </div>
140 + </template>
141 + <el-select class="formItem" v-model="formData.cargoPlaneRoute" placeholder="不限"
142 + :disabled="routeList.length == 0" clearable @change="routeSelectChange"
143 + :key="formData.cargoPlaneRoute">
144 + <el-option v-for="(item, index) in routeList" :label="item" :value="item" :key="item">
145 + <Tooltips :content="item" :refName="item"></Tooltips>
146 + </el-option>
147 + </el-select>
148 + </el-form-item>
149 + </el-col>
132 </el-row> 150 </el-row>
133 </el-col> 151 </el-col>
134 </el-row> 152 </el-row>
...@@ -137,11 +155,11 @@ ...@@ -137,11 +155,11 @@
137 </el-button> 155 </el-button>
138 <el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'" 156 <el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
139 size="small" @click="xlse(0)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{ 157 size="small" @click="xlse(0)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
140 - downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果" 158 + downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
141 }}</el-button> 159 }}</el-button>
142 <el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'" 160 <el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
143 size="small" @click="xlse(1)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{ 161 size="small" @click="xlse(1)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
144 - downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果" 162 + downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
145 }}</el-button> 163 }}</el-button>
146 <el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']" 164 <el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']"
147 @click="release">释放舱位</el-button> 165 @click="release">释放舱位</el-button>
...@@ -170,7 +188,7 @@ ...@@ -170,7 +188,7 @@
170 <template v-slot:waybillNo="scope"> 188 <template v-slot:waybillNo="scope">
171 <el-link type="primary" @click="logView(scope.row)"> 189 <el-link type="primary" @click="logView(scope.row)">
172 {{ 190 {{
173 - scope.row.waybillNo 191 + scope.row.waybillNo
174 }}<i class="el-icon-link"></i> </el-link> 192 }}<i class="el-icon-link"></i> </el-link>
175 </template> 193 </template>
176 </Tables> 194 </Tables>
...@@ -192,7 +210,7 @@ ...@@ -192,7 +210,7 @@
192 </template> 210 </template>
193 211
194 <script> 212 <script>
195 -import { findConditionData, findCargoData, releaseCargo } from "@/api/cargoSelect"; 213 +import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes } from "@/api/cargoSelect";
196 import { downLoadXlsx } from "@/utils/zipdownload"; 214 import { downLoadXlsx } from "@/utils/zipdownload";
197 import Dialog from "./dialog.vue"; 215 import Dialog from "./dialog.vue";
198 216
...@@ -229,6 +247,7 @@ export default { ...@@ -229,6 +247,7 @@ export default {
229 cargoPlaneNo: null, 247 cargoPlaneNo: null,
230 cargoPlaneStart: null, 248 cargoPlaneStart: null,
231 cargoPlaneEnd: null, 249 cargoPlaneEnd: null,
250 + cargoPlaneRoute: null,
232 limitStart: 1, 251 limitStart: 1,
233 limitSize: 100, 252 limitSize: 100,
234 }, //表单数据 253 }, //表单数据
...@@ -286,8 +305,9 @@ export default { ...@@ -286,8 +305,9 @@ export default {
286 findConditionData: {}, //货物查询条件 305 findConditionData: {}, //货物查询条件
287 tableData: [], //表格数据 306 tableData: [], //表格数据
288 cargoLog: {}, 307 cargoLog: {},
289 - allWeight: 0, 308 + routeList: [],
290 - allQty: 0, 309 + allWeight: 0,//总重量
310 + allQty: 0,//总件数
291 shiftKey: false, 311 shiftKey: false,
292 valueFormat: "yyyy-MM-dd", 312 valueFormat: "yyyy-MM-dd",
293 tableLoading: false, 313 tableLoading: false,
...@@ -358,6 +378,8 @@ export default { ...@@ -358,6 +378,8 @@ export default {
358 this.formData.cargoPlaneStart = this.$route.params.fltDate 378 this.formData.cargoPlaneStart = this.$route.params.fltDate
359 this.formData.cargoPlaneEnd = this.$route.params.fltDate 379 this.formData.cargoPlaneEnd = this.$route.params.fltDate
360 this.formData.cargoPlaneNo = this.$route.params.fltNo 380 this.formData.cargoPlaneNo = this.$route.params.fltNo
381 + this.formData.cargoPlaneRoute = this.$route.params.route
382 + this.planeNoChange(this.formData.cargoPlaneNo)
361 this.select(0) 383 this.select(0)
362 } else { 384 } else {
363 //否则请求原页面缓存状态 385 //否则请求原页面缓存状态
...@@ -426,6 +448,8 @@ export default { ...@@ -426,6 +448,8 @@ export default {
426 this.formData.cargoPlaneStart = from.params.fltDate 448 this.formData.cargoPlaneStart = from.params.fltDate
427 this.formData.cargoPlaneEnd = from.params.fltDate 449 this.formData.cargoPlaneEnd = from.params.fltDate
428 this.formData.cargoPlaneNo = from.params.fltNo 450 this.formData.cargoPlaneNo = from.params.fltNo
451 + this.formData.cargoPlaneRoute = from.params.route
452 + this.planeNoChange(this.formData.cargoPlaneNo)
429 this.select(0) 453 this.select(0)
430 } 454 }
431 } 455 }
...@@ -462,20 +486,22 @@ export default { ...@@ -462,20 +486,22 @@ export default {
462 } 486 }
463 findCargoData(this.formData) 487 findCargoData(this.formData)
464 .then((res) => { 488 .then((res) => {
465 - if (res.code == 200) { 489 + setTimeout(() => {
466 - this.tableData = res.data.list; 490 + if (res.code == 200) {
467 - this.totalCount = res.data.totalCount; 491 + this.tableData = res.data.list;
468 - if (res.data.list.length > 0) { 492 + this.totalCount = res.data.totalCount;
469 - for (let i = 0; i < this.tableData.length; i++) { 493 + if (res.data.list.length > 0) {
470 - this.tableData[i].index = i; 494 + for (let i = 0; i < this.tableData.length; i++) {
495 + this.tableData[i].index = i;
496 + }
497 + } else {
498 + this.msgWarning('未查询到数据')
471 } 499 }
472 } else { 500 } else {
473 - this.msgWarning('未查询到数据') 501 + this.msgWarning(res.msg)
474 } 502 }
475 - } else { 503 + this.tableLoading = false;
476 - this.msgWarning(res.msg) 504 + })
477 - }
478 - this.tableLoading = false;
479 }) 505 })
480 .catch(() => { 506 .catch(() => {
481 this.tableLoading = false; 507 this.tableLoading = false;
...@@ -604,6 +630,22 @@ export default { ...@@ -604,6 +630,22 @@ export default {
604 this.page = val.page; 630 this.page = val.page;
605 this.select(); 631 this.select();
606 }, 632 },
633 + //配载航班号获取航线
634 + planeNoChange(val) {
635 + getFlightsRoutes(val.split(';')).then(res => {
636 + if (res.code === 200) {
637 + this.routeList = res.data
638 + } else {
639 + this.msgWarning(res.msg)
640 + }
641 + }).catch(err => {
642 + console.log(err)
643 + })
644 + },
645 + routeSelectChange(val) {
646 + this.$forceUpdate()
647 + // this.formData.cargoPlaneRoute = val
648 + },
607 //排序 649 //排序
608 sortChange(val) { 650 sortChange(val) {
609 let data = []; 651 let data = [];
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
42 </el-form-item> 42 </el-form-item>
43 </el-form> 43 </el-form>
44 <el-row class="card2"> 44 <el-row class="card2">
45 - <el-col :span="1" v-for="item in tableData"> 45 + <el-col :span="1" v-for="item in fltBox">
46 - <div class="fltBox" @click="rowClick(item)" 46 + <div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate, route: '' })"
47 :style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 100 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }"> 47 :style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 100 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }">
48 <div class="fltName">{{ item.fltNo }}</div> 48 <div class="fltName">{{ item.fltNo }}</div>
49 <div class="fltWeight">{{ (item.percentage == 0 ? 0 : ((item.percentage) * 100).toFixed(2)) + '%' }} 49 <div class="fltWeight">{{ (item.percentage == 0 ? 0 : ((item.percentage) * 100).toFixed(2)) + '%' }}
...@@ -88,6 +88,7 @@ export default { ...@@ -88,6 +88,7 @@ export default {
88 page: 1, 88 page: 1,
89 size: 1 89 size: 1
90 },//查询条件 90 },//查询条件
91 + fltBox: [],
91 tableData: [],//table数据 92 tableData: [],//table数据
92 tableHeader: this.tableHeaders['index'],//表头 93 tableHeader: this.tableHeaders['index'],//表头
93 fltKindIdList: [],//航班类型 94 fltKindIdList: [],//航班类型
...@@ -126,10 +127,12 @@ export default { ...@@ -126,10 +127,12 @@ export default {
126 }, 127 },
127 //获取首页信息(日期查询) 128 //获取首页信息(日期查询)
128 async getFlight() { 129 async getFlight() {
130 + this.fltBox = []
129 this.loading = true 131 this.loading = true
130 getOneDayFlight(this.selectData).then(res => { 132 getOneDayFlight(this.selectData).then(res => {
131 this.loading = false 133 this.loading = false
132 if (res.code === 200) { 134 if (res.code === 200) {
135 + this.getfltBox(JSON.parse(JSON.stringify(res.data.list)))
133 this.tableData = res.data.list 136 this.tableData = res.data.list
134 this.percentage = res.data.percentage 137 this.percentage = res.data.percentage
135 this.totalWeight = res.data.totalWeight 138 this.totalWeight = res.data.totalWeight
...@@ -142,11 +145,30 @@ export default { ...@@ -142,11 +145,30 @@ export default {
142 console.log(err) 145 console.log(err)
143 }) 146 })
144 }, 147 },
148 + getfltBox(val) {
149 + val.forEach(flt => {
150 + let status = 1
151 + this.fltBox.forEach(item => {
152 + if (item.fltNo == flt.fltNo) {
153 + item.percentage = flt.percentage + item.percentage
154 + status = 2
155 + }
156 + })
157 + if (status == 1) {
158 + this.fltBox.push(flt)
159 + }
160 + })
161 + },
145 //某行被点击 162 //某行被点击
146 rowClick(val) { 163 rowClick(val) {
147 let obj = {} 164 let obj = {}
148 obj.fltNo = val.fltNo 165 obj.fltNo = val.fltNo
149 obj.fltDate = val.fltDate 166 obj.fltDate = val.fltDate
167 + if (val.flightKindName == 'Purple Tail') {
168 + obj.route = ''
169 + } else {
170 + obj.route = val.route
171 + }
150 this.$router.push({ name: 'QueryCargo', params: obj }) 172 this.$router.push({ name: 'QueryCargo', params: obj })
151 }, 173 },
152 //翻页 174 //翻页
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
39 <el-input type="text" v-model="newDictionary.fltNo" disabled></el-input> 39 <el-input type="text" v-model="newDictionary.fltNo" disabled></el-input>
40 </el-form-item> 40 </el-form-item>
41 <el-form-item label="航线"> 41 <el-form-item label="航线">
42 - <Drag :data="routeList" @drag="drag"></Drag> 42 + <Drag :routes="routeList" @drag="drag"></Drag>
43 </el-form-item> 43 </el-form-item>
44 </div> 44 </div>
45 </div> 45 </div>
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
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 == '航线' ? '航线' : tableName == 'Site' ? '站点' : 6 <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' :
7 - tableName == 7 + tableName ==
8 - '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表" 8 + '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
9 }}</span> 9 }}</span>
10 <div style="float: right; padding: 3px 0"> 10 <div style="float: right; padding: 3px 0">
11 <span class="selectLabel mr10">切换字典表</span> 11 <span class="selectLabel mr10">切换字典表</span>
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
96 <template v-slot:fltNo="scope"> 96 <template v-slot:fltNo="scope">
97 <el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })"> 97 <el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })">
98 {{ 98 {{
99 - scope.row.fltNo 99 + scope.row.fltNo
100 }}<i class="el-icon-link"></i> </el-link> 100 }}<i class="el-icon-link"></i> </el-link>
101 </template> 101 </template>
102 <template slot="optionColumn"> 102 <template slot="optionColumn">
......
1 +<template>
2 + <div>
3 + <el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
4 + append-to-body center>
5 + <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
6 + label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
7 + <el-form-item label="货站名称" prop="goodsStation">
8 + <el-input type="text" v-model="formData.goodsStation" placeholder="请输入货站名称"></el-input>
9 + </el-form-item>
10 + <el-form-item label="品名" prop="goodsList">
11 + <el-input type="textarea" v-model="formData.goodsList" rows="4" placeholder="请输入品名,多个用“;”隔开">
12 + </el-input>
13 + </el-form-item>
14 + </el-form>
15 + <div slot="footer" class="dialog-footer">
16 + <el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
17 + <el-button @click="close">取 消</el-button>
18 + </div>
19 + </el-dialog>
20 + </div>
21 +</template>
22 +
23 +<script>
24 +import { batchAddGoods } from "@/api/goodsStation"
25 +
26 +export default {
27 + name: '',
28 + props: {
29 + open: {
30 + type: Boolean,
31 + default: false
32 + },
33 + },
34 + data() {
35 + return {
36 + formData: {
37 + goodsStation: null,
38 + goodsList: null
39 + },
40 + rules: {
41 + goodsStation: [
42 + {
43 + required: true,
44 + message: "货站名称不能为空",
45 + trigger: "blur",
46 + },
47 + ],
48 + goodsList: [
49 + {
50 + required: true,
51 + message: "品名不能为空",
52 + trigger: "blur",
53 + },
54 + ],
55 + },
56 + loading: false,
57 + }
58 + },
59 + watch: {
60 + },
61 + methods: {
62 + //提交
63 + submit() {
64 + let obj = {}
65 + obj.goodsStation = this.formData.goodsStation
66 + if (this.formData.goodsList != null && this.formData.goodsList != '') {
67 + obj.goodsList = this.formData.goodsList.split(';')
68 + }
69 + this.$refs['addForm'].validate(val => {
70 + if (val) {
71 + this.loading = true
72 + batchAddGoods(obj).then(res => {
73 + this.loading = false
74 + if (res.code === 200) {
75 + this.msgSuccess('添加成功')
76 + this.close()
77 + } else {
78 + this.msgWarning(res.msg)
79 + }
80 + }).catch(err => {
81 + this.loading = false
82 + console.log(err)
83 + })
84 + }
85 + })
86 + },
87 + //取消
88 + close() {
89 + this.formData = {
90 + goodsStation: null,
91 + goodsList: null
92 + }
93 + this.$refs["addForm"].clearValidate();
94 + this.$emit('close')
95 + }
96 +
97 + }
98 +}
99 +
100 +</script>
101 +
102 +<style lang="scss" scoped>
103 +
104 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div>
3 + <el-form class="form-header" ref="selectForm" label-width="auto" label-position="left"
4 + style="margin-bottom:10px" @submit.native.prevent size="small">
5 + <el-row>
6 + <el-col :span="6">
7 + <el-form-item label="货站名称">
8 + <el-input v-model="selectionData.goodsStation" placeholder="请输入货站名称" maxlength="50" clearable />
9 + </el-form-item>
10 + </el-col>
11 + </el-row>
12 + </el-form>
13 + <div style="display:flex;padding:10px 20px">
14 + <el-button icon="el-icon-search" type="primary" :loading="loading" size="small" @click="selection(1)">查 询
15 + </el-button>
16 + <el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['system:goodsStation:add']"
17 + @click="add">新 增
18 + </el-button>
19 + <el-button icon="el-icon-delete" type="danger" size="small" v-hasPermi="['system:goodsStation:delete']"
20 + style="margin-left:10px" :disabled="checkData.length==0" @click="batchDel">
21 + 删 除
22 + </el-button>
23 + <el-button type="primary" icon="el-icon-download" size="small" style="margin-right:10px"
24 + @click="downloadTempleate">下载模板
25 + </el-button>
26 + <el-upload action="/caPreReviewImport/importFlight" name="file" :http-request="uploadExcel"
27 + :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx"
28 + class="upload-demo">
29 + <el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button>
30 + </el-upload>
31 + </div>
32 + <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
33 + :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
34 + :limitSize="selectionData.size" :page="selectionData.page" layout="total,prev, pager, next, jumper, ->"
35 + :pageSizes="[100]" :height="tableHeight" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
36 + @currentChange="currentChange">
37 + <template slot="optionColumn">
38 + <el-table-column label="操作" align="center">
39 + <template slot-scope="scope">
40 + <el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
41 + v-hasPermi="['system:goodsStation:delete']" @click="del(scope.row)">删除</el-button>
42 + </template>
43 + </el-table-column>
44 + </template>
45 + </Tables>
46 + <Dialog :open="open" @close="close" />
47 + <UpDateResult :dialogVisible="resultOpen" :resultData="errorData" @close="resultClose" />
48 + </div>
49 +</template>
50 +
51 +<script>
52 +import { downLoadTemplate } from "@/api/flightInfoImport";
53 +import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation"
54 +import Dialog from './dialog.vue'
55 +import UpDateResult from './upDateResult.vue'
56 +
57 +export default {
58 + name: 'GoodsStation',
59 + components: {
60 + Dialog,
61 + UpDateResult
62 + },
63 + data() {
64 + return {
65 + selectionData: {
66 + goodsStation: '',
67 + size: 20,
68 + page: 1
69 + },
70 + tableData: [],
71 + tableHeader: this.tableHeaders['goodsStation'],
72 + checkData: [],
73 + fileList: [],
74 + errorData: [],
75 + tableHeight: null,
76 + totalCount: 0,
77 + loading: false,
78 + open: false,
79 + resultOpen: false,
80 + }
81 + },
82 + created() {
83 +
84 + },
85 + mounted() {
86 + this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200
87 + this.selection(1)
88 + },
89 + watch: {
90 + $route(to, from) {
91 + if (to.name == 'GoodsStation') {
92 + this.selection()
93 + }
94 + }
95 + },
96 + methods: {
97 + //查询
98 + selection(val) {
99 + this.tableData = []
100 + this.checkData = []
101 + this.loading = true
102 + if (val === 1) {
103 + this.selectionData.page = 1
104 + }
105 + searchGoods(this.selectionData).then(res => {
106 + this.loading = false
107 + if (res.code === 200) {
108 + this.tableData = res.data.list
109 + this.totalCount = res.data.total
110 + } else {
111 + this.msgWarning(res.msg)
112 + }
113 + }).catch(err => {
114 + this.loading = false
115 + console.log(err)
116 + })
117 + },
118 + //新增
119 + add() {
120 + this.open = true
121 + },
122 + //删除
123 + del(val) {
124 + this.$confirm("是否要删除这条记录!", "注意!", {
125 + confirmButtonText: "确定",
126 + cancelButtonText: '取消',
127 + type: "warning",
128 + }).then(() => {
129 + this.deleteGoods([val.id])
130 + }).catch(() => {
131 +
132 + })
133 + },
134 + //批量删除
135 + batchDel() {
136 + let arr = []
137 + this.checkData.forEach(item => {
138 + arr.push(item.id)
139 + })
140 + this.$confirm("是否要删除这些记录!", "注意!", {
141 + confirmButtonText: "确定",
142 + cancelButtonText: '取消',
143 + type: "warning",
144 + }).then(() => {
145 + this.deleteGoods(arr)
146 + }).catch(() => {
147 +
148 + })
149 + },
150 + //删除请求
151 + deleteGoods(val) {
152 + batchDeleteGoods(val).then(res => {
153 + if (res.code === 200) {
154 + this.msgSuccess('删除成功!')
155 + this.selection(1)
156 + } else {
157 + this.msgWarning(res.msg)
158 + }
159 + }).catch(err => {
160 + console.log(err)
161 + })
162 + },
163 + //复选
164 + tableSelect(val) {
165 + this.checkData = val.selection
166 + },
167 + //全选
168 + tableSelectAll(val) {
169 + this.checkData = val
170 + },
171 + //分页
172 + currentChange(val) {
173 + this.selectionData.page = val.page
174 + this.selection()
175 + },
176 + //上传excel
177 + uploadExcel(option) {
178 + const file = option.file;
179 + this.loading = true;
180 + importGoods(file, '').then((res) => {
181 + this.loading = false;
182 + if (res.code != 200) {
183 + if (res.code == 603) {
184 + this.$alert(res.msg, "提示", {
185 + confirmButtonText: "确定",
186 + type: "warning",
187 + });
188 + } else {
189 + this.$message.warning(res.msg);
190 + this.errorData = res.data;
191 + if (this.errorData.length > 0) {
192 + this.resultOpen = true
193 + }
194 + }
195 + } else {
196 + this.$message.success(res.msg);
197 + this.errorData = res.data;
198 + this.selection(1)
199 + }
200 + });
201 + },
202 + //下载模板
203 + downloadTempleate() {
204 + downLoadTemplate('goodsStation').then((res) => {
205 + if (res) {
206 + const blob = new Blob([res]);
207 + const link = document.createElement("a"); //创建a标签
208 + link.download = '货物品名模板.xlsx'; //a标签添加属性
209 + link.style.display = "none";
210 + link.href = URL.createObjectURL(blob);
211 + document.body.appendChild(link);
212 + link.click(); //执行下载
213 + URL.revokeObjectURL(link.href); //释放url
214 + document.body.removeChild(link); //释放标签
215 + } else {
216 + this.$message.error("下载失败");
217 + }
218 + })
219 + },
220 + handleRemove(file, fileList) {
221 + //清掉上传的文件
222 + this.errorData = [];
223 + this.fileList = [];
224 + },
225 + handleExceed(files) {
226 + //重复上传文件
227 + let file = {};
228 + file.file = files[0];
229 + file.name = files[0].name;
230 + this.fileList = [];
231 + this.fileList.push(file);
232 + this.uploadExcel(file);
233 + },
234 + close() {
235 + this.open = false
236 + this.selection(1)
237 + },
238 + resultClose() {
239 + this.resultOpen = false
240 + this.selection(1)
241 + }
242 + }
243 +}
244 +
245 +</script>
246 +
247 +<style lang="scss" scoped>
248 +.upload-demo {
249 + display: flex;
250 +
251 + .el-upload-list__item:first-child {
252 + margin-top: 5px !important;
253 + }
254 +
255 + .el-upload-list {
256 + display: inline-block;
257 + margin-left: 10px;
258 + }
259 +}
260 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div>
3 + <el-dialog title="新 增" :visible.sync="dialogVisible" width="50%" top="1vh" :close-on-click-modal="false"
4 + :show-close="false" append-to-body center>
5 + <el-table ref="filterTable" class="mt20" :data="resultData" size="small" border>
6 + <el-table-column label="行号" prop="line" width="50" align="center">
7 + </el-table-column>
8 + <el-table-column label="错误信息" prop="errorMessage" width="200">
9 + <template slot-scope="scope">
10 + <div v-for="(m, key) in scope.row.errorMessage" :key="key">
11 + {{ m }}
12 + </div>
13 + </template>
14 + </el-table-column>
15 + <el-table-column v-if="resultData.length == 0"></el-table-column>
16 + <el-table-column v-for="(value, key) in this.resultData[0]" :key="key"
17 + v-if="key != 'errorMessage' && key != 'line'" header-align="center" align="center" :label="key"
18 + :prop="key"></el-table-column>
19 + </el-table>
20 + <div slot="footer" class="dialog-footer">
21 + <el-button @click="close">取 消</el-button>
22 + </div>
23 + </el-dialog>
24 + </div>
25 +</template>
26 +
27 +<script>
28 +
29 +export default {
30 + name: 'UpDateResult',
31 + props: {
32 + dialogVisible: {
33 + type: Boolean,
34 + default: false
35 + },
36 + resultData: {
37 + type: Array,
38 + default: null
39 + }
40 + },
41 + data() {
42 + return {
43 + }
44 + },
45 + wactch: {
46 + dialogVisible(val) {
47 + if (val) {
48 + }
49 + }
50 + },
51 + methods: {
52 + close() {
53 + this.$emit('close')
54 + }
55 + }
56 +}
57 +</script>
58 +
59 +<style lang="scss" scoped>
60 +
61 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div>
3 + <el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
4 + append-to-body center>
5 + <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
6 + label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
7 + <el-form-item label="货站名称" prop="goodsStation">
8 + <el-input type="text" v-model="formData.goodsStation" placeholder="请输入货站名称"></el-input>
9 + </el-form-item>
10 + <el-form-item label="航班" prop="flightList">
11 + <el-input type="textarea" v-model="formData.flightList" rows="4" placeholder="请输入航班,多个用“;”隔开">
12 + </el-input>
13 + </el-form-item>
14 + </el-form>
15 + <div slot="footer" class="dialog-footer">
16 + <el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
17 + <el-button @click="close">取 消</el-button>
18 + </div>
19 + </el-dialog>
20 + </div>
21 +</template>
22 +
23 +<script>
24 +import { batchAddStationFlight } from '@/api/goodsStationFlight'
25 +
26 +export default {
27 + name: '',
28 + props: {
29 + open: {
30 + type: Boolean,
31 + default: false
32 + },
33 + },
34 + data() {
35 + return {
36 + formData: {
37 + goodsStation: null,
38 + flightList: null
39 + },
40 + rules: {
41 + goodsStation: [
42 + {
43 + required: true,
44 + message: "货站名称不能为空",
45 + trigger: "blur",
46 + },
47 + ],
48 + flightList: [
49 + {
50 + required: true,
51 + message: "航班号不能为空",
52 + trigger: "blur",
53 + },
54 + ],
55 + },
56 + loading: false,
57 + }
58 + },
59 + watch: {
60 + },
61 + methods: {
62 + //提交
63 + submit() {
64 + let obj = {}
65 + obj.goodsStation = this.formData.goodsStation
66 + if (this.formData.flightList != null && this.formData.flightList != '') {
67 + obj.flightList = this.formData.flightList.split(';')
68 + }
69 + this.$refs['addForm'].validate(val => {
70 + if (val) {
71 + this.loading = true
72 + batchAddStationFlight(obj).then(res => {
73 + this.loading = false
74 + if (res.code === 200) {
75 + this.msgSuccess('添加成功!')
76 + this.close()
77 + } else {
78 + this.msgWarning(res.msg)
79 + }
80 + }).catch(err => {
81 + this.loading = false
82 + console.log(err)
83 + })
84 + }
85 + })
86 + },
87 + //取消
88 + close() {
89 + this.$refs["addForm"].clearValidate();
90 + this.$emit('close')
91 + }
92 + }
93 +}
94 +
95 +</script>
96 +
97 +<style lang="scss" scoped>
98 +
99 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div>
3 + <el-form class="form-header" ref="dictForm" label-width="auto" label-position="left" style="margin-bottom:10px"
4 + @submit.native.prevent size="small">
5 + <el-row>
6 + <el-col :span="6">
7 + <el-form-item label="货站名称">
8 + <el-input v-model="selectionData.goodsStation" placeholder="请输入货站名称" maxlength="50" clearable />
9 + </el-form-item>
10 + </el-col>
11 + </el-row>
12 + </el-form>
13 + <div style="display:flex;padding:10px 20px">
14 + <el-button icon="el-icon-search" :loading="loading" type="primary" size="small" @click="selection(1)">查 询
15 + </el-button>
16 + <el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['system:goodsStationFlight:add']"
17 + @click="add">新 增
18 + </el-button>
19 + <el-button icon="el-icon-delete" type="danger" size="small" style="margin:0 10px"
20 + :disabled="checkData.length == 0" v-hasPermi="['system:goodsStationFlight:delete']" @click="batchDel">
21 + 删 除
22 + </el-button>
23 + </div>
24 + <Tables ref="goodsStationFlight" ductName="goodsStationFlight" :data="tableData" :headerData="tableHeader"
25 + :selection="true" :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
26 + :limitSize="selectionData.size" :page="selectionData.page" layout="total,prev, pager, next, jumper, ->"
27 + :pageSizes="[100]" :height="tableHeight" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
28 + @currentChange="currentChange">
29 + <template slot="optionColumn">
30 + <el-table-column label="操作" align="center">
31 + <template slot-scope="scope">
32 + <el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
33 + v-hasPermi="['system:goodsStationFlight:delete']" @click="del(scope.row)">删除</el-button>
34 + </template>
35 + </el-table-column>
36 + </template>
37 + </Tables>
38 + <Dialog :open="open" @close="close" />
39 + </div>
40 +</template>
41 +
42 +<script>
43 +import { searchStationFlight, batchDeleteGoods } from '@/api/goodsStationFlight'
44 +import Dialog from './dialog.vue'
45 +
46 +export default {
47 + name: 'GoodsStationFlight',
48 + components: {
49 + Dialog
50 + },
51 + data() {
52 + return {
53 + selectionData: {
54 + size: 20,
55 + page: 1
56 + },
57 + tableData: [],
58 + tableHeader: this.tableHeaders['goodsStationFlight'],
59 + checkData: [],
60 + tableHeight: null,
61 + totalCount: 0,
62 + loading: false,
63 + open: false,
64 + }
65 + },
66 + created() {
67 + },
68 + mounted() {
69 + this.tableHeight = window.innerHeight - this.$refs.goodsStationFlight.$el.offsetHeight - 200
70 + this.selection(1)
71 + },
72 + watch: {
73 + $route(to, from) {
74 + if (to.name == 'GoodsStationFlight') {
75 + this.selection()
76 + }
77 + }
78 + },
79 + methods: {
80 + //查询
81 + selection(val) {
82 + this.tableData = []
83 + this.checkData = []
84 + this.loading = true
85 + if (val == 1) {
86 + this.selectionData.page = 1
87 + }
88 + searchStationFlight(this.selectionData).then(res => {
89 + this.loading = false
90 + if (res.code === 200) {
91 + this.tableData = res.data.list
92 + this.totalCount = res.data.total
93 + } else {
94 + this.msgWarning(res.msg)
95 + }
96 + }).catch(err => {
97 + his.loading = false
98 + console.log(err)
99 + })
100 + },
101 + add() {
102 + this.open = true
103 + },
104 + //删除
105 + del(val) {
106 + this.$confirm("是否要删除这条记录!", "注意!", {
107 + confirmButtonText: "确定",
108 + cancelButtonText: '取消',
109 + type: "warning",
110 + }).then(() => {
111 + this.deleteGoods([val.id])
112 + }).catch(() => { })
113 + },
114 + //批量删除
115 + batchDel() {
116 + let arr = []
117 + this.checkData.forEach(item => {
118 + arr.push(item.id)
119 + })
120 + this.$confirm("是否要删除这些记录!", "注意!", {
121 + confirmButtonText: "确定",
122 + cancelButtonText: '取消',
123 + type: "warning",
124 + }).then(() => {
125 + this.deleteGoods(arr)
126 + }).catch(() => {
127 +
128 + })
129 + },
130 + //删除请求
131 + deleteGoods(val) {
132 + batchDeleteGoods(val).then(res => {
133 + if (res.code === 200) {
134 + this.msgSuccess('操作成功!')
135 + this.selection(1)
136 + } else {
137 + this.msgWarning(res.msg)
138 + }
139 + }).catch(err => {
140 + console.log(err)
141 + })
142 + },
143 + //复选
144 + tableSelect(val) {
145 + this.checkData = val.selection
146 + },
147 + //全选
148 + tableSelectAll(val) {
149 + this.checkData = val
150 + },
151 + //分页
152 + currentChange(val) {
153 + this.selectionData.page = val.page
154 + this.selection()
155 + },
156 + close() {
157 + this.open = false
158 + this.selection(1)
159 + }
160 + }
161 +}
162 +
163 +</script>
164 +
165 +<style lang="scss" scoped>
166 +
167 +</style>
...@@ -64,14 +64,14 @@ ...@@ -64,14 +64,14 @@
64 <template v-slot:awbNbr="scope"> 64 <template v-slot:awbNbr="scope">
65 <el-link type="primary" @click="gotoWeatherTable(scope.row)"> 65 <el-link type="primary" @click="gotoWeatherTable(scope.row)">
66 {{ 66 {{
67 - scope.row.awbNbr 67 + scope.row.awbNbr
68 }}<i class="el-icon-link"></i> </el-link> 68 }}<i class="el-icon-link"></i> </el-link>
69 </template> 69 </template>
70 <template v-slot:flightFltNo="scope"> 70 <template v-slot:flightFltNo="scope">
71 <el-link v-if="scope.row.allocDimId" type="primary" 71 <el-link v-if="scope.row.allocDimId" type="primary"
72 - @click="$router.push({ name: 'FlightAllocConfigInfo', params: { handle: 'DMdetail', id: scope.row.allocDimId } })"> 72 + @click="$router.push({ name: 'FlightAllocConfigInfo', params: { id: scope.row.allocDimId, handle: 'detail', fltNo: scope.row.flightFltNo, fltDate: scope.row.flightFltDate ? scope.row.flightFltDate : ' ', routeStatus: 'dmLog', route: scope.row.currentFlightRoute } })">
73 {{ 73 {{
74 - scope.row.flightFltNo 74 + scope.row.flightFltNo
75 }}<i class="el-icon-link"></i> </el-link> 75 }}<i class="el-icon-link"></i> </el-link>
76 <span v-else>{{ scope.row.flightFltNo }}</span> 76 <span v-else>{{ scope.row.flightFltNo }}</span>
77 </template> 77 </template>
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
153 getDmFlowInformation('accsId=' + val.dmAccsId).then(res => { 153 getDmFlowInformation('accsId=' + val.dmAccsId).then(res => {
154 if (res.code === 200) { 154 if (res.code === 200) {
155 if (res.data.list.length > 0) { 155 if (res.data.list.length > 0) {
156 - this.$router.push({ name: 'weatherTable', params: { data: res.data.list } }) 156 + this.$router.push({ name: 'weatherTable', params: { data: res.data.list, awbNbr: val.awbNbr } })
157 } else { 157 } else {
158 this.msgWarning('未查询到该条数据的流水') 158 this.msgWarning('未查询到该条数据的流水')
159 } 159 }
......
1 <template> 1 <template>
2 <div style="padding:10px"> 2 <div style="padding:10px">
3 + <el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button>
3 <el-card header="流水信息"> 4 <el-card header="流水信息">
4 - <Tables ref="weatherTable" ductName="weatherTable" :order="true" :data="data" :headerData="tableHeader" 5 + <Tables ref="weatherTable" ductName="weatherTable" :order="true" :border="false" :data="data"
5 - :showOverflowTooltip="false" :height="tableHeight" :page="selectData.page" :limitSize="selectData.size" 6 + :headerData="tableHeader" :showOverflowTooltip="false" :height="tableHeight" :page="selectData.page"
6 - :pageSizes="[100]" :pagination="false" :loading="loading" @currentChange="currentChange"> 7 + :limitSize="selectData.size" :pageSizes="[100]" :pagination="false" :loading="loading"
8 + @currentChange="currentChange">
7 </Tables> 9 </Tables>
8 - <div class="ml20 mt20">
9 - <el-button size="small" @click="close">返 回</el-button>
10 - </div>
11 </el-card> 10 </el-card>
12 </div> 11 </div>
13 </template> 12 </template>
...@@ -70,7 +69,6 @@ export default { ...@@ -70,7 +69,6 @@ export default {
70 (item) => item.path === this.$route.path 69 (item) => item.path === this.$route.path
71 ), 70 ),
72 ); 71 );
73 - sessionStorage.removeItem('accsid')
74 this.$router.push({ name: 'DmLog' }) 72 this.$router.push({ name: 'DmLog' })
75 }, 73 },
76 //翻页 74 //翻页
...@@ -80,4 +78,5 @@ export default { ...@@ -80,4 +78,5 @@ export default {
80 </script> 78 </script>
81 79
82 <style> 80 <style>
81 +
83 </style> 82 </style>
...\ No newline at end of file ...\ No newline at end of file
......