jinhui.wang

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

Showing 39 changed files with 1831 additions and 180 deletions
......@@ -86,3 +86,15 @@ export function updateWhiteListSwitchBatch(data) {
})
}
//黑名单自动配舱开关
/**
* @param updateIds idList *
* @param status 状态 * 1开 0关
*/
export function updateBlackListSwitchBatch(data) {
return request({
url: '/FlightPreserveController/updateBlackListSwitchBatch',
method: 'post',
data: data
})
}
......
......@@ -41,6 +41,7 @@ export function batchDeleteGoods(data) {
/**
* @param page * 页数
* @param size * 页长
* @param goodsType 查询状态 1白名单 2黑名单 默认查询白名单
* @param goodsStation 货站名
*/
export function searchGoods(data) {
......@@ -54,14 +55,15 @@ export function searchGoods(data) {
//查询货站
/**
*/
export function findStationName() {
export function findStationName(data) {
return request({
url: '/goods/findStationName',
method: 'post',
data: data
})
}
//批量导入
//白名单批量导入
export function uploadGoodsExcel(file, goodsStation) {
let formData = new FormData();
formData.append("file", file);
......@@ -85,3 +87,28 @@ export function userImportLog(data) {
data: data
})
}
//黑名单上传excel
export function uploadGoodsBlackExce(file, goodsStation) {
let formData = new FormData();
formData.append("file", file);
formData.append("goodsStation", goodsStation);
return request({
url: '/goods/uploadGoodsBlackExcel',
method: 'post',
data: formData
})
}
//批量添加黑名单
/**
* @param goodsStation * 货站名
* @param goodsList * 货品名list
*/
export function batchAddBlackGoods(data) {
return request({
url: '/goods/batchAddBlackGoods',
method: 'post',
data: data
})
}
\ No newline at end of file
......
......@@ -81,3 +81,15 @@ export function findArchiveCargoLog(data) {
data: data
})
}
//查询归档文件是否可下载
/**
* @param object 查询结果集行数据
*/
export function isExistZip(data) {
return request({
url: '/archiveCargoLog/isExistZip',
method: 'post',
data: data
})
}
\ No newline at end of file
......
This diff could not be displayed because it is too large.
......@@ -67,6 +67,11 @@ let ductLabels = {
"1": "开启",
"0": "关闭",
null: '关闭'
},
"blackListSwitch": {
"1": "开启",
"0": "关闭",
null: '开启'
}
},
"flightRand": {//航班顺位设置
......
......@@ -427,7 +427,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "航线",
columnChineseName: "当前配载航线",
columnName: "flightRoute",
columnWidth: "140",
status: 1
......@@ -527,6 +527,12 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "黑名单是否自动配舱",
columnName: "blackListSwitch",
columnWidth: "160",
status: 1
},
{
columnChineseName: "总重量",
columnName: "totalWeight",
columnWidth: "90",
......@@ -2106,6 +2112,13 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "导入来源",
columnName: "module",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "货站名称",
columnName: "ext",
columnWidth: "",
......@@ -2196,7 +2209,7 @@ let tableHeaders = {
{
columnChineseName: "备注",
columnName: "remark",
columnWidth: "100",
columnWidth: "500",
ext1: "slot",
status: 1
},
......
......@@ -293,3 +293,18 @@ body {
.el-select-dropdown {
max-width: 300px;
}
.backgroundCollapse {
.el-collapse-item__header {
background-color: #d9ecff !important;
border-bottom: 1px solid #ccc;
}
}
.numberInput {
width: 100% !important;
}
.el-select-dropdown__wrap {
max-height: 350px !important;
}
\ No newline at end of file
......
......@@ -81,8 +81,7 @@ export default {
<style lang="scss" scoped>
.container {
max-width: 350px;
min-height: 32px;
max-height: 150px;
height: 150px;
overflow-y: scroll;
padding: 0;
border: 1px solid #ccc;
......
<template>
<div>
<el-button v-if="buttonShow" class="mt5" size="mini" icon="el-icon-edit-outline" circle @click="visibleOpen">
<el-button v-if="buttonShow" class="mt5" size="mini" style="color:#1890ff" icon="el-icon-edit-outline" circle
@click="visibleOpen">
</el-button>
<el-dialog title="表格显示设置" :visible.sync="open" width="40%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
......
<template>
<div style="padding:10px;" v-loading="loading">
<canvas :class="className" :style="{
height: height, width: width
}"></canvas>
</div>
</template>
<script>
import Chart from '../../assets/languages/chart.js'
export default {
name: '',
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: "350px"
},
chartData: {
type: Object,
required: true
},
loading: {
type: Boolean,
default: false
}
},
data() {
return {
chart: null,
padding: "10px"
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
watch: {
chartData: {
deep: true,
handler(val) {
this.chartUpdata()
}
}
},
methods: {
initChart() {
let ctx = document.getElementsByClassName(this.className)
this.chart = new Chart(ctx, this.setOptions(this.chartData))
},
setOptions({ names, data1, data2, data3 }) {
// let setOption = ({
// tooltip: {
// trigger: 'axis',
// axisPointer: { // 坐标轴指示器,坐标轴触发有效
// type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
// }
// },
// legend: {
// show: true
// },
// dataZoom: [
// {
// type: 'inside',
// xAxisIndex: [0],
// },
// {
// type: 'slider',
// show: true,
// start: 0,
// end: 85,
// handleSize: 8
// },
// ],
// grid: {
// top: '15%',
// left: '2%',
// right: '2%',
// containLabel: true
// },
// xAxis: [{
// type: 'category',
// data: names,
// axisTick: {
// alignWithLabel: true
// }
// }],
// yAxis: [{
// type: 'value',
// axisTick: {
// show: false
// }
// }],
// series: [{
// name: '件数',
// type: 'bar',
// data: data1,
// barWidth: '10%',
// barGap: '0%',
// label: {
// show: true,
// position: 'top',
// fontSize: 14
// },
// animationDuration: 1000
// },
// {
// name: '票数',
// type: 'bar',
// data: data2,
// barWidth: '10%',
// barGap: '0%',
// label: {
// show: true,
// position: 'top',
// fontSize: 14
// },
// animationDuration: 1000
// },
// {
// name: '重量',
// type: 'bar',
// data: data3,
// barWidth: '10%',
// barGap: '0%',
// label: {
// show: true,
// position: 'top',
// fontSize: 14
// },
// animationDuration: 1000
// }]
// })
let setOption = {
type: 'bar',
data: {
labels: names,
datasets: [{
label: '件数',
data: data1,
backgroundColor: 'rgba(255, 99, 132, 1)',
stack: 'group1'
},
{
label: '票数',
data: data2,
backgroundColor: 'rgba(153, 102, 255, 1)',
stack: 'group2'
},
{
label: '重量',
data: data3,
backgroundColor: 'rgba(255, 205, 86, 1)',
stack: 'group3'
}]
},
options: {
events: [''],
hover: {
intersect: false,
animationDuration: 0
},
animation: {
duration: 500,
onComplete: (val) => {
let ctx = val.chart.ctx
ctx.textAlign = 'center';
ctx.textBaseline = 'bottom';
ctx.font = '14px \"Helvetica Neue\", Helvetica, Arial, sans-serif'
val.chart.data.datasets.forEach((dataset, i) => {
if (val.chart.isDatasetVisible(i)) {
var meta = val.chart.getDatasetMeta(i);
meta.data.forEach(function (bar, index) {
var data = dataset.data[index];
ctx.fillText(data, bar.x, bar.y - 5);
});
}
});
}
},
legend: {
display: true
},
tooltips: {
enabled: false,
},
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
}
return setOption
},
chartUpdata() {
this.chart.data = {
labels: this.chartData.names,
datasets: [{
label: '件数',
data: this.chartData.data1,
backgroundColor: 'rgba(255, 99, 132, 1)',
stack: 'group1'
},
{
label: '票数',
data: this.chartData.data2,
backgroundColor: 'rgba(153, 102, 255, 1)',
stack: 'group2'
},
{
label: '重量',
data: this.chartData.data3,
backgroundColor: 'rgba(255, 205, 86, 1)',
stack: 'group3'
}]
}
this.chart.update()
}
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.destroy()
this.chart = null
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -3,9 +3,9 @@
* Copyright (c) 2019 FedEx
*/
import store from '@/store'
import store from '@/store'
export default {
export default {
inserted(el, binding, vnode) {
const { value } = binding
const all_permission = "*:*:*";
......@@ -42,5 +42,4 @@
});
return newRouter
}
}
\ No newline at end of file
}
......
<template>
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }">
<div class="sidebar-logo-container" :class="{ 'collapse': collapse }"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }">
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1>
<h1 v-else class="sidebar-title"
:style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title
}} </h1>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1>
<h1 class="sidebar-title"
:style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title
}} </h1>
</router-link>
</transition>
</div>
......@@ -16,6 +21,8 @@
<script>
import logoImg from '@/assets/logo/logo.png'
import variables from '@/assets/styles/variables.scss'
import { createDecipheriv } from 'crypto';
import { mapState } from 'vuex'
export default {
name: 'SidebarLogo',
......@@ -26,6 +33,9 @@ export default {
}
},
computed: {
...mapState({
sidebar: state => state.app.sidebar,
}),
variables() {
return variables;
},
......@@ -36,9 +46,16 @@ export default {
data() {
return {
title: 'IMAC管理系统',
logo: logoImg
}
logo: logoImg,
logoClassName: 'sidebar-logo'
}
},
created() {
this.logoClassName = localStorage.getItem('logoName')
},
updated() {
this.logoClassName = localStorage.getItem('logoName')
},
}
</script>
......@@ -66,7 +83,7 @@ export default {
width: 100%;
& .sidebar-logo {
//width: 32px;
width: auto;
height: 32px;
vertical-align: middle;
margin-right: 12px;
......@@ -82,6 +99,13 @@ export default {
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
vertical-align: middle;
}
& .sidebar-logo-mini {
width: auto;
height: 24px;
vertical-align: middle;
margin-right: 12px;
}
}
&.collapse {
......
<template>
<div
:class="{ 'has-logo': showLogo }"
:style="{
<div :class="{ 'has-logo': showLogo }" :style="{
backgroundColor:
settings.sideTheme === 'theme-dark'
? variables.menuBg
: variables.menuLightBg,
}"
>
}">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="
<el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="
settings.sideTheme === 'theme-dark'
? variables.menuBg
: variables.menuLightBg
"
:text-color="
" :text-color="
settings.sideTheme === 'theme-dark'
? variables.menuText
: 'rgba(0,0,0,.65)'
"
:unique-opened="true"
:active-text-color="settings.theme"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path"
/>
" :unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical">
<sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route"
:base-path="route.path" />
</el-menu>
<div class="version">{{ version }}</div>
</el-scrollbar>
......
<template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<sidebar class="sidebar-container" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{hasTagsView:needTagsView}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{ hasTagsView: needTagsView }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div>
<app-main />
<right-panel v-if="showSettings">
<right-panel v-if="false">
<settings />
</right-panel>
</div>
......@@ -64,10 +65,10 @@ export default {
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.app-wrapper {
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
......@@ -77,9 +78,9 @@ export default {
position: fixed;
top: 0;
}
}
}
.drawer-bg {
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
......@@ -87,22 +88,22 @@ export default {
height: 100%;
position: absolute;
z-index: 999;
}
}
.fixed-header {
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$sideBarWidth});
transition: width 0.28s;
}
}
.hideSidebar .fixed-header {
.hideSidebar .fixed-header {
width: calc(100% - 54px)
}
}
.mobile .fixed-header {
.mobile .fixed-header {
width: 100%;
}
}
</style>
......
......@@ -73,7 +73,7 @@ export const constantRoutes = [
hidden: true,
children: [
{
path: '/info/:handle/:id|:routeStatus|:fltNo|:route|:fltDate|:status',
path: '/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status',
component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
name: 'FlightAllocConfigInfo',
meta: { title: '航班配舱', icon: 'user' }
......@@ -91,7 +91,7 @@ export const constantRoutes = [
meta: { title: '错误信息提示', icon: 'user' }
},
{
path: '/goodsLog',
path: '/goodsLog/type=:type',
component: (resolve) => require(['@/views/basicInformation/goodsStation/goodsUploadLog'], resolve),
name: 'GoodsUploadLog',
meta: { title: '导入日志', icon: 'user' }
......
......@@ -42,7 +42,8 @@ module.exports = {
/**
* logout
*/
logoutURL: 'https://test-myapps.secure.fedex.com/purpleid/signout/',
logoutURL: 'https://test-myapps.secure.fedex.com/L2/iMAC/',//uat
// logoutURL: 'https://myapps.secure.fedex.com/iMAC/',//生产
/**
* 后端接口
......@@ -58,5 +59,5 @@ module.exports = {
/**
* 版本号
*/
version: 'version:1.9.0'
version: 'version:2.0.0'
}
......
......@@ -7,6 +7,7 @@ const getters = {
token: state => state.user.token,
avatar: state => state.user.avatar,
name: state => state.user.name,
id: state => state.user.id,
activePortName: state => state.user.activePortName,
portName: state => state.user.portName,
introduction: state => state.user.introduction,
......
......@@ -18,7 +18,7 @@ const mutations = {
//Cookies.set('sidebarStatus', 1)
localStorage.setItem('sidebarStatus', 1)
} else {
Cookies.set('sidebarStatus', 0)
// Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
}
},
......
......@@ -6,7 +6,7 @@ const mimeMap = {
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
zip: 'application/zip'
}
const baseUrl = settings.downLoadURL //uat服务器
const baseUrl = settings.downLoadURL //接口地址
export function downLoadZip(str, data, filename) {
var url = baseUrl + str
......@@ -26,15 +26,14 @@ export function downLoadZip(str, data, filename) {
* @param {*} res blob响应内容
* @param {String} mimeType MIME类型
*/
export function resolveBlob(res, mimeType) {
export function resolveBlob(res, mimeType, fileName) {
const aLink = document.createElement('a')
var blob = new Blob([res], { type: mimeType })
var blob = new Blob([res.data], { type: mimeType })
// //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
var contentDisposition = decodeURI(res.headers['content-disposition'])
var result = patt.exec(contentDisposition)
var fileName = result[1]
fileName = fileName.replace(/\"/g, '')
// var contentDisposition = decodeURI(res.headers['content-disposition'])
// var result = patt.exec(contentDisposition)
// var fileName = result[1]
aLink.href = URL.createObjectURL(blob)
aLink.setAttribute('download', fileName) // 设置下载文件名称
document.body.appendChild(aLink)
......
......@@ -147,7 +147,7 @@
"></el-empty> -->
<el-checkbox-group v-model="handingCodes">
<el-row>
<el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id">
<el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id" v-if="item.status == 1">
<el-checkbox :label="item.chineseName" v-model="item.chineseName">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-checkbox>
......@@ -163,7 +163,7 @@
"></el-empty> -->
<el-checkbox-group v-model="subCategorys">
<el-row>
<el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id">
<el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id" v-if="item.status == 1">
<el-checkbox :label="item.chineseName" v-model="item.chineseName">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-checkbox>
......@@ -175,14 +175,14 @@
</el-row>
<div style="margin: 0 0 0 10px">
<el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button>
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download"
v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(0)"
:loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download"
v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(1)"
:loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']"
......@@ -331,6 +331,7 @@ export default {
},
//查询
async select(val) {
this.tableSelection = []
this.loading = true;
this.dataInfo();
if (val === 0) {
......
......@@ -30,7 +30,7 @@
</el-tooltip>
</div>
</template>
<el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0">
<el-select class="formItem" v-model="formData.route" placeholder="请选择航线" :disabled="routeList.length == 0">
<el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index">
<Tooltips :content="item.route" :refName="item.route"></Tooltips>
</el-option>
......
......@@ -543,12 +543,30 @@ export default {
this.fltNoDisabled = true
this.infoForm.fltNo = this.$route.params.fltNo
this.infoForm.fltDate = this.$route.params.fltDate
this.infoForm.route = this.$route.params.route
if (this.$route.params.status) {
if (this.routeSatus == 'dmLog') {
this.infoForm.route = this.$route.params.route
this.getIdDimension(this.$route.params.id)
} else {
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 : '' })
let obj = {
fltNo: this.$route.params.fltNo,
fltDate: this.$route.params.fltDate,
status: this.$route.params.status ? this.$route.params.status : ''
}
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
this.infoForm.route = this.$route.params.route
obj.route = this.$route.params.route
obj.flightRouteListStr = this.$route.params.route
} else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
this.infoForm.route = ''
obj.route = ''
obj.flightRouteListStr = this.$route.params.route
} else {
obj.route = this.$route.params.route ? this.$route.params.route : ''
}
this.getRouteDimension(obj)
}
}
} else {
......@@ -572,7 +590,23 @@ export default {
if (this.routeSatus == 'dmLog') {
this.getIdDimension(this.$route.params.id)
} else {
this.getRouteDimension({ fltNo: this.$route.params.fltNo, fltDate: this.$route.params.fltDate, route: this.$route.params.route ? this.$route.params.route : '', status: '' })
let obj = {
fltNo: this.$route.params.fltNo,
fltDate: this.$route.params.fltDate,
status: this.$route.params.status ? this.$route.params.status : ''
}
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
obj.route = this.$route.params.route
obj.flightRouteListStr = this.$route.params.route
} else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
obj.route = ''
obj.flightRouteListStr = this.$route.params.route
} else {
obj.route = this.$route.params.route ? this.$route.params.route : ''
}
this.getRouteDimension(obj)
}
}
},
......@@ -614,6 +648,7 @@ export default {
this.infoForm.fltDate = res.data.list.ruleDate
this.infoForm.route = res.data.list.flightRoute
this.infoForm.list.push(this.dataHandle(res.data.list))
console.log(this.infoForm)
} else {
this.isEmpty = true
}
......@@ -634,6 +669,7 @@ export default {
purposeOfFlightNo: val.fltNo,
flightDate: val.fltDate,
flightRoute: val.route,
flightRouteListStr: val.flightRouteListStr,
status: val.status ? val.status : ''
}
if (this.$route.params.handle != 'add') {
......@@ -703,8 +739,10 @@ export default {
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
flightRouteListStr: this.$route.params.route,
status: this.$route.params.status
}).then(response => {
this.routeList = response.data.routeList
if (response.data.list.length > 0) {
//查询到通用维度,去除id status,航线赋值,航线优先级赋值
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
......@@ -776,16 +814,18 @@ export default {
console.log(err)
})
} else {
//航线为空,提示未找到维度数据
if (this.routeSatus == 'flightInformationMaintenancePurple Tail' || this.routeSatus == 'FlightRandConfig') {
//航线为空
if (this.routeSatus == 'FlightRandConfig') {
if (this.routeSatus == 'FlightRandConfig') {
this.infoForm.fltDate = ''
}
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
flightRouteListStr: this.$route.params.route,
status: this.$route.params.status
}).then(response => {
this.routeList = response.data.routeList
if (response.data.list.length > 0) {
this.routeList.forEach(route => {
let routeStatus = 1
......@@ -823,6 +863,15 @@ export default {
this.isEmpty = true
console.log(err)
})
} else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
this.routeList.forEach((route) => {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
})
}
}
}
......
......@@ -67,8 +67,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">
查看配置维度
@click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">查看配置维度
</el-button>
</template>
</el-table-column>
......
......@@ -47,27 +47,35 @@
</el-form-item>
</el-col>
</el-row>
<el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索
<el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading"
@click="handleQuery">搜索
</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['base:flightInfo:add']">
<el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:flightInfo:add']">
新增</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启
</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭
</el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" @click="handleDelete"
v-hasPermi="['base:flightInfo:delete']">删除
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="BlackListSwitchStatus(1)">黑名单自动配舱开启
</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="BlackListSwitchStatus(0)">黑名单自动配舱关闭
</el-button>
<el-button class="mt10" type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0"
@click="handleDelete" v-hasPermi="['base:flightInfo:delete']">删除
</el-button>
</el-form>
<Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader"
......@@ -124,7 +132,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row style="margin-bottom:5px">
<el-col :span="12">
<el-form-item prop="route">
<template slot="label">
......@@ -136,12 +144,13 @@
</div>
</template>
<el-select ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route"
placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :multiple='routeMultiple'
:key="routeMultiple">
placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :loading="routeLoading"
:multiple='routeMultiple' :key="routeMultiple">
<el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
</el-option>
</el-select>
</el-form-item>
<div class="formTips" v-if="title == '修改航班信息'">注意!:移除航线,相对应日期级别航线维度会同时删除</div>
</el-col>
<el-col :span="12">
<el-form-item label="航班类型" prop="typeId">
......@@ -248,12 +257,12 @@
</el-col>
<el-col :span="12">
<el-form-item label="特殊规则预留总重量" prop="accountTotalWeight">
<el-input class="wid80" v-model="form.accountTotalWeight" disabled placeholder="配置特殊规则后计算" />
<el-input-number class="wid80" v-model="form.accountTotalWeight" disabled placeholder="配置特殊规则后计算" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight">
<el-input class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" />
<el-input-number class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" />
</el-form-item>
</el-col>
</el-row>
......@@ -284,7 +293,8 @@ import {
findFltCommonConf,
updateStatusBatch,
updateAutoPushBatch,
updateWhiteListSwitchBatch
updateWhiteListSwitchBatch,
updateBlackListSwitchBatch
} from "@/api/findAllFltData";
import { getpreAudit } from '@/api/system/preReview.js'
import { queryRouteByFltNo } from '@/api/destinationFlight.js'
......@@ -314,7 +324,7 @@ export default {
fltNo: [
{
required: true,
message: "ACCS原航班号不能为空",
message: "航班号不能为空",
trigger: "blur",
},
],
......@@ -342,7 +352,7 @@ export default {
route: [
{
required: true,
message: "航班线路不能为空",
message: "航班路线不能为空",
trigger: "blur",
},
// {
......@@ -446,6 +456,7 @@ export default {
ishighPriceWeightPercent: true,
//遮罩层
loading: false,
routeLoading: false,
//遮罩层
loadingFlightDate: false,
//删除失败弹框
......@@ -562,14 +573,17 @@ export default {
this.msgError(response.msg);
}
});
this.routeLoading = true
//获取航线
queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => {
this.routeLoading = false
if (res.code === 200) {
this.routeList = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.routeLoading = false
console.log(err)
})
}
......@@ -773,8 +787,7 @@ export default {
this.formdisabled.fltDate = true;
//航班种类
this.formdisabled.kindId = true;
//航线
this.formdisabled.route = true
//根据ID查item
findFltById(row).then((response) => {
if (response.code == 200) {
......@@ -786,6 +799,30 @@ export default {
// this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false;
// 计算高低价可配
// this.LowHighAvailable();
//航线
this.selectOption.flightKindlist.forEach(item => {
if (item.id == this.form.kindId) {
if (item.chineseName.indexOf('White') >= 0) {
this.formdisabled.route = true
} else if (item.chineseName.indexOf('Purple') >= 0) {
this.formdisabled.route = false
this.routeMultiple = true
//获取航线
queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => {
this.routeLoading = false
if (res.code === 200) {
this.routeList = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.routeLoading = false
console.log(err)
})
}
}
})
this.ishighPriceWeightPercent = this.form.highLowPriceFlg === 1 ? false : true
} else {
this.msgError(response.msg);
......@@ -799,7 +836,7 @@ export default {
handle: 'update',
fltNo: val.fltNo,
fltDate: val.fltDate ? val.fltDate : null,
route: val.flightKindName != 'Purple Tail' ? val.route : ' ',
route: val.route,
routeStatus: 'flightInformationMaintenance' + val.flightKindName,
status: ' ',
createStatus: 1,
......@@ -902,6 +939,7 @@ export default {
this.routeList = []
this.ishighPriceWeightPercent = true
this.routeMultiple = false
this.routeLoading = false
this.open = false;
this.findAllFltData();
this.findFltConditionData();
......@@ -1004,6 +1042,26 @@ export default {
console.log(err)
})
},
//黑名单配舱开关
BlackListSwitchStatus(val) {
let obj = {
updateIds: []
}
obj.status = val
this.ids.forEach(item => {
obj.updateIds.push(item.id)
})
updateBlackListSwitchBatch(obj).then(res => {
if (res.code === 200) {
this.msgSuccess(res.msg)
this.findAllFltData()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//航线修改
routeChange(val) {
this.$forceUpdate()
......@@ -1058,4 +1116,10 @@ export default {
.el-table__body tr.hover-row>td {
background-color: #d9ecff !important;
}
.formTips {
width: 85%;
color: #ff4949;
text-align: right;
}
</style>
......
This diff is collapsed. Click to expand it.
<template>
<div>
<el-form class="form-header" ref="goodsStationForm" :model="selectionData" label-position="right"
label-width="auto" size="small" @submit.native.prevent>
<el-row>
<el-col :span="6">
<el-form-item label="货站名称">
<el-input class="formItem" v-model="selectionData.goodsStation" placeholder="请输入货站名称"
maxlength="50" clearable />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="品名">
<el-input class="formItem" v-model="selectionData.goodsName" placeholder="请输入品名" maxlength="50"
clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="display:flex;padding:10px 20px">
<el-button icon="el-icon-search" type="primary" :loading="loading" size="small" @click="selection(1)">查 询
</el-button>
<el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['base:goodsBlackStation:add']"
@click="add">新 增
</el-button>
<el-button icon="el-icon-delete" type="danger" size="small" v-hasPermi="['base:goodsBlackStation:delete']"
style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel">
删 除
</el-button>
<el-button type="primary" icon="el-icon-download" size="small" style="margin-left:10px"
@click="downloadTempleate">下载模板
</el-button>
<el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
@click="downloadExcel">
黑名单导出
</el-button>
<el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
v-hasPermi="['base:goodsBlackStation:add']">黑名单导入</el-button>
<el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
</el-button>
</div>
<Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
:order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
:limitSize="selectionData.size" :page="selectionData.page" layout="total,prev, pager, next, jumper, ->"
:pageSizes="[100]" :height="tableHeight" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
@currentChange="currentChange">
<template slot="optionColumn">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['base:goodsBlackStation:delete']" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</template>
</Tables>
<Dialog :open="open" :openStatus="openStatus" @close="close" />
</div>
</template>
<script>
import { downLoadTemplate } from "@/api/flightInfoImport";
import { batchDeleteGoods, searchGoods } from "@/api/goodsStation"
import Dialog from './dialog.vue'
export default {
name: 'GoodsBlackStation',
components: {
Dialog,
},
data() {
return {
selectionData: {
goodsStation: '',
goodsName: '',
goodsType: 2,
size: 20,
page: 1
},
tableData: [],
tableHeader: this.tableHeaders['goodsStation'],
checkData: [],
fileList: [],
errorData: [],
tableHeight: null,
totalCount: 0,
openStatus: '',
loading: false,
open: false,
}
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200
this.selection(1)
},
watch: {
$route(to, from) {
if (to.name == 'GoodsStation') {
this.selection()
}
}
},
methods: {
//查询
selection(val) {
this.tableData = []
this.checkData = []
this.loading = true
if (val === 1) {
this.selectionData.page = 1
}
searchGoods(this.selectionData).then(res => {
this.loading = false
if (res.code === 200) {
this.tableData = res.data.list
this.totalCount = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
//新增
add() {
this.open = true
this.openStatus = 'add'
},
//删除
del(val) {
this.$confirm("是否要删除这条记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.deleteGoods([val.id])
}).catch(() => {
})
},
//批量删除
batchDel() {
let arr = []
this.checkData.forEach(item => {
arr.push(item.id)
})
this.$confirm("是否要删除这些记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.deleteGoods(arr)
}).catch(() => {
})
},
//删除请求
deleteGoods(val) {
batchDeleteGoods(val).then(res => {
if (res.code === 200) {
this.msgSuccess('删除成功!')
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//导出
downloadExcel() {
this.open = true
this.openStatus = 'downloadExcel'
},
//复选
tableSelect(val) {
this.checkData = val.selection
},
//全选
tableSelectAll(val) {
this.checkData = val
},
//分页
currentChange(val) {
this.selectionData.page = val.page
this.selection()
},
//上传excel
uploadExcel() {
this.openStatus = 'uploadExcel'
this.open = true
},
//下载模板
downloadTempleate() {
downLoadTemplate('goodsStation').then((res) => {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = '黑名单货物品名模板.xlsx'; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click(); //执行下载
URL.revokeObjectURL(link.href); //释放url
document.body.removeChild(link); //释放标签
} else {
this.$message.error("下载失败");
}
})
},
handleRemove(file, fileList) {
//清掉上传的文件
this.errorData = [];
this.fileList = [];
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.uploadExcel(file);
},
selectLog() {
this.$router.push({ name: 'GoodsUploadLog', params: { type: 2 } })
},
close() {
this.open = false
this.openStatus = ''
this.selection(1)
},
resultClose() {
this.resultOpen = false
this.selection(1)
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -100,13 +100,13 @@ export default {
trigger: "change",
},
],
// file: [
// {
// required: true,
// message: "文件不能为空",
// trigger: "change",
// },
// ]
file: [
{
required: true,
message: "文件不能为空",
trigger: "change",
},
]
},
fileList: [],
errorData: [],
......@@ -126,7 +126,7 @@ export default {
//查询货站
getgoods() {
this.goodsStationLoading = true
findStationName().then(res => {
findStationName({ goodsType: 1 }).then(res => {
this.goodsStationLoading = false
if (res.code === 200) {
this.goodsStationList = res.data.list
......@@ -176,7 +176,7 @@ export default {
},
//导入Excel
upload() {
this.loading = true;
this.loading = true
if (this.formData.file != null && this.formData.file != '') {
this.$refs['addForm'].validate(val => {
if (val) {
......@@ -211,17 +211,18 @@ export default {
}
})
} else {
this.loading = false;
this.loading = false
this.msgWarning('请选择文件后再导入!')
}
},
//导出Excel
download() {
this.$refs['addForm'].validate(val => {
if (val) {
this.downloading = true
let data = { goodsStation: this.formData.goodsStation }
downLoadXlsx("/goods/exportGoods", data, "货站表")
let data = { goodsStation: this.formData.goodsStation, goodsType: 1 }
downLoadXlsx("/goods/exportGoods", data, "白名单货站表")
.then(() => {
this.downloading = false
this.close()
......
......@@ -43,6 +43,7 @@ export default {
methods: {
//日志查询
selectLog(val) {
this.logTabelData = []
if (val === 1) {
this.logData.page = 1
}
......@@ -50,8 +51,14 @@ export default {
userImportLog(this.logData).then(res => {
this.loading = false
if (res.code === 200) {
this.logCount = res.data.total
this.logTabelData = res.data.list
res.data.list.forEach(item => {
if (this.$route.params.type == 1 && item.module == '白名单导入') {
this.logTabelData.push(item)
} else if (this.$route.params.type == 2 && item.module == '黑名单导入') {
this.logTabelData.push(item)
}
})
this.logCount = this.logTabelData.length
} else {
this.msgWarning(res.msg)
}
......
......@@ -32,10 +32,10 @@
</el-button>
<el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
@click="downloadExcel">
导出Excel
白名单导出
</el-button>
<el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
v-hasPermi="['base:goodsStation:add']">导入Excel</el-button>
v-hasPermi="['base:goodsStation:add']">白名单导入</el-button>
<el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
</el-button>
</div>
......@@ -72,6 +72,7 @@ export default {
selectionData: {
goodsStation: '',
goodsName: '',
goodsType: 1,
size: 20,
page: 1
},
......@@ -198,7 +199,7 @@ export default {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = '货物品名模板.xlsx'; //a标签添加属性
link.download = '白名单货物品名模板.xlsx'; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
......@@ -225,7 +226,7 @@ export default {
this.uploadExcel(file);
},
selectLog() {
this.$router.push({ name: 'GoodsUploadLog' })
this.$router.push({ name: 'GoodsUploadLog', params: { type: 1 } })
},
close() {
this.open = false
......
......@@ -147,6 +147,20 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="预审状态">
<el-select v-model="formData.preStatus" placeholder="不限" class="formItem" clearable multiple>
<el-option v-for="item in findConditionData.preQualificationStatus" :label="item == '' ? '非预审' : item"
:value="item"> </el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="发件人账号">
<el-input ref='userInfo' type="textarea" v-model="formData.shipperAccount" class="formItem"
placeholder="请输入发件人账号(;间隔)" :rows="4" :maxlength="12000" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
......@@ -167,12 +181,12 @@
v-hasPermi="['base:cargo:release']" @click="release">释放舱位</el-button>
<el-button type="primary" size="small" icon="el-icon-sort" :disabled="selectTable.length == 0" @click="transfer"
v-hasPermi="['log:cargo:flightTransfer']">航班迁转</el-button>
<!-- <el-button type="primary" size="small" :disabled="cargoPlaneTime == null || cargoPlaneTime.length <= 0"
<el-button type="primary" size="small" :disabled="cargoPlaneTime == null || cargoPlaneTime.length <= 0"
@click="historyFlie" v-hasPermi="['log:cargo:archiveData']">
<el-tooltip class="item" effect="dark" content="请先选择配置航班日期" placement="top">
<span class="el-icon-warning-outline">生成归档数据</span>
</el-tooltip>
</el-button> -->
</el-button>
<span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
<el-progress v-if="progress != 0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress"
:status="progress == 100 ? 'success' : 'warning'"></el-progress>
......@@ -251,6 +265,7 @@ export default {
typeId: null,
statusId: null,
serviceTypeId: null,
shipperAccount: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
......@@ -261,6 +276,7 @@ export default {
cargoPlaneStart: null,
cargoPlaneEnd: null,
cargoPlaneRoute: null,
preStatus: undefined,
limitStart: 1,
limitSize: 100,
}, //表单数据
......@@ -319,6 +335,7 @@ export default {
tableData: [], //表格数据
cargoLog: {},
routeList: [],
preQualificationStatusList: [],
allWeight: 0,//总重量
allQty: 0,//总件数
shiftKey: false,
......@@ -352,13 +369,14 @@ export default {
} else {
this.tableHeader = this.tableHeaders['cargo']
}
this.select(0)
// this.select(0,'create')
},
activated() {
this.selectTable = []
this.cargoTotal()
if (this.$route.params.fltNo) {
console.log(1)
//判断进入页面是否带参,确定是否是index跳转
this.formData = {
fltDateStart: "",
......@@ -377,6 +395,8 @@ export default {
typeId: null,
statusId: null,
serviceTypeId: null,
shipperAccount: null,
shipperAccountList: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
......@@ -389,20 +409,21 @@ export default {
limitStart: 1,
limitSize: 100,
}
console.log(this.$route)
this.cargoPlaneTime = [this.$route.params.fltDate, this.$route.params.fltDate]
this.formData.cargoPlaneStart = this.$route.params.fltDate
this.formData.cargoPlaneEnd = this.$route.params.fltDate
this.formData.cargoPlaneNo = this.$route.params.fltNo
this.formData.cargoPlaneRoute = this.$route.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
this.planeNoChange(this.formData.cargoPlaneNo.split(';'))
this.select(0, 'activated')
} else {
//否则请求原页面缓存状态
if (this.$store.state.tagsView.cachedViews.length > 0) {
this.$store.state.tagsView.cachedViews.forEach(item => {
if (item === 'QueryCargo') {
this.findCondition()
this.totalCount > 0 ? this.select() : ''
this.select()
}
})
}
......@@ -429,44 +450,46 @@ export default {
watch: {
$route: {
handler(to, from) {
if (to.name === 'Index') {
this.formData = {
fltDateStart: "",
fltDateEnd: "",
prematchFltDateStart: "",
prematchFltDateEnd: "",
createTimeStart: null,
createTimeEnd: null,
pickUpDate: null,
hasFlight: null,
waybillNo: "",
siteName: "",
fltNo: "",
mawbCode: "",
ursa: "",
typeId: null,
statusId: null,
serviceTypeId: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
dataSources: "",
customsReceiptStatusId: null,
big: null,
cargoPlaneNo: null,
cargoPlaneStart: null,
cargoPlaneEnd: null,
limitStart: 1,
limitSize: 100,
}
this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate]
this.formData.cargoPlaneStart = from.params.fltDate
this.formData.cargoPlaneEnd = from.params.fltDate
this.formData.cargoPlaneNo = from.params.fltNo
this.formData.cargoPlaneRoute = from.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
}
// if (to.name === 'Index') {
// this.formData = {
// fltDateStart: "",
// fltDateEnd: "",
// prematchFltDateStart: "",
// prematchFltDateEnd: "",
// createTimeStart: null,
// createTimeEnd: null,
// pickUpDate: null,
// hasFlight: null,
// waybillNo: "",
// siteName: "",
// fltNo: "",
// mawbCode: "",
// ursa: "",
// typeId: null,
// statusId: null,
// serviceTypeId: null,
// shipperAccount: null,
// shipperAccountList: null,
// allocationTypeId: null,
// kindToAllocFlightId: null,
// historyAllocaCargoTypeId: null,
// dataSources: "",
// customsReceiptStatusId: null,
// big: null,
// cargoPlaneNo: null,
// cargoPlaneStart: null,
// cargoPlaneEnd: null,
// limitStart: 1,
// limitSize: 100,
// }
// this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate]
// this.formData.cargoPlaneStart = from.params.fltDate
// this.formData.cargoPlaneEnd = from.params.fltDate
// this.formData.cargoPlaneNo = from.params.fltNo
// this.formData.cargoPlaneRoute = from.params.route
// this.planeNoChange(this.formData.cargoPlaneNo)
// this.select(0, 'watch')
// }
}
},
formShow(val, oldVal) {
......@@ -488,7 +511,7 @@ export default {
});
},
//查询
async select(val) {
async select(val, type) {
this.selectTable = []
this.tableData = [];
this.allWeight = 0;
......@@ -632,6 +655,12 @@ export default {
if (this.formData.hasFlight == "") {
this.formData.hasFlight = null
}
if (this.formData.shipperAccount != null && this.formData.shipperAccount != '') {
this.formData.shipperAccountList = this.formData.shipperAccount.split(';')
} else {
this.formData.shipperAccountList = null
}
this.formData.limitStart = this.limitStart;
this.formData.limitSize = 100;
},
......@@ -667,7 +696,7 @@ export default {
},
//配载航班号获取航线
planeNoChange(val) {
getFlightsRoutes(val.split(';')).then(res => {
getFlightsRoutes(val).then(res => {
if (res.code === 200) {
this.routeList = res.data
} else {
......
......@@ -30,7 +30,7 @@
</el-tooltip>
</div>
</template>
<el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0">
<el-select class="formItem" v-model="formData.route" placeholder="请选择航线" :disabled="routeList.length == 0">
<el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index">
<Tooltips :content="item.route" :refName="item.route"></Tooltips>
</el-option>
......@@ -67,7 +67,6 @@ export default {
fltDate: undefined,
route: null,
overweight: false,
notInWhite: false,
},
cargoHeader: [
{ name: "口岸代码", value: "portName", width: "" },
......
<template>
<div style="margin: 20px">
<el-form ref="selectForm" :model="formData" class="form-header" label-position="right" label-width="auto"
size="small">
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="航班号">
<el-input type="text" v-model="formData.fltNo" placeholder="请输入航班号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="地区">
<el-input type="text" v-model="formData.area" placeholder="请输入地区"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading"
@click="selection(1)">
查询</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-row>
<el-col :span="6">
<el-form-item label="生效日期" prop="beginDate" :rules="rules">
<el-date-picker class="formItem" v-model="formData.beginDate" type="date"
placeholder="选择日期" value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList"
accept=".xlsx" class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"
:disabled="formData.beginDate == null">
<el-button type="primary" icon="el-icon-upload2" size="small" @click="upload">导入Excel
</el-button>
</el-upload>
</el-col>
</el-row>
</el-col>
</el-row>
</el-form>
<div style="width:100%;display: flex;margin-bottom:10px">
<!-- <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading" @click="selection(1)">
查询</el-button> -->
<el-button type="primary" icon="el-icon-download" size="small" @click="downloadTempleate"
v-hasPermi="['base:flightImport:exportExcel']">
下载模板
</el-button>
</div>
<Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true'
:height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"
:totalCount="total" :loading="tableLoading" @currentChange="currentChange">">
</Tables>
</div>
</template>
<script>
import {
downLoadTemplate,
importFlightDestination,
searchFlightDestination
} from "@/api/preMdeConfig";
export default {
name: "FlightToArea",
data() {
return {
formData: {
fltNo: null,
area: null,
beginDate: null,
page: 1,
},
tableData: [],
errorData: [],
tableHeaders: this.tableHeaders['flightToArea'],
tableHeight: null,
total: 0,
flightType: [],
form: {
type: "",
region: "",
},
rules: {
validator: (rule, value, callback) => {
if (this.formData.beginDate == null) {
callback(new Error('上传前请选择生效时间'))
}
},
trigger: 'change'
},
fileList: [],
tableLoading: false,
};
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170
this.selection(1)
},
activated() {
},
methods: {
selection(val) {
this.tableData = []
this.tableLoading = true
if (val === 1) {
this.formData.page = 1
}
let obj = {
fltNo: this.formData.fltNo,
area: this.formData.area,
page: this.formData.page,
size: 20
}
if (obj.area == '') {
obj.area = null
}
searchFlightDestination(obj).then(res => {
this.tableLoading = false
if (res.code === 200) {
this.tableData = res.data.list
this.total = res.data.total
}
}).catch(err => {
this.tableLoading = false
console.log(err)
})
},
downloadTempleate() {
let downloadType = "flightDestination";
let fileName = "航班目的地模板.xlsx";
downLoadTemplate(downloadType).then((res) => {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = fileName; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click(); //执行下载
URL.revokeObjectURL(link.href); //释放url
document.body.removeChild(link); //释放标签
} else {
this.$message.error("下载失败");
}
});
},
uploadExcel(option) {
//上传excel
const file = option.file;
importFlightDestination(file, this.formData.beginDate).then((res) => {
if (res.data.code != 200) {
if (res.data.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.data.code === 201) {
this.msgWarning(res.data.msg);
this.errorData = res.data.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightToArea' } })
} else {
this.msgWarning(res.data.msg);
}
} else {
this.msgSuccess("导入成功");
this.selection(1)
}
});
},
handleRemove(file, fileList) {
//清掉上传的文件
this.fileList = [];
this.selection()
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.uploadExcel(file);
},
currentChange(val) {
this.formData.page = val.page
this.selection()
},
upload() {
this.$refs.selectForm.validateField('beginDate')
}
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.upload-demo {
display: flex;
margin-left: 10px;
float: none !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
vertical-align: top;
}
</style>
\ No newline at end of file
<template>
<div>
<el-form ref="preMdeSelectForm" class="form-header" label-position="right" label-width="auto" size="small"
:model="formData">
<el-row>
<el-col :span="6">
<el-form-item label="区域">
<el-select class="formItem" v-model="formData.regionArray" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectData.region" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="地区">
<el-select class="formItem" v-model="formData.areaArray" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectData.area" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申报类别">
<el-select class="formItem" v-model="formData.typeName" filterable clearable placeholder="不限">
<el-option v-for="item in selectData.declarationCategory" :label="item.chineseName"
:value="item.chineseName" :key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="服务类型">
<el-select class="formItem" v-model="formData.serviceTypeArray" filterable clearable
placeholder="不限">
<el-option v-for="item in selectData.serviceType" :label="item.chineseName"
:value="item.chineseName" :key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="运单号">
<el-input type="textarea" v-model="formData.waybillNo" class="formItem"
placeholder="请输入运单号(回车间隔)" :rows="4" :maxlength="12000" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="URSA">
<el-input type="textarea" v-model="formData.ursa" class="formItem" placeholder="S_;P_;E2"
:rows="4" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK"
:rows="4" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
<el-date-picker class="formItem" type="daterange" v-model="accsDate" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" :value-format="valueFormat" clearable>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input type="text" class="formItem" v-model="formData.flightNo" placeholder="请输入航班号"
clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS航线">
<el-input type="text" class="formItem" v-model="formData.flightRoute" placeholder="请输入航线"
clearable>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="ml20 mb20">
<el-button type="primary" icon="el-icon-search" size="small" :loading="tableLoading" @click="select(0)">查询
</el-button>
<el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
:loading="downloading" @click="downloadExcel" v-hasPermi="['base:preMde:export']">
导出全部查询结果
</el-button>
<span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
</div>
<Tables ref="preMdeSelectTables" ductName="preMdeSelect" :data="tableData" :headerData="tableHeader"
:selection="false" :order="true" :totalCount="totalCount" :pageSizes="[100]" :loading="tableLoading"
:limitSize="formData.size" :height="tableHeight" @currentChange="currentChange">
</Tables>
</div>
</template>
<script>
import {
findDmPreMdeData,
findDmPreMdeCondition
} from "@/api/preMdeConfig";
import { downLoadXlsx } from "@/utils/zipdownload";
export default {
name: 'PreMdeSelect',
data() {
return {
formData: {
regionArray: [],
areaArray: [],
serviceTypeArray: null,
page: 1,
size: 100,
},
selectData: {
serviceType: [],
declarationCategory: [],
region: [],
area: []
},
tableData: [],
tableHeader: this.tableHeaders['preMdeSelect'],
accsDate: [],
valueFormat: "yyyy-MM-dd",
tableHeight: null,
tableLoading: false,
downloading: false,
totalCount: 0,
}
},
created() {
this.selectOptionData()
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150
this.select(0)
},
watch: {
$route(to, from) {
if (to.name == 'PreMdeSelect') {
this.selection()
}
}
},
methods: {
//查询条件
selectOptionData() {
findDmPreMdeCondition().then(res => {
if (res.code == 200) {
this.selectData = res.data
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//查询
select(val) {
this.tableLoading = true
let obj = JSON.parse(JSON.stringify(this.datainfo(this.formData)))
if (this.accsDate != null && this.accsDate.length > 0) {
obj.fltDateStart = this.accsDate[0]
obj.fltDateEnd = this.accsDate[1]
} else {
obj.fltDateStart = null
obj.fltDateEnd = null
}
findDmPreMdeData(obj).then(res => {
this.tableLoading = false
if (res.code == 200) {
this.tableData = res.data.list
this.totalCount = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.tableLoading = false
console.log(err)
})
},
//导出
downloadExcel() {
this.downloading = true
let data = this.datainfo(this.formData)
if (this.accsDate != null && this.accsDate.length > 0) {
data.fltDateStart = this.accsDate[0]
data.fltDateEnd = this.accsDate[1]
} else {
data.fltDateStart = null
data.fltDateEnd = null
}
downLoadXlsx("/dmPreMde/excel", data, "Pre-MDE查询表")
.then(() => {
this.downloading = false
})
.catch(() => {
this.downloading = false
});
},
//数据处理
datainfo(val) {
if (val.ursa && val.ursa != null && val.ursa != '') {
val.ursa = val.ursa.toUpperCase().replace(/;/g, ';')
}
if (val.siteName && val.siteName != null && val.siteName != '') {
val.siteName = val.siteName.toUpperCase().replace(/;/g, ';')
}
if (val.flightNo && val.flightNo != null && val.flightNo != '') {
val.flightNo = val.flightNo.toUpperCase()
}
if (val.flightRoute && val.flightRoute != null && val.flightRoute != '') {
val.flightRoute = val.flightRoute.toUpperCase()
}
if (val.regionArray != null && val.regionArray.length == 0) {
val.regionArray = null
}
if (val.areaArray != null && val.areaArray.length == 0) {
val.areaArray = null
}
if (val.serviceTypeArray != null && val.serviceTypeArray.length == 0) {
val.serviceTypeArray = null
}
return val
},
//翻页
currentChange(val) {
this.formData.page = val.page
this.select()
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<el-form ref="reportForm" class="form-header" :model="formData" label-position="right" label-width="auto"
size="small">
<el-row>
<el-col :span="4">
<el-form-item label="取件日期">
<el-date-picker class="formItem" v-model="formData.pickUpDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="区域">
<el-select v-model="formData.regionArray" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.region" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="地区">
<el-select v-model="formData.areaArray" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.area" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="URSA">
<el-select v-model="formData.ursas" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.ursaList" :label="item" :value="item"
:key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="service type">
<el-select v-model="formData.serviceTypeArray" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.serviceType" :label="item.chineseName"
:value="item.chineseName" :key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="ml20 mt20 mb20">
<el-button type="primary" icon="el-icon-search" size="small" :loading="loading" @click="select(0)">查 询
</el-button>
</div>
<div style="padding:10px">
<el-form label-position="right" label-width="auto" size="small">
<el-form-item label="坐标系切换">
<el-radio-group v-model="formData.dimensionName" @change="typeChange">
<el-radio label="region">区域</el-radio>
<el-radio label="area">地区</el-radio>
<el-radio label="ursa">URSA</el-radio>
<el-radio label="serviceType">service type</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div v-for="(item, index) in barChartData" :key="index">
<Chart :className="'chart' + index.toString()" :chartData="item" height="350px"
style="margin-bottom:10px" :loading="loading" />
</div>
</div>
</div>
</template>
<script>
import Chart from '@/components/echarts/echarts-series.vue'
import { findDmPreMdeCondition, findPreMdeReport } from "@/api/preMdeConfig";
export default {
components: {
Chart
},
data() {
return {
formData: {
ursas: [],
serviceTypeArray: [],
regionArray: [],
areaArray: [],
pickUpDate: null,
dimensionName: 'region',
},
tableHeader: this.tableHeaders['report'],
barChartData: [],
selectOptionList: {
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_'],
serviceType: [],
region: [],
area: [],
},
tableHeight: null,
totalCount: 10,
loading: false
}
},
created() {
this.formData.pickUpDate = this.nowDate()
this.getOption()
this.select()
},
activated() {
this.select()
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.reportForm.$el.offsetHeight - 240
},
methods: {
getOption() {
findDmPreMdeCondition().then(res => {
if (res.code === 200) {
this.selectOptionList.serviceType = res.data.serviceType
this.selectOptionList.region = res.data.region
this.selectOptionList.area = res.data.area
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
select(val) {
this.loading = true
let obj = {}
if (this.formData.ursas.length > 0) {
obj.ursas = this.formData.ursas
} else {
obj.ursas = null
}
if (this.formData.serviceTypeArray.length > 0) {
obj.serviceTypeArray = this.formData.serviceTypeArray
} else {
obj.serviceTypeArray = null
}
if (this.formData.regionArray.length > 0) {
obj.regionArray = this.formData.regionArray
} else {
obj.regionArray = null
}
if (this.formData.areaArray.length > 0) {
obj.areaArray = this.formData.areaArray
} else {
obj.areaArray = null
}
obj.pickUpDate = this.formData.pickUpDate
obj.dimensionName = this.formData.dimensionName
findPreMdeReport(obj).then(res => {
this.loading = false
if (res.code === 200) {
if (res.data.dimensionList && res.data.dimensionList.length > 0) {
this.dataHandle(res.data.dimensionList, 8)
} else {
this.msgWarning('未查询到数据')
}
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
typeChange(val) {
this.select()
},
dataHandle(val, num) {
this.barChartData = []
let obj = {
names: [],
data1: [],
data2: [],
data3: []
}
val.forEach(item => {
obj.names.push(item.name)
obj.data1.push(item.totalPcs)
obj.data2.push(item.total)
obj.data3.push(item.totalWeight)
})
this.arrList(obj.names, num).forEach((item, index) => {
let objItem = {
names: [],
data1: [],
data2: [],
data3: [],
}
objItem.names = item
objItem.data1 = this.arrList(obj.data1, num)[index]
objItem.data2 = this.arrList(obj.data2, num)[index]
objItem.data3 = this.arrList(obj.data3, num)[index]
this.barChartData.push(objItem)
})
},
arrList(list, last) {
let index = 0
let arr = []
if (list.length < last) {
arr.push(list)
} else {
while (index < list.length) {
arr.push(list.slice(index, index += last))
index++
}
}
return arr
},
currentChange(val) {
this.formData.page = val.page
this.select()
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div style="margin: 20px">
<el-form ref="selectForm" :model="formData" class="form-header" label-position="right" label-width="auto"
size="small">
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="URSA">
<el-input type="textarea" v-model="formData.ursa" placeholder="URSA之间用分号分隔,例:F2;F3;P_" rows="2">
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="地区">
<el-input type="text" v-model="formData.area" placeholder="请输入地区"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading"
@click="selection(1)">
查询</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-row>
<el-col :span="6">
<el-form-item label="生效日期" prop="beginDate" :rules="rules">
<el-date-picker class="formItem" v-model="formData.beginDate" type="date"
placeholder="选择日期" value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList"
accept=".xlsx" class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"
:disabled="formData.beginDate == null">
<el-button type="primary" icon="el-icon-upload2" size="small" @click="upload">导入Excel
</el-button>
</el-upload>
</el-col>
</el-row>
</el-col>
</el-row>
</el-form>
<div style="width:100%;display: flex;margin-bottom:10px">
<!-- <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading" @click="selection(1)">
查询</el-button> -->
<el-button type="primary" icon="el-icon-download" size="small" @click="downloadTempleate"
v-hasPermi="['base:flightImport:exportExcel']">
下载模板
</el-button>
</div>
<Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true'
:height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"
:totalCount="total" :loading="tableLoading" @currentChange="currentChange"
layout="total,prev, pager, next, jumper, ->">
</Tables>
</div>
</template>
<script>
import {
downLoadTemplate,
importUrsaDestination,
searchUrsaDestination
} from "@/api/preMdeConfig";
export default {
name: "UrsaToArea",
data() {
return {
formData: {
ursa: null,
area: null,
page: 1,
},
tableData: [],
errorData: [],
tableHeaders: this.tableHeaders['ursaToArea'],
tableHeight: null,
total: 0,
flightType: [],
form: {
type: "",
region: "",
},
rules: {
validator: (rule, value, callback) => {
if (this.formData.beginDate == null) {
callback(new Error('上传前请选择生效时间'))
}
},
trigger: 'change'
},
fileList: [],
tableLoading: false,
};
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170
this.selection(1)
},
activated() {
},
methods: {
selection(val) {
this.tableData = []
this.tableLoading = true
if (val === 1) {
this.formData.page = 1
}
let obj = {
area: this.formData.area,
page: this.formData.page,
size: 20
}
if (this.formData.ursa && this.formData.ursa != null && this.formData.ursa != '') {
obj.ursa = this.formData.ursa.split(';')
} else {
obj.ursa = null
}
if (obj.area == '') {
obj.area = null
}
searchUrsaDestination(obj).then(res => {
this.tableLoading = false
if (res.code === 200) {
this.tableData = res.data.list
this.total = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.tableLoading = false
console.log(err)
})
},
downloadTempleate() {
let downloadType = "ursaDestination";
let fileName = "URSA目的地模板.xlsx";
downLoadTemplate(downloadType).then((res) => {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = fileName; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click(); //执行下载
URL.revokeObjectURL(link.href); //释放url
document.body.removeChild(link); //释放标签
} else {
this.$message.error("下载失败");
}
});
},
uploadExcel(option) {
//上传excel
const file = option.file;
importUrsaDestination(file, this.formData.beginDate).then((res) => {
if (res.data.code != 200) {
if (res.data.code == 603) {
this.$alert(res.data.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.data.code === 201) {
this.msgWarning(res.data.msg);
this.errorData = res.data.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
} else {
this.msgWarning(res.data.msg);
}
} else {
this.msgSuccess("导入成功");
this.selection(1)
}
});
},
handleRemove(file, fileList) {
//清掉上传的文件
this.fileList = [];
this.selection()
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.uploadExcel(file);
},
currentChange(val) {
this.formData.page = val.page
this.selection()
},
upload() {
this.$refs.selectForm.validateField('beginDate')
}
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.upload-demo {
display: flex;
margin-left: 10px;
float: none !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
vertical-align: top;
}
</style>
\ No newline at end of file
......@@ -33,6 +33,9 @@
<el-input type="text" v-model="newDictionary.route" placeholder="请输入航线" maxlength="40">
</el-input>
</el-form-item>
<el-form-item>
<div style="color:#ff4949;line-height: 30px;">注意:此处不能添加虚拟航班!</div>
</el-form-item>
</div>
<div v-else-if="status == 'sort'">
<el-form-item label="航班号" prop="fltNo">
......
......@@ -30,7 +30,8 @@
<el-col :span="12">
<el-form-item label="航线" prop="flightRoute">
<el-select class="formItem" v-model="formData.flightRoute" placeholder="未设置"
:disabled="routeList.length == 0 || disabled" @change="routeChange">
:loading="routeLoading" :disabled="routeList.length == 0 || disabled"
@change="routeChange">
<el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route"
:key="item.id">
<Tooltips :content="item.route" :refName="item.route"></Tooltips>
......@@ -193,6 +194,7 @@ export default {
},
title: '',
loading: false,
routeLoading: false,
disabled: false
}
},
......@@ -237,6 +239,7 @@ export default {
//获取航线
getRoute(val) {
this.routeList = []
this.routeLoading = true
if (val != 1) {
this.formData.flightRoute = null
}
......@@ -246,6 +249,7 @@ export default {
fltDate: this.formData.flightDate
}
findFlightRoute(obj).then(res => {
this.routeLoading = false
if (res.code === 200) {
this.routeList = res.data
} else {
......@@ -253,6 +257,7 @@ export default {
}
this.$refs['superAllocationForm'].clearValidate('flightRoute')
}).catch(err => {
this.routeLoading = false
console.log(err)
})
},
......
......@@ -178,7 +178,7 @@ export default {
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.statusChange({ id: val.id, status: status, tip: tip })
this.statusChange({ id: val.id, status: status })
}).catch(() => { })
} else {
this.msgWarning(res.msg)
......@@ -192,7 +192,7 @@ export default {
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.statusChange({ id: val.id, status: status, tip: tip })
this.statusChange({ id: val.id, status: status })
}).catch(() => { })
}
},
......
......@@ -36,7 +36,7 @@
</el-button>
</div>
<Tables ref="operationLogTables" ductName="operationLogTables" :order="true" :border='false' :data="data"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="true" :height="tableHeight"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false" :height="tableHeight"
:page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total"
:loading="loading" @currentChange="currentChange">
<template v-slot:result="scope">
......@@ -48,14 +48,17 @@
</span>
</template>
<template v-slot:remark="scope">
<el-popover placement="top" width="400" trigger="hover"
<!-- <el-popover placement="top" width="400" trigger="hover"
v-if="scope.row.remark != null && scope.row.remark != ''">
<ul style="height:300px;overflow-y:scroll;">
<li v-for="(item, index) in scope.row.remark.split('\n')" :key="index"
style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li>
</ul>
<el-button type="text" slot="reference">查 看</el-button>
</el-popover>
</el-popover> -->
<div>
{{ scope.row.remark }}
</div>
</template>
<template v-slot:requestParameters="scope">
<el-popover placement="top" width="400" trigger="hover"
......