作者 朱兆平

Merge branch 'nmms' of 118.31.66.166:zp260/vue_cli

# Conflicts:
#	config/index.js
#	package-lock.json
#	package.json
#	src/api/api.js
#	src/api/http.js
#	src/api/log_api.js
#	src/api/perm_api.js
#	src/api/role_api.js
#	src/api/user.js
#	src/main.js
#	src/routes.js
#	src/views/Home.vue
合并新舱单
... ... @@ -30,8 +30,8 @@ module.exports = {
assetsPublicPath: '/',
proxyTable: {
'/api':{
target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http
// target: 'http://192.168.43.78: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’即可
... ...
... ... @@ -85,7 +85,7 @@
},
"adler-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz",
"resolved": "https://registry.npm.taobao.org/adler-32/download/adler-32-1.2.0.tgz",
"integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=",
"requires": {
"exit-on-epipe": "~1.0.1",
... ... @@ -613,8 +613,8 @@
},
"async-validator": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz",
"integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
"requires": {
"babel-runtime": "6.x"
}
... ... @@ -896,8 +896,8 @@
},
"babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
"resolved": "https://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY="
},
"babel-helpers": {
"version": "6.24.1",
... ... @@ -2340,7 +2340,7 @@
},
"codepage": {
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/codepage/-/codepage-1.14.0.tgz",
"resolved": "https://registry.npm.taobao.org/codepage/download/codepage-1.14.0.tgz",
"integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=",
"requires": {
"commander": "~2.14.1",
... ... @@ -2976,8 +2976,8 @@
},
"deepmerge": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
"resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz?cache=0&sync_timestamp=1570547201087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdeepmerge%2Fdownload%2Fdeepmerge-1.5.2.tgz",
"integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M="
},
"define-property": {
"version": "2.0.2",
... ... @@ -3242,9 +3242,15 @@
"dev": true
},
"element-ui": {
<<<<<<< HEAD
"version": "2.13.0",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.13.0.tgz",
"integrity": "sha512-KYsHWsBXYbLELS8cdfvgJTOMSUby3UEjvsPV1V1VmgJ/DdkOAS4z3MiOrPxrT9w2Cc5lZ4eVSQiGhYFR5NVChw==",
=======
"version": "2.12.0",
"resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.12.0.tgz",
"integrity": "sha1-qJO8Ea5Pfbt+nVQWBvI+ZD8THuQ=",
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
... ... @@ -6313,7 +6319,11 @@
},
"normalize-wheel": {
"version": "1.0.1",
<<<<<<< HEAD
"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",
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
"npm": {
... ... @@ -10547,7 +10557,7 @@
},
"raw-loader": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz",
"resolved": "https://registry.npm.taobao.org/raw-loader/download/raw-loader-0.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fraw-loader%2Fdownload%2Fraw-loader-0.5.1.tgz",
"integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao="
},
"read-pkg": {
... ... @@ -11142,8 +11152,13 @@
},
"resize-observer-polyfill": {
"version": "1.5.1",
<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
=======
"resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresize-observer-polyfill%2Fdownload%2Fresize-observer-polyfill-1.5.1.tgz",
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
},
"resolve": {
"version": "1.12.0",
... ... @@ -12061,8 +12076,8 @@
},
"throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
"resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz",
"integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
},
"through": {
"version": "2.3.8",
... ...
... ... @@ -12,7 +12,11 @@
"dependencies": {
"axios": "^0.19.0",
"echarts": "^3.3.2",
<<<<<<< HEAD
"element-ui": "^2.13.0",
=======
"element-ui": "^2.12.0",
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
"eslint": "^5.14.1",
"file-saver": "^2.0.2",
"font-awesome": "^4.7.0",
... ...
... ... @@ -5,13 +5,13 @@ import qs from 'qs'
Vue.prototype.$http = axios;
export const getuserMenus = params => { return axios.get(`/perm/userMenus`, { params: params }); };
export const getuserMenus = params => { return axios.get(`USER-CENTER/perm/userMenus`, { params: params }); };
export const getUserList = params => { return axios.get(`/cloud-user-center/user/list`, { params: params }); };
export const getUserListPage = params => { return axios({
method: 'GET',
url: `/user/list`,
url: `USER-CENTER/user/list`,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
... ... @@ -21,18 +21,18 @@ export const getUserListPage = params => { return axios({
export const removeUser = params => { return axios({
method: 'DELETE',
url: `/user/del`,
url: `USER-CENTER/user/del`,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})};
export const batchRemoveUser = params => { return axios.get(`/user/batchremove`, { params: params }); };
export const batchRemoveUser = params => { return axios.get(`USER-CENTER/user/batchremove`, { params: params }); };
export const editUser = params => { return axios({
method: 'PUT',
url: `/user/edit`,
url: `USER-CENTER/user/edit`,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
... ... @@ -41,7 +41,7 @@ export const editUser = params => { return axios({
export const addUser = params => { return axios({
method: 'POST',
url: `/user/add`,
url: `USER-CENTER/user/add`,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
... ... @@ -50,9 +50,9 @@ export const addUser = params => { return axios({
export const setUserRole = params => { return axios({
method: 'PUT',
url: `/user/roleset`,
url: `USER-CENTER/user/roleset`,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})};
\ No newline at end of file
})};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/country'
export const getCountry = params => { return http.get(`${baseUrl}/getCountryCode`, params); };
export const getByCountryCodeForName = params => { return http.post(`${baseUrl}/getByCountryCodeForName`,params)};
export const getByCountryCode = params => { return http.post(`${baseUrl}/getByCountryCode`,params)};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt3201'
export const getMt3201ListForParam = params => {
return http.get(`${baseUrl}/getMt3201ListForParam`, params);
};
export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
export const updateMT3201 = params => { return http.put(`${baseUrl}/updateMt3201`,params)};
export const addMt3201 = params => { return http.post(`${baseUrl}/addMt3201`,params)};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/flight'
export const getFlightListForParam = params => {
return http.get(`${baseUrl}/getFlight`, params);
};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt4201'
export const getMt4201ListForParam = params => {
return http.get(`${baseUrl}/getMt4201ListForParam`, params);
};
export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
export const updateMT4201 = params => { return http.put(`${baseUrl}/updateMt4201`,params)};
export const addMt4201 = params => { return http.post(`${baseUrl}/addMt4201`,params)};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/manifest'
export const getManifests = params => {
return http.get(`${baseUrl}/getManifests`, params);
};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt2201'
export const getMt2201ListForParam = params => { return http.get(`${baseUrl}/getMt2201ListForParam`, params)};
export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params) };
export const updateMT2201 = params => { return http.put(`${baseUrl}/updateMt2201`,params)};
export const addMt2201 = params => { return http.post(`${baseUrl}/addMt2201`,params)};
export const getLostLoadChange = params => { return http.get(`${baseUrl}/getLostLoadChange`, params)};
export const saveLostChange = params => { return http.get(`${baseUrl}/saveLostChange`, params)};
export const saveLostLoad = params => { return http.put(`${baseUrl}/saveLostLoad`,params)};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt520x'
export const getMt520XListForParam = params => {
return http.get(`${baseUrl}/getMt520xListForParam`, params);
};
export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
export const updateMt520X = params => { return http.put(`${baseUrl}/updateMt520x`,params)};
export const addMt520X = params => { return http.post(`${baseUrl}/addMt520x`,params)};
... ...
... ... @@ -17,7 +17,7 @@ export default {
return axios({
method: 'GET',
url: url,
params: params,
params: params,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
... ... @@ -67,4 +67,4 @@ export default {
// headers: {},
// // axios 的配置
// config: {}
// }
\ No newline at end of file
// }
... ...
import axios from 'axios'
<<<<<<< HEAD
let base = '/cloud-user-center/system/log';
=======
axios.defaults.baseURL = 'http://localhost:8082/api';
let base = axios.defaults.baseURL+'USER-CENTER/system/log';
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt1201'
export const getMt1201ListForParam = params => { return http.get(`${baseUrl}/getMt1201ListForParam`, params); };
export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, { params: params }); };
export const updateMT1201 = params => { return http.put(`${baseUrl}/updateMT1201`,params)};
export const addMt1201 = params => { return http.post(`${baseUrl}/addMt1201`,params)};
... ...
import axios from 'axios'
<<<<<<< HEAD
let base = '/cloud-user-center/perm';
=======
axios.defaults.baseURL = 'http://localhost:8082/api';
let base = axios.defaults.baseURL+'USER-CENTER/perm';
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ... @@ -34,4 +39,4 @@ export const add = params => { return axios({
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})};
\ No newline at end of file
})};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/rep'
export const getResponseForParam = params => {
return http.get(`${baseUrl}/getResponseForParam`, params);
};
... ...
import axios from 'axios'
<<<<<<< HEAD
let base = '/cloud-user-center/role';
=======
let base = 'USER-CENTER/role';
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ... @@ -43,4 +47,4 @@ export const updateRolePerm = params => { return axios({
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})};
\ No newline at end of file
})};
... ...
import http from './http.js'
<<<<<<< HEAD
let baseUrl = '/cloud-user-center/user'
=======
let baseUrl = 'user-center/user'
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
export const getUserList = params => { return http.get(`${baseUrl}/list`, params); };
... ... @@ -13,4 +17,4 @@ export const editUser = params => { return http.put(`/user/edit`,params)};
export const addUser = params => { return http.post(`/user/add`,params)};
export const setUserRole = params => { return http.put(`/user/roleset`,params)};
\ No newline at end of file
export const setUserRole = params => { return http.put(`/user/roleset`,params)};
... ...
... ... @@ -29,12 +29,12 @@ export default {
},
limit: {
type: Number,
default: 20
default: 100
},
pageSizes: {
type: Array,
default() {
return [10, 20, 30, 50]
return [10, 20, 30, 50, 100]
}
},
layout: {
... ... @@ -92,7 +92,7 @@ export default {
<style scoped>
.pagination-container {
background: #fff;
padding: 32px 16px;
/*padding: 32px 16px;*/
}
.pagination-container.hidden {
display: none;
... ...
<template>
<el-table :data="formatData" :row-style="showRow" v-bind="$attrs">
<el-table-column type="selection" width="30" align="center"/>
<el-table-column v-if="columns.length===0" width="30" align="center">
<el-table-column type="selection" width="50" align="center"></el-table-column>
<el-table-column v-if="columns.length===0" width="55" align="center">
<template slot-scope="scope">
<span v-for="space in scope.row._level" :key="space" class="ms-tree-space"/>
<span v-if="iconShow(0,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)">
<i v-if="!scope.row._expanded" class="el-icon-plus"/>
<i v-else class="el-icon-minus"/>
</span>
<!--{{ scope.$index }}-->
</template>
</el-table-column>
<el-table-column v-for="(column, index) in columns" v-else :key="column.value" :label="column.text" :width="column.width">
... ... @@ -20,7 +19,6 @@
<i v-if="!scope.row._expanded" class="el-icon-plus"/>
<i v-else class="el-icon-minus"/>
</span>
{{ scope.row[column.value] }}
</template>
</el-table-column>
<slot/>
... ... @@ -49,7 +47,7 @@ export default {
evalArgs: Array,
expandAll: {
type: Boolean,
default: true
default: false
}
},
computed: {
... ... @@ -68,11 +66,8 @@ export default {
},
methods: {
showRow: function(row) {
this.data
const show = (row.parent ? (row.parent._expanded && row.parent._show) : true)
// const show = (row.row.parent ? (row.row.parent._expanded && row.row.parent._show) : true)
// row.row._show = show
row._show = show
const show = (row.row.parent ? (row.row.parent._expanded && row.row.parent._show) : true)
row.row._show = show
return show ? 'animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;' : 'display:none;'
},
// 切换下级是否展开
... ...
import Vue from 'vue'
import App from './App'
<<<<<<< HEAD
=======
import ElementUI from 'element-ui'
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
import 'element-ui/lib/theme-chalk/index.css'
//import './assets/theme/theme-green/index.css'
import VueRouter from 'vue-router'
... ... @@ -11,9 +15,13 @@ import rout from './routes'
import Mock from './mock'
import i18n from './lang'
import 'font-awesome/css/font-awesome.min.css'
<<<<<<< HEAD
import ElementUI from 'element-ui'
import * as socketApi from './api/socket'
=======
import '@/styles/index.scss'
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
//定义一个全局过滤器实现日期格式化
Vue.filter('datefmt',function(input,fmtstring){
... ... @@ -33,8 +41,8 @@ Vue.use(Vuex)
Vue.prototype.$axios = axios;
//NProgress.configure({ showSpinner: false });
console.log("mainjs:");
console.log(rout.routes);
// console.log("mainjs:");
// console.log(rout.routes);
const router = new VueRouter({
routes:rout.routes
});
... ... @@ -61,7 +69,7 @@ router.beforeEach((to, from, next) => {
}
});
var message = Vue.prototype.$message;
const message = Vue.prototype.$message;
axios.defaults.baseURL = '/api';
axios.interceptors.response.use(
res => {
... ...
... ... @@ -7,12 +7,26 @@ import Role from './views/nav1/role.vue'
import Perm from './views/nav1/perm.vue'
import LOG from './views/nav1/Log.vue'
import PreManifest from './views/agent/PreManifest.vue'
<<<<<<< HEAD
import Company from './views/nav1/company.vue'
import Department from './views/nav1/department.vue'
import Group from './views/nav1/groupcompany.vue'
import Process from './views/hqpt/Process.vue'
import Job from './views/hqpt/Job.vue'
// import Form from './views/nav1/Form.vue'
=======
import OrgManifest from './views/nmms/orgManifest.vue'
import ExitFlight from './views/nmms/ExitFlight.vue'
import ExitPre from './views/nmms/ExitPre.vue'
import ExitTidy from './views/nmms/ExitTidy.vue'
import ExitArrive from './views/nmms/ExitArrive.vue'
import ExitManifest from './views/nmms/ExitManifest.vue'
import ExitLoading from './views/nmms/ExitLoading.vue'
import ExitFlightDesc from './views/nmms/ExitFlightDesc.vue'
import LostLoad from './views/lostLoadChange/lostLoading.vue'
import LostLoadChange from './views/lostLoadChange/lostLoadChange.vue'
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
import User from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
... ... @@ -47,7 +61,7 @@ let routes = [
leaf: true,
iconCls: 'el-icon-menu',
children: [
{ path: '/main', component: Main, name: '首页'},
{path: '/main', component: Main, name: '首页'},
]
},
// { path: '/test', component: Main },
... ... @@ -57,6 +71,7 @@ let routes = [
name: '系统设置',
iconCls: 'el-icon-setting',//图标样式class
children: [
<<<<<<< HEAD
{ path: '/user', component: User, name: '用户管理' },
{ path: '/role', component: Role, name: '岗位管理' },
{ path: '/perm', component: Perm, name: '权限管理' },
... ... @@ -64,6 +79,12 @@ let routes = [
{ path: '/department', component: Department, name: '部门管理' },
{ path: '/company', component: Company, name: '公司管理'},
{ path: '/group', component: Group, name: '集团管理'}
=======
{path: '/user', component: User, name: '用户管理'},
{path: '/role', component: Role, name: '角色管理'},
{path: '/perm', component: Perm, name: '权限管理'},
{path: '/log', component: LOG, name: '系统日志'},
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
]
},
{
... ... @@ -72,8 +93,37 @@ let routes = [
name: '客服系统',
iconCls: 'fa fa-id-card-o',
children: [
<<<<<<< HEAD
{ path: '/process', component: Process, name: '工单管理' },
{ path: '/job', component: Job, name: '任务管理' }
=======
{path: '/pre1', component: PreManifest, name: '预配'},
]
},
{
path: '/output',
component: Home,
name: '出港业务申报',
iconCls: 'el-icon-collection',
children: [
{path: '/flight', component: ExitFlight, name: '出港航班申报'},
{path: '/manifest', component: ExitManifest, name: '出港运单申报'},
{path: '/pre', component: ExitPre, name: '出港预配舱单'},
{path: '/arrive', component: ExitArrive, name: '出港运抵'},
{path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
{path: '/loading', component: ExitLoading, name: '出港装载'},
{path: '/tidy', component: ExitTidy, name: '出港理货'}
]
},
{
path: '/lost',
component: Home,
name: '落装改配申报',
iconCls:'el-icon-goods',
children:[
{path:'/lostLoad',component:LostLoad,name:'落装业务申报'},
// {path:'/lostLoadChange',component:LostLoadChange,name:'改配业务申报'}
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
]
},
{
... ... @@ -82,7 +132,12 @@ let routes = [
name: '能源管理',
iconCls: 'fa fa-id-card-o',
children: [
<<<<<<< HEAD
{ path: '/location', component: Location, name: '能源缴费' },
=======
{path: '/page4', component: Page4, name: '页面4'},
{path: '/page5', component: Page5, name: '页面5'}
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
]
},
{
... ... @@ -105,12 +160,16 @@ let routes = [
iconCls: 'fa fa-address-card',
// leaf: true,//只有一个节点
children: [
<<<<<<< HEAD
{ path: '/water_stations_patrol', component: WaterStationsPatrol, name: '二水厂-水站巡视记录单管理' },
// { path: '/page6', component: Page6, name: '水质量检测' },
// { path: '/page6', component: Page6, name: '污水站' },
// { path: '/page6', component: Page6, name: '一水厂' },
// { path: '/page6', component: Page6, name: '综合楼空调站' },
=======
{path: '/page6', component: Page6, name: '导航三'}
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
]
},
{
... ... @@ -119,13 +178,13 @@ let routes = [
name: 'Charts',
iconCls: 'fa fa-bar-chart',
children: [
{ path: '/echarts', component: echarts, name: 'echarts' }
{path: '/echarts', component: echarts, name: 'echarts'}
]
},
{
path: '*',
hidden: true,
redirect: { path: '/404' }
redirect: {path: '/404'}
}
];
let initRouters = routes.concat();
... ... @@ -136,7 +195,7 @@ let setUserMenus = function (list) {
* 处理登陆后的账号对应的菜单
* @param menuList
*/
let handleMenuList = function (router,menu) {
let handleMenuList = function (router, menu) {
var _self = this;
var routerName = "";
router.forEach(function (v_router) {
... ... @@ -149,16 +208,16 @@ let handleMenuList = function (router,menu) {
//匹配到继续判断是否子元素,有子元素继续递归
if (result) {
if(v_router.children) {
_self.handleMenuList(v_router.children,result.children);
if (v_router.children) {
_self.handleMenuList(v_router.children, result.children);
}
//没有则可以移除
}else {
router.splice(router.findIndex(itm => itm.name === routerName ),1);
} else {
router.splice(router.findIndex(itm => itm.name === routerName), 1);
}
})
});
}
export default {
routes,setUserMenus,handleMenuList,initRouters
};
\ No newline at end of file
routes, setUserMenus, handleMenuList, initRouters
};
... ...
@import './variables.scss';
@mixin colorBtn($color) {
background: $color;
&:hover {
color: $color;
&:before,
&:after {
background: $color;
}
}
}
.blue-btn {
@include colorBtn($blue)
}
.light-blue-btn {
@include colorBtn($light-blue)
}
.red-btn {
@include colorBtn($red)
}
.pink-btn {
@include colorBtn($pink)
}
.green-btn {
@include colorBtn($green)
}
.tiffany-btn {
@include colorBtn($tiffany)
}
.yellow-btn {
@include colorBtn($yellow)
}
.pan-btn {
font-size: 14px;
color: #fff;
padding: 14px 36px;
border-radius: 8px;
border: none;
outline: none;
transition: 600ms ease all;
position: relative;
display: inline-block;
&:hover {
background: #fff;
&:before,
&:after {
width: 100%;
transition: 600ms ease all;
}
}
&:before,
&:after {
content: '';
position: absolute;
top: 0;
right: 0;
height: 2px;
width: 0;
transition: 400ms ease all;
}
&::after {
right: inherit;
top: inherit;
left: 0;
bottom: 0;
}
}
.custom-button {
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #fff;
color: #fff;
-webkit-appearance: none;
text-align: center;
box-sizing: border-box;
outline: 0;
margin: 0;
padding: 10px 15px;
font-size: 14px;
border-radius: 4px;
}
... ...
//覆盖一些element-ui样式
.el-breadcrumb__inner,
.el-breadcrumb__inner a {
font-weight: 400 !important;
}
.el-upload {
input[type="file"] {
display: none !important;
}
}
.el-upload__input {
display: none;
}
.cell {
.el-tag {
margin-right: 0px;
}
}
.small-padding {
.cell {
padding-left: 5px;
padding-right: 5px;
}
}
.fixed-width {
.el-button--mini {
padding: 7px 10px;
width: 60px;
}
}
.status-col {
.cell {
padding: 0 10px;
text-align: center;
.el-tag {
margin-right: 0px;
}
}
}
//暂时性解决dialog 问题 https://github.com/ElemeFE/element/issues/2461
.el-dialog {
transform: none;
left: 0;
position: relative;
margin: 0 auto;
}
//文章页textarea修改样式
.article-textarea {
textarea {
padding-right: 40px;
resize: none;
border: none;
border-radius: 0px;
border-bottom: 1px solid #bfcbd9;
}
}
//element ui upload
.upload-container {
.el-upload {
width: 100%;
.el-upload-dragger {
width: 100%;
height: 200px;
}
}
}
//dropdown
.el-dropdown-menu {
a {
display: block
}
}
... ...
@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './btn.scss';
body {
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}
label {
font-weight: 700;
}
html {
height: 100%;
box-sizing: border-box;
}
#app {
height: 100%;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
.no-padding {
padding: 0px !important;
}
.padding-content {
padding: 4px 0;
}
a:focus,
a:active {
outline: none;
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
text-decoration: none;
}
div:focus {
outline: none;
}
.fr {
float: right;
}
.fl {
float: left;
}
.pr-5 {
padding-right: 5px;
}
.pl-5 {
padding-left: 5px;
}
.block {
display: block;
}
.pointer {
cursor: pointer;
}
.inlineBlock {
display: block;
}
.clearfix {
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
}
code {
background: #eef1f6;
padding: 15px 16px;
margin-bottom: 20px;
display: block;
line-height: 36px;
font-size: 15px;
font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
a {
color: #337ab7;
cursor: pointer;
&:hover {
color: rgb(32, 160, 255);
}
}
}
.warn-content {
background: rgba(66, 185, 131, .1);
border-radius: 2px;
padding: 16px;
padding: 1rem;
line-height: 1.6rem;
word-spacing: .05rem;
a {
color: #42b983;
font-weight: 600;
}
}
//main-container全局样式
.app-container {
padding: 20px;
}
.components-container {
margin: 30px 50px;
position: relative;
}
.pagination-container {
margin-top: 30px;
}
.text-center {
text-align: center
}
.sub-navbar {
height: 50px;
line-height: 50px;
position: relative;
width: 100%;
text-align: right;
padding-right: 20px;
transition: 600ms ease position;
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
.subtitle {
font-size: 20px;
color: #fff;
}
&.draft {
background: #d0d0d0;
}
&.deleted {
background: #d0d0d0;
}
}
.link-type,
.link-type:focus {
color: #337ab7;
cursor: pointer;
&:hover {
color: rgb(32, 160, 255);
}
}
.filter-container {
padding-bottom: 10px;
.filter-item {
display: inline-block;
vertical-align: middle;
margin-bottom: 10px;
}
}
//refine vue-multiselect plugin
.multiselect {
line-height: 16px;
}
.multiselect--active {
z-index: 1000 !important;
}
... ...
@mixin clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
@mixin scrollBar {
&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
}
@mixin relative {
position: relative;
width: 100%;
height: 100%;
}
@mixin pct($pct) {
width: #{$pct};
position: relative;
margin: 0 auto;
}
@mixin triangle($width, $height, $color, $direction) {
$width: $width/2;
$color-border-style: $height solid $color;
$transparent-border-style: $width solid transparent;
height: 0;
width: 0;
@if $direction==up {
border-bottom: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
}
@else if $direction==right {
border-left: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
}
@else if $direction==down {
border-top: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
}
@else if $direction==left {
border-right: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
}
}
... ...
#app {
// 主体区域 Main container
.main-container {
min-height: 100%;
transition: margin-left .28s;
margin-left: $sideBarWidth;
position: relative;
}
// 侧边栏 Sidebar container
.sidebar-container {
transition: width 0.28s;
width: $sideBarWidth !important;
height: 100%;
position: fixed;
font-size: 0px;
top: 0;
bottom: 0;
left: 0;
z-index: 1001;
overflow: hidden;
//reset element-ui css
.horizontal-collapse-transition {
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
}
.scrollbar-wrapper {
overflow-x: hidden !important;
.el-scrollbar__view {
height: 100%;
}
}
.el-scrollbar__bar.is-vertical {
right: 0px;
}
.is-horizontal {
display: none;
}
a {
display: inline-block;
width: 100%;
overflow: hidden;
}
.svg-icon {
margin-right: 16px;
}
.el-menu {
border: none;
height: 100%;
width: 100% !important;
}
// menu hover
.submenu-title-noDropdown,
.el-submenu__title {
&:hover {
background-color: $menuHover !important;
}
}
.is-active>.el-submenu__title {
color: $subMenuActiveText !important;
}
& .nest-menu .el-submenu>.el-submenu__title,
& .el-submenu .el-menu-item {
min-width: $sideBarWidth !important;
background-color: $subMenuBg !important;
&:hover {
background-color: $subMenuHover !important;
}
}
}
.hideSidebar {
.sidebar-container {
width: 36px !important;
}
.main-container {
margin-left: 36px;
}
.submenu-title-noDropdown {
padding-left: 10px !important;
position: relative;
.el-tooltip {
padding: 0 10px !important;
}
}
.el-submenu {
overflow: hidden;
&>.el-submenu__title {
padding-left: 10px !important;
.el-submenu__icon-arrow {
display: none;
}
}
}
.el-menu--collapse {
.el-submenu {
&>.el-submenu__title {
&>span {
height: 0;
width: 0;
overflow: hidden;
visibility: hidden;
display: inline-block;
}
}
}
}
}
.el-menu--collapse .el-menu .el-submenu {
min-width: $sideBarWidth !important;
}
// 适配移动端, Mobile responsive
.mobile {
.main-container {
margin-left: 0px;
}
.sidebar-container {
transition: transform .28s;
width: $sideBarWidth !important;
}
&.hideSidebar {
.sidebar-container {
pointer-events: none;
transition-duration: 0.3s;
transform: translate3d(-$sideBarWidth, 0, 0);
}
}
}
.withoutAnimation {
.main-container,
.sidebar-container {
transition: none;
}
}
}
// when menu collapsed
.el-menu--vertical {
&>.el-menu {
.svg-icon {
margin-right: 16px;
}
}
.nest-menu .el-submenu>.el-submenu__title,
.el-menu-item {
&:hover {
// you can use $subMenuHover
background-color: $menuHover !important;
}
}
// the scroll bar appears when the subMenu is too long
>.el-menu--popup {
max-height: 100vh;
overflow-y: auto;
&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
}
}
... ...
//globl transition css
/*fade*/
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.28s;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
/*fade-transform*/
.fade-transform-leave-active,
.fade-transform-enter-active {
transition: all .5s;
}
.fade-transform-enter {
opacity: 0;
transform: translateX(-30px);
}
.fade-transform-leave-to {
opacity: 0;
transform: translateX(30px);
}
/*breadcrumb transition*/
.breadcrumb-enter-active,
.breadcrumb-leave-active {
transition: all .5s;
}
.breadcrumb-enter,
.breadcrumb-leave-active {
opacity: 0;
transform: translateX(20px);
}
.breadcrumb-move {
transition: all .5s;
}
.breadcrumb-leave-active {
position: absolute;
}
... ...
// base color
$blue:#324157;
$light-blue:#3A71A8;
$red:#C03639;
$pink: #E65D6E;
$green: #30B08F;
$tiffany: #4AB7BD;
$yellow:#FEC171;
$panGreen: #30B08F;
//sidebar
$menuText:#bfcbd9;
$menuActiveText:#409EFF;
$subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951
$menuBg:#304156;
$menuHover:#263445;
$subMenuBg:#1f2d3d;
$subMenuHover:#001528;
$sideBarWidth: 180px;
// the :export directive is the magic sauce for webpack
:export {
menuText: $menuText;
menuActiveText: $menuActiveText;
subMenuActiveText: $subMenuActiveText;
menuBg: $menuBg;
menuHover: $menuHover;
subMenuBg: $subMenuBg;
subMenuHover: $subMenuHover;
sideBarWidth: $sideBarWidth;
}
... ...
... ... @@ -8,7 +8,7 @@ const type = [{
value: 'CN',
label: 'PASSPORT'
}, {
value: 'CN',
value: 'US',
label: 'OC'
}, {
value: 'CN',
... ...
... ... @@ -35,6 +35,50 @@ export function validAlphabets(str) {
return reg.test(str)
}
/* 大小写字母数字*/
export function validAlphabetsAndNum(str) {
const reg = /^[0-9A-Za-z]+$/
return reg.test(str)
}
/* 大小写字母数字空格*/
export function validAlphabetsAndSpanceKey(str) {
const reg = /^[0-9a-zA-Z\s]+$/
return reg.test(str)
}
/**
* 航班校验
*/
export function validFlightNo(str) {
const reg = /^[A-Z0-9]{6,7}$/
if(!reg.test(str)){
return false
}
const flightNoPre = /^[A-Z]+$/
if(!flightNoPre.test(str.substring(0,2))){
return false
} else {
return true
}
}
/**
* 主单校验
*/
export function validAwb(str) {
const reg = /^[0-9\-]{12}$/
if(!reg.test(str)){
return false
}
const result = str.split("-")[1]
const num = (result.substring(0,7)) % 7
if(num === eval(str.substring(11)) ){
return true
} else {
return false
}
}
/**
* validate email
* @param email
... ... @@ -44,3 +88,14 @@ export function validEmail(email) {
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
return re.test(email)
}
/**
*
* 整数和小数,小数最多两位
* @param value
* @returns {boolean}
*/
export function validatorNum(value) {
const reg = /^(\d*)+(\.[0-9]{1,2})?$/
return reg.test(value)
}
... ...
<template>
<<<<<<< HEAD
<el-row class="container">
<el-col :span="24" class="header">
<el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'">
... ... @@ -68,12 +69,101 @@
</section>
</el-col>
</el-row>
=======
<el-row class="container">
<el-col :span="24" class="header">
<el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'">
{{collapsed?'':sysName}}
</el-col>
<el-col :span="10">
<div class="tools" @click.prevent="collapse">
<i class="fa fa-align-justify"></i>
</div>
</el-col>
<el-col :span="4" class="userinfo">
<el-dropdown trigger="hover">
<span class="el-dropdown-link userinfo-inner"><img
:src="this.sysUserAvatar"/> {{sysUserName}}</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>我的消息</el-dropdown-item>
<el-dropdown-item>设置</el-dropdown-item>
<el-dropdown-item divided @click.native="logout">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-col>
</el-col>
<el-col :span="24" class="main">
<aside :class="collapsed?'menu-collapsed':'menu-expanded'">
<!--导航菜单-->
<el-menu :default-active="$route.path" class="el-menu-vertical-demo" @open="handleopen"
@close="handleclose" @select="handleselect" unique-opened router v-show="!collapsed"
style="min-width: 230px">
<template v-for="(item,index) in $router.options.routes" v-if="!item.hidden">
<el-submenu :index="index+''" v-if="!item.leaf">
<template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template>
<el-menu-item v-for="child in item.children" :index="child.path" :key="child.path"
v-if="!child.hidden">{{child.name}}
</el-menu-item>
</el-submenu>
<el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path"><i
:class="item.iconCls"></i>{{item.children[0].name}}
</el-menu-item>
</template>
</el-menu>
<!--导航菜单-折叠后-->
<ul class="el-menu el-menu-vertical-demo collapsed" v-show="collapsed" ref="menuCollapsed">
<li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item">
<template v-if="!item.leaf">
<div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)"
@mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div>
<ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)"
@mouseout="showMenu(index,false)">
<li v-for="child in item.children" v-if="!child.hidden" :key="child.path"
class="el-menu-item" style="padding-left: 40px;"
:class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)">
{{child.name}}
</li>
</ul>
</template>
<template v-else>
<li class="el-submenu">
<div class="el-submenu__title el-menu-item"
style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;"
:class="$route.path==item.children[0].path?'is-active':''"
@click="$router.push(item.children[0].path)"><i :class="item.iconCls"></i></div>
</li>
</template>
</li>
</ul>
</aside>
<section class="content-container">
<div class="grid-content bg-purple-light">
<el-col :span="24" class="breadcrumb-container">
<strong class="title">{{$route.name}}</strong>
<el-breadcrumb separator="/" class="breadcrumb-inner">
<el-breadcrumb-item v-for="item in $route.matched" :key="item.path">
{{ item.name }}
</el-breadcrumb-item>
</el-breadcrumb>
</el-col>
<el-col :span="24" class="content-wrapper">
<transition name="fade" mode="out-in">
<router-view :key="$route.path +$route.query.t"></router-view>
</transition>
</el-col>
</div>
</section>
</el-col>
</el-row>
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
</template>
<script>
import rt from '../routes'
export default {
<<<<<<< HEAD
data() {
return {
sysName:'后勤管理平台',
... ... @@ -112,179 +202,258 @@
//type: 'warning'
}).then(() => {
sessionStorage.removeItem('user');
=======
provide() {
return {
reload: this.reload
}
},
data() {
return {
sysName: '流浪地球管理系统',
collapsed: false,
sysUserName: '',
sysUserAvatar: '',
isRouterAlive: true,
form: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
}
}
},
methods: {
reload() {
this.$nextTick(function () {
this.$router.push({
path: this.$router.path,
query:{
t: new Date().getTime()
}
})
})
},
onSubmit() {
console.log('submit!');
},
handleopen() {
console.log('handleopen');
},
handleclose() {
console.log('handleclose');
},
handleselect: function (a, b) {
this.reload()
},
//退出登录
logout: function () {
var _this = this;
this.$confirm('确认退出吗?', '提示', {
//type: 'warning'
}).then(() => {
sessionStorage.removeItem('user');
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
sessionStorage.removeItem('menu');
//退出后初始化原来的路由
let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
console.log(sysRoutes);
_this.$router.options.routes = sysRoutes;
let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
// console.log(sysRoutes);
_this.$router.options.routes = sysRoutes;
_this.$router.push('/login');
}).catch(() => {
_this.$router.push('/login');
}).catch(() => {
});
});
},
//折叠导航栏
collapse:function(){
this.collapsed=!this.collapsed;
},
showMenu(i,status){
this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-'+i)[0].style.display=status?'block':'none';
}
},
mounted() {
},
//折叠导航栏
collapse: function () {
this.collapsed = !this.collapsed;
},
showMenu(i, status) {
this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-' + i)[0].style.display = status ? 'block' : 'none';
}
},
mounted() {
var _this = this;
var user = sessionStorage.getItem('user');
if (user) {
user = JSON.parse(user);
this.sysUserName = user.username || '';
this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg';
}
//操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由
var userRouters = sessionStorage.getItem('menu');
if (userRouters) {
var user = sessionStorage.getItem('user');
if (user) {
user = JSON.parse(user);
this.sysUserName = user.username || '';
this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg';
}
//操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由
var userRouters = sessionStorage.getItem('menu');
if (userRouters) {
userRouters = JSON.parse(userRouters);
_this.$router.options.routes = userRouters;
console.log("home:");
console.log(_this.$router.options.routes);
}
}
}
// console.log("home:");
// console.log(_this.$router.options.routes);
}
}
}
</script>
<style scoped lang="scss">
@import '~scss_vars';
.container {
position: absolute;
top: 0px;
bottom: 0px;
width: 100%;
.header {
height: 60px;
line-height: 60px;
background: $color-primary;
color:#fff;
.userinfo {
text-align: right;
padding-right: 35px;
float: right;
.userinfo-inner {
cursor: pointer;
color:#fff;
img {
width: 40px;
height: 40px;
border-radius: 20px;
margin: 10px 0px 10px 10px;
float: right;
}
}
}
.logo {
//width:230px;
height:60px;
font-size: 22px;
padding-left:20px;
padding-right:20px;
border-color: rgba(238,241,146,0.3);
border-right-width: 1px;
border-right-style: solid;
img {
width: 40px;
float: left;
margin: 10px 10px 10px 18px;
}
.txt {
color:#fff;
}
}
.logo-width{
width:230px;
}
.logo-collapse-width{
width:60px
}
.tools{
padding: 0px 23px;
width:14px;
height: 60px;
line-height: 60px;
cursor: pointer;
}
}
.main {
display: flex;
// background: #324057;
position: absolute;
top: 60px;
bottom: 0px;
overflow: hidden;
aside {
flex:0 0 230px;
width: 230px;
// position: absolute;
// top: 0px;
// bottom: 0px;
.el-menu{
height: 100%;
}
.collapsed{
width:60px;
.item{
position: relative;
}
.submenu{
position:absolute;
top:0px;
left:60px;
z-index:99999;
height:auto;
display:none;
}
@import '~scss_vars';
}
}
.menu-collapsed{
flex:0 0 60px;
width: 60px;
}
.menu-expanded{
flex:0 0 230px;
width: 230px;
}
.menu-expanded ul{
width: 230px;
}
.content-container {
// background: #f1f2f7;
flex:1;
// position: absolute;
// right: 0px;
// top: 0px;
// bottom: 0px;
// left: 230px;
overflow-y: scroll;
padding: 20px;
.breadcrumb-container {
//margin-bottom: 15px;
.title {
width: 200px;
float: left;
color: #475669;
}
.breadcrumb-inner {
float: right;
}
}
.content-wrapper {
background-color: #fff;
box-sizing: border-box;
}
}
}
}
</style>
\ No newline at end of file
.container {
position: absolute;
top: 0px;
bottom: 0px;
width: 100%;
.header {
height: 60px;
line-height: 60px;
background: $color-primary;
color: #fff;
.userinfo {
text-align: right;
padding-right: 35px;
float: right;
.userinfo-inner {
cursor: pointer;
color: #fff;
img {
width: 40px;
height: 40px;
border-radius: 20px;
margin: 10px 0px 10px 10px;
float: right;
}
}
}
.logo {
//width:230px;
height: 60px;
font-size: 22px;
padding-left: 20px;
padding-right: 20px;
border-color: rgba(238, 241, 146, 0.3);
border-right-width: 1px;
border-right-style: solid;
img {
width: 40px;
float: left;
margin: 10px 10px 10px 18px;
}
.txt {
color: #fff;
}
}
.logo-width {
width: 230px;
}
.logo-collapse-width {
width: 60px
}
.tools {
padding: 0px 23px;
width: 14px;
height: 60px;
line-height: 60px;
cursor: pointer;
}
}
.main {
display: flex;
// background: #324057;
position: absolute;
top: 60px;
bottom: 0px;
overflow: hidden;
aside {
flex: 0 0 230px;
width: 230px;
// position: absolute;
// top: 0px;
// bottom: 0px;
.el-menu {
height: 100%;
}
.collapsed {
width: 60px;
.item {
position: relative;
}
.submenu {
position: absolute;
top: 0px;
left: 60px;
z-index: 99999;
height: auto;
display: none;
}
}
}
.menu-collapsed {
flex: 0 0 60px;
width: 60px;
}
.menu-expanded {
flex: 0 0 230px;
width: 230px;
}
.menu-expanded ul {
width: 230px;
}
.content-container {
// background: #f1f2f7;
flex: 1;
// position: absolute;
// right: 0px;
// top: 0px;
// bottom: 0px;
// left: 230px;
overflow-y: scroll;
padding: 20px;
.breadcrumb-container {
//margin-bottom: 15px;
.title {
width: 200px;
float: left;
color: #475669;
}
.breadcrumb-inner {
float: right;
}
}
.content-wrapper {
background-color: #fff;
box-sizing: border-box;
}
}
}
}
</style>
... ...
... ... @@ -9,7 +9,7 @@
<el-button v-waves :loading="downloadLoading" class="filter-item" type="primary" icon="el-icon-download" @click="handleDownload">{{ $t('table.export') }}</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message" @click="handleCreate">批量发送</el-button>
</div>
<tree-table :data="data" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe style="font-size: 13px" border @selection-change="handleSelectionChange">
<tree-table :data="tableData" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe style="font-size: 13px" border @selection-change="handleSelectionChange">
<el-table-column prop="waybillNo" label="主单号" width="110px" align="center" sortable>
<template slot-scope="scope">
<span>{{ scope.row.waybillNo }}</span>
... ... @@ -27,7 +27,7 @@
</el-table-column>
<el-table-column label="航班日期" width="100px" align="center" sortable>
<template slot-scope="scope">
<span>{{ scope.row.flightDate | parseTime('{y}-{m}-{d}') }}</span>
<span>{{ scope.row.flightDate }}</span>
</template>
</el-table-column>
<el-table-column label="起始站" width="60px" align="center">
... ... @@ -63,7 +63,7 @@
</div>
</template>
</el-table-column>
<el-table-column :label="$t('table.actions')" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('table.actions')" align="center" class-name="small-padding fixed-width" >
<template slot-scope="scope">
<el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button>
<el-button type="primary" size="mini" @click="handleUpdate(scope.row)">{{ $t('table.edit') }}</el-button>
... ... @@ -79,8 +79,8 @@
</tree-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" fullscreen="true">
<el-form ref="" :inline="true" label-position="left" :rules="rules" :model="temp" label-width="100px" style="font-size: 13px">
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" fullscreen>
<el-form ref="" :inline="true" :rules="rules" :model="temp" label-width="100px" style="font-size: 13px">
<div>
<el-tag type="info" effect="plain">
航班信息
... ... @@ -350,17 +350,16 @@
Auth: Lei.j1ang
Created: 2018/1/19-14:54
*/
import { fetchList } from '@/api/article'
import treeTable from '@/components/TreeTable'
import treeToArray from './customEval'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves' // Waves directive
import country from '@/utils/country.js'
import companyType from '@/utils/companyType.js'
import dangerGoods from '@/utils/dangerGoods.js'
import goodsPackage from '@/utils/goodsPackage.js'
import excel from '@/vendor/Export2Excel'
import { parseTime } from '@/utils'
const calendarTypeOptions = [
{ key: 'CN', display_name: 'China' },
{ key: 'US', display_name: 'USA' },
... ... @@ -403,11 +402,12 @@ export default {
return {
func: treeToArray,
expandAll: true,
fullscreen:true,
total: 1,
resend: true,
listLoading: false,
downloadLoading: false,
loading: false,
loading:false,
listLoading: true,
downloadLoading:false,
multipleSelection: [],
dialogFormVisible: false,
dialogStatus: '',
... ... @@ -428,6 +428,7 @@ export default {
flightDate: '',
custom: ''
},
tableData:[],
temp: {
id: undefined,
waybillNo: '',
... ... @@ -441,7 +442,103 @@ export default {
maniWeight: undefined
},
manifestCustoms: ['4604', '4620', '4613'],
data: [
pickerOptions: {
shortcuts: [
{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date())
}
},
{
text: '昨天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '明天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() + 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '一周前',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', date)
}
}
]
},
args: [null, null, 'timeLine'],
rules: {
maniWeight: [{ type: 'number', required: true, message: '重量必须为数字', trigger: 'blur' }],
maniPiece: [{ type: 'number', required: true, message: '件数必须为数字', trigger: 'blur' }],
desStation: [{ required: true, message: '运单目的地必须输入', trigger: 'blur' }],
oriStation: [{ required: true, message: '运单起始站必须数据', trigger: 'change' }],
flightDate: [{ type: 'date', required: true, message: '航班日期必须输入', trigger: 'change' }],
flight: [{ required: true, message: '航班号必须输入', trigger: 'blur' }],
custom: [{ required: true, message: '关区代码必须选择', trigger: 'change' }],
waybillNo: [{ required: true, message: '运单号必须输入', trigger: 'blur' }]
}
}
},
created(){
console.log(this.$route.params.scopeRow)
this.getList()
},
methods: {
message(row) {
this.$message.info(row.event)
},
sortChange(data) {
const { prop, order } = data
if (prop === 'id') {
this.sortByID(order)
}
},
sortByID(order) {
if (order === 'ascending') {
this.listQuery.sort = '+id'
} else {
this.listQuery.sort = '-id'
}
this.handleFilter()
},
handleFilter(){
},
handleSwitch(row){
},
handleDownload(){
this.downloadLoading = true
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
this.temp.timestamp = new Date(this.temp.timestamp)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs[''].clearValidate()
})
},
handleModifyStatus(row, status) {
this.$message({
message: '操作成功',
type: 'success'
})
row.status = status
},
getList() {
this.tableData = [
{
id: 0,
waybillNo: '580-20728399',
... ... @@ -520,7 +617,7 @@ export default {
]
},
{
id: 5,
id: 4,
waybillNo: '580-20728391',
houseWaybillNo: '',
custom: '4604',
... ... @@ -532,104 +629,278 @@ export default {
maniWeight: 21321,
status: '10003',
customText: ' 已发送预配舱单 '
},
{
id: 5,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 6,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 7,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 8,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 9,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 10,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 11,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 12,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 13,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},{
id: 14,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 15,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 16,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 17,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 18,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 19,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 20,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 23,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
}, {
id: 22,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41300',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
}
],
pickerOptions: {
shortcuts: [
{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date())
}
},
{
text: '昨天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '明天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() + 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '一周前',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', date)
}
}
]
},
args: [null, null, 'timeLine'],
rules: {
maniWeight: [{ type: 'number', required: true, message: '重量必须为数字', trigger: 'blur' }],
maniPiece: [{ type: 'number', required: true, message: '件数必须为数字', trigger: 'blur' }],
desStation: [{ required: true, message: '运单目的地必须输入', trigger: 'blur' }],
oriStation: [{ required: true, message: '运单起始站必须数据', trigger: 'change' }],
flightDate: [{ type: 'date', required: true, message: '航班日期必须输入', trigger: 'change' }],
flight: [{ required: true, message: '航班号必须输入', trigger: 'blur' }],
custom: [{ required: true, message: '关区代码必须选择', trigger: 'change' }],
waybillNo: [{ required: true, message: '运单号必须输入', trigger: 'blur' }]
}
}
},
methods: {
message(row) {
this.$message.info(row.event)
},
sortChange(data) {
const { prop, order } = data
if (prop === 'id') {
this.sortByID(order)
}
},
sortByID(order) {
if (order === 'ascending') {
this.listQuery.sort = '+id'
} else {
this.listQuery.sort = '-id'
}
this.handleFilter()
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
this.temp.timestamp = new Date(this.temp.timestamp)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs[''].clearValidate()
})
},
handleFilter() {
this.listQuery.page = 1
this.getList()
},
handleModifyStatus(row, status) {
this.$message({
message: '操作成功',
type: 'success'
})
row.status = status
},
getList() {
this.listLoading = true
fetchList(this.listQuery).then(response => {
this.list = response.data.items
this.total = response.data.total
// Just to simulate the time of the request
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
]
this.total = this.tableData.length
},
handleSelectionChange(val) {
this.multipleSelection = val
... ... @@ -656,18 +927,6 @@ export default {
this.$refs[''].clearValidate()
})
},
handleDownload() {
this.downloadLoading = true
const tHeader = ['timestamp', 'title', 'type', 'importance', 'status']
const filterVal = ['timestamp', 'title', 'type', 'importance', 'status']
const data = this.formatJson(filterVal, this.list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: 'table-list'
})
this.downloadLoading = false
},
remoteMethod(query) {
if (query !== '') {
this.loading = true
... ...
<template>
<!--<div class="app-container">-->
<div class="app-content">
<div class="filter-container">
<el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="运单号"/>
<el-input v-model="listQuery.carrier" clearable style="width: 200px;" class="filter-item" placeholder="承运人"/>
<el-input v-model="listQuery.flightno" clearable style="width: 200px;" class="filter-item" placeholder="航班号"/>
<el-date-picker v-model="listQuery.flightDate" type="date" placeholder="航班日期"
value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
</div>
<div class="filter-container">
<el-select v-model="listQuery.messageType" clearable class="filter-item" placeholder="请选择报文类型" style="width: 200px;">
<el-option v-for="item in messageTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="listQuery.messageStatus" clearable class="filter-item" placeholder="请选择报文状态" style="width: 200px;">
<el-option v-for="item in messageStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="listQuery.customStatus" clearable class="filter-item" placeholder="请选择海关状态" style="width: 200px;">
<el-option v-for="item in customStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-button class="filter-item" type="primary" @click="handleSearch">查询</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="warning"
@click="handleUpdateStatus">批量修改状态</el-button>
</div>
<div class="midSpan">
<el-row>
<el-col :span="0.5">
<span style="color: red">注:</span>
</el-col>
<el-col :span="1" style="background: oldlace; margin-right: 5px" align="center">
<span>预配舱单</span>
</el-col>
<el-col :span="1" style="background: #f0f9eb; margin-right: 5px" align="center">
<span>出港运抵</span>
</el-col>
<el-col :span="1" style="background: #bce7fd; margin-right: 5px" align="center">
<span>出港装载</span>
</el-col>
<el-col :span="1" style="background: #f5ffc0" align="center">
<span>出港理货</span>
</el-col>
</el-row>
</div>
<tree-table v-loading="listLoading" :data="manifestData" :eval-func="func" :expand-all="true"
style="font-size: 13px" border @selection-change="handleSelectionChange"
:row-class-name="tableRowClassName">
<el-table-column label="航班号" width="80px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="100px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.flightdate }}</span>
</template>
</el-table-column>
<el-table-column label="航段" width="100px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="主单号" width="120px" align="center" >
<template slot-scope="scope" >
<span>{{ scope.row.awba }}</span>
</template>
</el-table-column>
<el-table-column label="分单号" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awbh }}</span>
</template>
</el-table-column>
<el-table-column label="件数" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.piece }}</span>
</template>
</el-table-column>
<el-table-column label="重量" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weight }}</span>
</template>
</el-table-column>
<el-table-column label="关区" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customcode }}</span>
</template>
</el-table-column>
<el-table-column label="时间" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.actime }}</span>
</template>
</el-table-column>
<el-table-column label="状态" width="90px" 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 ==='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 ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column label="回执内容" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.customText }}</span>
<!--<div>-->
<!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
<!--</div>-->
</template>
</el-table-column>
<el-table-column label="操作" width="180px" align="center">
<template slot-scope="scope">
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT2201'" @click="handleUpdate(scope.row)">预配舱单</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT3201'" @click="handleUpdate(scope.row)">出港运抵</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT4201'" @click="handleUpdate(scope.row)">出港装载</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT5202'" @click="handleUpdate(scope.row)">出港理货</a>
<a style="color: #1d8ce0" @click="handleUpdateStatus(scope.row)">更改状态</a>
</template>
</el-table-column>
</tree-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
@pagination="getList"/>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getManifests} from "@/api/exitManifest"
import {getMt520XListForParam} from "@/api/exitTidy";
import {getMt3201ListForParam} from "@/api/exitArrive";
import {getMt4201ListForParam} from "@/api/exitLoading";
export default {
name: "LostLoadChange",
components: {treeTable, Pagination},
inject:['reload'],
data() {
return {
func: treeToArray,
total: 1,
listLoading: false,
listQuery: {
pageSize: 1,
limitSize: 100,
awba:undefined,
carrier: undefined,
flightno:undefined,
flightDate: new Date(),
messageType: undefined,
messageStatus: undefined,
customStatus: undefined,
},
manifestData: [],
messageTypeList: [
{label:'预配舱单',value:'MT2201'},
{label:'出港运抵',value:'MT3201'},
{label:'出港装载',value:'MT4201'},
{label:'出港理货',value:'MT5202'}
],
messageStatusList: [
{label:'未发送',value:'01'},
{label:'已发舱单报',value:'02'},
{label:'舱单报退单',value:'05'},
{label:'舱单转人工',value:'06'},
{label:'舱单报申报成功',value:'07'},
{label:'已发舱单删除报',value:'08'},
{label:'舱单删除报退单',value:'09'},
{label:'舱单删除报转人工',value:'10'},
{label:'舱单删除成功',value:'11'},
{label:'已发舱单修改报',value:'12'},
{label:'舱单修改报退单',value:'13'},
{label:'舱单修改报转人工',value:'14'},
{label:'舱单修改报成功',value:'15'},
{label:'海关已存在',value:'16'},
],
customStatusList: [
{label:'普通货物',value:'001'},
{label:'国际转运货物',value:'002'},
{label:'国内转关',value:'003'},
{label:'空箱',value:'004'},
{label:'快件',value:'006'},
]
}
},
methods: {
getList() {
this.listLoading = true
getManifests(this.listQuery).then(res =>{
this.manifestData = res.data.dataList
this.total = res.data.count
setTimeout(() =>{
this.listLoading = false
},1500)
})
},
handleSelectionChange() {
},
handleSearch(){
this.getList()
},
handleUpdateStatus(row){
},
handleUpdate(row){
if(row.messageType === 'MT2201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT3201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT4201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT5201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
},
tableRowClassName({row,index}){
if(row.messageType === 'MT2201'){
return 'MT2201-row'
}
if(row.messageType === 'MT3201'){
return 'MT3201-row'
}
if(row.messageType === 'MT4201'){
return 'MT4201-row'
}
if(row.messageType === 'MT5202'){
return 'MT5202-row'
}
}
}
}
</script>
<style>
.el-table .MT2201-row {
background: oldlace;
}
.el-table .MT3201-row {
background: #f0f9eb;
}
.el-table .MT4201-row {
background: #bce7fd;
}
.el-table .MT5202-row {
background: #f5ffc0;
}
.app-content{
margin-top: 20px;
}
.midSpan{
margin-bottom: 10px;
}
</style>
... ...
<template>
<!--<div class="app-container">-->
<div class="app-content">
<div class="filter-container">
<el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="主单号"/>
<el-input v-model="listQuery.awbh" clearable style="width: 200px;" class="filter-item" placeholder="分单号"/>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</div>
<div>
<span style="color: red">注:主分单必须同时为空或者同时不为空</span>
</div>
<tree-table v-loading="listLoading" :data="lostLoadData" :eval-func="func" :expand-all="true"
style="font-size: 12px" border>
<el-table-column label="航班号" width="70px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="100px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.flightdate }}</span>
</template>
</el-table-column>
<el-table-column label="航段" width="90px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="主单号" width="120px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awba }}</span>
</template>
</el-table-column>
<el-table-column label="分单号" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awbh }}</span>
</template>
</el-table-column>
<el-table-column label="件数" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.piece }}</span>
</template>
</el-table-column>
<el-table-column label="重量" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weight }}</span>
</template>
</el-table-column>
<el-table-column label="关区" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customcode }}</span>
</template>
</el-table-column>
<el-table-column label="时间" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.actime }}</span>
</template>
</el-table-column>
<el-table-column label="落装状态" width="90px" align="center">
<template slot-scope="scope">
<span v-if="scope.row.offload ==='001'">未落装</span>
<span v-if="scope.row.offload ==='002'">已落装</span>
<span v-if="scope.row.offload ==='003'">已落装改配</span>
</template>
</el-table-column>
<el-table-column label="状态" width="90px" 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 ==='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 ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column label="回执内容" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.ext5 }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="220px" align="center">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="handleLostLoad(scope.row)"
:disabled="scope.row.offload ==='002'">落装申请
</el-button>
<el-button size="mini" type="success" @click="handleLostChange(scope.row)"
:disabled="scope.row.offload ==='003'">落装改配
</el-button>
</template>
</el-table-column>
</tree-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
@pagination="getList"/>
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form ref="lostChangeData" :model="lostChangeModel" :rules="lostChangeRules" label-width="120px">
<el-form-item label="需改配主单号" prop="manifest">
<el-input v-model="lostChangeModel.awba" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="需改配分单号" prop="manifest">
<el-input v-model="lostChangeModel.awbh" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="改配后主单号" prop="manifest">
<el-input v-model="lostChangeModel.manifest" style="width: 300px"></el-input>
</el-form-item>
</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>
</div>
</el-dialog>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt2201ListForParam, getLostLoadChange, saveLostChange, saveLostLoad} from "@/api/exitPre";
import {Message} from 'element-ui'
export default {
name: "LostLoad",
components: {treeTable, Pagination},
inject: ['reload'],
data() {
return {
func: treeToArray,
preTableStatus: true,
lostTableStatus: false,
total: 1,
listLoading: false,
listQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
awbh: undefined,
},
dialogFormVisible: false,
dialogStatus: undefined,
dialogMap: {
create: '发送落装改配'
},
lostLoadData: [],
lostChangeModel:{
uuid: undefined,
awba: undefined,
awbh: undefined,
manifest: undefined
},
lostChangeRules:{}
}
},
methods: {
getList() {
this.listLoading = true
if (this.listQuery.awba !== undefined && this.listQuery.awbh !== undefined &&
this.listQuery.awba !== '' && this.listQuery.awbh !== '') {
getLostLoadChange(this.listQuery).then(res => {
this.lostLoadData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1500)
})
} else {
this.listQuery.awba = undefined
this.listQuery.awbh = undefined
getMt2201ListForParam(this.listQuery).then(res => {
this.lostLoadData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1500)
})
}
},
handleSearch() {
this.getList()
},
handleLostLoad(row) {
console.log(row)
this.$confirm("是否发送落装申请", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认发送',
cancelButtonText: '取消发送'
}).then(() => {
delete row.parent
delete row.children
saveLostLoad(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: res.data.respMessage
})
this.getList()
} else {
this.$message({
type: 'error',
message: res.data.respMessage
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消发送'
: '发送取消'
})
})
},
handleLostChange(row) {
this.lostChangeModel = {
uuid: undefined,
awba: undefined,
awbh: undefined,
manifest: undefined
}
const preModel = Object.assign({},row)
this.lostChangeModel.awba = preModel.awba
this.lostChangeModel.awbh = preModel.awbh
this.lostChangeModel.uuid = preModel.uuid
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(()=>{
this.$refs.lostChangeData.clearValidate()
})
},
createData(){
saveLostChange(this.lostChangeModel).then(res =>{
if(res.data.count >0){
Message.success(res.data.respMessage)
this.dialogFormVisible = false
this.getList()
} else {
Message.error(res.data.respMessage)
}
})
}
}
}
</script>
<style>
</style>
... ...
<template>
<!--<div class="app-container">-->
<div>
<div>
<el-row class="row-bg">
<el-col :span="24">
<div class="grid-content content">航班信息</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="20">
<div class="grid-content">
<span class="titleSpan">航班号:{{this.arriveQuery.carrier}}{{this.arriveQuery.flightno}}</span>
<span class="titleSpan">航班日期:{{this.arriveQuery.flightdate}}</span>
<span class="titleSpan">航段:{{this.arriveQuery.originstation}}-{{this.arriveQuery.destinationstation}}</span>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content">出港运抵查询</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="22">
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input v-model="awba" placeholder="请输入主单号"></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="arriveQuery.flightno ===undefined && arriveData.length<1"
type="primary" size="mini"
@click="handleAddArrive">新增运抵
</el-button>
</div>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content" style="margin-top: 6px">出港运抵明细</div>
</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">
<template slot-scope="scope">
<span>{{scope.row.carrier}}{{scope.row.flightno}}</span>
</template>
</el-table-column>
<el-table-column label="运单号" width="120" align="center">
<template slot-scope="scope">
<span>{{scope.row.awba}}</span>
</template>
</el-table-column>
<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="70" align="center">
<template slot-scope="scope">
<span>{{scope.row.piece}}</span>
</template>
</el-table-column>
<el-table-column label="运抵重量" width="70" align="center">
<template slot-scope="scope">
<span>{{scope.row.weight}}</span>
</template>
</el-table-column>
<el-table-column label="货物描述" width="100" align="center">
<template slot-scope="scope">
<span>{{scope.row.goodsname}}</span>
</template>
</el-table-column>
<el-table-column label="运抵时间" width="140" align="center">
<template slot-scope="scope">
<span>{{scope.row.arrivetime}}</span>
</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 ==='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 ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column prop="receipt" 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">
<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>
<el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
:disabled="scope.row.status ==='00'">修改状态
</el-button>
</template>
</el-table-column>
</el-table>
<div class="btnFoot">
<el-row>
<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"
@click="handelBackStep">返回
</el-button>
</el-row>
</div>
<pagination v-show="total>0" :total="total" :page.sync="arriveQuery.pageSize"
:limit.sync="arriveQuery.limitSize"
@pagination="getList"/>
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form ref="arriveFormData" :model="arriveModel" :rules="arriveRoles" label-position="right"
label-width="90px">
<div class="grid-content content">
<span>航班信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="主单号" prop="awba">
<el-input v-model="arriveModel.awba"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="分单号" prop="awbh">
<el-input v-model="awbh"></el-input>
</el-form-item>
</el-col>
</el-row>
<div class="grid-content content">
<span>航班信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier"
:disabled="dialogFormVisible === 'update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班号" prop="flightno">
<el-input v-model="flightno"
:disabled="dialogFormVisible === 'update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班日期" prop="flightdate">
<el-date-picker v-model="arriveModel.flightdate" value-format="yyyy-MM-dd" type="date"
placeholder="请输入"
:disabled="dialogFormVisible === 'update'"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogFormVisible === 'update'"></el-input>
</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-form-item>
</el-col>
</el-row>
<div class="grid-content content">
<span>货物信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="运抵件数" prop="piece">
<el-input v-model.number="arriveModel.piece"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="运抵重量" prop="weight">
<el-input v-model.number="arriveModel.weight"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="运抵时间" prop="arrivetime">
<el-date-picker v-model="arriveModel.arrivetime" 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">
<el-form-item label="货物描述" prop="goodsname">
<el-input v-model="goodsname" placeholder="请输入"></el-input>
</el-form-item>
</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>
</el-form-item>
</el-col>
</el-row>
</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="SaveAndSend">保存并发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
</el-table-column>
<el-table-column label="航班号" width="80">
<template slot-scope="scope">
{{scope.row.carrier}}{{scope.row.flightno}}
</template>
</el-table-column>
<el-table-column label="航班日期" width="100">
<template slot-scope="scope">
{{scope.row.flightdate}}
</template>
</el-table-column>
<el-table-column label="件数" width="70">
<template slot-scope="scope">
{{scope.row.buspiece}}
</template>
</el-table-column>
<el-table-column label="重量" width="70">
<template slot-scope="scope">
{{scope.row.busweight}}
</template>
</el-table-column>
<el-table-column label="回执信息" width="">
<template slot-scope="scope">
{{scope.row.cusrestext}}
</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
</template>
</el-table-column>
</el-table>
</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 {Message} from "element-ui";
import {validAwb, validAlphabets, validAlphabetsAndNum,validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate";
import {getResponseForParam} from '@/api/responseDetail'
export default {
name: "ExitArrive",
components: {treeTable, Pagination},
inject: ['reload'],
data() {
const validatorAwb = (rule, value, callback) => {
if (!validAwb(value)) {
callback("请正确书写主单号")
}
callback()
}
const validatorAwbh = (rule, value, callback) => {
if (!validAlphabetsAndNum(value)) {
callback("只能输入字母和数字")
}
callback()
}
const validatorAlphabets = (rule, value, callback) => {
if (!validAlphabets(value)) {
callback("只能输入字母")
}
callback()
}
const validAlphabetsSpanceKey = (rule,value,callback) =>{
if(!validAlphabetsAndSpanceKey(value)){
callback("只能输入字母、数字、空格")
}
callback()
}
const validatorNums = (rule, value, callback) => {
if (!validatorNum(value)) {
callback("只能输入数字,并且小数位最多两位")
}
callback()
}
return {
func: treeToArray,
total: 1,
isAdmin: false,
arriveQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
},
dialogMap: {
update: '编辑出港运抵',
create: '添加出港运抵',
},
dialogTableVisible: false,
multipleSelection: [],
customcodeList: [4604, 4620],
dialogStatus: undefined,
awbhStatus: false,
dialogFormVisible: false,
listLoading: false,
arriveRoles: {
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}],
},
arriveData: [],
detailData: [],
arriveModel: {
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
awbh: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
customcode: undefined,
arrivetime: undefined,
messageType: 'MT3201'
}
}
},
created() {
if (this.$route.params.flightData !== undefined) {
// 给查询条件赋值
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
this.arriveQuery.originstation = this.$route.params.flightData.originstation
this.arriveQuery.destinationstation = this.$route.params.flightData.destinationstation
this.getList()
}
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
this.isAdmin = true
}
},
computed: {
awba: {
get: function () {
return this.arriveQuery.awba
},
set: function (val) {
this.arriveQuery.awba = val.trim()
}
},
awbh: {
get: function () {
return this.arriveModel.awbh
},
set: function (val) {
this.arriveModel.awbh = val.toUpperCase().trim()
}
},
carrier: {
get: function () {
return this.arriveModel.carrier
},
set: function (val) {
this.arriveModel.carrier = val.toUpperCase().trim()
}
},
goodsname: {
get: function () {
return this.arriveModel.goodsname
},
set: function (val) {
this.arriveModel.goodsname = val.toUpperCase().trim()
}
},
flightno: {
get: function () {
return this.arriveModel.flightno
},
set: function (val) {
this.arriveModel.flightno = val.toUpperCase().trim()
}
},
originstation: {
get: function () {
return this.arriveModel.originstation
},
set: function (val) {
this.arriveModel.originstation = val.toUpperCase().trim()
}
},
destinationstation: {
get: function () {
return this.arriveModel.destinationstation
},
set: function (val) {
this.arriveModel.destinationstation = val.toUpperCase().trim()
}
}
},
methods: {
getList() {
this.listLoading = true
if (this.arriveQuery.awba !== undefined) {
getMt3201ListForParam(this.arriveQuery).then(res => {
this.arriveData = res.data.dataList
this.total = res.data.count
if (res.data.count > 0) {
this.arriveQuery.carrier = this.arriveData[0].carrier
this.arriveQuery.flightno = this.arriveData[0].flightno
this.arriveQuery.flightdate = this.arriveData[0].flightdate
this.arriveQuery.originstation = this.arriveData[0].originstation
this.arriveQuery.destinationstation = this.arriveData[0].destinationstation
this.arriveQuery.customcode = this.arriveData[0].customcode
}
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
} else {
getMt3201ListForParam(this.arriveQuery).then(res => {
this.arriveData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
}
},
handleSerach() {
this.arriveQuery.carrier = undefined
this.arriveQuery.flightno = undefined
this.arriveQuery.originstation = undefined
this.arriveQuery.flightdate = undefined
this.arriveQuery.destinationstation = undefined
this.getList()
},
handleSelectionChange(val) {
this.multipleSelection = val
},
// 新增出港运抵
handelAddArriveInfo() {
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.arriveModel.carrier = this.arriveQuery.carrier
this.arriveModel.flightdate = this.arriveQuery.flightdate
this.arriveModel.flightno = this.arriveQuery.flightno
this.arriveModel.originstation = this.arriveQuery.originstation
this.arriveModel.destinationstation = this.arriveQuery.destinationstation
this.arriveModel.customcode = this.arriveQuery.customcode
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.arriveFormData.clearValidate()
})
},
createData() {
this.$refs.arriveFormData.validate(valid => {
if (valid) {
addMt3201(this.arriveModel).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
Message.success("出港运抵新增成功")
this.getList()
} else {
Message.error("数据更新失败,请检查数据")
}
})
}
})
},
// 重置实体
restModel() {
this.arriveModel = {
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
awbh: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
customcode: undefined,
arrivetime: undefined,
}
},
// 编辑
handleEdit(row) {
this.arriveModel = Object.assign({}, row) // copy obj
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.arriveFormData.clearValidate()
})
},
updateData() {
this.$refs.arriveFormData.validate(valid => {
if (valid) {
updateMT3201(this.arriveModel).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
Message.success("出港运抵修改成功")
this.getList()
} else {
Message.error("数据更新失败,请检查数据")
}
})
}
})
},
//保存并发送
SaveAndSend() {
},
// 收发明细
handleSend(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT3201'
}
this.dialogTableVisible = true
getResponseForParam(resQuery).then(res => {
this.detailData = res.data
})
},
// 发送舱单报
handleAwbSend() {
},
// 发送修改报
handleAwbEdit() {
},
//发送删除报
handleAwbDelete(row) {
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '删除',
cancelButtonText: '取消'
}).then(() => {
deleteByIsDelete(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
type: 'danger',
message: '删除异常,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消删除'
: '删除取消'
})
})
},
//更改状态
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: '状态更改失败,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消状态更改'
: '状态更改取消'
})
})
},
// 携数据跳转 新增运抵
handleAddArrive() {
const row = {
'messageType': 'MT3201'
}
this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.arriveModel}})
}
}
}
</script>
<style>
.grid-content {
height: 36px;
line-height: 36px;
}
.content {
border-left: 4px #409EFF solid;
padding-left: 10px;
background-color: #f9fafc;
margin-bottom: 2px
}
.row-bg, .co {
background-color: white;
}
.titleSpan {
font-weight: bold;
margin-right: 35px;
}
.el-row {
margin-top: 10px;
margin-bottom: 0px;
}
.btnFoot {
margin-top: 10px;
}
.el-table td, .el-table th {
text-align: center
}
.el-btn {
margin-left: 10px;
display: inline-block;
}
</style>
... ...
<template>
<div class="app-content">
<!--<div class="app-container">-->
<div class="filter-container">
<el-input v-model="listQuery.flightNo" clearable style="width: 270px;" class="filter-item"
placeholder="航班号"/>
<el-date-picker v-model="listQuery.flightDate" clearable type="date" style="width: 270px;"
placeholder="航班日期"
class="filter-item" value-format="yyyy-MM-dd"></el-date-picker>
<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">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightNo }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="280px" 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">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}</span>
</template>
</el-table-column>
<el-table-column label="目的站" width="280px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<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>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
@pagination="getList"/>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import {getFlightListForParam} from '@/api/exitFlight'
export default {
name: "ExitFlight",
components: {Pagination},
inject: ['reload'],
data() {
return {
total: 1,
listQuery: {
pageSize: 1,
limitSize: 10,
flightNo: undefined,
flightDate: undefined
},
flightData: [],
}
},
created(){
this.getList()
},
methods: {
getList() {
getFlightListForParam(this.listQuery).then(res =>{
this.flightData = res.data.dataList
this.total = res.data.count
})
},
handleSearch() {
this.getList()
},
handleLoading(row) {
row.messageType = 'MT4201'
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handleTidy(row) {
row.messageType = 'MT5201'
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handleArrive(row) {
row.messageType = 'MT3201'
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handlePre(row) {
row.messageType = 'MT2201'
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
}
}
</script>
<style scoped>
.app-content{
margin-top: 20px;
}
</style>
... ...
<template>
<el-container>
<el-main>
<el-row>
<el-col :span="24">
<div class="grid-content"><p>请输入航班信息:</p></div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="grid-content"><h1>Please Enter The Flight Information:</h1></div>
</el-col>
</el-row>
<el-row type="flex" class="row-bg" justify="center">
<el-col :span="4">
<el-input placeholder="必填" v-model="flightno">
<template slot="prepend">航班号</template>
</el-input>
</el-col>
<el-col :span="4">
<el-date-picker
v-model="flight.flightdate"
type="date"
value-format="yyyy-MM-dd"
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>
<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">
<div class="grid-content">
<el-button type="primary" @click="nstep">下一步</el-button>
</div>
</el-col>
</el-row>
</el-main>
</el-container>
</template>
<script>
import {Message} from "element-ui";
export default {
name: 'ExitFlightDesc',
data() {
return {
flight: {
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
messageType:undefined
},
btnStatus: true
};
},
created() {
if (this.$route.params.scopeRow !== 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
}
this.flight.flightdate = this.$route.params.scopeRow.flightdate
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('-','')
}
}
},
computed:{
flightno : {
get: function () {
return this.flight.flightno
},
set: function(val){
this.flight.flightno = val.toUpperCase().trim()
}
},
originstation :{
get: function () {
return this.flight.originstation
},
set: function(val){
this.flight.originstation = val.toUpperCase().trim()
}
},
destinationstation :{
get: function () {
return this.flight.destinationstation
},
set: function(val){
this.flight.destinationstation = val.toUpperCase().trim()
}
},
awba :{
get: function () {
return this.flight.awba
},
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){
const manifest = this.flight.awba;
const reg = /^[0-9]{11}$/
if(!reg.test(manifest)){
Message.error("主单号只支持数字并且最多11位")
return
}
const num = (manifest.substring(3,10)) % 7
if(num !== eval(manifest.substring(10))){
Message.error("主单号不符合模7校验")
return
}
} else {
this.flight.awba = undefined
}
if(this.flight.messageType ==="MT5201"){
this.$router.push({name: '出港理货', params: {flightData: this.flight}});
}
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 ==="MT2201"){
this.$router.push({name:'出港预配舱单',params:{flightData: this.flight}})
}
} else {
Message.warning("请将航班信息填写完整")
}
}
}
};
</script>
<style scoped>
.el-container {
text-align: center
}
.el-main {
margin: 0 auto;
height: 400px;
}
p {
font-size: 25px;
font-weight: bold;
}
</style>
... ...
<template>
<!--<div class="app-container">-->
<div>
<div>
<el-row class="row-bg">
<el-col :span="24">
<div class="grid-content content">航班信息</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="20">
<div class="grid-content">
<span class="titleSpan">航班号:{{this.loadingQuery.carrier}}{{this.loadingQuery.flightno}}</span>
<span class="titleSpan">航班日期:{{this.loadingQuery.flightdate}}</span>
<span class="titleSpan">航段:{{this.loadingQuery.originstation}}-{{this.loadingQuery.destinationstation}}</span>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content">进港舱单查询</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="22">
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input 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"
type="primary" size="mini" @click="handleAddLoading">新增装载
</el-button>
</div>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<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">
<template slot-scope="scope">
<span>{{scope.row.awba}}</span>
</template>
</el-table-column>
<el-table-column label="运载件数" width="70" align="center">
<template slot-scope="scope">
<span>{{scope.row.lodingpiece}}</span>
</template>
</el-table-column>
<el-table-column label="运载重量" width="70" align="center">
<template slot-scope="scope">
<span>{{scope.row.lodingweight}}</span>
</template>
</el-table-column>
<el-table-column label="货物描述" width="120" align="center">
<template slot-scope="scope">
<span>{{scope.row.goodsname}}</span>
</template>
</el-table-column>
<el-table-column label="装载时间" width="150" align="center">
<template slot-scope="scope">
<span>{{scope.row.loadingtime}}</span>
</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 ==='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 ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column prop="receipt" 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">
<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="handleSendAwb(scope.row)"
:disabled="scope.row.status !=='00'">发送舱单报
</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'">更改状态
</el-button>
</template>
</el-table-column>
</tree-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini"
v-if="loadingModel.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-row>
</div>
<pagination v-show="total>0" :total="total" :page.sync="loadingQuery.page" :limit.sync="loadingQuery.limit"
@pagination="getList"/>
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form ref="loadingFormData" :model="loadingModel" :rules="loadingRoles" label-position="right"
label-width="90px">
<div class="grid-content content">
<span>航班信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="主单号" prop="awba">
<el-input v-model="loadingModel.awba"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier" :disabled="dialogStatus ==='update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班号" prop="flightno">
<el-input v-model="flightno" :disabled="dialogStatus ==='update'"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogStatus ==='update'"></el-input>
</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>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班日期" prop="flightdate">
<el-date-picker v-model="loadingModel.flightdate" value-format="yyyy-MM-dd" type="date"
placeholder="请输入" :disabled="dialogStatus ==='update'"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<div class="grid-content content">
<span>货物信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="装载件数" prop="piece">
<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>
</el-col>
<el-col :span="7.5">
<el-form-item label="装载时间" prop="loadingtime">
<el-date-picker v-model="loadingModel.loadingtime" 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">
<el-form-item label="运单件数" prop="price">
<el-input v-model="loadingModel.awbprice"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="运单重量" prop="weight">
<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>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="特货代码" prop="awbh">
<el-input v-model="loadingModel.specialgoods"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="货物描述" prop="goodsname">
<el-input v-model="goodsname" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
</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>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
</el-table-column>
<el-table-column label="航班号" width="80">
<template slot-scope="scope">
{{scope.row.carrier}}{{scope.row.flightno}}
</template>
</el-table-column>
<el-table-column label="航班日期" width="100">
<template slot-scope="scope">
{{scope.row.flightdate}}
</template>
</el-table-column>
<el-table-column label="件数" width="70">
<template slot-scope="scope">
{{scope.row.buspiece}}
</template>
</el-table-column>
<el-table-column label="重量" width="70">
<template slot-scope="scope">
{{scope.row.busweight}}
</template>
</el-table-column>
<el-table-column label="回执信息" width="">
<template slot-scope="scope">
{{scope.row.cusrestext}}
</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
</template>
</el-table-column>
</el-table>
</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"
export default {
name: "ExitLoading",
components: {treeTable, Pagination},
inject: ['reload'],
data() {
const validatorAwb = (rule, value, callback) => {
if (!validAwb(value)) {
callback("请正确书写主单号")
}
callback()
}
const validatorAwbh = (rule, value, callback) => {
if (!validAlphabetsAndNum(value)) {
callback("只能输入字母和数字")
}
callback()
}
const validatorAlphabets = (rule, value, callback) => {
if (!validAlphabets(value)) {
callback("只能输入字母")
}
callback()
}
const validAlphabetsSpanceKey = (rule,value,callback) =>{
if(!validAlphabetsAndSpanceKey(value)){
callback("只能输入字母、数字、空格")
}
callback()
}
const validatorNums = (rule, value, callback) => {
if (!validatorNum(value)) {
callback("只能输入数字,并且小数位最多两位")
}
callback()
}
return {
func: treeToArray,
total: 1,
isAdmin:false,
dialogMap: {
update: '编辑出港装载',
create: '添加出港装载',
},
customcodeList: [4604, 4620],
dialogStatus: undefined,
dialogTableVisible: false,
dialogFormVisible: false,
listLoading: false,
loadingQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
},
loadingRoles: {
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}],
piece: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
weight: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
customcode:[{required: true, trigger: 'change',message:'不能为空'}]
},
loadingData: [],
detailData: [],
loadingModel: {
carrier:undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
lodingpiece: undefined,
lodingweight: undefined,
goodsname: undefined,
customcode: undefined,
specialgoods: undefined,
loadingtime: undefined,
messageType: 'MT4201',
awbprice: undefined,
awbweight: undefined
}
}
},
created() {
if (this.$route.params.flightData !== undefined) {
// 给查询条件赋值
if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
this.loadingQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + '-' + this.$route.params.flightData.awba.substring(3)
}
this.loadingQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.loadingQuery.flightno = this.$route.params.flightData.flightno.substring(2)
this.loadingQuery.flightdate = this.$route.params.flightData.flightdate
this.loadingQuery.originstation = this.$route.params.flightData.originstation
this.loadingQuery.destinationstation = this.$route.params.flightData.destinationstation
this.getList()
}
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
this.isAdmin = true
}
},
computed: {
carrier: {
get: function () {
return this.loadingModel.carrier
},
set: function (val) {
this.loadingModel.carrier = val.toUpperCase().trim()
}
},
goodsname: {
get: function () {
return this.loadingModel.goodsname
},
set: function (val) {
this.loadingModel.goodsname = val.toUpperCase().trim()
}
},
flightno: {
get: function () {
return this.loadingModel.flightno
},
set: function (val) {
this.loadingModel.flightno = val.toUpperCase().trim()
}
},
originstation: {
get: function () {
return this.loadingModel.originstation
},
set: function (val) {
this.loadingModel.originstation = val.toUpperCase().trim()
}
},
destinationstation: {
get: function () {
return this.loadingModel.destinationstation
},
set: function (val) {
this.loadingModel.destinationstation = val.toUpperCase().trim()
}
}
},
methods: {
getList() {
this.listLoading = true
if (this.loadingQuery.awba !== undefined && this.loadingQuery.awba !== '') {
getMt4201ListForParam(this.loadingQuery).then(res => {
this.loadingData = res.data.dataList
this.total = res.data.count
if (res.data.count > 0) {
this.loadingQuery.carrier = this.loadingData[0].carrier
this.loadingQuery.flightno = this.loadingData[0].flightno
this.loadingQuery.flightdate = this.loadingData[0].flightdate
this.loadingQuery.originstation = this.loadingData[0].originstation
this.loadingQuery.destinationstation = this.loadingData[0].destinationstation
this.loadingQuery.customcode = this.loadingData[0].customcode
}
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
} else {
getMt4201ListForParam(this.loadingQuery).then(res => {
this.loadingData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
}
},
// 多选
handleSelectionChange() {
},
// 查询
handleSearch() {
this.loadingQuery.carrier = undefined
this.loadingQuery.flightno = undefined
this.loadingQuery.originstation = undefined
this.loadingQuery.flightdate = undefined
this.loadingQuery.destinationstation = undefined
this.getList()
},
// 收发明细
handleSend() {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT4201'
}
this.dialogTableVisible = true
getResponseForParam(resQuery).then(res => {
this.detailData = res.data
})
},
// 编辑 弹框
handleEdit(row) {
this.loadingModel = Object.assign({}, row)
console.log(this.loadingModel)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.loadingFormData.clearValidate()
})
},
// 更新数据
updateData() {
this.$refs.loadingFormData.validate(valid => {
if (valid) {
updateMT4201(this.loadingModel).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
Message.success("数据更新成功")
this.getList()
} else {
Message.error("数据更新失败,请检查数据")
}
})
}
})
},
// 发送舱单报
handleSendAwb() {
},
// 删除 发送删除报
handleAwbDelete(row) {
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '删除',
cancelButtonText: '取消'
}).then(() => {
deleteByIsDelete(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
type: 'danger',
message: '删除异常,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消删除'
: '删除取消'
})
})
},
// 更改当前运单发送状态
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: '状态更改失败,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消状态更改'
: '状态更改取消'
})
})
},
// 保存并发送
handleSaveAndSend() {
},
// 重置实体
restModel() {
this.loadingModel = {
carrier:undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
lodingpiece: undefined,
lodingweight: undefined,
goodsname: undefined,
customcode: undefined,
specialgoods: undefined,
loadingtime: undefined,
messageType: 'MT4201',
awbprice: undefined,
awbweight: undefined
}
},
// 新增出港装载 弹框
handelAddLoadingInfo() {
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.loadingModel.carrier = this.loadingQuery.carrier
this.loadingModel.flightdate = this.loadingQuery.flightdate
this.loadingModel.flightno = this.loadingQuery.flightno
this.loadingModel.originstation = this.loadingQuery.originstation
this.loadingModel.destinationstation = this.loadingQuery.destinationstation
this.loadingModel.customcode = this.loadingQuery.customcode
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.loadingFormData.clearValidate()
})
},
// 新增出港装载 请求
createData() {
this.$refs.loadingFormData.validate(valid => {
if (valid) {
addMt4201(this.loadingModel).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
Message.success("新增出港装载成功")
this.getList()
} else {
Message.error("数据新增失败,请检查数据")
}
})
}
})
},
handleAddLoading() {
const row = {
'messageType': 'MT4201'
}
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.loadingModel}})
}
}
}
</script>
<style>
.grid-content {
height: 36px;
line-height: 36px;
}
.content {
border-left: 4px #409EFF solid;
padding-left: 10px;
background-color: #f9fafc;
margin-bottom: 2px
}
.row-bg, .co {
background-color: white;
}
.titleSpan {
font-weight: bold;
margin-right: 35px;
}
.el-row {
margin-top: 10px;
margin-bottom: 0px;
}
.btnFoot {
margin-top: 10px;
}
.el-table td, .el-table th {
text-align: center
}
.el-btn {
margin-left: 10px;
display: inline-block;
}
</style>
... ...
<template>
<!--<div class="app-container">-->
<div class="app-content">
<div class="filter-container">
<el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="运单号"/>
<el-input v-model="listQuery.carrier" clearable style="width: 200px;" class="filter-item" placeholder="承运人"/>
<el-input v-model="listQuery.flightno" clearable style="width: 200px;" class="filter-item" placeholder="航班号"/>
<el-date-picker v-model="listQuery.flightDate" type="date" placeholder="航班日期"
value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
</div>
<div class="filter-container">
<el-select v-model="listQuery.messageType" clearable class="filter-item" placeholder="请选择报文类型" style="width: 200px;">
<el-option v-for="item in messageTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="listQuery.messageStatus" clearable class="filter-item" placeholder="请选择报文状态" style="width: 200px;">
<el-option v-for="item in messageStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="listQuery.customStatus" clearable class="filter-item" placeholder="请选择海关状态" style="width: 200px;">
<el-option v-for="item in customStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-button class="filter-item" type="primary" @click="handleSearch">查询</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="warning"
@click="handleUpdateStatus">批量修改状态</el-button>
</div>
<div class="midSpan">
<el-row>
<el-col :span="0.5">
<span style="color: red">注:</span>
</el-col>
<el-col :span="1" style="background: oldlace; margin-right: 5px" align="center">
<span>预配舱单</span>
</el-col>
<el-col :span="1" style="background: #f0f9eb; margin-right: 5px" align="center">
<span>出港运抵</span>
</el-col>
<el-col :span="1" style="background: #bce7fd; margin-right: 5px" align="center">
<span>出港装载</span>
</el-col>
<el-col :span="1" style="background: #f5ffc0" align="center">
<span>出港理货</span>
</el-col>
</el-row>
</div>
<tree-table v-loading="listLoading" :data="manifestData" :eval-func="func" :expand-all="true"
style="font-size: 13px" border @selection-change="handleSelectionChange"
:row-class-name="tableRowClassName">
<el-table-column label="航班号" width="80px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="100px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.flightdate }}</span>
</template>
</el-table-column>
<el-table-column label="航段" width="100px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="主单号" width="120px" align="center" >
<template slot-scope="scope" >
<span>{{ scope.row.awba }}</span>
</template>
</el-table-column>
<el-table-column label="分单号" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awbh }}</span>
</template>
</el-table-column>
<el-table-column label="件数" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.piece }}</span>
</template>
</el-table-column>
<el-table-column label="重量" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weight }}</span>
</template>
</el-table-column>
<el-table-column label="关区" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customcode }}</span>
</template>
</el-table-column>
<el-table-column label="时间" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.actime }}</span>
</template>
</el-table-column>
<el-table-column label="状态" width="90px" 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 ==='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 ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column label="回执内容" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.customText }}</span>
<!--<div>-->
<!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
<!--</div>-->
</template>
</el-table-column>
<el-table-column label="操作" width="180px" align="center">
<template slot-scope="scope">
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT2201'" @click="handleUpdate(scope.row)">预配舱单</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT3201'" @click="handleUpdate(scope.row)">出港运抵</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT4201'" @click="handleUpdate(scope.row)">出港装载</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT5202'" @click="handleUpdate(scope.row)">出港理货</a>
<a style="color: #1d8ce0" @click="handleUpdateStatus(scope.row)">更改状态</a>
</template>
</el-table-column>
</tree-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
@pagination="getList"/>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getManifests} from "@/api/exitManifest"
import {getMt520XListForParam} from "@/api/exitTidy";
import {getMt3201ListForParam} from "@/api/exitArrive";
import {getMt4201ListForParam} from "@/api/exitLoading";
export default {
name: "ExitManifest",
components: {treeTable, Pagination},
inject:['reload'],
data() {
return {
func: treeToArray,
total: 1,
listLoading: false,
listQuery: {
pageSize: 1,
limitSize: 100,
awba:undefined,
carrier: undefined,
flightno:undefined,
flightDate: new Date(),
messageType: undefined,
messageStatus: undefined,
customStatus: undefined,
},
manifestData: [],
messageTypeList: [
{label:'预配舱单',value:'MT2201'},
{label:'出港运抵',value:'MT3201'},
{label:'出港装载',value:'MT4201'},
{label:'出港理货',value:'MT5202'}
],
messageStatusList: [
{label:'未发送',value:'01'},
{label:'已发舱单报',value:'02'},
{label:'舱单报退单',value:'05'},
{label:'舱单转人工',value:'06'},
{label:'舱单报申报成功',value:'07'},
{label:'已发舱单删除报',value:'08'},
{label:'舱单删除报退单',value:'09'},
{label:'舱单删除报转人工',value:'10'},
{label:'舱单删除成功',value:'11'},
{label:'已发舱单修改报',value:'12'},
{label:'舱单修改报退单',value:'13'},
{label:'舱单修改报转人工',value:'14'},
{label:'舱单修改报成功',value:'15'},
{label:'海关已存在',value:'16'},
],
customStatusList: [
{label:'普通货物',value:'001'},
{label:'国际转运货物',value:'002'},
{label:'国内转关',value:'003'},
{label:'空箱',value:'004'},
{label:'快件',value:'006'},
]
}
},
methods: {
getList() {
this.listLoading = true
getManifests(this.listQuery).then(res =>{
this.manifestData = res.data.dataList
this.total = res.data.count
setTimeout(() =>{
this.listLoading = false
},1500)
})
},
handleSelectionChange() {
},
handleSearch(){
this.getList()
},
handleUpdateStatus(row){
},
handleUpdate(row){
if(row.messageType === 'MT2201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT3201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT4201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT5201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
},
tableRowClassName({row,index}){
if(row.messageType === 'MT2201'){
return 'MT2201-row'
}
if(row.messageType === 'MT3201'){
return 'MT3201-row'
}
if(row.messageType === 'MT4201'){
return 'MT4201-row'
}
if(row.messageType === 'MT5202'){
return 'MT5202-row'
}
}
}
}
</script>
<style>
.el-table .MT2201-row {
background: oldlace;
}
.el-table .MT3201-row {
background: #f0f9eb;
}
.el-table .MT4201-row {
background: #bce7fd;
}
.el-table .MT5202-row {
background: #f5ffc0;
}
.app-content{
margin-top: 20px;
}
.midSpan{
margin-bottom: 10px;
}
</style>
... ...
<template>
<!--<div class="app-container">-->
<div>
<div>
<el-row class="row-bg">
<el-col :span="24">
<div class="grid-content content">航班信息</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</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>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content">预配舱单查询</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="22">
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input v-model="listQuery.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"
size="mini"
@click="handleAddpre">新增预配舱单
</el-button>
</div>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content" style="margin-top: 6px">预配舱单明细</div>
</el-col>
</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-column>
<el-table-column label="运单号" width="120" 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>
</template>
</el-table-column>
<el-table-column label="运单件数/重量" width="100" align="center">
<template slot-scope="scope">
{{scope.row.piece}}
</template>
</el-table-column>
<el-table-column label="预配件数/重量" width="100" align="center">
<template slot-scope="scope">
{{scope.row.weight}}
</template>
</el-table-column>
<el-table-column label="货物描述" width="120" align="center">
<template slot-scope="scope">
{{scope.row.goodsname}}
</template>
</el-table-column>
<el-table-column label="配载时间" width="140" align="center">
<template slot-scope="scope">
{{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="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 ==='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 ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</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">
<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"
@click="handleAddAwbh(scope.row)">新增分单
</el-button>
<el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
:disabled="scope.row.status !== '01'">发舱单报
</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="warning" @click="handleAwbStatus(scope.row)"
:disabled="scope.row.status === '01'">更改状态
</el-button>
</template>
</el-table-column>
</tree-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini" v-if="preData.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">返回
</el-button>
</el-row>
</div>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
@pagination="getList"/>
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="60%">
<el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right"
label-width="120px" class="el-dialog-div">
<div class="grid-content content">
运单信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="主单号" prop="awba">
<el-input :disabled="dialogStatus !== 'create'" v-model="awba" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5" v-if="dialogStatus === 'addAwbh'">
<el-form-item label="分单号" prop="awbh">
<el-input v-model="awbh" clearable/>
</el-form-item>
</el-col>
</el-row>
<div class="grid-content content">
航班信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier" :disabled="dialogStatus === '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-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班日期" prop="flightdate">
<el-date-picker :disabled="dialogStatus === 'addAwbh'"
value-format="yyyy-MM-dd"
v-model="preModel.flightdate" align="right"
type="date" placeholder="请输入航班日期" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
</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-form-item>
</el-col>
</el-row>
<div class="grid-content content">
航程信息
</div>
<div>
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier" disabled clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="到达航站" prop="destinationstation">
<el-input v-model="destinationstation" disabled clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人1">
<el-input v-model="by1" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="到达航站1">
<el-input v-model="dest1" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人2">
<el-input v-model="by2" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="到达航站2">
<el-input v-model="dest2" clearable/>
</el-form-item>
</el-col>
</el-row>
</div>
<div class="grid-content content">
货物信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="运单件数" prop="awbinfo.pcs">
<el-input v-model="preModel.awbinfo.pcs" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="运单重量" prop="awbinfo.weight">
<el-input v-model="preModel.awbinfo.weight" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="货物描述" prop="goodsname">
<el-input v-model="goodsname" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5" v-if="dialogStatus !=='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-form-item label="预配件数" prop="piece">
<el-input v-model="preModel.piece" clearable/>
</el-form-item>
</el-col>
<el-col :span="8">
<span>剩余件数:{{awbPiece}}</span>
</el-col>
</el-col>
<el-col :span="7.5" v-if="dialogStatus !=='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-form-item label="预配重量" prop="weight">
<el-input v-model="preModel.weight" clearable/>
</el-form-item>
</el-col>
<el-col :span="8">
<span>剩余重量:{{awbWeight}}</span>
</el-col>
</el-col>
<el-col :span="7.5">
<el-form-item label="预配时间" prop="actime">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss"
v-model="preModel.actime" align="right"
type="datetime" placeholder="请选择"/>
</el-form-item>
</el-col>
</el-row>
<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>
</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-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-option
v-for="item in payTypes"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="卸货地" prop="">
<el-input v-model="specopeid" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="代理人代码" prop="">
<el-input v-model="preModel.awbinfo.shpcustomerid" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="代理人名称" prop="">
<el-input v-model="preModel.awbinfo.shpcustomerid" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
</el-row>
<div class="grid-content content">
发货人信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="发货人名称" prop="awbinfo.shprname">
<el-input v-model="shprname" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="地址" prop="awbinfo.shpraddress">
<el-input v-model="shpraddress" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="城市代码">
<el-input v-model="scityid" maxlength="5" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="电话" prop="awbinfo.shprtel">
<el-input v-model="preModel.awbinfo.shprtel" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="传真">
<el-input v-model="preModel.awbinfo.shprmobiletype" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="发货人AEO编码" prop="awbinfo.shpaeocode">
<el-input v-model="shpaeocode" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="国家代码" prop="awbinfo.shprcountyr">
<el-select
:remote-method="remoteMethod"
:loading="listLoading"
v-model="shprcountyr"
filterable
remote
placeholder="请选择" clearable>
<el-option
v-for="item in countryOption"
:key="item.value"
:label="item.value"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!--<el-col :span="7.5">-->
<!--<el-form-item label="企业代码类型" prop="awbinfo.shpcomidpre">-->
<!--<el-select-->
<!--v-model="shpcomidpre"-->
<!--filterable-->
<!--placeholder="请选择企业代码类型" style="width: 200px;">-->
<!--<el-option-->
<!--v-for="item in shpCompnyTypeOption"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<!--</el-form-item>-->
<!--</el-col>-->
<!--<el-col :span="7.5">-->
<!--<el-form-item prop="awbinfo.shpcomidpno" label-width="10px">-->
<!--<el-input v-model="shpcomidpno" placeholder="企业代码"/>-->
<!--</el-form-item>-->
<!--</el-col>-->
</el-row>
<div class="grid-content content">
收货人信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="收货人名称" prop="awbinfo.cnsnname">
<el-input v-model="cnsnname" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="地址" prop="awbinfo.cnsnaddress">
<el-input v-model="cnsnaddress" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="城市代码">
<el-input v-model="ecityid" clearable maxlength="5"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="电话" prop="awbinfo.cnsntel">
<el-input v-model="preModel.awbinfo.cnsntel" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="传真">
<el-input v-model="preModel.awbinfo.cnsrmobiletype" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="收货人AEO编码" prop="awbinfo.cnsaeocode">
<el-input v-model="cnsaeocode" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="国家代码" prop="awbinfo.cnscountyr">
<el-select
:remote-method="remoteMethod"
:listLoading="listLoading"
v-model="cnscountyr"
filterable
remote
placeholder="请选择" clearable>
<el-option
v-for="item in countryOption"
:key="item.value"
:label="item.value"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="具体收货人名称" prop="awbinfo.cnsrctcname">
<el-input v-model="cnsrctcname" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="具体收货人电话" prop="awbinfo.cnsrctctel">
<el-input v-model="preModel.awbinfo.cnsrctctel" clearable/>
</el-form-item>
</el-col>
<!--<el-col :span="7.5">-->
<!--<el-form-item label="企业代码类型" prop="awbinfo.csgcustomerid">-->
<!--<el-select-->
<!--v-model="cnscomidpre"-->
<!--filterable-->
<!--placeholder="请选择企业代码类型" style="width: 200px;">-->
<!--<el-option-->
<!--v-for="item in shpCompnyTypeOption"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<!--</el-form-item>-->
<!--</el-col>-->
<!--<el-col :span="7.5">-->
<!--<el-form-item prop="awbinfo.cnscomidno" label-width="10px">-->
<!--<el-input v-model="cnscomidno" placeholder="企业代码"/>-->
<!--</el-form-item>-->
<!--</el-col>-->
</el-row>
</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>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
</el-table-column>
<el-table-column label="航班号" width="80">
<template slot-scope="scope">
{{scope.row.carrier}}{{scope.row.flightno}}
</template>
</el-table-column>
<el-table-column label="航班日期" width="100">
<template slot-scope="scope">
{{scope.row.flightdate}}
</template>
</el-table-column>
<el-table-column label="件数" width="70">
<template slot-scope="scope">
{{scope.row.buspiece}}
</template>
</el-table-column>
<el-table-column label="重量" width="70">
<template slot-scope="scope">
{{scope.row.busweight}}
</template>
</el-table-column>
<el-table-column label="回执信息" width="">
<template slot-scope="scope">
{{scope.row.cusrestext}}
</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
</template>
</el-table-column>
</el-table>
</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 {Message} from "element-ui";
import {getResponseForParam} from '@/api/responseDetail'
import {
validAwb,
validAlphabets,
validAlphabetsAndNum,
validAlphabetsAndSpanceKey,
validatorNum
} from "@/utils/validate"
export default {
name: "ExitPre",
components: {treeTable, Pagination},
inject: ['reload'],
data() {
const validatorAwb = (rule, value, callback) => {
if (!validAwb(value)) {
callback("请正确书写主单号")
}
callback()
}
const validatorAwbh = (rule, value, callback) => {
if (!validAlphabetsAndNum(value)) {
callback("只能输入字母和数字")
}
callback()
}
const validatorAlphabets = (rule, value, callback) => {
if (!validAlphabets(value)) {
callback("只能输入字母")
}
callback()
}
const validAlphabetsSpanceKey = (rule, value, callback) => {
if (!validAlphabetsAndSpanceKey(value)) {
callback("只能输入字母、数字、空格")
}
callback()
}
const validatorNums = (rule, value, callback) => {
if (!validatorNum(value)) {
callback("只能输入数字,并且小数位最多两位")
}
callback()
}
return {
func: treeToArray,
total: 1,
isAdmin:false,
listQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
carrier: undefined,
flightNo: undefined,
flightDate: undefined,
originStation: undefined,
destinationStation: undefined
},
dialogMap: {
update: '编辑预配舱单',
create: '添加预配舱单',
addAwbh: '添加分单'
},
customTypes: [
{label: '普通货物', value: '001'},
{label: '国际转运货物', value: '002'},
{label: '国内转关', value: '003'},
{label: '空箱', value: '004'},
{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'}],
dialogStatus: undefined,
dialogTableVisible: false,
listLoading: false,
disabledStatus: false,
dialogFormVisible: false,
countryOption: [],
countryList: [],
countryResultList: [],
awbPiece: undefined,
awbWeight: undefined,
preRoles: {
weight: [{required: true, trigger: 'change', validator: validatorNums}],
piece: [{required: true, trigger: 'change', validator: validatorNums}],
destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
flightdate: [{required: true, message: '航班日期必须输入', trigger: 'change'}],
carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
actime: [{required: true, trigger: 'blur', message: '预配时间不能为空'}],
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'}],
goodsname: [{required: true, trigger: 'change', validator: validAlphabetsSpanceKey}],
ex5: [{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'}],
'awbinfo.shpraddress': [{required: true, message: '发货地址不能为空', trigger: 'change'}],
'awbinfo.shprcountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
'awbinfo.cnsnname': [{required: true, message: '收货人不能为空', trigger: 'change'}],
'awbinfo.cnsntel': [{required: true, message: '收货电话不能为空', trigger: 'change'}],
'awbinfo.cnsnaddress': [{required: true, message: '收获地址不能为空', trigger: 'change'}],
'awbinfo.cnscountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
'awbinfo.weight': [{required: true, trigger: 'change', validator: validatorNums}],
'awbinfo.pcs': [{required: true, trigger: 'change', validator: validatorNums}],
},
preModel: {
awba: undefined,
awbh: undefined,
customcode: undefined,
flightno: undefined,
carrier: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
piece: undefined,
weight: undefined,
actime: undefined,
goodsname: undefined,
splitcode: undefined,
uldType: undefined,
uldNo: undefined,
status: undefined,
ex5: undefined,
awbinfo: {
pcs: undefined,
weight: undefined,
scityid: undefined,
ecityid: undefined,
specopeid: undefined,
shprname: undefined,
shprmobiletype: undefined,
shprtel: undefined,
shpraddress: undefined,
shprcountyr: undefined,
shpcomidpre: undefined,
shpaeocode: undefined,
shpcomidpno: undefined,
shpcitycode: undefined,
shpcustomerid: undefined,
cnsnname: undefined,
cnsrmobiletype: undefined,
cnsntel: undefined,
cnsnaddress: undefined,
cnscountyr: undefined,
cnsrctcname: undefined,
cnsaeocode: undefined,
cnsrctctel: undefined,
cnscitycode: undefined,
cargonm: undefined,
sairportid: undefined,
dest1city: undefined,
by1: undefined,
dest1: undefined,
by2: undefined,
dest2: undefined,
by3: undefined,
dest3: undefined,
eairportid: undefined,
csgcustomerid: undefined,
collected: '0',
awbtype: undefined
}
},
preData: [],
detailData: []
}
},
mounted() {
// 延迟加载,否则会出错
setTimeout(() => {
this.countryResultList = this.countryList.map(item => {
return {value: item.countryCode, label: item.countryNameCn}
})
}, 1000)
},
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.getList()
}
this.getCountryList()
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
this.isAdmin = true
}
},
computed: {
awba: {
get: function () {
return this.preModel.awba
},
set: function (val) {
if (val.length == 3) {
val = val + "-"
}
this.preModel.awba = val.trim()
}
},
awbh: {
get: function () {
return this.preModel.awbh
},
set: function (val) {
this.preModel.awbh = val.toUpperCase().trim()
}
},
flightno: {
get: function () {
return this.preModel.flightno
},
set: function (val) {
this.preModel.flightno = val.toUpperCase().trim()
}
},
carrier: {
get: function () {
return this.preModel.carrier
},
set: function (val) {
this.preModel.carrier = val.toUpperCase().trim()
}
},
originstation: {
get: function () {
return this.preModel.originstation
},
set: function (val) {
this.preModel.originstation = val.toUpperCase().trim()
}
},
destinationstation: {
get: function () {
return this.preModel.destinationstation
},
set: function (val) {
this.preModel.destinationstation = val.toUpperCase().trim()
}
},
goodsname: {
get: function () {
return this.preModel.goodsname
},
set: function (val) {
this.preModel.goodsname = val.toUpperCase()
}
},
specopeid: {
get: function () {
return this.preModel.awbinfo.specopeid
},
set: function (val) {
this.preModel.awbinfo.specopeid = val.toUpperCase().trim()
}
},
shprname: {
get: function () {
return this.preModel.awbinfo.shprname
},
set: function (val) {
this.preModel.awbinfo.shprname = val.toUpperCase()
}
},
shpraddress: {
get: function () {
return this.preModel.awbinfo.shpraddress
},
set: function (val) {
this.preModel.awbinfo.shpraddress = val.toUpperCase()
}
},
shprcountyr: {
get: function () {
return this.preModel.awbinfo.shprcountyr
},
set: function (val) {
this.preModel.awbinfo.shprcountyr = val.toUpperCase().trim()
}
},
shpaeocode: {
get: function () {
return this.preModel.awbinfo.shpaeocode
},
set: function (val) {
this.preModel.awbinfo.shpaeocode = val.toUpperCase()
}
},
scityid: {
get: function () {
return this.preModel.awbinfo.scityid
},
set: function (val) {
this.preModel.awbinfo.scityid = val.toUpperCase().trim()
}
},
ecityid: {
get: function () {
return this.preModel.awbinfo.ecityid
},
set: function (val) {
this.preModel.awbinfo.ecityid = val.toUpperCase().trim()
}
},
cnsnname: {
get: function () {
return this.preModel.awbinfo.cnsnname
},
set: function (val) {
this.preModel.awbinfo.cnsnname = val.toUpperCase()
}
},
cnsnaddress: {
get: function () {
return this.preModel.awbinfo.cnsnaddress
},
set: function (val) {
this.preModel.awbinfo.cnsnaddress = val.toUpperCase()
}
},
cnscountyr: {
get: function () {
return this.preModel.awbinfo.cnscountyr
},
set: function (val) {
this.preModel.awbinfo.cnscountyr = val.toUpperCase()
}
},
cnsrctcname: {
get: function () {
return this.preModel.awbinfo.cnsrctcname
},
set: function (val) {
this.preModel.awbinfo.cnsrctcname = val.toUpperCase().trim()
}
},
cnsaeocode: {
get: function () {
return this.preModel.awbinfo.cnsaeocode
},
set: function (val) {
this.preModel.awbinfo.cnsaeocode = val.toUpperCase().trim()
}
},
by1: {
get: function () {
return this.preModel.awbinfo.by1
},
set: function (val) {
this.preModel.awbinfo.by1 = val.toUpperCase().trim()
}
},
dest1: {
get: function () {
return this.preModel.awbinfo.dest1
},
set: function (val) {
this.preModel.awbinfo.dest1 = val.toUpperCase().trim()
}
},
by2: {
get: function () {
return this.preModel.awbinfo.by2
},
set: function (val) {
this.preModel.awbinfo.by2 = val.toUpperCase().trim()
}
},
dest2: {
get: function () {
return this.preModel.awbinfo.dest2
},
set: function (val) {
this.preModel.awbinfo.dest2 = val.toUpperCase().trim()
}
},
by3: {
get: function () {
return this.preModel.awbinfo.by3
},
set: function (val) {
this.preModel.awbinfo.by3 = val.toUpperCase().trim()
}
},
dest3: {
get: function () {
return this.preModel.awbinfo.dest3
},
set: function (val) {
this.preModel.awbinfo.dest3 = val.toUpperCase().trim()
}
},
},
methods: {
// >>>>>>>>>>>>>>>>获取list集合<<<<<<<<<<<<<<<<<<
getList() {
this.listLoading = true
if (this.listQuery.awba !== undefined && this.listQuery.awba !== '') {
getMt2201ListForParam(this.listQuery).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
}
setTimeout(() => {
this.listLoading = false
}, 1500)
})
} else {
getMt2201ListForParam(this.listQuery).then(res => {
this.preData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1500)
})
}
},
// >>>>>>>>>>>>>>>>重置实体<<<<<<<<<<<<<<<<<<
restModel() {
this.preModel = {
awba: undefined,
awbh: undefined,
customcode: undefined,
flightno: undefined,
carrier: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
splitcode: undefined,
uldType: undefined,
uldNo: undefined,
status: undefined,
ex5: undefined,
awbinfo: {
pcs: undefined,
weight: undefined,
specopeid: undefined,
scityid: undefined,
ecityid: undefined,
shprname: undefined,
shprmobiletype: undefined,
shprtel: undefined,
shpraddress: undefined,
shprcountyr: undefined,
shpcomidpre: undefined,
shpaeocode: undefined,
shpcomidpno: undefined,
shpcitycode: undefined,
shpcustomerid: undefined,
cnsnname: undefined,
cnsrmobiletype: undefined,
cnsntel: undefined,
cnsnaddress: undefined,
cnscountyr: undefined,
cnscomidpre: undefined,
cnscomidno: undefined,
cnsrctcname: undefined,
cnsaeocode: undefined,
cnsrctctel: undefined,
cnscitycode: undefined,
cargonm: undefined,
sairportid: undefined,
dest1city: undefined,
by1: undefined,
dest1: undefined,
by2: undefined,
dest2: undefined,
by3: undefined,
dest3: undefined,
eairportid: undefined,
csgcustomerid: undefined,
collected: '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.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.preFormData.clearValidate()
})
},
createData() {
this.$refs.preFormData.validate(valid => {
if (valid) {
addMt2201(this.preModel).then(res => {
if (res.data.count > 0) {
Message.success("新增成功")
this.dialogFormVisible = false
this.getList()
} else {
Message.error("新增失败,请检查数据")
}
})
}
})
},
// >>>>>>>>>>>>>>>>多选<<<<<<<<<<<<<<<<<<
handleSelectionChange() {
},
// >>>>>>>>>>>>>>>>搜索<<<<<<<<<<<<<<<<<<
handleSerach() {
this.listQuery.carrier = undefined
this.listQuery.flightno = undefined
this.listQuery.originstation = undefined
this.listQuery.flightdate = undefined
this.listQuery.destinationstation = undefined
this.getList()
},
// >>>>>>>>>>>>>>>>收发明细<<<<<<<<<<<<<<<<<<
handleSend(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT2201'
}
this.dialogTableVisible = true
getResponseForParam(resQuery).then(res => {
this.detailData = res.data
})
},
// >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<<
handleAwbSend() {
},
// >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<<
handleEdit(row) {
this.preModel = Object.assign({}, row)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.preFormData.clearValidate()
})
},
updateData() {
this.$refs.preFormData.validate(valid => {
if (valid) {
delete this.preModel.parent
delete this.preModel.children
updateMT2201(this.preModel).then(res => {
if (res.data.count > 0) {
Message.success("修改成功")
this.dialogFormVisible = false
this.getList()
} else {
Message.error("修改失败,请检查数据")
}
})
}
})
},
// >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<<
handleAwbEdit() {
},
// >>>>>>>>>>>>>>>>保存并发送<<<<<<<<<<<<<<<<<<
handleSaveAndSend() {
},
// >>>>>>>>>>>>>>>>发送删除报<<<<<<<<<<<<<<<<<<
handleAwbDelete(row) {
delete row.parent
delete row.children
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '删除',
cancelButtonText: '取消'
}).then(() => {
deleteByIsDelete(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
type: 'danger',
message: '删除异常,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消删除'
: '删除取消'
})
})
},
// >>>>>>>>>>>>>>>>更改运单状态<<<<<<<<<<<<<<<<<<
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: '状态更改失败,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消状态更改'
: '状态更改取消'
})
})
},
// >>>>>>>>>>>>>>>>新增分单<<<<<<<<<<<<<<<<<<
handleAddAwbh(row) {
this.restModel()
const template = Object.assign({}, row) // copy obj
this.preModel.awba = template.awba
this.preModel.flightdate = template.flightdate
this.preModel.flightno = template.flightno
this.preModel.destinationstation = template.destinationstation
this.preModel.customcode = template.customcode
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.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.awbPiece = 0
this.awbWeight = 0
let residuePiece = 0
let residueWeight = 0
const childrenList = res.data.dataList[0].children
if (childrenList.length < 1) {
this.awbPiece = res.data.dataList[0].piece
this.awbWeight = res.data.dataList[0].weight
} else {
for (var i = 0; i < childrenList.length; i++) {
residuePiece += childrenList[i].piece
residueWeight += childrenList[i].weight
}
this.awbPiece = res.data.dataList[0].piece - residuePiece
this.awbWeight = res.data.dataList[0].weight - residueWeight
}
})
this.dialogStatus = 'addAwbh'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.preFormData.clearValidate()
})
},
//获取城市列表
getCountryList() {
getCountry().then(res => {
this.countryList = res.data.dataList
})
},
remoteMethod(query) {
if (query !== '') {
this.listLoading = true
setTimeout(() => {
this.listLoading = false
this.countryOption = this.countryResultList.filter(item => {
return item.value.toUpperCase().trim()
.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 = []
}
},
handleAddpre() {
const row = {
'messageType': 'MT2201'
}
this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.preModel}})
}
}
}
</script>
<style>
.grid-content {
height: 36px;
line-height: 36px;
}
.content {
border-left: 4px #409EFF solid;
padding-left: 10px;
background-color: #f9fafc;
margin-bottom: 2px
}
.row-bg, .co {
background-color: white;
}
.titlespan {
font-weight: bold;
margin-right: 35px;
}
.el-row {
margin-top: 10px;
margin-bottom: 0px;
}
.btnFoot {
margin-top: 10px;
}
.el-btn {
margin-left: 10px;
display: inline-block;
}
.el-dialog-div {
height: 60vh;
overflow: auto;
}
.tableInline {
line-height: 8px;
}
</style>
... ...
<template>
<!--<div class="app-container">-->
<div>
<div>
<el-row class="row-bg">
<el-col :span="24">
<div class="grid-content content">航班信息</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="20">
<div class="grid-content">
<span class="titleSpan">航班号:{{this.tidyQuery.carrier}}{{this.tidyQuery.flightno}}</span>
<span class="titleSpan">航班日期:{{this.tidyQuery.flightdate}}</span>
<span class="titleSpan">航段:{{this.tidyQuery.originstation}}-{{this.tidyQuery.destinationstation}}</span>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content">进港舱单查询</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="22">
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input v-model="tidyQuery.awba" placeholder="请输入主单号"></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="tidyQuery.flightno === undefined && tidyData.length <1"
type="primary" size="mini"
@click="handleAddTidy">新增理货
</el-button>
</div>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content" style="margin-top: 6px">出港理货明细</div>
</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">
<template slot-scope="scope">
<span>{{scope.row.awba}}</span>
</template>
</el-table-column>
<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.piece}} / {{scope.row.weight}}</span>
</template>
</el-table-column>
<el-table-column label="装载开始/结束时间" width="260" align="center">
<template slot-scope="scope">
<span>{{scope.row.starttime}} - {{scope.row.endtime}}</span>
</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 ==='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 ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column prop="receipt" label="回执信息" width="180" 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">
<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>
<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>
</template>
</el-table-column>
</tree-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini" v-if="tidyModel.flightno !== undefined || tidyData.length> 0"
@click="handelAddTidyInfo">新增出港理货
</el-button>
<el-button type="primary" size="mini" v-if="tidyModel.flightno !== undefined || tidyData.length> 0"
@click="handelBackStep">返回
</el-button>
</el-row>
</div>
<pagination v-show="total>0" :total="total" :page.sync="tidyQuery.pageSize" :limit.sync="tidyQuery.limitSize"
@pagination="getList"/>
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" style="width: 110%">
<el-form ref="tidyFormData" :model="tidyModel" :rules="tidyRoles" label-position="right"
label-width="120px">
<el-row>
<div class="grid-content content">
<span>航班信息</span>
</div>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="主单号" prop="awba">
<el-input v-model="tidyModel.awba" :disabled="dialogStatus === 'update'"></el-input>
</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>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier" :disabled="dialogStatus === 'update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班号" prop="flightno">
<el-input v-model="flightno" :disabled="dialogStatus === 'update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班日期" prop="flightdate">
<el-date-picker v-model="tidyModel.flightdate" value-format="yyyy-MM-dd" type="date"
placeholder="请输入" :disabled="dialogStatus === 'update'"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogStatus === 'update'"></el-input>
</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-form-item>
</el-col>
</el-row>
<div class="grid-content content">
<span>货物信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="运单件数" prop="price">
<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-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-date-picker v-model="tidyModel.starttime" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="请输入"></el-date-picker>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="装载件数" prop="piece">
<el-input v-model="tidyModel.piece"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="装载重量" prop="weight">
<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-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="货物描述" prop="goodsname">
<el-input v-model="goodsname" placeholder="请输入"></el-input>
</el-form-item>
</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>
</el-form-item>
</el-col>
</el-row>
</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>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
</el-table-column>
<el-table-column label="航班号" width="80">
<template slot-scope="scope">
{{scope.row.carrier}}{{scope.row.flightno}}
</template>
</el-table-column>
<el-table-column label="航班日期" width="100">
<template slot-scope="scope">
{{scope.row.flightdate}}
</template>
</el-table-column>
<el-table-column label="件数" width="70">
<template slot-scope="scope">
{{scope.row.buspiece}}
</template>
</el-table-column>
<el-table-column label="重量" width="70">
<template slot-scope="scope">
{{scope.row.busweight}}
</template>
</el-table-column>
<el-table-column label="回执信息" width="">
<template slot-scope="scope">
{{scope.row.cusrestext}}
</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt520XListForParam, deleteByIsDelete, updateStatus, updateMt520X, addMt520X} from '@/api/exitTidy'
import {Message} from "element-ui";
import {getResponseForParam} from '@/api/responseDetail'
import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate"
export default {
name: "ExitTidy",
components: {treeTable, Pagination},
inject: ['reload'],
data() {
const validatorAwb = (rule, value, callback) => {
if (!validAwb(value)) {
callback("请正确书写主单号")
}
callback()
}
const validatorAwbh = (rule, value, callback) => {
if (!validAlphabetsAndNum(value)) {
callback("只能输入字母和数字")
}
callback()
}
const validatorAlphabets = (rule, value, callback) => {
if (!validAlphabets(value)) {
callback("只能输入字母")
}
callback()
}
const validAlphabetsSpanceKey = (rule, value, callback) => {
if (!validAlphabetsAndSpanceKey(value)) {
callback("只能输入字母、数字、空格")
}
callback()
}
const validatorNums = (rule, value, callback) => {
if (!validatorNum(value)) {
callback("只能输入数字,并且小数位最多两位")
}
callback()
}
return {
func: treeToArray,
total: 1,
isAdmin:false,
dialogMap: {
update: '编辑出港理货',
create: '添加出港理货',
addAwbh: '添加分单理货'
},
customcodeList: [4604, 4620],
tidyQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
},
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}],
},
tidyData: [],
detailData: [],
dialogTableVisible: false,
dialogStatus: undefined,
disabledStatus: false,
listLoading: false,
dialogFormVisible: false,
tidyModel: {
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
awbh: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
customcode: undefined,
specialgoods: undefined,
starttime: undefined,
endtime: undefined,
awbpiece: undefined,
awbweight: undefined,
rcfdep: 'MT5202',
}
}
},
created() {
if (this.$route.params.flightData !== undefined) {
this.tidyQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.tidyQuery.flightno = this.$route.params.flightData.flightno.substring(2)
this.tidyQuery.flightdate = this.$route.params.flightData.flightdate
this.tidyQuery.originstation = this.$route.params.flightData.originstation
this.tidyQuery.destinationstation = this.$route.params.flightData.destinationstation
if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
this.tidyQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
}
this.getList()
}
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
this.isAdmin = true
}
},
watch: {
'tidyModel.endtime': function (newValue, oldValue) {
let startData = new Date(this.tidyModel.starttime)
let endDate = new Date(newValue)
if (startData.getTime() > endDate.getTime()) {
this.tidyModel.endtime = undefined
Message.error("理货结束时间不得早于开始时间")
}
},
'tidyModel.starttime': function (newValue, oldValue) {
let startData = new Date(newValue)
let endDate = new Date(this.tidyModel.endtime)
if (startData.getTime() > endDate.getTime()) {
this.tidyModel.starttime = undefined
Message.error("理货开始时间不得晚于结束时间")
}
}
},
computed: {
awbh: {
get: function () {
return this.tidyModel.awbh
},
set: function (val) {
this.tidyModel.awbh = val.toUpperCase().trim()
}
},
goodsname: {
get: function () {
return this.tidyModel.goodsname
},
set: function (val) {
this.tidyModel.goodsname = val.toUpperCase()
}
},
carrier: {
get: function () {
return this.tidyModel.carrier
},
set: function (val) {
this.tidyModel.carrier = val.toUpperCase().trim()
}
},
flightno: {
get: function () {
return this.tidyModel.flightno
},
set: function (val) {
this.tidyModel.flightno = val.toUpperCase().trim()
}
},
originstation: {
get: function () {
return this.tidyModel.originstation
},
set: function (val) {
this.tidyModel.originstation = val.toUpperCase().trim()
}
},
destinationstation: {
get: function () {
return this.tidyModel.destinationstation
},
set: function (val) {
this.tidyModel.destinationstation = val.toUpperCase().trim()
}
},
},
methods: {
// 查询出港理货列表
getList() {
this.listLoading = true
//根据是否有主单号 来给查询条件赋值
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) {
this.tidyQuery.carrier = this.tidyData[0].carrier
this.tidyQuery.flightno = this.tidyData[0].flightno
this.tidyQuery.flightdate = this.tidyData[0].flightdate
this.tidyQuery.originstation = this.tidyData[0].originstation
this.tidyQuery.destinationstation = this.tidyData[0].destinationstation
this.tidyQuery.customcode = this.tidyData[0].customcode
}
setTimeout(() => {
this.listLoading = false
}, 1500)
})
} else {
getMt520XListForParam(this.tidyQuery).then(res => {
this.tidyData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1500)
})
}
},
// 多选
handleSelectionChange() {
},
// 搜索
handleSerach() {
this.tidyQuery.carrier = undefined
this.tidyQuery.flightno = undefined
this.tidyQuery.originstation = undefined
this.tidyQuery.flightdate = undefined
this.tidyQuery.destinationstation = undefined
this.getList()
},
// 收发明细
handleSend(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT5202'
}
this.dialogTableVisible = true
getResponseForParam(resQuery).then(res => {
this.detailData = res.data
})
},
//发送舱单报
handleAwbSend(row) {
},
//新增分单理货
handleAddAwbh(row) {
this.tidyModel.carrier = row.carrier
this.tidyModel.awba = row.awba
this.tidyModel.flightdate = row.flightdate
this.tidyModel.flightno = row.flightno
this.tidyModel.originstation = row.originstation
this.tidyModel.destinationstation = row.destinationstation
this.tidyModel.customcode = row.customcode
this.dialogStatus = 'addAwbh'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.tidyFormData.clearValidate()
})
},
// 删除当前运单
handleAwbDelete(row) {
delete row.parent
delete row.children
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '删除',
cancelButtonText: '取消'
}).then(() => {
deleteByIsDelete(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({
type: 'info',
message: action === 'cancel'
? '取消删除'
: '删除取消'
})
})
},
// 更新运单为可发送状态
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: '更新失败,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消状态更改'
: '取消状态更改'
})
})
},
// 重置实体 并赋值refdep为出港理货MT5202
restModel() {
this.tidyModel = {
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
awbh: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
customcode: undefined,
specialgoods: undefined,
starttime: undefined,
endtime: undefined,
awbpiece: undefined,
awbweight: undefined,
rcfdep: 'MT5202',
}
},
// 新增出港理货弹框
handelAddTidyInfo() {
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.tidyModel.carrier = this.tidyQuery.carrier
this.tidyModel.flightdate = this.tidyQuery.flightdate
this.tidyModel.flightno = this.tidyQuery.flightno
this.tidyModel.originstation = this.tidyQuery.originstation
this.tidyModel.destinationstation = this.tidyQuery.destinationstation
this.tidyModel.customcode = this.tidyQuery.customcode
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.tidyFormData.clearValidate()
})
},
// 新增出港理货请求
createData() {
this.$refs.tidyFormData.validate(valid => {
if (valid) {
addMt520X(this.tidyModel).then(res => {
if (res.data.count > 0) {
Message.success("出港理货新增成功")
this.dialogFormVisible = false
this.getList()
} else {
Message.error("出港理货新增失败,请检查数据")
}
})
}
})
},
// 更新出港理货弹框
handleEdit(row) {
this.tidyModel = Object.assign({}, row)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.tidyFormData.clearValidate()
})
},
// 更新出港理货请求
updateData() {
this.$refs.tidyFormData.validate(valid => {
if (valid) {
delete this.tidyModel.parent
delete this.tidyModel.children
updateMt520X(this.tidyModel).then(res => {
console.log(res.data)
if (res.data.count > 0) {
Message.success("出港理货更新成功")
this.dialogFormVisible = false
this.getList()
} else {
Message.error("出港理货更新失败,请检查数据")
}
})
}
})
},
// 保存并发送
handleSaveAndSend() {
},
// 新增理货弹框
handleAddTidy() {
const row = {
'messageType': 'MT5201'
}
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
// 返回
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.tidyModel}})
}
}
}
</script>
<style scoped>
.grid-content {
height: 36px;
line-height: 36px;
}
.content {
border-left: 4px #409EFF solid;
padding-left: 10px;
background-color: #f9fafc;
margin-bottom: 2px
}
.row-bg, .co {
background-color: white;
}
.titleSpan {
font-weight: bold;
margin-right: 35px;
}
.el-btn {
margin-left: 10px;
display: inline-block;
}
.el-row {
margin-top: 10px;
margin-bottom: 0px;
}
.btnFoot {
margin-top: 10px;
}
</style>
... ...
<template>
<div class="app-container">
<div class="filter-container">
<el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="运单号"/>
<el-input v-model="listQuery.flightno" clearable style="width: 200px;" class="filter-item" placeholder="航班号"/>
<el-date-picker v-model="listQuery.flightdate" clearable type="date" style="width: 200px;" placeholder="航班日期"
value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
<el-select v-model="listQuery.customcode" clearable style="width: 200px;" class="filter-item" placeholder="请选择关区代码">
<el-option v-for="item in manifestCustoms" :key="item" :label="item" :value="item"></el-option>
</el-select>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">{{
$t('table.search') }}
</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit"
@click="handleCreate">{{ $t('table.add') }}
</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message"
@click="handleDelList">批量发送
</el-button>
</div>
<tree-table :data="orgData" :eval-func="func" :expand-all="expandAll" stripe
style="font-size: 12px" border @selection-change="handleSelectionChange">
<el-table-column label="主单号" width="130px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awba }}</span>
</template>
</el-table-column>
<el-table-column label="分单号" width="120px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awbh }}</span>
</template>
</el-table-column>
<el-table-column label="航班号" width="90px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.flightno }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="120px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.flightdate }}</span>
</template>
</el-table-column>
<el-table-column label="起始站" width="70px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}</span>
</template>
</el-table-column>
<el-table-column label="目的站" width="70px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="件数" width="70px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.piece }}</span>
</template>
</el-table-column>
<el-table-column label="重量" width="70px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weight }}</span>
</template>
</el-table-column>
<!--<el-table-column :label="$t('table.status')" width="90px" sortable>-->
<!--<template slot-scope="scope">-->
<!--<el-tag :type="scope.row.status | statusFilter">{{ scope.row.status }}</el-tag>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="回执内容" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customText }}</span>
<!--<div>-->
<!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
<!--</div>-->
</template>
</el-table-column>
<el-table-column :label="$t('table.actions')" width="500px" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleUpdate(scope.row)">编辑</el-button>
<el-button size="mini" type="success" @click="handleSend(scope.row)">发送</el-button>
<el-button size="mini" @click="handleFeedBack(scope.row)">客服反馈</el-button>
<el-button size="mini" type="danger" @click="handleDel(scope.$index,scope.row)">删除</el-button>
<el-button size="mini" type="warning" @click="handleSwitch(scope.row)">更改状态</el-button>
<el-button size="mini" type="primary" v-if="scope.row.awbh ===null" @click="handleAddAwbh(scope.row)">新增分单</el-button>
<!--<el-button size="mini" type="primary" @click="handleRedirct(scope.row)">跳转测试</el-button>-->
</template>
</el-table-column>
</tree-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit"
@pagination="getList"/>
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form ref="formData" :inline="true" :rules="rules" :model="temp" label-width="110px"
style="font-size: 13px" class="el-dialog-div">
<div class="tags">
<el-tag type="info" effect="plain">
航班信息
</el-tag>
</div>
<div class="row-bg">
<el-row>
<el-col :span="10">
<el-form-item label="航班号" prop="flightno">
<el-input :disabled="dialogStatus !== 'create'" v-model="flightno"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="航班日期" prop="flightdate">
<el-date-picker :disabled="dialogStatus !== 'create'" :picker-options="pickerOptions"
value-format="yyyy-MM-dd"
v-model="temp.flightdate" align="right"
type="date" placeholder="请输入航班日期" style="width: 87%"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="起始站" prop="originstation">
<el-input :disabled="dialogStatus !== 'create'" v-model="originstation"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="目的站" prop="destinationstation">
<el-input :disabled="dialogStatus !== 'create'" v-model="destinationstation"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="是否分批" prop="splitcode">
<el-select v-model="temp.splitcode" class="filter-item" placeholder="请选择是否分批"
style="width: 93%">
<el-option v-for="item in splitcodes" :key="item.value" :label="item.value"
:value="item.value">
<span>{{item.label}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
<div class="tags">
<el-tag type="info" effect="plain">
航程信息
</el-tag>
</div>
<div class="row-bg">
<el-row>
<el-col :span="10">
<el-form-item label="起始航站" prop="awbinfo.sairportid">
<el-input v-model="sairportid"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="目的地" prop="destinationstation">
<el-input v-model="destinationstation"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row>
<el-col :span="10">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="到达航站" prop="awbinfo.eairportid">
<el-input v-model="eairportid"/>
</el-form-item>
</el-col>
</el-row>
<el-col :span="10">
<el-form-item label="承运人1" >
<el-input v-model="by1"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="到达航站1">
<el-input v-model="dest1"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="承运人2">
<el-input v-model="by2"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="到达航站2">
<el-input v-model="dest2"/>
</el-form-item>
</el-col>
</el-row>
</div>
<div class="tags">
<el-tag type="info" effect="plain">
运单信息
</el-tag>
</div>
<div class="row-bg">
<el-row>
<el-col :span="10">
<el-form-item label="主单号" prop="awba">
<el-input :disabled="dialogStatus !== 'create'" v-model="awba"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="分单号">
<el-input :disabled="dialogStatus !== 'addAwh'" v-model="awbh"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="舱单件数" prop="piece">
<el-input v-model.number="temp.piece"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="舱单重量" prop="weight">
<el-input v-model.number="temp.weight"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="关区代码" prop="customcode">
<el-select v-model="temp.customcode" class="filter-item" placeholder="请选择关区代码"
style="width: 93%">
<el-option v-for="item in manifestCustoms" :key="item" :label="item"
:value="item"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="海关状态" prop="ex5">
<el-select v-model="temp.ex5" class="filter-item" placeholder="请录入货物类型"
style="width: 93%">
<el-option v-for="item in customTypes" :key="item" :label="item" :value="item"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="付费方式" prop="awbinfo.collected">
<el-select v-model="temp.awbinfo.collected" class="filter-item" placeholder="付费方式"
style="width: 93%">
<el-option
v-for="item in payTypes"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="特货代码">
<el-input v-model="specopeid"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="货物描述" prop="goodsname">
<el-input v-model="goodsname"/>
</el-form-item>
</el-col>
</el-row>
</div>
<div class="tags">
<el-tag type="info" effect="plain">
发货人信息
</el-tag>
</div>
<div class="row-bg">
<el-row>
<el-col :span="10">
<el-form-item label="发货人名称" prop="awbinfo.shprname">
<el-input v-model="shprname"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="地址" prop="awbinfo.shpraddress">
<el-input v-model="shpraddress"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="电话" prop="awbinfo.shprtel">
<el-input v-model="temp.awbinfo.shprtel"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="传真">
<el-input v-model="temp.awbinfo.shprmobiletype"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="国家代码" prop="awbinfo.shprcountyr">
<el-select
:remote-method="remoteMethod"
:loading="loading"
v-model="shprcountyr"
filterable
remote
placeholder="请选择" style="width: 93%;">
<el-option
v-for="item in countryOption"
:key="item.value"
:label="item.value"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!--<el-col :span="14">-->
<!--<el-col :span="16">-->
<!--<el-form-item label="企业代码类型" prop="awbinfo.shpcomidpre">-->
<!--<el-select-->
<!--v-model="shpcomidpre"-->
<!--filterable-->
<!--placeholder="请选择企业代码类型">-->
<!--<el-option-->
<!--v-for="item in shpCompnyTypeOption"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<!--</el-form-item>-->
<!--</el-col>-->
<!--<el-col :span="7">-->
<!--<el-form-item prop="awbinfo.shpcomidpno">-->
<!--<el-input v-model="shpcomidpno" placeholder="企业代码"/>-->
<!--</el-form-item>-->
<!--</el-col>-->
<!--</el-col>-->
</el-row>
</div>
<div class="tags">
<el-tag type="info" effect="plain">
收货人信息
</el-tag>
</div>
<div class="row-bg">
<el-row>
<el-col :span="10">
<el-form-item label="收货人名称" prop="awbinfo.cnsnname">
<el-input v-model="cnsnname"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="地址" prop="awbinfo.cnsnaddress">
<el-input v-model="cnsnaddress"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="电话" prop="awbinfo.cnsntel">
<el-input v-model="temp.awbinfo.cnsntel"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="传真">
<el-input v-model="temp.awbinfo.cnsrmobiletype"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="国家代码" prop="awbinfo.cnscountyr">
<el-select
:remote-method="remoteMethod"
:loading="loading"
v-model="cnscountyr"
filterable
remote
placeholder="请选择" style="width: 93%;">
<el-option
v-for="item in countryOption"
:key="item.value"
:label="item.value"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!--<el-col :span="14">
<el-col :span="16">
<el-form-item label="企业代码类型" prop="awbinfo.csgcustomerid">
<el-select
v-model="cnscomidpre"
filterable
placeholder="请选择企业代码类型">
<el-option
v-for="item in shpCompnyTypeOption"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item prop="awbinfo.cnscomidno">
<el-input v-model="cnscomidno" placeholder="企业代码"/>
</el-form-item>
</el-col>
</el-col>-->
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="具体收货人名称" prop="awbinfo.cnsrctcname">
<el-input v-model="cnsrctcname"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="具体收货人电话" prop="awbinfo.cnsrctctel">
<el-input v-model="temp.awbinfo.cnsrctctel"/>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">{{ $t('table.cancel') }}</el-button>
<el-button type="primary" @click="dialogStatus==='update'?createData():updateData()">{{
$t('table.confirm') }}
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves' // Waves directive
import country from '@/utils/country.js'
import dangerGoods from '@/utils/dangerGoods.js'
import goodsPackage from '@/utils/goodsPackage.js'
import {getCountry, getByCountryCode, getByCountryCodeForName} from "@/api/country";
import {addMt1201, updateMT1201, updateStatus, deleteByIsDelete, getMt1201ListForParam} from '@/api/orgManifest'
import {Message} from "element-ui";
import {validAwb, validFlightNo} from '@/utils/validate'
export default {
name: 'OrgManifest',
components: {treeTable, Pagination},
directives: {waves},
filters: {
statusFilter(status) {
const statusMap = {
10003: '',
41301: 'success',
10002: 'info',
10000: 'danger',
45103: 'warning',
wrong: 'exception'
}
return statusMap[status]
},
typeFilter(type) {
return calendarTypeKeyValue[type]
}
},
data() {
const validatorAwb = (rule, value, callback) =>{
if(!validAwb(value)){
callback("请正确书写主单号")
}
callback()
}
const validatorFlightno = (rule, value, callback) =>{
if(!validFlightNo(value)){
callback("请正确书写航班号")
}
callback()
}
return {
func: treeToArray,
expandAll:true,
total: 0,
loading: false,
listLoading: false,
downloadLoading: false,
multipleSelection: [],
dialogFormVisible: false,
dialogStatus: '',
countryOption: [],
shpCompnyTypeOption: [],
textMap: {
update: '编辑',
create: '添加',
addAwbh:'新增分单'
},
listQuery: {
pageSize: 1,
limitSize: 20,
awba: undefined,
flightno: undefined,
flightdate: undefined,
customcode: undefined
},
//实体对象声明最好使用undefined,后台不会更改数据库默认值
temp: {
awba: undefined,
awbh: undefined,
customcode: undefined,
flightno: undefined,
carrier: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
splitcode: undefined,
uldType: undefined,
uldNo: undefined,
status: undefined,
ex5:undefined,
awbinfo: {
specopeid: undefined,
shprname: undefined,
shprmobiletype: undefined,
shprtel: undefined,
shpraddress: undefined,
shprcountyr: undefined,
shpcomidpre: undefined,
shpcomidpno: undefined,
shpcustomerid: undefined,
cnsnname: undefined,
cnsrmobiletype: undefined,
cnsntel: undefined,
cnsnaddress: undefined,
cnscountyr: undefined,
cnscomidpre: undefined,
cnscomidno: undefined,
cnsrctcname: undefined,
cnsrctctel: undefined,
cargonm: undefined,
sairportid: undefined,
dest1city: undefined,
by1: undefined,
dest1: undefined,
by2: undefined,
dest2: undefined,
by3: undefined,
dest3: undefined,
eairportid: undefined,
csgcustomerid: undefined,
collected: '0'
}
},
manifestCustoms: ['4604', '4620', '4613'],
customTypes: ['普通货物', '国际转运货物', '国内转关', '空箱', '快件'],
payTypes: [{label: '预付', value: '0'}, {label: '到付', value: '1'}],
splitcodes:[{label: '是', value: 'T'}, {label: '否', value: 'P'}],
orgData: [],
countryList: [],
countryResultList: [],
shpCompnyList: [],
pickerOptions: {
shortcuts: [
{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date())
}
},
{
text: '昨天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '明天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() + 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '一周前',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', date)
}
}
]
},
args: [null, null, 'timeLine'],
selectCountry: {
countryNameCn: undefined,
countryCode: undefined
},
rules: {
weight: [{type: 'number', required: true, message: '重量必须为数字', trigger: 'change'}],
piece: [{type: 'number', required: true, message: '件数必须为数字', trigger: 'change'}],
destinationstation: [{required: true, message: '运单目的地必须输入', trigger: 'change'}],
originstation: [{required: true, message: '运单起始站必须数据', trigger: 'change'}],
flightdate: [{required: true, message: '航班日期必须输入', trigger: 'change'}],
flightno: [{required: true, trigger: 'blur', validator: validatorFlightno}],
carrier: [{required: true, trigger: 'blur', message: '承运人不能为空'}],
customcode: [{required: true, message: '关区代码必须选择', trigger: 'change'}],
awba: [{required: true, trigger:'blur', validator: validatorAwb}],
'awbinfo.collected': [{required: true, message: '付款方式必选', trigger: 'change'}],
goodsname: [{required: true, message: '货物描述不能为空', trigger: 'change'}],
ex5: [{required: true, message: '货物描述不能为空', trigger: 'change'}],
'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}],
'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}],
'awbinfo.shpraddress': [{required: true, message: '发货地址不能为空', trigger: 'change'}],
'awbinfo.shprcountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
'awbinfo.shpcomidpre': [{required: true, message: '企业代码类型不能为空', trigger: 'change'}],
'awbinfo.shpcomidpno': [{required: true, message: '企业代码不能为空', trigger: 'change'}],
'awbinfo.cnsnname': [{required: true, message: '收货人不能为空', trigger: 'change'}],
'awbinfo.cnsntel': [{required: true, message: '收货电话不能为空', trigger: 'change'}],
'awbinfo.cnsnaddress': [{required: true, message: '收获地址不能为空', trigger: 'change'}],
'awbinfo.cnscountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
'awbinfo.cnscomidpre': [{required: true, message: '企业代码类型不能为空', trigger: 'change'}],
'awbinfo.cnscomidno': [{required: true, message: '企业代码不能为空', trigger: 'change'}],
}
}
},
created() {
this.getList()
this.getCountryList()
},
mounted() {
// 延迟加载,否则会出错
setTimeout(() => {
this.countryResultList = this.countryList.map(item => {
return {value: item.countryCode, label: item.countryNameCn}
})
}, 1000)
},
computed: {
awba: {
get: function () {
return this.temp.awba
},
set: function (val) {
if(val.length==3){
val = val+"-"
}
this.temp.awba = val.trim()
}
},
awbh: {
get: function () {
return this.temp.awbh
},
set: function (val) {
this.temp.awbh = val.toUpperCase().trim()
}
},
flightno: {
get: function () {
return this.temp.flightno
},
set: function (val) {
this.temp.flightno = val.toUpperCase().trim()
}
},
carrier:{
get: function () {
return this.temp.carrier
},
set: function (val) {
this.temp.carrier = val.toUpperCase().trim()
}
},
originstation: {
get: function () {
return this.temp.originstation
},
set: function (val) {
this.temp.originstation = val.toUpperCase().trim()
}
},
destinationstation: {
get: function () {
return this.temp.destinationstation
},
set: function (val) {
this.temp.destinationstation = val.toUpperCase().trim()
}
},
goodsname: {
get: function () {
return this.temp.goodsname
},
set: function (val) {
this.temp.goodsname = val.toUpperCase().trim()
}
},
specopeid: {
get: function () {
return this.temp.awbinfo.specopeid
},
set: function (val) {
this.temp.awbinfo.specopeid = val.toUpperCase().trim()
}
},
shprname: {
get: function () {
return this.temp.awbinfo.shprname
},
set: function (val) {
this.temp.awbinfo.shprname = val.toUpperCase().trim()
}
},
shpraddress: {
get: function () {
return this.temp.awbinfo.shpraddress
},
set: function (val) {
this.temp.awbinfo.shpraddress = val.toUpperCase().trim()
}
},
shprcountyr: {
get: function () {
return this.temp.awbinfo.shprcountyr
},
set: function (val) {
this.temp.awbinfo.shprcountyr = val.toUpperCase().trim()
}
},
shpcomidpre: {
get: function () {
return this.temp.awbinfo.shpcomidpre
},
set: function (val) {
this.temp.awbinfo.shpcomidpre = val.toUpperCase().trim()
}
},
shpcomidpno: {
get: function () {
return this.temp.awbinfo.shpcomidpno
},
set: function (val) {
this.temp.awbinfo.shpcomidpno = val.toUpperCase().trim()
}
},
cnsnname: {
get: function () {
return this.temp.awbinfo.cnsnname
},
set: function (val) {
this.temp.awbinfo.cnsnname = val.toUpperCase().trim()
}
},
cnsnaddress: {
get: function () {
return this.temp.awbinfo.cnsnaddress
},
set: function (val) {
this.temp.awbinfo.cnsnaddress = val.toUpperCase().trim()
}
},
cnscountyr: {
get: function () {
return this.temp.awbinfo.cnscountyr
},
set: function (val) {
this.temp.awbinfo.cnscountyr = val.toUpperCase().trim()
}
},
cnscomidno: {
get: function () {
return this.temp.awbinfo.cnscomidno
},
set: function (val) {
this.temp.awbinfo.cnscomidno = val.toUpperCase().trim()
}
},
cnsrctcname: {
get: function () {
return this.temp.awbinfo.cnsrctcname
},
set: function (val) {
this.temp.awbinfo.cnsrctcname = val.toUpperCase().trim()
}
},
sairportid: {
get: function () {
return this.temp.awbinfo.sairportid
},
set: function (val) {
this.temp.awbinfo.sairportid = val.toUpperCase().trim()
}
},
by1: {
get: function () {
return this.temp.awbinfo.by1
},
set: function (val) {
this.temp.awbinfo.by1 = val.toUpperCase().trim()
}
},
dest1: {
get: function () {
return this.temp.awbinfo.dest1
},
set: function (val) {
this.temp.awbinfo.dest1 = val.toUpperCase().trim()
}
},
by2: {
get: function () {
return this.temp.awbinfo.by2
},
set: function (val) {
this.temp.awbinfo.by2 = val.toUpperCase().trim()
}
},
dest2: {
get: function () {
return this.temp.awbinfo.dest2
},
set: function (val) {
this.temp.awbinfo.dest2 = val.toUpperCase().trim()
}
},
by3: {
get: function () {
return this.temp.awbinfo.by3
},
set: function (val) {
this.temp.awbinfo.by3 = val.toUpperCase().trim()
}
},
dest3: {
get: function () {
return this.temp.awbinfo.dest3
},
set: function (val) {
this.temp.awbinfo.dest3 = val.toUpperCase().trim()
}
},
eairportid: {
get: function () {
return this.temp.awbinfo.eairportid
},
set: function (val) {
this.temp.awbinfo.eairportid = val.toUpperCase().trim()
}
},
cnscomidpre: {
get: function () {
return this.temp.awbinfo.cnscomidpre
},
set: function (val) {
this.temp.awbinfo.cnscomidpre = val.toUpperCase().trim()
}
}
},
watch: {
'temp.awbinfo.cnscountyr': function (newValue, oldValue) {
if (newValue != null && newValue != '') {
this.selectCountry.countryCode = newValue
getByCountryCode(this.selectCountry).then(res => {
this.temp.awbinfo.cnscomidpre = res.data.dataList[0].enterpriseCode
})
}
},
'temp.awbinfo.shprcountyr': function (newValue, oldValue) {
if (newValue != null && newValue != '') {
this.selectCountry.countryCode = newValue
getByCountryCode(this.selectCountry).then(res => {
this.temp.awbinfo.shpcomidpre = res.data.dataList[0].enterpriseCode
})
}
}
},
methods: {
// >>>>>>>>>>>>>>>>页面加载运行<<<<<<<<<<<<<<<<<<
//获取MT1201列表
getList() {
getMt1201ListForParam(this.listQuery).then(res => {
this.total = res.data.count
this.orgData = res.data.dataList
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
},
//获取城市列表
getCountryList() {
getCountry().then(res => {
this.countryList = res.data.dataList
})
},
// >>>>>>>>>>>>>>>>页面加载运行<<<<<<<<<<<<<<<<<<
message(row) {
this.$message.info(row.event)
},
sortChange(data) {
const {prop, order} = data
if (prop === 'id') {
this.sortByID(order)
}
},
sortByID(order) {
if (order === 'ascending') {
this.listQuery.sort = '+id'
} else {
this.listQuery.sort = '-id'
}
this.handleSearch()
},
handleDownload() {
},
// >>>>>>>>>>>>>>>>批量删除<<<<<<<<<<<<<<<<<<
handleSelectionChange(val) {
this.multipleSelection = val
},
handleDelList() {
const val = this.multipleSelection
if (val) {
val.forEach((val, index) => {
})
}
},
// >>>>>>>>>>>>>>>>搜索<<<<<<<<<<<<<<<<<<
handleSearch() {
this.getList()
},
// >>>>>>>>>>>>>>>>更新数据<<<<<<<<<<<<<<<<<<
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.formData.clearValidate()
})
},
updateData() {
this.$refs.formData.validate(valid => {
if (valid) {
updateMT1201(this.temp).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
this.getList()
Message.success(res.data.respMessage)
} else {
Message.success("数据异常清稍后重试")
}
})
}
})
},
// >>>>>>>>>>>>>>>>客服反馈<<<<<<<<<<<<<<<<<<
handleFeedBack(row) {
this.$message({
message: '操作成功,请前往微信查看',
type: 'success'
})
},
// >>>>>>>>>>>>>>>>重置实体<<<<<<<<<<<<<<<<<<
resetTemp() {
this.temp = {
awba: undefined,
awbh: undefined,
customcode: undefined,
customcode: undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
splitcode: undefined,
awbinfo: {
specopeid: undefined,
shprname: undefined,
shprmobiletype: undefined,
shprtel: undefined,
shpraddress: undefined,
shprcountyr: undefined,
shpcomidpre: undefined,
shpcomidpno: undefined,
cnsnname: undefined,
cnsrmobiletype: undefined,
cnsntel: undefined,
cnsnaddress: undefined,
cnscountyr: undefined,
cnscomidpre: undefined,
cnscomidno: undefined,
cnsrctcname: undefined,
cnsrctctel: undefined,
cargonm: undefined,
sairportid: undefined,
dest1city: undefined,
by1: undefined,
dest1: undefined,
by2: undefined,
dest2: undefined,
by3: undefined,
dest3: undefined,
eairportid: undefined,
csgcustomerid: undefined,
collected: '0'
}
}
},
// >>>>>>>>>>>>>>>>新增数据<<<<<<<<<<<<<<<<<<
handleCreate() {
this.resetTemp()
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.formData.clearValidate()
})
},
createData() {
this.$refs.formData.validate(valid => {
if (valid) {
addMt1201(this.temp).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
this.getList()
Message.success(res.data.respMessage)
} else {
Message.success("数据异常清稍后重试")
}
})
}
})
},
// >>>>>>>>>>>>>>>>下拉远程搜索<<<<<<<<<<<<<<<<<<
remoteMethod(query) {
if (query !== '') {
this.loading = true
setTimeout(() => {
this.loading = false
this.countryOption = this.countryResultList.filter(item => {
return item.value.toUpperCase().trim()
.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 => {
return {value: item.enterpriseCode, label: item.enterpriseCode}
})
})
}
} else {
this.countryOption = []
}
},
// >>>>>>>>>>>>>>>>更新发送状态<<<<<<<<<<<<<<<<<<
handleSwitch(row) {
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
this.$message({
type: 'success',
message: '状态更改成功'
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消状态更改'
: '停留在当前页面'
})
})
},
// >>>>>>>>>>>>>>>>删除<<<<<<<<<<<<<<<<<<
handleDel(index, row) {
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '删除',
cancelButtonText: '取消'
}).then(() => {
deleteByIsDelete(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '删除成功'
})
this.orgData.splice(index, 1)
} else {
this.$message({
type: 'danger',
message: '删除异常,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消删除'
: '停留在当前页面'
})
})
},
// >>>>>>>>>>>>>>>>发送<<<<<<<<<<<<<<<<<<
handleSend(row) {
console.log(row)
},
// >>>>>>>>>>>>>>>>新增分单<<<<<<<<<<<<<<<<<<
handleAddAwbh(row){
const template = Object.assign({}, row) // copy obj
console.log(template)
this.temp.awba = template.awba
this.temp.flightdate = template.flightdate
this.temp.flightno = template.flightno
this.temp.destinationstation = template.destinationstation
this.temp.customcode = template.customcode
this.temp.carrier = template.carrier
this.temp.awbinfo.shprcountyr = template.awbinfo.shprcountyr
this.temp.originstation = template.originstation
this.temp.goodsname = template.goodsname
this.temp.awbinfo.collected = template.awbinfo.collected
this.temp.awbinfo.sairportid = template.awbinfo.sairportid
this.temp.awbinfo.eairportid = template.awbinfo.eairportid
this.temp.awbinfo.ex5 = template.awbinfo.ex5
this.dialogStatus = 'addAwh'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.formData.clearValidate()
})
},
handleRedirct(row){
this.$router.push({name:'预配',params:{scopeRow: row}})
}
}
}
</script>
<style scoped>
.row-bg {
padding: 10px 0;
background-color: #f9fafc;
}
.remark textarea {
width: 575px;
}
.el-dialog-div {
height: 60vh;
overflow: auto;
}
.tags {
margin-top: 10px;
margin-bottom: 10px;
}
.disabledClass {
}
</style>
... ...