Showing
18 changed files
with
1277 additions
and
149 deletions
src/api/caPreReviewImport.js
0 → 100644
| 1 | +import service from "../utils/request"; | ||
| 2 | +import request from '@/utils/request' | ||
| 3 | + | ||
| 4 | +export function downLoadTemplate(template) { | ||
| 5 | + return request({ | ||
| 6 | + url:'/caPreReviewImport/downLoadTemplate?template=' + template, | ||
| 7 | + method:'get', | ||
| 8 | + responseType:'blob', | ||
| 9 | + }) | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +export function importcaPreReview(file, type){ | ||
| 13 | + let formData = new FormData(); | ||
| 14 | + formData.append("file", file); | ||
| 15 | + formData.append("type", type); | ||
| 16 | + return request({ | ||
| 17 | + url:'/caPreReviewImport/importcaPreReview', | ||
| 18 | + method:'post', | ||
| 19 | + data:formData | ||
| 20 | + }) | ||
| 21 | +} |
| ... | @@ -2,19 +2,54 @@ import request from '@/utils/request' | ... | @@ -2,19 +2,54 @@ import request from '@/utils/request' |
| 2 | 2 | ||
| 3 | // 货物查询查询条件数据 | 3 | // 货物查询查询条件数据 |
| 4 | export function findConditionData(data) { | 4 | export function findConditionData(data) { |
| 5 | - return request({ | 5 | + return request({ |
| 6 | - url: '/cargo/findConditionData', | 6 | + url: '/cargo/findConditionData', |
| 7 | - method: 'post', | 7 | + method: 'post', |
| 8 | - data: data | 8 | + data: data |
| 9 | - }) | 9 | + }) |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | //货物查询 | 12 | //货物查询 |
| 13 | export function findCargoData(data) { | 13 | export function findCargoData(data) { |
| 14 | return request({ | 14 | return request({ |
| 15 | - url: '/cargo/findCargoData', | 15 | + url: '/cargo/findCargoData', |
| 16 | - method: 'post', | 16 | + method: 'post', |
| 17 | - data: data | 17 | + data: data |
| 18 | - }) | 18 | + }) |
| 19 | +} | ||
| 20 | +//货物预审查询 | ||
| 21 | +export function findCagroPreData(data) { | ||
| 22 | + return request({ | ||
| 23 | + url: '/cargo/findCagroPreData', | ||
| 24 | + method: 'post', | ||
| 25 | + data: data | ||
| 26 | + }) | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +//货物配舱查询 | ||
| 30 | +export function findCargoAllocationData(data) { | ||
| 31 | + return request({ | ||
| 32 | + url: '/cargo/findCargoAllocationData', | ||
| 33 | + method: 'post', | ||
| 34 | + data: data | ||
| 35 | + }) | ||
| 19 | } | 36 | } |
| 20 | 37 | ||
| 38 | +//手动配舱 | ||
| 39 | +export function allocationFlight(data){ | ||
| 40 | + return request({ | ||
| 41 | + url:'/cargo/allocationFlight', | ||
| 42 | + method:'post', | ||
| 43 | + data:data | ||
| 44 | + }) | ||
| 45 | +} | ||
| 46 | + | ||
| 47 | +//导出excel | ||
| 48 | +export function downloadExcel(data) { | ||
| 49 | + return request({ | ||
| 50 | + url: '/cargo/excel', | ||
| 51 | + method: 'post', | ||
| 52 | + data: data, | ||
| 53 | + responseType: 'blob', | ||
| 54 | + }) | ||
| 55 | +} | ... | ... |
src/assets/languages/dictLabels.js
0 → 100644
src/components/Table/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="Tables"> | ||
| 3 | + <el-table | ||
| 4 | + :ref="tableName" | ||
| 5 | + :data="data" | ||
| 6 | + :headerData="headerData" | ||
| 7 | + :border="border" | ||
| 8 | + :stripe="stripe" | ||
| 9 | + :size="size" | ||
| 10 | + :fit="fit" | ||
| 11 | + :indent="indent" | ||
| 12 | + :show-header="showHeader" | ||
| 13 | + :height="height" | ||
| 14 | + :highlight-current-row="highlightCurrentRow" | ||
| 15 | + :lazy="lazy" | ||
| 16 | + :downShiftKey="shiftKey" | ||
| 17 | + :limitStart="limitStart" | ||
| 18 | + v-loading="loading" | ||
| 19 | + @select="tableSelect" | ||
| 20 | + @select-all="tableSelectAll" | ||
| 21 | + @select-change="SelectChange" | ||
| 22 | + > | ||
| 23 | + <el-table-column | ||
| 24 | + v-for="(item, index) in newHeader" | ||
| 25 | + :type="item.type" | ||
| 26 | + :prop="item.value" | ||
| 27 | + :label="item.name" | ||
| 28 | + :width="item.width" | ||
| 29 | + :align="item.align" | ||
| 30 | + :fixed="item.fixed" | ||
| 31 | + :show-overflow-tooltip="showOverflowTooltip" | ||
| 32 | + :sortable="item.sorTable" | ||
| 33 | + header-align="center" | ||
| 34 | + :formatter="formatter" | ||
| 35 | + :slotHeader="slotHeader" | ||
| 36 | + :key="index" | ||
| 37 | + > | ||
| 38 | + <template v-if="item.slot" slot-scope=""> | ||
| 39 | + <Item :dom="item.slot" @change="itemChange"></Item> | ||
| 40 | + </template> | ||
| 41 | + </el-table-column> | ||
| 42 | + <slot></slot> | ||
| 43 | + </el-table> | ||
| 44 | + <el-pagination | ||
| 45 | + :total="totalCount" | ||
| 46 | + :page-size.sync="limitSize" | ||
| 47 | + background | ||
| 48 | + layout="prev, pager, next, jumper, ->, total, slot" | ||
| 49 | + class="tablePagination" | ||
| 50 | + @next-click="nextClick" | ||
| 51 | + @prev-click="prevClick" | ||
| 52 | + @current-change="currentChange" | ||
| 53 | + > | ||
| 54 | + </el-pagination> | ||
| 55 | + <!-- <infoTable | ||
| 56 | + v-bind="$attrs" | ||
| 57 | + @checkChange="checkChange" | ||
| 58 | + @top="top" | ||
| 59 | + @bottom="bottom" | ||
| 60 | + ></infoTable> --> | ||
| 61 | + </div> | ||
| 62 | +</template> | ||
| 63 | + | ||
| 64 | +<script> | ||
| 65 | +// import infoTable from "./info.vue"; | ||
| 66 | +import Item from "./item.vue"; | ||
| 67 | +import dictLabels from "../../assets/languages/dictLabels.js" | ||
| 68 | +import { scrollTo } from '@/utils/scroll-to' | ||
| 69 | +export default { | ||
| 70 | + name: "Table", | ||
| 71 | + components: { | ||
| 72 | + // infoTable, | ||
| 73 | + Item, | ||
| 74 | + }, | ||
| 75 | + props: { | ||
| 76 | + tableName: { type: String, default: "tables" }, | ||
| 77 | + data: { | ||
| 78 | + type: Array, | ||
| 79 | + default() { | ||
| 80 | + return []; | ||
| 81 | + }, | ||
| 82 | + }, | ||
| 83 | + headerData: { | ||
| 84 | + type: Array, | ||
| 85 | + default: null, | ||
| 86 | + }, | ||
| 87 | + border: { | ||
| 88 | + type: Boolean, | ||
| 89 | + default: true, | ||
| 90 | + }, | ||
| 91 | + stripe: { | ||
| 92 | + type: Boolean, | ||
| 93 | + default: true, | ||
| 94 | + }, | ||
| 95 | + size: { | ||
| 96 | + type: String, | ||
| 97 | + default: "mini", | ||
| 98 | + }, | ||
| 99 | + height: { | ||
| 100 | + type: String, | ||
| 101 | + default: "400", | ||
| 102 | + }, | ||
| 103 | + fit: { | ||
| 104 | + type: Boolean, | ||
| 105 | + default: true, | ||
| 106 | + }, | ||
| 107 | + indent: { | ||
| 108 | + type: Number, | ||
| 109 | + default: 16, | ||
| 110 | + }, | ||
| 111 | + showHeader: { | ||
| 112 | + type: Boolean, | ||
| 113 | + default: true, | ||
| 114 | + }, | ||
| 115 | + slotHeader: { | ||
| 116 | + type: Boolean, | ||
| 117 | + default: true, | ||
| 118 | + }, | ||
| 119 | + highlightCurrentRow: { | ||
| 120 | + type: Boolean, | ||
| 121 | + default: true, | ||
| 122 | + }, | ||
| 123 | + lazy: { | ||
| 124 | + type: Boolean, | ||
| 125 | + default: true, | ||
| 126 | + }, | ||
| 127 | + loading: { | ||
| 128 | + type: Boolean, | ||
| 129 | + default: false, | ||
| 130 | + }, | ||
| 131 | + hidden: { | ||
| 132 | + type: Boolean, | ||
| 133 | + default: false, | ||
| 134 | + }, | ||
| 135 | + showOverflowTooltip: { | ||
| 136 | + type: Boolean, | ||
| 137 | + default: true, | ||
| 138 | + }, | ||
| 139 | + shiftKey:{ | ||
| 140 | + type:Boolean, | ||
| 141 | + default:false, | ||
| 142 | + }, | ||
| 143 | + page: { | ||
| 144 | + type: Number, | ||
| 145 | + default: 1, | ||
| 146 | + }, | ||
| 147 | + limitSize: { | ||
| 148 | + type: Number, | ||
| 149 | + default: 20, | ||
| 150 | + }, | ||
| 151 | + limitStart:{ | ||
| 152 | + type:Number, | ||
| 153 | + default:0, | ||
| 154 | + }, | ||
| 155 | + paginationBackground: { | ||
| 156 | + type: Boolean, | ||
| 157 | + default: true, | ||
| 158 | + }, | ||
| 159 | + pageSize: { | ||
| 160 | + type: Number, | ||
| 161 | + default: 20, | ||
| 162 | + }, | ||
| 163 | + totalCount: { | ||
| 164 | + type: Number, | ||
| 165 | + default: 0, | ||
| 166 | + }, | ||
| 167 | + }, | ||
| 168 | + inheritAttrs: false, | ||
| 169 | + data() { | ||
| 170 | + return { | ||
| 171 | + newHeader: [], | ||
| 172 | + selectTable: [], | ||
| 173 | + pageNum: 1, | ||
| 174 | + start:-1, | ||
| 175 | + // { | ||
| 176 | + // type: "selection", | ||
| 177 | + // name: "", | ||
| 178 | + // value: "", | ||
| 179 | + // slot: null, | ||
| 180 | + // width: "", | ||
| 181 | + // align: "center", | ||
| 182 | + // sorTable: false, | ||
| 183 | + // fixed:false, | ||
| 184 | + // }, | ||
| 185 | + }; | ||
| 186 | + }, | ||
| 187 | + created() { | ||
| 188 | + this.newHeader = this.headerData; | ||
| 189 | + }, | ||
| 190 | + mounted() { | ||
| 191 | + | ||
| 192 | + }, | ||
| 193 | + methods: { | ||
| 194 | + nextClick() { | ||
| 195 | + this.$emit('currentChange',{page:this.pageNum + 1,start:this.limitStart + this.limitSize}) | ||
| 196 | + scrollTo(0,800); | ||
| 197 | + }, | ||
| 198 | + prevClick() { | ||
| 199 | + this.$emit('currentChange',{page:this.pageNum - 1,start:this.limitStart - this.limitSiz}) | ||
| 200 | + scrollTo(0,800); | ||
| 201 | + }, | ||
| 202 | + currentChange(val) { | ||
| 203 | + this.$emit('currentChange',{page:val,start: val*this.limitSize+1}); | ||
| 204 | + scrollTo(0,800); | ||
| 205 | + }, | ||
| 206 | + tableSelect(selection, row) { | ||
| 207 | + let end = row.index; | ||
| 208 | + if (this.shiftKey) { | ||
| 209 | + const sum = Math.abs(this.start - end); | ||
| 210 | + const min = Math.min(this.start, end); | ||
| 211 | + let i; | ||
| 212 | + if ( | ||
| 213 | + this.start === -1 && | ||
| 214 | + selection.includes(this.data[row.index]) | ||
| 215 | + ) { | ||
| 216 | + for (i = 0; i < sum; i++) { | ||
| 217 | + this.$refs.tables.toggleRowSelection(this.data[i], true); | ||
| 218 | + this.selectTable.push(this.data[i]); | ||
| 219 | + } | ||
| 220 | + } else if (selection.includes(this.data[row.index])) { | ||
| 221 | + for (i = this.start + 1; i <= end; i++) { | ||
| 222 | + this.$refs.tables.toggleRowSelection(this.data[i], true); | ||
| 223 | + this.selectTable.push(this.data[i]); | ||
| 224 | + } | ||
| 225 | + } else if (!selection.includes(this.data[row.index])) { | ||
| 226 | + this.selectTable.splice(end - 1, sum + 1); | ||
| 227 | + for (i = end; i <= this.start; i++) { | ||
| 228 | + this.$refs.tables.toggleRowSelection(this.data[i], false); | ||
| 229 | + } | ||
| 230 | + } | ||
| 231 | + this.start = end; | ||
| 232 | + } else { | ||
| 233 | + this.start = end; | ||
| 234 | + if (selection.includes(this.data[end])) { | ||
| 235 | + this.selectTable.push(row); | ||
| 236 | + } else { | ||
| 237 | + for (let i = 0; i < this.selectTable.length; i++) { | ||
| 238 | + if (this.selectTable[i].index == row.index) { | ||
| 239 | + this.selectTable.splice(i, 1); | ||
| 240 | + } | ||
| 241 | + } | ||
| 242 | + } | ||
| 243 | + } | ||
| 244 | + selection = this.selectTable | ||
| 245 | + this.$emit("tableSelect", { selection, row }); | ||
| 246 | + }, | ||
| 247 | + tableSelectAll(selection) { | ||
| 248 | + this.$emit("tableSelectAll", selection); | ||
| 249 | + }, | ||
| 250 | + SelectChange(selection) { | ||
| 251 | + this.$emit("SelectChange", selection); | ||
| 252 | + }, | ||
| 253 | + clearTable(){ | ||
| 254 | + this.selectTable = [] | ||
| 255 | + this.$refs.tables.clearSelection() | ||
| 256 | + }, | ||
| 257 | + // itemChange(val) {}, | ||
| 258 | + // checkChange(val) { | ||
| 259 | + // console.log(val); | ||
| 260 | + // }, | ||
| 261 | + // top(val) { | ||
| 262 | + // console.log(val); | ||
| 263 | + // }, | ||
| 264 | + // bottom(val) { | ||
| 265 | + // console.log(val); | ||
| 266 | + // }, | ||
| 267 | + formatter(row, column, cellValue, index) { | ||
| 268 | + if(dictLabels[column.property]){ | ||
| 269 | + if(dictLabels[column.property][cellValue]){ | ||
| 270 | + return dictLabels[column.property][cellValue]; | ||
| 271 | + } | ||
| 272 | + } | ||
| 273 | + return cellValue; | ||
| 274 | + }, | ||
| 275 | + }, | ||
| 276 | +}; | ||
| 277 | +</script> | ||
| 278 | + | ||
| 279 | +<style> | ||
| 280 | +.Tables { | ||
| 281 | + width: 100%; | ||
| 282 | + margin-top: 20px; | ||
| 283 | +} | ||
| 284 | +.tablePagination { | ||
| 285 | + margin-top: 40px; | ||
| 286 | + text-align: right; | ||
| 287 | +} | ||
| 288 | +</style> | ||
| 289 | + |
src/components/Table/info.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="tableInfo"> | ||
| 3 | + <el-dropdown trigger="click" :hide-on-click="false"> | ||
| 4 | + <el-button | ||
| 5 | + type="primary" | ||
| 6 | + icon="el-icon-edit" | ||
| 7 | + size="medium" | ||
| 8 | + circle | ||
| 9 | + ></el-button> | ||
| 10 | + <el-dropdown-menu slot="dropdown"> | ||
| 11 | + <el-checkbox-group v-model="checkList"> | ||
| 12 | + <el-dropdown-item | ||
| 13 | + v-for="(item, index) in infoData" | ||
| 14 | + :key="index" | ||
| 15 | + v-if="!item.type" | ||
| 16 | + class="dropItem" | ||
| 17 | + > | ||
| 18 | + <el-checkbox | ||
| 19 | + :label="item.name" | ||
| 20 | + :checked="true" | ||
| 21 | + @change="checkChange" | ||
| 22 | + ></el-checkbox> | ||
| 23 | + <span class="itemRight"> | ||
| 24 | + <i class="el-icon-caret-top" @click.stop="top(index)"></i> | ||
| 25 | + <i class="el-icon-caret-bottom" @click.stop="bottom(index)"></i> | ||
| 26 | + </span> | ||
| 27 | + </el-dropdown-item> | ||
| 28 | + </el-checkbox-group> | ||
| 29 | + </el-dropdown-menu> | ||
| 30 | + </el-dropdown> | ||
| 31 | + </div> | ||
| 32 | +</template> | ||
| 33 | + | ||
| 34 | +<script> | ||
| 35 | +export default { | ||
| 36 | + props: { infoData: { type: Array, default: null } }, | ||
| 37 | + inheritAttrs: false, | ||
| 38 | + data() { | ||
| 39 | + return { | ||
| 40 | + checkList: [], | ||
| 41 | + }; | ||
| 42 | + }, | ||
| 43 | + methods: { | ||
| 44 | + checkChange(val) { | ||
| 45 | + this.$emit("checkChange", { type: val }); | ||
| 46 | + }, | ||
| 47 | + top(val) { | ||
| 48 | + this.$emit("top", val); | ||
| 49 | + }, | ||
| 50 | + bottom(val) { | ||
| 51 | + this.$emit("bottom", val); | ||
| 52 | + }, | ||
| 53 | + }, | ||
| 54 | + created() {}, | ||
| 55 | +}; | ||
| 56 | +</script> | ||
| 57 | + | ||
| 58 | +<style scope lang="scss"> | ||
| 59 | +.itemRight { | ||
| 60 | + display: -webkit-inline-box; | ||
| 61 | + display: -ms-inline-flexbox; | ||
| 62 | + display: inline-flex; | ||
| 63 | + -webkit-box-orient: vertical; | ||
| 64 | + -webkit-box-direction: normal; | ||
| 65 | + -ms-flex-direction: column; | ||
| 66 | + flex-direction: column; | ||
| 67 | + -webkit-box-align: center; | ||
| 68 | + -ms-flex-align: center; | ||
| 69 | + align-items: center; | ||
| 70 | + height: 34px; | ||
| 71 | + width: 24px; | ||
| 72 | + vertical-align: middle; | ||
| 73 | + cursor: pointer; | ||
| 74 | + overflow: initial; | ||
| 75 | + position: relative; | ||
| 76 | + .el-icon-caret-bottom, | ||
| 77 | + .el-icon-caret-top { | ||
| 78 | + width: 0; | ||
| 79 | + height: 0; | ||
| 80 | + border: solid 5px transparent; | ||
| 81 | + position: absolute; | ||
| 82 | + left: 10px; | ||
| 83 | + } | ||
| 84 | + .el-icon-caret-bottom { | ||
| 85 | + bottom: 12px; | ||
| 86 | + } | ||
| 87 | + .el-icon-caret-top { | ||
| 88 | + top: 5px; | ||
| 89 | + } | ||
| 90 | +} | ||
| 91 | +.dropItem { | ||
| 92 | + display: flex; | ||
| 93 | + justify-content: space-between; | ||
| 94 | +} | ||
| 95 | +</style> | ||
| 96 | + | ||
| 97 | +<style> | ||
| 98 | +.tableInfo { | ||
| 99 | + position: fixed; | ||
| 100 | + right: 30px; | ||
| 101 | + bottom: 40px; | ||
| 102 | + z-index: 99999999; | ||
| 103 | +} | ||
| 104 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/components/Table/item.vue
0 → 100644
| 1 | +<script> | ||
| 2 | +export default { | ||
| 3 | + name: "Item", | ||
| 4 | + inheritAttrs: false, | ||
| 5 | + props: { | ||
| 6 | + dom: { | ||
| 7 | + type: Object, | ||
| 8 | + default: null, | ||
| 9 | + }, | ||
| 10 | + }, | ||
| 11 | + render() { | ||
| 12 | + let newDom = []; | ||
| 13 | + newDom.push(this.dom); | ||
| 14 | + return newDom; | ||
| 15 | + }, | ||
| 16 | + methods: { | ||
| 17 | + change(val){ | ||
| 18 | + this.$emit('change',val) | ||
| 19 | + } | ||
| 20 | + }, | ||
| 21 | +}; | ||
| 22 | +</script> |
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | <div v-if="!item.hidden"> | 2 | <div v-if="!item.hidden"> |
| 3 | <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"> | 3 | <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"> |
| 4 | <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)"> | 4 | <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)"> |
| 5 | - <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> | 5 | + <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}" style="paddingRight:0"> |
| 6 | <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" /> | 6 | <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" /> |
| 7 | </el-menu-item> | 7 | </el-menu-item> |
| 8 | </app-link> | 8 | </app-link> |
| ... | @@ -19,6 +19,7 @@ | ... | @@ -19,6 +19,7 @@ |
| 19 | :item="child" | 19 | :item="child" |
| 20 | :base-path="resolvePath(child.path)" | 20 | :base-path="resolvePath(child.path)" |
| 21 | class="nest-menu" | 21 | class="nest-menu" |
| 22 | + :title="child.meta.title" | ||
| 22 | /> | 23 | /> |
| 23 | </el-submenu> | 24 | </el-submenu> |
| 24 | </div> | 25 | </div> | ... | ... |
| ... | @@ -11,6 +11,7 @@ import App from './App' | ... | @@ -11,6 +11,7 @@ import App from './App' |
| 11 | import store from './store' | 11 | import store from './store' |
| 12 | import router from './router' | 12 | import router from './router' |
| 13 | import permission from './directive/permission' | 13 | import permission from './directive/permission' |
| 14 | +import i18n from './i18n/index' | ||
| 14 | 15 | ||
| 15 | import './assets/icons' // icon | 16 | import './assets/icons' // icon |
| 16 | import './permission' // permission control | 17 | import './permission' // permission control |
| ... | @@ -20,6 +21,7 @@ import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, | ... | @@ -20,6 +21,7 @@ import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, |
| 20 | import Pagination from "@/components/Pagination"; | 21 | import Pagination from "@/components/Pagination"; |
| 21 | // 自定义表格工具扩展 | 22 | // 自定义表格工具扩展 |
| 22 | import RightToolbar from "@/components/RightToolbar" | 23 | import RightToolbar from "@/components/RightToolbar" |
| 24 | +import Table from "@/components/Table" | ||
| 23 | 25 | ||
| 24 | // 全局方法挂载 | 26 | // 全局方法挂载 |
| 25 | //Vue.prototype.getDicts = getDicts | 27 | //Vue.prototype.getDicts = getDicts |
| ... | @@ -47,9 +49,9 @@ Vue.prototype.msgInfo = function (msg) { | ... | @@ -47,9 +49,9 @@ Vue.prototype.msgInfo = function (msg) { |
| 47 | // 全局组件挂载 | 49 | // 全局组件挂载 |
| 48 | Vue.component('Pagination', Pagination) | 50 | Vue.component('Pagination', Pagination) |
| 49 | Vue.component('RightToolbar', RightToolbar) | 51 | Vue.component('RightToolbar', RightToolbar) |
| 52 | +Vue.component('Tables',Table) | ||
| 50 | 53 | ||
| 51 | Vue.use(permission) | 54 | Vue.use(permission) |
| 52 | - | ||
| 53 | /** | 55 | /** |
| 54 | * If you don't want to use mock-server | 56 | * If you don't want to use mock-server |
| 55 | * you want to use MockJs for mock api | 57 | * you want to use MockJs for mock api |
| ... | @@ -71,5 +73,6 @@ new Vue({ | ... | @@ -71,5 +73,6 @@ new Vue({ |
| 71 | el: '#app', | 73 | el: '#app', |
| 72 | router, | 74 | router, |
| 73 | store, | 75 | store, |
| 76 | + i18n, | ||
| 74 | render: h => h(App) | 77 | render: h => h(App) |
| 75 | }) | 78 | }) | ... | ... |
| ... | @@ -174,3 +174,9 @@ export function handleTree(data, id, parentId, children) { | ... | @@ -174,3 +174,9 @@ export function handleTree(data, id, parentId, children) { |
| 174 | } | 174 | } |
| 175 | return tree; | 175 | return tree; |
| 176 | } | 176 | } |
| 177 | + | ||
| 178 | +//字符串英文转大写,;转英文; | ||
| 179 | +export function upCase(str){ | ||
| 180 | + let newStr = str.replace(/;/g,";").toUpperCase(); | ||
| 181 | + return newStr; | ||
| 182 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -8,6 +8,7 @@ const mimeMap = { | ... | @@ -8,6 +8,7 @@ const mimeMap = { |
| 8 | const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器 | 8 | const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器 |
| 9 | // const baseUrl = 'http://47.103.140.98:7001/IMAC2' //阿里云服务器 | 9 | // const baseUrl = 'http://47.103.140.98:7001/IMAC2' //阿里云服务器 |
| 10 | // const baseUrl = 'http://192.168.1.133:7001/IMAC2' //测试服务器 | 10 | // const baseUrl = 'http://192.168.1.133:7001/IMAC2' //测试服务器 |
| 11 | + | ||
| 11 | export function downLoadZip(str, filename) { | 12 | export function downLoadZip(str, filename) { |
| 12 | var url = baseUrl + str | 13 | var url = baseUrl + str |
| 13 | axios({ | 14 | axios({ |
| ... | @@ -44,28 +45,63 @@ export function downLoadZip(str, filename) { | ... | @@ -44,28 +45,63 @@ export function downLoadZip(str, filename) { |
| 44 | // excel导出请求 | 45 | // excel导出请求 |
| 45 | export function downLoadXlsx(str, data,fileName) { | 46 | export function downLoadXlsx(str, data,fileName) { |
| 46 | var url = baseUrl + str | 47 | var url = baseUrl + str |
| 47 | - return new Promise((resolve,rej)=>{ | 48 | + return new Promise((resolve,reject)=>{ |
| 48 | axios({ | 49 | axios({ |
| 49 | method: 'post', | 50 | method: 'post', |
| 50 | url: url, | 51 | url: url, |
| 51 | data: data, | 52 | data: data, |
| 53 | + timeout:500000, | ||
| 52 | responseType: 'blob', | 54 | responseType: 'blob', |
| 53 | headers: { 'Authorization': decodeURIComponent(getToken()) } | 55 | headers: { 'Authorization': decodeURIComponent(getToken()) } |
| 56 | + // headers: { 'Authorization': decodeURIComponent(getToken()) } | ||
| 57 | + //uat环境token需要做url解码处理 | ||
| 54 | }).then(res => { | 58 | }).then(res => { |
| 55 | if (res.status === 200) { | 59 | if (res.status === 200) { |
| 56 | - cargoTableXlsx(res,fileName) | 60 | + downLoadExcal(res,fileName) |
| 57 | } | 61 | } |
| 58 | - resolve() | 62 | + resolve(res) |
| 59 | }).catch((err)=>{ | 63 | }).catch((err)=>{ |
| 60 | - rej(err) | 64 | + reject(err) |
| 61 | }) | 65 | }) |
| 62 | }) | 66 | }) |
| 63 | } | 67 | } |
| 64 | 68 | ||
| 65 | //excel导出下载 | 69 | //excel导出下载 |
| 66 | -export function downLoadExcal(val,fileNames) { | 70 | +export function downLoadExcal(val,filename) { |
| 71 | + const aLink = document.createElement('a') | ||
| 72 | + const fileName = filename+".xlsx" | ||
| 73 | + aLink.href = URL.createObjectURL(val.data) | ||
| 74 | + aLink.setAttribute('download', fileName) // 设置下载文件名称 | ||
| 75 | + document.body.appendChild(aLink) | ||
| 76 | + aLink.click() | ||
| 77 | + document.body.removeChild(aLink); | ||
| 78 | +} | ||
| 79 | + | ||
| 80 | +//航班预审导出 | ||
| 81 | +export function cargoXlsxPre(str, data) { | ||
| 82 | + var url = baseUrl + str | ||
| 83 | + return new Promise((resolve,reject)=>{ | ||
| 84 | + axios({ | ||
| 85 | + method: 'post', | ||
| 86 | + url: url, | ||
| 87 | + data: data, | ||
| 88 | + responseType: 'blob', | ||
| 89 | + headers: { 'Authorization': decodeURIComponent(getToken()) } | ||
| 90 | + }).then(res => { | ||
| 91 | + if (res.status === 200) { | ||
| 92 | + cargoTableXlsxPre(res) | ||
| 93 | + } | ||
| 94 | + resolve() | ||
| 95 | + }).catch((err)=>{ | ||
| 96 | + reject(err) | ||
| 97 | + }) | ||
| 98 | + }) | ||
| 99 | +} | ||
| 100 | + | ||
| 101 | +//航班预审导出 | ||
| 102 | +export function cargoTableXlsxPre(val) { | ||
| 67 | const aLink = document.createElement('a') | 103 | const aLink = document.createElement('a') |
| 68 | - const fileName = fileNames+".xlsx" | 104 | + const fileName = "航班预审表.xlsx" |
| 69 | aLink.href = URL.createObjectURL(val.data) | 105 | aLink.href = URL.createObjectURL(val.data) |
| 70 | aLink.setAttribute('download', fileName) // 设置下载文件名称 | 106 | aLink.setAttribute('download', fileName) // 设置下载文件名称 |
| 71 | document.body.appendChild(aLink) | 107 | document.body.appendChild(aLink) | ... | ... |
This diff is collapsed. Click to expand it.
| 1 | +<template> | ||
| 2 | + <div> | ||
| 3 | + <el-dialog | ||
| 4 | + title="货物配舱" | ||
| 5 | + width="80%" | ||
| 6 | + :visible.sync="dialogVisible" | ||
| 7 | + :close-on-click-modal="false" | ||
| 8 | + :append-to-body="true" | ||
| 9 | + > | ||
| 10 | + <el-divider content-position="left">已选货物信息</el-divider> | ||
| 11 | + <el-table | ||
| 12 | + :data="tableData" | ||
| 13 | + size="mini" | ||
| 14 | + height="200" | ||
| 15 | + max-height="200" | ||
| 16 | + border | ||
| 17 | + stripe | ||
| 18 | + highlight-current-row | ||
| 19 | + style="width: 100%" | ||
| 20 | + > | ||
| 21 | + <el-table-column type="index" label="序号" align="center"> | ||
| 22 | + </el-table-column> | ||
| 23 | + <el-table-column | ||
| 24 | + v-for="(item, index) in cargoHeader" | ||
| 25 | + header-align="center" | ||
| 26 | + align="center" | ||
| 27 | + :prop="item.value" | ||
| 28 | + :label="item.name" | ||
| 29 | + :key="index" | ||
| 30 | + :show-overflow-tooltip="true" | ||
| 31 | + > | ||
| 32 | + </el-table-column> | ||
| 33 | + </el-table> | ||
| 34 | + <el-form | ||
| 35 | + ref="form" | ||
| 36 | + label-position="right" | ||
| 37 | + label-width="auto" | ||
| 38 | + style="width: 400px; margin: 30px auto" | ||
| 39 | + > | ||
| 40 | + <el-form-item label="航班号" prop="fltNo"> | ||
| 41 | + <el-input | ||
| 42 | + v-model="fltNo" | ||
| 43 | + size="medium" | ||
| 44 | + placeholder="请输入航班号" | ||
| 45 | + style="width: 350px" | ||
| 46 | + ></el-input> | ||
| 47 | + </el-form-item> | ||
| 48 | + <el-form-item label="航班日期:" prop="fltDate"> | ||
| 49 | + <el-date-picker | ||
| 50 | + v-model="formData.fltDate" | ||
| 51 | + type="date" | ||
| 52 | + placeholder="选择日期" | ||
| 53 | + value-format="yyyy-MM-dd" | ||
| 54 | + size="medium" | ||
| 55 | + style="width: 350px" | ||
| 56 | + > | ||
| 57 | + </el-date-picker> | ||
| 58 | + </el-form-item> | ||
| 59 | + </el-form> | ||
| 60 | + <div slot="footer"> | ||
| 61 | + <el-button @click="dialogBeforeClose">取 消</el-button> | ||
| 62 | + <el-button type="primary" @click="submit">确 定</el-button> | ||
| 63 | + </div> | ||
| 64 | + </el-dialog> | ||
| 65 | + </div> | ||
| 66 | +</template> | ||
| 67 | + | ||
| 68 | +<script> | ||
| 69 | +import { allocationFlight } from "@/api/cargoSelect"; | ||
| 70 | +export default { | ||
| 71 | + props: { | ||
| 72 | + dialogVisible: { | ||
| 73 | + type: Boolean, | ||
| 74 | + default: false, | ||
| 75 | + }, | ||
| 76 | + tableData: { | ||
| 77 | + type: Array, | ||
| 78 | + default: null, | ||
| 79 | + }, | ||
| 80 | + }, | ||
| 81 | + data() { | ||
| 82 | + return { | ||
| 83 | + formData: { | ||
| 84 | + ids:[], | ||
| 85 | + fltNo: undefined, | ||
| 86 | + fltDate:undefined, | ||
| 87 | + overweight:false | ||
| 88 | + }, | ||
| 89 | + cargoHeader: [ | ||
| 90 | + { name: "口岸代码", value: "portName" }, | ||
| 91 | + { name: "运单号", value: "waybillNo" }, | ||
| 92 | + { name: "货物状态", value: "statusName" }, | ||
| 93 | + { name: "站点", value: "siteName" }, | ||
| 94 | + { name: "申报类型", value: "typeName" }, | ||
| 95 | + { name: "URSA", value: "ursa" }, | ||
| 96 | + { name: "实际重量", value: "actualWeight" }, | ||
| 97 | + { name: "件数", value: "qty" }, | ||
| 98 | + { name: "品名描述", value: "nameDescription" }, | ||
| 99 | + { name: "是否自动", value: "cargoRulesStatus" }, | ||
| 100 | + { name: "创建人", value: "createUserName" }, | ||
| 101 | + { name: "创建时间", value: "createTime" }, | ||
| 102 | + ], | ||
| 103 | + fltHeader: [ | ||
| 104 | + { name: "航班日期", value: "fltDate" }, | ||
| 105 | + { name: "航班号", value: "fltNo" }, | ||
| 106 | + { name: "航班路线", value: "route" }, | ||
| 107 | + { name: "航班类型", value: "typeName" }, | ||
| 108 | + { name: "总重量", value: "totalWeight" }, | ||
| 109 | + { name: "额外增重百分比", value: "extraWeightPercent" }, | ||
| 110 | + { name: "已配重量", value: "alloctedWeight" }, | ||
| 111 | + { name: "配舱优先级", value: "priorityRuleName" }, | ||
| 112 | + { name: "是否开启高地价", value: "highLowPriceFlg" }, | ||
| 113 | + { name: "航班起飞时间", value: "takeOffTime" }, | ||
| 114 | + { name: "创建人", value: "createUserName" }, | ||
| 115 | + { name: "创建时间", value: "createTime" }, | ||
| 116 | + ], | ||
| 117 | + rules:{ | ||
| 118 | + fltNo: [{ | ||
| 119 | + required: true, | ||
| 120 | + message: "航班号不能为空", | ||
| 121 | + trigger: "blur" | ||
| 122 | + }], | ||
| 123 | + fltDate: [{ | ||
| 124 | + required: true, | ||
| 125 | + message: "航班日期不能为空", | ||
| 126 | + trigger: "change" | ||
| 127 | + }], | ||
| 128 | + } | ||
| 129 | + }; | ||
| 130 | + }, | ||
| 131 | + methods: { | ||
| 132 | + //确定配舱 | ||
| 133 | + submit() { | ||
| 134 | + let arr = []; | ||
| 135 | + this.tableData.forEach(item => { | ||
| 136 | + arr.push(item.id) | ||
| 137 | + }); | ||
| 138 | + this.formData.ids = arr; | ||
| 139 | + if(this.formData.fltNo && this.formData.fltDate){ | ||
| 140 | + allocationFlight(this.formData).then(res=>{//code 200 配舱成功 601 重量已满需要确认 其余code直接输出msg | ||
| 141 | + if(code === 200){ | ||
| 142 | + this.$message({ | ||
| 143 | + message: "货物配舱成功", | ||
| 144 | + type: "success", | ||
| 145 | + }); | ||
| 146 | + }else if(code === 601){ | ||
| 147 | + this.$confirm('航班配重已满,是否继续配舱?', '提示', { | ||
| 148 | + confirmButtonText: '确定', | ||
| 149 | + cancelButtonText: '取消', | ||
| 150 | + type: 'warning' | ||
| 151 | + }).then(() => { | ||
| 152 | + this.formData.overweight = true;//确定继续overweight变为true再次请求接口 | ||
| 153 | + allocationFlight(this.formData).then(res=>{ | ||
| 154 | + if(code === 200){ | ||
| 155 | + this.$message({ | ||
| 156 | + message: "货物配舱成功", | ||
| 157 | + type: "success", | ||
| 158 | + }); | ||
| 159 | + this.$emit("dialogBeforeClose", {close:false,reload:false}); | ||
| 160 | + }else{ | ||
| 161 | + this.$message({ | ||
| 162 | + message: res.msg, | ||
| 163 | + type: "warning", | ||
| 164 | + }); | ||
| 165 | + } | ||
| 166 | + }) | ||
| 167 | + }).catch(() => {//取消 取消当前配舱 | ||
| 168 | + this.$message({ | ||
| 169 | + message: "配舱已取消", | ||
| 170 | + type: "success", | ||
| 171 | + }); | ||
| 172 | + this.$emit("dialogBeforeClose", {close:false,reload:false}); | ||
| 173 | + }); | ||
| 174 | + }else{ | ||
| 175 | + this.$message({ | ||
| 176 | + message: res.msg, | ||
| 177 | + type: "warning", | ||
| 178 | + }); | ||
| 179 | + } | ||
| 180 | + this.$emit("dialogBeforeClose", {close:false,reload:true}); | ||
| 181 | + }) | ||
| 182 | + }else{ | ||
| 183 | + this.$message({ | ||
| 184 | + message: "航班号或航班日期不能为空", | ||
| 185 | + type: "warning", | ||
| 186 | + }); | ||
| 187 | + } | ||
| 188 | + }, | ||
| 189 | + dialogBeforeClose() { | ||
| 190 | + this.$emit("dialogBeforeClose", {close:false,reload:false}); | ||
| 191 | + }, | ||
| 192 | + }, | ||
| 193 | + computed: { | ||
| 194 | + fltNo: { | ||
| 195 | + get: function () { | ||
| 196 | + return this.formData.fltNo; | ||
| 197 | + }, | ||
| 198 | + set: function (val) { | ||
| 199 | + this.formData.fltNo = val.toUpperCase(); | ||
| 200 | + }, | ||
| 201 | + }, | ||
| 202 | + }, | ||
| 203 | +}; | ||
| 204 | +</script> | ||
| 205 | + | ||
| 206 | +<style> | ||
| 207 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -6,7 +6,7 @@ | ... | @@ -6,7 +6,7 @@ |
| 6 | <el-row :gutter="20"> | 6 | <el-row :gutter="20"> |
| 7 | <el-col :span="8"> | 7 | <el-col :span="8"> |
| 8 | <el-form-item label="航班号" prop="purposeOfFlightNo"> | 8 | <el-form-item label="航班号" prop="purposeOfFlightNo"> |
| 9 | - <el-input v-model.trim="form.purposeOfFlightNo" style="width: 30%" :disabled="nameDisabled"></el-input> | 9 | + <el-input v-model.trim="form.purposeOfFlightNo" style="width: 50%" :disabled="nameDisabled"></el-input> |
| 10 | </el-form-item> | 10 | </el-form-item> |
| 11 | </el-col> | 11 | </el-col> |
| 12 | <el-col :span="12"> | 12 | <el-col :span="12"> |
| ... | @@ -100,8 +100,12 @@ | ... | @@ -100,8 +100,12 @@ |
| 100 | <el-form-item label="申报类别"> | 100 | <el-form-item label="申报类别"> |
| 101 | <el-card shadow="never" style="width: 70%"> | 101 | <el-card shadow="never" style="width: 70%"> |
| 102 | <el-checkbox-group v-model="form.typeOfGoods"> | 102 | <el-checkbox-group v-model="form.typeOfGoods"> |
| 103 | - <el-checkbox v-for="item in cargoType" :key="item.id" :label="item.chineseName" :name="item.chineseName"> | 103 | + <el-row> |
| 104 | - </el-checkbox> | 104 | + <el-col :span="2" v-for="item in cargoType" :key="item.id"> |
| 105 | + <el-checkbox :label="item.chineseName" :name="item.chineseName"> | ||
| 106 | + </el-checkbox> | ||
| 107 | + </el-col> | ||
| 108 | + </el-row> | ||
| 105 | </el-checkbox-group> | 109 | </el-checkbox-group> |
| 106 | </el-card> | 110 | </el-card> |
| 107 | </el-form-item> | 111 | </el-form-item> |
| ... | @@ -109,8 +113,11 @@ | ... | @@ -109,8 +113,11 @@ |
| 109 | <el-form-item label="货物类型"> | 113 | <el-form-item label="货物类型"> |
| 110 | <el-card shadow="never" style="width: 70%"> | 114 | <el-card shadow="never" style="width: 70%"> |
| 111 | <el-checkbox-group v-model="form.declarationCategory"> | 115 | <el-checkbox-group v-model="form.declarationCategory"> |
| 112 | - <el-checkbox v-for="item in cargoStatus" :key="item.id" :label="item.chineseName" :name="item.chineseName" | 116 | + <el-row> |
| 113 | - disabled></el-checkbox> | 117 | + <el-col :span="3" v-for="item in cargoStatus" :key="item.id"> |
| 118 | + <el-checkbox :label="item.chineseName" :name="item.chineseName" disabled></el-checkbox> | ||
| 119 | + </el-col> | ||
| 120 | + </el-row> | ||
| 114 | </el-checkbox-group> | 121 | </el-checkbox-group> |
| 115 | </el-card> | 122 | </el-card> |
| 116 | </el-form-item> | 123 | </el-form-item> |
| ... | @@ -118,8 +125,11 @@ | ... | @@ -118,8 +125,11 @@ |
| 118 | <el-form-item label="Service Code"> | 125 | <el-form-item label="Service Code"> |
| 119 | <el-card shadow="never" style="width: 70%"> | 126 | <el-card shadow="never" style="width: 70%"> |
| 120 | <el-checkbox-group v-model="form.serviceCode"> | 127 | <el-checkbox-group v-model="form.serviceCode"> |
| 121 | - <el-checkbox v-for="item in serviceCode" :key="item.id" :label="item.englishName" | 128 | + <el-row> |
| 122 | - :name="item.englishName"></el-checkbox> | 129 | + <el-col :span="2" v-for="item in serviceCode" :key="item.id"> |
| 130 | + <el-checkbox :label="item.englishName" :name="item.englishName"></el-checkbox> | ||
| 131 | + </el-col> | ||
| 132 | + </el-row> | ||
| 123 | </el-checkbox-group> | 133 | </el-checkbox-group> |
| 124 | </el-card> | 134 | </el-card> |
| 125 | </el-form-item> | 135 | </el-form-item> |
| ... | @@ -127,8 +137,11 @@ | ... | @@ -127,8 +137,11 @@ |
| 127 | <el-form-item label="Handling Code"> | 137 | <el-form-item label="Handling Code"> |
| 128 | <el-card shadow="never" style="width: 70%"> | 138 | <el-card shadow="never" style="width: 70%"> |
| 129 | <el-checkbox-group v-model="form.handlingCode"> | 139 | <el-checkbox-group v-model="form.handlingCode"> |
| 130 | - <el-checkbox v-for="item in handlingCode" :key="item.id" :label="item.englishName" | 140 | + <el-row> |
| 131 | - :name="item.englishName"></el-checkbox> | 141 | + <el-col :span="3" v-for="item in handlingCode" :key="item.id"> |
| 142 | + <el-checkbox :label="item.englishName" :name="item.englishName"></el-checkbox> | ||
| 143 | + </el-col> | ||
| 144 | + </el-row> | ||
| 132 | </el-checkbox-group> | 145 | </el-checkbox-group> |
| 133 | </el-card> | 146 | </el-card> |
| 134 | </el-form-item> | 147 | </el-form-item> |
| ... | @@ -136,22 +149,27 @@ | ... | @@ -136,22 +149,27 @@ |
| 136 | <el-form-item label="Sub Category"> | 149 | <el-form-item label="Sub Category"> |
| 137 | <el-card shadow="never" style="width: 70%"> | 150 | <el-card shadow="never" style="width: 70%"> |
| 138 | <el-checkbox-group v-model="form.subCategory"> | 151 | <el-checkbox-group v-model="form.subCategory"> |
| 139 | - <el-checkbox v-for="item in subCategory" :key="item.id" :label="item.englishName" | 152 | + <el-row> |
| 140 | - :name="item.englishName"></el-checkbox> | 153 | + <el-col :span="3" v-for="item in subCategory" :key="item.id"> |
| 154 | + <el-checkbox :label="item.englishName" :name="item.englishName"></el-checkbox> | ||
| 155 | + </el-col> | ||
| 156 | + </el-row> | ||
| 141 | </el-checkbox-group> | 157 | </el-checkbox-group> |
| 142 | </el-card> | 158 | </el-card> |
| 143 | </el-form-item> | 159 | </el-form-item> |
| 144 | 160 | ||
| 145 | - | 161 | + <el-form-item> |
| 162 | + | ||
| 163 | + </el-form-item> | ||
| 146 | </el-form> | 164 | </el-form> |
| 147 | - <el-row style="margin-left: 200px"> | 165 | + <div style="marginLeft:200px"> |
| 148 | <el-button type="primary" size="small" v-if="$route.params.handle != 'detail'" @click="submit('form')" | 166 | <el-button type="primary" size="small" v-if="$route.params.handle != 'detail'" @click="submit('form')" |
| 149 | - :loading="btnLoading"> | 167 | + :loading="btnLoading"> |
| 150 | - <span v-if="$route.params.handle === 'add'">添加</span> | 168 | + <span v-if="$route.params.handle === 'add'">添加</span> |
| 151 | - <span v-else>保存</span> | 169 | + <span v-else>保存</span> |
| 152 | - </el-button> | 170 | + </el-button> |
| 153 | - <el-button size="small" @click="close">取消</el-button> | 171 | + <el-button size="small" @click="close">取消</el-button> |
| 154 | - </el-row> | 172 | + </div> |
| 155 | </template> | 173 | </template> |
| 156 | </div> | 174 | </div> |
| 157 | </template> | 175 | </template> | ... | ... |
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + <el-form class="form-header" :model="queryParams" label-position="right" label-width="auto" size="medium"> | ||
| 4 | + <el-row> | ||
| 5 | + <el-col :span="6"> | ||
| 6 | + <el-form-item label="航班日期从" prop="fltDateStart"> | ||
| 7 | + <el-date-picker | ||
| 8 | + value-format="yyyy-MM-dd" | ||
| 9 | + class="formItem" | ||
| 10 | + v-model="queryParams.fltDateStart" | ||
| 11 | + type="date" | ||
| 12 | + placeholder="选择日期" | ||
| 13 | + > | ||
| 14 | + </el-date-picker> | ||
| 15 | + </el-form-item> | ||
| 16 | + </el-col> | ||
| 17 | + <el-col :span="6"> | ||
| 18 | + <el-form-item label="到" prop="fltDateEnd"> | ||
| 19 | + <el-date-picker | ||
| 20 | + value-format="yyyy-MM-dd" | ||
| 21 | + class="formItem" | ||
| 22 | + v-model="queryParams.fltDateEnd" | ||
| 23 | + type="date" | ||
| 24 | + placeholder="选择日期" | ||
| 25 | + > | ||
| 26 | + </el-date-picker> | ||
| 27 | + </el-form-item> | ||
| 28 | + </el-col> | ||
| 29 | + <el-col :span="6"> | ||
| 30 | + <el-form-item label="航班号"> | ||
| 31 | + <el-input | ||
| 32 | + type="textarea" | ||
| 33 | + v-model="fltNo" | ||
| 34 | + clearable | ||
| 35 | + class="formItem" | ||
| 36 | + placeholder="AC001;AC002" | ||
| 37 | + rows="1" | ||
| 38 | + > | ||
| 39 | + </el-input> | ||
| 40 | + </el-form-item> | ||
| 41 | + </el-col> | ||
| 42 | + <el-col :span="6"> | ||
| 43 | + <el-form-item label="运单号"> | ||
| 44 | + <el-input | ||
| 45 | + clearable | ||
| 46 | + type="textarea" | ||
| 47 | + v-model="queryParams.waybillNo" | ||
| 48 | + class="formItem" | ||
| 49 | + placeholder="请输入运单号(回车间隔)" | ||
| 50 | + rows="1" | ||
| 51 | + ></el-input> | ||
| 52 | + </el-form-item> | ||
| 53 | + </el-col> | ||
| 54 | + <el-col :span="6"> | ||
| 55 | + <el-form-item label="站点"> | ||
| 56 | + <el-input | ||
| 57 | + type="textarea" | ||
| 58 | + v-model="siteName" | ||
| 59 | + class="formItem" | ||
| 60 | + placeholder="PVG;PEK" | ||
| 61 | + clearable | ||
| 62 | + rows="1" | ||
| 63 | + > | ||
| 64 | + </el-input> | ||
| 65 | + </el-form-item> | ||
| 66 | + </el-col> | ||
| 67 | + <el-col :span="6"> | ||
| 68 | + <el-form-item label="URSA"> | ||
| 69 | + <el-input | ||
| 70 | + clearable | ||
| 71 | + type="textarea" | ||
| 72 | + v-model="ursa" | ||
| 73 | + class="formItem" | ||
| 74 | + placeholder="S_;P_;E2" | ||
| 75 | + rows="1" | ||
| 76 | + > | ||
| 77 | + </el-input> | ||
| 78 | + </el-form-item> | ||
| 79 | + </el-col> | ||
| 80 | + <el-col :span="24"> | ||
| 81 | + <el-switch | ||
| 82 | + v-model="queryParams.reExport" | ||
| 83 | + active-color="#13ce66" | ||
| 84 | + active-text="重新导出" | ||
| 85 | + style="padding-left: 35px" | ||
| 86 | + > | ||
| 87 | + </el-switch> | ||
| 88 | + </el-col> | ||
| 89 | + </el-row> | ||
| 90 | + <div style="margin-top:25px"> | ||
| 91 | + <el-button | ||
| 92 | + type="primary" | ||
| 93 | + icon="el-icon-search" | ||
| 94 | + size="mini" | ||
| 95 | + @click="handleQuery" | ||
| 96 | + >搜索</el-button | ||
| 97 | + > | ||
| 98 | + <el-button | ||
| 99 | + type="warning" | ||
| 100 | + :disabled="tableData.length == 0" | ||
| 101 | + @click="xlse()" | ||
| 102 | + :loading="downLoadingTip.downloading" | ||
| 103 | + icon="el-icon-download" | ||
| 104 | + size="mini" | ||
| 105 | + >{{ | ||
| 106 | + downLoadingTip.downloading ? downLoadingTip.tip : "导出" | ||
| 107 | + }}</el-button | ||
| 108 | + > | ||
| 109 | + </div> | ||
| 110 | + | ||
| 111 | + </el-form> | ||
| 112 | + | ||
| 113 | + <el-table | ||
| 114 | + max-height="500" | ||
| 115 | + highlight-current-row | ||
| 116 | + border | ||
| 117 | + stripe | ||
| 118 | + v-loading="loading" | ||
| 119 | + :data="tableData" | ||
| 120 | + > | ||
| 121 | + <el-table-column | ||
| 122 | + label="运单号" | ||
| 123 | + align="center" | ||
| 124 | + prop="waybillNo" | ||
| 125 | + width="120" | ||
| 126 | + /> | ||
| 127 | + <el-table-column | ||
| 128 | + label="品牌描述" | ||
| 129 | + align="center" | ||
| 130 | + prop="nameDescription" | ||
| 131 | + width="120" | ||
| 132 | + /> | ||
| 133 | + <el-table-column | ||
| 134 | + label="航班日期" | ||
| 135 | + align="center" | ||
| 136 | + prop="fltDate" | ||
| 137 | + width="130" | ||
| 138 | + /> | ||
| 139 | + <el-table-column label="航班号" align="center" prop="fltNo" /> | ||
| 140 | + <el-table-column | ||
| 141 | + label="航班路线" | ||
| 142 | + align="center" | ||
| 143 | + prop="route" | ||
| 144 | + width="150" | ||
| 145 | + /> | ||
| 146 | + <el-table-column | ||
| 147 | + label="配置航班类型" | ||
| 148 | + align="center" | ||
| 149 | + prop="kindName" | ||
| 150 | + width="130" | ||
| 151 | + /> | ||
| 152 | + <el-table-column label="尺寸" align="center" prop="sizeStr" /> | ||
| 153 | + <el-table-column label="件数" align="center" prop="qty" /> | ||
| 154 | + <el-table-column label="实际重量" align="center" prop="actualWeight" /> | ||
| 155 | + <el-table-column | ||
| 156 | + label="创建时间" | ||
| 157 | + align="center" | ||
| 158 | + prop="createTime" | ||
| 159 | + width="180" | ||
| 160 | + /> | ||
| 161 | + </el-table> | ||
| 162 | + <pagination | ||
| 163 | + v-show="total > 0" | ||
| 164 | + :total="total" | ||
| 165 | + layout=" prev, pager, next, jumper, sizes,total" | ||
| 166 | + :page.sync="queryParams.pageNum" | ||
| 167 | + :limit.sync="queryParams.limitSize" | ||
| 168 | + @pagination="findAllFltData" | ||
| 169 | + /> | ||
| 170 | + </div> | ||
| 171 | +</template> | ||
| 172 | + | ||
| 173 | +<script> | ||
| 174 | +import { findCagroPreData } from "@/api/cargoSelect"; | ||
| 175 | +import { cargoXlsxPre } from "@/utils/zipdownload"; | ||
| 176 | +export default { | ||
| 177 | + name: "caExportPreQualification", | ||
| 178 | + data() { | ||
| 179 | + return { | ||
| 180 | + //导出 | ||
| 181 | + downLoadingTip: { | ||
| 182 | + tip: "", | ||
| 183 | + downloading: false, | ||
| 184 | + }, | ||
| 185 | + tableData: [], //表格数据 | ||
| 186 | + // 遮罩层 | ||
| 187 | + loading: false, | ||
| 188 | + // 弹出层标题 | ||
| 189 | + title: "", | ||
| 190 | + // 总条数 | ||
| 191 | + total: 0, | ||
| 192 | + // 原航班规则数据 | ||
| 193 | + findAllFltDatList: [], | ||
| 194 | + // 新增修改查看规则弹出层 | ||
| 195 | + open: false, | ||
| 196 | + // 查询参数 | ||
| 197 | + queryParams: { | ||
| 198 | + limitStart: 0, //当前条数【代表第几条数据 +1开始】 | ||
| 199 | + pageNum: 1, | ||
| 200 | + limitSize: 20, //一页显示多少条数据 | ||
| 201 | + fltDateStart: undefined, //航班日期开始 | ||
| 202 | + fltDateEnd: undefined, //航班日期结束 | ||
| 203 | + reExport: false, | ||
| 204 | + //航班号 | ||
| 205 | + fltNo: null, | ||
| 206 | + //运单号 | ||
| 207 | + waybillNo: "", | ||
| 208 | + //站点 | ||
| 209 | + siteName: "", | ||
| 210 | + //ursa | ||
| 211 | + ursa: "", | ||
| 212 | + }, | ||
| 213 | + // 表单校验 | ||
| 214 | + rules: {}, | ||
| 215 | + }; | ||
| 216 | + }, | ||
| 217 | + created() {}, | ||
| 218 | + methods: { | ||
| 219 | + // 导出表格 | ||
| 220 | + xlse() { | ||
| 221 | + this.downLoadingTip.downloading = true; | ||
| 222 | + this.downLoadingTip.tip = "正在导出结果集请耐心等待"; | ||
| 223 | + let cargoXlse = { title: "航班预审表", cargoExportPreQueryDto: {} }; | ||
| 224 | + cargoXlse.cargoExportPreQueryDto = JSON.parse( | ||
| 225 | + JSON.stringify(this.queryParams) | ||
| 226 | + ); | ||
| 227 | + cargoXlse.cargoExportPreQueryDto.limitStart = 0; | ||
| 228 | + cargoXlse.cargoExportPreQueryDto.limitSize = -1; | ||
| 229 | + cargoXlsxPre("/cargo/excelPre", cargoXlse) | ||
| 230 | + .then(() => { | ||
| 231 | + this.downLoadingTip.downloading = false; | ||
| 232 | + this.downLoadingTip.tip = ""; | ||
| 233 | + this.progress = 100; | ||
| 234 | + }) | ||
| 235 | + .catch(() => { | ||
| 236 | + this.downLoadingTip.downloading = false; | ||
| 237 | + this.downLoadingTip.tip = ""; | ||
| 238 | + }); | ||
| 239 | + }, | ||
| 240 | + | ||
| 241 | + /** 搜索按钮操作 */ | ||
| 242 | + handleQuery() { | ||
| 243 | + this.queryParams.pageNum = 1; | ||
| 244 | + this.queryParams.start = 0; | ||
| 245 | + this.findAllFltData(); | ||
| 246 | + }, | ||
| 247 | + /** 预审信息查寻*/ | ||
| 248 | + findAllFltData() { | ||
| 249 | + this.loading = true; | ||
| 250 | + if (this.queryParams.pageNum > 1) { | ||
| 251 | + this.queryParams.limitStart = | ||
| 252 | + (this.queryParams.pageNum - 1) * this.queryParams.limitSize; | ||
| 253 | + } else { | ||
| 254 | + this.queryParams.limitStart = 0; | ||
| 255 | + } | ||
| 256 | + findCagroPreData(this.queryParams).then((response) => { | ||
| 257 | + if (response.code == 200) { | ||
| 258 | + this.tableData = response.data.list; | ||
| 259 | + this.total = response.data.totalCount; | ||
| 260 | + this.loading = false; | ||
| 261 | + } else { | ||
| 262 | + this.msgError(response.msg); | ||
| 263 | + } | ||
| 264 | + }); | ||
| 265 | + }, | ||
| 266 | + }, | ||
| 267 | + computed: { | ||
| 268 | + fltNo: { | ||
| 269 | + get: function () { | ||
| 270 | + return this.queryParams.fltNo; | ||
| 271 | + }, | ||
| 272 | + set: function (val) { | ||
| 273 | + this.queryParams.fltNo = val.toUpperCase(); | ||
| 274 | + }, | ||
| 275 | + }, | ||
| 276 | + siteName: { | ||
| 277 | + get: function () { | ||
| 278 | + return this.queryParams.siteName; | ||
| 279 | + }, | ||
| 280 | + set: function (val) { | ||
| 281 | + this.queryParams.siteName = val.toUpperCase(); | ||
| 282 | + }, | ||
| 283 | + }, | ||
| 284 | + ursa: { | ||
| 285 | + get: function () { | ||
| 286 | + return this.queryParams.ursa; | ||
| 287 | + }, | ||
| 288 | + set: function (val) { | ||
| 289 | + this.queryParams.ursa = val.toUpperCase(); | ||
| 290 | + }, | ||
| 291 | + }, | ||
| 292 | + }, | ||
| 293 | +}; | ||
| 294 | +</script> | ||
| 295 | + | ||
| 296 | +<style scoped> | ||
| 297 | +.tips { | ||
| 298 | + float: right; | ||
| 299 | + color: #606266; | ||
| 300 | + font-size: 14px; | ||
| 301 | + margin-right: 40px; | ||
| 302 | +} | ||
| 303 | +</style> |
| 1 | +<template> | ||
| 2 | + <div style="margin: 20px"> | ||
| 3 | + <el-form :inline="true" :model="form" class="demo-form-inline" size="small"> | ||
| 4 | + <el-form-item> | ||
| 5 | + <el-upload action="/caPreReviewImport/importFlight" name="file" :http-request="uploadExcel" | ||
| 6 | + :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" | ||
| 7 | + class="upload-demo"> | ||
| 8 | + <el-button type="primary">点击上传</el-button> | ||
| 9 | + </el-upload> | ||
| 10 | + </el-form-item> | ||
| 11 | + <el-form-item> | ||
| 12 | + <el-button type="primary" @click="downloadTempleate">下载模板</el-button> | ||
| 13 | + </el-form-item> | ||
| 14 | + </el-form> | ||
| 15 | + <div style="font-size: 12px; font-weight: 700"> | ||
| 16 | + 提示:<span style="color: #0000ff">以下为所提交的数据或出错信息</span> | ||
| 17 | + </div> | ||
| 18 | + <el-table ref="filterTable" :data="tableData" v-loading="loading" style="width: 100%; margin-top: 20px" size="small" border> | ||
| 19 | + <el-table-column label="行号" prop="line" fixed width="50" align="center"> | ||
| 20 | + </el-table-column> | ||
| 21 | + <el-table-column label="错误信息" prop="errorMessage" fixed width="300"> | ||
| 22 | + <template slot-scope="scope"> | ||
| 23 | + <div v-for="(m, key) in scope.row.errorMessage" :key="key"> | ||
| 24 | + {{ m }} | ||
| 25 | + </div> | ||
| 26 | + </template> | ||
| 27 | + </el-table-column> | ||
| 28 | + <el-table-column v-if="tableData.length == 0"></el-table-column> | ||
| 29 | + <el-table-column v-if="tableData.length > 0" label="运单号" align="center" prop="A" /> | ||
| 30 | + <el-table-column v-if="tableData.length > 0" label="品名描述" align="center" prop="B" /> | ||
| 31 | + <el-table-column v-if="tableData.length > 0" label="航班日期" align="center" prop="C" /> | ||
| 32 | + <el-table-column v-if="tableData.length > 0" label="航班号" align="center" prop="D" /> | ||
| 33 | + <el-table-column v-if="tableData.length > 0" label="预审意见" align="center" prop="E" /> | ||
| 34 | + <!-- <el-table-column v-for="(value, key) in this.tableData[0]" :key="key" | ||
| 35 | + v-if="key != 'errorMessage' && key != 'line'" :label="key" :prop="key" width="120"></el-table-column>--> | ||
| 36 | + </el-table> | ||
| 37 | + </div> | ||
| 38 | +</template> | ||
| 39 | +</div> | ||
| 40 | +</template> | ||
| 41 | +<script> | ||
| 42 | + import { | ||
| 43 | + downLoadTemplate, | ||
| 44 | + importcaPreReview, | ||
| 45 | + } from "@/api/caPreReviewImport"; | ||
| 46 | + export default { | ||
| 47 | + data() { | ||
| 48 | + return { | ||
| 49 | + // 遮罩层 | ||
| 50 | + loading: false, | ||
| 51 | + flightType: [], | ||
| 52 | + form: { | ||
| 53 | + type: "", | ||
| 54 | + region: "", | ||
| 55 | + }, | ||
| 56 | + fileList: [], | ||
| 57 | + tableData: [], | ||
| 58 | + }; | ||
| 59 | + }, | ||
| 60 | + methods: { | ||
| 61 | + downloadTempleate() { | ||
| 62 | + | ||
| 63 | + let fileName = "航班预审导入模板.xlsx"; | ||
| 64 | + downLoadTemplate().then((res) => { | ||
| 65 | + if (res) { | ||
| 66 | + const blob = new Blob([res]); | ||
| 67 | + const link = document.createElement("a"); //创建a标签 | ||
| 68 | + link.download = fileName; //a标签添加属性 | ||
| 69 | + link.style.display = "none"; | ||
| 70 | + link.href = URL.createObjectURL(blob); | ||
| 71 | + document.body.appendChild(link); | ||
| 72 | + link.click(); //执行下载 | ||
| 73 | + URL.revokeObjectURL(link.href); //释放url | ||
| 74 | + document.body.removeChild(link); //释放标签 | ||
| 75 | + } else { | ||
| 76 | + this.$message.error("下载失败"); | ||
| 77 | + } | ||
| 78 | + }); | ||
| 79 | + | ||
| 80 | + }, | ||
| 81 | + uploadExcel(option) { | ||
| 82 | + //上传excel | ||
| 83 | + const file = option.file; | ||
| 84 | + console.log(option); | ||
| 85 | + this.loading=true; | ||
| 86 | + importcaPreReview(file, this.form.type).then((res) => { | ||
| 87 | + this.loading=false; | ||
| 88 | + if (res.code != 200) { | ||
| 89 | + if (res.code == 603) { | ||
| 90 | + this.$alert(res.msg, "提示", { | ||
| 91 | + confirmButtonText: "确定", | ||
| 92 | + type: "warning", | ||
| 93 | + }); | ||
| 94 | + } else { | ||
| 95 | + this.$message.error(res.msg); | ||
| 96 | + this.tableData = res.data; | ||
| 97 | + } | ||
| 98 | + } else { | ||
| 99 | + this.$message.success(res.msg); | ||
| 100 | + this.tableData = res.data; | ||
| 101 | + } | ||
| 102 | + }); | ||
| 103 | + }, | ||
| 104 | + handleRemove(file, fileList) { | ||
| 105 | + //清掉上传的文件 | ||
| 106 | + this.tableData = []; | ||
| 107 | + this.fileList = []; | ||
| 108 | + }, | ||
| 109 | + handleExceed(files) { | ||
| 110 | + //重复上传文件 | ||
| 111 | + let file = {}; | ||
| 112 | + file.file = files[0]; | ||
| 113 | + file.name = files[0].name; | ||
| 114 | + this.fileList = []; | ||
| 115 | + this.fileList.push(file); | ||
| 116 | + this.uploadExcel(file); | ||
| 117 | + }, | ||
| 118 | + }, | ||
| 119 | + created() { | ||
| 120 | + | ||
| 121 | + }, | ||
| 122 | + }; | ||
| 123 | +</script> | ||
| 124 | +<style rel="stylesheet/scss" lang="scss"> | ||
| 125 | + .upload-demo { | ||
| 126 | + float: right; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + .el-upload-list { | ||
| 130 | + display: inline-block; | ||
| 131 | + margin-left: 10px; | ||
| 132 | + vertical-align: top; | ||
| 133 | + } | ||
| 134 | +</style> |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="90px"> | 3 | + <el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" size="medium"> |
| 4 | <el-row> | 4 | <el-row> |
| 5 | - <el-col :span="8"> | 5 | + <el-col :span="6"> |
| 6 | - | ||
| 7 | <el-form-item label="航班日期从" prop="fltDateStart"> | 6 | <el-form-item label="航班日期从" prop="fltDateStart"> |
| 8 | - <el-date-picker value-format="yyyy-MM-dd" v-model="queryParams.fltDateStart" type="date" placeholder="选择日期"> | 7 | + <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateStart" type="date" placeholder="选择日期"> |
| 9 | </el-date-picker> | 8 | </el-date-picker> |
| 10 | </el-form-item> | 9 | </el-form-item> |
| 11 | </el-col> | 10 | </el-col> |
| 12 | 11 | ||
| 13 | - <el-col :span="8"> | 12 | + <el-col :span="6"> |
| 14 | <el-form-item label="到" prop="fltDateEnd"> | 13 | <el-form-item label="到" prop="fltDateEnd"> |
| 15 | - <el-date-picker value-format="yyyy-MM-dd" v-model="queryParams.fltDateEnd" type="date" placeholder="选择日期"> | 14 | + <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateEnd" type="date" placeholder="选择日期"> |
| 16 | </el-date-picker> | 15 | </el-date-picker> |
| 17 | </el-form-item> | 16 | </el-form-item> |
| 18 | </el-col> | 17 | </el-col> |
| 19 | 18 | ||
| 20 | - <el-col :span="8"> | 19 | + <el-col :span="6"> |
| 21 | <el-form-item label="航班号" prop="fltNo"> | 20 | <el-form-item label="航班号" prop="fltNo"> |
| 22 | - <el-input v-model="queryParams.fltNo" placeholder="请输入航班号" clearable size="small" /> | 21 | + <el-input class="formItem" v-model="queryParams.fltNo" placeholder="请输入航班号" clearable /> |
| 23 | </el-form-item> | 22 | </el-form-item> |
| 24 | </el-col> | 23 | </el-col> |
| 25 | 24 | ||
| 26 | - </el-row> | 25 | + <el-col :span="6"> |
| 27 | - <el-row> | ||
| 28 | - <el-col :span="8"> | ||
| 29 | <el-form-item label="航班类型" prop="typeId"> | 26 | <el-form-item label="航班类型" prop="typeId"> |
| 30 | - <el-select v-model="queryParams.typeId" placeholder="请选择航班类型" clearable size="small"> | 27 | + <el-select class="formItem" v-model="queryParams.typeId" placeholder="请选择航班类型" clearable> |
| 31 | <el-option v-for="dict in flightTypelist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> | 28 | <el-option v-for="dict in flightTypelist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> |
| 32 | </el-select> | 29 | </el-select> |
| 33 | </el-form-item> | 30 | </el-form-item> |
| 34 | </el-col> | 31 | </el-col> |
| 35 | 32 | ||
| 36 | - <el-col :span="8"> | 33 | + <el-col :span="6"> |
| 37 | <el-form-item label="航班状态" prop="statusId"> | 34 | <el-form-item label="航班状态" prop="statusId"> |
| 38 | - <el-select v-model="queryParams.statusId" placeholder="请选择航班状态" clearable size="small"> | 35 | + <el-select class="formItem" v-model="queryParams.statusId" placeholder="请选择航班状态" clearable> |
| 39 | <el-option v-for="dict in flightStatuslist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> | 36 | <el-option v-for="dict in flightStatuslist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> |
| 40 | </el-select> | 37 | </el-select> |
| 41 | </el-form-item> | 38 | </el-form-item> |
| 42 | </el-col> | 39 | </el-col> |
| 43 | 40 | ||
| 44 | - <el-col :span="8"> | 41 | + <el-col :span="6"> |
| 45 | <el-form-item label="航班种类" prop="flightKindId"> | 42 | <el-form-item label="航班种类" prop="flightKindId"> |
| 46 | - <el-select v-model="queryParams.flightKindId" placeholder="请选择航班种类" clearable size="small"> | 43 | + <el-select class="formItem" v-model="queryParams.flightKindId" placeholder="请选择航班种类" clearable> |
| 47 | <el-option v-for="dict in flightKindlist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> | 44 | <el-option v-for="dict in flightKindlist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> |
| 48 | </el-select> | 45 | </el-select> |
| 49 | </el-form-item> | 46 | </el-form-item> |
| ... | @@ -51,12 +48,11 @@ | ... | @@ -51,12 +48,11 @@ |
| 51 | 48 | ||
| 52 | </el-row> | 49 | </el-row> |
| 53 | 50 | ||
| 54 | - <br /> | ||
| 55 | - <el-form-item> | ||
| 56 | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 51 | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 57 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 52 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 58 | <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> | 53 | <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> |
| 59 | - </el-form-item> | 54 | + <el-button type="primary" icon="el-icon-circle-check" size="mini" @click="handleFlightStatus('flightStatus10')">航班开启</el-button> |
| 55 | + <el-button type="primary" icon="el-icon-circle-close" size="mini" @click="handleFlightStatus('flightStatus80')">航班关闭</el-button> | ||
| 60 | </el-form> | 56 | </el-form> |
| 61 | <!-- <el-row :gutter="10" class="mb8"> | 57 | <!-- <el-row :gutter="10" class="mb8"> |
| 62 | <el-col :span="1.5"> | 58 | <el-col :span="1.5"> |
| ... | @@ -130,7 +126,7 @@ | ... | @@ -130,7 +126,7 @@ |
| 130 | 126 | ||
| 131 | <!-- 添加或修改对话框 --> | 127 | <!-- 添加或修改对话框 --> |
| 132 | <el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true"> | 128 | <el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true"> |
| 133 | - <el-form ref="form" :model="form" :rules="rules" label-width="130px"> | 129 | + <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> |
| 134 | <el-row> | 130 | <el-row> |
| 135 | <el-col :span="12"> | 131 | <el-col :span="12"> |
| 136 | <el-form-item label="航班号" prop="fltNo"> | 132 | <el-form-item label="航班号" prop="fltNo"> |
| ... | @@ -365,7 +361,7 @@ | ... | @@ -365,7 +361,7 @@ |
| 365 | }], | 361 | }], |
| 366 | fltDate: [{ | 362 | fltDate: [{ |
| 367 | required: true, | 363 | required: true, |
| 368 | - message: "ACCS航班日期不能为空", | 364 | + message: "航班日期不能为空", |
| 369 | trigger: "blur" | 365 | trigger: "blur" |
| 370 | }], | 366 | }], |
| 371 | kindId: [{ | 367 | kindId: [{ |
| ... | @@ -716,6 +712,26 @@ | ... | @@ -716,6 +712,26 @@ |
| 716 | this.queryParams.start = 0; | 712 | this.queryParams.start = 0; |
| 717 | this.findAllFltData(); | 713 | this.findAllFltData(); |
| 718 | }, | 714 | }, |
| 715 | + //批量开启/关闭航班 | ||
| 716 | + handleFlightStatus(status){ | ||
| 717 | + let handle = status == 'flightStatus80' ? '关闭' : '开启' | ||
| 718 | + if (this.ids.length == 0){ | ||
| 719 | + this.msgError('请选择批量' + handle + '的航班') | ||
| 720 | + return; | ||
| 721 | + } | ||
| 722 | + let data = {}; | ||
| 723 | + data.status = status; | ||
| 724 | + data.updateIds = this.ids; | ||
| 725 | + | ||
| 726 | + updateStatusBatch(data).then(response => { | ||
| 727 | + if (response.code === 200) { | ||
| 728 | + this.msgSuccess( handle + "成功"); | ||
| 729 | + this.findAllFltData(); | ||
| 730 | + } else { | ||
| 731 | + this.msgError(response.msg); | ||
| 732 | + } | ||
| 733 | + }); | ||
| 734 | + } | ||
| 719 | 735 | ||
| 720 | } | 736 | } |
| 721 | }; | 737 | }; | ... | ... |
| ... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
| 26 | </el-col> | 26 | </el-col> |
| 27 | <el-col :span="6"> | 27 | <el-col :span="6"> |
| 28 | <el-form-item label="配载航班号:"> | 28 | <el-form-item label="配载航班号:"> |
| 29 | - <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002"></el-input> | 29 | + <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" rows="1"></el-input> |
| 30 | </el-form-item> | 30 | </el-form-item> |
| 31 | </el-col> | 31 | </el-col> |
| 32 | <el-col :span="6"> | 32 | <el-col :span="6"> |
| ... | @@ -54,7 +54,8 @@ | ... | @@ -54,7 +54,8 @@ |
| 54 | type="textarea" | 54 | type="textarea" |
| 55 | v-model="formData.waybillNo" | 55 | v-model="formData.waybillNo" |
| 56 | class="formItem" | 56 | class="formItem" |
| 57 | - placeholder="xxxx;xxxx" | 57 | + placeholder="请输入运单号(回车间隔)" |
| 58 | + rows="1" | ||
| 58 | ></el-input> | 59 | ></el-input> |
| 59 | </el-form-item> | 60 | </el-form-item> |
| 60 | </el-col> | 61 | </el-col> |
| ... | @@ -102,6 +103,7 @@ | ... | @@ -102,6 +103,7 @@ |
| 102 | v-model="ursa" | 103 | v-model="ursa" |
| 103 | class="formItem" | 104 | class="formItem" |
| 104 | placeholder="S_;P_;E2" | 105 | placeholder="S_;P_;E2" |
| 106 | + rows="1" | ||
| 105 | ></el-input> | 107 | ></el-input> |
| 106 | </el-form-item> | 108 | </el-form-item> |
| 107 | </el-col> | 109 | </el-col> |
| ... | @@ -112,6 +114,7 @@ | ... | @@ -112,6 +114,7 @@ |
| 112 | v-model="siteName" | 114 | v-model="siteName" |
| 113 | class="formItem" | 115 | class="formItem" |
| 114 | placeholder="PVG;PEK" | 116 | placeholder="PVG;PEK" |
| 117 | + rows="1" | ||
| 115 | ></el-input> | 118 | ></el-input> |
| 116 | </el-form-item> | 119 | </el-form-item> |
| 117 | </el-col> | 120 | </el-col> |
| ... | @@ -210,91 +213,6 @@ | ... | @@ -210,91 +213,6 @@ |
| 210 | </el-collapse-item> | 213 | </el-collapse-item> |
| 211 | </el-collapse> | 214 | </el-collapse> |
| 212 | </el-col> | 215 | </el-col> |
| 213 | - <!-- <el-col :span="6"> | ||
| 214 | - <el-form-item label="预配航班日期:"> | ||
| 215 | - <el-date-picker | ||
| 216 | - class="formItem" | ||
| 217 | - v-model="prepalyFlightTime" | ||
| 218 | - type="daterange" | ||
| 219 | - range-separator="至" | ||
| 220 | - start-placeholder="开始日期" | ||
| 221 | - end-placeholder="结束日期" | ||
| 222 | - :value-format="valueFormat" | ||
| 223 | - > | ||
| 224 | - </el-date-picker> | ||
| 225 | - </el-form-item> | ||
| 226 | - </el-col> --> | ||
| 227 | - <!-- <el-col :span="6"> | ||
| 228 | - <el-form-item label="数据源:"> | ||
| 229 | - <el-select | ||
| 230 | - placeholder="不限" | ||
| 231 | - v-model="formData.dataSources" | ||
| 232 | - class="formItem" | ||
| 233 | - clearable | ||
| 234 | - > | ||
| 235 | - <el-option label="人工导入" value="1"> </el-option> | ||
| 236 | - <el-option label="系统导入" value="2"> </el-option> | ||
| 237 | - </el-select> | ||
| 238 | - </el-form-item> | ||
| 239 | - </el-col> --> | ||
| 240 | - <!-- <el-col :span="6"> | ||
| 241 | - <el-form-item label="是否大货:"> | ||
| 242 | - <el-select | ||
| 243 | - placeholder="不限" | ||
| 244 | - v-model="formData.big" | ||
| 245 | - class="formItem" | ||
| 246 | - clearable | ||
| 247 | - > | ||
| 248 | - <el-option label="是" value="1"> </el-option> | ||
| 249 | - <el-option label="否" value="0"> </el-option> | ||
| 250 | - </el-select> | ||
| 251 | - </el-form-item> | ||
| 252 | - </el-col> --> | ||
| 253 | - <!-- <el-col :span="6"> | ||
| 254 | - <el-form-item label="配置航班类型:"> | ||
| 255 | - <el-select | ||
| 256 | - placeholder="不限" | ||
| 257 | - v-model="formData.kindToAllocFlightId" | ||
| 258 | - class="formItem" | ||
| 259 | - clearable | ||
| 260 | - > | ||
| 261 | - <el-option | ||
| 262 | - v-for="item in findConditionData.configureFlightType" | ||
| 263 | - :label="item.chineseName" | ||
| 264 | - :value="item.id" | ||
| 265 | - :key="item.id" | ||
| 266 | - > | ||
| 267 | - </el-option> | ||
| 268 | - </el-select> | ||
| 269 | - </el-form-item> | ||
| 270 | - </el-col> --> | ||
| 271 | - <!-- <el-col :span="6"> | ||
| 272 | - <el-form-item label="历史货物状态:"> | ||
| 273 | - <el-select | ||
| 274 | - placeholder="不限" | ||
| 275 | - v-model="formData.historyAllocaCargoTypeId" | ||
| 276 | - class="formItem" | ||
| 277 | - clearable | ||
| 278 | - > | ||
| 279 | - <el-option | ||
| 280 | - v-for="item in findConditionData.cargoStatusHistory" | ||
| 281 | - :label="item.chineseName" | ||
| 282 | - :value="item.id" | ||
| 283 | - :key="item.id" | ||
| 284 | - > | ||
| 285 | - </el-option> | ||
| 286 | - </el-select> | ||
| 287 | - </el-form-item> | ||
| 288 | - </el-col> --> | ||
| 289 | - <!-- <el-col :span="6"> | ||
| 290 | - <el-form-item label="航班序列单号:"> | ||
| 291 | - <el-input | ||
| 292 | - type="text" | ||
| 293 | - v-model="formData.mawbCode" | ||
| 294 | - class="formItem" | ||
| 295 | - ></el-input> | ||
| 296 | - </el-form-item> | ||
| 297 | - </el-col> --> | ||
| 298 | </el-row> | 216 | </el-row> |
| 299 | <div style="paddingLeft: 10px;marginTop:20px"> | 217 | <div style="paddingLeft: 10px;marginTop:20px"> |
| 300 | <el-button | 218 | <el-button |
| ... | @@ -314,6 +232,8 @@ | ... | @@ -314,6 +232,8 @@ |
| 314 | <el-button :type="downLoadingTip.downloading?'warning':'primary'" size="small" @click="xlse(1)" :disabled="tableData.length==0" :loading="downLoadingTip.downloading" | 232 | <el-button :type="downLoadingTip.downloading?'warning':'primary'" size="small" @click="xlse(1)" :disabled="tableData.length==0" :loading="downLoadingTip.downloading" |
| 315 | >{{downLoadingTip.downloading?downLoadingTip.tip:"导出全部查询结果"}}</el-button | 233 | >{{downLoadingTip.downloading?downLoadingTip.tip:"导出全部查询结果"}}</el-button |
| 316 | > | 234 | > |
| 235 | + <span style="marginLeft:20px;color:#ffba00">全部导出上限80000条数据</span> | ||
| 236 | + <el-progress v-if="progress!=0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress" :status="progress == 100?'success':'warning'"></el-progress> | ||
| 317 | <div class="tips"> | 237 | <div class="tips"> |
| 318 | <span style="paddingRight: 50px">总重量:{{ allWeight }}</span> | 238 | <span style="paddingRight: 50px">总重量:{{ allWeight }}</span> |
| 319 | <span>总件数:{{ allQty }}</span> | 239 | <span>总件数:{{ allQty }}</span> |
| ... | @@ -364,6 +284,7 @@ | ... | @@ -364,6 +284,7 @@ |
| 364 | <script> | 284 | <script> |
| 365 | import { findConditionData, findCargoData } from "@/api/cargoSelect"; | 285 | import { findConditionData, findCargoData } from "@/api/cargoSelect"; |
| 366 | import { downLoadXlsx } from "@/utils/zipdownload"; | 286 | import { downLoadXlsx } from "@/utils/zipdownload"; |
| 287 | +import { upCase } from "@/utils/FedEx" | ||
| 367 | 288 | ||
| 368 | export default { | 289 | export default { |
| 369 | name:"queryCargo", | 290 | name:"queryCargo", |
| ... | @@ -461,6 +382,7 @@ export default { | ... | @@ -461,6 +382,7 @@ export default { |
| 461 | createDate: [], | 382 | createDate: [], |
| 462 | limitStart: 0, | 383 | limitStart: 0, |
| 463 | limitSize: 100, //无限制-1 | 384 | limitSize: 100, //无限制-1 |
| 385 | + progress:0, | ||
| 464 | selecetALL:false, | 386 | selecetALL:false, |
| 465 | }; | 387 | }; |
| 466 | }, | 388 | }, |
| ... | @@ -654,6 +576,7 @@ export default { | ... | @@ -654,6 +576,7 @@ export default { |
| 654 | }, | 576 | }, |
| 655 | // 导出表格 | 577 | // 导出表格 |
| 656 | xlse(page) { | 578 | xlse(page) { |
| 579 | + this.progress = 1; | ||
| 657 | this.downLoadingTip.downloading = true; | 580 | this.downLoadingTip.downloading = true; |
| 658 | let cargoXlse = {title:"货物导出表",cargoConditionDto:{}}; | 581 | let cargoXlse = {title:"货物导出表",cargoConditionDto:{}}; |
| 659 | if(this.formData.customsReceiptStatusId != null && this.formData.customsReceiptStatusId.length < 1){ | 582 | if(this.formData.customsReceiptStatusId != null && this.formData.customsReceiptStatusId.length < 1){ |
| ... | @@ -696,6 +619,7 @@ export default { | ... | @@ -696,6 +619,7 @@ export default { |
| 696 | downLoadXlsx("/cargo/excel",cargoXlse,"货物查询表").then(()=>{ | 619 | downLoadXlsx("/cargo/excel",cargoXlse,"货物查询表").then(()=>{ |
| 697 | this.downLoadingTip.downloading = false; | 620 | this.downLoadingTip.downloading = false; |
| 698 | this.downLoadingTip.tip = "" | 621 | this.downLoadingTip.tip = "" |
| 622 | + this.progress = 100; | ||
| 699 | }).catch(()=>{ | 623 | }).catch(()=>{ |
| 700 | this.downLoadingTip.downloading = false; | 624 | this.downLoadingTip.downloading = false; |
| 701 | this.downLoadingTip.tip = "" | 625 | this.downLoadingTip.tip = "" |
| ... | @@ -708,6 +632,7 @@ export default { | ... | @@ -708,6 +632,7 @@ export default { |
| 708 | downLoadXlsx("/cargo/excel",cargoXlse,"货物查询表").then(()=>{ | 632 | downLoadXlsx("/cargo/excel",cargoXlse,"货物查询表").then(()=>{ |
| 709 | this.downLoadingTip.downloading = false; | 633 | this.downLoadingTip.downloading = false; |
| 710 | this.downLoadingTip.tip = "" | 634 | this.downLoadingTip.tip = "" |
| 635 | + this.progress = 100; | ||
| 711 | }).catch(()=>{ | 636 | }).catch(()=>{ |
| 712 | this.downLoadingTip.downloading = false; | 637 | this.downLoadingTip.downloading = false; |
| 713 | this.downLoadingTip.tip = "" | 638 | this.downLoadingTip.tip = "" |
| ... | @@ -739,7 +664,7 @@ export default { | ... | @@ -739,7 +664,7 @@ export default { |
| 739 | return this.formData.fltNo; | 664 | return this.formData.fltNo; |
| 740 | }, | 665 | }, |
| 741 | set: function (val) { | 666 | set: function (val) { |
| 742 | - this.formData.fltNo = val.toUpperCase(); | 667 | + this.formData.fltNo = upCase(val); |
| 743 | }, | 668 | }, |
| 744 | }, | 669 | }, |
| 745 | siteName: { | 670 | siteName: { |
| ... | @@ -747,7 +672,7 @@ export default { | ... | @@ -747,7 +672,7 @@ export default { |
| 747 | return this.formData.siteName; | 672 | return this.formData.siteName; |
| 748 | }, | 673 | }, |
| 749 | set: function (val) { | 674 | set: function (val) { |
| 750 | - this.formData.siteName = val.toUpperCase(); | 675 | + this.formData.siteName = upCase(val); |
| 751 | }, | 676 | }, |
| 752 | }, | 677 | }, |
| 753 | ursa: { | 678 | ursa: { |
| ... | @@ -755,7 +680,7 @@ export default { | ... | @@ -755,7 +680,7 @@ export default { |
| 755 | return this.formData.ursa; | 680 | return this.formData.ursa; |
| 756 | }, | 681 | }, |
| 757 | set: function (val) { | 682 | set: function (val) { |
| 758 | - this.formData.ursa = val.toUpperCase(); | 683 | + this.formData.ursa = upCase(val); |
| 759 | }, | 684 | }, |
| 760 | }, | 685 | }, |
| 761 | cargoPlaneNo:{ | 686 | cargoPlaneNo:{ |
| ... | @@ -763,7 +688,7 @@ export default { | ... | @@ -763,7 +688,7 @@ export default { |
| 763 | return this.formData.cargoPlaneNo; | 688 | return this.formData.cargoPlaneNo; |
| 764 | }, | 689 | }, |
| 765 | set: function (val) { | 690 | set: function (val) { |
| 766 | - this.formData.cargoPlaneNo = val.toUpperCase(); | 691 | + this.formData.cargoPlaneNo = upCase(val); |
| 767 | }, | 692 | }, |
| 768 | } | 693 | } |
| 769 | }, | 694 | }, | ... | ... |
-
Please register or login to post a comment