jinhui.wang

代码更新bug修复

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 + :label-position="labelPosition"
16 + :lazy="lazy"
17 + :downShiftKey="shiftKey"
18 + :limitStart="limitStart"
19 + v-loading="loading"
20 + @select="tableSelect"
21 + @select-all="tableSelectAll"
22 + @select-change="SelectChange"
23 + >
24 + <el-table-column
25 + v-for="(item, index) in newHeader"
26 + :type="item.type"
27 + :prop="item.value"
28 + :label="item.name"
29 + :width="item.width"
30 + :align="item.align"
31 + :fixed="item.fixed"
32 + :show-overflow-tooltip="showOverflowTooltip"
33 + :sortable="item.sorTable"
34 + header-align="center"
35 + :formatter="formatter"
36 + :slotHeader="slotHeader"
37 + :key="index"
38 + >
39 + <template v-if="item.slot" slot-scope="">
40 + <Item :dom="item.slot" @change="itemChange"></Item>
41 + </template>
42 + </el-table-column>
43 + <slot></slot>
44 + </el-table>
45 + <el-pagination
46 + :total="totalCount"
47 + :page-size.sync="limitSize"
48 + background
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 +export default {
68 + name: "Table",
69 + components: {
70 + // infoTable,
71 + Item,
72 + },
73 + props: {
74 + tableName: { type: String, default: "tables" },
75 + data: {
76 + type: Array,
77 + default() {
78 + return [];
79 + },
80 + },
81 + headerData: {
82 + type: Array,
83 + default: null,
84 + },
85 + border: {
86 + type: Boolean,
87 + default: true,
88 + },
89 + stripe: {
90 + type: Boolean,
91 + default: true,
92 + },
93 + size: {
94 + type: String,
95 + default: "mini",
96 + },
97 + height: {
98 + type: String,
99 + default: "400",
100 + },
101 + fit: {
102 + type: Boolean,
103 + default: true,
104 + },
105 + labelPosition: {
106 + type: String,
107 + default: "left",
108 + },
109 + indent: {
110 + type: Number,
111 + default: 16,
112 + },
113 + showHeader: {
114 + type: Boolean,
115 + default: true,
116 + },
117 + slotHeader: {
118 + type: Boolean,
119 + default: true,
120 + },
121 + highlightCurrentRow: {
122 + type: Boolean,
123 + default: true,
124 + },
125 + lazy: {
126 + type: Boolean,
127 + default: true,
128 + },
129 + loading: {
130 + type: Boolean,
131 + default: false,
132 + },
133 + hidden: {
134 + type: Boolean,
135 + default: false,
136 + },
137 + showOverflowTooltip: {
138 + type: Boolean,
139 + default: true,
140 + },
141 + shiftKey:{
142 + type:Boolean,
143 + default:false,
144 + },
145 + page: {
146 + type: Number,
147 + default: 1,
148 + },
149 + limitSize: {
150 + type: Number,
151 + default: 20,
152 + },
153 + limitStart:{
154 + type:Number,
155 + default:0,
156 + },
157 + paginationBackground: {
158 + type: Boolean,
159 + default: true,
160 + },
161 + pageSize: {
162 + type: Number,
163 + default: 20,
164 + },
165 + totalCount: {
166 + type: Number,
167 + default: 0,
168 + },
169 + },
170 + inheritAttrs: false,
171 + data() {
172 + return {
173 + newHeader: [],
174 + selectTable: [],
175 + pageNum: 1,
176 + start:-1,
177 + // {
178 + // type: "selection",
179 + // name: "",
180 + // value: "",
181 + // slot: null,
182 + // width: "",
183 + // align: "center",
184 + // sorTable: false,
185 + // },
186 + };
187 + },
188 + created() {
189 + this.newHeader = this.headerData;
190 + this.total = this.data.length;
191 + },
192 + mounted() {
193 +
194 + },
195 + methods: {
196 + nextClick() {
197 + this.$emit('currentChange',{page:this.pageNum + 1,start:this.limitStart + this.limitSize})
198 + },
199 + prevClick() {
200 + this.$emit('currentChange',{page:this.pageNum - 1,start:this.limitStart - this.limitSiz})
201 + },
202 + currentChange(val) {
203 + this.$emit('currentChange',{page:val,start: val*this.limitSize+1});
204 + },
205 + tableSelect(selection, row) {
206 + let end = row.index;
207 + if (this.shiftKey) {
208 + const sum = Math.abs(this.start - end);
209 + const min = Math.min(this.start, end);
210 + let i;
211 + if (
212 + this.start === -1 &&
213 + selection.includes(this.data[row.index])
214 + ) {
215 + for (i = 0; i < sum; i++) {
216 + this.$refs.tables.toggleRowSelection(this.data[i], true);
217 + this.selectTable.push(this.data[i]);
218 + }
219 + } else if (selection.includes(this.data[row.index])) {
220 + for (i = this.start + 1; i <= end; i++) {
221 + this.$refs.tables.toggleRowSelection(this.data[i], true);
222 + this.selectTable.push(this.data[i]);
223 + }
224 + } else if (!selection.includes(this.data[row.index])) {
225 + this.selectTable.splice(end - 1, sum + 1);
226 + for (i = end; i <= this.start; i++) {
227 + this.$refs.tables.toggleRowSelection(this.data[i], false);
228 + }
229 + }
230 + this.start = end;
231 + } else {
232 + this.start = end;
233 + if (selection.includes(this.data[end])) {
234 + this.selectTable.push(row);
235 + } else {
236 + for (let i = 0; i < this.selectTable.length; i++) {
237 + if (this.selectTable[i].index == row.index) {
238 + this.selectTable.splice(i, 1);
239 + }
240 + }
241 + }
242 + }
243 + selection = this.selectTable
244 + this.$emit("tableSelect", { selection, row });
245 + },
246 + tableSelectAll(selection) {
247 + this.$emit("tableSelectAll", selection);
248 + },
249 + SelectChange(selection) {
250 + this.$emit("SelectChange", selection);
251 + },
252 + itemChange(val) {},
253 + // checkChange(val) {
254 + // console.log(val);
255 + // },
256 + // top(val) {
257 + // console.log(val);
258 + // },
259 + // bottom(val) {
260 + // console.log(val);
261 + // },
262 + formatter(row, column, cellValue, index) {
263 + return cellValue;
264 + },
265 + },
266 +};
267 +</script>
268 +
269 +<style>
270 +.Tables {
271 + width: 100%;
272 + margin-top: 20px;
273 +}
274 +.tablePagination {
275 + margin-top: 40px;
276 + text-align: right;
277 +}
278 +</style>
279 +
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
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>
...@@ -20,6 +20,7 @@ import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, ...@@ -20,6 +20,7 @@ import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels,
20 import Pagination from "@/components/Pagination"; 20 import Pagination from "@/components/Pagination";
21 // 自定义表格工具扩展 21 // 自定义表格工具扩展
22 import RightToolbar from "@/components/RightToolbar" 22 import RightToolbar from "@/components/RightToolbar"
23 +import Table from "@/components/Table"
23 24
24 // 全局方法挂载 25 // 全局方法挂载
25 //Vue.prototype.getDicts = getDicts 26 //Vue.prototype.getDicts = getDicts
...@@ -47,6 +48,7 @@ Vue.prototype.msgInfo = function (msg) { ...@@ -47,6 +48,7 @@ Vue.prototype.msgInfo = function (msg) {
47 // 全局组件挂载 48 // 全局组件挂载
48 Vue.component('Pagination', Pagination) 49 Vue.component('Pagination', Pagination)
49 Vue.component('RightToolbar', RightToolbar) 50 Vue.component('RightToolbar', RightToolbar)
51 +Vue.component('Table', Table)
50 52
51 Vue.use(permission) 53 Vue.use(permission)
52 54
......
...@@ -97,7 +97,7 @@ export const constantRoutes = [ ...@@ -97,7 +97,7 @@ export const constantRoutes = [
97 component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve), 97 component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
98 name: 'flightAllocConfigAdd', 98 name: 'flightAllocConfigAdd',
99 meta: { title: '添加航班配舱', icon: 'user', breadcrumb: false } 99 meta: { title: '添加航班配舱', icon: 'user', breadcrumb: false }
100 - } 100 + },
101 ] 101 ]
102 } 102 }
103 ] 103 ]
......
1 +<template>
2 + <div class="cargoAllocation">
3 + <el-form ref="form" class="cargoForm form-header" label-width="auto" label-position="right">
4 + <el-row type="flex" style="flexWrap: wrap !important">
5 + <el-col :span="6">
6 + <el-form-item label="ACCS原航班日期">
7 + <el-date-picker
8 + class="formItem"
9 + type="daterange"
10 + range-separator="至"
11 + start-placeholder="开始日期"
12 + end-placeholder="结束日期"
13 + :value-format="valueFormat"
14 + >
15 + </el-date-picker>
16 + </el-form-item>
17 + </el-col>
18 + <el-col :span="6">
19 + <el-form-item label="申报类型">
20 + <el-select
21 + placeholder="不限"
22 + v-model="formData.typeId"
23 + class="formItem"
24 + clearable
25 + >
26 + <el-option
27 + v-for="item in findConditionData.cargoType"
28 + :label="item.chineseName"
29 + :value="item.id"
30 + :key="item.id"
31 + >
32 + </el-option>
33 + </el-select>
34 + </el-form-item>
35 + </el-col>
36 + <!-- <el-col :span="6">
37 + <el-form-item label="海关回执状态">
38 + <el-select
39 + placeholder="不限"
40 + v-model="formData.customsReceiptStatusId"
41 + class="formItem"
42 + multiple
43 + clearable
44 + >
45 + <el-option
46 + v-for="item in findConditionData.cargoCustomsReturnStatus"
47 + :label="item.chineseName"
48 + :value="item.id"
49 + :key="item.id"
50 + >
51 + </el-option>
52 + </el-select>
53 + </el-form-item>
54 + </el-col> -->
55 + <el-col :span="6">
56 + <el-form-item label="货物状态">
57 + <el-select
58 + placeholder="不限"
59 + v-model="formData.statusId"
60 + class="formItem"
61 + clearable
62 + >
63 + <el-option
64 + v-for="item in findConditionData.cargoStatus"
65 + :label="item.chineseName"
66 + :value="item.id"
67 + :key="item.id"
68 + >
69 + </el-option>
70 + </el-select>
71 + </el-form-item>
72 + </el-col>
73 + <!-- <el-col :span="6">
74 + <el-form-item label="是否自动">
75 + <el-select
76 + placeholder="不限"
77 + v-model="formData.allocationTypeId"
78 + class="formItem"
79 + clearable
80 + >
81 + <el-option label="自动" value="2"> </el-option>
82 + <el-option label="手动" value="1"> </el-option>
83 + </el-select>
84 + </el-form-item>
85 + </el-col> -->
86 + <el-col :span="6">
87 + <el-form-item label="航班类型">
88 + <el-select
89 + placeholder="不限"
90 + v-model="formData.kindToAllocFlightId"
91 + class="formItem"
92 + clearable
93 + >
94 + <el-option v-for="item in fltTypes" :label="item.chineseName" v-model="item.id" :key="item.id"> </el-option>
95 + </el-select>
96 + </el-form-item>
97 + </el-col>
98 + <el-col :span="6">
99 + <el-form-item label="服务类型">
100 + <el-select
101 + placeholder="不限"
102 + v-model="formData.serviceTypeId"
103 + class="formItem"
104 + clearable
105 + >
106 + <el-option
107 + v-for="item in findConditionData.cargoServiceType"
108 + :label="item.chineseName"
109 + :value="item.id"
110 + :key="item.id"
111 + >
112 + </el-option>
113 + </el-select>
114 + </el-form-item>
115 + </el-col>
116 + <el-col :span="6">
117 + <el-form-item label="运单号">
118 + <el-input
119 + type="textarea"
120 + placeholder="xxxx;xxxx"
121 + v-model="formData.waybillNo"
122 + ></el-input>
123 + </el-form-item>
124 + </el-col>
125 + <el-col :span="6">
126 + <el-form-item label="ACCS原航班号">
127 + <el-input
128 + type="textarea"
129 + v-model="formData.fltNo"
130 + placeholder="xxxx;xxxx"
131 + ></el-input>
132 + </el-form-item>
133 + </el-col>
134 + <el-col :span="6">
135 + <el-form-item label="URSA">
136 + <el-input
137 + type="textarea"
138 + placeholder="S_;P_;E2"
139 + v-model="ursa"
140 + ></el-input>
141 + </el-form-item>
142 + </el-col>
143 + <el-col :span="6">
144 + <el-form-item label="站点">
145 + <el-input
146 + type="textarea"
147 + placeholder="PVG;PEK"
148 + v-model="siteName"
149 + ></el-input>
150 + </el-form-item>
151 + </el-col>
152 + <el-col :span="6">
153 + <el-form-item label="重量区间:">
154 + <el-col :span="11"><el-input-number size="mini" v-model="formData.minWeight" :controls="false" :min="0"></el-input-number></el-col>
155 + <el-col class="line" :span="2">-</el-col>
156 + <el-col :span="11"><el-input-number size="mini" v-model="formData.maxWeight" :controls="false" :min="0"></el-input-number></el-col>
157 + </el-form-item>
158 + </el-col>
159 + <el-col :span="6">
160 + <el-form-item label="件数区间:">
161 + <el-col :span="11"><el-input-number size="mini" v-model="formData.minNumber" :controls="false" :min="0"></el-input-number></el-col>
162 + <el-col class="line" :span="2">-</el-col>
163 + <el-col :span="11"><el-input-number size="mini" v-model="formData.maxNumber" :controls="false" :min="0"></el-input-number></el-col>
164 + </el-form-item>
165 + </el-col>
166 + <el-col :span="6">
167 + <el-form-item label="取件日期:">
168 + <el-date-picker
169 + v-model="formData.pickUpDate"
170 + type="date"
171 + placeholder="选择日期"
172 + :value-format="valueFormat"
173 + >
174 + </el-date-picker>
175 + </el-form-item>
176 + </el-col>
177 + <el-col :span="24">
178 + <el-form-item label="Handling Code:">
179 + <el-checkbox-group v-model="formData.handingCodes">
180 + <el-checkbox v-for="item in HandlingCode" :label="item.chineseName" v-model="item.id" :key="item.id"></el-checkbox>
181 + </el-checkbox-group>
182 + </el-form-item>
183 + </el-col>
184 + <el-col :span="24">
185 + <el-form-item label="Sub Category:">
186 + <el-checkbox-group v-model="formData.subCategorys">
187 + <el-checkbox v-for="item in SubCategory" :label="item.chineseName" v-model="item.id" :key="item.id"></el-checkbox>
188 + </el-checkbox-group>
189 + </el-form-item>
190 + </el-col>
191 + </el-row>
192 + <div style="margin: 0 0 0 10px">
193 + <el-button
194 + type="primary"
195 + icon="el-icon-search"
196 + size="mini"
197 + :loading="loading"
198 + @click="select"
199 + >查询</el-button
200 + >
201 + <el-button
202 + :type="downLoadingTip.downloading?'warning':'primary'"
203 + size="mini"
204 + @click="xlse(0)"
205 + :loading="downLoadingTip.downloading"
206 + :disabled="tableData.length <= 0"
207 + >{{downLoadingTip.downloading?downLoadingTip.tip:"导出本页查询结果"}}</el-button
208 + >
209 + <el-button
210 + :type="downLoadingTip.downloading?'warning':'primary'"
211 + size="mini"
212 + @click="xlse(1)"
213 + :loading="downLoadingTip.downloading"
214 + :disabled="tableData.length <= 0"
215 + >{{downLoadingTip.downloading?downLoadingTip.tip:"导出全部查询结果"}}</el-button
216 + >
217 + <el-button
218 + type="primary"
219 + size="mini"
220 + @click="addFit"
221 + :disabled="tableSelection.length <= 0"
222 + >添加到航班</el-button
223 + >
224 + <div class="tips">
225 + <span style="paddingRight: 50px">总重量:{{ allWeight }}</span>
226 + <span>总件数:{{ allQty }}</span>
227 + </div>
228 + </div>
229 + </el-form>
230 + <Table
231 + :data="tableData"
232 + :headerData="tableHeader"
233 + :totalCount="totalCount"
234 + :loading="loading"
235 + :limitSize="formData.limitSize"
236 + :limitStart="formData.limitStart"
237 + :shiftKey="shiftKey"
238 + height="350"
239 + @tableSelect="tableSelect"
240 + @tableSelectAll="tableSelectAll"
241 + @currentChange="currentChange"
242 + ></Table>
243 + <Dialog
244 + :tableData="tableSelection"
245 + :dialogVisible="dialogVisible"
246 + @dialogBeforeClose="dialogBeforeClose"
247 + ></Dialog>
248 + </div>
249 +</template>
250 +
251 +<script>
252 +import Dialog from "./info.vue";
253 +import { findConditionData, findCargoData } from "@/api/cargoSelect";
254 +import { allDictData } from "@/api/destinationFlight";
255 +import { findFltConditionDataApi } from "@/api/findAllFltData";
256 +import { cargoXlsx } from "@/utils/zipdownload";
257 +
258 +export default {
259 + components: {
260 + Dialog,
261 + },
262 + data() {
263 + return {
264 + formData: {
265 + // allocationTypeId: "1",
266 + handingCodes:[],
267 + subCategorys:[],
268 + page:1,
269 + limitStart: 0,
270 + limitSize: 50,
271 + }, //查询数据
272 + tableHeader: [
273 + {
274 + type: "selection",
275 + name: "",
276 + value: "",
277 + width: "50",
278 + align: "center",
279 + sorTable: false,
280 + slot: null,
281 + },
282 + {
283 + type: "index",
284 + name: "",
285 + value: "",
286 + width: "50",
287 + align: "center",
288 + sorTable: false,
289 + slot: null,
290 + },
291 + {
292 + type: "",
293 + name: "口岸代码",
294 + value: "portName",
295 + width: "150",
296 + align: "center",
297 + sorTable: false,
298 + slot: null,
299 + },
300 + {
301 + type: "",
302 + name: "取件日期",
303 + value: "pickUpDate",
304 + width: "150",
305 + align: "center",
306 + sorTable: false,
307 + slot: null,
308 + },
309 + {
310 + type: "",
311 + name: "取件扫描号",
312 + value: "pickUpScanNo",
313 + width: "150",
314 + align: "center",
315 + sorTable: false,
316 + slot: null,
317 + },
318 + {
319 + type: "",
320 + name: "站点",
321 + value: "siteName",
322 + width: "150",
323 + align: "center",
324 + sorTable: false,
325 + slot: null,
326 + },
327 + {
328 + type: "",
329 + name: "运单号",
330 + value: "waybillNo",
331 + width: "150",
332 + align: "center",
333 + sorTable: false,
334 + slot: null,
335 + },
336 + {
337 + type: "",
338 + name: "总单号",
339 + value: "totalWaybillNo",
340 + width: "150",
341 + align: "center",
342 + sorTable: false,
343 + slot: null,
344 + },
345 + {
346 + type: "",
347 + name: "服务类型",
348 + value: "serviceTypeName",
349 + width: "150",
350 + align: "center",
351 + sorTable: false,
352 + slot: null,
353 + },
354 + {
355 + type: "",
356 + name: "URSA",
357 + value: "ursa",
358 + width: "150",
359 + align: "center",
360 + sorTable: false,
361 + slot: null,
362 + },
363 + {
364 + type: "",
365 + name: "申报类型",
366 + value: "typeName",
367 + width: "150",
368 + align: "center",
369 + sorTable: false,
370 + slot: null,
371 + },
372 + {
373 + type: "",
374 + name: "HandlingCode",
375 + value: "handingCode",
376 + width: "150",
377 + align: "center",
378 + sorTable: false,
379 + slot: null,
380 + },
381 + {
382 + type: "",
383 + name: "subcategory",
384 + value: "subCategory",
385 + width: "150",
386 + align: "center",
387 + sorTable: false,
388 + slot: null,
389 + },
390 + {
391 + type: "",
392 + name: "件数",
393 + value: "qty",
394 + width: "150",
395 + align: "center",
396 + sorTable: false,
397 + slot: null,
398 + },
399 + {
400 + type: "",
401 + name: "实际重量",
402 + value: "actualWeight",
403 + width: "150",
404 + align: "center",
405 + sorTable: false,
406 + slot: null,
407 + },
408 + {
409 + type: "",
410 + name: "收件人国家代码",
411 + value: "consigneeCountry",
412 + width: "150",
413 + align: "center",
414 + sorTable: false,
415 + slot: null,
416 + },
417 + {
418 + type: "",
419 + name: "品名描述",
420 + value: "nameDescription",
421 + width: "150",
422 + align: "center",
423 + sorTable: false,
424 + slot: null,
425 + },
426 + {
427 + type: "",
428 + name: "海关回执状态",
429 + value: "customsReceiptStatusName",
430 + width: "150",
431 + align: "center",
432 + sorTable: false,
433 + slot: null,
434 + },
435 + {
436 + type: "",
437 + name: "预审状态",
438 + value: "preQualificationStatus",
439 + width: "150",
440 + align: "center",
441 + sorTable: false,
442 + slot: null,
443 + },
444 + {
445 + type: "",
446 + name: "航班预审意见",
447 + value: "caPretrialOpinion",
448 + width: "150",
449 + align: "center",
450 + sorTable: false,
451 + slot: null,
452 + },
453 + {
454 + type: "",
455 + name: "货物状态",
456 + value: "statusName",
457 + width: "150",
458 + align: "center",
459 + sorTable: false,
460 + slot: null,
461 + },
462 + {
463 + type: "",
464 + name: "终配航班号",
465 + value: "finalFlightNo",
466 + width: "150",
467 + align: "center",
468 + sorTable: false,
469 + slot: null,
470 + },
471 + {
472 + type: "",
473 + name: "终配航班日期",
474 + value: "finalFlightTime",
475 + width: "150",
476 + align: "center",
477 + sorTable: false,
478 + slot: null,
479 + },
480 + {
481 + type: "",
482 + name: "二配航班号",
483 + value: "twoMatchFlightNo",
484 + width: "150",
485 + align: "center",
486 + sorTable: false,
487 + slot: null,
488 + },
489 + {
490 + type: "",
491 + name: "二配航班日期",
492 + value: "twoMatchFlightTime",
493 + width: "150",
494 + align: "center",
495 + sorTable: false,
496 + slot: null,
497 + },
498 + {
499 + type: "",
500 + name: "预配航班号",
501 + value: "preplanFlightNo",
502 + width: "150",
503 + align: "center",
504 + sorTable: false,
505 + slot: null,
506 + },
507 + {
508 + type: "",
509 + name: "预配航班日期",
510 + value: "preplanFlightTime",
511 + width: "150",
512 + align: "center",
513 + sorTable: false,
514 + slot: null,
515 + },
516 + {
517 + type: "",
518 + name: "ACCS原航班号",
519 + value: "fltNoAccs",
520 + width: "150",
521 + align: "center",
522 + sorTable: false,
523 + slot: null,
524 + },
525 + {
526 + type: "",
527 + name: "ACCS原航班日期",
528 + value: "fltDateAccs",
529 + width: "150",
530 + align: "center",
531 + sorTable: false,
532 + slot: null,
533 + },
534 + {
535 + type: "",
536 + name: "ACCS原航线",
537 + value: "accsFlightRoute",
538 + width: "150",
539 + align: "center",
540 + sorTable: false,
541 + slot: null,
542 + },
543 + {
544 + type: "",
545 + name: "是否RDE手工录入",
546 + value: "manualRde",
547 + width: "150",
548 + align: "center",
549 + sorTable: false,
550 + slot: null,
551 + },
552 + {
553 + type: "",
554 + name: "是否自动",
555 + value: "cargoRulesStatus",
556 + width: "150",
557 + align: "center",
558 + sorTable: false,
559 + slot: null,
560 + },
561 + {
562 + type: "",
563 + name: "发件人账号",
564 + value: "shipperAccount",
565 + width: "150",
566 + align: "center",
567 + sorTable: false,
568 + slot: null,
569 + },
570 + {
571 + type: "",
572 + name: "发件公司中文名称",
573 + value: "shipperCompany",
574 + width: "150",
575 + align: "center",
576 + sorTable: false,
577 + slot: null,
578 + },
579 + {
580 + type: "",
581 + name: "始发地城市名称",
582 + value: "originCity",
583 + width: "150",
584 + align: "center",
585 + sorTable: false,
586 + slot: null,
587 + },
588 + {
589 + type: "",
590 + name: "收件地",
591 + value: "destinationSiteName",
592 + width: "150",
593 + align: "center",
594 + sorTable: false,
595 + slot: null,
596 + },
597 + {
598 + type: "",
599 + name: "尺寸",
600 + value: "sizeStr",
601 + width: "150",
602 + align: "center",
603 + sorTable: false,
604 + slot: null,
605 + },
606 + {
607 + type: "",
608 + name: "大货预审意见(是否可以配置航班)",
609 + value: "bigPretrialOpinion",
610 + width: "300",
611 + align: "center",
612 + sorTable: false,
613 + slot: null,
614 + },
615 + {
616 + type: "",
617 + name: "大货预审时间",
618 + value: "bigPretrialTime",
619 + width: "150",
620 + align: "center",
621 + sorTable: false,
622 + slot: null,
623 + },
624 + {
625 + type: "",
626 + name: "海关回执时间",
627 + value: "customsReceiptTime",
628 + width: "150",
629 + align: "center",
630 + sorTable: false,
631 + slot: null,
632 + },
633 + {
634 + type: "",
635 + name: "航班预审时间",
636 + value: "caPretrialTime",
637 + width: "150",
638 + align: "center",
639 + sorTable: false,
640 + slot: null,
641 + },
642 + {
643 + type: "",
644 + name: "创建人",
645 + value: "createUserName",
646 + width: "150",
647 + align: "center",
648 + sorTable: false,
649 + slot: null,
650 + },
651 + {
652 + type: "",
653 + name: "创建时间",
654 + value: "createTime",
655 + width: "150",
656 + align: "center",
657 + sorTable: false,
658 + slot: null,
659 + },
660 + ], //表头数据
661 + tableData: [], //表格数据
662 + tableSelection: [], //选中数据
663 + findConditionData: [],
664 + fltTypes:[],
665 + HandlingCode: [],
666 + SubCategory: [],
667 + valueFormat: "yyyy-MM-dd",
668 + totalCount: 0,
669 + allWeight: 0,
670 + allQty: 0,
671 + dialogVisible: false,
672 + shiftKey: false,
673 + createDate: null,
674 + loading: false,
675 + downLoadingTip:{
676 + tip:"正在导出本页结果集",
677 + downloading: false,
678 + },
679 + };
680 + },
681 + created() {
682 + //查询条件
683 + new Promise((resolve,reject)=>{
684 + findFltConditionDataApi().then(res=>{
685 + if(res.code === 200){
686 + this.fltTypes = res.data.flightType
687 + }else{
688 + reject(res.msg)
689 + }
690 + }).catch(()=>{})
691 +
692 + allDictData().then(res=>{
693 + if(res.code === 200){
694 + this.HandlingCode = res.data.handlingCode;
695 + this.SubCategory = res.data.subCategory;
696 + }else{
697 + reject(res.msg)
698 + }
699 + }).catch(()=>{})
700 +
701 + findConditionData().then((res) => {
702 + if (res.code == 200) {
703 + this.findConditionData = res.data;
704 + } else {
705 + reject(res.msg)
706 + }
707 + }).catch(()=>{});
708 + }).catch(err=>{
709 + this.$message({
710 + message: "查询条件不存在",
711 + type: "warning",
712 + });
713 + })
714 +
715 + // this.select();
716 + },
717 + mounted(){
718 + window.addEventListener("keydown", (code) => {
719 + if (code.keyCode === 16 && code.shiftKey) {
720 + this.shiftKey = true;
721 + }
722 + });
723 + window.addEventListener("keyup", (code) => {
724 + if (code.keyCode === 16) {
725 + this.shiftKey = false;
726 + }
727 + });
728 + },
729 + methods: {
730 + select() {
731 + this.loading = true;
732 + findCargoData(this.formData)
733 + .then((res) => {
734 + this.loading = false;
735 + if (res.code === 200) {
736 + if (res.data.list.length > 0) {
737 + this.tableData = res.data.list;
738 + this.totalCount = res.data.totalCount;
739 + this.tableData.forEach((item,index = 0)=>{
740 + item.index = index
741 + })
742 + } else {
743 + this.$message({
744 + message: "未查询到数据",
745 + type: "warning",
746 + });
747 + }
748 + } else {
749 + this.$message({
750 + message: res.msg,
751 + type: "warning",
752 + });
753 + }
754 + })
755 + .catch(() => {
756 + this.loading = false;
757 + });
758 + },
759 + cargoTotal(){
760 + this.allWeight = 0;
761 + this.allQty = 0;
762 + if(this.tableSelection.length > 0){
763 + this.tableSelection.forEach(item=>{
764 + this.allWeight = this.allWeight + item.actualWeight;
765 + this.allQty = this.allQty + item.qty;
766 + })
767 + this.allWeight = this.allWeight.toFixed();
768 + this.allQty = this.allQty.toFixed();
769 + }
770 + },
771 + xlse(val) {},
772 + tableSelect(val) {
773 + this.tableSelection = val.selection
774 + this.cargoTotal()
775 + },
776 + tableSelectAll(val){
777 + this.tableSelection = val
778 + this.cargoTotal()
779 + },
780 + currentChange(val){
781 + this.formData.limitStart = val.start;
782 + this.formData.page = val.page;
783 + this.select()
784 + },
785 + addFit() {
786 + this.dialogVisible = true;
787 + },
788 + dialogBeforeClose(val) {
789 + this.dialogVisible = val;
790 + },
791 + },
792 + computed: {
793 + ursa: {
794 + get: function () {
795 + return this.formData.ursaList;
796 + },
797 + set: function (val) {
798 + this.formData.ursaList = val.toUpperCase();
799 + },
800 + },
801 + siteName: {
802 + get: function () {
803 + return this.formData.siteNameList;
804 + },
805 + set: function (val) {
806 + this.formData.siteNameList = val.toUpperCase();
807 + },
808 + },
809 + },
810 +};
811 +</script>
812 +
813 +<style>
814 +.tips {
815 + display: inline-block;
816 + color: #606266;
817 + font-size: 14px;
818 + margin-top: 10px;
819 + margin-left:50px;
820 +}
821 +.line{
822 + text-align: center;
823 +}
824 +</style>
...\ No newline at end of file ...\ No newline at end of file
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 + style="width: 100%"
19 + >
20 + <el-table-column type="index" label="序号" align="center">
21 + </el-table-column>
22 + <el-table-column
23 + v-for="(item, index) in cargoHeader"
24 + header-align="center"
25 + align="center"
26 + :prop="item.value"
27 + :label="item.name"
28 + :key="index"
29 + :show-overflow-tooltip="true"
30 + >
31 + </el-table-column>
32 + </el-table>
33 + <el-divider content-position="left">可配置航班信息</el-divider>
34 + <el-table
35 + :data="fltData"
36 + size="mini"
37 + height="200"
38 + max-height="200"
39 + border
40 + stripe
41 + style="width: 100%"
42 + >
43 + <el-table-column type="index" label="序号" align="center">
44 + </el-table-column>
45 + <el-table-column
46 + v-for="(item, index) in fltHeader"
47 + header-align="center"
48 + align="center"
49 + :prop="item.value"
50 + :label="item.name"
51 + :key="index"
52 + :show-overflow-tooltip="true"
53 + >
54 + </el-table-column>
55 + </el-table>
56 + <el-form
57 + ref="form"
58 + label-width="auto"
59 + style="width: 400px; margin: 30px auto"
60 + >
61 + <el-form-item label="航班号">
62 + <el-input
63 + v-model="fltNo"
64 + size="medium"
65 + placeholder="请输入航班号"
66 + style="width: 350px"
67 + ></el-input>
68 + </el-form-item>
69 + <el-form-item label="航班日期:">
70 + <el-date-picker
71 + v-model="formData.fltDate"
72 + type="date"
73 + placeholder="选择日期"
74 + value-format="yyyy-MM-dd"
75 + size="medium"
76 + style="width: 350px"
77 + >
78 + </el-date-picker>
79 + </el-form-item>
80 + </el-form>
81 + <div slot="footer">
82 + <el-button @click="dialogBeforeClose">取 消</el-button>
83 + <el-button type="primary" @click="submit">确 定</el-button>
84 + </div>
85 + </el-dialog>
86 + </div>
87 +</template>
88 +
89 +<script>
90 +import { findAllFltDataApi } from "@/api/findAllFltData";
91 +export default {
92 + props: {
93 + dialogVisible: {
94 + type: Boolean,
95 + default: false,
96 + },
97 + tableData: {
98 + type: Array,
99 + default: null,
100 + },
101 + },
102 + data() {
103 + return {
104 + formData: { fltNo: "" },
105 + fltSelect:{
106 + limitStart: 0, //当前条数【代表第几条数据 +1开始】
107 + pageNum: 1,
108 + limitSize: -1, //一页显示多少条数据
109 + fltDateStart: undefined, //航班日期开始
110 + fltDateEnd: undefined, //航班日期结束
111 + typeId: undefined, //航班类型
112 + statusId: '83937', //航班状态
113 + flightKindId: undefined, //航班种类
114 + fltNo: undefined //航班号,要大写
115 + },
116 + cargoHeader: [
117 + { name: "口岸代码", value: "portName" },
118 + { name: "运单号", value: "waybillNo" },
119 + { name: "货物状态", value: "statusName" },
120 + { name: "站点", value: "siteName" },
121 + { name: "申报类型", value: "typeName" },
122 + { name: "URSA", value: "ursa" },
123 + { name: "实际重量", value: "actualWeight" },
124 + { name: "件数", value: "qty" },
125 + { name: "品名描述", value: "nameDescription" },
126 + { name: "是否自动", value: "cargoRulesStatus" },
127 + { name: "创建人", value: "createUserName" },
128 + { name: "创建时间", value: "createTime" },
129 + ],
130 + fltHeader: [
131 + { name: "航班日期", value: "fltDate" },
132 + { name: "航班号", value: "fltNo" },
133 + { name: "航班路线", value: "route" },
134 + { name: "航班类型", value: "typeName" },
135 + { name: "总重量", value: "totalWeight" },
136 + { name: "额外增重百分比", value: "extraWeightPercent" },
137 + { name: "已配重量", value: "alloctedWeight" },
138 + { name: "配舱优先级", value: "priorityRuleName" },
139 + { name: "是否开启高地价", value: "highLowPriceFlg" },
140 + { name: "航班起飞时间", value: "takeOffTime" },
141 + { name: "创建人", value: "createUserName" },
142 + { name: "创建时间", value: "createTime" },
143 + ],
144 + fltData: [],
145 + };
146 + },
147 + methods: {
148 + submit() {
149 + this.$emit("dialogBeforeClose", false);
150 + },
151 + dialogBeforeClose() {
152 + this.$emit("dialogBeforeClose", false);
153 + },
154 + },
155 + watch:{
156 + },
157 + computed: {
158 + fltNo: {
159 + get: function () {
160 + return this.formData.fltNo;
161 + },
162 + set: function (val) {
163 + this.formData.fltNo = val.toUpperCase();
164 + },
165 + },
166 + },
167 +};
168 +</script>
169 +
170 +<style>
171 +</style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
2 <div class="cargoPage"> 2 <div class="cargoPage">
3 <el-form 3 <el-form
4 ref="cargoForm" 4 ref="cargoForm"
5 + class="form-header"
5 size="small" 6 size="small"
6 :model="formData" 7 :model="formData"
7 label-position="top" 8 label-position="top"
...@@ -307,14 +308,14 @@ ...@@ -307,14 +308,14 @@
307 <!-- <el-button type="primary" size="small" @click="checks(tableData)" 308 <!-- <el-button type="primary" size="small" @click="checks(tableData)"
308 >全选/全否</el-button 309 >全选/全否</el-button
309 > --> 310 > -->
310 - <el-button type="primary" size="small" @click="xlse(0)" v-dbClick :disabled="tableData.length==0" :loading="downloading" 311 + <el-button :type="downLoadingTip.downloading?'warning':'primary'" size="small" @click="xlse(0)" :disabled="tableData.length==0" :loading="downLoadingTip.downloading"
311 - >导出本页查询结果</el-button 312 + >{{downLoadingTip.downloading?downLoadingTip.tip:"导出本页查询结果"}}</el-button
312 > 313 >
313 - <el-button type="primary" size="small" @click="xlse(1)" v-dbClick :disabled="tableData.length==0" :loading="downloading" 314 + <el-button :type="downLoadingTip.downloading?'warning':'primary'" size="small" @click="xlse(1)" :disabled="tableData.length==0" :loading="downLoadingTip.downloading"
314 - >导出全部查询结果</el-button 315 + >{{downLoadingTip.downloading?downLoadingTip.tip:"导出全部查询结果"}}</el-button
315 > 316 >
316 <div class="tips"> 317 <div class="tips">
317 - <span style="paddingright: 50px">总重量:{{ allWeight }}</span> 318 + <span style="paddingRight: 50px">总重量:{{ allWeight }}</span>
318 <span>总件数:{{ allQty }}</span> 319 <span>总件数:{{ allQty }}</span>
319 </div> 320 </div>
320 </div> 321 </div>
...@@ -340,6 +341,7 @@ ...@@ -340,6 +341,7 @@
340 :key="item.name" 341 :key="item.name"
341 header-align="center" 342 header-align="center"
342 align="center" 343 align="center"
344 + :show-overflow-tooltip="true"
343 :width="item.value=='bigPretrialOpinion'?'300':'170'" 345 :width="item.value=='bigPretrialOpinion'?'300':'170'"
344 :formatter="formatter" 346 :formatter="formatter"
345 sortable 347 sortable
...@@ -447,7 +449,10 @@ export default { ...@@ -447,7 +449,10 @@ export default {
447 start: -1, 449 start: -1,
448 valueFormat: "yyyy-MM-dd", 450 valueFormat: "yyyy-MM-dd",
449 tableLoading: false, 451 tableLoading: false,
450 - downloading:false, 452 + downLoadingTip:{
453 + tip:"",
454 + downloading:false,
455 + },
451 totalCount: 0, 456 totalCount: 0,
452 selectTable: [], 457 selectTable: [],
453 flightTime: [], 458 flightTime: [],
...@@ -649,7 +654,7 @@ export default { ...@@ -649,7 +654,7 @@ export default {
649 }, 654 },
650 // 导出表格 655 // 导出表格
651 xlse(page) { 656 xlse(page) {
652 - this.downloading = true; 657 + this.downLoadingTip.downloading = true;
653 let cargoXlse = {title:"货物导出表",cargoConditionDto:{}}; 658 let cargoXlse = {title:"货物导出表",cargoConditionDto:{}};
654 if(this.formData.customsReceiptStatusId != null && this.formData.customsReceiptStatusId.length < 1){ 659 if(this.formData.customsReceiptStatusId != null && this.formData.customsReceiptStatusId.length < 1){
655 this.formData.customsReceiptStatusId = null; 660 this.formData.customsReceiptStatusId = null;
...@@ -686,16 +691,35 @@ export default { ...@@ -686,16 +691,35 @@ export default {
686 cargoXlse.cargoConditionDto.limitSize = this.limitSize; 691 cargoXlse.cargoConditionDto.limitSize = this.limitSize;
687 692
688 if (page == 0) { 693 if (page == 0) {
694 + this.downLoadingTip.tip = "正在导出本页结果集"
689 cargoXlse.cargoConditionDto.limitStart = this.limitStart; 695 cargoXlse.cargoConditionDto.limitStart = this.limitStart;
696 + cargoXlsx("/cargo/excel",cargoXlse).then(()=>{
697 + this.downLoadingTip.downloading = false;
698 + this.downLoadingTip.tip = ""
699 + }).catch(()=>{
700 + this.downLoadingTip.downloading = false;
701 + this.downLoadingTip.tip = ""
702 + })
690 } else { 703 } else {
691 - cargoXlse.cargoConditionDto.limitStart = 0; 704 + if(this.totalCount < 100000){
692 - cargoXlse.cargoConditionDto.limitSize = -1; 705 + this.downLoadingTip.tip = "正在导出全部结果集"
706 + cargoXlse.cargoConditionDto.limitStart = 0;
707 + cargoXlse.cargoConditionDto.limitSize = -1;
708 + cargoXlsx("/cargo/excel",cargoXlse).then(()=>{
709 + this.downLoadingTip.downloading = false;
710 + this.downLoadingTip.tip = ""
711 + }).catch(()=>{
712 + this.downLoadingTip.downloading = false;
713 + this.downLoadingTip.tip = ""
714 + })
715 + }else{
716 + this.downLoadingTip.downloading = false;
717 + this.$message({
718 + message: "数据量过大无法导出",
719 + type: "warning",
720 + });
721 + }
693 } 722 }
694 - cargoXlsx("/cargo/excel",cargoXlse).then(()=>{
695 - this.downloading = false;
696 - }).catch(()=>{
697 - this.downloading = false;
698 - })
699 }, 723 },
700 //表格格式化 724 //表格格式化
701 formatter(row,column,cellValue,index){ 725 formatter(row,column,cellValue,index){
...@@ -753,8 +777,4 @@ export default { ...@@ -753,8 +777,4 @@ export default {
753 font-size: 14px; 777 font-size: 14px;
754 margin-right: 40px; 778 margin-right: 40px;
755 } 779 }
756 -.formItem {
757 - width:100%;
758 - max-width: 300px;
759 -}
760 </style> 780 </style>
...\ No newline at end of file ...\ No newline at end of file
......