Showing
2 changed files
with
250 additions
and
134 deletions
| ... | @@ -6,7 +6,7 @@ const mimeMap = { | ... | @@ -6,7 +6,7 @@ const mimeMap = { |
| 6 | zip: 'application/zip' | 6 | zip: 'application/zip' |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | -const baseUrl = process.env.VUE_APP_BASE_API | 9 | +const baseUrl = 'http://192.168.1.134:18080' |
| 10 | export function downLoadZip(str, filename) { | 10 | export function downLoadZip(str, filename) { |
| 11 | var url = baseUrl + str | 11 | var url = baseUrl + str |
| 12 | axios({ | 12 | axios({ |
| ... | @@ -18,6 +18,20 @@ export function downLoadZip(str, filename) { | ... | @@ -18,6 +18,20 @@ export function downLoadZip(str, filename) { |
| 18 | resolveBlob(res, mimeMap.zip) | 18 | resolveBlob(res, mimeMap.zip) |
| 19 | }) | 19 | }) |
| 20 | } | 20 | } |
| 21 | +export function cargoXlsx(str,data) { | ||
| 22 | + var url = baseUrl + str | ||
| 23 | + axios({ | ||
| 24 | + method: 'post', | ||
| 25 | + url: url, | ||
| 26 | + data:data, | ||
| 27 | + responseType: 'blob', | ||
| 28 | + headers: { 'Authorization': getToken() } | ||
| 29 | + }).then(res => { | ||
| 30 | + if(res.status === 200){ | ||
| 31 | + cargoTableXlsx(res) | ||
| 32 | + } | ||
| 33 | + }) | ||
| 34 | +} | ||
| 21 | /** | 35 | /** |
| 22 | * 解析blob响应内容并下载 | 36 | * 解析blob响应内容并下载 |
| 23 | * @param {*} res blob响应内容 | 37 | * @param {*} res blob响应内容 |
| ... | @@ -25,7 +39,7 @@ export function downLoadZip(str, filename) { | ... | @@ -25,7 +39,7 @@ export function downLoadZip(str, filename) { |
| 25 | */ | 39 | */ |
| 26 | export function resolveBlob(res, mimeType) { | 40 | export function resolveBlob(res, mimeType) { |
| 27 | const aLink = document.createElement('a') | 41 | const aLink = document.createElement('a') |
| 28 | - var blob = new Blob([res.data], { type: mimeType }) | 42 | + var blob = new Blob([res], { type: mimeType }) |
| 29 | // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名; | 43 | // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名; |
| 30 | var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*') | 44 | var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*') |
| 31 | var contentDisposition = decodeURI(res.headers['content-disposition']) | 45 | var contentDisposition = decodeURI(res.headers['content-disposition']) |
| ... | @@ -38,3 +52,14 @@ export function resolveBlob(res, mimeType) { | ... | @@ -38,3 +52,14 @@ export function resolveBlob(res, mimeType) { |
| 38 | aLink.click() | 52 | aLink.click() |
| 39 | document.body.removeChild(aLink); | 53 | document.body.removeChild(aLink); |
| 40 | } | 54 | } |
| 55 | + | ||
| 56 | +//货物查询表导出 | ||
| 57 | +export function cargoTableXlsx(res){ | ||
| 58 | + const aLink = document.createElement('a') | ||
| 59 | + const fileName = "货物查询表.xlsx" | ||
| 60 | + aLink.href = URL.createObjectURL(res.data) | ||
| 61 | + aLink.setAttribute('download', fileName) // 设置下载文件名称 | ||
| 62 | + document.body.appendChild(aLink) | ||
| 63 | + aLink.click() | ||
| 64 | + document.body.removeChild(aLink); | ||
| 65 | +} | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | - <div> | 2 | + <div class="cargoPage" v-loading="downloading"> |
| 3 | <el-form | 3 | <el-form |
| 4 | ref="cargoForm" | 4 | ref="cargoForm" |
| 5 | - size="mini" | 5 | + size="small" |
| 6 | - inline | ||
| 7 | :model="formData" | 6 | :model="formData" |
| 8 | - label-position="right" | 7 | + label-position="left" |
| 9 | - label-width="105px" | 8 | + label-width="auto" |
| 10 | - style="margin: 15px" | 9 | + style="margin: 10px; width: 100%" |
| 11 | > | 10 | > |
| 12 | - <el-row> | 11 | + <el-row type="flex" style="flexWrap: wrap!important"> |
| 13 | <el-col :span="6"> | 12 | <el-col :span="6"> |
| 14 | - <el-form-item label="航班日期:"> | 13 | + <el-form-item label="原航班日期:"> |
| 15 | <el-date-picker | 14 | <el-date-picker |
| 15 | + class="formItem" | ||
| 16 | v-model="flightTime" | 16 | v-model="flightTime" |
| 17 | type="daterange" | 17 | type="daterange" |
| 18 | range-separator="至" | 18 | range-separator="至" |
| ... | @@ -23,9 +23,10 @@ | ... | @@ -23,9 +23,10 @@ |
| 23 | </el-date-picker> | 23 | </el-date-picker> |
| 24 | </el-form-item> | 24 | </el-form-item> |
| 25 | </el-col> | 25 | </el-col> |
| 26 | - <el-col :span="6"> | 26 | + <!-- <el-col :span="6"> |
| 27 | <el-form-item label="预配航班日期:"> | 27 | <el-form-item label="预配航班日期:"> |
| 28 | <el-date-picker | 28 | <el-date-picker |
| 29 | + class="formItem" | ||
| 29 | v-model="prepalyFlightTime" | 30 | v-model="prepalyFlightTime" |
| 30 | type="daterange" | 31 | type="daterange" |
| 31 | range-separator="至" | 32 | range-separator="至" |
| ... | @@ -35,10 +36,11 @@ | ... | @@ -35,10 +36,11 @@ |
| 35 | > | 36 | > |
| 36 | </el-date-picker> | 37 | </el-date-picker> |
| 37 | </el-form-item> | 38 | </el-form-item> |
| 38 | - </el-col> | 39 | + </el-col> --> |
| 39 | <el-col :span="6"> | 40 | <el-col :span="6"> |
| 40 | <el-form-item label="创建日期:"> | 41 | <el-form-item label="创建日期:"> |
| 41 | <el-date-picker | 42 | <el-date-picker |
| 43 | + class="formItem" | ||
| 42 | v-model="createDate" | 44 | v-model="createDate" |
| 43 | type="daterange" | 45 | type="daterange" |
| 44 | range-separator="至" | 46 | range-separator="至" |
| ... | @@ -50,58 +52,34 @@ | ... | @@ -50,58 +52,34 @@ |
| 50 | </el-form-item> | 52 | </el-form-item> |
| 51 | </el-col> | 53 | </el-col> |
| 52 | <el-col :span="6"> | 54 | <el-col :span="6"> |
| 53 | - <el-form-item label="取件日期:"> | ||
| 54 | - <el-date-picker | ||
| 55 | - v-model="formData.pickUpDate" | ||
| 56 | - type="date" | ||
| 57 | - placeholder="选择日期" | ||
| 58 | - :value-format="valueFormat" | ||
| 59 | - > | ||
| 60 | - </el-date-picker> | ||
| 61 | - </el-form-item> | ||
| 62 | - </el-col> | ||
| 63 | - <el-col :span="6"> | ||
| 64 | - <el-form-item label="运单号:"> | ||
| 65 | - <el-input | ||
| 66 | - size="small" | ||
| 67 | - type="text" | ||
| 68 | - v-model="formData.waybillNo" | ||
| 69 | - ></el-input> | ||
| 70 | - </el-form-item> | ||
| 71 | - </el-col> | ||
| 72 | - <el-col :span="6"> | ||
| 73 | <el-form-item label="站点:"> | 55 | <el-form-item label="站点:"> |
| 74 | <el-input | 56 | <el-input |
| 75 | - size="small" | ||
| 76 | type="text" | 57 | type="text" |
| 77 | v-model="formData.siteName" | 58 | v-model="formData.siteName" |
| 59 | + class="formItem" | ||
| 78 | ></el-input> | 60 | ></el-input> |
| 79 | </el-form-item> | 61 | </el-form-item> |
| 80 | </el-col> | 62 | </el-col> |
| 81 | <el-col :span="6"> | 63 | <el-col :span="6"> |
| 82 | - <el-form-item label="航班号:"> | 64 | + <el-form-item label="原航班号:"> |
| 83 | - <el-input | 65 | + <el-input type="text" v-model="upCase" class="formItem"></el-input> |
| 84 | - size="small" | ||
| 85 | - type="text" | ||
| 86 | - v-model="upCase" | ||
| 87 | - ></el-input> | ||
| 88 | </el-form-item> | 66 | </el-form-item> |
| 89 | </el-col> | 67 | </el-col> |
| 90 | - <el-col :span="6"> | 68 | + <!-- <el-col :span="6"> |
| 91 | <el-form-item label="航班序列单号:"> | 69 | <el-form-item label="航班序列单号:"> |
| 92 | <el-input | 70 | <el-input |
| 93 | - size="small" | ||
| 94 | type="text" | 71 | type="text" |
| 95 | v-model="formData.mawbCode" | 72 | v-model="formData.mawbCode" |
| 73 | + class="formItem" | ||
| 96 | ></el-input> | 74 | ></el-input> |
| 97 | </el-form-item> | 75 | </el-form-item> |
| 98 | - </el-col> | 76 | + </el-col> --> |
| 99 | <el-col :span="6"> | 77 | <el-col :span="6"> |
| 100 | <el-form-item label="URSA:"> | 78 | <el-form-item label="URSA:"> |
| 101 | <el-input | 79 | <el-input |
| 102 | - size="small" | ||
| 103 | type="text" | 80 | type="text" |
| 104 | v-model="formData.ursa" | 81 | v-model="formData.ursa" |
| 82 | + class="formItem" | ||
| 105 | ></el-input> | 83 | ></el-input> |
| 106 | </el-form-item> | 84 | </el-form-item> |
| 107 | </el-col> | 85 | </el-col> |
| ... | @@ -110,6 +88,7 @@ | ... | @@ -110,6 +88,7 @@ |
| 110 | <el-select | 88 | <el-select |
| 111 | placeholder="不限" | 89 | placeholder="不限" |
| 112 | v-model="formData.typeId" | 90 | v-model="formData.typeId" |
| 91 | + class="formItem" | ||
| 113 | clearable | 92 | clearable |
| 114 | > | 93 | > |
| 115 | <el-option | 94 | <el-option |
| ... | @@ -127,6 +106,7 @@ | ... | @@ -127,6 +106,7 @@ |
| 127 | <el-select | 106 | <el-select |
| 128 | placeholder="不限" | 107 | placeholder="不限" |
| 129 | v-model="formData.statusId" | 108 | v-model="formData.statusId" |
| 109 | + class="formItem" | ||
| 130 | clearable | 110 | clearable |
| 131 | > | 111 | > |
| 132 | <el-option | 112 | <el-option |
| ... | @@ -139,11 +119,12 @@ | ... | @@ -139,11 +119,12 @@ |
| 139 | </el-select> | 119 | </el-select> |
| 140 | </el-form-item> | 120 | </el-form-item> |
| 141 | </el-col> | 121 | </el-col> |
| 142 | - <el-col :span="6"> | 122 | + <!-- <el-col :span="6"> |
| 143 | <el-form-item label="配置航班类型:"> | 123 | <el-form-item label="配置航班类型:"> |
| 144 | <el-select | 124 | <el-select |
| 145 | placeholder="不限" | 125 | placeholder="不限" |
| 146 | v-model="formData.kindToAllocFlightId" | 126 | v-model="formData.kindToAllocFlightId" |
| 127 | + class="formItem" | ||
| 147 | clearable | 128 | clearable |
| 148 | > | 129 | > |
| 149 | <el-option | 130 | <el-option |
| ... | @@ -155,12 +136,13 @@ | ... | @@ -155,12 +136,13 @@ |
| 155 | </el-option> | 136 | </el-option> |
| 156 | </el-select> | 137 | </el-select> |
| 157 | </el-form-item> | 138 | </el-form-item> |
| 158 | - </el-col> | 139 | + </el-col> --> |
| 159 | - <el-col :span="6"> | 140 | + <!-- <el-col :span="6"> |
| 160 | <el-form-item label="历史货物状态:"> | 141 | <el-form-item label="历史货物状态:"> |
| 161 | <el-select | 142 | <el-select |
| 162 | placeholder="不限" | 143 | placeholder="不限" |
| 163 | v-model="formData.historyAllocaCargoTypeId" | 144 | v-model="formData.historyAllocaCargoTypeId" |
| 145 | + class="formItem" | ||
| 164 | clearable | 146 | clearable |
| 165 | > | 147 | > |
| 166 | <el-option | 148 | <el-option |
| ... | @@ -172,12 +154,13 @@ | ... | @@ -172,12 +154,13 @@ |
| 172 | </el-option> | 154 | </el-option> |
| 173 | </el-select> | 155 | </el-select> |
| 174 | </el-form-item> | 156 | </el-form-item> |
| 175 | - </el-col> | 157 | + </el-col> --> |
| 176 | <el-col :span="6"> | 158 | <el-col :span="6"> |
| 177 | <el-form-item label="海关回执状态:"> | 159 | <el-form-item label="海关回执状态:"> |
| 178 | <el-select | 160 | <el-select |
| 179 | placeholder="不限" | 161 | placeholder="不限" |
| 180 | v-model="formData.customsReceiptStatusId" | 162 | v-model="formData.customsReceiptStatusId" |
| 163 | + class="formItem" | ||
| 181 | clearable | 164 | clearable |
| 182 | > | 165 | > |
| 183 | <el-option | 166 | <el-option |
| ... | @@ -195,6 +178,7 @@ | ... | @@ -195,6 +178,7 @@ |
| 195 | <el-select | 178 | <el-select |
| 196 | placeholder="不限" | 179 | placeholder="不限" |
| 197 | v-model="formData.serviceTypeId" | 180 | v-model="formData.serviceTypeId" |
| 181 | + class="formItem" | ||
| 198 | clearable | 182 | clearable |
| 199 | > | 183 | > |
| 200 | <el-option | 184 | <el-option |
| ... | @@ -207,47 +191,73 @@ | ... | @@ -207,47 +191,73 @@ |
| 207 | </el-select> | 191 | </el-select> |
| 208 | </el-form-item> | 192 | </el-form-item> |
| 209 | </el-col> | 193 | </el-col> |
| 210 | - <el-col :span="6"> | 194 | + <!-- <el-col :span="6"> |
| 211 | <el-form-item label="数据源:"> | 195 | <el-form-item label="数据源:"> |
| 212 | <el-select | 196 | <el-select |
| 213 | placeholder="不限" | 197 | placeholder="不限" |
| 214 | v-model="formData.dataSources" | 198 | v-model="formData.dataSources" |
| 199 | + class="formItem" | ||
| 215 | clearable | 200 | clearable |
| 216 | > | 201 | > |
| 217 | <el-option label="人工导入" value="1"> </el-option> | 202 | <el-option label="人工导入" value="1"> </el-option> |
| 218 | <el-option label="系统导入" value="2"> </el-option> | 203 | <el-option label="系统导入" value="2"> </el-option> |
| 219 | </el-select> | 204 | </el-select> |
| 220 | </el-form-item> | 205 | </el-form-item> |
| 221 | - </el-col> | 206 | + </el-col> --> |
| 222 | - <el-col :span="6"> | 207 | + <!-- <el-col :span="6"> |
| 223 | <el-form-item label="是否大货:"> | 208 | <el-form-item label="是否大货:"> |
| 224 | <el-select | 209 | <el-select |
| 225 | placeholder="不限" | 210 | placeholder="不限" |
| 226 | v-model="formData.big" | 211 | v-model="formData.big" |
| 212 | + class="formItem" | ||
| 227 | clearable | 213 | clearable |
| 228 | > | 214 | > |
| 229 | <el-option label="是" value="1"> </el-option> | 215 | <el-option label="是" value="1"> </el-option> |
| 230 | <el-option label="否" value="0"> </el-option> | 216 | <el-option label="否" value="0"> </el-option> |
| 231 | </el-select> | 217 | </el-select> |
| 232 | </el-form-item> | 218 | </el-form-item> |
| 233 | - </el-col> | 219 | + </el-col> --> |
| 234 | <el-col :span="6"> | 220 | <el-col :span="6"> |
| 235 | <el-form-item label="是否自动:"> | 221 | <el-form-item label="是否自动:"> |
| 236 | <el-select | 222 | <el-select |
| 237 | placeholder="不限" | 223 | placeholder="不限" |
| 238 | v-model="formData.allocationTypeId" | 224 | v-model="formData.allocationTypeId" |
| 225 | + class="formItem" | ||
| 239 | clearable | 226 | clearable |
| 240 | > | 227 | > |
| 241 | <el-option | 228 | <el-option |
| 242 | - v-for="item in findConditionData.cargoAllocationType" | 229 | + label="手动" |
| 243 | - :label="item.chineseName" | 230 | + value="1" |
| 244 | - :value="item.id" | 231 | + > |
| 245 | - :key="item.id" | 232 | + </el-option> |
| 233 | + <el-option | ||
| 234 | + label="自动" | ||
| 235 | + value="2" | ||
| 246 | > | 236 | > |
| 247 | </el-option> | 237 | </el-option> |
| 248 | </el-select> | 238 | </el-select> |
| 249 | </el-form-item> | 239 | </el-form-item> |
| 250 | </el-col> | 240 | </el-col> |
| 241 | + <el-col :span="6"> | ||
| 242 | + <el-form-item label="运单号:"> | ||
| 243 | + <el-input | ||
| 244 | + type="textarea" | ||
| 245 | + v-model="formData.waybillNo" | ||
| 246 | + class="formItem" | ||
| 247 | + ></el-input> | ||
| 248 | + </el-form-item> | ||
| 249 | + </el-col> | ||
| 250 | + <el-col :span="6"> | ||
| 251 | + <el-form-item label="取件日期:"> | ||
| 252 | + <el-date-picker | ||
| 253 | + v-model="formData.pickUpDate" | ||
| 254 | + type="date" | ||
| 255 | + placeholder="选择日期" | ||
| 256 | + :value-format="valueFormat" | ||
| 257 | + > | ||
| 258 | + </el-date-picker> | ||
| 259 | + </el-form-item> | ||
| 260 | + </el-col> | ||
| 251 | </el-row> | 261 | </el-row> |
| 252 | <div style="paddingleft: 10px"> | 262 | <div style="paddingleft: 10px"> |
| 253 | <el-button | 263 | <el-button |
| ... | @@ -257,34 +267,35 @@ | ... | @@ -257,34 +267,35 @@ |
| 257 | @click="select" | 267 | @click="select" |
| 258 | >查询</el-button | 268 | >查询</el-button |
| 259 | > | 269 | > |
| 260 | - <el-button type="primary" size="small" @click="checks(tableDate)" | 270 | + <el-button type="primary" size="small" @click="checks(tableData)" |
| 261 | >全选/全否</el-button | 271 | >全选/全否</el-button |
| 262 | > | 272 | > |
| 263 | - <el-button type="primary" size="small" @click="xlse(limitStart)" | 273 | + <el-button type="primary" size="small" @click="xlse(0)" v-dbClick :disabled="tableData.length==0" |
| 264 | >导出本页查询结果</el-button | 274 | >导出本页查询结果</el-button |
| 265 | > | 275 | > |
| 266 | - <el-button type="primary" size="small" @click="xlse(0)" | 276 | + <el-button type="primary" size="small" @click="xlse(1)" v-dbClick :disabled="tableData.length==0" |
| 267 | >导出全部查询结果</el-button | 277 | >导出全部查询结果</el-button |
| 268 | > | 278 | > |
| 269 | <div class="tips"> | 279 | <div class="tips"> |
| 270 | - <span style="paddingright: 50px">总重量:{{ allWeight }}</span | 280 | + <span style="paddingright: 50px">总重量:{{ allWeight }}</span> |
| 271 | - > <span>总件数:{{ allQty }}</span> | 281 | + <span>总件数:{{ allQty }}</span> |
| 272 | </div> | 282 | </div> |
| 273 | </div> | 283 | </div> |
| 274 | </el-form> | 284 | </el-form> |
| 275 | <el-table | 285 | <el-table |
| 276 | ref="cargoTable" | 286 | ref="cargoTable" |
| 277 | - :data="tableDate" | 287 | + :data="tableData" |
| 278 | style="width: 100%" | 288 | style="width: 100%" |
| 279 | size="small" | 289 | size="small" |
| 280 | - height="500" | 290 | + height="450" |
| 281 | v-loading="tableLoading" | 291 | v-loading="tableLoading" |
| 282 | fit | 292 | fit |
| 283 | @select="cheacked" | 293 | @select="cheacked" |
| 294 | + @select-all="selectAll" | ||
| 284 | > | 295 | > |
| 285 | <el-table-column type="selection" width="55" fixed> </el-table-column> | 296 | <el-table-column type="selection" width="55" fixed> </el-table-column> |
| 286 | <el-table-column type="index" label="序号"> | 297 | <el-table-column type="index" label="序号"> |
| 287 | - <template slot-scope="scope">{{scope.$index+1}}</template> | 298 | + <template slot-scope="scope">{{ scope.$index + 1 }}</template> |
| 288 | </el-table-column> | 299 | </el-table-column> |
| 289 | <el-table-column | 300 | <el-table-column |
| 290 | v-for="item in tableHeader" | 301 | v-for="item in tableHeader" |
| ... | @@ -294,6 +305,7 @@ | ... | @@ -294,6 +305,7 @@ |
| 294 | width="100%" | 305 | width="100%" |
| 295 | header-align="center" | 306 | header-align="center" |
| 296 | align="center" | 307 | align="center" |
| 308 | + :formatter="formatter" | ||
| 297 | > | 309 | > |
| 298 | </el-table-column> | 310 | </el-table-column> |
| 299 | </el-table> | 311 | </el-table> |
| ... | @@ -313,7 +325,7 @@ | ... | @@ -313,7 +325,7 @@ |
| 313 | 325 | ||
| 314 | <script> | 326 | <script> |
| 315 | import { findConditionData, findCargoData } from "@/api/cargoSelect"; | 327 | import { findConditionData, findCargoData } from "@/api/cargoSelect"; |
| 316 | -import { downLoadZip } from "@/utils/zipdownload"; | 328 | +import { cargoXlsx } from "@/utils/zipdownload"; |
| 317 | 329 | ||
| 318 | export default { | 330 | export default { |
| 319 | data() { | 331 | data() { |
| ... | @@ -342,66 +354,67 @@ export default { | ... | @@ -342,66 +354,67 @@ export default { |
| 342 | big: null, | 354 | big: null, |
| 343 | }, //表单数据 | 355 | }, //表单数据 |
| 344 | tableHeader: [ | 356 | tableHeader: [ |
| 345 | - { name: "配置航班类型", value: "kindIdToAllocFlightName" }, | ||
| 346 | { name: "取件日期", value: "pickUpDate" }, | 357 | { name: "取件日期", value: "pickUpDate" }, |
| 347 | { name: "取件扫描号", value: "pickUpScanNo" }, | 358 | { name: "取件扫描号", value: "pickUpScanNo" }, |
| 348 | { name: "服务类型", value: "serviceTypeName" }, | 359 | { name: "服务类型", value: "serviceTypeName" }, |
| 349 | { name: "运单号", value: "waybillNo" }, | 360 | { name: "运单号", value: "waybillNo" }, |
| 350 | - { name: "状态", value: "statusName" }, | 361 | + { name: "货物状态", value: "statusName" }, |
| 351 | - { name: "航班号", value: "fltNo" }, | 362 | + { name: "原航班号", value: "fltNoAccs" }, |
| 352 | - { name: "航班日期", value: "fltDate" }, | 363 | + { name: "原航班日期", value: "fltDateAccs" }, |
| 353 | - { name: "原航班", value: "sourceFlt" }, | 364 | + { name: "ACCS航线", value: "accsFlightRoute" }, |
| 354 | - { name: "已选目的航班", value: "fltSet" }, | 365 | + { name: "预配航班日期", value: "preplanFlightTime" }, |
| 366 | + { name: "预配航班号", value: "preplanFlightNo" }, | ||
| 367 | + { name: "二配航班日期", value: "twoMatchFlightTime" }, | ||
| 368 | + { name: "二配航班号", value: "twoMatchFlightNo" }, | ||
| 369 | + { name: "终配航班日期", value: "finalFlightTime" }, | ||
| 370 | + { name: "终配航班号", value: "finalFlightNo" }, | ||
| 355 | { name: "件数", value: "qty" }, | 371 | { name: "件数", value: "qty" }, |
| 356 | { name: "实际重量", value: "actualWeight" }, | 372 | { name: "实际重量", value: "actualWeight" }, |
| 357 | - { name: "航班序号单", value: "mawbCode" }, | ||
| 358 | { name: "申报类型", value: "typeName" }, | 373 | { name: "申报类型", value: "typeName" }, |
| 359 | - { name: "历史货物状态", value: "historyAllocaCargoTypeName" }, | 374 | + { name: "口岸代码", value: "portName" }, |
| 360 | - { name: "预配航班日期", value: "prematchFltDate" }, | 375 | + { name: "subcategory", value: "subCategory" }, |
| 376 | + { name: "发件人账号", value: "shipperAccount" }, | ||
| 377 | + { name: "发件公司中文名称", value: "shipperCompany" }, | ||
| 378 | + { name: "是否RDE手工录入", value: "manualRde" }, | ||
| 379 | + { name: "HandlingCode", value: "handingCode" }, | ||
| 361 | { name: "品名描述", value: "nameDescription" }, | 380 | { name: "品名描述", value: "nameDescription" }, |
| 362 | { name: "站点", value: "siteName" }, | 381 | { name: "站点", value: "siteName" }, |
| 382 | + { name: "始发地城市名称", value: "originCity" }, | ||
| 363 | { name: "收件地", value: "destinationSiteName" }, | 383 | { name: "收件地", value: "destinationSiteName" }, |
| 364 | - { name: "目的国家", value: "countryName" }, | 384 | + { name: "收件人国家代码", value: "consigneeCountry" }, |
| 365 | - { name: "Bagging ID", value: "baggingId" }, | ||
| 366 | { name: "URSA", value: "ursa" }, | 385 | { name: "URSA", value: "ursa" }, |
| 367 | - { name: "selection Code", value: "selectionCode" }, | ||
| 368 | { name: "尺寸", value: "sizeStr" }, | 386 | { name: "尺寸", value: "sizeStr" }, |
| 369 | - { name: "体积", value: "volume" }, | ||
| 370 | - { name: "是否大货", value: "big" }, | ||
| 371 | - { name: "历史航班号", value: "historyFltNo" }, | ||
| 372 | { name: "海关回执状态", value: "customsReceiptStatusName" }, | 387 | { name: "海关回执状态", value: "customsReceiptStatusName" }, |
| 373 | { name: "海关回执时间", value: "customsReceiptTime" }, | 388 | { name: "海关回执时间", value: "customsReceiptTime" }, |
| 389 | + { name: "预审状态", value: "preQualificationStatus" }, | ||
| 374 | { name: "CA预审意见", value: "caPretrialOpinion" }, | 390 | { name: "CA预审意见", value: "caPretrialOpinion" }, |
| 375 | - { name: "CA回执时间", value: "caPretrialTime" }, | 391 | + { name: "CA预审时间", value: "caPretrialTime" }, |
| 376 | { | 392 | { |
| 377 | name: "大货预审意见(是否可以配置CA航班)", | 393 | name: "大货预审意见(是否可以配置CA航班)", |
| 378 | value: "bigPretrialOpinion", | 394 | value: "bigPretrialOpinion", |
| 379 | }, | 395 | }, |
| 380 | { name: "大货预审时间", value: "bigPretrialTime" }, | 396 | { name: "大货预审时间", value: "bigPretrialTime" }, |
| 381 | - { name: "是否已经传送到图像系统", value: "transmitFlg" }, | ||
| 382 | - { name: "传送时间", value: "transmitUploadTime" }, | ||
| 383 | - { name: "图像系统反馈结果", value: "transmitFeedbackTime" }, | ||
| 384 | - { name: "图像系统反馈时间", value: "transmitFeedbackResult" }, | ||
| 385 | { name: "创建人", value: "createUserId" }, | 397 | { name: "创建人", value: "createUserId" }, |
| 386 | { name: "创建时间", value: "createTime" }, | 398 | { name: "创建时间", value: "createTime" }, |
| 387 | - { name: "数据源", value: "dataSources" }, | 399 | + { name: "是否自动", value: "cargoRulesStatus" }, |
| 388 | - { name: "是否自动", value: "allocationTypeName" }, | ||
| 389 | ], //表头数据 | 400 | ], //表头数据 |
| 390 | findConditionData: {}, //货物查询条件 | 401 | findConditionData: {}, //货物查询条件 |
| 391 | - tableDate: [], //表格数据 | 402 | + tableData: [], //表格数据 |
| 392 | allWeight: 0, | 403 | allWeight: 0, |
| 393 | allQty: 0, | 404 | allQty: 0, |
| 394 | shiftKey: false, | 405 | shiftKey: false, |
| 395 | start: -1, | 406 | start: -1, |
| 396 | - valueFormat:'yyyy-MM-dd', | 407 | + valueFormat: "yyyy-MM-dd", |
| 397 | - tableLoading:false, | 408 | + tableLoading: false, |
| 398 | - totalCount:0, | 409 | + downloading:false, |
| 410 | + totalCount: 0, | ||
| 399 | selectTable: [], | 411 | selectTable: [], |
| 400 | flightTime: [], | 412 | flightTime: [], |
| 401 | prepalyFlightTime: [], | 413 | prepalyFlightTime: [], |
| 402 | createDate: [], | 414 | createDate: [], |
| 403 | limitStart: 0, | 415 | limitStart: 0, |
| 404 | - limitSize: 100,//无限制-1 | 416 | + limitSize: 100, //无限制-1 |
| 417 | + selecetALL:false, | ||
| 405 | }; | 418 | }; |
| 406 | }, | 419 | }, |
| 407 | 420 | ||
| ... | @@ -410,10 +423,10 @@ export default { | ... | @@ -410,10 +423,10 @@ export default { |
| 410 | findConditionData().then((res) => { | 423 | findConditionData().then((res) => { |
| 411 | if (res.code == 200) { | 424 | if (res.code == 200) { |
| 412 | this.findConditionData = res.data; | 425 | this.findConditionData = res.data; |
| 413 | - }else{ | 426 | + } else { |
| 414 | this.$message({ | 427 | this.$message({ |
| 415 | - message: '查询条件不存在', | 428 | + message: "查询条件不存在", |
| 416 | - type: 'warning', | 429 | + type: "warning", |
| 417 | }); | 430 | }); |
| 418 | } | 431 | } |
| 419 | }); | 432 | }); |
| ... | @@ -433,84 +446,120 @@ export default { | ... | @@ -433,84 +446,120 @@ export default { |
| 433 | }, | 446 | }, |
| 434 | 447 | ||
| 435 | methods: { | 448 | methods: { |
| 436 | - clear(){ | 449 | + clear() { |
| 437 | - this.$refs.cargoForm.resetFields() | 450 | + this.$refs.cargoForm.resetFields(); |
| 438 | }, | 451 | }, |
| 439 | //查询 | 452 | //查询 |
| 440 | select() { | 453 | select() { |
| 454 | + this.tableData = []; | ||
| 455 | + this.allWeight = 0; | ||
| 456 | + this.allQty = 0; | ||
| 441 | this.tableLoading = true; | 457 | this.tableLoading = true; |
| 442 | - if(this.createDate.length > 0){ | 458 | + if (this.createDate != null && this.createDate.length > 0) { |
| 443 | this.formData.createTimeStart = this.createDate[0]; | 459 | this.formData.createTimeStart = this.createDate[0]; |
| 444 | this.formData.createTimeEnd = this.createDate[1]; | 460 | this.formData.createTimeEnd = this.createDate[1]; |
| 461 | + }else{ | ||
| 462 | + this.formData.createTimeStart = null; | ||
| 463 | + this.formData.createTimeEnd = null; | ||
| 445 | } | 464 | } |
| 446 | - if(this.prepalyFlightTime.length > 0){ | 465 | + if (this.prepalyFlightTime != null && this.prepalyFlightTime.length > 0) { |
| 447 | this.formData.prematchFltDateStart = this.prepalyFlightTime[0]; | 466 | this.formData.prematchFltDateStart = this.prepalyFlightTime[0]; |
| 448 | this.formData.prematchFltDateEnd = this.prepalyFlightTime[1]; | 467 | this.formData.prematchFltDateEnd = this.prepalyFlightTime[1]; |
| 468 | + }else{ | ||
| 469 | + this.formData.prematchFltDateStart =""; | ||
| 470 | + this.formData.prematchFltDateEnd = ""; | ||
| 449 | } | 471 | } |
| 450 | - if(this.flightTime.length > 0){ | 472 | + if (this.flightTime != null && this.flightTime.length > 0) { |
| 451 | this.formData.fltDateStart = this.flightTime[0]; | 473 | this.formData.fltDateStart = this.flightTime[0]; |
| 452 | this.formData.fltDateEnd = this.flightTime[1]; | 474 | this.formData.fltDateEnd = this.flightTime[1]; |
| 475 | + }else{ | ||
| 476 | + this.formData.fltDateStart = ""; | ||
| 477 | + this.formData.fltDateEnd = ""; | ||
| 453 | } | 478 | } |
| 454 | - | ||
| 455 | this.formData.limitStart = this.limitStart; | 479 | this.formData.limitStart = this.limitStart; |
| 456 | this.formData.limitSize = this.limitSize; | 480 | this.formData.limitSize = this.limitSize; |
| 457 | findCargoData(this.formData).then((res) => { | 481 | findCargoData(this.formData).then((res) => { |
| 458 | if (res.code == 200) { | 482 | if (res.code == 200) { |
| 459 | - if(res.data.list.length > 0 ){ | 483 | + if (res.data.list.length > 0) { |
| 460 | - this.tableDate = res.data.list; | 484 | + this.tableData = res.data.list; |
| 461 | this.totalCount = res.data.totalCount; | 485 | this.totalCount = res.data.totalCount; |
| 462 | - for (let i = 0; i < this.tableDate.length; i++) { | 486 | + for (let i = 0; i < this.tableData.length; i++) { |
| 463 | - this.tableDate[i].index = i; | 487 | + this.tableData[i].index = i; |
| 464 | } | 488 | } |
| 465 | - }else{ | 489 | + } else { |
| 466 | this.$message({ | 490 | this.$message({ |
| 467 | - message: '未查询到数据', | 491 | + message: "未查询到数据", |
| 468 | - type: 'warning', | 492 | + type: "warning", |
| 469 | }); | 493 | }); |
| 470 | } | 494 | } |
| 471 | - }else{ | 495 | + } else { |
| 472 | this.$message({ | 496 | this.$message({ |
| 473 | message: res.msg, | 497 | message: res.msg, |
| 474 | - type: 'warning', | 498 | + type: "warning", |
| 475 | }); | 499 | }); |
| 476 | } | 500 | } |
| 477 | this.tableLoading = false; | 501 | this.tableLoading = false; |
| 502 | + }).catch(()=>{ | ||
| 503 | + this.tableLoading = false; | ||
| 478 | }); | 504 | }); |
| 479 | }, | 505 | }, |
| 480 | //全选反选 | 506 | //全选反选 |
| 481 | checks(rows) { | 507 | checks(rows) { |
| 482 | - if (rows) { | 508 | + if (rows && !this.selecetALL) { |
| 483 | rows.forEach((row) => { | 509 | rows.forEach((row) => { |
| 484 | this.$refs.cargoTable.toggleRowSelection(row); | 510 | this.$refs.cargoTable.toggleRowSelection(row); |
| 511 | + this.allQty = row.qty + this.allQty; | ||
| 512 | + this.allWeight = row.actualWeight + this.allWeight; | ||
| 485 | }); | 513 | }); |
| 514 | + this.selecetALL = true; | ||
| 515 | + this.allWeight = this.allWeight.toFixed(1); | ||
| 516 | + this.allQty = this.allQty.toFixed(0); | ||
| 486 | } else { | 517 | } else { |
| 487 | this.$refs.cargoTable.clearSelection(); | 518 | this.$refs.cargoTable.clearSelection(); |
| 519 | + this.allWeight = 0; | ||
| 520 | + this.allQty = 0; | ||
| 521 | + this.selecetALL = false; | ||
| 488 | } | 522 | } |
| 489 | }, | 523 | }, |
| 524 | + selectAll(selection){ | ||
| 525 | + if(selection.length > 0){ | ||
| 526 | + selection.forEach(item => { | ||
| 527 | + this.allWeight = item.actualWeight + this.allWeight; | ||
| 528 | + this.allQty = item.qty + this.allQty; | ||
| 529 | + }) | ||
| 530 | + this.allWeight = this.allWeight.toFixed(1); | ||
| 531 | + this.allQty = this.allQty.toFixed(0); | ||
| 532 | + }else{ | ||
| 533 | + this.allWeight = 0; | ||
| 534 | + this.allQty = 0; | ||
| 535 | + } | ||
| 536 | + | ||
| 537 | + }, | ||
| 490 | //下一页 | 538 | //下一页 |
| 491 | - nextClick(){ | 539 | + nextClick() { |
| 492 | this.limitStart = this.limitStart + 100; | 540 | this.limitStart = this.limitStart + 100; |
| 493 | }, | 541 | }, |
| 494 | //上一页 | 542 | //上一页 |
| 495 | - prevClick(){ | 543 | + prevClick() { |
| 496 | this.limitStart = this.limitStart - 100; | 544 | this.limitStart = this.limitStart - 100; |
| 497 | }, | 545 | }, |
| 498 | //指定页数 | 546 | //指定页数 |
| 499 | - currentChange(page){ | 547 | + currentChange(page) { |
| 500 | - this.limitStart = (page-1)*100; | 548 | + this.limitStart = (page - 1) * 100; |
| 501 | - this.select() | 549 | + this.select(); |
| 550 | + // this.$el.getElementsByClassName("el-table__body")[0].scrollTop=0 | ||
| 502 | }, | 551 | }, |
| 503 | //表单项选中操作 | 552 | //表单项选中操作 |
| 504 | cheacked(sl, row) { | 553 | cheacked(sl, row) { |
| 505 | if (this.shiftKey) { | 554 | if (this.shiftKey) { |
| 506 | if (this.start == -1) { | 555 | if (this.start == -1) { |
| 507 | for (let i = 0; i <= row.index; i++) { | 556 | for (let i = 0; i <= row.index; i++) { |
| 508 | - this.$refs.cargoTable.toggleRowSelection(this.tableDate[i], true); | 557 | + this.$refs.cargoTable.toggleRowSelection(this.tableData[i], true); |
| 509 | - this.selectTable.push(this.tableDate[i]); | 558 | + this.selectTable.push(this.tableData[i]); |
| 510 | } | 559 | } |
| 511 | } else { | 560 | } else { |
| 512 | for (let i = this.start + 1; i <= row.index; i++) { | 561 | for (let i = this.start + 1; i <= row.index; i++) { |
| 513 | - this.$refs.cargoTable.toggleRowSelection(this.tableDate[i], true); | 562 | + this.$refs.cargoTable.toggleRowSelection(this.tableData[i], true); |
| 514 | } | 563 | } |
| 515 | } | 564 | } |
| 516 | } else { | 565 | } else { |
| ... | @@ -522,12 +571,12 @@ export default { | ... | @@ -522,12 +571,12 @@ export default { |
| 522 | newselect.push(row); | 571 | newselect.push(row); |
| 523 | for (let i = 0; i < this.selectTable.length; i++) { | 572 | for (let i = 0; i < this.selectTable.length; i++) { |
| 524 | if (this.selectTable[i].id != row.id) { | 573 | if (this.selectTable[i].id != row.id) { |
| 525 | - newselect.push(this.selectTable[i]) | 574 | + newselect.push(this.selectTable[i]); |
| 526 | - }else{ | 575 | + } else { |
| 527 | newselect.splice(0, 1); | 576 | newselect.splice(0, 1); |
| 528 | } | 577 | } |
| 529 | } | 578 | } |
| 530 | - this.selectTable = newselect | 579 | + this.selectTable = newselect; |
| 531 | } | 580 | } |
| 532 | } | 581 | } |
| 533 | this.allWeight = 0; | 582 | this.allWeight = 0; |
| ... | @@ -539,34 +588,76 @@ export default { | ... | @@ -539,34 +588,76 @@ export default { |
| 539 | this.allQty = this.allQty.toFixed(0); | 588 | this.allQty = this.allQty.toFixed(0); |
| 540 | this.allWeight = this.allWeight.toFixed(1); | 589 | this.allWeight = this.allWeight.toFixed(1); |
| 541 | }, | 590 | }, |
| 542 | - // 全部、当前页面 | 591 | + // 导出表格 |
| 543 | xlse(page) { | 592 | xlse(page) { |
| 544 | - if(page > 0 ){ | 593 | + let cargoXlse = {title:"货物导出表",cargoConditionDto:{}}; |
| 545 | - | 594 | + if (this.createDate != null && this.createDate.length > 0) { |
| 595 | + this.formData.createTimeStart = this.createDate[0]; | ||
| 596 | + this.formData.createTimeEnd = this.createDate[1]; | ||
| 597 | + }else{ | ||
| 598 | + this.formData.createTimeStart = null; | ||
| 599 | + this.formData.createTimeEnd = null; | ||
| 600 | + } | ||
| 601 | + if (this.prepalyFlightTime != null && this.prepalyFlightTime.length > 0) { | ||
| 602 | + this.formData.prematchFltDateStart = this.prepalyFlightTime[0]; | ||
| 603 | + this.formData.prematchFltDateEnd = this.prepalyFlightTime[1]; | ||
| 604 | + }else{ | ||
| 605 | + this.formData.prematchFltDateStart =""; | ||
| 606 | + this.formData.prematchFltDateEnd = ""; | ||
| 607 | + } | ||
| 608 | + if (this.flightTime != null && this.flightTime.length > 0) { | ||
| 609 | + this.formData.fltDateStart = this.flightTime[0]; | ||
| 610 | + this.formData.fltDateEnd = this.flightTime[1]; | ||
| 546 | }else{ | 611 | }else{ |
| 612 | + this.formData.fltDateStart = ""; | ||
| 613 | + this.formData.fltDateEnd = ""; | ||
| 614 | + } | ||
| 615 | + cargoXlse.cargoConditionDto = this.formData; | ||
| 616 | + cargoXlse.cargoConditionDto.limitSize = this.limitSize; | ||
| 547 | 617 | ||
| 618 | + if (page == 0) { | ||
| 619 | + cargoXlse.cargoConditionDto.limitStart = this.limitStart; | ||
| 620 | + } else { | ||
| 621 | + cargoXlse.cargoConditionDto.limitStart = 0; | ||
| 622 | + cargoXlse.cargoConditionDto.limitSize = -1; | ||
| 548 | } | 623 | } |
| 549 | - console.log(page); | 624 | + cargoXlsx("/cargo/excel",cargoXlse) |
| 550 | }, | 625 | }, |
| 626 | + //表格格式化 | ||
| 627 | + formatter(row,column,cellValue,index){ | ||
| 628 | + if(column.property=="cargoRulesStatus"){ | ||
| 629 | + console.log() | ||
| 630 | + if(cellValue == 1){ | ||
| 631 | + return cellValue = "手动" | ||
| 632 | + }else if(cellValue == 2){ | ||
| 633 | + return cellValue = "自动" | ||
| 634 | + } | ||
| 635 | + } | ||
| 636 | + return cellValue | ||
| 637 | + } | ||
| 551 | }, | 638 | }, |
| 552 | - computed:{ | 639 | + computed: { |
| 553 | - upCase:{ | 640 | + upCase: { |
| 554 | - get: function(){ | 641 | + get: function () { |
| 555 | return this.formData.fltNo; | 642 | return this.formData.fltNo; |
| 556 | }, | 643 | }, |
| 557 | - set: function(val){ | 644 | + set: function (val) { |
| 558 | this.formData.fltNo = val.toUpperCase(); | 645 | this.formData.fltNo = val.toUpperCase(); |
| 559 | - } | 646 | + }, |
| 560 | - } | 647 | + }, |
| 561 | - } | 648 | + }, |
| 562 | }; | 649 | }; |
| 563 | </script> | 650 | </script> |
| 564 | 651 | ||
| 565 | -<style> | 652 | +<style scoped> |
| 566 | .tips { | 653 | .tips { |
| 567 | float: right; | 654 | float: right; |
| 568 | color: #606266; | 655 | color: #606266; |
| 569 | font-size: 14px; | 656 | font-size: 14px; |
| 570 | - margin-right: 20px; | 657 | + margin-right: 40px; |
| 658 | +} | ||
| 659 | +.formItem { | ||
| 660 | + width:100%; | ||
| 661 | + max-width: 300px; | ||
| 571 | } | 662 | } |
| 572 | </style> | 663 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment