Showing
40 changed files
with
1449 additions
and
251 deletions
| ... | @@ -60,7 +60,7 @@ export function downloadExcel(data) { | ... | @@ -60,7 +60,7 @@ export function downloadExcel(data) { |
| 60 | }) | 60 | }) |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | -//释放仓位 | 63 | +//释放舱位 |
| 64 | export function releaseCargo(data) { | 64 | export function releaseCargo(data) { |
| 65 | return request({ | 65 | return request({ |
| 66 | url: '/cargo/releaseCargo', | 66 | url: '/cargo/releaseCargo', |
| ... | @@ -106,3 +106,29 @@ export function getFlightsRoutes(data) { | ... | @@ -106,3 +106,29 @@ export function getFlightsRoutes(data) { |
| 106 | data: data | 106 | data: data |
| 107 | }) | 107 | }) |
| 108 | } | 108 | } |
| 109 | + | ||
| 110 | +//航班迁转 | ||
| 111 | +/** | ||
| 112 | + * @param ids * 货物id list | ||
| 113 | + * @param flightId * 航班id | ||
| 114 | + * @param route * 航线 | ||
| 115 | + */ | ||
| 116 | +export function batchMoveCargoToOtherFlight(data) { | ||
| 117 | + return request({ | ||
| 118 | + url: '/cargo/batchMoveCargoToOtherFlight', | ||
| 119 | + method: 'post', | ||
| 120 | + data: data | ||
| 121 | + }) | ||
| 122 | +} | ||
| 123 | + | ||
| 124 | +//生成历史数据文件 | ||
| 125 | +/** | ||
| 126 | + * @param 同货物查询 | ||
| 127 | + */ | ||
| 128 | +export function historyCargo(data) { | ||
| 129 | + return request({ | ||
| 130 | + url: '/cargo/historyCargo', | ||
| 131 | + method: 'post', | ||
| 132 | + data: data | ||
| 133 | + }) | ||
| 134 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -72,3 +72,17 @@ export function updateAutoPushBatch(data) { | ... | @@ -72,3 +72,17 @@ export function updateAutoPushBatch(data) { |
| 72 | data: data | 72 | data: data |
| 73 | }) | 73 | }) |
| 74 | } | 74 | } |
| 75 | + | ||
| 76 | +//白名单自动配舱开关 | ||
| 77 | +/** | ||
| 78 | + * @param updateIds idList * | ||
| 79 | + * @param status 状态 * 1开 0关 | ||
| 80 | + */ | ||
| 81 | +export function updateWhiteListSwitchBatch(data) { | ||
| 82 | + return request({ | ||
| 83 | + url: '/FlightPreserveController/updateWhiteListSwitchBatch', | ||
| 84 | + method: 'post', | ||
| 85 | + data: data | ||
| 86 | + }) | ||
| 87 | +} | ||
| 88 | + | ... | ... |
| ... | @@ -59,4 +59,29 @@ export function findStationName() { | ... | @@ -59,4 +59,29 @@ export function findStationName() { |
| 59 | url: '/goods/findStationName', | 59 | url: '/goods/findStationName', |
| 60 | method: 'post', | 60 | method: 'post', |
| 61 | }) | 61 | }) |
| 62 | +} | ||
| 63 | + | ||
| 64 | +//批量导入 | ||
| 65 | +export function uploadGoodsExcel(file, goodsStation) { | ||
| 66 | + let formData = new FormData(); | ||
| 67 | + formData.append("file", file); | ||
| 68 | + formData.append("goodsStation", goodsStation); | ||
| 69 | + return request({ | ||
| 70 | + url: '/goods/uploadGoodsExcel', | ||
| 71 | + method: 'post', | ||
| 72 | + data: formData | ||
| 73 | + }) | ||
| 74 | +} | ||
| 75 | + | ||
| 76 | +//查询上传日志 | ||
| 77 | +/** | ||
| 78 | + * @param page 页长 * | ||
| 79 | + * @param size 页数 * | ||
| 80 | + */ | ||
| 81 | +export function userImportLog(data) { | ||
| 82 | + return request({ | ||
| 83 | + url: '/goods/userImportLog', | ||
| 84 | + method: 'post', | ||
| 85 | + data: data | ||
| 86 | + }) | ||
| 62 | } | 87 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
src/api/preMdeConfig.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | +import axios from 'axios'; | ||
| 3 | +import settings from "@/settings" | ||
| 4 | +import { getToken } from '@/utils/auth' | ||
| 5 | + | ||
| 6 | +//模板下载 | ||
| 7 | +export function downLoadTemplate(template) { | ||
| 8 | + return request({ | ||
| 9 | + url: '/flightInfoImport/downLoadTemplate?template=' + template, | ||
| 10 | + method: 'get', | ||
| 11 | + responseType: 'blob', | ||
| 12 | + }) | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +//航班目的地批量导入 | ||
| 16 | +/** | ||
| 17 | + * @param file * 文件 | ||
| 18 | + * @param beginDate * 时间 | ||
| 19 | + */ | ||
| 20 | +export function importFlightDestination(file, date) { | ||
| 21 | + let formData = new FormData(); | ||
| 22 | + formData.append("file", file); | ||
| 23 | + formData.append("beginDate", date); | ||
| 24 | + return axios({ | ||
| 25 | + method: 'post', | ||
| 26 | + url: settings.baseURL + '/flightDestination/importFlightDestination', | ||
| 27 | + headers: { 'Authorization': 'Bearer ' + getToken() }, | ||
| 28 | + data: formData | ||
| 29 | + }) | ||
| 30 | + // return request({ | ||
| 31 | + // url: '/flightDestination/importFlightDestination', | ||
| 32 | + // method: 'post', | ||
| 33 | + // data: formData | ||
| 34 | + // }) | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | +//URSA目的地批量导入 | ||
| 38 | +/** | ||
| 39 | + * @param file * 文件 | ||
| 40 | + * @param beginDate * 时间 | ||
| 41 | + */ | ||
| 42 | +export function importUrsaDestination(file, date) { | ||
| 43 | + let formData = new FormData(); | ||
| 44 | + formData.append("file", file); | ||
| 45 | + formData.append("beginDate", date); | ||
| 46 | + return axios({ | ||
| 47 | + method: 'post', | ||
| 48 | + url: settings.baseURL + '/ursaDestination/importUrsaDestination', | ||
| 49 | + headers: { 'Authorization': 'Bearer ' + getToken() }, | ||
| 50 | + data: formData | ||
| 51 | + }) | ||
| 52 | + // return request({ | ||
| 53 | + // url: '/ursaDestination/importUrsaDestination', | ||
| 54 | + // method: 'post', | ||
| 55 | + // data: formData | ||
| 56 | + // }) | ||
| 57 | +} | ||
| 58 | + | ||
| 59 | +//航班目的地查询 | ||
| 60 | +/** | ||
| 61 | + * @param page * 页数 | ||
| 62 | + * @param size * 长度 | ||
| 63 | + * @param area 地区 | ||
| 64 | + * @param fltNo 航班号 | ||
| 65 | + */ | ||
| 66 | +export function searchFlightDestination(data) { | ||
| 67 | + return request({ | ||
| 68 | + url: '/flightDestination/searchFlightDestination', | ||
| 69 | + method: 'post', | ||
| 70 | + data: data | ||
| 71 | + }) | ||
| 72 | +} | ||
| 73 | + | ||
| 74 | +//URSA目的地查询 | ||
| 75 | +/** | ||
| 76 | + * @param page * 页数 | ||
| 77 | + * @param size * 长度 | ||
| 78 | + * @param area 地区 | ||
| 79 | + * @param ursa ursa list | ||
| 80 | + */ | ||
| 81 | +export function searchUrsaDestination(data) { | ||
| 82 | + return request({ | ||
| 83 | + url: '/ursaDestination/searchUrsaDestination', | ||
| 84 | + method: 'post', | ||
| 85 | + data: data | ||
| 86 | + }) | ||
| 87 | +} | ||
| 88 | + | ||
| 89 | +//preMde查询 | ||
| 90 | +/** | ||
| 91 | + * @param flightNo 航班号 | ||
| 92 | + * @param fltDateStart 航班开始时间 | ||
| 93 | + * @param fltDateEnd 航班结束时间 | ||
| 94 | + * @param flightRoute 航线 | ||
| 95 | + * @param waybillNo 运单号 | ||
| 96 | + * @param ursa ursa | ||
| 97 | + * @param typeName 申报类别 | ||
| 98 | + * @param siteName 站点 | ||
| 99 | + * @param regionArray 区域 list | ||
| 100 | + * @param areaArray 地区 list | ||
| 101 | + * @param serviceTypeArray 服务代码 list | ||
| 102 | + * @param page * 页数 | ||
| 103 | + * @param size * 长度 | ||
| 104 | + */ | ||
| 105 | +export function findDmPreMdeData(data) { | ||
| 106 | + return request({ | ||
| 107 | + url: '/dmPreMde/findDmPreMdeData', | ||
| 108 | + method: 'post', | ||
| 109 | + data: data | ||
| 110 | + }) | ||
| 111 | +} | ||
| 112 | + | ||
| 113 | +//preMde页面查询条件 | ||
| 114 | +/** | ||
| 115 | + */ | ||
| 116 | +export function findDmPreMdeCondition(data) { | ||
| 117 | + return request({ | ||
| 118 | + url: '/dmPreMde/findDmPreMdeCondition', | ||
| 119 | + method: 'post', | ||
| 120 | + data: data | ||
| 121 | + }) | ||
| 122 | +} | ||
| 123 | + | ||
| 124 | +//报表查询 | ||
| 125 | +/** | ||
| 126 | + * @param ursas ursaslist | ||
| 127 | + * @param serviceTypeArray serviceTypelist | ||
| 128 | + * @param regionArray 区域 | ||
| 129 | + * @param areaArray 地区 | ||
| 130 | + * @param pickUpDate 取件日期 | ||
| 131 | + * @param dimensionName 维度名 | ||
| 132 | + */ | ||
| 133 | +export function findPreMdeReport(data) { | ||
| 134 | + return request({ | ||
| 135 | + url: '/preMdeReport/findPreMdeReport', | ||
| 136 | + method: 'post', | ||
| 137 | + data: data | ||
| 138 | + }) | ||
| 139 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/api/supserAllocation.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | +//特殊规则查询 | ||
| 4 | +/** | ||
| 5 | + * @param page * 页数 | ||
| 6 | + * @param size * 页长 | ||
| 7 | + * @param shipperAccount shipperAccount集合 | ||
| 8 | + */ | ||
| 9 | +export function queryShipperAccountRule(data) { | ||
| 10 | + return request({ | ||
| 11 | + url: 'shipperAccount/queryShipperAccountRule', | ||
| 12 | + method: 'post', | ||
| 13 | + data: data | ||
| 14 | + }) | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +//特殊规则新增 | ||
| 18 | +/** | ||
| 19 | + * @param id ID (修改必填) | ||
| 20 | + * @param shipperAccount * shipperAccount | ||
| 21 | + * @param flightNo * 航班号 | ||
| 22 | + * @param flightRoute * 航线 | ||
| 23 | + * @param flightDate * 航班日期 | ||
| 24 | + * @param groupAllWeight 预配重量 | ||
| 25 | + * @param includeUrsa * ursa包含 | ||
| 26 | + * @param notIncludeUrsa ursa不包含 | ||
| 27 | + * @param classificationList 申报类型 | ||
| 28 | + * @param serviceCodeList servceCode | ||
| 29 | + */ | ||
| 30 | +export function saveOrUpdate(data) { | ||
| 31 | + return request({ | ||
| 32 | + url: 'shipperAccount/saveOrUpdate', | ||
| 33 | + method: 'post', | ||
| 34 | + data: data | ||
| 35 | + }) | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +//特殊规则详情 | ||
| 39 | +/** | ||
| 40 | + * @param id * ID | ||
| 41 | + */ | ||
| 42 | +export function queryShipperAccountRuleById(data) { | ||
| 43 | + return request({ | ||
| 44 | + url: 'shipperAccount/queryShipperAccountRuleById', | ||
| 45 | + method: 'post', | ||
| 46 | + data: data | ||
| 47 | + }) | ||
| 48 | +} | ||
| 49 | + | ||
| 50 | +//特殊规则删除 | ||
| 51 | +/** | ||
| 52 | + * @param accsFlightNo * 航班号 | ||
| 53 | + * @param shipperAccount * shipperAccount | ||
| 54 | + * @param status * 状态 0 停用 1启用 2 已删除 | ||
| 55 | + */ | ||
| 56 | +export function changeStatusById(data) { | ||
| 57 | + return request({ | ||
| 58 | + url: '/shipperAccount/changeStatusById', | ||
| 59 | + method: 'post', | ||
| 60 | + data: data | ||
| 61 | + }) | ||
| 62 | +} | ||
| 63 | + | ||
| 64 | +//特殊规则获取释放仓位重量 | ||
| 65 | +/** | ||
| 66 | + * @param id ID * | ||
| 67 | + */ | ||
| 68 | +export function getReleaseWeight(data) { | ||
| 69 | + return request({ | ||
| 70 | + url: '/shipperAccount/getReleaseWeight', | ||
| 71 | + method: 'post', | ||
| 72 | + data: data | ||
| 73 | + }) | ||
| 74 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -38,4 +38,46 @@ export function findCargoDataChangeLog(data) { | ... | @@ -38,4 +38,46 @@ export function findCargoDataChangeLog(data) { |
| 38 | url: '/cargo/findCargoDataChangeLog?accsId=' + data, | 38 | url: '/cargo/findCargoDataChangeLog?accsId=' + data, |
| 39 | method: 'post', | 39 | method: 'post', |
| 40 | }) | 40 | }) |
| 41 | +} | ||
| 42 | + | ||
| 43 | +// 功能模块查询 | ||
| 44 | +/** | ||
| 45 | + * | ||
| 46 | + */ | ||
| 47 | +export function findModuleCondition() { | ||
| 48 | + return request({ | ||
| 49 | + url: '/systemOperationLog/findModuleCondition', | ||
| 50 | + method: 'post', | ||
| 51 | + }) | ||
| 52 | +} | ||
| 53 | + | ||
| 54 | +//操作日志查询 | ||
| 55 | +/** | ||
| 56 | + * @param module 功能模块 | ||
| 57 | + * @param createTimeStart 操作时间开始 | ||
| 58 | + * @param createTimeEnd 操作时间结束 | ||
| 59 | + * @param page 页数 | ||
| 60 | + * @param size 页长 | ||
| 61 | + */ | ||
| 62 | +export function getSystemOperationLogData(data) { | ||
| 63 | + return request({ | ||
| 64 | + url: '/systemOperationLog/getSystemOperationLogData', | ||
| 65 | + method: 'post', | ||
| 66 | + data: data | ||
| 67 | + }) | ||
| 68 | +} | ||
| 69 | + | ||
| 70 | +//归档数据查询 | ||
| 71 | +/** | ||
| 72 | + * @param createTimeStart 操作时间开始 | ||
| 73 | + * @param createTimeEnd 操作时间结束 | ||
| 74 | + * @param page 页数 | ||
| 75 | + * @param size 页长 | ||
| 76 | + */ | ||
| 77 | +export function findArchiveCargoLog(data) { | ||
| 78 | + return request({ | ||
| 79 | + url: '/archiveCargoLog/findArchiveCargoLog', | ||
| 80 | + method: 'post', | ||
| 81 | + data: data | ||
| 82 | + }) | ||
| 41 | } | 83 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -63,11 +63,11 @@ let ductLabels = { | ... | @@ -63,11 +63,11 @@ let ductLabels = { |
| 63 | "1": "是", | 63 | "1": "是", |
| 64 | "2": "否", | 64 | "2": "否", |
| 65 | }, | 65 | }, |
| 66 | - // "whiteListSwitch": { | 66 | + "whiteListSwitch": { |
| 67 | - // "1": "开启", | 67 | + "1": "开启", |
| 68 | - // "0": "关闭", | 68 | + "0": "关闭", |
| 69 | - // null: '关闭' | 69 | + null: '关闭' |
| 70 | - // } | 70 | + } |
| 71 | }, | 71 | }, |
| 72 | "flightRand": {//航班顺位设置 | 72 | "flightRand": {//航班顺位设置 |
| 73 | "status": { | 73 | "status": { | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -68,6 +68,15 @@ Vue.component('HeaderSetting', HeaderSetting) | ... | @@ -68,6 +68,15 @@ Vue.component('HeaderSetting', HeaderSetting) |
| 68 | Vue.component('Drag', Drag) | 68 | Vue.component('Drag', Drag) |
| 69 | 69 | ||
| 70 | Vue.use(permission) | 70 | Vue.use(permission) |
| 71 | + | ||
| 72 | +Vue.directive('focus', { | ||
| 73 | + inserted: function (el) { | ||
| 74 | + // el表示指令所绑定的元素 | ||
| 75 | + el.querySelector('input').focus() | ||
| 76 | + } | ||
| 77 | +}); | ||
| 78 | + | ||
| 79 | + | ||
| 71 | /** | 80 | /** |
| 72 | * If you don't want to use mock-server | 81 | * If you don't want to use mock-server |
| 73 | * you want to use MockJs for mock api | 82 | * you want to use MockJs for mock api | ... | ... |
| ... | @@ -62,16 +62,15 @@ export const constantRoutes = [ | ... | @@ -62,16 +62,15 @@ export const constantRoutes = [ |
| 62 | { | 62 | { |
| 63 | path: 'index', | 63 | path: 'index', |
| 64 | component: (resolve) => require(['@/views/index'], resolve), | 64 | component: (resolve) => require(['@/views/index'], resolve), |
| 65 | - name: '首页', | 65 | + name: 'Index', |
| 66 | meta: { title: '首页', icon: 'home', noCache: true, affix: true } | 66 | meta: { title: '首页', icon: 'home', noCache: true, affix: true } |
| 67 | - } | 67 | + }, |
| 68 | ] | 68 | ] |
| 69 | }, | 69 | }, |
| 70 | { | 70 | { |
| 71 | - path: '/', | 71 | + path: '', |
| 72 | component: Layout, | 72 | component: Layout, |
| 73 | hidden: true, | 73 | hidden: true, |
| 74 | - redirect: 'noredirect', | ||
| 75 | children: [ | 74 | children: [ |
| 76 | { | 75 | { |
| 77 | path: '/info/:handle/:id|:routeStatus|:fltNo|:route|:fltDate|:status', | 76 | path: '/info/:handle/:id|:routeStatus|:fltNo|:route|:fltDate|:status', |
| ... | @@ -89,15 +88,21 @@ export const constantRoutes = [ | ... | @@ -89,15 +88,21 @@ export const constantRoutes = [ |
| 89 | path: '/upDateResult->:from', | 88 | path: '/upDateResult->:from', |
| 90 | component: (resolve) => require(['@/views/preMdeConfig/upDateResult'], resolve), | 89 | component: (resolve) => require(['@/views/preMdeConfig/upDateResult'], resolve), |
| 91 | name: 'UpDateResult', | 90 | name: 'UpDateResult', |
| 92 | - meta: { title: '导入信息', icon: 'user' } | 91 | + meta: { title: '错误信息提示', icon: 'user' } |
| 92 | + }, | ||
| 93 | + { | ||
| 94 | + path: '/goodsLog', | ||
| 95 | + component: (resolve) => require(['@/views/basicInformation/goodsStation/goodsUploadLog'], resolve), | ||
| 96 | + name: 'GoodsUploadLog', | ||
| 97 | + meta: { title: '导入日志', icon: 'user' } | ||
| 93 | }, | 98 | }, |
| 94 | ] | 99 | ] |
| 95 | - } | 100 | + }, |
| 96 | ] | 101 | ] |
| 97 | 102 | ||
| 98 | export default new Router({ | 103 | export default new Router({ |
| 99 | mode: 'history', // 去掉url中的# | 104 | mode: 'history', // 去掉url中的# |
| 100 | scrollBehavior: () => ({ y: 0 }), | 105 | scrollBehavior: () => ({ y: 0 }), |
| 101 | routes: constantRoutes, | 106 | routes: constantRoutes, |
| 102 | - base: settings.routerBase | ||
| 103 | -}) | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 107 | + base: settings.routerBase, | ||
| 108 | +}) | ... | ... |
| ... | @@ -81,3 +81,9 @@ export function isArray(arg) { | ... | @@ -81,3 +81,9 @@ export function isArray(arg) { |
| 81 | } | 81 | } |
| 82 | return Array.isArray(arg) | 82 | return Array.isArray(arg) |
| 83 | } | 83 | } |
| 84 | + | ||
| 85 | +// 验证手机号码 | ||
| 86 | +export function validPhoneNumber(value) { | ||
| 87 | + const reg = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/; | ||
| 88 | + return reg.test(value) | ||
| 89 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -8,15 +8,16 @@ const mimeMap = { | ... | @@ -8,15 +8,16 @@ const mimeMap = { |
| 8 | } | 8 | } |
| 9 | const baseUrl = settings.downLoadURL //uat服务器 | 9 | const baseUrl = settings.downLoadURL //uat服务器 |
| 10 | 10 | ||
| 11 | -export function downLoadZip(str, filename) { | 11 | +export function downLoadZip(str, data, filename) { |
| 12 | var url = baseUrl + str | 12 | var url = baseUrl + str |
| 13 | axios({ | 13 | axios({ |
| 14 | - method: 'get', | 14 | + method: 'post', |
| 15 | url: url, | 15 | url: url, |
| 16 | + data: data, | ||
| 16 | responseType: 'blob', | 17 | responseType: 'blob', |
| 17 | headers: { 'Authorization': decodeURIComponent(getToken()) } | 18 | headers: { 'Authorization': decodeURIComponent(getToken()) } |
| 18 | }).then(res => { | 19 | }).then(res => { |
| 19 | - resolveBlob(res, mimeMap.zip) | 20 | + resolveBlob(res, mimeMap.zip, filename) |
| 20 | }) | 21 | }) |
| 21 | } | 22 | } |
| 22 | 23 | ||
| ... | @@ -52,7 +53,6 @@ export function downLoadXlsx(str, data, fileName) { | ... | @@ -52,7 +53,6 @@ export function downLoadXlsx(str, data, fileName) { |
| 52 | timeout: 500000, | 53 | timeout: 500000, |
| 53 | responseType: 'blob', | 54 | responseType: 'blob', |
| 54 | headers: { 'Authorization': decodeURIComponent(getToken()) } | 55 | headers: { 'Authorization': decodeURIComponent(getToken()) } |
| 55 | - // headers: { 'Authorization': decodeURIComponent(getToken()) } | ||
| 56 | //uat环境token需要做url解码处理 | 56 | //uat环境token需要做url解码处理 |
| 57 | }).then(res => { | 57 | }).then(res => { |
| 58 | if (res.status === 200) { | 58 | if (res.status === 200) { |
| ... | @@ -107,3 +107,4 @@ export function cargoTableXlsxPre(val) { | ... | @@ -107,3 +107,4 @@ export function cargoTableXlsxPre(val) { |
| 107 | aLink.click() | 107 | aLink.click() |
| 108 | document.body.removeChild(aLink); | 108 | document.body.removeChild(aLink); |
| 109 | } | 109 | } |
| 110 | + | ... | ... |
| ... | @@ -142,10 +142,10 @@ | ... | @@ -142,10 +142,10 @@ |
| 142 | </el-col> | 142 | </el-col> |
| 143 | <el-col :span="24"> | 143 | <el-col :span="24"> |
| 144 | <el-form-item label="Handling Code"> | 144 | <el-form-item label="Handling Code"> |
| 145 | - <el-empty description="暂无数据" v-if=" | 145 | + <!-- <el-empty description="暂无数据" v-if=" |
| 146 | !selectData.HandlingCode || selectData.HandlingCode.length == 0 | 146 | !selectData.HandlingCode || selectData.HandlingCode.length == 0 |
| 147 | - "></el-empty> | 147 | + "></el-empty> --> |
| 148 | - <el-checkbox-group v-model="handingCodes" v-else> | 148 | + <el-checkbox-group v-model="handingCodes"> |
| 149 | <el-row> | 149 | <el-row> |
| 150 | <el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id"> | 150 | <el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id"> |
| 151 | <el-checkbox :label="item.chineseName" v-model="item.chineseName"> | 151 | <el-checkbox :label="item.chineseName" v-model="item.chineseName"> |
| ... | @@ -158,10 +158,10 @@ | ... | @@ -158,10 +158,10 @@ |
| 158 | </el-col> | 158 | </el-col> |
| 159 | <el-col :span="24"> | 159 | <el-col :span="24"> |
| 160 | <el-form-item label="Sub Category"> | 160 | <el-form-item label="Sub Category"> |
| 161 | - <el-empty description="暂无数据" v-if=" | 161 | + <!-- <el-empty description="暂无数据" v-if=" |
| 162 | !selectData.SubCategory || selectData.SubCategory.length == 0 | 162 | !selectData.SubCategory || selectData.SubCategory.length == 0 |
| 163 | - "></el-empty> | 163 | + "></el-empty> --> |
| 164 | - <el-checkbox-group v-model="subCategorys" v-else> | 164 | + <el-checkbox-group v-model="subCategorys"> |
| 165 | <el-row> | 165 | <el-row> |
| 166 | <el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id"> | 166 | <el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id"> |
| 167 | <el-checkbox :label="item.chineseName" v-model="item.chineseName"> | 167 | <el-checkbox :label="item.chineseName" v-model="item.chineseName"> |
| ... | @@ -175,14 +175,14 @@ | ... | @@ -175,14 +175,14 @@ |
| 175 | </el-row> | 175 | </el-row> |
| 176 | <div style="margin: 0 0 0 10px"> | 176 | <div style="margin: 0 0 0 10px"> |
| 177 | <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button> | 177 | <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button> |
| 178 | - <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" | 178 | + <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download" |
| 179 | - v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(0)" | 179 | + v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading" |
| 180 | - :loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{ | 180 | + :disabled="tableData.length <= 0">{{ |
| 181 | downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果" | 181 | downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果" |
| 182 | }}</el-button> | 182 | }}</el-button> |
| 183 | - <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" | 183 | + <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download" |
| 184 | - v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(1)" | 184 | + v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading" |
| 185 | - :loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{ | 185 | + :disabled="tableData.length <= 0">{{ |
| 186 | downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果" | 186 | downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果" |
| 187 | }}</el-button> | 187 | }}</el-button> |
| 188 | <el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']" | 188 | <el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']" | ... | ... |
| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | <el-table-column type="index" label="序号" align="center"> | 8 | <el-table-column type="index" label="序号" align="center"> |
| 9 | </el-table-column> | 9 | </el-table-column> |
| 10 | <el-table-column v-for="(item, index) in cargoHeader" header-align="center" align="center" :prop="item.value" | 10 | <el-table-column v-for="(item, index) in cargoHeader" header-align="center" align="center" :prop="item.value" |
| 11 | - :label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter"> | 11 | + :label="item.name" :key="index" :width="item.width" :show-overflow-tooltip="true" :formatter="formatter"> |
| 12 | </el-table-column> | 12 | </el-table-column> |
| 13 | </el-table> | 13 | </el-table> |
| 14 | <el-form ref="form" class="form-header" label-position="right" label-width="auto" | 14 | <el-form ref="form" class="form-header" label-position="right" label-width="auto" |
| ... | @@ -65,24 +65,25 @@ export default { | ... | @@ -65,24 +65,25 @@ export default { |
| 65 | ids: [], | 65 | ids: [], |
| 66 | fltNo: undefined, | 66 | fltNo: undefined, |
| 67 | fltDate: undefined, | 67 | fltDate: undefined, |
| 68 | - route: undefined, | 68 | + route: null, |
| 69 | overweight: false, | 69 | overweight: false, |
| 70 | + notInWhite: false, | ||
| 70 | }, | 71 | }, |
| 71 | cargoHeader: [ | 72 | cargoHeader: [ |
| 72 | - { name: "口岸代码", value: "portName" }, | 73 | + { name: "口岸代码", value: "portName", width: "" }, |
| 73 | - { name: "运单号", value: "waybillNo" }, | 74 | + { name: "运单号", value: "waybillNo", width: "" }, |
| 74 | - { name: "货物状态", value: "statusName" }, | 75 | + { name: "货物状态", value: "statusName", width: "" }, |
| 75 | - { name: "站点", value: "siteName" }, | 76 | + { name: "站点", value: "siteName", width: "" }, |
| 76 | - { name: "申报类型", value: "typeName" }, | 77 | + { name: "申报类型", value: "typeName", width: "" }, |
| 77 | - { name: "URSA", value: "ursa" }, | 78 | + { name: "URSA", value: "ursa", width: "" }, |
| 78 | - { name: "实际重量", value: "actualWeight" }, | 79 | + { name: "实际重量", value: "actualWeight", width: "" }, |
| 79 | - { name: "件数", value: "qty" }, | 80 | + { name: "件数", value: "qty", width: "" }, |
| 80 | - { name: "ACCS原航班号", value: "fltNoAccs" }, | 81 | + { name: "ACCS原航班号", value: "fltNoAccs", width: "120" }, |
| 81 | - { name: "ACCS原航班日期", value: "fltDateAccs" }, | 82 | + { name: "ACCS原航班日期", value: "fltDateAccs", width: "130" }, |
| 82 | - { name: "品名描述", value: "nameDescription" }, | 83 | + { name: "品名描述", value: "nameDescription", width: "" }, |
| 83 | - { name: "是否自动", value: "cargoRulesStatus" }, | 84 | + { name: "是否自动", value: "cargoRulesStatus", width: "" }, |
| 84 | - { name: "创建人", value: "createUserName" }, | 85 | + { name: "创建人", value: "createUserName", width: "" }, |
| 85 | - { name: "创建时间", value: "createTime" }, | 86 | + { name: "创建时间", value: "createTime", width: "" }, |
| 86 | ], | 87 | ], |
| 87 | routeList: [], | 88 | routeList: [], |
| 88 | rules: { | 89 | rules: { |
| ... | @@ -120,68 +121,89 @@ export default { | ... | @@ -120,68 +121,89 @@ export default { |
| 120 | route: undefined, | 121 | route: undefined, |
| 121 | flightId: undefined, | 122 | flightId: undefined, |
| 122 | overweight: false, | 123 | overweight: false, |
| 124 | + notInWhite: false, | ||
| 123 | }; | 125 | }; |
| 124 | this.routeList = [] | 126 | this.routeList = [] |
| 125 | }, | 127 | }, |
| 126 | //确定配舱 | 128 | //确定配舱 |
| 127 | submit() { | 129 | submit() { |
| 128 | - this.loading = true; | 130 | + this.formData.overweight = false |
| 129 | - let arr = []; | 131 | + this.formData.notInWhite = false |
| 130 | - this.tableData.forEach((item) => { | 132 | + this.$refs.form.validate(val => { |
| 131 | - arr.push(item.id); | 133 | + if (val) { |
| 132 | - }); | 134 | + this.loading = true; |
| 133 | - this.formData.ids = arr; | 135 | + let arr = []; |
| 134 | - this.routeList.forEach(item => { | 136 | + this.tableData.forEach((item) => { |
| 135 | - if (item.route === this.formData.route) { | 137 | + arr.push(item.id); |
| 136 | - this.formData.flightId = item.id | 138 | + }); |
| 139 | + this.formData.ids = arr; | ||
| 140 | + this.routeList.forEach(item => { | ||
| 141 | + if (item.route === this.formData.route) { | ||
| 142 | + this.formData.flightId = item.id | ||
| 143 | + } | ||
| 144 | + }) | ||
| 145 | + if (this.formData.fltNo && this.formData.fltDate) { | ||
| 146 | + allocationFlight(this.formData).then((res) => { | ||
| 147 | + //code 200 配舱成功 202重量已满需要确认 203货物不在白名单需要确认 其余code直接输出msg 接口先判断重量后判断白名单 overweight/notInWhite初始默认false | ||
| 148 | + if (res.code === 200) { | ||
| 149 | + this.loading = false; | ||
| 150 | + this.msgSuccess('货物配舱成功') | ||
| 151 | + this.cleaerForm(); | ||
| 152 | + this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 153 | + } else if (res.code === 202) { | ||
| 154 | + //超重航班确实是否继续配舱 | ||
| 155 | + this.reallocationFlight(res.msg, 'overweight') | ||
| 156 | + } else if (res.code === 203) { | ||
| 157 | + //不存在白名单中确实是否继续配舱 | ||
| 158 | + this.reallocationFlight(res.msg, 'notInWhite') | ||
| 159 | + } else { | ||
| 160 | + this.loading = false; | ||
| 161 | + this.msgWarning(res.msg) | ||
| 162 | + } | ||
| 163 | + }).catch(() => { | ||
| 164 | + this.loading = false; | ||
| 165 | + }); | ||
| 166 | + } else { | ||
| 167 | + this.loading = false; | ||
| 168 | + this.msgWarning('航班号或航班日期不能为空') | ||
| 169 | + } | ||
| 137 | } | 170 | } |
| 138 | }) | 171 | }) |
| 139 | - if (this.formData.fltNo && this.formData.fltDate) { | 172 | + }, |
| 173 | + //手动配舱超重或白名单不存在提示 | ||
| 174 | + reallocationFlight(msg, status) { | ||
| 175 | + this.$confirm(msg, "提示", { | ||
| 176 | + confirmButtonText: "确定", | ||
| 177 | + cancelButtonText: "取消", | ||
| 178 | + type: "warning", | ||
| 179 | + }).then(() => { | ||
| 180 | + if (status == 'overweight') { | ||
| 181 | + this.formData.overweight = true; //确定继续overweight变为true再次请求接口 | ||
| 182 | + } else { | ||
| 183 | + this.formData.notInWhite = true; //确定继续notInWhite变为true再次请求接口 | ||
| 184 | + } | ||
| 140 | allocationFlight(this.formData).then((res) => { | 185 | allocationFlight(this.formData).then((res) => { |
| 141 | - this.loading = false; | ||
| 142 | - //code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg | ||
| 143 | if (res.code === 200) { | 186 | if (res.code === 200) { |
| 187 | + this.loading = false | ||
| 144 | this.msgSuccess('货物配舱成功') | 188 | this.msgSuccess('货物配舱成功') |
| 145 | this.cleaerForm(); | 189 | this.cleaerForm(); |
| 146 | this.$emit("dialogBeforeClose", { close: false, reload: true }); | 190 | this.$emit("dialogBeforeClose", { close: false, reload: true }); |
| 147 | - } else if (res.code === 202) { | 191 | + } else if (res.code === 203) { |
| 148 | - this.$confirm(res.msg, "提示", { | 192 | + this.reallocationFlight(res.msg, 'notInWhite') |
| 149 | - confirmButtonText: "确定", | ||
| 150 | - cancelButtonText: "取消", | ||
| 151 | - type: "warning", | ||
| 152 | - }) | ||
| 153 | - .then(() => { | ||
| 154 | - this.formData.overweight = true; //确定继续overweight变为true再次请求接口 | ||
| 155 | - allocationFlight(this.formData).then((res) => { | ||
| 156 | - if (res.code === 200) { | ||
| 157 | - this.msgSuccess('货物配舱成功') | ||
| 158 | - } else { | ||
| 159 | - this.msgWarning(res.msg) | ||
| 160 | - } | ||
| 161 | - }); | ||
| 162 | - this.cleaerForm(); | ||
| 163 | - this.$emit("dialogBeforeClose", { close: false, reload: true }); | ||
| 164 | - }) | ||
| 165 | - .catch(() => { | ||
| 166 | - //取消 取消当前配舱 | ||
| 167 | - this.msgSuccess('配舱已取消') | ||
| 168 | - this.cleaerForm(); | ||
| 169 | - this.$emit("dialogBeforeClose", { | ||
| 170 | - close: false, | ||
| 171 | - reload: true, | ||
| 172 | - }); | ||
| 173 | - }); | ||
| 174 | } else { | 193 | } else { |
| 175 | - this.loading = false; | ||
| 176 | this.msgWarning(res.msg) | 194 | this.msgWarning(res.msg) |
| 195 | + this.loading = false | ||
| 177 | } | 196 | } |
| 178 | - }).catch(() => { | ||
| 179 | - this.loading = false; | ||
| 180 | }); | 197 | }); |
| 181 | - } else { | 198 | + }).catch(() => { |
| 182 | - this.loading = false; | 199 | + this.msgSuccess('配舱已取消') |
| 183 | - this.msgWarning('航班号或航班日期不能为空') | 200 | + this.loading = false |
| 184 | - } | 201 | + this.cleaerForm(); |
| 202 | + this.$emit("dialogBeforeClose", { | ||
| 203 | + close: false, | ||
| 204 | + reload: true, | ||
| 205 | + }); | ||
| 206 | + }) | ||
| 185 | }, | 207 | }, |
| 186 | dialogBeforeClose() { | 208 | dialogBeforeClose() { |
| 187 | this.cleaerForm(); | 209 | this.cleaerForm(); |
| ... | @@ -201,6 +223,7 @@ export default { | ... | @@ -201,6 +223,7 @@ export default { |
| 201 | //日期选择变化 | 223 | //日期选择变化 |
| 202 | dateChange(val) { | 224 | dateChange(val) { |
| 203 | this.routeList = [] | 225 | this.routeList = [] |
| 226 | + this.formData.route = null | ||
| 204 | if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') { | 227 | if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') { |
| 205 | if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') { | 228 | if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') { |
| 206 | let obj = { | 229 | let obj = { | ... | ... |
| ... | @@ -47,6 +47,8 @@ export default { | ... | @@ -47,6 +47,8 @@ export default { |
| 47 | }, | 47 | }, |
| 48 | watch: { | 48 | watch: { |
| 49 | open(val) { | 49 | open(val) { |
| 50 | + this.routeList = [] | ||
| 51 | + this.submitData = [] | ||
| 50 | if (val) { | 52 | if (val) { |
| 51 | this.fltNo = this.fltData.fltNo | 53 | this.fltNo = this.fltData.fltNo |
| 52 | this.fltDate = this.fltData.fltDate | 54 | this.fltDate = this.fltData.fltDate | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -67,7 +67,8 @@ | ... | @@ -67,7 +67,8 @@ |
| 67 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> | 67 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> |
| 68 | <template slot-scope="scope"> | 68 | <template slot-scope="scope"> |
| 69 | <el-button size="mini" type="text" icon="el-icon-edit" | 69 | <el-button size="mini" type="text" icon="el-icon-edit" |
| 70 | - @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">查看配置维度 | 70 | + @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')"> |
| 71 | + 查看配置维度 | ||
| 71 | </el-button> | 72 | </el-button> |
| 72 | </template> | 73 | </template> |
| 73 | </el-table-column> | 74 | </el-table-column> |
| ... | @@ -268,7 +269,7 @@ export default { | ... | @@ -268,7 +269,7 @@ export default { |
| 268 | }, | 269 | }, |
| 269 | methods: { | 270 | methods: { |
| 270 | //跳转到查看,修改页面 | 271 | //跳转到查看,修改页面 |
| 271 | - handleClick(fltNo, handle, fltDate, route) { | 272 | + handleClick(fltNo, handle, fltDate, route, status) { |
| 272 | this.openFlightDate = false; | 273 | this.openFlightDate = false; |
| 273 | let obj = { | 274 | let obj = { |
| 274 | id: ' ', | 275 | id: ' ', |
| ... | @@ -277,8 +278,8 @@ export default { | ... | @@ -277,8 +278,8 @@ export default { |
| 277 | fltDate: fltDate != null ? fltDate : ' ', | 278 | fltDate: fltDate != null ? fltDate : ' ', |
| 278 | route: route, | 279 | route: route, |
| 279 | routeStatus: 'FlightRandConfig', | 280 | routeStatus: 'FlightRandConfig', |
| 280 | - status: ' ', | 281 | + status: status, |
| 281 | - createStatus: 1 | 282 | + createStatus: 1, |
| 282 | } | 283 | } |
| 283 | this.$router.push({ | 284 | this.$router.push({ |
| 284 | name: "FlightAllocConfigInfo", | 285 | name: "FlightAllocConfigInfo", | ... | ... |
| ... | @@ -60,6 +60,12 @@ | ... | @@ -60,6 +60,12 @@ |
| 60 | @click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button> | 60 | @click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button> |
| 61 | <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" | 61 | <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" |
| 62 | @click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button> | 62 | @click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button> |
| 63 | + <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" | ||
| 64 | + @click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启 | ||
| 65 | + </el-button> | ||
| 66 | + <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" | ||
| 67 | + @click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭 | ||
| 68 | + </el-button> | ||
| 63 | <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" @click="handleDelete" | 69 | <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" @click="handleDelete" |
| 64 | v-hasPermi="['base:flightInfo:delete']">删除 | 70 | v-hasPermi="['base:flightInfo:delete']">删除 |
| 65 | </el-button> | 71 | </el-button> |
| ... | @@ -111,7 +117,7 @@ | ... | @@ -111,7 +117,7 @@ |
| 111 | <el-form-item label="航班种类" prop="kindId"> | 117 | <el-form-item label="航班种类" prop="kindId"> |
| 112 | <el-select class="wid80" v-model="form.kindId" :disabled="formdisabled.kindId" placeholder="请选择航班种类" | 118 | <el-select class="wid80" v-model="form.kindId" :disabled="formdisabled.kindId" placeholder="请选择航班种类" |
| 113 | @change="kindChange"> | 119 | @change="kindChange"> |
| 114 | - <el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName" | 120 | + <el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName" |
| 115 | :value="item.id"> | 121 | :value="item.id"> |
| 116 | </el-option> | 122 | </el-option> |
| 117 | </el-select> | 123 | </el-select> |
| ... | @@ -132,7 +138,7 @@ | ... | @@ -132,7 +138,7 @@ |
| 132 | <el-select ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route" | 138 | <el-select ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route" |
| 133 | placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :multiple='routeMultiple' | 139 | placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :multiple='routeMultiple' |
| 134 | :key="routeMultiple"> | 140 | :key="routeMultiple"> |
| 135 | - <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> | 141 | + <el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route"> |
| 136 | </el-option> | 142 | </el-option> |
| 137 | </el-select> | 143 | </el-select> |
| 138 | </el-form-item> | 144 | </el-form-item> |
| ... | @@ -140,7 +146,7 @@ | ... | @@ -140,7 +146,7 @@ |
| 140 | <el-col :span="12"> | 146 | <el-col :span="12"> |
| 141 | <el-form-item label="航班类型" prop="typeId"> | 147 | <el-form-item label="航班类型" prop="typeId"> |
| 142 | <el-select class="wid80" v-model="form.typeId" placeholder="请选择航班类型"> | 148 | <el-select class="wid80" v-model="form.typeId" placeholder="请选择航班类型"> |
| 143 | - <el-option v-for="item in selectOption.flightTypelist" :key="item.id" :label="item.chineseName" | 149 | + <el-option v-for="item in selectOption.flightTypelist" :key="item.id" :label="item.chineseName" |
| 144 | :value="item.id"> | 150 | :value="item.id"> |
| 145 | </el-option> | 151 | </el-option> |
| 146 | </el-select> | 152 | </el-select> |
| ... | @@ -151,7 +157,7 @@ | ... | @@ -151,7 +157,7 @@ |
| 151 | <el-col :span="12"> | 157 | <el-col :span="12"> |
| 152 | <el-form-item label="航班状态" prop="statusId"> | 158 | <el-form-item label="航班状态" prop="statusId"> |
| 153 | <el-select class="wid80" :disabled="true" v-model="form.statusId" placeholder="请选择航班状态"> | 159 | <el-select class="wid80" :disabled="true" v-model="form.statusId" placeholder="请选择航班状态"> |
| 154 | - <el-option v-for="item in selectOption.flightStatuslist" :key="item.id" :label="item.chineseName" | 160 | + <el-option v-for="item in selectOption.flightStatuslist" :key="item.id" :label="item.chineseName" |
| 155 | :value="item.id"> | 161 | :value="item.id"> |
| 156 | </el-option> | 162 | </el-option> |
| 157 | </el-select> | 163 | </el-select> |
| ... | @@ -195,20 +201,20 @@ | ... | @@ -195,20 +201,20 @@ |
| 195 | <el-col :span="12"> | 201 | <el-col :span="12"> |
| 196 | <el-form-item label="高价百分比" prop="highPriceWeightPercent"> | 202 | <el-form-item label="高价百分比" prop="highPriceWeightPercent"> |
| 197 | <el-input-number class="wid80" :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" | 203 | <el-input-number class="wid80" :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" |
| 198 | - placeholder="请输入高价百分比" v-model="form.highPriceWeightPercent"></el-input-number> | 204 | + placeholder="开启高地价后可修改" v-model="form.highPriceWeightPercent"></el-input-number> |
| 199 | </el-form-item> | 205 | </el-form-item> |
| 200 | </el-col> | 206 | </el-col> |
| 201 | </el-row> | 207 | </el-row> |
| 202 | <el-row> | 208 | <el-row> |
| 203 | <el-col :span="12"> | 209 | <el-col :span="12"> |
| 204 | <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> | 210 | <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> |
| 205 | - <el-input-number class="wid80" :disabled="true" placeholder="请输入低价百分比" | 211 | + <el-input-number class="wid80" :disabled="true" placeholder="开启高地价后计算" |
| 206 | v-model="form.lowPriceWeightPercent"></el-input-number> | 212 | v-model="form.lowPriceWeightPercent"></el-input-number> |
| 207 | </el-form-item> | 213 | </el-form-item> |
| 208 | </el-col> | 214 | </el-col> |
| 209 | <el-col :span="12"> | 215 | <el-col :span="12"> |
| 210 | <el-form-item label="高价可配重量" prop="highAvailableWeight"> | 216 | <el-form-item label="高价可配重量" prop="highAvailableWeight"> |
| 211 | - <el-input-number class="wid80" :disabled="true" placeholder="请输入高价可配重量" v-model="form.highAvailableWeight" | 217 | + <el-input-number class="wid80" :disabled="true" placeholder="开启高地价后计算" v-model="form.highAvailableWeight" |
| 212 | :precision="2"></el-input-number> | 218 | :precision="2"></el-input-number> |
| 213 | </el-form-item> | 219 | </el-form-item> |
| 214 | </el-col> | 220 | </el-col> |
| ... | @@ -216,7 +222,7 @@ | ... | @@ -216,7 +222,7 @@ |
| 216 | <el-row> | 222 | <el-row> |
| 217 | <el-col :span="12"> | 223 | <el-col :span="12"> |
| 218 | <el-form-item label="低价可配重量" prop="lowAvailableWeight"> | 224 | <el-form-item label="低价可配重量" prop="lowAvailableWeight"> |
| 219 | - <el-input-number class="wid80" :disabled="true" placeholder="请输入低价可配重量" v-model="form.lowAvailableWeight" | 225 | + <el-input-number class="wid80" :disabled="true" placeholder="开启高地价后计算" v-model="form.lowAvailableWeight" |
| 220 | :precision="2"></el-input-number> | 226 | :precision="2"></el-input-number> |
| 221 | </el-form-item> | 227 | </el-form-item> |
| 222 | </el-col> | 228 | </el-col> |
| ... | @@ -242,12 +248,12 @@ | ... | @@ -242,12 +248,12 @@ |
| 242 | </el-col> | 248 | </el-col> |
| 243 | <el-col :span="12"> | 249 | <el-col :span="12"> |
| 244 | <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight"> | 250 | <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight"> |
| 245 | - <el-input class="wid80" v-model="form.accountTotalWeight" disabled /> | 251 | + <el-input class="wid80" v-model="form.accountTotalWeight" disabled placeholder="配置特殊规则后计算" /> |
| 246 | </el-form-item> | 252 | </el-form-item> |
| 247 | </el-col> | 253 | </el-col> |
| 248 | <el-col :span="12"> | 254 | <el-col :span="12"> |
| 249 | <el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight"> | 255 | <el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight"> |
| 250 | - <el-input class="wid80" v-model="form.accountAllocatedWeight" disabled /> | 256 | + <el-input class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" /> |
| 251 | </el-form-item> | 257 | </el-form-item> |
| 252 | </el-col> | 258 | </el-col> |
| 253 | </el-row> | 259 | </el-row> |
| ... | @@ -278,6 +284,7 @@ import { | ... | @@ -278,6 +284,7 @@ import { |
| 278 | findFltCommonConf, | 284 | findFltCommonConf, |
| 279 | updateStatusBatch, | 285 | updateStatusBatch, |
| 280 | updateAutoPushBatch, | 286 | updateAutoPushBatch, |
| 287 | + updateWhiteListSwitchBatch | ||
| 281 | } from "@/api/findAllFltData"; | 288 | } from "@/api/findAllFltData"; |
| 282 | import { getpreAudit } from '@/api/system/preReview.js' | 289 | import { getpreAudit } from '@/api/system/preReview.js' |
| 283 | import { queryRouteByFltNo } from '@/api/destinationFlight.js' | 290 | import { queryRouteByFltNo } from '@/api/destinationFlight.js' |
| ... | @@ -491,6 +498,8 @@ export default { | ... | @@ -491,6 +498,8 @@ export default { |
| 491 | //输入航班号后 | 498 | //输入航班号后 |
| 492 | blurfltNo() { | 499 | blurfltNo() { |
| 493 | this.routeList = [] | 500 | this.routeList = [] |
| 501 | + this.form.accountTotalWeight = 0 | ||
| 502 | + this.form.accountAllocatedWeight = 0 | ||
| 494 | if ( | 503 | if ( |
| 495 | this.form.fltNo != null && | 504 | this.form.fltNo != null && |
| 496 | this.form.fltNo != undefined && | 505 | this.form.fltNo != undefined && |
| ... | @@ -677,7 +686,7 @@ export default { | ... | @@ -677,7 +686,7 @@ export default { |
| 677 | this.$set( | 686 | this.$set( |
| 678 | this.form, | 687 | this.form, |
| 679 | "highAvailableWeight", | 688 | "highAvailableWeight", |
| 680 | - (Weight - this.form.alloctedWeight) * | 689 | + (Weight - this.form.accountTotalWeight - (this.form.alloctedWeight - this.form.accountAllocatedWeight)) * |
| 681 | (this.form.highPriceWeightPercent / 100) | 690 | (this.form.highPriceWeightPercent / 100) |
| 682 | ); | 691 | ); |
| 683 | this.$set( | 692 | this.$set( |
| ... | @@ -713,7 +722,7 @@ export default { | ... | @@ -713,7 +722,7 @@ export default { |
| 713 | this.$set( | 722 | this.$set( |
| 714 | this.form, | 723 | this.form, |
| 715 | "lowAvailableWeight", | 724 | "lowAvailableWeight", |
| 716 | - Weight - this.form.alloctedWeight - this.form.highAvailableWeight | 725 | + (Weight - this.form.accountTotalWeight - (this.form.alloctedWeight - this.form.accountAllocatedWeight)) - this.form.highAvailableWeight |
| 717 | ); | 726 | ); |
| 718 | //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; | 727 | //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; |
| 719 | } else if ( | 728 | } else if ( |
| ... | @@ -793,7 +802,7 @@ export default { | ... | @@ -793,7 +802,7 @@ export default { |
| 793 | route: val.flightKindName != 'Purple Tail' ? val.route : ' ', | 802 | route: val.flightKindName != 'Purple Tail' ? val.route : ' ', |
| 794 | routeStatus: 'flightInformationMaintenance' + val.flightKindName, | 803 | routeStatus: 'flightInformationMaintenance' + val.flightKindName, |
| 795 | status: ' ', | 804 | status: ' ', |
| 796 | - createStatus: 1 | 805 | + createStatus: 1, |
| 797 | } | 806 | } |
| 798 | this.$router.push({ | 807 | this.$router.push({ |
| 799 | name: 'FlightAllocConfigInfo', | 808 | name: 'FlightAllocConfigInfo', |
| ... | @@ -891,6 +900,7 @@ export default { | ... | @@ -891,6 +900,7 @@ export default { |
| 891 | //取消按钮 | 900 | //取消按钮 |
| 892 | cancel() { | 901 | cancel() { |
| 893 | this.routeList = [] | 902 | this.routeList = [] |
| 903 | + this.ishighPriceWeightPercent = true | ||
| 894 | this.routeMultiple = false | 904 | this.routeMultiple = false |
| 895 | this.open = false; | 905 | this.open = false; |
| 896 | this.findAllFltData(); | 906 | this.findAllFltData(); |
| ... | @@ -974,6 +984,26 @@ export default { | ... | @@ -974,6 +984,26 @@ export default { |
| 974 | this.findAllFltData(); | 984 | this.findAllFltData(); |
| 975 | } | 985 | } |
| 976 | }, | 986 | }, |
| 987 | + //白名单配舱开关 | ||
| 988 | + whiteListSwitchStatus(val) { | ||
| 989 | + let obj = { | ||
| 990 | + updateIds: [] | ||
| 991 | + } | ||
| 992 | + obj.status = val | ||
| 993 | + this.ids.forEach(item => { | ||
| 994 | + obj.updateIds.push(item.id) | ||
| 995 | + }) | ||
| 996 | + updateWhiteListSwitchBatch(obj).then(res => { | ||
| 997 | + if (res.code === 200) { | ||
| 998 | + this.msgSuccess(res.msg) | ||
| 999 | + this.findAllFltData() | ||
| 1000 | + } else { | ||
| 1001 | + this.msgWarning(res.msg) | ||
| 1002 | + } | ||
| 1003 | + }).catch(err => { | ||
| 1004 | + console.log(err) | ||
| 1005 | + }) | ||
| 1006 | + }, | ||
| 977 | //航线修改 | 1007 | //航线修改 |
| 978 | routeChange(val) { | 1008 | routeChange(val) { |
| 979 | this.$forceUpdate() | 1009 | this.$forceUpdate() | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-dialog :title="openStatus == 'add'?'新 增':'导出Excel'" :visible.sync="open" width="25%" | 3 | + <el-dialog :title="openStatus == 'add' ? '新 增' : openStatus == 'downloadExcel' ? '导出Excel' : '导入Excel'" |
| 4 | - :close-on-click-modal="false" :show-close="false" append-to-body center> | 4 | + :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" append-to-body center> |
| 5 | <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto" | 5 | <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto" |
| 6 | label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent> | 6 | label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent> |
| 7 | <div v-if="openStatus == 'add'"> | 7 | <div v-if="openStatus == 'add'"> |
| ... | @@ -15,7 +15,7 @@ | ... | @@ -15,7 +15,7 @@ |
| 15 | </el-input> | 15 | </el-input> |
| 16 | </el-form-item> | 16 | </el-form-item> |
| 17 | </div> | 17 | </div> |
| 18 | - <div v-else> | 18 | + <div v-else-if="openStatus == 'downloadExcel'"> |
| 19 | <el-form-item label="货站名称" prop="goodsStation"> | 19 | <el-form-item label="货站名称" prop="goodsStation"> |
| 20 | <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable | 20 | <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable |
| 21 | :loading="goodsStationLoading" placeholder="不限"> | 21 | :loading="goodsStationLoading" placeholder="不限"> |
| ... | @@ -25,18 +25,36 @@ | ... | @@ -25,18 +25,36 @@ |
| 25 | </el-select> | 25 | </el-select> |
| 26 | </el-form-item> | 26 | </el-form-item> |
| 27 | </div> | 27 | </div> |
| 28 | + <div v-else> | ||
| 29 | + <el-form-item label="货站名称" prop="uploadGoodsStation"> | ||
| 30 | + <el-input type="text" v-model="formData.uploadGoodsStation" maxlength="25" | ||
| 31 | + placeholder="请输入货站名称"> | ||
| 32 | + </el-input> | ||
| 33 | + </el-form-item> | ||
| 34 | + <el-form-item prop="file" label-width="0px"> | ||
| 35 | + <el-upload ref="upload" action="/goods/uploadGoodsExcel" name="file" :http-request="uploadExcel" | ||
| 36 | + :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" accept=".xlsx" | ||
| 37 | + class="upload-demo"> | ||
| 38 | + <el-button type="primary" icon="el-icon-upload2" size="small">选择文件</el-button> | ||
| 39 | + </el-upload> | ||
| 40 | + </el-form-item> | ||
| 41 | + </div> | ||
| 28 | </el-form> | 42 | </el-form> |
| 29 | <div slot="footer" class="dialog-footer"> | 43 | <div slot="footer" class="dialog-footer"> |
| 30 | - <el-button v-if='openStatus == "add"' type="primary" :loading="loading" @click="submit">确 定</el-button> | 44 | + <el-button v-if='openStatus == "add"' type="primary" size="small" :loading="loading" @click="submit">确 定 |
| 31 | - <el-button v-else type="primary" :loading="downloading" @click="download">导出Excel</el-button> | 45 | + </el-button> |
| 32 | - <el-button @click="close">取 消</el-button> | 46 | + <el-button v-else-if="openStatus == 'downloadExcel'" type="primary" size="small" :loading="downloading" |
| 47 | + @click="download">导出Excel</el-button> | ||
| 48 | + <el-button v-else type="primary" :loading="loading" size="small" @click="upload">导入Excel | ||
| 49 | + </el-button> | ||
| 50 | + <el-button style="margin-top:10px" size="small" @click="close">取 消</el-button> | ||
| 33 | </div> | 51 | </div> |
| 34 | </el-dialog> | 52 | </el-dialog> |
| 35 | </div> | 53 | </div> |
| 36 | </template> | 54 | </template> |
| 37 | 55 | ||
| 38 | <script> | 56 | <script> |
| 39 | -import { batchAddGoods, findStationName } from "@/api/goodsStation" | 57 | +import { batchAddGoods, findStationName, uploadGoodsExcel } from "@/api/goodsStation" |
| 40 | import { downLoadXlsx } from "@/utils/zipdownload"; | 58 | import { downLoadXlsx } from "@/utils/zipdownload"; |
| 41 | 59 | ||
| 42 | export default { | 60 | export default { |
| ... | @@ -55,7 +73,9 @@ export default { | ... | @@ -55,7 +73,9 @@ export default { |
| 55 | return { | 73 | return { |
| 56 | formData: { | 74 | formData: { |
| 57 | goodsStation: null, | 75 | goodsStation: null, |
| 58 | - goodsList: '' | 76 | + uploadGoodsStation: null, |
| 77 | + goodsList: '', | ||
| 78 | + file: null | ||
| 59 | }, | 79 | }, |
| 60 | goodsStationList: [], | 80 | goodsStationList: [], |
| 61 | rules: { | 81 | rules: { |
| ... | @@ -73,7 +93,23 @@ export default { | ... | @@ -73,7 +93,23 @@ export default { |
| 73 | trigger: "blur", | 93 | trigger: "blur", |
| 74 | }, | 94 | }, |
| 75 | ], | 95 | ], |
| 96 | + uploadGoodsStation: [ | ||
| 97 | + { | ||
| 98 | + required: true, | ||
| 99 | + message: "货站名称不能为空", | ||
| 100 | + trigger: "change", | ||
| 101 | + }, | ||
| 102 | + ], | ||
| 103 | + // file: [ | ||
| 104 | + // { | ||
| 105 | + // required: true, | ||
| 106 | + // message: "文件不能为空", | ||
| 107 | + // trigger: "change", | ||
| 108 | + // }, | ||
| 109 | + // ] | ||
| 76 | }, | 110 | }, |
| 111 | + fileList: [], | ||
| 112 | + errorData: [], | ||
| 77 | goodsStationLoading: false, | 113 | goodsStationLoading: false, |
| 78 | downloading: false, | 114 | downloading: false, |
| 79 | loading: false, | 115 | loading: false, |
| ... | @@ -134,6 +170,51 @@ export default { | ... | @@ -134,6 +170,51 @@ export default { |
| 134 | } | 170 | } |
| 135 | }) | 171 | }) |
| 136 | }, | 172 | }, |
| 173 | + //选择文件 | ||
| 174 | + uploadExcel(option) { | ||
| 175 | + this.formData.file = option.file | ||
| 176 | + }, | ||
| 177 | + //导入Excel | ||
| 178 | + upload() { | ||
| 179 | + this.loading = true; | ||
| 180 | + if (this.formData.file != null && this.formData.file != '') { | ||
| 181 | + this.$refs['addForm'].validate(val => { | ||
| 182 | + if (val) { | ||
| 183 | + const file = this.formData.file; | ||
| 184 | + let goodsStation = this.formData.uploadGoodsStation | ||
| 185 | + uploadGoodsExcel(file, goodsStation).then((res) => { | ||
| 186 | + this.loading = false; | ||
| 187 | + if (res.code != 200) { | ||
| 188 | + if (res.code == 603) { | ||
| 189 | + this.$alert(res.msg, "提示", { | ||
| 190 | + confirmButtonText: "确定", | ||
| 191 | + type: "warning", | ||
| 192 | + }); | ||
| 193 | + } else if (res.code === 201) { | ||
| 194 | + this.$message.warning(res.msg); | ||
| 195 | + if (res.data) { | ||
| 196 | + this.errorData = res.data; | ||
| 197 | + this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } }) | ||
| 198 | + } | ||
| 199 | + } else { | ||
| 200 | + this.$message.warning(res.msg); | ||
| 201 | + } | ||
| 202 | + } else { | ||
| 203 | + this.$message.success(res.msg); | ||
| 204 | + } | ||
| 205 | + setTimeout(() => { | ||
| 206 | + this.close() | ||
| 207 | + }, 1000); | ||
| 208 | + }); | ||
| 209 | + } else { | ||
| 210 | + this.loading = false; | ||
| 211 | + } | ||
| 212 | + }) | ||
| 213 | + } else { | ||
| 214 | + this.loading = false; | ||
| 215 | + this.msgWarning('请选择文件后再导入!') | ||
| 216 | + } | ||
| 217 | + }, | ||
| 137 | //导出Excel | 218 | //导出Excel |
| 138 | download() { | 219 | download() { |
| 139 | this.$refs['addForm'].validate(val => { | 220 | this.$refs['addForm'].validate(val => { |
| ... | @@ -152,12 +233,31 @@ export default { | ... | @@ -152,12 +233,31 @@ export default { |
| 152 | }) | 233 | }) |
| 153 | 234 | ||
| 154 | }, | 235 | }, |
| 236 | + handleRemove(file, fileList) { | ||
| 237 | + //清掉上传的文件 | ||
| 238 | + this.errorData = []; | ||
| 239 | + this.fileList = []; | ||
| 240 | + this.formData.file = null | ||
| 241 | + }, | ||
| 242 | + handleExceed(files) { | ||
| 243 | + //重复上传文件 | ||
| 244 | + let file = {}; | ||
| 245 | + file.file = files[0]; | ||
| 246 | + file.name = files[0].name; | ||
| 247 | + this.fileList = []; | ||
| 248 | + this.fileList.push(file); | ||
| 249 | + this.formData.file = file | ||
| 250 | + this.uploadExcel(file); | ||
| 251 | + }, | ||
| 155 | //取消 | 252 | //取消 |
| 156 | close() { | 253 | close() { |
| 157 | this.formData = { | 254 | this.formData = { |
| 158 | goodsStation: null, | 255 | goodsStation: null, |
| 159 | goodsList: null | 256 | goodsList: null |
| 160 | } | 257 | } |
| 258 | + if (this.openStatus == 'uploadExcel') { | ||
| 259 | + this.$refs['upload'].clearFiles() | ||
| 260 | + } | ||
| 161 | this.$refs["addForm"].clearValidate(); | 261 | this.$refs["addForm"].clearValidate(); |
| 162 | this.$emit('close') | 262 | this.$emit('close') |
| 163 | } | 263 | } |
| ... | @@ -168,5 +268,15 @@ export default { | ... | @@ -168,5 +268,15 @@ export default { |
| 168 | </script> | 268 | </script> |
| 169 | 269 | ||
| 170 | <style lang="scss" scoped> | 270 | <style lang="scss" scoped> |
| 271 | +.upload-demo { | ||
| 272 | + | ||
| 273 | + .el-upload-list__item:first-child { | ||
| 274 | + margin-top: 5px !important; | ||
| 275 | + } | ||
| 171 | 276 | ||
| 277 | + .el-upload-list { | ||
| 278 | + display: inline-block; | ||
| 279 | + margin-left: 10px; | ||
| 280 | + } | ||
| 281 | +} | ||
| 172 | </style> | 282 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | +<template> | ||
| 2 | + <div style="padding:10px"> | ||
| 3 | + <div style="margin-bottom:10px"> | ||
| 4 | + <el-button type="primary" icon="el-icon-refresh" size="small" :loading="loading" @click="selectLog(1)">查 询 | ||
| 5 | + </el-button> | ||
| 6 | + </div> | ||
| 7 | + <Tables ref="goodsLogStation" ductName="goodsLogStation" :data="logTabelData" :headerData="logTabelHeader" | ||
| 8 | + :selection="false" :order="true" :selectFixed="false" :loading="loading" :totalCount="logCount" | ||
| 9 | + :limitSize="logData.size" :page="logData.page" layout="total,prev, pager, next, jumper, ->" | ||
| 10 | + :pageSizes="[100]" :height="tableHeight" @currentChange="logCurrentChange"> | ||
| 11 | + </Tables> | ||
| 12 | + </div> | ||
| 13 | +</template> | ||
| 14 | + | ||
| 15 | +<script> | ||
| 16 | +import { userImportLog } from "@/api/goodsStation" | ||
| 17 | + | ||
| 18 | +export default { | ||
| 19 | + name: 'GoodsUploadLog', | ||
| 20 | + data() { | ||
| 21 | + return { | ||
| 22 | + logData: { | ||
| 23 | + page: 1, | ||
| 24 | + size: 50 | ||
| 25 | + }, | ||
| 26 | + logTabelData: [], | ||
| 27 | + logTabelHeader: this.tableHeaders['goodsLogStation'], | ||
| 28 | + logCount: 0, | ||
| 29 | + tableHeight: null, | ||
| 30 | + loading: false, | ||
| 31 | + } | ||
| 32 | + }, | ||
| 33 | + created() { | ||
| 34 | + this.selectLog() | ||
| 35 | + }, | ||
| 36 | + watch: { | ||
| 37 | + $route(to, from) { | ||
| 38 | + if (to.name == 'GoodsUploadLog') { | ||
| 39 | + this.selectLog() | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + }, | ||
| 43 | + methods: { | ||
| 44 | + //日志查询 | ||
| 45 | + selectLog(val) { | ||
| 46 | + if (val === 1) { | ||
| 47 | + this.logData.page = 1 | ||
| 48 | + } | ||
| 49 | + this.loading = true | ||
| 50 | + userImportLog(this.logData).then(res => { | ||
| 51 | + this.loading = false | ||
| 52 | + if (res.code === 200) { | ||
| 53 | + this.logCount = res.data.total | ||
| 54 | + this.logTabelData = res.data.list | ||
| 55 | + } else { | ||
| 56 | + this.msgWarning(res.msg) | ||
| 57 | + } | ||
| 58 | + }).catch(err => { | ||
| 59 | + this.loading = false | ||
| 60 | + console.log(err) | ||
| 61 | + }) | ||
| 62 | + }, | ||
| 63 | + //日志分页 | ||
| 64 | + logCurrentChange(val) { | ||
| 65 | + this.logData.page = val.page | ||
| 66 | + this.selectLog() | ||
| 67 | + }, | ||
| 68 | + } | ||
| 69 | +} | ||
| 70 | + | ||
| 71 | +</script> | ||
| 72 | + | ||
| 73 | +<style lang="scss" scoped> | ||
| 74 | + | ||
| 75 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -27,18 +27,17 @@ | ... | @@ -27,18 +27,17 @@ |
| 27 | style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel"> | 27 | style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel"> |
| 28 | 删 除 | 28 | 删 除 |
| 29 | </el-button> | 29 | </el-button> |
| 30 | - <el-button type="primary" icon="el-icon-download" size="small" style="margin-right:10px" | 30 | + <el-button type="primary" icon="el-icon-download" size="small" style="margin-left:10px" |
| 31 | @click="downloadTempleate">下载模板 | 31 | @click="downloadTempleate">下载模板 |
| 32 | </el-button> | 32 | </el-button> |
| 33 | - <el-button icon="el-icon-download" type="primary" size="small" style="margin-right:10px" | 33 | + <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px" |
| 34 | @click="downloadExcel"> | 34 | @click="downloadExcel"> |
| 35 | 导出Excel | 35 | 导出Excel |
| 36 | </el-button> | 36 | </el-button> |
| 37 | - <el-upload action="/goods/importGoods" name="file" :http-request="uploadExcel" :on-remove="handleRemove" | 37 | + <el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel" |
| 38 | - :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" class="upload-demo" | 38 | + v-hasPermi="['base:goodsStation:add']">导入Excel</el-button> |
| 39 | - v-hasPermi="['base:goodsStation:add']"> | 39 | + <el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志 |
| 40 | - <el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button> | 40 | + </el-button> |
| 41 | - </el-upload> | ||
| 42 | </div> | 41 | </div> |
| 43 | <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true" | 42 | <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true" |
| 44 | :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading" | 43 | :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading" |
| ... | @@ -60,7 +59,7 @@ | ... | @@ -60,7 +59,7 @@ |
| 60 | 59 | ||
| 61 | <script> | 60 | <script> |
| 62 | import { downLoadTemplate } from "@/api/flightInfoImport"; | 61 | import { downLoadTemplate } from "@/api/flightInfoImport"; |
| 63 | -import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation" | 62 | +import { batchDeleteGoods, searchGoods } from "@/api/goodsStation" |
| 64 | import Dialog from './dialog.vue' | 63 | import Dialog from './dialog.vue' |
| 65 | 64 | ||
| 66 | export default { | 65 | export default { |
| ... | @@ -189,29 +188,9 @@ export default { | ... | @@ -189,29 +188,9 @@ export default { |
| 189 | this.selection() | 188 | this.selection() |
| 190 | }, | 189 | }, |
| 191 | //上传excel | 190 | //上传excel |
| 192 | - uploadExcel(option) { | 191 | + uploadExcel() { |
| 193 | - const file = option.file; | 192 | + this.openStatus = 'uploadExcel' |
| 194 | - this.loading = true; | 193 | + this.open = true |
| 195 | - importGoods(file, '').then((res) => { | ||
| 196 | - this.loading = false; | ||
| 197 | - if (res.code != 200) { | ||
| 198 | - if (res.code == 603) { | ||
| 199 | - this.$alert(res.msg, "提示", { | ||
| 200 | - confirmButtonText: "确定", | ||
| 201 | - type: "warning", | ||
| 202 | - }); | ||
| 203 | - } else if (res.code === 201) { | ||
| 204 | - this.$message.warning(res.msg); | ||
| 205 | - this.errorData = res.data; | ||
| 206 | - this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } }) | ||
| 207 | - } else { | ||
| 208 | - this.$message.warning(res.msg); | ||
| 209 | - } | ||
| 210 | - } else { | ||
| 211 | - this.$message.success(res.msg); | ||
| 212 | - this.selection(1) | ||
| 213 | - } | ||
| 214 | - }); | ||
| 215 | }, | 194 | }, |
| 216 | //下载模板 | 195 | //下载模板 |
| 217 | downloadTempleate() { | 196 | downloadTempleate() { |
| ... | @@ -245,6 +224,9 @@ export default { | ... | @@ -245,6 +224,9 @@ export default { |
| 245 | this.fileList.push(file); | 224 | this.fileList.push(file); |
| 246 | this.uploadExcel(file); | 225 | this.uploadExcel(file); |
| 247 | }, | 226 | }, |
| 227 | + selectLog() { | ||
| 228 | + this.$router.push({ name: 'GoodsUploadLog' }) | ||
| 229 | + }, | ||
| 248 | close() { | 230 | close() { |
| 249 | this.open = false | 231 | this.open = false |
| 250 | this.openStatus = '' | 232 | this.openStatus = '' |
| ... | @@ -260,16 +242,5 @@ export default { | ... | @@ -260,16 +242,5 @@ export default { |
| 260 | </script> | 242 | </script> |
| 261 | 243 | ||
| 262 | <style lang="scss" scoped> | 244 | <style lang="scss" scoped> |
| 263 | -.upload-demo { | ||
| 264 | - display: flex; | ||
| 265 | - | ||
| 266 | - .el-upload-list__item:first-child { | ||
| 267 | - margin-top: 5px !important; | ||
| 268 | - } | ||
| 269 | 245 | ||
| 270 | - .el-upload-list { | ||
| 271 | - display: inline-block; | ||
| 272 | - margin-left: 10px; | ||
| 273 | - } | ||
| 274 | -} | ||
| 275 | </style> | 246 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | -<template> | ||
| 2 | - <div> | ||
| 3 | - <el-dialog title="新 增" :visible.sync="dialogVisible" width="50%" top="1vh" :close-on-click-modal="false" | ||
| 4 | - :show-close="false" append-to-body center> | ||
| 5 | - <el-table ref="filterTable" class="mt20" :data="resultData" size="small" border> | ||
| 6 | - <el-table-column label="行号" prop="line" width="50" align="center"> | ||
| 7 | - </el-table-column> | ||
| 8 | - <el-table-column label="错误信息" prop="errorMessage" width="200"> | ||
| 9 | - <template slot-scope="scope"> | ||
| 10 | - <div v-for="(m, key) in scope.row.errorMessage" :key="key"> | ||
| 11 | - {{ m }} | ||
| 12 | - </div> | ||
| 13 | - </template> | ||
| 14 | - </el-table-column> | ||
| 15 | - <el-table-column v-if="resultData.length == 0"></el-table-column> | ||
| 16 | - <el-table-column v-for="(value, key) in this.resultData[0]" :key="key" | ||
| 17 | - v-if="key != 'errorMessage' && key != 'line'" header-align="center" align="center" :label="key" | ||
| 18 | - :prop="key"></el-table-column> | ||
| 19 | - </el-table> | ||
| 20 | - <div slot="footer" class="dialog-footer"> | ||
| 21 | - <el-button @click="close">取 消</el-button> | ||
| 22 | - </div> | ||
| 23 | - </el-dialog> | ||
| 24 | - </div> | ||
| 25 | -</template> | ||
| 26 | - | ||
| 27 | -<script> | ||
| 28 | - | ||
| 29 | -export default { | ||
| 30 | - name: 'UpDateResult', | ||
| 31 | - props: { | ||
| 32 | - dialogVisible: { | ||
| 33 | - type: Boolean, | ||
| 34 | - default: false | ||
| 35 | - }, | ||
| 36 | - resultData: { | ||
| 37 | - type: Array, | ||
| 38 | - default: null | ||
| 39 | - } | ||
| 40 | - }, | ||
| 41 | - data() { | ||
| 42 | - return { | ||
| 43 | - } | ||
| 44 | - }, | ||
| 45 | - wactch: { | ||
| 46 | - dialogVisible(val) { | ||
| 47 | - if (val) { | ||
| 48 | - } | ||
| 49 | - } | ||
| 50 | - }, | ||
| 51 | - methods: { | ||
| 52 | - close() { | ||
| 53 | - this.$emit('close') | ||
| 54 | - } | ||
| 55 | - } | ||
| 56 | -} | ||
| 57 | -</script> | ||
| 58 | - | ||
| 59 | -<style lang="scss" scoped> | ||
| 60 | - | ||
| 61 | -</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -8,9 +8,9 @@ | ... | @@ -8,9 +8,9 @@ |
| 8 | <el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称"> | 8 | <el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称"> |
| 9 | </el-input> | 9 | </el-input> |
| 10 | </el-form-item> | 10 | </el-form-item> |
| 11 | - <el-form-item label="航班" prop="flightList"> | 11 | + <el-form-item label="航班号" prop="flightList"> |
| 12 | <el-input type="textarea" v-model="flightList" rows="4" maxlength="125" | 12 | <el-input type="textarea" v-model="flightList" rows="4" maxlength="125" |
| 13 | - placeholder="请输入航班,多个用“;”隔开"> | 13 | + placeholder="请输入航班号,多个用“;”隔开"> |
| 14 | </el-input> | 14 | </el-input> |
| 15 | </el-form-item> | 15 | </el-form-item> |
| 16 | </el-form> | 16 | </el-form> | ... | ... |
| ... | @@ -6,12 +6,12 @@ | ... | @@ -6,12 +6,12 @@ |
| 6 | <el-row> | 6 | <el-row> |
| 7 | <el-col :span="4"> | 7 | <el-col :span="4"> |
| 8 | <el-form-item label="运单号"> | 8 | <el-form-item label="运单号"> |
| 9 | - <span>{{ data.waybillNo }}</span> | 9 | + <span>{{ data.waybillNo }}</span> |
| 10 | </el-form-item> | 10 | </el-form-item> |
| 11 | </el-col> | 11 | </el-col> |
| 12 | <el-col :span="4"> | 12 | <el-col :span="4"> |
| 13 | <el-form-item label="ACCSID"> | 13 | <el-form-item label="ACCSID"> |
| 14 | - <span>{{ data.accsId }}</span> | 14 | + <span>{{ data.accsId }}</span> |
| 15 | </el-form-item> | 15 | </el-form-item> |
| 16 | </el-col> | 16 | </el-col> |
| 17 | </el-row> | 17 | </el-row> |
| ... | @@ -93,5 +93,4 @@ export default { | ... | @@ -93,5 +93,4 @@ export default { |
| 93 | </script> | 93 | </script> |
| 94 | 94 | ||
| 95 | <style scoped> | 95 | <style scoped> |
| 96 | - | ||
| 97 | </style> | 96 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -165,6 +165,14 @@ | ... | @@ -165,6 +165,14 @@ |
| 165 | }}</el-button> | 165 | }}</el-button> |
| 166 | <el-button type="primary" size="small" icon="el-icon-s-flag" :disabled="selectTable.length == 0" | 166 | <el-button type="primary" size="small" icon="el-icon-s-flag" :disabled="selectTable.length == 0" |
| 167 | v-hasPermi="['base:cargo:release']" @click="release">释放舱位</el-button> | 167 | v-hasPermi="['base:cargo:release']" @click="release">释放舱位</el-button> |
| 168 | + <el-button type="primary" size="small" icon="el-icon-sort" :disabled="selectTable.length == 0" @click="transfer" | ||
| 169 | + v-hasPermi="['log:cargo:flightTransfer']">航班迁转</el-button> | ||
| 170 | + <!-- <el-button type="primary" size="small" :disabled="cargoPlaneTime == null || cargoPlaneTime.length <= 0" | ||
| 171 | + @click="historyFlie" v-hasPermi="['log:cargo:archiveData']"> | ||
| 172 | + <el-tooltip class="item" effect="dark" content="请先选择配置航班日期" placement="top"> | ||
| 173 | + <span class="el-icon-warning-outline">生成归档数据</span> | ||
| 174 | + </el-tooltip> | ||
| 175 | + </el-button> --> | ||
| 168 | <span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span> | 176 | <span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span> |
| 169 | <el-progress v-if="progress != 0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress" | 177 | <el-progress v-if="progress != 0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress" |
| 170 | :status="progress == 100 ? 'success' : 'warning'"></el-progress> | 178 | :status="progress == 100 ? 'success' : 'warning'"></el-progress> |
| ... | @@ -208,18 +216,21 @@ | ... | @@ -208,18 +216,21 @@ |
| 208 | </div> | 216 | </div> |
| 209 | </el-dialog> | 217 | </el-dialog> |
| 210 | <Dialog :dialogVisible="openView" :cargoData="cargoLog" @close="viewClose" /> | 218 | <Dialog :dialogVisible="openView" :cargoData="cargoLog" @close="viewClose" /> |
| 219 | + <Info :tableData="selectTable" :dialogVisible="openTransfer" @dialogBeforeClose="dialogBeforeClose" /> | ||
| 211 | </div> | 220 | </div> |
| 212 | </template> | 221 | </template> |
| 213 | 222 | ||
| 214 | <script> | 223 | <script> |
| 215 | -import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes } from "@/api/cargoSelect"; | 224 | +import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes, historyCargo } from "@/api/cargoSelect"; |
| 216 | import { downLoadXlsx } from "@/utils/zipdownload"; | 225 | import { downLoadXlsx } from "@/utils/zipdownload"; |
| 217 | import Dialog from "./dialog.vue"; | 226 | import Dialog from "./dialog.vue"; |
| 227 | +import Info from './info.vue' | ||
| 218 | 228 | ||
| 219 | export default { | 229 | export default { |
| 220 | name: "QueryCargo", | 230 | name: "QueryCargo", |
| 221 | components: { | 231 | components: { |
| 222 | - Dialog | 232 | + Dialog, |
| 233 | + Info | ||
| 223 | }, | 234 | }, |
| 224 | data() { | 235 | data() { |
| 225 | return { | 236 | return { |
| ... | @@ -330,6 +341,7 @@ export default { | ... | @@ -330,6 +341,7 @@ export default { |
| 330 | tableHeight: null, | 341 | tableHeight: null, |
| 331 | dialogVisible: false, | 342 | dialogVisible: false, |
| 332 | openView: false, | 343 | openView: false, |
| 344 | + openTransfer: false, | ||
| 333 | formShow: true, //菜单隐藏 | 345 | formShow: true, //菜单隐藏 |
| 334 | }; | 346 | }; |
| 335 | }, | 347 | }, |
| ... | @@ -340,6 +352,7 @@ export default { | ... | @@ -340,6 +352,7 @@ export default { |
| 340 | } else { | 352 | } else { |
| 341 | this.tableHeader = this.tableHeaders['cargo'] | 353 | this.tableHeader = this.tableHeaders['cargo'] |
| 342 | } | 354 | } |
| 355 | + this.select(0) | ||
| 343 | }, | 356 | }, |
| 344 | 357 | ||
| 345 | activated() { | 358 | activated() { |
| ... | @@ -476,6 +489,7 @@ export default { | ... | @@ -476,6 +489,7 @@ export default { |
| 476 | }, | 489 | }, |
| 477 | //查询 | 490 | //查询 |
| 478 | async select(val) { | 491 | async select(val) { |
| 492 | + this.selectTable = [] | ||
| 479 | this.tableData = []; | 493 | this.tableData = []; |
| 480 | this.allWeight = 0; | 494 | this.allWeight = 0; |
| 481 | this.allQty = 0; | 495 | this.allQty = 0; |
| ... | @@ -508,10 +522,9 @@ export default { | ... | @@ -508,10 +522,9 @@ export default { |
| 508 | .catch(() => { | 522 | .catch(() => { |
| 509 | this.tableLoading = false; | 523 | this.tableLoading = false; |
| 510 | }); | 524 | }); |
| 511 | - this.$refs.newTables.clearTable(); | ||
| 512 | this.cargoTotal(); | 525 | this.cargoTotal(); |
| 513 | }, | 526 | }, |
| 514 | - //释放仓位 | 527 | + //释放舱位 |
| 515 | release() { | 528 | release() { |
| 516 | let idList = [] | 529 | let idList = [] |
| 517 | this.selectTable.map(item => { | 530 | this.selectTable.map(item => { |
| ... | @@ -534,7 +547,7 @@ export default { | ... | @@ -534,7 +547,7 @@ export default { |
| 534 | val === item.id ? item.msg = item.msg + '正在释放中,请勿重复释放。' : '' | 547 | val === item.id ? item.msg = item.msg + '正在释放中,请勿重复释放。' : '' |
| 535 | }) | 548 | }) |
| 536 | res.data['noFlight'].map(val => { | 549 | res.data['noFlight'].map(val => { |
| 537 | - val === item.id ? item.msg = item.msg + '已释放仓位。' : '' | 550 | + val === item.id ? item.msg = item.msg + '已释放舱位。' : '' |
| 538 | }) | 551 | }) |
| 539 | res.data['pushFalse'].map(val => { | 552 | res.data['pushFalse'].map(val => { |
| 540 | val === item.id ? item.msg = item.msg + '该货物配舱结果已回推ACCS,不能释放。' : '' | 553 | val === item.id ? item.msg = item.msg + '该货物配舱结果已回推ACCS,不能释放。' : '' |
| ... | @@ -548,6 +561,26 @@ export default { | ... | @@ -548,6 +561,26 @@ export default { |
| 548 | console.log(err) | 561 | console.log(err) |
| 549 | }) | 562 | }) |
| 550 | }, | 563 | }, |
| 564 | + transfer() { | ||
| 565 | + this.openTransfer = true | ||
| 566 | + }, | ||
| 567 | + //生成历史数据文件 | ||
| 568 | + historyFlie() { | ||
| 569 | + if (new Date(this.cargoPlaneTime[1]).getTime() - new Date(this.cargoPlaneTime[0]).getTime() > 2592000000) { | ||
| 570 | + this.msgWarning('配载日期区间不能大于31天!') | ||
| 571 | + } else { | ||
| 572 | + this.dataInfo(); | ||
| 573 | + historyCargo(this.formData).then(res => { | ||
| 574 | + if (res.code === 200) { | ||
| 575 | + this.msgSuccess('操作成功,正在生成中,稍后可在下载页面查看!') | ||
| 576 | + } else { | ||
| 577 | + this.msgWarning(res.msg) | ||
| 578 | + } | ||
| 579 | + }).catch(err => { | ||
| 580 | + console.log(err) | ||
| 581 | + }) | ||
| 582 | + } | ||
| 583 | + }, | ||
| 551 | //关闭弹窗 | 584 | //关闭弹窗 |
| 552 | close() { | 585 | close() { |
| 553 | this.dialogVisible = false | 586 | this.dialogVisible = false |
| ... | @@ -725,6 +758,11 @@ export default { | ... | @@ -725,6 +758,11 @@ export default { |
| 725 | viewClose() { | 758 | viewClose() { |
| 726 | this.openView = false | 759 | this.openView = false |
| 727 | }, | 760 | }, |
| 761 | + //关闭迁转 | ||
| 762 | + dialogBeforeClose() { | ||
| 763 | + this.openTransfer = false | ||
| 764 | + this.select(0) | ||
| 765 | + }, | ||
| 728 | //设置关闭 | 766 | //设置关闭 |
| 729 | headerSetClose(val) { | 767 | headerSetClose(val) { |
| 730 | if (val == 1) { | 768 | if (val == 1) { | ... | ... |
This diff is collapsed. Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | - <div class="login" :style="display"> | 2 | + <div class="login"> |
| 3 | <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> | 3 | <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> |
| 4 | <h3 class="title">IMAC后台管理系统</h3> | 4 | <h3 class="title">IMAC后台管理系统</h3> |
| 5 | <el-form-item prop="username"> | 5 | <el-form-item prop="username"> |
| ... | @@ -13,8 +13,9 @@ | ... | @@ -13,8 +13,9 @@ |
| 13 | <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> | 13 | <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> |
| 14 | </el-input> | 14 | </el-input> |
| 15 | </el-form-item> | 15 | </el-form-item> |
| 16 | + | ||
| 16 | <!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> --> | 17 | <!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> --> |
| 17 | - <el-form-item style="width: 100%; marginTop: 44px"> | 18 | + <el-form-item style="width: 100%; marginTop: 65px"> |
| 18 | <el-button :loading="loading" size="medium" type="primary" style="width: 100%" | 19 | <el-button :loading="loading" size="medium" type="primary" style="width: 100%" |
| 19 | @click.native.prevent="handleLogin"> | 20 | @click.native.prevent="handleLogin"> |
| 20 | <span v-if="!loading">登 录</span> | 21 | <span v-if="!loading">登 录</span> |
| ... | @@ -30,9 +31,6 @@ | ... | @@ -30,9 +31,6 @@ |
| 30 | </template> | 31 | </template> |
| 31 | 32 | ||
| 32 | <script> | 33 | <script> |
| 33 | -import { getCodeImg } from "@/api/login"; | ||
| 34 | -//import Cookies from "js-cookie"; | ||
| 35 | -import { encrypt } from "@/utils/jsencrypt"; | ||
| 36 | 34 | ||
| 37 | export default { | 35 | export default { |
| 38 | name: "Login", | 36 | name: "Login", |
| ... | @@ -55,7 +53,6 @@ export default { | ... | @@ -55,7 +53,6 @@ export default { |
| 55 | }, | 53 | }, |
| 56 | loading: false, | 54 | loading: false, |
| 57 | redirect: undefined, | 55 | redirect: undefined, |
| 58 | - display: "display:flex", | ||
| 59 | }; | 56 | }; |
| 60 | }, | 57 | }, |
| 61 | watch: { | 58 | watch: { |
| ... | @@ -63,8 +60,8 @@ export default { | ... | @@ -63,8 +60,8 @@ export default { |
| 63 | handler: function (route) { | 60 | handler: function (route) { |
| 64 | this.redirect = route.query && route.query.redirect; | 61 | this.redirect = route.query && route.query.redirect; |
| 65 | }, | 62 | }, |
| 66 | - immediate: true | 63 | + immediate: true, |
| 67 | - } | 64 | + }, |
| 68 | }, | 65 | }, |
| 69 | created() { | 66 | created() { |
| 70 | this.getCookie(); | 67 | this.getCookie(); |
| ... | @@ -101,12 +98,16 @@ export default { | ... | @@ -101,12 +98,16 @@ export default { |
| 101 | } | 98 | } |
| 102 | this.$store | 99 | this.$store |
| 103 | .dispatch("Login", this.loginForm) | 100 | .dispatch("Login", this.loginForm) |
| 104 | - .then(() => { | 101 | + .then(res => { |
| 102 | + this.loading = false; | ||
| 103 | + if (res.code != 200) { | ||
| 104 | + this.msgWarning(res.msg) | ||
| 105 | + } | ||
| 105 | this.$router.push({ path: this.redirect || "/" }).catch(() => { }); | 106 | this.$router.push({ path: this.redirect || "/" }).catch(() => { }); |
| 106 | }) | 107 | }) |
| 107 | - .catch(() => { | 108 | + .catch(err => { |
| 108 | this.loading = false; | 109 | this.loading = false; |
| 109 | - //this.getCode(); | 110 | + this.msgWarning(err) |
| 110 | }); | 111 | }); |
| 111 | } | 112 | } |
| 112 | }); | 113 | }); | ... | ... |
| ... | @@ -4,9 +4,11 @@ | ... | @@ -4,9 +4,11 @@ |
| 4 | <!-- <el-table-column label="行号" prop="line" width="50" align="center"> | 4 | <!-- <el-table-column label="行号" prop="line" width="50" align="center"> |
| 5 | </el-table-column> --> | 5 | </el-table-column> --> |
| 6 | <el-table-column label="序号" type="index" width="70" align="center" /> | 6 | <el-table-column label="序号" type="index" width="70" align="center" /> |
| 7 | + <el-table-column label="运单号" prop="waybillNo" width="150" v-if="fromRoute == 'queryCargo'" /> | ||
| 7 | <el-table-column label="错误信息" prop="errorMessage"> | 8 | <el-table-column label="错误信息" prop="errorMessage"> |
| 8 | <template slot-scope="scope"> | 9 | <template slot-scope="scope"> |
| 9 | - {{scope.row}} | 10 | + <span v-if="fromRoute == 'queryCargo'">{{ scope.row.errorMessage }}</span> |
| 11 | + <span v-else> {{ scope.row }}</span> | ||
| 10 | <!-- <div v-for="(m, key) in scope.row.errorMessage" :key="key"> | 12 | <!-- <div v-for="(m, key) in scope.row.errorMessage" :key="key"> |
| 11 | {{ m }} | 13 | {{ m }} |
| 12 | </div> --> | 14 | </div> --> |
| ... | @@ -42,6 +44,7 @@ export default { | ... | @@ -42,6 +44,7 @@ export default { |
| 42 | }, | 44 | }, |
| 43 | methods: { | 45 | methods: { |
| 44 | close() { | 46 | close() { |
| 47 | + this.$store.dispatch('tagsView/delView', this.$route) | ||
| 45 | this.$store.state.tagsView.visitedViews.splice( | 48 | this.$store.state.tagsView.visitedViews.splice( |
| 46 | this.$store.state.tagsView.visitedViews.findIndex( | 49 | this.$store.state.tagsView.visitedViews.findIndex( |
| 47 | (item) => item.path === this.$route.path | 50 | (item) => item.path === this.$route.path | ... | ... |
| ... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
| 26 | <div v-else-if="dictName == '航线'"> | 26 | <div v-else-if="dictName == '航线'"> |
| 27 | <div v-if="status == 'add'"> | 27 | <div v-if="status == 'add'"> |
| 28 | <el-form-item label="航班号" prop="fltNo"> | 28 | <el-form-item label="航班号" prop="fltNo"> |
| 29 | - <el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="50"> | 29 | + <el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="20"> |
| 30 | </el-input> | 30 | </el-input> |
| 31 | </el-form-item> | 31 | </el-form-item> |
| 32 | <el-form-item label="航线" prop="route"> | 32 | <el-form-item label="航线" prop="route"> | ... | ... |
| ... | @@ -4,8 +4,8 @@ | ... | @@ -4,8 +4,8 @@ |
| 4 | <!-- cardHeader --> | 4 | <!-- cardHeader --> |
| 5 | <div slot="header" class="clearfix"> | 5 | <div slot="header" class="clearfix"> |
| 6 | <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' : | 6 | <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' : |
| 7 | - tableName == | 7 | + tableName == |
| 8 | - '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表" | 8 | + '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表" |
| 9 | }}</span> | 9 | }}</span> |
| 10 | <div style="float: right; padding: 3px 0"> | 10 | <div style="float: right; padding: 3px 0"> |
| 11 | <span class="selectLabel mr10">切换字典表</span> | 11 | <span class="selectLabel mr10">切换字典表</span> |
| ... | @@ -96,7 +96,7 @@ | ... | @@ -96,7 +96,7 @@ |
| 96 | <template v-slot:fltNo="scope"> | 96 | <template v-slot:fltNo="scope"> |
| 97 | <el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })"> | 97 | <el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })"> |
| 98 | {{ | 98 | {{ |
| 99 | - scope.row.fltNo | 99 | + scope.row.fltNo |
| 100 | }}<i class="el-icon-link"></i> </el-link> | 100 | }}<i class="el-icon-link"></i> </el-link> |
| 101 | </template> | 101 | </template> |
| 102 | <template slot="optionColumn"> | 102 | <template slot="optionColumn"> |
| ... | @@ -314,7 +314,6 @@ export default { | ... | @@ -314,7 +314,6 @@ export default { |
| 314 | }, | 314 | }, |
| 315 | //修改 | 315 | //修改 |
| 316 | // upDate(val) { | 316 | // upDate(val) { |
| 317 | - // console.log(val) | ||
| 318 | // this.status = val.status | 317 | // this.status = val.status |
| 319 | // this.addDictionary = val.data | 318 | // this.addDictionary = val.data |
| 320 | // this.open = true | 319 | // this.open = true | ... | ... |
src/views/systemConfig/menuConfig/drawer.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="menuDrawer"> | ||
| 3 | + <el-dialog :title="drawerTitle" width="50%" :visible.sync="dialogVisible" :close-on-click-modal="false" :show-close="false" | ||
| 4 | + :append-to-body="true"> | ||
| 5 | + <el-form ref="userForm" :model="menuForm" :disabled="menuFormDisabled" :rules="rules" label-width="auto" | ||
| 6 | + style="margin: 10px"> | ||
| 7 | + <el-row> | ||
| 8 | + <el-col :span="12"> | ||
| 9 | + <el-form-item label="菜单名称" prop=""> | ||
| 10 | + <!-- <el-input | ||
| 11 | + placeholder="请输入权限名" | ||
| 12 | + :disabled="menuFormDisabled" | ||
| 13 | + v-model="menuData.userName" | ||
| 14 | + size="mini" | ||
| 15 | + ></el-input> --> | ||
| 16 | + </el-form-item> | ||
| 17 | + </el-col> | ||
| 18 | + <el-col :span="12"> | ||
| 19 | + <el-form-item label="菜单路由" prop=""> | ||
| 20 | + <!-- <el-input | ||
| 21 | + placeholder="请输入权限名" | ||
| 22 | + :disabled="menuFormDisabled" | ||
| 23 | + v-model="menuData.userName" | ||
| 24 | + size="mini" | ||
| 25 | + ></el-input> --> | ||
| 26 | + </el-form-item> | ||
| 27 | + </el-col> | ||
| 28 | + <el-col :span="12"> | ||
| 29 | + <el-form-item label="组件名称" prop=""> | ||
| 30 | + <!-- <el-input | ||
| 31 | + placeholder="请输入权限名" | ||
| 32 | + :disabled="menuFormDisabled" | ||
| 33 | + v-model="menuData.userName" | ||
| 34 | + size="mini" | ||
| 35 | + ></el-input> --> | ||
| 36 | + </el-form-item> | ||
| 37 | + </el-col> | ||
| 38 | + <el-col :span="24"> | ||
| 39 | + <el-form-item label="菜单状态" prop=""> | ||
| 40 | + <el-switch v-model="menuData.menuStatus" active-color="#13ce66" inactive-color="#ff4949" | ||
| 41 | + :disabled="menuFormDisabled"></el-switch> | ||
| 42 | + </el-form-item> | ||
| 43 | + </el-col> | ||
| 44 | + <el-col :span="24"> | ||
| 45 | + <el-form-item label="图标选择" prop=""> | ||
| 46 | + <iconSelect @selected="selected"></iconSelect> | ||
| 47 | + </el-form-item> | ||
| 48 | + </el-col> | ||
| 49 | + <el-col :span="24"> | ||
| 50 | + <el-form-item label="权限设置" prop=""> | ||
| 51 | + <el-col :span="6"> | ||
| 52 | + <el-radio label="页面" size="medium"></el-radio> | ||
| 53 | + </el-col> | ||
| 54 | + <el-col :span="6"> | ||
| 55 | + <el-radio label="按钮" size="medium"></el-radio> | ||
| 56 | + </el-col> | ||
| 57 | + <el-col :span="24"> | ||
| 58 | + <el-card shadow="never"> | ||
| 59 | + <el-input placeholder=""></el-input> | ||
| 60 | + </el-card> | ||
| 61 | + </el-col> | ||
| 62 | + </el-form-item> | ||
| 63 | + </el-col> | ||
| 64 | + </el-row> | ||
| 65 | + </el-form> | ||
| 66 | + | ||
| 67 | + <div slot="footer"> | ||
| 68 | + <el-button @click="handleClose">取 消</el-button> | ||
| 69 | + <el-button type="primary" @click="submit">确 定</el-button> | ||
| 70 | + </div> | ||
| 71 | + </el-dialog> | ||
| 72 | + </div> | ||
| 73 | +</template> | ||
| 74 | + | ||
| 75 | +<script> | ||
| 76 | +import iconSelect from "@/components/IconSelect"; | ||
| 77 | +export default { | ||
| 78 | + components: { | ||
| 79 | + iconSelect, | ||
| 80 | + }, | ||
| 81 | + props: { | ||
| 82 | + drawerTitle: { | ||
| 83 | + type: String, | ||
| 84 | + default: "", | ||
| 85 | + }, | ||
| 86 | + menuFormDisabled: { | ||
| 87 | + type: Boolean, | ||
| 88 | + default: false, | ||
| 89 | + }, | ||
| 90 | + dialogVisible: { | ||
| 91 | + type: Boolean, | ||
| 92 | + default: false, | ||
| 93 | + }, | ||
| 94 | + menuData: { | ||
| 95 | + type: Object, | ||
| 96 | + default: null, | ||
| 97 | + }, | ||
| 98 | + }, | ||
| 99 | + data() { | ||
| 100 | + return { | ||
| 101 | + menuForm: {}, | ||
| 102 | + rules: {} | ||
| 103 | + }; | ||
| 104 | + }, | ||
| 105 | + updated() { | ||
| 106 | + this.menuForm = this.menuData; | ||
| 107 | + }, | ||
| 108 | + watch: { | ||
| 109 | + dialogVisible(val, oldVal) { | ||
| 110 | + if (val) { | ||
| 111 | + this.menuForm = this.menuData; | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + }, | ||
| 115 | + methods: { | ||
| 116 | + handleClose() { | ||
| 117 | + this.$emit("handleClose", false); | ||
| 118 | + }, | ||
| 119 | + selected(val) { | ||
| 120 | + console.log(val); | ||
| 121 | + }, | ||
| 122 | + submit() { }, | ||
| 123 | + }, | ||
| 124 | +}; | ||
| 125 | +</script> | ||
| 126 | + | ||
| 127 | +<style> | ||
| 128 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -44,9 +44,13 @@ | ... | @@ -44,9 +44,13 @@ |
| 44 | <script> | 44 | <script> |
| 45 | import { getAllAuth, updateStatus } from "@/api/system/user.js"; | 45 | import { getAllAuth, updateStatus } from "@/api/system/user.js"; |
| 46 | import dictLabels from "@/assets/languages/dictLabels.js"; | 46 | import dictLabels from "@/assets/languages/dictLabels.js"; |
| 47 | +import Drawer from "./drawer.vue"; | ||
| 47 | 48 | ||
| 48 | export default { | 49 | export default { |
| 49 | name: "MenuConfig", | 50 | name: "MenuConfig", |
| 51 | + components: { | ||
| 52 | + Drawer, | ||
| 53 | + }, | ||
| 50 | data() { | 54 | data() { |
| 51 | return { | 55 | return { |
| 52 | drawer: false, | 56 | drawer: false, | ... | ... |
This diff is collapsed. Click to expand it.
| 1 | +<template> | ||
| 2 | + <div style="padding:20px 0"> | ||
| 3 | + <el-form class="form-header" ref="dictForm" label-width="auto" label-position="left" style="margin-bottom:10px" | ||
| 4 | + @submit.native.prevent size="small"> | ||
| 5 | + <el-row> | ||
| 6 | + <el-col :span="6"> | ||
| 7 | + <el-form-item label="发件人账号"> | ||
| 8 | + <el-input type="textarea" v-model="selectionData.shipperAccount" placeholder="请输入发件人账号,多个以“;”分割" | ||
| 9 | + maxlength="50" rows="4" /> | ||
| 10 | + </el-form-item> | ||
| 11 | + </el-col> | ||
| 12 | + </el-row> | ||
| 13 | + </el-form> | ||
| 14 | + <div style="margin-left:20px;margin-bottom:10px"> | ||
| 15 | + <el-button icon="el-icon-search" type="primary" size="small" @click="selection(1)">查 询 | ||
| 16 | + </el-button> | ||
| 17 | + <el-button v-hasPermi="['log:superAllocation:add']" icon="el-icon-plus" type="primary" size="small" | ||
| 18 | + @click="add">添 加 | ||
| 19 | + </el-button> | ||
| 20 | + </div> | ||
| 21 | + <Tables ref="supserAllocation" ductName="supserAllocation" :data="tableData" :headerData="tableHeader" | ||
| 22 | + :selection="false" :order="true" :selectFixed="false" :pagination="true" :totalCount="totalCount" | ||
| 23 | + :loading="loading" :limitSize="selectionData.size" :page="selectionData.page" | ||
| 24 | + layout="total,prev, pager, next, jumper, ->" :pageSizes="[100]" :height="tableHeight" | ||
| 25 | + @currentChange="currentChange"> | ||
| 26 | + <template slot="optionColumn"> | ||
| 27 | + <el-table-column label="操作" width="250" align="center"> | ||
| 28 | + <template slot-scope="scope"> | ||
| 29 | + <el-button size="mini" type="text" v-if="scope.row.status != 0" icon="el-icon-edit" | ||
| 30 | + v-hasPermi="['log:superAllocation:update']" @click="update(scope.row, 'update')">修改 | ||
| 31 | + </el-button> | ||
| 32 | + <el-button type="text" v-if="scope.row.status === 1" size="mini" icon="el-icon-video-pause" | ||
| 33 | + v-hasPermi="['log:superAllocation:openClose']" @click="changeStatus(scope.row)"> | ||
| 34 | + 停 用</el-button> | ||
| 35 | + <el-button type="text" v-if="scope.row.status === 0" size="mini" icon="el-icon-video-pause" | ||
| 36 | + v-hasPermi="['log:superAllocation:openClose']" @click="changeStatus(scope.row)"> | ||
| 37 | + 启 用</el-button> | ||
| 38 | + <el-button type="text" icon="el-icon-document-copy" size="mini" | ||
| 39 | + v-hasPermi="['log:superAllocation:copy']" @click="update(scope.row, 'copy')">复 制 | ||
| 40 | + </el-button> | ||
| 41 | + <el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949" | ||
| 42 | + v-hasPermi="['log:superAllocation:delete']" @click="del(scope.row)">删除</el-button> | ||
| 43 | + </template> | ||
| 44 | + </el-table-column> | ||
| 45 | + </template> | ||
| 46 | + </Tables> | ||
| 47 | + <Dialog :dialogVisible="dialogVisible" :ruleData="ruleData" :status="dialogStatus" @close="close" /> | ||
| 48 | + </div> | ||
| 49 | +</template> | ||
| 50 | + | ||
| 51 | +<script> | ||
| 52 | +import { queryShipperAccountRule, changeStatusById, queryShipperAccountRuleById, getReleaseWeight } from "@/api/supserAllocation" | ||
| 53 | +import Dialog from './dialog.vue'; | ||
| 54 | + | ||
| 55 | +export default { | ||
| 56 | + name: 'SuperAllocation', | ||
| 57 | + components: { | ||
| 58 | + Dialog | ||
| 59 | + }, | ||
| 60 | + data() { | ||
| 61 | + return { | ||
| 62 | + selectionData: { | ||
| 63 | + shipperAccount: null, | ||
| 64 | + page: 1, | ||
| 65 | + size: 20, | ||
| 66 | + }, | ||
| 67 | + tableData: [], | ||
| 68 | + tableHeader: this.tableHeaders['superAllocation'], | ||
| 69 | + ruleData: { | ||
| 70 | + classificationList: [], | ||
| 71 | + serviceCodeList: [] | ||
| 72 | + }, | ||
| 73 | + dialogStatus: 'add', | ||
| 74 | + tableHeight: null, | ||
| 75 | + totalCount: 0, | ||
| 76 | + dialogVisible: false, | ||
| 77 | + loading: false, | ||
| 78 | + } | ||
| 79 | + }, | ||
| 80 | + created() { | ||
| 81 | + }, | ||
| 82 | + mounted() { | ||
| 83 | + this.tableHeight = window.innerHeight - this.$refs.supserAllocation.$el.offsetHeight - 250 | ||
| 84 | + this.selection(1) | ||
| 85 | + }, | ||
| 86 | + methods: { | ||
| 87 | + //查询 | ||
| 88 | + selection(val) { | ||
| 89 | + this.tableData = [] | ||
| 90 | + this.loading = true | ||
| 91 | + if (val === 1) { | ||
| 92 | + this.selectionData.page = 1 | ||
| 93 | + } | ||
| 94 | + queryShipperAccountRule(this.selectionData).then(res => { | ||
| 95 | + this.loading = false | ||
| 96 | + if (res.code === 200) { | ||
| 97 | + this.tableData = res.data.list | ||
| 98 | + this.totalCount = res.data.total | ||
| 99 | + } else { | ||
| 100 | + this.msgWarning(res.msg) | ||
| 101 | + } | ||
| 102 | + }).catch(err => { | ||
| 103 | + this.loading = false | ||
| 104 | + console.log(err) | ||
| 105 | + }) | ||
| 106 | + }, | ||
| 107 | + //新增 | ||
| 108 | + add() { | ||
| 109 | + this.dialogStatus = 'add' | ||
| 110 | + this.dialogVisible = true | ||
| 111 | + }, | ||
| 112 | + //修改 | ||
| 113 | + update(val, status) { | ||
| 114 | + this.dialogStatus = status | ||
| 115 | + queryShipperAccountRuleById({ id: val.id }).then(res => { | ||
| 116 | + if (res.code === 200) { | ||
| 117 | + this.ruleData = res.data | ||
| 118 | + if (this.ruleData.classificationList == null || this.ruleData.classificationList.length < 1) { | ||
| 119 | + this.ruleData.classificationList = [] | ||
| 120 | + } | ||
| 121 | + if (this.ruleData.serviceCodeList == null || this.ruleData.serviceCodeList.length < 1) { | ||
| 122 | + this.ruleData.serviceCodeList = [] | ||
| 123 | + } | ||
| 124 | + if (status == 'copy') { | ||
| 125 | + this.ruleData.id = undefined | ||
| 126 | + } | ||
| 127 | + this.dialogVisible = true | ||
| 128 | + } else { | ||
| 129 | + this.msgWarning(res.msg) | ||
| 130 | + } | ||
| 131 | + }).catch(err => { | ||
| 132 | + console.log(err) | ||
| 133 | + }) | ||
| 134 | + }, | ||
| 135 | + //删除 | ||
| 136 | + del(val) { | ||
| 137 | + getReleaseWeight({ id: val.id }).then(res => { | ||
| 138 | + if (res.code === 200) { | ||
| 139 | + this.$confirm(`是否要删除记录!预计释放舱位${res.data}`, "注意!", { | ||
| 140 | + confirmButtonText: "确定", | ||
| 141 | + cancelButtonText: '取消', | ||
| 142 | + type: "warning", | ||
| 143 | + }).then(() => { | ||
| 144 | + changeStatusById({ id: val.id, status: 2 }).then(res => { | ||
| 145 | + if (res.code === 200) { | ||
| 146 | + this.msgSuccess(`删除成功!已释放舱位${res.data}`) | ||
| 147 | + this.selection(1) | ||
| 148 | + } else { | ||
| 149 | + this.msgWarning(res.msg) | ||
| 150 | + } | ||
| 151 | + }).catch(err => { | ||
| 152 | + console.log(err) | ||
| 153 | + }) | ||
| 154 | + }).catch(() => { }) | ||
| 155 | + } else { | ||
| 156 | + this.msgWarning(res.code) | ||
| 157 | + } | ||
| 158 | + }).catch(err => { | ||
| 159 | + console.log(err) | ||
| 160 | + }) | ||
| 161 | + }, | ||
| 162 | + //停用启用 | ||
| 163 | + changeStatus(val) { | ||
| 164 | + let status = 0 | ||
| 165 | + let tip = '' | ||
| 166 | + if (val.status == 0) { | ||
| 167 | + status = 1 | ||
| 168 | + tip = '启用' | ||
| 169 | + } else if (val.status == 1) { | ||
| 170 | + status = 0 | ||
| 171 | + tip = '停用' | ||
| 172 | + } | ||
| 173 | + if (tip === "停用") { | ||
| 174 | + getReleaseWeight({ id: val.id }).then(res => { | ||
| 175 | + if (res.code === 200) { | ||
| 176 | + this.$confirm(`预计释放舱位为${res.data},是否确定!`, "注意!", { | ||
| 177 | + confirmButtonText: "确定", | ||
| 178 | + cancelButtonText: '取消', | ||
| 179 | + type: "warning", | ||
| 180 | + }).then(() => { | ||
| 181 | + this.statusChange({ id: val.id, status: status, tip: tip }) | ||
| 182 | + }).catch(() => { }) | ||
| 183 | + } else { | ||
| 184 | + this.msgWarning(res.msg) | ||
| 185 | + } | ||
| 186 | + }).catch(err => { | ||
| 187 | + console.log(err) | ||
| 188 | + }) | ||
| 189 | + } else { | ||
| 190 | + this.$confirm(`是否要${tip}记录!`, "注意!", { | ||
| 191 | + confirmButtonText: "确定", | ||
| 192 | + cancelButtonText: '取消', | ||
| 193 | + type: "warning", | ||
| 194 | + }).then(() => { | ||
| 195 | + this.statusChange({ id: val.id, status: status, tip: tip }) | ||
| 196 | + }).catch(() => { }) | ||
| 197 | + } | ||
| 198 | + }, | ||
| 199 | + //复制 | ||
| 200 | + copy(val) { | ||
| 201 | + this.dialogStatus = 'copy' | ||
| 202 | + this.ruleData = JSON.parse(JSON.stringify(val)) | ||
| 203 | + this.ruleData.id = undefined | ||
| 204 | + this.dialogVisible = true | ||
| 205 | + }, | ||
| 206 | + //状态修改请求 | ||
| 207 | + statusChange(val) { | ||
| 208 | + changeStatusById(val).then(res => { | ||
| 209 | + if (res.code === 200) { | ||
| 210 | + if (val.tip == '停用') { | ||
| 211 | + this.msgSuccess(`${val.tip}成功!已释放${res.data}`) | ||
| 212 | + } else { | ||
| 213 | + this.msgSuccess(`${val.tip}成功!`) | ||
| 214 | + } | ||
| 215 | + this.selection(1) | ||
| 216 | + } else { | ||
| 217 | + this.msgWarning(res.msg) | ||
| 218 | + } | ||
| 219 | + }).catch(err => { | ||
| 220 | + console.log(err) | ||
| 221 | + }) | ||
| 222 | + }, | ||
| 223 | + //关闭 | ||
| 224 | + close() { | ||
| 225 | + this.dialogVisible = false | ||
| 226 | + this.ruleData = {} | ||
| 227 | + this.selection(1) | ||
| 228 | + }, | ||
| 229 | + //翻页 | ||
| 230 | + currentChange(val) { | ||
| 231 | + this.selectionData.page = val.page | ||
| 232 | + this.selection() | ||
| 233 | + }, | ||
| 234 | + } | ||
| 235 | +} | ||
| 236 | + | ||
| 237 | +</script> | ||
| 238 | + | ||
| 239 | +<style lang="scss" scoped> | ||
| 240 | + | ||
| 241 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/systemLog/archiveData/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div> | ||
| 3 | + <el-form ref="archiveDataForm" class="form-header" :model="selectForm" label-width="auto" size="small" | ||
| 4 | + @submit.native.prevent> | ||
| 5 | + <el-row> | ||
| 6 | + <el-col :span="6"> | ||
| 7 | + <el-form-item label="操作时间"> | ||
| 8 | + <el-date-picker class="formItem" v-model="selectForm.dateList" type="daterange" | ||
| 9 | + range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" | ||
| 10 | + value-format="yyyy-MM-dd" clearable> | ||
| 11 | + </el-date-picker> | ||
| 12 | + </el-form-item> | ||
| 13 | + </el-col> | ||
| 14 | + </el-row> | ||
| 15 | + </el-form> | ||
| 16 | + <div class="ml20 mb20"> | ||
| 17 | + <el-button type="primary" size="small" icon="el-icon-search" :loading="loading" @click="selectLog(1)">查 询 | ||
| 18 | + </el-button> | ||
| 19 | + </div> | ||
| 20 | + <Tables ref="archiveDataTables" ductName="archiveDataTables" :order="true" :border='true' :data="data" | ||
| 21 | + :headerData="tableHeader" tableAlign="center" :showOverflowTooltip="true" :height="tableHeight" | ||
| 22 | + :page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[20]" :totalCount="total" | ||
| 23 | + :loading="loading" @currentChange="currentChange"> | ||
| 24 | + <template v-slot:queryParameter="scope"> | ||
| 25 | + <el-popover placement="top" width="350" trigger="hover"> | ||
| 26 | + <ul style="height:300px;overflow-y:scroll;" | ||
| 27 | + v-if="scope.row.queryParameter != null && scope.row.queryParameter != ''"> | ||
| 28 | + <li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.queryParameter)).split(',')" | ||
| 29 | + :key="index" style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li> | ||
| 30 | + </ul> | ||
| 31 | + <el-button type="text" slot="reference">查 看</el-button> | ||
| 32 | + </el-popover> | ||
| 33 | + </template> | ||
| 34 | + <template v-slot:downloadPath="scope"> | ||
| 35 | + <el-button v-if="scope.row.downloadPath != null && scope.row.status == 1" type="text" size="mini" | ||
| 36 | + icon="el-icon-download" @click="download(scope.row)">下载 | ||
| 37 | + </el-button> | ||
| 38 | + <span v-else>暂无下载</span> | ||
| 39 | + </template> | ||
| 40 | + </Tables> | ||
| 41 | + </div> | ||
| 42 | +</template> | ||
| 43 | + | ||
| 44 | +<script> | ||
| 45 | +import { findArchiveCargoLog, isExistZip } from "@/api/system/logConfig.js"; | ||
| 46 | +import { downLoadZip } from "@/utils/zipdownload"; | ||
| 47 | + | ||
| 48 | +export default { | ||
| 49 | + data() { | ||
| 50 | + return { | ||
| 51 | + selectForm: { | ||
| 52 | + dateList: [], | ||
| 53 | + page: 1, | ||
| 54 | + size: 20 | ||
| 55 | + }, | ||
| 56 | + data: [], | ||
| 57 | + tableHeader: this.tableHeaders['archiveData'], | ||
| 58 | + tableHeight: null, | ||
| 59 | + total: 0, | ||
| 60 | + loading: false, | ||
| 61 | + } | ||
| 62 | + }, | ||
| 63 | + created() { | ||
| 64 | + this.selectLog() | ||
| 65 | + }, | ||
| 66 | + mounted() { | ||
| 67 | + this.tableHeight = window.innerHeight - this.$refs.archiveDataForm.$el.offsetHeight - 200 | ||
| 68 | + }, | ||
| 69 | + methods: { | ||
| 70 | + selectLog(val) { | ||
| 71 | + this.loading = true | ||
| 72 | + if (val == 1) { | ||
| 73 | + this.selectForm.page = 1 | ||
| 74 | + } | ||
| 75 | + let obj = {} | ||
| 76 | + if (this.selectForm.dateList && this.selectForm.dateList.length > 0) { | ||
| 77 | + obj.createTimeStart = this.selectForm.dateList[0] | ||
| 78 | + obj.createTimeEnd = this.selectForm.dateList[1] | ||
| 79 | + } | ||
| 80 | + obj.page = this.selectForm.page | ||
| 81 | + obj.size = this.selectForm.size | ||
| 82 | + findArchiveCargoLog(obj).then(res => { | ||
| 83 | + this.loading = false | ||
| 84 | + if (res.code === 200) { | ||
| 85 | + this.data = res.data.list | ||
| 86 | + this.total = res.data.total | ||
| 87 | + } else { | ||
| 88 | + this.msgWarning(res.msg) | ||
| 89 | + } | ||
| 90 | + }).catch(err => { | ||
| 91 | + this.loading = true | ||
| 92 | + console.log(err) | ||
| 93 | + }) | ||
| 94 | + }, | ||
| 95 | + download(val) { | ||
| 96 | + isExistZip(val).then(res => { | ||
| 97 | + if (res.code === 200) { | ||
| 98 | + setTimeout(() => { | ||
| 99 | + let url = '/archiveCargoLog/downloadZip' | ||
| 100 | + let filename = val.packageName | ||
| 101 | + downLoadZip(url, val, filename) | ||
| 102 | + }, 500); | ||
| 103 | + } else { | ||
| 104 | + this.msgWarning(res.msg) | ||
| 105 | + } | ||
| 106 | + }).catch(err => { | ||
| 107 | + console.log(err) | ||
| 108 | + }) | ||
| 109 | + }, | ||
| 110 | + currentChange(val) { | ||
| 111 | + this.selectForm.page = val.page | ||
| 112 | + this.selectLog() | ||
| 113 | + } | ||
| 114 | + } | ||
| 115 | +} | ||
| 116 | +</script> | ||
| 117 | + | ||
| 118 | +<style lang="scss" scoped> | ||
| 119 | + | ||
| 120 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -69,12 +69,19 @@ | ... | @@ -69,12 +69,19 @@ |
| 69 | </template> | 69 | </template> |
| 70 | <template v-slot:flightFltNo="scope"> | 70 | <template v-slot:flightFltNo="scope"> |
| 71 | <el-link v-if="scope.row.allocDimId" type="primary" | 71 | <el-link v-if="scope.row.allocDimId" type="primary" |
| 72 | - @click="$router.push({ name: 'FlightAllocConfigInfo', params: { id: scope.row.allocDimId, handle: 'detail', fltNo: scope.row.flightFltNo, fltDate: scope.row.flightFltDate ? scope.row.flightFltDate : ' ', routeStatus: 'dmLog', route: scope.row.currentFlightRoute ? scope.row.currentFlightRoute : ' ', status: ' ', createStatus: 1 } })"> | 72 | + @click="$router.push({ name: 'FlightAllocConfigInfo', params: { id: scope.row.allocDimId, handle: 'detail', fltNo: scope.row.flightFltNo, fltDate: scope.row.flightFltDate ? scope.row.flightFltDate : ' ', routeStatus: 'dmLog', route: scope.row.currentFlightRoute ? scope.row.currentFlightRoute : ' ', status: ' ', createStatus: 1, } })"> |
| 73 | {{ | 73 | {{ |
| 74 | scope.row.flightFltNo | 74 | scope.row.flightFltNo |
| 75 | }}<i class="el-icon-link"></i> </el-link> | 75 | }}<i class="el-icon-link"></i> </el-link> |
| 76 | <span v-else>{{ scope.row.flightFltNo }}</span> | 76 | <span v-else>{{ scope.row.flightFltNo }}</span> |
| 77 | </template> | 77 | </template> |
| 78 | + <template v-slot:remarksDetail="scope"> | ||
| 79 | + <span v-if="scope.row.remarksDetail == null || scope.row.remarksDetail == ''">{{ scope.row.remarksDetail | ||
| 80 | + }}</span> | ||
| 81 | + <div v-else> | ||
| 82 | + <div v-for="item in scope.row.remarksDetail.split('\\r\\n')">{{ item }}</div> | ||
| 83 | + </div> | ||
| 84 | + </template> | ||
| 78 | </Tables> | 85 | </Tables> |
| 79 | </div> | 86 | </div> |
| 80 | </template> | 87 | </template> |
| ... | @@ -137,7 +144,7 @@ export default { | ... | @@ -137,7 +144,7 @@ export default { |
| 137 | getDmDataList(this.selectForm).then((res) => { | 144 | getDmDataList(this.selectForm).then((res) => { |
| 138 | this.loading = false; | 145 | this.loading = false; |
| 139 | if (res.code === 200) { | 146 | if (res.code === 200) { |
| 140 | - this.total = res.data.total; | 147 | + this.total = res.data.total |
| 141 | if (res.data.total === 0) { | 148 | if (res.data.total === 0) { |
| 142 | this.msgWarning('未查询到数据') | 149 | this.msgWarning('未查询到数据') |
| 143 | } else { | 150 | } else { | ... | ... |
| ... | @@ -64,6 +64,7 @@ export default { | ... | @@ -64,6 +64,7 @@ export default { |
| 64 | }, | 64 | }, |
| 65 | //返回 | 65 | //返回 |
| 66 | close() { | 66 | close() { |
| 67 | + this.$store.dispatch('tagsView/delView', this.$route) | ||
| 67 | this.$store.state.tagsView.visitedViews.splice( | 68 | this.$store.state.tagsView.visitedViews.splice( |
| 68 | this.$store.state.tagsView.visitedViews.findIndex( | 69 | this.$store.state.tagsView.visitedViews.findIndex( |
| 69 | (item) => item.path === this.$route.path | 70 | (item) => item.path === this.$route.path | ... | ... |
src/views/systemLog/operationLog/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div> | ||
| 3 | + <el-form ref="operationLogForm" class="form-header" :model="selectForm" label-width="auto" size="small" | ||
| 4 | + @submit.native.prevent> | ||
| 5 | + <el-row> | ||
| 6 | + <el-col :span="6"> | ||
| 7 | + <el-form-item label="功能模块"> | ||
| 8 | + <el-select v-model="selectForm.module" class="formItem" placeholder="不限" clearable> | ||
| 9 | + <el-option v-for="item in moduleList" :label="item" :value="item" :key="item"></el-option> | ||
| 10 | + </el-select> | ||
| 11 | + </el-form-item> | ||
| 12 | + </el-col> | ||
| 13 | + <el-col :span="6"> | ||
| 14 | + <el-form-item label="操作描述"> | ||
| 15 | + <el-input v-model="selectForm.describe" class="formItem" placeholder="请输入操作描述" clearable> | ||
| 16 | + </el-input> | ||
| 17 | + </el-form-item> | ||
| 18 | + </el-col> | ||
| 19 | + <el-col :span="6"> | ||
| 20 | + <el-form-item label="操作人"> | ||
| 21 | + <el-input v-model="selectForm.userName" class="formItem" placeholder="请输入操作人" clearable> | ||
| 22 | + </el-input> | ||
| 23 | + </el-form-item> | ||
| 24 | + </el-col> | ||
| 25 | + <el-col :span="6"> | ||
| 26 | + <el-form-item label="操作时间"> | ||
| 27 | + <el-date-picker class="formItem" v-model="dateList" type="daterange" range-separator="至" | ||
| 28 | + start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable> | ||
| 29 | + </el-date-picker> | ||
| 30 | + </el-form-item> | ||
| 31 | + </el-col> | ||
| 32 | + </el-row> | ||
| 33 | + </el-form> | ||
| 34 | + <div class="ml20 mb20"> | ||
| 35 | + <el-button type="primary" size="small" icon="el-icon-search" :loading="loading" @click="selectLog(1)">查 询 | ||
| 36 | + </el-button> | ||
| 37 | + </div> | ||
| 38 | + <Tables ref="operationLogTables" ductName="operationLogTables" :order="true" :border='false' :data="data" | ||
| 39 | + :headerData="tableHeader" tableAlign="center" :showOverflowTooltip="true" :height="tableHeight" | ||
| 40 | + :page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total" | ||
| 41 | + :loading="loading" @currentChange="currentChange"> | ||
| 42 | + <template v-slot:result="scope"> | ||
| 43 | + <span> | ||
| 44 | + {{ scope.row.result != null && typeof JSON.parse(scope.row.result) == 'object' ? | ||
| 45 | + JSON.parse(scope.row.result).msg : | ||
| 46 | + scope.row.result | ||
| 47 | + }} | ||
| 48 | + </span> | ||
| 49 | + </template> | ||
| 50 | + <template v-slot:remark="scope"> | ||
| 51 | + <el-popover placement="top" width="400" trigger="hover" | ||
| 52 | + v-if="scope.row.remark != null && scope.row.remark != ''"> | ||
| 53 | + <ul style="height:300px;overflow-y:scroll;"> | ||
| 54 | + <li v-for="(item, index) in scope.row.remark.split('\n')" :key="index" | ||
| 55 | + style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li> | ||
| 56 | + </ul> | ||
| 57 | + <el-button type="text" slot="reference">查 看</el-button> | ||
| 58 | + </el-popover> | ||
| 59 | + </template> | ||
| 60 | + <template v-slot:requestParameters="scope"> | ||
| 61 | + <el-popover placement="top" width="400" trigger="hover" | ||
| 62 | + v-if="scope.row.requestParameters != null && scope.row.requestParameters != ''"> | ||
| 63 | + <ul style="height:300px;overflow-y:scroll;"> | ||
| 64 | + <li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.requestParameters)).split(',')" | ||
| 65 | + :key="index" style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li> | ||
| 66 | + </ul> | ||
| 67 | + <el-button type="text" slot="reference">查 看</el-button> | ||
| 68 | + </el-popover> | ||
| 69 | + </template> | ||
| 70 | + </Tables> | ||
| 71 | + </div> | ||
| 72 | +</template> | ||
| 73 | + | ||
| 74 | +<script> | ||
| 75 | +import { findModuleCondition, getSystemOperationLogData } from "@/api/system/logConfig.js"; | ||
| 76 | + | ||
| 77 | +export default { | ||
| 78 | + name: 'OperationLog', | ||
| 79 | + data() { | ||
| 80 | + return { | ||
| 81 | + selectForm: { | ||
| 82 | + module: null, | ||
| 83 | + describe: null, | ||
| 84 | + userName: null, | ||
| 85 | + page: 1, | ||
| 86 | + size: 100 | ||
| 87 | + }, | ||
| 88 | + data: [], | ||
| 89 | + tableHeader: this.tableHeaders['operationLog'], | ||
| 90 | + moduleList: [], | ||
| 91 | + dateList: [], | ||
| 92 | + defaultProps: { | ||
| 93 | + children: 'children', | ||
| 94 | + label: 'label' | ||
| 95 | + }, | ||
| 96 | + tableHeight: null, | ||
| 97 | + total: 0, | ||
| 98 | + loading: false | ||
| 99 | + } | ||
| 100 | + }, | ||
| 101 | + created() { | ||
| 102 | + this.getModule() | ||
| 103 | + this.selectLog(1) | ||
| 104 | + }, | ||
| 105 | + activated() { | ||
| 106 | + this.selectLog(); | ||
| 107 | + }, | ||
| 108 | + mounted() { | ||
| 109 | + this.tableHeight = window.innerHeight - this.$refs.operationLogForm.$el.offsetHeight - 240 | ||
| 110 | + }, | ||
| 111 | + methods: { | ||
| 112 | + getModule() { | ||
| 113 | + findModuleCondition().then(res => { | ||
| 114 | + if (res.code === 200) { | ||
| 115 | + this.moduleList = res.data.module | ||
| 116 | + } else { | ||
| 117 | + this.msgWarning(res.msg) | ||
| 118 | + } | ||
| 119 | + }).catch(err => { | ||
| 120 | + console.log(err) | ||
| 121 | + }) | ||
| 122 | + }, | ||
| 123 | + selectLog(val) { | ||
| 124 | + this.loading = true | ||
| 125 | + this.data = [] | ||
| 126 | + if (val == 1) { | ||
| 127 | + this.selectForm.page = 1 | ||
| 128 | + } | ||
| 129 | + let obj = {} | ||
| 130 | + obj.module = this.selectForm.module | ||
| 131 | + if (this.dateList && this.dateList.length > 0) { | ||
| 132 | + obj.createTimeStart = this.dateList[0] | ||
| 133 | + obj.createTimeEnd = this.dateList[1] | ||
| 134 | + } else { | ||
| 135 | + obj.createTimeStart = null | ||
| 136 | + obj.createTimeEnd = null | ||
| 137 | + } | ||
| 138 | + obj.describe = this.selectForm.describe | ||
| 139 | + obj.userName = this.selectForm.userName | ||
| 140 | + obj.page = this.selectForm.page | ||
| 141 | + obj.size = this.selectForm.size | ||
| 142 | + getSystemOperationLogData(obj).then(res => { | ||
| 143 | + this.loading = false | ||
| 144 | + if (res.code === 200) { | ||
| 145 | + this.data = res.data.list | ||
| 146 | + this.total = res.data.total | ||
| 147 | + } else { | ||
| 148 | + this.msgWarning(res.msg) | ||
| 149 | + } | ||
| 150 | + }).catch(err => { | ||
| 151 | + this.loading = false | ||
| 152 | + console.log(err) | ||
| 153 | + }) | ||
| 154 | + }, | ||
| 155 | + currentChange(val) { | ||
| 156 | + this.selectForm.page = val.page | ||
| 157 | + this.selectLog() | ||
| 158 | + } | ||
| 159 | + } | ||
| 160 | +} | ||
| 161 | + | ||
| 162 | +</script> | ||
| 163 | + | ||
| 164 | +<style lang="scss" scoped> | ||
| 165 | + | ||
| 166 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment