作者 xudada

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	config/index.js
#	src/api/user.js
#	src/views/Home.vue

要显示太多修改。

为保证性能只显示 35 of 35+ 个文件。

... ... @@ -30,8 +30,8 @@ module.exports = {
assetsPublicPath: '/',
proxyTable: {
'/api':{
target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http
//target: 'http://localhost:12343',//设置你调用的接口域名和端口号 别忘了加http
target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http
// target: 'http://localhost:12343',//设置你调用的接口域名和端口号 别忘了加http
changeOrigin: true,
pathRewrite: {
'^/api/': '/'//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可
... ...
... ... @@ -1610,6 +1610,11 @@
}
}
},
"base64-arraybuffer": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz",
"integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ=="
},
"base64-js": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
... ... @@ -1972,9 +1977,9 @@
}
},
"cfb": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.1.3.tgz",
"integrity": "sha512-joXBW0nMuwV9no7UTMiyVJnQL6XIU3ThXVjFUDHgl9MpILPOomyfaGqC290VELZ48bbQKZXnQ81UT5HouTxHsw==",
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.1.4.tgz",
"integrity": "sha512-rwFkl3aFO3f+ljR27YINwC0x8vPjyiEVbYbrTCKzspEf7Q++3THdfHVgJYNUbxNcupJECrLX+L40Mjm9hm/Bgw==",
"requires": {
"adler-32": "~1.2.0",
"commander": "^2.16.0",
... ... @@ -2754,6 +2759,14 @@
"integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=",
"dev": true
},
"css-line-break": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-1.1.1.tgz",
"integrity": "sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA==",
"requires": {
"base64-arraybuffer": "^0.2.0"
}
},
"css-loader": {
"version": "0.26.4",
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.26.4.tgz",
... ... @@ -5017,6 +5030,14 @@
"toposort": "^1.0.0"
}
},
"html2canvas": {
"version": "1.0.0-rc.5",
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-rc.5.tgz",
"integrity": "sha512-DtNqPxJNXPoTajs+lVQzGS1SULRI4GQaROeU5R41xH8acffHukxRh/NBVcTBsfCkJSkLq91rih5TpbEwUP9yWA==",
"requires": {
"css-line-break": "1.1.1"
}
},
"htmlparser2": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
... ... @@ -6313,7 +6334,7 @@
},
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
"npm": {
... ... @@ -11769,9 +11790,9 @@
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"ssf": {
"version": "0.10.2",
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.10.2.tgz",
"integrity": "sha512-rDhAPm9WyIsY8eZEKyE8Qsotb3j/wBdvMWBUsOhJdfhKGLfQidRjiBUV0y/MkyCLiXQ38FG6LWW/VYUtqlIDZQ==",
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.10.3.tgz",
"integrity": "sha512-pRuUdW0WwyB2doSqqjWyzwCD6PkfxpHAHdZp39K3dp/Hq7f+xfMwNAWIi16DyrRg4gg9c/RvLYkJTSawTPTm1w==",
"requires": {
"frac": "~1.1.2"
}
... ... @@ -13105,6 +13126,11 @@
"integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
"dev": true
},
"wmf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
},
"wordwrap": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
... ... @@ -13180,17 +13206,18 @@
}
},
"xlsx": {
"version": "0.15.1",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.15.1.tgz",
"integrity": "sha512-z+o4+QPMc32EPboLCzJAz94o0Zyy+8jrmWTsVpfzwknFln9qDO6/HN1KrGGVC4//sGA7dh4R3HA4fhbGIKCDOA==",
"version": "0.15.6",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.15.6.tgz",
"integrity": "sha512-7vD9eutyLs65iDjNFimVN+gk/oDkfkCgpQUjdE82QgzJCrBHC4bGPH7fzKVyy0UPp3gyFVQTQEFJaWaAvZCShQ==",
"requires": {
"adler-32": "~1.2.0",
"cfb": "^1.1.3",
"cfb": "^1.1.4",
"codepage": "~1.14.0",
"commander": "~2.17.1",
"crc-32": "~1.2.0",
"exit-on-epipe": "~1.0.1",
"ssf": "~0.10.2"
"ssf": "~0.10.3",
"wmf": "~1.0.1"
}
},
"xtend": {
... ...
... ... @@ -16,8 +16,10 @@
"eslint": "^5.14.1",
"file-saver": "^2.0.2",
"font-awesome": "^4.7.0",
"html2canvas": "^1.0.0-rc.5",
"install": "^0.12.2",
"js-cookie": "^2.2.1",
"jspdf": "^1.5.3",
"jszip": "^3.2.2",
"moment": "^2.24.0",
"npm": "^6.8.0",
... ... @@ -27,7 +29,7 @@
"vue-i18n": "^8.14.0",
"vue-router": "^2.3.0",
"vuex": "^2.0.0-rc.6",
"xlsx": "^0.15.1"
"xlsx": "^0.15.6"
},
"devDependencies": {
"autoprefixer": "^6.7.2",
... ...
... ... @@ -5,4 +5,9 @@ let baseUrl = 'nmms-server-import/nmms/allocat'
export const addAllocatImport=params=>{return http.post(`${baseUrl}/addAllocatImport`, params);};
export const addAllocatArrive=params=>{return http.post(`${baseUrl}/addAllocatArrive`, params);};
export const QueryData=params=>{return http.get(`${baseUrl}/QueryData`, params);};
export const ediAllocat=params=>{return http.put(`${baseUrl}/ediAllocat`, params);};
\ No newline at end of file
export const ediAllocat=params=>{return http.put(`${baseUrl}/ediAllocat`, params);};
export const sendCreateMt6202=params=>{return http.post(`${baseUrl}/sendCreateMt6202`, params);};
export const sendRemoveMt6202=params=>{return http.post(`${baseUrl}/sendRemoveMt6202`, params);};
export const sendCreateMt3202=params=>{return http.post(`${baseUrl}/sendCreateMt3202`, params);};
export const sendRemoveMt3202=params=>{return http.post(`${baseUrl}/sendRemoveMt3202`, params);};
\ No newline at end of file
... ...
import http from './http.js'
let baseUrl = 'nmms-server-import/nmms/rep'
//添加回执明细
export const addResponse=params=>{return http.post(`${baseUrl}/InsertResponse`, params);};
//查询回执明细列表
export const selectResponseList=params=>{return http.post(`${baseUrl}/selectResponseList`, params);};
\ No newline at end of file
... ...
... ... @@ -7,3 +7,7 @@ export const getCountry = params => { return http.get(`${baseUrl}/getCountryCode
export const getByCountryCodeForName = params => { return http.post(`${baseUrl}/getByCountryCodeForName`,params)};
export const getByCountryCode = params => { return http.post(`${baseUrl}/getByCountryCode`,params)};
export const getAirportCode = params =>{return http.get(`/nmms-server-import/nmms/mt1201/selectList`,params)}
export const getCustomCode = params =>{return http.get(`/nmms-server-import/nmms/mt1201/selectCustomcode`,params)}
... ...
... ... @@ -12,3 +12,7 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus
export const updateMT3201 = params => { return http.put(`${baseUrl}/updateMt3201`,params)};
export const addMt3201 = params => { return http.post(`${baseUrl}/addMt3201`,params)};
export const sendCreateMt3201 = params => { return http.post(`${baseUrl}/sendCreateMt3201`,params)};
export const sendRemoveMt3201 = params => { return http.post(`${baseUrl}/sendRemoveMt3201`,params)};
... ...
... ... @@ -12,3 +12,11 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus
export const updateMT4201 = params => { return http.put(`${baseUrl}/updateMt4201`,params)};
export const addMt4201 = params => { return http.post(`${baseUrl}/addMt4201`,params)};
export const sendCreateMt4201 = params => { return http.post(`${baseUrl}/sendCreateMt4201`,params)};
export const sendDeleteMt4201 = params => { return http.post(`${baseUrl}/sendDeleteMt4201`,params)};
... ...
... ... @@ -17,3 +17,9 @@ export const getLostLoadChange = params => { return http.get(`${baseUrl}/getLost
export const saveLostChange = params => { return http.get(`${baseUrl}/saveLostChange`, params)};
export const saveLostLoad = params => { return http.put(`${baseUrl}/saveLostLoad`,params)};
export const sendDeleteMt2201 = params =>{return http.post(`${baseUrl}/sendDeleteMt2201`,params)}
export const sendUpdateMt2201 = params =>{return http.post(`${baseUrl}/sendUpdateMt2201`,params)}
export const sendCreateMt2201 = params =>{return http.post(`${baseUrl}/sendCreateMt2201`,params)}
... ...
... ... @@ -12,3 +12,7 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus
export const updateMt520X = params => { return http.put(`${baseUrl}/updateMt520x`,params)};
export const addMt520X = params => { return http.post(`${baseUrl}/addMt520x`,params)};
export const sendCreateMt5202 = params => { return http.post(`${baseUrl}/sendCreateMt5202`,params)};
export const sendRemoveMt5202 = params => { return http.post(`${baseUrl}/sendRemoveMt5202`,params)};
... ...
//不使用JQuery版的
import html2canvas from 'html2canvas';
import JsPDF from 'jspdf';
/**
* @param ele 要生成 pdf 的DOM元素(容器)
* @param padfName PDF文件生成后的文件名字
* */
function downloadPDF(ele, pdfName){
let eleW = ele.offsetWidth;// 获得该容器的宽
let eleH = ele.offsetHeight;// 获得该容器的高
let eleOffsetTop = ele.offsetTop; // 获得该容器到文档顶部的距离
let eleOffsetLeft = ele.offsetLeft; // 获得该容器到文档最左的距离
var canvas = document.createElement("canvas");
var abs = 0;
let win_in = document.documentElement.clientWidth || document.body.clientWidth; // 获得当前可视窗口的宽度(不包含滚动条)
let win_out = window.innerWidth; // 获得当前窗口的宽度(包含滚动条)
if(win_out>win_in){
// abs = (win_o - win_i)/2; // 获得滚动条长度的一半
abs = (win_out - win_in)/2; // 获得滚动条宽度的一半
// console.log(a, '新abs');
}
canvas.width = eleW * 2; // 将画布宽&&高放大两倍
canvas.height = eleH * 2;
var context = canvas.getContext("2d");
context.scale(2, 2);
context.translate(-eleOffsetLeft -abs, -eleOffsetTop);
// 这里默认横向没有滚动条的情况,因为offset.left(),有无滚动条的时候存在差值,因此
// translate的时候,要把这个差值去掉
// html2canvas(element).then( (canvas)=>{ //报错
// html2canvas(element[0]).then( (canvas)=>{
html2canvas( ele, {
dpi: 300,
// allowTaint: true, //允许 canvas 污染, allowTaint参数要去掉,否则是无法通过toDataURL导出canvas数据的
useCORS:true //允许canvas画布内 可以跨域请求外部链接图片, 允许跨域请求。
} ).then( (canvas)=>{
var contentWidth = canvas.width;
var contentHeight = canvas.height;
//一页pdf显示html页面生成的canvas高度;
var pageHeight = contentWidth / 592.28 * 841.89;
//未生成pdf的html页面高度
var leftHeight = contentHeight;
//页面偏移
var position = 0;
//a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高
var imgWidth = 595.28;
var imgHeight = 595.28/contentWidth * contentHeight;
var pageData = canvas.toDataURL('image/jpeg', 1.0);
var pdf = new JsPDF('', 'pt', 'a4');
//有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
//当内容未超过pdf一页显示的范围,无需分页
if (leftHeight < pageHeight) {
//在pdf.addImage(pageData, 'JPEG', 左,上,宽度,高度)设置在pdf中显示;
pdf.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight);
// pdf.addImage(pageData, 'JPEG', 20, 40, imgWidth, imgHeight);
} else { // 分页
while(leftHeight > 0) {
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight);
leftHeight -= pageHeight;
position -= 841.89;
//避免添加空白页
if(leftHeight > 0) {
pdf.addPage();
}
}
}
//可动态生成
pdf.save(pdfName);
})
}
export default {
downloadPDF
}
... ...
... ... @@ -6,4 +6,10 @@ export const getMt1201List=params=>{return http.get(`${baseUrl}/getMt1201List`,
export const getFenList=params=>{return http.get(`${baseUrl}/getFenList`, params);};
export const addMt1201=params=>{return http.post(`${baseUrl}/addMt1201`, params);};
export const ediMt1201=params=>{return http.put(`${baseUrl}/ediMt1201`, params);};
export const selectAirport=params=>{return http.get(`${baseUrl}/selectList`, params);};
export const getCountryCode=params=>{return http.get(`${baseUrl}/getCountryCode`, params);};
export const selectCustomcode=params=>{return http.get(`${baseUrl}/selectCustomcode`, params);};
export const sendCreateMt1201=params=>{return http.post(`${baseUrl}/sendCreateMt1201`, params);};
export const sendEditeMt1201=params=>{return http.post(`${baseUrl}/sendEditeMt1201`, params);};
export const sendRemoveMt1201=params=>{return http.post(`${baseUrl}/sendRemoveMt1201`, params);};
\ No newline at end of file
... ...
import http from './http.js'
let baseUrl = 'nmms-server-import/nmms/mt5201'
let baseUrl2='nmms-server-import/nmms/mt1201'
export const getMt5201List=params=>{return http.get(`${baseUrl}/getMt5201List`, params);};
export const addMt5201=params=>{return http.post(`${baseUrl}/addMt5201`, params);};
export const ediMt5201=params=>{return http.put(`${baseUrl}/ediMt5201`, params);};
export const delMt5201 = params => { return http.del(`${baseUrl}/delMt5201`,params)};
export const sendCreateMt520x=params=>{return http.post(`${baseUrl}/sendCreateMt520x`, params);};
export const sendRemoveMt520x=params=>{return http.post(`${baseUrl}/sendRemoveMt520x`, params);};
export const selectCustomcode=params=>{return http.get(`${baseUrl2}/selectCustomcode`, params);};
... ...
... ... @@ -4,13 +4,14 @@ export const getUserList = params => { return http.get(`${baseUrl}/list`, param
export const getUserListPage = params => { return http.get(`/user/list`,params) };
export const removeUser = params => { return http.del(`/user/del`,params)};
export const removeUser = params => { return http.del(`${baseUrl}/del`,params)};
export const batchRemoveUser = params => { return http.del(`/user/batchremove`, { params: params }); };
export const batchRemoveUser = params => { return http.del(`${baseUrl}/batchremove`, { params: params }); };
export const editUser = params => { return http.put(`/user/edit`,params)};
export const editPass = params => { return http.put(`${baseUrl}/password`,params)};
export const addUser = params => { return http.post(`/user/add`,params)};
export const editUser = params => { return http.put(`${baseUrl}/edit`,params)};
export const setUserRole = params => { return http.put(`/user/roleset`,params)};
export const addUser = params => { return http.post(`${baseUrl}/add`,params)};
export const setUserRole = params => { return http.put(`${baseUrl}/roleset`,params)};
... ...
var SIGN_REGEXP = /([yMdhsm])(\1*)/g;
var DEFAULT_PATTERN = 'yyyy-MM-dd';
/**
* 根据数组 元素的“值” 来删除或者获取数据
* 使用方法arrList.splice(arrList.contains('c'),1)
*/
Array.prototype.contains = function(obj) {
var i = this.length;
while (i--) {
if (this[i] === obj) {
return i; // 返回的这个 i 就是元素的索引下标,
}
}
return false;
}
function padding(s, len) {
var len = len - (s + '').length;
len = len - (s + '').length;
for (var i = 0; i < len; i++) { s = '0' + s; }
return s;
};
}
export default {
getQueryStringByName: function (name) {
... ...
... ... @@ -91,12 +91,9 @@ axios.interceptors.response.use(
// 下面是接口回调的satus ,因为我做了一些错误页面,所以都会指向对应的报错页面
if (error.response.status === 401) {
router.push({
path: "/login"
});
message({
// 饿了么的消息弹窗组件
message: '授权超时,或未授权,请重新登录',
message: '授权超时,或访问未授权,请重新登录',
type: "error"
});
}
... ... @@ -108,9 +105,14 @@ axios.interceptors.response.use(
});
}
if (error.response.status === 500) {
router.push({
path: "/error/500"
message({
// 饿了么的消息弹窗组件
message: error.message,
type: "error"
});
// router.push({
// path: "/error/500"
// });
}
if (error.response.status === 502) {
router.push({
... ... @@ -118,13 +120,15 @@ axios.interceptors.response.use(
});
}
if (error.response.status === 404) {
router.push({
path: "/error/404"
message({
// 饿了么的消息弹窗组件
message: error.message,
type: "error"
});
}
}
// 返回 response 里的错误信息
let errorInfo = error.data.error ? error.data.error.message : error.data;
let errorInfo = error.response ? error.response.statusText : (error.data.error ? error.data.error.message : error.message);
return Promise.reject(errorInfo);
}
);
... ...
... ... @@ -35,7 +35,6 @@ import Waybill from './views/nmms_import/Waybill.vue'
import AllocateSearch from './views/nmms_import/AllocateSearch.vue'
import Importallocation from './views/nmms_import/Importallocation.vue'
import Allocatearrive from './views/nmms_import/Allocatearrive.vue'
import User from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
... ... @@ -128,7 +127,7 @@ let routes = [
{path:'/entertall',component:EnterTally,name:'进港理货'},
{path:'/tallymaster',component:TallyMster,name:'进港理货舱单'},
{path:'/importallocation',component:Importallocation,name:'进港分拨'},
{path:'/allocatearrive',component:Allocatearrive,name:'分拨运抵'}
{path:'/allocatearrive',component:Allocatearrive,name:'分拨运抵'},
]
},
{
... ...
$color-primary: #20a0ff;//#18c79c
\ No newline at end of file
$color-primary: #1a4496;//#18c79c
\ No newline at end of file
... ...
... ... @@ -99,3 +99,14 @@ export function validatorNum(value) {
const reg = /^(\d*)+(\.[0-9]{1,2})?$/
return reg.test(value)
}
/**
* 关区校验 4位数字
* @param value
* @returns {boolean}
*/
export function validatorCustomsNum(value) {
const reg = /^(\d{4})$/
return reg.test(value)
}
\ No newline at end of file
... ...
<template>
<el-row class="container">
<el-row class="container darkmenu" style="margin-top: 0px;">
<el-col :span="24" class="header">
<el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'">
{{collapsed?'':sysName}}
... ... @@ -80,7 +80,7 @@
</el-col>
<el-col :span="24" class="content-wrapper">
<transition name="fade" mode="out-in">
<router-view></router-view>
<router-view :key="$route.path +$route.query.t"></router-view>
</transition>
</el-col>
</div>
... ... @@ -94,6 +94,12 @@
import { editPass} from '../api/user';
import ElFormItem from "element-ui/packages/form/src/form-item";
export default {
provide() {
return {
reload: this.reload
}
},
components: {ElFormItem},
data() {
var validatePass = (rule, value, callback) => {
... ... @@ -120,6 +126,7 @@
sysUserName: '',
sysUserId:'',
sysUserAvatar: '',
isRouterAlive: true,
form: {
name: '',
region: '',
... ... @@ -150,6 +157,16 @@
}
},
methods: {
reload() {
this.$nextTick(function () {
this.$router.push({
path: this.$router.path,
query:{
t: new Date().getTime()
}
})
})
},
editPass:function(){
this.dialogFormVisible=true;
},
... ... @@ -190,7 +207,7 @@
console.log('handleclose');
},
handleselect: function (a, b) {
console.log('handleselect!');
this.reload()
},
//退出登录
logout: function () {
... ... @@ -200,7 +217,6 @@
}).then(() => {
sessionStorage.removeItem('user');
sessionStorage.removeItem('menu');
//退出后初始化原来的路由
let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
console.log(sysRoutes);
... ... @@ -227,7 +243,6 @@
if (user) {
user = JSON.parse(user);
this.sysUserName = user.username || '';
this.sysUserId=user.userId||'';
this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg';
}
//操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由
... ... @@ -245,7 +260,6 @@
<style scoped lang="scss">
@import '~scss_vars';
.container {
position: absolute;
top: 0px;
... ... @@ -254,7 +268,7 @@
.header {
height: 60px;
line-height: 60px;
background: $color-primary;
background: $color-primary url("/static/images/air-banner.png");
color:#fff;
.userinfo {
text-align: right;
... ... @@ -317,9 +331,6 @@
// position: absolute;
// top: 0px;
// bottom: 0px;
.el-menu{
height: 100%;
}
.collapsed{
width:60px;
.item{
... ... @@ -356,16 +367,21 @@
// bottom: 0px;
// left: 230px;
overflow-y: scroll;
padding: 20px;
padding: 10px;
.breadcrumb-container {
//margin-bottom: 15px;
.title {
width: 200px;
float: left;
color: #475669;
margin-left: 10px;
}
.breadcrumb-inner {
float: right;
margin-right:10px;
}
.el-breadcrumb{
line-height:36px;
}
}
.content-wrapper {
... ... @@ -375,4 +391,42 @@
}
}
}
</style>
<style lang="scss">
.darkmenu{
.main {
aside {
.el-menu{
height: 100%;
background: #606060;
.el-menu-item {
i{
color: white;
}
color: white;
}
.el-menu-item.is-active{
color:#e6a23c;
}
.el-menu-item:hover,.el-menu-item:focus{
background-color: #1a4496;
}
.el-submenu {
ul.el-menu.el-menu--inline{
background: #303030;
}
.el-submenu__title {
color: white;
i{
color: white;
}
}
.el-submenu__title:hover {
background-color: #1a4496;
}
}
}
}
}
}
</style>
\ No newline at end of file
... ...
... ... @@ -3,12 +3,12 @@
<el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-position="left" label-width="0px" class="demo-ruleForm login-container" id="loginForm">
<h3 class="title">系统登录</h3>
<el-form-item prop="account">
<el-input type="text" v-model="ruleForm2.account" auto-complete="off" placeholder="账号"></el-input>
<el-input type="text" v-model="ruleForm2.account" autofocus placeholder="账号"></el-input>
</el-form-item>
<el-form-item prop="checkPass">
<el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off" placeholder="密码"></el-input>
<el-input type="password" v-model="ruleForm2.checkPass" placeholder="密码" @keyup.enter.native="handleSubmit2"></el-input>
</el-form-item>
<el-checkbox v-model="checked" checked class="remember">记住密码</el-checkbox>
<el-checkbox v-model="checked" checked class="remeberme">记住密码</el-checkbox>
<el-form-item style="width:100%;">
<el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit2" :loading="logining" :plain="true">登录</el-button>
<!--<el-button @click.native.prevent="handleReset2">重置</el-button>-->
... ... @@ -42,8 +42,8 @@
fixStyle: '',
logining: false,
ruleForm2: {
account: 'admin',
checkPass: '123456'
account: '',
checkPass: ''
},
rules2: {
account: [
... ...
... ... @@ -955,9 +955,6 @@ export default {
margin-bottom: 0;
}
}
.el-col {
border-radius: 4px;
}
.bg-purple-dark {
background: #99a9bf;
}
... ... @@ -968,7 +965,6 @@ export default {
background: #e5e9f2;
}
.grid-content {
border-radius: 4px;
min-height: 36px;
}
.row-bg {
... ...
... ... @@ -32,7 +32,9 @@
</el-table-column>
<el-table-column prop="modelnamecn" label="操作模块" width="120" sortable>
</el-table-column>
<el-table-column prop="classname" label="系统类" show-overflow-tooltip="true" width="100" sortable>
<el-table-column prop="classname" label="系统类" show-overflow-tooltip width="100" sortable>
</el-table-column>
<el-table-column prop="parameters" label="参数" show-overflow-tooltip width="100" sortable>
</el-table-column>
<el-table-column prop="result" label="操作结果" min-width="200" sortable>
</el-table-column>
... ...
... ... @@ -16,22 +16,26 @@
</el-col>
<!--列表-->
<el-table :data="tableList" highlight-current-row v-loading="listLoading" @selection-change="selsChange" style="width: 100%;">
<el-table :data="tableList" highlight-current-row v-loading="listLoading" @selection-change="selsChange" style="width: 100%;"
row-key="permissionId"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column type="index" width="60">
<!--<el-table-column type="index" width="60">-->
<!--</el-table-column>-->
<el-table-column prop="permissionId" label="ID" width="130" sortable>
</el-table-column>
<el-table-column prop="permissionId" label="ID" width="100" sortable>
<el-table-column prop="name" label="权限名称" min-width="150" sortable>
</el-table-column>
<el-table-column prop="name" label="权限名称" min-width="200" sortable>
<el-table-column prop="description" label="描述" min-width="120" sortable>
</el-table-column>
<el-table-column prop="description" label="描述" min-width="200" sortable>
<el-table-column prop="ismenu" label="是否目录" width="100" :formatter="formatState" sortable>
</el-table-column>
<el-table-column prop="permissionOrder" label="排序" width="100" sortable>
<el-table-column prop="url" label="访问路径" width="300" sortable>
</el-table-column>
<el-table-column prop="url" label="路径" width="100" sortable>
</el-table-column>
<el-table-column label="操作" min-width="150">
<el-table-column label="操作" min-width="100">
<template slot-scope="scope">
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
... ... @@ -143,7 +147,7 @@
tableList: [],
total: 0,
pageNum: 1,
pageSize: 10,
pageSize: 100,
listLoading: false,
sels: [],//列表选中列
//编辑界面是否显示
... ... @@ -208,7 +212,7 @@
return row.sex == 1 ? '男' : row.sex == 0 ? '女' : '未知';
},
formatState: function (row, column) {
return row.state == true ? '是' : row.state == false ? '否' : '未知';
return row.ismenu == true ? '是' : row.ismenu == false ? '否' : '未知';
},
handleCurrentChange(val) {
this.pageNum = val;
... ...
... ... @@ -23,18 +23,27 @@
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column type="index" width="60">
</el-table-column>
<!--<el-table-column prop="roleId" label="ID" width="100" sortable>-->
<!--<el-table-column type="index" width="60">-->
<!--</el-table-column>-->
<el-table-column prop="roleId" label="ID" width="120">
</el-table-column>
<el-table-column prop="roleName" label="岗位/角色名称" min-width="200" sortable>
</el-table-column>
<!--<el-table-column prop="departmentName" label="部门名称" min-width="200" sortable>-->
<!--</el-table-column>-->
<el-table-column prop="description" label="描述" min-width="200" sortable>
<el-table-column prop="description" label="描述" min-width="160" >
</el-table-column>
<el-table-column prop="type" label="类型" min-width="80" sortable>
</el-table-column>
<el-table-column prop="businessLicense" label="工商代码" min-width="180" >
</el-table-column>
<el-table-column prop="customsRegCode" label="海关备案代码" min-width="150" >
</el-table-column>
<el-table-column prop="mqcode" label="海关通道编号" min-width="150" >
</el-table-column>
<el-table-column label="操作" min-width="260">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="handleAdd(scope.$index, scope.row)">新增下级</el-button>
<el-button size="small" @click="setPerm(scope.$index, scope.row)">设置权限</el-button>
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
... ... @@ -48,67 +57,57 @@
</el-pagination>
</el-col>
<!--编辑界面-->
<el-dialog title="编辑" :visible.sync="editFormVisible" :close-on-click-modal="false">
<el-form :model="editForm" label-width="80px" :rules="editFormRules" ref="editForm">
<el-form-item label="ID">
<span>{{editForm.roleId}}</span>
<!--新增界面-->
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="addFormVisible" :close-on-click-modal="false">
<el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm">
<el-form-item label="上级组织机构">
<span>{{addForm.parentName}}</span>
</el-form-item>
<el-form-item label="岗位名称">
<el-input v-model="editForm.roleName" auto-complete="off" placeholder="请输入岗位/角色名称:例如:ROLE_name"></el-input>
<el-form-item label="组织机构名称" prop="roleName">
<el-input v-model="addForm.roleName" auto-complete="off" placeholder="请输入组织机构名称:例如:公司名称"></el-input>
</el-form-item>
<el-form-item label="岗位描述">
<el-input v-model="editForm.description" auto-complete="off" placeholder="请输入岗位/角色描述:例如:用户管理员"></el-input>
<el-form-item label="组织机构描述" prop="description">
<el-input v-model="addForm.description" auto-complete="off" placeholder="组织机构描述:例如:组织机构简介"></el-input>
</el-form-item>
<el-form-item label="部门名称">
<el-select v-model="editForm.departmentId" placeholder="请选择">
<el-form-item label="组织机构类型" prop="type">
<el-select
v-model="addForm.type"
filterable
allow-create
default-first-option
placeholder="请选择类型">
<el-option
v-for="item in departmentNameList"
:key="item.departmentId"
:label="item.departmentName"
:value="item.departmentId">
v-for="item in companyOption"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="editFormVisible = false">取消</el-button>
<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
</div>
</el-dialog>
<!--新增界面-->
<el-dialog title="新增" :visible.sync="addFormVisible" :close-on-click-modal="false">
<el-form :model="addForm" label-width="80px" :rules="addFormRules" ref="addForm">
<el-form-item label="岗位/角色名称" prop="roleName">
<el-input v-model="addForm.roleName" auto-complete="off" placeholder="请输入岗位/角色名称:例如:ROLE_name"></el-input>
<el-form-item label="工商企业代码" prop="businessLicense">
<el-input v-model="addForm.businessLicense" auto-complete="off" placeholder="社会信用代码或者组织机构代码"></el-input>
</el-form-item>
<el-form-item label="岗位/角色描述" prop="description">
<el-input v-model="addForm.description" auto-complete="off" placeholder="请输入岗位/角色描述:例如:用户管理员"></el-input>
<el-form-item label="海关备案代码" prop="customsRegCode">
<el-input v-model="addForm.customsRegCode" auto-complete="off" placeholder="海关备案后返回的备案代码"></el-input>
</el-form-item>
<el-form-item label="部门名称" prop="roleSign">
<el-select v-model="addForm.departmentId" placeholder="请选择">
<el-option
v-for="item in departmentNameList"
:key="item.departmentId"
:label="item.departmentName"
:value="item.departmentId">
</el-option>
</el-select>
<el-form-item label="海关通道编号" prop="mqcode">
<el-input v-model="addForm.mqcode" auto-complete="off" placeholder="海关通道编号"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="addFormVisible = false">取消</el-button>
<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
<el-button type="primary" @click="dialogStatus==='create'?addSubmit():editSubmit()" :loading="addLoading" >提交</el-button>
</div>
</el-dialog>
<!--权限设置界面-->
<el-dialog title="岗位的权限设置" :visible.sync="PermFormVisible" :close-on-click-modal="false">
<el-form :model="permForm" label-width="80px" ref="permForm">
<el-checkbox-group v-model="permIds" size="small">
<el-checkbox v-for="perm in permissons" :label="perm.permissionId" :key="perm.permissionId">{{perm.name}}</el-checkbox>
</el-checkbox-group>
<el-tree :data="permissons" :props="treeDefaultProps"
@check="clickDeal"
show-checkbox highlight-current default-expand-all check-on-click-node check-strictly
node-key="permissionId" ref="tree">
</el-tree>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="PermFormVisible = false">取消</el-button>
... ... @@ -131,6 +130,20 @@
filters: {
roleName: ''
},
companyOption: [
{
label: "集团",
value: "集团"
},
{
label: "公司",
value: "公司"
}
],
treeDefaultProps: {
children: 'children',
label: 'name',
},
departmentNameList:[],
roles: [],
permissons: [],
... ... @@ -140,23 +153,11 @@
pageSize: 5,
listLoading: false,
sels: [],//列表选中列
//编辑界面是否显示
editFormVisible: false,
editLoading: false,
editFormRules: {
roleName: [
{ required: true, message: '请输入岗位/角色名称', trigger: 'blur' }
]
dialogMap: {
update: '编辑',
create: '新增',
},
//编辑界面数据
editForm: {
roleId: 1,
description: '',
roleName: '',
roleSign: 1,
departmentId:''
},
dialogStatus: 'create',
//新增界面是否显示
addFormVisible: false,
//设置权限界面是否显示
... ... @@ -175,7 +176,13 @@
description: '',
roleName: '',
roleSign: 1,
departmentId:''
departmentId:'',
type: '',
businessLicense: '',
customsRegCode: '',
parentName: '',
mqcode: ''
},
permForm: {
roleId: 1,
... ... @@ -228,7 +235,6 @@
},
//获取部门列表
getdepartmentNames() {
... ... @@ -268,7 +274,11 @@
if(null!= error.response && error.response!==undefined){
let status= error.response.status;
let msg = error.response.statusText;
alert(status+msg);
message({
// 饿了么的消息弹窗组件
message: status+msg,
type: "error"
});
}else {
alert(error);
}
... ... @@ -303,14 +313,16 @@
* @param row 为这行的数据对象
*/
handleEdit: function (index, row) {
this.editFormVisible = true;
this.editForm = Object.assign({}, row);
this.getdepartmentNames();
this.addFormVisible = true;
this.dialogStatus= 'update',
this.addForm = Object.assign({}, row);
// this.getdepartmentNames();
},
setPerm: function (index, row) {
this.PermFormVisible = true;
this.getPermList();
var _this = this;
this.permIds = [];
this.PermFormVisible = true;
this.permForm = Object.assign({}, row);
let rolePerms = this.permForm.permissions;
if (util.checkNull(rolePerms)){
... ... @@ -320,31 +332,47 @@
}
});
}
this.getPermList();
this.$nextTick(() => {
//反向适配
this.$refs.tree.setCheckedKeys(this.permIds);
});
},
//显示新增界面,每次点开初始化数据
handleAdd: function () {
handleAdd: function (index,row) {
this.addFormVisible = true;
this.dialogStatus= 'create';
this.addForm = {
username: '',
password: '',
sex: 1,
address: '',
realname: '',
email: '',
mobilephone: '',
age: 1
};
this.getdepartmentNames();
description: '',
roleName: '',
roleSign: 1,
departmentId:'',
type: '',
businessLicense: '',
customsRegCode: '',
mqcode: '',
parentid: 0
};
//如果新增下级
if(util.checkNull(row)){
//传递上级ID
let parentRole = Object.assign({}, row);
this.addForm.parentid = parentRole.roleId;
this.addForm.parentName = parentRole.roleName;
}
// this.getdepartmentNames();
},
//编辑
editSubmit: function () {
this.$refs.editForm.validate((valid) => {
this.$refs.addForm.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
this.editLoading = true;
this.addLoading = true;
//NProgress.start();
let para = Object.assign({}, this.editForm);
let para = Object.assign({}, this.addForm);
//不需要提交的 去掉,后端不好接收
para.authorities = null;
para.permissions = null;
... ... @@ -357,8 +385,8 @@
式;
*/
/*moment 安装 npm install moment --save*/
para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss');
this.editLoading = false;
// para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss');
this.addLoading = false;
edit(para).then((res) => {
//NProgress.done();
... ... @@ -366,8 +394,8 @@
message: '提交成功',
type: 'success'
});
this.$refs['editForm'].resetFields();
this.editFormVisible = false;
this.$refs['addForm'].resetFields();
this.addFormVisible = false;
this.getRoles();
}).catch(error => alert(error));
});
... ... @@ -406,7 +434,7 @@
//NProgress.start();
let role = Object.assign({}, this.permForm);
let roleId = role.roleId;
let permissionIds = this.permIds
let permissionIds = this.$refs.tree.getCheckedKeys();
let para = {roleId,permissionIds};
updateRolePerm(para).then((res) => {
this.addLoading = false;
... ... @@ -449,6 +477,81 @@
}).catch(() => {
});
},
treeHandleCheckChange: function (data, checked, indeterminate) {
if(checked) {
this.permIds.push(data.permissionId);
}else {
this.permIds.splice(this.permIds.contains(data.permissionId),1);
}
console.log(data, checked, indeterminate);
},
uniteParentSame(id,treeStatus){//当子节点全为未选中时父节点也变为未选中状态
let node = this.$refs.tree.getNode(permissionId);//获取当前节点的节点树
if (node.parent !== null && node.parent !== undefined) {
let parentNode = node.parent.data;//获取当前节点的父节点树
if (parentNode != undefined){//判断父节点是否存在
for (let i = 0; i < parentNode.children.length; i++) {
let checkedKeys = this.$refs.tree.getCheckedKeys();
let hafCheckedKeys = this.$refs.tree.getHalfCheckedKeys();
let selectNodes = checkedKeys.concat(hafCheckedKeys);//获取已选择树节点
let selected = selectNodes.indexOf(parentNode.children[i].permissionId); // -1当前节点的同级节点是否全部未选中
if (selected !== -1){
return;
}
}
}else {
return;
}
this.$refs.tree.setChecked(parentNode.permissionId, false);//修改节点为未选择
if(node.level>2){//判断是否是最上级节点
this.uniteParentSame(parentNode.permissionId,treeStatus)
}
}else {
return;
}
},
// 统一处理子节点为相同的勾选状态
uniteChildSame(treeList, isSelected){
this.$refs.tree.setChecked(treeList.permissionId, isSelected);
if (treeList.children !== undefined){
for (let i = 0; i < treeList.children.length; i++) {
this.uniteChildSame(treeList.children[i], isSelected)
}
}
},
// 统一处理父节点为选中
selectedParent(currentObj){
let currentNode = this.$refs.tree.getNode(currentObj);
if (currentNode.parent.key !== undefined) {
this.$refs.tree.setChecked(currentNode.parent, true);
this.selectedParent(currentNode.parent)
}
},
clickDeal: function (currentObj, treeStatus){
// 用于:父子节点严格互不关联时,父节点勾选变化时通知子节点同步变化,实现单向关联。
let selected = treeStatus.checkedKeys.indexOf(currentObj.permissionId); // -1未选中
// 选中
if (selected !== -1) {
// 子节点只要被选中父节点就被选中
this.selectedParent(currentObj);
// 统一处理子节点为相同的勾选状态
this.uniteChildSame(currentObj, true)
} else {
// 未选中 处理子节点全部未选中
if (currentObj.children !== undefined){
if (currentObj.children.length !== 0) {
this.uniteChildSame(currentObj, false)
}
//放开时为当子节点全为未选中时父节点也变为未选中状态 注释后就是父节点不和子节点强制绑定
// this.uniteParentSame(currentObj.id,treeStatus)//当子节点全为未选中时父节点也变为未选中状态
}
// else {
// this.uniteParentSame(currentObj.id,treeStatus)
// }
}
}
},
mounted() {
... ...
... ... @@ -19,11 +19,11 @@
</el-col>
<!--列表-->
<el-table :data="users" highlight-current-row v-loading="listLoading" @selection-change="selsChange" style="width: 100%;">
<el-table :data="users" highlight-current-row border v-loading="listLoading" @selection-change="selsChange" style="width: 100%;">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column type="index" width="60">
</el-table-column>
<!--<el-table-column type="index" width="60">-->
<!--</el-table-column>-->
<el-table-column prop="userId" label="ID" width="100" sortable>
</el-table-column>
<el-table-column prop="username" label="账号" width="120" sortable>
... ... @@ -46,7 +46,7 @@
</el-table-column>
<el-table-column label="操作" width="250">
<template slot-scope="scope">
<el-button size="small" @click="roleEdit(scope.$index, scope.row)">权限配置</el-button>
<el-button size="small" @click="roleEdit(scope.$index, scope.row)">角色配置</el-button>
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
</template>
... ... @@ -126,7 +126,7 @@
<el-dialog title="新增" :visible.sync="addFormVisible" :close-on-click-modal="false">
<el-form :model="addForm" label-width="80px" :rules="addFormRules" ref="addForm">
<el-form-item label="账号" prop="username">
<el-input v-model="addForm.username"></el-input>
<el-input v-model="addForm.username" aria-placeholder="用户名长度在5-11位,支持英文和数字"></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input v-model="addForm.password" type="password"></el-input>
... ... @@ -168,7 +168,7 @@
<el-form-item label="账号">
<span>{{roleEditForm.username}}</span>
</el-form-item>
<el-tree :data="roles" :props="treeDefaultProps" show-checkbox node-key="roleId" ref="tree">
<el-tree :data="roles" :props="treeDefaultProps" default-expand-all show-checkbox highlight-current check-strictly node-key="roleId" ref="tree" @check-change="treeHandleCheckChange">
</el-tree>
</el-form>
... ... @@ -230,7 +230,10 @@
addLoading: false,
addFormRules: {
username: [
{ required: true, message: '请输入姓名', trigger: 'blur' }
{ required: true, message: '请输入姓名,用户名长度在5-11位,支持英文和数字', trigger: 'blur' },
],
password: [
{ required: true, message: '请输入密码,用户名长度在6-18位,支持英文和数字和非空字符', trigger: 'blur'}
]
},
//用户角色配置
... ... @@ -321,16 +324,24 @@
this.editForm = Object.assign({}, row);
},
roleEdit: function (index, row) {
this.roleFormVisible = true;
this.getRoles();
var _this = this;
_this.roleIds = [];
this.roleEditForm = Object.assign({}, row);
let userRoles = this.roleEditForm.roles;
if (util.checkNull(userRoles)){
userRoles.forEach(function (role,v_index,v_arr) {
_this.roleIds[v_index] = role.roleId;
let roles = this.roleEditForm.roles;
if (util.checkNull(roles)){
roles.forEach(function (role,v_index,v_arr) {
if (util.checkNull(role)) {
_this.roleIds[v_index] = role.roleId;
}
});
}
this.getRoles();
this.$nextTick(() => {
//反向适配
this.$refs.tree.setCheckedKeys(this.roleIds);
});
},
getRoles() {
let para = {
... ... @@ -340,7 +351,6 @@
NProgress.start();
getList(para).then((res) => {
this.roles = res.data.list;
this.roleFormVisible = true;
NProgress.done();
}).catch((error) => {
if(null!= error.response && error.response!==undefined){
... ... @@ -352,6 +362,7 @@
}
});
},
//显示新增界面,每次点开初始化数据
handleAdd: function () {
... ... @@ -424,7 +435,10 @@
this.getUsers();
}).catch(error => {
this.addLoading = false;
alert(error.message);
this.$message({
message: error.message,
type: 'error'
});
});
});
}
... ... @@ -459,11 +473,14 @@
this.$confirm('确认提交吗?', '提示', {}).then(() => {
// this.editLoading = true;
let userId = this.roleEditForm.userId;
let roleIds = this.roleIds;
let roleIds = this.$refs.tree.getCheckedKeys();
let para = {userId,roleIds};
setUserRole(para).then((res) => {
if (res.status ===200) {
alert("ok");
this.$message({
message: '岗位设置成功',
type: 'success'
});
}
this.getUsers();
this.roleFormVisible = false;
... ... @@ -478,6 +495,15 @@
},
beforeAvatarUpload: function () {
},
treeHandleCheckChange: function (data, checked, indeterminate) {
if(checked) {
this.roleIds.push(data.roleId);
}else {
this.roleIds.splice(this.roleIds.contains(data.roleId),1);
}
// console.log(data, checked, indeterminate);
console.log(this.roleIds);
}
},
mounted() {
... ...
... ... @@ -32,7 +32,7 @@
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input v-model="awba" placeholder="请输入主单号"></el-input>
<el-input v-model="awba" clearable placeholder="请输入主单号"></el-input>
</div>
</el-col>
<div class="grid-content el-btn">
... ... @@ -51,15 +51,20 @@
</el-col>
</el-row>
</div>
<el-table v-loading="listLoading" :data="arriveData" stripe fit highlight-current-row
style="font-size: 12px" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column label="航班号" width="70" align="center">
<el-table v-loading="listLoading" :data="arriveData" stripe
style="font-size: 12px" border @selection-change="handleSelectionChange"
default-expand-all
row-key="uuid"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column label="航班号" width="100" align="center">
<template slot-scope="scope">
<span>{{scope.row.carrier}}{{scope.row.flightno}}</span>
</template>
</el-table-column>
<el-table-column label="运单号" width="120" align="center">
<el-table-column label="运单号" width="110" align="center">
<template slot-scope="scope">
<span>{{scope.row.awba}}</span>
</template>
... ... @@ -79,7 +84,7 @@
<span>{{scope.row.weight}}</span>
</template>
</el-table-column>
<el-table-column label="货物描述" width="100" align="center">
<el-table-column label="货物描述" width="120" align="center">
<template slot-scope="scope">
<span>{{scope.row.goodsname}}</span>
</template>
... ... @@ -91,38 +96,51 @@
</el-table-column>
<el-table-column label="状态" width="100" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status ==='01'">未发送</span>
<span v-if="scope.row.status ==='02'">已发舱单报</span>
<span v-if="scope.row.status ==='01'">接受申报</span>
<span v-if="scope.row.status ==='02'">待人工审核</span>
<span v-if="scope.row.status ==='03'">退单</span>
<span v-if="scope.row.status ==='05'">舱单报退单</span>
<span v-if="scope.row.status ==='06'">舱单转人工</span>
<span v-if="scope.row.status ==='07'">舱单报申报成功</span>
<span v-if="scope.row.status ==='08'">已发舱单删除报</span>
<span v-if="scope.row.status ==='09'">舱单删除报退单</span>
<span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
<span v-if="scope.row.status ==='11'">舱单删除成功</span>
<span v-if="scope.row.status ==='12'">已发舱单修改报</span>
<span v-if="scope.row.status ==='13'">舱单修改报退单</span>
<span v-if="scope.row.status ==='11'">放行</span>
<span v-if="scope.row.status ==='12'">拒装</span>
<span v-if="scope.row.status ==='13'">禁卸</span>
<span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
<span v-if="scope.row.status ==='21'">可自动发送</span>
<span v-if="scope.row.status ==='22'">未发送</span>
<span v-if="scope.row.status ==='23'">已发送新增报</span>
<span v-if="scope.row.status ==='24'">已发送删除报</span>
<span v-if="scope.row.status ==='25'">已发送修改报</span>
</template>
</el-table-column>
<el-table-column prop="receipt" label="回执信息" width="180" align="center">
<el-table-column prop="receipt" label="回执信息" align="center">
<template slot-scope="scope">
<span>{{scope.row.ext5}}</span>
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" align="center">
<el-table-column prop="operation" fixed="right" label="操作" align="center" width="400">
<template slot-scope="scope">
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑运单</el-button>
<el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
:disabled="scope.row.status !=='00'">发送舱单报
<el-button size="mini" @click="handleSendDesc(scope.row)">收发明细</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑</el-button>
<el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
:disabled="scope.row.status ==='23'">发送出港运抵报
</el-button>
<p></p>
<el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单
</el-button>
<el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button>
<el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
:disabled="scope.row.status ==='00'">修改状态
:disabled="scope.row.status ==='22'">更改状态
</el-button>
<el-button size="mini" type="primary" v-if="scope.row.awbh ===''"
@click="handleAddAwbh(scope.row)">新增分单
</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
:disabled="scope.row.status ==='24'">发删除报
</el-button>
</template>
</el-table-column>
... ... @@ -132,7 +150,7 @@
<el-button type="primary" size="mini" v-if="arriveQuery.flightno !==undefined || arriveData.length>0"
@click="handelAddArriveInfo">新增出港运抵
</el-button>
<el-button type="primary" size="mini" v-if="arriveModel.flightno !== undefined || arriveData.length>0"
<el-button type="primary" size="mini" v-if="arriveQuery.flightno !== undefined || arriveData.length>0"
@click="handelBackStep">返回
</el-button>
</el-row>
... ... @@ -152,7 +170,7 @@
<el-input v-model="arriveModel.awba"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-col :span="7.5" v-if="fenStatus === 'addAwbh'">
<el-form-item label="分单号" prop="awbh">
<el-input v-model="awbh"></el-input>
</el-form-item>
... ... @@ -185,14 +203,28 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogFormVisible === 'update'"></el-input>
<el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
allow-create v-model="originstation" remote>
<el-option v-for="item in airportCode"
:key="item.airportid" :label="item.airportid"
:value="item.airportid" :disabled="dialogFormVisible === 'update'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="destinationstation">
<el-input v-model="destinationstation"
:disabled="dialogFormVisible === 'update'"></el-input>
<el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
allow-create v-model="destinationstation" remote>
<el-option v-for="item in airportCode"
:key="item.airportid" :label="item.airportid"
:value="item.airportid" :disabled="dialogFormVisible === 'update'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
... ... @@ -226,9 +258,15 @@
</el-col>
<el-col :span="7.5">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="arriveModel.customcode">
<el-option v-for="item in customcodeList " :key="item" :label="item"
:value="item"></el-option>
<el-select v-model="arriveModel.customcode" placeholder="请选择关区代码" :loading="customLoading"
filterable clearable remote :remote-method="remoteMethodCustomCode"
:disabled="dialogStatus === 'addAwbh'">
<el-option v-for="item in customCodeList" :key="item.customcode"
:label="item.customcode"
:value="item.customcode">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
... ... @@ -237,12 +275,11 @@
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
<el-button type="success" @click="SaveAndSend">保存并发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<el-table-column label="操作时间" width="180">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
... ... @@ -272,6 +309,11 @@
{{scope.row.cusrestext}}
</template>
</el-table-column>
<el-table-column label="操作类型" width="100">
<template slot-scope="scope">
{{scope.row.opertype}}
</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
... ... @@ -279,16 +321,51 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="30%">
<el-form ref="arriveDeleteForm" :model="respModel" :rules="arriveDeleteRules"
label-width="120px" style="margin-right: 50px">
<el-form-item label="删除原因" prop="reason">
<el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
</el-form-item>
<el-form-item label="删除操作人" prop="contactName">
<el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
</el-form-item>
<el-form-item label="操作人Tel" prop="contactTel">
<el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="respModel.content" type="textarea"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogDeleteVisible = false">取消</el-button>
<el-button type="primary" @click="sendArriveDelete()">发送</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt3201ListForParam, deleteByIsDelete, updateStatus, updateMT3201, addMt3201} from '@/api/exitArrive'
import {getCustomCode, getAirportCode} from "@/api/country";
import {
getMt3201ListForParam,
deleteByIsDelete,
updateStatus,
updateMT3201,
addMt3201,
sendCreateMt3201,
sendRemoveMt3201
} from '@/api/exitArrive'
import {Message} from "element-ui";
import {validAwb, validAlphabets, validAlphabetsAndNum,validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate";
import {
validAwb,
validAlphabets,
validAlphabetsAndNum,
validAlphabetsAndSpanceKey,
validatorNum
} from "@/utils/validate";
import {getResponseForParam} from '@/api/responseDetail'
export default {
... ... @@ -314,8 +391,8 @@
}
callback()
}
const validAlphabetsSpanceKey = (rule,value,callback) =>{
if(!validAlphabetsAndSpanceKey(value)){
const validAlphabetsSpanceKey = (rule, value, callback) => {
if (!validAlphabetsAndSpanceKey(value)) {
callback("只能输入字母、数字、空格")
}
callback()
... ... @@ -332,14 +409,15 @@
isAdmin: false,
arriveQuery: {
pageSize: 1,
limitSize: 100,
limitSize: 30,
awba: undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
customcode: undefined,
messageType: undefined,
},
dialogMap: {
update: '编辑出港运抵',
... ... @@ -347,11 +425,15 @@
},
dialogTableVisible: false,
multipleSelection: [],
customcodeList: [4604, 4620],
customCodeList: [],
airportCode: [],
dialogStatus: undefined,
awbhStatus: false,
fenStatus: undefined,
dialogFormVisible: false,
dialogDeleteVisible: false,
listLoading: false,
customLoading: false,
arriveRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
... ... @@ -379,7 +461,24 @@
customcode: undefined,
arrivetime: undefined,
messageType: 'MT3201'
}
},
respModel: {
uuid: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
},
arriveDeleteRules: {
reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],
contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],
contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}]
},
}
},
created() {
... ... @@ -388,7 +487,6 @@
if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
this.arriveQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
}
this.arriveQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.arriveQuery.flightno = this.$route.params.flightData.flightno.substring(2)
this.arriveQuery.flightdate = this.$route.params.flightData.flightdate
... ... @@ -397,7 +495,7 @@
this.getList()
}
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
if (username === 'admin') {
this.isAdmin = true
}
},
... ... @@ -466,7 +564,7 @@
getMt3201ListForParam(this.arriveQuery).then(res => {
this.arriveData = res.data.dataList
this.total = res.data.count
if (res.data.count > 0) {
if (res.data.dataList.length > 0){
this.arriveQuery.carrier = this.arriveData[0].carrier
this.arriveQuery.flightno = this.arriveData[0].flightno
this.arriveQuery.flightdate = this.arriveData[0].flightdate
... ... @@ -490,11 +588,11 @@
},
handleSerach() {
this.arriveQuery.carrier = undefined
this.arriveQuery.flightno = undefined
this.arriveQuery.originstation = undefined
this.arriveQuery.flightdate = undefined
this.arriveQuery.destinationstation = undefined
// this.arriveQuery.carrier = undefined
// this.arriveQuery.flightno = undefined
// this.arriveQuery.originstation = undefined
// this.arriveQuery.flightdate = undefined
// this.arriveQuery.destinationstation = undefined
this.getList()
},
handleSelectionChange(val) {
... ... @@ -516,6 +614,24 @@
this.$refs.arriveFormData.clearValidate()
})
},
// 新增出港运抵分单
handleAddAwbh(row){
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.arriveModel.carrier = row.carrier
this.arriveModel.awba = row.awba
this.arriveModel.flightdate = row.flightdate
this.arriveModel.flightno = row.flightno
this.arriveModel.originstation = row.originstation
this.arriveModel.destinationstation = row.destinationstation
this.arriveModel.customcode = row.customcode
this.dialogStatus = 'create'
this.fenStatus = 'addAwbh'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.arriveFormData.clearValidate()
})
},
createData() {
this.$refs.arriveFormData.validate(valid => {
if (valid) {
... ... @@ -553,6 +669,13 @@
// 编辑
handleEdit(row) {
this.arriveModel = Object.assign({}, row) // copy obj
if (row.awbh === ''){
this.fenStatus = undefined
}else {
this.fenStatus = 'addAwbh'
}
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
... ... @@ -575,16 +698,83 @@
})
},
//保存并发送
SaveAndSend() {
// 发送舱单报
handleSendAwb(row) {
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
if (row.awbh === null) {
row.awbh = ''
}
delete row.parent
delete row.children
sendCreateMt3201(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.getList()
} else {
Message.success(res.data.respMessage)
}
})
}).catch(error => {
Message.error(error.message)
})
},
// 发送删除报
handleSendDelete(row) {
this.respModel = {
carrier: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: undefined
}
this.dialogDeleteVisible = true
this.respModel.flightNo = row.flightno
this.respModel.awba = row.awba
this.respModel.carrier = row.carrier
if (row.awbh === null) {
this.respModel.awbh = ''
} else {
this.respModel.awbh = row.awbh
}
this.respModel.customCode = row.customcode
this.respModel.flightDate = row.flightdate
this.$nextTick(() => {
this.$refs.arriveDeleteForm.clearValidate()
})
},
sendArriveDelete() {
this.$refs.arriveDeleteForm.validate(valid => {
if (valid) {
sendRemoveMt3201(this.respModel).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.dialogDeleteVisible = false
this.getList()
} else {
Message.error(res.data.respMessage)
}
})
}
})
},
// 收发明细
handleSend(row) {
handleSendDesc(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
opertype:row.opertype,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT3201'
... ... @@ -594,15 +784,7 @@
this.detailData = res.data
})
},
// 发送舱单报
handleAwbSend() {
},
// 发送修改报
handleAwbEdit() {
},
//发送删除报
//删除运单
handleAwbDelete(row) {
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
... ... @@ -634,25 +816,29 @@
},
//更改状态
handleAwbStatus(row) {
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
this.getList()
} else {
this.$message({
type: 'error',
message: '状态更改失败,请稍后重试'
})
}
})
if (row.status!==22){
row.status =22;
}
// updateStatus(row).then(res => {
// if (res.data.count > 0) {
// this.$message({
// type: 'success',
// message: '当前运单状态已更改'
// })
// this.getList()
// } else {
// this.$message({
// type: 'error',
// message: '状态更改失败,请稍后重试'
// })
// }
// })
}).catch(action => {
this.$message({
... ... @@ -663,6 +849,41 @@
})
})
},
//获取机场三字码
remoteMethodAirport(query) {
this.airportCode = []
if (query !== '') {
this.listLoading = true
getAirportCode({airportid: query}).then(res => {
if (res !== null) {
setTimeout(() => {
this.listLoading = false
this.airportCode = res.data.data
}, 200)
}
})
} else {
this.airportCode = []
}
},
//关区代码
remoteMethodCustomCode(query) {
this.customCodeList = []
if (query !== '') {
this.customLoading = true
getCustomCode({customcode: query}).then(res => {
if (res !== null) {
setTimeout(() => {
this.customLoading = false
this.customCodeList = res.data.data
}, 200)
}
})
} else {
this.airportCode = []
}
},
// 携数据跳转 新增运抵
handleAddArrive() {
const row = {
... ... @@ -671,7 +892,8 @@
this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.arriveModel}})
this.arriveQuery.messageType = 'MT3201'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.arriveQuery}})
}
}
... ...
<template>
<div class="app-content">
<!--<div class="app-container">-->
<!--<div class="app-container">-->
<div class="filter-container">
<el-input v-model="listQuery.flightNo" clearable style="width: 270px;" class="filter-item"
placeholder="航班号"/>
... ... @@ -10,33 +10,33 @@
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</div>
<el-table :data="flightData" stripe style="font-size: 14px" border>
<el-table-column label="航班号" width="280px" align="center">
<el-table-column label="航班号" width="180px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightNo }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="280px" align="center">
<el-table-column label="航班日期" width="190px" align="center">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span>{{ scope.row.flightDate }}</span>
</template>
</el-table-column>
<el-table-column label="始发站" width="280px" align="center">
<el-table-column label="始发站" width="160px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}</span>
</template>
</el-table-column>
<el-table-column label="目的站" width="280px" align="center">
<el-table-column label="目的站" width="160px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<el-table-column label="操作" width="400px" align="center" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handlePre(scope.row)">预配舱单</el-button>
<el-button type="primary" size="mini" @click="handleArrive(scope.row)">出港运抵</el-button>
<el-button type="primary" size="mini" @click="handleLoading(scope.row)">装载舱单</el-button>
<el-button type="primary" size="mini" @click="handleTidy(scope.row)">出港理货</el-button>
<el-button type="primary" size="mini" @click="handleArrive(scope.row)">出港运抵</el-button>
<el-button type="primary" size="mini" @click="handlePre(scope.row)">预配舱单</el-button>
</template>
</el-table-column>
</el-table>
... ... @@ -48,6 +48,7 @@
<script>
import Pagination from '@/components/Pagination'
import {getFlightListForParam} from '@/api/exitFlight'
export default {
name: "ExitFlight",
components: {Pagination},
... ... @@ -58,18 +59,22 @@
listQuery: {
pageSize: 1,
limitSize: 10,
flightNo: undefined,
flightNo: '',
flightDate: undefined
},
flightData: [],
}
},
created(){
this.getList()
created() {
this.getList()
},
methods: {
/*设置默认航班时间*/
getdatatime() {
this.listQuery.flightDate = new Date();
},
getList() {
getFlightListForParam(this.listQuery).then(res =>{
getFlightListForParam(this.listQuery).then(res => {
this.flightData = res.data.dataList
this.total = res.data.count
})
... ... @@ -79,26 +84,39 @@
},
handleLoading(row) {
row.messageType = 'MT4201'
row.flightdate = row.flightDate
row.flightno = row.flightNo
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handleTidy(row) {
row.messageType = 'MT5201'
row.messageType = 'MT5202'
row.flightdate = row.flightDate
row.flightno = row.flightNo
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handleArrive(row) {
row.messageType = 'MT3201'
row.flightdate = row.flightDate
row.flightno = row.flightNo
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handlePre(row) {
row.messageType = 'MT2201'
row.flightdate = row.flightDate
row.flightno = row.flightNo
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
},
// 页面加载完毕后触发的事件
mounted() {
var vm = this;
vm.getdatatime();
}
}
</script>
<style scoped>
.app-content{
.app-content {
margin-top: 20px;
}
</style>
... ...
... ... @@ -12,12 +12,12 @@
</el-col>
</el-row>
<el-row type="flex" class="row-bg" justify="center">
<el-col :span="4">
<el-col :span="4" >
<el-input placeholder="必填" v-model="flightno">
<template slot="prepend">航班号</template>
</el-input>
</el-col>
<el-col :span="4">
<el-col :span="4" style="margin-left: 20px">
<el-date-picker
v-model="flight.flightdate"
type="date"
... ... @@ -25,21 +25,51 @@
placeholder="选择日期">
</el-date-picker>
</el-col>
<el-col :span="4">
<el-input placeholder="必填" v-model="originstation">
<template slot="prepend">始发站</template>
</el-input>
</el-col>
<el-col :span="4" style="margin-left: 20px">
<el-input placeholder="必填" v-model="destinationstation">
<template slot="prepend">目的站</template>
</el-input>
<el-col :span="4" style="margin-left: 55px">
<el-select
:remote-method="remoteMethodAirport"
:loading="listLoading"
v-model="originstation"
allow-create
default-first-option
filterable
remote
placeholder="请选择起始站" clearable>
<el-option
v-for="item in airportCode"
:key="item.airportid"
:label="item.airportid"
:value="item.airportid">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-col>
<el-col :span="4" style="margin-left: 20px">
<el-input placeholder="可为空" v-model="awba">
<template slot="prepend">主单号</template>
</el-input>
<el-select
:remote-method="remoteMethodAirport"
:loading="listLoading"
v-model="destinationstation"
allow-create
default-first-option
filterable
remote
placeholder="请选择目的站" clearable>
<el-option
v-for="item in airportCode"
:key="item.airportid"
:label="item.airportid"
:value="item.airportid">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-col>
<!-- <el-col :span="4" style="margin-left: 20px">-->
<!-- <el-input placeholder="可为空" v-model="awba">-->
<!-- <template slot="prepend">主单号</template>-->
<!-- </el-input>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="4" :offset="10">
... ... @@ -55,6 +85,7 @@
<script>
import {Message} from "element-ui";
import {getCountry, getAirportCode} from "@/api/country";
export default {
name: 'ExitFlightDesc',
... ... @@ -66,14 +97,18 @@
originstation: undefined,
destinationstation: undefined,
awba: undefined,
messageType:undefined
messageType: undefined
},
btnStatus: true
btnStatus: true,
listLoading: false,
airportList: [],
airportResultCode: [],
airportCode: [],
};
},
created() {
if (this.$route.params.scopeRow !== undefined) {
if(this.$route.params.scopeRow.carrier === undefined){
if (this.$route.params.scopeRow.carrier === undefined) {
this.flight.flightno = this.$route.params.scopeRow.flightno
} else {
this.flight.flightno = this.$route.params.scopeRow.carrier + this.$route.params.scopeRow.flightno
... ... @@ -82,61 +117,68 @@
this.flight.originstation = this.$route.params.scopeRow.originstation
this.flight.destinationstation = this.$route.params.scopeRow.destinationstation
this.flight.messageType = this.$route.params.scopeRow.messageType
if(this.$route.params.scopeRow.awba !== undefined){
this.flight.awba = this.$route.params.scopeRow.awba.replace('-','')
if (this.$route.params.scopeRow.awba !== undefined) {
this.flight.awba = this.$route.params.scopeRow.awba.replace('-', '')
}
}
},
computed:{
flightno : {
// mounted() {
// // 延迟加载,否则会出错
// setTimeout(() => {
// this.airportResultCode = this.airportCode.map(item =>{
// return {label: item.airportdescchn,value: item.airportid}
// })
// }, 6000)
// },
computed: {
flightno: {
get: function () {
return this.flight.flightno
},
set: function(val){
set: function (val) {
this.flight.flightno = val.toUpperCase().trim()
}
},
originstation :{
originstation: {
get: function () {
return this.flight.originstation
},
set: function(val){
set: function (val) {
this.flight.originstation = val.toUpperCase().trim()
}
},
destinationstation :{
destinationstation: {
get: function () {
return this.flight.destinationstation
},
set: function(val){
set: function (val) {
this.flight.destinationstation = val.toUpperCase().trim()
}
},
awba :{
awba: {
get: function () {
return this.flight.awba
},
set: function(val){
set: function (val) {
this.flight.awba = val.trim()
}
}
},
methods: {
nstep() {
if (this.flight.flightno !== undefined && this.flight.flightno !==''&&
this.flight.flightdate !== undefined &&this.flight.flightdate !== '' &&
this.flight.destinationstation !== undefined && this.flight.destinationstation !==''&&
this.flight.originstation !== undefined && this.flight.originstation !=='') {
if(this.flight.awba !== '' && this.flight.awba !== undefined){
if (this.flight.flightno !== undefined && this.flight.flightno !== '' &&
this.flight.flightdate !== undefined && this.flight.flightdate !== '' &&
this.flight.destinationstation !== undefined && this.flight.destinationstation !== '' &&
this.flight.originstation !== undefined && this.flight.originstation !== '') {
if (this.flight.awba !== '' && this.flight.awba !== undefined) {
const manifest = this.flight.awba;
const reg = /^[0-9]{11}$/
if(!reg.test(manifest)){
if (!reg.test(manifest)) {
Message.error("主单号只支持数字并且最多11位")
return
}
const num = (manifest.substring(3,10)) % 7
if(num !== eval(manifest.substring(10))){
const num = (manifest.substring(3, 10)) % 7
if (num !== eval(manifest.substring(10))) {
Message.error("主单号不符合模7校验")
return
}
... ... @@ -144,22 +186,38 @@
this.flight.awba = undefined
}
if(this.flight.messageType ==="MT5201"){
if (this.flight.messageType === "MT5202") {
this.$router.push({name: '出港理货', params: {flightData: this.flight}});
}
if(this.flight.messageType ==="MT4201"){
if (this.flight.messageType === "MT4201") {
this.$router.push({name: '出港装载', params: {flightData: this.flight}});
}
if(this.flight.messageType ==="MT3201"){
this.$router.push({name:'出港运抵',params:{flightData: this.flight}})
if (this.flight.messageType === "MT3201") {
this.$router.push({name: '出港运抵', params: {flightData: this.flight}})
}
if(this.flight.messageType ==="MT2201"){
this.$router.push({name:'出港预配舱单',params:{flightData: this.flight}})
if (this.flight.messageType === "MT2201") {
this.$router.push({name: '出港预配舱单', params: {flightData: this.flight}})
}
} else {
Message.warning("请将航班信息填写完整")
}
},
remoteMethodAirport(query) {
this.airportCode = []
if (query !== '') {
this.listLoading = true
getAirportCode({airportid: query}).then(res => {
if(res !== null){
setTimeout(() => {
this.listLoading = false
this.airportCode = res.data.data
}, 200)
}
})
} else {
this.airportCode = []
}
}
}
};
... ... @@ -173,7 +231,7 @@
margin: 0 auto;
height: 400px;
}
flight
p {
font-size: 25px;
font-weight: bold;
... ...
... ... @@ -21,7 +21,7 @@
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content">进港舱单查询</div>
<div class="grid-content content">出港装载查询</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
... ... @@ -32,12 +32,12 @@
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input v-model="loadingQuery.awba" placeholder="请输入主单号"></el-input>
<el-input clearable v-model="loadingQuery.awba" placeholder="请输入主单号"></el-input>
</div>
</el-col>
<div class="el-btn">
<el-button type="primary" size="mini" @click="handleSearch">查询</el-button>
<el-button v-if="loadingModel.flightno === undefined && loadingData.length <1"
<el-button v-if="loadingQuery.flightno === undefined && loadingData.length <1"
type="primary" size="mini" @click="handleAddLoading">新增装载
</el-button>
</div>
... ... @@ -49,9 +49,10 @@
<div class="grid-content content" style="margin-top: 6px">出港装载明细</div>
</el-col>
</el-row>
<tree-table v-loading="listLoading" :data="loadingData" :eval-func="func" :expand-all="true" stripe
style="font-size: 12px" border @selection-change="handleSelectionChange">
<el-table-column label="运单号" width="160" align="center">
<el-table v-loading="listLoading" :data="loadingData" stripe style="font-size: 12px"
border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="60"></el-table-column>
<el-table-column label="主单号" width="160" align="center">
<template slot-scope="scope">
<span>{{scope.row.awba}}</span>
</template>
... ... @@ -78,50 +79,69 @@
</el-table-column>
<el-table-column label="状态" width="100" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status ==='01'">未发送</span>
<span v-if="scope.row.status ==='02'">已发舱单报</span>
<span v-if="scope.row.status ==='01'">接受申报</span>
<span v-if="scope.row.status ==='02'">待人工审核</span>
<span v-if="scope.row.status ==='03'">退单</span>
<span v-if="scope.row.status ==='05'">舱单报退单</span>
<span v-if="scope.row.status ==='06'">舱单转人工</span>
<span v-if="scope.row.status ==='07'">舱单报申报成功</span>
<span v-if="scope.row.status ==='08'">已发舱单删除报</span>
<span v-if="scope.row.status ==='09'">舱单删除报退单</span>
<span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
<span v-if="scope.row.status ==='11'">舱单删除成功</span>
<span v-if="scope.row.status ==='12'">已发舱单修改报</span>
<span v-if="scope.row.status ==='13'">舱单修改报退单</span>
<span v-if="scope.row.status ==='11'">放行</span>
<span v-if="scope.row.status ==='12'">拒装</span>
<span v-if="scope.row.status ==='13'">禁卸</span>
<span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
<span v-if="scope.row.status ==='21'">可自动发送</span>
<span v-if="scope.row.status ==='22'">未发送</span>
<span v-if="scope.row.status ==='23'">已发送新增报</span>
<span v-if="scope.row.status ==='24'">已发送删除报</span>
<span v-if="scope.row.status ==='25'">已发送修改报</span>
</template>
</el-table-column>
<el-table-column prop="receipt" label="回执信息" width="180" align="center">
<el-table-column label="回执信息" width="180" align="center">
<template slot-scope="scope">
<span>{{scope.row.ext5}}</span>
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" align="center">
<el-table-column label="操作" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑主单
<el-button size="mini" type="success" @click="handleEdit(scope.row)" >编辑
</el-button>
<el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
:disabled="scope.row.status !=='00'">发送舱单报
:disabled="scope.row.status ==='23'">发送出港装载报
</el-button>
<br><br>
<el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单
</el-button>
<el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button>
<el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
:disabled="scope.row.status ==='00'">更改状态
:disabled="scope.row.status ==='22'">更改状态
</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
:disabled="scope.row.status ==='24'">发删除报
</el-button>
</template>
</el-table-column>
</tree-table>
</el-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini"
v-if="loadingModel.flightno !== undefined || loadingData.length >0"
v-if="loadingQuery.flightno !== undefined || loadingData.length >0"
@click="handelAddLoadingInfo">新增出港装载
</el-button>
<el-button type="primary" size="mini" v-if="loadingModel.flightno !== undefined || loadingData.length>0"
@click="handelBackStep">返回</el-button>
<el-button type="primary" size="mini"
v-if="loadingQuery.flightno !== undefined || loadingData.length>0"
@click="handelBackStep">返回
</el-button>
</el-row>
</div>
<pagination v-show="total>0" :total="total" :page.sync="loadingQuery.page" :limit.sync="loadingQuery.limit"
... ... @@ -136,7 +156,7 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="主单号" prop="awba">
<el-input v-model="loadingModel.awba"></el-input>
<el-input v-model="loadingModel.awba" :disabled="dialogStatus ==='update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
... ... @@ -155,13 +175,28 @@
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogStatus ==='update'"></el-input>
<el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
allow-create v-model="originstation" remote :disabled="dialogStatus ==='update'">
<el-option v-for="item in airportCode"
:key="item.airportid" :label="item.airportid"
:value="item.airportid" :disabled="dialogStatus === 'update'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="flightno">
<el-input v-model="destinationstation" :disabled="dialogStatus ==='update'"></el-input>
<el-form-item label="目的站" prop="destinationstation">
<el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
allow-create v-model="destinationstation" remote :disabled="dialogStatus ==='update'">
<el-option v-for="item in airportCode"
:key="item.airportid" :label="item.airportid"
:value="item.airportid" :disabled="dialogStatus === 'update'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
... ... @@ -176,13 +211,13 @@
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="装载件数" prop="piece">
<el-form-item label="装载件数" prop="lodingpiece">
<el-input v-model.number="loadingModel.lodingpiece"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="装载重量" prop="weight">
<el-input v-model.number="loadingModel.lodingweight"></el-input>
<el-form-item label="装载重量" prop="lodingweight">
<el-input v-model="loadingModel.lodingweight"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
... ... @@ -195,27 +230,34 @@
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="运单件数" prop="price">
<el-input v-model="loadingModel.awbprice"></el-input>
<el-form-item label="运单件数" prop="awbprice">
<el-input v-model.number="loadingModel.awbprice"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="运单重量" prop="weight">
<el-form-item label="运单重量" prop="awbweight">
<el-input v-model="loadingModel.awbweight"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="loadingModel.customcode">
<el-option v-for="item in customcodeList " :key="item" :label="item"
:value="item"></el-option>
<el-select v-model="loadingModel.customcode" placeholder="请选择关区代码"
filterable clearable remote :remote-method="remoteMethodCustomCode" :loading="customLoading"
allow-create
default-first-option
>
<el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode"
:value="item.customcode">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="特货代码" prop="awbh">
<el-form-item label="特货代码" prop="specialgoods">
<el-input v-model="loadingModel.specialgoods"></el-input>
</el-form-item>
</el-col>
... ... @@ -229,12 +271,11 @@
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
<el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<el-table-column label="操作时间" width="180">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
... ... @@ -264,6 +305,11 @@
{{scope.row.cusrestext}}
</template>
</el-table-column>
<el-table-column label="操作类型" width="100">
<template slot-scope="scope">
{{scope.row.opertype}}
</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
... ... @@ -271,24 +317,55 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="30%">
<el-form ref="loadingDeleteForm" :model="respModel" :rules="loadingDeleteRules"
label-width="120px" style="margin-right: 50px">
<el-form-item label="删除原因" prop="reason">
<el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
</el-form-item>
<el-form-item label="删除操作人" prop="contactName">
<el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
</el-form-item>
<el-form-item label="操作人Tel" prop="contactTel">
<el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="respModel.content" type="textarea"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogDeleteVisible = false">取消</el-button>
<el-button type="primary" @click="sendLoadingDelete()">发送</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt4201ListForParam, deleteByIsDelete, updateStatus, updateMT4201, addMt4201} from '@/api/exitLoading'
import {Message} from "element-ui";
import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate"
import {getCustomCode,getAirportCode} from "@/api/country";
import {
getMt4201ListForParam, deleteByIsDelete, updateStatus,
updateMT4201, addMt4201, sendCreateMt4201, sendDeleteMt4201, test
} from '@/api/exitLoading'
import {Message} from "element-ui"
import {
validAwb,
validAlphabets,
validAlphabetsAndNum,
validAlphabetsAndSpanceKey,
validatorNum,
validatorCustomsNum
} from "@/utils/validate"
import {getResponseForParam} from '@/api/responseDetail'
export default {
name: "ExitLoading",
components: {treeTable, Pagination},
components: { Pagination},
inject: ['reload'],
data() {
const validatorAwb = (rule, value, callback) => {
if (!validAwb(value)) {
callback("请正确书写主单号")
callback("请正确书写主单号格式为xxx-xxxxxxxx")
}
callback()
}
... ... @@ -304,8 +381,8 @@
}
callback()
}
const validAlphabetsSpanceKey = (rule,value,callback) =>{
if(!validAlphabetsAndSpanceKey(value)){
const validAlphabetsSpanceKey = (rule, value, callback) => {
if (!validAlphabetsAndSpanceKey(value)) {
callback("只能输入字母、数字、空格")
}
callback()
... ... @@ -316,18 +393,26 @@
}
callback()
}
const validatorCustomsNums = (rule, value, callback) => {
if (!validatorCustomsNum(value)) {
callback(new Error("只能输入4位数字"))
}
callback()
}
return {
func: treeToArray,
total: 1,
isAdmin:false,
isAdmin: false,
dialogMap: {
update: '编辑出港装载',
create: '添加出港装载',
},
customcodeList: [4604, 4620],
customCodeList: [],
airportCode:[],
dialogStatus: undefined,
dialogTableVisible: false,
dialogFormVisible: false,
dialogDeleteVisible: false,
customLoading: false,
listLoading: false,
loadingQuery: {
pageSize: 1,
... ... @@ -338,7 +423,8 @@
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
customcode: undefined,
messageType: undefined
},
loadingRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
... ... @@ -346,16 +432,21 @@
goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
flightdate: [{required: true, trigger: 'blur'}],
loadingtime: [{required: true, trigger: 'blur'}],
originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
piece: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
weight: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
customcode:[{required: true, trigger: 'change',message:'不能为空'}]
lodingpiece: [{type: 'number',required: true, trigger: 'change', message: '只能输入数字'}],
lodingweight: [{required: true, trigger: 'change', message: '只能输入数字,并且小数位最多两位',validator: validatorNums}],
customcode: [
{required: true, message: '关区号不能为空'},
{validator: validatorCustomsNums,trigger: 'change',message: '关区号为4位整数'}
]
},
loadingData: [],
detailData: [],
loadingModel: {
carrier:undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
... ... @@ -369,8 +460,29 @@
loadingtime: undefined,
messageType: 'MT4201',
awbprice: undefined,
awbweight: undefined
}
awbweight: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: undefined,
},
respModel: {
uuid: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
},
loadingDeleteRules: {
reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],
contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],
contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}]
},
}
},
created() {
... ... @@ -387,7 +499,7 @@
this.getList()
}
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
if (username === 'admin') {
this.isAdmin = true
}
},
... ... @@ -469,19 +581,20 @@
},
// 查询
handleSearch() {
this.loadingQuery.carrier = undefined
this.loadingQuery.flightno = undefined
this.loadingQuery.originstation = undefined
this.loadingQuery.flightdate = undefined
this.loadingQuery.destinationstation = undefined
// this.loadingQuery.carrier = undefined
// this.loadingQuery.flightno = undefined
// this.loadingQuery.originstation = undefined
// this.loadingQuery.flightdate = undefined
// this.loadingQuery.destinationstation = undefined
this.getList()
},
// 收发明细
handleSend() {
handleSend(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
opertype: row.opertype,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT4201'
... ... @@ -494,7 +607,6 @@
// 编辑 弹框
handleEdit(row) {
this.loadingModel = Object.assign({}, row)
console.log(this.loadingModel)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
... ... @@ -519,10 +631,75 @@
},
// 发送舱单报
handleSendAwb() {
handleSendAwb(row) {
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
if(row.awbh === null || row.awbh === undefined){
row.awbh = ''
}
sendCreateMt4201(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.getList()
}else {
Message.success(res.data.respMessage)
}
})
}).catch(error =>{
Message.error(error.message)
})
},
// 删除 发送删除报
// 发送删除报
handleSendDelete(row) {
this.respModel = {
carrier: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
}
this.dialogDeleteVisible = true
this.respModel.carrier = row.carrier
this.respModel.flightNo = row.flightno
this.respModel.awba = row.awba
this.respModel.customCode = row.customcode
this.respModel.flightDate = row.flightdate
if(row.awbh ===null){
this.respModel.awbh = ''
}else {
this.respModel.awbh = row.awbh
}
this.$nextTick(() => {
this.$refs.loadingDeleteForm.clearValidate()
})
},
sendLoadingDelete() {
this.$refs.loadingDeleteForm.validate(valid => {
if (valid) {
sendDeleteMt4201(this.respModel).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.dialogDeleteVisible = false
this.getList()
} else {
Message.success(res.data.respMessage)
}
})
}
})
},
// 删除
handleAwbDelete(row) {
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
... ... @@ -559,20 +736,23 @@
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
this.getList()
} else {
this.$message({
type: 'error',
message: '状态更改失败,请稍后重试'
})
}
})
if (row.status!==22){
row.status =22;
}
// updateStatus(row).then(res => {
// if (res.data.count > 0) {
// this.$message({
// type: 'success',
// message: '当前运单状态已更改'
// })
// this.getList()
// } else {
// this.$message({
// type: 'error',
// message: '状态更改失败,请稍后重试'
// })
// }
// })
}).catch(action => {
this.$message({
... ... @@ -583,14 +763,10 @@
})
})
},
// 保存并发送
handleSaveAndSend() {
},
// 重置实体
restModel() {
this.loadingModel = {
carrier:undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
... ... @@ -639,6 +815,40 @@
}
})
},
//获取机场三字码
remoteMethodAirport(query){
this.airportCode = []
if (query !== '') {
this.listLoading = true
getAirportCode({airportid: query}).then(res => {
if(res !== null){
setTimeout(() => {
this.listLoading = false
this.airportCode = res.data.data
}, 200)
}
})
} else {
this.airportCode = []
}
},
//关区代码
remoteMethodCustomCode(query){
this.customCodeList = []
if (query !== '') {
this.customLoading = true
getCustomCode({customcode: query}).then(res => {
if(res !== null){
setTimeout(() => {
this.customLoading = false
this.customCodeList = res.data.data
}, 200)
}
})
} else {
this.airportCode = []
}
},
handleAddLoading() {
const row = {
'messageType': 'MT4201'
... ... @@ -646,7 +856,8 @@
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.loadingModel}})
this.loadingQuery.messageType = 'MT4201'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.loadingQuery}})
}
}
}
... ...
... ... @@ -212,6 +212,7 @@
},
handleUpdate(row){
console.log(row.messageType )
if(row.messageType === 'MT2201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
... ... @@ -221,7 +222,7 @@
if(row.messageType === 'MT4201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT5201'){
if(row.messageType === 'MT5202'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
},
... ...
... ... @@ -13,9 +13,9 @@
</el-col>
<el-col :span="20">
<div class="grid-content">
<span class="titleSpan">航班号:{{this.listQuery.carrier}}{{this.listQuery.flightNo}}</span>
<span class="titleSpan">航班日期:{{this.listQuery.flightDate}}</span>
<span class="titleSpan">航段:{{this.listQuery.originStation}}-{{this.listQuery.destinationStation}}</span>
<span class="titleSpan">航班号:{{this.preQuery.carrier}}{{this.preQuery.flightno}}</span>
<span class="titleSpan">航班日期:{{this.preQuery.flightdate}}</span>
<span class="titleSpan">航段:{{this.preQuery.originstation}}-{{this.preQuery.destinationstation}}</span>
</div>
</el-col>
</div>
... ... @@ -32,12 +32,12 @@
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input v-model="listQuery.awba" placeholder="请输入主单号" clearable></el-input>
<el-input v-model="preQuery.awba" placeholder="请输入主单号" clearable></el-input>
</div>
</el-col>
<div class="grid-content el-btn">
<el-button type="primary" size="mini" @click="handleSerach">查询</el-button>
<el-button v-if="preModel.flightno === undefined && preData.length<1" type="primary"
<el-button v-if="preQuery.flightno === undefined && preData.length<1" type="primary"
size="mini"
@click="handleAddpre">新增预配舱单
</el-button>
... ... @@ -52,29 +52,35 @@
</el-row>
</div>
<tree-table :data="preData" stripe style="font-size: 12px" :eval-func="func" :expand-all="true" border
@selection-change="handleSelectionChange" v-loading="listLoading">
<el-table-column label="航班信息" width="90" align="center">
<template slot-scope="scope">
<p class="tableInline">{{scope.row.carrier}}{{scope.row.flightno}}</p>
<p class="tableInline">{{scope.row.flightdate}}</p>
<p class="tableInline">{{scope.row.originstation}}-{{scope.row.destinationstation}}</p>
</template>
<el-table :data="preData" stripe style="font-size: 12px" stripe
@selection-change="handleSelectionChange" v-loading="listLoading"
default-expand-all
row-key="uuid"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column label="运单号" width="120" align="center">
<!-- <el-table-column label="航班信息" width="90" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <p class="tableInline">{{scope.row.carrier}}{{scope.row.flightno}}</p>-->
<!-- <p class="tableInline">{{scope.row.flightdate}}</p>-->
<!-- <p class="tableInline">{{scope.row.originstation}}-{{scope.row.destinationstation}}</p>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="运单号" width="200" align="center">
<template slot-scope="scope">
<p class="tableInline">{{scope.row.awba}}</p>
<p class="tableInline" v-if="scope.row.awbh !==null">{{scope.row.awbh}}</p>
<span class="tableInline" v-if="scope.row.awbh !==''">{{scope.row.awbh}}</span>
<span class="tableInline" v-else>{{scope.row.awba}}</span>
</template>
</el-table-column>
<el-table-column label="运单件数/重量" width="100" align="center">
<template slot-scope="scope">
{{scope.row.piece}}
{{scope.row.awbinfo.pcs}}/{{scope.row.awbinfo.weight}}
</template>
</el-table-column>
<el-table-column label="预配件数/重量" width="100" align="center">
<template slot-scope="scope">
{{scope.row.weight}}
{{scope.row.piece}}/{{scope.row.weight}}
</template>
</el-table-column>
<el-table-column label="货物描述" width="120" align="center">
... ... @@ -87,67 +93,75 @@
{{scope.row.actime}}
</template>
</el-table-column>
<el-table-column label="代理人代码" width="120" align="center">
<template slot-scope="scope">
{{scope.row.status}}
</template>
</el-table-column>
<!--<el-table-column label="代理人代码" width="120" align="center">-->
<!--<template slot-scope="scope">-->
<!--{{scope.row.status}}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="状态" width="100" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status ==='01'">未发送</span>
<span v-if="scope.row.status ==='02'">已发舱单报</span>
<span v-if="scope.row.status ==='01'">接受申报</span>
<span v-if="scope.row.status ==='02'">待人工审核</span>
<span v-if="scope.row.status ==='03'">退单</span>
<span v-if="scope.row.status ==='05'">舱单报退单</span>
<span v-if="scope.row.status ==='06'">舱单转人工</span>
<span v-if="scope.row.status ==='07'">舱单报申报成功</span>
<span v-if="scope.row.status ==='08'">已发舱单删除报</span>
<span v-if="scope.row.status ==='09'">舱单删除报退单</span>
<span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
<span v-if="scope.row.status ==='11'">舱单删除成功</span>
<span v-if="scope.row.status ==='12'">已发舱单修改报</span>
<span v-if="scope.row.status ==='13'">舱单修改报退单</span>
<span v-if="scope.row.status ==='11'">放行</span>
<span v-if="scope.row.status ==='12'">拒装</span>
<span v-if="scope.row.status ==='13'">禁卸</span>
<span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
<span v-if="scope.row.status ==='21'">可自动发送</span>
<span v-if="scope.row.status ==='22'">未发送</span>
<span v-if="scope.row.status ==='23'">已发送新增报</span>
<span v-if="scope.row.status ==='24'">已发送删除报</span>
<span v-if="scope.row.status ==='25'">已发送修改报</span>
</template>
</el-table-column>
<el-table-column prop="receipt" label="回执信息" align="center">
<template slot-scope="scope">
{{scope.row.ext5}}
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
</template>
</el-table-column>
<el-table-column label="操作" width="300">
<el-table-column label="操作" width="450" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑运单</el-button>
<el-button size="mini" type="success" v-if="scope.row.awbh ===null"
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)" >编辑</el-button>
<el-button size="mini" type="success" v-if="scope.row.awbh ===''"
@click="handleAddAwbh(scope.row)">新增分单
</el-button>
<el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
:disabled="scope.row.status !== '01'">发舱单报
:disabled="addStatus(scope.row.status)">发送预配舱单报
</el-button>
<p></p>
<el-button size="mini" type="primary" @click="handleAwbEdit(scope.row)">发修改报</el-button>
<el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button>
<el-button size="mini" type="primary" @click="handleAwbEdit(scope.row)"
:disabled="editStatus(scope.row.status)">发送预配修改报</el-button>
<!-- <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button>-->
<el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
:disabled="scope.row.status === '01'">更改状态
:disabled="scope.row.status === '22'">更改状态
</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
:disabled="deleteStatus(scope.row.status)">发送预配删除报</el-button>
</template>
</el-table-column>
</tree-table>
</el-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini" v-if="preData.flightno !== undefined || preData.length> 0"
<el-button type="primary" size="mini" v-if="preQuery.flightno !== undefined | preData.length > 0"
@click="handleAddpreInfo">新增预配舱单
</el-button>
<el-button type="primary" size="mini" @click="handelBackStep"
v-if="preModel.flightno !== undefined || preData.length >0">返回
v-if="preQuery.flightno !== undefined || preData.length >0">返回
</el-button>
</el-row>
</div>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
<pagination v-show="total>0" :total="total" :page.sync="preQuery.pageSize" :limit.sync="preQuery.limitSize"
@pagination="getList"/>
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="60%">
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="85%">
<el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right"
label-width="120px" class="el-dialog-div">
<div class="grid-content content">
... ... @@ -159,7 +173,7 @@
<el-input :disabled="dialogStatus !== 'create'" v-model="awba" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5" v-if="dialogStatus === 'addAwbh'">
<el-col :span="7.5" v-if="fenStatus === 'addAwbh'">
<el-form-item label="分单号" prop="awbh">
<el-input v-model="awbh" clearable/>
</el-form-item>
... ... @@ -171,17 +185,17 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier" :disabled="dialogStatus === 'addAwbh'" clearable/>
<el-input v-model="carrier" :disabled="fenStatus === 'addAwbh'" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班号" prop="flightno">
<el-input v-model="flightno" :disabled="dialogStatus === 'addAwbh'" clearable/>
<el-input v-model="flightno" :disabled="fenStatus === 'addAwbh'" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班日期" prop="flightdate">
<el-date-picker :disabled="dialogStatus === 'addAwbh'"
<el-date-picker :disabled="fenStatus === 'addAwbh'"
value-format="yyyy-MM-dd"
v-model="preModel.flightdate" align="right"
type="date" placeholder="请输入航班日期" clearable/>
... ... @@ -192,12 +206,34 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
<el-select
filterable
clearable
placeholder="请选择起始站"
:remote-method="remoteMethodAirport"
allow-create remote
v-model="originstation"
:loading="airportLoading">
<el-option v-for="item in airportCode"
:key="item.airportid" :label="item.airportid"
:value="item.airportid" :disabled="fenStatus === 'addAwbh'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="destinationstation">
<el-input v-model="destinationstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
<el-select filterable clearable placeholder="请选择目的站" allow-create remote
v-model="destinationstation" :remote-method="remoteMethodAirport">
<el-option v-for="item in airportCode"
:key="item.airportid" :label="item.airportid"
:value="item.airportid" :disabled="fenStatus === 'addAwbh'" >
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
... ... @@ -264,13 +300,13 @@
</el-col>
</el-row>
<el-row>
<el-col :span="7.5" v-if="dialogStatus !=='addAwbh'">
<el-col :span="7.5" v-if="fenStatus !=='addAwbh'">
<el-form-item label="预配件数" prop="piece">
<el-input v-model="preModel.piece" clearable/>
</el-form-item>
</el-col>
<el-col :span="8" v-if="dialogStatus ==='addAwbh'">
<el-col :span="13">
<el-col :span="8" v-if="fenStatus ==='addAwbh'">
<el-col :span="14">
<el-form-item label="预配件数" prop="piece">
<el-input v-model="preModel.piece" clearable/>
</el-form-item>
... ... @@ -279,13 +315,14 @@
<span>剩余件数:{{awbPiece}}</span>
</el-col>
</el-col>
<el-col :span="7.5" v-if="dialogStatus !=='addAwbh'">
<el-col :span="7.5" v-if="fenStatus !=='addAwbh'">
<el-form-item label="预配重量" prop="weight">
<el-input v-model="preModel.weight" clearable/>
</el-form-item>
</el-col>
<el-col :span="8" v-if="dialogStatus ==='addAwbh'">
<el-col :span="13">
<el-col :span="8" v-if="fenStatus ==='addAwbh'">
<el-col :span="14">
<el-form-item label="预配重量" prop="weight">
<el-input v-model="preModel.weight" clearable/>
</el-form-item>
... ... @@ -306,24 +343,28 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="关区代码" prop="customcode">
<el-select v-model="preModel.customcode" class="filter-item" placeholder="请选择关区代码"
:disabled="dialogStatus === 'addAwbh'">
<el-option v-for="item in customcodeList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
<el-select v-model="preModel.customcode" placeholder="请选择关区代码"
filterable clearable :remote-method="remoteMethodCustomCode" :loading="customLoading" remote
:disabled="fenStatus === 'addAwbh'">
<el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode"
:value="item.customcode">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="海关状态">
<el-select v-model="preModel.awbtype" class="filter-item" placeholder="请录入货物类型">
<el-select v-model="preModel.awbinfo.awbtype" class="filter-item" placeholder="请录入货物类型">
<el-option v-for="item in customTypes" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="付费方式" prop="awbinfo.collected">
<el-select v-model="preModel.awbinfo.collected" class="filter-item" placeholder="付费方式">
<el-form-item label="付费方式" prop="awbinfo.paymodel">
<el-select v-model="preModel.awbinfo.paymodel" class="filter-item" placeholder="付费方式">
<el-option
v-for="item in payTypes"
:key="item.value"
... ... @@ -399,8 +440,9 @@
:loading="listLoading"
v-model="shprcountyr"
filterable
allow-create
remote
placeholder="请选择" clearable>
placeholder="请选择" clearable>目的站
<el-option
v-for="item in countryOption"
:key="item.value"
... ... @@ -477,6 +519,7 @@
:listLoading="listLoading"
v-model="cnscountyr"
filterable
allow-create
remote
placeholder="请选择" clearable>
<el-option
... ... @@ -520,16 +563,40 @@
<!--</el-form-item>-->
<!--</el-col>-->
</el-row>
<div v-if="dialogStatus === 'sendUpdate'">
<div class="grid-content content">
运单信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="修改原因" prop="reason">
<el-input v-model="preModel.reason" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="修改人" prop="contactName">
<el-input v-model="preModel.contactName" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="修改人Tel" prop="contactTel">
<el-input v-model="preModel.contactTel" clearable maxlength="5"/>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogStatus !=='create'? createData():updateData()">保存</el-button>
<el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
<el-button type="primary" v-show="dialogStatus!=='sendUpdate'"
@click="dialogStatus ==='create'? createData():updateData()">保存</el-button>
<el-button type="primary" v-show="dialogStatus==='sendUpdate'" @click="sendUpdate()">发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<el-table-column label="操作时间" width="180">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
... ... @@ -559,6 +626,11 @@
{{scope.row.cusrestext}}
</template>
</el-table-column>
<el-table-column label="操作类型" width="100">
<template slot-scope="scope">
{{scope.row.opertype}}
</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
... ... @@ -566,15 +638,45 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="删除原因" :visible.sync="dialogDeleteVisble" width="30%">
<el-form ref="sendDeleteForm" :model="respModel" :rules="sendDeleteRules" label-width="120px"
style="margin-right:50px;">
<el-form-item label="删除原因" prop="reason">
<el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
</el-form-item>
<el-form-item label="删除操作人" prop="contactName">
<el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
</el-form-item>
<el-form-item label="操作人Tel" prop="contactTel">
<el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="respModel.content" type="textarea"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogDeleteVisble = false">取消</el-button>
<el-button type="primary" @click="sendDelete()">发送</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getCountry, getByCountryCode, getByCountryCodeForName} from "@/api/country";
import {getMt2201ListForParam, deleteByIsDelete, updateStatus, updateMT2201, addMt2201} from '@/api/exitPre'
import util from '@/common/js/util'
import {getCountry, getByCountryCode, getByCountryCodeForName,getCustomCode,getAirportCode} from "@/api/country";
import {
getMt2201ListForParam,
deleteByIsDelete,
updateStatus,
updateMT2201,
addMt2201,
sendCreateMt2201,
sendDeleteMt2201,
sendUpdateMt2201
} from '@/api/exitPre'
import {Message} from "element-ui";
import {getResponseForParam} from '@/api/responseDetail'
import {
... ... @@ -623,16 +725,17 @@
return {
func: treeToArray,
total: 1,
isAdmin:false,
listQuery: {
isAdmin: false,
preQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
carrier: undefined,
flightNo: undefined,
flightDate: undefined,
originStation: undefined,
destinationStation: undefined
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
messageType: undefined
},
dialogMap: {
update: '编辑预配舱单',
... ... @@ -647,10 +750,15 @@
{label: '快件', value: '005'}],
payTypes: [{label: '预付', value: '0'}, {label: '到付', value: '1'}],
splitcodes: [{label: '是', value: 'T'}, {label: '否', value: 'P'}],
customcodeList: [{label: '4604', value: '4604'}, {label: '4620', value: '4620'}],
customCodeList: [],
airportCode:[],
dialogStatus: undefined,
fenStatus:undefined,
dialogTableVisible: false,
dialogDeleteVisble: false,
listLoading: false,
customLoading:false,
airportLoading:false,
disabledStatus: false,
dialogFormVisible: false,
countryOption: [],
... ... @@ -670,9 +778,12 @@
customcode: [{required: true, message: '关区代码必须选择', trigger: 'change'}],
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
'awbinfo.collected': [{required: true, message: '付款方式必选', trigger: 'change'}],
'awbinfo.paymodel': [{required: true, message: '付款方式必选', trigger: 'change'}],
goodsname: [{required: true, trigger: 'change', validator: validAlphabetsSpanceKey}],
ex5: [{required: true, message: '货物描述不能为空', trigger: 'blur'}],
reason:[{required: true, message: '修改原因不能为空', trigger: 'blur'}],
contactName:[{required: true, message: '修改操作人不能为空', trigger: 'blur'}],
contactTel:[{required: true, message: '修改操作人联系方式不能为空', trigger: 'blur'}],
'awbinfo.sairportid': [{required: true, message: '起始航站不能为空', trigger: 'change'}],
'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}],
'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}],
... ... @@ -686,6 +797,7 @@
'awbinfo.pcs': [{required: true, trigger: 'change', validator: validatorNums}],
},
preModel: {
uuid: undefined,
awba: undefined,
awbh: undefined,
customcode: undefined,
... ... @@ -703,6 +815,9 @@
uldNo: undefined,
status: undefined,
ex5: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
awbinfo: {
pcs: undefined,
weight: undefined,
... ... @@ -731,7 +846,7 @@
cargonm: undefined,
sairportid: undefined,
dest1city: undefined,
by1: undefined,
by1: '',
dest1: undefined,
by2: undefined,
dest2: undefined,
... ... @@ -739,12 +854,30 @@
dest3: undefined,
eairportid: undefined,
csgcustomerid: undefined,
collected: '0',
paymodel: '0',
awbtype: undefined
}
},
respModel: {
uuid: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
},
sendDeleteRules:{
reason:[{required:true,message:'删除原因不能为空',trigger:'blur'}],
contactName:[{required:true,message:'删除操作人不能为空',trigger:'blur'}],
contactTel:[{required:true,message:'操作人联系方式不能为空',trigger:'blur'}]
},
preData: [],
detailData: []
detailData: [],
rows:[]
}
},
mounted() {
... ... @@ -757,20 +890,24 @@
},
created() {
if (this.$route.params.flightData !== undefined) {
this.listQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.listQuery.flightNo = this.$route.params.flightData.flightno.substring(2)
this.listQuery.flightDate = this.$route.params.flightData.flightdate
this.listQuery.originStation = this.$route.params.flightData.originstation
this.listQuery.destinationStation = this.$route.params.flightData.destinationstation
this.listQuery.awba = this.$route.params.flightData.awba
this.preQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.preQuery.flightno = this.$route.params.flightData.flightno.substring(2)
this.preQuery.flightdate = this.$route.params.flightData.flightdate
this.preQuery.originstation = this.$route.params.flightData.originstation
this.preQuery.destinationstation = this.$route.params.flightData.destinationstation
if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
this.preQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
}
this.getList()
}
this.getCountryList()
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
if (username === 'admin') {
this.isAdmin = true
}
},
// 验证
computed: {
awba: {
get: function () {
... ... @@ -930,10 +1067,10 @@
},
by1: {
get: function () {
return this.preModel.awbinfo.by1
return util.checkNull(this.preModel.awbinfo.by1)?this.preModel.awbinfo.by1:''
},
set: function (val) {
this.preModel.awbinfo.by1 = val.toUpperCase().trim()
this.preModel.awbinfo.by1 = util.checkNull(val)?val.toUpperCase().trim():''
}
},
dest1: {
... ... @@ -981,24 +1118,26 @@
// >>>>>>>>>>>>>>>>获取list集合<<<<<<<<<<<<<<<<<<
getList() {
this.listLoading = true
if (this.listQuery.awba !== undefined && this.listQuery.awba !== '') {
getMt2201ListForParam(this.listQuery).then(res => {
if (this.preQuery.awba !== undefined && this.preQuery.awba !== '') {
getMt2201ListForParam(this.preQuery).then(res => {
this.preData = res.data.dataList
this.total = res.data.count
if (res.data.count > 0) {
this.listQuery.carrier = this.preData[0].carrier
this.listQuery.flightNo = this.preData[0].flightno
this.listQuery.flightDate = this.preData[0].flightdate
this.listQuery.originStation = this.preData[0].originstation
this.listQuery.destinationStation = this.preData[0].destinationstation
this.listQuery.customcode = this.preData[0].customcode
console.log("主单号不为空时打印")
console.log(res.data)
if (res.data.dataList.length > 0) {
this.preQuery.carrier = this.preData[0].carrier
this.preQuery.flightno = this.preData[0].flightno
this.preQuery.flightdate = this.preData[0].flightdate
this.preQuery.originstation = this.preData[0].originstation
this.preQuery.destinationstation = this.preData[0].destinationstation
this.preQuery.customcode = this.preData[0].customcode
}
setTimeout(() => {
this.listLoading = false
}, 1500)
})
} else {
getMt2201ListForParam(this.listQuery).then(res => {
getMt2201ListForParam(this.preQuery).then(res => {
this.preData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
... ... @@ -1006,7 +1145,6 @@
}, 1500)
})
}
},
// >>>>>>>>>>>>>>>>重置实体<<<<<<<<<<<<<<<<<<
restModel() {
... ... @@ -1065,19 +1203,19 @@
dest3: undefined,
eairportid: undefined,
csgcustomerid: undefined,
collected: '0',
paymodel: '0',
}
}
},
// >>>>>>>>>>>>>>>>新增主单<<<<<<<<<<<<<<<<<<
handleAddpreInfo() {
this.restModel()
this.preModel.carrier = this.listQuery.carrier
this.preModel.flightno = this.listQuery.flightno
this.preModel.flightdate = this.listQuery.flightdate
this.preModel.originstation = this.listQuery.originstation
this.preModel.destinationstation = this.listQuery.carrier
this.preModel.customcode = this.listQuery.customcode
this.preModel.carrier = this.preQuery.carrier
this.preModel.flightno = this.preQuery.flightno
this.preModel.flightdate = this.preQuery.flightdate
this.preModel.originstation = this.preQuery.originstation
this.preModel.destinationstation = this.preQuery.destinationstation
this.preModel.customcode = this.preQuery.customcode
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
... ... @@ -1105,19 +1243,20 @@
},
// >>>>>>>>>>>>>>>>搜索<<<<<<<<<<<<<<<<<<
handleSerach() {
this.listQuery.carrier = undefined
this.listQuery.flightno = undefined
this.listQuery.originstation = undefined
this.listQuery.flightdate = undefined
this.listQuery.destinationstation = undefined
// this.preQuery.flightno = undefined
// this.preQuery.carrier = undefined
// this.preQuery.originstation = undefined
// this.preQuery.flightdate = undefined
// this.preQuery.destinationstation = undefined
this.getList()
},
// >>>>>>>>>>>>>>>>收发明细<<<<<<<<<<<<<<<<<<
handleSend(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
flightno: row.flightno,
flightdate: row.flightdate,
orpertype: row.orpertype,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT2201'
... ... @@ -1128,13 +1267,46 @@
})
},
// >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<<
handleAwbSend() {
handleAwbSend(row) {
delete row.parent
delete row.children
this.rows = row;
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
if (row.awbh === null) {
row.awbh = ''
}
sendCreateMt2201(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.rows.status="23";
this.rows.ext5="新增报发送成功";
} else {
Message.error(res.data.respMessage)
}
})
})
},
// 发送舱单报 按钮自灰
addStatus(status){
if(status=='23' || status=='24'||status=='25'){
return true;
}else if(status=='22' ) {
return false;
}
},
// >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<<
handleEdit(row) {
console.log(row)
this.preModel = Object.assign({}, row)
this.dialogStatus = 'update'
if (row.awbh !== undefined && row.awbh !== ""){
this.fenStatus = 'addAwbh'
}
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.preFormData.clearValidate()
... ... @@ -1158,14 +1330,116 @@
})
},
// >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<<
handleAwbEdit() {
handleAwbEdit(row) {
delete row.parent
delete row.children
this.rows = row;
this.preModel = Object.assign({}, row)
this.dialogStatus = 'sendUpdate'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.preFormData.clearValidate()
})
},
// 发送修改报自灰
editStatus(status){
if(status=='23' || status=='24'||status=='25'){
return true;
}else if(status=='25' ) {
return false;
}
},
// >>>>>>>>>>>>>>>>保存并发送<<<<<<<<<<<<<<<<<<
handleSaveAndSend() {
sendUpdate(){
this.respModel.reason = this.preModel.reason
this.respModel.contactName = this.preModel.contactName
this.respModel.contactTel = this.preModel.contactTel
//
delete this.preModel._expanded
delete this.preModel._level
delete this.preModel._marginLeft
delete this.preModel._show
delete this.preModel._width
const reason = this.preModel.reason
const contactName = this.preModel.contactName
const contactTel = this.preModel.contactTel
this.$refs.preFormData.validate(valid =>{
if(valid){
delete this.preModel.reason
delete this.preModel.contactName
delete this.preModel.contactTel
const map = {
'mt2201': this.preModel,
'reason' : reason,
'contactName': contactName,
'contactTel': contactTel,
}
sendUpdateMt2201(map).then(res =>{
if(res.data.count >0){
Message.success(res.data.respMessage)
this.rows.status="25";
this.rows.ext5="修改报发送成功";
this.dialogFormVisible = false
}else {
Message.error(res.data.respMessage)
}
})
}
})
},
// >>>>>>>>>>>>>>>>发送删除报<<<<<<<<<<<<<<<<<<
handleSendDelete(row) {
this.respModel = {
carrier: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
}
this.rows = row;
this.dialogDeleteVisble = true
this.respModel.awba = row.awba
this.respModel.flightNo = row.flightno
this.respModel.customCode = row.customcode
this.respModel.awbh = row.awbh
this.respModel.flightDate = row.flightdate
this.respModel.carrier = row.carrier
this.$nextTick(()=>{
this.$refs.sendDeleteForm.clearValidate()
})
},
// 发送删除报按钮自灰
deleteStatus(status){
if(status=='23' || status=='24'||status=='25'){
return true;
}else if(status=='24' ) {
return false;
}
},
sendDelete() {
this.$refs.sendDeleteForm.validate(valid =>{
if(valid){
sendDeleteMt2201(this.respModel).then(res => {
if(res.data.count>0){
Message.success(res.data.respMessage)
this.dialogDeleteVisble = false
this.rows.status="24";
this.rows.ext5="删除报发送成功";
}else {
Message.error(res.data.respMessage)
}
})
}
})
},
//>>>>>>>>>>>>>>>>删除运单<<<<<<<<<<<<<<<<<<
handleAwbDelete(row) {
delete row.parent
delete row.children
... ... @@ -1199,27 +1473,28 @@
},
// >>>>>>>>>>>>>>>>更改运单状态<<<<<<<<<<<<<<<<<<
handleAwbStatus(row) {
delete row.parent
delete row.children
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
this.getList()
} else {
this.$message({
type: 'error',
message: '状态更改失败,请稍后重试'
})
}
})
if (row.status!==22){
row.status =22;
}
// updateStatus(row).then(res => {
// if (res.data.count > 0) {
// this.$message({
// type: 'success',
// message: '当前运单状态已更改'
// })
// this.getList()
// } else {
// this.$message({
// type: 'error',
// message: '状态更改失败,请稍后重试'
// })
// }
// })
}).catch(action => {
this.$message({
... ... @@ -1234,6 +1509,7 @@
handleAddAwbh(row) {
this.restModel()
const template = Object.assign({}, row) // copy obj
this.preModel.uuid = template.uuid
this.preModel.awba = template.awba
this.preModel.flightdate = template.flightdate
this.preModel.flightno = template.flightno
... ... @@ -1242,18 +1518,18 @@
this.preModel.carrier = template.carrier
this.preModel.awbinfo.shprcountyr = template.awbinfo.shprcountyr
this.preModel.originstation = template.originstation
this.preModel.awbinfo.collected = template.awbinfo.collected
this.preModel.awbinfo.paymodel = template.awbinfo.paymodel
this.preModel.awbinfo.sairportid = template.awbinfo.sairportid
this.preModel.awbinfo.eairportid = template.awbinfo.eairportid
this.preModel.awbinfo.ex5 = template.awbinfo.ex5
this.listQuery.awba = template.awba
this.listQuery.flightDate = template.flightdate
this.listQuery.flightNo = template.flightno
this.listQuery.originStation = template.originstation
this.listQuery.destinationStation = template.destinationstation
this.listQuery.customcode = template.customcode
this.listQuery.carrier = template.carrier
getMt2201ListForParam(this.listQuery).then(res => {
this.preQuery.awba = template.awba
this.preQuery.flightdate = template.flightdate
this.preQuery.flightno = template.flightno
this.preQuery.originstation = template.originstation
this.preQuery.destinationstation = template.destinationstation
this.preQuery.customcode = template.customcode
this.preQuery.carrier = template.carrier
getMt2201ListForParam(this.preQuery).then(res => {
this.awbPiece = 0
this.awbWeight = 0
let residuePiece = 0
... ... @@ -1271,14 +1547,14 @@
this.awbWeight = res.data.dataList[0].weight - residueWeight
}
})
this.dialogStatus = 'addAwbh'
this.dialogStatus = 'create'
this.fenStatus = 'addAwbh'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.preFormData.clearValidate()
})
},
//获取城市列表
//获取国家列表
getCountryList() {
getCountry().then(res => {
this.countryList = res.data.dataList
... ... @@ -1294,22 +1570,44 @@
.indexOf(query.toUpperCase()) > -1
})
}, 200)
// if (query.length > 1) {
// this.selectCountry.countryCode = query
// getByCountryCode(this.selectCountry).then(res => {
// this.shpCompnyList = res.data.dataList
// this.shpCompnyTypeOption = this.shpCompnyList.map(item => {
// console.log(item)
// return {value: item.enterpriseCode, label: item.enterpriseCode}
// })
// })
// }
} else {
this.countryOption = []
}
},
remoteMethodAirport(query){
this.airportCode = []
if (query !== '') {
this.airportLoading = true
getAirportCode({airportid: query}).then(res => {
if(res !== null){
setTimeout(() => {
this.airportLoading = false
this.airportCode = res.data.data
}, 200)
}
})
} else {
this.airportCode = []
}
},
remoteMethodCustomCode(query){
this.customCodeList = []
if (query !== '') {
this.customLoading = true
getCustomCode({customcode: query}).then(res => {
if(res !== null){
setTimeout(() => {
this.customLoading = false
this.customCodeList = res.data.data
}, 200)
}
})
} else {
this.airportCode = []
}
},
handleAddpre() {
const row = {
'messageType': 'MT2201'
... ... @@ -1318,7 +1616,8 @@
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.preModel}})
this.preQuery.messageType = 'MT2201'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.preQuery}})
}
}
}
... ...
... ... @@ -21,7 +21,7 @@
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content">进港舱单查询</div>
<div class="grid-content content">出港理货查询</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
... ... @@ -32,7 +32,7 @@
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input v-model="tidyQuery.awba" placeholder="请输入主单号"></el-input>
<el-input v-model="tidyQuery.awba" placeholder="请输入主单号" clearable></el-input>
</div>
</el-col>
<div class="grid-content el-btn">
... ... @@ -51,23 +51,30 @@
</el-col>
</el-row>
</div>
<tree-table v-loading="listLoading" :data="tidyData" :eval-func="func" :expand-all="true" stripe
style="font-size: 12px" border @selection-change="handleSelectionChange">
<el-table-column label="运单号" width="110" align="center">
<el-table v-loading="listLoading" :data="tidyData" stripe
highlight-current-row
default-expand-all
row-key="uuid"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
style="font-size: 12px" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column label="运单号" width="150" align="center">
<template slot-scope="scope">
<span>{{scope.row.awba}}</span>
</template>
</el-table-column>
<el-table-column label="单号" width="120" align="center">
<el-table-column label="单号" width="120" align="center">
<template slot-scope="scope">
<span>{{scope.row.awbh}}</span>
</template>
</el-table-column>
<el-table-column label="运单件数/重量" width="100" align="center">
<template slot-scope="scope">
<span>{{scope.row.awbpiece}} / {{scope.row.awbweight}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="运单件数/重量" width="100" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{scope.row.awbpiece}} / {{scope.row.awbweight}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="理货件数/重量" width="100" align="center">
<template slot-scope="scope">
<span>{{scope.row.piece}} / {{scope.row.weight}}</span>
... ... @@ -81,51 +88,55 @@
<el-table-column label="状态" width="100" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status ==='01'">未发送</span>
<span v-if="scope.row.status ==='02'">已发舱单报</span>
<span v-if="scope.row.status ==='02'">待人工审核</span>
<span v-if="scope.row.status ==='03'">退单</span>
<span v-if="scope.row.status ==='05'">舱单报退单</span>
<span v-if="scope.row.status ==='06'">舱单转人工</span>
<span v-if="scope.row.status ==='07'">舱单报申报成功</span>
<span v-if="scope.row.status ==='08'">已发舱单删除报</span>
<span v-if="scope.row.status ==='09'">舱单删除报退单</span>
<span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
<span v-if="scope.row.status ==='11'">舱单删除成功</span>
<span v-if="scope.row.status ==='12'">已发舱单修改报</span>
<span v-if="scope.row.status ==='13'">舱单修改报退单</span>
<span v-if="scope.row.status ==='11'">放行</span>
<span v-if="scope.row.status ==='12'">拒装</span>
<span v-if="scope.row.status ==='13'">禁卸</span>
<span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
<span v-if="scope.row.status ==='21'">可自动发送</span>
<span v-if="scope.row.status ==='22'">未发送</span>
<span v-if="scope.row.status ==='23'">已发送新增报</span>
<span v-if="scope.row.status ==='24'">已发送删除报</span>
<span v-if="scope.row.status ==='25'">已发送修改报</span>
</template>
</el-table-column>
<el-table-column prop="receipt" label="回执信息" width="180" align="center">
<el-table-column label="回执信息" show-overflow-tooltip width="230" align="center">
<template slot-scope="scope">
<span>{{scope.row.ext5}}</span>
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" show-overflow-tooltip align="center">
<el-table-column prop="operation" label="操作" width="420px" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑</el-button>
<el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
:disabled="scope.row.status !=='00'">发舱单报
</el-button>
<el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button>
:disabled="addStatus(scope.row.status)">发送出港理货报</el-button>
<el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button>
<p></p>
<el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
:disabled="scope.row.status ==='00'">更改状态
</el-button>
<el-button size="mini" type="primary" v-if="scope.row.awbh ===null"
@click="handleAddAwbh(scope.row)">新增分单
</el-button>
:disabled="scope.row.status ==='22'">更改状态</el-button>
<el-button size="mini" type="primary" v-if="scope.row.awbh ===''"
@click="handleAddAwbh(scope.row)">新增分单</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
:disabled="deleteStatus(scope.row.status)">发出港理货删除报</el-button>
</template>
</el-table-column>
</tree-table>
</el-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini" v-if="tidyModel.flightno !== undefined || tidyData.length> 0"
<el-button type="primary" size="mini" v-if="tidyQuery.flightno !== undefined || tidyData.length> 0"
@click="handelAddTidyInfo">新增出港理货
</el-button>
<el-button type="primary" size="mini" v-if="tidyModel.flightno !== undefined || tidyData.length> 0"
<el-button type="primary" size="mini" v-if="tidyQuery.flightno !== undefined || tidyData.length> 0"
@click="handelBackStep">返回
</el-button>
</el-row>
... ... @@ -148,8 +159,8 @@
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="分单号" prop="awbh">
<el-input v-model="awbh" :disabled="dialogStatus === 'addAwbh'"></el-input>
<el-form-item label="分单号" prop="awbh" v-if="fenStatus === 'addAwbh'">
<el-input v-model="awbh" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -174,14 +185,29 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogStatus === 'update'"></el-input>
<el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
allow-create v-model="originstation" remote>
<el-option v-for="item in airportCode"
:key="item.airportid" :label="item.airportid"
:value="item.airportid" :disabled="dialogStatus === 'update'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="destinationstation">
<el-input v-model="destinationstation"
:disabled="dialogStatus === 'update'"></el-input>
<el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
allow-create v-model="destinationstation" remote>
<el-option v-for="item in airportCode"
:key="item.airportid" :label="item.airportid"
:value="item.airportid" :disabled="dialogStatus === 'update'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
... ... @@ -192,18 +218,18 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="运单件数" prop="price">
<el-form-item label="运单件数" prop="awbprice">
<el-input v-model="tidyModel.awbprice"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="运单重量" prop="weight">
<el-form-item label="运单重量" prop="awbweight">
<el-input v-model="tidyModel.awbweight"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-col :span="7.5">
<el-form-item label="装载开始时间" prop="endtime">
<el-form-item label="装载开始时间" prop="starttime">
<el-date-picker v-model="tidyModel.starttime" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="请输入"></el-date-picker>
... ... @@ -222,13 +248,13 @@
<el-input v-model="tidyModel.weight"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="装载结束时间" prop="endtime">
<el-date-picker v-model="tidyModel.endtime" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="请输入"></el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="7.5">-->
<!-- <el-form-item label="装载结束时间" prop="endtime">-->
<!-- <el-date-picker v-model="tidyModel.endtime" value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- type="datetime"-->
<!-- placeholder="请输入"></el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="7.5">
... ... @@ -238,9 +264,16 @@
</el-col>
<el-col :span="7.5">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="tidyModel.customcode">
<el-option v-for="item in customcodeList " :key="item" :label="item"
:value="item"></el-option>
<el-select v-model="tidyModel.customcode" placeholder="请选择关区代码"
allow-create
default-first-option
filterable clearable remote :remote-method="remoteMethodCustomCode" :loading="customLoading"
>
<el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode"
:value="item.customcode">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
... ... @@ -249,12 +282,11 @@
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
<el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<el-table-column label="操作时间" width="180">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
... ... @@ -284,6 +316,11 @@
{{scope.row.cusrestext}}
</template>
</el-table-column>
<el-table-column label="操作类型" width="100">
<template slot-scope="scope">
{{scope.row.opertype}}
</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
... ... @@ -291,7 +328,27 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="30%">
<el-form ref="tidyDeleteForm" :model="respModel" :rules="tidyDeleteRules"
label-width="120px" style="margin-right: 50px">
<el-form-item label="删除原因" prop="reason">
<el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
</el-form-item>
<el-form-item label="删除操作人" prop="contactName">
<el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
</el-form-item>
<el-form-item label="操作人Tel" prop="contactTel">
<el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="respModel.content" type="textarea"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogDeleteVisible = false">取消</el-button>
<el-button type="primary" @click="sendTidyDelete()">发送</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
... ... @@ -299,10 +356,15 @@
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt520XListForParam, deleteByIsDelete, updateStatus, updateMt520X, addMt520X} from '@/api/exitTidy'
import {
getMt520XListForParam, deleteByIsDelete,
updateStatus, updateMt520X, addMt520X,
sendCreateMt5202,sendRemoveMt5202 } from '@/api/exitTidy'
import {Message} from "element-ui";
import {getResponseForParam} from '@/api/responseDetail'
import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate"
import {getCustomCode,getAirportCode} from "@/api/country";
import util from "@/common/js/util.js";
export default {
name: "ExitTidy",
... ... @@ -316,10 +378,12 @@
callback()
}
const validatorAwbh = (rule, value, callback) => {
if (!validAlphabetsAndNum(value)) {
if (value !=='' && value !== undefined && !validAlphabetsAndNum(value)) {
callback("只能输入字母和数字")
}else{
callback()
}
callback()
}
const validatorAlphabets = (rule, value, callback) => {
if (!validAlphabets(value)) {
... ... @@ -348,35 +412,41 @@
create: '添加出港理货',
addAwbh: '添加分单理货'
},
customcodeList: [4604, 4620],
customCodeList: [],
airportCode:[],
tidyQuery: {
pageSize: 1,
limitSize: 100,
limitSize: 30,
awba: undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
customcode: undefined,
rcfdep: "5202"
},
tidyRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
weight: [{required: true, trigger: 'change', validator: validatorNums}],
piece: [{required: true, trigger: 'change', validator: validatorNums}],
awba: [{required: true, message: "主单号不能为空"},{ trigger: 'blur', validator: validatorAwb}],
awbh: [{trigger: 'blur', validator: validatorAwbh}],
goodsname: [{required: true, message: "货物描述不能为空"},{ trigger: 'blur', validator: validAlphabetsSpanceKey}],
carrier: [{required: true, message:"承运人不能为空"},{trigger: 'blur', validator: validatorAwbh}],
flightno: [{required: true, message:"航班号不能为空"}, { trigger: 'blur', validator: validatorAwbh}],
originstation: [{required: true, message:"起始站不能为空"}, {trigger: 'blur', validator: validatorAlphabets}],
destinationstation: [{required: true, message:"目的站不能为空"}, { trigger: 'blur', validator: validatorAlphabets}],
weight: [{required: true, message:"重量不能为空"}, { trigger: 'change', validator: validatorNums}],
piece: [{required: true, message:"件数不能为空"}, { trigger: 'change', validator: validatorNums}],
},
tidyData: [],
detailData: [],
dialogTableVisible: false,
dialogDeleteVisible: false,
dialogStatus: undefined,
disabledStatus: false,
fenStatus: undefined,
listLoading: false,
customLoading:false,
dialogFormVisible: false,
tidyModel: {
carrier: undefined,
... ... @@ -396,7 +466,27 @@
awbpiece: undefined,
awbweight: undefined,
rcfdep: 'MT5202',
}
},
respModel : {
uuid: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: undefined,
rcfdep: 'MT5202',
},
tidyDeleteRules: {
reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],
contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],
contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}]
},
rows:{},
}
},
created() {
... ... @@ -489,11 +579,11 @@
getList() {
this.listLoading = true
//根据是否有主单号 来给查询条件赋值
if (this.tidyQuery.awba != undefined && this.tidyQuery.awba != '') {
if (this.tidyQuery.awba !== undefined && this.tidyQuery.awba !== '') {
getMt520XListForParam(this.tidyQuery).then(res => {
this.tidyData = res.data.dataList
this.total = res.data.count
if (res.data.count > 0) {
if (res.data.dataList.length > 0) {
this.tidyQuery.carrier = this.tidyData[0].carrier
this.tidyQuery.flightno = this.tidyData[0].flightno
this.tidyQuery.flightdate = this.tidyData[0].flightdate
... ... @@ -522,11 +612,11 @@
},
// 搜索
handleSerach() {
this.tidyQuery.carrier = undefined
this.tidyQuery.flightno = undefined
this.tidyQuery.originstation = undefined
this.tidyQuery.flightdate = undefined
this.tidyQuery.destinationstation = undefined
// this.tidyQuery.carrier = undefined
// this.tidyQuery.flightno = undefined
// this.tidyQuery.originstation = undefined
// this.tidyQuery.flightdate = undefined
// this.tidyQuery.destinationstation = undefined
this.getList()
},
// 收发明细
... ... @@ -535,22 +625,57 @@
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
opertype: row.opertype,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT5202'
rcfdep: 'MT5202'
}
this.dialogTableVisible = true
getResponseForParam(resQuery).then(res => {
this.detailData = res.data
})
},
//发送舱单报
handleAwbSend(row) {
delete row.children
delete row.parent
this.rows = row;
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
console.log(row)
sendCreateMt5202(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
// this.getList()
this.rows.status="23";
this.rows.ext5="新增报发送成功";
}else {
Message.error(res.data.respMessage)
}
})
}).catch(error =>{
Message.error(error.message)
})
},
// 发送舱单报自灰
addStatus(status){
if(status=='23' || status=='24'||status=='25'){
return true;
}else if(status=='22' ) {
return false;
}
},
//新增分单理货
handleAddAwbh(row) {
this.fenStatus='addAwbh'
// 清空from列表
this.restModel();
this.tidyModel.carrier = row.carrier
this.tidyModel.awba = row.awba
this.tidyModel.flightdate = row.flightdate
... ... @@ -558,12 +683,71 @@
this.tidyModel.originstation = row.originstation
this.tidyModel.destinationstation = row.destinationstation
this.tidyModel.customcode = row.customcode
this.dialogStatus = 'addAwbh'
// this.dialogStatus = 'addAwbh'
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.tidyFormData.clearValidate()
})
},
// 发删除报
handleSendDelete(row){
this.rows = row;
this.respModel = {
carrier: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: undefined,
rcfdep: 'MT5202',
}
this.dialogDeleteVisible = true
this.respModel.carrier = row.carrier
this.respModel.flightNo = row.flightno
this.respModel.awba = row.awba
this.respModel.customCode = row.customcode
this.respModel.flightDate = row.flightdate
if(row.awbh === null){
this.respModel.awbh = ''
}else {
this.respModel.awbh = row.awbh
}
this.$nextTick(() => {
this.$refs.tidyDeleteForm.clearValidate()
})
},
// 删除舱单报自灰
deleteStatus(status){
if(status=='23' || status=='24'||status=='25'){
return true;
}else if(status=='22' ) {
return false;
}
},
// 发送删除报
sendTidyDelete(){
this.$refs.tidyDeleteForm.validate(valid =>{
if(valid){
sendRemoveMt5202(this.respModel).then(res =>{
if(res.data.count >0){
Message.success(res.data.respMessage)
this.dialogDeleteVisible = false
this.rows.status="24";
this.rows.ext5="删除报发送成功";
}else {
Message.error(res.data.respMessage)
}
})
}
})
},
// 删除当前运单
handleAwbDelete(row) {
delete row.parent
... ... @@ -575,16 +759,10 @@
}).then(() => {
deleteByIsDelete(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '删除成功'
})
Message.success("删除成功")
this.getList()
} else {
this.$message({
type: 'error',
message: '删除异常,请稍后重试'
})
Message.success("删除异常,请稍后重试")
}
})
}).catch(action => {
... ... @@ -599,27 +777,23 @@
},
// 更新运单为可发送状态
handleAwbStatus(row) {
delete row.parent
delete row.children
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
this.getList()
} else {
this.$message({
type: 'error',
message: '更新失败,请稍后重试'
})
}
})
if (row.status!==22){
row.status =22;
}
// updateStatus(row).then(res => {
// if (res.data.count > 0) {
// Message.success(res.data.respMessage)
// this.getList()
// } else {
// Message.error(res.data.respMessage)
// }
// })
}).catch(action => {
this.$message({
type: 'info',
... ... @@ -654,6 +828,7 @@
},
// 新增出港理货弹框
handelAddTidyInfo() {
this.fenStatus=undefined;
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.tidyModel.carrier = this.tidyQuery.carrier
... ... @@ -686,6 +861,11 @@
},
// 更新出港理货弹框
handleEdit(row) {
if(row.awbh !==''){
this.fenStatus='addAwbh'
}else {
this.fenStatus=undefined
}
this.tidyModel = Object.assign({}, row)
this.dialogStatus = 'update'
this.dialogFormVisible = true
... ... @@ -712,20 +892,51 @@
}
})
},
// 保存并发送
handleSaveAndSend() {
// 获取机场三字码
remoteMethodAirport(query){
this.airportCode = []
if (query !== '') {
this.listLoading = true
getAirportCode({airportid: query}).then(res => {
if(res !== null){
setTimeout(() => {
this.listLoading = false
this.airportCode = res.data.data
}, 200)
}
})
} else {
this.airportCode = []
}
},
// 关区代码
remoteMethodCustomCode(query){
this.customCodeList = []
if (query !== '') {
this.customLoading = true
getCustomCode({customcode: query}).then(res => {
if(res !== null){
setTimeout(() => {
this.customLoading = false
this.customCodeList = res.data.data
}, 200)
}
})
} else {
this.airportCode = []
}
},
// 新增理货弹框
handleAddTidy() {
const row = {
'messageType': 'MT5201'
const query = {
'messageType': 'MT5202'
}
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
this.$router.push({name: '出港航班信息', params: {scopeRow: query}})
},
// 返回
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.tidyModel}})
this.tidyQuery.rcfdep = 'MT5202'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.tidyQuery}})
}
}
}
... ...
... ... @@ -466,6 +466,7 @@
import {Message} from "element-ui";
import {validAwb, validFlightNo} from '@/utils/validate'
import util from '@/common/js/util'
export default {
name: 'OrgManifest',
... ... @@ -823,7 +824,7 @@
},
by1: {
get: function () {
return this.temp.awbinfo.by1
return util.checkNull(this.temp.awbinfo.by1)?'':this.temp.awbinfo.by1
},
set: function (val) {
this.temp.awbinfo.by1 = val.toUpperCase().trim()
... ...