jinhui.wang

ver:2.0,PRE-MDE配舱页面增加,黑名单页面增加,bug修复,样式修正

Showing 39 changed files with 2184 additions and 250 deletions
...@@ -86,3 +86,15 @@ export function updateWhiteListSwitchBatch(data) { ...@@ -86,3 +86,15 @@ export function updateWhiteListSwitchBatch(data) {
86 }) 86 })
87 } 87 }
88 88
89 +//黑名单自动配舱开关
90 +/**
91 + * @param updateIds idList *
92 + * @param status 状态 * 1开 0关
93 + */
94 +export function updateBlackListSwitchBatch(data) {
95 + return request({
96 + url: '/FlightPreserveController/updateBlackListSwitchBatch',
97 + method: 'post',
98 + data: data
99 + })
100 +}
......
...@@ -41,6 +41,7 @@ export function batchDeleteGoods(data) { ...@@ -41,6 +41,7 @@ export function batchDeleteGoods(data) {
41 /** 41 /**
42 * @param page * 页数 42 * @param page * 页数
43 * @param size * 页长 43 * @param size * 页长
44 + * @param goodsType 查询状态 1白名单 2黑名单 默认查询白名单
44 * @param goodsStation 货站名 45 * @param goodsStation 货站名
45 */ 46 */
46 export function searchGoods(data) { 47 export function searchGoods(data) {
...@@ -54,14 +55,15 @@ export function searchGoods(data) { ...@@ -54,14 +55,15 @@ export function searchGoods(data) {
54 //查询货站 55 //查询货站
55 /** 56 /**
56 */ 57 */
57 -export function findStationName() { 58 +export function findStationName(data) {
58 return request({ 59 return request({
59 url: '/goods/findStationName', 60 url: '/goods/findStationName',
60 method: 'post', 61 method: 'post',
62 + data: data
61 }) 63 })
62 } 64 }
63 65
64 -//批量导入 66 +//白名单批量导入
65 export function uploadGoodsExcel(file, goodsStation) { 67 export function uploadGoodsExcel(file, goodsStation) {
66 let formData = new FormData(); 68 let formData = new FormData();
67 formData.append("file", file); 69 formData.append("file", file);
...@@ -84,4 +86,29 @@ export function userImportLog(data) { ...@@ -84,4 +86,29 @@ export function userImportLog(data) {
84 method: 'post', 86 method: 'post',
85 data: data 87 data: data
86 }) 88 })
89 +}
90 +
91 +//黑名单上传excel
92 +export function uploadGoodsBlackExce(file, goodsStation) {
93 + let formData = new FormData();
94 + formData.append("file", file);
95 + formData.append("goodsStation", goodsStation);
96 + return request({
97 + url: '/goods/uploadGoodsBlackExcel',
98 + method: 'post',
99 + data: formData
100 + })
101 +}
102 +
103 +//批量添加黑名单
104 +/**
105 + * @param goodsStation * 货站名
106 + * @param goodsList * 货品名list
107 + */
108 +export function batchAddBlackGoods(data) {
109 + return request({
110 + url: '/goods/batchAddBlackGoods',
111 + method: 'post',
112 + data: data
113 + })
87 } 114 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -80,4 +80,16 @@ export function findArchiveCargoLog(data) { ...@@ -80,4 +80,16 @@ export function findArchiveCargoLog(data) {
80 method: 'post', 80 method: 'post',
81 data: data 81 data: data
82 }) 82 })
83 +}
84 +
85 +//查询归档文件是否可下载
86 +/**
87 + * @param object 查询结果集行数据
88 + */
89 +export function isExistZip(data) {
90 + return request({
91 + url: '/archiveCargoLog/isExistZip',
92 + method: 'post',
93 + data: data
94 + })
83 } 95 }
...\ No newline at end of file ...\ No newline at end of file
......
This diff could not be displayed because it is too large.
...@@ -67,6 +67,11 @@ let ductLabels = { ...@@ -67,6 +67,11 @@ let ductLabels = {
67 "1": "开启", 67 "1": "开启",
68 "0": "关闭", 68 "0": "关闭",
69 null: '关闭' 69 null: '关闭'
70 + },
71 + "blackListSwitch": {
72 + "1": "开启",
73 + "0": "关闭",
74 + null: '开启'
70 } 75 }
71 }, 76 },
72 "flightRand": {//航班顺位设置 77 "flightRand": {//航班顺位设置
......
...@@ -427,7 +427,7 @@ let tableHeaders = { ...@@ -427,7 +427,7 @@ let tableHeaders = {
427 status: 1 427 status: 1
428 }, 428 },
429 { 429 {
430 - columnChineseName: "航线", 430 + columnChineseName: "当前配载航线",
431 columnName: "flightRoute", 431 columnName: "flightRoute",
432 columnWidth: "140", 432 columnWidth: "140",
433 status: 1 433 status: 1
...@@ -527,6 +527,12 @@ let tableHeaders = { ...@@ -527,6 +527,12 @@ let tableHeaders = {
527 status: 1 527 status: 1
528 }, 528 },
529 { 529 {
530 + columnChineseName: "黑名单是否自动配舱",
531 + columnName: "blackListSwitch",
532 + columnWidth: "160",
533 + status: 1
534 + },
535 + {
530 columnChineseName: "总重量", 536 columnChineseName: "总重量",
531 columnName: "totalWeight", 537 columnName: "totalWeight",
532 columnWidth: "90", 538 columnWidth: "90",
...@@ -2106,6 +2112,13 @@ let tableHeaders = { ...@@ -2106,6 +2112,13 @@ let tableHeaders = {
2106 status: 1 2112 status: 1
2107 }, 2113 },
2108 { 2114 {
2115 + columnChineseName: "导入来源",
2116 + columnName: "module",
2117 + columnWidth: "",
2118 + ext1: "",
2119 + status: 1
2120 + },
2121 + {
2109 columnChineseName: "货站名称", 2122 columnChineseName: "货站名称",
2110 columnName: "ext", 2123 columnName: "ext",
2111 columnWidth: "", 2124 columnWidth: "",
...@@ -2196,7 +2209,7 @@ let tableHeaders = { ...@@ -2196,7 +2209,7 @@ let tableHeaders = {
2196 { 2209 {
2197 columnChineseName: "备注", 2210 columnChineseName: "备注",
2198 columnName: "remark", 2211 columnName: "remark",
2199 - columnWidth: "100", 2212 + columnWidth: "500",
2200 ext1: "slot", 2213 ext1: "slot",
2201 status: 1 2214 status: 1
2202 }, 2215 },
......
...@@ -292,4 +292,19 @@ body { ...@@ -292,4 +292,19 @@ body {
292 292
293 .el-select-dropdown { 293 .el-select-dropdown {
294 max-width: 300px; 294 max-width: 300px;
295 +}
296 +
297 +.backgroundCollapse {
298 + .el-collapse-item__header {
299 + background-color: #d9ecff !important;
300 + border-bottom: 1px solid #ccc;
301 + }
302 +}
303 +
304 +.numberInput {
305 + width: 100% !important;
306 +}
307 +
308 +.el-select-dropdown__wrap {
309 + max-height: 350px !important;
295 } 310 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -81,8 +81,7 @@ export default { ...@@ -81,8 +81,7 @@ export default {
81 <style lang="scss" scoped> 81 <style lang="scss" scoped>
82 .container { 82 .container {
83 max-width: 350px; 83 max-width: 350px;
84 - min-height: 32px; 84 + height: 150px;
85 - max-height: 150px;
86 overflow-y: scroll; 85 overflow-y: scroll;
87 padding: 0; 86 padding: 0;
88 border: 1px solid #ccc; 87 border: 1px solid #ccc;
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-button v-if="buttonShow" class="mt5" size="mini" icon="el-icon-edit-outline" circle @click="visibleOpen"> 3 + <el-button v-if="buttonShow" class="mt5" size="mini" style="color:#1890ff" icon="el-icon-edit-outline" circle
4 + @click="visibleOpen">
4 </el-button> 5 </el-button>
5 <el-dialog title="表格显示设置" :visible.sync="open" width="40%" :close-on-click-modal="false" :show-close="false" 6 <el-dialog title="表格显示设置" :visible.sync="open" width="40%" :close-on-click-modal="false" :show-close="false"
6 append-to-body center> 7 append-to-body center>
......
1 +<template>
2 + <div style="padding:10px;" v-loading="loading">
3 + <canvas :class="className" :style="{
4 + height: height, width: width
5 + }"></canvas>
6 + </div>
7 +</template>
8 +
9 +<script>
10 +import Chart from '../../assets/languages/chart.js'
11 +
12 +export default {
13 + name: '',
14 + props: {
15 + className: {
16 + type: String,
17 + default: 'chart'
18 + },
19 + width: {
20 + type: String,
21 + default: '100%'
22 + },
23 + height: {
24 + type: String,
25 + default: "350px"
26 + },
27 + chartData: {
28 + type: Object,
29 + required: true
30 + },
31 + loading: {
32 + type: Boolean,
33 + default: false
34 + }
35 + },
36 + data() {
37 + return {
38 + chart: null,
39 + padding: "10px"
40 + }
41 + },
42 + mounted() {
43 + this.$nextTick(() => {
44 + this.initChart()
45 + })
46 + },
47 + watch: {
48 + chartData: {
49 + deep: true,
50 + handler(val) {
51 + this.chartUpdata()
52 + }
53 + }
54 + },
55 + methods: {
56 + initChart() {
57 + let ctx = document.getElementsByClassName(this.className)
58 + this.chart = new Chart(ctx, this.setOptions(this.chartData))
59 + },
60 + setOptions({ names, data1, data2, data3 }) {
61 + // let setOption = ({
62 + // tooltip: {
63 + // trigger: 'axis',
64 + // axisPointer: { // 坐标轴指示器,坐标轴触发有效
65 + // type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
66 + // }
67 + // },
68 + // legend: {
69 + // show: true
70 + // },
71 + // dataZoom: [
72 + // {
73 + // type: 'inside',
74 + // xAxisIndex: [0],
75 + // },
76 + // {
77 + // type: 'slider',
78 + // show: true,
79 + // start: 0,
80 + // end: 85,
81 + // handleSize: 8
82 + // },
83 + // ],
84 + // grid: {
85 + // top: '15%',
86 + // left: '2%',
87 + // right: '2%',
88 + // containLabel: true
89 + // },
90 + // xAxis: [{
91 + // type: 'category',
92 + // data: names,
93 + // axisTick: {
94 + // alignWithLabel: true
95 + // }
96 + // }],
97 + // yAxis: [{
98 + // type: 'value',
99 + // axisTick: {
100 + // show: false
101 + // }
102 + // }],
103 + // series: [{
104 + // name: '件数',
105 + // type: 'bar',
106 + // data: data1,
107 + // barWidth: '10%',
108 + // barGap: '0%',
109 + // label: {
110 + // show: true,
111 + // position: 'top',
112 + // fontSize: 14
113 + // },
114 + // animationDuration: 1000
115 + // },
116 + // {
117 + // name: '票数',
118 + // type: 'bar',
119 + // data: data2,
120 + // barWidth: '10%',
121 + // barGap: '0%',
122 + // label: {
123 + // show: true,
124 + // position: 'top',
125 + // fontSize: 14
126 + // },
127 + // animationDuration: 1000
128 + // },
129 + // {
130 + // name: '重量',
131 + // type: 'bar',
132 + // data: data3,
133 + // barWidth: '10%',
134 + // barGap: '0%',
135 + // label: {
136 + // show: true,
137 + // position: 'top',
138 + // fontSize: 14
139 + // },
140 + // animationDuration: 1000
141 + // }]
142 + // })
143 + let setOption = {
144 + type: 'bar',
145 + data: {
146 + labels: names,
147 + datasets: [{
148 + label: '件数',
149 + data: data1,
150 + backgroundColor: 'rgba(255, 99, 132, 1)',
151 + stack: 'group1'
152 + },
153 + {
154 + label: '票数',
155 + data: data2,
156 + backgroundColor: 'rgba(153, 102, 255, 1)',
157 + stack: 'group2'
158 + },
159 + {
160 + label: '重量',
161 + data: data3,
162 + backgroundColor: 'rgba(255, 205, 86, 1)',
163 + stack: 'group3'
164 + }]
165 + },
166 + options: {
167 + events: [''],
168 + hover: {
169 + intersect: false,
170 + animationDuration: 0
171 + },
172 + animation: {
173 + duration: 500,
174 + onComplete: (val) => {
175 + let ctx = val.chart.ctx
176 + ctx.textAlign = 'center';
177 + ctx.textBaseline = 'bottom';
178 + ctx.font = '14px \"Helvetica Neue\", Helvetica, Arial, sans-serif'
179 + val.chart.data.datasets.forEach((dataset, i) => {
180 + if (val.chart.isDatasetVisible(i)) {
181 + var meta = val.chart.getDatasetMeta(i);
182 + meta.data.forEach(function (bar, index) {
183 + var data = dataset.data[index];
184 + ctx.fillText(data, bar.x, bar.y - 5);
185 + });
186 + }
187 + });
188 + }
189 + },
190 + legend: {
191 + display: true
192 + },
193 + tooltips: {
194 + enabled: false,
195 + },
196 + scales: {
197 + yAxes: [{
198 + ticks: {
199 + beginAtZero: true
200 + }
201 + }]
202 + }
203 + }
204 + }
205 + return setOption
206 + },
207 + chartUpdata() {
208 + this.chart.data = {
209 + labels: this.chartData.names,
210 + datasets: [{
211 + label: '件数',
212 + data: this.chartData.data1,
213 + backgroundColor: 'rgba(255, 99, 132, 1)',
214 + stack: 'group1'
215 + },
216 + {
217 + label: '票数',
218 + data: this.chartData.data2,
219 + backgroundColor: 'rgba(153, 102, 255, 1)',
220 + stack: 'group2'
221 + },
222 + {
223 + label: '重量',
224 + data: this.chartData.data3,
225 + backgroundColor: 'rgba(255, 205, 86, 1)',
226 + stack: 'group3'
227 + }]
228 + }
229 + this.chart.update()
230 + }
231 + },
232 + beforeDestroy() {
233 + if (!this.chart) {
234 + return
235 + }
236 + this.chart.destroy()
237 + this.chart = null
238 + }
239 +}
240 +</script>
241 +
242 +<style>
243 +
244 +</style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -3,44 +3,43 @@ ...@@ -3,44 +3,43 @@
3 * Copyright (c) 2019 FedEx 3 * Copyright (c) 2019 FedEx
4 */ 4 */
5 5
6 - import store from '@/store' 6 +import store from '@/store'
7 7
8 - export default { 8 +export default {
9 - inserted(el, binding, vnode) { 9 + inserted(el, binding, vnode) {
10 - const { value } = binding 10 + const { value } = binding
11 - const all_permission = "*:*:*"; 11 + const all_permission = "*:*:*";
12 - const permissions = store.getters && store.getters.permissions 12 + const permissions = store.getters && store.getters.permissions
13 - 13 +
14 - if (value && value instanceof Array && value.length > 0) { 14 + if (value && value instanceof Array && value.length > 0) {
15 - const permissionFlag = value 15 + const permissionFlag = value
16 - 16 +
17 - const hasPermissions = permissions.some(permission => { 17 + const hasPermissions = permissions.some(permission => {
18 - return all_permission === permission || permissionFlag.includes(permission) 18 + return all_permission === permission || permissionFlag.includes(permission)
19 - }) 19 + })
20 - 20 +
21 - if (!hasPermissions) { 21 + if (!hasPermissions) {
22 - el.parentNode && el.parentNode.removeChild(el) 22 + el.parentNode && el.parentNode.removeChild(el)
23 - }
24 - } else {
25 - throw new Error(`请设置操作权限标签值`)
26 } 23 }
27 - }, 24 + } else {
28 - 25 + throw new Error(`请设置操作权限标签值`)
29 - //路由权限处理
30 - routerPer(router){
31 - const permissions = store.getters && store.getters.permissions
32 - let newRouter = [];
33 - router.forEach(item => {
34 - permissions.forEach(per=>{
35 - if(item.meta.permissions == per){
36 - newRouter.push(item)
37 - }
38 - })
39 - if(item.children && item.children.length){
40 - item.children = this.routerPer(item.children)
41 - }
42 - });
43 - return newRouter
44 } 26 }
27 + },
28 +
29 + //路由权限处理
30 + routerPer(router){
31 + const permissions = store.getters && store.getters.permissions
32 + let newRouter = [];
33 + router.forEach(item => {
34 + permissions.forEach(per=>{
35 + if(item.meta.permissions == per){
36 + newRouter.push(item)
37 + }
38 + })
39 + if(item.children && item.children.length){
40 + item.children = this.routerPer(item.children)
41 + }
42 + });
43 + return newRouter
45 } 44 }
46 -
...\ No newline at end of file ...\ No newline at end of file
45 +}
......
1 <template> 1 <template>
2 - <div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }"> 2 + <div class="sidebar-logo-container" :class="{ 'collapse': collapse }"
3 + :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }">
3 <transition name="sidebarLogoFade"> 4 <transition name="sidebarLogoFade">
4 <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> 5 <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
5 <img v-if="logo" :src="logo" class="sidebar-logo"> 6 <img v-if="logo" :src="logo" class="sidebar-logo">
6 - <h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1> 7 + <h1 v-else class="sidebar-title"
8 + :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title
9 + }} </h1>
7 </router-link> 10 </router-link>
8 <router-link v-else key="expand" class="sidebar-logo-link" to="/"> 11 <router-link v-else key="expand" class="sidebar-logo-link" to="/">
9 <img v-if="logo" :src="logo" class="sidebar-logo"> 12 <img v-if="logo" :src="logo" class="sidebar-logo">
10 - <h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1> 13 + <h1 class="sidebar-title"
14 + :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title
15 + }} </h1>
11 </router-link> 16 </router-link>
12 </transition> 17 </transition>
13 </div> 18 </div>
...@@ -16,6 +21,8 @@ ...@@ -16,6 +21,8 @@
16 <script> 21 <script>
17 import logoImg from '@/assets/logo/logo.png' 22 import logoImg from '@/assets/logo/logo.png'
18 import variables from '@/assets/styles/variables.scss' 23 import variables from '@/assets/styles/variables.scss'
24 +import { createDecipheriv } from 'crypto';
25 +import { mapState } from 'vuex'
19 26
20 export default { 27 export default {
21 name: 'SidebarLogo', 28 name: 'SidebarLogo',
...@@ -26,19 +33,29 @@ export default { ...@@ -26,19 +33,29 @@ export default {
26 } 33 }
27 }, 34 },
28 computed: { 35 computed: {
36 + ...mapState({
37 + sidebar: state => state.app.sidebar,
38 + }),
29 variables() { 39 variables() {
30 return variables; 40 return variables;
31 }, 41 },
32 - sideTheme() { 42 + sideTheme() {
33 return this.$store.state.settings.sideTheme 43 return this.$store.state.settings.sideTheme
34 } 44 }
35 }, 45 },
36 data() { 46 data() {
37 return { 47 return {
38 title: 'IMAC管理系统', 48 title: 'IMAC管理系统',
39 - logo: logoImg 49 + logo: logoImg,
50 + logoClassName: 'sidebar-logo'
40 } 51 }
41 - } 52 + },
53 + created() {
54 + this.logoClassName = localStorage.getItem('logoName')
55 + },
56 + updated() {
57 + this.logoClassName = localStorage.getItem('logoName')
58 + },
42 } 59 }
43 </script> 60 </script>
44 61
...@@ -66,7 +83,7 @@ export default { ...@@ -66,7 +83,7 @@ export default {
66 width: 100%; 83 width: 100%;
67 84
68 & .sidebar-logo { 85 & .sidebar-logo {
69 - //width: 32px; 86 + width: auto;
70 height: 32px; 87 height: 32px;
71 vertical-align: middle; 88 vertical-align: middle;
72 margin-right: 12px; 89 margin-right: 12px;
...@@ -82,6 +99,13 @@ export default { ...@@ -82,6 +99,13 @@ export default {
82 font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; 99 font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
83 vertical-align: middle; 100 vertical-align: middle;
84 } 101 }
102 +
103 + & .sidebar-logo-mini {
104 + width: auto;
105 + height: 24px;
106 + vertical-align: middle;
107 + margin-right: 12px;
108 + }
85 } 109 }
86 110
87 &.collapse { 111 &.collapse {
......
1 <template> 1 <template>
2 - <div 2 + <div :class="{ 'has-logo': showLogo }" :style="{
3 - :class="{ 'has-logo': showLogo }" 3 + backgroundColor:
4 - :style="{ 4 + settings.sideTheme === 'theme-dark'
5 - backgroundColor: 5 + ? variables.menuBg
6 - settings.sideTheme === 'theme-dark' 6 + : variables.menuLightBg,
7 - ? variables.menuBg 7 + }">
8 - : variables.menuLightBg,
9 - }"
10 - >
11 <logo v-if="showLogo" :collapse="isCollapse" /> 8 <logo v-if="showLogo" :collapse="isCollapse" />
12 <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> 9 <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
13 - <el-menu 10 + <el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="
14 - :default-active="activeMenu"
15 - :collapse="isCollapse"
16 - :background-color="
17 settings.sideTheme === 'theme-dark' 11 settings.sideTheme === 'theme-dark'
18 ? variables.menuBg 12 ? variables.menuBg
19 : variables.menuLightBg 13 : variables.menuLightBg
20 - " 14 + " :text-color="
21 - :text-color=" 15 + settings.sideTheme === 'theme-dark'
22 - settings.sideTheme === 'theme-dark' 16 + ? variables.menuText
23 - ? variables.menuText 17 + : 'rgba(0,0,0,.65)'
24 - : 'rgba(0,0,0,.65)' 18 +" :unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical">
25 - " 19 + <sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route"
26 - :unique-opened="true" 20 + :base-path="route.path" />
27 - :active-text-color="settings.theme" 21 + </el-menu>
28 - :collapse-transition="false" 22 + <div class="version">{{ version }}</div>
29 - mode="vertical"
30 - >
31 - <sidebar-item
32 - v-for="(route, index) in sidebarRouters"
33 - :key="route.path + index"
34 - :item="route"
35 - :base-path="route.path"
36 - />
37 - </el-menu>
38 - <div class="version">{{ version }}</div>
39 </el-scrollbar> 23 </el-scrollbar>
40 </div> 24 </div>
41 </template> 25 </template>
......
1 <template> 1 <template>
2 - <div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}"> 2 + <div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
3 - <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/> 3 + <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
4 - <sidebar class="sidebar-container" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> 4 + <sidebar class="sidebar-container"
5 - <div :class="{hasTagsView:needTagsView}" class="main-container"> 5 + :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
6 - <div :class="{'fixed-header':fixedHeader}"> 6 + <div :class="{ hasTagsView: needTagsView }" class="main-container">
7 + <div :class="{ 'fixed-header': fixedHeader }">
7 <navbar /> 8 <navbar />
8 <tags-view v-if="needTagsView" /> 9 <tags-view v-if="needTagsView" />
9 </div> 10 </div>
10 <app-main /> 11 <app-main />
11 - <right-panel v-if="showSettings"> 12 + <right-panel v-if="false">
12 <settings /> 13 <settings />
13 </right-panel> 14 </right-panel>
14 </div> 15 </div>
...@@ -64,45 +65,45 @@ export default { ...@@ -64,45 +65,45 @@ export default {
64 </script> 65 </script>
65 66
66 <style lang="scss" scoped> 67 <style lang="scss" scoped>
67 - @import "~@/assets/styles/mixin.scss"; 68 +@import "~@/assets/styles/mixin.scss";
68 - @import "~@/assets/styles/variables.scss"; 69 +@import "~@/assets/styles/variables.scss";
69 70
70 - .app-wrapper { 71 +.app-wrapper {
71 - @include clearfix; 72 + @include clearfix;
72 - position: relative; 73 + position: relative;
73 - height: 100%; 74 + height: 100%;
74 - width: 100%; 75 + width: 100%;
75 76
76 - &.mobile.openSidebar { 77 + &.mobile.openSidebar {
77 - position: fixed;
78 - top: 0;
79 - }
80 - }
81 -
82 - .drawer-bg {
83 - background: #000;
84 - opacity: 0.3;
85 - width: 100%;
86 - top: 0;
87 - height: 100%;
88 - position: absolute;
89 - z-index: 999;
90 - }
91 -
92 - .fixed-header {
93 position: fixed; 78 position: fixed;
94 top: 0; 79 top: 0;
95 - right: 0;
96 - z-index: 9;
97 - width: calc(100% - #{$sideBarWidth});
98 - transition: width 0.28s;
99 } 80 }
81 +}
100 82
101 - .hideSidebar .fixed-header { 83 +.drawer-bg {
102 - width: calc(100% - 54px) 84 + background: #000;
103 - } 85 + opacity: 0.3;
86 + width: 100%;
87 + top: 0;
88 + height: 100%;
89 + position: absolute;
90 + z-index: 999;
91 +}
104 92
105 - .mobile .fixed-header { 93 +.fixed-header {
106 - width: 100%; 94 + position: fixed;
107 - } 95 + top: 0;
96 + right: 0;
97 + z-index: 9;
98 + width: calc(100% - #{$sideBarWidth});
99 + transition: width 0.28s;
100 +}
101 +
102 +.hideSidebar .fixed-header {
103 + width: calc(100% - 54px)
104 +}
105 +
106 +.mobile .fixed-header {
107 + width: 100%;
108 +}
108 </style> 109 </style>
......
...@@ -73,7 +73,7 @@ export const constantRoutes = [ ...@@ -73,7 +73,7 @@ export const constantRoutes = [
73 hidden: true, 73 hidden: true,
74 children: [ 74 children: [
75 { 75 {
76 - path: '/info/:handle/:id|:routeStatus|:fltNo|:route|:fltDate|:status', 76 + path: '/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status',
77 component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve), 77 component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
78 name: 'FlightAllocConfigInfo', 78 name: 'FlightAllocConfigInfo',
79 meta: { title: '航班配舱', icon: 'user' } 79 meta: { title: '航班配舱', icon: 'user' }
...@@ -91,7 +91,7 @@ export const constantRoutes = [ ...@@ -91,7 +91,7 @@ export const constantRoutes = [
91 meta: { title: '错误信息提示', icon: 'user' } 91 meta: { title: '错误信息提示', icon: 'user' }
92 }, 92 },
93 { 93 {
94 - path: '/goodsLog', 94 + path: '/goodsLog/type=:type',
95 component: (resolve) => require(['@/views/basicInformation/goodsStation/goodsUploadLog'], resolve), 95 component: (resolve) => require(['@/views/basicInformation/goodsStation/goodsUploadLog'], resolve),
96 name: 'GoodsUploadLog', 96 name: 'GoodsUploadLog',
97 meta: { title: '导入日志', icon: 'user' } 97 meta: { title: '导入日志', icon: 'user' }
......
...@@ -42,7 +42,8 @@ module.exports = { ...@@ -42,7 +42,8 @@ module.exports = {
42 /** 42 /**
43 * logout 43 * logout
44 */ 44 */
45 - logoutURL: 'https://test-myapps.secure.fedex.com/purpleid/signout/', 45 + logoutURL: 'https://test-myapps.secure.fedex.com/L2/iMAC/',//uat
46 + // logoutURL: 'https://myapps.secure.fedex.com/iMAC/',//生产
46 47
47 /** 48 /**
48 * 后端接口 49 * 后端接口
...@@ -58,5 +59,5 @@ module.exports = { ...@@ -58,5 +59,5 @@ module.exports = {
58 /** 59 /**
59 * 版本号 60 * 版本号
60 */ 61 */
61 - version: 'version:1.9.0' 62 + version: 'version:2.0.0'
62 } 63 }
......
...@@ -7,6 +7,7 @@ const getters = { ...@@ -7,6 +7,7 @@ const getters = {
7 token: state => state.user.token, 7 token: state => state.user.token,
8 avatar: state => state.user.avatar, 8 avatar: state => state.user.avatar,
9 name: state => state.user.name, 9 name: state => state.user.name,
10 + id: state => state.user.id,
10 activePortName: state => state.user.activePortName, 11 activePortName: state => state.user.activePortName,
11 portName: state => state.user.portName, 12 portName: state => state.user.portName,
12 introduction: state => state.user.introduction, 13 introduction: state => state.user.introduction,
......
...@@ -18,7 +18,7 @@ const mutations = { ...@@ -18,7 +18,7 @@ const mutations = {
18 //Cookies.set('sidebarStatus', 1) 18 //Cookies.set('sidebarStatus', 1)
19 localStorage.setItem('sidebarStatus', 1) 19 localStorage.setItem('sidebarStatus', 1)
20 } else { 20 } else {
21 - Cookies.set('sidebarStatus', 0) 21 + // Cookies.set('sidebarStatus', 0)
22 localStorage.setItem('sidebarStatus', 0) 22 localStorage.setItem('sidebarStatus', 0)
23 } 23 }
24 }, 24 },
......
...@@ -6,7 +6,7 @@ const mimeMap = { ...@@ -6,7 +6,7 @@ const mimeMap = {
6 xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 6 xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
7 zip: 'application/zip' 7 zip: 'application/zip'
8 } 8 }
9 -const baseUrl = settings.downLoadURL //uat服务器 9 +const baseUrl = settings.downLoadURL //接口地址
10 10
11 export function downLoadZip(str, data, filename) { 11 export function downLoadZip(str, data, filename) {
12 var url = baseUrl + str 12 var url = baseUrl + str
...@@ -26,15 +26,14 @@ export function downLoadZip(str, data, filename) { ...@@ -26,15 +26,14 @@ export function downLoadZip(str, data, filename) {
26 * @param {*} res blob响应内容 26 * @param {*} res blob响应内容
27 * @param {String} mimeType MIME类型 27 * @param {String} mimeType MIME类型
28 */ 28 */
29 -export function resolveBlob(res, mimeType) { 29 +export function resolveBlob(res, mimeType, fileName) {
30 const aLink = document.createElement('a') 30 const aLink = document.createElement('a')
31 - var blob = new Blob([res], { type: mimeType }) 31 + var blob = new Blob([res.data], { type: mimeType })
32 // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名; 32 // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
33 var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*') 33 var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
34 - var contentDisposition = decodeURI(res.headers['content-disposition']) 34 + // var contentDisposition = decodeURI(res.headers['content-disposition'])
35 - var result = patt.exec(contentDisposition) 35 + // var result = patt.exec(contentDisposition)
36 - var fileName = result[1] 36 + // var fileName = result[1]
37 - fileName = fileName.replace(/\"/g, '')
38 aLink.href = URL.createObjectURL(blob) 37 aLink.href = URL.createObjectURL(blob)
39 aLink.setAttribute('download', fileName) // 设置下载文件名称 38 aLink.setAttribute('download', fileName) // 设置下载文件名称
40 document.body.appendChild(aLink) 39 document.body.appendChild(aLink)
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
147 "></el-empty> --> 147 "></el-empty> -->
148 <el-checkbox-group v-model="handingCodes"> 148 <el-checkbox-group v-model="handingCodes">
149 <el-row> 149 <el-row>
150 - <el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id"> 150 + <el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id" v-if="item.status == 1">
151 <el-checkbox :label="item.chineseName" v-model="item.chineseName"> 151 <el-checkbox :label="item.chineseName" v-model="item.chineseName">
152 <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> 152 <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
153 </el-checkbox> 153 </el-checkbox>
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
163 "></el-empty> --> 163 "></el-empty> -->
164 <el-checkbox-group v-model="subCategorys"> 164 <el-checkbox-group v-model="subCategorys">
165 <el-row> 165 <el-row>
166 - <el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id"> 166 + <el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id" v-if="item.status == 1">
167 <el-checkbox :label="item.chineseName" v-model="item.chineseName"> 167 <el-checkbox :label="item.chineseName" v-model="item.chineseName">
168 <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> 168 <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
169 </el-checkbox> 169 </el-checkbox>
...@@ -175,15 +175,15 @@ ...@@ -175,15 +175,15 @@
175 </el-row> 175 </el-row>
176 <div style="margin: 0 0 0 10px"> 176 <div style="margin: 0 0 0 10px">
177 <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button> 177 <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button>
178 - <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download" 178 + <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
179 - v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading" 179 + v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(0)"
180 - :disabled="tableData.length <= 0">{{ 180 + :loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
181 - downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果" 181 + downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
182 }}</el-button> 182 }}</el-button>
183 - <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download" 183 + <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
184 - v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading" 184 + v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(1)"
185 - :disabled="tableData.length <= 0">{{ 185 + :loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
186 - downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果" 186 + downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
187 }}</el-button> 187 }}</el-button>
188 <el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']" 188 <el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']"
189 @click="addFit" :disabled="tableSelection.length <= 0">添加到航班</el-button> 189 @click="addFit" :disabled="tableSelection.length <= 0">添加到航班</el-button>
...@@ -331,6 +331,7 @@ export default { ...@@ -331,6 +331,7 @@ export default {
331 }, 331 },
332 //查询 332 //查询
333 async select(val) { 333 async select(val) {
334 + this.tableSelection = []
334 this.loading = true; 335 this.loading = true;
335 this.dataInfo(); 336 this.dataInfo();
336 if (val === 0) { 337 if (val === 0) {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
30 </el-tooltip> 30 </el-tooltip>
31 </div> 31 </div>
32 </template> 32 </template>
33 - <el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0"> 33 + <el-select class="formItem" v-model="formData.route" placeholder="请选择航线" :disabled="routeList.length == 0">
34 <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index"> 34 <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index">
35 <Tooltips :content="item.route" :refName="item.route"></Tooltips> 35 <Tooltips :content="item.route" :refName="item.route"></Tooltips>
36 </el-option> 36 </el-option>
......
...@@ -543,12 +543,30 @@ export default { ...@@ -543,12 +543,30 @@ export default {
543 this.fltNoDisabled = true 543 this.fltNoDisabled = true
544 this.infoForm.fltNo = this.$route.params.fltNo 544 this.infoForm.fltNo = this.$route.params.fltNo
545 this.infoForm.fltDate = this.$route.params.fltDate 545 this.infoForm.fltDate = this.$route.params.fltDate
546 - this.infoForm.route = this.$route.params.route
547 if (this.$route.params.status) { 546 if (this.$route.params.status) {
548 if (this.routeSatus == 'dmLog') { 547 if (this.routeSatus == 'dmLog') {
548 + this.infoForm.route = this.$route.params.route
549 this.getIdDimension(this.$route.params.id) 549 this.getIdDimension(this.$route.params.id)
550 } else { 550 } else {
551 - this.getRouteDimension({ fltNo: this.$route.params.fltNo, fltDate: this.$route.params.fltDate, route: this.$route.params.route ? this.$route.params.route : '', status: this.$route.params.status ? this.$route.params.status : '' }) 551 + let obj = {
552 + fltNo: this.$route.params.fltNo,
553 + fltDate: this.$route.params.fltDate,
554 + status: this.$route.params.status ? this.$route.params.status : ''
555 + }
556 +
557 + if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
558 + this.infoForm.route = this.$route.params.route
559 + obj.route = this.$route.params.route
560 + obj.flightRouteListStr = this.$route.params.route
561 + } else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
562 + this.infoForm.route = ''
563 + obj.route = ''
564 + obj.flightRouteListStr = this.$route.params.route
565 + } else {
566 + obj.route = this.$route.params.route ? this.$route.params.route : ''
567 + }
568 +
569 + this.getRouteDimension(obj)
552 } 570 }
553 } 571 }
554 } else { 572 } else {
...@@ -572,7 +590,23 @@ export default { ...@@ -572,7 +590,23 @@ export default {
572 if (this.routeSatus == 'dmLog') { 590 if (this.routeSatus == 'dmLog') {
573 this.getIdDimension(this.$route.params.id) 591 this.getIdDimension(this.$route.params.id)
574 } else { 592 } else {
575 - this.getRouteDimension({ fltNo: this.$route.params.fltNo, fltDate: this.$route.params.fltDate, route: this.$route.params.route ? this.$route.params.route : '', status: '' }) 593 + let obj = {
594 + fltNo: this.$route.params.fltNo,
595 + fltDate: this.$route.params.fltDate,
596 + status: this.$route.params.status ? this.$route.params.status : ''
597 + }
598 +
599 + if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
600 + obj.route = this.$route.params.route
601 + obj.flightRouteListStr = this.$route.params.route
602 + } else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
603 + obj.route = ''
604 + obj.flightRouteListStr = this.$route.params.route
605 + } else {
606 + obj.route = this.$route.params.route ? this.$route.params.route : ''
607 + }
608 +
609 + this.getRouteDimension(obj)
576 } 610 }
577 } 611 }
578 }, 612 },
...@@ -614,6 +648,7 @@ export default { ...@@ -614,6 +648,7 @@ export default {
614 this.infoForm.fltDate = res.data.list.ruleDate 648 this.infoForm.fltDate = res.data.list.ruleDate
615 this.infoForm.route = res.data.list.flightRoute 649 this.infoForm.route = res.data.list.flightRoute
616 this.infoForm.list.push(this.dataHandle(res.data.list)) 650 this.infoForm.list.push(this.dataHandle(res.data.list))
651 + console.log(this.infoForm)
617 } else { 652 } else {
618 this.isEmpty = true 653 this.isEmpty = true
619 } 654 }
...@@ -634,6 +669,7 @@ export default { ...@@ -634,6 +669,7 @@ export default {
634 purposeOfFlightNo: val.fltNo, 669 purposeOfFlightNo: val.fltNo,
635 flightDate: val.fltDate, 670 flightDate: val.fltDate,
636 flightRoute: val.route, 671 flightRoute: val.route,
672 + flightRouteListStr: val.flightRouteListStr,
637 status: val.status ? val.status : '' 673 status: val.status ? val.status : ''
638 } 674 }
639 if (this.$route.params.handle != 'add') { 675 if (this.$route.params.handle != 'add') {
...@@ -703,8 +739,10 @@ export default { ...@@ -703,8 +739,10 @@ export default {
703 findDestinationFltRuleByFlightNo({ 739 findDestinationFltRuleByFlightNo({
704 purposeOfFlightNo: this.infoForm.fltNo, 740 purposeOfFlightNo: this.infoForm.fltNo,
705 flightRoute: this.infoForm.route, 741 flightRoute: this.infoForm.route,
742 + flightRouteListStr: this.$route.params.route,
706 status: this.$route.params.status 743 status: this.$route.params.status
707 }).then(response => { 744 }).then(response => {
745 + this.routeList = response.data.routeList
708 if (response.data.list.length > 0) { 746 if (response.data.list.length > 0) {
709 //查询到通用维度,去除id status,航线赋值,航线优先级赋值 747 //查询到通用维度,去除id status,航线赋值,航线优先级赋值
710 if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') { 748 if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
...@@ -776,16 +814,18 @@ export default { ...@@ -776,16 +814,18 @@ export default {
776 console.log(err) 814 console.log(err)
777 }) 815 })
778 } else { 816 } else {
779 - //航线为空,提示未找到维度数据 817 + //航线为空
780 - if (this.routeSatus == 'flightInformationMaintenancePurple Tail' || this.routeSatus == 'FlightRandConfig') { 818 + if (this.routeSatus == 'FlightRandConfig') {
781 if (this.routeSatus == 'FlightRandConfig') { 819 if (this.routeSatus == 'FlightRandConfig') {
782 this.infoForm.fltDate = '' 820 this.infoForm.fltDate = ''
783 } 821 }
784 findDestinationFltRuleByFlightNo({ 822 findDestinationFltRuleByFlightNo({
785 purposeOfFlightNo: this.infoForm.fltNo, 823 purposeOfFlightNo: this.infoForm.fltNo,
786 flightRoute: this.infoForm.route, 824 flightRoute: this.infoForm.route,
825 + flightRouteListStr: this.$route.params.route,
787 status: this.$route.params.status 826 status: this.$route.params.status
788 }).then(response => { 827 }).then(response => {
828 + this.routeList = response.data.routeList
789 if (response.data.list.length > 0) { 829 if (response.data.list.length > 0) {
790 this.routeList.forEach(route => { 830 this.routeList.forEach(route => {
791 let routeStatus = 1 831 let routeStatus = 1
...@@ -823,6 +863,15 @@ export default { ...@@ -823,6 +863,15 @@ export default {
823 this.isEmpty = true 863 this.isEmpty = true
824 console.log(err) 864 console.log(err)
825 }) 865 })
866 + } else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
867 + this.routeList.forEach((route) => {
868 + this.infoForm.list.push({
869 + purposeOfFlightNo: this.infoForm.fltNo,
870 + ruleDate: this.infoForm.fltDate,
871 + flightRoute: route.route,
872 + routePriority: route.routePriority,
873 + })
874 + })
826 } 875 }
827 } 876 }
828 } 877 }
......
...@@ -67,8 +67,7 @@ ...@@ -67,8 +67,7 @@
67 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> 67 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
68 <template slot-scope="scope"> 68 <template slot-scope="scope">
69 <el-button size="mini" type="text" icon="el-icon-edit" 69 <el-button size="mini" type="text" icon="el-icon-edit"
70 - @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')"> 70 + @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">查看配置维度
71 - 查看配置维度
72 </el-button> 71 </el-button>
73 </template> 72 </template>
74 </el-table-column> 73 </el-table-column>
......
...@@ -47,27 +47,35 @@ ...@@ -47,27 +47,35 @@
47 </el-form-item> 47 </el-form-item>
48 </el-col> 48 </el-col>
49 </el-row> 49 </el-row>
50 - <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索 50 + <el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading"
51 + @click="handleQuery">搜索
51 </el-button> 52 </el-button>
52 - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 53 + <el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
53 - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['base:flightInfo:add']"> 54 + <el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
55 + v-hasPermi="['base:flightInfo:add']">
54 新增</el-button> 56 新增</el-button>
55 - <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 57 + <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
56 @click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button> 58 @click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button>
57 - <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 59 + <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
58 @click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button> 60 @click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button>
59 - <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 61 + <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
60 @click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button> 62 @click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button>
61 - <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 63 + <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
62 @click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button> 64 @click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button>
63 - <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 65 + <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
64 @click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启 66 @click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启
65 </el-button> 67 </el-button>
66 - <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 68 + <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
67 @click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭 69 @click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭
68 </el-button> 70 </el-button>
69 - <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" @click="handleDelete" 71 + <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
70 - v-hasPermi="['base:flightInfo:delete']">删除 72 + @click="BlackListSwitchStatus(1)">黑名单自动配舱开启
73 + </el-button>
74 + <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
75 + @click="BlackListSwitchStatus(0)">黑名单自动配舱关闭
76 + </el-button>
77 + <el-button class="mt10" type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0"
78 + @click="handleDelete" v-hasPermi="['base:flightInfo:delete']">删除
71 </el-button> 79 </el-button>
72 </el-form> 80 </el-form>
73 <Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader" 81 <Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader"
...@@ -124,7 +132,7 @@ ...@@ -124,7 +132,7 @@
124 </el-form-item> 132 </el-form-item>
125 </el-col> 133 </el-col>
126 </el-row> 134 </el-row>
127 - <el-row> 135 + <el-row style="margin-bottom:5px">
128 <el-col :span="12"> 136 <el-col :span="12">
129 <el-form-item prop="route"> 137 <el-form-item prop="route">
130 <template slot="label"> 138 <template slot="label">
...@@ -136,12 +144,13 @@ ...@@ -136,12 +144,13 @@
136 </div> 144 </div>
137 </template> 145 </template>
138 <el-select ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route" 146 <el-select ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route"
139 - placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :multiple='routeMultiple' 147 + placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :loading="routeLoading"
140 - :key="routeMultiple"> 148 + :multiple='routeMultiple' :key="routeMultiple">
141 <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> 149 <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
142 </el-option> 150 </el-option>
143 </el-select> 151 </el-select>
144 </el-form-item> 152 </el-form-item>
153 + <div class="formTips" v-if="title == '修改航班信息'">注意!:移除航线,相对应日期级别航线维度会同时删除</div>
145 </el-col> 154 </el-col>
146 <el-col :span="12"> 155 <el-col :span="12">
147 <el-form-item label="航班类型" prop="typeId"> 156 <el-form-item label="航班类型" prop="typeId">
...@@ -248,12 +257,12 @@ ...@@ -248,12 +257,12 @@
248 </el-col> 257 </el-col>
249 <el-col :span="12"> 258 <el-col :span="12">
250 <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight"> 259 <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight">
251 - <el-input class="wid80" v-model="form.accountTotalWeight" disabled placeholder="配置特殊规则后计算" /> 260 + <el-input-number class="wid80" v-model="form.accountTotalWeight" disabled placeholder="配置特殊规则后计算" />
252 </el-form-item> 261 </el-form-item>
253 </el-col> 262 </el-col>
254 <el-col :span="12"> 263 <el-col :span="12">
255 <el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight"> 264 <el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight">
256 - <el-input class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" /> 265 + <el-input-number class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" />
257 </el-form-item> 266 </el-form-item>
258 </el-col> 267 </el-col>
259 </el-row> 268 </el-row>
...@@ -284,7 +293,8 @@ import { ...@@ -284,7 +293,8 @@ import {
284 findFltCommonConf, 293 findFltCommonConf,
285 updateStatusBatch, 294 updateStatusBatch,
286 updateAutoPushBatch, 295 updateAutoPushBatch,
287 - updateWhiteListSwitchBatch 296 + updateWhiteListSwitchBatch,
297 + updateBlackListSwitchBatch
288 } from "@/api/findAllFltData"; 298 } from "@/api/findAllFltData";
289 import { getpreAudit } from '@/api/system/preReview.js' 299 import { getpreAudit } from '@/api/system/preReview.js'
290 import { queryRouteByFltNo } from '@/api/destinationFlight.js' 300 import { queryRouteByFltNo } from '@/api/destinationFlight.js'
...@@ -314,7 +324,7 @@ export default { ...@@ -314,7 +324,7 @@ export default {
314 fltNo: [ 324 fltNo: [
315 { 325 {
316 required: true, 326 required: true,
317 - message: "ACCS原航班号不能为空", 327 + message: "航班号不能为空",
318 trigger: "blur", 328 trigger: "blur",
319 }, 329 },
320 ], 330 ],
...@@ -342,7 +352,7 @@ export default { ...@@ -342,7 +352,7 @@ export default {
342 route: [ 352 route: [
343 { 353 {
344 required: true, 354 required: true,
345 - message: "航班线路不能为空", 355 + message: "航班路线不能为空",
346 trigger: "blur", 356 trigger: "blur",
347 }, 357 },
348 // { 358 // {
...@@ -446,6 +456,7 @@ export default { ...@@ -446,6 +456,7 @@ export default {
446 ishighPriceWeightPercent: true, 456 ishighPriceWeightPercent: true,
447 //遮罩层 457 //遮罩层
448 loading: false, 458 loading: false,
459 + routeLoading: false,
449 //遮罩层 460 //遮罩层
450 loadingFlightDate: false, 461 loadingFlightDate: false,
451 //删除失败弹框 462 //删除失败弹框
...@@ -562,14 +573,17 @@ export default { ...@@ -562,14 +573,17 @@ export default {
562 this.msgError(response.msg); 573 this.msgError(response.msg);
563 } 574 }
564 }); 575 });
576 + this.routeLoading = true
565 //获取航线 577 //获取航线
566 queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => { 578 queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => {
579 + this.routeLoading = false
567 if (res.code === 200) { 580 if (res.code === 200) {
568 this.routeList = res.data.list 581 this.routeList = res.data.list
569 } else { 582 } else {
570 this.msgWarning(res.msg) 583 this.msgWarning(res.msg)
571 } 584 }
572 }).catch(err => { 585 }).catch(err => {
586 + this.routeLoading = false
573 console.log(err) 587 console.log(err)
574 }) 588 })
575 } 589 }
...@@ -773,8 +787,7 @@ export default { ...@@ -773,8 +787,7 @@ export default {
773 this.formdisabled.fltDate = true; 787 this.formdisabled.fltDate = true;
774 //航班种类 788 //航班种类
775 this.formdisabled.kindId = true; 789 this.formdisabled.kindId = true;
776 - //航线 790 +
777 - this.formdisabled.route = true
778 //根据ID查item 791 //根据ID查item
779 findFltById(row).then((response) => { 792 findFltById(row).then((response) => {
780 if (response.code == 200) { 793 if (response.code == 200) {
...@@ -786,6 +799,30 @@ export default { ...@@ -786,6 +799,30 @@ export default {
786 // this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false; 799 // this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false;
787 // 计算高低价可配 800 // 计算高低价可配
788 // this.LowHighAvailable(); 801 // this.LowHighAvailable();
802 +
803 + //航线
804 + this.selectOption.flightKindlist.forEach(item => {
805 + if (item.id == this.form.kindId) {
806 + if (item.chineseName.indexOf('White') >= 0) {
807 + this.formdisabled.route = true
808 + } else if (item.chineseName.indexOf('Purple') >= 0) {
809 + this.formdisabled.route = false
810 + this.routeMultiple = true
811 + //获取航线
812 + queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => {
813 + this.routeLoading = false
814 + if (res.code === 200) {
815 + this.routeList = res.data.list
816 + } else {
817 + this.msgWarning(res.msg)
818 + }
819 + }).catch(err => {
820 + this.routeLoading = false
821 + console.log(err)
822 + })
823 + }
824 + }
825 + })
789 this.ishighPriceWeightPercent = this.form.highLowPriceFlg === 1 ? false : true 826 this.ishighPriceWeightPercent = this.form.highLowPriceFlg === 1 ? false : true
790 } else { 827 } else {
791 this.msgError(response.msg); 828 this.msgError(response.msg);
...@@ -799,7 +836,7 @@ export default { ...@@ -799,7 +836,7 @@ export default {
799 handle: 'update', 836 handle: 'update',
800 fltNo: val.fltNo, 837 fltNo: val.fltNo,
801 fltDate: val.fltDate ? val.fltDate : null, 838 fltDate: val.fltDate ? val.fltDate : null,
802 - route: val.flightKindName != 'Purple Tail' ? val.route : ' ', 839 + route: val.route,
803 routeStatus: 'flightInformationMaintenance' + val.flightKindName, 840 routeStatus: 'flightInformationMaintenance' + val.flightKindName,
804 status: ' ', 841 status: ' ',
805 createStatus: 1, 842 createStatus: 1,
...@@ -902,6 +939,7 @@ export default { ...@@ -902,6 +939,7 @@ export default {
902 this.routeList = [] 939 this.routeList = []
903 this.ishighPriceWeightPercent = true 940 this.ishighPriceWeightPercent = true
904 this.routeMultiple = false 941 this.routeMultiple = false
942 + this.routeLoading = false
905 this.open = false; 943 this.open = false;
906 this.findAllFltData(); 944 this.findAllFltData();
907 this.findFltConditionData(); 945 this.findFltConditionData();
...@@ -1004,6 +1042,26 @@ export default { ...@@ -1004,6 +1042,26 @@ export default {
1004 console.log(err) 1042 console.log(err)
1005 }) 1043 })
1006 }, 1044 },
1045 + //黑名单配舱开关
1046 + BlackListSwitchStatus(val) {
1047 + let obj = {
1048 + updateIds: []
1049 + }
1050 + obj.status = val
1051 + this.ids.forEach(item => {
1052 + obj.updateIds.push(item.id)
1053 + })
1054 + updateBlackListSwitchBatch(obj).then(res => {
1055 + if (res.code === 200) {
1056 + this.msgSuccess(res.msg)
1057 + this.findAllFltData()
1058 + } else {
1059 + this.msgWarning(res.msg)
1060 + }
1061 + }).catch(err => {
1062 + console.log(err)
1063 + })
1064 + },
1007 //航线修改 1065 //航线修改
1008 routeChange(val) { 1066 routeChange(val) {
1009 this.$forceUpdate() 1067 this.$forceUpdate()
...@@ -1058,4 +1116,10 @@ export default { ...@@ -1058,4 +1116,10 @@ export default {
1058 .el-table__body tr.hover-row>td { 1116 .el-table__body tr.hover-row>td {
1059 background-color: #d9ecff !important; 1117 background-color: #d9ecff !important;
1060 } 1118 }
1119 +
1120 +.formTips {
1121 + width: 85%;
1122 + color: #ff4949;
1123 + text-align: right;
1124 +}
1061 </style> 1125 </style>
......
1 +<template>
2 + <div>
3 + <el-dialog :title="openStatus == 'add' ? '新 增' : openStatus == 'downloadExcel' ? '导出Excel' : '导入Excel'"
4 + :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" append-to-body center>
5 + <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
6 + label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
7 + <div v-if="openStatus == 'add'">
8 + <el-form-item label="货站名称" prop="goodsStation">
9 + <el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称">
10 + </el-input>
11 + </el-form-item>
12 + <el-form-item label="品名" prop="goodsList">
13 + <el-input type="textarea" v-model="formData.goodsList" rows="4" maxlength="125"
14 + placeholder="请输入品名,多个用“;”隔开">
15 + </el-input>
16 + </el-form-item>
17 + </div>
18 + <div v-else-if="openStatus == 'downloadExcel'">
19 + <el-form-item label="货站名称" prop="goodsStation">
20 + <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
21 + :loading="goodsStationLoading" placeholder="不限">
22 + <el-option v-for="(item, index) in goodsStationList" :label="item" :value="item"
23 + :key="item">
24 + </el-option>
25 + </el-select>
26 + </el-form-item>
27 + </div>
28 + <div v-else>
29 + <el-form-item label="货站名称" prop="uploadGoodsStation">
30 + <el-input type="text" v-model="formData.uploadGoodsStation" maxlength="25"
31 + placeholder="请输入货站名称">
32 + </el-input>
33 + </el-form-item>
34 + <el-form-item prop="file" label-width="0px">
35 + <el-upload ref="upload" action="/goods/uploadGoodsExcel" name="file" :http-request="uploadExcel"
36 + :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" accept=".xlsx"
37 + class="upload-demo">
38 + <el-button type="primary" icon="el-icon-upload2" size="small">选择文件</el-button>
39 + </el-upload>
40 + </el-form-item>
41 + </div>
42 + </el-form>
43 + <div slot="footer" class="dialog-footer">
44 + <el-button v-if='openStatus == "add"' type="primary" size="small" :loading="loading" @click="submit">确 定
45 + </el-button>
46 + <el-button v-else-if="openStatus == 'downloadExcel'" type="primary" size="small" :loading="downloading"
47 + @click="download">导出Excel</el-button>
48 + <el-button v-else type="primary" :loading="loading" size="small" @click="upload">导入Excel
49 + </el-button>
50 + <el-button style="margin-top:10px" size="small" @click="close">取 消</el-button>
51 + </div>
52 + </el-dialog>
53 + </div>
54 +</template>
55 +
56 +<script>
57 +import { batchAddBlackGoods, findStationName, uploadGoodsBlackExce } from "@/api/goodsStation"
58 +import { downLoadXlsx } from "@/utils/zipdownload";
59 +
60 +export default {
61 + name: '',
62 + props: {
63 + open: {
64 + type: Boolean,
65 + default: false
66 + },
67 + openStatus: {
68 + type: String,
69 + default: 'add'
70 + }
71 + },
72 + data() {
73 + return {
74 + formData: {
75 + goodsStation: null,
76 + uploadGoodsStation: null,
77 + goodsList: '',
78 + file: null
79 + },
80 + goodsStationList: [],
81 + rules: {
82 + goodsStation: [
83 + {
84 + required: true,
85 + message: "货站名称不能为空",
86 + trigger: "change",
87 + },
88 + ],
89 + goodsList: [
90 + {
91 + required: true,
92 + message: "品名不能为空",
93 + trigger: "blur",
94 + },
95 + ],
96 + uploadGoodsStation: [
97 + {
98 + required: true,
99 + message: "货站名称不能为空",
100 + trigger: "change",
101 + },
102 + ],
103 + file: [
104 + {
105 + required: true,
106 + message: "文件不能为空",
107 + trigger: "change",
108 + },
109 + ]
110 + },
111 + fileList: [],
112 + errorData: [],
113 + goodsStationLoading: false,
114 + downloading: false,
115 + loading: false,
116 + }
117 + },
118 + watch: {
119 + open(val) {
120 + if (val && this.openStatus == 'downloadExcel') {
121 + this.getgoods()
122 + }
123 + }
124 + },
125 + methods: {
126 + //查询货站
127 + getgoods() {
128 + this.goodsStationLoading = true
129 + findStationName({ goodsType: 2 }).then(res => {
130 + this.goodsStationLoading = false
131 + if (res.code === 200) {
132 + this.goodsStationList = res.data.list
133 + } else {
134 + this.msgWarning(res.msg)
135 + }
136 + }).catch(err => {
137 + this.goodsStationLoading = false
138 + console.log(err)
139 + })
140 + },
141 + //提交
142 + submit() {
143 + let obj = {
144 + goodsList: []
145 + }
146 + obj.goodsStation = this.formData.goodsStation
147 + this.formData.goodsList = this.formData.goodsList.replace(/;/g, ";")
148 + if (this.formData.goodsList != null && this.formData.goodsList != '') {
149 + this.formData.goodsList.split(';').forEach(item => {
150 + if (item != null && item != '') {
151 + obj.goodsList.push(item)
152 + }
153 + })
154 + }
155 + this.$refs['addForm'].validate(val => {
156 + if (val) {
157 + this.loading = true
158 + batchAddBlackGoods(obj).then(res => {
159 + this.loading = false
160 + if (res.code === 200) {
161 + this.msgSuccess('添加成功')
162 + this.close()
163 + } else {
164 + this.msgWarning(res.msg)
165 + }
166 + }).catch(err => {
167 + this.loading = false
168 + console.log(err)
169 + })
170 + }
171 + })
172 + },
173 + //选择文件
174 + uploadExcel(option) {
175 + this.formData.file = option.file
176 + },
177 + //导入Excel
178 + upload() {
179 + this.loading = true
180 + if (this.formData.file != null && this.formData.file != '') {
181 + this.$refs['addForm'].validate(val => {
182 + if (val) {
183 + const file = this.formData.file;
184 + let goodsStation = this.formData.uploadGoodsStation
185 + uploadGoodsBlackExce(file, goodsStation).then((res) => {
186 + this.loading = false;
187 + if (res.code != 200) {
188 + if (res.code == 603) {
189 + this.$alert(res.msg, "提示", {
190 + confirmButtonText: "确定",
191 + type: "warning",
192 + });
193 + } else if (res.code === 201) {
194 + this.$message.warning(res.msg);
195 + if (res.data) {
196 + this.errorData = res.data;
197 + this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
198 + }
199 + } else {
200 + this.$message.warning(res.msg);
201 + }
202 + } else {
203 + this.$message.success(res.msg);
204 + }
205 + setTimeout(() => {
206 + this.close()
207 + }, 1000);
208 + });
209 + } else {
210 + this.loading = false;
211 + }
212 + })
213 + } else {
214 + this.loading = false
215 + this.msgWarning('请选择文件后再导入!')
216 + }
217 +
218 + },
219 + //导出Excel
220 + download() {
221 + this.$refs['addForm'].validate(val => {
222 + if (val) {
223 + this.downloading = true
224 + let data = { goodsStation: this.formData.goodsStation, goodsType: 2 }
225 + downLoadXlsx("/goods/exportGoods", data, "黑名单货站表")
226 + .then(() => {
227 + this.downloading = false
228 + this.close()
229 + })
230 + .catch(() => {
231 + this.downloading = false
232 + });
233 + }
234 + })
235 +
236 + },
237 + handleRemove(file, fileList) {
238 + //清掉上传的文件
239 + this.errorData = [];
240 + this.fileList = [];
241 + this.formData.file = null
242 + },
243 + handleExceed(files) {
244 + //重复上传文件
245 + let file = {};
246 + file.file = files[0];
247 + file.name = files[0].name;
248 + this.fileList = [];
249 + this.fileList.push(file);
250 + this.formData.file = file
251 + this.uploadExcel(file);
252 + },
253 + //取消
254 + close() {
255 + this.formData = {
256 + goodsStation: null,
257 + goodsList: null
258 + }
259 + if (this.openStatus == 'uploadExcel') {
260 + this.$refs['upload'].clearFiles()
261 + }
262 + this.$refs["addForm"].clearValidate();
263 + this.$emit('close')
264 + }
265 +
266 + }
267 +}
268 +
269 +</script>
270 +
271 +<style lang="scss" scoped>
272 +.upload-demo {
273 +
274 + .el-upload-list__item:first-child {
275 + margin-top: 5px !important;
276 + }
277 +
278 + .el-upload-list {
279 + display: inline-block;
280 + margin-left: 10px;
281 + }
282 +}
283 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div>
3 + <el-form class="form-header" ref="goodsStationForm" :model="selectionData" label-position="right"
4 + label-width="auto" size="small" @submit.native.prevent>
5 + <el-row>
6 + <el-col :span="6">
7 + <el-form-item label="货站名称">
8 + <el-input class="formItem" v-model="selectionData.goodsStation" placeholder="请输入货站名称"
9 + maxlength="50" clearable />
10 + </el-form-item>
11 + </el-col>
12 + <el-col :span="6">
13 + <el-form-item label="品名">
14 + <el-input class="formItem" v-model="selectionData.goodsName" placeholder="请输入品名" maxlength="50"
15 + clearable />
16 + </el-form-item>
17 + </el-col>
18 + </el-row>
19 + </el-form>
20 + <div style="display:flex;padding:10px 20px">
21 + <el-button icon="el-icon-search" type="primary" :loading="loading" size="small" @click="selection(1)">查 询
22 + </el-button>
23 + <el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['base:goodsBlackStation:add']"
24 + @click="add">新 增
25 + </el-button>
26 + <el-button icon="el-icon-delete" type="danger" size="small" v-hasPermi="['base:goodsBlackStation:delete']"
27 + style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel">
28 + 删 除
29 + </el-button>
30 + <el-button type="primary" icon="el-icon-download" size="small" style="margin-left:10px"
31 + @click="downloadTempleate">下载模板
32 + </el-button>
33 + <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
34 + @click="downloadExcel">
35 + 黑名单导出
36 + </el-button>
37 + <el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
38 + v-hasPermi="['base:goodsBlackStation:add']">黑名单导入</el-button>
39 + <el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
40 + </el-button>
41 + </div>
42 + <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
43 + :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
44 + :limitSize="selectionData.size" :page="selectionData.page" layout="total,prev, pager, next, jumper, ->"
45 + :pageSizes="[100]" :height="tableHeight" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
46 + @currentChange="currentChange">
47 + <template slot="optionColumn">
48 + <el-table-column label="操作" align="center">
49 + <template slot-scope="scope">
50 + <el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
51 + v-hasPermi="['base:goodsBlackStation:delete']" @click="del(scope.row)">删除</el-button>
52 + </template>
53 + </el-table-column>
54 + </template>
55 + </Tables>
56 + <Dialog :open="open" :openStatus="openStatus" @close="close" />
57 + </div>
58 +</template>
59 +
60 +<script>
61 +import { downLoadTemplate } from "@/api/flightInfoImport";
62 +import { batchDeleteGoods, searchGoods } from "@/api/goodsStation"
63 +import Dialog from './dialog.vue'
64 +
65 +export default {
66 + name: 'GoodsBlackStation',
67 + components: {
68 + Dialog,
69 + },
70 + data() {
71 + return {
72 + selectionData: {
73 + goodsStation: '',
74 + goodsName: '',
75 + goodsType: 2,
76 + size: 20,
77 + page: 1
78 + },
79 + tableData: [],
80 + tableHeader: this.tableHeaders['goodsStation'],
81 + checkData: [],
82 + fileList: [],
83 + errorData: [],
84 + tableHeight: null,
85 + totalCount: 0,
86 + openStatus: '',
87 + loading: false,
88 + open: false,
89 + }
90 + },
91 + created() {
92 +
93 + },
94 + mounted() {
95 + this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200
96 + this.selection(1)
97 + },
98 + watch: {
99 + $route(to, from) {
100 + if (to.name == 'GoodsStation') {
101 + this.selection()
102 + }
103 + }
104 + },
105 + methods: {
106 + //查询
107 + selection(val) {
108 + this.tableData = []
109 + this.checkData = []
110 + this.loading = true
111 + if (val === 1) {
112 + this.selectionData.page = 1
113 + }
114 + searchGoods(this.selectionData).then(res => {
115 + this.loading = false
116 + if (res.code === 200) {
117 + this.tableData = res.data.list
118 + this.totalCount = res.data.total
119 + } else {
120 + this.msgWarning(res.msg)
121 + }
122 + }).catch(err => {
123 + this.loading = false
124 + console.log(err)
125 + })
126 + },
127 + //新增
128 + add() {
129 + this.open = true
130 + this.openStatus = 'add'
131 + },
132 + //删除
133 + del(val) {
134 + this.$confirm("是否要删除这条记录!", "注意!", {
135 + confirmButtonText: "确定",
136 + cancelButtonText: '取消',
137 + type: "warning",
138 + }).then(() => {
139 + this.deleteGoods([val.id])
140 + }).catch(() => {
141 +
142 + })
143 + },
144 + //批量删除
145 + batchDel() {
146 + let arr = []
147 + this.checkData.forEach(item => {
148 + arr.push(item.id)
149 + })
150 + this.$confirm("是否要删除这些记录!", "注意!", {
151 + confirmButtonText: "确定",
152 + cancelButtonText: '取消',
153 + type: "warning",
154 + }).then(() => {
155 + this.deleteGoods(arr)
156 + }).catch(() => {
157 +
158 + })
159 + },
160 + //删除请求
161 + deleteGoods(val) {
162 + batchDeleteGoods(val).then(res => {
163 + if (res.code === 200) {
164 + this.msgSuccess('删除成功!')
165 + this.selection(1)
166 + } else {
167 + this.msgWarning(res.msg)
168 + }
169 + }).catch(err => {
170 + console.log(err)
171 + })
172 + },
173 + //导出
174 + downloadExcel() {
175 + this.open = true
176 + this.openStatus = 'downloadExcel'
177 + },
178 + //复选
179 + tableSelect(val) {
180 + this.checkData = val.selection
181 + },
182 + //全选
183 + tableSelectAll(val) {
184 + this.checkData = val
185 + },
186 + //分页
187 + currentChange(val) {
188 + this.selectionData.page = val.page
189 + this.selection()
190 + },
191 + //上传excel
192 + uploadExcel() {
193 + this.openStatus = 'uploadExcel'
194 + this.open = true
195 + },
196 + //下载模板
197 + downloadTempleate() {
198 + downLoadTemplate('goodsStation').then((res) => {
199 + if (res) {
200 + const blob = new Blob([res]);
201 + const link = document.createElement("a"); //创建a标签
202 + link.download = '黑名单货物品名模板.xlsx'; //a标签添加属性
203 + link.style.display = "none";
204 + link.href = URL.createObjectURL(blob);
205 + document.body.appendChild(link);
206 + link.click(); //执行下载
207 + URL.revokeObjectURL(link.href); //释放url
208 + document.body.removeChild(link); //释放标签
209 + } else {
210 + this.$message.error("下载失败");
211 + }
212 + })
213 + },
214 + handleRemove(file, fileList) {
215 + //清掉上传的文件
216 + this.errorData = [];
217 + this.fileList = [];
218 + },
219 + handleExceed(files) {
220 + //重复上传文件
221 + let file = {};
222 + file.file = files[0];
223 + file.name = files[0].name;
224 + this.fileList = [];
225 + this.fileList.push(file);
226 + this.uploadExcel(file);
227 + },
228 + selectLog() {
229 + this.$router.push({ name: 'GoodsUploadLog', params: { type: 2 } })
230 + },
231 + close() {
232 + this.open = false
233 + this.openStatus = ''
234 + this.selection(1)
235 + },
236 + resultClose() {
237 + this.resultOpen = false
238 + this.selection(1)
239 + }
240 + }
241 +}
242 +
243 +</script>
244 +
245 +<style lang="scss" scoped>
246 +
247 +</style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -100,13 +100,13 @@ export default { ...@@ -100,13 +100,13 @@ export default {
100 trigger: "change", 100 trigger: "change",
101 }, 101 },
102 ], 102 ],
103 - // file: [ 103 + file: [
104 - // { 104 + {
105 - // required: true, 105 + required: true,
106 - // message: "文件不能为空", 106 + message: "文件不能为空",
107 - // trigger: "change", 107 + trigger: "change",
108 - // }, 108 + },
109 - // ] 109 + ]
110 }, 110 },
111 fileList: [], 111 fileList: [],
112 errorData: [], 112 errorData: [],
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
126 //查询货站 126 //查询货站
127 getgoods() { 127 getgoods() {
128 this.goodsStationLoading = true 128 this.goodsStationLoading = true
129 - findStationName().then(res => { 129 + findStationName({ goodsType: 1 }).then(res => {
130 this.goodsStationLoading = false 130 this.goodsStationLoading = false
131 if (res.code === 200) { 131 if (res.code === 200) {
132 this.goodsStationList = res.data.list 132 this.goodsStationList = res.data.list
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
176 }, 176 },
177 //导入Excel 177 //导入Excel
178 upload() { 178 upload() {
179 - this.loading = true; 179 + this.loading = true
180 if (this.formData.file != null && this.formData.file != '') { 180 if (this.formData.file != null && this.formData.file != '') {
181 this.$refs['addForm'].validate(val => { 181 this.$refs['addForm'].validate(val => {
182 if (val) { 182 if (val) {
...@@ -211,17 +211,18 @@ export default { ...@@ -211,17 +211,18 @@ export default {
211 } 211 }
212 }) 212 })
213 } else { 213 } else {
214 - this.loading = false; 214 + this.loading = false
215 this.msgWarning('请选择文件后再导入!') 215 this.msgWarning('请选择文件后再导入!')
216 } 216 }
217 +
217 }, 218 },
218 //导出Excel 219 //导出Excel
219 download() { 220 download() {
220 this.$refs['addForm'].validate(val => { 221 this.$refs['addForm'].validate(val => {
221 if (val) { 222 if (val) {
222 this.downloading = true 223 this.downloading = true
223 - let data = { goodsStation: this.formData.goodsStation } 224 + let data = { goodsStation: this.formData.goodsStation, goodsType: 1 }
224 - downLoadXlsx("/goods/exportGoods", data, "货站表") 225 + downLoadXlsx("/goods/exportGoods", data, "白名单货站表")
225 .then(() => { 226 .then(() => {
226 this.downloading = false 227 this.downloading = false
227 this.close() 228 this.close()
......
...@@ -43,6 +43,7 @@ export default { ...@@ -43,6 +43,7 @@ export default {
43 methods: { 43 methods: {
44 //日志查询 44 //日志查询
45 selectLog(val) { 45 selectLog(val) {
46 + this.logTabelData = []
46 if (val === 1) { 47 if (val === 1) {
47 this.logData.page = 1 48 this.logData.page = 1
48 } 49 }
...@@ -50,8 +51,14 @@ export default { ...@@ -50,8 +51,14 @@ export default {
50 userImportLog(this.logData).then(res => { 51 userImportLog(this.logData).then(res => {
51 this.loading = false 52 this.loading = false
52 if (res.code === 200) { 53 if (res.code === 200) {
53 - this.logCount = res.data.total 54 + res.data.list.forEach(item => {
54 - this.logTabelData = res.data.list 55 + if (this.$route.params.type == 1 && item.module == '白名单导入') {
56 + this.logTabelData.push(item)
57 + } else if (this.$route.params.type == 2 && item.module == '黑名单导入') {
58 + this.logTabelData.push(item)
59 + }
60 + })
61 + this.logCount = this.logTabelData.length
55 } else { 62 } else {
56 this.msgWarning(res.msg) 63 this.msgWarning(res.msg)
57 } 64 }
......
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
32 </el-button> 32 </el-button>
33 <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px" 33 <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
34 @click="downloadExcel"> 34 @click="downloadExcel">
35 - 导出Excel 35 + 白名单导出
36 </el-button> 36 </el-button>
37 <el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel" 37 <el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
38 - v-hasPermi="['base:goodsStation:add']">导入Excel</el-button> 38 + v-hasPermi="['base:goodsStation:add']">白名单导入</el-button>
39 <el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志 39 <el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
40 </el-button> 40 </el-button>
41 </div> 41 </div>
...@@ -72,6 +72,7 @@ export default { ...@@ -72,6 +72,7 @@ export default {
72 selectionData: { 72 selectionData: {
73 goodsStation: '', 73 goodsStation: '',
74 goodsName: '', 74 goodsName: '',
75 + goodsType: 1,
75 size: 20, 76 size: 20,
76 page: 1 77 page: 1
77 }, 78 },
...@@ -198,7 +199,7 @@ export default { ...@@ -198,7 +199,7 @@ export default {
198 if (res) { 199 if (res) {
199 const blob = new Blob([res]); 200 const blob = new Blob([res]);
200 const link = document.createElement("a"); //创建a标签 201 const link = document.createElement("a"); //创建a标签
201 - link.download = '货物品名模板.xlsx'; //a标签添加属性 202 + link.download = '白名单货物品名模板.xlsx'; //a标签添加属性
202 link.style.display = "none"; 203 link.style.display = "none";
203 link.href = URL.createObjectURL(blob); 204 link.href = URL.createObjectURL(blob);
204 document.body.appendChild(link); 205 document.body.appendChild(link);
...@@ -225,7 +226,7 @@ export default { ...@@ -225,7 +226,7 @@ export default {
225 this.uploadExcel(file); 226 this.uploadExcel(file);
226 }, 227 },
227 selectLog() { 228 selectLog() {
228 - this.$router.push({ name: 'GoodsUploadLog' }) 229 + this.$router.push({ name: 'GoodsUploadLog', params: { type: 1 } })
229 }, 230 },
230 close() { 231 close() {
231 this.open = false 232 this.open = false
......
...@@ -147,6 +147,20 @@ ...@@ -147,6 +147,20 @@
147 </el-select> 147 </el-select>
148 </el-form-item> 148 </el-form-item>
149 </el-col> 149 </el-col>
150 + <el-col :span="6">
151 + <el-form-item label="预审状态">
152 + <el-select v-model="formData.preStatus" placeholder="不限" class="formItem" clearable multiple>
153 + <el-option v-for="item in findConditionData.preQualificationStatus" :label="item == '' ? '非预审' : item"
154 + :value="item"> </el-option>
155 + </el-select>
156 + </el-form-item>
157 + </el-col>
158 + <el-col :span="6">
159 + <el-form-item label="发件人账号">
160 + <el-input ref='userInfo' type="textarea" v-model="formData.shipperAccount" class="formItem"
161 + placeholder="请输入发件人账号(;间隔)" :rows="4" :maxlength="12000" clearable></el-input>
162 + </el-form-item>
163 + </el-col>
150 </el-row> 164 </el-row>
151 </el-col> 165 </el-col>
152 </el-row> 166 </el-row>
...@@ -156,23 +170,23 @@ ...@@ -156,23 +170,23 @@
156 <el-button v-hasPermi="['base:cargo:export']" icon="el-icon-download" 170 <el-button v-hasPermi="['base:cargo:export']" icon="el-icon-download"
157 :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="small" @click="xlse(0)" 171 :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="small" @click="xlse(0)"
158 :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{ 172 :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
159 - downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果" 173 + downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
160 }}</el-button> 174 }}</el-button>
161 <el-button v-hasPermi="['base:cargo:export']" icon="el-icon-download" 175 <el-button v-hasPermi="['base:cargo:export']" icon="el-icon-download"
162 :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="small" @click="xlse(1)" 176 :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="small" @click="xlse(1)"
163 :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{ 177 :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
164 - downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果" 178 + downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
165 }}</el-button> 179 }}</el-button>
166 <el-button type="primary" size="small" icon="el-icon-s-flag" :disabled="selectTable.length == 0" 180 <el-button type="primary" size="small" icon="el-icon-s-flag" :disabled="selectTable.length == 0"
167 v-hasPermi="['base:cargo:release']" @click="release">释放舱位</el-button> 181 v-hasPermi="['base:cargo:release']" @click="release">释放舱位</el-button>
168 <el-button type="primary" size="small" icon="el-icon-sort" :disabled="selectTable.length == 0" @click="transfer" 182 <el-button type="primary" size="small" icon="el-icon-sort" :disabled="selectTable.length == 0" @click="transfer"
169 v-hasPermi="['log:cargo:flightTransfer']">航班迁转</el-button> 183 v-hasPermi="['log:cargo:flightTransfer']">航班迁转</el-button>
170 - <!-- <el-button type="primary" size="small" :disabled="cargoPlaneTime == null || cargoPlaneTime.length <= 0" 184 + <el-button type="primary" size="small" :disabled="cargoPlaneTime == null || cargoPlaneTime.length <= 0"
171 @click="historyFlie" v-hasPermi="['log:cargo:archiveData']"> 185 @click="historyFlie" v-hasPermi="['log:cargo:archiveData']">
172 <el-tooltip class="item" effect="dark" content="请先选择配置航班日期" placement="top"> 186 <el-tooltip class="item" effect="dark" content="请先选择配置航班日期" placement="top">
173 <span class="el-icon-warning-outline">生成归档数据</span> 187 <span class="el-icon-warning-outline">生成归档数据</span>
174 </el-tooltip> 188 </el-tooltip>
175 - </el-button> --> 189 + </el-button>
176 <span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span> 190 <span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
177 <el-progress v-if="progress != 0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress" 191 <el-progress v-if="progress != 0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress"
178 :status="progress == 100 ? 'success' : 'warning'"></el-progress> 192 :status="progress == 100 ? 'success' : 'warning'"></el-progress>
...@@ -198,7 +212,7 @@ ...@@ -198,7 +212,7 @@
198 <template v-slot:waybillNo="scope"> 212 <template v-slot:waybillNo="scope">
199 <el-link type="primary" @click="logView(scope.row)"> 213 <el-link type="primary" @click="logView(scope.row)">
200 {{ 214 {{
201 - scope.row.waybillNo 215 + scope.row.waybillNo
202 }}<i class="el-icon-link"></i> </el-link> 216 }}<i class="el-icon-link"></i> </el-link>
203 </template> 217 </template>
204 </Tables> 218 </Tables>
...@@ -251,6 +265,7 @@ export default { ...@@ -251,6 +265,7 @@ export default {
251 typeId: null, 265 typeId: null,
252 statusId: null, 266 statusId: null,
253 serviceTypeId: null, 267 serviceTypeId: null,
268 + shipperAccount: null,
254 allocationTypeId: null, 269 allocationTypeId: null,
255 kindToAllocFlightId: null, 270 kindToAllocFlightId: null,
256 historyAllocaCargoTypeId: null, 271 historyAllocaCargoTypeId: null,
...@@ -261,6 +276,7 @@ export default { ...@@ -261,6 +276,7 @@ export default {
261 cargoPlaneStart: null, 276 cargoPlaneStart: null,
262 cargoPlaneEnd: null, 277 cargoPlaneEnd: null,
263 cargoPlaneRoute: null, 278 cargoPlaneRoute: null,
279 + preStatus: undefined,
264 limitStart: 1, 280 limitStart: 1,
265 limitSize: 100, 281 limitSize: 100,
266 }, //表单数据 282 }, //表单数据
...@@ -319,6 +335,7 @@ export default { ...@@ -319,6 +335,7 @@ export default {
319 tableData: [], //表格数据 335 tableData: [], //表格数据
320 cargoLog: {}, 336 cargoLog: {},
321 routeList: [], 337 routeList: [],
338 + preQualificationStatusList: [],
322 allWeight: 0,//总重量 339 allWeight: 0,//总重量
323 allQty: 0,//总件数 340 allQty: 0,//总件数
324 shiftKey: false, 341 shiftKey: false,
...@@ -352,13 +369,14 @@ export default { ...@@ -352,13 +369,14 @@ export default {
352 } else { 369 } else {
353 this.tableHeader = this.tableHeaders['cargo'] 370 this.tableHeader = this.tableHeaders['cargo']
354 } 371 }
355 - this.select(0) 372 + // this.select(0,'create')
356 }, 373 },
357 374
358 activated() { 375 activated() {
359 this.selectTable = [] 376 this.selectTable = []
360 this.cargoTotal() 377 this.cargoTotal()
361 if (this.$route.params.fltNo) { 378 if (this.$route.params.fltNo) {
379 + console.log(1)
362 //判断进入页面是否带参,确定是否是index跳转 380 //判断进入页面是否带参,确定是否是index跳转
363 this.formData = { 381 this.formData = {
364 fltDateStart: "", 382 fltDateStart: "",
...@@ -377,6 +395,8 @@ export default { ...@@ -377,6 +395,8 @@ export default {
377 typeId: null, 395 typeId: null,
378 statusId: null, 396 statusId: null,
379 serviceTypeId: null, 397 serviceTypeId: null,
398 + shipperAccount: null,
399 + shipperAccountList: null,
380 allocationTypeId: null, 400 allocationTypeId: null,
381 kindToAllocFlightId: null, 401 kindToAllocFlightId: null,
382 historyAllocaCargoTypeId: null, 402 historyAllocaCargoTypeId: null,
...@@ -389,20 +409,21 @@ export default { ...@@ -389,20 +409,21 @@ export default {
389 limitStart: 1, 409 limitStart: 1,
390 limitSize: 100, 410 limitSize: 100,
391 } 411 }
412 + console.log(this.$route)
392 this.cargoPlaneTime = [this.$route.params.fltDate, this.$route.params.fltDate] 413 this.cargoPlaneTime = [this.$route.params.fltDate, this.$route.params.fltDate]
393 this.formData.cargoPlaneStart = this.$route.params.fltDate 414 this.formData.cargoPlaneStart = this.$route.params.fltDate
394 this.formData.cargoPlaneEnd = this.$route.params.fltDate 415 this.formData.cargoPlaneEnd = this.$route.params.fltDate
395 this.formData.cargoPlaneNo = this.$route.params.fltNo 416 this.formData.cargoPlaneNo = this.$route.params.fltNo
396 this.formData.cargoPlaneRoute = this.$route.params.route 417 this.formData.cargoPlaneRoute = this.$route.params.route
397 - this.planeNoChange(this.formData.cargoPlaneNo) 418 + this.planeNoChange(this.formData.cargoPlaneNo.split(';'))
398 - this.select(0) 419 + this.select(0, 'activated')
399 } else { 420 } else {
400 //否则请求原页面缓存状态 421 //否则请求原页面缓存状态
401 if (this.$store.state.tagsView.cachedViews.length > 0) { 422 if (this.$store.state.tagsView.cachedViews.length > 0) {
402 this.$store.state.tagsView.cachedViews.forEach(item => { 423 this.$store.state.tagsView.cachedViews.forEach(item => {
403 if (item === 'QueryCargo') { 424 if (item === 'QueryCargo') {
404 this.findCondition() 425 this.findCondition()
405 - this.totalCount > 0 ? this.select() : '' 426 + this.select()
406 } 427 }
407 }) 428 })
408 } 429 }
...@@ -429,44 +450,46 @@ export default { ...@@ -429,44 +450,46 @@ export default {
429 watch: { 450 watch: {
430 $route: { 451 $route: {
431 handler(to, from) { 452 handler(to, from) {
432 - if (to.name === 'Index') { 453 + // if (to.name === 'Index') {
433 - this.formData = { 454 + // this.formData = {
434 - fltDateStart: "", 455 + // fltDateStart: "",
435 - fltDateEnd: "", 456 + // fltDateEnd: "",
436 - prematchFltDateStart: "", 457 + // prematchFltDateStart: "",
437 - prematchFltDateEnd: "", 458 + // prematchFltDateEnd: "",
438 - createTimeStart: null, 459 + // createTimeStart: null,
439 - createTimeEnd: null, 460 + // createTimeEnd: null,
440 - pickUpDate: null, 461 + // pickUpDate: null,
441 - hasFlight: null, 462 + // hasFlight: null,
442 - waybillNo: "", 463 + // waybillNo: "",
443 - siteName: "", 464 + // siteName: "",
444 - fltNo: "", 465 + // fltNo: "",
445 - mawbCode: "", 466 + // mawbCode: "",
446 - ursa: "", 467 + // ursa: "",
447 - typeId: null, 468 + // typeId: null,
448 - statusId: null, 469 + // statusId: null,
449 - serviceTypeId: null, 470 + // serviceTypeId: null,
450 - allocationTypeId: null, 471 + // shipperAccount: null,
451 - kindToAllocFlightId: null, 472 + // shipperAccountList: null,
452 - historyAllocaCargoTypeId: null, 473 + // allocationTypeId: null,
453 - dataSources: "", 474 + // kindToAllocFlightId: null,
454 - customsReceiptStatusId: null, 475 + // historyAllocaCargoTypeId: null,
455 - big: null, 476 + // dataSources: "",
456 - cargoPlaneNo: null, 477 + // customsReceiptStatusId: null,
457 - cargoPlaneStart: null, 478 + // big: null,
458 - cargoPlaneEnd: null, 479 + // cargoPlaneNo: null,
459 - limitStart: 1, 480 + // cargoPlaneStart: null,
460 - limitSize: 100, 481 + // cargoPlaneEnd: null,
461 - } 482 + // limitStart: 1,
462 - this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate] 483 + // limitSize: 100,
463 - this.formData.cargoPlaneStart = from.params.fltDate 484 + // }
464 - this.formData.cargoPlaneEnd = from.params.fltDate 485 + // this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate]
465 - this.formData.cargoPlaneNo = from.params.fltNo 486 + // this.formData.cargoPlaneStart = from.params.fltDate
466 - this.formData.cargoPlaneRoute = from.params.route 487 + // this.formData.cargoPlaneEnd = from.params.fltDate
467 - this.planeNoChange(this.formData.cargoPlaneNo) 488 + // this.formData.cargoPlaneNo = from.params.fltNo
468 - this.select(0) 489 + // this.formData.cargoPlaneRoute = from.params.route
469 - } 490 + // this.planeNoChange(this.formData.cargoPlaneNo)
491 + // this.select(0, 'watch')
492 + // }
470 } 493 }
471 }, 494 },
472 formShow(val, oldVal) { 495 formShow(val, oldVal) {
...@@ -488,7 +511,7 @@ export default { ...@@ -488,7 +511,7 @@ export default {
488 }); 511 });
489 }, 512 },
490 //查询 513 //查询
491 - async select(val) { 514 + async select(val, type) {
492 this.selectTable = [] 515 this.selectTable = []
493 this.tableData = []; 516 this.tableData = [];
494 this.allWeight = 0; 517 this.allWeight = 0;
...@@ -632,6 +655,12 @@ export default { ...@@ -632,6 +655,12 @@ export default {
632 if (this.formData.hasFlight == "") { 655 if (this.formData.hasFlight == "") {
633 this.formData.hasFlight = null 656 this.formData.hasFlight = null
634 } 657 }
658 + if (this.formData.shipperAccount != null && this.formData.shipperAccount != '') {
659 + this.formData.shipperAccountList = this.formData.shipperAccount.split(';')
660 + } else {
661 + this.formData.shipperAccountList = null
662 + }
663 +
635 this.formData.limitStart = this.limitStart; 664 this.formData.limitStart = this.limitStart;
636 this.formData.limitSize = 100; 665 this.formData.limitSize = 100;
637 }, 666 },
...@@ -667,7 +696,7 @@ export default { ...@@ -667,7 +696,7 @@ export default {
667 }, 696 },
668 //配载航班号获取航线 697 //配载航班号获取航线
669 planeNoChange(val) { 698 planeNoChange(val) {
670 - getFlightsRoutes(val.split(';')).then(res => { 699 + getFlightsRoutes(val).then(res => {
671 if (res.code === 200) { 700 if (res.code === 200) {
672 this.routeList = res.data 701 this.routeList = res.data
673 } else { 702 } else {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
30 </el-tooltip> 30 </el-tooltip>
31 </div> 31 </div>
32 </template> 32 </template>
33 - <el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0"> 33 + <el-select class="formItem" v-model="formData.route" placeholder="请选择航线" :disabled="routeList.length == 0">
34 <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index"> 34 <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index">
35 <Tooltips :content="item.route" :refName="item.route"></Tooltips> 35 <Tooltips :content="item.route" :refName="item.route"></Tooltips>
36 </el-option> 36 </el-option>
...@@ -67,7 +67,6 @@ export default { ...@@ -67,7 +67,6 @@ export default {
67 fltDate: undefined, 67 fltDate: undefined,
68 route: null, 68 route: null,
69 overweight: false, 69 overweight: false,
70 - notInWhite: false,
71 }, 70 },
72 cargoHeader: [ 71 cargoHeader: [
73 { name: "口岸代码", value: "portName", width: "" }, 72 { name: "口岸代码", value: "portName", width: "" },
......
1 +<template>
2 + <div style="margin: 20px">
3 + <el-form ref="selectForm" :model="formData" class="form-header" label-position="right" label-width="auto"
4 + size="small">
5 + <el-row :gutter="10">
6 + <el-col :span="6">
7 + <el-form-item label="航班号">
8 + <el-input type="text" v-model="formData.fltNo" placeholder="请输入航班号"></el-input>
9 + </el-form-item>
10 + </el-col>
11 + <el-col :span="6">
12 + <el-form-item label="地区">
13 + <el-input type="text" v-model="formData.area" placeholder="请输入地区"></el-input>
14 + </el-form-item>
15 + </el-col>
16 + <el-col :span="4">
17 + <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading"
18 + @click="selection(1)">
19 + 查询</el-button>
20 + </el-col>
21 + </el-row>
22 + <el-row>
23 + <el-col :span="20">
24 + <el-row>
25 + <el-col :span="6">
26 + <el-form-item label="生效日期" prop="beginDate" :rules="rules">
27 + <el-date-picker class="formItem" v-model="formData.beginDate" type="date"
28 + placeholder="选择日期" value-format="yyyy-MM-dd" clearable>
29 + </el-date-picker>
30 + </el-form-item>
31 + </el-col>
32 + <el-col :span="12">
33 + <el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
34 + :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList"
35 + accept=".xlsx" class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"
36 + :disabled="formData.beginDate == null">
37 + <el-button type="primary" icon="el-icon-upload2" size="small" @click="upload">导入Excel
38 + </el-button>
39 + </el-upload>
40 + </el-col>
41 + </el-row>
42 + </el-col>
43 + </el-row>
44 + </el-form>
45 + <div style="width:100%;display: flex;margin-bottom:10px">
46 + <!-- <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading" @click="selection(1)">
47 + 查询</el-button> -->
48 + <el-button type="primary" icon="el-icon-download" size="small" @click="downloadTempleate"
49 + v-hasPermi="['base:flightImport:exportExcel']">
50 + 下载模板
51 + </el-button>
52 + </div>
53 + <Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true'
54 + :height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"
55 + :totalCount="total" :loading="tableLoading" @currentChange="currentChange">">
56 + </Tables>
57 + </div>
58 +</template>
59 +
60 +<script>
61 +import {
62 + downLoadTemplate,
63 + importFlightDestination,
64 + searchFlightDestination
65 +} from "@/api/preMdeConfig";
66 +
67 +export default {
68 + name: "FlightToArea",
69 + data() {
70 + return {
71 + formData: {
72 + fltNo: null,
73 + area: null,
74 + beginDate: null,
75 + page: 1,
76 + },
77 + tableData: [],
78 + errorData: [],
79 + tableHeaders: this.tableHeaders['flightToArea'],
80 + tableHeight: null,
81 + total: 0,
82 + flightType: [],
83 + form: {
84 + type: "",
85 + region: "",
86 + },
87 + rules: {
88 + validator: (rule, value, callback) => {
89 + if (this.formData.beginDate == null) {
90 + callback(new Error('上传前请选择生效时间'))
91 + }
92 + },
93 + trigger: 'change'
94 + },
95 + fileList: [],
96 + tableLoading: false,
97 + };
98 + },
99 + created() {
100 + },
101 + mounted() {
102 + this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170
103 + this.selection(1)
104 + },
105 + activated() {
106 + },
107 + methods: {
108 + selection(val) {
109 + this.tableData = []
110 + this.tableLoading = true
111 + if (val === 1) {
112 + this.formData.page = 1
113 + }
114 + let obj = {
115 + fltNo: this.formData.fltNo,
116 + area: this.formData.area,
117 + page: this.formData.page,
118 + size: 20
119 + }
120 + if (obj.area == '') {
121 + obj.area = null
122 + }
123 + searchFlightDestination(obj).then(res => {
124 + this.tableLoading = false
125 + if (res.code === 200) {
126 + this.tableData = res.data.list
127 + this.total = res.data.total
128 + }
129 + }).catch(err => {
130 + this.tableLoading = false
131 + console.log(err)
132 + })
133 + },
134 + downloadTempleate() {
135 + let downloadType = "flightDestination";
136 + let fileName = "航班目的地模板.xlsx";
137 + downLoadTemplate(downloadType).then((res) => {
138 + if (res) {
139 + const blob = new Blob([res]);
140 + const link = document.createElement("a"); //创建a标签
141 + link.download = fileName; //a标签添加属性
142 + link.style.display = "none";
143 + link.href = URL.createObjectURL(blob);
144 + document.body.appendChild(link);
145 + link.click(); //执行下载
146 + URL.revokeObjectURL(link.href); //释放url
147 + document.body.removeChild(link); //释放标签
148 + } else {
149 + this.$message.error("下载失败");
150 + }
151 + });
152 + },
153 + uploadExcel(option) {
154 + //上传excel
155 + const file = option.file;
156 + importFlightDestination(file, this.formData.beginDate).then((res) => {
157 + if (res.data.code != 200) {
158 + if (res.data.code == 603) {
159 + this.$alert(res.msg, "提示", {
160 + confirmButtonText: "确定",
161 + type: "warning",
162 + });
163 + } else if (res.data.code === 201) {
164 + this.msgWarning(res.data.msg);
165 + this.errorData = res.data.data;
166 + this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightToArea' } })
167 + } else {
168 + this.msgWarning(res.data.msg);
169 + }
170 + } else {
171 + this.msgSuccess("导入成功");
172 + this.selection(1)
173 + }
174 + });
175 + },
176 + handleRemove(file, fileList) {
177 + //清掉上传的文件
178 + this.fileList = [];
179 + this.selection()
180 + },
181 + handleExceed(files) {
182 + //重复上传文件
183 + let file = {};
184 + file.file = files[0];
185 + file.name = files[0].name;
186 + this.fileList = [];
187 + this.fileList.push(file);
188 + this.uploadExcel(file);
189 + },
190 + currentChange(val) {
191 + this.formData.page = val.page
192 + this.selection()
193 + },
194 + upload() {
195 + this.$refs.selectForm.validateField('beginDate')
196 + }
197 + },
198 +};
199 +</script>
200 +<style rel="stylesheet/scss" lang="scss">
201 +.upload-demo {
202 + display: flex;
203 + margin-left: 10px;
204 + float: none !important;
205 +}
206 +
207 +.el-upload-list {
208 + display: inline-block;
209 + margin-left: 10px;
210 + vertical-align: top;
211 +}
212 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div>
3 + <el-form ref="preMdeSelectForm" class="form-header" label-position="right" label-width="auto" size="small"
4 + :model="formData">
5 + <el-row>
6 + <el-col :span="6">
7 + <el-form-item label="区域">
8 + <el-select class="formItem" v-model="formData.regionArray" filterable multiple clearable
9 + placeholder="不限">
10 + <el-option v-for="item in selectData.region" :label="item" :value="item" :key="item">
11 + </el-option>
12 + </el-select>
13 + </el-form-item>
14 + </el-col>
15 + <el-col :span="6">
16 + <el-form-item label="地区">
17 + <el-select class="formItem" v-model="formData.areaArray" filterable multiple clearable
18 + placeholder="不限">
19 + <el-option v-for="item in selectData.area" :label="item" :value="item" :key="item">
20 + </el-option>
21 + </el-select>
22 + </el-form-item>
23 + </el-col>
24 + <el-col :span="6">
25 + <el-form-item label="申报类别">
26 + <el-select class="formItem" v-model="formData.typeName" filterable clearable placeholder="不限">
27 + <el-option v-for="item in selectData.declarationCategory" :label="item.chineseName"
28 + :value="item.chineseName" :key="item.id">
29 + </el-option>
30 + </el-select>
31 + </el-form-item>
32 + </el-col>
33 + <el-col :span="6">
34 + <el-form-item label="服务类型">
35 + <el-select class="formItem" v-model="formData.serviceTypeArray" filterable clearable
36 + placeholder="不限">
37 + <el-option v-for="item in selectData.serviceType" :label="item.chineseName"
38 + :value="item.chineseName" :key="item.id">
39 + </el-option>
40 + </el-select>
41 + </el-form-item>
42 + </el-col>
43 + </el-row>
44 + <el-row>
45 + <el-col :span="6">
46 + <el-form-item label="运单号">
47 + <el-input type="textarea" v-model="formData.waybillNo" class="formItem"
48 + placeholder="请输入运单号(回车间隔)" :rows="4" :maxlength="12000" clearable></el-input>
49 + </el-form-item>
50 + </el-col>
51 + <el-col :span="6">
52 + <el-form-item label="URSA">
53 + <el-input type="textarea" v-model="formData.ursa" class="formItem" placeholder="S_;P_;E2"
54 + :rows="4" clearable>
55 + </el-input>
56 + </el-form-item>
57 + </el-col>
58 + <el-col :span="6">
59 + <el-form-item label="站点">
60 + <el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK"
61 + :rows="4" clearable>
62 + </el-input>
63 + </el-form-item>
64 + </el-col>
65 + <el-col :span="6">
66 + <el-form-item label="ACCS原航班日期">
67 + <el-date-picker class="formItem" type="daterange" v-model="accsDate" range-separator="至"
68 + start-placeholder="开始日期" end-placeholder="结束日期" :value-format="valueFormat" clearable>
69 + </el-date-picker>
70 + </el-form-item>
71 + </el-col>
72 + </el-row>
73 + <el-row>
74 + <el-col :span="6">
75 + <el-form-item label="ACCS原航班号">
76 + <el-input type="text" class="formItem" v-model="formData.flightNo" placeholder="请输入航班号"
77 + clearable>
78 + </el-input>
79 + </el-form-item>
80 + </el-col>
81 + <el-col :span="6">
82 + <el-form-item label="ACCS航线">
83 + <el-input type="text" class="formItem" v-model="formData.flightRoute" placeholder="请输入航线"
84 + clearable>
85 + </el-input>
86 + </el-form-item>
87 + </el-col>
88 + </el-row>
89 + </el-form>
90 + <div class="ml20 mb20">
91 + <el-button type="primary" icon="el-icon-search" size="small" :loading="tableLoading" @click="select(0)">查询
92 + </el-button>
93 + <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
94 + :loading="downloading" @click="downloadExcel" v-hasPermi="['base:preMde:export']">
95 + 导出全部查询结果
96 + </el-button>
97 + <span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
98 + </div>
99 + <Tables ref="preMdeSelectTables" ductName="preMdeSelect" :data="tableData" :headerData="tableHeader"
100 + :selection="false" :order="true" :totalCount="totalCount" :pageSizes="[100]" :loading="tableLoading"
101 + :limitSize="formData.size" :height="tableHeight" @currentChange="currentChange">
102 + </Tables>
103 + </div>
104 +</template>
105 +
106 +<script>
107 +import {
108 + findDmPreMdeData,
109 + findDmPreMdeCondition
110 +} from "@/api/preMdeConfig";
111 +import { downLoadXlsx } from "@/utils/zipdownload";
112 +
113 +export default {
114 + name: 'PreMdeSelect',
115 + data() {
116 + return {
117 + formData: {
118 + regionArray: [],
119 + areaArray: [],
120 + serviceTypeArray: null,
121 + page: 1,
122 + size: 100,
123 + },
124 + selectData: {
125 + serviceType: [],
126 + declarationCategory: [],
127 + region: [],
128 + area: []
129 + },
130 + tableData: [],
131 + tableHeader: this.tableHeaders['preMdeSelect'],
132 + accsDate: [],
133 + valueFormat: "yyyy-MM-dd",
134 + tableHeight: null,
135 + tableLoading: false,
136 + downloading: false,
137 + totalCount: 0,
138 + }
139 + },
140 + created() {
141 + this.selectOptionData()
142 + },
143 + mounted() {
144 + this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150
145 + this.select(0)
146 + },
147 + watch: {
148 + $route(to, from) {
149 + if (to.name == 'PreMdeSelect') {
150 + this.selection()
151 + }
152 + }
153 + },
154 + methods: {
155 + //查询条件
156 + selectOptionData() {
157 + findDmPreMdeCondition().then(res => {
158 + if (res.code == 200) {
159 + this.selectData = res.data
160 + } else {
161 + this.msgWarning(res.msg)
162 + }
163 + }).catch(err => {
164 + console.log(err)
165 + })
166 + },
167 + //查询
168 + select(val) {
169 + this.tableLoading = true
170 + let obj = JSON.parse(JSON.stringify(this.datainfo(this.formData)))
171 + if (this.accsDate != null && this.accsDate.length > 0) {
172 + obj.fltDateStart = this.accsDate[0]
173 + obj.fltDateEnd = this.accsDate[1]
174 + } else {
175 + obj.fltDateStart = null
176 + obj.fltDateEnd = null
177 + }
178 + findDmPreMdeData(obj).then(res => {
179 + this.tableLoading = false
180 + if (res.code == 200) {
181 + this.tableData = res.data.list
182 + this.totalCount = res.data.total
183 + } else {
184 + this.msgWarning(res.msg)
185 + }
186 + }).catch(err => {
187 + this.tableLoading = false
188 + console.log(err)
189 + })
190 + },
191 + //导出
192 + downloadExcel() {
193 + this.downloading = true
194 + let data = this.datainfo(this.formData)
195 + if (this.accsDate != null && this.accsDate.length > 0) {
196 + data.fltDateStart = this.accsDate[0]
197 + data.fltDateEnd = this.accsDate[1]
198 + } else {
199 + data.fltDateStart = null
200 + data.fltDateEnd = null
201 + }
202 + downLoadXlsx("/dmPreMde/excel", data, "Pre-MDE查询表")
203 + .then(() => {
204 + this.downloading = false
205 + })
206 + .catch(() => {
207 + this.downloading = false
208 + });
209 + },
210 + //数据处理
211 + datainfo(val) {
212 + if (val.ursa && val.ursa != null && val.ursa != '') {
213 + val.ursa = val.ursa.toUpperCase().replace(/;/g, ';')
214 + }
215 + if (val.siteName && val.siteName != null && val.siteName != '') {
216 + val.siteName = val.siteName.toUpperCase().replace(/;/g, ';')
217 + }
218 + if (val.flightNo && val.flightNo != null && val.flightNo != '') {
219 + val.flightNo = val.flightNo.toUpperCase()
220 + }
221 + if (val.flightRoute && val.flightRoute != null && val.flightRoute != '') {
222 + val.flightRoute = val.flightRoute.toUpperCase()
223 + }
224 + if (val.regionArray != null && val.regionArray.length == 0) {
225 + val.regionArray = null
226 + }
227 + if (val.areaArray != null && val.areaArray.length == 0) {
228 + val.areaArray = null
229 + }
230 + if (val.serviceTypeArray != null && val.serviceTypeArray.length == 0) {
231 + val.serviceTypeArray = null
232 + }
233 + return val
234 + },
235 + //翻页
236 + currentChange(val) {
237 + this.formData.page = val.page
238 + this.select()
239 + }
240 + }
241 +}
242 +</script>
243 +
244 +<style>
245 +
246 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div>
3 + <el-form ref="reportForm" class="form-header" :model="formData" label-position="right" label-width="auto"
4 + size="small">
5 + <el-row>
6 + <el-col :span="4">
7 + <el-form-item label="取件日期">
8 + <el-date-picker class="formItem" v-model="formData.pickUpDate" type="date" placeholder="选择日期"
9 + value-format="yyyy-MM-dd" clearable>
10 + </el-date-picker>
11 + </el-form-item>
12 + </el-col>
13 + <el-col :span="5">
14 + <el-form-item label="区域">
15 + <el-select v-model="formData.regionArray" class="formItem" filterable multiple clearable
16 + placeholder="不限">
17 + <el-option v-for="item in selectOptionList.region" :label="item" :value="item" :key="item">
18 + </el-option>
19 + </el-select>
20 + </el-form-item>
21 + </el-col>
22 + <el-col :span="5">
23 + <el-form-item label="地区">
24 + <el-select v-model="formData.areaArray" class="formItem" filterable multiple clearable
25 + placeholder="不限">
26 + <el-option v-for="item in selectOptionList.area" :label="item" :value="item" :key="item">
27 + </el-option>
28 + </el-select>
29 + </el-form-item>
30 + </el-col>
31 + <el-col :span="5">
32 + <el-form-item label="URSA">
33 + <el-select v-model="formData.ursas" class="formItem" filterable multiple clearable
34 + placeholder="不限">
35 + <el-option v-for="item in selectOptionList.ursaList" :label="item" :value="item"
36 + :key="item">
37 + </el-option>
38 + </el-select>
39 + </el-form-item>
40 + </el-col>
41 + <el-col :span="5">
42 + <el-form-item label="service type">
43 + <el-select v-model="formData.serviceTypeArray" class="formItem" filterable multiple clearable
44 + placeholder="不限">
45 + <el-option v-for="item in selectOptionList.serviceType" :label="item.chineseName"
46 + :value="item.chineseName" :key="item.id">
47 + </el-option>
48 + </el-select>
49 + </el-form-item>
50 + </el-col>
51 + </el-row>
52 + </el-form>
53 + <div class="ml20 mt20 mb20">
54 + <el-button type="primary" icon="el-icon-search" size="small" :loading="loading" @click="select(0)">查 询
55 + </el-button>
56 + </div>
57 + <div style="padding:10px">
58 + <el-form label-position="right" label-width="auto" size="small">
59 + <el-form-item label="坐标系切换">
60 + <el-radio-group v-model="formData.dimensionName" @change="typeChange">
61 + <el-radio label="region">区域</el-radio>
62 + <el-radio label="area">地区</el-radio>
63 + <el-radio label="ursa">URSA</el-radio>
64 + <el-radio label="serviceType">service type</el-radio>
65 + </el-radio-group>
66 + </el-form-item>
67 + </el-form>
68 + <div v-for="(item, index) in barChartData" :key="index">
69 + <Chart :className="'chart' + index.toString()" :chartData="item" height="350px"
70 + style="margin-bottom:10px" :loading="loading" />
71 + </div>
72 +
73 + </div>
74 + </div>
75 +</template>
76 +
77 +<script>
78 +import Chart from '@/components/echarts/echarts-series.vue'
79 +import { findDmPreMdeCondition, findPreMdeReport } from "@/api/preMdeConfig";
80 +
81 +export default {
82 + components: {
83 + Chart
84 + },
85 + data() {
86 + return {
87 + formData: {
88 + ursas: [],
89 + serviceTypeArray: [],
90 + regionArray: [],
91 + areaArray: [],
92 + pickUpDate: null,
93 + dimensionName: 'region',
94 + },
95 + tableHeader: this.tableHeaders['report'],
96 + barChartData: [],
97 + selectOptionList: {
98 + ursaList: ["A_", "B_", "C_", "D_", "E_", "F_", "G_", "H_", "I_", "J_", "K_", "L_", "M_", "N_", "O_", "P_", "Q_", "R_", "S_", "T_", "U_", 'V_', "W_", "X_", "Y_", "Z_", '1_', '2_', '3_', '4_', '5_', '6_', '7_', '8_', '9_'],
99 + serviceType: [],
100 + region: [],
101 + area: [],
102 + },
103 + tableHeight: null,
104 + totalCount: 10,
105 + loading: false
106 + }
107 + },
108 + created() {
109 + this.formData.pickUpDate = this.nowDate()
110 + this.getOption()
111 + this.select()
112 + },
113 + activated() {
114 + this.select()
115 + },
116 + mounted() {
117 + this.tableHeight = window.innerHeight - this.$refs.reportForm.$el.offsetHeight - 240
118 + },
119 + methods: {
120 + getOption() {
121 + findDmPreMdeCondition().then(res => {
122 + if (res.code === 200) {
123 + this.selectOptionList.serviceType = res.data.serviceType
124 + this.selectOptionList.region = res.data.region
125 + this.selectOptionList.area = res.data.area
126 + } else {
127 + this.msgWarning(res.msg)
128 + }
129 + }).catch(err => {
130 + console.log(err)
131 + })
132 + },
133 + select(val) {
134 + this.loading = true
135 + let obj = {}
136 + if (this.formData.ursas.length > 0) {
137 + obj.ursas = this.formData.ursas
138 + } else {
139 + obj.ursas = null
140 + }
141 + if (this.formData.serviceTypeArray.length > 0) {
142 + obj.serviceTypeArray = this.formData.serviceTypeArray
143 + } else {
144 + obj.serviceTypeArray = null
145 + }
146 + if (this.formData.regionArray.length > 0) {
147 + obj.regionArray = this.formData.regionArray
148 + } else {
149 + obj.regionArray = null
150 + }
151 + if (this.formData.areaArray.length > 0) {
152 + obj.areaArray = this.formData.areaArray
153 + } else {
154 + obj.areaArray = null
155 + }
156 + obj.pickUpDate = this.formData.pickUpDate
157 + obj.dimensionName = this.formData.dimensionName
158 + findPreMdeReport(obj).then(res => {
159 + this.loading = false
160 + if (res.code === 200) {
161 + if (res.data.dimensionList && res.data.dimensionList.length > 0) {
162 + this.dataHandle(res.data.dimensionList, 8)
163 + } else {
164 + this.msgWarning('未查询到数据')
165 + }
166 + } else {
167 + this.msgWarning(res.msg)
168 + }
169 + }).catch(err => {
170 + this.loading = false
171 + console.log(err)
172 + })
173 + },
174 + typeChange(val) {
175 + this.select()
176 + },
177 + dataHandle(val, num) {
178 + this.barChartData = []
179 + let obj = {
180 + names: [],
181 + data1: [],
182 + data2: [],
183 + data3: []
184 + }
185 + val.forEach(item => {
186 + obj.names.push(item.name)
187 + obj.data1.push(item.totalPcs)
188 + obj.data2.push(item.total)
189 + obj.data3.push(item.totalWeight)
190 + })
191 + this.arrList(obj.names, num).forEach((item, index) => {
192 + let objItem = {
193 + names: [],
194 + data1: [],
195 + data2: [],
196 + data3: [],
197 + }
198 + objItem.names = item
199 + objItem.data1 = this.arrList(obj.data1, num)[index]
200 + objItem.data2 = this.arrList(obj.data2, num)[index]
201 + objItem.data3 = this.arrList(obj.data3, num)[index]
202 + this.barChartData.push(objItem)
203 + })
204 + },
205 + arrList(list, last) {
206 + let index = 0
207 + let arr = []
208 + if (list.length < last) {
209 + arr.push(list)
210 + } else {
211 + while (index < list.length) {
212 + arr.push(list.slice(index, index += last))
213 + index++
214 + }
215 + }
216 + return arr
217 + },
218 + currentChange(val) {
219 + this.formData.page = val.page
220 + this.select()
221 + }
222 + }
223 +
224 +}
225 +</script>
226 +
227 +<style>
228 +
229 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div style="margin: 20px">
3 + <el-form ref="selectForm" :model="formData" class="form-header" label-position="right" label-width="auto"
4 + size="small">
5 + <el-row :gutter="10">
6 + <el-col :span="6">
7 + <el-form-item label="URSA">
8 + <el-input type="textarea" v-model="formData.ursa" placeholder="URSA之间用分号分隔,例:F2;F3;P_" rows="2">
9 + </el-input>
10 + </el-form-item>
11 + </el-col>
12 + <el-col :span="6">
13 + <el-form-item label="地区">
14 + <el-input type="text" v-model="formData.area" placeholder="请输入地区"></el-input>
15 + </el-form-item>
16 + </el-col>
17 + <el-col :span="4">
18 + <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading"
19 + @click="selection(1)">
20 + 查询</el-button>
21 + </el-col>
22 + </el-row>
23 + <el-row>
24 + <el-col :span="20">
25 + <el-row>
26 + <el-col :span="6">
27 + <el-form-item label="生效日期" prop="beginDate" :rules="rules">
28 + <el-date-picker class="formItem" v-model="formData.beginDate" type="date"
29 + placeholder="选择日期" value-format="yyyy-MM-dd" clearable>
30 + </el-date-picker>
31 + </el-form-item>
32 + </el-col>
33 + <el-col :span="12">
34 + <el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
35 + :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList"
36 + accept=".xlsx" class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"
37 + :disabled="formData.beginDate == null">
38 + <el-button type="primary" icon="el-icon-upload2" size="small" @click="upload">导入Excel
39 + </el-button>
40 + </el-upload>
41 + </el-col>
42 + </el-row>
43 + </el-col>
44 + </el-row>
45 + </el-form>
46 + <div style="width:100%;display: flex;margin-bottom:10px">
47 + <!-- <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading" @click="selection(1)">
48 + 查询</el-button> -->
49 + <el-button type="primary" icon="el-icon-download" size="small" @click="downloadTempleate"
50 + v-hasPermi="['base:flightImport:exportExcel']">
51 + 下载模板
52 + </el-button>
53 + </div>
54 + <Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true'
55 + :height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"
56 + :totalCount="total" :loading="tableLoading" @currentChange="currentChange"
57 + layout="total,prev, pager, next, jumper, ->">
58 + </Tables>
59 + </div>
60 +</template>
61 +
62 +<script>
63 +import {
64 + downLoadTemplate,
65 + importUrsaDestination,
66 + searchUrsaDestination
67 +} from "@/api/preMdeConfig";
68 +
69 +export default {
70 + name: "UrsaToArea",
71 + data() {
72 + return {
73 + formData: {
74 + ursa: null,
75 + area: null,
76 + page: 1,
77 + },
78 + tableData: [],
79 + errorData: [],
80 + tableHeaders: this.tableHeaders['ursaToArea'],
81 + tableHeight: null,
82 + total: 0,
83 + flightType: [],
84 + form: {
85 + type: "",
86 + region: "",
87 + },
88 + rules: {
89 + validator: (rule, value, callback) => {
90 + if (this.formData.beginDate == null) {
91 + callback(new Error('上传前请选择生效时间'))
92 + }
93 + },
94 + trigger: 'change'
95 + },
96 + fileList: [],
97 + tableLoading: false,
98 + };
99 + },
100 + created() {
101 + },
102 + mounted() {
103 + this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170
104 + this.selection(1)
105 + },
106 + activated() {
107 + },
108 + methods: {
109 + selection(val) {
110 + this.tableData = []
111 + this.tableLoading = true
112 + if (val === 1) {
113 + this.formData.page = 1
114 + }
115 + let obj = {
116 + area: this.formData.area,
117 + page: this.formData.page,
118 + size: 20
119 + }
120 + if (this.formData.ursa && this.formData.ursa != null && this.formData.ursa != '') {
121 + obj.ursa = this.formData.ursa.split(';')
122 + } else {
123 + obj.ursa = null
124 + }
125 + if (obj.area == '') {
126 + obj.area = null
127 + }
128 + searchUrsaDestination(obj).then(res => {
129 + this.tableLoading = false
130 + if (res.code === 200) {
131 + this.tableData = res.data.list
132 + this.total = res.data.total
133 + } else {
134 + this.msgWarning(res.msg)
135 + }
136 + }).catch(err => {
137 + this.tableLoading = false
138 + console.log(err)
139 + })
140 + },
141 + downloadTempleate() {
142 + let downloadType = "ursaDestination";
143 + let fileName = "URSA目的地模板.xlsx";
144 + downLoadTemplate(downloadType).then((res) => {
145 + if (res) {
146 + const blob = new Blob([res]);
147 + const link = document.createElement("a"); //创建a标签
148 + link.download = fileName; //a标签添加属性
149 + link.style.display = "none";
150 + link.href = URL.createObjectURL(blob);
151 + document.body.appendChild(link);
152 + link.click(); //执行下载
153 + URL.revokeObjectURL(link.href); //释放url
154 + document.body.removeChild(link); //释放标签
155 + } else {
156 + this.$message.error("下载失败");
157 + }
158 + });
159 + },
160 + uploadExcel(option) {
161 + //上传excel
162 + const file = option.file;
163 + importUrsaDestination(file, this.formData.beginDate).then((res) => {
164 + if (res.data.code != 200) {
165 + if (res.data.code == 603) {
166 + this.$alert(res.data.msg, "提示", {
167 + confirmButtonText: "确定",
168 + type: "warning",
169 + });
170 + } else if (res.data.code === 201) {
171 + this.msgWarning(res.data.msg);
172 + this.errorData = res.data.data;
173 + this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
174 + } else {
175 + this.msgWarning(res.data.msg);
176 + }
177 + } else {
178 + this.msgSuccess("导入成功");
179 + this.selection(1)
180 + }
181 + });
182 + },
183 + handleRemove(file, fileList) {
184 + //清掉上传的文件
185 + this.fileList = [];
186 + this.selection()
187 + },
188 + handleExceed(files) {
189 + //重复上传文件
190 + let file = {};
191 + file.file = files[0];
192 + file.name = files[0].name;
193 + this.fileList = [];
194 + this.fileList.push(file);
195 + this.uploadExcel(file);
196 + },
197 + currentChange(val) {
198 + this.formData.page = val.page
199 + this.selection()
200 + },
201 + upload() {
202 + this.$refs.selectForm.validateField('beginDate')
203 + }
204 + },
205 +};
206 +</script>
207 +<style rel="stylesheet/scss" lang="scss">
208 +.upload-demo {
209 + display: flex;
210 + margin-left: 10px;
211 + float: none !important;
212 +}
213 +
214 +.el-upload-list {
215 + display: inline-block;
216 + margin-left: 10px;
217 + vertical-align: top;
218 +}
219 +</style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
33 <el-input type="text" v-model="newDictionary.route" placeholder="请输入航线" maxlength="40"> 33 <el-input type="text" v-model="newDictionary.route" placeholder="请输入航线" maxlength="40">
34 </el-input> 34 </el-input>
35 </el-form-item> 35 </el-form-item>
36 + <el-form-item>
37 + <div style="color:#ff4949;line-height: 30px;">注意:此处不能添加虚拟航班!</div>
38 + </el-form-item>
36 </div> 39 </div>
37 <div v-else-if="status == 'sort'"> 40 <div v-else-if="status == 'sort'">
38 <el-form-item label="航班号" prop="fltNo"> 41 <el-form-item label="航班号" prop="fltNo">
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
30 <el-col :span="12"> 30 <el-col :span="12">
31 <el-form-item label="航线" prop="flightRoute"> 31 <el-form-item label="航线" prop="flightRoute">
32 <el-select class="formItem" v-model="formData.flightRoute" placeholder="未设置" 32 <el-select class="formItem" v-model="formData.flightRoute" placeholder="未设置"
33 - :disabled="routeList.length == 0 || disabled" @change="routeChange"> 33 + :loading="routeLoading" :disabled="routeList.length == 0 || disabled"
34 + @change="routeChange">
34 <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" 35 <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route"
35 :key="item.id"> 36 :key="item.id">
36 <Tooltips :content="item.route" :refName="item.route"></Tooltips> 37 <Tooltips :content="item.route" :refName="item.route"></Tooltips>
...@@ -193,6 +194,7 @@ export default { ...@@ -193,6 +194,7 @@ export default {
193 }, 194 },
194 title: '', 195 title: '',
195 loading: false, 196 loading: false,
197 + routeLoading: false,
196 disabled: false 198 disabled: false
197 } 199 }
198 }, 200 },
...@@ -237,6 +239,7 @@ export default { ...@@ -237,6 +239,7 @@ export default {
237 //获取航线 239 //获取航线
238 getRoute(val) { 240 getRoute(val) {
239 this.routeList = [] 241 this.routeList = []
242 + this.routeLoading = true
240 if (val != 1) { 243 if (val != 1) {
241 this.formData.flightRoute = null 244 this.formData.flightRoute = null
242 } 245 }
...@@ -246,6 +249,7 @@ export default { ...@@ -246,6 +249,7 @@ export default {
246 fltDate: this.formData.flightDate 249 fltDate: this.formData.flightDate
247 } 250 }
248 findFlightRoute(obj).then(res => { 251 findFlightRoute(obj).then(res => {
252 + this.routeLoading = false
249 if (res.code === 200) { 253 if (res.code === 200) {
250 this.routeList = res.data 254 this.routeList = res.data
251 } else { 255 } else {
...@@ -253,6 +257,7 @@ export default { ...@@ -253,6 +257,7 @@ export default {
253 } 257 }
254 this.$refs['superAllocationForm'].clearValidate('flightRoute') 258 this.$refs['superAllocationForm'].clearValidate('flightRoute')
255 }).catch(err => { 259 }).catch(err => {
260 + this.routeLoading = false
256 console.log(err) 261 console.log(err)
257 }) 262 })
258 }, 263 },
......
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
178 cancelButtonText: '取消', 178 cancelButtonText: '取消',
179 type: "warning", 179 type: "warning",
180 }).then(() => { 180 }).then(() => {
181 - this.statusChange({ id: val.id, status: status, tip: tip }) 181 + this.statusChange({ id: val.id, status: status })
182 }).catch(() => { }) 182 }).catch(() => { })
183 } else { 183 } else {
184 this.msgWarning(res.msg) 184 this.msgWarning(res.msg)
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
192 cancelButtonText: '取消', 192 cancelButtonText: '取消',
193 type: "warning", 193 type: "warning",
194 }).then(() => { 194 }).then(() => {
195 - this.statusChange({ id: val.id, status: status, tip: tip }) 195 + this.statusChange({ id: val.id, status: status })
196 }).catch(() => { }) 196 }).catch(() => { })
197 } 197 }
198 }, 198 },
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
36 </el-button> 36 </el-button>
37 </div> 37 </div>
38 <Tables ref="operationLogTables" ductName="operationLogTables" :order="true" :border='false' :data="data" 38 <Tables ref="operationLogTables" ductName="operationLogTables" :order="true" :border='false' :data="data"
39 - :headerData="tableHeader" tableAlign="center" :showOverflowTooltip="true" :height="tableHeight" 39 + :headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false" :height="tableHeight"
40 :page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total" 40 :page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total"
41 :loading="loading" @currentChange="currentChange"> 41 :loading="loading" @currentChange="currentChange">
42 <template v-slot:result="scope"> 42 <template v-slot:result="scope">
...@@ -48,14 +48,17 @@ ...@@ -48,14 +48,17 @@
48 </span> 48 </span>
49 </template> 49 </template>
50 <template v-slot:remark="scope"> 50 <template v-slot:remark="scope">
51 - <el-popover placement="top" width="400" trigger="hover" 51 + <!-- <el-popover placement="top" width="400" trigger="hover"
52 v-if="scope.row.remark != null && scope.row.remark != ''"> 52 v-if="scope.row.remark != null && scope.row.remark != ''">
53 <ul style="height:300px;overflow-y:scroll;"> 53 <ul style="height:300px;overflow-y:scroll;">
54 <li v-for="(item, index) in scope.row.remark.split('\n')" :key="index" 54 <li v-for="(item, index) in scope.row.remark.split('\n')" :key="index"
55 style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li> 55 style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li>
56 </ul> 56 </ul>
57 <el-button type="text" slot="reference">查 看</el-button> 57 <el-button type="text" slot="reference">查 看</el-button>
58 - </el-popover> 58 + </el-popover> -->
59 + <div>
60 + {{ scope.row.remark }}
61 + </div>
59 </template> 62 </template>
60 <template v-slot:requestParameters="scope"> 63 <template v-slot:requestParameters="scope">
61 <el-popover placement="top" width="400" trigger="hover" 64 <el-popover placement="top" width="400" trigger="hover"
......