index.vue
27.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
<template>
<div class="cargoPage">
<el-form ref="cargoForm" class="form-header" label-position="right" label-width="auto" size="small"
:model="formData">
<el-row type="flex" style="flexWrap: wrap !important">
<el-col :span="6">
<el-form-item label="配舱航班日期">
<el-date-picker class="formItem" v-model="cargoPlaneTime" type="daterange" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" :value-format="valueFormat" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关回执状态">
<el-select v-model="formData.customsReceiptStatusId" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in findConditionData.cargoCustomsReturnStatus" :label="item.chineseName"
:value="item.id" :key="item.id">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申报类别">
<el-select placeholder="不限" v-model="formData.typeId" class="formItem" clearable>
<el-option v-for="item in findConditionData.cargoType" :label="item.chineseName" :value="item.id"
:key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="服务类型">
<el-select v-model="formData.serviceTypeId" class="formItem" filterable multiple clearable placeholder="不限">
<el-option v-for="item in findConditionData.cargoServiceType" :label="item.chineseName" :value="item.id"
:key="item.id">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运单号">
<el-input ref='userInfo' type="textarea" v-model="formData.waybillNo" class="formItem"
placeholder="请输入运单号(回车间隔)" :rows="4" :maxlength="12000" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="配载航班号">
<el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :rows="4"
clearable @change="planeNoChange"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="URSA">
<el-input type="textarea" v-model="ursa" class="formItem" placeholder="S_;P_;E2" :rows="4" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" :rows="4" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col v-show="formShow">
<el-row type="flex" style="flexWrap: wrap !important">
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
<el-date-picker class="formItem" v-model="flightTime" type="daterange" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" :value-format="valueFormat" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input type="text" v-model="fltNo" class="formItem" placeholder="请输入ACCS航班号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="取件日期">
<el-date-picker class="formItem" v-model="formData.pickUpDate" type="date" placeholder="选择日期"
:value-format="valueFormat" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建日期">
<el-date-picker class="formItem" v-model="createDate" type="daterange" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" :value-format="valueFormat" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCSpool">
<el-select placeholder="不限" v-model="formData.accsPool" class="formItem" clearable>
<el-option value="Pre-MDE" key="Pre-MDE">
</el-option>
<el-option value="OSPR" key="OSPR">
</el-option>
<el-option value="Manifest" key="Manifest">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="货物状态">
<el-select placeholder="不限" v-model="formData.statusId" class="formItem" filterable clearable>
<el-option v-for="item in findConditionData.cargoStatus" :label="item.chineseName" :value="item.id"
:key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否自动">
<el-select placeholder="不限" v-model="formData.allocationTypeId" class="formItem" clearable>
<el-option label="手动" value="1"> </el-option>
<el-option label="自动" value="2"> </el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="配舱状态">
<el-select placeholder="不限" v-model="formData.hasFlight" class="formItem" clearable>
<el-option label="已配" value="1"> </el-option>
<el-option label="未配" value="0"> </el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<template slot="label">
<div style="display:inline-block">配载航线
<el-tooltip class="item" effect="dark" content="选择航线需要先输入配载航班号,才能选择对应得航线" placement="top-start">
<span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span>
</el-tooltip>
</div>
</template>
<el-select class="formItem" v-model="formData.cargoPlaneRoute" placeholder="不限"
:disabled="routeList.length == 0" clearable @change="routeSelectChange"
:key="formData.cargoPlaneRoute">
<el-option v-for="(item, index) in routeList" :label="item" :value="item" :key="item">
<Tooltips :content="item" :refName="item"></Tooltips>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
<div class="pl10 mt20">
<el-button type="primary" icon="el-icon-search" size="small" :loading="tableLoading" @click="select(0)">查询
</el-button>
<el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="small" @click="xlse(0)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="small" @click="xlse(1)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']"
@click="release">释放舱位</el-button>
<span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
<el-progress v-if="progress != 0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress"
:status="progress == 100 ? 'success' : 'warning'"></el-progress>
<div class="tips">
<span style="paddingRight: 50px">总重量:{{ allWeight }}</span>
<span>总件数:{{ allQty }}</span>
</div>
<div class="formShow">
<el-tooltip :content="formShow ? '隐藏查询条件' : '显示查询条件'" placement="top">
<el-button class="mr20" icon="el-icon-search" size="mini" @click="formShow = !formShow" circle></el-button>
</el-tooltip>
<el-tooltip content="表格设置" placement="top">
<HeaderSetting tableName="cargo" class="mr20" style="float:right;line-height: 48px;"
@close="headerSetClose"></HeaderSetting>
</el-tooltip>
</div>
</div>
</el-form>
<Tables ref="newTables" ductName="cargo" :data="tableData" :headerData="tableHeader" :selection="true" :order="true"
:totalCount="totalCount" :loading="tableLoading" :limitSize="limitSize" :limitStart="limitStart" :page="page"
:shiftKey="shiftKey" :pageSizes="[100]" :height="tableHeight" @sizeChange="sizeChange" @tableSelect="tableSelect"
@tableSelectAll="tableSelectAll" @currentChange="currentChange" @sortChange="sortChange">
<template v-slot:waybillNo="scope">
<el-link type="primary" @click="logView(scope.row)">
{{
scope.row.waybillNo
}}<i class="el-icon-link"></i> </el-link>
</template>
</Tables>
<el-dialog title="舱位释放结果" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false"
:show-close="false" :append-to-body="true">
<el-table :data="selectTable" size="mini" border stripe highlight-current-row style="width: 100%">
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column v-for="(item, index) in releaseHeader" header-align="center" :align="item.align"
:prop="item.value" :label="item.name" :width="item.width" :key="index" :show-overflow-tooltip="true">
</el-table-column>
</el-table>
<div slot="footer">
<el-button type="primary" @click="close">确 定</el-button>
</div>
</el-dialog>
<Dialog :dialogVisible="openView" :cargoData="cargoLog" @close="viewClose" />
</div>
</template>
<script>
import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes } from "@/api/cargoSelect";
import { downLoadXlsx } from "@/utils/zipdownload";
import Dialog from "./dialog.vue";
export default {
name: "QueryCargo",
components: {
Dialog
},
data() {
return {
formData: {
fltDateStart: "",
fltDateEnd: "",
prematchFltDateStart: "",
prematchFltDateEnd: "",
createTimeStart: null,
createTimeEnd: null,
pickUpDate: null,
hasFlight: null,
waybillNo: "",
siteName: "",
fltNo: "",
mawbCode: "",
ursa: "",
typeId: null,
statusId: null,
serviceTypeId: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
dataSources: "",
customsReceiptStatusId: null,
big: null,
cargoPlaneNo: null,
cargoPlaneStart: null,
cargoPlaneEnd: null,
cargoPlaneRoute: null,
limitStart: 1,
limitSize: 100,
}, //表单数据
tableHeader: [], //表头数据
releaseHeader: [
{
name: "提示信息",
value: "msg",
width: "550",
align: "center",
},
{
name: "口岸代码",
value: "portName",
width: "",
align: "center",
},
{
name: "运单号",
value: "waybillNo",
width: "",
align: "center",
},
{
name: "释放状态",
value: "releasing",
width: "",
align: "center",
},
{
name: "ACCSpool",
value: "accsPool",
width: "",
align: "center",
},
{
name: "货物状态",
value: "statusName",
width: "",
align: "center",
},
{
name: "ACCS原航班号",
value: "fltNoAccs",
width: "",
align: "center",
},
{
name: "ACCS原航班日期",
value: "fltDateAccs",
width: "",
align: "center",
},
],
findConditionData: {}, //货物查询条件
tableData: [], //表格数据
cargoLog: {},
routeList: [],
allWeight: 0,//总重量
allQty: 0,//总件数
shiftKey: false,
valueFormat: "yyyy-MM-dd",
tableLoading: false,
downLoadingTip: {
tip: "",
downloading: false,
}, //导出状态
totalCount: 0,
selectTable: [],
flightTime: [],
prepalyFlightTime: [],
cargoPlaneTime: [],
createDate: [],
limitStart: 1,
limitSize: 100, //无限制-1
page: 1,
progress: 0,
tableHeight: null,
dialogVisible: false,
openView: false,
formShow: true, //菜单隐藏
};
},
created() {
this.findCondition()
if (this.$store.getters.tableHeader) {
this.tableHeader = this.$store.getters.tableHeader['cargo']
} else {
this.tableHeader = this.tableHeaders['cargo']
}
},
activated() {
this.selectTable = []
this.cargoTotal()
if (this.$route.params.fltNo) {
//判断进入页面是否带参,确定是否是index跳转
this.formData = {
fltDateStart: "",
fltDateEnd: "",
prematchFltDateStart: "",
prematchFltDateEnd: "",
createTimeStart: null,
createTimeEnd: null,
pickUpDate: null,
hasFlight: null,
waybillNo: "",
siteName: "",
fltNo: "",
mawbCode: "",
ursa: "",
typeId: null,
statusId: null,
serviceTypeId: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
dataSources: "",
customsReceiptStatusId: null,
big: null,
cargoPlaneNo: null,
cargoPlaneStart: null,
cargoPlaneEnd: null,
limitStart: 1,
limitSize: 100,
}
this.cargoPlaneTime = [this.$route.params.fltDate, this.$route.params.fltDate]
this.formData.cargoPlaneStart = this.$route.params.fltDate
this.formData.cargoPlaneEnd = this.$route.params.fltDate
this.formData.cargoPlaneNo = this.$route.params.fltNo
this.formData.cargoPlaneRoute = this.$route.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
} else {
//否则请求原页面缓存状态
if (this.$store.state.tagsView.cachedViews.length > 0) {
this.$store.state.tagsView.cachedViews.forEach(item => {
if (item === 'QueryCargo') {
this.findCondition()
this.totalCount > 0 ? this.select() : ''
}
})
}
}
},
deactivated() {
this.tableData = []
},
mounted() {
window.addEventListener("keydown", (code) => {
if (code.keyCode === 16 && code.shiftKey) {
this.shiftKey = true;
}
});
window.addEventListener("keyup", (code) => {
if (code.keyCode === 16) {
this.shiftKey = false;
}
});
this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50
},
watch: {
$route: {
handler(to, from) {
if (to.name === 'Index') {
this.formData = {
fltDateStart: "",
fltDateEnd: "",
prematchFltDateStart: "",
prematchFltDateEnd: "",
createTimeStart: null,
createTimeEnd: null,
pickUpDate: null,
hasFlight: null,
waybillNo: "",
siteName: "",
fltNo: "",
mawbCode: "",
ursa: "",
typeId: null,
statusId: null,
serviceTypeId: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
dataSources: "",
customsReceiptStatusId: null,
big: null,
cargoPlaneNo: null,
cargoPlaneStart: null,
cargoPlaneEnd: null,
limitStart: 1,
limitSize: 100,
}
this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate]
this.formData.cargoPlaneStart = from.params.fltDate
this.formData.cargoPlaneEnd = from.params.fltDate
this.formData.cargoPlaneNo = from.params.fltNo
this.formData.cargoPlaneRoute = from.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
}
}
},
formShow(val, oldVal) {
this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 120
},
},
methods: {
clear() {
this.$refs.cargoForm.resetFields();
},
// 查询条件
async findCondition() {
findConditionData().then((res) => {
if (res.code == 200) {
this.findConditionData = res.data;
} else {
this.msgWarning('查询条件不存在')
}
});
},
//查询
async select(val) {
this.tableData = [];
this.allWeight = 0;
this.allQty = 0;
this.tableLoading = true;
this.dataInfo();
if (val === 0) {
this.formData.limitStart = 1;
this.limitStart = 1;
this.page = 1;
}
findCargoData(this.formData)
.then((res) => {
setTimeout(() => {
if (res.code == 200) {
this.tableData = res.data.list;
this.totalCount = res.data.totalCount;
if (res.data.list.length > 0) {
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].index = i;
}
} else {
this.msgWarning('未查询到数据')
}
} else {
this.msgWarning(res.msg)
}
this.tableLoading = false;
})
})
.catch(() => {
this.tableLoading = false;
});
this.$refs.newTables.clearTable();
this.cargoTotal();
},
//释放仓位
release() {
let idList = []
this.selectTable.map(item => {
item.msg = ''
idList.push(item.id)
})
releaseCargo(idList).then(res => {
if (res.code === 200) {
this.msgSuccess(res.msg)
this.select()
} else if (res.code === 201) {
this.selectTable.map(item => {
res.data['success'].map(val => {
val === item.id ? item.msg = item.msg + '操作成功,正在释放中。' : ''
})
res.data['accsPoolFlase'].map(val => {
val === item.id ? item.msg = item.msg + 'Manifest状态不能释放。' : ''
})
res.data['existReleasing'].map(val => {
val === item.id ? item.msg = item.msg + '正在释放中,请勿重复释放。' : ''
})
res.data['noFlight'].map(val => {
val === item.id ? item.msg = item.msg + '已释放仓位。' : ''
})
res.data['pushFalse'].map(val => {
val === item.id ? item.msg = item.msg + '该货物配舱结果已回推ACCS,不能释放。' : ''
})
})
this.dialogVisible = true
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//关闭弹窗
close() {
this.dialogVisible = false
this.selectTable = []
this.select()
},
//数据初始化
dataInfo() {
if (this.formData.serviceTypeId != null && this.formData.serviceTypeId.length < 1) {
this.formData.serviceTypeId = null
}
if (
this.formData.customsReceiptStatusId != null &&
this.formData.customsReceiptStatusId.length < 1
) {
this.formData.customsReceiptStatusId = null;
}
if (this.createDate != null && this.createDate.length > 0) {
this.formData.createTimeStart = this.createDate[0];
this.formData.createTimeEnd = this.createDate[1];
} else {
this.formData.createTimeStart = null;
this.formData.createTimeEnd = null;
}
if (this.prepalyFlightTime != null && this.prepalyFlightTime.length > 0) {
this.formData.prematchFltDateStart = this.prepalyFlightTime[0];
this.formData.prematchFltDateEnd = this.prepalyFlightTime[1];
} else {
this.formData.prematchFltDateStart = "";
this.formData.prematchFltDateEnd = "";
}
if (this.flightTime != null && this.flightTime.length > 0) {
this.formData.fltDateStart = this.flightTime[0];
this.formData.fltDateEnd = this.flightTime[1];
} else {
this.formData.fltDateStart = "";
this.formData.fltDateEnd = "";
}
if (this.cargoPlaneTime != null && this.cargoPlaneTime.length > 0) {
this.formData.cargoPlaneStart = this.cargoPlaneTime[0];
this.formData.cargoPlaneEnd = this.cargoPlaneTime[1];
} else {
this.formData.cargoPlaneStart = null;
this.formData.cargoPlaneEnd = null;
}
if (this.formData.waybillNo) {
this.formData.waybillNo = this.formData.waybillNo.trim();
}
if (this.formData.hasFlight == "") {
this.formData.hasFlight = null
}
this.formData.limitStart = this.limitStart;
this.formData.limitSize = 100;
},
//总和
cargoTotal() {
this.allWeight = 0;
this.allQty = 0;
if (this.selectTable.length > 0) {
this.selectTable.forEach((item) => {
this.allWeight = this.allWeight + item.actualWeight;
this.allQty = this.allQty + item.qty;
});
this.allWeight = this.allWeight.toFixed(2);
this.allQty = this.allQty.toFixed();
}
},
//表格多选
tableSelect(val) {
this.selectTable = val.selection;
this.cargoTotal();
},
//表格全选
tableSelectAll(val) {
this.selectTable = val;
this.cargoTotal();
},
//分页
currentChange(val) {
this.formData.limitStart = val.start;
this.limitStart = val.start;
this.page = val.page;
this.select();
},
//配载航班号获取航线
planeNoChange(val) {
getFlightsRoutes(val.split(';')).then(res => {
if (res.code === 200) {
this.routeList = res.data
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
routeSelectChange(val) {
this.$forceUpdate()
// this.formData.cargoPlaneRoute = val
},
//排序
sortChange(val) {
let data = [];
let nullData = [];
this.tableData.forEach((item) => {
if (item[val.prop]) {
data.push(item);
} else {
nullData.push(item);
}
});
data = data.sort(this.$refs.newTables.compare(val.prop, val.order));
if (val.order != "ascending") {
this.tableData = nullData.concat(data);
} else {
this.tableData = data.concat(nullData);
}
this.tableData.forEach((item, index = 0) => {
item.index = index;
});
},
sizeChange(val) {
this.limitSize = val
this.select(0);
},
// 导出表格
xlse(page) {
this.progress = 1;
this.downLoadingTip.downloading = true;
let cargoXlse = { title: "货物导出表", cargoConditionDto: {} };
this.dataInfo();
cargoXlse.cargoConditionDto = this.formData;
cargoXlse.cargoConditionDto.limitSize = this.limitSize;
if (page == 0) {
this.downLoadingTip.tip = "正在导出本页结果集";
cargoXlse.cargoConditionDto.limitStart = this.limitStart;
downLoadXlsx("/cargo/excel", cargoXlse, "货物表")
.then(() => {
this.downLoadingTip.downloading = false;
this.downLoadingTip.tip = "";
this.progress = 100;
})
.catch(() => {
this.downLoadingTip.downloading = false;
this.downLoadingTip.tip = "";
});
} else {
if (this.totalCount < 80000) {
this.downLoadingTip.tip = "正在导出全部结果集请耐心等待";
cargoXlse.cargoConditionDto.limitStart = 0;
cargoXlse.cargoConditionDto.limitSize = -1;
downLoadXlsx("/cargo/excel", cargoXlse, "货物表")
.then(() => {
this.downLoadingTip.downloading = false;
this.downLoadingTip.tip = "";
this.progress = 100;
})
.catch(() => {
this.downLoadingTip.downloading = false;
this.downLoadingTip.tip = "";
});
} else {
this.downLoadingTip.downloading = false;
this.msgWarning('导出数据量过大,请不要超过8万条')
}
}
},
//查看日志
logView(val) {
this.cargoLog = val
this.openView = true
},
//关闭日志
viewClose() {
this.openView = false
},
//设置关闭
headerSetClose(val) {
if (val == 1) {
this.tableHeader = []
this.tableData = []
this.$nextTick(() => {
this.tableHeader = this.$store.getters.tableHeader['cargo']
this.select()
})
}
}
},
computed: {
fltNo: {
get: function () {
return this.formData.fltNo;
},
set: function (val) {
this.formData.fltNo = this.upCase(val);
},
},
siteName: {
get: function () {
return this.formData.siteName;
},
set: function (val) {
this.formData.siteName = this.upCase(val);
},
},
ursa: {
get: function () {
return this.formData.ursa;
},
set: function (val) {
this.formData.ursa = this.upCase(val);
},
},
cargoPlaneNo: {
get: function () {
return this.formData.cargoPlaneNo;
},
set: function (val) {
this.formData.cargoPlaneNo = this.upCase(val);
},
},
},
};
</script>
<style lang="scss" scoped>
.tips {
display: inline-block;
color: #606266;
font-size: 14px;
margin-top: 10px;
margin-left: 50px;
}
.progress {
width: 200px;
display: inline-block;
margin: 0 0 0 20px;
}
.formShow {
width: max-content;
height: 48px;
line-height: 48px;
font-weight: 900;
color: rgb(64, 158, 255);
font-size: 14px;
float: right;
margin-right: 5px;
}
</style>