jinhui.wang

ver:1.6.0,增加货站品名航班、首页,增加航线字典,配舱设置重构,样式修改,bug修复

......@@ -42,11 +42,11 @@ export function findCargoAllocationData(data) {
}
//手动配舱
export function allocationFlight(data){
export function allocationFlight(data) {
return request({
url:'/cargo/allocationFlight',
method:'post',
data:data
url: '/cargo/allocationFlight',
method: 'post',
data: data
})
}
......@@ -67,4 +67,42 @@ export function releaseCargo(data) {
method: 'post',
data: data,
})
}
\ No newline at end of file
}
//航班号+日期查询航线(手动配舱)
/**
* @param fltDate * 航班日期
* @param fltNo * 航班号
*/
export function findFlightRoute(data) {
return request({
url: '/cargo/findFlightRoute',
method: 'post',
data: data
})
}
//航班号+日期查询ACCS航线(手动配舱查询项)
/**
* @param fltDateAccs 航班日期
* @param fltNoAccs 航班号
*/
export function getAccsRoute(data) {
return request({
url: '/dmDataLog/getAccsRoute',
method: 'post',
data: data
})
}
//航班号+日期查询ACCS航线(货物查询查询项)
/**
* @param fltNoAccs 航班号 list
*/
export function getFlightsRoutes(data) {
return request({
url: '/dictionary/getFlightsRoutes',
method: 'post',
data: data
})
}
......
import request from '@/utils/request'
//目的航班规则接口
//查询航班航线
//查询航线
/**
* @param fltNo 航班号
*/
export function queryRouteByFltNo(data) {
return request({
url: '/dictionary/queryRouteByFltNo',
method: 'post',
data: data
})
}
// 查询航班列表
export function findFlightNo(query) {
/**
* @param purposeOfFlightNo 航班号
* @param flightDate 航班日期
* @param status 状态
* @param start 开始位置 *
* @param limit 每页长度 *
*/
export function findFlightDimRuleByFlightNo(query) {
return request({
url: '/destinationFlight/findFlightNo',
url: '/destinationFlight/findFlightDimRuleByFlightNo',
method: 'post',
data: query
})
}
// id查询目的航班
export function findByFlightId(id) {
const data = {
id
}
// 获取航班下航线维度(维度修改)
/**
* @param purposeOfFlightNo 航班号
* @param flightDate 航班日期
* @param flightRoute 航线
*/
export function findDestinationFltRuleByFlightNo(query) {
return request({
url: '/destinationFlight/findByFlightId',
url: '/destinationFlight/findDestinationFltRuleByFlightNo',
method: 'post',
data: data
data: query
})
}
//航班号查航班
export function findDestinationFltRuleByActualFlight(actualFlight){
const data = {
actualFlight
}
//航班优先级修改
export function batchUpdateOrAddFlight(data) {
return request({
url:'/sourceFlight/findDestinationFltRuleByActualFlight',
method:'post',
data:data
url: '/destinationFlight/batchUpdateOrAddFlight',
method: 'post',
data: data
})
}
export function updateOrAddFlight(form){
//处理数据
form.typeOfGoods = form.typeOfGoods.join(';');
form.declarationCategory = form.declarationCategory.join(';');
form.serviceCode = form.serviceCode.join(';');
form.subCategory = form.subCategory.join(';');
form.handlingCode = form.handlingCode.join(';');
//新增修改规则设置
export function updateOrAddFlight(form) {
return request({
url:'/destinationFlight/updateOrAddFlight',
url: '/destinationFlight/updateOrAddFlight',
method: 'post',
data:form
data: form
})
}
//删除规则
export function delFlightId(id){
export function delFlightId(id) {
const data = {
id
}
......@@ -65,7 +74,7 @@ export function delFlightId(id){
}
//启用/停止规则
export function enableOrDisable(id, status){
export function enableOrDisable(id, status) {
//statsu 1-有效 3-停用
const data = {
id,
......@@ -78,43 +87,59 @@ export function enableOrDisable(id, status){
})
}
//申报类别
export function cargoTypeData(){
//获取全部字典
export function allDictData() {
return request({
url: '/destinationFlight/cargoTypeData',
url: '/destinationFlight/allDictData',
method: 'post'
})
}
//货物类型
export function cargoStatusData(){
//维度航线优先级查询
/**
* @param fltNo 航班号
* @param routeDate 航班日期
*/
export function allRouteQuery(data) {
return request({
url: '/destinationFlight/cargoStatusData',
method: 'post'
url: '/specifyDateRoute/query',
method: 'post',
data: data
})
}
//ServiceCode
export function serviceCodeData(){
//维度航线优先级修改
/**
* @param list 航线排序集合
*/
export function saveOrUpdateSpecifyDateRoute(data) {
return request({
url: '/destinationFlight/serviceCodeData',
method: 'post'
url: '/specifyDateRoute/saveOrUpdateSpecifyDateRoute',
method: 'post',
data: data
})
}
//SubCategory
export function subCategoryData(){
// id查询目的航班
export function findByFlightId(id) {
const data = {
id
}
return request({
url: '/destinationFlight/subCategoryData',
method: 'post'
url: '/destinationFlight/findByFlightId',
method: 'post',
data: data
})
}
//获取全部字典
export function allDictData(){
return request({
url: '/destinationFlight/allDictData',
method: 'post'
})
//航班号查航班
export function findDestinationFltRuleByActualFlight(actualFlight) {
// const data = {
// actualFlight
// }
// return request({
// url: '/sourceFlight/findDestinationFltRuleByActualFlight',
// method: 'post',
// data: data
// })
}
\ No newline at end of file
......
import request from '@/utils/request'
//批量导入
export function importGoods(file, type) {
let formData = new FormData();
formData.append("file", file);
formData.append("type", type);
return request({
url: '/goods/importGoods',
method: 'post',
data: formData
})
}
//批量添加品名货站
/**
* @param goodsStation * 货站名
* @param goodsList * 货品名list
*/
export function batchAddGoods(data) {
return request({
url: '/goods/batchAddGoods',
method: 'post',
data: data
})
}
//批量删除品名货站
/**
* @param idList * id集合
*/
export function batchDeleteGoods(data) {
return request({
url: '/goods/batchDeleteGoods',
method: 'post',
data: data
})
}
//查询品名
/**
* @param page * 页数
* @param size * 页长
* @param goodsStation 货站名
*/
export function searchGoods(data) {
return request({
url: '/goods/searchGoods',
method: 'post',
data: data
})
}
\ No newline at end of file
import request from '@/utils/request'
//查询货站航班
/**
* @param page * 页数
* @param size * 页长
* @param goodsStation 货站名称
*/
export function searchStationFlight(data) {
return request({
url: '/stationFlight/searchStationFlight',
method: 'post',
data: data
})
}
//批量添加货站航班
/**
* @param goodsStation * 货站名称
* @param flightList * 航班号集合
*/
export function batchAddStationFlight(data) {
return request({
url: '/stationFlight/batchAddStationFlight',
method: 'post',
data: data
})
}
//批量删除货站航班
/**
* @param id * id集合
*/
export function batchDeleteGoods(data) {
return request({
url: '/stationFlight/batchDeleteGoods',
method: 'post',
data: data
})
}
\ No newline at end of file
import request from '@/utils/request'
// 首页数据获取
/**
* @param fltDate * 航班日期
* @param kindId 航班类型
*/
export function getOneDayFlight(data) {
return request({
url: '/index/getOneDayFlight',
method: 'post',
data: data
})
}
......@@ -129,7 +129,7 @@ export function addFlight(data) {
})
}
//虚拟航班新增
//虚拟航班删除
/**
* @param flightNo 航班名称 list *
*/
......@@ -139,4 +139,68 @@ export function delFlight(data) {
method: 'post',
data: data
})
}
//查询航线
/**
* @param fltNo 航班号
* @param page 页数
* @param size 页长
*/
export function queryRoute(data) {
return request({
url: '/dictionary/queryRoute',
method: 'post',
data: data
})
}
//新增航线
/**
* @param fltNo 航班号 *
* @param route 航线 *
*/
export function addRoute(data) {
return request({
url: '/dictionary/addRoute',
method: 'post',
data: data
})
}
//删除航线
/**
* @param id *
*/
export function delRoute(data) {
return request({
url: '/dictionary/delRoute',
method: 'post',
data: data
})
}
//航线排序
/**
* @param id *
*/
export function orderRoute(data) {
return request({
url: '/dictionary/orderRoute',
method: 'post',
data: data
})
}
//航线删除确认
/**
* @param fltNo 航班号
* @param route 航线
*/
export function checkFlightRoute(data) {
return request({
url: '/FlightPreserveController/checkFlightRoute',
method: 'post',
data: data
})
}
\ No newline at end of file
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1660113358419" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2396" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M393.846154 78.769231c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.76923-78.769231-35.446154-78.769231-78.76923 35.446154-78.769231 78.769231-78.769231z m236.307692 0c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.76923-78.769231-35.446154-78.769231-78.76923 35.446154-78.769231 78.769231-78.769231zM393.846154 315.076923c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.769231z m236.307692 0c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.769231zM393.846154 551.384615c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.769231z m236.307692 0c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.769231zM393.846154 787.692308c43.323077 0 78.769231 35.446154 78.769231 78.76923s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.76923z m236.307692 0c43.323077 0 78.769231 35.446154 78.769231 78.76923s-35.446154 78.769231-78.769231 78.769231-78.769231-35.446154-78.769231-78.769231 35.446154-78.769231 78.769231-78.76923z" p-id="2397"></path></svg>
\ No newline at end of file
......@@ -86,7 +86,7 @@ let ductLabels = {
"2_2": "已处理(数据丢弃)",
"2_3": "已处理(数据丢弃)",
"2_4": "已处理(数据丢弃)",
"3_1": "已处理(异常处理)",
// "3_1": "已处理(异常处理)",
"3_2": "处理失败(系统异常)",
"3_3": "处理失败(系统异常)",
"3_4": "处理失败(系统异常)",
......
This diff is collapsed. Click to expand it.
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
<span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title
}}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
</el-breadcrumb-item>
</transition-group>
......@@ -35,9 +36,9 @@ export default {
const first = matched[0]
if (!this.isDashboard(first)) {
matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
matched = [{ path: '/index', meta: { title: '首页' } }].concat(matched)
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
},
......@@ -46,7 +47,7 @@ export default {
if (!name) {
return false
}
return name.trim() === '首页'
return name.trim() === 'Index'
},
handleLink(item) {
const { redirect, path } = item
......
<template>
<!-- 拖拽交换位置效果 -->
<transition-group tag="div" class="container">
<div class="item" v-for="(item, index) in list" :key="index" draggable="true"
@dragstart="handleDragStart($event, item)" @dragover.prevent="handleDragOver($event, item)"
@dragenter="handleDragEnter($event, item)" @dragend="handleDragEnd($event, item)">
<svg-icon v-if="!disabled" icon-class="drag-text" class="el-input__icon input-icon" style="color:#bfbfbf" />
<span style="margin-right:20px">{{index}}</span>
<span>{{ item.route }}</span>
</div>
</transition-group>
</template>
<script>
// draggable 属性规定元素是否可拖动
// dragstart 事件在用户开始拖动元素或选择的文本时触发
// dragover 当某被拖动的对象在另一对象容器范围内拖动时触发此事件
// dragenter - 当被鼠标拖动的对象进入其容器范围内时触发此事件
// dragend - 用户完成元素拖动后触发
export default {
name: 'Toolbar',
props: {
routes: {
type: Array,
default: null
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
list: [],
dragging: null
}
},
created() {
this.list = this.routes
},
watch: {
routes(val) {
if (val) {
this.list = val
}
}
},
methods: {
handleDragStart(e, item) {
this.disabled ? '' : this.dragging = item;
},
handleDragEnd(e, item) {
this.disabled ? '' : this.dragging = null
},
//首先把div变成可以放置的元素,即重写dragenter/dragover
// DataTransfer 对象用来保存,通过拖放动作,拖动到浏览器的数据。
// 如果dropEffect 属性设定为none,则不允许被拖放到目标元素中。
handleDragOver(e) {
this.disabled ? '' : e.dataTransfer.dropEffect = 'move'// e.dataTransfer.dropEffect="move";//在dragenter中针对放置目标来设置!
},
handleDragEnter(e, item) {
if (!this.disabled) {
e.dataTransfer.effectAllowed = "move"//为需要移动的元素设置dragstart事件
if (item === this.dragging) {
return
}
const newItems = [...this.list]
const src = newItems.indexOf(this.dragging)
const dst = newItems.indexOf(item)
// 替换
newItems.splice(dst, 0, ...newItems.splice(src, 1))
// 让item的颜色等于新交换的颜色
this.list = newItems
this.$emit('drag', newItems)
}
}
}
}
</script>
<style lang="scss" scoped>
.container {
max-width: 350px;
min-height: 32px;
max-height: 150px;
overflow-y: scroll;
padding: 0;
border: 1px solid #ccc;
&::-webkit-scrollbar {
width: 7px;
height: 7px;
}
&::-webkit-scrollbar-track {
background-color: #fff;
}
&::-webkit-scrollbar-thumb {
background-color: #ccc;
border-radius: 20px;
}
&::-webkit-scrollbar-thumb:hover {
background-color: #409eff;
}
&::-webkit-scrollbar-track-piece {
background: #F2F6FC;
}
}
.item {
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
/* border-bottom: 1px solid #ccc; */
cursor: move;
transition: all linear .3s
}
.item:hover {
background-color: #c6e2ff;
}
</style>
\ No newline at end of file
......@@ -5,7 +5,7 @@
<i slot="suffix" class="el-icon-search el-input__icon" />
</el-input>
<div class="icon-list">
<div v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)">
<div :class="name == item?'selectIcon':''" v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)">
<svg-icon :icon-class="item" style="height: 30px;width: 16px;" />
<span>{{ item }}</span>
</div>
......@@ -31,6 +31,7 @@ export default {
}
},
selectedIcon(name) {
this.name = name
this.$emit('selected', name)
document.body.click()
},
......@@ -65,4 +66,7 @@ export default {
}
}
}
.selectIcon{
border:1px solid #ccc;
}
</style>
......
<template>
<div class="top-right-btn">
<el-row>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()" />
<el-tooltip
class="item"
effect="dark"
:content="showSearch ? '隐藏搜索' : '显示搜索'"
placement="top"
>
<el-button
:size="size"
circle
icon="el-icon-search"
@click="toggleSearch()"
/>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" />
<el-button
:size="size"
circle
icon="el-icon-refresh"
@click="refresh()"
/>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns">
<el-button size="mini" circle icon="el-icon-menu" @click="showColumn()" />
<el-tooltip
class="item"
effect="dark"
content="显隐列"
placement="top"
v-if="columns"
>
<el-button
:size="size"
circle
icon="el-icon-menu"
@click="showColumn()"
/>
</el-tooltip>
</el-row>
<el-dialog :title="title" :visible.sync="open" append-to-body>
......@@ -42,6 +68,10 @@ export default {
columns: {
type: Array,
},
size: {
type: String,
default: "mini",
},
},
created() {
// 显隐列初始默认隐藏列
......
......@@ -14,7 +14,7 @@ import permission from './directive/permission'
import './assets/icons' // icon
import './permission' // permission control
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree, upCase, nowDate } from "@/utils/FedEx";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree, upCase, nowDate, getRoute } from "@/utils/FedEx";
import { isArray } from "@/utils/validate";
import Pagination from "@/components/Pagination";
// 自定义表格工具扩展
......@@ -22,8 +22,9 @@ import RightToolbar from "@/components/RightToolbar"
import Table from "@/components/Table"
import Tooltip from "@/components/Tooltip"
import HeaderSetting from "@/components/HeaderSetting"
import Drag from "@/components/Drag"
import tableHeaders from '@/assets/languages/tableHeaders'
import dictLabels from "@/assets/languages/dictLabels.js";
import dictLabels from "@/assets/languages/dictLabels.js"
import settings from './settings.js'
// 全局方法挂载
......@@ -36,6 +37,7 @@ Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.upCase = upCase
Vue.prototype.nowDate = nowDate
Vue.prototype.getRoute = getRoute
Vue.prototype.isArray = isArray
Vue.prototype.tableHeaders = tableHeaders
Vue.prototype.dictLabels = dictLabels
......@@ -63,6 +65,7 @@ Vue.component('RightToolbar', RightToolbar)
Vue.component('Tables', Table)
Vue.component('Tooltips', Tooltip)
Vue.component('HeaderSetting', HeaderSetting)
Vue.component('Drag', Drag)
Vue.use(permission)
/**
......
......@@ -74,19 +74,13 @@ export const constantRoutes = [
redirect: 'noredirect',
children: [
{
path: '/flightAllocConfig/:handle/:id',
path: '/info/:handle/:fltNo-:fltDate',
component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
name: 'FlightAllocConfigInfo',
meta: { title: '航班配舱', icon: 'user', breadcrumb: true }
meta: { title: '航班配舱', icon: 'user' }
},
{
path: '/flightAllocConfig/:handle',
component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
name: 'FlightAllocConfigAdd',
meta: { title: '添加航班配舱', icon: 'user', breadcrumb: false }
},
{
path: '/weatherTable',
path: '/weatherTable/:awbNbr',
component: (resolve) => require(['@/views/systemLog/dmLog/weatherTable'], resolve),
name: 'weatherTable',
meta: { title: '流水表', icon: 'user' }
......
......@@ -58,5 +58,5 @@ module.exports = {
/**
* 版本号
*/
version: 'version:1.5.0'
version: 'version:1.6.0'
}
......
<template>
<div class="cargoAllocation">
<el-form ref="form" v-model="formData" class="form-header" label-position="right" label-width="auto" size="small">
<el-form ref="form" v-model="formData" class="form-header" label-position="right" label-width="auto" size="small"
@submit.native.prevent>
<el-row type="flex" style="flexWrap: wrap !important">
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
......@@ -11,7 +12,8 @@
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input v-model="fltNo" placeholder="请输入ACCS原航班号" class="formItem" clearable></el-input>
<el-input v-model="fltNo" placeholder="请输入ACCS原航班号" class="formItem" clearable @change="fltNoChange">
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
......@@ -116,6 +118,23 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<template slot="label">
<div style="display:inline-block">ACCS航线
<el-tooltip class="item" effect="dark" content="选择航线需要先输入航班号,才能选择对应得航线" placement="top-start">
<span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span>
</el-tooltip>
</div>
</template>
<el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0"
clearable>
<el-option v-for="item in routeList" :label="item" :value="item" :key="item">
<Tooltips :content="item" :refName="item"></Tooltips>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运单号">
<el-input class="formItem" type="textarea" :rows="4" placeholder="请输入运单号(回车分割)" :maxlength="12000"
v-model="formData.waybillNo" clearable></el-input>
......@@ -159,12 +178,12 @@
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="mini" v-hasPermi="['allocation:cargo:allocation']" @click="addFit"
:disabled="tableSelection.length <= 0">添加到航班</el-button>
......@@ -187,7 +206,7 @@
<script>
import Dialog from "./info.vue";
import { findConditionData, findCargoAllocationData } from "@/api/cargoSelect";
import { findConditionData, findCargoAllocationData, getAccsRoute } from "@/api/cargoSelect";
import { allDictData } from "@/api/destinationFlight";
import { downLoadXlsx } from "@/utils/zipdownload";
......@@ -203,6 +222,7 @@ export default {
fltDateEnd: null,
typeId: null,
portName: null,
rtoue: null,
statusId: null,
kindToAllocFlightId: null,
serviceTypeId: null,
......@@ -230,6 +250,7 @@ export default {
SubCategory: [],
}, //查询条件
fltDate: [],
routeList: [],
ursaList: "",
siteNameList: "",
handingCodes: [],
......@@ -263,6 +284,8 @@ export default {
}
},
activated() {
this.tableSelection = []
this.cargoTotal()
this.seleData();
this.select();
},
......@@ -485,6 +508,19 @@ export default {
this.tableHeader = this.$store.getters.tableHeader['allocationCargo']
})
}
},
//获取航班号航线
fltNoChange(val) {
this.routeList = []
getAccsRoute({ fltNoAccs: val }).then(res => {
if (res.code === 200) {
this.routeList = res.data
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}
},
computed: {
......@@ -524,7 +560,7 @@ export default {
};
</script>
<style lang="scss">
<style lang="scss" scoped>
.tips {
display: inline-block;
color: #606266;
......
......@@ -11,16 +11,31 @@
:label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter">
</el-table-column>
</el-table>
<el-form ref="form" label-position="right" label-width="auto" style="width: 400px; margin: 30px auto"
:model="formData" :rules="rules">
<el-form ref="form" class="form-header" label-position="right" label-width="auto"
style="width: 400px; margin: 30px auto" :model="formData" :rules="rules">
<el-form-item label="航班号" prop="fltNo">
<el-input v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="10" style="width: 350px"></el-input>
<el-input class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="10"
style="width: 350px" @change="dateChange"></el-input>
</el-form-item>
<el-form-item label="航班日期:" prop="fltDate">
<el-date-picker v-model="formData.fltDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"
size="medium" style="width: 350px">
<el-date-picker class="formItem" v-model="formData.fltDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" size="medium" style="width: 350px" @change="dateChange">
</el-date-picker>
</el-form-item>
<el-form-item prop="route">
<template slot="label">
<div style="display:inline-block">航线:
<el-tooltip class="item" effect="dark" content="选择航线需要先输入航班号和航班日期,才能选择对应得航线" placement="top-start">
<span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span>
</el-tooltip>
</div>
</template>
<el-select class="formItem" v-model="formData.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>
</el-select>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogBeforeClose">取 消</el-button>
......@@ -31,7 +46,7 @@
</template>
<script>
import { allocationFlight } from "@/api/cargoSelect";
import { allocationFlight, findFlightRoute } from "@/api/cargoSelect";
export default {
props: {
......@@ -50,6 +65,7 @@ export default {
ids: [],
fltNo: undefined,
fltDate: undefined,
route: undefined,
overweight: false,
},
cargoHeader: [
......@@ -68,6 +84,7 @@ export default {
{ name: "创建人", value: "createUserName" },
{ name: "创建时间", value: "createTime" },
],
routeList: [],
rules: {
fltNo: [
{
......@@ -83,6 +100,13 @@ export default {
trigger: "blur",
},
],
route: [
{
required: true,
message: "航线不能为空",
trigger: "blur",
},
],
},
loading: false,
};
......@@ -93,8 +117,11 @@ export default {
ids: [],
fltNo: undefined,
fltDate: undefined,
route: undefined,
flightId: undefined,
overweight: false,
};
this.routeList = []
},
//确定配舱
submit() {
......@@ -104,6 +131,11 @@ export default {
arr.push(item.id);
});
this.formData.ids = arr;
this.routeList.forEach(item => {
if (item.route === this.formData.route) {
this.formData.flightId = item.id
}
})
if (this.formData.fltNo && this.formData.fltDate) {
allocationFlight(this.formData).then((res) => {
this.loading = false;
......@@ -165,6 +197,35 @@ export default {
}
}
return cellValue
},
//日期选择变化
dateChange(val) {
this.routeList = []
if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') {
if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') {
let obj = {
fltNo: this.formData.fltNo,
fltDate: this.formData.fltDate,
}
findFlightRoute(obj).then(res => {
if (res.code === 200) {
res.data[0].route.indexOf(';') <= 0 ?
this.routeList = res.data :
res.data[0].route.split(';').forEach(item => {
this.routeList.push({ id: res.data[0].id, route: item })
})
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
} else {
this.msgWarning('航班日期不能为空')
}
} else {
this.msgWarning('航班号不能为空')
}
}
},
computed: {
......@@ -181,4 +242,5 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
......
<template>
<div>
<el-dialog title="航线优先级排序" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
<el-form ref="routeOrder" label-width="auto" label-position="left" size="small" @submit.native.prevent>
<el-form-item label="航班号:" prop="fltNo">
<span>{{ fltNo }}</span>
</el-form-item>
<el-form-item label="航班日期:" prop="fltDate">
<span>{{ fltDate }}</span>
</el-form-item>
<el-form-item label="航线优先级" prop="route">
<Drag :routes="routeList" @drag="drag"></Drag>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { allRouteQuery, saveOrUpdateSpecifyDateRoute } from "@/api/destinationFlight";
export default {
name: "",
props: {
open: {
type: Boolean,
default: false
},
fltData: {
type: Object,
default: null
}
},
data() {
return {
fltNo: '',
fltDate: '',
routeList: [],
submitData: [],
loading: false
}
},
watch: {
open(val) {
if (val) {
this.fltNo = this.fltData.fltNo
this.fltDate = this.fltData.fltDate
allRouteQuery({
fltNo: this.fltNo,
routeDate: this.fltDate
}).then(res => {
if (res.code === 200) {
this.routeList = res.data.list
this.submitData = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}
}
},
methods: {
submit() {
saveOrUpdateSpecifyDateRoute(this.submitData).then(res => {
if (res.code === 200) {
this.msgSuccess('保存成功')
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
close() {
this.$emit('close')
},
drag(val) {
val.forEach((item, index) => {
item.ordinal = index + 1
})
this.submitData = val
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-form ref="flightAllocForm" :inline="true" :model="queryParams" class="form-header" size="medium"
label-position="right" label-width="auto">
label-position="right" label-width="auto" @submit.native.prevent>
<el-form-item label="航班号">
<el-input v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList"></el-input>
</el-form-item>
<el-form-item label="航班日期">
<el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="queryParams.status" placeholder="状态">
<el-option label="有效" value="1"></el-option>
......@@ -18,8 +23,8 @@
<el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']"
@click="
$router.push({
name: 'FlightAllocConfigAdd',
params: { handle: 'add' },
name: 'FlightAllocConfigInfo',
params: { handle: 'add', fltNo: 'new', fltDate: ' ',status:null },
})
">添加</el-button>
</div>
......@@ -28,47 +33,61 @@
:order="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limit"
:limitStart="queryParams.start" :page="curPage" :pageSizes="[20]" :height="tableHeight"
@currentChange="currentChange">
<template v-slot:ruleDate="scope">
<el-link v-if="scope.row.ruleDate" type="primary" @click="toRouteOrder(scope.row)">
{{
scope.row.ruleDate
}}<i class="el-icon-link"></i> </el-link>
</template>
<template slot="optionColumn">
<el-table-column label="操作" prop="id" align="center">
<el-table-column label="操作" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row.id, 'detail')">查看
<el-button type="text" size="mini" icon="el-icon-view"
@click="handleClick(scope.row.purposeOfFlightNo, 'detail', scope.row.ruleDate, scope.row.status)">查看
</el-button>
<el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']"
@click="handleClick(scope.row.id, 'update')">修改</el-button>
<el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949"
@click="handleClick(scope.row.purposeOfFlightNo, 'update', scope.row.ruleDate, scope.row.status)">修改
</el-button>
<!-- <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button>
<el-button type="text" size="mini" icon="el-icon-video-pause" v-hasPermi="['allocation:alloc:openClose']"
@click="changeStatus(scope.row.id, 3)" v-if="scope.row.status == '1'">停用</el-button>
<el-button type="text" size="mini" icon="el-icon-video-play" v-hasPermi="['allocation:alloc:openClose']"
@click="changeStatus(scope.row.id, 1)" v-else>启用</el-button>
@click="changeStatus(scope.row.id, 1)" v-else>启用</el-button> -->
</template>
</el-table-column>
</template>
</Tables>
<Dialog :fltData="colData" :open="open" @close="close"></Dialog>
</div>
</template>
<script>
import {
findFlightNo,
delFlightId,
enableOrDisable,
findFlightDimRuleByFlightNo
} from "@/api/destinationFlight";
import Dialog from './dialog.vue'
export default {
name: "FlightAllocConfig",
components: {
Dialog
},
data() {
return {
queryParams: {
purposeOfFlightNo: "",
purposeOfFlightNo: null,
flightDate: undefined,
status: "1",
start: 0,
limit: 20,
},
flyList: [],
colData: {},
curPage: 1,
total: 0,
tableHeight: null,
open: false,
loading: false,
};
},
......@@ -94,66 +113,36 @@ export default {
this.queryParams.start = 0;
}
this.loading = true;
findFlightNo(this.queryParams).then((response) => {
if (response.code != 200) {
this.msgWarning(response.msg)
return;
findFlightDimRuleByFlightNo(this.queryParams).then(res => {
this.loading = false
if (res.code === 200) {
this.flyList = res.data.list
this.total = res.data.totalCount
} else {
this.msgWarning(res.msg)
}
this.flyList = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
});
}).catch(err => {
this.loading = false
console.log(err)
})
},
//跳转到查看,修改页面
handleClick(flightiId, handle) {
handleClick(fltNo, handle, fltDate, status) {
this.$router.push({
name: "FlightAllocConfigInfo",
params: { handle: handle, id: flightiId },
params: { handle: handle, fltNo: fltNo, fltDate: fltDate ? fltDate : null, status: status },
});
},
//删除规则
del(id, status) {
if (status == "1") {
this.$confirm("航班规则生效中,无法删除,请停用后再操作", "警告", {
confirmButtonText: "确定",
showCancelButton: false,
type: "warning",
});
} else {
this.$confirm("是否确认删除此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
showCancelButton: true,
type: "warning",
}).then(() => {
delFlightId(id)
.then((res) => {
res.code === 200 ? this.msgSuccess(res.msg) : this.msgWarning(res.msg)
this.getList()
})
.catch(() => { });
});
//航班优先级修改
toRouteOrder(val) {
this.colData = {
fltNo: val.purposeOfFlightNo,
fltDate: val.ruleDate
}
this.open = true
},
//启用,停用
changeStatus(id, status) {
let tip = status === 1 ? "启用" : "停用";
this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
enableOrDisable(id, status)
.then((res) => {
if (res.code != 200) {
this.msgError(res.msg);
} else {
this.getList();
this.msgSuccess(tip + "成功");
}
})
.catch(() => { });
});
close() {
this.open = false
},
//翻页
currentChange(val) {
......
......@@ -55,14 +55,15 @@
</el-form>
<el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData">
<el-table-column label="运单号" align="center" prop="waybillNo" />
<el-table-column label="申报类别" align="center" prop="typeName" />
<el-table-column label="件数" align="center" prop="qty" width="70" />
<el-table-column label="实际重量" align="center" prop="actualWeight" width="100" />
<el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" />
<el-table-column label="航班日期" align="center" prop="fltDate" />
<el-table-column label="航班号" align="center" prop="fltNo" width="100" />
<el-table-column label="航班路线" align="center" prop="route" />
<el-table-column label="配置航班类型" align="center" prop="kindName" width="130" />
<el-table-column label="尺寸" align="center" prop="sizeStr" width="70" />
<el-table-column label="件数" align="center" prop="qty" width="70" />
<el-table-column label="实际重量" align="center" prop="actualWeight" width="100" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
</el-table>
<pagination v-show="total > 0" :total="total" layout=" prev, pager, next, jumper, sizes,total"
......
<template>
<div>
<el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
<el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
<el-form-item label="货站名称" prop="goodsStation">
<el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称">
</el-input>
</el-form-item>
<el-form-item label="品名" prop="goodsList">
<el-input type="textarea" v-model="formData.goodsList" rows="4" maxlength="125"
placeholder="请输入品名,多个用“;”隔开">
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { batchAddGoods } from "@/api/goodsStation"
export default {
name: '',
props: {
open: {
type: Boolean,
default: false
},
},
data() {
return {
formData: {
goodsStation: null,
goodsList: null
},
rules: {
goodsStation: [
{
required: true,
message: "货站名称不能为空",
trigger: "blur",
},
],
goodsList: [
{
required: true,
message: "品名不能为空",
trigger: "blur",
},
],
},
loading: false,
}
},
watch: {
},
methods: {
//提交
submit() {
let obj = {}
obj.goodsStation = this.formData.goodsStation
this.formData.goodsList = this.formData.goodsList.replace(/;/g, ";")
if (this.formData.goodsList != null && this.formData.goodsList != '') {
obj.goodsList = this.formData.goodsList.split(';')
}
this.$refs['addForm'].validate(val => {
if (val) {
this.loading = true
batchAddGoods(obj).then(res => {
this.loading = false
if (res.code === 200) {
this.msgSuccess('添加成功')
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
}
})
},
//取消
close() {
this.formData = {
goodsStation: null,
goodsList: null
}
this.$refs["addForm"].clearValidate();
this.$emit('close')
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-form class="form-header" ref="selectForm" label-width="auto" label-position="left"
style="margin-bottom:10px" @submit.native.prevent size="small">
<el-row>
<el-col :span="6">
<el-form-item label="货站名称">
<el-input v-model="selectionData.goodsStation" 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:goodsStation:add']"
@click="add">新 增
</el-button>
<el-button icon="el-icon-delete" type="danger" size="small" v-hasPermi="['base:goodsStation: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-right:10px"
@click="downloadTempleate">下载模板
</el-button>
<el-upload action="/caPreReviewImport/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:goodsStation:add']">
<el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button>
</el-upload>
</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:goodsStation:delete']" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</template>
</Tables>
<Dialog :open="open" @close="close" />
<UpDateResult :dialogVisible="resultOpen" :resultData="errorData" @close="resultClose" />
</div>
</template>
<script>
import { downLoadTemplate } from "@/api/flightInfoImport";
import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation"
import Dialog from './dialog.vue'
import UpDateResult from './upDateResult.vue'
export default {
name: 'GoodsStation',
components: {
Dialog,
UpDateResult
},
data() {
return {
selectionData: {
goodsStation: '',
size: 20,
page: 1
},
tableData: [],
tableHeader: this.tableHeaders['goodsStation'],
checkData: [],
fileList: [],
errorData: [],
tableHeight: null,
totalCount: 0,
loading: false,
open: false,
resultOpen: 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
},
//删除
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)
})
},
//复选
tableSelect(val) {
this.checkData = val.selection
},
//全选
tableSelectAll(val) {
this.checkData = val
},
//分页
currentChange(val) {
this.selectionData.page = val.page
this.selection()
},
//上传excel
uploadExcel(option) {
const file = option.file;
this.loading = true;
importGoods(file, '').then((res) => {
this.loading = false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else {
this.$message.warning(res.msg);
this.errorData = res.data;
if (this.errorData.length > 0) {
this.resultOpen = true
}
}
} else {
this.$message.success(res.msg);
this.errorData = res.data;
this.selection(1)
}
});
},
//下载模板
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);
},
close() {
this.open = false
this.selection(1)
},
resultClose() {
this.resultOpen = false
this.selection(1)
}
}
}
</script>
<style lang="scss" scoped>
.upload-demo {
display: flex;
.el-upload-list__item:first-child {
margin-top: 5px !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
<template>
<div>
<el-dialog title="新 增" :visible.sync="dialogVisible" width="50%" top="1vh" :close-on-click-modal="false"
:show-close="false" append-to-body center>
<el-table ref="filterTable" class="mt20" :data="resultData" size="small" border>
<el-table-column label="行号" prop="line" width="50" align="center">
</el-table-column>
<el-table-column label="错误信息" prop="errorMessage" width="200">
<template slot-scope="scope">
<div v-for="(m, key) in scope.row.errorMessage" :key="key">
{{ m }}
</div>
</template>
</el-table-column>
<el-table-column v-if="resultData.length == 0"></el-table-column>
<el-table-column v-for="(value, key) in this.resultData[0]" :key="key"
v-if="key != 'errorMessage' && key != 'line'" header-align="center" align="center" :label="key"
:prop="key"></el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'UpDateResult',
props: {
dialogVisible: {
type: Boolean,
default: false
},
resultData: {
type: Array,
default: null
}
},
data() {
return {
}
},
wactch: {
dialogVisible(val) {
if (val) {
}
}
},
methods: {
close() {
this.$emit('close')
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
<el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
<el-form-item label="货站名称" prop="goodsStation">
<el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称">
</el-input>
</el-form-item>
<el-form-item label="航班" prop="flightList">
<el-input type="textarea" v-model="flightList" rows="4" maxlength="125" placeholder="请输入航班,多个用“;”隔开">
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { batchAddStationFlight } from '@/api/goodsStationFlight'
export default {
name: '',
props: {
open: {
type: Boolean,
default: false
},
},
data() {
return {
formData: {
goodsStation: null,
flightList: null
},
rules: {
goodsStation: [
{
required: true,
message: "货站名称不能为空",
trigger: "blur",
},
],
flightList: [
{
required: true,
message: "航班号不能为空",
trigger: "blur",
},
],
},
loading: false,
}
},
watch: {
},
methods: {
//提交
submit() {
let obj = {}
obj.goodsStation = this.formData.goodsStation
if (this.formData.flightList != null && this.formData.flightList != '') {
this.formData.flightList = this.formData.flightList.toUpperCase()
obj.flightList = this.formData.flightList.split(';')
}
this.$refs['addForm'].validate(val => {
if (val) {
this.loading = true
batchAddStationFlight(obj).then(res => {
this.loading = false
if (res.code === 200) {
this.msgSuccess('添加成功!')
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
}
})
},
//取消
close() {
this.formData = {
goodsStation: null,
flightList: null
}
this.$refs["addForm"].clearValidate();
this.$emit('close')
}
},
computed: {
flightList: {
get: function () {
return this.formData.flightList
},
set: function (val) {
const reg = /^([a-zA-Z0-9]{0,40}(\;[a-zA-Z0-9]{0,40})*)$/
if (reg.test(val)) {
this.formData.flightList = val
}
},
},
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-form class="form-header" ref="dictForm" label-width="auto" label-position="left" style="margin-bottom:10px"
@submit.native.prevent size="small">
<el-row>
<el-col :span="6">
<el-form-item label="货站名称">
<el-input v-model="selectionData.goodsStation" 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" :loading="loading" type="primary" size="small" @click="selection(1)">查 询
</el-button>
<el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['base:goodsStationFlight:add']"
@click="add">新 增
</el-button>
<el-button icon="el-icon-delete" type="danger" size="small" style="margin:0 10px"
:disabled="checkData.length == 0" v-hasPermi="['base:goodsStationFlight:delete']" @click="batchDel">
删 除
</el-button>
</div>
<Tables ref="goodsStationFlight" ductName="goodsStationFlight" :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:goodsStationFlight:delete']" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</template>
</Tables>
<Dialog :open="open" @close="close" />
</div>
</template>
<script>
import { searchStationFlight, batchDeleteGoods } from '@/api/goodsStationFlight'
import Dialog from './dialog.vue'
export default {
name: 'GoodsStationFlight',
components: {
Dialog
},
data() {
return {
selectionData: {
size: 20,
page: 1
},
tableData: [],
tableHeader: this.tableHeaders['goodsStationFlight'],
checkData: [],
tableHeight: null,
totalCount: 0,
loading: false,
open: false,
}
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.goodsStationFlight.$el.offsetHeight - 200
this.selection(1)
},
watch: {
$route(to, from) {
if (to.name == 'GoodsStationFlight') {
this.selection()
}
}
},
methods: {
//查询
selection(val) {
this.tableData = []
this.checkData = []
this.loading = true
if (val == 1) {
this.selectionData.page = 1
}
searchStationFlight(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 => {
his.loading = false
console.log(err)
})
},
add() {
this.open = true
},
//删除
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)
})
},
//复选
tableSelect(val) {
this.checkData = val.selection
},
//全选
tableSelectAll(val) {
this.checkData = val
},
//分页
currentChange(val) {
this.selectionData.page = val.page
this.selection()
},
close() {
this.open = false
this.selection(1)
}
}
}
</script>
<style lang="scss" scoped>
</style>
......@@ -16,10 +16,10 @@
</el-col>
</el-row>
</el-form>
<Tables ref="cargoLog" ductName="cargoLog" :order="false" :data="data.tableData" :headerData="tableHeader"
tableAlign="center" :showOverflowTooltip="false" :height="tableHeight" :page="selectData.page"
:limitSize="selectData.size" :pageSizes="[100]" :pagination="false" :loading="loading"
@currentChange="currentChange">
<Tables ref="cargoLog" ductName="cargoLog" :order="false" :border='false' :data="data.tableData"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false" :height="tableHeight"
:page="selectData.page" :limitSize="selectData.size" :pageSizes="[100]" :pagination="false"
:loading="loading" @currentChange="currentChange">
</Tables>
<div slot="footer" class="dialog-footer">
<el-button @click="close">关 闭</el-button>
......@@ -93,4 +93,5 @@ export default {
</script>
<style scoped>
</style>
\ No newline at end of file
......
......@@ -49,7 +49,7 @@
<el-col :span="6">
<el-form-item label="配载航班号">
<el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :rows="4"
clearable></el-input>
clearable @change="planeNoChange"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
......@@ -129,6 +129,24 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<template slot="label">
<div style="display:inline-block">配载航线
<el-tooltip class="item" effect="dark" content="选择航线需要先输入配载航班号,才能选择对应得航线" placement="top-start">
<span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span>
</el-tooltip>
</div>
</template>
<el-select class="formItem" v-model="formData.cargoPlaneRoute" placeholder="不限"
:disabled="routeList.length == 0" clearable @change="routeSelectChange"
:key="formData.cargoPlaneRoute">
<el-option v-for="(item, index) in routeList" :label="item" :value="item" :key="item">
<Tooltips :content="item" :refName="item"></Tooltips>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
......@@ -137,11 +155,11 @@
</el-button>
<el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="small" @click="xlse(0)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="small" @click="xlse(1)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']"
@click="release">释放舱位</el-button>
......@@ -170,7 +188,7 @@
<template v-slot:waybillNo="scope">
<el-link type="primary" @click="logView(scope.row)">
{{
scope.row.waybillNo
scope.row.waybillNo
}}<i class="el-icon-link"></i> </el-link>
</template>
</Tables>
......@@ -192,7 +210,7 @@
</template>
<script>
import { findConditionData, findCargoData, releaseCargo } from "@/api/cargoSelect";
import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes } from "@/api/cargoSelect";
import { downLoadXlsx } from "@/utils/zipdownload";
import Dialog from "./dialog.vue";
......@@ -229,6 +247,7 @@ export default {
cargoPlaneNo: null,
cargoPlaneStart: null,
cargoPlaneEnd: null,
cargoPlaneRoute: null,
limitStart: 1,
limitSize: 100,
}, //表单数据
......@@ -286,8 +305,9 @@ export default {
findConditionData: {}, //货物查询条件
tableData: [], //表格数据
cargoLog: {},
allWeight: 0,
allQty: 0,
routeList: [],
allWeight: 0,//总重量
allQty: 0,//总件数
shiftKey: false,
valueFormat: "yyyy-MM-dd",
tableLoading: false,
......@@ -323,14 +343,54 @@ export default {
activated() {
this.selectTable = []
this.cargoTotal()
//否则请求原页面缓存状态
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() : ''
}
})
if (this.$route.params.fltNo) {
//判断进入页面是否带参,确定是否是index跳转
this.formData = {
fltDateStart: "",
fltDateEnd: "",
prematchFltDateStart: "",
prematchFltDateEnd: "",
createTimeStart: null,
createTimeEnd: null,
pickUpDate: null,
hasFlight: null,
waybillNo: "",
siteName: "",
fltNo: "",
mawbCode: "",
ursa: "",
typeId: null,
statusId: null,
serviceTypeId: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
dataSources: "",
customsReceiptStatusId: null,
big: null,
cargoPlaneNo: null,
cargoPlaneStart: null,
cargoPlaneEnd: null,
limitStart: 1,
limitSize: 100,
}
this.cargoPlaneTime = [this.$route.params.fltDate, this.$route.params.fltDate]
this.formData.cargoPlaneStart = this.$route.params.fltDate
this.formData.cargoPlaneEnd = this.$route.params.fltDate
this.formData.cargoPlaneNo = this.$route.params.fltNo
this.formData.cargoPlaneRoute = this.$route.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
} else {
//否则请求原页面缓存状态
if (this.$store.state.tagsView.cachedViews.length > 0) {
this.$store.state.tagsView.cachedViews.forEach(item => {
if (item === 'QueryCargo') {
this.findCondition()
this.totalCount > 0 ? this.select() : ''
}
})
}
}
},
......@@ -352,6 +412,48 @@ export default {
this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50
},
watch: {
$route: {
handler(to, from) {
if (to.name === 'Index') {
this.formData = {
fltDateStart: "",
fltDateEnd: "",
prematchFltDateStart: "",
prematchFltDateEnd: "",
createTimeStart: null,
createTimeEnd: null,
pickUpDate: null,
hasFlight: null,
waybillNo: "",
siteName: "",
fltNo: "",
mawbCode: "",
ursa: "",
typeId: null,
statusId: null,
serviceTypeId: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
dataSources: "",
customsReceiptStatusId: null,
big: null,
cargoPlaneNo: null,
cargoPlaneStart: null,
cargoPlaneEnd: null,
limitStart: 1,
limitSize: 100,
}
this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate]
this.formData.cargoPlaneStart = from.params.fltDate
this.formData.cargoPlaneEnd = from.params.fltDate
this.formData.cargoPlaneNo = from.params.fltNo
this.formData.cargoPlaneRoute = from.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
}
}
},
formShow(val, oldVal) {
this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 120
},
......@@ -384,20 +486,22 @@ export default {
}
findCargoData(this.formData)
.then((res) => {
if (res.code == 200) {
this.tableData = res.data.list;
this.totalCount = res.data.totalCount;
if (res.data.list.length > 0) {
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].index = i;
setTimeout(() => {
if (res.code == 200) {
this.tableData = res.data.list;
this.totalCount = res.data.totalCount;
if (res.data.list.length > 0) {
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].index = i;
}
} else {
this.msgWarning('未查询到数据')
}
} else {
this.msgWarning('未查询到数据')
this.msgWarning(res.msg)
}
} else {
this.msgWarning(res.msg)
}
this.tableLoading = false;
this.tableLoading = false;
})
})
.catch(() => {
this.tableLoading = false;
......@@ -526,6 +630,22 @@ export default {
this.page = val.page;
this.select();
},
//配载航班号获取航线
planeNoChange(val) {
getFlightsRoutes(val.split(';')).then(res => {
if (res.code === 200) {
this.routeList = res.data
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
routeSelectChange(val) {
this.$forceUpdate()
// this.formData.cargoPlaneRoute = val
},
//排序
sortChange(val) {
let data = [];
......
<template>
<div></div>
<div style="padding:10px" v-loading="loading">
<!-- 配舱汇总信息 -->
<el-card class="mb10" ref="card1">
<el-divider content-position="left">今日配舱汇总</el-divider>
<el-row :gutter="10">
<el-col :span="6">
<div class="allInformation">
<div class="informationItem">航班总重量(KG)</div>
<div class="informationNum">{{ totalWeight }}</div>
</div>
</el-col>
<el-col :span="6">
<div class="allInformation">
<div class="informationItem">已配重量(KG)</div>
<div class="informationNum">{{ allocationWeight }}</div>
</div>
</el-col>
<el-col :span="6">
<div class="allInformation">
<div class="informationItem">配舱比例(百分比)</div>
<div class="informationNum">{{ (percentage == 0 ? 0 : ((percentage) * 100).toFixed(2)) + '%' }}</div>
</div>
</el-col>
</el-row>
</el-card>
<!-- 今日航班box -->
<el-card class="mb10" ref="card2">
<el-form ref="indexForm" size="mini" inline @submit.native.prevent>
<el-form-item label="配载航班日期">
<el-date-picker v-model="selectData.fltDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"
:clearable="false" @change="getFlight">
</el-date-picker>
</el-form-item>
<el-form-item label="航班种类">
<el-select v-model="selectData.kindId" placeholder="不限" @change="getFlight" clearable>
<el-option v-for="item in fltKindIdList" :label="item.englishName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-refresh" :loading="loading" @click="getFlight"></el-button>
</el-form-item>
</el-form>
<el-row class="card2">
<el-col :span="1" v-for="item in fltBox">
<div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate, route: '' })"
:style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 100 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }">
<div class="fltName">{{ item.fltNo }}</div>
<div class="fltWeight">{{ (item.percentage == 0 ? 0 : ((item.percentage) * 100).toFixed(2)) + '%' }}
</div>
</div>
</el-col>
</el-row>
<!-- 各航班配舱进度详情 -->
<el-divider content-position="left">各航班配舱进度</el-divider>
<Tables ref="indexTable" ductName="indexTable" :order="true" :data="tableData" :headerData="tableHeader"
tableAlign="center" :showOverflowTooltip="false" :height="tableHeight" :totalCount="total"
:page="selectData.page" :limitSize="selectData.size" :pageSizes="[100]" :pagination="false"
@currentChange="currentChange" @rowClick="rowClick">
<template v-slot:percentage="scope">
<el-progress stroke-width="100"
:color="(scope.row.percentage * 100).toFixed(2) >= 100 ? '#13ce66' : (scope.row.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949'"
:stroke-width="18"
:percentage="scope.row.percentage == 0 ? 0 : Number((scope.row.percentage * 100).toFixed(2))">
</el-progress>
</template>
</Tables>
</el-card>
</div>
</template>
<script>
import { filghtKindData } from "@/api/flightInfoImport";
import { getOneDayFlight } from '@/api/home.js'
export default {
name: 'Index',
props: {
user: {
type: Object,
},
type: Object
}
},
data() {
return {
selectData: {
fltDate: null,
kindId: null,
page: 1,
size: 1
},//查询条件
fltBox: [],
tableData: [],//table数据
tableHeader: this.tableHeaders['index'],//表头
fltKindIdList: [],//航班类型
percentage: 0,//配舱比例
totalWeight: 0,//航班总重量
allocationWeight: 0,//航班已配重量
type: "",
tableHeight: null,
total: 0,
loading: false,
};
},
created() {
this.selectData.fltDate = this.nowDate();
this.getFltKindId()
},
// activated() {
// this.getFlight()
// },
mounted() {
this.tableHeight = window.innerHeight - this.$refs.card1.$el.offsetHeight - this.$refs.indexForm.$el.offsetHeight - 350
this.getFlight()
},
methods: {
//获取航班类型
async getFltKindId() {
filghtKindData().then(res => {
if (res.code === 200) {
this.fltKindIdList = res.data
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//获取首页信息(日期查询)
async getFlight() {
this.fltBox = []
this.loading = true
getOneDayFlight(this.selectData).then(res => {
this.loading = false
if (res.code === 200) {
this.getfltBox(JSON.parse(JSON.stringify(res.data.list)))
this.tableData = res.data.list
this.percentage = res.data.percentage
this.totalWeight = res.data.totalWeight
this.allocationWeight = res.data.allocationWeight
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
getfltBox(val) {
val.forEach(flt => {
let status = 1
this.fltBox.forEach(item => {
if (item.fltNo == flt.fltNo) {
item.percentage = flt.percentage + item.percentage
status = 2
}
})
if (status == 1) {
this.fltBox.push(flt)
}
})
},
//某行被点击
rowClick(val) {
let obj = {}
obj.fltNo = val.fltNo
obj.fltDate = val.fltDate
if (val.flightKindName == 'Purple Tail') {
obj.route = ''
} else {
obj.route = val.route
}
this.$router.push({ name: 'QueryCargo', params: obj })
},
//翻页
currentChange(val) { },
},
};
</script>
<style lang="scss" scoped>
.cardTop {
height: 400px;
margin: 10px;
padding: 10px;
overflow: auto;
&::-webkit-scrollbar {
height: 5px;
width: 5px;
}
&::-webkit-scrollbar-track {
background-color: #fff;
}
&::-webkit-scrollbar-thumb {
background-color: #ccc;
}
&::-webkit-scrollbar-thumb:hover {
background-color: #409eff;
}
.label {
font-weight: 700;
}
.totalWeight {
font-size: 12px;
}
}
.progressTab {
height: 100%;
}
.allInformation {
width: 100%;
height: 100px;
padding: 10px 20px;
color: #fff;
background-color: #409eff;
.allInformation {
font-size: 12px;
}
.informationNum {
font-size: 24px;
margin-top: 25px;
}
}
.card2 {
.fltBox {
width: 90%;
height: 60px;
font-size: 12px;
font-weight: 700;
color: #fff;
text-align: center;
position: relative;
border-radius: 10px;
padding: 5px;
line-height: 25px;
margin-bottom: 10px;
overflow: hidden;
.fltWeight {
font-size: 14px;
}
}
}
</style>
......
......@@ -4,8 +4,47 @@
append-to-body center>
<el-form ref="add" :model="newDictionary" label-width="auto" label-position="left" size="small"
:rules="rules" @submit.native.prevent>
<!-- 新增虚拟航班 -->
<div v-if="dictName == '虚拟航班'">
<el-form-item label="所属口岸" prop="portName">
<el-select v-model="newDictionary.portName" placeholder="选择口岸" disabled>
<el-option v-for="item in $store.state.user.portNames" :label="item" :value="item"
:key="item">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="航班名称" v-if="status == 'allAdd'" prop="flightNo">
<el-input type="textarea" v-model="flightNo" :rows="7" maxlength="255" show-word-limit
placeholder="用;分隔,单条航班名长度25">
</el-input>
</el-form-item>
<el-form-item label="航班名称" prop="flightNo" v-else>
<el-input type="text" v-model="flightNo" placeholder="请输入数据名称" maxlength="25"></el-input>
</el-form-item>
</div>
<!-- 新增航线 -->
<div v-else-if="dictName == '航线'">
<div v-if="status == 'add'">
<el-form-item label="航班号" prop="fltNo">
<el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="50">
</el-input>
</el-form-item>
<el-form-item label="航线" prop="route">
<el-input type="text" v-model="newDictionary.route" placeholder="请输入航线" maxlength="40">
</el-input>
</el-form-item>
</div>
<div v-else-if="status == 'sort'">
<el-form-item label="航班号" prop="fltNo">
<el-input type="text" v-model="newDictionary.fltNo" disabled></el-input>
</el-form-item>
<el-form-item label="航线">
<Drag :routes="routeList" @drag="drag"></Drag>
</el-form-item>
</div>
</div>
<!-- 新增数据字典 -->
<div v-if="dictName != '虚拟航班'">
<div v-else>
<el-form-item label="所属父级" v-if="newDictionary.serviceCodeKey">
<el-input type="text" v-model="newDictionary.serviceCodeKey" placeholder="用回车分隔" disabled>
</el-input>
......@@ -32,24 +71,6 @@
</el-form-item>
</div>
</div>
<!-- 新增虚拟航班 -->
<div v-else>
<el-form-item label="所属口岸" prop="portName">
<el-select v-model="newDictionary.portName" placeholder="选择口岸" disabled>
<el-option v-for="item in $store.state.user.portNames" :label="item" :value="item"
:key="item">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="航班名称" v-if="status == 'allAdd'" prop="flightNo">
<el-input type="textarea" v-model="flightNo" :rows="7" maxlength="255" show-word-limit
placeholder="用;分隔,单条航班名长度25">
</el-input>
</el-form-item>
<el-form-item label="航班名称" prop="flightNo" v-else>
<el-input type="text" v-model="flightNo" placeholder="请输入数据名称" maxlength="25"></el-input>
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
......@@ -60,7 +81,7 @@
</template>
<script>
import { addDict, addDictBatch, addServiceCodeBatch, addFlight } from '@/api/system/dictionary.js'
import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, queryRoute, orderRoute } from '@/api/system/dictionary.js'
export default {
props: {
......@@ -83,7 +104,7 @@ export default {
},
data() {
return {
newDictionary: { flightNo: undefined, chineseName: undefined },
newDictionary: { flightNo: undefined, chineseName: undefined, route: undefined },
rules: {
chineseName: [
{
......@@ -98,8 +119,23 @@ export default {
message: "航班名称不能为空",
trigger: "blur",
},
]
],
fltNo: [
{
required: true,
message: "航班号不能为空",
trigger: "blur",
}
],
route: [
{
required: true,
message: "航线不能为空",
trigger: "blur",
}
],
},
routeList: [],
title: '',
loading: false,
}
......@@ -115,6 +151,18 @@ export default {
} else if (this.status == 'childrenAdd') {
this.newDictionary = this.addDictionary
this.title = '新增子集'
} else if (this.status == 'sort') {
this.newDictionary = this.addDictionary.serviceCodeKey
this.title = '航线排序'
queryRoute({ fltNo: this.newDictionary.fltNo }).then(res => {
if (res.code === 200) {
this.routeList = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}
// else if (this.status == 'update') {
// if (this.addDictionary.serviceCodeValue) {
......@@ -145,6 +193,23 @@ export default {
if (this.status == 'add') {
if (this.dictName === '虚拟航班') {
this.flightAdd()
} else if (this.dictName === '航线') {
let obj = {
fltNo: this.upCase(this.newDictionary.fltNo),
route: this.upCase(this.newDictionary.route)
}
addRoute(obj).then(res => {
this.loading = false
if (res.code === 200) {
this.msgSuccess(res.msg)
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
} else {
addDict(this.newDictionary).then(res => {
this.loading = false
......@@ -210,6 +275,25 @@ export default {
console.log(err)
})
}
//航线排序
else if (this.status == 'sort') {
let arr = []
this.routeList.forEach(item => {
arr.push(item.id)
})
orderRoute(arr).then(res => {
this.loading = false
if (res.code === 200) {
this.msgSuccess(res.msg)
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
}
}
})
},
......@@ -230,9 +314,14 @@ export default {
console.log(err)
})
},
//航线排序
drag(val) {
this.routeList = val
},
//关闭
close() {
this.newDictionary = { chineseName: null, code: null, remark: null }
this.routeList = []
this.clearValidate('add')
this.$emit('close', false)
},
......@@ -263,6 +352,25 @@ export default {
this.newDictionary.flightNo = val
}
},
},
fltNo: {
get: function () {
return this.newDictionary.fltNo
},
set: function (val) {
this.newDictionary.fltNo = this.upCase(val)
},
},
route: {
get: function () {
return this.newDictionary.route
},
set: function (val) {
const reg = /^([0-9a-zA-Z!@#$%^&*()`]{0,100})$/
if (reg.test(val)) {
this.newDictionary.route = val
}
},
}
}
}
......
......@@ -64,14 +64,14 @@
<template v-slot:awbNbr="scope">
<el-link type="primary" @click="gotoWeatherTable(scope.row)">
{{
scope.row.awbNbr
scope.row.awbNbr
}}<i class="el-icon-link"></i> </el-link>
</template>
<template v-slot:flightFltNo="scope">
<el-link v-if="scope.row.allocDimId" type="primary"
@click="$router.push({ name: 'FlightAllocConfigInfo', params: { handle: 'DMdetail', id: scope.row.allocDimId } })">
@click="$router.push({ name: 'FlightAllocConfigInfo', params: { id: scope.row.allocDimId, handle: 'detail', fltNo: scope.row.flightFltNo, fltDate: scope.row.flightFltDate ? scope.row.flightFltDate : ' ', routeStatus: 'dmLog', route: scope.row.currentFlightRoute } })">
{{
scope.row.flightFltNo
scope.row.flightFltNo
}}<i class="el-icon-link"></i> </el-link>
<span v-else>{{ scope.row.flightFltNo }}</span>
</template>
......@@ -153,7 +153,7 @@ export default {
getDmFlowInformation('accsId=' + val.dmAccsId).then(res => {
if (res.code === 200) {
if (res.data.list.length > 0) {
this.$router.push({ name: 'weatherTable', params: { data: res.data.list } })
this.$router.push({ name: 'weatherTable', params: { data: res.data.list, awbNbr: val.awbNbr } })
} else {
this.msgWarning('未查询到该条数据的流水')
}
......
<template>
<div style="padding:10px">
<el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button>
<el-card header="流水信息">
<Tables ref="weatherTable" ductName="weatherTable" :order="true" :data="data" :headerData="tableHeader"
:showOverflowTooltip="false" :height="tableHeight" :page="selectData.page" :limitSize="selectData.size"
:pageSizes="[100]" :pagination="false" :loading="loading" @currentChange="currentChange">
<Tables ref="weatherTable" ductName="weatherTable" :order="true" :border="false" :data="data"
:headerData="tableHeader" :showOverflowTooltip="false" :height="tableHeight" :page="selectData.page"
:limitSize="selectData.size" :pageSizes="[100]" :pagination="false" :loading="loading"
@currentChange="currentChange">
</Tables>
<div class="ml20 mt20">
<el-button size="small" @click="close">返 回</el-button>
</div>
</el-card>
</div>
</template>
......@@ -70,7 +69,6 @@ export default {
(item) => item.path === this.$route.path
),
);
sessionStorage.removeItem('accsid')
this.$router.push({ name: 'DmLog' })
},
//翻页
......@@ -80,4 +78,5 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
......