jinhui.wang

更新代码

1 -<template>
2 - <div class="cargoAllocation">
3 - <el-form
4 - ref="form"
5 - v-model="formData"
6 - class="form-header"
7 - label-position="right"
8 - label-width="auto"
9 - size="small"
10 - >
11 - <el-row type="flex" style="flexWrap: wrap !important">
12 - <el-col :span="6">
13 - <el-form-item label="ACCS原航班日期">
14 - <el-date-picker
15 - class="formItem"
16 - type="daterange"
17 - range-separator="至"
18 - start-placeholder="开始日期"
19 - end-placeholder="结束日期"
20 - v-model="fltDate"
21 - :value-format="valueFormat"
22 - >
23 - </el-date-picker>
24 - </el-form-item>
25 - </el-col>
26 - <el-col :span="6">
27 - <el-form-item label="ACCS原航班号">
28 - <el-input
29 - v-model="fltNo"
30 - placeholder="请输入ACCS原航班号"
31 - class="formItem"
32 - clearable
33 - ></el-input>
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 selectData.findConditionData
47 - .cargoCustomsReturnStatus"
48 - :label="item.chineseName"
49 - :value="item.id"
50 - :key="item.id"
51 - >
52 - </el-option>
53 - </el-select>
54 - </el-form-item>
55 - </el-col>
56 - <el-col :span="6">
57 - <el-form-item label="货物状态">
58 - <el-select
59 - placeholder="不限"
60 - v-model="formData.statusId"
61 - class="formItem"
62 - clearable
63 - >
64 - <el-option
65 - v-for="item in selectData.findConditionData.cargoStatus"
66 - :label="item.chineseName"
67 - :value="item.id"
68 - :key="item.id"
69 - >
70 - </el-option>
71 - </el-select>
72 - </el-form-item>
73 - </el-col>
74 - <el-col :span="6">
75 - <el-form-item label="运单号">
76 - <el-input
77 - class="formItem"
78 - type="textarea"
79 - placeholder="请输入运单号(回车分割)"
80 - :autosize="true"
81 - v-model="formData.waybillNo"
82 - ></el-input>
83 - </el-form-item>
84 - </el-col>
85 - <el-col :span="6">
86 - <el-form-item label="申报类别">
87 - <el-select
88 - placeholder="不限"
89 - v-model="formData.typeId"
90 - class="formItem"
91 - clearable
92 - >
93 - <el-option
94 - v-for="item in selectData.findConditionData.cargoType"
95 - :label="item.chineseName"
96 - :value="item.id"
97 - :key="item.id"
98 - >
99 - </el-option>
100 - </el-select>
101 - </el-form-item>
102 - </el-col>
103 - <el-col :span="6">
104 - <el-form-item label="服务类型">
105 - <el-select
106 - placeholder="不限"
107 - v-model="formData.serviceTypeId"
108 - class="formItem"
109 - clearable
110 - >
111 - <el-option
112 - v-for="item in selectData.findConditionData.cargoServiceType"
113 - :label="item.chineseName"
114 - :value="item.id"
115 - :key="item.id"
116 - >
117 - </el-option>
118 - </el-select>
119 - </el-form-item>
120 - </el-col>
121 - <el-col :span="6">
122 - <el-form-item label="URSA">
123 - <el-input
124 - class="formItem"
125 - type="textarea"
126 - placeholder="S_;P_;E2"
127 - v-model="ursa"
128 - :autosize="true"
129 - ></el-input>
130 - </el-form-item>
131 - </el-col>
132 - <el-col :span="6">
133 - <el-form-item label="站点">
134 - <el-input
135 - class="formItem"
136 - type="textarea"
137 - placeholder="PVG;PEK"
138 - v-model="siteName"
139 - :autosize="true"
140 - ></el-input>
141 - </el-form-item>
142 - </el-col>
143 - <el-col :span="6">
144 - <el-form-item label="重量区间">
145 - <el-row>
146 - <el-col :span="11"
147 - ><el-input-number
148 - class="formItem"
149 - size="mini"
150 - v-model="formData.minWeight"
151 - :controls="false"
152 - :min="0"
153 - :precision="2"
154 - ></el-input-number
155 - ></el-col>
156 - <el-col class="line" :span="2">-</el-col>
157 - <el-col :span="11"
158 - ><el-input-number
159 - class="formItem"
160 - size="mini"
161 - v-model="formData.maxWeight"
162 - :controls="false"
163 - :min="formData.minWeight"
164 - :precision="2"
165 - ></el-input-number
166 - ></el-col>
167 - </el-row>
168 - </el-form-item>
169 - </el-col>
170 - <el-col :span="6">
171 - <el-form-item label="件数区间">
172 - <el-row>
173 - <el-col :span="11"
174 - ><el-input-number
175 - class="formItem"
176 - size="mini"
177 - v-model="formData.minNumber"
178 - :controls="false"
179 - :min="0"
180 - ></el-input-number
181 - ></el-col>
182 - <el-col class="line" :span="2">-</el-col>
183 - <el-col :span="11"
184 - ><el-input-number
185 - class="formItem"
186 - size="mini"
187 - v-model="formData.maxNumber"
188 - :controls="false"
189 - :min="formData.minNumber"
190 - ></el-input-number
191 - ></el-col>
192 - </el-row>
193 - </el-form-item>
194 - </el-col>
195 - <!-- <el-col :span="6">
196 - <el-form-item label="航班类型">
197 - <el-select
198 - placeholder="不限"
199 - v-model="formData.kindToAllocFlightId"
200 - class="formItem"
201 - clearable
202 - >
203 - <el-option
204 - v-for="item in selectData.fltTypes"
205 - :label="item.chineseName"
206 - v-model="item.id"
207 - :key="item.id"
208 - >
209 - </el-option>
210 - </el-select>
211 - </el-form-item>
212 - </el-col> -->
213 - <el-col :span="6">
214 - <el-form-item label="取件日期">
215 - <el-date-picker
216 - v-model="formData.pickUpDate"
217 - type="date"
218 - placeholder="选择日期"
219 - :value-format="valueFormat"
220 - >
221 - </el-date-picker>
222 - </el-form-item>
223 - </el-col>
224 - <el-col :span="6">
225 - <el-form-item label="口岸代码">
226 - <el-input
227 - v-model="portName"
228 - placeholder="请输入口岸代码"
229 - class="formItem"
230 - clearable
231 - ></el-input>
232 - </el-form-item>
233 - </el-col>
234 - <el-col :span="24">
235 - <el-form-item label="Handling Code">
236 - <el-empty
237 - description="暂无数据"
238 - v-if="
239 - !selectData.HandlingCode || selectData.HandlingCode.length == 0
240 - "
241 - ></el-empty>
242 - <el-checkbox-group v-model="handingCodes" v-else>
243 - <el-checkbox
244 - v-for="item in selectData.HandlingCode"
245 - :label="item.chineseName"
246 - v-model="item.englishName"
247 - :key="item.id"
248 - ></el-checkbox>
249 - </el-checkbox-group>
250 - </el-form-item>
251 - </el-col>
252 - <el-col :span="24">
253 - <el-form-item label="Sub Category">
254 - <el-empty
255 - description="暂无数据"
256 - v-if="
257 - !selectData.SubCategory || selectData.SubCategory.length == 0
258 - "
259 - ></el-empty>
260 - <el-checkbox-group v-model="subCategorys" v-else>
261 - <el-checkbox
262 - v-for="item in selectData.SubCategory"
263 - :label="item.chineseName"
264 - v-model="item.englishName"
265 - :key="item.id"
266 - ></el-checkbox>
267 - </el-checkbox-group>
268 - </el-form-item>
269 - </el-col>
270 - </el-row>
271 - <div style="margin: 0 0 0 10px">
272 - <el-button
273 - type="primary"
274 - icon="el-icon-search"
275 - size="mini"
276 - :loading="loading"
277 - @click="select(0)"
278 - >查询</el-button
279 - >
280 - <el-button
281 - :type="downLoadingTip.downloading ? 'warning' : 'primary'"
282 - size="mini"
283 - @click="xlsx(0)"
284 - :loading="downLoadingTip.downloading"
285 - :disabled="tableData.length <= 0"
286 - >{{
287 - downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
288 - }}</el-button
289 - >
290 - <el-button
291 - :type="downLoadingTip.downloading ? 'warning' : 'primary'"
292 - size="mini"
293 - @click="xlsx(1)"
294 - :loading="downLoadingTip.downloading"
295 - :disabled="tableData.length <= 0"
296 - >{{
297 - downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
298 - }}</el-button
299 - >
300 - <el-button
301 - type="primary"
302 - size="mini"
303 - @click="addFit"
304 - :disabled="tableSelection.length <= 0"
305 - >添加到航班</el-button
306 - >
307 - <div class="tips">
308 - <span style="paddingRight: 50px">总重量:{{ allWeight }}</span>
309 - <span>总件数:{{ allQty }}</span>
310 - </div>
311 - </div>
312 - </el-form>
313 - <Tables
314 - ref="newTables"
315 - :data="tableData"
316 - :headerData="tableHeader"
317 - :totalCount="totalCount"
318 - :loading="loading"
319 - :limitSize="size"
320 - :limitStart="formData.limitStart"
321 - :page="page"
322 - :shiftKey="shiftKey"
323 - height="350"
324 - @tableSelect="tableSelect"
325 - @tableSelectAll="tableSelectAll"
326 - @currentChange="currentChange"
327 - @sortChange="sortChange"
328 - ></Tables>
329 - <Dialog
330 - :tableData="tableSelection"
331 - :dialogVisible="dialogVisible"
332 - @dialogBeforeClose="dialogBeforeClose"
333 - ></Dialog>
334 - </div>
335 -</template>
336 -
337 -<script>
338 -import Dialog from "./info.vue";
339 -import { findConditionData, findCargoAllocationData } from "@/api/cargoSelect";
340 -import { allDictData } from "@/api/destinationFlight";
341 -// import { findFltConditionDataApi } from "@/api/findAllFltData";
342 -import { downLoadXlsx } from "@/utils/zipdownload";
343 -import { upCase } from "@/utils/FedEx";
344 -
345 -export default {
346 - name: "CargoAllocation",
347 - components: {
348 - Dialog,
349 - },
350 - data() {
351 - return {
352 - formData: {
353 - fltDateStart: null,
354 - fltDateEnd: null,
355 - typeId: null,
356 - portName: null,
357 - statusId: null,
358 - kindToAllocFlightId: null,
359 - serviceTypeId: null,
360 - waybillNo: null,
361 - fltNo: null,
362 - ursaList: null,
363 - siteNameList: null,
364 - minWeight: undefined,
365 - maxWeight: undefined,
366 - minNumber: undefined,
367 - maxNumber: undefined,
368 - pickUpDate: null,
369 - handingCodes: null,
370 - subCategorys: null,
371 - customsReceiptStatusId: null,
372 - }, //查询数据
373 - tableHeader: [
374 - {
375 - type: "selection",
376 - name: "",
377 - value: "",
378 - width: "50",
379 - align: "center",
380 - sorTable: false,
381 - fixed: true,
382 - },
383 - {
384 - type: "index",
385 - name: "",
386 - value: "",
387 - width: "50",
388 - align: "center",
389 - sorTable: false,
390 - fixed: false,
391 - },
392 - {
393 - type: "",
394 - name: "口岸代码",
395 - value: "portName",
396 - width: "150",
397 - align: "center",
398 - sorTable: true,
399 - fixed: false,
400 - },
401 - {
402 - type: "",
403 - name: "取件日期",
404 - value: "pickUpDate",
405 - width: "150",
406 - align: "center",
407 - sorTable: true,
408 - fixed: false,
409 - },
410 - {
411 - type: "",
412 - name: "取件扫描号",
413 - value: "pickUpScanNo",
414 - width: "150",
415 - align: "center",
416 - sorTable: true,
417 - fixed: false,
418 - },
419 - {
420 - type: "",
421 - name: "站点",
422 - value: "siteName",
423 - width: "150",
424 - align: "center",
425 - sorTable: true,
426 - fixed: false,
427 - },
428 - {
429 - type: "",
430 - name: "运单号",
431 - value: "waybillNo",
432 - width: "150",
433 - align: "center",
434 - sorTable: true,
435 - fixed: false,
436 - },
437 - {
438 - type: "",
439 - name: "总单号",
440 - value: "totalWaybillNo",
441 - width: "150",
442 - align: "center",
443 - sorTable: true,
444 - fixed: false,
445 - },
446 - {
447 - type: "",
448 - name: "服务类型",
449 - value: "serviceTypeName",
450 - width: "150",
451 - align: "center",
452 - sorTable: true,
453 - fixed: false,
454 - },
455 - {
456 - type: "",
457 - name: "服务代码",
458 - value: "serviceCode",
459 - width: "150",
460 - align: "center",
461 - sorTable: false,
462 - fixed:false,
463 - },
464 - {
465 - type: "",
466 - name: "URSA",
467 - value: "ursa",
468 - width: "150",
469 - align: "center",
470 - sorTable: true,
471 - fixed: false,
472 - },
473 - {
474 - type: "",
475 - name: "申报类型",
476 - value: "typeName",
477 - width: "150",
478 - align: "center",
479 - sorTable: true,
480 - fixed: false,
481 - },
482 - {
483 - type: "",
484 - name: "HandlingCode",
485 - value: "handingCode",
486 - width: "150",
487 - align: "center",
488 - sorTable: true,
489 - fixed: false,
490 - },
491 - {
492 - type: "",
493 - name: "subcategory",
494 - value: "subCategory",
495 - width: "150",
496 - align: "center",
497 - sorTable: true,
498 - fixed: false,
499 - },
500 - {
501 - type: "",
502 - name: "件数",
503 - value: "qty",
504 - width: "150",
505 - align: "center",
506 - sorTable: true,
507 - fixed: false,
508 - },
509 - {
510 - type: "",
511 - name: "实际重量",
512 - value: "actualWeight",
513 - width: "150",
514 - align: "center",
515 - sorTable: true,
516 - fixed: false,
517 - },
518 - {
519 - type: "",
520 - name: "收件人国家代码",
521 - value: "consigneeCountry",
522 - width: "150",
523 - align: "center",
524 - sorTable: true,
525 - fixed: false,
526 - },
527 - {
528 - type: "",
529 - name: "品名描述",
530 - value: "nameDescription",
531 - width: "150",
532 - align: "center",
533 - sorTable: false,
534 - fixed: false,
535 - },
536 - {
537 - type: "",
538 - name: "海关回执状态",
539 - value: "customsReceiptStatusName",
540 - width: "150",
541 - align: "center",
542 - sorTable: true,
543 - fixed: false,
544 - },
545 - {
546 - type: "",
547 - name: "预审状态",
548 - value: "preQualificationStatus",
549 - width: "150",
550 - align: "center",
551 - sorTable: true,
552 - fixed: false,
553 - },
554 - {
555 - type: "",
556 - name: "航班预审意见",
557 - value: "caPretrialOpinion",
558 - width: "150",
559 - align: "center",
560 - sorTable: false,
561 - fixed: false,
562 - },
563 - {
564 - type: "",
565 - name: "货物状态",
566 - value: "statusName",
567 - width: "150",
568 - align: "center",
569 - sorTable: true,
570 - fixed: false,
571 - },
572 - {
573 - type: "",
574 - name: "终配航班号",
575 - value: "finalFlightNo",
576 - width: "150",
577 - align: "center",
578 - sorTable: true,
579 - fixed: false,
580 - },
581 - {
582 - type: "",
583 - name: "终配航班日期",
584 - value: "finalFlightTime",
585 - width: "150",
586 - align: "center",
587 - sorTable: true,
588 - fixed: false,
589 - },
590 - {
591 - type: "",
592 - name: "二配航班号",
593 - value: "twoMatchFlightNo",
594 - width: "150",
595 - align: "center",
596 - sorTable: true,
597 - fixed: false,
598 - },
599 - {
600 - type: "",
601 - name: "二配航班日期",
602 - value: "twoMatchFlightTime",
603 - width: "150",
604 - align: "center",
605 - sorTable: true,
606 - fixed: false,
607 - },
608 - {
609 - type: "",
610 - name: "预配航班号",
611 - value: "preplanFlightNo",
612 - width: "150",
613 - align: "center",
614 - sorTable: true,
615 - fixed: false,
616 - },
617 - {
618 - type: "",
619 - name: "预配航班日期",
620 - value: "preplanFlightTime",
621 - width: "150",
622 - align: "center",
623 - sorTable: true,
624 - fixed: false,
625 - },
626 - {
627 - type: "",
628 - name: "ACCS原航班号",
629 - value: "fltNoAccs",
630 - width: "150",
631 - align: "center",
632 - sorTable: true,
633 - fixed: false,
634 - },
635 - {
636 - type: "",
637 - name: "ACCS原航班日期",
638 - value: "fltDateAccs",
639 - width: "150",
640 - align: "center",
641 - sorTable: true,
642 - fixed: false,
643 - },
644 - {
645 - type: "",
646 - name: "ACCS原航线",
647 - value: "accsFlightRoute",
648 - width: "150",
649 - align: "center",
650 - sorTable: true,
651 - fixed: false,
652 - },
653 - {
654 - type: "",
655 - name: "是否RDE手工录入",
656 - value: "manualRde",
657 - width: "170",
658 - align: "center",
659 - sorTable: true,
660 - fixed: false,
661 - },
662 - {
663 - type: "",
664 - name: "是否自动",
665 - value: "cargoRulesStatus",
666 - width: "150",
667 - align: "center",
668 - sorTable: true,
669 - fixed: false,
670 - },
671 - {
672 - type: "",
673 - name: "发件人账号",
674 - value: "shipperAccount",
675 - width: "150",
676 - align: "center",
677 - sorTable: false,
678 - fixed: false,
679 - },
680 - {
681 - type: "",
682 - name: "发件公司中文名称",
683 - value: "shipperCompany",
684 - width: "150",
685 - align: "center",
686 - sorTable: false,
687 - fixed: false,
688 - },
689 - {
690 - type: "",
691 - name: "始发地城市名称",
692 - value: "originCity",
693 - width: "150",
694 - align: "center",
695 - sorTable: false,
696 - fixed: false,
697 - },
698 - {
699 - type: "",
700 - name: "收件地",
701 - value: "destinationSiteName",
702 - width: "150",
703 - align: "center",
704 - sorTable: false,
705 - fixed: false,
706 - },
707 - {
708 - type: "",
709 - name: "尺寸",
710 - value: "sizeStr",
711 - width: "150",
712 - align: "center",
713 - sorTable: true,
714 - fixed: false,
715 - },
716 - {
717 - type: "",
718 - name: "大货预审意见(是否可以配置航班)",
719 - value: "bigPretrialOpinion",
720 - width: "300",
721 - align: "center",
722 - sorTable: false,
723 - fixed: false,
724 - },
725 - {
726 - type: "",
727 - name: "大货预审时间",
728 - value: "bigPretrialTime",
729 - width: "150",
730 - align: "center",
731 - sorTable: false,
732 - fixed: false,
733 - },
734 - {
735 - type: "",
736 - name: "海关回执时间",
737 - value: "customsReceiptTime",
738 - width: "150",
739 - align: "center",
740 - sorTable: true,
741 - fixed: false,
742 - },
743 - {
744 - type: "",
745 - name: "航班预审时间",
746 - value: "caPretrialTime",
747 - width: "150",
748 - align: "center",
749 - sorTable: true,
750 - fixed: false,
751 - },
752 - {
753 - type: "",
754 - name: "创建人",
755 - value: "createUserName",
756 - width: "150",
757 - align: "center",
758 - sorTable: true,
759 - fixed: false,
760 - },
761 - {
762 - type: "",
763 - name: "创建时间",
764 - value: "createTime",
765 - width: "150",
766 - align: "center",
767 - sorTable: true,
768 - fixed: false,
769 - },
770 - ], //表头数据
771 - tableData: [], //表格数据
772 - tableSelection: [], //选中数据
773 - selectData: {
774 - findConditionData: [],
775 - fltTypes: [],
776 - HandlingCode: [],
777 - SubCategory: [],
778 - }, //查询条件
779 - fltDate: [],
780 - ursaList: "",
781 - siteNameList: "",
782 - handingCodes: [],
783 - subCategorys: [],
784 - valueFormat: "yyyy-MM-dd",
785 - totalCount: 0,
786 - page: 1,
787 - size: 100,
788 - allWeight: 0,
789 - allQty: 0,
790 - dialogVisible: false,
791 - shiftKey: false,
792 - createDate: null,
793 - loading: false,
794 - downLoadingTip: {
795 - tip: "",
796 - downloading: false,
797 - },
798 - };
799 - },
800 - created() {
801 - this.seleData();
802 - this.select();
803 - },
804 -
805 - mounted() {
806 - window.addEventListener("keydown", (code) => {
807 - if (code.keyCode === 16 && code.shiftKey) {
808 - this.shiftKey = true;
809 - }
810 - });
811 - window.addEventListener("keyup", (code) => {
812 - if (code.keyCode === 16) {
813 - this.shiftKey = false;
814 - }
815 - });
816 - },
817 - methods: {
818 - //查询条件
819 - async seleData() {
820 - // findFltConditionDataApi()
821 - // .then((res) => {
822 - // if (res.code === 200) {
823 - // this.selectData.fltTypes = res.data.flightType;
824 - // }else{
825 - // this.$message({
826 - // message: "查询条件不存在",
827 - // type: "warning",
828 - // });
829 - // }
830 - // })
831 - // .catch(() => {});
832 -
833 - allDictData()
834 - .then((res) => {
835 - if (res.code === 200) {
836 - this.selectData.HandlingCode = res.data.handlingCode;
837 - this.selectData.SubCategory = res.data.subCategory;
838 - }else{
839 - this.$message({
840 - message: "查询条件不存在",
841 - type: "warning",
842 - });
843 - }
844 - })
845 - .catch(() => {});
846 -
847 - findConditionData()
848 - .then((res) => {
849 - if (res.code == 200) {
850 - this.selectData.findConditionData = res.data;
851 - }else{
852 - this.$message({
853 - message: "查询条件不存在",
854 - type: "warning",
855 - });
856 - }
857 - })
858 - .catch(() => {});
859 - },
860 - //查询
861 - async select(val) {
862 - this.loading = true;
863 - this.dataInfo();
864 - if(val === 0){
865 - this.page = 1;
866 - this.formData.page = 1;
867 - }
868 - findCargoAllocationData(this.formData)
869 - .then((res) => {
870 - this.loading = false;
871 - if (res.code === 200) {
872 - this.tableData = res.data.list;
873 - this.totalCount = res.data.total;
874 - if (res.data.list.length > 0) {
875 - this.tableData.forEach((item, index = 0) => {
876 - item.index = index;
877 - });
878 - } else {
879 - this.$message({
880 - message: "未查询到数据",
881 - type: "warning",
882 - });
883 - }
884 - } else {
885 - this.$message({
886 - message: res.msg,
887 - type: "warning",
888 - });
889 - }
890 - })
891 - .catch(() => {
892 - this.loading = false;
893 - });
894 - },
895 - //总和
896 - cargoTotal() {
897 - this.allWeight = 0;
898 - this.allQty = 0;
899 - if (this.tableSelection.length > 0) {
900 - this.tableSelection.forEach((item) => {
901 - this.allWeight = this.allWeight + item.actualWeight;
902 - this.allQty = this.allQty + item.qty;
903 - });
904 - this.allWeight = this.allWeight.toFixed(2);
905 - this.allQty = this.allQty.toFixed();
906 - }
907 - },
908 - //数据初始化
909 - dataInfo() {
910 - this.formData.ursaList = null;
911 - this.formData.siteNameList = null;
912 - this.formData.handingCodes = null;
913 - this.formData.subCategorys = null;
914 - if (this.handingCodes.length > 0) {
915 - this.formData.handingCodes = this.handingCodes;
916 - }
917 - if (this.subCategorys.length > 0) {
918 - this.formData.subCategorys = this.subCategorys;
919 - }
920 - if (this.formData.minWeight === 0) {
921 - this.formData.minWeight = undefined;
922 - }
923 - if (this.formData.maxWeight === 0) {
924 - this.formData.maxWeight = undefined;
925 - }
926 - if (this.formData.minNumber === 0) {
927 - this.formData.minNumber = undefined;
928 - }
929 - if (this.formData.maxNumber === 0) {
930 - this.formData.maxNumber = undefined;
931 - }
932 - if (this.ursaList && this.ursaList != "") {
933 - this.formData.ursaList = this.ursaList.split(";" || "");
934 - }
935 - if (this.siteNameList && this.siteNameList != "") {
936 - this.formData.siteNameList = this.siteNameList.split(";" || "");
937 - }
938 - if (this.fltDate && this.fltDate.length > 0) {
939 - this.formData.fltDateStart = this.fltDate[0];
940 - this.formData.fltDateEnd = this.fltDate[1];
941 - } else {
942 - this.formData.fltDateStart = null;
943 - this.formData.fltDateEnd = null;
944 - }
945 - if (
946 - this.formData.customsReceiptStatusId != null &&
947 - this.formData.customsReceiptStatusId.length < 1
948 - ) {
949 - this.formData.customsReceiptStatusId = null;
950 - }
951 - this.formData.page = this.page;
952 - this.formData.size = this.size;
953 - if(this.formData.waybillNo){
954 - this.formData.waybillNo = this.formData.waybillNo.trim();
955 - }
956 - },
957 - //导出表格
958 - xlsx(val) {
959 - this.downLoadingTip.downloading = true;
960 - this.dataInfo();
961 - if (val === 0) {
962 - this.downLoadingTip.tip = "正在导出本页结果集";
963 - downLoadXlsx("/cargo/allocationExcel", this.formData, "手动配舱表")
964 - .then((res) => {
965 - this.downLoadingTip.downloading = false;
966 - })
967 - .catch((err) => {
968 - this.downLoadingTip.downloading = false;
969 - console.log(err);
970 - });
971 - } else {
972 - this.downLoadingTip.tip = "正在导出全部结果集请耐心等待";
973 - this.formData.page = null;
974 - this.formData.size = null;
975 - downLoadXlsx("/cargo/allocationExcel", this.formData, "手动配舱表")
976 - .then((res) => {
977 - this.downLoadingTip.downloading = false;
978 - })
979 - .catch((err) => {
980 - this.downLoadingTip.downloading = false;
981 - console.log(err);
982 - });
983 - }
984 - },
985 - //表格选择
986 - tableSelect(val) {
987 - this.tableSelection = val.selection;
988 - this.cargoTotal();
989 - },
990 - //表格全选
991 - tableSelectAll(val) {
992 - this.tableSelection = val;
993 - this.cargoTotal();
994 - },
995 - //分页
996 - currentChange(val) {
997 - this.page = val.page;
998 - this.select();
999 - },
1000 - //排序
1001 - sortChange(val) {
1002 - let data = [];
1003 - let nullData = [];
1004 - this.tableData.forEach((item) => {
1005 - if (item[val.prop]) {
1006 - data.push(item);
1007 - } else {
1008 - nullData.push(item);
1009 - }
1010 - });
1011 - data = data.sort(this.$refs.newTables.compare(val.prop, val.order));
1012 - if (val.order != "ascending") {
1013 - this.tableData = nullData.concat(data);
1014 - } else {
1015 - this.tableData = data.concat(nullData);
1016 - }
1017 - this.tableData.forEach((item, index = 0) => {
1018 - item.index = index;
1019 - });
1020 - },
1021 - //添加到航班
1022 - addFit() {
1023 - this.dialogVisible = true;
1024 - },
1025 - //关闭弹框
1026 - dialogBeforeClose(val) {
1027 - this.dialogVisible = val.close;
1028 - if (val.reload) {
1029 - this.tableSelection = [];
1030 - this.$refs.newTables.clearTable();
1031 - this.cargoTotal();
1032 - this.select();
1033 - }
1034 - },
1035 - },
1036 - computed: {
1037 - fltNo: {
1038 - get: function () {
1039 - return this.formData.fltNo;
1040 - },
1041 - set: function (val) {
1042 - this.formData.fltNo = upCase(val);
1043 - },
1044 - },
1045 - ursa: {
1046 - get: function () {
1047 - return this.ursaList;
1048 - },
1049 - set: function (val) {
1050 - this.ursaList = upCase(val);
1051 - },
1052 - },
1053 - siteName: {
1054 - get: function () {
1055 - return this.siteNameList;
1056 - },
1057 - set: function (val) {
1058 - this.siteNameList = upCase(val);
1059 - },
1060 - },
1061 - portName: {
1062 - get: function () {
1063 - return this.formData.portName;
1064 - },
1065 - set: function (val) {
1066 - this.formData.portName = upCase(val);
1067 - },
1068 - },
1069 - },
1070 -};
1071 -</script>
1072 -
1073 -<style lang="scss">
1074 -.tips {
1075 - display: inline-block;
1076 - color: #606266;
1077 - font-size: 14px;
1078 - margin-top: 10px;
1079 - margin-left: 50px;
1080 -}
1081 -.line {
1082 - text-align: center;
1083 -}
1084 -.el-empty {
1085 - width: 30%;
1086 - height: 37px;
1087 - padding: 0px;
1088 - line-height: 37px;
1089 - .el-empty__image {
1090 - width: 0px;
1091 - height: 0px;
1092 - }
1093 - .el-empty__description {
1094 - margin-top: 0px;
1095 - }
1096 -}
1097 -</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 - 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" :loading="loading">确 定</el-button>
63 - </div>
64 - </el-dialog>
65 - </div>
66 -</template>
67 -
68 -<script>
69 -import { allocationFlight } from "@/api/cargoSelect";
70 -import { MessageBox } from "element-ui";
71 -export default {
72 - props: {
73 - dialogVisible: {
74 - type: Boolean,
75 - default: false,
76 - },
77 - tableData: {
78 - type: Array,
79 - default: null,
80 - },
81 - },
82 - data() {
83 - return {
84 - formData: {
85 - ids: [],
86 - fltNo: undefined,
87 - fltDate: undefined,
88 - overweight: false,
89 - },
90 - cargoHeader: [
91 - { name: "口岸代码", value: "portName" },
92 - { name: "运单号", value: "waybillNo" },
93 - { name: "货物状态", value: "statusName" },
94 - { name: "站点", value: "siteName" },
95 - { name: "申报类型", value: "typeName" },
96 - { name: "URSA", value: "ursa" },
97 - { name: "实际重量", value: "actualWeight" },
98 - { name: "件数", value: "qty" },
99 - { name: "ACCS原航班号", value: "fltNoAccs" },
100 - { name: "ACCS原航班日期", value: "fltDateAccs" },
101 - { name: "品名描述", value: "nameDescription" },
102 - { name: "是否自动", value: "cargoRulesStatus" },
103 - { name: "创建人", value: "createUserName" },
104 - { name: "创建时间", value: "createTime" },
105 - ],
106 - rules: {
107 - fltNo: [
108 - {
109 - required: true,
110 - message: "航班号不能为空",
111 - trigger: "blur",
112 - },
113 - ],
114 - fltDate: [
115 - {
116 - required: true,
117 - message: "航班日期不能为空",
118 - trigger: "change",
119 - },
120 - ],
121 - },
122 - loading:false
123 - };
124 - },
125 - methods: {
126 - cleaerForm() {
127 - this.formData = {
128 - ids: [],
129 - fltNo: undefined,
130 - fltDate: undefined,
131 - overweight: false,
132 - };
133 - },
134 - //确定配舱
135 - submit() {
136 - this.loading = true;
137 - let arr = [];
138 - this.tableData.forEach((item) => {
139 - arr.push(item.id);
140 - });
141 - this.formData.ids = arr;
142 - if (this.formData.fltNo && this.formData.fltDate) {
143 - allocationFlight(this.formData).then((res) => {
144 - //code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg
145 - if (res.code === 200) {
146 - this.$message({
147 - message: "货物配舱成功",
148 - type: "success",
149 - });
150 - this.cleaerForm();
151 - this.loading = false;
152 - this.$emit("dialogBeforeClose", { close: false, reload: true });
153 - } else if (res.code === 202) {
154 - MessageBox.confirm(res.msg, "提示", {
155 - confirmButtonText: "确定",
156 - cancelButtonText: "取消",
157 - type: "warning",
158 - })
159 - .then(() => {
160 - this.formData.overweight = true; //确定继续overweight变为true再次请求接口
161 - allocationFlight(this.formData).then((res) => {
162 - if (res.code === 200) {
163 - this.$message({
164 - message: "货物配舱成功",
165 - type: "success",
166 - });
167 - } else {
168 - this.$message({
169 - message: res.msg,
170 - type: "warning",
171 - });
172 - }
173 - });
174 - this.cleaerForm();
175 - this.loading = false;
176 - this.$emit("dialogBeforeClose", { close: false, reload: true });
177 - })
178 - .catch(() => {
179 - //取消 取消当前配舱
180 - this.$message({
181 - message: "配舱已取消",
182 - type: "success",
183 - });
184 - this.cleaerForm();
185 - this.loading = false;
186 - this.$emit("dialogBeforeClose", {
187 - close: false,
188 - reload: true,
189 - });
190 - });
191 - } else {
192 - this.loading = false;
193 - this.$message({
194 - message: res.msg,
195 - type: "warning",
196 - });
197 - }
198 - }).catch(()=>{
199 - this.loading = false;
200 - });
201 - } else {
202 - this.loading = false;
203 - this.$message({
204 - message: "航班号或航班日期不能为空",
205 - type: "warning",
206 - });
207 - }
208 - },
209 - dialogBeforeClose() {
210 - this.cleaerForm();
211 - this.$emit("dialogBeforeClose", { close: false, reload: true });
212 - },
213 - },
214 - computed: {
215 - fltNo: {
216 - get: function () {
217 - return this.formData.fltNo;
218 - },
219 - set: function (val) {
220 - this.formData.fltNo = val.toUpperCase();
221 - },
222 - },
223 - },
224 -};
225 -</script>
226 -
227 -<style>
228 -</style>
...\ No newline at end of file ...\ No newline at end of file
1 -<template>
2 - <div style="margin: 40px" class="app-container">
3 - <el-form
4 - :inline="true"
5 - :model="queryParams"
6 - class="demo-form-inline"
7 - size="small"
8 - >
9 - <el-form-item label="航班号">
10 - <el-input
11 - v-model.trim="purposeOfFlightNo"
12 - placeholder="航班号"
13 - @keyup.enter.native="getList"
14 - ></el-input>
15 - </el-form-item>
16 - <el-form-item label="状态">
17 - <el-select v-model="queryParams.status" placeholder="状态">
18 - <el-option label="有效" value="1"></el-option>
19 - <el-option label="停用" value="3"></el-option>
20 - </el-select>
21 - </el-form-item>
22 - <el-form-item>
23 - <el-button
24 - type="primary"
25 - icon="el-icon-search"
26 - @click="getList"
27 - size="mini"
28 - >查询</el-button
29 - >
30 - </el-form-item>
31 - </el-form>
32 - <el-button
33 - style="margin-bottom: 20px"
34 - type="primary"
35 - icon="el-icon-plus"
36 - size="mini"
37 - @click="
38 - $router.push({
39 - name: 'FlightAllocConfigAdd',
40 - params: { handle: 'add' },
41 - })
42 - "
43 - >添加</el-button
44 - >
45 - <el-table :data="flyList" v-loading="loading" size="small">
46 - <el-table-column
47 - prop="purposeOfFlightNo"
48 - label="航班号"
49 - align="center"
50 - ></el-table-column>
51 -
52 - <el-table-column prop="status" label="状态" align="center">
53 - <template slot-scope="scope">
54 - <span v-if="scope.row.status === '0'">无效</span>
55 - <span v-if="scope.row.status === '1'">有效</span>
56 - <span v-if="scope.row.status === '2'">配置中</span>
57 - <span v-if="scope.row.status === '3'">停用</span>
58 - </template>
59 - </el-table-column>
60 -
61 - <el-table-column prop="createUserName" label="操作人" align="center">
62 - </el-table-column>
63 -
64 - <el-table-column prop="createTime" label="更新时间" align="center">
65 - </el-table-column>
66 -
67 - <el-table-column label="操作" prop="id" align="center">
68 - <template slot-scope="scope">
69 - <el-button
70 - type="text"
71 - size="mini"
72 - icon="el-icon-view"
73 - @click="handleClick(scope.row.id, 'detail')"
74 - >查看</el-button
75 - >
76 - <el-button
77 - type="text"
78 - size="mini"
79 - icon="el-icon-edit"
80 - @click="handleClick(scope.row.id, 'update')"
81 - >修改</el-button
82 - >
83 - <el-button
84 - type="text"
85 - size="mini"
86 - icon="el-icon-delete"
87 - @click="del(scope.row.id, scope.row.status)"
88 - >删除</el-button
89 - >
90 - <el-button
91 - type="text"
92 - size="mini"
93 - icon="el-icon-video-pause"
94 - @click="changeStatus(scope.row.id, 3)"
95 - v-if="scope.row.status == '1'"
96 - >停用</el-button
97 - >
98 - <el-button
99 - type="text"
100 - size="mini"
101 - icon="el-icon-video-play"
102 - @click="changeStatus(scope.row.id, 1)"
103 - v-else
104 - >启用</el-button
105 - >
106 - </template>
107 - </el-table-column>
108 - </el-table>
109 - <el-pagination
110 - @size-change="getList"
111 - @current-change="getList"
112 - :current-page.sync="curPage"
113 - :page-sizes="[10, 20, 30, 40]"
114 - :page-size.sync="limit"
115 - layout="prev, pager, next, jumper, sizes, total"
116 - :total="total"
117 - background
118 - :hide-on-single-page="true"
119 - style="margin-top: 40px; text-align: right"
120 - >
121 - </el-pagination>
122 - </div>
123 -</template>
124 -
125 -<script>
126 -import {
127 - findFlightNo,
128 - delFlightId,
129 - enableOrDisable,
130 -} from "@/api/destinationFlight";
131 -
132 -export default {
133 - name: "FlightAllocConfig",
134 - data() {
135 - return {
136 - queryParams: {
137 - purposeOfFlightNo: "",
138 - status: "1",
139 - start: 0,
140 - limit: 10,
141 - },
142 - flyList: [],
143 - curPage: 1,
144 - limit: 10,
145 - total: 0,
146 - loading: false,
147 - };
148 - },
149 - activated(){
150 - this.getList()
151 - },
152 - methods: {
153 - getList() {
154 - this.queryParams.limit = this.limit;
155 - if (this.curPage > 1) {
156 - this.queryParams.start = (this.curPage - 1) * this.queryParams.limit;
157 - } else {
158 - this.queryParams.start = 0;
159 - }
160 - this.loading = true;
161 - findFlightNo(this.queryParams).then((response) => {
162 - if (response.code != 200) {
163 - this.$message({
164 - showClose: true,
165 - message: response.msg,
166 - type: "error",
167 - });
168 - return;
169 - }
170 - this.flyList = response.data.list;
171 - this.total = response.data.totalCount;
172 - this.loading = false;
173 - });
174 - },
175 - //跳转到查看,修改页面
176 - handleClick(flightiId, handle) {
177 - this.$router.push({
178 - name: "FlightAllocConfigInfo",
179 - params: { handle: handle, id: flightiId },
180 - });
181 - },
182 - //删除规则
183 - del(id, status) {
184 - if (status == "1") {
185 - this.$confirm("航班规则生效中,无法删除,请停用后再操作", "警告", {
186 - confirmButtonText: "确定",
187 - showCancelButton: false,
188 - type: "warning",
189 - });
190 - } else {
191 - this.$confirm("是否确认删除此航班规则?", "警告", {
192 - confirmButtonText: "确定",
193 - cancelButtonText: "取消",
194 - showCancelButton: true,
195 - type: "warning",
196 - }).then(() => {
197 - delFlightId(id)
198 - .then((res) => {
199 - this.$message({
200 - message: res.msg,
201 - type: res.code === 200 ? "success" : "warning",
202 - });
203 - this.getList();
204 - })
205 - .catch(() => {});
206 - });
207 - }
208 - },
209 - //启用,停用
210 - changeStatus(id, status) {
211 - let tip = status === 1 ? "启用" : "停用";
212 - this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
213 - confirmButtonText: "确定",
214 - cancelButtonText: "取消",
215 - type: "warning",
216 - }).then(() => {
217 - enableOrDisable(id, status)
218 - .then((res) => {
219 - if (res.code != 200) {
220 - this.msgError(res.msg);
221 - } else {
222 - this.getList();
223 - this.msgSuccess(tip + "成功");
224 - }
225 - })
226 - .catch(() => {});
227 - });
228 - },
229 - },
230 - created() {
231 - this.getList();
232 - },
233 - computed: {
234 - purposeOfFlightNo: {
235 - get: function () {
236 - return this.queryParams.purposeOfFlightNo;
237 - },
238 - set: function (val) {
239 - this.queryParams.purposeOfFlightNo = val.toUpperCase();
240 - },
241 - },
242 - },
243 -};
244 -</script>
245 -
246 -
1 -<template>
2 - <div style="margin: 40px" v-loading="loading">
3 - <div v-if="isEmpty">
4 - <el-empty description="找不到这条数据!"></el-empty>
5 - <el-button size="small" @click="close">返回</el-button>
6 - </div>
7 - <template v-else>
8 - <el-form
9 - ref="form"
10 - :model="form"
11 - label-width="200px"
12 - size="small"
13 - :disabled="disable"
14 - :rules="rules"
15 - >
16 - <el-row :gutter="20">
17 - <el-col :span="12">
18 - <el-form-item label="航班号" prop="purposeOfFlightNo">
19 - <el-input
20 - v-model.trim="form.purposeOfFlightNo"
21 - style="width: 60%"
22 - :disabled="nameDisabled"
23 - ></el-input>
24 - </el-form-item>
25 - </el-col>
26 - <el-col :span="12">
27 - <el-form-item label="航班预审" prop="isNeedRequired">
28 - <el-switch
29 - v-model="isNeedRequired"
30 - :active-value="1"
31 - :inactive-value="0"
32 - >
33 - </el-switch>
34 - </el-form-item>
35 - </el-col>
36 - </el-row>
37 - <el-form-item>
38 - <el-row :gutter="20">
39 - <el-col :span="6">
40 - <el-radio v-model="isLocation" label="1" size="mini"
41 - >站点包含</el-radio
42 - >
43 - <el-radio v-model="isLocation" label="2" size="mini"
44 - >站点不包含</el-radio
45 - >
46 - </el-col>
47 - <el-col :span="6">
48 - <el-alert
49 - title="提示:站点之间用回车符分隔"
50 - type="warning"
51 - show-icon
52 - size="mini"
53 - :closable="false"
54 - style="height: 30px; width: fit-content"
55 - >
56 - </el-alert>
57 - </el-col>
58 - </el-row>
59 - </el-form-item>
60 -
61 - <el-form-item label="站点包含" v-show="isLocation == 1">
62 - <el-input
63 - type="textarea"
64 - v-model="form.location"
65 - :rows="6"
66 - resize="none"
67 - style="width: 600px"
68 - ></el-input>
69 - </el-form-item>
70 - <el-form-item label="站点不包含" v-show="isLocation == 2">
71 - <el-input
72 - type="textarea"
73 - v-model="form.notLocation"
74 - :rows="6"
75 - resize="none"
76 - style="width: 600px"
77 - ></el-input>
78 - </el-form-item>
79 -
80 - <el-form-item>
81 - <el-alert
82 - title="提示:URSA之间用分号分隔,例:F2;F3;P_"
83 - type="warning"
84 - show-icon
85 - size="mini"
86 - :closable="false"
87 - style="height: 30px; width: fit-content"
88 - >
89 - </el-alert>
90 - </el-form-item>
91 - <el-row :gutter="20">
92 - <el-col :span="10">
93 - <el-form-item label="URSA包含">
94 - <el-input
95 - type="textarea"
96 - v-model.trim="form.includeUrsa"
97 - :rows="6"
98 - resize="none"
99 - ></el-input>
100 - </el-form-item>
101 - </el-col>
102 - <el-col :span="10">
103 - <el-form-item label="URSA不包含">
104 - <el-input
105 - type="textarea"
106 - v-model.trim="form.notIncludeUrsa"
107 - :rows="6"
108 - resize="none"
109 - ></el-input>
110 - </el-form-item>
111 - </el-col>
112 - </el-row>
113 -
114 - <el-form-item label="件数">
115 - <el-col :span="3">
116 - <el-input
117 - class="numberInput"
118 - v-model.trim="minNumOfPieces"
119 - ></el-input>
120 - <!-- <el-input-number
121 - v-model="minNumOfPieces"
122 - :precision="0"
123 - :controls="false"
124 - style="width: 100%"
125 - ></el-input-number> -->
126 - </el-col>
127 - <el-col style="text-align: center" :span="1">-</el-col>
128 - <el-col :span="3">
129 - <el-input
130 - class="numberInput"
131 - v-model.trim="maxNumOfPieces"
132 - ></el-input>
133 - <!-- <el-input-number
134 - v-model="
135 - form.maxNumOfPieces == 0
136 - ? (form.maxNumOfPieces = undefined)
137 - : form.maxNumOfPieces
138 - "
139 - :precision="0"
140 - :controls="false"
141 - style="width: 100%"
142 - ></el-input-number> -->
143 - </el-col>
144 - </el-form-item>
145 -
146 - <el-form-item label="重量">
147 - <el-col :span="3">
148 - <el-input class="numberInput" v-model.trim="minWeight"></el-input>
149 - <!-- <el-input-number
150 - v-model="
151 - form.minWeight == 0
152 - ? (form.minWeight = undefined)
153 - : form.minWeight
154 - "
155 - :precision="2"
156 - :controls="false"
157 - style="width: 100%"
158 - ></el-input-number> -->
159 - </el-col>
160 - <el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
161 - <el-col style="text-align: center" :span="1">-</el-col>
162 - <el-col :span="3">
163 - <el-input class="numberInput" v-model.trim="maxWeight"></el-input>
164 - <!-- <el-input-number
165 - v-model="
166 - form.maxWeight == 0
167 - ? (form.maxWeight = undefined)
168 - : form.maxWeight
169 - "
170 - :precision="2"
171 - :controls="false"
172 - style="width: 100%"
173 - ></el-input-number> -->
174 - </el-col>
175 - <el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
176 - </el-form-item>
177 -
178 - <el-form-item label="申报类别">
179 - <el-card shadow="never" style="width: 80%">
180 - <el-checkbox-group v-model="form.typeOfGoods">
181 - <el-row>
182 - <el-col :span="2" v-for="item in cargoType" :key="item.id">
183 - <el-checkbox
184 - :label="item.chineseName"
185 - :name="item.chineseName"
186 - >
187 - </el-checkbox>
188 - </el-col>
189 - </el-row>
190 - </el-checkbox-group>
191 - </el-card>
192 - </el-form-item>
193 -
194 - <el-form-item label="货物类型">
195 - <el-card shadow="never" style="width: 80%">
196 - <el-checkbox-group v-model="form.declarationCategory">
197 - <el-row>
198 - <el-col :span="3" v-for="item in cargoStatus" :key="item.id">
199 - <el-checkbox
200 - :label="item.chineseName"
201 - :name="item.chineseName"
202 - disabled
203 - ></el-checkbox>
204 - </el-col>
205 - </el-row>
206 - </el-checkbox-group>
207 - </el-card>
208 - </el-form-item>
209 -
210 - <el-form-item label="Service Code">
211 - <el-card shadow="never" style="width: 80%">
212 - <el-checkbox-group v-model="form.serviceCode">
213 - <el-row>
214 - <el-col :span="2" v-for="item in serviceCode" :key="item.id">
215 - <el-checkbox
216 - :label="item.englishName"
217 - :name="item.englishName"
218 - ></el-checkbox>
219 - </el-col>
220 - </el-row>
221 - </el-checkbox-group>
222 - </el-card>
223 - </el-form-item>
224 -
225 - <el-form-item label="Handling Code">
226 - <el-card shadow="never" style="width: 80%">
227 - <el-checkbox-group v-model="form.handlingCode">
228 - <el-row>
229 - <el-col :span="3" v-for="item in handlingCode" :key="item.id">
230 - <el-checkbox
231 - :label="item.englishName"
232 - :name="item.englishName"
233 - ></el-checkbox>
234 - </el-col>
235 - </el-row>
236 - </el-checkbox-group>
237 - </el-card>
238 - </el-form-item>
239 -
240 - <el-form-item label="Sub Category">
241 - <el-card shadow="never" style="width: 80%">
242 - <el-checkbox-group v-model="form.subCategory">
243 - <el-row>
244 - <el-col :span="3" v-for="item in subCategory" :key="item.id">
245 - <el-checkbox
246 - :label="item.englishName"
247 - :name="item.englishName"
248 - ></el-checkbox>
249 - </el-col>
250 - </el-row>
251 - </el-checkbox-group>
252 - </el-card>
253 - </el-form-item>
254 -
255 - </el-form>
256 - <div style="marginleft: 200px">
257 - <el-button
258 - type="primary"
259 - size="small"
260 - v-if="$route.params.handle != 'detail'"
261 - @click="submit('form')"
262 - :loading="btnLoading"
263 - >
264 - <span v-if="$route.params.handle === 'add'">添加</span>
265 - <span v-else>保存</span>
266 - </el-button>
267 - <el-button size="small" @click="close">取消</el-button>
268 - </div>
269 - </template>
270 - </div>
271 -</template>
272 -
273 -<script>
274 -import {
275 - findByFlightId,
276 - updateOrAddFlight,
277 - allDictData,
278 - findDestinationFltRuleByActualFlight,
279 -} from "@/api/destinationFlight";
280 -
281 -export default {
282 - name:"",
283 - data() {
284 - return {
285 - form: {
286 - minNumOfPieces: undefined,
287 - maxNumOfPieces: undefined,
288 - minWeight: undefined,
289 - maxWeight: undefined,
290 - typeOfGoods: [],
291 - declarationCategory: [],
292 - serviceCode: [],
293 - subCategory: [],
294 - handlingCode: [],
295 - },
296 - rules: {
297 - purposeOfFlightNo: [
298 - {
299 - required: true,
300 - message: "请输入航班号",
301 - trigger: "blur",
302 - },
303 - ],
304 - },
305 - typeOfGoods: [],
306 - declarationCategory: [],
307 - formServiceCode: [],
308 - formHandlingCode: [],
309 - formSubCategory: [],
310 - cargoType: [],
311 - cargoStatus: [],
312 - serviceCode: [],
313 - handlingCode: [],
314 - subCategory: [],
315 - isLocation: "1",
316 - isNeedRequired: 0,
317 - disable: false,
318 - nameDisabled: false,
319 - btnLoading: false,
320 - loading: true,
321 - isEmpty: false,
322 - routeName:"",
323 - dataId:"",
324 - handleName:""
325 - };
326 - },
327 - methods: {
328 - //排序
329 - sorttodo(arr, englishName) {
330 - var index = 1,
331 - newArr = [],
332 - length = arr.length;
333 - for (var i = 0; i < length; i++) {
334 - if (arr[i].englishName === englishName) {
335 - newArr[0] = arr[i];
336 - } else {
337 - newArr[index++] = arr[i];
338 - }
339 - }
340 - return newArr;
341 - },
342 -
343 - submit(form) {
344 - this.$refs[form].validate((valid) => {
345 - if (!valid) {
346 - return false;
347 - }
348 - });
349 -
350 - this.btnLoading = true;
351 - let handle = this.$route.params.handle;
352 - if (handle === "update") {
353 - //修改,获取id
354 - this.form.id = this.$route.params.id;
355 - }
356 -
357 - //调用接口
358 - this.typeOfGoods = this.form.typeOfGoods;
359 - this.declarationCategory = this.form.declarationCategory;
360 - this.formServiceCode = this.form.serviceCode;
361 - this.formHandlingCode = this.form.handlingCode;
362 - this.formSubCategory = this.form.subCategory;
363 - this.form.isNeedRequired = this.isNeedRequired;
364 - if(this.form.purposeOfFlightNo){
365 - this.form.purposeOfFlightNo = this.form.purposeOfFlightNo.toUpperCase();
366 - }
367 - if (this.isLocation == 1) {
368 - this.form.notLocation = "";
369 - } else {
370 - this.form.location = "";
371 - }
372 - if (
373 - this.form.includeUrsa &&
374 - this.form.includeUrsa.length != 0 &&
375 - this.form.notIncludeUrsa &&
376 - this.form.notIncludeUrsa.length != 0
377 - ) {
378 - let include = this.form.includeUrsa.split(";");
379 - let notInclude = this.form.notIncludeUrsa.split(";");
380 - let errorList = [];
381 - notInclude.forEach((element) => {
382 - if (element.indexOf("_") > 0) {
383 - errorList.push(element);
384 - } else {
385 - let flag = 0;
386 - for (let i = 0; i < include.length; i++) {
387 - if (
388 - element == "" ||
389 - (include[i].indexOf("_") > 0 &&
390 - include[i].substring(0, 1) == element.substring(0, 1))
391 - ) {
392 - flag = 1;
393 - break;
394 - }
395 - }
396 - if (flag == 0) {
397 - errorList.push(element);
398 - }
399 - }
400 - });
401 - if (errorList.length != 0) {
402 - this.$message({
403 - showClose: true,
404 - message:
405 - "URSA不包含中[" +
406 - errorList +
407 - "]错误,URSA不包含必须属于URSA包含中的类型",
408 - type: "error",
409 - });
410 - this.btnLoading = false;
411 - return;
412 - }
413 - }
414 - updateOrAddFlight(this.form).then((response) => {
415 - if (response.code === 200) {
416 - this.$message({
417 - showClose: true,
418 - message: "成功",
419 - type: "success",
420 - });
421 - this.close();
422 - } else {
423 - this.$message({
424 - showClose: true,
425 - message: response.msg,
426 - type: "error",
427 - });
428 - this.btnLoading = false;
429 - }
430 - });
431 - this.form.typeOfGoods = this.typeOfGoods;
432 - this.form.declarationCategory = this.declarationCategory;
433 - this.form.serviceCode = this.formServiceCode;
434 - this.form.handlingCode = this.formHandlingCode;
435 - this.form.subCategory = this.formSubCategory;
436 - },
437 - close() {
438 - this.removes()
439 - this.$store.state.tagsView.visitedViews.splice(
440 - this.$store.state.tagsView.visitedViews.findIndex(
441 - (item) => item.path === this.$route.path
442 - ),
443 - 1
444 - );
445 - this.$router.push({name:"FlightAllocConfig"})
446 - // this.$router.push(
447 - // this.$store.state.tagsView.visitedViews[
448 - // this.$store.state.tagsView.visitedViews.length - 1
449 - // ].path
450 - // );
451 - },
452 -
453 - removes(){
454 - if(this.routeName == "FlightAllocConfigAdd"){
455 - sessionStorage.setItem("flightAdd","remove")
456 - }else{
457 - sessionStorage.setItem("flightInfo"+this.dataId,"remove")
458 - }
459 - },
460 - },
461 -
462 - beforeDestroy(){
463 - if(this.routeName == "FlightAllocConfigAdd"){
464 - if(sessionStorage.getItem("flightAdd") == "remove"){
465 - sessionStorage.removeItem("flightAdd")
466 - }else{
467 - this.form.isNeedRequired = this.isNeedRequired
468 - sessionStorage.setItem("flightAdd",JSON.stringify(this.form))
469 - }
470 - }else{
471 - if(sessionStorage.getItem("flightInfo"+this.dataId) == "remove"){
472 - sessionStorage.removeItem("flightInfo"+this.dataId)
473 - }else{
474 - if(this.handleName == "detail"){
475 - this.form.isNeedRequired = this.isNeedRequired
476 - sessionStorage.setItem("flightInfo"+this.dataId,JSON.stringify(this.form))
477 - }
478 - }
479 - }
480 - },
481 -
482 - created() {
483 - let handle = this.$route.params.handle;
484 - allDictData().then((response) => {
485 - if (response.code != 200) {
486 - this.$message({
487 - showClose: true,
488 - message: response.msg,
489 - type: "error",
490 - });
491 - return;
492 - }
493 - let dict = response.data;
494 - this.cargoType = dict.cargoType;
495 - this.cargoStatus = dict.cargoStatus;
496 - this.serviceCode = dict.serviceCode.sort((a, b) =>
497 - a.englishName.localeCompare(b.englishName)
498 - );
499 -
500 - this.handlingCode = this.sorttodo(dict.handlingCode, "BLANK");
501 - this.subCategory = dict.subCategory;
502 - });
503 - this.routeName = this.$route.name;
504 - this.dataId = this.$route.params.id;
505 - this.handleName = this.$route.params.handle;
506 - if (handle === "detail") {
507 - this.disable = true;
508 - }
509 -
510 - if (handle != "add") {
511 - this.nameDisabled = true;
512 - let id = this.$route.params.id;
513 - if(sessionStorage.getItem("flightInfo"+id) && this.$route.name == "FlightAllocConfigInfo" && handle != "detail"){
514 - this.loading = false
515 - this.form = JSON.parse(sessionStorage.getItem("flightInfo"+this.$route.params.id))
516 - this.isNeedRequired = this.form.isNeedRequired;
517 - if(this.form.notLocation != null || this.form.notLocation == ""){
518 - this.isLocation = "2";
519 - }else{
520 - this.isLocation = "1";
521 - }
522 - }else{
523 - if (isNaN(Number(id))) {
524 - findDestinationFltRuleByActualFlight(id).then((response) => {
525 - if (response.code != 200) {
526 - this.$message({
527 - showClose: true,
528 - message: response.msg,
529 - type: "error",
530 - });
531 - this.isEmpty = true;
532 - } else if (response.data == null) {
533 - this.isEmpty = true;
534 - } else {
535 - let info = response.data;
536 - info.typeOfGoods = info.typeOfGoods
537 - ? info.typeOfGoods.split(";")
538 - : [];
539 - info.declarationCategory = info.declarationCategory
540 - ? info.declarationCategory.split(";")
541 - : [];
542 - info.serviceCode = info.serviceCode
543 - ? info.serviceCode.split(";")
544 - : [];
545 - info.handlingCode = info.handlingCode
546 - ? info.handlingCode.split(";")
547 - : [];
548 - info.subCategory = info.subCategory
549 - ? info.subCategory.split(";")
550 - : [];
551 - this.form = info;
552 - if (info.notLocation != null || info.notLocation == "") {
553 - this.isLocation = "2";
554 - } else {
555 - this.isLocation = "1";
556 - }
557 - this.isNeedRequired = info.isNeedRequired;
558 - }
559 - this.loading = false;
560 - }).catch(()=>{
561 - this.loading = false;
562 - })
563 - } else {
564 - //货物信息
565 - findByFlightId(id).then((response) => {
566 - if (response.code != 200) {
567 - this.$message({
568 - showClose: true,
569 - message: response.msg,
570 - type: "error",
571 - });
572 - this.isEmpty = true;
573 - } else {
574 - let info = response.data.list;
575 - info.typeOfGoods = info.typeOfGoods
576 - ? info.typeOfGoods.split(";")
577 - : [];
578 - info.declarationCategory = info.declarationCategory
579 - ? info.declarationCategory.split(";")
580 - : [];
581 - info.serviceCode = info.serviceCode
582 - ? info.serviceCode.split(";")
583 - : [];
584 - info.handlingCode = info.handlingCode
585 - ? info.handlingCode.split(";")
586 - : [];
587 - info.subCategory = info.subCategory
588 - ? info.subCategory.split(";")
589 - : [];
590 - this.form = info;
591 - if (info.notLocation != null || info.notLocation == "") {
592 - this.isLocation = "2";
593 - } else {
594 - this.isLocation = "1";
595 - }
596 - let isNeedRequired = response.data.isNeedRequired;
597 - this.form.isNeedRequired = isNeedRequired;
598 - this.isNeedRequired = isNeedRequired;
599 - }
600 - this.loading = false;
601 - }).catch(()=>{
602 - this.loading = false;
603 - })
604 - }
605 - }
606 - } else {
607 - this.loading = false;
608 - }
609 - if(this.$route.name == "FlightAllocConfigAdd"){
610 - if(sessionStorage.getItem("flightAdd")){
611 - this.form = JSON.parse(sessionStorage.getItem("flightAdd"))
612 - this.isNeedRequired = this.form.isNeedRequired;
613 - if(this.form.notLocation != null || this.form.notLocation == ""){
614 - this.isLocation = "2";
615 - }else{
616 - this.isLocation = "1";
617 - }
618 - }
619 - }
620 - },
621 - computed: {
622 - minNumOfPieces: {
623 - get: function () {
624 - return this.form.minNumOfPieces;
625 - },
626 - set: function (val) {
627 - if (val == 0 || val == null || val == "-") {
628 - this.form.minNumOfPieces = undefined;
629 - } else if (!isNaN(val)) {
630 - this.form.minNumOfPieces = val;
631 - }
632 - },
633 - },
634 - maxNumOfPieces: {
635 - get: function () {
636 - return this.form.maxNumOfPieces;
637 - },
638 - set: function (val) {
639 - if (val == 0 || val == null || val == "-") {
640 - this.form.maxNumOfPieces = undefined;
641 - } else if (!isNaN(val)) {
642 - this.form.maxNumOfPieces = val;
643 - }
644 - },
645 - },
646 - minWeight: {
647 - get: function () {
648 - return this.form.minWeight;
649 - },
650 - set: function (val) {
651 - if (val == null || val == "-") {
652 - this.form.minWeight = undefined;
653 - } else if (!isNaN(val)) {
654 - this.form.minWeight = val;
655 - }
656 - },
657 - },
658 - maxWeight: {
659 - get: function () {
660 - return this.form.maxWeight;
661 - },
662 - set: function (val) {
663 - if (val == null || val == "-") {
664 - this.form.maxWeight = undefined;
665 - } else if (!isNaN(val)) {
666 - this.form.maxWeight = val;
667 - }
668 - },
669 - },
670 - },
671 -};
672 -</script>
673 -<style rel="stylesheet/scss" lang="scss">
674 -.el-textarea.is-disabled .el-textarea__inner {
675 - background-color: rgba(255, 255, 255, 0.5);
676 - color: #303133;
677 -}
678 -
679 -.el-input.is-disabled .el-input__inner {
680 - background-color: rgba(255, 255, 255, 0.5);
681 - color: #303133;
682 -}
683 -
684 -.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
685 - background-color: rgba(255, 255, 255, 0.5);
686 -}
687 -
688 -.el-checkbox__input.is-disabled + span.el-checkbox__label {
689 - color: #303133;
690 -}
691 -
692 -.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
693 - border-color: #303133;
694 -}
695 -
696 -.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
697 - border-color: #606266;
698 -}
699 -.numberInput {
700 - input {
701 - text-align: center;
702 - }
703 -}
704 -</style>
1 -<template>
2 - <div class="app-container">
3 - <el-form :model="queryParams" ref="queryForm" :inline="true">
4 - <el-form-item label="ACCS原航班">
5 - <el-input
6 - type="text"
7 - v-model="upCase"
8 - placeholder="请输入ACCS原航班"
9 - clearable
10 - class="formItem"
11 - ></el-input>
12 - <!-- <el-input v-model="upCase" placeholder="请输入原航班" clearable size="small" /> -->
13 - </el-form-item>
14 - <el-form-item label="状态" prop="status">
15 - <el-select
16 - v-model="queryParams.status"
17 - placeholder="请选择"
18 - clearable
19 - size="small"
20 - >
21 - <el-option
22 - v-for="dict in statusList"
23 - :key="dict.id"
24 - :label="dict.name"
25 - :value="dict.id"
26 - />
27 - </el-select>
28 - </el-form-item>
29 -
30 - <el-form-item>
31 - <el-button
32 - type="primary"
33 - icon="el-icon-search"
34 - size="mini"
35 - @click="handleQuery"
36 - >查询ACCS原航班配置</el-button
37 - >
38 - </el-form-item>
39 - <br />
40 - <el-form-item label="日期" prop="flightDate">
41 - <el-date-picker
42 - value-format="yyyy-MM-dd"
43 - v-model="queryParams.flightDate"
44 - type="date"
45 - placeholder="选择日期"
46 - >
47 - </el-date-picker>
48 - </el-form-item>
49 -
50 - <el-form-item>
51 - <el-button
52 - type="primary"
53 - icon="el-icon-search"
54 - size="mini"
55 - @click="findSourceFlightAndFlightDate"
56 - >查询实际配载航班 </el-button
57 - >&#12288;
58 - <span style="color: #ff4949"
59 - >注:ACCS原航班+日期查询该日期的航班实际情况</span
60 - >
61 - </el-form-item>
62 - <br />
63 - <el-form-item>
64 - <el-col :span="1.5">
65 - <el-button
66 - type="primary"
67 - icon="el-icon-plus"
68 - size="mini"
69 - @click="handleAdd"
70 - >添加规则</el-button
71 - >
72 - </el-col>
73 - &#12288;
74 - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
75 - >重置</el-button
76 - >
77 - </el-form-item>
78 - </el-form>
79 -
80 - <el-table v-loading="loading" :data="sourceFlightRulesList">
81 - <el-table-column type="index" label="序号" align="center">
82 - <template slot-scope="scope">{{ scope.$index + 1 }}</template>
83 - </el-table-column>
84 - <el-table-column
85 - label="ACCS原航班"
86 - align="center"
87 - prop="sourceFlightNo"
88 - />
89 - <el-table-column
90 - label="配载航班排序"
91 - align="center"
92 - prop="flightRank"
93 - width="280"
94 - />
95 - <!-- <el-table-column label="优先级" align="center" prop="priority" /> -->
96 - <el-table-column
97 - label="周期"
98 - align="center"
99 - prop="dayOfWeek"
100 - width="180"
101 - />
102 - <el-table-column
103 - label="状态"
104 - align="center"
105 - prop="status"
106 - :formatter="statusFormat"
107 - />
108 - <el-table-column
109 - label="开始时间"
110 - align="center"
111 - prop="startDate"
112 - width="100"
113 - />
114 - <el-table-column
115 - label="结束时间"
116 - align="center"
117 - prop="endDate"
118 - width="100"
119 - />
120 - <el-table-column
121 - label="最后修改人"
122 - align="center"
123 - prop="updateUserName"
124 - width="100"
125 - />
126 - <el-table-column
127 - label="最后修改时间"
128 - align="center"
129 - prop="updateTime"
130 - width="100"
131 - />
132 - <el-table-column
133 - label="操作"
134 - align="center"
135 - class-name="small-padding fixed-width"
136 - width="180"
137 - fixed="right"
138 - >
139 - <template slot-scope="scope">
140 - <el-button
141 - size="mini"
142 - type="text"
143 - icon="el-icon-edit"
144 - @click="handleUpdate(scope.row)"
145 - >修改</el-button
146 - >
147 - <el-button
148 - size="mini"
149 - type="text"
150 - icon="el-icon-delete"
151 - @click="handleDeleteorPlayorpause(scope.row, 0, '删除')"
152 - >
153 - 删除</el-button
154 - >
155 - <el-button
156 - size="mini"
157 - type="text"
158 - icon="el-icon-video-play"
159 - v-if="scope.row.status == '3'"
160 - @click="handleDeleteorPlayorpause(scope.row, 1, '启用')"
161 - >启用</el-button
162 - >
163 - <el-button
164 - size="mini"
165 - type="text"
166 - icon="el-icon-video-pause"
167 - v-if="scope.row.status != '3'"
168 - @click="handleDeleteorPlayorpause(scope.row, 3, '停用')"
169 - >停用</el-button
170 - >
171 - </template>
172 - </el-table-column>
173 - </el-table>
174 -
175 - <pagination
176 - v-show="total > 0"
177 - :total="total"
178 - layout=" prev, pager, next, jumper, sizes,total"
179 - :page.sync="queryParams.pageNum"
180 - :limit.sync="queryParams.limit"
181 - @pagination="findSourceFlightRules"
182 - />
183 -
184 - <!-- 查看目的航班对话框 -->
185 - <el-dialog
186 - title="实际配载航班"
187 - :visible.sync="openFlightDate"
188 - width="70%"
189 - :close-on-click-modal="false"
190 - :append-to-body="true"
191 - >
192 - <el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate">
193 - <el-table-column type="index" label="序号" align="center">
194 - <template slot-scope="scope">{{ scope.$index + 1 }}</template>
195 - </el-table-column>
196 - <el-table-column
197 - label="ACCS原航班"
198 - align="center"
199 - prop="sourceFlightNo"
200 - />
201 - <el-table-column
202 - label="实际配载航班"
203 - align="center"
204 - prop="actualFlight"
205 - width="280"
206 - />
207 - <el-table-column label="航班日期" align="center" prop="flightDate" />
208 - <el-table-column
209 - label="操作"
210 - align="center"
211 - class-name="small-padding fixed-width"
212 - width="200"
213 - >
214 - <template slot-scope="scope">
215 - <el-button
216 - size="mini"
217 - type="text"
218 - icon="el-icon-edit"
219 - @click="handleClick(scope.row.actualFlight, 'detail')"
220 - >查看配置维度</el-button
221 - >
222 - </template>
223 - </el-table-column>
224 - </el-table>
225 - <div slot="footer" class="dialog-footer">
226 - <el-button @click="cancelFlightDate">返 回</el-button>
227 - </div>
228 - </el-dialog>
229 -
230 - <!-- 添加或修改对话框 -->
231 - <el-dialog
232 - :title="title"
233 - :visible.sync="open"
234 - width="55%"
235 - :append-to-body="true"
236 - :close-on-click-modal="false"
237 - >
238 - <el-form ref="form" :model="form" :rules="rules" label-width="100px">
239 - <el-row>
240 - <el-col :span="10">
241 - <el-form-item label="ACCS原航班" prop="sourceFlightNo">
242 - <el-input
243 - v-model="form.sourceFlightNo"
244 - placeholder="请输入ACCS原航班号"
245 - maxlength="10"
246 - />
247 - </el-form-item>
248 - </el-col>
249 - </el-row>
250 - <el-row>
251 - <el-col :span="8">
252 - <el-form-item label="有效开始时间" prop="startDate">
253 - <el-date-picker
254 - clearable
255 - size="small"
256 - :picker-options="pickerOptionsStart"
257 - v-model="form.startDate"
258 - type="date"
259 - value-format="yyyy-MM-dd"
260 - placeholder="选择开始时间"
261 - >
262 - </el-date-picker>
263 - </el-form-item>
264 - </el-col>
265 - <el-col :span="12">
266 - <el-form-item label="有效结束时间" prop="endDate">
267 - <el-date-picker
268 - clearable
269 - size="small"
270 - :picker-options="pickerOptionsEnd"
271 - v-model="form.endDate"
272 - type="date"
273 - value-format="yyyy-MM-dd"
274 - placeholder="选择结束时间"
275 - >
276 - </el-date-picker>
277 - </el-form-item>
278 - </el-col>
279 -
280 - <el-col :span="24" style="margin-bottom: 5%">
281 - <span style="color:#ff4949; margin-left: 10%"
282 - >提示:配载航班之间请用分号分隔【符号不区分中英文】,例:CA1053;C7433</span
283 - ><br />
284 - <span style="color:#ff4949; margin-left: 10%"
285 - >提示:如果需要设置配载航班延迟或提前可以直接在目的航斑后加减【+-】天数。如:CA1053+1;CZ433-1</span
286 - >
287 - </el-col>
288 - <el-col :span="24">
289 - <el-form-item label="配载航班" prop="flightRank">
290 - <el-input
291 - type="textarea"
292 - v-model="form.flightRank"
293 - :rows="4"
294 - ></el-input>
295 - </el-form-item>
296 - </el-col>
297 - <el-col :span="24">
298 - <el-form-item label="周期段">
299 - <el-checkbox-group v-model="dayOfWeek">
300 - <el-checkbox
301 - v-for="item in dayOfWeekList"
302 - :key="item"
303 - :label="item"
304 - :name="item"
305 - ></el-checkbox>
306 - </el-checkbox-group>
307 - </el-form-item>
308 - </el-col>
309 - </el-row>
310 - </el-form>
311 - <div slot="footer" class="dialog-footer">
312 - <el-button type="primary" @click="submitForm">确 定</el-button>
313 - <el-button @click="cancel">取 消</el-button>
314 - </div>
315 - </el-dialog>
316 - </div>
317 -</template>
318 -<script>
319 -import {
320 - findSourceFlightRulesApi,
321 - sourceFlightRulesSaveApi,
322 - delOrEnableORDisableApi,
323 - findSourceFlightAndFlightDateApi,
324 -} from "@/api/sourceFlightRules";
325 -export default {
326 - name: "FlightRandConfig",
327 - data() {
328 - return {
329 - // data 中设定
330 - pickerOptionsStart: {
331 - disabledDate: (time) => {
332 - let endDateVal = this.form.endDate;
333 - if (endDateVal) {
334 - return (
335 - time.getTime() > new Date(endDateVal).getTime() ||
336 - time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000
337 - );
338 - } else {
339 - return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
340 - }
341 - },
342 - },
343 - pickerOptionsEnd: {
344 - disabledDate: (time) => {
345 - let beginDateVal = this.form.startDate;
346 - if (beginDateVal) {
347 - return time.getTime() < new Date(beginDateVal).getTime();
348 - } else {
349 - return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
350 - }
351 - },
352 - },
353 -
354 - //周期段
355 - dayOfWeekList: ["D1", "D2", "D3", "D4", "D5", "D6", "D7"],
356 - // 遮罩层
357 - loading: false,
358 - // 遮罩层
359 - loadingFlightDate: false,
360 - // 弹出层标题
361 - title: "",
362 - // 总条数
363 - total: 0,
364 - // 原航班规则数据
365 - sourceFlightRulesList: [],
366 - //目的航班数据
367 - sourceFlightAndFlightDate: [],
368 - statusList: [
369 - {
370 - id: 1,
371 - name: "有效",
372 - },
373 - {
374 - id: 3,
375 - name: "停用",
376 - },
377 - ],
378 - // 新增修改查看规则弹出层
379 - open: false,
380 - // 是否显示查看目的航班弹出层
381 - openFlightDate: false,
382 - // 查询参数
383 - queryParams: {
384 - start: 0, //当前条数【代表第几条数据 +1开始】
385 - pageNum: 1,
386 - limit: 20, //一页显示多少条数据
387 - sourceFlightNo: undefined, //原航班号
388 - status: undefined, //状态
389 - flightDate: undefined, //日期
390 - },
391 - dayOfWeek: [],
392 - // 表单参数
393 - form: {
394 - dayOfWeek: [],
395 - },
396 - // 表单校验
397 - rules: {
398 - sourceFlightNo: [
399 - {
400 - required: true,
401 - message: "ACCS原航班号不能为空",
402 - trigger: "blur",
403 - },
404 - ],
405 - flightRank: [
406 - {
407 - required: true,
408 - message: "配载航班不能为空",
409 - trigger: "blur",
410 - },
411 - ],
412 - },
413 - };
414 - },
415 - created() {
416 - this.findSourceFlightRules();
417 - },
418 - methods: {
419 - //跳转到查看,修改页面
420 - handleClick(flightiId, handle) {
421 - this.openFlightDate = false;
422 - this.$router.push({
423 - name: "FlightAllocConfigInfo",
424 - params: {
425 - handle: handle,
426 - id: flightiId,
427 - },
428 - });
429 - },
430 - /** 查询原航班顺位规则*/
431 - findSourceFlightRules() {
432 - this.loading = true;
433 - if (this.queryParams.pageNum > 1) {
434 - this.queryParams.start =
435 - (this.queryParams.pageNum - 1) * this.queryParams.limit;
436 - } else {
437 - this.queryParams.start = 0;
438 - }
439 - findSourceFlightRulesApi(this.queryParams).then((response) => {
440 - if (response.code == 200) {
441 - this.sourceFlightRulesList = response.data.list;
442 - this.total = response.data.totalCount;
443 - this.loading = false;
444 - } else {
445 - this.msgError(response.msg);
446 - }
447 - });
448 - },
449 - /** 新增按钮操作 */
450 - handleAdd() {
451 - this.form = {};
452 - this.open = true;
453 - this.title = "添加ACCS原航班顺位规则";
454 - this.form.id = -1;
455 - this.dayOfWeek = [];
456 - },
457 - /** 修改按钮操作 */
458 - handleUpdate(row) {
459 - this.form = {};
460 - this.dayOfWeek = [];
461 - this.open = true;
462 - this.title = "修改ACCS原航班顺位规则";
463 - this.form = JSON.parse(JSON.stringify(row));
464 - this.dayOfWeek = this.form.dayOfWeek
465 - ? this.form.dayOfWeek.split(";")
466 - : [];
467 - //this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
468 - },
469 - /** 删除 启用 停用按钮操作 */
470 - handleDeleteorPlayorpause(row, status, statusText) {
471 - //删除前需要停用
472 - if (status === 0 && row.status != "3") {
473 - this.$message({
474 - message: "请停用后删除",
475 - type: "warning",
476 - });
477 - return;
478 - }
479 -
480 - this.$confirm("是否确认" + statusText + "此数据项?", "警告", {
481 - confirmButtonText: "确定",
482 - cancelButtonText: "取消",
483 - type: "warning",
484 - }).then(() => {
485 - let disable = {
486 - id: row.id,
487 - status: status,
488 - };
489 - delOrEnableORDisableApi(disable)
490 - .then((response) => {
491 - if (response.code == 200) {
492 - this.findSourceFlightRules();
493 - this.msgSuccess(statusText + "成功");
494 - } else {
495 - this.msgError(response.msg);
496 - }
497 - })
498 - .catch(() => {});
499 - });
500 - },
501 - /** 提交按钮 */
502 - submitForm: function () {
503 - this.$refs["form"].validate((valid) => {
504 - if (valid) {
505 - this.form.dayOfWeek = this.dayOfWeek.sort();
506 - let formdata = JSON.parse(JSON.stringify(this.form));
507 - formdata.sourceFlightNo = formdata.sourceFlightNo
508 - .trim()
509 - .toUpperCase();
510 - formdata.flightRank = formdata.flightRank.trim().toUpperCase();
511 - if (formdata.startDate === undefined || formdata.startDate == null) {
512 - formdata.startDate = "";
513 - }
514 - if (formdata.endDate === undefined || formdata.endDate == null) {
515 - formdata.endDate = "";
516 - }
517 - //处理数据
518 - sourceFlightRulesSaveApi(formdata).then((response) => {
519 - if (response.code === 200) {
520 - this.msgSuccess("保存成功");
521 - this.open = false;
522 - this.findSourceFlightRules();
523 - } else {
524 - this.msgError(response.msg);
525 - }
526 - });
527 - }
528 - });
529 - },
530 - // 表单重置
531 - reset() {
532 - this.form = {
533 - dayOfWeek: [],
534 - };
535 - this.resetForm("form");
536 - },
537 - /** 查询目的航班*/
538 - findSourceFlightAndFlightDate() {
539 - //校验原航班号非空
540 - if (
541 - this.queryParams.sourceFlightNo === null ||
542 - this.queryParams.sourceFlightNo === undefined ||
543 - this.queryParams.sourceFlightNo.trim() === ""
544 - ) {
545 - this.$message.warning("ACCS原航班号为空");
546 - return;
547 - }
548 - //校验原日期非空
549 - if (
550 - this.queryParams.flightDate === null ||
551 - this.queryParams.flightDate === undefined
552 - ) {
553 - this.$message.warning("日期为空");
554 - return;
555 - }
556 - this.openFlightDate = true;
557 - this.loadingFlightDate = true;
558 - this.sourceFlightAndFlightDate = [];
559 - findSourceFlightAndFlightDateApi(this.queryParams).then((response) => {
560 - if (response.code === 200) {
561 - this.sourceFlightAndFlightDate = response.data;
562 - this.loadingFlightDate = false;
563 - } else {
564 - this.msgError(response.msg);
565 - }
566 - });
567 - },
568 - // 目的航班弹出框返回
569 - cancelFlightDate() {
570 - this.openFlightDate = false;
571 - this.findSourceFlightRules();
572 - },
573 - // 取消按钮
574 - cancel() {
575 - this.open = false;
576 - this.findSourceFlightRules();
577 - //this.reset();
578 - },
579 - // 状态字典翻译
580 - statusFormat(row) {
581 - if (row.status === "1") {
582 - return "有效";
583 - } else if (row.status === "0") {
584 - return "执行中";
585 - } else if (row.status === "3") {
586 - return "停用";
587 - }
588 - return row.status;
589 - },
590 - /** 重置按钮操作 */
591 - resetQuery() {
592 - this.queryParams.sourceFlightNo = undefined;
593 - this.resetForm("queryForm");
594 - this.handleQuery();
595 - },
596 - /** 搜索按钮操作 */
597 - handleQuery() {
598 - this.queryParams.pageNum = 1;
599 - this.queryParams.start = 0;
600 - this.findSourceFlightRules();
601 - },
602 - },
603 - computed: {
604 - upCase: {
605 - get: function () {
606 - return this.queryParams.sourceFlightNo;
607 - },
608 - set: function (val) {
609 - this.queryParams.sourceFlightNo = val.toUpperCase();
610 - },
611 - },
612 - },
613 -};
614 -</script>
615 -<style>
616 -</style>
1 -<template>
2 - <div class="app-container">
3 - <el-form
4 - class="form-header"
5 - :model="queryParams"
6 - label-position="right"
7 - label-width="auto"
8 - size="medium"
9 - >
10 - <el-row>
11 - <el-col :span="6">
12 - <el-form-item label="航班日期从" prop="fltDateStart">
13 - <el-date-picker
14 - value-format="yyyy-MM-dd"
15 - class="formItem"
16 - v-model="queryParams.fltDateStart"
17 - type="date"
18 - placeholder="选择日期"
19 - >
20 - </el-date-picker>
21 - </el-form-item>
22 - </el-col>
23 - <el-col :span="6">
24 - <el-form-item label="到" prop="fltDateEnd">
25 - <el-date-picker
26 - value-format="yyyy-MM-dd"
27 - class="formItem"
28 - v-model="queryParams.fltDateEnd"
29 - type="date"
30 - placeholder="选择日期"
31 - >
32 - </el-date-picker>
33 - </el-form-item>
34 - </el-col>
35 - <el-col :span="6">
36 - <el-form-item label="航班号">
37 - <el-input
38 - type="textarea"
39 - v-model="fltNo"
40 - clearable
41 - class="formItem"
42 - placeholder="AC001;AC002"
43 - rows="1"
44 - >
45 - </el-input>
46 - </el-form-item>
47 - </el-col>
48 - <el-col :span="6">
49 - <el-form-item label="运单号">
50 - <el-input
51 - clearable
52 - type="textarea"
53 - v-model="queryParams.waybillNo"
54 - class="formItem"
55 - placeholder="请输入运单号(回车间隔)"
56 - rows="1"
57 - ></el-input>
58 - </el-form-item>
59 - </el-col>
60 - <el-col :span="6">
61 - <el-form-item label="站点">
62 - <el-input
63 - type="textarea"
64 - v-model="siteName"
65 - class="formItem"
66 - placeholder="PVG;PEK"
67 - clearable
68 - rows="1"
69 - >
70 - </el-input>
71 - </el-form-item>
72 - </el-col>
73 - <el-col :span="6">
74 - <el-form-item label="URSA">
75 - <el-input
76 - clearable
77 - type="textarea"
78 - v-model="ursa"
79 - class="formItem"
80 - placeholder="S_;P_;E2"
81 - rows="1"
82 - >
83 - </el-input>
84 - </el-form-item>
85 - </el-col>
86 - <el-col :span="24">
87 - <el-switch
88 - v-model="queryParams.reExport"
89 - active-color="#13ce66"
90 - active-text="重新导出"
91 - style="padding-left: 35px"
92 - >
93 - </el-switch>
94 - </el-col>
95 - </el-row>
96 - <div style="margin-top: 25px">
97 - <el-button
98 - type="primary"
99 - icon="el-icon-search"
100 - size="mini"
101 - @click="handleQuery"
102 - >搜索</el-button
103 - >
104 - <el-button
105 - type="warning"
106 - :disabled="tableData.length == 0"
107 - @click="xlse()"
108 - :loading="downLoadingTip.downloading"
109 - icon="el-icon-download"
110 - size="mini"
111 - >{{
112 - downLoadingTip.downloading ? downLoadingTip.tip : "导出"
113 - }}</el-button
114 - >
115 - </div>
116 - </el-form>
117 -
118 - <el-table
119 - max-height="500"
120 - highlight-current-row
121 - border
122 - stripe
123 - v-loading="loading"
124 - :data="tableData"
125 - >
126 - <el-table-column
127 - label="运单号"
128 - align="center"
129 - prop="waybillNo"
130 - width="150"
131 - />
132 - <el-table-column
133 - :show-overflow-tooltip="true"
134 - label="品牌描述"
135 - align="center"
136 - prop="nameDescription"
137 - width="150"
138 - />
139 - <el-table-column
140 - label="航班日期"
141 - align="center"
142 - prop="fltDate"
143 - width="150"
144 - />
145 - <el-table-column label="航班号" align="center" prop="fltNo" />
146 - <el-table-column
147 - label="航班路线"
148 - align="center"
149 - prop="route"
150 - width="150"
151 - />
152 - <el-table-column
153 - label="配置航班类型"
154 - align="center"
155 - prop="kindName"
156 - width="130"
157 - />
158 - <el-table-column label="尺寸" align="center" prop="sizeStr" />
159 - <el-table-column label="件数" align="center" prop="qty" />
160 - <el-table-column label="实际重量" align="center" prop="actualWeight" />
161 - <el-table-column
162 - label="创建时间"
163 - align="center"
164 - prop="createTime"
165 - width="180"
166 - />
167 - </el-table>
168 - <pagination
169 - v-show="total > 0"
170 - :total="total"
171 - layout=" prev, pager, next, jumper, sizes,total"
172 - :page.sync="queryParams.pageNum"
173 - :limit.sync="queryParams.limitSize"
174 - @pagination="findAllFltData"
175 - />
176 - </div>
177 -</template>
178 -
179 -<script>
180 -import { findCagroPreData } from "@/api/cargoSelect";
181 -import { cargoXlsxPre } from "@/utils/zipdownload";
182 -export default {
183 - name: "CAPreQualificationExport",
184 - data() {
185 - return {
186 - //导出
187 - downLoadingTip: {
188 - tip: "",
189 - downloading: false,
190 - },
191 - tableData: [], //表格数据
192 - // 遮罩层
193 - loading: false,
194 - // 弹出层标题
195 - title: "",
196 - // 总条数
197 - total: 0,
198 - // 原航班规则数据
199 - findAllFltDatList: [],
200 - // 新增修改查看规则弹出层
201 - open: false,
202 - // 查询参数
203 - queryParams: {
204 - limitStart: 0, //当前条数【代表第几条数据 +1开始】
205 - pageNum: 1,
206 - limitSize: 20, //一页显示多少条数据
207 - fltDateStart: undefined, //航班日期开始
208 - fltDateEnd: undefined, //航班日期结束
209 - reExport: false,
210 - //航班号
211 - fltNo: null,
212 - //运单号
213 - waybillNo: "",
214 - //站点
215 - siteName: "",
216 - //ursa
217 - ursa: "",
218 - },
219 - // 表单校验
220 - rules: {},
221 - };
222 - },
223 - created() {},
224 - methods: {
225 - // 导出表格
226 - xlse() {
227 - this.downLoadingTip.downloading = true;
228 - this.downLoadingTip.tip = "正在导出结果集请耐心等待";
229 - let cargoXlse = { title: "航班预审表", cargoExportPreQueryDto: {} };
230 - cargoXlse.cargoExportPreQueryDto = JSON.parse(
231 - JSON.stringify(this.queryParams)
232 - );
233 - cargoXlse.cargoExportPreQueryDto.limitStart = 0;
234 - cargoXlse.cargoExportPreQueryDto.limitSize = -1;
235 - cargoXlsxPre("/cargo/excelPre", cargoXlse)
236 - .then(() => {
237 - this.downLoadingTip.downloading = false;
238 - this.downLoadingTip.tip = "";
239 - this.progress = 100;
240 - })
241 - .catch(() => {
242 - this.downLoadingTip.downloading = false;
243 - this.downLoadingTip.tip = "";
244 - });
245 - },
246 -
247 - /** 搜索按钮操作 */
248 - handleQuery() {
249 - this.queryParams.pageNum = 1;
250 - this.queryParams.start = 0;
251 - this.findAllFltData();
252 - },
253 - /** 预审信息查寻*/
254 - findAllFltData() {
255 - this.loading = true;
256 - if (this.queryParams.pageNum > 1) {
257 - this.queryParams.limitStart =
258 - (this.queryParams.pageNum - 1) * this.queryParams.limitSize;
259 - } else {
260 - this.queryParams.limitStart = 0;
261 - }
262 - findCagroPreData(this.queryParams).then((response) => {
263 - if (response.code == 200) {
264 - this.tableData = response.data.list;
265 - this.total = response.data.totalCount;
266 - this.loading = false;
267 - } else {
268 - this.msgError(response.msg);
269 - }
270 - });
271 - },
272 - },
273 - computed: {
274 - fltNo: {
275 - get: function () {
276 - return this.queryParams.fltNo;
277 - },
278 - set: function (val) {
279 - this.queryParams.fltNo = val.toUpperCase();
280 - },
281 - },
282 - siteName: {
283 - get: function () {
284 - return this.queryParams.siteName;
285 - },
286 - set: function (val) {
287 - this.queryParams.siteName = val.toUpperCase();
288 - },
289 - },
290 - ursa: {
291 - get: function () {
292 - return this.queryParams.ursa;
293 - },
294 - set: function (val) {
295 - this.queryParams.ursa = val.toUpperCase();
296 - },
297 - },
298 - },
299 -};
300 -</script>
301 -
302 -<style scoped>
303 -.tips {
304 - float: right;
305 - color: #606266;
306 - font-size: 14px;
307 - margin-right: 40px;
308 -}
309 -</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: #1890ff">以下为所提交的数据或出错信息</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 -
40 -<script>
41 - import {
42 - downLoadTemplate,
43 - importcaPreReview,
44 - } from "@/api/caPreReviewImport";
45 - export default {
46 - name:"CAPreReviewImport",
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 - this.loading=true;
85 - importcaPreReview(file, this.form.type).then((res) => {
86 - this.loading=false;
87 - if (res.code != 200) {
88 - if (res.code == 603) {
89 - this.$alert(res.msg, "提示", {
90 - confirmButtonText: "确定",
91 - type: "warning",
92 - });
93 - } else {
94 - this.$message.error(res.msg);
95 - this.tableData = res.data;
96 - }
97 - } else {
98 - this.$message.success(res.msg);
99 - this.tableData = res.data;
100 - }
101 - });
102 - },
103 - handleRemove(file, fileList) {
104 - //清掉上传的文件
105 - this.tableData = [];
106 - this.fileList = [];
107 - },
108 - handleExceed(files) {
109 - //重复上传文件
110 - let file = {};
111 - file.file = files[0];
112 - file.name = files[0].name;
113 - this.fileList = [];
114 - this.fileList.push(file);
115 - this.uploadExcel(file);
116 - },
117 - },
118 - created() {
119 -
120 - },
121 - };
122 -</script>
123 -<style rel="stylesheet/scss" lang="scss">
124 - .upload-demo {
125 - float: right;
126 - }
127 -
128 - .el-upload-list {
129 - display: inline-block;
130 - margin-left: 10px;
131 - vertical-align: top;
132 - }
133 -</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 label="航班种类">
5 - <el-select v-model="form.type" placeholder="航班种类">
6 - <el-option
7 - v-for="item in flightType"
8 - :key="item.id"
9 - :label="item.englishName"
10 - :value="item.code"
11 - >{{ item.englishName }}</el-option
12 - >
13 - </el-select>
14 - </el-form-item>
15 - <el-form-item>
16 - <el-upload
17 - action="/flightInfoImport/importFlight"
18 - name="file"
19 - :http-request="uploadExcel"
20 - :on-remove="handleRemove"
21 - :limit="1"
22 - :on-exceed="handleExceed"
23 - :file-list="fileList"
24 - accept=".xlsx"
25 - class="upload-demo"
26 - >
27 - <el-button type="primary">点击上传</el-button>
28 - </el-upload>
29 - </el-form-item>
30 - <el-form-item>
31 - <el-button type="primary" @click="downloadTempleate"
32 - >下载模板</el-button
33 - >
34 - </el-form-item>
35 - </el-form>
36 - <div style="font-size: 12px; font-weight: 700">
37 - 提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span>
38 - </div>
39 - <el-table
40 - ref="filterTable"
41 - :data="tableData"
42 - style="width: 100%; margin-top: 20px"
43 - size="small"
44 - border
45 - >
46 - <el-table-column label="行号" prop="line" fixed width="50" align="center">
47 - </el-table-column>
48 - <el-table-column label="错误信息" prop="errorMessage" fixed width="200">
49 - <template slot-scope="scope">
50 - <div v-for="(m, key) in scope.row.errorMessage" :key="key">
51 - {{ m }}
52 - </div>
53 - </template>
54 - </el-table-column>
55 - <el-table-column v-if="tableData.length == 0"></el-table-column>
56 - <el-table-column
57 - v-for="(value, key) in this.tableData[0]"
58 - :key="key"
59 - v-if="key != 'errorMessage' && key != 'line'"
60 - :label="key"
61 - :prop="key"
62 - width="120"
63 - ></el-table-column>
64 - </el-table>
65 - </div>
66 -</template>
67 -
68 -<script>
69 -import {
70 - filghtKindData,
71 - downLoadTemplate,
72 - importFlight,
73 -} from "@/api/flightInfoImport";
74 -export default {
75 - name: "FlightInformationImport",
76 - data() {
77 - return {
78 - flightType: [],
79 - form: {
80 - type: "",
81 - region: "",
82 - },
83 - fileList: [],
84 - tableData: [],
85 - };
86 - },
87 - methods: {
88 - downloadTempleate() {
89 - let downloadType = "";
90 - let fileName = "";
91 - switch (this.form.type) {
92 - case "flightKind20":
93 - downloadType = "whiteTail";
94 - fileName = "航班信息导入模板WhiteTail.xlsx";
95 - break;
96 - case "flightKind30":
97 - downloadType = "purpleTail";
98 - fileName = "航班信息导入模板PurpleTail.xlsx";
99 - break;
100 - default:
101 - this.$confirm("此类航班暂无模板,请选择其他类型航班", "提示", {
102 - confirmButtonText: "确定",
103 - showCancelButton: false,
104 - type: "warning",
105 - });
106 - }
107 - if (downloadType != "") {
108 - downLoadTemplate(downloadType).then((res) => {
109 - if (res) {
110 - const blob = new Blob([res]);
111 - const link = document.createElement("a"); //创建a标签
112 - link.download = fileName; //a标签添加属性
113 - link.style.display = "none";
114 - link.href = URL.createObjectURL(blob);
115 - document.body.appendChild(link);
116 - link.click(); //执行下载
117 - URL.revokeObjectURL(link.href); //释放url
118 - document.body.removeChild(link); //释放标签
119 - } else {
120 - this.$message.error("下载失败");
121 - }
122 - });
123 - }
124 - },
125 - uploadExcel(option) {
126 - //上传excel
127 - const file = option.file;
128 - importFlight(file, this.form.type).then((res) => {
129 - if (res.code != 200) {
130 - if (res.code == 603) {
131 - this.$alert(res.msg, "提示", {
132 - confirmButtonText: "确定",
133 - type: "warning",
134 - });
135 - } else {
136 - this.$message.error(res.msg);
137 - this.tableData = res.data;
138 - }
139 - } else {
140 - this.$message.success("导入成功");
141 - this.tableData = res.data;
142 - }
143 - });
144 - },
145 - handleRemove(file, fileList) {
146 - //清掉上传的文件
147 - this.tableData = [];
148 - this.fileList = [];
149 - },
150 - handleExceed(files) {
151 - //重复上传文件
152 - let file = {};
153 - file.file = files[0];
154 - file.name = files[0].name;
155 - this.fileList = [];
156 - this.fileList.push(file);
157 - this.uploadExcel(file);
158 - },
159 - },
160 - created() {
161 - filghtKindData().then((response) => {
162 - if (response.code != 200) {
163 - this.$message({
164 - message: response.msg,
165 - type: "error",
166 - });
167 - }
168 - this.flightType = response.data;
169 - this.form.type = response.data[0].code;
170 - });
171 - },
172 -};
173 -</script>
174 -
175 -<style rel="stylesheet/scss" lang="scss">
176 -.upload-demo {
177 - float: right;
178 -}
179 -.el-upload-list {
180 - display: inline-block;
181 - margin-left: 10px;
182 - vertical-align: top;
183 -}
184 -</style>
...\ No newline at end of file ...\ No newline at end of file
1 -<template>
2 - <div>
3 - <el-form
4 - class="form-header"
5 - :model="queryParams"
6 - ref="queryForm"
7 - label-position="right"
8 - label-width="auto"
9 - size="medium"
10 - >
11 - <el-row>
12 - <el-col :span="6">
13 - <el-form-item label="航班日期从" prop="fltDateStart">
14 - <el-date-picker
15 - class="formItem"
16 - value-format="yyyy-MM-dd"
17 - v-model="queryParams.fltDateStart"
18 - type="date"
19 - placeholder="选择日期"
20 - >
21 - </el-date-picker>
22 - </el-form-item>
23 - </el-col>
24 -
25 - <el-col :span="6">
26 - <el-form-item label="到" prop="fltDateEnd">
27 - <el-date-picker
28 - class="formItem"
29 - value-format="yyyy-MM-dd"
30 - v-model="queryParams.fltDateEnd"
31 - type="date"
32 - placeholder="选择日期"
33 - >
34 - </el-date-picker>
35 - </el-form-item>
36 - </el-col>
37 -
38 - <el-col :span="6">
39 - <el-form-item label="航班号" prop="fltNo">
40 - <el-input
41 - class="formItem"
42 - v-model="queryParams.fltNo"
43 - placeholder="请输入航班号"
44 - clearable
45 - />
46 - </el-form-item>
47 - </el-col>
48 -
49 - <el-col :span="6">
50 - <el-form-item label="航班类型" prop="typeId">
51 - <el-select
52 - class="formItem"
53 - v-model="queryParams.typeId"
54 - placeholder="请选择航班类型"
55 - clearable
56 - >
57 - <el-option
58 - v-for="dict in flightTypelist"
59 - :key="dict.id"
60 - :label="dict.chineseName"
61 - :value="dict.id"
62 - />
63 - </el-select>
64 - </el-form-item>
65 - </el-col>
66 -
67 - <el-col :span="6">
68 - <el-form-item label="航班状态" prop="statusId">
69 - <el-select
70 - class="formItem"
71 - v-model="queryParams.statusId"
72 - placeholder="请选择航班状态"
73 - clearable
74 - >
75 - <el-option
76 - v-for="dict in flightStatuslist"
77 - :key="dict.id"
78 - :label="dict.chineseName"
79 - :value="dict.id"
80 - />
81 - </el-select>
82 - </el-form-item>
83 - </el-col>
84 -
85 - <el-col :span="6">
86 - <el-form-item label="航班种类" prop="flightKindId">
87 - <el-select
88 - class="formItem"
89 - v-model="queryParams.flightKindId"
90 - placeholder="请选择航班种类"
91 - clearable
92 - >
93 - <el-option
94 - v-for="dict in flightKindlist"
95 - :key="dict.id"
96 - :label="dict.chineseName"
97 - :value="dict.id"
98 - />
99 - </el-select>
100 - </el-form-item>
101 - </el-col>
102 - </el-row>
103 -
104 - <el-button
105 - type="primary"
106 - icon="el-icon-search"
107 - size="mini"
108 - @click="handleQuery"
109 - >搜索</el-button
110 - >
111 - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
112 - >重置</el-button
113 - >
114 - <el-button
115 - type="primary"
116 - icon="el-icon-plus"
117 - size="mini"
118 - @click="handleAdd"
119 - >新增</el-button
120 - >
121 - <el-button
122 - type="danger"
123 - icon="el-icon-delete"
124 - size="mini"
125 - :disabled="multiple"
126 - @click="handleDelete"
127 - >删除
128 - </el-button>
129 - <el-button
130 - type="primary"
131 - icon="el-icon-circle-check"
132 - size="mini"
133 - @click="handleFlightStatus('flightStatus10')"
134 - >自动配舱开启</el-button
135 - >
136 - <el-button
137 - type="primary"
138 - icon="el-icon-circle-close"
139 - size="mini"
140 - @click="handleFlightStatus('flightStatus80')"
141 - >自动配舱关闭</el-button
142 - >
143 - </el-form>
144 - <!-- <el-row :gutter="10" class="mb8">
145 - <el-col :span="1.5">
146 - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
147 - </el-col>
148 - <el-col :span="1.5">
149 - <el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate">修改
150 - </el-button>
151 - </el-col>
152 - <el-col :span="1.5">
153 - <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple">删除
154 - </el-button>
155 - </el-col>
156 - </el-row> -->
157 - <el-table
158 - height="550"
159 - highlight-current-row
160 - border
161 - stripe
162 - v-loading="loading"
163 - :data="findAllFltDatList"
164 - size="small"
165 - @selection-change="handleSelectionChange"
166 - >
167 - <el-table-column type="selection" width="55" align="center" />
168 - <el-table-column
169 - label="航班日期"
170 - align="center"
171 - prop="fltDate"
172 - width="120"
173 - />
174 - <el-table-column
175 - label="航班起飞时间"
176 - align="center"
177 - prop="takeOffTime"
178 - width="120"
179 - />
180 - <el-table-column label="航班号" align="center" prop="fltNo" width="150"/>
181 - <el-table-column label="航班路线" align="center" prop="route" width="150" />
182 - <el-table-column
183 - label="航班类型"
184 - align="center"
185 - prop="typeName"
186 - width="100"
187 - />
188 - <el-table-column
189 - label="航班种类"
190 - align="center"
191 - prop="flightKindName"
192 - width="130"
193 - />
194 - <el-table-column label="航班状态" align="center" prop="statusName" />
195 - <el-table-column
196 - label="总重量"
197 - align="center"
198 - prop="totalWeight"
199 - width="130"
200 - />
201 - <el-table-column
202 - label="原始重量(KG)"
203 - align="center"
204 - prop="originalWeight"
205 - width="130"
206 - />
207 - <el-table-column
208 - label="总体积(cm³)"
209 - align="center"
210 - prop="totalVolume"
211 - width="130"
212 - />
213 - <el-table-column
214 - label="是否限制一票一件"
215 - align="center"
216 - prop="ticketToPiece"
217 - width="150"
218 - :formatter="ticketToPieceFormat"
219 - />
220 - <el-table-column
221 - label="是否需要预审"
222 - align="center"
223 - prop="needRequired"
224 - width="150"
225 - :formatter="needRequiredFormat"
226 - />
227 - <el-table-column
228 - label="额外增重百分比"
229 - align="center"
230 - prop="extraWeightPercent"
231 - width="150"
232 - />
233 - <el-table-column
234 - label="高价百分比"
235 - align="center"
236 - prop="highPriceWeightPercent"
237 - width="150"
238 - />
239 - <el-table-column
240 - label="低价百分比"
241 - align="center"
242 - prop="lowPriceWeightPercent"
243 - width="150"
244 - />
245 - <el-table-column
246 - label="是否开启高地价"
247 - align="center"
248 - prop="highLowPriceFlg"
249 - width="150"
250 - :formatter="highLowPriceFlgFormat"
251 - />
252 - <el-table-column
253 - label="已配重量"
254 - align="center"
255 - prop="alloctedWeight"
256 - width="150"
257 - />
258 - <el-table-column
259 - label="已配体积(cm³)"
260 - align="center"
261 - prop="alloctedVolume"
262 - width="150"
263 - />
264 - <el-table-column
265 - label="航班优先级"
266 - align="center"
267 - prop="priorityName"
268 - width="150"
269 - />
270 - <el-table-column
271 - label="配舱优先级"
272 - align="center"
273 - prop="priorityRuleName"
274 - width="150"
275 - />
276 - <el-table-column
277 - label="创建人"
278 - align="center"
279 - prop="createUserName"
280 - width="120"
281 - />
282 - <el-table-column
283 - label="创建时间"
284 - align="center"
285 - prop="createTime"
286 - width="155"
287 - />
288 -
289 - <!-- <el-table-column label="创建时间" align="center" prop="createTime" width="155">
290 - <template slot-scope="scope">
291 - <span>{{ renderTime(scope.row.createTime) }}</span>
292 - </template>
293 - </el-table-column> -->
294 - <el-table-column
295 - label="最后修改人"
296 - align="center"
297 - prop="lastModifyUserName"
298 - width="155"
299 - />
300 - <!-- <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="155">
301 - <template slot-scope="scope">
302 - <span>{{ renderTime(scope.row.lastModifyTime) }}</span>
303 - </template>
304 - </el-table-column> -->
305 - <el-table-column
306 - label="最后修改时间"
307 - align="center"
308 - prop="lastModifyTime"
309 - width="120"
310 - />
311 -
312 - <el-table-column
313 - v-if="findAllFltDatList.length > 0"
314 - label="操作"
315 - align="center"
316 - class-name="small-padding fixed-width"
317 - width="130"
318 - fixed="right"
319 - >
320 - <template slot-scope="scope">
321 - <el-button
322 - size="mini"
323 - type="text"
324 - icon="el-icon-edit"
325 - @click="handleUpdate(scope.row)"
326 - >修改</el-button
327 - >
328 - <!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row,'删除')">
329 - 删除</el-button> -->
330 - </template>
331 - </el-table-column>
332 - </el-table>
333 -
334 - <pagination
335 - v-show="total > 0"
336 - :total="total"
337 - layout=" prev, pager, next, jumper, sizes,total"
338 - :page.sync="queryParams.pageNum"
339 - :limit.sync="queryParams.limitSize"
340 - @pagination="findAllFltData"
341 - />
342 -
343 - <!-- 添加或修改对话框 -->
344 - <el-dialog
345 - :title="title"
346 - :visible.sync="open"
347 - width="60%"
348 - :close-on-click-modal="false"
349 - :append-to-body="true"
350 - >
351 - <el-form
352 - ref="form"
353 - :model="form"
354 - :rules="rules"
355 - label-position="right"
356 - label-width="auto"
357 - >
358 - <el-row>
359 - <el-col :span="12">
360 - <el-form-item label="航班号" prop="fltNo">
361 - <el-input
362 - @blur="blurfltNo"
363 - :disabled="formdisabled.fltNo"
364 - style="width: 93%"
365 - v-model="form.fltNo"
366 - placeholder="请输入航班号"
367 - />
368 - </el-form-item>
369 - </el-col>
370 - <!-- <el-col :span="1"> &#12288;</el-col> -->
371 - <el-col :span="12">
372 - <el-form-item label="航班日期" prop="fltDate">
373 - <el-date-picker
374 - :disabled="formdisabled.fltDate"
375 - clearable
376 - size="small"
377 - v-model="form.fltDate"
378 - type="date"
379 - value-format="yyyy-MM-dd"
380 - placeholder="选择航班日期"
381 - >
382 - </el-date-picker>
383 - </el-form-item>
384 - </el-col>
385 -
386 - <el-col :span="12">
387 - <el-form-item label="航班路线" prop="route">
388 - <el-input
389 - style="width: 93%"
390 - v-model="form.route"
391 - placeholder="请输入航班路线"
392 - />
393 - </el-form-item>
394 - </el-col>
395 -
396 - <el-col :span="12">
397 - <el-form-item label="航班种类" prop="kindId">
398 - <el-select v-model="form.kindId" placeholder="请选择航班种类">
399 - <el-option
400 - v-for="item in flightKindlist"
401 - :key="item.id"
402 - :label="item.chineseName"
403 - :value="item.id"
404 - >
405 - </el-option>
406 - </el-select>
407 - </el-form-item>
408 - </el-col>
409 - <el-col :span="12">
410 - <el-form-item label="航班类型" prop="typeId">
411 - <el-select v-model="form.typeId" placeholder="请选择航班类型">
412 - <el-option
413 - v-for="item in flightTypelist"
414 - :key="item.id"
415 - :label="item.chineseName"
416 - :value="item.id"
417 - >
418 - </el-option>
419 - </el-select>
420 - </el-form-item>
421 - </el-col>
422 - <el-col :span="12">
423 - <el-form-item label="航班状态" prop="statusId">
424 - <el-select
425 - :disabled="true"
426 - v-model="form.statusId"
427 - placeholder="请选择航班状态"
428 - >
429 - <el-option
430 - v-for="item in flightStatuslist"
431 - :key="item.id"
432 - :label="item.chineseName"
433 - :value="item.id"
434 - >
435 - </el-option>
436 - </el-select>
437 - </el-form-item>
438 - </el-col>
439 - <el-col :span="12">
440 - <el-form-item label="原始重量(KG)" prop="originalWeight">
441 - <el-input-number
442 - @change="LowHighAvailable"
443 - placeholder="请输入原始重量(KG)"
444 - style="width: 93%"
445 - v-model="form.originalWeight"
446 - ></el-input-number>
447 - </el-form-item>
448 - </el-col>
449 -
450 - <el-col :span="12">
451 - <el-form-item label="额外增重百分比" prop="extraWeightPercent">
452 - <el-input-number
453 - @change="LowHighAvailable"
454 - placeholder="请输入额外增重百分比"
455 - style="width: 93%"
456 - v-model="form.extraWeightPercent"
457 - ></el-input-number>
458 - </el-form-item>
459 - </el-col>
460 -
461 - <el-col :span="12">
462 - <el-form-item label="是否开启高低价" prop="highLowPriceFlg">
463 - <el-switch
464 - @change="LowHighAvailable"
465 - v-model="form.highLowPriceFlg"
466 - active-color="#13ce66"
467 - >
468 - </el-switch>
469 - </el-form-item>
470 - </el-col>
471 -
472 - <!-- 是否需要预审,1:预审,0:取消预审 -->
473 - <el-col :span="12">
474 - <el-form-item label="是否预审" prop="isNeedRequired">
475 - <el-switch
476 - :disabled="true"
477 - v-model="form.isNeedRequired"
478 - active-color="#13ce66"
479 - >
480 - </el-switch>
481 - </el-form-item>
482 - </el-col>
483 -
484 - <el-col :span="12">
485 - <el-form-item label="高价百分比" prop="highPriceWeightPercent">
486 - <el-input-number
487 - :disabled="ishighPriceWeightPercent"
488 - @change="LowHighAvailable"
489 - placeholder="请输入高价百分比"
490 - style="width: 93%"
491 - v-model="form.highPriceWeightPercent"
492 - ></el-input-number>
493 - </el-form-item>
494 - </el-col>
495 -
496 - <el-col :span="12">
497 - <el-form-item label="低价百分比" prop="lowPriceWeightPercent">
498 - <el-input-number
499 - :disabled="true"
500 - placeholder="请输入低价百分比"
501 - style="width: 93%"
502 - v-model="form.lowPriceWeightPercent"
503 - ></el-input-number>
504 - </el-form-item>
505 - </el-col>
506 -
507 - <el-col :span="12">
508 - <el-form-item label="高价可配重量" prop="highAvailableWeight">
509 - <el-input-number
510 - :disabled="true"
511 - placeholder="请输入高价可配重量"
512 - style="width: 93%"
513 - v-model="form.highAvailableWeight"
514 - :precision="2"
515 - ></el-input-number>
516 - </el-form-item>
517 - </el-col>
518 - <el-col :span="12">
519 - <el-form-item label="低价可配重量" prop="lowAvailableWeight">
520 - <el-input-number
521 - :disabled="true"
522 - placeholder="请输入低价可配重量"
523 - style="width: 93%"
524 - v-model="form.lowAvailableWeight"
525 - :precision="2"
526 - ></el-input-number>
527 - </el-form-item>
528 - </el-col>
529 -
530 - <el-col :span="12">
531 - <el-form-item label="高价已配重量" prop="highAllocatedWeight">
532 - <el-input-number
533 - :disabled="true"
534 - placeholder="请输入高价已配重量"
535 - style="width: 93%"
536 - v-model="form.highAllocatedWeight"
537 - :precision="2"
538 - ></el-input-number>
539 - </el-form-item>
540 - </el-col>
541 - <el-col :span="12">
542 - <el-form-item label="低价已配重量" prop="lowAllocatedWeight">
543 - <el-input-number
544 - :disabled="true"
545 - placeholder="请输入低价已配重量"
546 - style="width: 93%"
547 - v-model="form.lowAllocatedWeight"
548 - :precision="2"
549 - ></el-input-number>
550 - </el-form-item>
551 - </el-col>
552 - <el-col :span="12">
553 - <el-form-item label="已配总重量" prop="alloctedWeight">
554 - <el-input-number
555 - :disabled="true"
556 - placeholder="请输入已配总重量"
557 - style="width: 93%"
558 - v-model="form.alloctedWeight"
559 - :precision="2"
560 - ></el-input-number>
561 - </el-form-item>
562 - </el-col>
563 - </el-row>
564 - </el-form>
565 - <div slot="footer" class="dialog-footer">
566 - <el-button type="primary" @click="submitForm">确 定</el-button>
567 - <el-button @click="cancel">取 消</el-button>
568 - </div>
569 - </el-dialog>
570 -
571 - <el-dialog
572 - title="未删除成功航班"
573 - width="40%"
574 - center
575 - :visible.sync="dialogTableVisible"
576 - :close-on-click-modal="false" :append-to-body="true"
577 - >
578 - <el-table :data="gridData">
579 - <el-table-column
580 - property="fltNo"
581 - label="航班号"
582 - width="150"
583 - ></el-table-column>
584 - <el-table-column
585 - property="fltDate"
586 - label="航班日期"
587 - width="200"
588 - ></el-table-column>
589 - <el-table-column
590 - property="alloctedWeight"
591 - label="已配重量"
592 - width="200"
593 - ></el-table-column>
594 - </el-table>
595 - </el-dialog>
596 - </div>
597 -</template>
598 -
599 -<script>
600 -import {
601 - delFlight,
602 - findFltConditionDataApi,
603 - findAllFltDataApi,
604 - findFltById,
605 - saveOrUpdate,
606 - findFltCommonConf,
607 - updateStatusBatch,
608 -} from "@/api/findAllFltData";
609 -export default {
610 - name: "FlightInformationMaintenance",
611 - data() {
612 - return {
613 - gridData: [],
614 - dialogTableVisible: false,
615 - //高价百分比是否打开
616 - ishighPriceWeightPercent: true,
617 - //form属性禁用状态
618 - formdisabled: {
619 - //航班号
620 - fltNo: false,
621 - //航班日期
622 - fltDate: false,
623 - //航班路线
624 - route: false,
625 - //航班种类
626 - kindId: false,
627 - //航班类型
628 - typeId: false,
629 - //原始重量
630 - originalWeight: false,
631 - },
632 -
633 - //航班种类
634 - flightKindlist: [],
635 - //航班状态
636 - flightStatuslist: [],
637 - //航班类型
638 - flightTypelist: [],
639 - // 选中数组
640 - ids: [],
641 - // 非单个禁用
642 - single: true,
643 - // 非多个禁用
644 - multiple: true,
645 -
646 - // 遮罩层
647 - loading: false,
648 - // 遮罩层
649 - loadingFlightDate: false,
650 - // 弹出层标题
651 - title: "",
652 - // 总条数
653 - total: 0,
654 - // 原航班规则数据
655 - findAllFltDatList: [],
656 - //目的航班数据
657 - sourceFlightAndFlightDate: [],
658 - statusList: [
659 - {
660 - id: 1,
661 - name: "有效",
662 - },
663 - {
664 - id: 3,
665 - name: "停用",
666 - },
667 - ],
668 - // 新增修改查看规则弹出层
669 - open: false,
670 - // 是否显示查看目的航班弹出层
671 - openFlightDate: false,
672 - // 查询参数
673 - queryParams: {
674 - limitStart: 0, //当前条数【代表第几条数据 +1开始】
675 - pageNum: 1,
676 - limitSize: 20, //一页显示多少条数据
677 - fltDateStart: undefined, //航班日期开始
678 - fltDateEnd: undefined, //航班日期结束
679 - typeId: undefined, //航班类型
680 - statusId: undefined, //航班状态
681 - flightKindId: undefined, //航班种类
682 - fltNo: undefined, //航班号,要大写
683 - },
684 -
685 - // 表单参数
686 - form: {},
687 - // 表单校验
688 - rules: {
689 - fltNo: [
690 - {
691 - required: true,
692 - message: "ACCS原航班号不能为空",
693 - trigger: "blur",
694 - },
695 - ],
696 - fltDate: [
697 - {
698 - required: true,
699 - message: "航班日期不能为空",
700 - trigger: "blur",
701 - },
702 - ],
703 - kindId: [
704 - {
705 - required: true,
706 - message: "航班种类不能为空",
707 - trigger: "change",
708 - },
709 - ],
710 - originalWeight: [
711 - {
712 - required: true,
713 - message: "原始重量(KG)不能为空",
714 - trigger: "blur",
715 - },
716 - ],
717 - },
718 - };
719 - },
720 - created() {
721 - //查询条件数据源
722 - this.findFltConditionData();
723 - this.findAllFltData();
724 - },
725 - methods: {
726 - //输入航班号后
727 - blurfltNo() {
728 - if (
729 - this.form.fltNo != null &&
730 - this.form.fltNo != undefined &&
731 - this.form.fltNo != ""
732 - ) {
733 - this.form.fltNo = this.form.fltNo.toUpperCase();
734 - findFltCommonConf(this.form).then((response) => {
735 - if (response.code == 200) {
736 - //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑
737 - if (
738 - response.data != null &&
739 - response.data.extraWeightPercent != null &&
740 - response.data.extraWeightPercent != undefined
741 - ) {
742 - this.$set(
743 - this.form,
744 - "extraWeightPercent",
745 - response.data.extraWeightPercent
746 - );
747 - // this.form.extraWeightPercent=response.data.extraWeightPercent;
748 - } else {
749 - this.$set(this.form, "extraWeightPercent", 0);
750 - //this.form.extraWeightPercent=response.data.extraWeightPercent=0;
751 - }
752 - //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑
753 - if (
754 - response.data != null &&
755 - response.data.highLowPriceFlg != null &&
756 - response.data.highLowPriceFlg != undefined
757 - ) {
758 - this.form.highLowPriceFlg =
759 - response.data.highLowPriceFlg === 1 ? true : false;
760 - } else {
761 - this.$set(this.form, "highLowPriceFlg", true);
762 - //this.form.highLowPriceFlg = true;
763 - }
764 - //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑;
765 - if (
766 - response.data != null &&
767 - response.data.isNeedRequired != null &&
768 - response.data.isNeedRequired != undefined
769 - ) {
770 - this.form.isNeedRequired =
771 - response.data.isNeedRequired === 1 ? true : false;
772 - } else {
773 - this.form.isNeedRequired = false;
774 - }
775 - //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑
776 - if (
777 - response.data != null &&
778 - response.data.highPriceWeightPercent != null &&
779 - response.data.highPriceWeightPercent != undefined
780 - ) {
781 - this.form.highPriceWeightPercent =
782 - response.data.highPriceWeightPercent;
783 - } else {
784 - this.form.highPriceWeightPercent = 60;
785 - }
786 - if (
787 - response.data != null &&
788 - response.data.lowPriceWeightPercent != null &&
789 - response.data.lowPriceWeightPercent != undefined
790 - ) {
791 - this.form.lowPriceWeightPercent =
792 - response.data.lowPriceWeightPercent;
793 - } else {
794 - this.form.lowPriceWeightPercent = 40;
795 - }
796 - this.LowHighAvailable();
797 - } else {
798 - this.msgError(response.msg);
799 - }
800 - });
801 - }
802 - },
803 - // 是否一票一件
804 - ticketToPieceFormat(row) {
805 - if (row.ticketToPiece === 1) {
806 - return "是";
807 - } else {
808 - return "否";
809 - }
810 - return row.ticketToPiece;
811 - },
812 - // 是否需要预审 1 预审 0 取消预审
813 - needRequiredFormat(row) {
814 - if (row.needRequired === 1) {
815 - return "是";
816 - } else {
817 - return "否";
818 - }
819 - return row.ticketToPiece;
820 - },
821 - //是否开启高低价
822 - highLowPriceFlgFormat(row) {
823 - if (row.highLowPriceFlg === 1) {
824 - return "开启";
825 - } else {
826 - return "未开启";
827 - }
828 - return row.ticketToPiece;
829 - },
830 - //时间格式化
831 - renderTime(date) {
832 - var dateee = new Date(date).toJSON();
833 - return new Date(+new Date(dateee) + 8 * 3600 * 1000)
834 - .toISOString()
835 - .replace(/T/g, " ")
836 - .replace(/\.[\d]{3}Z/, "");
837 - },
838 - //查询条件数据源
839 - findFltConditionData() {
840 - findFltConditionDataApi().then((response) => {
841 - if (response.code == 200) {
842 - //航班种类
843 - this.flightKindlist = response.data.flightKind;
844 - //航班类型
845 - this.flightTypelist = response.data.flightType;
846 - //航班状态
847 - this.flightStatuslist = response.data.flightStatus;
848 - } else {
849 - this.msgError(response.msg);
850 - }
851 - });
852 - },
853 -
854 - // 多选框选中数据
855 - handleSelectionChange(selection) {
856 - this.ids = selection.map((item) => item.id);
857 - this.single = selection.length != 1;
858 - this.multiple = !selection.length;
859 - },
860 -
861 - /** 航班信息维护查询*/
862 - findAllFltData() {
863 - this.loading = true;
864 - if (this.queryParams.pageNum > 1) {
865 - this.queryParams.limitStart =
866 - (this.queryParams.pageNum - 1) * this.queryParams.limitSize;
867 - } else {
868 - this.queryParams.limitStart = 0;
869 - }
870 - if (
871 - this.queryParams.fltNo != null &&
872 - this.queryParams.fltNo != undefined &&
873 - this.queryParams.fltNo != ""
874 - ) {
875 - this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase();
876 - }
877 -
878 - findAllFltDataApi(this.queryParams).then((response) => {
879 - if (response.code == 200) {
880 - this.findAllFltDatList = response.data.list;
881 - this.total = response.data.totalCount;
882 - this.loading = false;
883 - } else {
884 - this.msgError(response.msg);
885 - }
886 - });
887 - },
888 - /** 新增按钮操作 */
889 - handleAdd() {
890 - this.reset();
891 - this.open = true;
892 - this.title = "添加航班信息";
893 - this.form.id = null;
894 - this.form.statusId = this.flightStatuslist[0].id;
895 - this.form.alloctedWeight = 0; //已配重量
896 - this.form.lowAllocatedWeight = 0; //低价已配重量
897 - this.form.highAllocatedWeight = 0; //高价已配重量
898 -
899 - //航班号
900 - this.formdisabled.fltNo = false;
901 - //航班日期
902 - this.formdisabled.fltDate = false;
903 - //航班路线
904 - this.formdisabled.route = false;
905 - //航班种类
906 - this.formdisabled.kindId = false;
907 - //航班类型
908 - this.formdisabled.typeId = false;
909 - //原始重量
910 - this.formdisabled.originalWeight = false;
911 - },
912 - //计算高地价可配
913 - LowHighAvailable() {
914 - //判断是否开启高地价
915 - if (this.form.highLowPriceFlg) {
916 - this.ishighPriceWeightPercent = false;
917 - let Weight = 0;
918 - //计算实际重量
919 - if (
920 - this.form.highPriceWeightPercent > 0 ||
921 - this.form.lowPriceWeightPercent > 0
922 - ) {
923 - Weight = this.Weightall();
924 - }
925 - //高价可配
926 - if (this.form.highPriceWeightPercent >= 0) {
927 - this.$set(
928 - this.form,
929 - "lowPriceWeightPercent",
930 - 100 - this.form.highPriceWeightPercent
931 - );
932 - this.$set(
933 - this.form,
934 - "highAvailableWeight",
935 - (Weight - this.form.alloctedWeight) *
936 - (this.form.highPriceWeightPercent / 100)
937 - );
938 - // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100)
939 - } else if (
940 - this.title == "修改航班信息" &&
941 - this.form.highPriceWeightPercent > 0
942 - ) {
943 - if (this.form.highAvailableWeight) {
944 - this.$set(
945 - this.form,
946 - "highAvailableWeight",
947 - this.form.highAvailableWeight
948 - );
949 - } else {
950 - this.$set(
951 - this.form,
952 - "highAvailableWeight",
953 - (Weight - this.form.alloctedWeight) *
954 - (this.form.highPriceWeightPercent / 100)
955 - );
956 - }
957 - } else {
958 - this.$set(this.form, "highAvailableWeight", 0);
959 - // this.form.HighAvailableWeight = 0;
960 - }
961 - //低价可配
962 - if (this.form.lowPriceWeightPercent > 0) {
963 - this.$set(
964 - this.form,
965 - "lowAvailableWeight",
966 - Weight - this.form.alloctedWeight - this.form.highAvailableWeight
967 - );
968 - //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight;
969 - } else if (
970 - this.title == "修改航班信息" &&
971 - this.form.lowPriceWeightPercent > 0
972 - ) {
973 - if (this.form.lowAvailableWeight) {
974 - this.$set(
975 - this.form,
976 - "lowAvailableWeight",
977 - this.form.lowAvailableWeight
978 - );
979 - } else {
980 - this.$set(
981 - this.form,
982 - "lowAvailableWeight",
983 - Weight - this.form.alloctedWeight - this.form.highAvailableWeight
984 - );
985 - }
986 - } else {
987 - this.$set(this.form, "lowAvailableWeight", 0);
988 - // this.form.lowAvailableWeight = 0;
989 - }
990 - } else {
991 - this.ishighPriceWeightPercent = true;
992 - }
993 - },
994 - //计算实际重量
995 - Weightall() {
996 - let Weight = 0;
997 - if (this.form.extraWeightPercent > 0) {
998 - Weight =
999 - this.form.originalWeight +
1000 - this.form.originalWeight * (this.form.extraWeightPercent / 100);
1001 - } else {
1002 - Weight = this.form.originalWeight;
1003 - }
1004 - return Weight;
1005 - },
1006 -
1007 - /** 修改按钮操作 */
1008 - handleUpdate(row) {
1009 - this.reset();
1010 - this.open = true;
1011 - this.title = "修改航班信息";
1012 - //航班号
1013 - this.formdisabled.fltNo = true;
1014 - //航班日期
1015 - this.formdisabled.fltDate = true;
1016 - //根据ID查item
1017 - findFltById(row).then((response) => {
1018 - if (response.code == 200) {
1019 - this.form = response.data;
1020 - //是否开启高地价
1021 - this.form.highLowPriceFlg =
1022 - this.form.highLowPriceFlg === 1 ? true : false;
1023 - //是否预审
1024 - this.form.isNeedRequired =
1025 - this.form.isNeedRequired === 1 ? true : false;
1026 - // 计算高地价可配
1027 - this.LowHighAvailable();
1028 - } else {
1029 - this.msgError(response.msg);
1030 - }
1031 - });
1032 - },
1033 - /** 删除按钮操作 */
1034 - handleDelete(row) {
1035 - const fIds = this.ids;
1036 - this.$confirm("是否确认删除所选数据?", "警告", {
1037 - confirmButtonText: "确定",
1038 - cancelButtonText: "取消",
1039 - type: "warning",
1040 - })
1041 - .then(() => {
1042 - return delFlight(fIds);
1043 - })
1044 - .then((response) => {
1045 - this.findAllFltData();
1046 - if (response.data.length > 0) {
1047 - this.gridData = response.data;
1048 - this.$confirm(response.msg, "提示", {
1049 - confirmButtonText: "查看删除失败航班信息",
1050 - cancelButtonText: "取消",
1051 - type: "warning",
1052 - center: true,
1053 - })
1054 - .then(() => {
1055 - this.dialogTableVisible = true;
1056 - })
1057 - .catch(() => {});
1058 - } else {
1059 - this.msgSuccess(response.msg);
1060 - }
1061 - })
1062 - .catch(() => {});
1063 - },
1064 -
1065 - /** 提交按钮 */
1066 - submitForm: function () {
1067 - this.$refs["form"].validate((valid) => {
1068 - if (valid) {
1069 - let formdata = JSON.parse(JSON.stringify(this.form));
1070 -
1071 - //高价百分比和低价百分比和不可以大于100
1072 - if (
1073 - this.form.highLowPriceFlg &&
1074 - (formdata.highPriceWeightPercent > 100 ||
1075 - formdata.highPriceWeightPercent < 0)
1076 - ) {
1077 - this.$message.warning("请正确填写高低价百分比");
1078 - return;
1079 - }
1080 - //已删除的无法修改
1081 - //拿到已删除的id
1082 - let statusId = 0;
1083 - this.flightStatuslist.map((item) => {
1084 - // this.unitList 是你 select option遍历的集合 e 是选中的id
1085 - if (item.chineseName === "已删除") {
1086 - statusId = item.id;
1087 - return;
1088 - }
1089 - });
1090 - if (statusId === formdata.statusId) {
1091 - this.$message.warning("已删除的航班无法修改");
1092 - return;
1093 - }
1094 - //是否开启高地价
1095 - formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0;
1096 - //是否预审
1097 - formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0;
1098 - //处理数据
1099 - saveOrUpdate(formdata).then((response) => {
1100 - if (response.code === 200) {
1101 - this.msgSuccess("保存成功");
1102 - this.open = false;
1103 - this.findAllFltData();
1104 - } else {
1105 - this.msgError(response.msg);
1106 - }
1107 - });
1108 - }
1109 - });
1110 - },
1111 - // 表单重置
1112 - reset() {
1113 - this.form = {};
1114 - this.resetForm("form");
1115 - },
1116 - // 取消按钮
1117 - cancel() {
1118 - this.open = false;
1119 - this.findAllFltData();
1120 - this.reset();
1121 - },
1122 -
1123 - /** 重置按钮操作 */
1124 - resetQuery() {
1125 - this.resetForm("queryForm");
1126 - this.handleQuery();
1127 - },
1128 - /** 搜索按钮操作 */
1129 - handleQuery() {
1130 - this.queryParams.pageNum = 1;
1131 - this.queryParams.start = 0;
1132 - this.findAllFltData();
1133 - },
1134 - //批量开启/关闭航班
1135 - handleFlightStatus(status) {
1136 - let handle = status == "flightStatus80" ? "关闭" : "开启";
1137 - if (this.ids.length == 0) {
1138 - this.msgError("请选择批量" + handle + "的航班");
1139 - return;
1140 - }
1141 - let data = {};
1142 - data.status = status;
1143 - data.updateIds = this.ids;
1144 -
1145 - updateStatusBatch(data).then((response) => {
1146 - if (response.code === 200) {
1147 - this.msgSuccess(handle + "成功");
1148 - this.findAllFltData();
1149 - } else {
1150 - this.msgError(response.msg);
1151 - }
1152 - });
1153 - },
1154 - },
1155 -};
1156 -</script>
1157 -
1158 -<style>
1159 -.el-table--striped .el-table__body tr.el-table__row--striped.current-row td,
1160 -.el-table__body tr.current-row > td {
1161 - background-color: #a0cfff;
1162 -}
1163 -
1164 -.el-table--striped .el-table__body tr.hover-row.el-table__row--striped > td,
1165 -.el-table__body tr.hover-row > td {
1166 - background-color: #d9ecff !important;
1167 -}
1168 -</style>
1 -<template>
2 - <div class="cargoPage">
3 - <el-form
4 - ref="cargoForm"
5 - class="form-header"
6 - label-position="right"
7 - label-width="auto"
8 - size="small"
9 - :model="formData"
10 - >
11 - <el-row type="flex" style="flexWrap: wrap!important">
12 - <el-col :span="6">
13 - <el-form-item label="配舱航班日期">
14 - <el-date-picker
15 - class="formItem"
16 - v-model="cargoPlaneTime"
17 - type="daterange"
18 - range-separator="至"
19 - start-placeholder="开始日期"
20 - end-placeholder="结束日期"
21 - :value-format="valueFormat"
22 - >
23 - </el-date-picker>
24 - </el-form-item>
25 - </el-col>
26 - <el-col :span="6">
27 - <el-form-item label="配载航班号">
28 - <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :autosize="true"></el-input>
29 - </el-form-item>
30 - </el-col>
31 - <el-col :span="6">
32 - <el-form-item label="海关回执状态">
33 - <el-select
34 - placeholder="不限"
35 - v-model="formData.customsReceiptStatusId"
36 - class="formItem"
37 - multiple
38 - clearable
39 - >
40 - <el-option
41 - v-for="item in findConditionData.cargoCustomsReturnStatus"
42 - :label="item.chineseName"
43 - :value="item.id"
44 - :key="item.id"
45 - >
46 - </el-option>
47 - </el-select>
48 - </el-form-item>
49 - </el-col>
50 - <el-col :span="6">
51 - <el-form-item label="运单号">
52 - <el-input
53 - type="textarea"
54 - v-model="formData.waybillNo"
55 - class="formItem"
56 - placeholder="请输入运单号(回车间隔)"
57 - :autosize="true"
58 - ></el-input>
59 - </el-form-item>
60 - </el-col>
61 - <el-col :span="6">
62 - <el-form-item label="申报类别">
63 - <el-select
64 - placeholder="不限"
65 - v-model="formData.typeId"
66 - class="formItem"
67 - clearable
68 - >
69 - <el-option
70 - v-for="item in findConditionData.cargoType"
71 - :label="item.chineseName"
72 - :value="item.id"
73 - :key="item.id"
74 - >
75 - </el-option>
76 - </el-select>
77 - </el-form-item>
78 - </el-col>
79 - <el-col :span="6">
80 - <el-form-item label="服务类型">
81 - <el-select
82 - placeholder="不限"
83 - v-model="formData.serviceTypeId"
84 - class="formItem"
85 - filterable
86 - clearable
87 - >
88 - <el-option
89 - v-for="item in findConditionData.cargoServiceType"
90 - :label="item.chineseName"
91 - :value="item.id"
92 - :key="item.id"
93 - >
94 - </el-option>
95 - </el-select>
96 - </el-form-item>
97 - </el-col>
98 - <el-col :span="6">
99 - <el-form-item label="URSA">
100 - <el-input
101 - type="textarea"
102 - v-model="ursa"
103 - class="formItem"
104 - placeholder="S_;P_;E2"
105 - :autosize="true"
106 - ></el-input>
107 - </el-form-item>
108 - </el-col>
109 - <el-col :span="6">
110 - <el-form-item label="站点">
111 - <el-input
112 - type="textarea"
113 - v-model="siteName"
114 - class="formItem"
115 - placeholder="PVG;PEK"
116 - :autosize="true"
117 - ></el-input>
118 - </el-form-item>
119 - </el-col>
120 - <el-col :span="24" v-show="formShow">
121 - <el-row type="flex" style="flexWrap: wrap!important">
122 - <el-col :span="6">
123 - <el-form-item label="ACCS原航班日期">
124 - <el-date-picker
125 - class="formItem"
126 - v-model="flightTime"
127 - type="daterange"
128 - range-separator="至"
129 - start-placeholder="开始日期"
130 - end-placeholder="结束日期"
131 - :value-format="valueFormat"
132 - >
133 - </el-date-picker>
134 - </el-form-item>
135 - </el-col>
136 - <el-col :span="6">
137 - <el-form-item label="ACCS原航班号">
138 - <el-input type="text" v-model="fltNo" class="formItem" placeholder="请输入ACCS航班号"></el-input>
139 - </el-form-item>
140 - </el-col>
141 - <el-col :span="6">
142 - <el-form-item label="取件日期">
143 - <el-date-picker
144 - class="formItem"
145 - v-model="formData.pickUpDate"
146 - type="date"
147 - placeholder="选择日期"
148 - :value-format="valueFormat"
149 - >
150 - </el-date-picker>
151 - </el-form-item>
152 - </el-col>
153 - <el-col :span="6">
154 - <el-form-item label="创建日期">
155 - <el-date-picker
156 - class="formItem"
157 - v-model="createDate"
158 - type="daterange"
159 - range-separator="至"
160 - start-placeholder="开始日期"
161 - end-placeholder="结束日期"
162 - :value-format="valueFormat"
163 - >
164 - </el-date-picker>
165 - </el-form-item>
166 - </el-col>
167 - <el-col :span="6">
168 - <el-form-item label="货物状态">
169 - <el-select
170 - placeholder="不限"
171 - v-model="formData.statusId"
172 - class="formItem"
173 - filterable
174 - clearable
175 - >
176 - <el-option
177 - v-for="item in findConditionData.cargoStatus"
178 - :label="item.chineseName"
179 - :value="item.id"
180 - :key="item.id"
181 - >
182 - </el-option>
183 - </el-select>
184 - </el-form-item>
185 - </el-col>
186 - <el-col :span="6">
187 - <el-form-item label="是否自动">
188 - <el-select
189 - placeholder="不限"
190 - v-model="formData.allocationTypeId"
191 - class="formItem"
192 - clearable
193 - >
194 - <el-option
195 - label="手动"
196 - value="1"
197 - >
198 - </el-option>
199 - <el-option
200 - label="自动"
201 - value="2"
202 - >
203 - </el-option>
204 - </el-select>
205 - </el-form-item>
206 - </el-col>
207 - </el-row>
208 - </el-col>
209 - </el-row>
210 - <div style="paddingLeft: 10px;marginTop:20px">
211 - <el-button
212 - type="primary"
213 - icon="el-icon-search"
214 - size="small"
215 - :loading="tableLoading"
216 - @click="select(0)"
217 - >查询</el-button
218 - >
219 - <el-button :type="downLoadingTip.downloading?'warning':'primary'" size="small" @click="xlse(0)" :disabled="tableData.length==0" :loading="downLoadingTip.downloading"
220 - >{{downLoadingTip.downloading?downLoadingTip.tip:"导出本页查询结果"}}</el-button
221 - >
222 - <el-button :type="downLoadingTip.downloading?'warning':'primary'" size="small" @click="xlse(1)" :disabled="tableData.length==0" :loading="downLoadingTip.downloading"
223 - >{{downLoadingTip.downloading?downLoadingTip.tip:"导出全部查询结果"}}</el-button
224 - >
225 - <span style="marginLeft:20px;color:#ffba00">全部导出上限80000条数据</span>
226 - <el-progress v-if="progress!=0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress" :status="progress == 100?'success':'warning'"></el-progress>
227 - <div class="tips">
228 - <span style="paddingRight: 50px">总重量:{{ allWeight }}</span>
229 - <span>总件数:{{ allQty }}</span>
230 - </div>
231 - <div class="formShow" @click="formShow = !formShow"><i class="el-icon-s-tools"></i>{{formShow?'收起条件':'更多条件'}}</div>
232 - </div>
233 - </el-form>
234 - <Tables
235 - ref="newTables"
236 - :data="tableData"
237 - :headerData="tableHeader"
238 - :totalCount="totalCount"
239 - :loading="tableLoading"
240 - :limitSize="limitSize"
241 - :limitStart="limitStart"
242 - :page="page"
243 - :shiftKey="shiftKey"
244 - height="550"
245 - @tableSelect="tableSelect"
246 - @tableSelectAll="tableSelectAll"
247 - @currentChange="currentChange"
248 - @sortChange="sortChange"
249 - ></Tables>
250 - </div>
251 -</template>
252 -
253 -<script>
254 -import { findConditionData, findCargoData } from "@/api/cargoSelect";
255 -import { downLoadXlsx } from "@/utils/zipdownload";
256 -import { upCase } from "@/utils/FedEx"
257 -
258 -export default {
259 - name:"QueryCargo",
260 - data() {
261 - return {
262 - formData: {
263 - fltDateStart: "",
264 - fltDateEnd: "",
265 - prematchFltDateStart: "",
266 - prematchFltDateEnd: "",
267 - createTimeStart: null,
268 - createTimeEnd: null,
269 - pickUpDate: null,
270 - waybillNo: "",
271 - siteName: "",
272 - fltNo: "",
273 - mawbCode: "",
274 - ursa: "",
275 - typeId: null,
276 - statusId: null,
277 - serviceTypeId: null,
278 - allocationTypeId: null,
279 - kindToAllocFlightId: null,
280 - historyAllocaCargoTypeId: null,
281 - dataSources: "",
282 - customsReceiptStatusId: null,
283 - big: null,
284 - cargoPlaneNo:null,
285 - cargoPlaneStart:null,
286 - cargoPlaneEnd:null,
287 - limitStart: 1,
288 - limitSize:100,
289 - }, //表单数据
290 - tableHeader: [
291 - {
292 - type: "selection",
293 - name: "",
294 - value: "",
295 - width: "50",
296 - align: "center",
297 - sorTable: false,
298 - fixed:true,
299 - },
300 - {
301 - type: "index",
302 - name: "",
303 - value: "",
304 - width: "50",
305 - align: "center",
306 - sorTable: false,
307 - fixed:false,
308 - },
309 - {
310 - type: "",
311 - name: "口岸代码",
312 - value: "portName",
313 - width: "150",
314 - align: "center",
315 - sorTable: true,
316 - fixed:false,
317 - },
318 - {
319 - type: "",
320 - name: "取件日期",
321 - value: "pickUpDate",
322 - width: "150",
323 - align: "center",
324 - sorTable: true,
325 - fixed:false,
326 - },
327 - {
328 - type: "",
329 - name: "取件扫描号",
330 - value: "pickUpScanNo",
331 - width: "150",
332 - align: "center",
333 - sorTable: true,
334 - fixed:false,
335 - },
336 - {
337 - type: "",
338 - name: "站点",
339 - value: "siteName",
340 - width: "150",
341 - align: "center",
342 - sorTable: true,
343 - fixed:false,
344 - },
345 - {
346 - type: "",
347 - name: "运单号",
348 - value: "waybillNo",
349 - width: "150",
350 - align: "center",
351 - sorTable: true,
352 - fixed:false,
353 - },
354 - {
355 - type: "",
356 - name: "总单号",
357 - value: "totalWaybillNo",
358 - width: "150",
359 - align: "center",
360 - sorTable: true,
361 - fixed:false,
362 - },
363 - {
364 - type: "",
365 - name: "服务类型",
366 - value: "serviceTypeName",
367 - width: "150",
368 - align: "center",
369 - sorTable: true,
370 - fixed:false,
371 - },
372 - {
373 - type: "",
374 - name: "服务代码",
375 - value: "serviceCode",
376 - width: "150",
377 - align: "center",
378 - sorTable: false,
379 - fixed:false,
380 - },
381 - {
382 - type: "",
383 - name: "URSA",
384 - value: "ursa",
385 - width: "150",
386 - align: "center",
387 - sorTable: true,
388 - fixed:false,
389 - },
390 - {
391 - type: "",
392 - name: "申报类型",
393 - value: "typeName",
394 - width: "150",
395 - align: "center",
396 - sorTable: true,
397 - fixed:false,
398 - },
399 - {
400 - type: "",
401 - name: "HandlingCode",
402 - value: "handingCode",
403 - width: "150",
404 - align: "center",
405 - sorTable: true,
406 - fixed:false,
407 - },
408 - {
409 - type: "",
410 - name: "subcategory",
411 - value: "subCategory",
412 - width: "150",
413 - align: "center",
414 - sorTable: true,
415 - fixed:false,
416 - },
417 - {
418 - type: "",
419 - name: "件数",
420 - value: "qty",
421 - width: "150",
422 - align: "center",
423 - sorTable: true,
424 - fixed:false,
425 - },
426 - {
427 - type: "",
428 - name: "实际重量",
429 - value: "actualWeight",
430 - width: "150",
431 - align: "center",
432 - sorTable: true,
433 - fixed:false,
434 - },
435 - {
436 - type: "",
437 - name: "收件人国家代码",
438 - value: "consigneeCountry",
439 - width: "150",
440 - align: "center",
441 - sorTable: true,
442 - fixed:false,
443 - },
444 - {
445 - type: "",
446 - name: "品名描述",
447 - value: "nameDescription",
448 - width: "150",
449 - align: "center",
450 - sorTable: false,
451 - fixed:false,
452 - },
453 - {
454 - type: "",
455 - name: "海关回执状态",
456 - value: "customsReceiptStatusName",
457 - width: "150",
458 - align: "center",
459 - sorTable: true,
460 - fixed:false,
461 - },
462 - {
463 - type: "",
464 - name: "预审状态",
465 - value: "preQualificationStatus",
466 - width: "150",
467 - align: "center",
468 - sorTable: true,
469 - fixed:false,
470 - },
471 - {
472 - type: "",
473 - name: "航班预审意见",
474 - value: "caPretrialOpinion",
475 - width: "150",
476 - align: "center",
477 - sorTable: false,
478 - fixed:false,
479 - },
480 - {
481 - type: "",
482 - name: "货物状态",
483 - value: "statusName",
484 - width: "150",
485 - align: "center",
486 - sorTable: true,
487 - fixed:false,
488 - },
489 - {
490 - type: "",
491 - name: "终配航班号",
492 - value: "finalFlightNo",
493 - width: "150",
494 - align: "center",
495 - sorTable: true,
496 - fixed:false,
497 - },
498 - {
499 - type: "",
500 - name: "终配航班日期",
501 - value: "finalFlightTime",
502 - width: "150",
503 - align: "center",
504 - sorTable: true,
505 - fixed:false,
506 - },
507 - {
508 - type: "",
509 - name: "二配航班号",
510 - value: "twoMatchFlightNo",
511 - width: "150",
512 - align: "center",
513 - sorTable: true,
514 - fixed:false,
515 - },
516 - {
517 - type: "",
518 - name: "二配航班日期",
519 - value: "twoMatchFlightTime",
520 - width: "150",
521 - align: "center",
522 - sorTable: true,
523 - fixed:false,
524 - },
525 - {
526 - type: "",
527 - name: "预配航班号",
528 - value: "preplanFlightNo",
529 - width: "150",
530 - align: "center",
531 - sorTable: true,
532 - fixed:false,
533 - },
534 - {
535 - type: "",
536 - name: "预配航班日期",
537 - value: "preplanFlightTime",
538 - width: "150",
539 - align: "center",
540 - sorTable: true,
541 - fixed:false,
542 - },
543 - {
544 - type: "",
545 - name: "ACCS原航班号",
546 - value: "fltNoAccs",
547 - width: "150",
548 - align: "center",
549 - sorTable: true,
550 - fixed:false,
551 - },
552 - {
553 - type: "",
554 - name: "ACCS原航班日期",
555 - value: "fltDateAccs",
556 - width: "150",
557 - align: "center",
558 - sorTable: true,
559 - fixed:false,
560 - },
561 - {
562 - type: "",
563 - name: "ACCS原航线",
564 - value: "accsFlightRoute",
565 - width: "150",
566 - align: "center",
567 - sorTable: true,
568 - fixed:false,
569 - },
570 - {
571 - type: "",
572 - name: "是否RDE手工录入",
573 - value: "manualRde",
574 - width: "170",
575 - align: "center",
576 - sorTable: true,
577 - fixed:false,
578 - },
579 - {
580 - type: "",
581 - name: "是否自动",
582 - value: "cargoRulesStatus",
583 - width: "150",
584 - align: "center",
585 - sorTable: true,
586 - fixed:false,
587 - },
588 - {
589 - type: "",
590 - name: "发件人账号",
591 - value: "shipperAccount",
592 - width: "150",
593 - align: "center",
594 - sorTable: false,
595 - fixed:false,
596 - },
597 - {
598 - type: "",
599 - name: "发件公司中文名称",
600 - value: "shipperCompany",
601 - width: "150",
602 - align: "center",
603 - sorTable: false,
604 - fixed:false,
605 - },
606 - {
607 - type: "",
608 - name: "始发地城市名称",
609 - value: "originCity",
610 - width: "150",
611 - align: "center",
612 - sorTable: false,
613 - fixed:false,
614 - },
615 - {
616 - type: "",
617 - name: "收件地",
618 - value: "destinationSiteName",
619 - width: "150",
620 - align: "center",
621 - sorTable: false,
622 - fixed:false,
623 - },
624 - {
625 - type: "",
626 - name: "尺寸",
627 - value: "sizeStr",
628 - width: "150",
629 - align: "center",
630 - sorTable: true,
631 - fixed:false,
632 - },
633 - {
634 - type: "",
635 - name: "大货预审意见(是否可以配置航班)",
636 - value: "bigPretrialOpinion",
637 - width: "300",
638 - align: "center",
639 - sorTable: false,
640 - fixed:false,
641 - },
642 - {
643 - type: "",
644 - name: "大货预审时间",
645 - value: "bigPretrialTime",
646 - width: "150",
647 - align: "center",
648 - sorTable: false,
649 - fixed:false,
650 - },
651 - {
652 - type: "",
653 - name: "海关回执时间",
654 - value: "customsReceiptTime",
655 - width: "150",
656 - align: "center",
657 - sorTable: true,
658 - fixed:false,
659 - },
660 - {
661 - type: "",
662 - name: "航班预审时间",
663 - value: "caPretrialTime",
664 - width: "150",
665 - align: "center",
666 - sorTable: true,
667 - fixed:false,
668 - },
669 - {
670 - type: "",
671 - name: "创建人",
672 - value: "createUserName",
673 - width: "150",
674 - align: "center",
675 - sorTable: true,
676 - fixed:false,
677 - },
678 - {
679 - type: "",
680 - name: "创建时间",
681 - value: "createTime",
682 - width: "150",
683 - align: "center",
684 - sorTable: true,
685 - fixed:false,
686 - },
687 - ], //表头数据
688 - findConditionData: {}, //货物查询条件
689 - tableData: [], //表格数据
690 - allWeight: 0,
691 - allQty: 0,
692 - shiftKey: false,
693 - valueFormat: "yyyy-MM-dd",
694 - tableLoading: false,
695 - downLoadingTip:{
696 - tip:"",
697 - downloading:false,
698 - },
699 - totalCount: 0,
700 - selectTable: [],
701 - flightTime: [],
702 - prepalyFlightTime: [],
703 - cargoPlaneTime:[],
704 - createDate: [],
705 - limitStart: 1,
706 - limitSize: 100, //无限制-1
707 - page:1,
708 - progress:0,
709 - formShow:false,
710 - };
711 - },
712 - created() {
713 - // 查询条件
714 - findConditionData().then((res) => {
715 - if (res.code == 200) {
716 - this.findConditionData = res.data;
717 - } else {
718 - this.$message({
719 - message: "查询条件不存在",
720 - type: "warning",
721 - });
722 - }
723 - });
724 - },
725 -
726 - mounted() {
727 - window.addEventListener("keydown", (code) => {
728 - if (code.keyCode === 16 && code.shiftKey) {
729 - this.shiftKey = true;
730 - }
731 - });
732 - window.addEventListener("keyup", (code) => {
733 - if (code.keyCode === 16) {
734 - this.shiftKey = false;
735 - }
736 - });
737 - },
738 -
739 - methods: {
740 - clear() {
741 - this.$refs.cargoForm.resetFields();
742 - },
743 - //查询
744 - select(val) {
745 - this.tableData = [];
746 - this.allWeight = 0;
747 - this.allQty = 0;
748 - this.tableLoading = true;
749 - this.dataInfo();
750 - if(val === 0){
751 - this.formData.limitStart = 1;
752 - this.limitStart = 1;
753 - this.page = 1;
754 - }
755 - findCargoData(this.formData).then((res) => {
756 - if (res.code == 200) {
757 - this.tableData = res.data.list;
758 - this.totalCount = res.data.totalCount;
759 - if (res.data.list.length > 0) {
760 - for (let i = 0; i < this.tableData.length; i++) {
761 - this.tableData[i].index = i;
762 - }
763 - } else {
764 - this.$message({
765 - message: "未查询到数据",
766 - type: "warning",
767 - });
768 - }
769 - } else {
770 - this.$message({
771 - message: res.msg,
772 - type: "warning",
773 - });
774 - }
775 - this.tableLoading = false;
776 - }).catch(()=>{
777 - this.tableLoading = false;
778 - });
779 - this.$refs.newTables.clearTable();
780 - this.cargoTotal();
781 - },
782 - //数据初始化
783 - dataInfo(){
784 - if(this.formData.customsReceiptStatusId != null && this.formData.customsReceiptStatusId.length < 1){
785 - this.formData.customsReceiptStatusId = null;
786 - }
787 - if (this.createDate != null && this.createDate.length > 0) {
788 - this.formData.createTimeStart = this.createDate[0];
789 - this.formData.createTimeEnd = this.createDate[1];
790 - }else{
791 - this.formData.createTimeStart = null;
792 - this.formData.createTimeEnd = null;
793 - }
794 - if (this.prepalyFlightTime != null && this.prepalyFlightTime.length > 0) {
795 - this.formData.prematchFltDateStart = this.prepalyFlightTime[0];
796 - this.formData.prematchFltDateEnd = this.prepalyFlightTime[1];
797 - }else{
798 - this.formData.prematchFltDateStart ="";
799 - this.formData.prematchFltDateEnd = "";
800 - }
801 - if (this.flightTime != null && this.flightTime.length > 0) {
802 - this.formData.fltDateStart = this.flightTime[0];
803 - this.formData.fltDateEnd = this.flightTime[1];
804 - }else{
805 - this.formData.fltDateStart = "";
806 - this.formData.fltDateEnd = "";
807 - }
808 - if(this.cargoPlaneTime != null && this.cargoPlaneTime.length > 0){
809 - this.formData.cargoPlaneStart = this.cargoPlaneTime[0];
810 - this.formData.cargoPlaneEnd = this.cargoPlaneTime[1];
811 - }else{
812 - this.formData.cargoPlaneStart = null;
813 - this.formData.cargoPlaneEnd = null;
814 - }
815 - if(this.formData.waybillNo){
816 - this.formData.waybillNo = this.formData.waybillNo.trim();
817 - }
818 - this.formData.limitStart = this.limitStart;
819 - this.formData.limitSize = 100;
820 - },
821 - //总和
822 - cargoTotal(){
823 - this.allWeight = 0;
824 - this.allQty = 0;
825 - if(this.selectTable.length > 0){
826 - this.selectTable.forEach(item=>{
827 - this.allWeight = this.allWeight + item.actualWeight;
828 - this.allQty = this.allQty + item.qty;
829 - })
830 - this.allWeight = this.allWeight.toFixed(2);
831 - this.allQty = this.allQty.toFixed();
832 - }
833 - },
834 - //表格多选
835 - tableSelect(val){
836 - this.selectTable = val.selection;
837 - this.cargoTotal();
838 - },
839 - //表格全选
840 - tableSelectAll(val){
841 - this.selectTable = val;
842 - this.cargoTotal();
843 - },
844 - //分页
845 - currentChange(val){
846 - this.formData.limitStart = val.start;
847 - this.limitStart = val.start;
848 - this.page = val.page;
849 - this.select()
850 - },
851 - //排序
852 - sortChange(val){
853 - let data = []
854 - let nullData = []
855 - this.tableData.forEach(item=>{
856 - if(item[val.prop]){
857 - data.push(item)
858 - }else{
859 - nullData.push(item)
860 - }
861 - })
862 - data = data.sort(this.$refs.newTables.compare(val.prop,val.order))
863 - if(val.order != "ascending"){
864 - this.tableData = nullData.concat(data)
865 - }else{
866 - this.tableData = data.concat(nullData)
867 - }
868 - this.tableData.forEach((item, index = 0) => {
869 - item.index = index;
870 - });
871 - },
872 - // 导出表格
873 - xlse(page) {
874 - this.progress = 1;
875 - this.downLoadingTip.downloading = true;
876 - let cargoXlse = {title:"货物导出表",cargoConditionDto:{}};
877 - this.dataInfo();
878 - cargoXlse.cargoConditionDto = this.formData;
879 - cargoXlse.cargoConditionDto.limitSize = this.limitSize;
880 -
881 - if (page == 0) {
882 - this.downLoadingTip.tip = "正在导出本页结果集"
883 - cargoXlse.cargoConditionDto.limitStart = this.limitStart;
884 - downLoadXlsx("/cargo/excel",cargoXlse,"货物表").then(()=>{
885 - this.downLoadingTip.downloading = false;
886 - this.downLoadingTip.tip = ""
887 - this.progress = 100;
888 - }).catch(()=>{
889 - this.downLoadingTip.downloading = false;
890 - this.downLoadingTip.tip = "";
891 - })
892 - } else {
893 - if(this.totalCount < 80000){
894 - this.downLoadingTip.tip = "正在导出全部结果集请耐心等待"
895 - cargoXlse.cargoConditionDto.limitStart = 0;
896 - cargoXlse.cargoConditionDto.limitSize = -1;
897 - downLoadXlsx("/cargo/excel",cargoXlse,"货物表").then(()=>{
898 - this.downLoadingTip.downloading = false;
899 - this.downLoadingTip.tip = ""
900 - this.progress = 100;
901 - }).catch(()=>{
902 - this.downLoadingTip.downloading = false;
903 - this.downLoadingTip.tip = ""
904 - })
905 - }else{
906 - this.downLoadingTip.downloading = false;
907 - this.$message({
908 - message: "导出数据量过大,请不要超过8万条",
909 - type: "warning",
910 - });
911 - }
912 - }
913 - },
914 - },
915 - computed: {
916 - fltNo: {
917 - get: function () {
918 - return this.formData.fltNo;
919 - },
920 - set: function (val) {
921 - this.formData.fltNo = upCase(val);
922 - },
923 - },
924 - siteName: {
925 - get: function () {
926 - return this.formData.siteName;
927 - },
928 - set: function (val) {
929 - this.formData.siteName = upCase(val);
930 - },
931 - },
932 - ursa: {
933 - get: function () {
934 - return this.formData.ursa;
935 - },
936 - set: function (val) {
937 - this.formData.ursa = upCase(val);
938 - },
939 - },
940 - cargoPlaneNo:{
941 - get: function () {
942 - return this.formData.cargoPlaneNo;
943 - },
944 - set: function (val) {
945 - this.formData.cargoPlaneNo = upCase(val);
946 - },
947 - }
948 - },
949 -};
950 -</script>
951 -
952 -<style scoped>
953 -.tips {
954 - display: inline-block;
955 - color: #606266;
956 - font-size: 14px;
957 - margin-top: 10px;
958 - margin-left: 50px;
959 -}
960 -.progress{
961 - width:200px;
962 - display: inline-block;
963 - margin:0 0 0 20px;
964 -}
965 -.formShow{
966 - width: max-content;
967 - height:48px;
968 - line-height: 48px;
969 - font-weight: 900;
970 - color: rgb(64, 158, 255);
971 - font-size: 14px;
972 - float: right;
973 - margin-right:20px;
974 -}
975 -</style>
...\ No newline at end of file ...\ No newline at end of file