Showing
35 changed files
with
3425 additions
and
733 deletions
| ... | @@ -42,11 +42,11 @@ export function findCargoAllocationData(data) { | ... | @@ -42,11 +42,11 @@ export function findCargoAllocationData(data) { |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | //手动配舱 | 44 | //手动配舱 |
| 45 | -export function allocationFlight(data){ | 45 | +export function allocationFlight(data) { |
| 46 | return request({ | 46 | return request({ |
| 47 | - url:'/cargo/allocationFlight', | 47 | + url: '/cargo/allocationFlight', |
| 48 | - method:'post', | 48 | + method: 'post', |
| 49 | - data:data | 49 | + data: data |
| 50 | }) | 50 | }) |
| 51 | } | 51 | } |
| 52 | 52 | ||
| ... | @@ -68,3 +68,41 @@ export function releaseCargo(data) { | ... | @@ -68,3 +68,41 @@ export function releaseCargo(data) { |
| 68 | data: data, | 68 | data: data, |
| 69 | }) | 69 | }) |
| 70 | } | 70 | } |
| 71 | + | ||
| 72 | +//航班号+日期查询航线(手动配舱) | ||
| 73 | +/** | ||
| 74 | + * @param fltDate * 航班日期 | ||
| 75 | + * @param fltNo * 航班号 | ||
| 76 | + */ | ||
| 77 | +export function findFlightRoute(data) { | ||
| 78 | + return request({ | ||
| 79 | + url: '/cargo/findFlightRoute', | ||
| 80 | + method: 'post', | ||
| 81 | + data: data | ||
| 82 | + }) | ||
| 83 | +} | ||
| 84 | + | ||
| 85 | +//航班号+日期查询ACCS航线(手动配舱查询项) | ||
| 86 | +/** | ||
| 87 | + * @param fltDateAccs 航班日期 | ||
| 88 | + * @param fltNoAccs 航班号 | ||
| 89 | + */ | ||
| 90 | +export function getAccsRoute(data) { | ||
| 91 | + return request({ | ||
| 92 | + url: '/dmDataLog/getAccsRoute', | ||
| 93 | + method: 'post', | ||
| 94 | + data: data | ||
| 95 | + }) | ||
| 96 | +} | ||
| 97 | + | ||
| 98 | +//航班号+日期查询ACCS航线(货物查询查询项) | ||
| 99 | +/** | ||
| 100 | + * @param fltNoAccs 航班号 list | ||
| 101 | + */ | ||
| 102 | +export function getFlightsRoutes(data) { | ||
| 103 | + return request({ | ||
| 104 | + url: '/dictionary/getFlightsRoutes', | ||
| 105 | + method: 'post', | ||
| 106 | + data: data | ||
| 107 | + }) | ||
| 108 | +} | ... | ... |
| 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 | ... | ... |
src/api/goodsStation.js
0 → 100644
| 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 |
src/api/goodsStationFlight.js
0 → 100644
| 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 |
src/api/home.js
0 → 100644
| ... | @@ -129,7 +129,7 @@ export function addFlight(data) { | ... | @@ -129,7 +129,7 @@ export function addFlight(data) { |
| 129 | }) | 129 | }) |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | -//虚拟航班新增 | 132 | +//虚拟航班删除 |
| 133 | /** | 133 | /** |
| 134 | * @param flightNo 航班名称 list * | 134 | * @param flightNo 航班名称 list * |
| 135 | */ | 135 | */ |
| ... | @@ -140,3 +140,67 @@ export function delFlight(data) { | ... | @@ -140,3 +140,67 @@ export function delFlight(data) { |
| 140 | data: data | 140 | data: data |
| 141 | }) | 141 | }) |
| 142 | } | 142 | } |
| 143 | + | ||
| 144 | +//查询航线 | ||
| 145 | +/** | ||
| 146 | + * @param fltNo 航班号 | ||
| 147 | + * @param page 页数 | ||
| 148 | + * @param size 页长 | ||
| 149 | + */ | ||
| 150 | +export function queryRoute(data) { | ||
| 151 | + return request({ | ||
| 152 | + url: '/dictionary/queryRoute', | ||
| 153 | + method: 'post', | ||
| 154 | + data: data | ||
| 155 | + }) | ||
| 156 | +} | ||
| 157 | + | ||
| 158 | +//新增航线 | ||
| 159 | +/** | ||
| 160 | + * @param fltNo 航班号 * | ||
| 161 | + * @param route 航线 * | ||
| 162 | + */ | ||
| 163 | +export function addRoute(data) { | ||
| 164 | + return request({ | ||
| 165 | + url: '/dictionary/addRoute', | ||
| 166 | + method: 'post', | ||
| 167 | + data: data | ||
| 168 | + }) | ||
| 169 | +} | ||
| 170 | + | ||
| 171 | +//删除航线 | ||
| 172 | +/** | ||
| 173 | + * @param id * | ||
| 174 | + */ | ||
| 175 | +export function delRoute(data) { | ||
| 176 | + return request({ | ||
| 177 | + url: '/dictionary/delRoute', | ||
| 178 | + method: 'post', | ||
| 179 | + data: data | ||
| 180 | + }) | ||
| 181 | +} | ||
| 182 | + | ||
| 183 | +//航线排序 | ||
| 184 | +/** | ||
| 185 | + * @param id * | ||
| 186 | + */ | ||
| 187 | +export function orderRoute(data) { | ||
| 188 | + return request({ | ||
| 189 | + url: '/dictionary/orderRoute', | ||
| 190 | + method: 'post', | ||
| 191 | + data: data | ||
| 192 | + }) | ||
| 193 | +} | ||
| 194 | + | ||
| 195 | +//航线删除确认 | ||
| 196 | +/** | ||
| 197 | + * @param fltNo 航班号 | ||
| 198 | + * @param route 航线 | ||
| 199 | + */ | ||
| 200 | +export function checkFlightRoute(data) { | ||
| 201 | + return request({ | ||
| 202 | + url: '/FlightPreserveController/checkFlightRoute', | ||
| 203 | + method: 'post', | ||
| 204 | + data: data | ||
| 205 | + }) | ||
| 206 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
src/assets/icons/svg/drag-text.svg
0 → 100644
| 1 | +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1660113358419" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2396" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); } | ||
| 2 | +</style></defs><path d="M393.846154 78.769231c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.76923-78.769231-35.446154-78.769231-78.76923 35.446154-78.769231 78.769231-78.769231z m236.307692 0c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.76923-78.769231-35.446154-78.769231-78.76923 35.446154-78.769231 78.769231-78.769231zM393.846154 315.076923c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.769231z m236.307692 0c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.769231zM393.846154 551.384615c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.769231z m236.307692 0c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.769231zM393.846154 787.692308c43.323077 0 78.769231 35.446154 78.769231 78.76923s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.76923z m236.307692 0c43.323077 0 78.769231 35.446154 78.769231 78.76923s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.76923z" p-id="2397"></path></svg> | ||
| ... | \ 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": "处理失败(系统异常)", | ... | ... |
| ... | @@ -13,26 +13,26 @@ let tableHeaders = { | ... | @@ -13,26 +13,26 @@ let tableHeaders = { |
| 13 | status: 1 | 13 | status: 1 |
| 14 | }, | 14 | }, |
| 15 | { | 15 | { |
| 16 | - columnChineseName: "总重量(KG)", | 16 | + columnChineseName: "航线", |
| 17 | - columnName: "totalWeight", | 17 | + columnName: "route", |
| 18 | columnWidth: "", | 18 | columnWidth: "", |
| 19 | status: 1 | 19 | status: 1 |
| 20 | }, | 20 | }, |
| 21 | { | 21 | { |
| 22 | - columnChineseName: "已配重量(KG)", | 22 | + columnChineseName: "总重量(KG)", |
| 23 | - columnName: "allocationWeight", | 23 | + columnName: "totalWeight", |
| 24 | columnWidth: "", | 24 | columnWidth: "", |
| 25 | status: 1 | 25 | status: 1 |
| 26 | }, | 26 | }, |
| 27 | { | 27 | { |
| 28 | - columnChineseName: "总体积(cm³)", | 28 | + columnChineseName: "已配重量(KG)", |
| 29 | - columnName: "totalVolumn", | 29 | + columnName: "allocationWeight", |
| 30 | columnWidth: "", | 30 | columnWidth: "", |
| 31 | status: 1 | 31 | status: 1 |
| 32 | }, | 32 | }, |
| 33 | { | 33 | { |
| 34 | - columnChineseName: "已配体积(cm³)", | 34 | + columnChineseName: "已配体积(m³)", |
| 35 | - columnName: "allocationVolumn", | 35 | + columnName: "allocatedVolume", |
| 36 | columnWidth: "", | 36 | columnWidth: "", |
| 37 | status: 1 | 37 | status: 1 |
| 38 | }, | 38 | }, |
| ... | @@ -173,6 +173,13 @@ let tableHeaders = { | ... | @@ -173,6 +173,13 @@ let tableHeaders = { |
| 173 | status: 1 | 173 | status: 1 |
| 174 | }, | 174 | }, |
| 175 | { | 175 | { |
| 176 | + columnChineseName: "体积", | ||
| 177 | + columnName: "volume", | ||
| 178 | + columnWidth: "100", | ||
| 179 | + ext1: "sorTable", | ||
| 180 | + status: 1 | ||
| 181 | + }, | ||
| 182 | + { | ||
| 176 | columnChineseName: "收件人国家代码", | 183 | columnChineseName: "收件人国家代码", |
| 177 | columnName: "consigneeCountry", | 184 | columnName: "consigneeCountry", |
| 178 | columnWidth: "150", | 185 | columnWidth: "150", |
| ... | @@ -227,6 +234,13 @@ let tableHeaders = { | ... | @@ -227,6 +234,13 @@ let tableHeaders = { |
| 227 | status: 1 | 234 | status: 1 |
| 228 | }, | 235 | }, |
| 229 | { | 236 | { |
| 237 | + columnChineseName: "终配航线", | ||
| 238 | + columnName: "finalFlightRoute", | ||
| 239 | + columnWidth: "140", | ||
| 240 | + ext1: "sorTable", | ||
| 241 | + status: 1, | ||
| 242 | + }, | ||
| 243 | + { | ||
| 230 | columnChineseName: "二配航班号", | 244 | columnChineseName: "二配航班号", |
| 231 | columnName: "twoMatchFlightNo", | 245 | columnName: "twoMatchFlightNo", |
| 232 | columnWidth: "120", | 246 | columnWidth: "120", |
| ... | @@ -241,6 +255,13 @@ let tableHeaders = { | ... | @@ -241,6 +255,13 @@ let tableHeaders = { |
| 241 | status: 1 | 255 | status: 1 |
| 242 | }, | 256 | }, |
| 243 | { | 257 | { |
| 258 | + columnChineseName: "二配航线", | ||
| 259 | + columnName: "twoFlightRoute", | ||
| 260 | + columnWidth: "140", | ||
| 261 | + ext1: "sorTable", | ||
| 262 | + status: 1, | ||
| 263 | + }, | ||
| 264 | + { | ||
| 244 | columnChineseName: "预配航班号", | 265 | columnChineseName: "预配航班号", |
| 245 | columnName: "preplanFlightNo", | 266 | columnName: "preplanFlightNo", |
| 246 | columnWidth: "120", | 267 | columnWidth: "120", |
| ... | @@ -406,6 +427,12 @@ let tableHeaders = { | ... | @@ -406,6 +427,12 @@ let tableHeaders = { |
| 406 | status: 1 | 427 | status: 1 |
| 407 | }, | 428 | }, |
| 408 | { | 429 | { |
| 430 | + columnChineseName: "航线", | ||
| 431 | + columnName: "flightRoute", | ||
| 432 | + columnWidth: "140", | ||
| 433 | + status: 1 | ||
| 434 | + }, | ||
| 435 | + { | ||
| 409 | columnChineseName: "ACCS原航班日期", | 436 | columnChineseName: "ACCS原航班日期", |
| 410 | columnName: "accsFlightDate", | 437 | columnName: "accsFlightDate", |
| 411 | columnWidth: "140", | 438 | columnWidth: "140", |
| ... | @@ -420,7 +447,7 @@ let tableHeaders = { | ... | @@ -420,7 +447,7 @@ let tableHeaders = { |
| 420 | { | 447 | { |
| 421 | columnChineseName: "货物状态", | 448 | columnChineseName: "货物状态", |
| 422 | columnName: "cargoStatus", | 449 | columnName: "cargoStatus", |
| 423 | - columnWidth: "80", | 450 | + columnWidth: "100", |
| 424 | status: 1 | 451 | status: 1 |
| 425 | }, | 452 | }, |
| 426 | { | 453 | { |
| ... | @@ -458,18 +485,6 @@ let tableHeaders = { | ... | @@ -458,18 +485,6 @@ let tableHeaders = { |
| 458 | status: 1 | 485 | status: 1 |
| 459 | }, | 486 | }, |
| 460 | { | 487 | { |
| 461 | - columnChineseName: "航班起飞时间", | ||
| 462 | - columnName: "takeOffTime", | ||
| 463 | - columnWidth: "120", | ||
| 464 | - status: 1 | ||
| 465 | - }, | ||
| 466 | - { | ||
| 467 | - columnChineseName: "Pre-MDE CutOff时间", | ||
| 468 | - columnName: "cutOffTime", | ||
| 469 | - columnWidth: "150", | ||
| 470 | - status: 1 | ||
| 471 | - }, | ||
| 472 | - { | ||
| 473 | columnChineseName: "航班号", | 488 | columnChineseName: "航班号", |
| 474 | columnName: "fltNo", | 489 | columnName: "fltNo", |
| 475 | columnWidth: "100", | 490 | columnWidth: "100", |
| ... | @@ -524,13 +539,7 @@ let tableHeaders = { | ... | @@ -524,13 +539,7 @@ let tableHeaders = { |
| 524 | status: 1 | 539 | status: 1 |
| 525 | }, | 540 | }, |
| 526 | { | 541 | { |
| 527 | - columnChineseName: "总体积(cm³)", | 542 | + columnChineseName: "已配体积(m³)", |
| 528 | - columnName: "totalVolume", | ||
| 529 | - columnWidth: "100", | ||
| 530 | - status: 1 | ||
| 531 | - }, | ||
| 532 | - { | ||
| 533 | - columnChineseName: "已配体积(cm³)", | ||
| 534 | columnName: "alloctedVolume", | 543 | columnName: "alloctedVolume", |
| 535 | columnWidth: "120", | 544 | columnWidth: "120", |
| 536 | status: 1 | 545 | status: 1 |
| ... | @@ -974,25 +983,38 @@ let tableHeaders = { | ... | @@ -974,25 +983,38 @@ let tableHeaders = { |
| 974 | { | 983 | { |
| 975 | columnChineseName: "航班号", | 984 | columnChineseName: "航班号", |
| 976 | columnName: "purposeOfFlightNo", | 985 | columnName: "purposeOfFlightNo", |
| 986 | + columnWidth: "100", | ||
| 987 | + status: 1 | ||
| 988 | + }, | ||
| 989 | + { | ||
| 990 | + columnChineseName: "航班日期", | ||
| 991 | + columnName: "ruleDate", | ||
| 992 | + columnWidth: "150", | ||
| 993 | + ext1: 'slot', | ||
| 994 | + status: 1 | ||
| 995 | + }, | ||
| 996 | + { | ||
| 997 | + columnChineseName: "航线配舱设置", | ||
| 998 | + columnName: "flightRoute", | ||
| 977 | columnWidth: "", | 999 | columnWidth: "", |
| 978 | status: 1 | 1000 | status: 1 |
| 979 | }, | 1001 | }, |
| 980 | { | 1002 | { |
| 981 | columnChineseName: "状态", | 1003 | columnChineseName: "状态", |
| 982 | columnName: "status", | 1004 | columnName: "status", |
| 983 | - columnWidth: "", | 1005 | + columnWidth: "100", |
| 984 | status: 1 | 1006 | status: 1 |
| 985 | }, | 1007 | }, |
| 986 | { | 1008 | { |
| 987 | columnChineseName: "操作人", | 1009 | columnChineseName: "操作人", |
| 988 | - columnName: "createUserName", | 1010 | + columnName: "updateUserName", |
| 989 | - columnWidth: "", | 1011 | + columnWidth: "100", |
| 990 | status: 1 | 1012 | status: 1 |
| 991 | }, | 1013 | }, |
| 992 | { | 1014 | { |
| 993 | columnChineseName: "更新时间", | 1015 | columnChineseName: "更新时间", |
| 994 | - columnName: "createTime", | 1016 | + columnName: "updateTime", |
| 995 | - columnWidth: "", | 1017 | + columnWidth: "150", |
| 996 | status: 1 | 1018 | status: 1 |
| 997 | }, | 1019 | }, |
| 998 | ], | 1020 | ], |
| ... | @@ -1127,6 +1149,12 @@ let tableHeaders = { | ... | @@ -1127,6 +1149,12 @@ let tableHeaders = { |
| 1127 | status: 1 | 1149 | status: 1 |
| 1128 | }, | 1150 | }, |
| 1129 | { | 1151 | { |
| 1152 | + columnChineseName: "当前配载航线", | ||
| 1153 | + columnName: "currentFlightRoute", | ||
| 1154 | + columnWidth: "130", | ||
| 1155 | + status: 1 | ||
| 1156 | + }, | ||
| 1157 | + { | ||
| 1130 | columnChineseName: "ACCS原航班号", | 1158 | columnChineseName: "ACCS原航班号", |
| 1131 | columnName: "dmFlightNbr", | 1159 | columnName: "dmFlightNbr", |
| 1132 | columnWidth: "120", | 1160 | columnWidth: "120", |
| ... | @@ -1247,9 +1275,15 @@ let tableHeaders = { | ... | @@ -1247,9 +1275,15 @@ let tableHeaders = { |
| 1247 | status: 1 | 1275 | status: 1 |
| 1248 | }, | 1276 | }, |
| 1249 | { | 1277 | { |
| 1278 | + columnChineseName: "航线", | ||
| 1279 | + columnName: "flightRoute", | ||
| 1280 | + columnWidth: "", | ||
| 1281 | + status: 1 | ||
| 1282 | + }, | ||
| 1283 | + { | ||
| 1250 | columnChineseName: "申报类别", | 1284 | columnChineseName: "申报类别", |
| 1251 | columnName: "declarationCategory", | 1285 | columnName: "declarationCategory", |
| 1252 | - columnWidth: "100", | 1286 | + columnWidth: "80", |
| 1253 | status: 1 | 1287 | status: 1 |
| 1254 | }, | 1288 | }, |
| 1255 | { | 1289 | { |
| ... | @@ -1261,13 +1295,13 @@ let tableHeaders = { | ... | @@ -1261,13 +1295,13 @@ let tableHeaders = { |
| 1261 | { | 1295 | { |
| 1262 | columnChineseName: "增加重量", | 1296 | columnChineseName: "增加重量", |
| 1263 | columnName: "increaseWeight", | 1297 | columnName: "increaseWeight", |
| 1264 | - columnWidth: "100", | 1298 | + columnWidth: "90", |
| 1265 | status: 1 | 1299 | status: 1 |
| 1266 | }, | 1300 | }, |
| 1267 | { | 1301 | { |
| 1268 | columnChineseName: "减轻重量", | 1302 | columnChineseName: "减轻重量", |
| 1269 | columnName: "reduceWeight", | 1303 | columnName: "reduceWeight", |
| 1270 | - columnWidth: "100", | 1304 | + columnWidth: "90", |
| 1271 | status: 1 | 1305 | status: 1 |
| 1272 | }, | 1306 | }, |
| 1273 | { | 1307 | { |
| ... | @@ -1350,6 +1384,200 @@ let tableHeaders = { | ... | @@ -1350,6 +1384,200 @@ let tableHeaders = { |
| 1350 | columnWidth: "", | 1384 | columnWidth: "", |
| 1351 | status: 1 | 1385 | status: 1 |
| 1352 | }, | 1386 | }, |
| 1387 | + ], | ||
| 1388 | + "fltRoute": [ | ||
| 1389 | + { | ||
| 1390 | + columnChineseName: "航班名称", | ||
| 1391 | + columnName: "fltNo", | ||
| 1392 | + columnWidth: "", | ||
| 1393 | + ext1: "slot", | ||
| 1394 | + status: 1 | ||
| 1395 | + }, | ||
| 1396 | + { | ||
| 1397 | + columnChineseName: "航线", | ||
| 1398 | + columnName: "route", | ||
| 1399 | + columnWidth: "", | ||
| 1400 | + status: 1 | ||
| 1401 | + }, | ||
| 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 | + }, | ||
| 1353 | ] | 1581 | ] |
| 1354 | } | 1582 | } |
| 1355 | 1583 | ... | ... |
| 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,7 +36,7 @@ export default { | ... | @@ -35,7 +36,7 @@ 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 | ||
| ... | @@ -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 | ... | ... |
src/components/Drag/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <!-- 拖拽交换位置效果 --> | ||
| 3 | + <transition-group tag="div" class="container"> | ||
| 4 | + <div class="item" v-for="(item, index) in list" :key="index" draggable="true" | ||
| 5 | + @dragstart="handleDragStart($event, item)" @dragover.prevent="handleDragOver($event, item)" | ||
| 6 | + @dragenter="handleDragEnter($event, item)" @dragend="handleDragEnd($event, item)"> | ||
| 7 | + <svg-icon v-if="!disabled" icon-class="drag-text" class="el-input__icon input-icon" style="color:#bfbfbf" /> | ||
| 8 | + <span style="margin-right:20px">{{index}}</span> | ||
| 9 | + <span>{{ item.route }}</span> | ||
| 10 | + </div> | ||
| 11 | + </transition-group> | ||
| 12 | +</template> | ||
| 13 | + | ||
| 14 | +<script> | ||
| 15 | +// draggable 属性规定元素是否可拖动 | ||
| 16 | +// dragstart 事件在用户开始拖动元素或选择的文本时触发 | ||
| 17 | +// dragover 当某被拖动的对象在另一对象容器范围内拖动时触发此事件 | ||
| 18 | +// dragenter - 当被鼠标拖动的对象进入其容器范围内时触发此事件 | ||
| 19 | +// dragend - 用户完成元素拖动后触发 | ||
| 20 | +export default { | ||
| 21 | + name: 'Toolbar', | ||
| 22 | + props: { | ||
| 23 | + routes: { | ||
| 24 | + type: Array, | ||
| 25 | + default: null | ||
| 26 | + }, | ||
| 27 | + disabled: { | ||
| 28 | + type: Boolean, | ||
| 29 | + default: false | ||
| 30 | + } | ||
| 31 | + }, | ||
| 32 | + data() { | ||
| 33 | + return { | ||
| 34 | + list: [], | ||
| 35 | + dragging: null | ||
| 36 | + } | ||
| 37 | + }, | ||
| 38 | + created() { | ||
| 39 | + this.list = this.routes | ||
| 40 | + }, | ||
| 41 | + watch: { | ||
| 42 | + routes(val) { | ||
| 43 | + if (val) { | ||
| 44 | + this.list = val | ||
| 45 | + } | ||
| 46 | + } | ||
| 47 | + }, | ||
| 48 | + methods: { | ||
| 49 | + handleDragStart(e, item) { | ||
| 50 | + this.disabled ? '' : this.dragging = item; | ||
| 51 | + }, | ||
| 52 | + handleDragEnd(e, item) { | ||
| 53 | + this.disabled ? '' : this.dragging = null | ||
| 54 | + }, | ||
| 55 | + //首先把div变成可以放置的元素,即重写dragenter/dragover | ||
| 56 | + // DataTransfer 对象用来保存,通过拖放动作,拖动到浏览器的数据。 | ||
| 57 | + // 如果dropEffect 属性设定为none,则不允许被拖放到目标元素中。 | ||
| 58 | + handleDragOver(e) { | ||
| 59 | + this.disabled ? '' : e.dataTransfer.dropEffect = 'move'// e.dataTransfer.dropEffect="move";//在dragenter中针对放置目标来设置! | ||
| 60 | + }, | ||
| 61 | + handleDragEnter(e, item) { | ||
| 62 | + if (!this.disabled) { | ||
| 63 | + e.dataTransfer.effectAllowed = "move"//为需要移动的元素设置dragstart事件 | ||
| 64 | + if (item === this.dragging) { | ||
| 65 | + return | ||
| 66 | + } | ||
| 67 | + const newItems = [...this.list] | ||
| 68 | + const src = newItems.indexOf(this.dragging) | ||
| 69 | + const dst = newItems.indexOf(item) | ||
| 70 | + // 替换 | ||
| 71 | + newItems.splice(dst, 0, ...newItems.splice(src, 1)) | ||
| 72 | + // 让item的颜色等于新交换的颜色 | ||
| 73 | + this.list = newItems | ||
| 74 | + this.$emit('drag', newItems) | ||
| 75 | + } | ||
| 76 | + } | ||
| 77 | + } | ||
| 78 | +} | ||
| 79 | +</script> | ||
| 80 | + | ||
| 81 | +<style lang="scss" scoped> | ||
| 82 | +.container { | ||
| 83 | + max-width: 350px; | ||
| 84 | + min-height: 32px; | ||
| 85 | + max-height: 150px; | ||
| 86 | + overflow-y: scroll; | ||
| 87 | + padding: 0; | ||
| 88 | + border: 1px solid #ccc; | ||
| 89 | + | ||
| 90 | + &::-webkit-scrollbar { | ||
| 91 | + width: 7px; | ||
| 92 | + height: 7px; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + &::-webkit-scrollbar-track { | ||
| 96 | + background-color: #fff; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + &::-webkit-scrollbar-thumb { | ||
| 100 | + background-color: #ccc; | ||
| 101 | + border-radius: 20px; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + &::-webkit-scrollbar-thumb:hover { | ||
| 105 | + background-color: #409eff; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + &::-webkit-scrollbar-track-piece { | ||
| 109 | + background: #F2F6FC; | ||
| 110 | + } | ||
| 111 | +} | ||
| 112 | + | ||
| 113 | +.item { | ||
| 114 | + overflow-x: hidden; | ||
| 115 | + white-space: nowrap; | ||
| 116 | + text-overflow: ellipsis; | ||
| 117 | + /* border-bottom: 1px solid #ccc; */ | ||
| 118 | + cursor: move; | ||
| 119 | + transition: all linear .3s | ||
| 120 | +} | ||
| 121 | + | ||
| 122 | +.item:hover { | ||
| 123 | + background-color: #c6e2ff; | ||
| 124 | +} | ||
| 125 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -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 | // 显隐列初始默认隐藏列 | ... | ... |
| ... | @@ -14,7 +14,7 @@ import permission from './directive/permission' | ... | @@ -14,7 +14,7 @@ import permission from './directive/permission' |
| 14 | 14 | ||
| 15 | import './assets/icons' // icon | 15 | import './assets/icons' // icon |
| 16 | import './permission' // permission control | 16 | import './permission' // permission control |
| 17 | -import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree, upCase, nowDate } from "@/utils/FedEx"; | 17 | +import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree, upCase, nowDate, getRoute } from "@/utils/FedEx"; |
| 18 | import { isArray } from "@/utils/validate"; | 18 | import { isArray } from "@/utils/validate"; |
| 19 | import Pagination from "@/components/Pagination"; | 19 | import Pagination from "@/components/Pagination"; |
| 20 | // 自定义表格工具扩展 | 20 | // 自定义表格工具扩展 |
| ... | @@ -22,8 +22,9 @@ import RightToolbar from "@/components/RightToolbar" | ... | @@ -22,8 +22,9 @@ import RightToolbar from "@/components/RightToolbar" |
| 22 | import Table from "@/components/Table" | 22 | import Table from "@/components/Table" |
| 23 | import Tooltip from "@/components/Tooltip" | 23 | import Tooltip from "@/components/Tooltip" |
| 24 | import HeaderSetting from "@/components/HeaderSetting" | 24 | import HeaderSetting from "@/components/HeaderSetting" |
| 25 | +import Drag from "@/components/Drag" | ||
| 25 | import tableHeaders from '@/assets/languages/tableHeaders' | 26 | import tableHeaders from '@/assets/languages/tableHeaders' |
| 26 | -import dictLabels from "@/assets/languages/dictLabels.js"; | 27 | +import dictLabels from "@/assets/languages/dictLabels.js" |
| 27 | import settings from './settings.js' | 28 | import settings from './settings.js' |
| 28 | 29 | ||
| 29 | // 全局方法挂载 | 30 | // 全局方法挂载 |
| ... | @@ -36,6 +37,7 @@ Vue.prototype.download = download | ... | @@ -36,6 +37,7 @@ Vue.prototype.download = download |
| 36 | Vue.prototype.handleTree = handleTree | 37 | Vue.prototype.handleTree = handleTree |
| 37 | Vue.prototype.upCase = upCase | 38 | Vue.prototype.upCase = upCase |
| 38 | Vue.prototype.nowDate = nowDate | 39 | Vue.prototype.nowDate = nowDate |
| 40 | +Vue.prototype.getRoute = getRoute | ||
| 39 | Vue.prototype.isArray = isArray | 41 | Vue.prototype.isArray = isArray |
| 40 | Vue.prototype.tableHeaders = tableHeaders | 42 | Vue.prototype.tableHeaders = tableHeaders |
| 41 | Vue.prototype.dictLabels = dictLabels | 43 | Vue.prototype.dictLabels = dictLabels |
| ... | @@ -63,6 +65,7 @@ Vue.component('RightToolbar', RightToolbar) | ... | @@ -63,6 +65,7 @@ Vue.component('RightToolbar', RightToolbar) |
| 63 | Vue.component('Tables', Table) | 65 | Vue.component('Tables', Table) |
| 64 | Vue.component('Tooltips', Tooltip) | 66 | Vue.component('Tooltips', Tooltip) |
| 65 | Vue.component('HeaderSetting', HeaderSetting) | 67 | Vue.component('HeaderSetting', HeaderSetting) |
| 68 | +Vue.component('Drag', Drag) | ||
| 66 | 69 | ||
| 67 | Vue.use(permission) | 70 | Vue.use(permission) |
| 68 | /** | 71 | /** | ... | ... |
| ... | @@ -74,19 +74,13 @@ export const constantRoutes = [ | ... | @@ -74,19 +74,13 @@ export const constantRoutes = [ |
| 74 | redirect: 'noredirect', | 74 | redirect: 'noredirect', |
| 75 | children: [ | 75 | children: [ |
| 76 | { | 76 | { |
| 77 | - path: '/flightAllocConfig/:handle/:id', | 77 | + path: '/info/:handle/:fltNo-:fltDate', |
| 78 | component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve), | 78 | component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve), |
| 79 | name: 'FlightAllocConfigInfo', | 79 | name: 'FlightAllocConfigInfo', |
| 80 | - meta: { title: '航班配舱', icon: 'user', breadcrumb: true } | 80 | + meta: { title: '航班配舱', icon: 'user' } |
| 81 | }, | 81 | }, |
| 82 | { | 82 | { |
| 83 | - path: '/flightAllocConfig/:handle', | 83 | + path: '/weatherTable/:awbNbr', |
| 84 | - component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve), | ||
| 85 | - name: 'FlightAllocConfigAdd', | ||
| 86 | - meta: { title: '添加航班配舱', icon: 'user', breadcrumb: false } | ||
| 87 | - }, | ||
| 88 | - { | ||
| 89 | - path: '/weatherTable', | ||
| 90 | component: (resolve) => require(['@/views/systemLog/dmLog/weatherTable'], resolve), | 84 | component: (resolve) => require(['@/views/systemLog/dmLog/weatherTable'], resolve), |
| 91 | name: 'weatherTable', | 85 | name: 'weatherTable', |
| 92 | meta: { title: '流水表', icon: 'user' } | 86 | meta: { title: '流水表', icon: 'user' } | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="cargoAllocation"> | 2 | <div class="cargoAllocation"> |
| 3 | - <el-form ref="form" v-model="formData" class="form-header" label-position="right" label-width="auto" size="small"> | 3 | + <el-form ref="form" v-model="formData" class="form-header" label-position="right" label-width="auto" size="small" |
| 4 | + @submit.native.prevent> | ||
| 4 | <el-row type="flex" style="flexWrap: wrap !important"> | 5 | <el-row type="flex" style="flexWrap: wrap !important"> |
| 5 | <el-col :span="6"> | 6 | <el-col :span="6"> |
| 6 | <el-form-item label="ACCS原航班日期"> | 7 | <el-form-item label="ACCS原航班日期"> |
| ... | @@ -11,7 +12,8 @@ | ... | @@ -11,7 +12,8 @@ |
| 11 | </el-col> | 12 | </el-col> |
| 12 | <el-col :span="6"> | 13 | <el-col :span="6"> |
| 13 | <el-form-item label="ACCS原航班号"> | 14 | <el-form-item label="ACCS原航班号"> |
| 14 | - <el-input v-model="fltNo" placeholder="请输入ACCS原航班号" class="formItem" clearable></el-input> | 15 | + <el-input v-model="fltNo" placeholder="请输入ACCS原航班号" class="formItem" clearable @change="fltNoChange"> |
| 16 | + </el-input> | ||
| 15 | </el-form-item> | 17 | </el-form-item> |
| 16 | </el-col> | 18 | </el-col> |
| 17 | <el-col :span="6"> | 19 | <el-col :span="6"> |
| ... | @@ -116,6 +118,23 @@ | ... | @@ -116,6 +118,23 @@ |
| 116 | </el-form-item> | 118 | </el-form-item> |
| 117 | </el-col> | 119 | </el-col> |
| 118 | <el-col :span="6"> | 120 | <el-col :span="6"> |
| 121 | + <el-form-item> | ||
| 122 | + <template slot="label"> | ||
| 123 | + <div style="display:inline-block">ACCS航线 | ||
| 124 | + <el-tooltip class="item" effect="dark" content="选择航线需要先输入航班号,才能选择对应得航线" placement="top-start"> | ||
| 125 | + <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span> | ||
| 126 | + </el-tooltip> | ||
| 127 | + </div> | ||
| 128 | + </template> | ||
| 129 | + <el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0" | ||
| 130 | + clearable> | ||
| 131 | + <el-option v-for="item in routeList" :label="item" :value="item" :key="item"> | ||
| 132 | + <Tooltips :content="item" :refName="item"></Tooltips> | ||
| 133 | + </el-option> | ||
| 134 | + </el-select> | ||
| 135 | + </el-form-item> | ||
| 136 | + </el-col> | ||
| 137 | + <el-col :span="6"> | ||
| 119 | <el-form-item label="运单号"> | 138 | <el-form-item label="运单号"> |
| 120 | <el-input class="formItem" type="textarea" :rows="4" placeholder="请输入运单号(回车分割)" :maxlength="12000" | 139 | <el-input class="formItem" type="textarea" :rows="4" placeholder="请输入运单号(回车分割)" :maxlength="12000" |
| 121 | v-model="formData.waybillNo" clearable></el-input> | 140 | v-model="formData.waybillNo" clearable></el-input> |
| ... | @@ -187,7 +206,7 @@ | ... | @@ -187,7 +206,7 @@ |
| 187 | 206 | ||
| 188 | <script> | 207 | <script> |
| 189 | import Dialog from "./info.vue"; | 208 | import Dialog from "./info.vue"; |
| 190 | -import { findConditionData, findCargoAllocationData } from "@/api/cargoSelect"; | 209 | +import { findConditionData, findCargoAllocationData, getAccsRoute } from "@/api/cargoSelect"; |
| 191 | import { allDictData } from "@/api/destinationFlight"; | 210 | import { allDictData } from "@/api/destinationFlight"; |
| 192 | import { downLoadXlsx } from "@/utils/zipdownload"; | 211 | import { downLoadXlsx } from "@/utils/zipdownload"; |
| 193 | 212 | ||
| ... | @@ -203,6 +222,7 @@ export default { | ... | @@ -203,6 +222,7 @@ export default { |
| 203 | fltDateEnd: null, | 222 | fltDateEnd: null, |
| 204 | typeId: null, | 223 | typeId: null, |
| 205 | portName: null, | 224 | portName: null, |
| 225 | + rtoue: null, | ||
| 206 | statusId: null, | 226 | statusId: null, |
| 207 | kindToAllocFlightId: null, | 227 | kindToAllocFlightId: null, |
| 208 | serviceTypeId: null, | 228 | serviceTypeId: null, |
| ... | @@ -230,6 +250,7 @@ export default { | ... | @@ -230,6 +250,7 @@ export default { |
| 230 | SubCategory: [], | 250 | SubCategory: [], |
| 231 | }, //查询条件 | 251 | }, //查询条件 |
| 232 | fltDate: [], | 252 | fltDate: [], |
| 253 | + routeList: [], | ||
| 233 | ursaList: "", | 254 | ursaList: "", |
| 234 | siteNameList: "", | 255 | siteNameList: "", |
| 235 | handingCodes: [], | 256 | handingCodes: [], |
| ... | @@ -263,6 +284,8 @@ export default { | ... | @@ -263,6 +284,8 @@ export default { |
| 263 | } | 284 | } |
| 264 | }, | 285 | }, |
| 265 | activated() { | 286 | activated() { |
| 287 | + this.tableSelection = [] | ||
| 288 | + this.cargoTotal() | ||
| 266 | this.seleData(); | 289 | this.seleData(); |
| 267 | this.select(); | 290 | this.select(); |
| 268 | }, | 291 | }, |
| ... | @@ -485,6 +508,19 @@ export default { | ... | @@ -485,6 +508,19 @@ export default { |
| 485 | this.tableHeader = this.$store.getters.tableHeader['allocationCargo'] | 508 | this.tableHeader = this.$store.getters.tableHeader['allocationCargo'] |
| 486 | }) | 509 | }) |
| 487 | } | 510 | } |
| 511 | + }, | ||
| 512 | + //获取航班号航线 | ||
| 513 | + fltNoChange(val) { | ||
| 514 | + this.routeList = [] | ||
| 515 | + getAccsRoute({ fltNoAccs: val }).then(res => { | ||
| 516 | + if (res.code === 200) { | ||
| 517 | + this.routeList = res.data | ||
| 518 | + } else { | ||
| 519 | + this.msgWarning(res.msg) | ||
| 520 | + } | ||
| 521 | + }).catch(err => { | ||
| 522 | + console.log(err) | ||
| 523 | + }) | ||
| 488 | } | 524 | } |
| 489 | }, | 525 | }, |
| 490 | computed: { | 526 | computed: { |
| ... | @@ -524,7 +560,7 @@ export default { | ... | @@ -524,7 +560,7 @@ export default { |
| 524 | }; | 560 | }; |
| 525 | </script> | 561 | </script> |
| 526 | 562 | ||
| 527 | -<style lang="scss"> | 563 | +<style lang="scss" scoped> |
| 528 | .tips { | 564 | .tips { |
| 529 | display: inline-block; | 565 | display: inline-block; |
| 530 | color: #606266; | 566 | color: #606266; | ... | ... |
| ... | @@ -11,16 +11,31 @@ | ... | @@ -11,16 +11,31 @@ |
| 11 | :label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter"> | 11 | :label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter"> |
| 12 | </el-table-column> | 12 | </el-table-column> |
| 13 | </el-table> | 13 | </el-table> |
| 14 | - <el-form ref="form" label-position="right" label-width="auto" style="width: 400px; margin: 30px auto" | 14 | + <el-form ref="form" class="form-header" label-position="right" label-width="auto" |
| 15 | - :model="formData" :rules="rules"> | 15 | + style="width: 400px; margin: 30px auto" :model="formData" :rules="rules"> |
| 16 | <el-form-item label="航班号" prop="fltNo"> | 16 | <el-form-item label="航班号" prop="fltNo"> |
| 17 | - <el-input v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="10" style="width: 350px"></el-input> | 17 | + <el-input class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="10" |
| 18 | + style="width: 350px" @change="dateChange"></el-input> | ||
| 18 | </el-form-item> | 19 | </el-form-item> |
| 19 | <el-form-item label="航班日期:" prop="fltDate"> | 20 | <el-form-item label="航班日期:" prop="fltDate"> |
| 20 | - <el-date-picker v-model="formData.fltDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" | 21 | + <el-date-picker class="formItem" v-model="formData.fltDate" type="date" placeholder="选择日期" |
| 21 | - size="medium" style="width: 350px"> | 22 | + value-format="yyyy-MM-dd" size="medium" style="width: 350px" @change="dateChange"> |
| 22 | </el-date-picker> | 23 | </el-date-picker> |
| 23 | </el-form-item> | 24 | </el-form-item> |
| 25 | + <el-form-item prop="route"> | ||
| 26 | + <template slot="label"> | ||
| 27 | + <div style="display:inline-block">航线: | ||
| 28 | + <el-tooltip class="item" effect="dark" content="选择航线需要先输入航班号和航班日期,才能选择对应得航线" placement="top-start"> | ||
| 29 | + <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span> | ||
| 30 | + </el-tooltip> | ||
| 31 | + </div> | ||
| 32 | + </template> | ||
| 33 | + <el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0"> | ||
| 34 | + <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index"> | ||
| 35 | + <Tooltips :content="item.route" :refName="item.route"></Tooltips> | ||
| 36 | + </el-option> | ||
| 37 | + </el-select> | ||
| 38 | + </el-form-item> | ||
| 24 | </el-form> | 39 | </el-form> |
| 25 | <div slot="footer"> | 40 | <div slot="footer"> |
| 26 | <el-button @click="dialogBeforeClose">取 消</el-button> | 41 | <el-button @click="dialogBeforeClose">取 消</el-button> |
| ... | @@ -31,7 +46,7 @@ | ... | @@ -31,7 +46,7 @@ |
| 31 | </template> | 46 | </template> |
| 32 | 47 | ||
| 33 | <script> | 48 | <script> |
| 34 | -import { allocationFlight } from "@/api/cargoSelect"; | 49 | +import { allocationFlight, findFlightRoute } from "@/api/cargoSelect"; |
| 35 | 50 | ||
| 36 | export default { | 51 | export default { |
| 37 | props: { | 52 | props: { |
| ... | @@ -50,6 +65,7 @@ export default { | ... | @@ -50,6 +65,7 @@ export default { |
| 50 | ids: [], | 65 | ids: [], |
| 51 | fltNo: undefined, | 66 | fltNo: undefined, |
| 52 | fltDate: undefined, | 67 | fltDate: undefined, |
| 68 | + route: undefined, | ||
| 53 | overweight: false, | 69 | overweight: false, |
| 54 | }, | 70 | }, |
| 55 | cargoHeader: [ | 71 | cargoHeader: [ |
| ... | @@ -68,6 +84,7 @@ export default { | ... | @@ -68,6 +84,7 @@ export default { |
| 68 | { name: "创建人", value: "createUserName" }, | 84 | { name: "创建人", value: "createUserName" }, |
| 69 | { name: "创建时间", value: "createTime" }, | 85 | { name: "创建时间", value: "createTime" }, |
| 70 | ], | 86 | ], |
| 87 | + routeList: [], | ||
| 71 | rules: { | 88 | rules: { |
| 72 | fltNo: [ | 89 | fltNo: [ |
| 73 | { | 90 | { |
| ... | @@ -83,6 +100,13 @@ export default { | ... | @@ -83,6 +100,13 @@ export default { |
| 83 | trigger: "blur", | 100 | trigger: "blur", |
| 84 | }, | 101 | }, |
| 85 | ], | 102 | ], |
| 103 | + route: [ | ||
| 104 | + { | ||
| 105 | + required: true, | ||
| 106 | + message: "航线不能为空", | ||
| 107 | + trigger: "blur", | ||
| 108 | + }, | ||
| 109 | + ], | ||
| 86 | }, | 110 | }, |
| 87 | loading: false, | 111 | loading: false, |
| 88 | }; | 112 | }; |
| ... | @@ -93,8 +117,11 @@ export default { | ... | @@ -93,8 +117,11 @@ export default { |
| 93 | ids: [], | 117 | ids: [], |
| 94 | fltNo: undefined, | 118 | fltNo: undefined, |
| 95 | fltDate: undefined, | 119 | fltDate: undefined, |
| 120 | + route: undefined, | ||
| 121 | + flightId: undefined, | ||
| 96 | overweight: false, | 122 | overweight: false, |
| 97 | }; | 123 | }; |
| 124 | + this.routeList = [] | ||
| 98 | }, | 125 | }, |
| 99 | //确定配舱 | 126 | //确定配舱 |
| 100 | submit() { | 127 | submit() { |
| ... | @@ -104,6 +131,11 @@ export default { | ... | @@ -104,6 +131,11 @@ export default { |
| 104 | arr.push(item.id); | 131 | arr.push(item.id); |
| 105 | }); | 132 | }); |
| 106 | this.formData.ids = arr; | 133 | this.formData.ids = arr; |
| 134 | + this.routeList.forEach(item => { | ||
| 135 | + if (item.route === this.formData.route) { | ||
| 136 | + this.formData.flightId = item.id | ||
| 137 | + } | ||
| 138 | + }) | ||
| 107 | if (this.formData.fltNo && this.formData.fltDate) { | 139 | if (this.formData.fltNo && this.formData.fltDate) { |
| 108 | allocationFlight(this.formData).then((res) => { | 140 | allocationFlight(this.formData).then((res) => { |
| 109 | this.loading = false; | 141 | this.loading = false; |
| ... | @@ -165,6 +197,35 @@ export default { | ... | @@ -165,6 +197,35 @@ export default { |
| 165 | } | 197 | } |
| 166 | } | 198 | } |
| 167 | return cellValue | 199 | return cellValue |
| 200 | + }, | ||
| 201 | + //日期选择变化 | ||
| 202 | + dateChange(val) { | ||
| 203 | + this.routeList = [] | ||
| 204 | + if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') { | ||
| 205 | + if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') { | ||
| 206 | + let obj = { | ||
| 207 | + fltNo: this.formData.fltNo, | ||
| 208 | + fltDate: this.formData.fltDate, | ||
| 209 | + } | ||
| 210 | + findFlightRoute(obj).then(res => { | ||
| 211 | + if (res.code === 200) { | ||
| 212 | + res.data[0].route.indexOf(';') <= 0 ? | ||
| 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 | + }) | ||
| 223 | + } else { | ||
| 224 | + this.msgWarning('航班日期不能为空') | ||
| 225 | + } | ||
| 226 | + } else { | ||
| 227 | + this.msgWarning('航班号不能为空') | ||
| 228 | + } | ||
| 168 | } | 229 | } |
| 169 | }, | 230 | }, |
| 170 | computed: { | 231 | computed: { |
| ... | @@ -181,4 +242,5 @@ export default { | ... | @@ -181,4 +242,5 @@ export default { |
| 181 | </script> | 242 | </script> |
| 182 | 243 | ||
| 183 | <style> | 244 | <style> |
| 245 | + | ||
| 184 | </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 | + <el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button> | ||
| 4 | + <!-- 空状态 --> | ||
| 3 | <div v-if="isEmpty"> | 5 | <div v-if="isEmpty"> |
| 4 | - <el-empty description="找不到这条数据!"></el-empty> | 6 | + <el-empty description="未查询到数据!"></el-empty> |
| 5 | - <el-button size="small" @click="close">返回</el-button> | ||
| 6 | </div> | 7 | </div> |
| 7 | - <template v-else> | 8 | + <el-form v-else ref="infoForm" :model="infoForm" label-position="right" label-width="120px" size="small" |
| 8 | - <el-form ref="form" :model="form" label-width="200px" size="small" :disabled="disable" :rules="rules"> | 9 | + :disabled="disabled" :rules="rules" @submit.native.prevent> |
| 9 | - <el-row :gutter="20"> | 10 | + <!-- 表头设置 --> |
| 10 | - <el-col :span="12"> | 11 | + <el-row class="mb20"> |
| 11 | - <el-form-item label="航班号" prop="purposeOfFlightNo"> | 12 | + <el-col :span="6"> |
| 12 | - <el-input v-model.trim="form.purposeOfFlightNo" maxlength="10" style="width: 60%" | 13 | + <el-form-item label="航班号" prop="fltNo"> |
| 13 | - :disabled="nameDisabled"></el-input> | 14 | + <el-input v-model.tirm="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled"> |
| 15 | + </el-input> | ||
| 14 | </el-form-item> | 16 | </el-form-item> |
| 15 | </el-col> | 17 | </el-col> |
| 16 | - </el-row> | 18 | + <el-col :span="6" v-if="infoForm.fltDate != null"> |
| 17 | - <el-form-item> | 19 | + <el-form-item label="航班日期" prop="fltDate"> |
| 18 | - <el-row :gutter="20"> | 20 | + <el-date-picker class="wid80" v-model="infoForm.fltDate" size="small" type="date" |
| 19 | - <el-col :span="6"> | 21 | + value-format="yyyy-MM-dd" placeholder="选择航班日期" clearable :disabled="fltNoDisabled"> |
| 20 | - <el-radio v-model="isLocation" label="1" size="mini">站点包含</el-radio> | 22 | + </el-date-picker> |
| 21 | - <el-radio v-model="isLocation" label="2" size="mini">站点不包含</el-radio> | 23 | + </el-form-item> |
| 22 | </el-col> | 24 | </el-col> |
| 25 | + <el-col :span="6" v-if="infoForm.route != null"> | ||
| 26 | + <el-form-item label="航线"> | ||
| 27 | + <el-input v-model.tirm="infoForm.route" @change="getRoutes" disabled> | ||
| 28 | + </el-input> | ||
| 29 | + </el-form-item> | ||
| 30 | + </el-col> | ||
| 31 | + <el-col :span="7"> | ||
| 32 | + <el-form-item prop="route" label="航线优先级"> | ||
| 33 | + <Drag :routes="routeList" :disabled="true" @drag="drag"> | ||
| 34 | + </Drag> | ||
| 35 | + </el-form-item> | ||
| 36 | + </el-col> | ||
| 37 | + <!-- <el-button v-if="status == 'update' && infoForm.fltDate != null" type="primary" size="small" | ||
| 38 | + @click="setRoutes" :disabled="allSubmitDisabled">航线优先级保存</el-button> --> | ||
| 23 | </el-row> | 39 | </el-row> |
| 40 | + <!-- <div class="routeTip"> | ||
| 41 | + <span class="el-icon-warning-outline" style="color:#ff4949"></span> | ||
| 42 | + 航班优先级只有在设置日期的维度下才可修改,若修改没有日期的维度请到数据字典航线表修改对应航班的优先级 | ||
| 43 | + </div> --> | ||
| 44 | + <!-- 航线维度设置 --> | ||
| 45 | + <el-divider content-position="left">航线维度设置</el-divider> | ||
| 46 | + <!-- <div class="routeTip"> --> | ||
| 47 | + <!-- <span class="el-icon-warning-outline" style="color:#ff4949"></span> --> | ||
| 48 | + <!-- 新增航线维度时,不添加维度的航线,等同于没有限制规则,配舱时以航线优先级顺序配舱! --> | ||
| 49 | + <!-- </div> --> | ||
| 50 | + <el-collapse ref="routeCollapse" | ||
| 51 | + v-if="routeSatus != 'flightInformationMaintenanceWhite Tail' && routeSatus != 'dmLog'" | ||
| 52 | + class="backgroundCollapse" :value="infoForm.list.length > 0 ? routeList[0].route : ''" | ||
| 53 | + style="min-height:500px;width:95%;margin:0 auto 50px" accordion v-loading="loading"> | ||
| 54 | + <el-collapse-item v-for="(routeItem, index) in routeList" :key="index" :name="routeItem.route"> | ||
| 55 | + <template slot="title"> | ||
| 56 | + <span class="fontWeight">{{ routeItem.route }}</span> | ||
| 57 | + </template> | ||
| 58 | + <el-card shadow="always" v-for="(val, idx) in infoForm.list" :key="idx" | ||
| 59 | + v-if="val.flightRoute === routeItem.route" style="min-height:350px"> | ||
| 60 | + <div> | ||
| 61 | + <el-empty description="未设置规则!" v-if="!val.isLocation"> | ||
| 62 | + <el-button type="primary" size="small" @click="newRoute(idx)">新增规则 | ||
| 63 | + </el-button> | ||
| 64 | + </el-empty> | ||
| 65 | + <el-row class="rowPadding" v-else> | ||
| 66 | + <el-button type="primary" size="mini" @click="submit(idx)">保 存</el-button> | ||
| 67 | + <el-button type="primary" v-if="val.status === '1'" size="mini" | ||
| 68 | + icon="el-icon-video-pause" @click="changeStatus(idx)"> | ||
| 69 | + 停 用</el-button> | ||
| 70 | + <el-button type="primary" v-if="val.status === '3'" size="mini" | ||
| 71 | + icon="el-icon-video-pause" @click="changeStatus(idx)"> | ||
| 72 | + 启 用</el-button> | ||
| 73 | + <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" | ||
| 74 | + @click="del(idx)">删 除 | ||
| 75 | + </el-button> | ||
| 76 | + <el-divider></el-divider> | ||
| 77 | + <el-col :span="24"> | ||
| 78 | + <el-form-item label="站点"> | ||
| 79 | + <el-col :span="4"> | ||
| 80 | + <el-radio-group v-model="val.isLocation" @change="change"> | ||
| 81 | + <el-radio label="1">站点包含</el-radio> | ||
| 82 | + <el-radio label="2">站点不包含</el-radio> | ||
| 83 | + </el-radio-group> | ||
| 84 | + </el-col> | ||
| 85 | + <el-col :span="10"> | ||
| 86 | + <el-input v-if="val.isLocation == '1'" v-model="val.location" | ||
| 87 | + type="textarea" :rows="4" resize="none" style="width: 500px" | ||
| 88 | + placeholder="站点之间用回车符分隔" @change="change" @input="change($event)"> | ||
| 89 | + </el-input> | ||
| 90 | + <el-input v-else v-model="val.notLocation" type="textarea" :rows="4" | ||
| 91 | + resize="none" style="width: 500px" placeholder="站点之间用回车符分隔" | ||
| 92 | + @change="change" @input="change($event)"> | ||
| 93 | + </el-input> | ||
| 94 | + </el-col> | ||
| 24 | </el-form-item> | 95 | </el-form-item> |
| 25 | - <el-form-item label="站点包含" v-show="isLocation == 1"> | 96 | + </el-col> |
| 26 | - <el-input type="textarea" v-model="form.location" :rows="6" resize="none" style="width: 600px" | 97 | + <el-col :span="24"> |
| 27 | - placeholder="站点之间用回车符分隔"></el-input> | 98 | + <el-col :span="12"> |
| 99 | + <el-form-item label="URSA包含"> | ||
| 100 | + <el-input v-model="val.includeUrsa" type="textarea" :rows="4" resize="none" | ||
| 101 | + style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_" | ||
| 102 | + @change="change" @input="change($event)"> | ||
| 103 | + </el-input> | ||
| 28 | </el-form-item> | 104 | </el-form-item> |
| 29 | - <el-form-item label="站点不包含" v-show="isLocation == 2"> | 105 | + </el-col> |
| 30 | - <el-input type="textarea" v-model="form.notLocation" :rows="6" resize="none" style="width: 600px" | 106 | + <el-col :span="12"> |
| 31 | - placeholder="站点之间用回车符分隔"></el-input> | 107 | + <el-form-item label="URSA不包含"> |
| 108 | + <el-input v-model="val.notIncludeUrsa" type="textarea" :rows="4" | ||
| 109 | + resize="none" style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_" | ||
| 110 | + @change="change" @input="change($event)"> | ||
| 111 | + </el-input> | ||
| 32 | </el-form-item> | 112 | </el-form-item> |
| 33 | - <el-row :gutter="20"> | 113 | + </el-col> |
| 114 | + </el-col> | ||
| 115 | + <el-col :span="24"> | ||
| 116 | + <el-col :span="9"> | ||
| 117 | + <el-form-item label="件数"> | ||
| 34 | <el-col :span="10"> | 118 | <el-col :span="10"> |
| 35 | - <el-form-item label="URSA包含" prop="includeUrsa"> | 119 | + <el-input class="numberInput" v-model.trim="val.minNumOfPieces" |
| 36 | - <el-input type="textarea" v-model="form.includeUrsa" :rows="6" resize="none" | 120 | + oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" |
| 37 | - placeholder="URSA之间用分号分隔,例:F2;F3;P_"></el-input> | 121 | + @input="change($event)"> |
| 122 | + </el-input> | ||
| 123 | + </el-col> | ||
| 124 | + <el-col style="text-align: center" :span="1">-</el-col> | ||
| 125 | + <el-col :span="10"> | ||
| 126 | + <el-input class="numberInput" v-model.trim="val.maxNumOfPieces" | ||
| 127 | + oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" | ||
| 128 | + @input="change($event)"> | ||
| 129 | + </el-input> | ||
| 130 | + </el-col> | ||
| 38 | </el-form-item> | 131 | </el-form-item> |
| 39 | </el-col> | 132 | </el-col> |
| 133 | + <el-col :span="9"> | ||
| 134 | + <el-form-item label="重量(KG)"> | ||
| 40 | <el-col :span="10"> | 135 | <el-col :span="10"> |
| 41 | - <el-form-item label="URSA不包含" prop="notIncludeUrsa"> | 136 | + <el-input class="numberInput" v-model.trim="val.minWeight" |
| 42 | - <el-input type="textarea" v-model="form.notIncludeUrsa" :rows="6" resize="none" | 137 | + oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" |
| 43 | - placeholder="URSA之间用分号分隔,例:F2;F3;P_"></el-input> | 138 | + @input="change($event)"> |
| 139 | + </el-input> | ||
| 140 | + </el-col> | ||
| 141 | + <el-col style="text-align: center" :span="1">-</el-col> | ||
| 142 | + <el-col :span="10"> | ||
| 143 | + <el-input class="numberInput" v-model.trim="val.maxWeight" | ||
| 144 | + oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" | ||
| 145 | + @input="change($event)"> | ||
| 146 | + </el-input> | ||
| 147 | + </el-col> | ||
| 148 | + </el-form-item> | ||
| 149 | + </el-col> | ||
| 150 | + </el-col> | ||
| 151 | + <el-col :span="24"> | ||
| 152 | + <el-form-item label="申报类别"> | ||
| 153 | + <el-card shadow="never" style="width: 95%"> | ||
| 154 | + <el-checkbox-group v-model="val.typeOfGoods" @change="change"> | ||
| 155 | + <el-row> | ||
| 156 | + <el-col v-for="item in checkBoxItem.cargoType" :span="2" | ||
| 157 | + :key="item.id"> | ||
| 158 | + <el-checkbox v-if="item.status === 1" :label="item.chineseName" | ||
| 159 | + :name="item.chineseName" :key="item.code"> | ||
| 160 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 161 | + </Tooltips> | ||
| 162 | + </el-checkbox> | ||
| 163 | + </el-col> | ||
| 164 | + </el-row> | ||
| 165 | + </el-checkbox-group> | ||
| 166 | + </el-card> | ||
| 167 | + </el-form-item> | ||
| 168 | + </el-col> | ||
| 169 | + <el-col :span="24"> | ||
| 170 | + <el-form-item label="货物类型"> | ||
| 171 | + <el-card shadow="never" style="width: 95%"> | ||
| 172 | + <el-checkbox-group v-model="val.declarationCategory" @change="change"> | ||
| 173 | + <el-row> | ||
| 174 | + <el-col v-for="item in checkBoxItem.cargoStatus" :span="3" | ||
| 175 | + :key="item.id"> | ||
| 176 | + <el-checkbox v-if="item.status === 1" :label="item.chineseName" | ||
| 177 | + :name="item.chineseName" disabled :key="item.code"> | ||
| 178 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 179 | + </Tooltips> | ||
| 180 | + </el-checkbox> | ||
| 181 | + </el-col> | ||
| 182 | + </el-row> | ||
| 183 | + </el-checkbox-group> | ||
| 184 | + </el-card> | ||
| 185 | + </el-form-item> | ||
| 186 | + </el-col> | ||
| 187 | + <el-col :span="24"> | ||
| 188 | + <el-form-item label="取件扫描号"> | ||
| 189 | + <el-card shadow="never" style="width: 95%"> | ||
| 190 | + <el-checkbox-group v-model="val.puporpuxCode" @change="change"> | ||
| 191 | + <el-row> | ||
| 192 | + <el-col :span="2" v-for="item in checkBoxItem.puporpux"> | ||
| 193 | + <el-checkbox | ||
| 194 | + v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)" | ||
| 195 | + :label="item.chineseName" :name="item.chineseName" | ||
| 196 | + :disabled="val.puporpuxCode.includes(item.chineseName) && item.status == 0" | ||
| 197 | + :key="item.code"> | ||
| 198 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 199 | + </Tooltips> | ||
| 200 | + </el-checkbox> | ||
| 201 | + </el-col> | ||
| 202 | + </el-row> | ||
| 203 | + </el-checkbox-group> | ||
| 204 | + </el-card> | ||
| 205 | + </el-form-item> | ||
| 206 | + </el-col> | ||
| 207 | + <el-col :span="24"> | ||
| 208 | + <el-form-item label="Service Code"> | ||
| 209 | + <el-card shadow="never" style="width: 95%"> | ||
| 210 | + <el-checkbox-group v-model="val.serviceCode" @change="change"> | ||
| 211 | + <el-row> | ||
| 212 | + <el-col v-for="item in checkBoxItem.serviceCode" :span="2" | ||
| 213 | + :key="item.id"> | ||
| 214 | + <el-checkbox | ||
| 215 | + v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)" | ||
| 216 | + :label="item.chineseName" :name="item.chineseName" | ||
| 217 | + :disabled="val.serviceCode.includes(item.chineseName) && item.status == 0" | ||
| 218 | + :key="item.code"> | ||
| 219 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 220 | + </Tooltips> | ||
| 221 | + </el-checkbox> | ||
| 222 | + </el-col> | ||
| 223 | + </el-row> | ||
| 224 | + </el-checkbox-group> | ||
| 225 | + </el-card> | ||
| 226 | + </el-form-item> | ||
| 227 | + </el-col> | ||
| 228 | + <el-col :span="24"> | ||
| 229 | + <el-form-item label="Handling Code"> | ||
| 230 | + <el-card shadow="never" style="width: 95%"> | ||
| 231 | + <el-checkbox-group v-model="val.handlingCode" @change="change"> | ||
| 232 | + <el-row> | ||
| 233 | + <el-col v-for="item in checkBoxItem.handlingCode" :span="2" | ||
| 234 | + :key="item.id"> | ||
| 235 | + <el-checkbox | ||
| 236 | + v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)" | ||
| 237 | + :label="item.chineseName" :name="item.chineseName" | ||
| 238 | + :disabled="val.handlingCode.includes(item.chineseName) && item.status == 0" | ||
| 239 | + :key="item.code"> | ||
| 240 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 241 | + </Tooltips> | ||
| 242 | + </el-checkbox> | ||
| 243 | + </el-col> | ||
| 244 | + </el-row> | ||
| 245 | + </el-checkbox-group> | ||
| 246 | + </el-card> | ||
| 247 | + </el-form-item> | ||
| 248 | + </el-col> | ||
| 249 | + <el-col :span="24"> | ||
| 250 | + <el-form-item label="Sub Category"> | ||
| 251 | + <el-card shadow="never" style="width: 95%"> | ||
| 252 | + <el-checkbox-group v-model="val.subCategory" @change="change"> | ||
| 253 | + <el-row> | ||
| 254 | + <el-col v-for="item in checkBoxItem.subCategory" :span="2" | ||
| 255 | + :key="item.id"> | ||
| 256 | + <el-checkbox | ||
| 257 | + v-if="item.status === 1 || val.subCategory.includes(item.chineseName)" | ||
| 258 | + :label="item.chineseName" :name="item.chineseName" | ||
| 259 | + :disabled="val.subCategory.includes(item.chineseName) && item.status == 0" | ||
| 260 | + :key="item.code"> | ||
| 261 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 262 | + </Tooltips> | ||
| 263 | + </el-checkbox> | ||
| 264 | + </el-col> | ||
| 265 | + </el-row> | ||
| 266 | + </el-checkbox-group> | ||
| 267 | + </el-card> | ||
| 44 | </el-form-item> | 268 | </el-form-item> |
| 45 | </el-col> | 269 | </el-col> |
| 46 | </el-row> | 270 | </el-row> |
| 271 | + </div> | ||
| 272 | + </el-card> | ||
| 273 | + </el-collapse-item> | ||
| 274 | + </el-collapse> | ||
| 275 | + <el-card v-else shadow="always" v-for="(val, idx) in infoForm.list" :key="idx" style="min-height:350px"> | ||
| 276 | + <div> | ||
| 277 | + <el-empty description="未设置规则!" v-if="!val.isLocation"> | ||
| 278 | + <el-button type="primary" size="small" @click="newRoute(idx)">新增规则 | ||
| 279 | + </el-button> | ||
| 280 | + </el-empty> | ||
| 281 | + <el-row class="rowPadding" v-else> | ||
| 282 | + <el-button type="primary" size="mini" @click="submit(idx)">保 存</el-button> | ||
| 283 | + <el-button type="primary" v-if="val.status === '1'" size="mini" icon="el-icon-video-pause" | ||
| 284 | + @click="changeStatus(idx)"> | ||
| 285 | + 停 用</el-button> | ||
| 286 | + <el-button type="primary" v-if="val.status === '3'" size="mini" icon="el-icon-video-pause" | ||
| 287 | + @click="changeStatus(idx)"> | ||
| 288 | + 启 用</el-button> | ||
| 289 | + <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" @click="del(idx)">删 除 | ||
| 290 | + </el-button> | ||
| 291 | + <el-divider></el-divider> | ||
| 292 | + <el-col :span="24"> | ||
| 293 | + <el-form-item label="站点"> | ||
| 294 | + <el-col :span="4"> | ||
| 295 | + <el-radio-group v-model="val.isLocation" @change="change"> | ||
| 296 | + <el-radio label="1">站点包含</el-radio> | ||
| 297 | + <el-radio label="2">站点不包含</el-radio> | ||
| 298 | + </el-radio-group> | ||
| 299 | + </el-col> | ||
| 300 | + <el-col :span="10"> | ||
| 301 | + <el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea" | ||
| 302 | + :rows="4" resize="none" style="width: 500px" placeholder="站点之间用回车符分隔" | ||
| 303 | + @change="change" @input="change($event)"> | ||
| 304 | + </el-input> | ||
| 305 | + <el-input v-else v-model="val.notLocation" type="textarea" :rows="4" resize="none" | ||
| 306 | + style="width: 500px" placeholder="站点之间用回车符分隔" @change="change" | ||
| 307 | + @input="change($event)"> | ||
| 308 | + </el-input> | ||
| 309 | + </el-col> | ||
| 310 | + </el-form-item> | ||
| 311 | + </el-col> | ||
| 312 | + <el-col :span="24"> | ||
| 313 | + <el-col :span="12"> | ||
| 314 | + <el-form-item label="URSA包含"> | ||
| 315 | + <el-input v-model="val.includeUrsa" type="textarea" :rows="4" resize="none" | ||
| 316 | + style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_" @change="change" | ||
| 317 | + @input="change($event)"> | ||
| 318 | + </el-input> | ||
| 319 | + </el-form-item> | ||
| 320 | + </el-col> | ||
| 321 | + <el-col :span="12"> | ||
| 322 | + <el-form-item label="URSA不包含"> | ||
| 323 | + <el-input v-model="val.notIncludeUrsa" type="textarea" :rows="4" resize="none" | ||
| 324 | + style="width:500px" placeholder="URSA之间用分号分隔,例:F2;F3;P_" @change="change" | ||
| 325 | + @input="change($event)"> | ||
| 326 | + </el-input> | ||
| 327 | + </el-form-item> | ||
| 328 | + </el-col> | ||
| 329 | + </el-col> | ||
| 330 | + <el-col :span="24"> | ||
| 331 | + <el-col :span="9"> | ||
| 47 | <el-form-item label="件数"> | 332 | <el-form-item label="件数"> |
| 48 | - <el-col :span="3"> | 333 | + <el-col :span="10"> |
| 49 | - <el-input class="numberInput" v-model.trim="minNumOfPieces"></el-input> | 334 | + <el-input class="numberInput" v-model.trim="val.minNumOfPieces" |
| 335 | + oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" | ||
| 336 | + @input="change($event)"> | ||
| 337 | + </el-input> | ||
| 50 | </el-col> | 338 | </el-col> |
| 51 | <el-col style="text-align: center" :span="1">-</el-col> | 339 | <el-col style="text-align: center" :span="1">-</el-col> |
| 52 | - <el-col :span="3"> | 340 | + <el-col :span="10"> |
| 53 | - <el-input class="numberInput" v-model.trim="maxNumOfPieces"></el-input> | 341 | + <el-input class="numberInput" v-model.trim="val.maxNumOfPieces" |
| 342 | + oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" | ||
| 343 | + @input="change($event)"> | ||
| 344 | + </el-input> | ||
| 54 | </el-col> | 345 | </el-col> |
| 55 | </el-form-item> | 346 | </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> | 347 | </el-col> |
| 60 | - <el-col :span="1" style="text-align: center"><span>Kg</span></el-col> | 348 | + <el-col :span="9"> |
| 349 | + <el-form-item label="重量(KG)"> | ||
| 350 | + <el-col :span="10"> | ||
| 351 | + <el-input class="numberInput" v-model.trim="val.minWeight" | ||
| 352 | + oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" | ||
| 353 | + @input="change($event)"> | ||
| 354 | + </el-input> | ||
| 355 | + </el-col> | ||
| 61 | <el-col style="text-align: center" :span="1">-</el-col> | 356 | <el-col style="text-align: center" :span="1">-</el-col> |
| 62 | - <el-col :span="3"> | 357 | + <el-col :span="10"> |
| 63 | - <el-input class="numberInput" v-model.trim="maxWeight"></el-input> | 358 | + <el-input class="numberInput" v-model.trim="val.maxWeight" |
| 359 | + oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change" | ||
| 360 | + @input="change($event)"> | ||
| 361 | + </el-input> | ||
| 64 | </el-col> | 362 | </el-col> |
| 65 | - <el-col :span="1" style="text-align: center"><span>Kg</span></el-col> | ||
| 66 | </el-form-item> | 363 | </el-form-item> |
| 364 | + </el-col> | ||
| 365 | + </el-col> | ||
| 366 | + <el-col :span="24"> | ||
| 67 | <el-form-item label="申报类别"> | 367 | <el-form-item label="申报类别"> |
| 68 | - <el-card shadow="never" style="width: 80%"> | 368 | + <el-card shadow="never" style="width: 95%"> |
| 69 | - <el-checkbox-group v-model="form.typeOfGoods"> | 369 | + <el-checkbox-group v-model="val.typeOfGoods" @change="change"> |
| 70 | <el-row> | 370 | <el-row> |
| 71 | - <el-col :span="2" v-for="item in cargoType" :key="item.id"> | 371 | + <el-col v-for="item in checkBoxItem.cargoType" :span="2" :key="item.id"> |
| 72 | - <el-checkbox v-if="item.status === 1" :label="item.chineseName" :name="item.chineseName"> | 372 | + <el-checkbox v-if="item.status === 1" :label="item.chineseName" |
| 373 | + :name="item.chineseName" :key="item.code"> | ||
| 374 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 375 | + </Tooltips> | ||
| 73 | </el-checkbox> | 376 | </el-checkbox> |
| 74 | </el-col> | 377 | </el-col> |
| 75 | </el-row> | 378 | </el-row> |
| 76 | </el-checkbox-group> | 379 | </el-checkbox-group> |
| 77 | </el-card> | 380 | </el-card> |
| 78 | </el-form-item> | 381 | </el-form-item> |
| 382 | + </el-col> | ||
| 383 | + <el-col :span="24"> | ||
| 79 | <el-form-item label="货物类型"> | 384 | <el-form-item label="货物类型"> |
| 80 | - <el-card shadow="never" style="width: 80%"> | 385 | + <el-card shadow="never" style="width: 95%"> |
| 81 | - <el-checkbox-group v-model="form.declarationCategory"> | 386 | + <el-checkbox-group v-model="val.declarationCategory" @change="change"> |
| 82 | <el-row> | 387 | <el-row> |
| 83 | - <el-col :span="3" v-for="item in cargoStatus" :key="item.id"> | 388 | + <el-col v-for="item in checkBoxItem.cargoStatus" :span="3" :key="item.id"> |
| 84 | - <el-checkbox v-if="item.status === 1" :label="item.chineseName" :name="item.chineseName" disabled> | 389 | + <el-checkbox v-if="item.status === 1" :label="item.chineseName" |
| 390 | + :name="item.chineseName" disabled :key="item.code"> | ||
| 391 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 392 | + </Tooltips> | ||
| 393 | + </el-checkbox> | ||
| 394 | + </el-col> | ||
| 395 | + </el-row> | ||
| 396 | + </el-checkbox-group> | ||
| 397 | + </el-card> | ||
| 398 | + </el-form-item> | ||
| 399 | + </el-col> | ||
| 400 | + <el-col :span="24"> | ||
| 401 | + <el-form-item label="取件扫描号"> | ||
| 402 | + <el-card shadow="never" style="width: 95%"> | ||
| 403 | + <el-checkbox-group v-model="val.puporpuxCode" @change="change"> | ||
| 404 | + <el-row> | ||
| 405 | + <el-col :span="2" v-for="item in checkBoxItem.puporpux"> | ||
| 406 | + <el-checkbox | ||
| 407 | + v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)" | ||
| 408 | + :label="item.chineseName" :name="item.chineseName" | ||
| 409 | + :disabled="val.puporpuxCode.includes(item.chineseName) && item.status == 0" | ||
| 410 | + :key="item.code"> | ||
| 411 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 412 | + </Tooltips> | ||
| 85 | </el-checkbox> | 413 | </el-checkbox> |
| 86 | </el-col> | 414 | </el-col> |
| 87 | </el-row> | 415 | </el-row> |
| 88 | </el-checkbox-group> | 416 | </el-checkbox-group> |
| 89 | </el-card> | 417 | </el-card> |
| 90 | </el-form-item> | 418 | </el-form-item> |
| 419 | + </el-col> | ||
| 420 | + <el-col :span="24"> | ||
| 91 | <el-form-item label="Service Code"> | 421 | <el-form-item label="Service Code"> |
| 92 | - <el-card shadow="never" style="width: 80%"> | 422 | + <el-card shadow="never" style="width: 95%"> |
| 93 | - <el-checkbox-group v-model="form.serviceCode"> | 423 | + <el-checkbox-group v-model="val.serviceCode" @change="change"> |
| 94 | <el-row> | 424 | <el-row> |
| 95 | - <el-col :span="2" v-for="item in serviceCode" :key="item.id"> | 425 | + <el-col v-for="item in checkBoxItem.serviceCode" :span="2" :key="item.id"> |
| 96 | - <el-checkbox v-if="item.status === 1 || form.serviceCode.includes(item.chineseName)" | 426 | + <el-checkbox |
| 427 | + v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)" | ||
| 97 | :label="item.chineseName" :name="item.chineseName" | 428 | :label="item.chineseName" :name="item.chineseName" |
| 98 | - :disabled="form.serviceCode.includes(item.chineseName) && item.status === 0"> | 429 | + :disabled="val.serviceCode.includes(item.chineseName) && item.status == 0" |
| 99 | - <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> | 430 | + :key="item.code"> |
| 431 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 432 | + </Tooltips> | ||
| 100 | </el-checkbox> | 433 | </el-checkbox> |
| 101 | </el-col> | 434 | </el-col> |
| 102 | </el-row> | 435 | </el-row> |
| 103 | </el-checkbox-group> | 436 | </el-checkbox-group> |
| 104 | </el-card> | 437 | </el-card> |
| 105 | </el-form-item> | 438 | </el-form-item> |
| 439 | + </el-col> | ||
| 440 | + <el-col :span="24"> | ||
| 106 | <el-form-item label="Handling Code"> | 441 | <el-form-item label="Handling Code"> |
| 107 | - <el-card shadow="never" style="width: 80%"> | 442 | + <el-card shadow="never" style="width: 95%"> |
| 108 | - <el-checkbox-group v-model="form.handlingCode"> | 443 | + <el-checkbox-group v-model="val.handlingCode" @change="change"> |
| 109 | <el-row> | 444 | <el-row> |
| 110 | - <el-col :span="3" v-for="item in handlingCode" :key="item.id"> | 445 | + <el-col v-for="item in checkBoxItem.handlingCode" :span="2" :key="item.id"> |
| 111 | - <el-checkbox v-if="item.status === 1 || form.handlingCode.includes(item.chineseName)" | 446 | + <el-checkbox |
| 447 | + v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)" | ||
| 112 | :label="item.chineseName" :name="item.chineseName" | 448 | :label="item.chineseName" :name="item.chineseName" |
| 113 | - :disabled="form.handlingCode.includes(item.chineseName) && item.status === 0"> | 449 | + :disabled="val.handlingCode.includes(item.chineseName) && item.status == 0" |
| 114 | - <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> | 450 | + :key="item.code"> |
| 451 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 452 | + </Tooltips> | ||
| 115 | </el-checkbox> | 453 | </el-checkbox> |
| 116 | </el-col> | 454 | </el-col> |
| 117 | </el-row> | 455 | </el-row> |
| 118 | </el-checkbox-group> | 456 | </el-checkbox-group> |
| 119 | </el-card> | 457 | </el-card> |
| 120 | </el-form-item> | 458 | </el-form-item> |
| 459 | + </el-col> | ||
| 460 | + <el-col :span="24"> | ||
| 121 | <el-form-item label="Sub Category"> | 461 | <el-form-item label="Sub Category"> |
| 122 | - <el-card shadow="never" style="width: 80%"> | 462 | + <el-card shadow="never" style="width: 95%"> |
| 123 | - <el-checkbox-group v-model="form.subCategory"> | 463 | + <el-checkbox-group v-model="val.subCategory" @change="change"> |
| 124 | <el-row> | 464 | <el-row> |
| 125 | - <el-col :span="3" v-for="item in subCategory" :key="item.id"> | 465 | + <el-col v-for="item in checkBoxItem.subCategory" :span="2" :key="item.id"> |
| 126 | - <el-checkbox v-if="item.status === 1 || form.subCategory.includes(item.chineseName)" | 466 | + <el-checkbox |
| 467 | + v-if="item.status === 1 || val.subCategory.includes(item.chineseName)" | ||
| 127 | :label="item.chineseName" :name="item.chineseName" | 468 | :label="item.chineseName" :name="item.chineseName" |
| 128 | - :disabled="form.subCategory.includes(item.chineseName) && item.status === 0"> | 469 | + :disabled="val.subCategory.includes(item.chineseName) && item.status == 0" |
| 129 | - <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> | 470 | + :key="item.code"> |
| 471 | + <Tooltips :content="item.chineseName" :refName="item.code"> | ||
| 472 | + </Tooltips> | ||
| 130 | </el-checkbox> | 473 | </el-checkbox> |
| 131 | </el-col> | 474 | </el-col> |
| 132 | </el-row> | 475 | </el-row> |
| 133 | </el-checkbox-group> | 476 | </el-checkbox-group> |
| 134 | </el-card> | 477 | </el-card> |
| 135 | </el-form-item> | 478 | </el-form-item> |
| 136 | - </el-form> | 479 | + </el-col> |
| 137 | - <div style="marginLeft: 200px"> | 480 | + </el-row> |
| 138 | - <el-button type="primary" size="small" | ||
| 139 | - v-if="$route.params.handle != 'detail' && $route.params.handle != 'DMdetail'" @click="submit('form')" | ||
| 140 | - :loading="btnLoading"> | ||
| 141 | - <span v-if="$route.params.handle === 'add'">添加</span> | ||
| 142 | - <span v-else>保存</span> | ||
| 143 | - </el-button> | ||
| 144 | - <el-button size="small" @click="close">取消</el-button> | ||
| 145 | </div> | 481 | </div> |
| 146 | - </template> | 482 | + </el-card> |
| 483 | + </el-form> | ||
| 147 | </div> | 484 | </div> |
| 148 | </template> | 485 | </template> |
| 149 | 486 | ||
| 150 | <script> | 487 | <script> |
| 151 | import { | 488 | import { |
| 152 | - findByFlightId, | 489 | + findDestinationFltRuleByFlightNo, |
| 153 | updateOrAddFlight, | 490 | updateOrAddFlight, |
| 154 | allDictData, | 491 | allDictData, |
| 155 | - findDestinationFltRuleByActualFlight, | 492 | + delFlightId, |
| 493 | + enableOrDisable, | ||
| 494 | + batchUpdateOrAddFlight, | ||
| 495 | + findByFlightId, | ||
| 496 | + queryRouteByFltNo | ||
| 156 | } from "@/api/destinationFlight"; | 497 | } from "@/api/destinationFlight"; |
| 157 | 498 | ||
| 158 | export default { | 499 | export default { |
| 159 | - name: "", | 500 | + name: 'FlightAllocConfigInfo', |
| 160 | data() { | 501 | data() { |
| 161 | return { | 502 | return { |
| 162 | - form: { | 503 | + infoForm: { |
| 163 | - minNumOfPieces: undefined, | 504 | + fltNo: '', |
| 164 | - maxNumOfPieces: undefined, | 505 | + fltDate: null, |
| 165 | - minWeight: undefined, | 506 | + route: null, |
| 166 | - maxWeight: undefined, | 507 | + list: [], |
| 167 | - typeOfGoods: [], | 508 | + }, |
| 168 | - declarationCategory: [], | 509 | + routeList: [], |
| 510 | + checkBoxItem: { | ||
| 511 | + cargoType: [], | ||
| 512 | + cargoStatus: [], | ||
| 513 | + puporpux: [], | ||
| 169 | serviceCode: [], | 514 | serviceCode: [], |
| 170 | - subCategory: [], | ||
| 171 | handlingCode: [], | 515 | handlingCode: [], |
| 516 | + subCategory: [] | ||
| 172 | }, | 517 | }, |
| 173 | rules: { | 518 | rules: { |
| 174 | - purposeOfFlightNo: [ | 519 | + "fltNo": [ |
| 175 | { | 520 | { |
| 176 | required: true, | 521 | required: true, |
| 177 | - message: "请输入航班号", | 522 | + message: "航班号不能为空", |
| 178 | trigger: "blur", | 523 | trigger: "blur", |
| 179 | }, | 524 | }, |
| 180 | - ], | 525 | + ] |
| 181 | }, | 526 | }, |
| 182 | - typeOfGoods: [], | 527 | + status: '', |
| 183 | - declarationCategory: [], | 528 | + routeSatus: '', |
| 184 | - formServiceCode: [], | ||
| 185 | - formHandlingCode: [], | ||
| 186 | - formSubCategory: [], | ||
| 187 | - cargoType: [], | ||
| 188 | - cargoStatus: [], | ||
| 189 | - serviceCode: [], | ||
| 190 | - handlingCode: [], | ||
| 191 | - subCategory: [], | ||
| 192 | - isLocation: "1", | ||
| 193 | - disable: false, | ||
| 194 | - nameDisabled: false, | ||
| 195 | - btnLoading: false, | ||
| 196 | - loading: true, | ||
| 197 | isEmpty: false, | 529 | isEmpty: false, |
| 198 | - routeName: "", | 530 | + disabled: false, |
| 199 | - dataId: "", | 531 | + allSubmitDisabled: false, |
| 200 | - handleName: "", | 532 | + fltNoDisabled: false, |
| 201 | - }; | 533 | + loading: true, |
| 534 | + } | ||
| 202 | }, | 535 | }, |
| 203 | created() { | 536 | created() { |
| 204 | - this.routeName = this.$route.name; | 537 | + this.dictData() |
| 205 | - this.dataId = this.$route.params.id; | 538 | + this.status = this.$route.params.handle |
| 206 | - this.handleName = this.$route.params.handle; | 539 | + this.$route.params.handle === 'detail' ? this.disabled = true : this.disabled = false |
| 207 | - this.dictData(); | 540 | + this.$route.params.routeStatus ? this.routeSatus = this.$route.params.routeStatus : '' |
| 208 | - if (this.handleName === "detail" || this.handleName === 'DMdetail') { | 541 | + if (this.$route.params.handle != 'add') { |
| 209 | - this.disable = true; | 542 | + this.fltNoDisabled = true |
| 543 | + this.infoForm.fltNo = this.$route.params.fltNo | ||
| 544 | + this.infoForm.fltDate = this.$route.params.fltDate | ||
| 545 | + this.infoForm.route = this.$route.params.route | ||
| 546 | + if (this.routeSatus == 'dmLog') { | ||
| 547 | + this.getIdDimension(this.$route.params.id) | ||
| 548 | + } else { | ||
| 549 | + 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 }) | ||
| 210 | } | 550 | } |
| 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 { | 551 | } else { |
| 228 | - this.isLocation = "1"; | 552 | + this.infoForm.fltNo = '' |
| 553 | + this.infoForm.fltDate = null | ||
| 554 | + this.infoForm.route = null | ||
| 229 | } | 555 | } |
| 556 | + }, | ||
| 557 | + mounted() { | ||
| 558 | + this.loading = false | ||
| 559 | + }, | ||
| 560 | + watch: { | ||
| 561 | + $route: { | ||
| 562 | + handler(to, from) { | ||
| 563 | + let route = '' | ||
| 564 | + if (from.name == 'FlightInformationMaintenance') { | ||
| 565 | + this.routeSatus = 'flightInformationMaintenance' | ||
| 566 | + route = this.infoForm.list[0].flightRoute | ||
| 567 | + } else if (from.name == 'DmLog') { | ||
| 568 | + this.routeSatus = 'dmLog' | ||
| 569 | + route = this.infoForm.list[0].flightRoute | ||
| 570 | + this.getIdDimension(this.infoForm.list[0].id) | ||
| 230 | } else { | 571 | } else { |
| 231 | - if (isNaN(Number(this.dataId))) { | 572 | + this.routeSatus = null |
| 232 | - findDestinationFltRuleByActualFlight(this.dataId).then((response) => { | 573 | + } |
| 233 | - if (response.code != 200) { | 574 | + if (to.name == 'FlightAllocConfigInfo' && from.name != 'DmLog') { |
| 234 | - this.msgWarning(response.msg) | 575 | + this.getRouteDimension({ fltNo: this.infoForm.fltNo, fltDate: this.infoForm.fltDate, route: route ? route : '', status: this.$route.params.status }) |
| 235 | - this.isEmpty = true; | 576 | + } |
| 236 | - } else if (response.data == null) { | 577 | + if (this.$route.params.handle == 'add') { |
| 237 | - this.isEmpty = true; | 578 | + this.getRoutes(this.infoForm.fltNo) |
| 579 | + } | ||
| 580 | + }, | ||
| 581 | + deep: true | ||
| 582 | + }, | ||
| 583 | + }, | ||
| 584 | + methods: { | ||
| 585 | + //页面选项 | ||
| 586 | + dictData() { | ||
| 587 | + allDictData().then((res) => { | ||
| 588 | + if (res.code != 200) { | ||
| 589 | + this.msgError(res.msg) | ||
| 590 | + return; | ||
| 591 | + } | ||
| 592 | + this.checkBoxItem.cargoType = res.data.cargoType; | ||
| 593 | + this.checkBoxItem.cargoStatus = res.data.cargoStatus; | ||
| 594 | + this.checkBoxItem.puporpux = res.data.puporpux; | ||
| 595 | + this.checkBoxItem.serviceCode = this.dicSort(res.data.serviceCode.sort((a, b) => | ||
| 596 | + a.chineseName.localeCompare(b.chineseName) | ||
| 597 | + )); | ||
| 598 | + this.checkBoxItem.handlingCode = this.dicSort(this.sorttodo(res.data.handlingCode, "BLANK")); | ||
| 599 | + this.checkBoxItem.subCategory = this.dicSort(this.sorttodo(res.data.subCategory, "Blank")); | ||
| 600 | + }); | ||
| 601 | + }, | ||
| 602 | + //id查询维度信息 | ||
| 603 | + getIdDimension(val) { | ||
| 604 | + this.routeList = [] | ||
| 605 | + this.infoForm.list = [] | ||
| 606 | + findByFlightId(val).then(res => { | ||
| 607 | + if (res.code === 200) { | ||
| 608 | + if (res.data.list) { | ||
| 609 | + this.routeList.push( | ||
| 610 | + { | ||
| 611 | + fltNo: res.data.list.purposeOfFlightNo, | ||
| 612 | + route: res.data.list.flightRoute, | ||
| 613 | + routePriority: '1' | ||
| 614 | + } | ||
| 615 | + ) | ||
| 616 | + this.infoForm.fltNo = res.data.list.purposeOfFlightNo | ||
| 617 | + this.infoForm.fltDate = res.data.list.ruleDate | ||
| 618 | + this.infoForm.route = res.data.list.flightRoute | ||
| 619 | + this.infoForm.list.push(this.dataHandle(res.data.list)) | ||
| 238 | } else { | 620 | } else { |
| 239 | - let info = response.data; | 621 | + this.isEmpty = true |
| 240 | - info.typeOfGoods = info.typeOfGoods | 622 | + } |
| 241 | - ? info.typeOfGoods.split(";") | ||
| 242 | - : []; | ||
| 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 { | 623 | } else { |
| 259 | - this.isLocation = "1"; | 624 | + this.msgWarning("为查询到数据!") |
| 625 | + this.isEmpty = true | ||
| 260 | } | 626 | } |
| 627 | + }).catch(err => { | ||
| 628 | + console.log(err) | ||
| 629 | + this.isEmpty = true | ||
| 630 | + }) | ||
| 631 | + }, | ||
| 632 | + //获取航班航线维度 | ||
| 633 | + getRouteDimension(val) { | ||
| 634 | + this.routeList = [] | ||
| 635 | + this.infoForm.list = [] | ||
| 636 | + let obj = { | ||
| 637 | + purposeOfFlightNo: val.fltNo, | ||
| 638 | + flightDate: val.fltDate, | ||
| 639 | + flightRoute: val.route, | ||
| 640 | + status: val.status ? val.status : '' | ||
| 261 | } | 641 | } |
| 262 | - this.loading = false; | 642 | + if (this.$route.params.handle != 'add') { |
| 263 | - }).catch(() => { | 643 | + findDestinationFltRuleByFlightNo(obj).then(res => { |
| 264 | - this.loading = false; | 644 | + if (res.code === 200) { |
| 645 | + this.routeList = res.data.routeList | ||
| 646 | + if (res.data.list.length > 0) { | ||
| 647 | + //请求到数据 | ||
| 648 | + if (this.infoForm.route != null && this.infoForm.route != null) { | ||
| 649 | + //航线不为空,对应到这条航线下的这条维度(直接处理插入数据) | ||
| 650 | + if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') { | ||
| 651 | + //如果是从航班维护界面跳转且航班类型为White Tail则直接显示当前航线维度 | ||
| 652 | + res.data.list.forEach(item => { | ||
| 653 | + this.infoForm.list.push(this.dataHandle(item)) | ||
| 654 | + }) | ||
| 655 | + } else { | ||
| 656 | + //航班类型为Purple Tail则显示所有航线维度 | ||
| 657 | + this.routeList.forEach(route => { | ||
| 658 | + let routeStatus = 1 | ||
| 659 | + res.data.list.forEach(item => { | ||
| 660 | + if (route.route === item.flightRoute) { | ||
| 661 | + //航线对应插入数据 | ||
| 662 | + routeStatus = 2 | ||
| 663 | + this.infoForm.list.push(this.dataHandle(item)) | ||
| 664 | + } | ||
| 665 | + }) | ||
| 666 | + if (routeStatus == 1) { | ||
| 667 | + //否则插入占位基础数据 | ||
| 668 | + this.infoForm.list.push({ | ||
| 669 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 670 | + ruleDate: this.infoForm.fltDate, | ||
| 671 | + flightRoute: route.route, | ||
| 672 | + routePriority: route.routePriority, | ||
| 673 | + }) | ||
| 674 | + } | ||
| 675 | + }) | ||
| 676 | + } | ||
| 677 | + } else { | ||
| 678 | + //航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度) | ||
| 679 | + this.routeList.forEach(route => { | ||
| 680 | + let routeStatus = 1 | ||
| 681 | + res.data.list.forEach(item => { | ||
| 682 | + if (route.route === item.flightRoute) { | ||
| 683 | + //航线对应插入数据 | ||
| 684 | + routeStatus = 2 | ||
| 685 | + this.infoForm.list.push(this.dataHandle(item)) | ||
| 686 | + } | ||
| 687 | + }) | ||
| 688 | + if (routeStatus == 1) { | ||
| 689 | + //否则插入占位基础数据 | ||
| 690 | + this.infoForm.list.push({ | ||
| 691 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 692 | + ruleDate: this.infoForm.fltDate, | ||
| 693 | + flightRoute: route.route, | ||
| 694 | + routePriority: route.routePriority, | ||
| 695 | + }) | ||
| 696 | + } | ||
| 697 | + }) | ||
| 698 | + } | ||
| 699 | + } else { | ||
| 700 | + //未请求到数据 | ||
| 701 | + if (this.infoForm.route != null && this.infoForm.route != '') { | ||
| 702 | + //航线不为空,获取该航线下无日期通用维度设置 | ||
| 703 | + findDestinationFltRuleByFlightNo({ | ||
| 704 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 705 | + flightRoute: this.infoForm.route, | ||
| 706 | + status: this.$route.params.status | ||
| 707 | + }).then(response => { | ||
| 708 | + if (response.data.list.length > 0) { | ||
| 709 | + //查询到通用维度,去除id status,航线赋值,航线优先级赋值 | ||
| 710 | + if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') { | ||
| 711 | + //航班类型White Tail只展示当前航线维度 | ||
| 712 | + response.data.list.forEach(item => { | ||
| 713 | + item.id = undefined | ||
| 714 | + item.status = undefined | ||
| 715 | + item.flightRoute = this.infoForm.route | ||
| 716 | + this.routeList.forEach(route => { | ||
| 717 | + if (route.route === this.infoForm.route) { | ||
| 718 | + item.routePriority = route.routePriority | ||
| 719 | + } | ||
| 720 | + }) | ||
| 721 | + this.infoForm.list.push(this.dataHandle(item)) | ||
| 265 | }) | 722 | }) |
| 266 | } else { | 723 | } else { |
| 267 | - //货物信息 | 724 | + //航班类型Purple Tail展示全部航线维度 |
| 268 | - findByFlightId(this.dataId).then((response) => { | 725 | + let routesStatus = 1 |
| 269 | - if (response.code != 200) { | 726 | + this.routeList.forEach(route => { |
| 270 | - this.msgWarning(response.msg) | 727 | + response.data.list.forEach(item => { |
| 271 | - this.isEmpty = true; | 728 | + if (route.route === item.flightRoute) { |
| 729 | + routesStatus = 2 | ||
| 730 | + item.id = undefined | ||
| 731 | + item.status = undefined | ||
| 732 | + item.flightRoute = this.infoForm.route | ||
| 733 | + item.routePriority = route.routePriority | ||
| 734 | + this.infoForm.list.push(this.dataHandle(item)) | ||
| 735 | + } | ||
| 736 | + }) | ||
| 737 | + if (routesStatus == 1) { | ||
| 738 | + this.infoForm.list.push({ | ||
| 739 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 740 | + ruleDate: this.infoForm.fltDate, | ||
| 741 | + flightRoute: route.route, | ||
| 742 | + routePriority: route.routePriority, | ||
| 743 | + }) | ||
| 744 | + } | ||
| 745 | + }) | ||
| 746 | + } | ||
| 272 | } else { | 747 | } else { |
| 273 | - let info = response.data.list; | 748 | + //未查询到,插入占位基础数据使用户新建 |
| 274 | - info.typeOfGoods = info.typeOfGoods | 749 | + if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') { |
| 275 | - ? info.typeOfGoods.split(";") | 750 | + //航班类型White Tail只展示当前航线维度 |
| 276 | - : []; | 751 | + this.routeList.forEach((item) => { |
| 277 | - info.declarationCategory = info.declarationCategory | 752 | + if (item.route === this.infoForm.route) { |
| 278 | - ? info.declarationCategory.split(";") | 753 | + this.infoForm.list.push({ |
| 279 | - : []; | 754 | + purposeOfFlightNo: this.infoForm.fltNo, |
| 280 | - info.serviceCode = info.serviceCode | 755 | + ruleDate: this.infoForm.fltDate, |
| 281 | - ? info.serviceCode.split(";") | 756 | + flightRoute: this.infoForm.route, |
| 282 | - : []; | 757 | + routePriority: item.routePriority, |
| 283 | - info.handlingCode = info.handlingCode | 758 | + }) |
| 284 | - ? info.handlingCode.split(";") | 759 | + } |
| 285 | - : []; | 760 | + }) |
| 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 { | 761 | } else { |
| 293 | - this.isLocation = "1"; | 762 | + //航班类型Purple Tail展示全部航线维度 |
| 763 | + this.isEmpty = true | ||
| 764 | + // this.routeList.forEach((route) => { | ||
| 765 | + // this.infoForm.list.push({ | ||
| 766 | + // purposeOfFlightNo: this.infoForm.fltNo, | ||
| 767 | + // ruleDate: this.infoForm.fltDate, | ||
| 768 | + // flightRoute: route.route, | ||
| 769 | + // routePriority: route.routePriority, | ||
| 770 | + // }) | ||
| 771 | + // }) | ||
| 294 | } | 772 | } |
| 295 | } | 773 | } |
| 296 | - this.loading = false; | 774 | + }).catch(err => { |
| 297 | - }).catch(() => { | 775 | + this.isEmpty = true |
| 298 | - this.loading = false; | 776 | + console.log(err) |
| 777 | + }) | ||
| 778 | + } else { | ||
| 779 | + //航线为空,提示未找到维度数据 | ||
| 780 | + if (this.routeSatus == 'flightInformationMaintenancePurple Tail') { | ||
| 781 | + findDestinationFltRuleByFlightNo({ | ||
| 782 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 783 | + flightRoute: this.infoForm.route, | ||
| 784 | + status: this.$route.params.status | ||
| 785 | + }).then(response => { | ||
| 786 | + if (response.data.list.length > 0) { | ||
| 787 | + this.routeList.forEach(route => { | ||
| 788 | + let routeStatus = 1 | ||
| 789 | + response.data.list.forEach(item => { | ||
| 790 | + if (item.flightRoute == route.route) { | ||
| 791 | + routeStatus = 2 | ||
| 792 | + item.id = undefined | ||
| 793 | + item.status = undefined | ||
| 794 | + item.routePriority = route.routePriority | ||
| 795 | + this.infoForm.list.push( | ||
| 796 | + this.dataHandle(item) | ||
| 797 | + ) | ||
| 798 | + } | ||
| 799 | + }) | ||
| 800 | + if (routeStatus == 1) { | ||
| 801 | + this.infoForm.list.push({ | ||
| 802 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 803 | + ruleDate: this.infoForm.fltDate, | ||
| 804 | + flightRoute: route.route, | ||
| 805 | + routePriority: route.routePriority, | ||
| 299 | }) | 806 | }) |
| 300 | } | 807 | } |
| 808 | + }) | ||
| 809 | + } else { | ||
| 810 | + this.isEmpty = true | ||
| 811 | + } | ||
| 812 | + }).catch(err => { | ||
| 813 | + this.isEmpty = true | ||
| 814 | + console.log(err) | ||
| 815 | + }) | ||
| 816 | + } | ||
| 817 | + } | ||
| 818 | + } | ||
| 819 | + } else { | ||
| 820 | + this.msgWarning(res.msg) | ||
| 821 | + } | ||
| 822 | + }).catch(err => { | ||
| 823 | + console.log(err) | ||
| 824 | + }) | ||
| 301 | } | 825 | } |
| 826 | + }, | ||
| 827 | + //新增获取航线 | ||
| 828 | + getRoutes(val) { | ||
| 829 | + this.routeList = [] | ||
| 830 | + this.infoForm.list = [] | ||
| 831 | + if (this.status == 'add') { | ||
| 832 | + if (val != '' || val != null) { | ||
| 833 | + this.infoForm.fltNo = this.upCase(val) | ||
| 834 | + queryRouteByFltNo({ fltNo: this.infoForm.fltNo }).then(res => { | ||
| 835 | + if (res.code === 200) { | ||
| 836 | + if (res.data.list.length > 0) { | ||
| 837 | + this.routeList = res.data.list | ||
| 838 | + res.data.list.forEach(item => { | ||
| 839 | + this.infoForm.list.push({ | ||
| 840 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 841 | + ruleDate: this.infoForm.fltDate, | ||
| 842 | + flightRoute: item.route, | ||
| 843 | + routePriority: item.ordinal | ||
| 844 | + }) | ||
| 845 | + }) | ||
| 302 | } else { | 846 | } else { |
| 303 | - this.loading = false; | 847 | + this.routeList = [] |
| 848 | + this.infoForm.list = [] | ||
| 304 | } | 849 | } |
| 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 { | 850 | } else { |
| 311 | - this.isLocation = "1"; | 851 | + this.msgWarning(res.msg) |
| 312 | } | 852 | } |
| 853 | + }).catch(err => { | ||
| 854 | + console.log(err) | ||
| 855 | + }) | ||
| 313 | } | 856 | } |
| 314 | } | 857 | } |
| 315 | }, | 858 | }, |
| 316 | - methods: { | 859 | + //保存 |
| 317 | - //排序 | 860 | + submit(val) { |
| 318 | - sorttodo(arr, chineseName) { | 861 | + this.loading = true |
| 319 | - var index = 1, | 862 | + let routeArr = [] |
| 320 | - newArr = [], | 863 | + let data = this.setDataHandle(this.infoForm.list[val]) |
| 321 | - length = arr.length; | 864 | + this.routeList.forEach((item, idx) => { |
| 322 | - for (var i = 0; i < length; i++) { | 865 | + routeArr.push(item.route) |
| 323 | - if (arr[i].chineseName === chineseName) { | 866 | + }) |
| 324 | - newArr[0] = arr[i]; | 867 | + data.routeSpecifyDateSeq = routeArr.join(';') |
| 868 | + data.ruleDate = this.infoForm.fltDate | ||
| 869 | + this.infoForm.list[val].routePriority = this.routeList[val].routePriority | ||
| 870 | + if (this.infoForm.route != null && this.infoForm.route != '') { | ||
| 871 | + this.routeList.forEach(item => { | ||
| 872 | + if (item.route == this.infoForm.route) { | ||
| 873 | + data.routePriority = item.routePriority | ||
| 874 | + } | ||
| 875 | + }) | ||
| 876 | + data.flightRoute = this.infoForm.route | ||
| 325 | } else { | 877 | } else { |
| 326 | - newArr[index++] = arr[i]; | 878 | + data.flightRoute = this.routeList[val].route |
| 879 | + data.routePriority = this.routeList[val].routePriority | ||
| 327 | } | 880 | } |
| 881 | + updateOrAddFlight(data).then(res => { | ||
| 882 | + this.loading = false | ||
| 883 | + if (res.code === 200) { | ||
| 884 | + this.fltNoDisabled = true | ||
| 885 | + this.$forceUpdate() | ||
| 886 | + this.msgSuccess('保存成功!') | ||
| 887 | + this.infoForm.list[val] = this.dataHandle(res.data) | ||
| 888 | + } else { | ||
| 889 | + this.msgWarning(res.msg) | ||
| 328 | } | 890 | } |
| 329 | - return newArr; | 891 | + }).catch(err => { |
| 892 | + console.log(err) | ||
| 893 | + }) | ||
| 330 | }, | 894 | }, |
| 331 | - | 895 | + //删除 |
| 332 | - submit(form) { | 896 | + del(val) { |
| 333 | - this.$refs[form].validate((valid) => { | 897 | + if (this.infoForm.list[val].id) { |
| 334 | - if (!valid) { | 898 | + if (this.infoForm.list[val].status == "1") { |
| 335 | - return false; | 899 | + this.$confirm("航班规则生效中,无法删除,请停用后再操作", "警告", { |
| 900 | + confirmButtonText: "确定", | ||
| 901 | + showCancelButton: false, | ||
| 902 | + type: "warning", | ||
| 903 | + }); | ||
| 904 | + } else { | ||
| 905 | + this.loading = true | ||
| 906 | + this.$confirm("是否确认删除此航班规则?", "警告", { | ||
| 907 | + confirmButtonText: "确定", | ||
| 908 | + cancelButtonText: "取消", | ||
| 909 | + showCancelButton: true, | ||
| 910 | + type: "warning", | ||
| 911 | + }).then(() => { | ||
| 912 | + delFlightId(this.infoForm.list[val].id) | ||
| 913 | + .then((res) => { | ||
| 914 | + this.loading = false | ||
| 915 | + res.code === 200 ? this.msgSuccess(res.msg) : this.msgWarning(res.msg) | ||
| 916 | + let obj = { | ||
| 917 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 918 | + ruleDate: this.infoForm.fltDate, | ||
| 919 | + flightRoute: this.infoForm.list[val].flightRoute, | ||
| 920 | + routePriority: this.infoForm.list[val].routePriority, | ||
| 336 | } | 921 | } |
| 922 | + this.infoForm.list[val] = obj | ||
| 923 | + this.$forceUpdate() | ||
| 924 | + }).catch(() => { | ||
| 925 | + this.loading = false | ||
| 926 | + }); | ||
| 337 | }); | 927 | }); |
| 338 | - | ||
| 339 | - this.btnLoading = true; | ||
| 340 | - if (this.handleName === "update") { | ||
| 341 | - //修改,获取id | ||
| 342 | - this.form.id = this.$route.params.id; | ||
| 343 | } | 928 | } |
| 344 | - | ||
| 345 | - //调用接口 | ||
| 346 | - this.typeOfGoods = this.form.typeOfGoods; | ||
| 347 | - this.declarationCategory = this.form.declarationCategory; | ||
| 348 | - this.formServiceCode = this.form.serviceCode; | ||
| 349 | - this.formHandlingCode = this.form.handlingCode; | ||
| 350 | - this.formSubCategory = this.form.subCategory; | ||
| 351 | - if (this.form.purposeOfFlightNo) { | ||
| 352 | - this.form.purposeOfFlightNo = this.form.purposeOfFlightNo.toUpperCase(); | ||
| 353 | - } | ||
| 354 | - if (this.isLocation == 1) { | ||
| 355 | - this.form.notLocation = ""; | ||
| 356 | } else { | 929 | } else { |
| 357 | - this.form.location = ""; | 930 | + this.infoForm.list[val] = { |
| 931 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 932 | + ruleDate: this.infoForm.fltDate, | ||
| 933 | + flightRoute: this.routeList[val].route, | ||
| 934 | + routePriority: this.routeList[val].routePriority, | ||
| 358 | } | 935 | } |
| 359 | - | 936 | + } |
| 360 | - if ( | 937 | + }, |
| 361 | - this.form.includeUrsa && | 938 | + //新增 |
| 362 | - this.form.includeUrsa.length != 0 && | 939 | + newRoute(val) { |
| 363 | - this.form.notIncludeUrsa && | 940 | + this.infoForm.list[val].purposeOfFlightNo = this.infoForm.fltNo |
| 364 | - this.form.notIncludeUrsa.length != 0 | 941 | + this.infoForm.list[val].ruleDate = this.infoForm.fltDate |
| 365 | - ) { | 942 | + this.infoForm.list[val].flightRoute = this.routeList[val].route |
| 366 | - let include = this.form.includeUrsa.split(";"); | 943 | + this.infoForm.list[val].routePriority = this.routeList[val].routePriority |
| 367 | - let notInclude = this.form.notIncludeUrsa.split(";"); | 944 | + this.infoForm.list[val].isLocation = '1' |
| 368 | - let errorList = []; | 945 | + this.infoForm.list[val].typeOfGoods = [] |
| 369 | - notInclude.forEach((element) => { | 946 | + this.infoForm.list[val].declarationCategory = [] |
| 370 | - if (element.indexOf("_") > 0) { | 947 | + this.infoForm.list[val].puporpuxCode = [] |
| 371 | - errorList.push(element); | 948 | + this.infoForm.list[val].serviceCode = [] |
| 949 | + this.infoForm.list[val].handlingCode = [] | ||
| 950 | + this.infoForm.list[val].subCategory = [] | ||
| 951 | + console.log(this.infoForm) | ||
| 952 | + this.$forceUpdate() | ||
| 953 | + }, | ||
| 954 | + //启用,停用 | ||
| 955 | + changeStatus(idx) { | ||
| 956 | + this.loading = true | ||
| 957 | + let status = this.infoForm.list[idx].status | ||
| 958 | + let tip = status === '1' ? "停用" : "启用"; | ||
| 959 | + this.$confirm("是否确认" + tip + "此航班规则?", "警告", { | ||
| 960 | + confirmButtonText: "确定", | ||
| 961 | + cancelButtonText: "取消", | ||
| 962 | + type: "warning", | ||
| 963 | + }).then(() => { | ||
| 964 | + status == '1' ? status = '3' : status = '1' | ||
| 965 | + enableOrDisable(this.infoForm.list[idx].id, status) | ||
| 966 | + .then((res) => { | ||
| 967 | + this.loading = false | ||
| 968 | + if (res.code != 200) { | ||
| 969 | + this.msgError(res.msg); | ||
| 372 | } else { | 970 | } else { |
| 373 | - let flag = 0; | 971 | + this.msgSuccess(tip + "成功"); |
| 374 | - for (let i = 0; i < include.length; i++) { | 972 | + this.infoForm.list[idx] = this.dataHandle(res.data) |
| 375 | - if ( | 973 | + this.$forceUpdate() |
| 376 | - element == "" || | ||
| 377 | - (include[i].indexOf("_") > 0 && | ||
| 378 | - include[i].substring(0, 1) == element.substring(0, 1)) | ||
| 379 | - ) { | ||
| 380 | - flag = 1; | ||
| 381 | - break; | ||
| 382 | } | 974 | } |
| 975 | + }) | ||
| 976 | + .catch(() => { | ||
| 977 | + this.loading = false | ||
| 978 | + }); | ||
| 979 | + }).catch(() => { | ||
| 980 | + this.loading = false | ||
| 981 | + }) | ||
| 982 | + }, | ||
| 983 | + //保存航班优先级 | ||
| 984 | + setRoutes() { | ||
| 985 | + this.loading = true | ||
| 986 | + let routeArr = [] | ||
| 987 | + let arr = [] | ||
| 988 | + let infoForm = this.infoForm.list | ||
| 989 | + this.routeList.forEach((item, idx) => { | ||
| 990 | + routeArr.push(item.route) | ||
| 991 | + this.infoForm.list[idx].routePriority = item.routePriority | ||
| 992 | + }) | ||
| 993 | + infoForm.forEach((val, index) => { | ||
| 994 | + val.routeSpecifyDateSeq = routeArr.join(';') | ||
| 995 | + val.routePriority = this.routeList[index].routePriority | ||
| 996 | + this.setDataHandle(val) ? arr.push(this.setDataHandle(val)) : '' | ||
| 997 | + }) | ||
| 998 | + this.$confirm("是否要保存,如果保存下方的维度会一同进行保存!", "警告", { | ||
| 999 | + confirmButtonText: "确定", | ||
| 1000 | + cancelButtonText: "取消", | ||
| 1001 | + type: "warning", | ||
| 1002 | + }).then(() => { | ||
| 1003 | + batchUpdateOrAddFlight(arr).then(res => { | ||
| 1004 | + this.loading = false | ||
| 1005 | + if (res.code === 200) { | ||
| 1006 | + res.data.forEach((item, idx) => { | ||
| 1007 | + this.infoForm.list[idx] = this.dataHandle(item) | ||
| 1008 | + }) | ||
| 1009 | + this.$forceUpdate() | ||
| 1010 | + } else { | ||
| 1011 | + this.msgWarning(res.msg) | ||
| 383 | } | 1012 | } |
| 384 | - if (flag == 0) { | 1013 | + }).catch(err => { |
| 385 | - errorList.push(element); | 1014 | + this.loading = false |
| 1015 | + console.log(err) | ||
| 1016 | + }) | ||
| 1017 | + }).catch(() => { | ||
| 1018 | + this.infoForm.list.map((item, idx) => { | ||
| 1019 | + if (item.isLocation) { | ||
| 1020 | + this.infoForm.list[idx] = this.dataHandle(item) | ||
| 386 | } | 1021 | } |
| 1022 | + }) | ||
| 1023 | + this.$forceUpdate() | ||
| 1024 | + this.loading = false | ||
| 1025 | + }) | ||
| 1026 | + }, | ||
| 1027 | + //航线优先级修改 | ||
| 1028 | + drag(val) { | ||
| 1029 | + this.routeList = val | ||
| 1030 | + // this.routeList.map((item, index) => { | ||
| 1031 | + // item.routePriority = val[index].routePriority | ||
| 1032 | + // }) | ||
| 1033 | + }, | ||
| 1034 | + //刷新控件 | ||
| 1035 | + change(e) { | ||
| 1036 | + this.$forceUpdate() | ||
| 1037 | + }, | ||
| 1038 | + //数据处理 | ||
| 1039 | + dataHandle(val) { | ||
| 1040 | + val.isLocation = '1' | ||
| 1041 | + val.location ? val.isLocation = '1' : '' | ||
| 1042 | + val.notLocation ? val.isLocation = '2' : '' | ||
| 1043 | + val.maxNumOfPieces == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最大件数 | ||
| 1044 | + val.maxWeight == null ? val.maxWeight = undefined : val.maxWeight = val.maxWeight//最大重量 | ||
| 1045 | + val.minNumOfPieces == null ? val.minNumOfPieces = undefined : val.minNumOfPieces = val.minNumOfPieces//最小件数 | ||
| 1046 | + val.minWeight == null ? val.minWeight = undefined : val.minWeight = val.minWeight//最小件数 | ||
| 1047 | + val.typeOfGoods != null ? val.typeOfGoods = val.typeOfGoods.split(';') : val.typeOfGoods = []//申报类型 | ||
| 1048 | + val.declarationCategory != null ? val.declarationCategory = val.declarationCategory.split(';') : val.declarationCategory = []//货物类型 | ||
| 1049 | + val.puporpuxCode != null ? val.puporpuxCode = val.puporpuxCode.split(';') : val.puporpuxCode = []//取件扫描码 | ||
| 1050 | + val.serviceCode != null ? val.serviceCode = val.serviceCode.split(';') : val.serviceCode = []//serviceCode | ||
| 1051 | + val.handlingCode != null ? val.handlingCode = val.handlingCode.split(';') : val.handlingCode = []//handlingCode | ||
| 1052 | + val.subCategory != null ? val.subCategory = val.subCategory.split(';') : val.subCategory = []//subCategory | ||
| 1053 | + return val | ||
| 1054 | + }, | ||
| 1055 | + //提交数据处理 | ||
| 1056 | + setDataHandle(val) { | ||
| 1057 | + let obj = {} | ||
| 1058 | + if (val.isLocation) { | ||
| 1059 | + obj = val | ||
| 1060 | + obj.isLocation == '1' ? obj.notLocation = '' : obj.location = '' | ||
| 1061 | + | ||
| 1062 | + if (obj.notLocation && obj.notLocation.length != 0) { | ||
| 1063 | + obj.notLocation = obj.notLocation.toUpperCase() | ||
| 387 | } | 1064 | } |
| 388 | - }); | 1065 | + |
| 389 | - if (errorList.length != 0) { | 1066 | + if (obj.location && obj.location.length != 0) { |
| 390 | - this.msgWarning("URSA不包含中[" + errorList + "]错误,URSA不包含必须属于URSA包含中的类型") | 1067 | + obj.location = obj.location.toUpperCase() |
| 391 | - this.btnLoading = false; | ||
| 392 | - return; | ||
| 393 | } | 1068 | } |
| 1069 | + | ||
| 1070 | + if (obj.includeUrsa && obj.includeUrsa.length != 0) { | ||
| 1071 | + obj.includeUrsa = obj.includeUrsa.toUpperCase() | ||
| 394 | } | 1072 | } |
| 1073 | + | ||
| 1074 | + if (obj.notIncludeUrsa && obj.notIncludeUrsa.length != 0) { | ||
| 1075 | + obj.notIncludeUrsa = obj.notIncludeUrsa.toUpperCase() | ||
| 1076 | + } | ||
| 1077 | + | ||
| 1078 | + let puporpux = [] | ||
| 1079 | + this.checkBoxItem.puporpux.forEach(item => { | ||
| 1080 | + if (item.status === 1 && obj.puporpuxCode.includes(item.chineseName)) { | ||
| 1081 | + puporpux.push(item.chineseName) | ||
| 1082 | + } | ||
| 1083 | + }) | ||
| 1084 | + | ||
| 395 | let service = [] | 1085 | let service = [] |
| 396 | - this.serviceCode.forEach(item => { | 1086 | + this.checkBoxItem.serviceCode.forEach(item => { |
| 397 | - if (item.status === 1 && this.form.serviceCode.includes(item.chineseName)) { | 1087 | + if (item.status === 1 && obj.serviceCode.includes(item.chineseName)) { |
| 398 | service.push(item.chineseName) | 1088 | service.push(item.chineseName) |
| 399 | } | 1089 | } |
| 400 | }) | 1090 | }) |
| 401 | - this.form.serviceCode = service | 1091 | + |
| 402 | let hand = [] | 1092 | let hand = [] |
| 403 | - this.handlingCode.forEach(item => { | 1093 | + this.checkBoxItem.handlingCode.forEach(item => { |
| 404 | - if (item.status === 1 && this.form.handlingCode.includes(item.chineseName)) { | 1094 | + if (item.status === 1 && obj.handlingCode.includes(item.chineseName)) { |
| 405 | hand.push(item.chineseName) | 1095 | hand.push(item.chineseName) |
| 406 | } | 1096 | } |
| 407 | }) | 1097 | }) |
| 408 | - this.form.handlingCode = hand | 1098 | + |
| 409 | let sub = [] | 1099 | let sub = [] |
| 410 | - this.subCategory.forEach(item => { | 1100 | + this.checkBoxItem.subCategory.forEach(item => { |
| 411 | - if (item.status === 1 && this.form.subCategory.includes(item.chineseName)) { | 1101 | + if (item.status === 1 && obj.subCategory.includes(item.chineseName)) { |
| 412 | sub.push(item.chineseName) | 1102 | sub.push(item.chineseName) |
| 413 | } | 1103 | } |
| 414 | }) | 1104 | }) |
| 1105 | + obj.typeOfGoods = obj.typeOfGoods.toString().replace(/,/g, ';') | ||
| 1106 | + obj.declarationCategory = obj.declarationCategory.toString(';').replace(/,/g, ';') | ||
| 1107 | + obj.puporpuxCode = puporpux.toString().replace(/,/g, ';') | ||
| 1108 | + obj.serviceCode = service.toString().replace(/,/g, ';') | ||
| 1109 | + obj.handlingCode = hand.toString().replace(/,/g, ';') | ||
| 1110 | + obj.subCategory = sub.toString().replace(/,/g, ';') | ||
| 415 | 1111 | ||
| 416 | - if (this.form.includeUrsa && this.form.includeUrsa.length != 0) { | 1112 | + return obj |
| 417 | - this.form.includeUrsa = this.upCase(this.form.includeUrsa) | ||
| 418 | - } | ||
| 419 | - | ||
| 420 | - if (this.form.notIncludeUrsa && this.form.notIncludeUrsa.length != 0) { | ||
| 421 | - this.form.notIncludeUrsa = this.upCase(this.form.notIncludeUrsa) | ||
| 422 | - } | ||
| 423 | - | ||
| 424 | - this.form.subCategory = sub | ||
| 425 | - updateOrAddFlight(this.form).then((response) => { | ||
| 426 | - if (response.code === 200) { | ||
| 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 | - | ||
| 441 | - close() { | ||
| 442 | - this.removes(); | ||
| 443 | - this.$store.state.tagsView.visitedViews.splice( | ||
| 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 | } | 1113 | } |
| 453 | }, | 1114 | }, |
| 454 | - | 1115 | + //排序 |
| 455 | - removes() { | 1116 | + sorttodo(arr, chineseName) { |
| 456 | - if (this.routeName == "FlightAllocConfigAdd") { | 1117 | + var index = 1, |
| 457 | - sessionStorage.setItem("flightAdd", "remove"); | 1118 | + newArr = [], |
| 1119 | + length = arr.length; | ||
| 1120 | + for (var i = 0; i < length; i++) { | ||
| 1121 | + if (arr[i].chineseName === chineseName) { | ||
| 1122 | + newArr[0] = arr[i]; | ||
| 458 | } else { | 1123 | } else { |
| 459 | - sessionStorage.setItem("flightInfo" + this.dataId, "remove"); | 1124 | + newArr[index++] = arr[i]; |
| 460 | } | 1125 | } |
| 461 | - }, | ||
| 462 | - | ||
| 463 | - dictData() { | ||
| 464 | - allDictData().then((response) => { | ||
| 465 | - if (response.code != 200) { | ||
| 466 | - this.msgError(response.msg) | ||
| 467 | - return; | ||
| 468 | } | 1126 | } |
| 469 | - let dict = response.data; | 1127 | + return newArr |
| 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 | }, | 1128 | }, |
| 479 | - | ||
| 480 | dicSort(val) { | 1129 | dicSort(val) { |
| 481 | let status1 = [] | 1130 | let status1 = [] |
| 482 | let status0 = [] | 1131 | let status0 = [] |
| ... | @@ -490,129 +1139,38 @@ export default { | ... | @@ -490,129 +1139,38 @@ export default { |
| 490 | }) | 1139 | }) |
| 491 | arr = status1.concat(status0) | 1140 | arr = status1.concat(status0) |
| 492 | return arr | 1141 | return arr |
| 493 | - } | ||
| 494 | }, | 1142 | }, |
| 495 | - | 1143 | + //返回 |
| 496 | - beforeDestroy() { | 1144 | + close() { |
| 497 | - if (this.routeName == "FlightAllocConfigAdd") { | 1145 | + this.$store.state.tagsView.visitedViews.splice( |
| 498 | - if (sessionStorage.getItem("flightAdd") == "remove") { | 1146 | + this.$store.state.tagsView.visitedViews.findIndex( |
| 499 | - sessionStorage.removeItem("flightAdd"); | 1147 | + (item) => item.path === this.$route.path |
| 500 | - } else { | 1148 | + ), |
| 501 | - sessionStorage.setItem("flightAdd", JSON.stringify(this.form)); | ||
| 502 | - } | ||
| 503 | - } else { | ||
| 504 | - if (sessionStorage.getItem("flightInfo" + this.dataId) == "remove") { | ||
| 505 | - sessionStorage.removeItem("flightInfo" + this.dataId); | ||
| 506 | - } else { | ||
| 507 | - if (this.handleName != "detail" && this.handleName != "DMdetail") { | ||
| 508 | - sessionStorage.setItem( | ||
| 509 | - "flightInfo" + this.dataId, | ||
| 510 | - JSON.stringify(this.form) | ||
| 511 | ); | 1149 | ); |
| 512 | - } | 1150 | + this.$router.push({ name: 'FlightAllocConfig' }) |
| 513 | - } | ||
| 514 | - } | ||
| 515 | - }, | ||
| 516 | - | ||
| 517 | - computed: { | ||
| 518 | - includeUrsa: { | ||
| 519 | - get: function () { | ||
| 520 | - return this.form.includeUrsa; | ||
| 521 | - }, | ||
| 522 | - set: function (val) { | ||
| 523 | - this.form.includeUrsa = this.upCase(val); | ||
| 524 | - }, | ||
| 525 | - }, | ||
| 526 | - notIncludeUrsa: { | ||
| 527 | - get: function () { | ||
| 528 | - return this.form.notIncludeUrsa; | ||
| 529 | }, | 1151 | }, |
| 530 | - set: function (val) { | ||
| 531 | - this.form.notIncludeUrsa = this.upCase(val); | ||
| 532 | - }, | ||
| 533 | - }, | ||
| 534 | - minNumOfPieces: { | ||
| 535 | - get: function () { | ||
| 536 | - return this.form.minNumOfPieces; | ||
| 537 | - }, | ||
| 538 | - set: function (val) { | ||
| 539 | - const reg = /^[1-9]{0,}$/ | ||
| 540 | - if (reg.test(val)) { | ||
| 541 | - this.form.minNumOfPieces = val | ||
| 542 | - } | ||
| 543 | - if (val == 0 || val == null || val == "-") { | ||
| 544 | - this.form.minNumOfPieces = undefined; | ||
| 545 | - } | ||
| 546 | }, | 1152 | }, |
| 547 | - }, | 1153 | + computed: {} |
| 548 | - maxNumOfPieces: { | ||
| 549 | - get: function () { | ||
| 550 | - return this.form.maxNumOfPieces; | ||
| 551 | - }, | ||
| 552 | - set: function (val) { | ||
| 553 | - const reg = /^[1-9]{0,}$/ | ||
| 554 | - if (reg.test(val)) { | ||
| 555 | - this.form.maxNumOfPieces = val | ||
| 556 | - } | ||
| 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 | - }, | ||
| 588 | - }, | ||
| 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 | } | 1154 | } |
| 1155 | +</script> | ||
| 605 | 1156 | ||
| 606 | -.el-checkbox__input.is-disabled+span.el-checkbox__label { | 1157 | +<style lang="scss" scoped> |
| 607 | - color: #303133; | 1158 | +.fontWeight { |
| 1159 | + font-size: 16px; | ||
| 1160 | + font-weight: 700; | ||
| 1161 | + text-indent: 2em; | ||
| 608 | } | 1162 | } |
| 609 | 1163 | ||
| 610 | -.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after { | 1164 | +.rowPadding { |
| 611 | - border-color: #303133; | 1165 | + padding: 10px 50px; |
| 1166 | + font-size: 12px; | ||
| 612 | } | 1167 | } |
| 613 | 1168 | ||
| 614 | -.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner { | 1169 | +.routeTip { |
| 615 | - border-color: #606266; | 1170 | + margin-left: 35px; |
| 1171 | + margin-bottom: 20px; | ||
| 1172 | + font-size: 16px; | ||
| 1173 | + color: #ff4949; | ||
| 616 | } | 1174 | } |
| 617 | 1175 | ||
| 618 | .numberInput { | 1176 | .numberInput { | ... | ... |
| ... | @@ -55,14 +55,15 @@ | ... | @@ -55,14 +55,15 @@ |
| 55 | </el-form> | 55 | </el-form> |
| 56 | <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData"> | 56 | <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData"> |
| 57 | <el-table-column label="运单号" align="center" prop="waybillNo" /> | 57 | <el-table-column label="运单号" align="center" prop="waybillNo" /> |
| 58 | + <el-table-column label="申报类别" align="center" prop="typeName" /> | ||
| 59 | + <el-table-column label="件数" align="center" prop="qty" width="70" /> | ||
| 60 | + <el-table-column label="实际重量" align="center" prop="actualWeight" width="100" /> | ||
| 58 | <el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" /> | 61 | <el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" /> |
| 59 | <el-table-column label="航班日期" align="center" prop="fltDate" /> | 62 | <el-table-column label="航班日期" align="center" prop="fltDate" /> |
| 60 | <el-table-column label="航班号" align="center" prop="fltNo" width="100" /> | 63 | <el-table-column label="航班号" align="center" prop="fltNo" width="100" /> |
| 61 | <el-table-column label="航班路线" align="center" prop="route" /> | 64 | <el-table-column label="航班路线" align="center" prop="route" /> |
| 62 | <el-table-column label="配置航班类型" align="center" prop="kindName" width="130" /> | 65 | <el-table-column label="配置航班类型" align="center" prop="kindName" width="130" /> |
| 63 | <el-table-column label="尺寸" align="center" prop="sizeStr" width="70" /> | 66 | <el-table-column label="尺寸" align="center" prop="sizeStr" width="70" /> |
| 64 | - <el-table-column label="件数" align="center" prop="qty" width="70" /> | ||
| 65 | - <el-table-column label="实际重量" align="center" prop="actualWeight" width="100" /> | ||
| 66 | <el-table-column label="创建时间" align="center" prop="createTime" width="180" /> | 67 | <el-table-column label="创建时间" align="center" prop="createTime" width="180" /> |
| 67 | </el-table> | 68 | </el-table> |
| 68 | <pagination v-show="total > 0" :total="total" layout=" prev, pager, next, jumper, sizes,total" | 69 | <pagination v-show="total > 0" :total="total" layout=" prev, pager, next, jumper, sizes,total" | ... | ... |
| ... | @@ -71,10 +71,12 @@ | ... | @@ -71,10 +71,12 @@ |
| 71 | @sortChange="sortChange" @sizeChange="sizeChange"> | 71 | @sortChange="sortChange" @sizeChange="sizeChange"> |
| 72 | <template slot="optionColumn"> | 72 | <template slot="optionColumn"> |
| 73 | <el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center" | 73 | <el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center" |
| 74 | - class-name="small-padding fixed-width" :fixed="tableHeader.length > 10 ? 'right' : false"> | 74 | + class-name="small-padding fixed-width" :fixed="tableHeader.length > 10 ? 'right' : false" width="160"> |
| 75 | <template slot-scope="scope"> | 75 | <template slot-scope="scope"> |
| 76 | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" | 76 | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| 77 | v-hasPermi="['base:flightInfo:update']">修改</el-button> | 77 | v-hasPermi="['base:flightInfo:update']">修改</el-button> |
| 78 | + <el-button size="mini" type="text" icon="el-icon-link" @click="goFlightAllocConfig(scope.row)">查看维度 | ||
| 79 | + </el-button> | ||
| 78 | </template> | 80 | </template> |
| 79 | </el-table-column> | 81 | </el-table-column> |
| 80 | </template> | 82 | </template> |
| ... | @@ -91,35 +93,46 @@ | ... | @@ -91,35 +93,46 @@ |
| 91 | </el-form-item> | 93 | </el-form-item> |
| 92 | </el-col> | 94 | </el-col> |
| 93 | <el-col :span="12"> | 95 | <el-col :span="12"> |
| 96 | + <el-form-item label="该航班预审状态:"> | ||
| 97 | + <el-tag v-if="preAudit" :type="preAudit == '开启' ? 'success' : 'info'" effect="dark">{{ preAudit }} | ||
| 98 | + </el-tag> | ||
| 99 | + </el-form-item> | ||
| 100 | + </el-col> | ||
| 101 | + </el-row> | ||
| 102 | + <el-row> | ||
| 103 | + <el-col :span="12"> | ||
| 94 | <el-form-item label="航班日期" prop="fltDate"> | 104 | <el-form-item label="航班日期" prop="fltDate"> |
| 95 | <el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small" | 105 | <el-date-picker class="wid80" :disabled="formdisabled.fltDate" clearable size="small" |
| 96 | v-model="form.fltDate" type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期"> | 106 | v-model="form.fltDate" type="date" value-format="yyyy-MM-dd" placeholder="选择航班日期"> |
| 97 | </el-date-picker> | 107 | </el-date-picker> |
| 98 | </el-form-item> | 108 | </el-form-item> |
| 99 | </el-col> | 109 | </el-col> |
| 100 | - </el-row> | ||
| 101 | - <el-row> | ||
| 102 | <el-col :span="12"> | 110 | <el-col :span="12"> |
| 103 | - <el-form-item label="Pre-MDE CutOff时间" prop="cutOffTime"> | 111 | + <el-form-item label="航班种类" prop="kindId"> |
| 104 | - <el-select class="wid80" v-model="form.cutOffTime" clearable placeholder="选择时间(输入查找选项)" type="string" | 112 | + <el-select class="wid80" v-model="form.kindId" :disabled="formdisabled.kindId" placeholder="请选择航班种类" |
| 105 | - filterable> | 113 | + @change="kindChange"> |
| 106 | - <el-option v-for="item in selectOption.cutOffTime" :key="item" :label="item" :value="item"> | 114 | + <el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName" |
| 115 | + :value="item.id"> | ||
| 107 | </el-option> | 116 | </el-option> |
| 108 | </el-select> | 117 | </el-select> |
| 109 | </el-form-item> | 118 | </el-form-item> |
| 110 | </el-col> | 119 | </el-col> |
| 111 | - <el-col :span="12"> | ||
| 112 | - <el-form-item label="航班路线" prop="route"> | ||
| 113 | - <el-input class="wid80" v-model="form.route" placeholder="请输入航班路线(XXX-XXX字母大写,多组用;分割)" /> | ||
| 114 | - </el-form-item> | ||
| 115 | - </el-col> | ||
| 116 | </el-row> | 120 | </el-row> |
| 117 | <el-row> | 121 | <el-row> |
| 118 | <el-col :span="12"> | 122 | <el-col :span="12"> |
| 119 | - <el-form-item label="航班种类" prop="kindId"> | 123 | + <el-form-item prop="route"> |
| 120 | - <el-select class="wid80" v-model="form.kindId" placeholder="请选择航班种类"> | 124 | + <template slot="label"> |
| 121 | - <el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName" | 125 | + <div style="display:inline-block">航班路线 |
| 122 | - :value="item.id"> | 126 | + <el-tooltip class="item" effect="dark" content="输入航班号后获取航线信息。航班种类为Purple Tail时可以进行多选,切换航班种类后需重新选择航线" |
| 127 | + placement="top-start"> | ||
| 128 | + <span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span> | ||
| 129 | + </el-tooltip> | ||
| 130 | + </div> | ||
| 131 | + </template> | ||
| 132 | + <el-select ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route" | ||
| 133 | + placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :multiple='routeMultiple' | ||
| 134 | + :key="routeMultiple"> | ||
| 135 | + <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> | ||
| 123 | </el-option> | 136 | </el-option> |
| 124 | </el-select> | 137 | </el-select> |
| 125 | </el-form-item> | 138 | </el-form-item> |
| ... | @@ -158,19 +171,13 @@ | ... | @@ -158,19 +171,13 @@ |
| 158 | v-model="form.extraWeightPercent"></el-input-number> | 171 | v-model="form.extraWeightPercent"></el-input-number> |
| 159 | </el-form-item> | 172 | </el-form-item> |
| 160 | </el-col> | 173 | </el-col> |
| 161 | - <el-col :span="6"> | 174 | + <el-col :span="12"> |
| 162 | <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> | 175 | <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> |
| 163 | <el-switch class="wid80" @change="LowHighAvailable" v-model="form.highLowPriceFlg" :active-value="1" | 176 | <el-switch class="wid80" @change="LowHighAvailable" v-model="form.highLowPriceFlg" :active-value="1" |
| 164 | :inactive-value="0" active-color="#13ce66"> | 177 | :inactive-value="0" active-color="#13ce66"> |
| 165 | </el-switch> | 178 | </el-switch> |
| 166 | </el-form-item> | 179 | </el-form-item> |
| 167 | </el-col> | 180 | </el-col> |
| 168 | - <el-col :span="6"> | ||
| 169 | - <el-form-item label="该航班预审状态:"> | ||
| 170 | - <el-tag v-if="preAudit" :type="preAudit == '开启' ? 'success' : 'info'" effect="dark">{{ preAudit }} | ||
| 171 | - </el-tag> | ||
| 172 | - </el-form-item> | ||
| 173 | - </el-col> | ||
| 174 | </el-row> | 181 | </el-row> |
| 175 | <el-row> | 182 | <el-row> |
| 176 | <el-col :span="12"> | 183 | <el-col :span="12"> |
| ... | @@ -241,7 +248,7 @@ | ... | @@ -241,7 +248,7 @@ |
| 241 | </div> | 248 | </div> |
| 242 | </el-dialog> | 249 | </el-dialog> |
| 243 | <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false" | 250 | <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false" |
| 244 | - :append-to-body="true" :show-close="false"> | 251 | + :append-to-body="true"> |
| 245 | <el-table :data="gridData"> | 252 | <el-table :data="gridData"> |
| 246 | <el-table-column property="fltNo" label="航班号"></el-table-column> | 253 | <el-table-column property="fltNo" label="航班号"></el-table-column> |
| 247 | <el-table-column property="fltDate" label="航班日期"></el-table-column> | 254 | <el-table-column property="fltDate" label="航班日期"></el-table-column> |
| ... | @@ -314,17 +321,17 @@ export default { | ... | @@ -314,17 +321,17 @@ export default { |
| 314 | trigger: "blur", | 321 | trigger: "blur", |
| 315 | }, | 322 | }, |
| 316 | ], | 323 | ], |
| 317 | - // route: [ | 324 | + route: [ |
| 318 | - // { | 325 | + { |
| 319 | - // required: true, | 326 | + required: true, |
| 320 | - // message: "航班线路不能为空", | 327 | + message: "航班线路不能为空", |
| 321 | - // trigger: "blur", | 328 | + trigger: "blur", |
| 322 | - // }, | 329 | + }, |
| 323 | // { | 330 | // { |
| 324 | // pattern: /^(([\~A-Z]{3,4})(\-[A-Z]{3,4})+)(;{1,1}(([\~A-Z]{3,4})(\-[A-Z]{3,4})+)){0,}$/, | 331 | // pattern: /^(([\~A-Z]{3,4})(\-[A-Z]{3,4})+)(;{1,1}(([\~A-Z]{3,4})(\-[A-Z]{3,4})+)){0,}$/, |
| 325 | // message: "请输入正确得航班线路" | 332 | // message: "请输入正确得航班线路" |
| 326 | // } | 333 | // } |
| 327 | - // ] | 334 | + ] |
| 328 | }, | 335 | }, |
| 329 | //原航班规则数据 | 336 | //原航班规则数据 |
| 330 | findAllFltDatList: [], | 337 | findAllFltDatList: [], |
| ... | @@ -338,12 +345,12 @@ export default { | ... | @@ -338,12 +345,12 @@ export default { |
| 338 | fltNo: false, | 345 | fltNo: false, |
| 339 | //航班日期 | 346 | //航班日期 |
| 340 | fltDate: false, | 347 | fltDate: false, |
| 341 | - //航班路线 | ||
| 342 | - route: false, | ||
| 343 | //航班种类 | 348 | //航班种类 |
| 344 | kindId: false, | 349 | kindId: false, |
| 345 | //航班类型 | 350 | //航班类型 |
| 346 | typeId: false, | 351 | typeId: false, |
| 352 | + //航线 | ||
| 353 | + route: false, | ||
| 347 | //原始重量 | 354 | //原始重量 |
| 348 | originalWeight: false, | 355 | originalWeight: false, |
| 349 | }, | 356 | }, |
| ... | @@ -411,6 +418,10 @@ export default { | ... | @@ -411,6 +418,10 @@ export default { |
| 411 | ids: [], | 418 | ids: [], |
| 412 | //目的航班数据 | 419 | //目的航班数据 |
| 413 | sourceFlightAndFlightDate: [], | 420 | sourceFlightAndFlightDate: [], |
| 421 | + //航线数据 | ||
| 422 | + routeList: [], | ||
| 423 | + //航线多选状态 | ||
| 424 | + routeMultiple: false, | ||
| 414 | //航班预审状态 | 425 | //航班预审状态 |
| 415 | preAudit: null, | 426 | preAudit: null, |
| 416 | //高价百分比是否打开 | 427 | //高价百分比是否打开 |
| ... | @@ -444,6 +455,7 @@ export default { | ... | @@ -444,6 +455,7 @@ export default { |
| 444 | } | 455 | } |
| 445 | }, | 456 | }, |
| 446 | activated() { | 457 | activated() { |
| 458 | + this.ids = [] | ||
| 447 | this.findFltConditionData(); | 459 | this.findFltConditionData(); |
| 448 | this.findAllFltData(); | 460 | this.findAllFltData(); |
| 449 | }, | 461 | }, |
| ... | @@ -467,6 +479,7 @@ export default { | ... | @@ -467,6 +479,7 @@ export default { |
| 467 | methods: { | 479 | methods: { |
| 468 | //输入航班号后 | 480 | //输入航班号后 |
| 469 | blurfltNo() { | 481 | blurfltNo() { |
| 482 | + this.routeList = [] | ||
| 470 | if ( | 483 | if ( |
| 471 | this.form.fltNo != null && | 484 | this.form.fltNo != null && |
| 472 | this.form.fltNo != undefined && | 485 | this.form.fltNo != undefined && |
| ... | @@ -493,17 +506,16 @@ export default { | ... | @@ -493,17 +506,16 @@ export default { |
| 493 | //this.form.extraWeightPercent=response.data.extraWeightPercent=0; | 506 | //this.form.extraWeightPercent=response.data.extraWeightPercent=0; |
| 494 | } | 507 | } |
| 495 | //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 | 508 | //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 |
| 496 | - if ( | 509 | + // if ( |
| 497 | - response.data != null && | 510 | + // response.data != null && |
| 498 | - response.data.highLowPriceFlg != null && | 511 | + // response.data.highLowPriceFlg != null && |
| 499 | - response.data.highLowPriceFlg != undefined | 512 | + // response.data.highLowPriceFlg != undefined |
| 500 | - ) { | 513 | + // ) { |
| 501 | - this.form.highLowPriceFlg = response.data.highLowPriceFlg; | 514 | + // this.form.highLowPriceFlg = response.data.highLowPriceFlg; |
| 502 | - } else { | 515 | + // } else { |
| 503 | - this.$set(this.form, "highLowPriceFlg", 1); | 516 | + this.$set(this.form, "highLowPriceFlg", 0); |
| 504 | - //this.form.highLowPriceFlg = true; | 517 | + // //this.form.highLowPriceFlg = true; |
| 505 | - } | 518 | + // } |
| 506 | - //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑; | ||
| 507 | //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 | 519 | //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 |
| 508 | if ( | 520 | if ( |
| 509 | response.data != null && | 521 | response.data != null && |
| ... | @@ -530,7 +542,24 @@ export default { | ... | @@ -530,7 +542,24 @@ export default { |
| 530 | this.msgError(response.msg); | 542 | this.msgError(response.msg); |
| 531 | } | 543 | } |
| 532 | }); | 544 | }); |
| 545 | + //获取航线 | ||
| 546 | + this.getRoute(this.form.fltNo).then(res => { | ||
| 547 | + this.routeList = res.list | ||
| 548 | + }).catch(err => { | ||
| 549 | + console.log(err) | ||
| 550 | + }) | ||
| 551 | + } | ||
| 552 | + }, | ||
| 553 | + //航班种类修改 | ||
| 554 | + kindChange(val) { | ||
| 555 | + if (val === 94076) { | ||
| 556 | + this.form.route = [] | ||
| 557 | + this.routeMultiple = true | ||
| 558 | + } else { | ||
| 559 | + this.form.route = '' | ||
| 560 | + this.routeMultiple = false | ||
| 533 | } | 561 | } |
| 562 | + this.$refs.routeSelect.$forceUpdate() | ||
| 534 | }, | 563 | }, |
| 535 | //查询条件数据源 | 564 | //查询条件数据源 |
| 536 | findFltConditionData() { | 565 | findFltConditionData() { |
| ... | @@ -590,7 +619,7 @@ export default { | ... | @@ -590,7 +619,7 @@ export default { |
| 590 | handleAdd() { | 619 | handleAdd() { |
| 591 | this.reset(); | 620 | this.reset(); |
| 592 | this.findFltConditionData(); | 621 | this.findFltConditionData(); |
| 593 | - this.preAudit = null; | 622 | + this.preAudit = null |
| 594 | this.open = true; | 623 | this.open = true; |
| 595 | this.title = "添加航班信息"; | 624 | this.title = "添加航班信息"; |
| 596 | this.form.id = null; | 625 | this.form.id = null; |
| ... | @@ -602,10 +631,10 @@ export default { | ... | @@ -602,10 +631,10 @@ export default { |
| 602 | this.formdisabled.fltNo = false; | 631 | this.formdisabled.fltNo = false; |
| 603 | //航班日期 | 632 | //航班日期 |
| 604 | this.formdisabled.fltDate = false; | 633 | this.formdisabled.fltDate = false; |
| 605 | - //航班路线 | ||
| 606 | - this.formdisabled.route = false; | ||
| 607 | //航班种类 | 634 | //航班种类 |
| 608 | this.formdisabled.kindId = false; | 635 | this.formdisabled.kindId = false; |
| 636 | + //航线 | ||
| 637 | + this.formdisabled.route = false; | ||
| 609 | //航班类型 | 638 | //航班类型 |
| 610 | this.formdisabled.typeId = false; | 639 | this.formdisabled.typeId = false; |
| 611 | //原始重量 | 640 | //原始重量 |
| ... | @@ -714,10 +743,15 @@ export default { | ... | @@ -714,10 +743,15 @@ export default { |
| 714 | this.formdisabled.fltNo = true; | 743 | this.formdisabled.fltNo = true; |
| 715 | //航班日期 | 744 | //航班日期 |
| 716 | this.formdisabled.fltDate = true; | 745 | this.formdisabled.fltDate = true; |
| 746 | + //航班种类 | ||
| 747 | + this.formdisabled.kindId = true; | ||
| 748 | + //航线 | ||
| 749 | + this.formdisabled.route = true | ||
| 717 | //根据ID查item | 750 | //根据ID查item |
| 718 | findFltById(row).then((response) => { | 751 | findFltById(row).then((response) => { |
| 719 | if (response.code == 200) { | 752 | if (response.code == 200) { |
| 720 | this.form = response.data; | 753 | this.form = response.data; |
| 754 | + this.form.route.split(';') | ||
| 721 | //是否开启高低价 | 755 | //是否开启高低价 |
| 722 | // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; | 756 | // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; |
| 723 | //是否预审 | 757 | //是否预审 |
| ... | @@ -729,6 +763,21 @@ export default { | ... | @@ -729,6 +763,21 @@ export default { |
| 729 | } | 763 | } |
| 730 | }); | 764 | }); |
| 731 | }, | 765 | }, |
| 766 | + //查看航班维度 | ||
| 767 | + goFlightAllocConfig(val) { | ||
| 768 | + let obj = { | ||
| 769 | + handle: 'update', | ||
| 770 | + fltNo: val.fltNo, | ||
| 771 | + fltDate: val.fltDate ? val.fltDate : null, | ||
| 772 | + route: val.flightKindName != 'Purple Tail' ? val.route : '', | ||
| 773 | + routeStatus: 'flightInformationMaintenance' + val.flightKindName, | ||
| 774 | + status: '1' | ||
| 775 | + } | ||
| 776 | + this.$router.push({ | ||
| 777 | + name: 'FlightAllocConfigInfo', | ||
| 778 | + params: obj | ||
| 779 | + }) | ||
| 780 | + }, | ||
| 732 | /** 删除按钮操作 */ | 781 | /** 删除按钮操作 */ |
| 733 | handleDelete(row) { | 782 | handleDelete(row) { |
| 734 | let fIds = []; | 783 | let fIds = []; |
| ... | @@ -797,10 +846,12 @@ export default { | ... | @@ -797,10 +846,12 @@ export default { |
| 797 | // formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; | 846 | // formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; |
| 798 | //总重量更新 | 847 | //总重量更新 |
| 799 | // formdata.totalWeight = this.Weightall() | 848 | // formdata.totalWeight = this.Weightall() |
| 849 | + formdata.route = this.form.route.toString().replace(/,/g, ';') | ||
| 800 | //处理数据 | 850 | //处理数据 |
| 801 | saveOrUpdate(formdata).then((response) => { | 851 | saveOrUpdate(formdata).then((response) => { |
| 802 | if (response.code === 200) { | 852 | if (response.code === 200) { |
| 803 | this.msgSuccess("保存成功"); | 853 | this.msgSuccess("保存成功"); |
| 854 | + this.routeList = [] | ||
| 804 | this.open = false; | 855 | this.open = false; |
| 805 | this.findAllFltData(); | 856 | this.findAllFltData(); |
| 806 | } else { | 857 | } else { |
| ... | @@ -817,6 +868,7 @@ export default { | ... | @@ -817,6 +868,7 @@ export default { |
| 817 | }, | 868 | }, |
| 818 | //取消按钮 | 869 | //取消按钮 |
| 819 | cancel() { | 870 | cancel() { |
| 871 | + this.routeList = [] | ||
| 820 | this.open = false; | 872 | this.open = false; |
| 821 | this.findAllFltData(); | 873 | this.findAllFltData(); |
| 822 | this.findFltConditionData(); | 874 | this.findFltConditionData(); |
| ... | @@ -899,6 +951,10 @@ export default { | ... | @@ -899,6 +951,10 @@ export default { |
| 899 | this.findAllFltData(); | 951 | this.findAllFltData(); |
| 900 | } | 952 | } |
| 901 | }, | 953 | }, |
| 954 | + //航线修改 | ||
| 955 | + routeChange(val) { | ||
| 956 | + this.$forceUpdate() | ||
| 957 | + }, | ||
| 902 | //多选框选中数据 | 958 | //多选框选中数据 |
| 903 | tableSelect(val) { | 959 | tableSelect(val) { |
| 904 | this.ids = val.selection; | 960 | this.ids = val.selection; | ... | ... |
| 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" maxlength="25" placeholder="请输入货站名称"> | ||
| 9 | + </el-input> | ||
| 10 | + </el-form-item> | ||
| 11 | + <el-form-item label="品名" prop="goodsList"> | ||
| 12 | + <el-input type="textarea" v-model="formData.goodsList" rows="4" maxlength="125" | ||
| 13 | + placeholder="请输入品名,多个用“;”隔开"> | ||
| 14 | + </el-input> | ||
| 15 | + </el-form-item> | ||
| 16 | + </el-form> | ||
| 17 | + <div slot="footer" class="dialog-footer"> | ||
| 18 | + <el-button type="primary" :loading="loading" @click="submit">确 定</el-button> | ||
| 19 | + <el-button @click="close">取 消</el-button> | ||
| 20 | + </div> | ||
| 21 | + </el-dialog> | ||
| 22 | + </div> | ||
| 23 | +</template> | ||
| 24 | + | ||
| 25 | +<script> | ||
| 26 | +import { batchAddGoods } from "@/api/goodsStation" | ||
| 27 | + | ||
| 28 | +export default { | ||
| 29 | + name: '', | ||
| 30 | + props: { | ||
| 31 | + open: { | ||
| 32 | + type: Boolean, | ||
| 33 | + default: false | ||
| 34 | + }, | ||
| 35 | + }, | ||
| 36 | + data() { | ||
| 37 | + return { | ||
| 38 | + formData: { | ||
| 39 | + goodsStation: null, | ||
| 40 | + goodsList: null | ||
| 41 | + }, | ||
| 42 | + rules: { | ||
| 43 | + goodsStation: [ | ||
| 44 | + { | ||
| 45 | + required: true, | ||
| 46 | + message: "货站名称不能为空", | ||
| 47 | + trigger: "blur", | ||
| 48 | + }, | ||
| 49 | + ], | ||
| 50 | + goodsList: [ | ||
| 51 | + { | ||
| 52 | + required: true, | ||
| 53 | + message: "品名不能为空", | ||
| 54 | + trigger: "blur", | ||
| 55 | + }, | ||
| 56 | + ], | ||
| 57 | + }, | ||
| 58 | + loading: false, | ||
| 59 | + } | ||
| 60 | + }, | ||
| 61 | + watch: { | ||
| 62 | + }, | ||
| 63 | + methods: { | ||
| 64 | + //提交 | ||
| 65 | + submit() { | ||
| 66 | + let obj = {} | ||
| 67 | + obj.goodsStation = this.formData.goodsStation | ||
| 68 | + this.formData.goodsList = this.formData.goodsList.replace(/;/g, ";") | ||
| 69 | + if (this.formData.goodsList != null && this.formData.goodsList != '') { | ||
| 70 | + obj.goodsList = this.formData.goodsList.split(';') | ||
| 71 | + } | ||
| 72 | + this.$refs['addForm'].validate(val => { | ||
| 73 | + if (val) { | ||
| 74 | + this.loading = true | ||
| 75 | + batchAddGoods(obj).then(res => { | ||
| 76 | + this.loading = false | ||
| 77 | + if (res.code === 200) { | ||
| 78 | + this.msgSuccess('添加成功') | ||
| 79 | + this.close() | ||
| 80 | + } else { | ||
| 81 | + this.msgWarning(res.msg) | ||
| 82 | + } | ||
| 83 | + }).catch(err => { | ||
| 84 | + this.loading = false | ||
| 85 | + console.log(err) | ||
| 86 | + }) | ||
| 87 | + } | ||
| 88 | + }) | ||
| 89 | + }, | ||
| 90 | + //取消 | ||
| 91 | + close() { | ||
| 92 | + this.formData = { | ||
| 93 | + goodsStation: null, | ||
| 94 | + goodsList: null | ||
| 95 | + } | ||
| 96 | + this.$refs["addForm"].clearValidate(); | ||
| 97 | + this.$emit('close') | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + } | ||
| 101 | +} | ||
| 102 | + | ||
| 103 | +</script> | ||
| 104 | + | ||
| 105 | +<style lang="scss" scoped> | ||
| 106 | + | ||
| 107 | +</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="['base:goodsStation:add']" | ||
| 17 | + @click="add">新 增 | ||
| 18 | + </el-button> | ||
| 19 | + <el-button icon="el-icon-delete" type="danger" size="small" v-hasPermi="['base: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" v-hasPermi="['base:goodsStation:add']"> | ||
| 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="['base: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" maxlength="25" placeholder="请输入货站名称"> | ||
| 9 | + </el-input> | ||
| 10 | + </el-form-item> | ||
| 11 | + <el-form-item label="航班" prop="flightList"> | ||
| 12 | + <el-input type="textarea" v-model="flightList" rows="4" maxlength="125" placeholder="请输入航班,多个用“;”隔开"> | ||
| 13 | + </el-input> | ||
| 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 { batchAddStationFlight } from '@/api/goodsStationFlight' | ||
| 26 | + | ||
| 27 | +export default { | ||
| 28 | + name: '', | ||
| 29 | + props: { | ||
| 30 | + open: { | ||
| 31 | + type: Boolean, | ||
| 32 | + default: false | ||
| 33 | + }, | ||
| 34 | + }, | ||
| 35 | + data() { | ||
| 36 | + return { | ||
| 37 | + formData: { | ||
| 38 | + goodsStation: null, | ||
| 39 | + flightList: null | ||
| 40 | + }, | ||
| 41 | + rules: { | ||
| 42 | + goodsStation: [ | ||
| 43 | + { | ||
| 44 | + required: true, | ||
| 45 | + message: "货站名称不能为空", | ||
| 46 | + trigger: "blur", | ||
| 47 | + }, | ||
| 48 | + ], | ||
| 49 | + flightList: [ | ||
| 50 | + { | ||
| 51 | + required: true, | ||
| 52 | + message: "航班号不能为空", | ||
| 53 | + trigger: "blur", | ||
| 54 | + }, | ||
| 55 | + ], | ||
| 56 | + }, | ||
| 57 | + loading: false, | ||
| 58 | + } | ||
| 59 | + }, | ||
| 60 | + watch: { | ||
| 61 | + }, | ||
| 62 | + methods: { | ||
| 63 | + //提交 | ||
| 64 | + submit() { | ||
| 65 | + let obj = {} | ||
| 66 | + obj.goodsStation = this.formData.goodsStation | ||
| 67 | + if (this.formData.flightList != null && this.formData.flightList != '') { | ||
| 68 | + this.formData.flightList = this.formData.flightList.toUpperCase() | ||
| 69 | + obj.flightList = this.formData.flightList.split(';') | ||
| 70 | + } | ||
| 71 | + this.$refs['addForm'].validate(val => { | ||
| 72 | + if (val) { | ||
| 73 | + this.loading = true | ||
| 74 | + batchAddStationFlight(obj).then(res => { | ||
| 75 | + this.loading = false | ||
| 76 | + if (res.code === 200) { | ||
| 77 | + this.msgSuccess('添加成功!') | ||
| 78 | + this.close() | ||
| 79 | + } else { | ||
| 80 | + this.msgWarning(res.msg) | ||
| 81 | + } | ||
| 82 | + }).catch(err => { | ||
| 83 | + this.loading = false | ||
| 84 | + console.log(err) | ||
| 85 | + }) | ||
| 86 | + } | ||
| 87 | + }) | ||
| 88 | + }, | ||
| 89 | + //取消 | ||
| 90 | + close() { | ||
| 91 | + this.formData = { | ||
| 92 | + goodsStation: null, | ||
| 93 | + flightList: null | ||
| 94 | + } | ||
| 95 | + this.$refs["addForm"].clearValidate(); | ||
| 96 | + this.$emit('close') | ||
| 97 | + } | ||
| 98 | + }, | ||
| 99 | + computed: { | ||
| 100 | + flightList: { | ||
| 101 | + get: function () { | ||
| 102 | + return this.formData.flightList | ||
| 103 | + }, | ||
| 104 | + set: function (val) { | ||
| 105 | + const reg = /^([a-zA-Z0-9]{0,40}(\;[a-zA-Z0-9]{0,40})*)$/ | ||
| 106 | + if (reg.test(val)) { | ||
| 107 | + this.formData.flightList = val | ||
| 108 | + } | ||
| 109 | + }, | ||
| 110 | + }, | ||
| 111 | + } | ||
| 112 | +} | ||
| 113 | + | ||
| 114 | +</script> | ||
| 115 | + | ||
| 116 | +<style lang="scss" scoped> | ||
| 117 | + | ||
| 118 | +</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="['base: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="['base: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="['base: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> |
| ... | @@ -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> |
| ... | @@ -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, |
| ... | @@ -323,6 +343,45 @@ export default { | ... | @@ -323,6 +343,45 @@ export default { |
| 323 | activated() { | 343 | activated() { |
| 324 | this.selectTable = [] | 344 | this.selectTable = [] |
| 325 | this.cargoTotal() | 345 | this.cargoTotal() |
| 346 | + if (this.$route.params.fltNo) { | ||
| 347 | + //判断进入页面是否带参,确定是否是index跳转 | ||
| 348 | + this.formData = { | ||
| 349 | + fltDateStart: "", | ||
| 350 | + fltDateEnd: "", | ||
| 351 | + prematchFltDateStart: "", | ||
| 352 | + prematchFltDateEnd: "", | ||
| 353 | + createTimeStart: null, | ||
| 354 | + createTimeEnd: null, | ||
| 355 | + pickUpDate: null, | ||
| 356 | + hasFlight: null, | ||
| 357 | + waybillNo: "", | ||
| 358 | + siteName: "", | ||
| 359 | + fltNo: "", | ||
| 360 | + mawbCode: "", | ||
| 361 | + ursa: "", | ||
| 362 | + typeId: null, | ||
| 363 | + statusId: null, | ||
| 364 | + serviceTypeId: null, | ||
| 365 | + allocationTypeId: null, | ||
| 366 | + kindToAllocFlightId: null, | ||
| 367 | + historyAllocaCargoTypeId: null, | ||
| 368 | + dataSources: "", | ||
| 369 | + customsReceiptStatusId: null, | ||
| 370 | + big: null, | ||
| 371 | + cargoPlaneNo: null, | ||
| 372 | + cargoPlaneStart: null, | ||
| 373 | + cargoPlaneEnd: null, | ||
| 374 | + limitStart: 1, | ||
| 375 | + limitSize: 100, | ||
| 376 | + } | ||
| 377 | + this.cargoPlaneTime = [this.$route.params.fltDate, this.$route.params.fltDate] | ||
| 378 | + this.formData.cargoPlaneStart = this.$route.params.fltDate | ||
| 379 | + this.formData.cargoPlaneEnd = this.$route.params.fltDate | ||
| 380 | + this.formData.cargoPlaneNo = this.$route.params.fltNo | ||
| 381 | + this.formData.cargoPlaneRoute = this.$route.params.route | ||
| 382 | + this.planeNoChange(this.formData.cargoPlaneNo) | ||
| 383 | + this.select(0) | ||
| 384 | + } else { | ||
| 326 | //否则请求原页面缓存状态 | 385 | //否则请求原页面缓存状态 |
| 327 | if (this.$store.state.tagsView.cachedViews.length > 0) { | 386 | if (this.$store.state.tagsView.cachedViews.length > 0) { |
| 328 | this.$store.state.tagsView.cachedViews.forEach(item => { | 387 | this.$store.state.tagsView.cachedViews.forEach(item => { |
| ... | @@ -332,6 +391,7 @@ export default { | ... | @@ -332,6 +391,7 @@ export default { |
| 332 | } | 391 | } |
| 333 | }) | 392 | }) |
| 334 | } | 393 | } |
| 394 | + } | ||
| 335 | }, | 395 | }, |
| 336 | 396 | ||
| 337 | deactivated() { | 397 | deactivated() { |
| ... | @@ -352,6 +412,48 @@ export default { | ... | @@ -352,6 +412,48 @@ export default { |
| 352 | this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50 | 412 | this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50 |
| 353 | }, | 413 | }, |
| 354 | watch: { | 414 | watch: { |
| 415 | + $route: { | ||
| 416 | + handler(to, from) { | ||
| 417 | + if (to.name === 'Index') { | ||
| 418 | + this.formData = { | ||
| 419 | + fltDateStart: "", | ||
| 420 | + fltDateEnd: "", | ||
| 421 | + prematchFltDateStart: "", | ||
| 422 | + prematchFltDateEnd: "", | ||
| 423 | + createTimeStart: null, | ||
| 424 | + createTimeEnd: null, | ||
| 425 | + pickUpDate: null, | ||
| 426 | + hasFlight: null, | ||
| 427 | + waybillNo: "", | ||
| 428 | + siteName: "", | ||
| 429 | + fltNo: "", | ||
| 430 | + mawbCode: "", | ||
| 431 | + ursa: "", | ||
| 432 | + typeId: null, | ||
| 433 | + statusId: null, | ||
| 434 | + serviceTypeId: null, | ||
| 435 | + allocationTypeId: null, | ||
| 436 | + kindToAllocFlightId: null, | ||
| 437 | + historyAllocaCargoTypeId: null, | ||
| 438 | + dataSources: "", | ||
| 439 | + customsReceiptStatusId: null, | ||
| 440 | + big: null, | ||
| 441 | + cargoPlaneNo: null, | ||
| 442 | + cargoPlaneStart: null, | ||
| 443 | + cargoPlaneEnd: null, | ||
| 444 | + limitStart: 1, | ||
| 445 | + limitSize: 100, | ||
| 446 | + } | ||
| 447 | + this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate] | ||
| 448 | + this.formData.cargoPlaneStart = from.params.fltDate | ||
| 449 | + this.formData.cargoPlaneEnd = from.params.fltDate | ||
| 450 | + this.formData.cargoPlaneNo = from.params.fltNo | ||
| 451 | + this.formData.cargoPlaneRoute = from.params.route | ||
| 452 | + this.planeNoChange(this.formData.cargoPlaneNo) | ||
| 453 | + this.select(0) | ||
| 454 | + } | ||
| 455 | + } | ||
| 456 | + }, | ||
| 355 | formShow(val, oldVal) { | 457 | formShow(val, oldVal) { |
| 356 | this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 120 | 458 | this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 120 |
| 357 | }, | 459 | }, |
| ... | @@ -384,6 +486,7 @@ export default { | ... | @@ -384,6 +486,7 @@ export default { |
| 384 | } | 486 | } |
| 385 | findCargoData(this.formData) | 487 | findCargoData(this.formData) |
| 386 | .then((res) => { | 488 | .then((res) => { |
| 489 | + setTimeout(() => { | ||
| 387 | if (res.code == 200) { | 490 | if (res.code == 200) { |
| 388 | this.tableData = res.data.list; | 491 | this.tableData = res.data.list; |
| 389 | this.totalCount = res.data.totalCount; | 492 | this.totalCount = res.data.totalCount; |
| ... | @@ -399,6 +502,7 @@ export default { | ... | @@ -399,6 +502,7 @@ export default { |
| 399 | } | 502 | } |
| 400 | this.tableLoading = false; | 503 | this.tableLoading = false; |
| 401 | }) | 504 | }) |
| 505 | + }) | ||
| 402 | .catch(() => { | 506 | .catch(() => { |
| 403 | this.tableLoading = false; | 507 | this.tableLoading = false; |
| 404 | }); | 508 | }); |
| ... | @@ -526,6 +630,22 @@ export default { | ... | @@ -526,6 +630,22 @@ export default { |
| 526 | this.page = val.page; | 630 | this.page = val.page; |
| 527 | this.select(); | 631 | this.select(); |
| 528 | }, | 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 | + }, | ||
| 529 | //排序 | 649 | //排序 |
| 530 | sortChange(val) { | 650 | sortChange(val) { |
| 531 | let data = []; | 651 | let data = []; | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | - <div></div> | 2 | + <div style="padding:10px" v-loading="loading"> |
| 3 | + <!-- 配舱汇总信息 --> | ||
| 4 | + <el-card class="mb10" ref="card1"> | ||
| 5 | + <el-divider content-position="left">今日配舱汇总</el-divider> | ||
| 6 | + <el-row :gutter="10"> | ||
| 7 | + <el-col :span="6"> | ||
| 8 | + <div class="allInformation"> | ||
| 9 | + <div class="informationItem">航班总重量(KG)</div> | ||
| 10 | + <div class="informationNum">{{ totalWeight }}</div> | ||
| 11 | + </div> | ||
| 12 | + </el-col> | ||
| 13 | + <el-col :span="6"> | ||
| 14 | + <div class="allInformation"> | ||
| 15 | + <div class="informationItem">已配重量(KG)</div> | ||
| 16 | + <div class="informationNum">{{ allocationWeight }}</div> | ||
| 17 | + </div> | ||
| 18 | + </el-col> | ||
| 19 | + <el-col :span="6"> | ||
| 20 | + <div class="allInformation"> | ||
| 21 | + <div class="informationItem">配舱比例(百分比)</div> | ||
| 22 | + <div class="informationNum">{{ (percentage == 0 ? 0 : ((percentage) * 100).toFixed(2)) + '%' }}</div> | ||
| 23 | + </div> | ||
| 24 | + </el-col> | ||
| 25 | + </el-row> | ||
| 26 | + </el-card> | ||
| 27 | + <!-- 今日航班box --> | ||
| 28 | + <el-card class="mb10" ref="card2"> | ||
| 29 | + <el-form ref="indexForm" size="mini" inline @submit.native.prevent> | ||
| 30 | + <el-form-item label="配载航班日期"> | ||
| 31 | + <el-date-picker v-model="selectData.fltDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" | ||
| 32 | + :clearable="false" @change="getFlight"> | ||
| 33 | + </el-date-picker> | ||
| 34 | + </el-form-item> | ||
| 35 | + <el-form-item label="航班种类"> | ||
| 36 | + <el-select v-model="selectData.kindId" placeholder="不限" @change="getFlight" clearable> | ||
| 37 | + <el-option v-for="item in fltKindIdList" :label="item.englishName" :value="item.id"></el-option> | ||
| 38 | + </el-select> | ||
| 39 | + </el-form-item> | ||
| 40 | + <el-form-item> | ||
| 41 | + <el-button type="primary" icon="el-icon-refresh" :loading="loading" @click="getFlight"></el-button> | ||
| 42 | + </el-form-item> | ||
| 43 | + </el-form> | ||
| 44 | + <el-row class="card2"> | ||
| 45 | + <el-col :span="1" v-for="item in fltBox"> | ||
| 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' }"> | ||
| 48 | + <div class="fltName">{{ item.fltNo }}</div> | ||
| 49 | + <div class="fltWeight">{{ (item.percentage == 0 ? 0 : ((item.percentage) * 100).toFixed(2)) + '%' }} | ||
| 50 | + </div> | ||
| 51 | + </div> | ||
| 52 | + </el-col> | ||
| 53 | + </el-row> | ||
| 54 | + <!-- 各航班配舱进度详情 --> | ||
| 55 | + <el-divider content-position="left">各航班配舱进度</el-divider> | ||
| 56 | + <Tables ref="indexTable" ductName="indexTable" :order="true" :data="tableData" :headerData="tableHeader" | ||
| 57 | + tableAlign="center" :showOverflowTooltip="false" :height="tableHeight" :totalCount="total" | ||
| 58 | + :page="selectData.page" :limitSize="selectData.size" :pageSizes="[100]" :pagination="false" | ||
| 59 | + @currentChange="currentChange" @rowClick="rowClick"> | ||
| 60 | + <template v-slot:percentage="scope"> | ||
| 61 | + <el-progress stroke-width="100" | ||
| 62 | + :color="(scope.row.percentage * 100).toFixed(2) >= 100 ? '#13ce66' : (scope.row.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949'" | ||
| 63 | + :stroke-width="18" | ||
| 64 | + :percentage="scope.row.percentage == 0 ? 0 : Number((scope.row.percentage * 100).toFixed(2))"> | ||
| 65 | + </el-progress> | ||
| 66 | + </template> | ||
| 67 | + </Tables> | ||
| 68 | + </el-card> | ||
| 69 | + </div> | ||
| 3 | </template> | 70 | </template> |
| 71 | + | ||
| 4 | <script> | 72 | <script> |
| 73 | +import { filghtKindData } from "@/api/flightInfoImport"; | ||
| 74 | +import { getOneDayFlight } from '@/api/home.js' | ||
| 5 | 75 | ||
| 6 | export default { | 76 | export default { |
| 77 | + name: 'Index', | ||
| 7 | props: { | 78 | props: { |
| 8 | user: { | 79 | user: { |
| 9 | - type: Object, | 80 | + type: Object |
| 10 | - }, | 81 | + } |
| 11 | }, | 82 | }, |
| 12 | data() { | 83 | data() { |
| 13 | return { | 84 | return { |
| 85 | + selectData: { | ||
| 86 | + fltDate: null, | ||
| 87 | + kindId: null, | ||
| 88 | + page: 1, | ||
| 89 | + size: 1 | ||
| 90 | + },//查询条件 | ||
| 91 | + fltBox: [], | ||
| 92 | + tableData: [],//table数据 | ||
| 93 | + tableHeader: this.tableHeaders['index'],//表头 | ||
| 94 | + fltKindIdList: [],//航班类型 | ||
| 95 | + percentage: 0,//配舱比例 | ||
| 96 | + totalWeight: 0,//航班总重量 | ||
| 97 | + allocationWeight: 0,//航班已配重量 | ||
| 98 | + type: "", | ||
| 99 | + tableHeight: null, | ||
| 100 | + total: 0, | ||
| 101 | + loading: false, | ||
| 14 | }; | 102 | }; |
| 15 | }, | 103 | }, |
| 104 | + created() { | ||
| 105 | + this.selectData.fltDate = this.nowDate(); | ||
| 106 | + this.getFltKindId() | ||
| 107 | + }, | ||
| 108 | + // activated() { | ||
| 109 | + // this.getFlight() | ||
| 110 | + // }, | ||
| 111 | + mounted() { | ||
| 112 | + this.tableHeight = window.innerHeight - this.$refs.card1.$el.offsetHeight - this.$refs.indexForm.$el.offsetHeight - 350 | ||
| 113 | + this.getFlight() | ||
| 114 | + }, | ||
| 16 | methods: { | 115 | methods: { |
| 17 | - | 116 | + //获取航班类型 |
| 117 | + async getFltKindId() { | ||
| 118 | + filghtKindData().then(res => { | ||
| 119 | + if (res.code === 200) { | ||
| 120 | + this.fltKindIdList = res.data | ||
| 121 | + } else { | ||
| 122 | + this.msgWarning(res.msg) | ||
| 123 | + } | ||
| 124 | + }).catch(err => { | ||
| 125 | + console.log(err) | ||
| 126 | + }) | ||
| 127 | + }, | ||
| 128 | + //获取首页信息(日期查询) | ||
| 129 | + async getFlight() { | ||
| 130 | + this.fltBox = [] | ||
| 131 | + this.loading = true | ||
| 132 | + getOneDayFlight(this.selectData).then(res => { | ||
| 133 | + this.loading = false | ||
| 134 | + if (res.code === 200) { | ||
| 135 | + this.getfltBox(JSON.parse(JSON.stringify(res.data.list))) | ||
| 136 | + this.tableData = res.data.list | ||
| 137 | + this.percentage = res.data.percentage | ||
| 138 | + this.totalWeight = res.data.totalWeight | ||
| 139 | + this.allocationWeight = res.data.allocationWeight | ||
| 140 | + } else { | ||
| 141 | + this.msgWarning(res.msg) | ||
| 142 | + } | ||
| 143 | + }).catch(err => { | ||
| 144 | + this.loading = false | ||
| 145 | + console.log(err) | ||
| 146 | + }) | ||
| 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 | + }, | ||
| 162 | + //某行被点击 | ||
| 163 | + rowClick(val) { | ||
| 164 | + let obj = {} | ||
| 165 | + obj.fltNo = val.fltNo | ||
| 166 | + obj.fltDate = val.fltDate | ||
| 167 | + if (val.flightKindName == 'Purple Tail') { | ||
| 168 | + obj.route = '' | ||
| 169 | + } else { | ||
| 170 | + obj.route = val.route | ||
| 171 | + } | ||
| 172 | + this.$router.push({ name: 'QueryCargo', params: obj }) | ||
| 173 | + }, | ||
| 174 | + //翻页 | ||
| 175 | + currentChange(val) { }, | ||
| 18 | }, | 176 | }, |
| 19 | }; | 177 | }; |
| 20 | </script> | 178 | </script> |
| 21 | 179 | ||
| 180 | +<style lang="scss" scoped> | ||
| 181 | +.cardTop { | ||
| 182 | + height: 400px; | ||
| 183 | + margin: 10px; | ||
| 184 | + padding: 10px; | ||
| 185 | + overflow: auto; | ||
| 186 | + | ||
| 187 | + &::-webkit-scrollbar { | ||
| 188 | + height: 5px; | ||
| 189 | + width: 5px; | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + &::-webkit-scrollbar-track { | ||
| 193 | + background-color: #fff; | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + &::-webkit-scrollbar-thumb { | ||
| 197 | + background-color: #ccc; | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + &::-webkit-scrollbar-thumb:hover { | ||
| 201 | + background-color: #409eff; | ||
| 202 | + } | ||
| 203 | + | ||
| 204 | + .label { | ||
| 205 | + font-weight: 700; | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + .totalWeight { | ||
| 209 | + font-size: 12px; | ||
| 210 | + } | ||
| 211 | +} | ||
| 212 | + | ||
| 213 | +.progressTab { | ||
| 214 | + height: 100%; | ||
| 215 | +} | ||
| 216 | + | ||
| 217 | +.allInformation { | ||
| 218 | + width: 100%; | ||
| 219 | + height: 100px; | ||
| 220 | + padding: 10px 20px; | ||
| 221 | + color: #fff; | ||
| 222 | + background-color: #409eff; | ||
| 223 | + | ||
| 224 | + .allInformation { | ||
| 225 | + font-size: 12px; | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + .informationNum { | ||
| 229 | + font-size: 24px; | ||
| 230 | + margin-top: 25px; | ||
| 231 | + } | ||
| 232 | +} | ||
| 233 | + | ||
| 234 | +.card2 { | ||
| 235 | + | ||
| 236 | + .fltBox { | ||
| 237 | + width: 90%; | ||
| 238 | + height: 60px; | ||
| 239 | + font-size: 12px; | ||
| 240 | + font-weight: 700; | ||
| 241 | + color: #fff; | ||
| 242 | + text-align: center; | ||
| 243 | + position: relative; | ||
| 244 | + border-radius: 10px; | ||
| 245 | + padding: 5px; | ||
| 246 | + line-height: 25px; | ||
| 247 | + margin-bottom: 10px; | ||
| 248 | + overflow: hidden; | ||
| 249 | + | ||
| 250 | + .fltWeight { | ||
| 251 | + font-size: 14px; | ||
| 252 | + } | ||
| 253 | + } | ||
| 254 | +} | ||
| 255 | +</style> | ... | ... |
| ... | @@ -4,8 +4,47 @@ | ... | @@ -4,8 +4,47 @@ |
| 4 | append-to-body center> | 4 | append-to-body center> |
| 5 | <el-form ref="add" :model="newDictionary" label-width="auto" label-position="left" size="small" | 5 | <el-form ref="add" :model="newDictionary" label-width="auto" label-position="left" size="small" |
| 6 | :rules="rules" @submit.native.prevent> | 6 | :rules="rules" @submit.native.prevent> |
| 7 | + <!-- 新增虚拟航班 --> | ||
| 8 | + <div v-if="dictName == '虚拟航班'"> | ||
| 9 | + <el-form-item label="所属口岸" prop="portName"> | ||
| 10 | + <el-select v-model="newDictionary.portName" placeholder="选择口岸" disabled> | ||
| 11 | + <el-option v-for="item in $store.state.user.portNames" :label="item" :value="item" | ||
| 12 | + :key="item"> | ||
| 13 | + </el-option> | ||
| 14 | + </el-select> | ||
| 15 | + </el-form-item> | ||
| 16 | + <el-form-item label="航班名称" v-if="status == 'allAdd'" prop="flightNo"> | ||
| 17 | + <el-input type="textarea" v-model="flightNo" :rows="7" maxlength="255" show-word-limit | ||
| 18 | + placeholder="用;分隔,单条航班名长度25"> | ||
| 19 | + </el-input> | ||
| 20 | + </el-form-item> | ||
| 21 | + <el-form-item label="航班名称" prop="flightNo" v-else> | ||
| 22 | + <el-input type="text" v-model="flightNo" placeholder="请输入数据名称" maxlength="25"></el-input> | ||
| 23 | + </el-form-item> | ||
| 24 | + </div> | ||
| 25 | + <!-- 新增航线 --> | ||
| 26 | + <div v-else-if="dictName == '航线'"> | ||
| 27 | + <div v-if="status == 'add'"> | ||
| 28 | + <el-form-item label="航班号" prop="fltNo"> | ||
| 29 | + <el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="50"> | ||
| 30 | + </el-input> | ||
| 31 | + </el-form-item> | ||
| 32 | + <el-form-item label="航线" prop="route"> | ||
| 33 | + <el-input type="text" v-model="newDictionary.route" placeholder="请输入航线" maxlength="40"> | ||
| 34 | + </el-input> | ||
| 35 | + </el-form-item> | ||
| 36 | + </div> | ||
| 37 | + <div v-else-if="status == 'sort'"> | ||
| 38 | + <el-form-item label="航班号" prop="fltNo"> | ||
| 39 | + <el-input type="text" v-model="newDictionary.fltNo" disabled></el-input> | ||
| 40 | + </el-form-item> | ||
| 41 | + <el-form-item label="航线"> | ||
| 42 | + <Drag :routes="routeList" @drag="drag"></Drag> | ||
| 43 | + </el-form-item> | ||
| 44 | + </div> | ||
| 45 | + </div> | ||
| 7 | <!-- 新增数据字典 --> | 46 | <!-- 新增数据字典 --> |
| 8 | - <div v-if="dictName != '虚拟航班'"> | 47 | + <div v-else> |
| 9 | <el-form-item label="所属父级" v-if="newDictionary.serviceCodeKey"> | 48 | <el-form-item label="所属父级" v-if="newDictionary.serviceCodeKey"> |
| 10 | <el-input type="text" v-model="newDictionary.serviceCodeKey" placeholder="用回车分隔" disabled> | 49 | <el-input type="text" v-model="newDictionary.serviceCodeKey" placeholder="用回车分隔" disabled> |
| 11 | </el-input> | 50 | </el-input> |
| ... | @@ -32,24 +71,6 @@ | ... | @@ -32,24 +71,6 @@ |
| 32 | </el-form-item> | 71 | </el-form-item> |
| 33 | </div> | 72 | </div> |
| 34 | </div> | 73 | </div> |
| 35 | - <!-- 新增虚拟航班 --> | ||
| 36 | - <div v-else> | ||
| 37 | - <el-form-item label="所属口岸" prop="portName"> | ||
| 38 | - <el-select v-model="newDictionary.portName" placeholder="选择口岸" disabled> | ||
| 39 | - <el-option v-for="item in $store.state.user.portNames" :label="item" :value="item" | ||
| 40 | - :key="item"> | ||
| 41 | - </el-option> | ||
| 42 | - </el-select> | ||
| 43 | - </el-form-item> | ||
| 44 | - <el-form-item label="航班名称" v-if="status == 'allAdd'" prop="flightNo"> | ||
| 45 | - <el-input type="textarea" v-model="flightNo" :rows="7" maxlength="255" show-word-limit | ||
| 46 | - placeholder="用;分隔,单条航班名长度25"> | ||
| 47 | - </el-input> | ||
| 48 | - </el-form-item> | ||
| 49 | - <el-form-item label="航班名称" prop="flightNo" v-else> | ||
| 50 | - <el-input type="text" v-model="flightNo" placeholder="请输入数据名称" maxlength="25"></el-input> | ||
| 51 | - </el-form-item> | ||
| 52 | - </div> | ||
| 53 | </el-form> | 74 | </el-form> |
| 54 | <div slot="footer" class="dialog-footer"> | 75 | <div slot="footer" class="dialog-footer"> |
| 55 | <el-button type="primary" :loading="loading" @click="submit">确 定</el-button> | 76 | <el-button type="primary" :loading="loading" @click="submit">确 定</el-button> |
| ... | @@ -60,7 +81,7 @@ | ... | @@ -60,7 +81,7 @@ |
| 60 | </template> | 81 | </template> |
| 61 | 82 | ||
| 62 | <script> | 83 | <script> |
| 63 | -import { addDict, addDictBatch, addServiceCodeBatch, addFlight } from '@/api/system/dictionary.js' | 84 | +import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, queryRoute, orderRoute } from '@/api/system/dictionary.js' |
| 64 | 85 | ||
| 65 | export default { | 86 | export default { |
| 66 | props: { | 87 | props: { |
| ... | @@ -83,7 +104,7 @@ export default { | ... | @@ -83,7 +104,7 @@ export default { |
| 83 | }, | 104 | }, |
| 84 | data() { | 105 | data() { |
| 85 | return { | 106 | return { |
| 86 | - newDictionary: { flightNo: undefined, chineseName: undefined }, | 107 | + newDictionary: { flightNo: undefined, chineseName: undefined, route: undefined }, |
| 87 | rules: { | 108 | rules: { |
| 88 | chineseName: [ | 109 | chineseName: [ |
| 89 | { | 110 | { |
| ... | @@ -98,8 +119,23 @@ export default { | ... | @@ -98,8 +119,23 @@ export default { |
| 98 | message: "航班名称不能为空", | 119 | message: "航班名称不能为空", |
| 99 | trigger: "blur", | 120 | trigger: "blur", |
| 100 | }, | 121 | }, |
| 101 | - ] | 122 | + ], |
| 123 | + fltNo: [ | ||
| 124 | + { | ||
| 125 | + required: true, | ||
| 126 | + message: "航班号不能为空", | ||
| 127 | + trigger: "blur", | ||
| 128 | + } | ||
| 129 | + ], | ||
| 130 | + route: [ | ||
| 131 | + { | ||
| 132 | + required: true, | ||
| 133 | + message: "航线不能为空", | ||
| 134 | + trigger: "blur", | ||
| 135 | + } | ||
| 136 | + ], | ||
| 102 | }, | 137 | }, |
| 138 | + routeList: [], | ||
| 103 | title: '', | 139 | title: '', |
| 104 | loading: false, | 140 | loading: false, |
| 105 | } | 141 | } |
| ... | @@ -115,6 +151,18 @@ export default { | ... | @@ -115,6 +151,18 @@ export default { |
| 115 | } else if (this.status == 'childrenAdd') { | 151 | } else if (this.status == 'childrenAdd') { |
| 116 | this.newDictionary = this.addDictionary | 152 | this.newDictionary = this.addDictionary |
| 117 | this.title = '新增子集' | 153 | this.title = '新增子集' |
| 154 | + } else if (this.status == 'sort') { | ||
| 155 | + this.newDictionary = this.addDictionary.serviceCodeKey | ||
| 156 | + this.title = '航线排序' | ||
| 157 | + queryRoute({ fltNo: this.newDictionary.fltNo }).then(res => { | ||
| 158 | + if (res.code === 200) { | ||
| 159 | + this.routeList = res.data.list | ||
| 160 | + } else { | ||
| 161 | + this.msgWarning(res.msg) | ||
| 162 | + } | ||
| 163 | + }).catch(err => { | ||
| 164 | + console.log(err) | ||
| 165 | + }) | ||
| 118 | } | 166 | } |
| 119 | // else if (this.status == 'update') { | 167 | // else if (this.status == 'update') { |
| 120 | // if (this.addDictionary.serviceCodeValue) { | 168 | // if (this.addDictionary.serviceCodeValue) { |
| ... | @@ -145,6 +193,23 @@ export default { | ... | @@ -145,6 +193,23 @@ export default { |
| 145 | if (this.status == 'add') { | 193 | if (this.status == 'add') { |
| 146 | if (this.dictName === '虚拟航班') { | 194 | if (this.dictName === '虚拟航班') { |
| 147 | this.flightAdd() | 195 | this.flightAdd() |
| 196 | + } else if (this.dictName === '航线') { | ||
| 197 | + let obj = { | ||
| 198 | + fltNo: this.upCase(this.newDictionary.fltNo), | ||
| 199 | + route: this.upCase(this.newDictionary.route) | ||
| 200 | + } | ||
| 201 | + addRoute(obj).then(res => { | ||
| 202 | + this.loading = false | ||
| 203 | + if (res.code === 200) { | ||
| 204 | + this.msgSuccess(res.msg) | ||
| 205 | + this.close() | ||
| 206 | + } else { | ||
| 207 | + this.msgWarning(res.msg) | ||
| 208 | + } | ||
| 209 | + }).catch(err => { | ||
| 210 | + this.loading = false | ||
| 211 | + console.log(err) | ||
| 212 | + }) | ||
| 148 | } else { | 213 | } else { |
| 149 | addDict(this.newDictionary).then(res => { | 214 | addDict(this.newDictionary).then(res => { |
| 150 | this.loading = false | 215 | this.loading = false |
| ... | @@ -210,6 +275,25 @@ export default { | ... | @@ -210,6 +275,25 @@ export default { |
| 210 | console.log(err) | 275 | console.log(err) |
| 211 | }) | 276 | }) |
| 212 | } | 277 | } |
| 278 | + //航线排序 | ||
| 279 | + else if (this.status == 'sort') { | ||
| 280 | + let arr = [] | ||
| 281 | + this.routeList.forEach(item => { | ||
| 282 | + arr.push(item.id) | ||
| 283 | + }) | ||
| 284 | + orderRoute(arr).then(res => { | ||
| 285 | + this.loading = false | ||
| 286 | + if (res.code === 200) { | ||
| 287 | + this.msgSuccess(res.msg) | ||
| 288 | + this.close() | ||
| 289 | + } else { | ||
| 290 | + this.msgWarning(res.msg) | ||
| 291 | + } | ||
| 292 | + }).catch(err => { | ||
| 293 | + this.loading = false | ||
| 294 | + console.log(err) | ||
| 295 | + }) | ||
| 296 | + } | ||
| 213 | } | 297 | } |
| 214 | }) | 298 | }) |
| 215 | }, | 299 | }, |
| ... | @@ -230,9 +314,14 @@ export default { | ... | @@ -230,9 +314,14 @@ export default { |
| 230 | console.log(err) | 314 | console.log(err) |
| 231 | }) | 315 | }) |
| 232 | }, | 316 | }, |
| 317 | + //航线排序 | ||
| 318 | + drag(val) { | ||
| 319 | + this.routeList = val | ||
| 320 | + }, | ||
| 233 | //关闭 | 321 | //关闭 |
| 234 | close() { | 322 | close() { |
| 235 | this.newDictionary = { chineseName: null, code: null, remark: null } | 323 | this.newDictionary = { chineseName: null, code: null, remark: null } |
| 324 | + this.routeList = [] | ||
| 236 | this.clearValidate('add') | 325 | this.clearValidate('add') |
| 237 | this.$emit('close', false) | 326 | this.$emit('close', false) |
| 238 | }, | 327 | }, |
| ... | @@ -263,6 +352,25 @@ export default { | ... | @@ -263,6 +352,25 @@ export default { |
| 263 | this.newDictionary.flightNo = val | 352 | this.newDictionary.flightNo = val |
| 264 | } | 353 | } |
| 265 | }, | 354 | }, |
| 355 | + }, | ||
| 356 | + fltNo: { | ||
| 357 | + get: function () { | ||
| 358 | + return this.newDictionary.fltNo | ||
| 359 | + }, | ||
| 360 | + set: function (val) { | ||
| 361 | + this.newDictionary.fltNo = this.upCase(val) | ||
| 362 | + }, | ||
| 363 | + }, | ||
| 364 | + route: { | ||
| 365 | + get: function () { | ||
| 366 | + return this.newDictionary.route | ||
| 367 | + }, | ||
| 368 | + set: function (val) { | ||
| 369 | + const reg = /^([0-9a-zA-Z!@#$%^&*()`]{0,100})$/ | ||
| 370 | + if (reg.test(val)) { | ||
| 371 | + this.newDictionary.route = val | ||
| 372 | + } | ||
| 373 | + }, | ||
| 266 | } | 374 | } |
| 267 | } | 375 | } |
| 268 | } | 376 | } | ... | ... |
| ... | @@ -3,7 +3,8 @@ | ... | @@ -3,7 +3,8 @@ |
| 3 | <el-card style="margin-bottom:10px"> | 3 | <el-card style="margin-bottom:10px"> |
| 4 | <!-- cardHeader --> | 4 | <!-- cardHeader --> |
| 5 | <div slot="header" class="clearfix"> | 5 | <div slot="header" class="clearfix"> |
| 6 | - <span style="font-size:16px;font-weight:700">{{ (tableName == 'Site' ? '站点' : tableName == | 6 | + <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' : |
| 7 | + tableName == | ||
| 7 | '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表" | 8 | '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表" |
| 8 | }}</span> | 9 | }}</span> |
| 9 | <div style="float: right; padding: 3px 0"> | 10 | <div style="float: right; padding: 3px 0"> |
| ... | @@ -13,6 +14,7 @@ | ... | @@ -13,6 +14,7 @@ |
| 13 | :key="item.id"> | 14 | :key="item.id"> |
| 14 | </el-option> | 15 | </el-option> |
| 15 | <el-option label="虚拟航班" value="虚拟航班"></el-option> | 16 | <el-option label="虚拟航班" value="虚拟航班"></el-option> |
| 17 | + <el-option label="航线" value="航线"></el-option> | ||
| 16 | </el-select> | 18 | </el-select> |
| 17 | </div> | 19 | </div> |
| 18 | </div> | 20 | </div> |
| ... | @@ -21,7 +23,7 @@ | ... | @@ -21,7 +23,7 @@ |
| 21 | @submit.native.prevent> | 23 | @submit.native.prevent> |
| 22 | <el-row :gutter="10" v-if="tableName != 'serviceCode'"> | 24 | <el-row :gutter="10" v-if="tableName != 'serviceCode'"> |
| 23 | <el-col :span="6"> | 25 | <el-col :span="6"> |
| 24 | - <el-form-item label="航班名称" v-if="tableName === '虚拟航班'"> | 26 | + <el-form-item label="航班名称" v-if="tableName === '虚拟航班' || tableName === '航线'"> |
| 25 | <el-input v-model="selectDict.flightNo" size="small" style="width:80%" | 27 | <el-input v-model="selectDict.flightNo" size="small" style="width:80%" |
| 26 | placeholder="请输入航班名称"></el-input> | 28 | placeholder="请输入航班名称"></el-input> |
| 27 | </el-form-item> | 29 | </el-form-item> |
| ... | @@ -38,8 +40,8 @@ | ... | @@ -38,8 +40,8 @@ |
| 38 | v-hasPermi="['system:dictionary:add']"> | 40 | v-hasPermi="['system:dictionary:add']"> |
| 39 | {{ tableName === 'serviceCode' ? '新增父级' : '新增' }} | 41 | {{ tableName === 'serviceCode' ? '新增父级' : '新增' }} |
| 40 | </el-button> | 42 | </el-button> |
| 41 | - <el-button type="primary" icon="el-icon-plus" size="small" @click="addDic({ status: 'allAdd' })" | 43 | + <el-button v-if="tableName != '航线'" type="primary" icon="el-icon-plus" size="small" |
| 42 | - v-hasPermi="['system:dictionary:add']"> | 44 | + @click="addDic({ status: 'allAdd' })" v-hasPermi="['system:dictionary:add']"> |
| 43 | {{ tableName === 'serviceCode' ? '批量新增父级' : '批量新增' }} | 45 | {{ tableName === 'serviceCode' ? '批量新增父级' : '批量新增' }} |
| 44 | </el-button> | 46 | </el-button> |
| 45 | <el-button type="danger" icon="el-icon-delete" size="small" :disabled="nowSelect.length == 0" | 47 | <el-button type="danger" icon="el-icon-delete" size="small" :disabled="nowSelect.length == 0" |
| ... | @@ -48,10 +50,10 @@ | ... | @@ -48,10 +50,10 @@ |
| 48 | </div> | 50 | </div> |
| 49 | </el-form> | 51 | </el-form> |
| 50 | <!-- 表格 --> | 52 | <!-- 表格 --> |
| 51 | - <Tables v-if="tableName != 'serviceCode' && tableName != '虚拟航班'" ductName="dictionary" :selection="true" | 53 | + <Tables v-if="tableName != 'serviceCode' && tableName != '虚拟航班' && tableName != '航线'" ductName="dictionary" |
| 52 | - :selectFixed="false" :order='true' :height="tableHeight" :data="tableData" :headerData="tableHeader" | 54 | + :selection="true" :selectFixed="false" :order='true' :height="tableHeight" :data="tableData" |
| 53 | - :page="selectDict.page" :pageSizes="[20]" :totalCount="total" :loading="loading" | 55 | + :headerData="tableHeader" :page="selectDict.page" :pageSizes="[20]" :totalCount="total" |
| 54 | - @currentChange="currentChange" layout="total,prev, pager, next, jumper, ->" | 56 | + :loading="loading" @currentChange="currentChange" layout="total,prev, pager, next, jumper, ->" |
| 55 | @tableSelect="tableSelection" @tableSelectAll="tableSelectAll"> | 57 | @tableSelect="tableSelection" @tableSelectAll="tableSelectAll"> |
| 56 | <template slot="optionColumn"> | 58 | <template slot="optionColumn"> |
| 57 | <el-table-column label="操作" align="center"> | 59 | <el-table-column label="操作" align="center"> |
| ... | @@ -85,6 +87,28 @@ | ... | @@ -85,6 +87,28 @@ |
| 85 | </el-table-column> | 87 | </el-table-column> |
| 86 | </template> | 88 | </template> |
| 87 | </Tables> | 89 | </Tables> |
| 90 | + <!-- 航线表 --> | ||
| 91 | + <Tables v-else-if="tableName === '航线'" ductName="dictionary" :selection="true" :selectFixed="false" | ||
| 92 | + :order='true' :height="tableHeight" :data="tableData" :headerData="routeTable" :page="selectDict.page" | ||
| 93 | + :pageSizes="[20]" :totalCount="total" :loading="loading" @currentChange="currentChange" | ||
| 94 | + layout="total,prev, pager, next, jumper, ->" @tableSelect="tableSelection" | ||
| 95 | + @tableSelectAll="tableSelectAll"> | ||
| 96 | + <template v-slot:fltNo="scope"> | ||
| 97 | + <el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })"> | ||
| 98 | + {{ | ||
| 99 | + scope.row.fltNo | ||
| 100 | + }}<i class="el-icon-link"></i> </el-link> | ||
| 101 | + </template> | ||
| 102 | + <template slot="optionColumn"> | ||
| 103 | + <el-table-column label="操作" align="center"> | ||
| 104 | + <template slot-scope="scope"> | ||
| 105 | + <el-button size="mini" type="text" style="color:#ff4949" icon="el-icon-delete" | ||
| 106 | + @click="delDict(scope.row)" v-hasPermi="['system:dictionary:delete']">删除 | ||
| 107 | + </el-button> | ||
| 108 | + </template> | ||
| 109 | + </el-table-column> | ||
| 110 | + </template> | ||
| 111 | + </Tables> | ||
| 88 | <!-- serviceCode表格(树形结构) --> | 112 | <!-- serviceCode表格(树形结构) --> |
| 89 | <Tables v-show="tableName === 'serviceCode'" ductName="dictionary" :order='false' :height="tableHeight" | 113 | <Tables v-show="tableName === 'serviceCode'" ductName="dictionary" :order='false' :height="tableHeight" |
| 90 | :data="tableData" :headerData="serviceCodeHeader" :pageSize="selectDict.page" :pageSizes="[20]" | 114 | :data="tableData" :headerData="serviceCodeHeader" :pageSize="selectDict.page" :pageSizes="[20]" |
| ... | @@ -142,7 +166,7 @@ | ... | @@ -142,7 +166,7 @@ |
| 142 | 166 | ||
| 143 | <script> | 167 | <script> |
| 144 | import Dialog from './dialog.vue' | 168 | import Dialog from './dialog.vue' |
| 145 | -import { getDictNameList, getDictionaryList, getServiceCodeList, delServiceCodeCihild, delDict, flightType, delFlight } from '@/api/system/dictionary.js' | 169 | +import { getDictNameList, getDictionaryList, getServiceCodeList, delServiceCodeCihild, delDict, flightType, delFlight, queryRoute, delRoute, checkFlightRoute } from '@/api/system/dictionary.js' |
| 146 | 170 | ||
| 147 | export default { | 171 | export default { |
| 148 | name: 'DictionaryConfig', | 172 | name: 'DictionaryConfig', |
| ... | @@ -159,6 +183,9 @@ export default { | ... | @@ -159,6 +183,9 @@ export default { |
| 159 | },//字典查询条件 | 183 | },//字典查询条件 |
| 160 | tableData: [], | 184 | tableData: [], |
| 161 | tableHeader: this.tableHeaders['dict'],//表头 | 185 | tableHeader: this.tableHeaders['dict'],//表头 |
| 186 | + serviceCodeHeader: this.tableHeaders['dictServiceCode'],//serviceCode主表头 | ||
| 187 | + childrenTableHeader: this.tableHeaders['dictServiceCodeChildren'],//serviceCode子表头 | ||
| 188 | + routeTable: this.tableHeaders['fltRoute'],//航线表头 | ||
| 162 | flightHeader: [ | 189 | flightHeader: [ |
| 163 | { | 190 | { |
| 164 | columnChineseName: "航班号", | 191 | columnChineseName: "航班号", |
| ... | @@ -168,8 +195,6 @@ export default { | ... | @@ -168,8 +195,6 @@ export default { |
| 168 | status: 1 | 195 | status: 1 |
| 169 | } | 196 | } |
| 170 | ],//虚拟航班表头 | 197 | ],//虚拟航班表头 |
| 171 | - serviceCodeHeader: this.tableHeaders['dictServiceCode'],//serviceCode主表头 | ||
| 172 | - childrenTableHeader: this.tableHeaders['dictServiceCodeChildren'],//serviceCode子表头 | ||
| 173 | dictNameList: [],//主表数据 | 198 | dictNameList: [],//主表数据 |
| 174 | addDictionary: {},//选择数据 | 199 | addDictionary: {},//选择数据 |
| 175 | nowSelect: [], | 200 | nowSelect: [], |
| ... | @@ -248,6 +273,22 @@ export default { | ... | @@ -248,6 +273,22 @@ export default { |
| 248 | }).catch(err => { | 273 | }).catch(err => { |
| 249 | console.log(err) | 274 | console.log(err) |
| 250 | }) | 275 | }) |
| 276 | + } else if (this.tableName === '航线') { | ||
| 277 | + let obj = { | ||
| 278 | + fltNo: this.selectDict.flightNo, | ||
| 279 | + page: this.selectDict.page, | ||
| 280 | + size: this.selectDict.size | ||
| 281 | + } | ||
| 282 | + queryRoute(obj).then(res => { | ||
| 283 | + if (res.code === 200) { | ||
| 284 | + this.tableData = res.data.list | ||
| 285 | + this.total = res.data.total | ||
| 286 | + } else { | ||
| 287 | + this.msgWarning(res.msg) | ||
| 288 | + } | ||
| 289 | + }).catch(err => { | ||
| 290 | + console.log(err) | ||
| 291 | + }) | ||
| 251 | } else { | 292 | } else { |
| 252 | getDictionaryList(this.selectDict).then(res => { | 293 | getDictionaryList(this.selectDict).then(res => { |
| 253 | if (res.code === 200) { | 294 | if (res.code === 200) { |
| ... | @@ -284,6 +325,8 @@ export default { | ... | @@ -284,6 +325,8 @@ export default { |
| 284 | this.serviceCodeCihildDel([val.id]) | 325 | this.serviceCodeCihildDel([val.id]) |
| 285 | } else if (this.tableName === '虚拟航班') { | 326 | } else if (this.tableName === '虚拟航班') { |
| 286 | this.flightDel([val.id]) | 327 | this.flightDel([val.id]) |
| 328 | + } else if (this.tableName === '航线') { | ||
| 329 | + this.routeDel({ data: [val], id: [val.id] }) | ||
| 287 | } else { | 330 | } else { |
| 288 | this.dicDel([val.id]) | 331 | this.dicDel([val.id]) |
| 289 | } | 332 | } |
| ... | @@ -298,6 +341,8 @@ export default { | ... | @@ -298,6 +341,8 @@ export default { |
| 298 | this.serviceCodeCihildDel(arr) | 341 | this.serviceCodeCihildDel(arr) |
| 299 | } else if (this.tableName === '虚拟航班') { | 342 | } else if (this.tableName === '虚拟航班') { |
| 300 | this.flightDel(arr) | 343 | this.flightDel(arr) |
| 344 | + } else if (this.tableName === '航线') { | ||
| 345 | + this.routeDel({ data: this.nowSelect, id: arr }) | ||
| 301 | } else { | 346 | } else { |
| 302 | this.dicDel(arr) | 347 | this.dicDel(arr) |
| 303 | } | 348 | } |
| ... | @@ -354,12 +399,65 @@ export default { | ... | @@ -354,12 +399,65 @@ export default { |
| 354 | if (res.code === 200) { | 399 | if (res.code === 200) { |
| 355 | this.msgSuccess(res.msg) | 400 | this.msgSuccess(res.msg) |
| 356 | } else { | 401 | } else { |
| 402 | + this.msgWarning(res.msg) | ||
| 403 | + } | ||
| 404 | + this.tableSelect(1) | ||
| 405 | + }).catch(err => { | ||
| 406 | + console.log(err) | ||
| 407 | + }) | ||
| 408 | + }).catch(() => { }) | ||
| 409 | + }, | ||
| 410 | + //航线删除 | ||
| 411 | + routeDel(val) { | ||
| 412 | + this.$confirm("是否要删除记录?", "注意!", { | ||
| 413 | + closeOnClickModal: false, | ||
| 414 | + confirmButtonText: "确定删除", | ||
| 415 | + cancelButtonText: "取消", | ||
| 416 | + type: "warning", | ||
| 417 | + }).then(() => { | ||
| 418 | + let arr = [] | ||
| 419 | + val.data.forEach(item => { | ||
| 420 | + arr.push({ | ||
| 421 | + fltNo: item.fltNo, | ||
| 422 | + route: item.route | ||
| 423 | + }) | ||
| 424 | + }) | ||
| 425 | + checkFlightRoute(arr).then(res => { | ||
| 426 | + if (res.code === 202) { | ||
| 427 | + this.$confirm(res.msg, "注意!", { | ||
| 428 | + closeOnClickModal: false, | ||
| 429 | + confirmButtonText: "确定删除", | ||
| 430 | + cancelButtonText: "取消", | ||
| 431 | + type: "warning", | ||
| 432 | + }).then(() => { | ||
| 433 | + delRoute(val.id).then(res => { | ||
| 434 | + if (res.code === 200) { | ||
| 435 | + this.msgSuccess(res.msg) | ||
| 436 | + } else { | ||
| 437 | + this.msgWarning(res.msg) | ||
| 438 | + } | ||
| 439 | + this.tableSelect(1) | ||
| 440 | + }).catch(err => { | ||
| 441 | + console.log(err) | ||
| 442 | + }) | ||
| 443 | + }).catch() | ||
| 444 | + } else if (res.code === 200) { | ||
| 445 | + delRoute(val.id).then(res => { | ||
| 446 | + if (res.code === 200) { | ||
| 357 | this.msgSuccess(res.msg) | 447 | this.msgSuccess(res.msg) |
| 448 | + } else { | ||
| 449 | + this.msgWarning(res.msg) | ||
| 358 | } | 450 | } |
| 359 | this.tableSelect(1) | 451 | this.tableSelect(1) |
| 360 | }).catch(err => { | 452 | }).catch(err => { |
| 361 | console.log(err) | 453 | console.log(err) |
| 362 | }) | 454 | }) |
| 455 | + } else { | ||
| 456 | + this.msgWarning(res.msg) | ||
| 457 | + } | ||
| 458 | + }).catch(err => { | ||
| 459 | + console.log(err) | ||
| 460 | + }) | ||
| 363 | }).catch(() => { }) | 461 | }).catch(() => { }) |
| 364 | }, | 462 | }, |
| 365 | //切换字典表 | 463 | //切换字典表 | ... | ... |
| ... | @@ -69,7 +69,7 @@ | ... | @@ -69,7 +69,7 @@ |
| 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> |
| ... | @@ -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 | ... | ... |
-
Please register or login to post a comment