Showing
23 changed files
with
2029 additions
and
1370 deletions
| ... | @@ -207,7 +207,6 @@ export default { | ... | @@ -207,7 +207,6 @@ export default { |
| 207 | this.pageNum = this.page; | 207 | this.pageNum = this.page; |
| 208 | } | 208 | } |
| 209 | }, | 209 | }, |
| 210 | - mounted() {}, | ||
| 211 | methods: { | 210 | methods: { |
| 212 | nextClick() { | 211 | nextClick() { |
| 213 | this.$emit("currentChange", { | 212 | this.$emit("currentChange", { |
| ... | @@ -226,7 +225,7 @@ export default { | ... | @@ -226,7 +225,7 @@ export default { |
| 226 | currentChange(val) { | 225 | currentChange(val) { |
| 227 | this.$emit("currentChange", { | 226 | this.$emit("currentChange", { |
| 228 | page: val, | 227 | page: val, |
| 229 | - start: val > 1 ? (val-1) * this.limitSize + 1 : val, | 228 | + start: val > 1 ? (val-1) * this.limitSize + 1 : val, |
| 230 | }); | 229 | }); |
| 231 | scrollTo(0, 800); | 230 | scrollTo(0, 800); |
| 232 | }, | 231 | }, |
| ... | @@ -245,15 +244,15 @@ export default { | ... | @@ -245,15 +244,15 @@ export default { |
| 245 | } else if (selection.includes(this.data[row.index])) { | 244 | } else if (selection.includes(this.data[row.index])) { |
| 246 | if (!selection.includes(this.data[this.start])) { | 245 | if (!selection.includes(this.data[this.start])) { |
| 247 | this.$refs.tables.toggleRowSelection(this.data[this.start], true); | 246 | this.$refs.tables.toggleRowSelection(this.data[this.start], true); |
| 248 | - if(this.selectTable.includes(this.data[this.start])){ | 247 | + if (this.selectTable.includes(this.data[this.start])) { |
| 249 | this.selectTable.push(this.data[this.start]); | 248 | this.selectTable.push(this.data[this.start]); |
| 250 | } | 249 | } |
| 251 | } | 250 | } |
| 252 | for (i = min; i <= sum + min; i++) { | 251 | for (i = min; i <= sum + min; i++) { |
| 253 | this.$refs.tables.toggleRowSelection(this.data[i], true); | 252 | this.$refs.tables.toggleRowSelection(this.data[i], true); |
| 254 | - if(!this.selectTable.includes(this.data[i])){ | 253 | + if (!this.selectTable.includes(this.data[i])) { |
| 255 | this.selectTable.push(this.data[i]); | 254 | this.selectTable.push(this.data[i]); |
| 256 | - } | 255 | + } |
| 257 | } | 256 | } |
| 258 | } else if (!selection.includes(this.data[row.index])) { | 257 | } else if (!selection.includes(this.data[row.index])) { |
| 259 | this.selectTable.splice(min > 1 ? min - 2 : min, sum + 1); | 258 | this.selectTable.splice(min > 1 ? min - 2 : min, sum + 1); |
| ... | @@ -274,7 +273,7 @@ export default { | ... | @@ -274,7 +273,7 @@ export default { |
| 274 | } | 273 | } |
| 275 | } | 274 | } |
| 276 | } | 275 | } |
| 277 | - selection = this.selectTable.sort(this.compare('index','ascending')); | 276 | + selection = this.selectTable.sort(this.compare("index", "ascending")); |
| 278 | this.$emit("tableSelect", { selection, row }); | 277 | this.$emit("tableSelect", { selection, row }); |
| 279 | }, | 278 | }, |
| 280 | tableSelectAll(selection) { | 279 | tableSelectAll(selection) { | ... | ... |
| ... | @@ -22,11 +22,12 @@ | ... | @@ -22,11 +22,12 @@ |
| 22 | trigger="click" | 22 | trigger="click" |
| 23 | > | 23 | > |
| 24 | <div class="avatar-wrapper"> | 24 | <div class="avatar-wrapper"> |
| 25 | - <img :src="avatar" class="user-avatar" /> | 25 | + <img :src="avatar" class="user-avatar"> |
| 26 | </div> | 26 | </div> |
| 27 | <el-dropdown-menu slot="dropdown"> | 27 | <el-dropdown-menu slot="dropdown"> |
| 28 | - <!-- <el-dropdown-item @click.native.stop="drawer = true">个人中心</el-dropdown-item> --> | 28 | + <router-link to="/user/profile"> |
| 29 | - <el-dropdown-item @click.native="logout"> | 29 | + </router-link> |
| 30 | + <el-dropdown-item @click.native="logout"> | ||
| 30 | <span>退出登录</span> | 31 | <span>退出登录</span> |
| 31 | </el-dropdown-item> | 32 | </el-dropdown-item> |
| 32 | </el-dropdown-menu> | 33 | </el-dropdown-menu> | ... | ... |
| 1 | import router from './router' | 1 | import router from './router' |
| 2 | import store from './store' | 2 | import store from './store' |
| 3 | import { Message } from 'element-ui' | 3 | import { Message } from 'element-ui' |
| 4 | -//import NProgress from 'nprogress' | 4 | +import { getToken,setToken } from '@/utils/auth' |
| 5 | -//import 'nprogress/nprogress.css' | ||
| 6 | -import { getToken } from '@/utils/auth' | ||
| 7 | 5 | ||
| 8 | -//NProgress.configure({ showSpinner: false }) | ||
| 9 | 6 | ||
| 10 | const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] | 7 | const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] |
| 11 | 8 | ||
| 12 | router.beforeEach((to, from, next) => { | 9 | router.beforeEach((to, from, next) => { |
| 13 | - //NProgress.start() | ||
| 14 | if (getToken()) { | 10 | if (getToken()) { |
| 15 | /* has token*/ | 11 | /* has token*/ |
| 16 | if (to.path === '/login') { | 12 | if (to.path === '/login') { |
| 17 | next({ path: '/' }) | 13 | next({ path: '/' }) |
| 18 | - //NProgress.done() | ||
| 19 | } else { | 14 | } else { |
| 20 | if (store.getters.roles.length === 0) { | 15 | if (store.getters.roles.length === 0) { |
| 21 | // 判断当前用户是否已拉取完user_info信息 | 16 | // 判断当前用户是否已拉取完user_info信息 |
| ... | @@ -26,9 +21,10 @@ router.beforeEach((to, from, next) => { | ... | @@ -26,9 +21,10 @@ router.beforeEach((to, from, next) => { |
| 26 | next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 | 21 | next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 |
| 27 | }) | 22 | }) |
| 28 | }).catch(err => { | 23 | }).catch(err => { |
| 24 | + Message.error(err) | ||
| 29 | store.dispatch('LogOut').then(() => { | 25 | store.dispatch('LogOut').then(() => { |
| 30 | - Message.error(err) | 26 | + // next({ path: '/' }) |
| 31 | - next({ path: '/' }) | 27 | + window.location.href = "https://testsso.ute.apac.fedex.com/logout";//wsso系统跳转 |
| 32 | }) | 28 | }) |
| 33 | }) | 29 | }) |
| 34 | } else { | 30 | } else { |
| ... | @@ -37,16 +33,22 @@ router.beforeEach((to, from, next) => { | ... | @@ -37,16 +33,22 @@ router.beforeEach((to, from, next) => { |
| 37 | } | 33 | } |
| 38 | } else { | 34 | } else { |
| 39 | // 没有token | 35 | // 没有token |
| 40 | - if (whiteList.indexOf(to.path) !== -1) { | 36 | + //wsso登录时对后端重定向带来的token进行记录 |
| 41 | - // 在免登录白名单,直接进入 | 37 | + let token = location.search.split("token=")[1] |
| 42 | - next() | 38 | + if(token != undefined && token != '' && token != null){ |
| 43 | - } else { | 39 | + setToken(token) |
| 44 | - next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 | 40 | + next({ path: '/' }) |
| 45 | - //NProgress.done() | 41 | + }else{ |
| 42 | + if (whiteList.indexOf(to.path) !== -1) { | ||
| 43 | + // 在免登录白名单,直接进入 | ||
| 44 | + next() | ||
| 45 | + } else { | ||
| 46 | + window.location.href = "https://testsso.ute.apac.fedex.com/logout";//wsso系统跳转 | ||
| 47 | + } | ||
| 46 | } | 48 | } |
| 49 | + | ||
| 47 | } | 50 | } |
| 48 | }) | 51 | }) |
| 49 | 52 | ||
| 50 | router.afterEach(() => { | 53 | router.afterEach(() => { |
| 51 | - //NProgress.done() | ||
| 52 | }) | 54 | }) | ... | ... |
| ... | @@ -5,178 +5,178 @@ | ... | @@ -5,178 +5,178 @@ |
| 5 | 5 | ||
| 6 | const baseURL = process.env.VUE_APP_BASE_API | 6 | const baseURL = process.env.VUE_APP_BASE_API |
| 7 | 7 | ||
| 8 | - // 日期格式化 | ||
| 9 | - export function parseTime(time, pattern) { | ||
| 10 | - //debugger | ||
| 11 | - if (arguments.length === 0 || !time) { | ||
| 12 | - return null | ||
| 13 | - } | ||
| 14 | - const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' | ||
| 15 | - let date | ||
| 16 | - if (typeof time === 'object') { | ||
| 17 | - date = time | ||
| 18 | - } else { | ||
| 19 | - if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { | ||
| 20 | - time = parseInt(time) | ||
| 21 | - } else if (typeof time === 'string') { | ||
| 22 | - time = time.replace(new RegExp(/-/gm), '/'); | ||
| 23 | - } | ||
| 24 | - if ((typeof time === 'number') && (time.toString().length === 10)) { | ||
| 25 | - time = time * 1000 | ||
| 26 | - } | ||
| 27 | - date = new Date(time) | ||
| 28 | - } | ||
| 29 | - const formatObj = { | ||
| 30 | - y: date.getFullYear(), | ||
| 31 | - m: date.getMonth() + 1, | ||
| 32 | - d: date.getDate(), | ||
| 33 | - h: date.getHours(), | ||
| 34 | - i: date.getMinutes(), | ||
| 35 | - s: date.getSeconds(), | ||
| 36 | - a: date.getDay() | ||
| 37 | - } | ||
| 38 | - const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { | ||
| 39 | - let value = formatObj[key] | ||
| 40 | - // Note: getDay() returns 0 on Sunday | ||
| 41 | - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } | ||
| 42 | - if (result.length > 0 && value < 10) { | ||
| 43 | - value = '0' + value | ||
| 44 | - } | ||
| 45 | - return value || 0 | ||
| 46 | - }) | ||
| 47 | - return time_str | ||
| 48 | - } | ||
| 49 | - | ||
| 50 | - // 表单重置 | ||
| 51 | - export function resetForm(refName) { | ||
| 52 | - if (this.$refs[refName]) { | ||
| 53 | - this.$refs[refName].resetFields(); | ||
| 54 | - } | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - // 添加日期范围 | ||
| 58 | - export function addDateRange(params, dateRange, propName) { | ||
| 59 | - var search = params; | ||
| 60 | - search.params = {}; | ||
| 61 | - if (null != dateRange && '' != dateRange) { | ||
| 62 | - if (typeof (propName) === "undefined") { | ||
| 63 | - search.params["beginTime"] = dateRange[0]; | ||
| 64 | - search.params["endTime"] = dateRange[1]; | ||
| 65 | - } else { | ||
| 66 | - search.params["begin" + propName] = dateRange[0]; | ||
| 67 | - search.params["end" + propName] = dateRange[1]; | ||
| 68 | - } | ||
| 69 | - } | ||
| 70 | - return search; | ||
| 71 | - } | ||
| 72 | - | ||
| 73 | - // 回显数据字典 | ||
| 74 | - export function selectDictLabel(datas, value) { | ||
| 75 | - var actions = []; | ||
| 76 | - Object.keys(datas).some((key) => { | ||
| 77 | - if (datas[key].dictValue == ('' + value)) { | ||
| 78 | - actions.push(datas[key].dictLabel); | ||
| 79 | - return true; | ||
| 80 | - } | ||
| 81 | - }) | ||
| 82 | - return actions.join(''); | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - // 回显数据字典(字符串数组) | ||
| 86 | - export function selectDictLabels(datas, value, separator) { | ||
| 87 | - var actions = []; | ||
| 88 | - var currentSeparator = undefined === separator ? "," : separator; | ||
| 89 | - var temp = value.split(currentSeparator); | ||
| 90 | - Object.keys(value.split(currentSeparator)).some((val) => { | ||
| 91 | - Object.keys(datas).some((key) => { | ||
| 92 | - if (datas[key].dictValue == ('' + temp[val])) { | ||
| 93 | - actions.push(datas[key].dictLabel + currentSeparator); | ||
| 94 | - } | ||
| 95 | - }) | ||
| 96 | - }) | ||
| 97 | - return actions.join('').substring(0, actions.join('').length - 1); | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - // 通用下载方法 | ||
| 101 | - export function download(fileName) { | ||
| 102 | - window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; | ||
| 103 | - } | ||
| 104 | - | ||
| 105 | - // 字符串格式化(%s ) | ||
| 106 | - export function sprintf(str) { | ||
| 107 | - var args = arguments, flag = true, i = 1; | ||
| 108 | - str = str.replace(/%s/g, function () { | ||
| 109 | - var arg = args[i++]; | ||
| 110 | - if (typeof arg === 'undefined') { | ||
| 111 | - flag = false; | ||
| 112 | - return ''; | ||
| 113 | - } | ||
| 114 | - return arg; | ||
| 115 | - }); | ||
| 116 | - return flag ? str : ''; | ||
| 117 | - } | ||
| 118 | - | ||
| 119 | - // 转换字符串,undefined,null等转化为"" | ||
| 120 | - export function praseStrEmpty(str) { | ||
| 121 | - if (!str || str == "undefined" || str == "null") { | ||
| 122 | - return ""; | ||
| 123 | - } | ||
| 124 | - return str; | ||
| 125 | - } | ||
| 126 | - | ||
| 127 | - /** | ||
| 128 | - * 构造树型结构数据 | ||
| 129 | - * @param {*} data 数据源 | ||
| 130 | - * @param {*} id id字段 默认 'id' | ||
| 131 | - * @param {*} parentId 父节点字段 默认 'parentId' | ||
| 132 | - * @param {*} children 孩子节点字段 默认 'children' | ||
| 133 | - */ | ||
| 134 | - export function handleTree(data, id, parentId, children) { | ||
| 135 | - let config = { | ||
| 136 | - id: id || 'id', | ||
| 137 | - parentId: parentId || 'parentId', | ||
| 138 | - childrenList: children || 'children' | ||
| 139 | - }; | ||
| 140 | - | ||
| 141 | - var childrenListMap = {}; | ||
| 142 | - var nodeIds = {}; | ||
| 143 | - var tree = []; | ||
| 144 | - | ||
| 145 | - for (let d of data) { | ||
| 146 | - let parentId = d[config.parentId]; | ||
| 147 | - if (childrenListMap[parentId] == null) { | ||
| 148 | - childrenListMap[parentId] = []; | ||
| 149 | - } | ||
| 150 | - nodeIds[d[config.id]] = d; | ||
| 151 | - childrenListMap[parentId].push(d); | ||
| 152 | - } | ||
| 153 | - | ||
| 154 | - for (let d of data) { | ||
| 155 | - let parentId = d[config.parentId]; | ||
| 156 | - if (nodeIds[parentId] == null) { | ||
| 157 | - tree.push(d); | ||
| 158 | - } | ||
| 159 | - } | ||
| 160 | - | ||
| 161 | - for (let t of tree) { | ||
| 162 | - adaptToChildrenList(t); | ||
| 163 | - } | ||
| 164 | - | ||
| 165 | - function adaptToChildrenList(o) { | ||
| 166 | - if (childrenListMap[o[config.id]] !== null) { | ||
| 167 | - o[config.childrenList] = childrenListMap[o[config.id]]; | ||
| 168 | - } | ||
| 169 | - if (o[config.childrenList]) { | ||
| 170 | - for (let c of o[config.childrenList]) { | ||
| 171 | - adaptToChildrenList(c); | ||
| 172 | - } | ||
| 173 | - } | ||
| 174 | - } | ||
| 175 | - return tree; | ||
| 176 | - } | ||
| 177 | - | ||
| 178 | - //字符串英文转大写,;转英文; | ||
| 179 | - export function upCase(str){ | ||
| 180 | - let newStr = str.replace(/;/g,";").toUpperCase(); | ||
| 181 | - return newStr; | ||
| 182 | - } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 8 | +// 日期格式化 | ||
| 9 | +export function parseTime(time, pattern) { | ||
| 10 | + debugger | ||
| 11 | + if (arguments.length === 0 || !time) { | ||
| 12 | + return null | ||
| 13 | + } | ||
| 14 | + const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' | ||
| 15 | + let date | ||
| 16 | + if (typeof time === 'object') { | ||
| 17 | + date = time | ||
| 18 | + } else { | ||
| 19 | + if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { | ||
| 20 | + time = parseInt(time) | ||
| 21 | + } else if (typeof time === 'string') { | ||
| 22 | + time = time.replace(new RegExp(/-/gm), '/'); | ||
| 23 | + } | ||
| 24 | + if ((typeof time === 'number') && (time.toString().length === 10)) { | ||
| 25 | + time = time * 1000 | ||
| 26 | + } | ||
| 27 | + date = new Date(time) | ||
| 28 | + } | ||
| 29 | + const formatObj = { | ||
| 30 | + y: date.getFullYear(), | ||
| 31 | + m: date.getMonth() + 1, | ||
| 32 | + d: date.getDate(), | ||
| 33 | + h: date.getHours(), | ||
| 34 | + i: date.getMinutes(), | ||
| 35 | + s: date.getSeconds(), | ||
| 36 | + a: date.getDay() | ||
| 37 | + } | ||
| 38 | + const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { | ||
| 39 | + let value = formatObj[key] | ||
| 40 | + // Note: getDay() returns 0 on Sunday | ||
| 41 | + if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } | ||
| 42 | + if (result.length > 0 && value < 10) { | ||
| 43 | + value = '0' + value | ||
| 44 | + } | ||
| 45 | + return value || 0 | ||
| 46 | + }) | ||
| 47 | + return time_str | ||
| 48 | +} | ||
| 49 | + | ||
| 50 | +// 表单重置 | ||
| 51 | +export function resetForm(refName) { | ||
| 52 | + if (this.$refs[refName]) { | ||
| 53 | + this.$refs[refName].resetFields(); | ||
| 54 | + } | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +// 添加日期范围 | ||
| 58 | +export function addDateRange(params, dateRange, propName) { | ||
| 59 | + var search = params; | ||
| 60 | + search.params = {}; | ||
| 61 | + if (null != dateRange && '' != dateRange) { | ||
| 62 | + if (typeof (propName) === "undefined") { | ||
| 63 | + search.params["beginTime"] = dateRange[0]; | ||
| 64 | + search.params["endTime"] = dateRange[1]; | ||
| 65 | + } else { | ||
| 66 | + search.params["begin" + propName] = dateRange[0]; | ||
| 67 | + search.params["end" + propName] = dateRange[1]; | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + return search; | ||
| 71 | +} | ||
| 72 | + | ||
| 73 | +// 回显数据字典 | ||
| 74 | +export function selectDictLabel(datas, value) { | ||
| 75 | + var actions = []; | ||
| 76 | + Object.keys(datas).some((key) => { | ||
| 77 | + if (datas[key].dictValue == ('' + value)) { | ||
| 78 | + actions.push(datas[key].dictLabel); | ||
| 79 | + return true; | ||
| 80 | + } | ||
| 81 | + }) | ||
| 82 | + return actions.join(''); | ||
| 83 | +} | ||
| 84 | + | ||
| 85 | +// 回显数据字典(字符串数组) | ||
| 86 | +export function selectDictLabels(datas, value, separator) { | ||
| 87 | + var actions = []; | ||
| 88 | + var currentSeparator = undefined === separator ? "," : separator; | ||
| 89 | + var temp = value.split(currentSeparator); | ||
| 90 | + Object.keys(value.split(currentSeparator)).some((val) => { | ||
| 91 | + Object.keys(datas).some((key) => { | ||
| 92 | + if (datas[key].dictValue == ('' + temp[val])) { | ||
| 93 | + actions.push(datas[key].dictLabel + currentSeparator); | ||
| 94 | + } | ||
| 95 | + }) | ||
| 96 | + }) | ||
| 97 | + return actions.join('').substring(0, actions.join('').length - 1); | ||
| 98 | +} | ||
| 99 | + | ||
| 100 | +// 通用下载方法 | ||
| 101 | +export function download(fileName) { | ||
| 102 | + window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; | ||
| 103 | +} | ||
| 104 | + | ||
| 105 | +// 字符串格式化(%s ) | ||
| 106 | +export function sprintf(str) { | ||
| 107 | + var args = arguments, flag = true, i = 1; | ||
| 108 | + str = str.replace(/%s/g, function () { | ||
| 109 | + var arg = args[i++]; | ||
| 110 | + if (typeof arg === 'undefined') { | ||
| 111 | + flag = false; | ||
| 112 | + return ''; | ||
| 113 | + } | ||
| 114 | + return arg; | ||
| 115 | + }); | ||
| 116 | + return flag ? str : ''; | ||
| 117 | +} | ||
| 118 | + | ||
| 119 | +// 转换字符串,undefined,null等转化为"" | ||
| 120 | +export function praseStrEmpty(str) { | ||
| 121 | + if (!str || str == "undefined" || str == "null") { | ||
| 122 | + return ""; | ||
| 123 | + } | ||
| 124 | + return str; | ||
| 125 | +} | ||
| 126 | + | ||
| 127 | +/** | ||
| 128 | + * 构造树型结构数据 | ||
| 129 | + * @param {*} data 数据源 | ||
| 130 | + * @param {*} id id字段 默认 'id' | ||
| 131 | + * @param {*} parentId 父节点字段 默认 'parentId' | ||
| 132 | + * @param {*} children 孩子节点字段 默认 'children' | ||
| 133 | + */ | ||
| 134 | +export function handleTree(data, id, parentId, children) { | ||
| 135 | + let config = { | ||
| 136 | + id: id || 'id', | ||
| 137 | + parentId: parentId || 'parentId', | ||
| 138 | + childrenList: children || 'children' | ||
| 139 | + }; | ||
| 140 | + | ||
| 141 | + var childrenListMap = {}; | ||
| 142 | + var nodeIds = {}; | ||
| 143 | + var tree = []; | ||
| 144 | + | ||
| 145 | + for (let d of data) { | ||
| 146 | + let parentId = d[config.parentId]; | ||
| 147 | + if (childrenListMap[parentId] == null) { | ||
| 148 | + childrenListMap[parentId] = []; | ||
| 149 | + } | ||
| 150 | + nodeIds[d[config.id]] = d; | ||
| 151 | + childrenListMap[parentId].push(d); | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + for (let d of data) { | ||
| 155 | + let parentId = d[config.parentId]; | ||
| 156 | + if (nodeIds[parentId] == null) { | ||
| 157 | + tree.push(d); | ||
| 158 | + } | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + for (let t of tree) { | ||
| 162 | + adaptToChildrenList(t); | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + function adaptToChildrenList(o) { | ||
| 166 | + if (childrenListMap[o[config.id]] !== null) { | ||
| 167 | + o[config.childrenList] = childrenListMap[o[config.id]]; | ||
| 168 | + } | ||
| 169 | + if (o[config.childrenList]) { | ||
| 170 | + for (let c of o[config.childrenList]) { | ||
| 171 | + adaptToChildrenList(c); | ||
| 172 | + } | ||
| 173 | + } | ||
| 174 | + } | ||
| 175 | + return tree; | ||
| 176 | +} | ||
| 177 | + | ||
| 178 | +//字符串英文转大写,;转英文; | ||
| 179 | +export function upCase(str){ | ||
| 180 | + let newStr = str.replace(/;/g,";").toUpperCase().trim(); | ||
| 181 | + return newStr; | ||
| 182 | +} | ... | ... |
| 1 | import axios from 'axios' | 1 | import axios from 'axios' |
| 2 | -import { Message, MessageBox } from 'element-ui' | 2 | +import { Message,MessageBox } from 'element-ui' |
| 3 | import store from '@/store' | 3 | import store from '@/store' |
| 4 | -import { getToken, setToken } from '@/utils/auth' | 4 | +import { getToken,setToken } from '@/utils/auth' |
| 5 | import errorCode from '@/utils/errorCode' | 5 | import errorCode from '@/utils/errorCode' |
| 6 | 6 | ||
| 7 | axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' | 7 | axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' |
| ... | @@ -54,7 +54,7 @@ service.interceptors.request.use(config => { | ... | @@ -54,7 +54,7 @@ service.interceptors.request.use(config => { |
| 54 | // 响应拦截器 | 54 | // 响应拦截器 |
| 55 | service.interceptors.response.use(res => { | 55 | service.interceptors.response.use(res => { |
| 56 | if(res.headers['token']){ | 56 | if(res.headers['token']){ |
| 57 | - setToken(decodeURI(res.headers['token'])) | 57 | + setToken(decodeURIComponent(res.headers['token'])) |
| 58 | } | 58 | } |
| 59 | // 未设置状态码则默认成功状态 | 59 | // 未设置状态码则默认成功状态 |
| 60 | const code = res.data.code || 200; | 60 | const code = res.data.code || 200; |
| ... | @@ -81,7 +81,7 @@ service.interceptors.response.use(res => { | ... | @@ -81,7 +81,7 @@ service.interceptors.response.use(res => { |
| 81 | type: 'error' | 81 | type: 'error' |
| 82 | }) | 82 | }) |
| 83 | return Promise.reject(new Error(msg)) | 83 | return Promise.reject(new Error(msg)) |
| 84 | - } else if (code !== 200 && code !== 201 && code !== 202) { | 84 | + } else if (code !== 200 && code !== 201 && code !== 202 && code !== 603) { |
| 85 | Message({ | 85 | Message({ |
| 86 | message: msg, | 86 | message: msg, |
| 87 | type: 'error' | 87 | type: 'error' | ... | ... |
| ... | @@ -19,6 +19,7 @@ | ... | @@ -19,6 +19,7 @@ |
| 19 | end-placeholder="结束日期" | 19 | end-placeholder="结束日期" |
| 20 | v-model="fltDate" | 20 | v-model="fltDate" |
| 21 | :value-format="valueFormat" | 21 | :value-format="valueFormat" |
| 22 | + clearable | ||
| 22 | > | 23 | > |
| 23 | </el-date-picker> | 24 | </el-date-picker> |
| 24 | </el-form-item> | 25 | </el-form-item> |
| ... | @@ -79,6 +80,7 @@ | ... | @@ -79,6 +80,7 @@ |
| 79 | placeholder="请输入运单号(回车分割)" | 80 | placeholder="请输入运单号(回车分割)" |
| 80 | :autosize="true" | 81 | :autosize="true" |
| 81 | v-model="formData.waybillNo" | 82 | v-model="formData.waybillNo" |
| 83 | + clearable | ||
| 82 | ></el-input> | 84 | ></el-input> |
| 83 | </el-form-item> | 85 | </el-form-item> |
| 84 | </el-col> | 86 | </el-col> |
| ... | @@ -126,6 +128,7 @@ | ... | @@ -126,6 +128,7 @@ |
| 126 | placeholder="S_;P_;E2" | 128 | placeholder="S_;P_;E2" |
| 127 | v-model="ursa" | 129 | v-model="ursa" |
| 128 | :autosize="true" | 130 | :autosize="true" |
| 131 | + clearable | ||
| 129 | ></el-input> | 132 | ></el-input> |
| 130 | </el-form-item> | 133 | </el-form-item> |
| 131 | </el-col> | 134 | </el-col> |
| ... | @@ -137,6 +140,7 @@ | ... | @@ -137,6 +140,7 @@ |
| 137 | placeholder="PVG;PEK" | 140 | placeholder="PVG;PEK" |
| 138 | v-model="siteName" | 141 | v-model="siteName" |
| 139 | :autosize="true" | 142 | :autosize="true" |
| 143 | + clearable | ||
| 140 | ></el-input> | 144 | ></el-input> |
| 141 | </el-form-item> | 145 | </el-form-item> |
| 142 | </el-col> | 146 | </el-col> |
| ... | @@ -192,24 +196,6 @@ | ... | @@ -192,24 +196,6 @@ |
| 192 | </el-row> | 196 | </el-row> |
| 193 | </el-form-item> | 197 | </el-form-item> |
| 194 | </el-col> | 198 | </el-col> |
| 195 | - <!-- <el-col :span="6"> | ||
| 196 | - <el-form-item label="航班类型"> | ||
| 197 | - <el-select | ||
| 198 | - placeholder="不限" | ||
| 199 | - v-model="formData.kindToAllocFlightId" | ||
| 200 | - class="formItem" | ||
| 201 | - clearable | ||
| 202 | - > | ||
| 203 | - <el-option | ||
| 204 | - v-for="item in selectData.fltTypes" | ||
| 205 | - :label="item.chineseName" | ||
| 206 | - v-model="item.id" | ||
| 207 | - :key="item.id" | ||
| 208 | - > | ||
| 209 | - </el-option> | ||
| 210 | - </el-select> | ||
| 211 | - </el-form-item> | ||
| 212 | - </el-col> --> | ||
| 213 | <el-col :span="6"> | 199 | <el-col :span="6"> |
| 214 | <el-form-item label="取件日期"> | 200 | <el-form-item label="取件日期"> |
| 215 | <el-date-picker | 201 | <el-date-picker |
| ... | @@ -217,6 +203,7 @@ | ... | @@ -217,6 +203,7 @@ |
| 217 | type="date" | 203 | type="date" |
| 218 | placeholder="选择日期" | 204 | placeholder="选择日期" |
| 219 | :value-format="valueFormat" | 205 | :value-format="valueFormat" |
| 206 | + clearable | ||
| 220 | > | 207 | > |
| 221 | </el-date-picker> | 208 | </el-date-picker> |
| 222 | </el-form-item> | 209 | </el-form-item> |
| ... | @@ -338,7 +325,6 @@ | ... | @@ -338,7 +325,6 @@ |
| 338 | import Dialog from "./info.vue"; | 325 | import Dialog from "./info.vue"; |
| 339 | import { findConditionData, findCargoAllocationData } from "@/api/cargoSelect"; | 326 | import { findConditionData, findCargoAllocationData } from "@/api/cargoSelect"; |
| 340 | import { allDictData } from "@/api/destinationFlight"; | 327 | import { allDictData } from "@/api/destinationFlight"; |
| 341 | -// import { findFltConditionDataApi } from "@/api/findAllFltData"; | ||
| 342 | import { downLoadXlsx } from "@/utils/zipdownload"; | 328 | import { downLoadXlsx } from "@/utils/zipdownload"; |
| 343 | import { upCase } from "@/utils/FedEx"; | 329 | import { upCase } from "@/utils/FedEx"; |
| 344 | 330 | ||
| ... | @@ -379,6 +365,7 @@ export default { | ... | @@ -379,6 +365,7 @@ export default { |
| 379 | align: "center", | 365 | align: "center", |
| 380 | sorTable: false, | 366 | sorTable: false, |
| 381 | fixed: true, | 367 | fixed: true, |
| 368 | + disabled:true | ||
| 382 | }, | 369 | }, |
| 383 | { | 370 | { |
| 384 | type: "index", | 371 | type: "index", |
| ... | @@ -388,96 +375,107 @@ export default { | ... | @@ -388,96 +375,107 @@ export default { |
| 388 | align: "center", | 375 | align: "center", |
| 389 | sorTable: false, | 376 | sorTable: false, |
| 390 | fixed: false, | 377 | fixed: false, |
| 378 | + disabled:true | ||
| 391 | }, | 379 | }, |
| 392 | { | 380 | { |
| 393 | type: "", | 381 | type: "", |
| 394 | name: "口岸代码", | 382 | name: "口岸代码", |
| 395 | value: "portName", | 383 | value: "portName", |
| 396 | - width: "150", | 384 | + width: "100", |
| 397 | align: "center", | 385 | align: "center", |
| 398 | sorTable: true, | 386 | sorTable: true, |
| 399 | fixed: false, | 387 | fixed: false, |
| 388 | + disabled:true | ||
| 400 | }, | 389 | }, |
| 401 | { | 390 | { |
| 402 | type: "", | 391 | type: "", |
| 403 | name: "取件日期", | 392 | name: "取件日期", |
| 404 | value: "pickUpDate", | 393 | value: "pickUpDate", |
| 405 | - width: "150", | 394 | + width: "120", |
| 406 | align: "center", | 395 | align: "center", |
| 407 | sorTable: true, | 396 | sorTable: true, |
| 408 | fixed: false, | 397 | fixed: false, |
| 398 | + disabled:true | ||
| 409 | }, | 399 | }, |
| 410 | { | 400 | { |
| 411 | type: "", | 401 | type: "", |
| 412 | name: "取件扫描号", | 402 | name: "取件扫描号", |
| 413 | value: "pickUpScanNo", | 403 | value: "pickUpScanNo", |
| 414 | - width: "150", | 404 | + width: "120", |
| 415 | align: "center", | 405 | align: "center", |
| 416 | sorTable: true, | 406 | sorTable: true, |
| 417 | fixed: false, | 407 | fixed: false, |
| 408 | + disabled:true | ||
| 418 | }, | 409 | }, |
| 419 | { | 410 | { |
| 420 | type: "", | 411 | type: "", |
| 421 | name: "站点", | 412 | name: "站点", |
| 422 | value: "siteName", | 413 | value: "siteName", |
| 423 | - width: "150", | 414 | + width: "80", |
| 424 | align: "center", | 415 | align: "center", |
| 425 | sorTable: true, | 416 | sorTable: true, |
| 426 | fixed: false, | 417 | fixed: false, |
| 418 | + disabled:true | ||
| 427 | }, | 419 | }, |
| 428 | { | 420 | { |
| 429 | type: "", | 421 | type: "", |
| 430 | name: "运单号", | 422 | name: "运单号", |
| 431 | value: "waybillNo", | 423 | value: "waybillNo", |
| 432 | - width: "150", | 424 | + width: "120", |
| 433 | align: "center", | 425 | align: "center", |
| 434 | sorTable: true, | 426 | sorTable: true, |
| 435 | fixed: false, | 427 | fixed: false, |
| 428 | + disabled:true | ||
| 436 | }, | 429 | }, |
| 437 | { | 430 | { |
| 438 | type: "", | 431 | type: "", |
| 439 | name: "总单号", | 432 | name: "总单号", |
| 440 | value: "totalWaybillNo", | 433 | value: "totalWaybillNo", |
| 441 | - width: "150", | 434 | + width: "120", |
| 442 | align: "center", | 435 | align: "center", |
| 443 | sorTable: true, | 436 | sorTable: true, |
| 444 | fixed: false, | 437 | fixed: false, |
| 438 | + disabled:true | ||
| 445 | }, | 439 | }, |
| 446 | { | 440 | { |
| 447 | type: "", | 441 | type: "", |
| 448 | name: "服务类型", | 442 | name: "服务类型", |
| 449 | value: "serviceTypeName", | 443 | value: "serviceTypeName", |
| 450 | - width: "150", | 444 | + width: "100", |
| 451 | align: "center", | 445 | align: "center", |
| 452 | sorTable: true, | 446 | sorTable: true, |
| 453 | fixed: false, | 447 | fixed: false, |
| 448 | + disabled:true | ||
| 454 | }, | 449 | }, |
| 455 | { | 450 | { |
| 456 | type: "", | 451 | type: "", |
| 457 | name: "服务代码", | 452 | name: "服务代码", |
| 458 | value: "serviceCode", | 453 | value: "serviceCode", |
| 459 | - width: "150", | 454 | + width: "100", |
| 460 | align: "center", | 455 | align: "center", |
| 461 | sorTable: false, | 456 | sorTable: false, |
| 462 | - fixed:false, | 457 | + fixed: false, |
| 458 | + disabled:true | ||
| 463 | }, | 459 | }, |
| 464 | { | 460 | { |
| 465 | type: "", | 461 | type: "", |
| 466 | name: "URSA", | 462 | name: "URSA", |
| 467 | value: "ursa", | 463 | value: "ursa", |
| 468 | - width: "150", | 464 | + width: "100", |
| 469 | align: "center", | 465 | align: "center", |
| 470 | sorTable: true, | 466 | sorTable: true, |
| 471 | fixed: false, | 467 | fixed: false, |
| 468 | + disabled:true | ||
| 472 | }, | 469 | }, |
| 473 | { | 470 | { |
| 474 | type: "", | 471 | type: "", |
| 475 | name: "申报类型", | 472 | name: "申报类型", |
| 476 | value: "typeName", | 473 | value: "typeName", |
| 477 | - width: "150", | 474 | + width: "100", |
| 478 | align: "center", | 475 | align: "center", |
| 479 | sorTable: true, | 476 | sorTable: true, |
| 480 | fixed: false, | 477 | fixed: false, |
| 478 | + disabled:true | ||
| 481 | }, | 479 | }, |
| 482 | { | 480 | { |
| 483 | type: "", | 481 | type: "", |
| ... | @@ -487,33 +485,37 @@ export default { | ... | @@ -487,33 +485,37 @@ export default { |
| 487 | align: "center", | 485 | align: "center", |
| 488 | sorTable: true, | 486 | sorTable: true, |
| 489 | fixed: false, | 487 | fixed: false, |
| 488 | + disabled:true | ||
| 490 | }, | 489 | }, |
| 491 | { | 490 | { |
| 492 | type: "", | 491 | type: "", |
| 493 | name: "subcategory", | 492 | name: "subcategory", |
| 494 | value: "subCategory", | 493 | value: "subCategory", |
| 495 | - width: "150", | 494 | + width: "140", |
| 496 | align: "center", | 495 | align: "center", |
| 497 | sorTable: true, | 496 | sorTable: true, |
| 498 | fixed: false, | 497 | fixed: false, |
| 498 | + disabled:true | ||
| 499 | }, | 499 | }, |
| 500 | { | 500 | { |
| 501 | type: "", | 501 | type: "", |
| 502 | name: "件数", | 502 | name: "件数", |
| 503 | value: "qty", | 503 | value: "qty", |
| 504 | - width: "150", | 504 | + width: "80", |
| 505 | align: "center", | 505 | align: "center", |
| 506 | sorTable: true, | 506 | sorTable: true, |
| 507 | fixed: false, | 507 | fixed: false, |
| 508 | + disabled:true | ||
| 508 | }, | 509 | }, |
| 509 | { | 510 | { |
| 510 | type: "", | 511 | type: "", |
| 511 | name: "实际重量", | 512 | name: "实际重量", |
| 512 | value: "actualWeight", | 513 | value: "actualWeight", |
| 513 | - width: "150", | 514 | + width: "100", |
| 514 | align: "center", | 515 | align: "center", |
| 515 | sorTable: true, | 516 | sorTable: true, |
| 516 | fixed: false, | 517 | fixed: false, |
| 518 | + disabled:true | ||
| 517 | }, | 519 | }, |
| 518 | { | 520 | { |
| 519 | type: "", | 521 | type: "", |
| ... | @@ -523,78 +525,87 @@ export default { | ... | @@ -523,78 +525,87 @@ export default { |
| 523 | align: "center", | 525 | align: "center", |
| 524 | sorTable: true, | 526 | sorTable: true, |
| 525 | fixed: false, | 527 | fixed: false, |
| 528 | + disabled:true | ||
| 526 | }, | 529 | }, |
| 527 | { | 530 | { |
| 528 | type: "", | 531 | type: "", |
| 529 | name: "品名描述", | 532 | name: "品名描述", |
| 530 | value: "nameDescription", | 533 | value: "nameDescription", |
| 531 | - width: "150", | 534 | + width: "100", |
| 532 | align: "center", | 535 | align: "center", |
| 533 | sorTable: false, | 536 | sorTable: false, |
| 534 | fixed: false, | 537 | fixed: false, |
| 538 | + disabled:true | ||
| 535 | }, | 539 | }, |
| 536 | { | 540 | { |
| 537 | type: "", | 541 | type: "", |
| 538 | name: "海关回执状态", | 542 | name: "海关回执状态", |
| 539 | value: "customsReceiptStatusName", | 543 | value: "customsReceiptStatusName", |
| 540 | - width: "150", | 544 | + width: "140", |
| 541 | align: "center", | 545 | align: "center", |
| 542 | sorTable: true, | 546 | sorTable: true, |
| 543 | fixed: false, | 547 | fixed: false, |
| 548 | + disabled:true | ||
| 544 | }, | 549 | }, |
| 545 | { | 550 | { |
| 546 | type: "", | 551 | type: "", |
| 547 | name: "预审状态", | 552 | name: "预审状态", |
| 548 | value: "preQualificationStatus", | 553 | value: "preQualificationStatus", |
| 549 | - width: "150", | 554 | + width: "100", |
| 550 | align: "center", | 555 | align: "center", |
| 551 | sorTable: true, | 556 | sorTable: true, |
| 552 | fixed: false, | 557 | fixed: false, |
| 558 | + disabled:true | ||
| 553 | }, | 559 | }, |
| 554 | { | 560 | { |
| 555 | type: "", | 561 | type: "", |
| 556 | name: "航班预审意见", | 562 | name: "航班预审意见", |
| 557 | value: "caPretrialOpinion", | 563 | value: "caPretrialOpinion", |
| 558 | - width: "150", | 564 | + width: "120", |
| 559 | align: "center", | 565 | align: "center", |
| 560 | sorTable: false, | 566 | sorTable: false, |
| 561 | fixed: false, | 567 | fixed: false, |
| 568 | + disabled:true | ||
| 562 | }, | 569 | }, |
| 563 | { | 570 | { |
| 564 | type: "", | 571 | type: "", |
| 565 | name: "货物状态", | 572 | name: "货物状态", |
| 566 | value: "statusName", | 573 | value: "statusName", |
| 567 | - width: "150", | 574 | + width: "100", |
| 568 | align: "center", | 575 | align: "center", |
| 569 | sorTable: true, | 576 | sorTable: true, |
| 570 | fixed: false, | 577 | fixed: false, |
| 578 | + disabled:true | ||
| 571 | }, | 579 | }, |
| 572 | { | 580 | { |
| 573 | type: "", | 581 | type: "", |
| 574 | name: "终配航班号", | 582 | name: "终配航班号", |
| 575 | value: "finalFlightNo", | 583 | value: "finalFlightNo", |
| 576 | - width: "150", | 584 | + width: "120", |
| 577 | align: "center", | 585 | align: "center", |
| 578 | sorTable: true, | 586 | sorTable: true, |
| 579 | fixed: false, | 587 | fixed: false, |
| 588 | + disabled:true | ||
| 580 | }, | 589 | }, |
| 581 | { | 590 | { |
| 582 | type: "", | 591 | type: "", |
| 583 | name: "终配航班日期", | 592 | name: "终配航班日期", |
| 584 | value: "finalFlightTime", | 593 | value: "finalFlightTime", |
| 585 | - width: "150", | 594 | + width: "140", |
| 586 | align: "center", | 595 | align: "center", |
| 587 | sorTable: true, | 596 | sorTable: true, |
| 588 | fixed: false, | 597 | fixed: false, |
| 598 | + disabled:true | ||
| 589 | }, | 599 | }, |
| 590 | { | 600 | { |
| 591 | type: "", | 601 | type: "", |
| 592 | name: "二配航班号", | 602 | name: "二配航班号", |
| 593 | value: "twoMatchFlightNo", | 603 | value: "twoMatchFlightNo", |
| 594 | - width: "150", | 604 | + width: "120", |
| 595 | align: "center", | 605 | align: "center", |
| 596 | sorTable: true, | 606 | sorTable: true, |
| 597 | fixed: false, | 607 | fixed: false, |
| 608 | + disabled:true | ||
| 598 | }, | 609 | }, |
| 599 | { | 610 | { |
| 600 | type: "", | 611 | type: "", |
| ... | @@ -604,15 +615,17 @@ export default { | ... | @@ -604,15 +615,17 @@ export default { |
| 604 | align: "center", | 615 | align: "center", |
| 605 | sorTable: true, | 616 | sorTable: true, |
| 606 | fixed: false, | 617 | fixed: false, |
| 618 | + disabled:true | ||
| 607 | }, | 619 | }, |
| 608 | { | 620 | { |
| 609 | type: "", | 621 | type: "", |
| 610 | name: "预配航班号", | 622 | name: "预配航班号", |
| 611 | value: "preplanFlightNo", | 623 | value: "preplanFlightNo", |
| 612 | - width: "150", | 624 | + width: "120", |
| 613 | align: "center", | 625 | align: "center", |
| 614 | sorTable: true, | 626 | sorTable: true, |
| 615 | fixed: false, | 627 | fixed: false, |
| 628 | + disabled:true | ||
| 616 | }, | 629 | }, |
| 617 | { | 630 | { |
| 618 | type: "", | 631 | type: "", |
| ... | @@ -622,6 +635,7 @@ export default { | ... | @@ -622,6 +635,7 @@ export default { |
| 622 | align: "center", | 635 | align: "center", |
| 623 | sorTable: true, | 636 | sorTable: true, |
| 624 | fixed: false, | 637 | fixed: false, |
| 638 | + disabled:true | ||
| 625 | }, | 639 | }, |
| 626 | { | 640 | { |
| 627 | type: "", | 641 | type: "", |
| ... | @@ -631,6 +645,7 @@ export default { | ... | @@ -631,6 +645,7 @@ export default { |
| 631 | align: "center", | 645 | align: "center", |
| 632 | sorTable: true, | 646 | sorTable: true, |
| 633 | fixed: false, | 647 | fixed: false, |
| 648 | + disabled:true | ||
| 634 | }, | 649 | }, |
| 635 | { | 650 | { |
| 636 | type: "", | 651 | type: "", |
| ... | @@ -640,15 +655,17 @@ export default { | ... | @@ -640,15 +655,17 @@ export default { |
| 640 | align: "center", | 655 | align: "center", |
| 641 | sorTable: true, | 656 | sorTable: true, |
| 642 | fixed: false, | 657 | fixed: false, |
| 658 | + disabled:true | ||
| 643 | }, | 659 | }, |
| 644 | { | 660 | { |
| 645 | type: "", | 661 | type: "", |
| 646 | name: "ACCS原航线", | 662 | name: "ACCS原航线", |
| 647 | value: "accsFlightRoute", | 663 | value: "accsFlightRoute", |
| 648 | - width: "150", | 664 | + width: "140", |
| 649 | align: "center", | 665 | align: "center", |
| 650 | sorTable: true, | 666 | sorTable: true, |
| 651 | fixed: false, | 667 | fixed: false, |
| 668 | + disabled:true | ||
| 652 | }, | 669 | }, |
| 653 | { | 670 | { |
| 654 | type: "", | 671 | type: "", |
| ... | @@ -658,24 +675,27 @@ export default { | ... | @@ -658,24 +675,27 @@ export default { |
| 658 | align: "center", | 675 | align: "center", |
| 659 | sorTable: true, | 676 | sorTable: true, |
| 660 | fixed: false, | 677 | fixed: false, |
| 678 | + disabled:true | ||
| 661 | }, | 679 | }, |
| 662 | { | 680 | { |
| 663 | type: "", | 681 | type: "", |
| 664 | name: "是否自动", | 682 | name: "是否自动", |
| 665 | value: "cargoRulesStatus", | 683 | value: "cargoRulesStatus", |
| 666 | - width: "150", | 684 | + width: "100", |
| 667 | align: "center", | 685 | align: "center", |
| 668 | sorTable: true, | 686 | sorTable: true, |
| 669 | fixed: false, | 687 | fixed: false, |
| 688 | + disabled:true | ||
| 670 | }, | 689 | }, |
| 671 | { | 690 | { |
| 672 | type: "", | 691 | type: "", |
| 673 | name: "发件人账号", | 692 | name: "发件人账号", |
| 674 | value: "shipperAccount", | 693 | value: "shipperAccount", |
| 675 | - width: "150", | 694 | + width: "120", |
| 676 | align: "center", | 695 | align: "center", |
| 677 | sorTable: false, | 696 | sorTable: false, |
| 678 | fixed: false, | 697 | fixed: false, |
| 698 | + disabled:true | ||
| 679 | }, | 699 | }, |
| 680 | { | 700 | { |
| 681 | type: "", | 701 | type: "", |
| ... | @@ -685,51 +705,57 @@ export default { | ... | @@ -685,51 +705,57 @@ export default { |
| 685 | align: "center", | 705 | align: "center", |
| 686 | sorTable: false, | 706 | sorTable: false, |
| 687 | fixed: false, | 707 | fixed: false, |
| 708 | + disabled:true | ||
| 688 | }, | 709 | }, |
| 689 | { | 710 | { |
| 690 | type: "", | 711 | type: "", |
| 691 | name: "始发地城市名称", | 712 | name: "始发地城市名称", |
| 692 | value: "originCity", | 713 | value: "originCity", |
| 693 | - width: "150", | 714 | + width: "130", |
| 694 | align: "center", | 715 | align: "center", |
| 695 | sorTable: false, | 716 | sorTable: false, |
| 696 | fixed: false, | 717 | fixed: false, |
| 718 | + disabled:true | ||
| 697 | }, | 719 | }, |
| 698 | { | 720 | { |
| 699 | type: "", | 721 | type: "", |
| 700 | name: "收件地", | 722 | name: "收件地", |
| 701 | value: "destinationSiteName", | 723 | value: "destinationSiteName", |
| 702 | - width: "150", | 724 | + width: "90", |
| 703 | align: "center", | 725 | align: "center", |
| 704 | sorTable: false, | 726 | sorTable: false, |
| 705 | fixed: false, | 727 | fixed: false, |
| 728 | + disabled:true | ||
| 706 | }, | 729 | }, |
| 707 | { | 730 | { |
| 708 | type: "", | 731 | type: "", |
| 709 | name: "尺寸", | 732 | name: "尺寸", |
| 710 | value: "sizeStr", | 733 | value: "sizeStr", |
| 711 | - width: "150", | 734 | + width: "80", |
| 712 | align: "center", | 735 | align: "center", |
| 713 | sorTable: true, | 736 | sorTable: true, |
| 714 | fixed: false, | 737 | fixed: false, |
| 738 | + disabled:true | ||
| 715 | }, | 739 | }, |
| 716 | { | 740 | { |
| 717 | type: "", | 741 | type: "", |
| 718 | name: "大货预审意见(是否可以配置航班)", | 742 | name: "大货预审意见(是否可以配置航班)", |
| 719 | value: "bigPretrialOpinion", | 743 | value: "bigPretrialOpinion", |
| 720 | - width: "300", | 744 | + width: "250", |
| 721 | align: "center", | 745 | align: "center", |
| 722 | sorTable: false, | 746 | sorTable: false, |
| 723 | fixed: false, | 747 | fixed: false, |
| 748 | + disabled:true | ||
| 724 | }, | 749 | }, |
| 725 | { | 750 | { |
| 726 | type: "", | 751 | type: "", |
| 727 | name: "大货预审时间", | 752 | name: "大货预审时间", |
| 728 | value: "bigPretrialTime", | 753 | value: "bigPretrialTime", |
| 729 | - width: "150", | 754 | + width: "120", |
| 730 | align: "center", | 755 | align: "center", |
| 731 | sorTable: false, | 756 | sorTable: false, |
| 732 | fixed: false, | 757 | fixed: false, |
| 758 | + disabled:true | ||
| 733 | }, | 759 | }, |
| 734 | { | 760 | { |
| 735 | type: "", | 761 | type: "", |
| ... | @@ -739,6 +765,7 @@ export default { | ... | @@ -739,6 +765,7 @@ export default { |
| 739 | align: "center", | 765 | align: "center", |
| 740 | sorTable: true, | 766 | sorTable: true, |
| 741 | fixed: false, | 767 | fixed: false, |
| 768 | + disabled:true | ||
| 742 | }, | 769 | }, |
| 743 | { | 770 | { |
| 744 | type: "", | 771 | type: "", |
| ... | @@ -748,24 +775,27 @@ export default { | ... | @@ -748,24 +775,27 @@ export default { |
| 748 | align: "center", | 775 | align: "center", |
| 749 | sorTable: true, | 776 | sorTable: true, |
| 750 | fixed: false, | 777 | fixed: false, |
| 778 | + disabled:true | ||
| 751 | }, | 779 | }, |
| 752 | { | 780 | { |
| 753 | type: "", | 781 | type: "", |
| 754 | name: "创建人", | 782 | name: "创建人", |
| 755 | value: "createUserName", | 783 | value: "createUserName", |
| 756 | - width: "150", | 784 | + width: "90", |
| 757 | align: "center", | 785 | align: "center", |
| 758 | sorTable: true, | 786 | sorTable: true, |
| 759 | fixed: false, | 787 | fixed: false, |
| 788 | + disabled:true | ||
| 760 | }, | 789 | }, |
| 761 | { | 790 | { |
| 762 | type: "", | 791 | type: "", |
| 763 | name: "创建时间", | 792 | name: "创建时间", |
| 764 | value: "createTime", | 793 | value: "createTime", |
| 765 | - width: "150", | 794 | + width: "100", |
| 766 | align: "center", | 795 | align: "center", |
| 767 | sorTable: true, | 796 | sorTable: true, |
| 768 | fixed: false, | 797 | fixed: false, |
| 798 | + disabled:true | ||
| 769 | }, | 799 | }, |
| 770 | ], //表头数据 | 800 | ], //表头数据 |
| 771 | tableData: [], //表格数据 | 801 | tableData: [], //表格数据 |
| ... | @@ -801,10 +831,6 @@ export default { | ... | @@ -801,10 +831,6 @@ export default { |
| 801 | this.seleData(); | 831 | this.seleData(); |
| 802 | this.select(); | 832 | this.select(); |
| 803 | }, | 833 | }, |
| 804 | - // activated(){ | ||
| 805 | - // this.seleData(); | ||
| 806 | - // this.select(); | ||
| 807 | - // }, | ||
| 808 | mounted() { | 834 | mounted() { |
| 809 | window.addEventListener("keydown", (code) => { | 835 | window.addEventListener("keydown", (code) => { |
| 810 | if (code.keyCode === 16 && code.shiftKey) { | 836 | if (code.keyCode === 16 && code.shiftKey) { |
| ... | @@ -820,19 +846,6 @@ export default { | ... | @@ -820,19 +846,6 @@ export default { |
| 820 | methods: { | 846 | methods: { |
| 821 | //查询条件 | 847 | //查询条件 |
| 822 | async seleData() { | 848 | async seleData() { |
| 823 | - // findFltConditionDataApi() | ||
| 824 | - // .then((res) => { | ||
| 825 | - // if (res.code === 200) { | ||
| 826 | - // this.selectData.fltTypes = res.data.flightType; | ||
| 827 | - // }else{ | ||
| 828 | - // this.$message({ | ||
| 829 | - // message: "查询条件不存在", | ||
| 830 | - // type: "warning", | ||
| 831 | - // }); | ||
| 832 | - // } | ||
| 833 | - // }) | ||
| 834 | - // .catch(() => {}); | ||
| 835 | - | ||
| 836 | allDictData() | 849 | allDictData() |
| 837 | .then((res) => { | 850 | .then((res) => { |
| 838 | if (res.code === 200) { | 851 | if (res.code === 200) { |
| ... | @@ -1012,9 +1025,9 @@ export default { | ... | @@ -1012,9 +1025,9 @@ export default { |
| 1012 | } | 1025 | } |
| 1013 | }); | 1026 | }); |
| 1014 | data = data.sort(this.$refs.newTables.compare(val.prop, val.order)); | 1027 | data = data.sort(this.$refs.newTables.compare(val.prop, val.order)); |
| 1015 | - if (val.order == "descending") { | 1028 | + if (val.order != "ascending") { |
| 1016 | this.tableData = nullData.concat(data); | 1029 | this.tableData = nullData.concat(data); |
| 1017 | - } else{ | 1030 | + } else { |
| 1018 | this.tableData = data.concat(nullData); | 1031 | this.tableData = data.concat(nullData); |
| 1019 | } | 1032 | } |
| 1020 | this.tableData.forEach((item, index = 0) => { | 1033 | this.tableData.forEach((item, index = 0) => { | ... | ... |
| ... | @@ -119,7 +119,7 @@ export default { | ... | @@ -119,7 +119,7 @@ export default { |
| 119 | }, | 119 | }, |
| 120 | ], | 120 | ], |
| 121 | }, | 121 | }, |
| 122 | - loading:false, | 122 | + loading:false |
| 123 | }; | 123 | }; |
| 124 | }, | 124 | }, |
| 125 | methods: { | 125 | methods: { |
| ... | @@ -133,7 +133,7 @@ export default { | ... | @@ -133,7 +133,7 @@ export default { |
| 133 | }, | 133 | }, |
| 134 | //确定配舱 | 134 | //确定配舱 |
| 135 | submit() { | 135 | submit() { |
| 136 | - this.loading= true; | 136 | + this.loading = true; |
| 137 | let arr = []; | 137 | let arr = []; |
| 138 | this.tableData.forEach((item) => { | 138 | this.tableData.forEach((item) => { |
| 139 | arr.push(item.id); | 139 | arr.push(item.id); | ... | ... |
| ... | @@ -13,10 +13,11 @@ | ... | @@ -13,10 +13,11 @@ |
| 13 | v-model.trim="purposeOfFlightNo" | 13 | v-model.trim="purposeOfFlightNo" |
| 14 | placeholder="航班号" | 14 | placeholder="航班号" |
| 15 | @keyup.enter.native="getList" | 15 | @keyup.enter.native="getList" |
| 16 | + clearable | ||
| 16 | ></el-input> | 17 | ></el-input> |
| 17 | </el-form-item> | 18 | </el-form-item> |
| 18 | <el-form-item label="状态"> | 19 | <el-form-item label="状态"> |
| 19 | - <el-select v-model="queryParams.status" placeholder="状态"> | 20 | + <el-select v-model="queryParams.status" placeholder="状态" clearable> |
| 20 | <el-option label="有效" value="1"></el-option> | 21 | <el-option label="有效" value="1"></el-option> |
| 21 | <el-option label="停用" value="3"></el-option> | 22 | <el-option label="停用" value="3"></el-option> |
| 22 | </el-select> | 23 | </el-select> |
| ... | @@ -36,12 +37,25 @@ | ... | @@ -36,12 +37,25 @@ |
| 36 | type="primary" | 37 | type="primary" |
| 37 | icon="el-icon-plus" | 38 | icon="el-icon-plus" |
| 38 | size="mini" | 39 | size="mini" |
| 39 | - @click="$router.push({ name: 'FlightAllocConfigAdd', params: { handle: 'add' } })" | 40 | + @click=" |
| 41 | + $router.push({ | ||
| 42 | + name: 'FlightAllocConfigAdd', | ||
| 43 | + params: { handle: 'add' }, | ||
| 44 | + }) | ||
| 45 | + " | ||
| 40 | >添加</el-button | 46 | >添加</el-button |
| 41 | > | 47 | > |
| 42 | </div> | 48 | </div> |
| 43 | </el-form> | 49 | </el-form> |
| 44 | - <el-table :data="flyList" v-loading="loading" size="small" highlight-current-row border stripe> | 50 | + |
| 51 | + <el-table | ||
| 52 | + :data="flyList" | ||
| 53 | + v-loading="loading" | ||
| 54 | + size="small" | ||
| 55 | + highlight-current-row | ||
| 56 | + border | ||
| 57 | + stripe | ||
| 58 | + > | ||
| 45 | <el-table-column | 59 | <el-table-column |
| 46 | prop="purposeOfFlightNo" | 60 | prop="purposeOfFlightNo" |
| 47 | label="航班号" | 61 | label="航班号" |
| ... | @@ -128,15 +142,13 @@ import { | ... | @@ -128,15 +142,13 @@ import { |
| 128 | enableOrDisable, | 142 | enableOrDisable, |
| 129 | } from "@/api/destinationFlight"; | 143 | } from "@/api/destinationFlight"; |
| 130 | 144 | ||
| 131 | -import { parseTime } from "@/utils/FedEx"; | ||
| 132 | - | ||
| 133 | export default { | 145 | export default { |
| 134 | - name:"FlightAllocConfig", | 146 | + name: "FlightAllocConfig", |
| 135 | data() { | 147 | data() { |
| 136 | return { | 148 | return { |
| 137 | queryParams: { | 149 | queryParams: { |
| 138 | purposeOfFlightNo: "", | 150 | purposeOfFlightNo: "", |
| 139 | - status:"1", | 151 | + status: "1", |
| 140 | start: 0, | 152 | start: 0, |
| 141 | limit: 10, | 153 | limit: 10, |
| 142 | }, | 154 | }, |
| ... | @@ -194,18 +206,17 @@ export default { | ... | @@ -194,18 +206,17 @@ export default { |
| 194 | cancelButtonText: "取消", | 206 | cancelButtonText: "取消", |
| 195 | showCancelButton: true, | 207 | showCancelButton: true, |
| 196 | type: "warning", | 208 | type: "warning", |
| 197 | - }) | 209 | + }).then(() => { |
| 198 | - .then(()=> { | 210 | + delFlightId(id) |
| 199 | - delFlightId(id) | ||
| 200 | .then((res) => { | 211 | .then((res) => { |
| 201 | this.$message({ | 212 | this.$message({ |
| 202 | message: res.msg, | 213 | message: res.msg, |
| 203 | type: res.code === 200 ? "success" : "warning", | 214 | type: res.code === 200 ? "success" : "warning", |
| 204 | }); | 215 | }); |
| 205 | - this.getList() | 216 | + this.getList(); |
| 206 | }) | 217 | }) |
| 207 | .catch(() => {}); | 218 | .catch(() => {}); |
| 208 | - }) | 219 | + }); |
| 209 | } | 220 | } |
| 210 | }, | 221 | }, |
| 211 | //启用,停用 | 222 | //启用,停用 |
| ... | @@ -215,9 +226,9 @@ export default { | ... | @@ -215,9 +226,9 @@ export default { |
| 215 | confirmButtonText: "确定", | 226 | confirmButtonText: "确定", |
| 216 | cancelButtonText: "取消", | 227 | cancelButtonText: "取消", |
| 217 | type: "warning", | 228 | type: "warning", |
| 218 | - }) | 229 | + }).then(() => { |
| 219 | - .then(()=> { | 230 | + enableOrDisable(id, status) |
| 220 | - enableOrDisable(id, status).then((res) => { | 231 | + .then((res) => { |
| 221 | if (res.code != 200) { | 232 | if (res.code != 200) { |
| 222 | this.msgError(res.msg); | 233 | this.msgError(res.msg); |
| 223 | } else { | 234 | } else { |
| ... | @@ -225,23 +236,23 @@ export default { | ... | @@ -225,23 +236,23 @@ export default { |
| 225 | this.msgSuccess(tip + "成功"); | 236 | this.msgSuccess(tip + "成功"); |
| 226 | } | 237 | } |
| 227 | }) | 238 | }) |
| 228 | - .catch(()=> {}); | 239 | + .catch(() => {}); |
| 229 | - }) | 240 | + }); |
| 230 | }, | 241 | }, |
| 231 | }, | 242 | }, |
| 232 | created() { | 243 | created() { |
| 233 | this.getList(); | 244 | this.getList(); |
| 234 | }, | 245 | }, |
| 235 | - computed:{ | 246 | + computed: { |
| 236 | purposeOfFlightNo: { | 247 | purposeOfFlightNo: { |
| 237 | get: function () { | 248 | get: function () { |
| 238 | return this.queryParams.purposeOfFlightNo; | 249 | return this.queryParams.purposeOfFlightNo; |
| 239 | }, | 250 | }, |
| 240 | set: function (val) { | 251 | set: function (val) { |
| 241 | - this.queryParams.purposeOfFlightNo = val.toUpperCase() | 252 | + this.queryParams.purposeOfFlightNo = val.toUpperCase(); |
| 242 | }, | 253 | }, |
| 243 | }, | 254 | }, |
| 244 | - } | 255 | + }, |
| 245 | }; | 256 | }; |
| 246 | </script> | 257 | </script> |
| 247 | 258 | ... | ... |
| ... | @@ -503,10 +503,28 @@ export default { | ... | @@ -503,10 +503,28 @@ export default { |
| 503 | 503 | ||
| 504 | created() { | 504 | created() { |
| 505 | let handle = this.$route.params.handle; | 505 | let handle = this.$route.params.handle; |
| 506 | + allDictData().then((response) => { | ||
| 507 | + if (response.code != 200) { | ||
| 508 | + this.$message({ | ||
| 509 | + showClose: true, | ||
| 510 | + message: response.msg, | ||
| 511 | + type: "error", | ||
| 512 | + }); | ||
| 513 | + return; | ||
| 514 | + } | ||
| 515 | + let dict = response.data; | ||
| 516 | + this.cargoType = dict.cargoType; | ||
| 517 | + this.cargoStatus = dict.cargoStatus; | ||
| 518 | + this.serviceCode = dict.serviceCode.sort((a, b) => | ||
| 519 | + a.englishName.localeCompare(b.englishName) | ||
| 520 | + ); | ||
| 521 | + | ||
| 522 | + this.handlingCode = this.sorttodo(dict.handlingCode, "BLANK"); | ||
| 523 | + this.subCategory = dict.subCategory; | ||
| 524 | + }); | ||
| 506 | this.routeName = this.$route.name; | 525 | this.routeName = this.$route.name; |
| 507 | this.dataId = this.$route.params.id; | 526 | this.dataId = this.$route.params.id; |
| 508 | this.handleName = this.$route.params.handle; | 527 | this.handleName = this.$route.params.handle; |
| 509 | - this.dictData() | ||
| 510 | if (handle === "detail") { | 528 | if (handle === "detail") { |
| 511 | this.disable = true; | 529 | this.disable = true; |
| 512 | } | 530 | } | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-form class="form-header" :model="queryParams" ref="queryForm" size="medium" :inline="true" label-position="right" label-width="auto"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true"> |
| 4 | - | 4 | + <el-form-item label="ACCS原航班"> |
| 5 | - <el-form-item label="原航班"> | 5 | + <el-input |
| 6 | - <el-input type="text" v-model="upCase" placeholder="请输入原航班" clearable></el-input> | 6 | + type="text" |
| 7 | + v-model="upCase" | ||
| 8 | + placeholder="请输入ACCS原航班" | ||
| 9 | + clearable | ||
| 10 | + class="formItem" | ||
| 11 | + ></el-input> | ||
| 7 | <!-- <el-input v-model="upCase" placeholder="请输入原航班" clearable size="small" /> --> | 12 | <!-- <el-input v-model="upCase" placeholder="请输入原航班" clearable size="small" /> --> |
| 8 | </el-form-item> | 13 | </el-form-item> |
| 9 | <el-form-item label="状态" prop="status"> | 14 | <el-form-item label="状态" prop="status"> |
| 10 | - <el-select v-model="queryParams.status" placeholder="请选择" clearable> | 15 | + <el-select |
| 11 | - <el-option v-for="dict in statusList" :key="dict.id" :label="dict.name" :value="dict.id" /> | 16 | + v-model="queryParams.status" |
| 17 | + placeholder="请选择" | ||
| 18 | + clearable | ||
| 19 | + size="small" | ||
| 20 | + > | ||
| 21 | + <el-option | ||
| 22 | + v-for="dict in statusList" | ||
| 23 | + :key="dict.id" | ||
| 24 | + :label="dict.name" | ||
| 25 | + :value="dict.id" | ||
| 26 | + /> | ||
| 12 | </el-select> | 27 | </el-select> |
| 13 | - | ||
| 14 | </el-form-item> | 28 | </el-form-item> |
| 15 | 29 | ||
| 16 | <el-form-item> | 30 | <el-form-item> |
| 17 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询原航班配置</el-button> | 31 | + <el-button |
| 32 | + type="primary" | ||
| 33 | + icon="el-icon-search" | ||
| 34 | + size="mini" | ||
| 35 | + @click="handleQuery" | ||
| 36 | + >查询ACCS原航班配置</el-button | ||
| 37 | + > | ||
| 18 | </el-form-item> | 38 | </el-form-item> |
| 19 | <br /> | 39 | <br /> |
| 20 | <el-form-item label="日期" prop="flightDate"> | 40 | <el-form-item label="日期" prop="flightDate"> |
| 21 | - | 41 | + <el-date-picker |
| 22 | - <el-date-picker value-format="yyyy-MM-dd" v-model="queryParams.flightDate" type="date" placeholder="选择日期"> | 42 | + value-format="yyyy-MM-dd" |
| 43 | + v-model="queryParams.flightDate" | ||
| 44 | + type="date" | ||
| 45 | + placeholder="选择日期" | ||
| 46 | + clearable | ||
| 47 | + > | ||
| 23 | </el-date-picker> | 48 | </el-date-picker> |
| 24 | </el-form-item> | 49 | </el-form-item> |
| 25 | 50 | ||
| 26 | <el-form-item> | 51 | <el-form-item> |
| 27 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="findSourceFlightAndFlightDate">查询实际配载航班 | 52 | + <el-button |
| 28 | - </el-button>  | 53 | + type="primary" |
| 29 | - <span style="color: #ff4949;">注:原航班+日期查询该日期的航班实际情况</span> | 54 | + icon="el-icon-search" |
| 55 | + size="mini" | ||
| 56 | + @click="findSourceFlightAndFlightDate" | ||
| 57 | + >查询实际配载航班 </el-button | ||
| 58 | + >  | ||
| 59 | + <span style="color: #ff4949" | ||
| 60 | + >注:ACCS原航班+日期查询该日期的航班实际情况</span | ||
| 61 | + > | ||
| 30 | </el-form-item> | 62 | </el-form-item> |
| 31 | <br /> | 63 | <br /> |
| 32 | <el-form-item> | 64 | <el-form-item> |
| 33 | - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">添加规则</el-button> | 65 | + <el-col :span="1.5"> |
| 34 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 66 | + <el-button |
| 67 | + type="primary" | ||
| 68 | + icon="el-icon-plus" | ||
| 69 | + size="mini" | ||
| 70 | + @click="handleAdd" | ||
| 71 | + >添加规则</el-button | ||
| 72 | + > | ||
| 73 | + </el-col> | ||
| 74 | +   | ||
| 75 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" | ||
| 76 | + >重置</el-button | ||
| 77 | + > | ||
| 35 | </el-form-item> | 78 | </el-form-item> |
| 36 | </el-form> | 79 | </el-form> |
| 37 | 80 | ||
| 38 | - | 81 | + <el-table |
| 39 | - <el-table v-loading="loading" height="550" :data="sourceFlightRulesList" highlight-current-row border stripe> | 82 | + v-loading="loading" |
| 83 | + height="550" | ||
| 84 | + size="small" | ||
| 85 | + :data="sourceFlightRulesList" | ||
| 86 | + highlight-current-row | ||
| 87 | + border | ||
| 88 | + stripe | ||
| 89 | + > | ||
| 40 | <el-table-column type="index" label="序号" align="center"> | 90 | <el-table-column type="index" label="序号" align="center"> |
| 41 | <template slot-scope="scope">{{ scope.$index + 1 }}</template> | 91 | <template slot-scope="scope">{{ scope.$index + 1 }}</template> |
| 42 | </el-table-column> | 92 | </el-table-column> |
| 43 | - <el-table-column label="原航班" align="center" prop="sourceFlightNo" /> | 93 | + <el-table-column |
| 44 | - <el-table-column label="配载航班排序" align="center" prop="flightRank" width="280" /> | 94 | + label="ACCS原航班" |
| 95 | + align="center" | ||
| 96 | + prop="sourceFlightNo" | ||
| 97 | + /> | ||
| 98 | + <el-table-column | ||
| 99 | + label="配载航班排序" | ||
| 100 | + align="center" | ||
| 101 | + prop="flightRank" | ||
| 102 | + width="280" | ||
| 103 | + /> | ||
| 45 | <!-- <el-table-column label="优先级" align="center" prop="priority" /> --> | 104 | <!-- <el-table-column label="优先级" align="center" prop="priority" /> --> |
| 46 | - <el-table-column label="周期" align="center" prop="dayOfWeek" width="180" /> | 105 | + <el-table-column |
| 47 | - <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" /> | 106 | + label="周期" |
| 48 | - <el-table-column label="开始时间" align="center" prop="startDate" width="100" /> | 107 | + align="center" |
| 49 | - <el-table-column label="结束时间" align="center" prop="endDate" width="100" /> | 108 | + prop="dayOfWeek" |
| 50 | - <el-table-column label="最后修改人" align="center" prop="updateUserName" width="100" /> | 109 | + width="180" |
| 51 | - <el-table-column label="最后修改时间" align="center" prop="updateTime" width="100" /> | 110 | + /> |
| 52 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right"> | 111 | + <el-table-column |
| 112 | + label="状态" | ||
| 113 | + align="center" | ||
| 114 | + prop="status" | ||
| 115 | + :formatter="statusFormat" | ||
| 116 | + /> | ||
| 117 | + <el-table-column | ||
| 118 | + label="开始时间" | ||
| 119 | + align="center" | ||
| 120 | + prop="startDate" | ||
| 121 | + width="100" | ||
| 122 | + /> | ||
| 123 | + <el-table-column | ||
| 124 | + label="结束时间" | ||
| 125 | + align="center" | ||
| 126 | + prop="endDate" | ||
| 127 | + width="100" | ||
| 128 | + /> | ||
| 129 | + <el-table-column | ||
| 130 | + label="最后修改人" | ||
| 131 | + align="center" | ||
| 132 | + prop="updateUserName" | ||
| 133 | + width="100" | ||
| 134 | + /> | ||
| 135 | + <el-table-column | ||
| 136 | + label="最后修改时间" | ||
| 137 | + align="center" | ||
| 138 | + prop="updateTime" | ||
| 139 | + width="100" | ||
| 140 | + /> | ||
| 141 | + <el-table-column | ||
| 142 | + label="操作" | ||
| 143 | + align="center" | ||
| 144 | + class-name="small-padding fixed-width" | ||
| 145 | + width="180" | ||
| 146 | + fixed="right" | ||
| 147 | + > | ||
| 53 | <template slot-scope="scope"> | 148 | <template slot-scope="scope"> |
| 54 | - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button> | 149 | + <el-button |
| 55 | - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteorPlayorpause(scope.row,0,'删除')"> | 150 | + size="mini" |
| 56 | - 删除</el-button> | 151 | + type="text" |
| 57 | - <el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == '3'" | 152 | + icon="el-icon-edit" |
| 58 | - @click="handleDeleteorPlayorpause(scope.row,1,'启用')">启用</el-button> | 153 | + @click="handleUpdate(scope.row)" |
| 59 | - <el-button size="mini" type="text" icon="el-icon-video-pause" v-if="scope.row.status != '3'" | 154 | + >修改</el-button |
| 60 | - @click="handleDeleteorPlayorpause(scope.row,3,'停用')">停用</el-button> | 155 | + > |
| 156 | + <el-button | ||
| 157 | + size="mini" | ||
| 158 | + type="text" | ||
| 159 | + icon="el-icon-delete" | ||
| 160 | + @click="handleDeleteorPlayorpause(scope.row, 0, '删除')" | ||
| 161 | + > | ||
| 162 | + 删除</el-button | ||
| 163 | + > | ||
| 164 | + <el-button | ||
| 165 | + size="mini" | ||
| 166 | + type="text" | ||
| 167 | + icon="el-icon-video-play" | ||
| 168 | + v-if="scope.row.status == '3'" | ||
| 169 | + @click="handleDeleteorPlayorpause(scope.row, 1, '启用')" | ||
| 170 | + >启用</el-button | ||
| 171 | + > | ||
| 172 | + <el-button | ||
| 173 | + size="mini" | ||
| 174 | + type="text" | ||
| 175 | + icon="el-icon-video-pause" | ||
| 176 | + v-if="scope.row.status != '3'" | ||
| 177 | + @click="handleDeleteorPlayorpause(scope.row, 3, '停用')" | ||
| 178 | + >停用</el-button | ||
| 179 | + > | ||
| 61 | </template> | 180 | </template> |
| 62 | </el-table-column> | 181 | </el-table-column> |
| 63 | </el-table> | 182 | </el-table> |
| 64 | 183 | ||
| 65 | - <pagination v-show="total>0" :total="total" layout=" prev, pager, next, jumper, sizes,total" | 184 | + <pagination |
| 66 | - :page.sync="queryParams.pageNum" :limit.sync="queryParams.limit" @pagination="findSourceFlightRules" /> | 185 | + v-show="total > 0" |
| 67 | - | 186 | + :total="total" |
| 187 | + layout=" prev, pager, next, jumper, sizes,total" | ||
| 188 | + :page.sync="queryParams.pageNum" | ||
| 189 | + :limit.sync="queryParams.limit" | ||
| 190 | + @pagination="findSourceFlightRules" | ||
| 191 | + /> | ||
| 68 | 192 | ||
| 69 | <!-- 查看目的航班对话框 --> | 193 | <!-- 查看目的航班对话框 --> |
| 70 | - <el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false" :append-to-body="true"> | 194 | + <el-dialog |
| 195 | + title="实际配载航班" | ||
| 196 | + :visible.sync="openFlightDate" | ||
| 197 | + width="70%" | ||
| 198 | + :close-on-click-modal="false" | ||
| 199 | + :append-to-body="true" | ||
| 200 | + > | ||
| 71 | <el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate"> | 201 | <el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate"> |
| 72 | <el-table-column type="index" label="序号" align="center"> | 202 | <el-table-column type="index" label="序号" align="center"> |
| 73 | <template slot-scope="scope">{{ scope.$index + 1 }}</template> | 203 | <template slot-scope="scope">{{ scope.$index + 1 }}</template> |
| 74 | </el-table-column> | 204 | </el-table-column> |
| 75 | - <el-table-column label="原航班" align="center" prop="sourceFlightNo"/> | 205 | + <el-table-column |
| 76 | - <el-table-column label="实际配载航班" align="center" prop="actualFlight" width="280" /> | 206 | + label="ACCS原航班" |
| 207 | + align="center" | ||
| 208 | + prop="sourceFlightNo" | ||
| 209 | + /> | ||
| 210 | + <el-table-column | ||
| 211 | + label="实际配载航班" | ||
| 212 | + align="center" | ||
| 213 | + prop="actualFlight" | ||
| 214 | + width="280" | ||
| 215 | + /> | ||
| 77 | <el-table-column label="航班日期" align="center" prop="flightDate" /> | 216 | <el-table-column label="航班日期" align="center" prop="flightDate" /> |
| 78 | - <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200"> | 217 | + <el-table-column |
| 218 | + label="操作" | ||
| 219 | + align="center" | ||
| 220 | + class-name="small-padding fixed-width" | ||
| 221 | + width="200" | ||
| 222 | + > | ||
| 79 | <template slot-scope="scope"> | 223 | <template slot-scope="scope"> |
| 80 | - <el-button size="mini" type="text" icon="el-icon-edit" | 224 | + <el-button |
| 81 | - @click="handleClick(scope.row.actualFlight, 'detail')">查看配置维度</el-button> | 225 | + size="mini" |
| 226 | + type="text" | ||
| 227 | + icon="el-icon-edit" | ||
| 228 | + @click="handleClick(scope.row.actualFlight, 'detail')" | ||
| 229 | + >查看配置维度</el-button | ||
| 230 | + > | ||
| 82 | </template> | 231 | </template> |
| 83 | </el-table-column> | 232 | </el-table-column> |
| 84 | </el-table> | 233 | </el-table> |
| ... | @@ -87,50 +236,85 @@ | ... | @@ -87,50 +236,85 @@ |
| 87 | </div> | 236 | </div> |
| 88 | </el-dialog> | 237 | </el-dialog> |
| 89 | 238 | ||
| 90 | - | ||
| 91 | <!-- 添加或修改对话框 --> | 239 | <!-- 添加或修改对话框 --> |
| 92 | - <el-dialog :title="title" :visible.sync="open" width="55%" :append-to-body="true" :close-on-click-modal="false"> | 240 | + <el-dialog |
| 93 | - <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> | 241 | + :title="title" |
| 242 | + :visible.sync="open" | ||
| 243 | + width="55%" | ||
| 244 | + :append-to-body="true" | ||
| 245 | + :close-on-click-modal="false" | ||
| 246 | + > | ||
| 247 | + <el-form ref="form" :model="form" :rules="rules" label-width="100px"> | ||
| 94 | <el-row> | 248 | <el-row> |
| 95 | <el-col :span="10"> | 249 | <el-col :span="10"> |
| 96 | - <el-form-item label="原航班" prop="sourceFlightNo"> | 250 | + <el-form-item label="ACCS原航班" prop="sourceFlightNo"> |
| 97 | - <el-input v-model="form.sourceFlightNo" placeholder="请输入原航班号" maxlength="10"/> | 251 | + <el-input |
| 252 | + v-model="form.sourceFlightNo" | ||
| 253 | + placeholder="请输入ACCS原航班号" | ||
| 254 | + maxlength="10" | ||
| 255 | + /> | ||
| 98 | </el-form-item> | 256 | </el-form-item> |
| 99 | </el-col> | 257 | </el-col> |
| 100 | </el-row> | 258 | </el-row> |
| 101 | <el-row> | 259 | <el-row> |
| 102 | <el-col :span="8"> | 260 | <el-col :span="8"> |
| 103 | <el-form-item label="有效开始时间" prop="startDate"> | 261 | <el-form-item label="有效开始时间" prop="startDate"> |
| 104 | - <el-date-picker clearable size="small" :picker-options="pickerOptionsStart" v-model="form.startDate" | 262 | + <el-date-picker |
| 105 | - type="date" value-format="yyyy-MM-dd" placeholder="选择开始时间"> | 263 | + clearable |
| 264 | + size="small" | ||
| 265 | + :picker-options="pickerOptionsStart" | ||
| 266 | + v-model="form.startDate" | ||
| 267 | + type="date" | ||
| 268 | + value-format="yyyy-MM-dd" | ||
| 269 | + placeholder="选择开始时间" | ||
| 270 | + > | ||
| 106 | </el-date-picker> | 271 | </el-date-picker> |
| 107 | </el-form-item> | 272 | </el-form-item> |
| 108 | </el-col> | 273 | </el-col> |
| 109 | <el-col :span="12"> | 274 | <el-col :span="12"> |
| 110 | <el-form-item label="有效结束时间" prop="endDate"> | 275 | <el-form-item label="有效结束时间" prop="endDate"> |
| 111 | - <el-date-picker clearable size="small" :picker-options="pickerOptionsEnd" v-model="form.endDate" | 276 | + <el-date-picker |
| 112 | - type="date" value-format="yyyy-MM-dd" placeholder="选择结束时间"> | 277 | + clearable |
| 278 | + size="small" | ||
| 279 | + :picker-options="pickerOptionsEnd" | ||
| 280 | + v-model="form.endDate" | ||
| 281 | + type="date" | ||
| 282 | + value-format="yyyy-MM-dd" | ||
| 283 | + placeholder="选择结束时间" | ||
| 284 | + > | ||
| 113 | </el-date-picker> | 285 | </el-date-picker> |
| 114 | </el-form-item> | 286 | </el-form-item> |
| 115 | </el-col> | 287 | </el-col> |
| 116 | 288 | ||
| 117 | - <el-col :span="24" style="margin-bottom: 5%;"> | 289 | + <el-col :span="24" style="margin-bottom: 5%"> |
| 118 | - <span style="color: #ff4949;margin-left: 10%;">提示:配载航班之间请用分号分隔【符号不区分中英文】,例:CA1053;C7433</span><br /> | 290 | + <span style="color:#ff4949; margin-left: 10%" |
| 119 | - <span style="color: #ff4949;margin-left: 10%;">提示:如果需要设置配载航班延迟或提前可以直接在目的航斑后加减【+-】天数。如:CA1053+1;CZ433-1</span> | 291 | + >提示:配载航班之间请用分号分隔【符号不区分中英文】,例:CA1053;C7433</span |
| 292 | + ><br /> | ||
| 293 | + <span style="color:#ff4949; margin-left: 10%" | ||
| 294 | + >提示:如果需要设置配载航班延迟或提前可以直接在目的航斑后加减【+-】天数。如:CA1053+1;CZ433-1</span | ||
| 295 | + > | ||
| 120 | </el-col> | 296 | </el-col> |
| 121 | <el-col :span="24"> | 297 | <el-col :span="24"> |
| 122 | <el-form-item label="配载航班" prop="flightRank"> | 298 | <el-form-item label="配载航班" prop="flightRank"> |
| 123 | - <el-input type="textarea" v-model="form.flightRank" :rows="4"></el-input> | 299 | + <el-input |
| 300 | + type="textarea" | ||
| 301 | + v-model="form.flightRank" | ||
| 302 | + :rows="4" | ||
| 303 | + ></el-input> | ||
| 124 | </el-form-item> | 304 | </el-form-item> |
| 125 | </el-col> | 305 | </el-col> |
| 126 | <el-col :span="24"> | 306 | <el-col :span="24"> |
| 127 | <el-form-item label="周期段"> | 307 | <el-form-item label="周期段"> |
| 128 | <el-checkbox-group v-model="dayOfWeek"> | 308 | <el-checkbox-group v-model="dayOfWeek"> |
| 129 | - <el-checkbox v-for="item in dayOfWeekList" :key="item" :label="item" :name="item"></el-checkbox> | 309 | + <el-checkbox |
| 310 | + v-for="item in dayOfWeekList" | ||
| 311 | + :key="item" | ||
| 312 | + :label="item" | ||
| 313 | + :name="item" | ||
| 314 | + ></el-checkbox> | ||
| 130 | </el-checkbox-group> | 315 | </el-checkbox-group> |
| 131 | </el-form-item> | 316 | </el-form-item> |
| 132 | </el-col> | 317 | </el-col> |
| 133 | - | ||
| 134 | </el-row> | 318 | </el-row> |
| 135 | </el-form> | 319 | </el-form> |
| 136 | <div slot="footer" class="dialog-footer"> | 320 | <div slot="footer" class="dialog-footer"> |
| ... | @@ -141,298 +325,301 @@ | ... | @@ -141,298 +325,301 @@ |
| 141 | </div> | 325 | </div> |
| 142 | </template> | 326 | </template> |
| 143 | <script> | 327 | <script> |
| 144 | - import { | 328 | +import { |
| 145 | - findSourceFlightRulesApi, | 329 | + findSourceFlightRulesApi, |
| 146 | - sourceFlightRulesSaveApi, | 330 | + sourceFlightRulesSaveApi, |
| 147 | - delOrEnableORDisableApi, | 331 | + delOrEnableORDisableApi, |
| 148 | - findSourceFlightAndFlightDateApi | 332 | + findSourceFlightAndFlightDateApi, |
| 149 | - } from "@/api/sourceFlightRules"; | 333 | +} from "@/api/sourceFlightRules"; |
| 150 | - export default { | 334 | +export default { |
| 151 | - name: "FlightRandConfig", | 335 | + name: "FlightRandConfig", |
| 152 | - data() { | 336 | + data() { |
| 153 | - return { | 337 | + return { |
| 154 | - // data 中设定 | 338 | + // data 中设定 |
| 155 | - pickerOptionsStart: { | 339 | + pickerOptionsStart: { |
| 156 | - disabledDate: time => { | 340 | + disabledDate: (time) => { |
| 157 | - let endDateVal = this.form.endDate; | 341 | + let endDateVal = this.form.endDate; |
| 158 | - if (endDateVal) { | 342 | + if (endDateVal) { |
| 159 | - return time.getTime() > new Date(endDateVal).getTime() || time.getTime() < new Date().getTime() - 24 * | 343 | + return ( |
| 160 | - 60 * 60 * 1000; | 344 | + time.getTime() > new Date(endDateVal).getTime() || |
| 161 | - } else { | 345 | + time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000 |
| 162 | - return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000; | 346 | + ); |
| 163 | - } | 347 | + } else { |
| 348 | + return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000; | ||
| 164 | } | 349 | } |
| 165 | }, | 350 | }, |
| 166 | - pickerOptionsEnd: { | 351 | + }, |
| 167 | - disabledDate: time => { | 352 | + pickerOptionsEnd: { |
| 168 | - let beginDateVal = this.form.startDate; | 353 | + disabledDate: (time) => { |
| 169 | - if (beginDateVal) { | 354 | + let beginDateVal = this.form.startDate; |
| 170 | - return time.getTime() < new Date(beginDateVal).getTime(); | 355 | + if (beginDateVal) { |
| 171 | - } else { | 356 | + return time.getTime() < new Date(beginDateVal).getTime(); |
| 172 | - return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000; | 357 | + } else { |
| 173 | - } | 358 | + return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000; |
| 174 | } | 359 | } |
| 175 | }, | 360 | }, |
| 361 | + }, | ||
| 176 | 362 | ||
| 177 | - //周期段 | 363 | + //周期段 |
| 178 | - dayOfWeekList: ['D1', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7'], | 364 | + dayOfWeekList: ["D1", "D2", "D3", "D4", "D5", "D6", "D7"], |
| 179 | - // 遮罩层 | 365 | + // 遮罩层 |
| 180 | - loading: false, | 366 | + loading: false, |
| 181 | - // 遮罩层 | 367 | + // 遮罩层 |
| 182 | - loadingFlightDate: false, | 368 | + loadingFlightDate: false, |
| 183 | - // 弹出层标题 | 369 | + // 弹出层标题 |
| 184 | - title: "", | 370 | + title: "", |
| 185 | - // 总条数 | 371 | + // 总条数 |
| 186 | - total: 0, | 372 | + total: 0, |
| 187 | - // 原航班规则数据 | 373 | + // 原航班规则数据 |
| 188 | - sourceFlightRulesList: [], | 374 | + sourceFlightRulesList: [], |
| 189 | - //目的航班数据 | 375 | + //目的航班数据 |
| 190 | - sourceFlightAndFlightDate: [], | 376 | + sourceFlightAndFlightDate: [], |
| 191 | - statusList: [{ | 377 | + statusList: [ |
| 192 | - 'id': 1, | 378 | + { |
| 193 | - 'name': '有效' | 379 | + id: 1, |
| 194 | - }, { | 380 | + name: "有效", |
| 195 | - 'id': 3, | ||
| 196 | - 'name': '停用' | ||
| 197 | - }], | ||
| 198 | - // 新增修改查看规则弹出层 | ||
| 199 | - open: false, | ||
| 200 | - // 是否显示查看目的航班弹出层 | ||
| 201 | - openFlightDate: false, | ||
| 202 | - // 查询参数 | ||
| 203 | - queryParams: { | ||
| 204 | - start: 0, //当前条数【代表第几条数据 +1开始】 | ||
| 205 | - pageNum: 1, | ||
| 206 | - limit: 20, //一页显示多少条数据 | ||
| 207 | - sourceFlightNo: undefined, //原航班号 | ||
| 208 | - status: undefined, //状态 | ||
| 209 | - flightDate: undefined //日期 | ||
| 210 | }, | 381 | }, |
| 211 | - dayOfWeek: [], | 382 | + { |
| 212 | - // 表单参数 | 383 | + id: 3, |
| 213 | - form: { | 384 | + name: "停用", |
| 214 | - dayOfWeek: [] | ||
| 215 | }, | 385 | }, |
| 216 | - // 表单校验 | 386 | + ], |
| 217 | - rules: { | 387 | + // 新增修改查看规则弹出层 |
| 218 | - sourceFlightNo: [{ | 388 | + open: false, |
| 389 | + // 是否显示查看目的航班弹出层 | ||
| 390 | + openFlightDate: false, | ||
| 391 | + // 查询参数 | ||
| 392 | + queryParams: { | ||
| 393 | + start: 0, //当前条数【代表第几条数据 +1开始】 | ||
| 394 | + pageNum: 1, | ||
| 395 | + limit: 20, //一页显示多少条数据 | ||
| 396 | + sourceFlightNo: undefined, //原航班号 | ||
| 397 | + status: undefined, //状态 | ||
| 398 | + flightDate: undefined, //日期 | ||
| 399 | + }, | ||
| 400 | + dayOfWeek: [], | ||
| 401 | + // 表单参数 | ||
| 402 | + form: { | ||
| 403 | + dayOfWeek: [], | ||
| 404 | + }, | ||
| 405 | + // 表单校验 | ||
| 406 | + rules: { | ||
| 407 | + sourceFlightNo: [ | ||
| 408 | + { | ||
| 219 | required: true, | 409 | required: true, |
| 220 | message: "ACCS原航班号不能为空", | 410 | message: "ACCS原航班号不能为空", |
| 221 | - trigger: "blur" | 411 | + trigger: "blur", |
| 222 | - }], | 412 | + }, |
| 223 | - flightRank: [{ | 413 | + ], |
| 414 | + flightRank: [ | ||
| 415 | + { | ||
| 224 | required: true, | 416 | required: true, |
| 225 | message: "配载航班不能为空", | 417 | message: "配载航班不能为空", |
| 226 | - trigger: "blur" | 418 | + trigger: "blur", |
| 227 | - }], | ||
| 228 | - } | ||
| 229 | - }; | ||
| 230 | - }, | ||
| 231 | - created() { | ||
| 232 | - this.findSourceFlightRules(); | ||
| 233 | - }, | ||
| 234 | - methods: { | ||
| 235 | - //跳转到查看,修改页面 | ||
| 236 | - handleClick(flightiId, handle) { | ||
| 237 | - this.openFlightDate = false | ||
| 238 | - this.$router.push({ | ||
| 239 | - name: "FlightAllocConfigInfo", | ||
| 240 | - params: { | ||
| 241 | - handle: handle, | ||
| 242 | - id: flightiId | ||
| 243 | }, | 419 | }, |
| 244 | - }); | 420 | + ], |
| 245 | - | ||
| 246 | }, | 421 | }, |
| 247 | - /** 查询原航班顺位规则*/ | 422 | + }; |
| 248 | - findSourceFlightRules() { | 423 | + }, |
| 249 | - this.loading = true; | 424 | + created() { |
| 250 | - if (this.queryParams.pageNum > 1) { | 425 | + this.findSourceFlightRules(); |
| 251 | - this.queryParams.start = (this.queryParams.pageNum - 1) * this.queryParams.limit | 426 | + }, |
| 427 | + methods: { | ||
| 428 | + //跳转到查看,修改页面 | ||
| 429 | + handleClick(flightiId, handle) { | ||
| 430 | + this.openFlightDate = false; | ||
| 431 | + this.$router.push({ | ||
| 432 | + name: "FlightAllocConfigInfo", | ||
| 433 | + params: { | ||
| 434 | + handle: handle, | ||
| 435 | + id: flightiId, | ||
| 436 | + }, | ||
| 437 | + }); | ||
| 438 | + }, | ||
| 439 | + /** 查询原航班顺位规则*/ | ||
| 440 | + findSourceFlightRules() { | ||
| 441 | + this.loading = true; | ||
| 442 | + if (this.queryParams.pageNum > 1) { | ||
| 443 | + this.queryParams.start = | ||
| 444 | + (this.queryParams.pageNum - 1) * this.queryParams.limit; | ||
| 445 | + } else { | ||
| 446 | + this.queryParams.start = 0; | ||
| 447 | + } | ||
| 448 | + findSourceFlightRulesApi(this.queryParams).then((response) => { | ||
| 449 | + if (response.code == 200) { | ||
| 450 | + this.sourceFlightRulesList = response.data.list; | ||
| 451 | + this.total = response.data.totalCount; | ||
| 452 | + this.loading = false; | ||
| 252 | } else { | 453 | } else { |
| 253 | - this.queryParams.start = 0; | 454 | + this.msgError(response.msg); |
| 254 | } | 455 | } |
| 255 | - findSourceFlightRulesApi(this.queryParams).then(response => { | 456 | + }); |
| 256 | - if (response.code == 200) { | 457 | + }, |
| 257 | - this.sourceFlightRulesList = response.data.list; | 458 | + /** 新增按钮操作 */ |
| 258 | - this.total = response.data.totalCount; | 459 | + handleAdd() { |
| 259 | - this.loading = false; | 460 | + this.form = {}; |
| 260 | - } else { | 461 | + this.open = true; |
| 261 | - this.msgError(response.msg); | 462 | + this.title = "添加ACCS原航班顺位规则"; |
| 262 | - } | 463 | + this.form.id = -1; |
| 263 | - | 464 | + this.dayOfWeek = []; |
| 465 | + }, | ||
| 466 | + /** 修改按钮操作 */ | ||
| 467 | + handleUpdate(row) { | ||
| 468 | + this.form = {}; | ||
| 469 | + this.dayOfWeek = []; | ||
| 470 | + this.open = true; | ||
| 471 | + this.title = "修改ACCS原航班顺位规则"; | ||
| 472 | + this.form = JSON.parse(JSON.stringify(row)); | ||
| 473 | + this.dayOfWeek = this.form.dayOfWeek | ||
| 474 | + ? this.form.dayOfWeek.split(";") | ||
| 475 | + : []; | ||
| 476 | + //this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : []; | ||
| 477 | + }, | ||
| 478 | + /** 删除 启用 停用按钮操作 */ | ||
| 479 | + handleDeleteorPlayorpause(row, status, statusText) { | ||
| 480 | + //删除前需要停用 | ||
| 481 | + if (status === 0 && row.status != "3") { | ||
| 482 | + this.$message({ | ||
| 483 | + message: "请停用后删除", | ||
| 484 | + type: "warning", | ||
| 264 | }); | 485 | }); |
| 265 | - | 486 | + return; |
| 266 | - }, | 487 | + } |
| 267 | - /** 新增按钮操作 */ | 488 | + |
| 268 | - handleAdd() { | 489 | + this.$confirm("是否确认" + statusText + "此数据项?", "警告", { |
| 269 | - this.form = {}; | 490 | + confirmButtonText: "确定", |
| 270 | - this.open = true; | 491 | + cancelButtonText: "取消", |
| 271 | - this.title = "添加原航班顺位规则"; | 492 | + type: "warning", |
| 272 | - this.form.id = -1; | 493 | + }).then(() => { |
| 273 | - this.dayOfWeek = []; | 494 | + let disable = { |
| 274 | - | 495 | + id: row.id, |
| 275 | - }, | 496 | + status: status, |
| 276 | - /** 修改按钮操作 */ | 497 | + }; |
| 277 | - handleUpdate(row) { | 498 | + delOrEnableORDisableApi(disable) |
| 278 | - | 499 | + .then((response) => { |
| 279 | - this.form = {}; | 500 | + if (response.code == 200) { |
| 280 | - this.dayOfWeek = []; | 501 | + this.findSourceFlightRules(); |
| 281 | - this.open = true; | 502 | + this.msgSuccess(statusText + "成功"); |
| 282 | - this.title = "修改原航班顺位规则"; | 503 | + } else { |
| 283 | - this.form = JSON.parse(JSON.stringify(row)); | 504 | + this.msgError(response.msg); |
| 284 | - this.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : []; | ||
| 285 | - //this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : []; | ||
| 286 | - | ||
| 287 | - }, | ||
| 288 | - /** 删除 启用 停用按钮操作 */ | ||
| 289 | - handleDeleteorPlayorpause(row, status, statusText) { | ||
| 290 | - //删除前需要停用 | ||
| 291 | - if (status === 0 && row.status != '3') { | ||
| 292 | - this.$message({ | ||
| 293 | - message: '请停用后删除', | ||
| 294 | - type: 'warning' | ||
| 295 | - }); | ||
| 296 | - return; | ||
| 297 | - } | ||
| 298 | - | ||
| 299 | - this.$confirm('是否确认' + statusText + '此数据项?', "警告", { | ||
| 300 | - confirmButtonText: "确定", | ||
| 301 | - cancelButtonText: "取消", | ||
| 302 | - type: "warning" | ||
| 303 | - }).then(function() { | ||
| 304 | - | ||
| 305 | - let disable = { | ||
| 306 | - id: row.id, | ||
| 307 | - status: status | ||
| 308 | - }; | ||
| 309 | - | ||
| 310 | - return delOrEnableORDisableApi(disable); | ||
| 311 | - }).then(response => { | ||
| 312 | - if (response.code == 200) { | ||
| 313 | - this.findSourceFlightRules(); | ||
| 314 | - this.msgSuccess(statusText + "成功"); | ||
| 315 | - } else { | ||
| 316 | - this.msgError(response.msg); | ||
| 317 | - } | ||
| 318 | - | ||
| 319 | - }).catch(function() {}); | ||
| 320 | - }, | ||
| 321 | - /** 提交按钮 */ | ||
| 322 | - submitForm: function() { | ||
| 323 | - this.$refs["form"].validate(valid => { | ||
| 324 | - if (valid) { | ||
| 325 | - this.form.dayOfWeek = this.dayOfWeek.sort(); | ||
| 326 | - let formdata = JSON.parse(JSON.stringify(this.form)); | ||
| 327 | - formdata.sourceFlightNo=formdata.sourceFlightNo.trim().toUpperCase(); | ||
| 328 | - formdata.flightRank=formdata.flightRank.trim().toUpperCase(); | ||
| 329 | - if (formdata.startDate === undefined || formdata.startDate == null) { | ||
| 330 | - formdata.startDate = ""; | ||
| 331 | - } | ||
| 332 | - if (formdata.endDate === undefined || formdata.endDate == null) { | ||
| 333 | - formdata.endDate = ""; | ||
| 334 | } | 505 | } |
| 335 | - //处理数据 | 506 | + }) |
| 336 | - sourceFlightRulesSaveApi(formdata).then(response => { | 507 | + .catch(() => {}); |
| 337 | - if (response.code === 200) { | 508 | + }); |
| 338 | - this.msgSuccess("保存成功"); | 509 | + }, |
| 339 | - this.open = false; | 510 | + /** 提交按钮 */ |
| 340 | - this.findSourceFlightRules(); | 511 | + submitForm: function () { |
| 341 | - } else { | 512 | + this.$refs["form"].validate((valid) => { |
| 342 | - this.msgError(response.msg); | 513 | + if (valid) { |
| 343 | - } | 514 | + this.form.dayOfWeek = this.dayOfWeek.sort(); |
| 344 | - }); | 515 | + let formdata = JSON.parse(JSON.stringify(this.form)); |
| 345 | - | 516 | + formdata.sourceFlightNo = formdata.sourceFlightNo |
| 517 | + .trim() | ||
| 518 | + .toUpperCase(); | ||
| 519 | + formdata.flightRank = formdata.flightRank.trim().toUpperCase(); | ||
| 520 | + if (formdata.startDate === undefined || formdata.startDate == null) { | ||
| 521 | + formdata.startDate = ""; | ||
| 346 | } | 522 | } |
| 347 | - }); | 523 | + if (formdata.endDate === undefined || formdata.endDate == null) { |
| 348 | - }, | 524 | + formdata.endDate = ""; |
| 349 | - // 表单重置 | ||
| 350 | - reset() { | ||
| 351 | - this.form = { | ||
| 352 | - | ||
| 353 | - dayOfWeek: [] | ||
| 354 | - | ||
| 355 | - }; | ||
| 356 | - this.resetForm("form"); | ||
| 357 | - }, | ||
| 358 | - /** 查询目的航班*/ | ||
| 359 | - findSourceFlightAndFlightDate() { | ||
| 360 | - //校验原航班号非空 | ||
| 361 | - if (this.queryParams.sourceFlightNo === null || this.queryParams.sourceFlightNo === undefined || this | ||
| 362 | - .queryParams.sourceFlightNo.trim() === '') { | ||
| 363 | - this.$message.warning("ACCS原航班号为空"); | ||
| 364 | - return | ||
| 365 | - } | ||
| 366 | - //校验原日期非空 | ||
| 367 | - if (this.queryParams.flightDate === null || this.queryParams.flightDate === undefined) { | ||
| 368 | - this.$message.warning("日期为空"); | ||
| 369 | - return | ||
| 370 | - } | ||
| 371 | - this.openFlightDate = true; | ||
| 372 | - this.loadingFlightDate = true; | ||
| 373 | - this.sourceFlightAndFlightDate = []; | ||
| 374 | - findSourceFlightAndFlightDateApi(this.queryParams).then(response => { | ||
| 375 | - if (response.code === 200) { | ||
| 376 | - this.sourceFlightAndFlightDate = response.data; | ||
| 377 | - this.loadingFlightDate = false; | ||
| 378 | - } else { | ||
| 379 | - this.msgError(response.msg); | ||
| 380 | } | 525 | } |
| 381 | - | 526 | + //处理数据 |
| 382 | - }); | 527 | + sourceFlightRulesSaveApi(formdata).then((response) => { |
| 383 | - | 528 | + if (response.code === 200) { |
| 384 | - | 529 | + this.msgSuccess("保存成功"); |
| 385 | - }, | 530 | + this.open = false; |
| 386 | - // 目的航班弹出框返回 | 531 | + this.findSourceFlightRules(); |
| 387 | - cancelFlightDate() { | 532 | + } else { |
| 388 | - this.openFlightDate = false; | 533 | + this.msgError(response.msg); |
| 389 | - this.findSourceFlightRules(); | 534 | + } |
| 390 | - }, | 535 | + }); |
| 391 | - // 取消按钮 | ||
| 392 | - cancel() { | ||
| 393 | - this.open = false; | ||
| 394 | - this.findSourceFlightRules(); | ||
| 395 | - //this.reset(); | ||
| 396 | - }, | ||
| 397 | - // 状态字典翻译 | ||
| 398 | - statusFormat(row) { | ||
| 399 | - | ||
| 400 | - if (row.status === '1') { | ||
| 401 | - return '有效' | ||
| 402 | - } else if (row.status === '0') { | ||
| 403 | - return '执行中' | ||
| 404 | - } else if (row.status === '3') { | ||
| 405 | - return '停用' | ||
| 406 | } | 536 | } |
| 407 | - return row.status; | 537 | + }); |
| 408 | - }, | ||
| 409 | - /** 重置按钮操作 */ | ||
| 410 | - resetQuery() { | ||
| 411 | - this.queryParams.sourceFlightNo = undefined | ||
| 412 | - this.resetForm("queryForm"); | ||
| 413 | - this.handleQuery(); | ||
| 414 | - }, | ||
| 415 | - /** 搜索按钮操作 */ | ||
| 416 | - handleQuery() { | ||
| 417 | - this.queryParams.pageNum = 1; | ||
| 418 | - this.queryParams.start = 0; | ||
| 419 | - this.findSourceFlightRules(); | ||
| 420 | - }, | ||
| 421 | - | ||
| 422 | }, | 538 | }, |
| 423 | - computed: { | 539 | + // 表单重置 |
| 424 | - upCase: { | 540 | + reset() { |
| 425 | - get: function() { | 541 | + this.form = { |
| 426 | - return this.queryParams.sourceFlightNo; | 542 | + dayOfWeek: [], |
| 427 | - }, | 543 | + }; |
| 428 | - set: function(val) { | 544 | + this.resetForm("form"); |
| 429 | - this.queryParams.sourceFlightNo = val.toUpperCase(); | 545 | + }, |
| 430 | - }, | 546 | + /** 查询目的航班*/ |
| 547 | + findSourceFlightAndFlightDate() { | ||
| 548 | + //校验原航班号非空 | ||
| 549 | + if ( | ||
| 550 | + this.queryParams.sourceFlightNo === null || | ||
| 551 | + this.queryParams.sourceFlightNo === undefined || | ||
| 552 | + this.queryParams.sourceFlightNo.trim() === "" | ||
| 553 | + ) { | ||
| 554 | + this.$message.warning("ACCS原航班号为空"); | ||
| 555 | + return; | ||
| 556 | + } | ||
| 557 | + //校验原日期非空 | ||
| 558 | + if ( | ||
| 559 | + this.queryParams.flightDate === null || | ||
| 560 | + this.queryParams.flightDate === undefined | ||
| 561 | + ) { | ||
| 562 | + this.$message.warning("日期为空"); | ||
| 563 | + return; | ||
| 564 | + } | ||
| 565 | + this.openFlightDate = true; | ||
| 566 | + this.loadingFlightDate = true; | ||
| 567 | + this.sourceFlightAndFlightDate = []; | ||
| 568 | + findSourceFlightAndFlightDateApi(this.queryParams).then((response) => { | ||
| 569 | + if (response.code === 200) { | ||
| 570 | + this.sourceFlightAndFlightDate = response.data; | ||
| 571 | + this.loadingFlightDate = false; | ||
| 572 | + } else { | ||
| 573 | + this.msgError(response.msg); | ||
| 574 | + } | ||
| 575 | + }); | ||
| 576 | + }, | ||
| 577 | + // 目的航班弹出框返回 | ||
| 578 | + cancelFlightDate() { | ||
| 579 | + this.openFlightDate = false; | ||
| 580 | + this.findSourceFlightRules(); | ||
| 581 | + }, | ||
| 582 | + // 取消按钮 | ||
| 583 | + cancel() { | ||
| 584 | + this.open = false; | ||
| 585 | + this.findSourceFlightRules(); | ||
| 586 | + //this.reset(); | ||
| 587 | + }, | ||
| 588 | + // 状态字典翻译 | ||
| 589 | + statusFormat(row) { | ||
| 590 | + if (row.status === "1") { | ||
| 591 | + return "有效"; | ||
| 592 | + } else if (row.status === "0") { | ||
| 593 | + return "执行中"; | ||
| 594 | + } else if (row.status === "3") { | ||
| 595 | + return "停用"; | ||
| 596 | + } | ||
| 597 | + return row.status; | ||
| 598 | + }, | ||
| 599 | + /** 重置按钮操作 */ | ||
| 600 | + resetQuery() { | ||
| 601 | + this.queryParams.sourceFlightNo = undefined; | ||
| 602 | + this.resetForm("queryForm"); | ||
| 603 | + this.handleQuery(); | ||
| 604 | + }, | ||
| 605 | + /** 搜索按钮操作 */ | ||
| 606 | + handleQuery() { | ||
| 607 | + this.queryParams.pageNum = 1; | ||
| 608 | + this.queryParams.start = 0; | ||
| 609 | + this.findSourceFlightRules(); | ||
| 610 | + }, | ||
| 611 | + }, | ||
| 612 | + computed: { | ||
| 613 | + upCase: { | ||
| 614 | + get: function () { | ||
| 615 | + return this.queryParams.sourceFlightNo; | ||
| 616 | + }, | ||
| 617 | + set: function (val) { | ||
| 618 | + this.queryParams.sourceFlightNo = val.toUpperCase(); | ||
| 431 | }, | 619 | }, |
| 432 | }, | 620 | }, |
| 433 | - }; | 621 | + }, |
| 622 | +}; | ||
| 434 | </script> | 623 | </script> |
| 435 | <style> | 624 | <style> |
| 436 | - | ||
| 437 | - | ||
| 438 | </style> | 625 | </style> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | - <div> | 2 | + <div class="app-container"> |
| 3 | - <el-form class="form-header" :model="queryParams" label-position="right" label-width="auto" size="medium"> | 3 | + <el-form |
| 4 | + class="form-header" | ||
| 5 | + :model="queryParams" | ||
| 6 | + label-position="right" | ||
| 7 | + label-width="auto" | ||
| 8 | + size="medium" | ||
| 9 | + > | ||
| 4 | <el-row> | 10 | <el-row> |
| 5 | <el-col :span="6"> | 11 | <el-col :span="6"> |
| 6 | <el-form-item label="航班日期从" prop="fltDateStart"> | 12 | <el-form-item label="航班日期从" prop="fltDateStart"> |
| ... | @@ -87,27 +93,26 @@ | ... | @@ -87,27 +93,26 @@ |
| 87 | </el-switch> | 93 | </el-switch> |
| 88 | </el-col> | 94 | </el-col> |
| 89 | </el-row> | 95 | </el-row> |
| 90 | - <div style="margin-top:25px"> | 96 | + <div style="margin-top: 25px"> |
| 91 | - <el-button | 97 | + <el-button |
| 92 | - type="primary" | 98 | + type="primary" |
| 93 | - icon="el-icon-search" | 99 | + icon="el-icon-search" |
| 94 | - size="mini" | 100 | + size="mini" |
| 95 | - @click="handleQuery" | 101 | + @click="handleQuery" |
| 96 | - >搜索</el-button | 102 | + >搜索</el-button |
| 97 | - > | 103 | + > |
| 98 | - <el-button | 104 | + <el-button |
| 99 | - type="warning" | 105 | + type="warning" |
| 100 | - :disabled="tableData.length == 0" | 106 | + :disabled="tableData.length == 0" |
| 101 | - @click="xlse()" | 107 | + @click="xlse()" |
| 102 | - :loading="downLoadingTip.downloading" | 108 | + :loading="downLoadingTip.downloading" |
| 103 | - icon="el-icon-download" | 109 | + icon="el-icon-download" |
| 104 | - size="mini" | 110 | + size="mini" |
| 105 | - >{{ | 111 | + >{{ |
| 106 | - downLoadingTip.downloading ? downLoadingTip.tip : "导出" | 112 | + downLoadingTip.downloading ? downLoadingTip.tip : "导出" |
| 107 | - }}</el-button | 113 | + }}</el-button |
| 108 | - > | 114 | + > |
| 109 | </div> | 115 | </div> |
| 110 | - | ||
| 111 | </el-form> | 116 | </el-form> |
| 112 | 117 | ||
| 113 | <el-table | 118 | <el-table |
| ... | @@ -122,23 +127,27 @@ | ... | @@ -122,23 +127,27 @@ |
| 122 | label="运单号" | 127 | label="运单号" |
| 123 | align="center" | 128 | align="center" |
| 124 | prop="waybillNo" | 129 | prop="waybillNo" |
| 130 | + width="150" | ||
| 125 | /> | 131 | /> |
| 126 | <el-table-column | 132 | <el-table-column |
| 127 | :show-overflow-tooltip="true" | 133 | :show-overflow-tooltip="true" |
| 128 | label="品牌描述" | 134 | label="品牌描述" |
| 129 | align="center" | 135 | align="center" |
| 130 | prop="nameDescription" | 136 | prop="nameDescription" |
| 137 | + width="150" | ||
| 131 | /> | 138 | /> |
| 132 | <el-table-column | 139 | <el-table-column |
| 133 | label="航班日期" | 140 | label="航班日期" |
| 134 | align="center" | 141 | align="center" |
| 135 | prop="fltDate" | 142 | prop="fltDate" |
| 143 | + width="150" | ||
| 136 | /> | 144 | /> |
| 137 | - <el-table-column label="航班号" align="center" prop="fltNo" width="100"/> | 145 | + <el-table-column label="航班号" align="center" prop="fltNo" /> |
| 138 | <el-table-column | 146 | <el-table-column |
| 139 | label="航班路线" | 147 | label="航班路线" |
| 140 | align="center" | 148 | align="center" |
| 141 | prop="route" | 149 | prop="route" |
| 150 | + width="150" | ||
| 142 | /> | 151 | /> |
| 143 | <el-table-column | 152 | <el-table-column |
| 144 | label="配置航班类型" | 153 | label="配置航班类型" |
| ... | @@ -146,9 +155,9 @@ | ... | @@ -146,9 +155,9 @@ |
| 146 | prop="kindName" | 155 | prop="kindName" |
| 147 | width="130" | 156 | width="130" |
| 148 | /> | 157 | /> |
| 149 | - <el-table-column label="尺寸" align="center" prop="sizeStr" width="70"/> | 158 | + <el-table-column label="尺寸" align="center" prop="sizeStr" /> |
| 150 | - <el-table-column label="件数" align="center" prop="qty" width="70"/> | 159 | + <el-table-column label="件数" align="center" prop="qty" /> |
| 151 | - <el-table-column label="实际重量" align="center" prop="actualWeight" width="100"/> | 160 | + <el-table-column label="实际重量" align="center" prop="actualWeight" /> |
| 152 | <el-table-column | 161 | <el-table-column |
| 153 | label="创建时间" | 162 | label="创建时间" |
| 154 | align="center" | 163 | align="center" |
| ... | @@ -255,12 +264,6 @@ export default { | ... | @@ -255,12 +264,6 @@ export default { |
| 255 | this.tableData = response.data.list; | 264 | this.tableData = response.data.list; |
| 256 | this.total = response.data.totalCount; | 265 | this.total = response.data.totalCount; |
| 257 | this.loading = false; | 266 | this.loading = false; |
| 258 | - if(response.data.list.length == 0){ | ||
| 259 | - this.$message({ | ||
| 260 | - message: "未查询到数据", | ||
| 261 | - type: "warning", | ||
| 262 | - }); | ||
| 263 | - } | ||
| 264 | } else { | 267 | } else { |
| 265 | this.msgError(response.msg); | 268 | this.msgError(response.msg); |
| 266 | } | 269 | } | ... | ... |
| ... | @@ -81,7 +81,6 @@ | ... | @@ -81,7 +81,6 @@ |
| 81 | uploadExcel(option) { | 81 | uploadExcel(option) { |
| 82 | //上传excel | 82 | //上传excel |
| 83 | const file = option.file; | 83 | const file = option.file; |
| 84 | - console.log(option); | ||
| 85 | this.loading=true; | 84 | this.loading=true; |
| 86 | importcaPreReview(file, this.form.type).then((res) => { | 85 | importcaPreReview(file, this.form.type).then((res) => { |
| 87 | this.loading=false; | 86 | this.loading=false; | ... | ... |
| ... | @@ -72,7 +72,7 @@ import { | ... | @@ -72,7 +72,7 @@ import { |
| 72 | importFlight, | 72 | importFlight, |
| 73 | } from "@/api/flightInfoImport"; | 73 | } from "@/api/flightInfoImport"; |
| 74 | export default { | 74 | export default { |
| 75 | - name:"FlightInformationImport", | 75 | + name: "FlightInformationImport", |
| 76 | data() { | 76 | data() { |
| 77 | return { | 77 | return { |
| 78 | flightType: [], | 78 | flightType: [], |
| ... | @@ -125,15 +125,14 @@ export default { | ... | @@ -125,15 +125,14 @@ export default { |
| 125 | uploadExcel(option) { | 125 | uploadExcel(option) { |
| 126 | //上传excel | 126 | //上传excel |
| 127 | const file = option.file; | 127 | const file = option.file; |
| 128 | - console.log(option); | ||
| 129 | importFlight(file, this.form.type).then((res) => { | 128 | importFlight(file, this.form.type).then((res) => { |
| 130 | if (res.code != 200) { | 129 | if (res.code != 200) { |
| 131 | if (res.code == 603) { | 130 | if (res.code == 603) { |
| 132 | - this.$alert(res.msg , "提示", { | 131 | + this.$alert(res.msg, "提示", { |
| 133 | confirmButtonText: "确定", | 132 | confirmButtonText: "确定", |
| 134 | type: "warning", | 133 | type: "warning", |
| 135 | }); | 134 | }); |
| 136 | - }else { | 135 | + } else { |
| 137 | this.$message.error(res.msg); | 136 | this.$message.error(res.msg); |
| 138 | this.tableData = res.data; | 137 | this.tableData = res.data; |
| 139 | } | 138 | } |
| ... | @@ -172,13 +171,6 @@ export default { | ... | @@ -172,13 +171,6 @@ export default { |
| 172 | }, | 171 | }, |
| 173 | }; | 172 | }; |
| 174 | </script> | 173 | </script> |
| 175 | -<style rel="stylesheet/scss" lang="scss"> | 174 | + |
| 176 | -.upload-demo { | 175 | +<style> |
| 177 | - float: right; | ||
| 178 | -} | ||
| 179 | -.el-upload-list { | ||
| 180 | - display: inline-block; | ||
| 181 | - margin-left: 10px; | ||
| 182 | - vertical-align: top; | ||
| 183 | -} | ||
| 184 | </style> | 176 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" size="medium"> | 3 | + <el-form |
| 4 | + class="form-header" | ||
| 5 | + :model="queryParams" | ||
| 6 | + ref="queryForm" | ||
| 7 | + label-position="right" | ||
| 8 | + label-width="auto" | ||
| 9 | + size="medium" | ||
| 10 | + > | ||
| 4 | <el-row> | 11 | <el-row> |
| 5 | <el-col :span="6"> | 12 | <el-col :span="6"> |
| 6 | <el-form-item label="航班日期从" prop="fltDateStart"> | 13 | <el-form-item label="航班日期从" prop="fltDateStart"> |
| 7 | - <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateStart" type="date" placeholder="选择日期"> | 14 | + <el-date-picker |
| 15 | + class="formItem" | ||
| 16 | + value-format="yyyy-MM-dd" | ||
| 17 | + v-model="queryParams.fltDateStart" | ||
| 18 | + type="date" | ||
| 19 | + placeholder="选择日期" | ||
| 20 | + > | ||
| 8 | </el-date-picker> | 21 | </el-date-picker> |
| 9 | </el-form-item> | 22 | </el-form-item> |
| 10 | </el-col> | 23 | </el-col> |
| 11 | 24 | ||
| 12 | <el-col :span="6"> | 25 | <el-col :span="6"> |
| 13 | <el-form-item label="到" prop="fltDateEnd"> | 26 | <el-form-item label="到" prop="fltDateEnd"> |
| 14 | - <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateEnd" type="date" placeholder="选择日期"> | 27 | + <el-date-picker |
| 28 | + class="formItem" | ||
| 29 | + value-format="yyyy-MM-dd" | ||
| 30 | + v-model="queryParams.fltDateEnd" | ||
| 31 | + type="date" | ||
| 32 | + placeholder="选择日期" | ||
| 33 | + > | ||
| 15 | </el-date-picker> | 34 | </el-date-picker> |
| 16 | </el-form-item> | 35 | </el-form-item> |
| 17 | </el-col> | 36 | </el-col> |
| 18 | 37 | ||
| 19 | <el-col :span="6"> | 38 | <el-col :span="6"> |
| 20 | <el-form-item label="航班号" prop="fltNo"> | 39 | <el-form-item label="航班号" prop="fltNo"> |
| 21 | - <el-input class="formItem" v-model="queryParams.fltNo" placeholder="请输入航班号" clearable /> | 40 | + <el-input |
| 41 | + class="formItem" | ||
| 42 | + v-model="queryParams.fltNo" | ||
| 43 | + placeholder="请输入航班号" | ||
| 44 | + clearable | ||
| 45 | + /> | ||
| 22 | </el-form-item> | 46 | </el-form-item> |
| 23 | </el-col> | 47 | </el-col> |
| 24 | 48 | ||
| 25 | <el-col :span="6"> | 49 | <el-col :span="6"> |
| 26 | <el-form-item label="航班类型" prop="typeId"> | 50 | <el-form-item label="航班类型" prop="typeId"> |
| 27 | - <el-select class="formItem" v-model="queryParams.typeId" placeholder="请选择航班类型" clearable> | 51 | + <el-select |
| 28 | - <el-option v-for="dict in flightTypelist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> | 52 | + class="formItem" |
| 53 | + v-model="queryParams.typeId" | ||
| 54 | + placeholder="请选择航班类型" | ||
| 55 | + clearable | ||
| 56 | + > | ||
| 57 | + <el-option | ||
| 58 | + v-for="dict in flightTypelist" | ||
| 59 | + :key="dict.id" | ||
| 60 | + :label="dict.chineseName" | ||
| 61 | + :value="dict.id" | ||
| 62 | + /> | ||
| 29 | </el-select> | 63 | </el-select> |
| 30 | </el-form-item> | 64 | </el-form-item> |
| 31 | </el-col> | 65 | </el-col> |
| 32 | 66 | ||
| 33 | <el-col :span="6"> | 67 | <el-col :span="6"> |
| 34 | <el-form-item label="航班状态" prop="statusId"> | 68 | <el-form-item label="航班状态" prop="statusId"> |
| 35 | - <el-select class="formItem" v-model="queryParams.statusId" placeholder="请选择航班状态" clearable> | 69 | + <el-select |
| 36 | - <el-option v-for="dict in flightStatuslist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> | 70 | + class="formItem" |
| 71 | + v-model="queryParams.statusId" | ||
| 72 | + placeholder="请选择航班状态" | ||
| 73 | + clearable | ||
| 74 | + > | ||
| 75 | + <el-option | ||
| 76 | + v-for="dict in flightStatuslist" | ||
| 77 | + :key="dict.id" | ||
| 78 | + :label="dict.chineseName" | ||
| 79 | + :value="dict.id" | ||
| 80 | + /> | ||
| 37 | </el-select> | 81 | </el-select> |
| 38 | </el-form-item> | 82 | </el-form-item> |
| 39 | </el-col> | 83 | </el-col> |
| 40 | 84 | ||
| 41 | <el-col :span="6"> | 85 | <el-col :span="6"> |
| 42 | <el-form-item label="航班种类" prop="flightKindId"> | 86 | <el-form-item label="航班种类" prop="flightKindId"> |
| 43 | - <el-select class="formItem" v-model="queryParams.flightKindId" placeholder="请选择航班种类" clearable> | 87 | + <el-select |
| 44 | - <el-option v-for="dict in flightKindlist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> | 88 | + class="formItem" |
| 89 | + v-model="queryParams.flightKindId" | ||
| 90 | + placeholder="请选择航班种类" | ||
| 91 | + clearable | ||
| 92 | + > | ||
| 93 | + <el-option | ||
| 94 | + v-for="dict in flightKindlist" | ||
| 95 | + :key="dict.id" | ||
| 96 | + :label="dict.chineseName" | ||
| 97 | + :value="dict.id" | ||
| 98 | + /> | ||
| 45 | </el-select> | 99 | </el-select> |
| 46 | </el-form-item> | 100 | </el-form-item> |
| 47 | </el-col> | 101 | </el-col> |
| 48 | - | ||
| 49 | </el-row> | 102 | </el-row> |
| 50 | 103 | ||
| 51 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 104 | + <el-button |
| 52 | - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 105 | + type="primary" |
| 53 | - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> | 106 | + icon="el-icon-search" |
| 54 | - <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除 | 107 | + size="mini" |
| 55 | - </el-button> | 108 | + @click="handleQuery" |
| 56 | - <el-button type="primary" icon="el-icon-circle-check" size="mini" @click="handleFlightStatus('flightStatus10')">自动配舱开启</el-button> | 109 | + >搜索</el-button |
| 57 | - <el-button type="primary" icon="el-icon-circle-close" size="mini" @click="handleFlightStatus('flightStatus80')">自动配舱关闭</el-button> | 110 | + > |
| 58 | - | 111 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| 112 | + >重置</el-button | ||
| 113 | + > | ||
| 114 | + <el-button | ||
| 115 | + type="primary" | ||
| 116 | + icon="el-icon-plus" | ||
| 117 | + size="mini" | ||
| 118 | + @click="handleAdd" | ||
| 119 | + >新增</el-button | ||
| 120 | + > | ||
| 121 | + <el-button | ||
| 122 | + type="danger" | ||
| 123 | + icon="el-icon-delete" | ||
| 124 | + size="mini" | ||
| 125 | + :disabled="multiple" | ||
| 126 | + @click="handleDelete" | ||
| 127 | + >删除 | ||
| 128 | + </el-button> | ||
| 129 | + <el-button | ||
| 130 | + type="primary" | ||
| 131 | + icon="el-icon-circle-check" | ||
| 132 | + size="mini" | ||
| 133 | + @click="handleFlightStatus('flightStatus10')" | ||
| 134 | + >自动配舱开启</el-button | ||
| 135 | + > | ||
| 136 | + <el-button | ||
| 137 | + type="primary" | ||
| 138 | + icon="el-icon-circle-close" | ||
| 139 | + size="mini" | ||
| 140 | + @click="handleFlightStatus('flightStatus80')" | ||
| 141 | + >自动配舱关闭</el-button | ||
| 142 | + > | ||
| 59 | </el-form> | 143 | </el-form> |
| 60 | <!-- <el-row :gutter="10" class="mb8"> | 144 | <!-- <el-row :gutter="10" class="mb8"> |
| 61 | <el-col :span="1.5"> | 145 | <el-col :span="1.5"> |
| ... | @@ -70,94 +154,254 @@ | ... | @@ -70,94 +154,254 @@ |
| 70 | </el-button> | 154 | </el-button> |
| 71 | </el-col> | 155 | </el-col> |
| 72 | </el-row> --> | 156 | </el-row> --> |
| 73 | - <el-table height="550" highlight-current-row border stripe v-loading="loading" :data="findAllFltDatList" size="mini" | 157 | + <el-table |
| 74 | - @selection-change="handleSelectionChange"> | 158 | + height="550" |
| 159 | + highlight-current-row | ||
| 160 | + border | ||
| 161 | + stripe | ||
| 162 | + v-loading="loading" | ||
| 163 | + :data="findAllFltDatList" | ||
| 164 | + size="small" | ||
| 165 | + @selection-change="handleSelectionChange" | ||
| 166 | + > | ||
| 75 | <el-table-column type="selection" width="55" align="center" /> | 167 | <el-table-column type="selection" width="55" align="center" /> |
| 76 | - <el-table-column label="航班日期" align="center" prop="fltDate" width="120" /> | 168 | + <el-table-column |
| 77 | - <el-table-column label="航班起飞时间" align="center" prop="takeOffTime" width="120" /> | 169 | + label="航班日期" |
| 170 | + align="center" | ||
| 171 | + prop="fltDate" | ||
| 172 | + width="120" | ||
| 173 | + /> | ||
| 174 | + <el-table-column | ||
| 175 | + label="航班起飞时间" | ||
| 176 | + align="center" | ||
| 177 | + prop="takeOffTime" | ||
| 178 | + width="120" | ||
| 179 | + /> | ||
| 78 | <el-table-column label="航班号" align="center" prop="fltNo" width="150"/> | 180 | <el-table-column label="航班号" align="center" prop="fltNo" width="150"/> |
| 79 | <el-table-column label="航班路线" align="center" prop="route" width="150" /> | 181 | <el-table-column label="航班路线" align="center" prop="route" width="150" /> |
| 80 | - <el-table-column label="航班类型" align="center" prop="typeName" width="100" /> | 182 | + <el-table-column |
| 81 | - <el-table-column label="航班种类" align="center" prop="flightKindName" width="130" /> | 183 | + label="航班类型" |
| 184 | + align="center" | ||
| 185 | + prop="typeName" | ||
| 186 | + width="100" | ||
| 187 | + /> | ||
| 188 | + <el-table-column | ||
| 189 | + label="航班种类" | ||
| 190 | + align="center" | ||
| 191 | + prop="flightKindName" | ||
| 192 | + width="130" | ||
| 193 | + /> | ||
| 82 | <el-table-column label="航班状态" align="center" prop="statusName" /> | 194 | <el-table-column label="航班状态" align="center" prop="statusName" /> |
| 83 | - <el-table-column label="总重量" align="center" prop="totalWeight" width="130" /> | 195 | + <el-table-column |
| 84 | - <el-table-column label="原始重量(KG)" align="center" prop="originalWeight" width="130" /> | 196 | + label="总重量" |
| 85 | - <el-table-column label="总体积(cm³)" align="center" prop="totalVolume" width="130" /> | 197 | + align="center" |
| 86 | - <el-table-column label="是否限制一票一件" align="center" prop="ticketToPiece" width="150" | 198 | + prop="totalWeight" |
| 87 | - :formatter="ticketToPieceFormat" /> | 199 | + width="130" |
| 88 | - <el-table-column label="是否需要预审" align="center" prop="needRequired" width="150" :formatter="needRequiredFormat" /> | 200 | + /> |
| 89 | - <el-table-column label="额外增重百分比" align="center" prop="extraWeightPercent" width="150" /> | 201 | + <el-table-column |
| 90 | - <el-table-column label="高价百分比" align="center" prop="highPriceWeightPercent" width="150" /> | 202 | + label="原始重量(KG)" |
| 91 | - <el-table-column label="低价百分比" align="center" prop="lowPriceWeightPercent" width="150" /> | 203 | + align="center" |
| 92 | - <el-table-column label="是否开启高地价" align="center" prop="highLowPriceFlg" width="150" | 204 | + prop="originalWeight" |
| 93 | - :formatter="highLowPriceFlgFormat" /> | 205 | + width="130" |
| 94 | - <el-table-column label="已配重量" align="center" prop="alloctedWeight" width="150" /> | 206 | + /> |
| 95 | - <el-table-column label="已配体积(cm³)" align="center" prop="alloctedVolume" width="150" /> | 207 | + <el-table-column |
| 96 | - <el-table-column label="航班优先级" align="center" prop="priorityName" width="150" /> | 208 | + label="总体积(cm³)" |
| 97 | - <el-table-column label="配舱优先级" align="center" prop="priorityRuleName" width="150" /> | 209 | + align="center" |
| 98 | - <el-table-column label="创建人" align="center" prop="createUserName" width="120" /> | 210 | + prop="totalVolume" |
| 99 | - <el-table-column label="创建时间" align="center" prop="createTime" width="155" /> | 211 | + width="130" |
| 212 | + /> | ||
| 213 | + <el-table-column | ||
| 214 | + label="是否限制一票一件" | ||
| 215 | + align="center" | ||
| 216 | + prop="ticketToPiece" | ||
| 217 | + width="150" | ||
| 218 | + :formatter="ticketToPieceFormat" | ||
| 219 | + /> | ||
| 220 | + <el-table-column | ||
| 221 | + label="是否需要预审" | ||
| 222 | + align="center" | ||
| 223 | + prop="needRequired" | ||
| 224 | + width="150" | ||
| 225 | + :formatter="needRequiredFormat" | ||
| 226 | + /> | ||
| 227 | + <el-table-column | ||
| 228 | + label="额外增重百分比" | ||
| 229 | + align="center" | ||
| 230 | + prop="extraWeightPercent" | ||
| 231 | + width="150" | ||
| 232 | + /> | ||
| 233 | + <el-table-column | ||
| 234 | + label="高价百分比" | ||
| 235 | + align="center" | ||
| 236 | + prop="highPriceWeightPercent" | ||
| 237 | + width="150" | ||
| 238 | + /> | ||
| 239 | + <el-table-column | ||
| 240 | + label="低价百分比" | ||
| 241 | + align="center" | ||
| 242 | + prop="lowPriceWeightPercent" | ||
| 243 | + width="150" | ||
| 244 | + /> | ||
| 245 | + <el-table-column | ||
| 246 | + label="是否开启高地价" | ||
| 247 | + align="center" | ||
| 248 | + prop="highLowPriceFlg" | ||
| 249 | + width="150" | ||
| 250 | + :formatter="highLowPriceFlgFormat" | ||
| 251 | + /> | ||
| 252 | + <el-table-column | ||
| 253 | + label="已配重量" | ||
| 254 | + align="center" | ||
| 255 | + prop="alloctedWeight" | ||
| 256 | + width="150" | ||
| 257 | + /> | ||
| 258 | + <el-table-column | ||
| 259 | + label="已配体积(cm³)" | ||
| 260 | + align="center" | ||
| 261 | + prop="alloctedVolume" | ||
| 262 | + width="150" | ||
| 263 | + /> | ||
| 264 | + <el-table-column | ||
| 265 | + label="航班优先级" | ||
| 266 | + align="center" | ||
| 267 | + prop="priorityName" | ||
| 268 | + width="150" | ||
| 269 | + /> | ||
| 270 | + <el-table-column | ||
| 271 | + label="配舱优先级" | ||
| 272 | + align="center" | ||
| 273 | + prop="priorityRuleName" | ||
| 274 | + width="150" | ||
| 275 | + /> | ||
| 276 | + <el-table-column | ||
| 277 | + label="创建人" | ||
| 278 | + align="center" | ||
| 279 | + prop="createUserName" | ||
| 280 | + width="120" | ||
| 281 | + /> | ||
| 282 | + <el-table-column | ||
| 283 | + label="创建时间" | ||
| 284 | + align="center" | ||
| 285 | + prop="createTime" | ||
| 286 | + width="155" | ||
| 287 | + /> | ||
| 100 | 288 | ||
| 101 | <!-- <el-table-column label="创建时间" align="center" prop="createTime" width="155"> | 289 | <!-- <el-table-column label="创建时间" align="center" prop="createTime" width="155"> |
| 102 | <template slot-scope="scope"> | 290 | <template slot-scope="scope"> |
| 103 | <span>{{ renderTime(scope.row.createTime) }}</span> | 291 | <span>{{ renderTime(scope.row.createTime) }}</span> |
| 104 | </template> | 292 | </template> |
| 105 | </el-table-column> --> | 293 | </el-table-column> --> |
| 106 | - <el-table-column label="最后修改人" align="center" prop="lastModifyUserName" width="155" /> | 294 | + <el-table-column |
| 295 | + label="最后修改人" | ||
| 296 | + align="center" | ||
| 297 | + prop="lastModifyUserName" | ||
| 298 | + width="155" | ||
| 299 | + /> | ||
| 107 | <!-- <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="155"> | 300 | <!-- <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="155"> |
| 108 | <template slot-scope="scope"> | 301 | <template slot-scope="scope"> |
| 109 | <span>{{ renderTime(scope.row.lastModifyTime) }}</span> | 302 | <span>{{ renderTime(scope.row.lastModifyTime) }}</span> |
| 110 | </template> | 303 | </template> |
| 111 | </el-table-column> --> | 304 | </el-table-column> --> |
| 112 | - <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="120" /> | 305 | + <el-table-column |
| 113 | - | 306 | + label="最后修改时间" |
| 114 | - <el-table-column v-if="findAllFltDatList.length>0" label="操作" align="center" | 307 | + align="center" |
| 115 | - class-name="small-padding fixed-width" width="130" fixed="right"> | 308 | + prop="lastModifyTime" |
| 309 | + width="120" | ||
| 310 | + /> | ||
| 311 | + | ||
| 312 | + <el-table-column | ||
| 313 | + v-if="findAllFltDatList.length > 0" | ||
| 314 | + label="操作" | ||
| 315 | + align="center" | ||
| 316 | + class-name="small-padding fixed-width" | ||
| 317 | + width="130" | ||
| 318 | + fixed="right" | ||
| 319 | + > | ||
| 116 | <template slot-scope="scope"> | 320 | <template slot-scope="scope"> |
| 117 | - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button> | 321 | + <el-button |
| 118 | - <!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row,'删除')"> | 322 | + size="mini" |
| 323 | + type="text" | ||
| 324 | + icon="el-icon-edit" | ||
| 325 | + @click="handleUpdate(scope.row)" | ||
| 326 | + >修改</el-button | ||
| 327 | + > | ||
| 328 | + <!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row,'删除')"> | ||
| 119 | 删除</el-button> --> | 329 | 删除</el-button> --> |
| 120 | </template> | 330 | </template> |
| 121 | </el-table-column> | 331 | </el-table-column> |
| 122 | </el-table> | 332 | </el-table> |
| 123 | 333 | ||
| 124 | - <pagination v-show="total>0" :total="total" layout=" prev, pager, next, jumper, sizes,total" | 334 | + <pagination |
| 125 | - :page.sync="queryParams.pageNum" :limit.sync="queryParams.limitSize" @pagination="findAllFltData" /> | 335 | + v-show="total > 0" |
| 126 | - | 336 | + :total="total" |
| 127 | - | 337 | + layout=" prev, pager, next, jumper, sizes,total" |
| 128 | - | 338 | + :page.sync="queryParams.pageNum" |
| 339 | + :limit.sync="queryParams.limitSize" | ||
| 340 | + @pagination="findAllFltData" | ||
| 341 | + /> | ||
| 129 | 342 | ||
| 130 | <!-- 添加或修改对话框 --> | 343 | <!-- 添加或修改对话框 --> |
| 131 | - <el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true"> | 344 | + <el-dialog |
| 132 | - <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> | 345 | + :title="title" |
| 346 | + :visible.sync="open" | ||
| 347 | + width="60%" | ||
| 348 | + :close-on-click-modal="false" | ||
| 349 | + :append-to-body="true" | ||
| 350 | + > | ||
| 351 | + <el-form | ||
| 352 | + ref="form" | ||
| 353 | + :model="form" | ||
| 354 | + :rules="rules" | ||
| 355 | + label-position="right" | ||
| 356 | + label-width="auto" | ||
| 357 | + > | ||
| 133 | <el-row> | 358 | <el-row> |
| 134 | <el-col :span="12"> | 359 | <el-col :span="12"> |
| 135 | <el-form-item label="航班号" prop="fltNo"> | 360 | <el-form-item label="航班号" prop="fltNo"> |
| 136 | - <el-input @blur="blurfltNo" :disabled="formdisabled.fltNo" style="width:93%;" v-model="form.fltNo" | 361 | + <el-input |
| 137 | - placeholder="请输入航班号" /> | 362 | + @blur="blurfltNo" |
| 363 | + :disabled="formdisabled.fltNo" | ||
| 364 | + style="width: 93%" | ||
| 365 | + v-model="form.fltNo" | ||
| 366 | + placeholder="请输入航班号" | ||
| 367 | + /> | ||
| 138 | </el-form-item> | 368 | </el-form-item> |
| 139 | </el-col> | 369 | </el-col> |
| 140 | <!-- <el-col :span="1">  </el-col> --> | 370 | <!-- <el-col :span="1">  </el-col> --> |
| 141 | <el-col :span="12"> | 371 | <el-col :span="12"> |
| 142 | <el-form-item label="航班日期" prop="fltDate"> | 372 | <el-form-item label="航班日期" prop="fltDate"> |
| 143 | - | 373 | + <el-date-picker |
| 144 | - <el-date-picker :disabled="formdisabled.fltDate" clearable size="small" v-model="form.fltDate" type="date" | 374 | + :disabled="formdisabled.fltDate" |
| 145 | - value-format="yyyy-MM-dd" placeholder="选择航班日期"> | 375 | + clearable |
| 376 | + size="small" | ||
| 377 | + v-model="form.fltDate" | ||
| 378 | + type="date" | ||
| 379 | + value-format="yyyy-MM-dd" | ||
| 380 | + placeholder="选择航班日期" | ||
| 381 | + > | ||
| 146 | </el-date-picker> | 382 | </el-date-picker> |
| 147 | </el-form-item> | 383 | </el-form-item> |
| 148 | </el-col> | 384 | </el-col> |
| 149 | 385 | ||
| 150 | - | ||
| 151 | <el-col :span="12"> | 386 | <el-col :span="12"> |
| 152 | <el-form-item label="航班路线" prop="route"> | 387 | <el-form-item label="航班路线" prop="route"> |
| 153 | - <el-input style="width:93%" v-model="form.route" placeholder="请输入航班路线" /> | 388 | + <el-input |
| 389 | + style="width: 93%" | ||
| 390 | + v-model="form.route" | ||
| 391 | + placeholder="请输入航班路线" | ||
| 392 | + /> | ||
| 154 | </el-form-item> | 393 | </el-form-item> |
| 155 | </el-col> | 394 | </el-col> |
| 156 | 395 | ||
| 157 | <el-col :span="12"> | 396 | <el-col :span="12"> |
| 158 | <el-form-item label="航班种类" prop="kindId"> | 397 | <el-form-item label="航班种类" prop="kindId"> |
| 159 | <el-select v-model="form.kindId" placeholder="请选择航班种类"> | 398 | <el-select v-model="form.kindId" placeholder="请选择航班种类"> |
| 160 | - <el-option v-for="item in flightKindlist" :key="item.id" :label="item.chineseName" :value="item.id"> | 399 | + <el-option |
| 400 | + v-for="item in flightKindlist" | ||
| 401 | + :key="item.id" | ||
| 402 | + :label="item.chineseName" | ||
| 403 | + :value="item.id" | ||
| 404 | + > | ||
| 161 | </el-option> | 405 | </el-option> |
| 162 | </el-select> | 406 | </el-select> |
| 163 | </el-form-item> | 407 | </el-form-item> |
| ... | @@ -165,36 +409,62 @@ | ... | @@ -165,36 +409,62 @@ |
| 165 | <el-col :span="12"> | 409 | <el-col :span="12"> |
| 166 | <el-form-item label="航班类型" prop="typeId"> | 410 | <el-form-item label="航班类型" prop="typeId"> |
| 167 | <el-select v-model="form.typeId" placeholder="请选择航班类型"> | 411 | <el-select v-model="form.typeId" placeholder="请选择航班类型"> |
| 168 | - <el-option v-for="item in flightTypelist" :key="item.id" :label="item.chineseName" :value="item.id"> | 412 | + <el-option |
| 413 | + v-for="item in flightTypelist" | ||
| 414 | + :key="item.id" | ||
| 415 | + :label="item.chineseName" | ||
| 416 | + :value="item.id" | ||
| 417 | + > | ||
| 169 | </el-option> | 418 | </el-option> |
| 170 | </el-select> | 419 | </el-select> |
| 171 | </el-form-item> | 420 | </el-form-item> |
| 172 | </el-col> | 421 | </el-col> |
| 173 | <el-col :span="12"> | 422 | <el-col :span="12"> |
| 174 | <el-form-item label="航班状态" prop="statusId"> | 423 | <el-form-item label="航班状态" prop="statusId"> |
| 175 | - <el-select :disabled="true" v-model="form.statusId" placeholder="请选择航班状态"> | 424 | + <el-select |
| 176 | - <el-option v-for="item in flightStatuslist" :key="item.id" :label="item.chineseName" :value="item.id"> | 425 | + :disabled="true" |
| 426 | + v-model="form.statusId" | ||
| 427 | + placeholder="请选择航班状态" | ||
| 428 | + > | ||
| 429 | + <el-option | ||
| 430 | + v-for="item in flightStatuslist" | ||
| 431 | + :key="item.id" | ||
| 432 | + :label="item.chineseName" | ||
| 433 | + :value="item.id" | ||
| 434 | + > | ||
| 177 | </el-option> | 435 | </el-option> |
| 178 | </el-select> | 436 | </el-select> |
| 179 | </el-form-item> | 437 | </el-form-item> |
| 180 | </el-col> | 438 | </el-col> |
| 181 | <el-col :span="12"> | 439 | <el-col :span="12"> |
| 182 | <el-form-item label="原始重量(KG)" prop="originalWeight"> | 440 | <el-form-item label="原始重量(KG)" prop="originalWeight"> |
| 183 | - <el-input-number @change="LowHighAvailable" placeholder="请输入原始重量(KG)" style="width:93%" | 441 | + <el-input-number |
| 184 | - v-model="form.originalWeight"></el-input-number> | 442 | + @change="LowHighAvailable" |
| 443 | + placeholder="请输入原始重量(KG)" | ||
| 444 | + style="width: 93%" | ||
| 445 | + v-model="form.originalWeight" | ||
| 446 | + ></el-input-number> | ||
| 185 | </el-form-item> | 447 | </el-form-item> |
| 186 | </el-col> | 448 | </el-col> |
| 187 | 449 | ||
| 188 | <el-col :span="12"> | 450 | <el-col :span="12"> |
| 189 | <el-form-item label="额外增重百分比" prop="extraWeightPercent"> | 451 | <el-form-item label="额外增重百分比" prop="extraWeightPercent"> |
| 190 | - <el-input-number @change="LowHighAvailable" placeholder="请输入额外增重百分比" style="width:93%" | 452 | + <el-input-number |
| 191 | - v-model="form.extraWeightPercent"></el-input-number> | 453 | + @change="LowHighAvailable" |
| 454 | + placeholder="请输入额外增重百分比" | ||
| 455 | + style="width: 93%" | ||
| 456 | + v-model="form.extraWeightPercent" | ||
| 457 | + ></el-input-number> | ||
| 192 | </el-form-item> | 458 | </el-form-item> |
| 193 | </el-col> | 459 | </el-col> |
| 194 | 460 | ||
| 195 | <el-col :span="12"> | 461 | <el-col :span="12"> |
| 196 | <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> | 462 | <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> |
| 197 | - <el-switch @change='LowHighAvailable' v-model="form.highLowPriceFlg" active-color="#13ce66"> | 463 | + <el-switch |
| 464 | + @change="LowHighAvailable" | ||
| 465 | + v-model="form.highLowPriceFlg" | ||
| 466 | + active-color="#13ce66" | ||
| 467 | + > | ||
| 198 | </el-switch> | 468 | </el-switch> |
| 199 | </el-form-item> | 469 | </el-form-item> |
| 200 | </el-col> | 470 | </el-col> |
| ... | @@ -202,65 +472,95 @@ | ... | @@ -202,65 +472,95 @@ |
| 202 | <!-- 是否需要预审,1:预审,0:取消预审 --> | 472 | <!-- 是否需要预审,1:预审,0:取消预审 --> |
| 203 | <el-col :span="12"> | 473 | <el-col :span="12"> |
| 204 | <el-form-item label="是否预审" prop="isNeedRequired"> | 474 | <el-form-item label="是否预审" prop="isNeedRequired"> |
| 205 | - <el-switch :disabled="true" v-model="form.isNeedRequired" active-color="#13ce66"> | 475 | + <el-switch |
| 476 | + :disabled="true" | ||
| 477 | + v-model="form.isNeedRequired" | ||
| 478 | + active-color="#13ce66" | ||
| 479 | + > | ||
| 206 | </el-switch> | 480 | </el-switch> |
| 207 | </el-form-item> | 481 | </el-form-item> |
| 208 | </el-col> | 482 | </el-col> |
| 209 | 483 | ||
| 210 | <el-col :span="12"> | 484 | <el-col :span="12"> |
| 211 | <el-form-item label="高价百分比" prop="highPriceWeightPercent"> | 485 | <el-form-item label="高价百分比" prop="highPriceWeightPercent"> |
| 212 | - <el-input-number :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%" | 486 | + <el-input-number |
| 213 | - v-model="form.highPriceWeightPercent"></el-input-number> | 487 | + :disabled="ishighPriceWeightPercent" |
| 488 | + @change="LowHighAvailable" | ||
| 489 | + placeholder="请输入高价百分比" | ||
| 490 | + style="width: 93%" | ||
| 491 | + v-model="form.highPriceWeightPercent" | ||
| 492 | + ></el-input-number> | ||
| 214 | </el-form-item> | 493 | </el-form-item> |
| 215 | </el-col> | 494 | </el-col> |
| 216 | 495 | ||
| 217 | <el-col :span="12"> | 496 | <el-col :span="12"> |
| 218 | <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> | 497 | <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> |
| 219 | - <el-input-number :disabled="true" placeholder="请输入低价百分比" style="width:93%" | 498 | + <el-input-number |
| 220 | - v-model="form.lowPriceWeightPercent"></el-input-number> | 499 | + :disabled="true" |
| 500 | + placeholder="请输入低价百分比" | ||
| 501 | + style="width: 93%" | ||
| 502 | + v-model="form.lowPriceWeightPercent" | ||
| 503 | + ></el-input-number> | ||
| 221 | </el-form-item> | 504 | </el-form-item> |
| 222 | </el-col> | 505 | </el-col> |
| 223 | 506 | ||
| 224 | <el-col :span="12"> | 507 | <el-col :span="12"> |
| 225 | <el-form-item label="高价可配重量" prop="highAvailableWeight"> | 508 | <el-form-item label="高价可配重量" prop="highAvailableWeight"> |
| 226 | - | 509 | + <el-input-number |
| 227 | - <el-input-number :disabled="true" placeholder="请输入高价可配重量" style="width:93%" | 510 | + :disabled="true" |
| 228 | - v-model="form.highAvailableWeight" :precision="2"></el-input-number> | 511 | + placeholder="请输入高价可配重量" |
| 512 | + style="width: 93%" | ||
| 513 | + v-model="form.highAvailableWeight" | ||
| 514 | + :precision="2" | ||
| 515 | + ></el-input-number> | ||
| 229 | </el-form-item> | 516 | </el-form-item> |
| 230 | </el-col> | 517 | </el-col> |
| 231 | <el-col :span="12"> | 518 | <el-col :span="12"> |
| 232 | <el-form-item label="低价可配重量" prop="lowAvailableWeight"> | 519 | <el-form-item label="低价可配重量" prop="lowAvailableWeight"> |
| 233 | - <el-input-number :disabled="true" placeholder="请输入低价可配重量" style="width:93%" | 520 | + <el-input-number |
| 234 | - v-model="form.lowAvailableWeight" :precision="2"></el-input-number> | 521 | + :disabled="true" |
| 522 | + placeholder="请输入低价可配重量" | ||
| 523 | + style="width: 93%" | ||
| 524 | + v-model="form.lowAvailableWeight" | ||
| 525 | + :precision="2" | ||
| 526 | + ></el-input-number> | ||
| 235 | </el-form-item> | 527 | </el-form-item> |
| 236 | </el-col> | 528 | </el-col> |
| 237 | 529 | ||
| 238 | - | ||
| 239 | <el-col :span="12"> | 530 | <el-col :span="12"> |
| 240 | <el-form-item label="高价已配重量" prop="highAllocatedWeight"> | 531 | <el-form-item label="高价已配重量" prop="highAllocatedWeight"> |
| 241 | - <el-input-number :disabled="true" placeholder="请输入高价已配重量" style="width:93%" | 532 | + <el-input-number |
| 242 | - v-model="form.highAllocatedWeight" :precision="2"></el-input-number> | 533 | + :disabled="true" |
| 534 | + placeholder="请输入高价已配重量" | ||
| 535 | + style="width: 93%" | ||
| 536 | + v-model="form.highAllocatedWeight" | ||
| 537 | + :precision="2" | ||
| 538 | + ></el-input-number> | ||
| 243 | </el-form-item> | 539 | </el-form-item> |
| 244 | </el-col> | 540 | </el-col> |
| 245 | <el-col :span="12"> | 541 | <el-col :span="12"> |
| 246 | <el-form-item label="低价已配重量" prop="lowAllocatedWeight"> | 542 | <el-form-item label="低价已配重量" prop="lowAllocatedWeight"> |
| 247 | - <el-input-number :disabled="true" placeholder="请输入低价已配重量" style="width:93%" | 543 | + <el-input-number |
| 248 | - v-model="form.lowAllocatedWeight" :precision="2"></el-input-number> | 544 | + :disabled="true" |
| 545 | + placeholder="请输入低价已配重量" | ||
| 546 | + style="width: 93%" | ||
| 547 | + v-model="form.lowAllocatedWeight" | ||
| 548 | + :precision="2" | ||
| 549 | + ></el-input-number> | ||
| 249 | </el-form-item> | 550 | </el-form-item> |
| 250 | </el-col> | 551 | </el-col> |
| 251 | <el-col :span="12"> | 552 | <el-col :span="12"> |
| 252 | <el-form-item label="已配总重量" prop="alloctedWeight"> | 553 | <el-form-item label="已配总重量" prop="alloctedWeight"> |
| 253 | - | 554 | + <el-input-number |
| 254 | - <el-input-number :disabled="true" placeholder="请输入已配总重量" style="width:93%" v-model="form.alloctedWeight" | 555 | + :disabled="true" |
| 255 | - :precision="2"></el-input-number> | 556 | + placeholder="请输入已配总重量" |
| 256 | - | 557 | + style="width: 93%" |
| 558 | + v-model="form.alloctedWeight" | ||
| 559 | + :precision="2" | ||
| 560 | + ></el-input-number> | ||
| 257 | </el-form-item> | 561 | </el-form-item> |
| 258 | </el-col> | 562 | </el-col> |
| 259 | - | ||
| 260 | - | ||
| 261 | </el-row> | 563 | </el-row> |
| 262 | - | ||
| 263 | - | ||
| 264 | </el-form> | 564 | </el-form> |
| 265 | <div slot="footer" class="dialog-footer"> | 565 | <div slot="footer" class="dialog-footer"> |
| 266 | <el-button type="primary" @click="submitForm">确 定</el-button> | 566 | <el-button type="primary" @click="submitForm">确 定</el-button> |
| ... | @@ -268,502 +568,601 @@ | ... | @@ -268,502 +568,601 @@ |
| 268 | </div> | 568 | </div> |
| 269 | </el-dialog> | 569 | </el-dialog> |
| 270 | 570 | ||
| 271 | - <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false" :append-to-body="true"> | 571 | + <el-dialog |
| 572 | + title="未删除成功航班" | ||
| 573 | + width="40%" | ||
| 574 | + center | ||
| 575 | + :visible.sync="dialogTableVisible" | ||
| 576 | + :close-on-click-modal="false" :append-to-body="true" | ||
| 577 | + > | ||
| 272 | <el-table :data="gridData"> | 578 | <el-table :data="gridData"> |
| 273 | - <el-table-column property="fltNo" label="航班号" width="150"></el-table-column> | 579 | + <el-table-column |
| 274 | - <el-table-column property="fltDate" label="航班日期" width="200"></el-table-column> | 580 | + property="fltNo" |
| 275 | - <el-table-column property="alloctedWeight" label="已配重量" width="200"></el-table-column> | 581 | + label="航班号" |
| 582 | + width="150" | ||
| 583 | + ></el-table-column> | ||
| 584 | + <el-table-column | ||
| 585 | + property="fltDate" | ||
| 586 | + label="航班日期" | ||
| 587 | + width="200" | ||
| 588 | + ></el-table-column> | ||
| 589 | + <el-table-column | ||
| 590 | + property="alloctedWeight" | ||
| 591 | + label="已配重量" | ||
| 592 | + width="200" | ||
| 593 | + ></el-table-column> | ||
| 276 | </el-table> | 594 | </el-table> |
| 277 | </el-dialog> | 595 | </el-dialog> |
| 278 | </div> | 596 | </div> |
| 279 | </template> | 597 | </template> |
| 280 | -<script> | ||
| 281 | - import { | ||
| 282 | - delFlight, | ||
| 283 | - findFltConditionDataApi, | ||
| 284 | - findAllFltDataApi, | ||
| 285 | - findFltById, | ||
| 286 | - saveOrUpdate, | ||
| 287 | - findFltCommonConf, | ||
| 288 | - updateStatusBatch | ||
| 289 | - | ||
| 290 | - } from "@/api/findAllFltData"; | ||
| 291 | - export default { | ||
| 292 | - name: "FlightInformationMaintenance", | ||
| 293 | - data() { | ||
| 294 | - return { | ||
| 295 | - gridData:[], | ||
| 296 | - dialogTableVisible: false, | ||
| 297 | - //高价百分比是否打开 | ||
| 298 | - ishighPriceWeightPercent:true, | ||
| 299 | - //form属性禁用状态 | ||
| 300 | - formdisabled: { | ||
| 301 | - //航班号 | ||
| 302 | - fltNo: false, | ||
| 303 | - //航班日期 | ||
| 304 | - fltDate: false, | ||
| 305 | - //航班路线 | ||
| 306 | - route: false, | ||
| 307 | - //航班种类 | ||
| 308 | - kindId: false, | ||
| 309 | - //航班类型 | ||
| 310 | - typeId: false, | ||
| 311 | - //原始重量 | ||
| 312 | - originalWeight: false | ||
| 313 | - }, | ||
| 314 | 598 | ||
| 599 | +<script> | ||
| 600 | +import { | ||
| 601 | + delFlight, | ||
| 602 | + findFltConditionDataApi, | ||
| 603 | + findAllFltDataApi, | ||
| 604 | + findFltById, | ||
| 605 | + saveOrUpdate, | ||
| 606 | + findFltCommonConf, | ||
| 607 | + updateStatusBatch, | ||
| 608 | +} from "@/api/findAllFltData"; | ||
| 609 | +export default { | ||
| 610 | + name: "FlightInformationMaintenance", | ||
| 611 | + data() { | ||
| 612 | + return { | ||
| 613 | + gridData: [], | ||
| 614 | + dialogTableVisible: false, | ||
| 615 | + //高价百分比是否打开 | ||
| 616 | + ishighPriceWeightPercent: true, | ||
| 617 | + //form属性禁用状态 | ||
| 618 | + formdisabled: { | ||
| 619 | + //航班号 | ||
| 620 | + fltNo: false, | ||
| 621 | + //航班日期 | ||
| 622 | + fltDate: false, | ||
| 623 | + //航班路线 | ||
| 624 | + route: false, | ||
| 315 | //航班种类 | 625 | //航班种类 |
| 316 | - flightKindlist: [], | 626 | + kindId: false, |
| 317 | - //航班状态 | ||
| 318 | - flightStatuslist: [], | ||
| 319 | //航班类型 | 627 | //航班类型 |
| 320 | - flightTypelist: [], | 628 | + typeId: false, |
| 321 | - // 选中数组 | 629 | + //原始重量 |
| 322 | - ids: [], | 630 | + originalWeight: false, |
| 323 | - // 非单个禁用 | 631 | + }, |
| 324 | - single: true, | ||
| 325 | - // 非多个禁用 | ||
| 326 | - multiple: true, | ||
| 327 | - | ||
| 328 | - // 遮罩层 | ||
| 329 | - loading: false, | ||
| 330 | - // 遮罩层 | ||
| 331 | - loadingFlightDate: false, | ||
| 332 | - // 弹出层标题 | ||
| 333 | - title: "", | ||
| 334 | - // 总条数 | ||
| 335 | - total: 0, | ||
| 336 | - // 原航班规则数据 | ||
| 337 | - findAllFltDatList: [], | ||
| 338 | - //目的航班数据 | ||
| 339 | - sourceFlightAndFlightDate: [], | ||
| 340 | - statusList: [{ | ||
| 341 | - 'id': 1, | ||
| 342 | - 'name': '有效' | ||
| 343 | - }, { | ||
| 344 | - 'id': 3, | ||
| 345 | - 'name': '停用' | ||
| 346 | - }], | ||
| 347 | - // 新增修改查看规则弹出层 | ||
| 348 | - open: false, | ||
| 349 | - // 是否显示查看目的航班弹出层 | ||
| 350 | - openFlightDate: false, | ||
| 351 | - // 查询参数 | ||
| 352 | - queryParams: { | ||
| 353 | - limitStart: 0, //当前条数【代表第几条数据 +1开始】 | ||
| 354 | - pageNum: 1, | ||
| 355 | - limitSize: 20, //一页显示多少条数据 | ||
| 356 | - fltDateStart: undefined, //航班日期开始 | ||
| 357 | - fltDateEnd: undefined, //航班日期结束 | ||
| 358 | - typeId: undefined, //航班类型 | ||
| 359 | - statusId: undefined, //航班状态 | ||
| 360 | - flightKindId: undefined, //航班种类 | ||
| 361 | - fltNo: undefined //航班号,要大写 | ||
| 362 | - }, | ||
| 363 | - | ||
| 364 | - // 表单参数 | ||
| 365 | - form: { | ||
| 366 | - | ||
| 367 | 632 | ||
| 633 | + //航班种类 | ||
| 634 | + flightKindlist: [], | ||
| 635 | + //航班状态 | ||
| 636 | + flightStatuslist: [], | ||
| 637 | + //航班类型 | ||
| 638 | + flightTypelist: [], | ||
| 639 | + // 选中数组 | ||
| 640 | + ids: [], | ||
| 641 | + // 非单个禁用 | ||
| 642 | + single: true, | ||
| 643 | + // 非多个禁用 | ||
| 644 | + multiple: true, | ||
| 645 | + | ||
| 646 | + // 遮罩层 | ||
| 647 | + loading: false, | ||
| 648 | + // 遮罩层 | ||
| 649 | + loadingFlightDate: false, | ||
| 650 | + // 弹出层标题 | ||
| 651 | + title: "", | ||
| 652 | + // 总条数 | ||
| 653 | + total: 0, | ||
| 654 | + // 原航班规则数据 | ||
| 655 | + findAllFltDatList: [], | ||
| 656 | + //目的航班数据 | ||
| 657 | + sourceFlightAndFlightDate: [], | ||
| 658 | + statusList: [ | ||
| 659 | + { | ||
| 660 | + id: 1, | ||
| 661 | + name: "有效", | ||
| 368 | }, | 662 | }, |
| 369 | - // 表单校验 | 663 | + { |
| 370 | - rules: { | 664 | + id: 3, |
| 371 | - fltNo: [{ | 665 | + name: "停用", |
| 666 | + }, | ||
| 667 | + ], | ||
| 668 | + // 新增修改查看规则弹出层 | ||
| 669 | + open: false, | ||
| 670 | + // 是否显示查看目的航班弹出层 | ||
| 671 | + openFlightDate: false, | ||
| 672 | + // 查询参数 | ||
| 673 | + queryParams: { | ||
| 674 | + limitStart: 0, //当前条数【代表第几条数据 +1开始】 | ||
| 675 | + pageNum: 1, | ||
| 676 | + limitSize: 20, //一页显示多少条数据 | ||
| 677 | + fltDateStart: undefined, //航班日期开始 | ||
| 678 | + fltDateEnd: undefined, //航班日期结束 | ||
| 679 | + typeId: undefined, //航班类型 | ||
| 680 | + statusId: undefined, //航班状态 | ||
| 681 | + flightKindId: undefined, //航班种类 | ||
| 682 | + fltNo: undefined, //航班号,要大写 | ||
| 683 | + }, | ||
| 684 | + | ||
| 685 | + // 表单参数 | ||
| 686 | + form: {}, | ||
| 687 | + // 表单校验 | ||
| 688 | + rules: { | ||
| 689 | + fltNo: [ | ||
| 690 | + { | ||
| 372 | required: true, | 691 | required: true, |
| 373 | message: "ACCS原航班号不能为空", | 692 | message: "ACCS原航班号不能为空", |
| 374 | - trigger: "blur" | 693 | + trigger: "blur", |
| 375 | - }], | 694 | + }, |
| 376 | - fltDate: [{ | 695 | + ], |
| 696 | + fltDate: [ | ||
| 697 | + { | ||
| 377 | required: true, | 698 | required: true, |
| 378 | message: "航班日期不能为空", | 699 | message: "航班日期不能为空", |
| 379 | - trigger: "blur" | 700 | + trigger: "blur", |
| 380 | - }], | 701 | + }, |
| 381 | - kindId: [{ | 702 | + ], |
| 703 | + kindId: [ | ||
| 704 | + { | ||
| 382 | required: true, | 705 | required: true, |
| 383 | message: "航班种类不能为空", | 706 | message: "航班种类不能为空", |
| 384 | - trigger: "change" | 707 | + trigger: "change", |
| 385 | - }], | 708 | + }, |
| 386 | - originalWeight: [{ | 709 | + ], |
| 710 | + originalWeight: [ | ||
| 711 | + { | ||
| 387 | required: true, | 712 | required: true, |
| 388 | message: "原始重量(KG)不能为空", | 713 | message: "原始重量(KG)不能为空", |
| 389 | - trigger: "blur" | 714 | + trigger: "blur", |
| 390 | - }], | 715 | + }, |
| 391 | - } | 716 | + ], |
| 392 | - }; | ||
| 393 | - }, | ||
| 394 | - created() { | ||
| 395 | - //查询条件数据源 | ||
| 396 | - this.findFltConditionData(); | ||
| 397 | - this.findAllFltData(); | ||
| 398 | - }, | ||
| 399 | - methods: { | ||
| 400 | - //输入航班号后 | ||
| 401 | - blurfltNo() { | ||
| 402 | - if (this.form.fltNo != null && this.form.fltNo != undefined && this.form.fltNo != "") { | ||
| 403 | - this.form.fltNo = this.form.fltNo.toUpperCase(); | ||
| 404 | - findFltCommonConf(this.form).then(response => { | ||
| 405 | - if (response.code == 200) { | ||
| 406 | - //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 | ||
| 407 | - if (response.data!=null && response.data.extraWeightPercent != null && response.data.extraWeightPercent != undefined) { | ||
| 408 | - this.$set(this.form, "extraWeightPercent", response.data.extraWeightPercent); | ||
| 409 | - // this.form.extraWeightPercent=response.data.extraWeightPercent; | ||
| 410 | - } else { | ||
| 411 | - this.$set(this.form, "extraWeightPercent", 0); | ||
| 412 | - //this.form.extraWeightPercent=response.data.extraWeightPercent=0; | ||
| 413 | - } | ||
| 414 | - //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 | ||
| 415 | - if (response.data!=null &&response.data.highLowPriceFlg != null && response.data.highLowPriceFlg != undefined) { | ||
| 416 | - this.form.highLowPriceFlg = response.data.highLowPriceFlg === 1 ? true : false; | ||
| 417 | - } else { | ||
| 418 | - this.$set(this.form, "highLowPriceFlg", true); | ||
| 419 | - //this.form.highLowPriceFlg = true; | ||
| 420 | - } | ||
| 421 | - //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑; | ||
| 422 | - if (response.data!=null &&response.data.isNeedRequired != null && response.data.isNeedRequired != undefined) { | ||
| 423 | - this.form.isNeedRequired = response.data.isNeedRequired === 1 ? true : false; | ||
| 424 | - } else { | ||
| 425 | - this.form.isNeedRequired = false; | ||
| 426 | - } | ||
| 427 | - //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 | ||
| 428 | - if (response.data!=null &&response.data.highPriceWeightPercent != null && response.data.highPriceWeightPercent != | ||
| 429 | - undefined) { | ||
| 430 | - this.form.highPriceWeightPercent = response.data.highPriceWeightPercent; | ||
| 431 | - } else { | ||
| 432 | - this.form.highPriceWeightPercent = 60; | ||
| 433 | - } | ||
| 434 | - if (response.data!=null &&response.data.lowPriceWeightPercent != null && response.data.lowPriceWeightPercent != undefined) { | ||
| 435 | - this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent; | ||
| 436 | - } else { | ||
| 437 | - this.form.lowPriceWeightPercent = 40; | ||
| 438 | - } | ||
| 439 | - this.LowHighAvailable(); | ||
| 440 | - } else { | ||
| 441 | - this.msgError(response.msg); | ||
| 442 | - } | ||
| 443 | - | ||
| 444 | - }); | ||
| 445 | - | ||
| 446 | - } | ||
| 447 | - | ||
| 448 | - | ||
| 449 | - }, | ||
| 450 | - // 是否一票一件 | ||
| 451 | - ticketToPieceFormat(row) { | ||
| 452 | - if (row.ticketToPiece === 1) { | ||
| 453 | - return '是' | ||
| 454 | - } else { | ||
| 455 | - return '否' | ||
| 456 | - } | ||
| 457 | - return row.ticketToPiece; | ||
| 458 | - }, | ||
| 459 | - // 是否需要预审 1 预审 0 取消预审 | ||
| 460 | - needRequiredFormat(row) { | ||
| 461 | - if (row.needRequired === 1) { | ||
| 462 | - return '是' | ||
| 463 | - } else { | ||
| 464 | - return '否' | ||
| 465 | - } | ||
| 466 | - return row.ticketToPiece; | ||
| 467 | - }, | ||
| 468 | - //是否开启高低价 | ||
| 469 | - highLowPriceFlgFormat(row) { | ||
| 470 | - if (row.highLowPriceFlg === 1) { | ||
| 471 | - return '开启' | ||
| 472 | - } else { | ||
| 473 | - return '未开启' | ||
| 474 | - } | ||
| 475 | - return row.ticketToPiece; | ||
| 476 | - }, | ||
| 477 | - //时间格式化 | ||
| 478 | - renderTime(date) { | ||
| 479 | - var dateee = new Date(date).toJSON(); | ||
| 480 | - return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') | ||
| 481 | }, | 717 | }, |
| 482 | - //查询条件数据源 | 718 | + }; |
| 483 | - findFltConditionData() { | 719 | + }, |
| 484 | - findFltConditionDataApi().then(response => { | 720 | + created() { |
| 721 | + //查询条件数据源 | ||
| 722 | + this.findFltConditionData(); | ||
| 723 | + this.findAllFltData(); | ||
| 724 | + }, | ||
| 725 | + methods: { | ||
| 726 | + //输入航班号后 | ||
| 727 | + blurfltNo() { | ||
| 728 | + if ( | ||
| 729 | + this.form.fltNo != null && | ||
| 730 | + this.form.fltNo != undefined && | ||
| 731 | + this.form.fltNo != "" | ||
| 732 | + ) { | ||
| 733 | + this.form.fltNo = this.form.fltNo.toUpperCase(); | ||
| 734 | + findFltCommonConf(this.form).then((response) => { | ||
| 485 | if (response.code == 200) { | 735 | if (response.code == 200) { |
| 486 | - //航班种类 | 736 | + //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 |
| 487 | - this.flightKindlist = response.data.flightKind; | 737 | + if ( |
| 488 | - //航班类型 | 738 | + response.data != null && |
| 489 | - this.flightTypelist = response.data.flightType; | 739 | + response.data.extraWeightPercent != null && |
| 490 | - //航班状态 | 740 | + response.data.extraWeightPercent != undefined |
| 491 | - this.flightStatuslist = response.data.flightStatus; | 741 | + ) { |
| 492 | - | 742 | + this.$set( |
| 743 | + this.form, | ||
| 744 | + "extraWeightPercent", | ||
| 745 | + response.data.extraWeightPercent | ||
| 746 | + ); | ||
| 747 | + // this.form.extraWeightPercent=response.data.extraWeightPercent; | ||
| 748 | + } else { | ||
| 749 | + this.$set(this.form, "extraWeightPercent", 0); | ||
| 750 | + //this.form.extraWeightPercent=response.data.extraWeightPercent=0; | ||
| 751 | + } | ||
| 752 | + //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 | ||
| 753 | + if ( | ||
| 754 | + response.data != null && | ||
| 755 | + response.data.highLowPriceFlg != null && | ||
| 756 | + response.data.highLowPriceFlg != undefined | ||
| 757 | + ) { | ||
| 758 | + this.form.highLowPriceFlg = | ||
| 759 | + response.data.highLowPriceFlg === 1 ? true : false; | ||
| 760 | + } else { | ||
| 761 | + this.$set(this.form, "highLowPriceFlg", true); | ||
| 762 | + //this.form.highLowPriceFlg = true; | ||
| 763 | + } | ||
| 764 | + //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑; | ||
| 765 | + if ( | ||
| 766 | + response.data != null && | ||
| 767 | + response.data.isNeedRequired != null && | ||
| 768 | + response.data.isNeedRequired != undefined | ||
| 769 | + ) { | ||
| 770 | + this.form.isNeedRequired = | ||
| 771 | + response.data.isNeedRequired === 1 ? true : false; | ||
| 772 | + } else { | ||
| 773 | + this.form.isNeedRequired = false; | ||
| 774 | + } | ||
| 775 | + //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 | ||
| 776 | + if ( | ||
| 777 | + response.data != null && | ||
| 778 | + response.data.highPriceWeightPercent != null && | ||
| 779 | + response.data.highPriceWeightPercent != undefined | ||
| 780 | + ) { | ||
| 781 | + this.form.highPriceWeightPercent = | ||
| 782 | + response.data.highPriceWeightPercent; | ||
| 783 | + } else { | ||
| 784 | + this.form.highPriceWeightPercent = 60; | ||
| 785 | + } | ||
| 786 | + if ( | ||
| 787 | + response.data != null && | ||
| 788 | + response.data.lowPriceWeightPercent != null && | ||
| 789 | + response.data.lowPriceWeightPercent != undefined | ||
| 790 | + ) { | ||
| 791 | + this.form.lowPriceWeightPercent = | ||
| 792 | + response.data.lowPriceWeightPercent; | ||
| 793 | + } else { | ||
| 794 | + this.form.lowPriceWeightPercent = 40; | ||
| 795 | + } | ||
| 796 | + this.LowHighAvailable(); | ||
| 493 | } else { | 797 | } else { |
| 494 | this.msgError(response.msg); | 798 | this.msgError(response.msg); |
| 495 | } | 799 | } |
| 496 | - | ||
| 497 | }); | 800 | }); |
| 498 | - }, | 801 | + } |
| 802 | + }, | ||
| 803 | + // 是否一票一件 | ||
| 804 | + ticketToPieceFormat(row) { | ||
| 805 | + if (row.ticketToPiece === 1) { | ||
| 806 | + return "是"; | ||
| 807 | + } else { | ||
| 808 | + return "否"; | ||
| 809 | + } | ||
| 810 | + return row.ticketToPiece; | ||
| 811 | + }, | ||
| 812 | + // 是否需要预审 1 预审 0 取消预审 | ||
| 813 | + needRequiredFormat(row) { | ||
| 814 | + if (row.needRequired === 1) { | ||
| 815 | + return "是"; | ||
| 816 | + } else { | ||
| 817 | + return "否"; | ||
| 818 | + } | ||
| 819 | + return row.ticketToPiece; | ||
| 820 | + }, | ||
| 821 | + //是否开启高低价 | ||
| 822 | + highLowPriceFlgFormat(row) { | ||
| 823 | + if (row.highLowPriceFlg === 1) { | ||
| 824 | + return "开启"; | ||
| 825 | + } else { | ||
| 826 | + return "未开启"; | ||
| 827 | + } | ||
| 828 | + return row.ticketToPiece; | ||
| 829 | + }, | ||
| 830 | + //时间格式化 | ||
| 831 | + renderTime(date) { | ||
| 832 | + var dateee = new Date(date).toJSON(); | ||
| 833 | + return new Date(+new Date(dateee) + 8 * 3600 * 1000) | ||
| 834 | + .toISOString() | ||
| 835 | + .replace(/T/g, " ") | ||
| 836 | + .replace(/\.[\d]{3}Z/, ""); | ||
| 837 | + }, | ||
| 838 | + //查询条件数据源 | ||
| 839 | + findFltConditionData() { | ||
| 840 | + findFltConditionDataApi().then((response) => { | ||
| 841 | + if (response.code == 200) { | ||
| 842 | + //航班种类 | ||
| 843 | + this.flightKindlist = response.data.flightKind; | ||
| 844 | + //航班类型 | ||
| 845 | + this.flightTypelist = response.data.flightType; | ||
| 846 | + //航班状态 | ||
| 847 | + this.flightStatuslist = response.data.flightStatus; | ||
| 848 | + } else { | ||
| 849 | + this.msgError(response.msg); | ||
| 850 | + } | ||
| 851 | + }); | ||
| 852 | + }, | ||
| 499 | 853 | ||
| 500 | - // 多选框选中数据 | 854 | + // 多选框选中数据 |
| 501 | - handleSelectionChange(selection) { | 855 | + handleSelectionChange(selection) { |
| 502 | - this.ids = selection.map(item => item.id) | 856 | + this.ids = selection.map((item) => item.id); |
| 503 | - this.single = selection.length != 1 | 857 | + this.single = selection.length != 1; |
| 504 | - this.multiple = !selection.length | 858 | + this.multiple = !selection.length; |
| 505 | - }, | 859 | + }, |
| 860 | + | ||
| 861 | + /** 航班信息维护查询*/ | ||
| 862 | + findAllFltData() { | ||
| 863 | + this.loading = true; | ||
| 864 | + if (this.queryParams.pageNum > 1) { | ||
| 865 | + this.queryParams.limitStart = | ||
| 866 | + (this.queryParams.pageNum - 1) * this.queryParams.limitSize; | ||
| 867 | + } else { | ||
| 868 | + this.queryParams.limitStart = 0; | ||
| 869 | + } | ||
| 870 | + if ( | ||
| 871 | + this.queryParams.fltNo != null && | ||
| 872 | + this.queryParams.fltNo != undefined && | ||
| 873 | + this.queryParams.fltNo != "" | ||
| 874 | + ) { | ||
| 875 | + this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase(); | ||
| 876 | + } | ||
| 506 | 877 | ||
| 507 | - /** 航班信息维护查询*/ | 878 | + findAllFltDataApi(this.queryParams).then((response) => { |
| 508 | - findAllFltData() { | 879 | + if (response.code == 200) { |
| 509 | - this.loading = true; | 880 | + this.findAllFltDatList = response.data.list; |
| 510 | - if (this.queryParams.pageNum > 1) { | 881 | + this.total = response.data.totalCount; |
| 511 | - this.queryParams.limitStart = (this.queryParams.pageNum - 1) * this.queryParams.limitSize | 882 | + this.loading = false; |
| 512 | } else { | 883 | } else { |
| 513 | - this.queryParams.limitStart = 0; | 884 | + this.msgError(response.msg); |
| 514 | } | 885 | } |
| 515 | - if (this.queryParams.fltNo != null && this.queryParams.fltNo != undefined && this.queryParams.fltNo != '') { | 886 | + }); |
| 516 | - this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase(); | 887 | + }, |
| 888 | + /** 新增按钮操作 */ | ||
| 889 | + handleAdd() { | ||
| 890 | + this.reset(); | ||
| 891 | + this.open = true; | ||
| 892 | + this.title = "添加航班信息"; | ||
| 893 | + this.form.id = null; | ||
| 894 | + this.form.statusId = this.flightStatuslist[0].id; | ||
| 895 | + this.form.alloctedWeight = 0; //已配重量 | ||
| 896 | + this.form.lowAllocatedWeight = 0; //低价已配重量 | ||
| 897 | + this.form.highAllocatedWeight = 0; //高价已配重量 | ||
| 898 | + | ||
| 899 | + //航班号 | ||
| 900 | + this.formdisabled.fltNo = false; | ||
| 901 | + //航班日期 | ||
| 902 | + this.formdisabled.fltDate = false; | ||
| 903 | + //航班路线 | ||
| 904 | + this.formdisabled.route = false; | ||
| 905 | + //航班种类 | ||
| 906 | + this.formdisabled.kindId = false; | ||
| 907 | + //航班类型 | ||
| 908 | + this.formdisabled.typeId = false; | ||
| 909 | + //原始重量 | ||
| 910 | + this.formdisabled.originalWeight = false; | ||
| 911 | + }, | ||
| 912 | + //计算高地价可配 | ||
| 913 | + LowHighAvailable() { | ||
| 914 | + //判断是否开启高地价 | ||
| 915 | + if (this.form.highLowPriceFlg) { | ||
| 916 | + this.ishighPriceWeightPercent = false; | ||
| 917 | + let Weight = 0; | ||
| 918 | + //计算实际重量 | ||
| 919 | + if ( | ||
| 920 | + this.form.highPriceWeightPercent > 0 || | ||
| 921 | + this.form.lowPriceWeightPercent > 0 | ||
| 922 | + ) { | ||
| 923 | + Weight = this.Weightall(); | ||
| 517 | } | 924 | } |
| 518 | - | 925 | + //高价可配 |
| 519 | - findAllFltDataApi(this.queryParams).then(response => { | 926 | + if (this.form.highPriceWeightPercent >= 0) { |
| 520 | - if (response.code == 200) { | 927 | + this.$set( |
| 521 | - | 928 | + this.form, |
| 522 | - this.findAllFltDatList = response.data.list; | 929 | + "lowPriceWeightPercent", |
| 523 | - this.total = response.data.totalCount; | 930 | + 100 - this.form.highPriceWeightPercent |
| 524 | - this.loading = false; | 931 | + ); |
| 932 | + this.$set( | ||
| 933 | + this.form, | ||
| 934 | + "highAvailableWeight", | ||
| 935 | + (Weight - this.form.alloctedWeight) * | ||
| 936 | + (this.form.highPriceWeightPercent / 100) | ||
| 937 | + ); | ||
| 938 | + // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100) | ||
| 939 | + } else if ( | ||
| 940 | + this.title == "修改航班信息" && | ||
| 941 | + this.form.highPriceWeightPercent > 0 | ||
| 942 | + ) { | ||
| 943 | + if (this.form.highAvailableWeight) { | ||
| 944 | + this.$set( | ||
| 945 | + this.form, | ||
| 946 | + "highAvailableWeight", | ||
| 947 | + this.form.highAvailableWeight | ||
| 948 | + ); | ||
| 525 | } else { | 949 | } else { |
| 526 | - this.msgError(response.msg); | 950 | + this.$set( |
| 951 | + this.form, | ||
| 952 | + "highAvailableWeight", | ||
| 953 | + (Weight - this.form.alloctedWeight) * | ||
| 954 | + (this.form.highPriceWeightPercent / 100) | ||
| 955 | + ); | ||
| 527 | } | 956 | } |
| 528 | - | 957 | + } else { |
| 529 | - }); | 958 | + this.$set(this.form, "highAvailableWeight", 0); |
| 530 | - | 959 | + // this.form.HighAvailableWeight = 0; |
| 531 | - }, | 960 | + } |
| 532 | - /** 新增按钮操作 */ | 961 | + //低价可配 |
| 533 | - handleAdd() { | 962 | + if (this.form.lowPriceWeightPercent > 0) { |
| 534 | - this.reset(); | 963 | + this.$set( |
| 535 | - this.open = true; | 964 | + this.form, |
| 536 | - this.title = "添加航班信息"; | 965 | + "lowAvailableWeight", |
| 537 | - this.form.id = null; | 966 | + Weight - this.form.alloctedWeight - this.form.highAvailableWeight |
| 538 | - this.form.statusId = this.flightStatuslist[0].id; | 967 | + ); |
| 539 | - this.form.alloctedWeight = 0; //已配重量 | 968 | + //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; |
| 540 | - this.form.lowAllocatedWeight = 0; //低价已配重量 | 969 | + } else if ( |
| 541 | - this.form.highAllocatedWeight = 0; //高价已配重量 | 970 | + this.title == "修改航班信息" && |
| 542 | - | 971 | + this.form.lowPriceWeightPercent > 0 |
| 543 | - //航班号 | 972 | + ) { |
| 544 | - this.formdisabled.fltNo = false; | 973 | + if (this.form.lowAvailableWeight) { |
| 545 | - //航班日期 | 974 | + this.$set( |
| 546 | - this.formdisabled.fltDate = false; | 975 | + this.form, |
| 547 | - //航班路线 | 976 | + "lowAvailableWeight", |
| 548 | - this.formdisabled.route = false; | 977 | + this.form.lowAvailableWeight |
| 549 | - //航班种类 | 978 | + ); |
| 550 | - this.formdisabled.kindId = false; | 979 | + } else { |
| 551 | - //航班类型 | 980 | + this.$set( |
| 552 | - this.formdisabled.typeId = false; | 981 | + this.form, |
| 553 | - //原始重量 | 982 | + "lowAvailableWeight", |
| 554 | - this.formdisabled.originalWeight = false; | 983 | + Weight - this.form.alloctedWeight - this.form.highAvailableWeight |
| 555 | - }, | 984 | + ); |
| 556 | - //计算高地价可配 | ||
| 557 | - LowHighAvailable() { | ||
| 558 | - //判断是否开启高地价 | ||
| 559 | - if (this.form.highLowPriceFlg) { | ||
| 560 | - this.ishighPriceWeightPercent=false; | ||
| 561 | - let Weight = 0; | ||
| 562 | - //计算实际重量 | ||
| 563 | - if (this.form.highPriceWeightPercent > 0 || this.form.lowPriceWeightPercent > 0) { | ||
| 564 | - Weight = this.Weightall(); | ||
| 565 | - } | ||
| 566 | - //高价可配 | ||
| 567 | - if (this.form.highPriceWeightPercent >= 0) { | ||
| 568 | - this.$set(this.form, "lowPriceWeightPercent", 100-this.form.highPriceWeightPercent); | ||
| 569 | - this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form | ||
| 570 | - .highPriceWeightPercent / 100)); | ||
| 571 | - // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100) | ||
| 572 | - }else if(this.title == "修改航班信息" && this.form.highPriceWeightPercent > 0){ | ||
| 573 | - if(this.form.highAvailableWeight){ | ||
| 574 | - this.$set(this.form, 'highAvailableWeight', this.form.highAvailableWeight) | ||
| 575 | - }else{ | ||
| 576 | - this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form | ||
| 577 | - .highPriceWeightPercent / 100)); | ||
| 578 | - } | ||
| 579 | - }else { | ||
| 580 | - this.$set(this.form, "highAvailableWeight", 0); | ||
| 581 | - // this.form.HighAvailableWeight = 0; | ||
| 582 | - } | ||
| 583 | - //低价可配 | ||
| 584 | - if (this.form.lowPriceWeightPercent > 0) { | ||
| 585 | - this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form | ||
| 586 | - .highAvailableWeight); | ||
| 587 | - //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; | ||
| 588 | - }else if(this.title == "修改航班信息" && this.form.lowPriceWeightPercent > 0){ | ||
| 589 | - if(this.form.lowAvailableWeight){ | ||
| 590 | - this.$set(this.form, 'lowAvailableWeight', this.form.lowAvailableWeight) | ||
| 591 | - }else{ | ||
| 592 | - this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form | ||
| 593 | - .highAvailableWeight); | ||
| 594 | - } | ||
| 595 | - }else { | ||
| 596 | - this.$set(this.form, "lowAvailableWeight", 0); | ||
| 597 | - // this.form.lowAvailableWeight = 0; | ||
| 598 | } | 985 | } |
| 599 | - }else{ | 986 | + } else { |
| 600 | - this.ishighPriceWeightPercent=true; | 987 | + this.$set(this.form, "lowAvailableWeight", 0); |
| 988 | + // this.form.lowAvailableWeight = 0; | ||
| 601 | } | 989 | } |
| 990 | + } else { | ||
| 991 | + this.ishighPriceWeightPercent = true; | ||
| 992 | + } | ||
| 993 | + }, | ||
| 994 | + //计算实际重量 | ||
| 995 | + Weightall() { | ||
| 996 | + let Weight = 0; | ||
| 997 | + if (this.form.extraWeightPercent > 0) { | ||
| 998 | + Weight = | ||
| 999 | + this.form.originalWeight + | ||
| 1000 | + this.form.originalWeight * (this.form.extraWeightPercent / 100); | ||
| 1001 | + } else { | ||
| 1002 | + Weight = this.form.originalWeight; | ||
| 1003 | + } | ||
| 1004 | + return Weight; | ||
| 1005 | + }, | ||
| 602 | 1006 | ||
| 603 | - }, | 1007 | + /** 修改按钮操作 */ |
| 604 | - //计算实际重量 | 1008 | + handleUpdate(row) { |
| 605 | - Weightall() { | 1009 | + this.reset(); |
| 606 | - let Weight = 0; | 1010 | + this.open = true; |
| 607 | - if (this.form.extraWeightPercent > 0) { | 1011 | + this.title = "修改航班信息"; |
| 608 | - Weight = this.form.originalWeight + this.form.originalWeight * (this.form.extraWeightPercent / 100) | 1012 | + //航班号 |
| 609 | - }else { | 1013 | + this.formdisabled.fltNo = true; |
| 610 | - Weight = this.form.originalWeight; | 1014 | + //航班日期 |
| 1015 | + this.formdisabled.fltDate = true; | ||
| 1016 | + //根据ID查item | ||
| 1017 | + findFltById(row).then((response) => { | ||
| 1018 | + if (response.code == 200) { | ||
| 1019 | + this.form = response.data; | ||
| 1020 | + //是否开启高地价 | ||
| 1021 | + this.form.highLowPriceFlg = | ||
| 1022 | + this.form.highLowPriceFlg === 1 ? true : false; | ||
| 1023 | + //是否预审 | ||
| 1024 | + this.form.isNeedRequired = | ||
| 1025 | + this.form.isNeedRequired === 1 ? true : false; | ||
| 1026 | + // 计算高地价可配 | ||
| 1027 | + this.LowHighAvailable(); | ||
| 1028 | + } else { | ||
| 1029 | + this.msgError(response.msg); | ||
| 611 | } | 1030 | } |
| 612 | - return Weight; | 1031 | + }); |
| 613 | - }, | 1032 | + }, |
| 614 | - | 1033 | + /** 删除按钮操作 */ |
| 615 | - /** 修改按钮操作 */ | 1034 | + handleDelete(row) { |
| 616 | - handleUpdate(row) { | 1035 | + const fIds = this.ids; |
| 617 | - this.reset(); | 1036 | + this.$confirm("是否确认删除所选数据?", "警告", { |
| 618 | - this.open = true; | 1037 | + confirmButtonText: "确定", |
| 619 | - this.title = "修改航班信息"; | 1038 | + cancelButtonText: "取消", |
| 620 | - //航班号 | 1039 | + type: "warning", |
| 621 | - this.formdisabled.fltNo = true; | 1040 | + }) |
| 622 | - //航班日期 | 1041 | + .then(() => { |
| 623 | - this.formdisabled.fltDate = true; | 1042 | + return delFlight(fIds); |
| 624 | - //根据ID查item | 1043 | + }) |
| 625 | - findFltById(row).then(response => { | 1044 | + .then((response) => { |
| 626 | - if (response.code == 200) { | 1045 | + this.findAllFltData(); |
| 627 | - this.form = response.data; | 1046 | + if (response.data.length > 0) { |
| 628 | - //是否开启高地价 | 1047 | + this.gridData = response.data; |
| 629 | - this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; | 1048 | + this.$confirm(response.msg, "提示", { |
| 630 | - //是否预审 | 1049 | + confirmButtonText: "查看删除失败航班信息", |
| 631 | - this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false; | 1050 | + cancelButtonText: "取消", |
| 632 | - // 计算高地价可配 | 1051 | + type: "warning", |
| 633 | - this.LowHighAvailable(); | 1052 | + center: true, |
| 634 | - | 1053 | + }) |
| 1054 | + .then(() => { | ||
| 1055 | + this.dialogTableVisible = true; | ||
| 1056 | + }) | ||
| 1057 | + .catch(() => {}); | ||
| 635 | } else { | 1058 | } else { |
| 636 | - this.msgError(response.msg); | 1059 | + this.msgSuccess(response.msg); |
| 637 | } | 1060 | } |
| 1061 | + }) | ||
| 1062 | + .catch(() => {}); | ||
| 1063 | + }, | ||
| 638 | 1064 | ||
| 639 | - }); | 1065 | + /** 提交按钮 */ |
| 640 | - }, | 1066 | + submitForm: function () { |
| 641 | - /** 删除按钮操作 */ | 1067 | + this.$refs["form"].validate((valid) => { |
| 642 | - handleDelete(row) { | 1068 | + if (valid) { |
| 643 | - const fIds =this.ids; | 1069 | + let formdata = JSON.parse(JSON.stringify(this.form)); |
| 644 | - this.$confirm('是否确认删除所选数据?', "警告", { | 1070 | + |
| 645 | - confirmButtonText: "确定", | 1071 | + //高价百分比和低价百分比和不可以大于100 |
| 646 | - cancelButtonText: "取消", | 1072 | + if ( |
| 647 | - type: "warning" | 1073 | + this.form.highLowPriceFlg && |
| 648 | - }).then(function() { | 1074 | + (formdata.highPriceWeightPercent > 100 || |
| 649 | - return delFlight(fIds); | 1075 | + formdata.highPriceWeightPercent < 0) |
| 650 | - }).then(response => { | 1076 | + ) { |
| 651 | - this.findAllFltData(); | 1077 | + this.$message.warning("请正确填写高低价百分比"); |
| 652 | - if(response.data.length>0){ | 1078 | + return; |
| 653 | - this.gridData=response.data; | 1079 | + } |
| 654 | - this.$confirm(response.msg, '提示', { | 1080 | + //已删除的无法修改 |
| 655 | - confirmButtonText: '查看删除失败航班信息', | 1081 | + //拿到已删除的id |
| 656 | - cancelButtonText: '取消', | 1082 | + let statusId = 0; |
| 657 | - type: 'warning', | 1083 | + this.flightStatuslist.map((item) => { |
| 658 | - center: true | 1084 | + // this.unitList 是你 select option遍历的集合 e 是选中的id |
| 659 | - }).then(() => { | 1085 | + if (item.chineseName === "已删除") { |
| 660 | - this.dialogTableVisible=true; | 1086 | + statusId = item.id; |
| 661 | - }).catch(function() { }); | ||
| 662 | - | ||
| 663 | - }else{ | ||
| 664 | - this.msgSuccess(response.msg); | ||
| 665 | - } | ||
| 666 | - }).catch(function() {}); | ||
| 667 | - }, | ||
| 668 | - | ||
| 669 | - /** 提交按钮 */ | ||
| 670 | - submitForm: function() { | ||
| 671 | - this.$refs["form"].validate(valid => { | ||
| 672 | - if (valid) { | ||
| 673 | - let formdata = JSON.parse(JSON.stringify(this.form)); | ||
| 674 | - | ||
| 675 | - //高价百分比和低价百分比和不可以大于100 | ||
| 676 | - if (this.form.highLowPriceFlg && (formdata.highPriceWeightPercent>100||formdata.highPriceWeightPercent<0) ) { | ||
| 677 | - this.$message.warning("请正确填写高低价百分比"); | ||
| 678 | - return; | ||
| 679 | - } | ||
| 680 | - //已删除的无法修改 | ||
| 681 | - //拿到已删除的id | ||
| 682 | - let statusId=0; | ||
| 683 | - this.flightStatuslist.map((item) => { | ||
| 684 | - // this.unitList 是你 select option遍历的集合 e 是选中的id | ||
| 685 | - if (item.chineseName === "已删除") { | ||
| 686 | - statusId=item.id; | ||
| 687 | - return; | ||
| 688 | - } | ||
| 689 | - }) | ||
| 690 | - if (statusId === formdata.statusId) { | ||
| 691 | - this.$message.warning("已删除的航班无法修改"); | ||
| 692 | return; | 1087 | return; |
| 693 | } | 1088 | } |
| 694 | - //是否开启高地价 | 1089 | + }); |
| 695 | - formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0; | 1090 | + if (statusId === formdata.statusId) { |
| 696 | - //是否预审 | 1091 | + this.$message.warning("已删除的航班无法修改"); |
| 697 | - formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; | 1092 | + return; |
| 698 | - //处理数据 | ||
| 699 | - saveOrUpdate(formdata).then(response => { | ||
| 700 | - if (response.code === 200) { | ||
| 701 | - this.msgSuccess("保存成功"); | ||
| 702 | - this.open = false; | ||
| 703 | - this.findAllFltData(); | ||
| 704 | - } else { | ||
| 705 | - this.msgError(response.msg); | ||
| 706 | - } | ||
| 707 | - }); | ||
| 708 | - | ||
| 709 | } | 1093 | } |
| 710 | - }); | 1094 | + //是否开启高地价 |
| 711 | - }, | 1095 | + formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0; |
| 712 | - // 表单重置 | 1096 | + //是否预审 |
| 713 | - reset() { | 1097 | + formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; |
| 714 | - this.form = {}; | 1098 | + //处理数据 |
| 715 | - this.resetForm("form"); | 1099 | + saveOrUpdate(formdata).then((response) => { |
| 716 | - }, | 1100 | + if (response.code === 200) { |
| 717 | - // 取消按钮 | 1101 | + this.msgSuccess("保存成功"); |
| 718 | - cancel() { | 1102 | + this.open = false; |
| 719 | - this.open = false; | 1103 | + this.findAllFltData(); |
| 720 | - this.findAllFltData(); | 1104 | + } else { |
| 721 | - this.reset(); | 1105 | + this.msgError(response.msg); |
| 722 | - }, | 1106 | + } |
| 723 | - | 1107 | + }); |
| 724 | - /** 重置按钮操作 */ | ||
| 725 | - resetQuery() { | ||
| 726 | - this.resetForm("queryForm"); | ||
| 727 | - this.handleQuery(); | ||
| 728 | - }, | ||
| 729 | - /** 搜索按钮操作 */ | ||
| 730 | - handleQuery() { | ||
| 731 | - this.queryParams.pageNum = 1; | ||
| 732 | - this.queryParams.start = 0; | ||
| 733 | - this.findAllFltData(); | ||
| 734 | - }, | ||
| 735 | - //批量开启/关闭航班 | ||
| 736 | - handleFlightStatus(status){ | ||
| 737 | - let handle = status == 'flightStatus80' ? '关闭' : '开启' | ||
| 738 | - if (this.ids.length == 0){ | ||
| 739 | - this.msgError('请选择批量' + handle + '的航班') | ||
| 740 | - return; | ||
| 741 | } | 1108 | } |
| 742 | - let data = {}; | 1109 | + }); |
| 743 | - data.status = status; | 1110 | + }, |
| 744 | - data.updateIds = this.ids; | 1111 | + // 表单重置 |
| 745 | - | 1112 | + reset() { |
| 746 | - updateStatusBatch(data).then(response => { | 1113 | + this.form = {}; |
| 747 | - if (response.code === 200) { | 1114 | + this.resetForm("form"); |
| 748 | - this.msgSuccess( handle + "成功"); | 1115 | + }, |
| 749 | - this.findAllFltData(); | 1116 | + // 取消按钮 |
| 750 | - } else { | 1117 | + cancel() { |
| 751 | - this.msgError(response.msg); | 1118 | + this.open = false; |
| 752 | - } | 1119 | + this.findAllFltData(); |
| 753 | - }); | 1120 | + this.reset(); |
| 754 | - } | 1121 | + }, |
| 755 | 1122 | ||
| 756 | - } | 1123 | + /** 重置按钮操作 */ |
| 757 | - }; | 1124 | + resetQuery() { |
| 1125 | + this.resetForm("queryForm"); | ||
| 1126 | + this.handleQuery(); | ||
| 1127 | + }, | ||
| 1128 | + /** 搜索按钮操作 */ | ||
| 1129 | + handleQuery() { | ||
| 1130 | + this.queryParams.pageNum = 1; | ||
| 1131 | + this.queryParams.start = 0; | ||
| 1132 | + this.findAllFltData(); | ||
| 1133 | + }, | ||
| 1134 | + //批量开启/关闭航班 | ||
| 1135 | + handleFlightStatus(status) { | ||
| 1136 | + let handle = status == "flightStatus80" ? "关闭" : "开启"; | ||
| 1137 | + if (this.ids.length == 0) { | ||
| 1138 | + this.msgError("请选择批量" + handle + "的航班"); | ||
| 1139 | + return; | ||
| 1140 | + } | ||
| 1141 | + let data = {}; | ||
| 1142 | + data.status = status; | ||
| 1143 | + data.updateIds = this.ids; | ||
| 1144 | + | ||
| 1145 | + updateStatusBatch(data).then((response) => { | ||
| 1146 | + if (response.code === 200) { | ||
| 1147 | + this.msgSuccess(handle + "成功"); | ||
| 1148 | + this.findAllFltData(); | ||
| 1149 | + } else { | ||
| 1150 | + this.msgError(response.msg); | ||
| 1151 | + } | ||
| 1152 | + }); | ||
| 1153 | + }, | ||
| 1154 | + }, | ||
| 1155 | +}; | ||
| 758 | </script> | 1156 | </script> |
| 1157 | + | ||
| 759 | <style> | 1158 | <style> |
| 760 | - .el-table--striped .el-table__body tr.el-table__row--striped.current-row td, | 1159 | +.el-table--striped .el-table__body tr.el-table__row--striped.current-row td, |
| 761 | - .el-table__body tr.current-row>td { | 1160 | +.el-table__body tr.current-row > td { |
| 762 | - background-color: #a0cfff; | 1161 | + background-color: #a0cfff; |
| 763 | - } | 1162 | +} |
| 764 | - | 1163 | + |
| 765 | - .el-table--striped .el-table__body tr.hover-row.el-table__row--striped>td, | 1164 | +.el-table--striped .el-table__body tr.hover-row.el-table__row--striped > td, |
| 766 | - .el-table__body tr.hover-row>td { | 1165 | +.el-table__body tr.hover-row > td { |
| 767 | - background-color: #d9ecff !important; | 1166 | + background-color: #d9ecff !important; |
| 768 | - } | 1167 | +} |
| 769 | </style> | 1168 | </style> | ... | ... |
| ... | @@ -19,13 +19,14 @@ | ... | @@ -19,13 +19,14 @@ |
| 19 | start-placeholder="开始日期" | 19 | start-placeholder="开始日期" |
| 20 | end-placeholder="结束日期" | 20 | end-placeholder="结束日期" |
| 21 | :value-format="valueFormat" | 21 | :value-format="valueFormat" |
| 22 | + clearable | ||
| 22 | > | 23 | > |
| 23 | </el-date-picker> | 24 | </el-date-picker> |
| 24 | </el-form-item> | 25 | </el-form-item> |
| 25 | </el-col> | 26 | </el-col> |
| 26 | <el-col :span="6"> | 27 | <el-col :span="6"> |
| 27 | <el-form-item label="配载航班号"> | 28 | <el-form-item label="配载航班号"> |
| 28 | - <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :autosize="true"></el-input> | 29 | + <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :autosize="true" clearable></el-input> |
| 29 | </el-form-item> | 30 | </el-form-item> |
| 30 | </el-col> | 31 | </el-col> |
| 31 | <el-col :span="6"> | 32 | <el-col :span="6"> |
| ... | @@ -55,6 +56,7 @@ | ... | @@ -55,6 +56,7 @@ |
| 55 | class="formItem" | 56 | class="formItem" |
| 56 | placeholder="请输入运单号(回车间隔)" | 57 | placeholder="请输入运单号(回车间隔)" |
| 57 | :autosize="true" | 58 | :autosize="true" |
| 59 | + clearable | ||
| 58 | ></el-input> | 60 | ></el-input> |
| 59 | </el-form-item> | 61 | </el-form-item> |
| 60 | </el-col> | 62 | </el-col> |
| ... | @@ -103,6 +105,7 @@ | ... | @@ -103,6 +105,7 @@ |
| 103 | class="formItem" | 105 | class="formItem" |
| 104 | placeholder="S_;P_;E2" | 106 | placeholder="S_;P_;E2" |
| 105 | :autosize="true" | 107 | :autosize="true" |
| 108 | + clearable | ||
| 106 | ></el-input> | 109 | ></el-input> |
| 107 | </el-form-item> | 110 | </el-form-item> |
| 108 | </el-col> | 111 | </el-col> |
| ... | @@ -114,6 +117,7 @@ | ... | @@ -114,6 +117,7 @@ |
| 114 | class="formItem" | 117 | class="formItem" |
| 115 | placeholder="PVG;PEK" | 118 | placeholder="PVG;PEK" |
| 116 | :autosize="true" | 119 | :autosize="true" |
| 120 | + clearable | ||
| 117 | ></el-input> | 121 | ></el-input> |
| 118 | </el-form-item> | 122 | </el-form-item> |
| 119 | </el-col> | 123 | </el-col> |
| ... | @@ -129,13 +133,14 @@ | ... | @@ -129,13 +133,14 @@ |
| 129 | start-placeholder="开始日期" | 133 | start-placeholder="开始日期" |
| 130 | end-placeholder="结束日期" | 134 | end-placeholder="结束日期" |
| 131 | :value-format="valueFormat" | 135 | :value-format="valueFormat" |
| 136 | + clearable | ||
| 132 | > | 137 | > |
| 133 | </el-date-picker> | 138 | </el-date-picker> |
| 134 | </el-form-item> | 139 | </el-form-item> |
| 135 | </el-col> | 140 | </el-col> |
| 136 | <el-col :span="6"> | 141 | <el-col :span="6"> |
| 137 | <el-form-item label="ACCS原航班号"> | 142 | <el-form-item label="ACCS原航班号"> |
| 138 | - <el-input type="text" v-model="fltNo" class="formItem" placeholder="请输入ACCS航班号"></el-input> | 143 | + <el-input type="text" v-model="fltNo" class="formItem" placeholder="请输入ACCS航班号" clearable></el-input> |
| 139 | </el-form-item> | 144 | </el-form-item> |
| 140 | </el-col> | 145 | </el-col> |
| 141 | <el-col :span="6"> | 146 | <el-col :span="6"> |
| ... | @@ -146,6 +151,7 @@ | ... | @@ -146,6 +151,7 @@ |
| 146 | type="date" | 151 | type="date" |
| 147 | placeholder="选择日期" | 152 | placeholder="选择日期" |
| 148 | :value-format="valueFormat" | 153 | :value-format="valueFormat" |
| 154 | + clearable | ||
| 149 | > | 155 | > |
| 150 | </el-date-picker> | 156 | </el-date-picker> |
| 151 | </el-form-item> | 157 | </el-form-item> |
| ... | @@ -160,6 +166,7 @@ | ... | @@ -160,6 +166,7 @@ |
| 160 | start-placeholder="开始日期" | 166 | start-placeholder="开始日期" |
| 161 | end-placeholder="结束日期" | 167 | end-placeholder="结束日期" |
| 162 | :value-format="valueFormat" | 168 | :value-format="valueFormat" |
| 169 | + clearable | ||
| 163 | > | 170 | > |
| 164 | </el-date-picker> | 171 | </el-date-picker> |
| 165 | </el-form-item> | 172 | </el-form-item> |
| ... | @@ -295,7 +302,8 @@ export default { | ... | @@ -295,7 +302,8 @@ export default { |
| 295 | width: "50", | 302 | width: "50", |
| 296 | align: "center", | 303 | align: "center", |
| 297 | sorTable: false, | 304 | sorTable: false, |
| 298 | - fixed:true, | 305 | + fixed: true, |
| 306 | + disabled:true | ||
| 299 | }, | 307 | }, |
| 300 | { | 308 | { |
| 301 | type: "index", | 309 | type: "index", |
| ... | @@ -304,97 +312,108 @@ export default { | ... | @@ -304,97 +312,108 @@ export default { |
| 304 | width: "50", | 312 | width: "50", |
| 305 | align: "center", | 313 | align: "center", |
| 306 | sorTable: false, | 314 | sorTable: false, |
| 307 | - fixed:false, | 315 | + fixed: false, |
| 316 | + disabled:true | ||
| 308 | }, | 317 | }, |
| 309 | { | 318 | { |
| 310 | type: "", | 319 | type: "", |
| 311 | name: "口岸代码", | 320 | name: "口岸代码", |
| 312 | value: "portName", | 321 | value: "portName", |
| 313 | - width: "150", | 322 | + width: "100", |
| 314 | align: "center", | 323 | align: "center", |
| 315 | sorTable: true, | 324 | sorTable: true, |
| 316 | - fixed:false, | 325 | + fixed: false, |
| 326 | + disabled:true | ||
| 317 | }, | 327 | }, |
| 318 | { | 328 | { |
| 319 | type: "", | 329 | type: "", |
| 320 | name: "取件日期", | 330 | name: "取件日期", |
| 321 | value: "pickUpDate", | 331 | value: "pickUpDate", |
| 322 | - width: "150", | 332 | + width: "120", |
| 323 | align: "center", | 333 | align: "center", |
| 324 | sorTable: true, | 334 | sorTable: true, |
| 325 | - fixed:false, | 335 | + fixed: false, |
| 336 | + disabled:true | ||
| 326 | }, | 337 | }, |
| 327 | { | 338 | { |
| 328 | type: "", | 339 | type: "", |
| 329 | name: "取件扫描号", | 340 | name: "取件扫描号", |
| 330 | value: "pickUpScanNo", | 341 | value: "pickUpScanNo", |
| 331 | - width: "150", | 342 | + width: "120", |
| 332 | align: "center", | 343 | align: "center", |
| 333 | sorTable: true, | 344 | sorTable: true, |
| 334 | - fixed:false, | 345 | + fixed: false, |
| 346 | + disabled:true | ||
| 335 | }, | 347 | }, |
| 336 | { | 348 | { |
| 337 | type: "", | 349 | type: "", |
| 338 | name: "站点", | 350 | name: "站点", |
| 339 | value: "siteName", | 351 | value: "siteName", |
| 340 | - width: "150", | 352 | + width: "80", |
| 341 | align: "center", | 353 | align: "center", |
| 342 | sorTable: true, | 354 | sorTable: true, |
| 343 | - fixed:false, | 355 | + fixed: false, |
| 356 | + disabled:true | ||
| 344 | }, | 357 | }, |
| 345 | { | 358 | { |
| 346 | type: "", | 359 | type: "", |
| 347 | name: "运单号", | 360 | name: "运单号", |
| 348 | value: "waybillNo", | 361 | value: "waybillNo", |
| 349 | - width: "150", | 362 | + width: "120", |
| 350 | align: "center", | 363 | align: "center", |
| 351 | sorTable: true, | 364 | sorTable: true, |
| 352 | - fixed:false, | 365 | + fixed: false, |
| 366 | + disabled:true | ||
| 353 | }, | 367 | }, |
| 354 | { | 368 | { |
| 355 | type: "", | 369 | type: "", |
| 356 | name: "总单号", | 370 | name: "总单号", |
| 357 | value: "totalWaybillNo", | 371 | value: "totalWaybillNo", |
| 358 | - width: "150", | 372 | + width: "120", |
| 359 | align: "center", | 373 | align: "center", |
| 360 | sorTable: true, | 374 | sorTable: true, |
| 361 | - fixed:false, | 375 | + fixed: false, |
| 376 | + disabled:true | ||
| 362 | }, | 377 | }, |
| 363 | { | 378 | { |
| 364 | type: "", | 379 | type: "", |
| 365 | name: "服务类型", | 380 | name: "服务类型", |
| 366 | value: "serviceTypeName", | 381 | value: "serviceTypeName", |
| 367 | - width: "150", | 382 | + width: "100", |
| 368 | align: "center", | 383 | align: "center", |
| 369 | sorTable: true, | 384 | sorTable: true, |
| 370 | - fixed:false, | 385 | + fixed: false, |
| 386 | + disabled:true | ||
| 371 | }, | 387 | }, |
| 372 | { | 388 | { |
| 373 | type: "", | 389 | type: "", |
| 374 | name: "服务代码", | 390 | name: "服务代码", |
| 375 | value: "serviceCode", | 391 | value: "serviceCode", |
| 376 | - width: "150", | 392 | + width: "100", |
| 377 | align: "center", | 393 | align: "center", |
| 378 | sorTable: false, | 394 | sorTable: false, |
| 379 | - fixed:false, | 395 | + fixed: false, |
| 396 | + disabled:true | ||
| 380 | }, | 397 | }, |
| 381 | { | 398 | { |
| 382 | type: "", | 399 | type: "", |
| 383 | name: "URSA", | 400 | name: "URSA", |
| 384 | value: "ursa", | 401 | value: "ursa", |
| 385 | - width: "150", | 402 | + width: "100", |
| 386 | align: "center", | 403 | align: "center", |
| 387 | sorTable: true, | 404 | sorTable: true, |
| 388 | - fixed:false, | 405 | + fixed: false, |
| 406 | + disabled:true | ||
| 389 | }, | 407 | }, |
| 390 | { | 408 | { |
| 391 | type: "", | 409 | type: "", |
| 392 | name: "申报类型", | 410 | name: "申报类型", |
| 393 | value: "typeName", | 411 | value: "typeName", |
| 394 | - width: "150", | 412 | + width: "100", |
| 395 | align: "center", | 413 | align: "center", |
| 396 | sorTable: true, | 414 | sorTable: true, |
| 397 | - fixed:false, | 415 | + fixed: false, |
| 416 | + disabled:true | ||
| 398 | }, | 417 | }, |
| 399 | { | 418 | { |
| 400 | type: "", | 419 | type: "", |
| ... | @@ -403,34 +422,38 @@ export default { | ... | @@ -403,34 +422,38 @@ export default { |
| 403 | width: "150", | 422 | width: "150", |
| 404 | align: "center", | 423 | align: "center", |
| 405 | sorTable: true, | 424 | sorTable: true, |
| 406 | - fixed:false, | 425 | + fixed: false, |
| 426 | + disabled:true | ||
| 407 | }, | 427 | }, |
| 408 | { | 428 | { |
| 409 | type: "", | 429 | type: "", |
| 410 | name: "subcategory", | 430 | name: "subcategory", |
| 411 | value: "subCategory", | 431 | value: "subCategory", |
| 412 | - width: "150", | 432 | + width: "140", |
| 413 | align: "center", | 433 | align: "center", |
| 414 | sorTable: true, | 434 | sorTable: true, |
| 415 | - fixed:false, | 435 | + fixed: false, |
| 436 | + disabled:true | ||
| 416 | }, | 437 | }, |
| 417 | { | 438 | { |
| 418 | type: "", | 439 | type: "", |
| 419 | name: "件数", | 440 | name: "件数", |
| 420 | value: "qty", | 441 | value: "qty", |
| 421 | - width: "150", | 442 | + width: "80", |
| 422 | align: "center", | 443 | align: "center", |
| 423 | sorTable: true, | 444 | sorTable: true, |
| 424 | - fixed:false, | 445 | + fixed: false, |
| 446 | + disabled:true | ||
| 425 | }, | 447 | }, |
| 426 | { | 448 | { |
| 427 | type: "", | 449 | type: "", |
| 428 | name: "实际重量", | 450 | name: "实际重量", |
| 429 | value: "actualWeight", | 451 | value: "actualWeight", |
| 430 | - width: "150", | 452 | + width: "100", |
| 431 | align: "center", | 453 | align: "center", |
| 432 | sorTable: true, | 454 | sorTable: true, |
| 433 | - fixed:false, | 455 | + fixed: false, |
| 456 | + disabled:true | ||
| 434 | }, | 457 | }, |
| 435 | { | 458 | { |
| 436 | type: "", | 459 | type: "", |
| ... | @@ -439,79 +462,88 @@ export default { | ... | @@ -439,79 +462,88 @@ export default { |
| 439 | width: "150", | 462 | width: "150", |
| 440 | align: "center", | 463 | align: "center", |
| 441 | sorTable: true, | 464 | sorTable: true, |
| 442 | - fixed:false, | 465 | + fixed: false, |
| 466 | + disabled:true | ||
| 443 | }, | 467 | }, |
| 444 | { | 468 | { |
| 445 | type: "", | 469 | type: "", |
| 446 | name: "品名描述", | 470 | name: "品名描述", |
| 447 | value: "nameDescription", | 471 | value: "nameDescription", |
| 448 | - width: "150", | 472 | + width: "100", |
| 449 | align: "center", | 473 | align: "center", |
| 450 | sorTable: false, | 474 | sorTable: false, |
| 451 | - fixed:false, | 475 | + fixed: false, |
| 476 | + disabled:true | ||
| 452 | }, | 477 | }, |
| 453 | { | 478 | { |
| 454 | type: "", | 479 | type: "", |
| 455 | name: "海关回执状态", | 480 | name: "海关回执状态", |
| 456 | value: "customsReceiptStatusName", | 481 | value: "customsReceiptStatusName", |
| 457 | - width: "150", | 482 | + width: "140", |
| 458 | align: "center", | 483 | align: "center", |
| 459 | sorTable: true, | 484 | sorTable: true, |
| 460 | - fixed:false, | 485 | + fixed: false, |
| 486 | + disabled:true | ||
| 461 | }, | 487 | }, |
| 462 | { | 488 | { |
| 463 | type: "", | 489 | type: "", |
| 464 | name: "预审状态", | 490 | name: "预审状态", |
| 465 | value: "preQualificationStatus", | 491 | value: "preQualificationStatus", |
| 466 | - width: "150", | 492 | + width: "100", |
| 467 | align: "center", | 493 | align: "center", |
| 468 | sorTable: true, | 494 | sorTable: true, |
| 469 | - fixed:false, | 495 | + fixed: false, |
| 496 | + disabled:true | ||
| 470 | }, | 497 | }, |
| 471 | { | 498 | { |
| 472 | type: "", | 499 | type: "", |
| 473 | name: "航班预审意见", | 500 | name: "航班预审意见", |
| 474 | value: "caPretrialOpinion", | 501 | value: "caPretrialOpinion", |
| 475 | - width: "150", | 502 | + width: "120", |
| 476 | align: "center", | 503 | align: "center", |
| 477 | sorTable: false, | 504 | sorTable: false, |
| 478 | - fixed:false, | 505 | + fixed: false, |
| 506 | + disabled:true | ||
| 479 | }, | 507 | }, |
| 480 | { | 508 | { |
| 481 | type: "", | 509 | type: "", |
| 482 | name: "货物状态", | 510 | name: "货物状态", |
| 483 | value: "statusName", | 511 | value: "statusName", |
| 484 | - width: "150", | 512 | + width: "100", |
| 485 | align: "center", | 513 | align: "center", |
| 486 | sorTable: true, | 514 | sorTable: true, |
| 487 | - fixed:false, | 515 | + fixed: false, |
| 516 | + disabled:true | ||
| 488 | }, | 517 | }, |
| 489 | { | 518 | { |
| 490 | type: "", | 519 | type: "", |
| 491 | name: "终配航班号", | 520 | name: "终配航班号", |
| 492 | value: "finalFlightNo", | 521 | value: "finalFlightNo", |
| 493 | - width: "150", | 522 | + width: "120", |
| 494 | align: "center", | 523 | align: "center", |
| 495 | sorTable: true, | 524 | sorTable: true, |
| 496 | - fixed:false, | 525 | + fixed: false, |
| 526 | + disabled:true | ||
| 497 | }, | 527 | }, |
| 498 | { | 528 | { |
| 499 | type: "", | 529 | type: "", |
| 500 | name: "终配航班日期", | 530 | name: "终配航班日期", |
| 501 | value: "finalFlightTime", | 531 | value: "finalFlightTime", |
| 502 | - width: "150", | 532 | + width: "140", |
| 503 | align: "center", | 533 | align: "center", |
| 504 | sorTable: true, | 534 | sorTable: true, |
| 505 | - fixed:false, | 535 | + fixed: false, |
| 536 | + disabled:true | ||
| 506 | }, | 537 | }, |
| 507 | { | 538 | { |
| 508 | type: "", | 539 | type: "", |
| 509 | name: "二配航班号", | 540 | name: "二配航班号", |
| 510 | value: "twoMatchFlightNo", | 541 | value: "twoMatchFlightNo", |
| 511 | - width: "150", | 542 | + width: "120", |
| 512 | align: "center", | 543 | align: "center", |
| 513 | sorTable: true, | 544 | sorTable: true, |
| 514 | - fixed:false, | 545 | + fixed: false, |
| 546 | + disabled:true | ||
| 515 | }, | 547 | }, |
| 516 | { | 548 | { |
| 517 | type: "", | 549 | type: "", |
| ... | @@ -520,16 +552,18 @@ export default { | ... | @@ -520,16 +552,18 @@ export default { |
| 520 | width: "150", | 552 | width: "150", |
| 521 | align: "center", | 553 | align: "center", |
| 522 | sorTable: true, | 554 | sorTable: true, |
| 523 | - fixed:false, | 555 | + fixed: false, |
| 556 | + disabled:true | ||
| 524 | }, | 557 | }, |
| 525 | { | 558 | { |
| 526 | type: "", | 559 | type: "", |
| 527 | name: "预配航班号", | 560 | name: "预配航班号", |
| 528 | value: "preplanFlightNo", | 561 | value: "preplanFlightNo", |
| 529 | - width: "150", | 562 | + width: "120", |
| 530 | align: "center", | 563 | align: "center", |
| 531 | sorTable: true, | 564 | sorTable: true, |
| 532 | - fixed:false, | 565 | + fixed: false, |
| 566 | + disabled:true | ||
| 533 | }, | 567 | }, |
| 534 | { | 568 | { |
| 535 | type: "", | 569 | type: "", |
| ... | @@ -538,7 +572,8 @@ export default { | ... | @@ -538,7 +572,8 @@ export default { |
| 538 | width: "150", | 572 | width: "150", |
| 539 | align: "center", | 573 | align: "center", |
| 540 | sorTable: true, | 574 | sorTable: true, |
| 541 | - fixed:false, | 575 | + fixed: false, |
| 576 | + disabled:true | ||
| 542 | }, | 577 | }, |
| 543 | { | 578 | { |
| 544 | type: "", | 579 | type: "", |
| ... | @@ -547,7 +582,8 @@ export default { | ... | @@ -547,7 +582,8 @@ export default { |
| 547 | width: "150", | 582 | width: "150", |
| 548 | align: "center", | 583 | align: "center", |
| 549 | sorTable: true, | 584 | sorTable: true, |
| 550 | - fixed:false, | 585 | + fixed: false, |
| 586 | + disabled:true | ||
| 551 | }, | 587 | }, |
| 552 | { | 588 | { |
| 553 | type: "", | 589 | type: "", |
| ... | @@ -556,16 +592,18 @@ export default { | ... | @@ -556,16 +592,18 @@ export default { |
| 556 | width: "150", | 592 | width: "150", |
| 557 | align: "center", | 593 | align: "center", |
| 558 | sorTable: true, | 594 | sorTable: true, |
| 559 | - fixed:false, | 595 | + fixed: false, |
| 596 | + disabled:true | ||
| 560 | }, | 597 | }, |
| 561 | { | 598 | { |
| 562 | type: "", | 599 | type: "", |
| 563 | name: "ACCS原航线", | 600 | name: "ACCS原航线", |
| 564 | value: "accsFlightRoute", | 601 | value: "accsFlightRoute", |
| 565 | - width: "150", | 602 | + width: "140", |
| 566 | align: "center", | 603 | align: "center", |
| 567 | sorTable: true, | 604 | sorTable: true, |
| 568 | - fixed:false, | 605 | + fixed: false, |
| 606 | + disabled:true | ||
| 569 | }, | 607 | }, |
| 570 | { | 608 | { |
| 571 | type: "", | 609 | type: "", |
| ... | @@ -574,25 +612,28 @@ export default { | ... | @@ -574,25 +612,28 @@ export default { |
| 574 | width: "170", | 612 | width: "170", |
| 575 | align: "center", | 613 | align: "center", |
| 576 | sorTable: true, | 614 | sorTable: true, |
| 577 | - fixed:false, | 615 | + fixed: false, |
| 616 | + disabled:true | ||
| 578 | }, | 617 | }, |
| 579 | { | 618 | { |
| 580 | type: "", | 619 | type: "", |
| 581 | name: "是否自动", | 620 | name: "是否自动", |
| 582 | value: "cargoRulesStatus", | 621 | value: "cargoRulesStatus", |
| 583 | - width: "150", | 622 | + width: "100", |
| 584 | align: "center", | 623 | align: "center", |
| 585 | sorTable: true, | 624 | sorTable: true, |
| 586 | - fixed:false, | 625 | + fixed: false, |
| 626 | + disabled:true | ||
| 587 | }, | 627 | }, |
| 588 | { | 628 | { |
| 589 | type: "", | 629 | type: "", |
| 590 | name: "发件人账号", | 630 | name: "发件人账号", |
| 591 | value: "shipperAccount", | 631 | value: "shipperAccount", |
| 592 | - width: "150", | 632 | + width: "120", |
| 593 | align: "center", | 633 | align: "center", |
| 594 | sorTable: false, | 634 | sorTable: false, |
| 595 | - fixed:false, | 635 | + fixed: false, |
| 636 | + disabled:true | ||
| 596 | }, | 637 | }, |
| 597 | { | 638 | { |
| 598 | type: "", | 639 | type: "", |
| ... | @@ -601,52 +642,58 @@ export default { | ... | @@ -601,52 +642,58 @@ export default { |
| 601 | width: "150", | 642 | width: "150", |
| 602 | align: "center", | 643 | align: "center", |
| 603 | sorTable: false, | 644 | sorTable: false, |
| 604 | - fixed:false, | 645 | + fixed: false, |
| 646 | + disabled:true | ||
| 605 | }, | 647 | }, |
| 606 | { | 648 | { |
| 607 | type: "", | 649 | type: "", |
| 608 | name: "始发地城市名称", | 650 | name: "始发地城市名称", |
| 609 | value: "originCity", | 651 | value: "originCity", |
| 610 | - width: "150", | 652 | + width: "130", |
| 611 | align: "center", | 653 | align: "center", |
| 612 | sorTable: false, | 654 | sorTable: false, |
| 613 | - fixed:false, | 655 | + fixed: false, |
| 656 | + disabled:true | ||
| 614 | }, | 657 | }, |
| 615 | { | 658 | { |
| 616 | type: "", | 659 | type: "", |
| 617 | name: "收件地", | 660 | name: "收件地", |
| 618 | value: "destinationSiteName", | 661 | value: "destinationSiteName", |
| 619 | - width: "150", | 662 | + width: "90", |
| 620 | align: "center", | 663 | align: "center", |
| 621 | sorTable: false, | 664 | sorTable: false, |
| 622 | - fixed:false, | 665 | + fixed: false, |
| 666 | + disabled:true | ||
| 623 | }, | 667 | }, |
| 624 | { | 668 | { |
| 625 | type: "", | 669 | type: "", |
| 626 | name: "尺寸", | 670 | name: "尺寸", |
| 627 | value: "sizeStr", | 671 | value: "sizeStr", |
| 628 | - width: "150", | 672 | + width: "80", |
| 629 | align: "center", | 673 | align: "center", |
| 630 | sorTable: true, | 674 | sorTable: true, |
| 631 | - fixed:false, | 675 | + fixed: false, |
| 676 | + disabled:true | ||
| 632 | }, | 677 | }, |
| 633 | { | 678 | { |
| 634 | type: "", | 679 | type: "", |
| 635 | name: "大货预审意见(是否可以配置航班)", | 680 | name: "大货预审意见(是否可以配置航班)", |
| 636 | value: "bigPretrialOpinion", | 681 | value: "bigPretrialOpinion", |
| 637 | - width: "300", | 682 | + width: "250", |
| 638 | align: "center", | 683 | align: "center", |
| 639 | sorTable: false, | 684 | sorTable: false, |
| 640 | - fixed:false, | 685 | + fixed: false, |
| 686 | + disabled:true | ||
| 641 | }, | 687 | }, |
| 642 | { | 688 | { |
| 643 | type: "", | 689 | type: "", |
| 644 | name: "大货预审时间", | 690 | name: "大货预审时间", |
| 645 | value: "bigPretrialTime", | 691 | value: "bigPretrialTime", |
| 646 | - width: "150", | 692 | + width: "120", |
| 647 | align: "center", | 693 | align: "center", |
| 648 | sorTable: false, | 694 | sorTable: false, |
| 649 | - fixed:false, | 695 | + fixed: false, |
| 696 | + disabled:true | ||
| 650 | }, | 697 | }, |
| 651 | { | 698 | { |
| 652 | type: "", | 699 | type: "", |
| ... | @@ -655,7 +702,8 @@ export default { | ... | @@ -655,7 +702,8 @@ export default { |
| 655 | width: "150", | 702 | width: "150", |
| 656 | align: "center", | 703 | align: "center", |
| 657 | sorTable: true, | 704 | sorTable: true, |
| 658 | - fixed:false, | 705 | + fixed: false, |
| 706 | + disabled:true | ||
| 659 | }, | 707 | }, |
| 660 | { | 708 | { |
| 661 | type: "", | 709 | type: "", |
| ... | @@ -664,25 +712,28 @@ export default { | ... | @@ -664,25 +712,28 @@ export default { |
| 664 | width: "150", | 712 | width: "150", |
| 665 | align: "center", | 713 | align: "center", |
| 666 | sorTable: true, | 714 | sorTable: true, |
| 667 | - fixed:false, | 715 | + fixed: false, |
| 716 | + disabled:true | ||
| 668 | }, | 717 | }, |
| 669 | { | 718 | { |
| 670 | type: "", | 719 | type: "", |
| 671 | name: "创建人", | 720 | name: "创建人", |
| 672 | value: "createUserName", | 721 | value: "createUserName", |
| 673 | - width: "150", | 722 | + width: "90", |
| 674 | align: "center", | 723 | align: "center", |
| 675 | sorTable: true, | 724 | sorTable: true, |
| 676 | - fixed:false, | 725 | + fixed: false, |
| 726 | + disabled:true | ||
| 677 | }, | 727 | }, |
| 678 | { | 728 | { |
| 679 | type: "", | 729 | type: "", |
| 680 | name: "创建时间", | 730 | name: "创建时间", |
| 681 | value: "createTime", | 731 | value: "createTime", |
| 682 | - width: "150", | 732 | + width: "100", |
| 683 | align: "center", | 733 | align: "center", |
| 684 | sorTable: true, | 734 | sorTable: true, |
| 685 | - fixed:false, | 735 | + fixed: false, |
| 736 | + disabled:true | ||
| 686 | }, | 737 | }, |
| 687 | ], //表头数据 | 738 | ], //表头数据 |
| 688 | findConditionData: {}, //货物查询条件 | 739 | findConditionData: {}, //货物查询条件 |
| ... | @@ -706,7 +757,7 @@ export default { | ... | @@ -706,7 +757,7 @@ export default { |
| 706 | limitSize: 100, //无限制-1 | 757 | limitSize: 100, //无限制-1 |
| 707 | page:1, | 758 | page:1, |
| 708 | progress:0, | 759 | progress:0, |
| 709 | - formShow:false, | 760 | + formShow:true, |
| 710 | }; | 761 | }; |
| 711 | }, | 762 | }, |
| 712 | created() { | 763 | created() { |
| ... | @@ -723,19 +774,6 @@ export default { | ... | @@ -723,19 +774,6 @@ export default { |
| 723 | }); | 774 | }); |
| 724 | }, | 775 | }, |
| 725 | 776 | ||
| 726 | - // activated(){ | ||
| 727 | - // findConditionData().then((res) => { | ||
| 728 | - // if (res.code == 200) { | ||
| 729 | - // this.findConditionData = res.data; | ||
| 730 | - // } else { | ||
| 731 | - // this.$message({ | ||
| 732 | - // message: "查询条件不存在", | ||
| 733 | - // type: "warning", | ||
| 734 | - // }); | ||
| 735 | - // } | ||
| 736 | - // }); | ||
| 737 | - // }, | ||
| 738 | - | ||
| 739 | mounted() { | 777 | mounted() { |
| 740 | window.addEventListener("keydown", (code) => { | 778 | window.addEventListener("keydown", (code) => { |
| 741 | if (code.keyCode === 16 && code.shiftKey) { | 779 | if (code.keyCode === 16 && code.shiftKey) { | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="login"> | 2 | <div class="login"> |
| 3 | - <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> | 3 | + <el-form |
| 4 | + ref="loginForm" | ||
| 5 | + :model="loginForm" | ||
| 6 | + :rules="loginRules" | ||
| 7 | + class="login-form" | ||
| 8 | + > | ||
| 4 | <h3 class="title">IMAC后台管理系统</h3> | 9 | <h3 class="title">IMAC后台管理系统</h3> |
| 5 | <el-form-item prop="username"> | 10 | <el-form-item prop="username"> |
| 6 | - <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号"> | 11 | + <el-input |
| 7 | - <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> | 12 | + v-model="loginForm.username" |
| 13 | + type="text" | ||
| 14 | + auto-complete="off" | ||
| 15 | + placeholder="账号" | ||
| 16 | + > | ||
| 17 | + <svg-icon | ||
| 18 | + slot="prefix" | ||
| 19 | + icon-class="user" | ||
| 20 | + class="el-input__icon input-icon" | ||
| 21 | + /> | ||
| 8 | </el-input> | 22 | </el-input> |
| 9 | </el-form-item> | 23 | </el-form-item> |
| 10 | <el-form-item prop="password"> | 24 | <el-form-item prop="password"> |
| ... | @@ -15,17 +29,20 @@ | ... | @@ -15,17 +29,20 @@ |
| 15 | placeholder="密码" | 29 | placeholder="密码" |
| 16 | @keyup.enter.native="handleLogin" | 30 | @keyup.enter.native="handleLogin" |
| 17 | > | 31 | > |
| 18 | - <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> | 32 | + <svg-icon |
| 33 | + slot="prefix" | ||
| 34 | + icon-class="password" | ||
| 35 | + class="el-input__icon input-icon" | ||
| 36 | + /> | ||
| 19 | </el-input> | 37 | </el-input> |
| 20 | </el-form-item> | 38 | </el-form-item> |
| 21 | - | ||
| 22 | <!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> --> | 39 | <!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> --> |
| 23 | - <el-form-item style="width:100%;marginTop:44px"> | 40 | + <el-form-item style="width: 100%; marginTop: 44px"> |
| 24 | <el-button | 41 | <el-button |
| 25 | :loading="loading" | 42 | :loading="loading" |
| 26 | size="medium" | 43 | size="medium" |
| 27 | type="primary" | 44 | type="primary" |
| 28 | - style="width:100%;" | 45 | + style="width: 100%" |
| 29 | @click.native.prevent="handleLogin" | 46 | @click.native.prevent="handleLogin" |
| 30 | > | 47 | > |
| 31 | <span v-if="!loading">登 录</span> | 48 | <span v-if="!loading">登 录</span> |
| ... | @@ -43,7 +60,7 @@ | ... | @@ -43,7 +60,7 @@ |
| 43 | <script> | 60 | <script> |
| 44 | import { getCodeImg } from "@/api/login"; | 61 | import { getCodeImg } from "@/api/login"; |
| 45 | //import Cookies from "js-cookie"; | 62 | //import Cookies from "js-cookie"; |
| 46 | -import { encrypt, } from '@/utils/jsencrypt' | 63 | +import { encrypt } from "@/utils/jsencrypt"; |
| 47 | 64 | ||
| 48 | export default { | 65 | export default { |
| 49 | name: "Login", | 66 | name: "Login", |
| ... | @@ -54,18 +71,18 @@ export default { | ... | @@ -54,18 +71,18 @@ export default { |
| 54 | loginForm: { | 71 | loginForm: { |
| 55 | username: "root", | 72 | username: "root", |
| 56 | password: "123", | 73 | password: "123", |
| 57 | - rememberMe: false | 74 | + rememberMe: false, |
| 58 | }, | 75 | }, |
| 59 | loginRules: { | 76 | loginRules: { |
| 60 | username: [ | 77 | username: [ |
| 61 | - { required: true, trigger: "blur", message: "用户名不能为空" } | 78 | + { required: true, trigger: "blur", message: "用户名不能为空" }, |
| 62 | ], | 79 | ], |
| 63 | password: [ | 80 | password: [ |
| 64 | - { required: true, trigger: "blur", message: "密码不能为空" } | 81 | + { required: true, trigger: "blur", message: "密码不能为空" }, |
| 65 | - ] | 82 | + ], |
| 66 | }, | 83 | }, |
| 67 | loading: false, | 84 | loading: false, |
| 68 | - redirect: undefined | 85 | + redirect: undefined, |
| 69 | }; | 86 | }; |
| 70 | }, | 87 | }, |
| 71 | watch: { | 88 | watch: { |
| ... | @@ -75,46 +92,53 @@ export default { | ... | @@ -75,46 +92,53 @@ export default { |
| 75 | }, | 92 | }, |
| 76 | immediate: true | 93 | immediate: true |
| 77 | } | 94 | } |
| 78 | - }, | 95 | + }, |
| 79 | created() { | 96 | created() { |
| 80 | - | ||
| 81 | this.getCookie(); | 97 | this.getCookie(); |
| 82 | }, | 98 | }, |
| 83 | methods: { | 99 | methods: { |
| 84 | - | ||
| 85 | getCookie() { | 100 | getCookie() { |
| 86 | const username = localStorage.getItem("username"); | 101 | const username = localStorage.getItem("username"); |
| 87 | const password = localStorage.getItem("password"); | 102 | const password = localStorage.getItem("password"); |
| 88 | - const rememberMe = localStorage.getItem('rememberMe') | 103 | + const rememberMe = localStorage.getItem("rememberMe"); |
| 89 | this.loginForm = { | 104 | this.loginForm = { |
| 90 | username: username === undefined ? this.loginForm.username : username, | 105 | username: username === undefined ? this.loginForm.username : username, |
| 91 | password: password === undefined ? this.loginForm.password : password, | 106 | password: password === undefined ? this.loginForm.password : password, |
| 92 | - rememberMe: rememberMe === undefined ? false : Boolean(rememberMe) | 107 | + rememberMe: rememberMe === undefined ? false : Boolean(rememberMe), |
| 93 | }; | 108 | }; |
| 94 | }, | 109 | }, |
| 95 | handleLogin() { | 110 | handleLogin() { |
| 96 | - this.$refs.loginForm.validate(valid => { | 111 | + this.$refs.loginForm.validate((valid) => { |
| 97 | if (valid) { | 112 | if (valid) { |
| 98 | this.loading = true; | 113 | this.loading = true; |
| 99 | if (this.loginForm.rememberMe) { | 114 | if (this.loginForm.rememberMe) { |
| 100 | - localStorage.setItem("username", this.loginForm.username, { expires: 30 }); | 115 | + localStorage.setItem("username", this.loginForm.username, { |
| 101 | - localStorage.setItem("password", this.loginForm.password, { expires: 30 }); | 116 | + expires: 30, |
| 102 | - localStorage.setItem('rememberMe', this.loginForm.rememberMe, { expires: 30 }); | 117 | + }); |
| 118 | + localStorage.setItem("password", this.loginForm.password, { | ||
| 119 | + expires: 30, | ||
| 120 | + }); | ||
| 121 | + localStorage.setItem("rememberMe", this.loginForm.rememberMe, { | ||
| 122 | + expires: 30, | ||
| 123 | + }); | ||
| 103 | } else { | 124 | } else { |
| 104 | localStorage.removeItem("username"); | 125 | localStorage.removeItem("username"); |
| 105 | localStorage.removeItem("password"); | 126 | localStorage.removeItem("password"); |
| 106 | - localStorage.removeItem('rememberMe'); | 127 | + localStorage.removeItem("rememberMe"); |
| 107 | } | 128 | } |
| 108 | - this.$store.dispatch("Login", this.loginForm).then(() => { | 129 | + this.$store |
| 109 | - this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); | 130 | + .dispatch("Login", this.loginForm) |
| 110 | - }).catch(() => { | 131 | + .then(() => { |
| 111 | - this.loading = false; | 132 | + this.$router.push({ path: this.redirect || "/" }).catch(() => {}); |
| 112 | - //this.getCode(); | 133 | + }) |
| 113 | - }); | 134 | + .catch(() => { |
| 135 | + this.loading = false; | ||
| 136 | + //this.getCode(); | ||
| 137 | + }); | ||
| 114 | } | 138 | } |
| 115 | }); | 139 | }); |
| 116 | - } | 140 | + }, |
| 117 | - } | 141 | + }, |
| 118 | }; | 142 | }; |
| 119 | </script> | 143 | </script> |
| 120 | 144 | ... | ... |
-
Please register or login to post a comment