Showing
35 changed files
with
1952 additions
and
200 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": "处理失败(系统异常)", | ... | ... |
This diff is collapsed. Click to expand it.
| 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) { | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -55,14 +55,15 @@ | ... | @@ -55,14 +55,15 @@ |
| 55 | </el-form> | 55 | </el-form> |
| 56 | <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData"> | 56 | <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData"> |
| 57 | <el-table-column label="运单号" align="center" prop="waybillNo" /> | 57 | <el-table-column label="运单号" align="center" prop="waybillNo" /> |
| 58 | + <el-table-column label="申报类别" align="center" prop="typeName" /> | ||
| 59 | + <el-table-column label="件数" align="center" prop="qty" width="70" /> | ||
| 60 | + <el-table-column label="实际重量" align="center" prop="actualWeight" width="100" /> | ||
| 58 | <el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" /> | 61 | <el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" /> |
| 59 | <el-table-column label="航班日期" align="center" prop="fltDate" /> | 62 | <el-table-column label="航班日期" align="center" prop="fltDate" /> |
| 60 | <el-table-column label="航班号" align="center" prop="fltNo" width="100" /> | 63 | <el-table-column label="航班号" align="center" prop="fltNo" width="100" /> |
| 61 | <el-table-column label="航班路线" align="center" prop="route" /> | 64 | <el-table-column label="航班路线" align="center" prop="route" /> |
| 62 | <el-table-column label="配置航班类型" align="center" prop="kindName" width="130" /> | 65 | <el-table-column label="配置航班类型" align="center" prop="kindName" width="130" /> |
| 63 | <el-table-column label="尺寸" align="center" prop="sizeStr" width="70" /> | 66 | <el-table-column label="尺寸" align="center" prop="sizeStr" width="70" /> |
| 64 | - <el-table-column label="件数" align="center" prop="qty" width="70" /> | ||
| 65 | - <el-table-column label="实际重量" align="center" prop="actualWeight" width="100" /> | ||
| 66 | <el-table-column label="创建时间" align="center" prop="createTime" width="180" /> | 67 | <el-table-column label="创建时间" align="center" prop="createTime" width="180" /> |
| 67 | </el-table> | 68 | </el-table> |
| 68 | <pagination v-show="total > 0" :total="total" layout=" prev, pager, next, jumper, sizes,total" | 69 | <pagination v-show="total > 0" :total="total" layout=" prev, pager, next, jumper, sizes,total" | ... | ... |
This diff is collapsed. Click to expand it.
| 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 | } | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -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