jinhui.wang

ver:1.9.0;新增特殊规则配舱,航班迁转,白名单异步导入,操作日志,样式修正,bug修复

Showing 40 changed files with 2919 additions and 414 deletions
......@@ -60,7 +60,7 @@ export function downloadExcel(data) {
})
}
//释放
//释放
export function releaseCargo(data) {
return request({
url: '/cargo/releaseCargo',
......@@ -106,3 +106,29 @@ export function getFlightsRoutes(data) {
data: data
})
}
//航班迁转
/**
* @param ids * 货物id list
* @param flightId * 航班id
* @param route * 航线
*/
export function batchMoveCargoToOtherFlight(data) {
return request({
url: '/cargo/batchMoveCargoToOtherFlight',
method: 'post',
data: data
})
}
//生成历史数据文件
/**
* @param 同货物查询
*/
export function historyCargo(data) {
return request({
url: '/cargo/historyCargo',
method: 'post',
data: data
})
}
\ No newline at end of file
......
......@@ -72,3 +72,17 @@ export function updateAutoPushBatch(data) {
data: data
})
}
//白名单自动配舱开关
/**
* @param updateIds idList *
* @param status 状态 * 1开 0关
*/
export function updateWhiteListSwitchBatch(data) {
return request({
url: '/FlightPreserveController/updateWhiteListSwitchBatch',
method: 'post',
data: data
})
}
......
......@@ -59,4 +59,29 @@ export function findStationName() {
url: '/goods/findStationName',
method: 'post',
})
}
//批量导入
export function uploadGoodsExcel(file, goodsStation) {
let formData = new FormData();
formData.append("file", file);
formData.append("goodsStation", goodsStation);
return request({
url: '/goods/uploadGoodsExcel',
method: 'post',
data: formData
})
}
//查询上传日志
/**
* @param page 页长 *
* @param size 页数 *
*/
export function userImportLog(data) {
return request({
url: '/goods/userImportLog',
method: 'post',
data: data
})
}
\ No newline at end of file
......
import request from '@/utils/request'
import axios from 'axios';
import settings from "@/settings"
import { getToken } from '@/utils/auth'
//模板下载
export function downLoadTemplate(template) {
return request({
url: '/flightInfoImport/downLoadTemplate?template=' + template,
method: 'get',
responseType: 'blob',
})
}
//航班目的地批量导入
/**
* @param file * 文件
* @param beginDate * 时间
*/
export function importFlightDestination(file, date) {
let formData = new FormData();
formData.append("file", file);
formData.append("beginDate", date);
return axios({
method: 'post',
url: settings.baseURL + '/flightDestination/importFlightDestination',
headers: { 'Authorization': 'Bearer ' + getToken() },
data: formData
})
// return request({
// url: '/flightDestination/importFlightDestination',
// method: 'post',
// data: formData
// })
}
//URSA目的地批量导入
/**
* @param file * 文件
* @param beginDate * 时间
*/
export function importUrsaDestination(file, date) {
let formData = new FormData();
formData.append("file", file);
formData.append("beginDate", date);
return axios({
method: 'post',
url: settings.baseURL + '/ursaDestination/importUrsaDestination',
headers: { 'Authorization': 'Bearer ' + getToken() },
data: formData
})
// return request({
// url: '/ursaDestination/importUrsaDestination',
// method: 'post',
// data: formData
// })
}
//航班目的地查询
/**
* @param page * 页数
* @param size * 长度
* @param area 地区
* @param fltNo 航班号
*/
export function searchFlightDestination(data) {
return request({
url: '/flightDestination/searchFlightDestination',
method: 'post',
data: data
})
}
//URSA目的地查询
/**
* @param page * 页数
* @param size * 长度
* @param area 地区
* @param ursa ursa list
*/
export function searchUrsaDestination(data) {
return request({
url: '/ursaDestination/searchUrsaDestination',
method: 'post',
data: data
})
}
//preMde查询
/**
* @param flightNo 航班号
* @param fltDateStart 航班开始时间
* @param fltDateEnd 航班结束时间
* @param flightRoute 航线
* @param waybillNo 运单号
* @param ursa ursa
* @param typeName 申报类别
* @param siteName 站点
* @param regionArray 区域 list
* @param areaArray 地区 list
* @param serviceTypeArray 服务代码 list
* @param page * 页数
* @param size * 长度
*/
export function findDmPreMdeData(data) {
return request({
url: '/dmPreMde/findDmPreMdeData',
method: 'post',
data: data
})
}
//preMde页面查询条件
/**
*/
export function findDmPreMdeCondition(data) {
return request({
url: '/dmPreMde/findDmPreMdeCondition',
method: 'post',
data: data
})
}
//报表查询
/**
* @param ursas ursaslist
* @param serviceTypeArray serviceTypelist
* @param regionArray 区域
* @param areaArray 地区
* @param pickUpDate 取件日期
* @param dimensionName 维度名
*/
export function findPreMdeReport(data) {
return request({
url: '/preMdeReport/findPreMdeReport',
method: 'post',
data: data
})
}
\ No newline at end of file
import request from '@/utils/request'
//特殊规则查询
/**
* @param page * 页数
* @param size * 页长
* @param shipperAccount shipperAccount集合
*/
export function queryShipperAccountRule(data) {
return request({
url: 'shipperAccount/queryShipperAccountRule',
method: 'post',
data: data
})
}
//特殊规则新增
/**
* @param id ID (修改必填)
* @param shipperAccount * shipperAccount
* @param flightNo * 航班号
* @param flightRoute * 航线
* @param flightDate * 航班日期
* @param groupAllWeight 预配重量
* @param includeUrsa * ursa包含
* @param notIncludeUrsa ursa不包含
* @param classificationList 申报类型
* @param serviceCodeList servceCode
*/
export function saveOrUpdate(data) {
return request({
url: 'shipperAccount/saveOrUpdate',
method: 'post',
data: data
})
}
//特殊规则详情
/**
* @param id * ID
*/
export function queryShipperAccountRuleById(data) {
return request({
url: 'shipperAccount/queryShipperAccountRuleById',
method: 'post',
data: data
})
}
//特殊规则删除
/**
* @param accsFlightNo * 航班号
* @param shipperAccount * shipperAccount
* @param status * 状态 0 停用 1启用 2 已删除
*/
export function changeStatusById(data) {
return request({
url: '/shipperAccount/changeStatusById',
method: 'post',
data: data
})
}
//特殊规则获取释放仓位重量
/**
* @param id ID *
*/
export function getReleaseWeight(data) {
return request({
url: '/shipperAccount/getReleaseWeight',
method: 'post',
data: data
})
}
\ No newline at end of file
......@@ -38,4 +38,46 @@ export function findCargoDataChangeLog(data) {
url: '/cargo/findCargoDataChangeLog?accsId=' + data,
method: 'post',
})
}
// 功能模块查询
/**
*
*/
export function findModuleCondition() {
return request({
url: '/systemOperationLog/findModuleCondition',
method: 'post',
})
}
//操作日志查询
/**
* @param module 功能模块
* @param createTimeStart 操作时间开始
* @param createTimeEnd 操作时间结束
* @param page 页数
* @param size 页长
*/
export function getSystemOperationLogData(data) {
return request({
url: '/systemOperationLog/getSystemOperationLogData',
method: 'post',
data: data
})
}
//归档数据查询
/**
* @param createTimeStart 操作时间开始
* @param createTimeEnd 操作时间结束
* @param page 页数
* @param size 页长
*/
export function findArchiveCargoLog(data) {
return request({
url: '/archiveCargoLog/findArchiveCargoLog',
method: 'post',
data: data
})
}
\ No newline at end of file
......
......@@ -63,11 +63,11 @@ let ductLabels = {
"1": "是",
"2": "否",
},
// "whiteListSwitch": {
// "1": "开启",
// "0": "关闭",
// null: '关闭'
// }
"whiteListSwitch": {
"1": "开启",
"0": "关闭",
null: '关闭'
}
},
"flightRand": {//航班顺位设置
"status": {
......
......@@ -131,7 +131,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "申报类",
columnChineseName: "申报类",
columnName: "typeName",
columnWidth: "100",
ext1: "sorTable",
......@@ -521,6 +521,12 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "白名单是否自动配舱",
columnName: "whiteListSwitch",
columnWidth: "160",
status: 1
},
{
columnChineseName: "总重量",
columnName: "totalWeight",
columnWidth: "90",
......@@ -539,6 +545,18 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "预留特殊舱位重量",
columnName: "accountTotalWeight",
columnWidth: "130",
status: 1
},
{
columnChineseName: "特殊舱位已配重量",
columnName: "accountAllocatedWeight",
columnWidth: "130",
status: 1
},
{
columnChineseName: "已配体积(m³)",
columnName: "alloctedVolume",
columnWidth: "120",
......@@ -704,13 +722,20 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "申报类",
columnChineseName: "申报类",
columnName: "typeName",
columnWidth: "100",
ext1: "sorTable",
status: 1
},
{
columnChineseName: "ACCSpool",
columnName: "accsPool",
columnWidth: "120",
ext1: "sorTable",
status: 1
},
{
columnChineseName: "HandlingCode",
columnName: "handingCode",
columnWidth: "150",
......@@ -739,6 +764,13 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "体积",
columnName: "volume",
columnWidth: "100",
ext1: "sorTable",
status: 1
},
{
columnChineseName: "收件人国家代码",
columnName: "consigneeCountry",
columnWidth: "150",
......@@ -793,6 +825,13 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "终配航线",
columnName: "finalFlightRoute",
columnWidth: "140",
ext1: "sorTable",
status: 1
},
{
columnChineseName: "二配航班号",
columnName: "twoMatchFlightNo",
columnWidth: "120",
......@@ -807,6 +846,13 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "二配航线",
columnName: "twoFlightRoute",
columnWidth: "140",
ext1: "sorTable",
status: 1
},
{
columnChineseName: "预配航班号",
columnName: "preplanFlightNo",
columnWidth: "120",
......@@ -1220,7 +1266,8 @@ let tableHeaders = {
columnName: "remarksDetail",
columnWidth: "450",
align: 'left',
status: 1
status: 1,
ext1: 'slot',
},
{
columnChineseName: "处理状态级别",
......@@ -1493,91 +1540,726 @@ let tableHeaders = {
//特殊配舱规则
"superAllocation": [
{
columnChineseName: "ShipperAccount",
columnChineseName: "发件人账号",
columnName: "shipperAccount",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "原航班",
columnName: "accsFlightNo",
columnChineseName: "航班日期",
columnName: "flightDate",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "航班号",
columnName: "flightNo",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "航线",
columnName: "flightRoute",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "URSA",
columnName: "includeUrsa",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "申报类型",
columnName: "classification",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "服务类型",
columnName: "serviceCode",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "预留舱位",
columnName: "groupAllWeight",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "已配舱位",
columnName: "accountAllocatedWeight",
columnWidth: "",
ext1: "",
status: 1
},
],
//航班目的地
"flightToArea": [
{
columnChineseName: "生效开始时间",
columnName: "beginDate",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "生效结束时间",
columnName: "endDate",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "区域",
columnName: "region",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "地区",
columnName: "area",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "航班",
columnName: "fltNo",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "航线",
columnName: "route",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "操作人",
columnName: "createUserName",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "操作时间",
columnName: "createTime",
columnWidth: "",
ext1: "",
status: 1
},
],
//ursa目的地
"ursaToArea": [
{
columnChineseName: "生效开始时间",
columnName: "beginDate",
columnWidth: "150",
ext1: "",
status: 1
},
{
columnChineseName: "生效结束时间",
columnName: "endDate",
columnWidth: "150",
ext1: "",
status: 1
},
{
columnChineseName: "区域",
columnName: "region",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "地区",
columnName: "area",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "URSA",
columnName: "ursa",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "操作人",
columnName: "updateUserName",
columnName: "createUserName",
columnWidth: "100",
ext1: "",
status: 1
},
{
columnChineseName: "操作时间",
columnName: "updateTime",
columnName: "createTime",
columnWidth: "200",
ext1: "",
status: 1
},
],
"newSuperAllocation": [
//preMde查询
"preMdeSelect": [
{
columnChineseName: "航班日期",
columnName: "",
columnChineseName: "地区",
columnName: "area",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "航班号",
columnName: "",
columnChineseName: "区域",
columnName: "region",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "航线",
columnName: "",
columnChineseName: "口岸代码",
columnName: "portName",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "取件日期",
columnName: "pickUpDate",
columnWidth: "100",
ext1: "",
status: 1
},
{
columnChineseName: "取件扫描号",
columnName: "pickUpScanNo",
columnWidth: "100",
ext1: "",
status: 1
},
{
columnChineseName: "站点",
columnName: "siteName",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "运单号",
columnName: "waybillNo",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "总单号",
columnName: "totalWaybillNo",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "服务类型",
columnName: "serviceType",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "服务代码",
columnName: "serviceCode",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "URSA",
columnName: "",
columnName: "ursa",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "申报类型",
columnName: "",
columnName: "typeName",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "服务类型",
columnName: "",
columnChineseName: "HangdingCode",
columnName: "handingCode",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "subcategory",
columnName: "subCategory",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "件数",
columnName: "qty",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "预留仓位",
columnName: "",
columnChineseName: "实际重量",
columnName: "actualWeight",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "已配仓位",
columnName: "",
columnChineseName: "体积",
columnName: "volume",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "收件人国家代码",
columnName: "consigneeCountry",
columnWidth: "130",
ext1: "",
status: 1
},
{
columnChineseName: "品名描述",
columnName: "nameDescription",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "ACCS原航班号",
columnName: "flightNo",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "ACCS原航班日期",
columnName: "flightDate",
columnWidth: "130",
ext1: "",
status: 1
},
{
columnChineseName: "ACCS原航线",
columnName: "flightRoute",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "手否RDE手工录入",
columnName: "manualRde",
columnWidth: "130",
ext1: "",
status: 1
},
{
columnChineseName: "发件人帐号",
columnName: "shipperAccount",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "发件公司中文名称",
columnName: "shipperCompany",
columnWidth: "130",
ext1: "",
status: 1
},
{
columnChineseName: "始发地城市名称",
columnName: "originCity",
columnWidth: "130",
ext1: "",
status: 1
},
{
columnChineseName: "创建时间",
columnName: "createTime",
columnWidth: "",
ext1: "",
status: 1
},
],
"report": [
{
columnChineseName: "地区",
columnName: "area",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "区域",
columnName: "region",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "口岸代码",
columnName: "portName",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "取件日期",
columnName: "pickUpDate",
columnWidth: "100",
ext1: "",
status: 1
},
{
columnChineseName: "取件扫描号",
columnName: "pickUpScanNo",
columnWidth: "100",
ext1: "",
status: 1
},
{
columnChineseName: "站点",
columnName: "siteName",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "运单号",
columnName: "waybillNo",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "总单号",
columnName: "totalWaybillNo",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "服务类型",
columnName: "serviceType",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "服务代码",
columnName: "serviceCode",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "URSA",
columnName: "ursa",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "申报类型",
columnName: "typeName",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "HangdingCode",
columnName: "handingCode",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "subcategory",
columnName: "subCategory",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "件数",
columnName: "qty",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "实际重量",
columnName: "actualWeight",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "体积",
columnName: "volume",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "收件人国家代码",
columnName: "consigneeCountry",
columnWidth: "130",
ext1: "",
status: 1
},
{
columnChineseName: "品名描述",
columnName: "nameDescription",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "ACCS原航班号",
columnName: "flightNo",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "ACCS原航班日期",
columnName: "flightDate",
columnWidth: "130",
ext1: "",
status: 1
},
{
columnChineseName: "ACCS原航线",
columnName: "flightRoute",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "手否RDE手工录入",
columnName: "manualRde",
columnWidth: "130",
ext1: "",
status: 1
},
{
columnChineseName: "发件人帐号",
columnName: "shipperAccount",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "发件公司中文名称",
columnName: "shipperCompany",
columnWidth: "130",
ext1: "",
status: 1
},
{
columnChineseName: "始发地城市名称",
columnName: "originCity",
columnWidth: "130",
ext1: "",
status: 1
},
{
columnChineseName: "创建时间",
columnName: "createTime",
columnWidth: "",
ext1: "",
status: 1
},
],
'goodsLogStation': [
{
columnChineseName: "上传文件名",
columnName: "uploadFileName",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "货站名称",
columnName: "ext",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "上传时间",
columnName: "uploadTime",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "执行时间",
columnName: "executionTime",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "完成时间",
columnName: "completeTime",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "执行数量",
columnName: "executionCount",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "执行结果",
columnName: "executionResult",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "执行步骤",
columnName: "status",
columnWidth: "",
ext1: "",
status: 1
},
],
//操作日志
"operationLog": [
{
columnChineseName: "功能模块",
columnName: "module",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "操作时间",
columnName: "createTime",
columnWidth: "150",
ext1: "",
status: 1
},
{
columnChineseName: "操作人",
columnName: "userName",
columnWidth: "120",
ext1: "",
status: 1
},
{
columnChineseName: "操作描述",
columnName: "describe",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "操作结果",
columnName: "result",
columnWidth: "",
ext1: "slot",
status: 1
},
{
columnChineseName: "备注",
columnName: "remark",
columnWidth: "100",
ext1: "slot",
status: 1
},
{
columnChineseName: "操作参数",
columnName: "requestParameters",
columnWidth: "100",
ext1: "slot",
status: 1
},
],
//历史数据文件查询
"archiveData": [
{
columnChineseName: "文件名",
columnName: "packageName",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "创建时间",
columnName: "createTime",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "创建人",
columnName: "userName",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "处理状态",
columnName: "status",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "处理时间",
columnName: "updateTime",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "查询条件",
columnName: "queryParameter",
columnWidth: "",
ext1: "slot",
status: 1
},
{
columnChineseName: "下载地址",
columnName: "downloadPath",
columnWidth: "",
ext1: "slot",
status: 1
},
]
}
......
......@@ -68,6 +68,15 @@ Vue.component('HeaderSetting', HeaderSetting)
Vue.component('Drag', Drag)
Vue.use(permission)
Vue.directive('focus', {
inserted: function (el) {
// el表示指令所绑定的元素
el.querySelector('input').focus()
}
});
/**
* If you don't want to use mock-server
* you want to use MockJs for mock api
......
......@@ -62,16 +62,15 @@ export const constantRoutes = [
{
path: 'index',
component: (resolve) => require(['@/views/index'], resolve),
name: '首页',
name: 'Index',
meta: { title: '首页', icon: 'home', noCache: true, affix: true }
}
},
]
},
{
path: '/',
path: '',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: '/info/:handle/:id|:routeStatus|:fltNo|:route|:fltDate|:status',
......@@ -89,15 +88,21 @@ export const constantRoutes = [
path: '/upDateResult->:from',
component: (resolve) => require(['@/views/preMdeConfig/upDateResult'], resolve),
name: 'UpDateResult',
meta: { title: '导入信息', icon: 'user' }
meta: { title: '错误信息提示', icon: 'user' }
},
{
path: '/goodsLog',
component: (resolve) => require(['@/views/basicInformation/goodsStation/goodsUploadLog'], resolve),
name: 'GoodsUploadLog',
meta: { title: '导入日志', icon: 'user' }
},
]
}
},
]
export default new Router({
mode: 'history', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes,
base: settings.routerBase
})
\ No newline at end of file
base: settings.routerBase,
})
......
......@@ -58,5 +58,5 @@ module.exports = {
/**
* 版本号
*/
version: 'version:1.7.0'
version: 'version:1.9.0'
}
......
......@@ -81,3 +81,9 @@ export function isArray(arg) {
}
return Array.isArray(arg)
}
// 验证手机号码
export function validPhoneNumber(value) {
const reg = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/;
return reg.test(value)
}
\ No newline at end of file
......
......@@ -8,15 +8,16 @@ const mimeMap = {
}
const baseUrl = settings.downLoadURL //uat服务器
export function downLoadZip(str, filename) {
export function downLoadZip(str, data, filename) {
var url = baseUrl + str
axios({
method: 'get',
method: 'post',
url: url,
data: data,
responseType: 'blob',
headers: { 'Authorization': decodeURIComponent(getToken()) }
}).then(res => {
resolveBlob(res, mimeMap.zip)
resolveBlob(res, mimeMap.zip, filename)
})
}
......@@ -52,7 +53,6 @@ export function downLoadXlsx(str, data, fileName) {
timeout: 500000,
responseType: 'blob',
headers: { 'Authorization': decodeURIComponent(getToken()) }
// headers: { 'Authorization': decodeURIComponent(getToken()) }
//uat环境token需要做url解码处理
}).then(res => {
if (res.status === 200) {
......@@ -107,3 +107,4 @@ export function cargoTableXlsxPre(val) {
aLink.click()
document.body.removeChild(aLink);
}
......
......@@ -142,10 +142,10 @@
</el-col>
<el-col :span="24">
<el-form-item label="Handling Code">
<el-empty description="暂无数据" v-if="
<!-- <el-empty description="暂无数据" v-if="
!selectData.HandlingCode || selectData.HandlingCode.length == 0
"></el-empty>
<el-checkbox-group v-model="handingCodes" v-else>
"></el-empty> -->
<el-checkbox-group v-model="handingCodes">
<el-row>
<el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id">
<el-checkbox :label="item.chineseName" v-model="item.chineseName">
......@@ -158,10 +158,10 @@
</el-col>
<el-col :span="24">
<el-form-item label="Sub Category">
<el-empty description="暂无数据" v-if="
<!-- <el-empty description="暂无数据" v-if="
!selectData.SubCategory || selectData.SubCategory.length == 0
"></el-empty>
<el-checkbox-group v-model="subCategorys" v-else>
"></el-empty> -->
<el-checkbox-group v-model="subCategorys">
<el-row>
<el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id">
<el-checkbox :label="item.chineseName" v-model="item.chineseName">
......@@ -175,14 +175,14 @@
</el-row>
<div style="margin: 0 0 0 10px">
<el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button>
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(0)"
:loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download"
v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(1)"
:loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download"
v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']"
......
......@@ -8,7 +8,7 @@
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column v-for="(item, index) in cargoHeader" header-align="center" align="center" :prop="item.value"
:label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter">
:label="item.name" :key="index" :width="item.width" :show-overflow-tooltip="true" :formatter="formatter">
</el-table-column>
</el-table>
<el-form ref="form" class="form-header" label-position="right" label-width="auto"
......@@ -65,24 +65,25 @@ export default {
ids: [],
fltNo: undefined,
fltDate: undefined,
route: undefined,
route: null,
overweight: false,
notInWhite: false,
},
cargoHeader: [
{ name: "口岸代码", value: "portName" },
{ name: "运单号", value: "waybillNo" },
{ name: "货物状态", value: "statusName" },
{ name: "站点", value: "siteName" },
{ name: "申报类型", value: "typeName" },
{ name: "URSA", value: "ursa" },
{ name: "实际重量", value: "actualWeight" },
{ name: "件数", value: "qty" },
{ name: "ACCS原航班号", value: "fltNoAccs" },
{ name: "ACCS原航班日期", value: "fltDateAccs" },
{ name: "品名描述", value: "nameDescription" },
{ name: "是否自动", value: "cargoRulesStatus" },
{ name: "创建人", value: "createUserName" },
{ name: "创建时间", value: "createTime" },
{ name: "口岸代码", value: "portName", width: "" },
{ name: "运单号", value: "waybillNo", width: "" },
{ name: "货物状态", value: "statusName", width: "" },
{ name: "站点", value: "siteName", width: "" },
{ name: "申报类型", value: "typeName", width: "" },
{ name: "URSA", value: "ursa", width: "" },
{ name: "实际重量", value: "actualWeight", width: "" },
{ name: "件数", value: "qty", width: "" },
{ name: "ACCS原航班号", value: "fltNoAccs", width: "120" },
{ name: "ACCS原航班日期", value: "fltDateAccs", width: "130" },
{ name: "品名描述", value: "nameDescription", width: "" },
{ name: "是否自动", value: "cargoRulesStatus", width: "" },
{ name: "创建人", value: "createUserName", width: "" },
{ name: "创建时间", value: "createTime", width: "" },
],
routeList: [],
rules: {
......@@ -120,68 +121,89 @@ export default {
route: undefined,
flightId: undefined,
overweight: false,
notInWhite: false,
};
this.routeList = []
},
//确定配舱
submit() {
this.loading = true;
let arr = [];
this.tableData.forEach((item) => {
arr.push(item.id);
});
this.formData.ids = arr;
this.routeList.forEach(item => {
if (item.route === this.formData.route) {
this.formData.flightId = item.id
this.formData.overweight = false
this.formData.notInWhite = false
this.$refs.form.validate(val => {
if (val) {
this.loading = true;
let arr = [];
this.tableData.forEach((item) => {
arr.push(item.id);
});
this.formData.ids = arr;
this.routeList.forEach(item => {
if (item.route === this.formData.route) {
this.formData.flightId = item.id
}
})
if (this.formData.fltNo && this.formData.fltDate) {
allocationFlight(this.formData).then((res) => {
//code 200 配舱成功 202重量已满需要确认 203货物不在白名单需要确认 其余code直接输出msg 接口先判断重量后判断白名单 overweight/notInWhite初始默认false
if (res.code === 200) {
this.loading = false;
this.msgSuccess('货物配舱成功')
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
} else if (res.code === 202) {
//超重航班确实是否继续配舱
this.reallocationFlight(res.msg, 'overweight')
} else if (res.code === 203) {
//不存在白名单中确实是否继续配舱
this.reallocationFlight(res.msg, 'notInWhite')
} else {
this.loading = false;
this.msgWarning(res.msg)
}
}).catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.msgWarning('航班号或航班日期不能为空')
}
}
})
if (this.formData.fltNo && this.formData.fltDate) {
},
//手动配舱超重或白名单不存在提示
reallocationFlight(msg, status) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
if (status == 'overweight') {
this.formData.overweight = true; //确定继续overweight变为true再次请求接口
} else {
this.formData.notInWhite = true; //确定继续notInWhite变为true再次请求接口
}
allocationFlight(this.formData).then((res) => {
this.loading = false;
//code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg
if (res.code === 200) {
this.loading = false
this.msgSuccess('货物配舱成功')
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
} else if (res.code === 202) {
this.$confirm(res.msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.formData.overweight = true; //确定继续overweight变为true再次请求接口
allocationFlight(this.formData).then((res) => {
if (res.code === 200) {
this.msgSuccess('货物配舱成功')
} else {
this.msgWarning(res.msg)
}
});
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
})
.catch(() => {
//取消 取消当前配舱
this.msgSuccess('配舱已取消')
this.cleaerForm();
this.$emit("dialogBeforeClose", {
close: false,
reload: true,
});
});
} else if (res.code === 203) {
this.reallocationFlight(res.msg, 'notInWhite')
} else {
this.loading = false;
this.msgWarning(res.msg)
this.loading = false
}
}).catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.msgWarning('航班号或航班日期不能为空')
}
}).catch(() => {
this.msgSuccess('配舱已取消')
this.loading = false
this.cleaerForm();
this.$emit("dialogBeforeClose", {
close: false,
reload: true,
});
})
},
dialogBeforeClose() {
this.cleaerForm();
......@@ -201,6 +223,7 @@ export default {
//日期选择变化
dateChange(val) {
this.routeList = []
this.formData.route = null
if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') {
if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') {
let obj = {
......
......@@ -47,6 +47,8 @@ export default {
},
watch: {
open(val) {
this.routeList = []
this.submitData = []
if (val) {
this.fltNo = this.fltData.fltNo
this.fltDate = this.fltData.fltDate
......
......@@ -11,7 +11,7 @@
<el-row class="mb20">
<el-col :span="6">
<el-form-item label="航班号" prop="fltNo">
<el-input v-model.tirm="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled">
<el-input v-model.trim="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled">
</el-input>
</el-form-item>
</el-col>
......@@ -24,7 +24,7 @@
</el-col>
<el-col :span="6" v-if="infoForm.route != null && infoForm.route != ' ' && infoForm.route != ''">
<el-form-item label="航线">
<el-input v-model.tirm="infoForm.route" @change="getRoutes" disabled>
<el-input v-model.trim="infoForm.route" @change="getRoutes" disabled>
</el-input>
</el-form-item>
</el-col>
......@@ -618,7 +618,7 @@ export default {
this.isEmpty = true
}
} else {
this.msgWarning("查询到数据!")
this.msgWarning("查询到数据!")
this.isEmpty = true
}
}).catch(err => {
......@@ -639,18 +639,43 @@ export default {
if (this.$route.params.handle != 'add') {
findDestinationFltRuleByFlightNo(obj).then(res => {
if (res.code === 200) {
this.routeList = res.data.routeList
if (res.data.list.length > 0) {
//请求到数据
if (this.infoForm.route != null && this.infoForm.route != '' && this.infoForm.route != ' ') {
//航线不为空,对应到这条航线下的这条维度(直接处理插入数据)
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
//如果是从航班维护界面跳转且航班类型为White Tail则直接显示当前航线维度
res.data.list.forEach(item => {
this.infoForm.list.push(this.dataHandle(item))
})
if (res.data.routeList.length <= 0) {
this.msgWarning('未查询到航线信息!')
} else {
this.routeList = res.data.routeList
if (res.data.list.length > 0) {
//请求到数据
if (this.infoForm.route != null && this.infoForm.route != '' && this.infoForm.route != ' ') {
//航线不为空,对应到这条航线下的这条维度(直接处理插入数据)
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
//如果是从航班维护界面跳转且航班类型为White Tail则直接显示当前航线维度
res.data.list.forEach(item => {
this.infoForm.list.push(this.dataHandle(item))
})
} else {
//航班类型为Purple Tail则显示所有航线维度
this.routeList.forEach(route => {
let routeStatus = 1
res.data.list.forEach(item => {
if (route.route === item.flightRoute) {
//航线对应插入数据
routeStatus = 2
this.infoForm.list.push(this.dataHandle(item))
}
})
if (routeStatus == 1) {
//否则插入占位基础数据
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
}
} else {
//航班类型为Purple Tail则显示所有航线维度
//航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
this.routeList.forEach(route => {
let routeStatus = 1
res.data.list.forEach(item => {
......@@ -672,154 +697,133 @@ export default {
})
}
} else {
//航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
this.routeList.forEach(route => {
let routeStatus = 1
res.data.list.forEach(item => {
if (route.route === item.flightRoute) {
//航线对应插入数据
routeStatus = 2
this.infoForm.list.push(this.dataHandle(item))
}
})
if (routeStatus == 1) {
//否则插入占位基础数据
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
}
} else {
//未请求到数据
if (this.infoForm.route != null && this.infoForm.route != '' && this.infoForm.route != ' ') {
//航线不为空,获取该航线下无日期通用维度设置
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
status: this.$route.params.status
}).then(response => {
if (response.data.list.length > 0) {
//查询到通用维度,去除id status,航线赋值,航线优先级赋值
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
//航班类型White Tail只展示当前航线维度
response.data.list.forEach(item => {
item.id = undefined
item.status = undefined
item.flightRoute = this.infoForm.route
//未请求到数据
if (this.infoForm.route != null && this.infoForm.route != '' && this.infoForm.route != ' ') {
//航线不为空,获取该航线下无日期通用维度设置
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
status: this.$route.params.status
}).then(response => {
if (response.data.list.length > 0) {
//查询到通用维度,去除id status,航线赋值,航线优先级赋值
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
//航班类型White Tail只展示当前航线维度
response.data.list.forEach(item => {
item.id = undefined
item.status = undefined
item.flightRoute = this.infoForm.route
this.routeList.forEach(route => {
if (route.route === this.infoForm.route) {
item.routePriority = route.routePriority
}
})
this.infoForm.list.push(this.dataHandle(item))
})
} else {
//航班类型Purple Tail展示全部航线维度
let routesStatus = 1
this.routeList.forEach(route => {
if (route.route === this.infoForm.route) {
item.routePriority = route.routePriority
response.data.list.forEach(item => {
if (route.route === item.flightRoute) {
routesStatus = 2
item.id = undefined
item.status = undefined
item.flightRoute = this.infoForm.route
item.routePriority = route.routePriority
this.infoForm.list.push(this.dataHandle(item))
}
})
if (routesStatus == 1) {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
this.infoForm.list.push(this.dataHandle(item))
})
}
} else {
//航班类型Purple Tail展示全部航线维度
let routesStatus = 1
this.routeList.forEach(route => {
response.data.list.forEach(item => {
if (route.route === item.flightRoute) {
routesStatus = 2
item.id = undefined
item.status = undefined
item.flightRoute = this.infoForm.route
item.routePriority = route.routePriority
this.infoForm.list.push(this.dataHandle(item))
//未查询到,插入占位基础数据使用户新建
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
//航班类型White Tail只展示当前航线维度
this.routeList.forEach((item) => {
if (item.route === this.infoForm.route) {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: this.infoForm.route,
routePriority: item.routePriority,
})
}
})
if (routesStatus == 1) {
} else {
//航班类型Purple Tail展示全部航线维度
// this.isEmpty = true
this.routeList.forEach((route) => {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
}
} else {
//未查询到,插入占位基础数据使用户新建
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
//航班类型White Tail只展示当前航线维度
this.routeList.forEach((item) => {
if (item.route === this.infoForm.route) {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: this.infoForm.route,
routePriority: item.routePriority,
})
}
})
} else {
//航班类型Purple Tail展示全部航线维度
// this.isEmpty = true
this.routeList.forEach((route) => {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
})
}
}
}
}).catch(err => {
this.isEmpty = true
console.log(err)
})
} else {
//航线为空,提示未找到维度数据
if (this.routeSatus == 'flightInformationMaintenancePurple Tail' || this.routeSatus == 'FlightRandConfig') {
if (this.routeSatus == 'FlightRandConfig') {
this.infoForm.fltDate = ''
}
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
status: this.$route.params.status
}).then(response => {
if (response.data.list.length > 0) {
this.routeList.forEach(route => {
let routeStatus = 1
response.data.list.forEach(item => {
if (item.flightRoute == route.route) {
routeStatus = 2
item.id = undefined
item.status = undefined
item.routePriority = route.routePriority
this.infoForm.list.push(
this.dataHandle(item)
)
}).catch(err => {
this.isEmpty = true
console.log(err)
})
} else {
//航线为空,提示未找到维度数据
if (this.routeSatus == 'flightInformationMaintenancePurple Tail' || this.routeSatus == 'FlightRandConfig') {
if (this.routeSatus == 'FlightRandConfig') {
this.infoForm.fltDate = ''
}
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
status: this.$route.params.status
}).then(response => {
if (response.data.list.length > 0) {
this.routeList.forEach(route => {
let routeStatus = 1
response.data.list.forEach(item => {
if (item.flightRoute == route.route) {
routeStatus = 2
item.id = undefined
item.status = undefined
item.routePriority = route.routePriority
this.infoForm.list.push(
this.dataHandle(item)
)
}
})
if (routeStatus == 1) {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
if (routeStatus == 1) {
} else {
this.routeList.forEach((route) => {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
} else {
this.routeList.forEach((route) => {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
})
}
}).catch(err => {
this.isEmpty = true
console.log(err)
})
}
}).catch(err => {
this.isEmpty = true
console.log(err)
})
}
}
}
}
......@@ -851,6 +855,7 @@ export default {
})
})
} else {
this.msgWarning('未查询到航线信息!')
this.routeList = []
this.infoForm.list = []
}
......@@ -1191,4 +1196,27 @@ export default {
text-align: center;
}
}
</style>
\ No newline at end of file
</style>
.fontWeight {
font-size: 16px;
font-weight: 700;
text-indent: 2em;
}
.rowPadding {
padding: 10px 50px;
font-size: 12px;
}
.routeTip {
margin-left: 35px;
margin-bottom: 20px;
font-size: 16px;
color: #ff4949;
}
.numberInput {
input {
text-align: center;
}
}
......
......@@ -67,7 +67,8 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">查看配置维度
@click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">
查看配置维度
</el-button>
</template>
</el-table-column>
......@@ -268,7 +269,7 @@ export default {
},
methods: {
//跳转到查看,修改页面
handleClick(fltNo, handle, fltDate, route) {
handleClick(fltNo, handle, fltDate, route, status) {
this.openFlightDate = false;
let obj = {
id: ' ',
......@@ -277,8 +278,8 @@ export default {
fltDate: fltDate != null ? fltDate : ' ',
route: route,
routeStatus: 'FlightRandConfig',
status: ' ',
createStatus: 1
status: status,
createStatus: 1,
}
this.$router.push({
name: "FlightAllocConfigInfo",
......
......@@ -72,7 +72,6 @@ export default {
this.$message.error("下载失败");
}
});
},
uploadExcel(option) {
//上传excel
......
......@@ -60,6 +60,12 @@
@click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启
</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭
</el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" @click="handleDelete"
v-hasPermi="['base:flightInfo:delete']">删除
</el-button>
......@@ -111,7 +117,7 @@
<el-form-item label="航班种类" prop="kindId">
<el-select class="wid80" v-model="form.kindId" :disabled="formdisabled.kindId" placeholder="请选择航班种类"
@change="kindChange">
<el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName"
<el-option v-for="item in selectOption.flightKindlist" :key="item.id" :label="item.chineseName"
:value="item.id">
</el-option>
</el-select>
......@@ -132,7 +138,7 @@
<el-select ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route"
placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :multiple='routeMultiple'
:key="routeMultiple">
<el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
<el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
</el-option>
</el-select>
</el-form-item>
......@@ -140,7 +146,7 @@
<el-col :span="12">
<el-form-item label="航班类型" prop="typeId">
<el-select class="wid80" v-model="form.typeId" placeholder="请选择航班类型">
<el-option v-for="item in selectOption.flightTypelist" :key="item.id" :label="item.chineseName"
<el-option v-for="item in selectOption.flightTypelist" :key="item.id" :label="item.chineseName"
:value="item.id">
</el-option>
</el-select>
......@@ -151,7 +157,7 @@
<el-col :span="12">
<el-form-item label="航班状态" prop="statusId">
<el-select class="wid80" :disabled="true" v-model="form.statusId" placeholder="请选择航班状态">
<el-option v-for="item in selectOption.flightStatuslist" :key="item.id" :label="item.chineseName"
<el-option v-for="item in selectOption.flightStatuslist" :key="item.id" :label="item.chineseName"
:value="item.id">
</el-option>
</el-select>
......@@ -195,20 +201,20 @@
<el-col :span="12">
<el-form-item label="高价百分比" prop="highPriceWeightPercent">
<el-input-number class="wid80" :disabled="ishighPriceWeightPercent" @change="LowHighAvailable"
placeholder="请输入高价百分比" v-model="form.highPriceWeightPercent"></el-input-number>
placeholder="开启高地价后可修改" v-model="form.highPriceWeightPercent"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="低价百分比" prop="lowPriceWeightPercent">
<el-input-number class="wid80" :disabled="true" placeholder="请输入低价百分比"
<el-input-number class="wid80" :disabled="true" placeholder="开启高地价后计算"
v-model="form.lowPriceWeightPercent"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高价可配重量" prop="highAvailableWeight">
<el-input-number class="wid80" :disabled="true" placeholder="请输入高价可配重量" v-model="form.highAvailableWeight"
<el-input-number class="wid80" :disabled="true" placeholder="开启高地价后计算" v-model="form.highAvailableWeight"
:precision="2"></el-input-number>
</el-form-item>
</el-col>
......@@ -216,7 +222,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="低价可配重量" prop="lowAvailableWeight">
<el-input-number class="wid80" :disabled="true" placeholder="请输入低价可配重量" v-model="form.lowAvailableWeight"
<el-input-number class="wid80" :disabled="true" placeholder="开启高地价后计算" v-model="form.lowAvailableWeight"
:precision="2"></el-input-number>
</el-form-item>
</el-col>
......@@ -242,12 +248,12 @@
</el-col>
<el-col :span="12">
<el-form-item label="特殊规则预留总重量" prop="accountTotalWeight">
<el-input class="wid80" v-model="form.accountTotalWeight" disabled />
<el-input class="wid80" v-model="form.accountTotalWeight" disabled placeholder="配置特殊规则后计算" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight">
<el-input class="wid80" v-model="form.accountAllocatedWeight" disabled />
<el-input class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" />
</el-form-item>
</el-col>
</el-row>
......@@ -278,6 +284,7 @@ import {
findFltCommonConf,
updateStatusBatch,
updateAutoPushBatch,
updateWhiteListSwitchBatch
} from "@/api/findAllFltData";
import { getpreAudit } from '@/api/system/preReview.js'
import { queryRouteByFltNo } from '@/api/destinationFlight.js'
......@@ -491,6 +498,8 @@ export default {
//输入航班号后
blurfltNo() {
this.routeList = []
this.form.accountTotalWeight = 0
this.form.accountAllocatedWeight = 0
if (
this.form.fltNo != null &&
this.form.fltNo != undefined &&
......@@ -677,7 +686,7 @@ export default {
this.$set(
this.form,
"highAvailableWeight",
(Weight - this.form.alloctedWeight) *
(Weight - this.form.accountTotalWeight - (this.form.alloctedWeight - this.form.accountAllocatedWeight)) *
(this.form.highPriceWeightPercent / 100)
);
this.$set(
......@@ -713,7 +722,7 @@ export default {
this.$set(
this.form,
"lowAvailableWeight",
Weight - this.form.alloctedWeight - this.form.highAvailableWeight
(Weight - this.form.accountTotalWeight - (this.form.alloctedWeight - this.form.accountAllocatedWeight)) - this.form.highAvailableWeight
);
//this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight;
} else if (
......@@ -793,7 +802,7 @@ export default {
route: val.flightKindName != 'Purple Tail' ? val.route : ' ',
routeStatus: 'flightInformationMaintenance' + val.flightKindName,
status: ' ',
createStatus: 1
createStatus: 1,
}
this.$router.push({
name: 'FlightAllocConfigInfo',
......@@ -891,6 +900,7 @@ export default {
//取消按钮
cancel() {
this.routeList = []
this.ishighPriceWeightPercent = true
this.routeMultiple = false
this.open = false;
this.findAllFltData();
......@@ -974,6 +984,26 @@ export default {
this.findAllFltData();
}
},
//白名单配舱开关
whiteListSwitchStatus(val) {
let obj = {
updateIds: []
}
obj.status = val
this.ids.forEach(item => {
obj.updateIds.push(item.id)
})
updateWhiteListSwitchBatch(obj).then(res => {
if (res.code === 200) {
this.msgSuccess(res.msg)
this.findAllFltData()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//航线修改
routeChange(val) {
this.$forceUpdate()
......
<template>
<div>
<el-dialog :title="openStatus == 'add'?'新 增':'导出Excel'" :visible.sync="open" width="25%"
:close-on-click-modal="false" :show-close="false" append-to-body center>
<el-dialog :title="openStatus == 'add' ? '新 增' : openStatus == 'downloadExcel' ? '导出Excel' : '导入Excel'"
:visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" append-to-body center>
<el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
<div v-if="openStatus == 'add'">
......@@ -15,7 +15,7 @@
</el-input>
</el-form-item>
</div>
<div v-else>
<div v-else-if="openStatus == 'downloadExcel'">
<el-form-item label="货站名称" prop="goodsStation">
<el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
:loading="goodsStationLoading" placeholder="不限">
......@@ -25,18 +25,36 @@
</el-select>
</el-form-item>
</div>
<div v-else>
<el-form-item label="货站名称" prop="uploadGoodsStation">
<el-input type="text" v-model="formData.uploadGoodsStation" maxlength="25"
placeholder="请输入货站名称">
</el-input>
</el-form-item>
<el-form-item prop="file" label-width="0px">
<el-upload ref="upload" action="/goods/uploadGoodsExcel" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" accept=".xlsx"
class="upload-demo">
<el-button type="primary" icon="el-icon-upload2" size="small">选择文件</el-button>
</el-upload>
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if='openStatus == "add"' type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button v-else type="primary" :loading="downloading" @click="download">导出Excel</el-button>
<el-button @click="close">取 消</el-button>
<el-button v-if='openStatus == "add"' type="primary" size="small" :loading="loading" @click="submit">确 定
</el-button>
<el-button v-else-if="openStatus == 'downloadExcel'" type="primary" size="small" :loading="downloading"
@click="download">导出Excel</el-button>
<el-button v-else type="primary" :loading="loading" size="small" @click="upload">导入Excel
</el-button>
<el-button style="margin-top:10px" size="small" @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { batchAddGoods, findStationName } from "@/api/goodsStation"
import { batchAddGoods, findStationName, uploadGoodsExcel } from "@/api/goodsStation"
import { downLoadXlsx } from "@/utils/zipdownload";
export default {
......@@ -55,7 +73,9 @@ export default {
return {
formData: {
goodsStation: null,
goodsList: ''
uploadGoodsStation: null,
goodsList: '',
file: null
},
goodsStationList: [],
rules: {
......@@ -73,7 +93,23 @@ export default {
trigger: "blur",
},
],
uploadGoodsStation: [
{
required: true,
message: "货站名称不能为空",
trigger: "change",
},
],
// file: [
// {
// required: true,
// message: "文件不能为空",
// trigger: "change",
// },
// ]
},
fileList: [],
errorData: [],
goodsStationLoading: false,
downloading: false,
loading: false,
......@@ -134,6 +170,51 @@ export default {
}
})
},
//选择文件
uploadExcel(option) {
this.formData.file = option.file
},
//导入Excel
upload() {
this.loading = true;
if (this.formData.file != null && this.formData.file != '') {
this.$refs['addForm'].validate(val => {
if (val) {
const file = this.formData.file;
let goodsStation = this.formData.uploadGoodsStation
uploadGoodsExcel(file, goodsStation).then((res) => {
this.loading = false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
this.$message.warning(res.msg);
if (res.data) {
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
}
} else {
this.$message.warning(res.msg);
}
} else {
this.$message.success(res.msg);
}
setTimeout(() => {
this.close()
}, 1000);
});
} else {
this.loading = false;
}
})
} else {
this.loading = false;
this.msgWarning('请选择文件后再导入!')
}
},
//导出Excel
download() {
this.$refs['addForm'].validate(val => {
......@@ -152,12 +233,31 @@ export default {
})
},
handleRemove(file, fileList) {
//清掉上传的文件
this.errorData = [];
this.fileList = [];
this.formData.file = null
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.formData.file = file
this.uploadExcel(file);
},
//取消
close() {
this.formData = {
goodsStation: null,
goodsList: null
}
if (this.openStatus == 'uploadExcel') {
this.$refs['upload'].clearFiles()
}
this.$refs["addForm"].clearValidate();
this.$emit('close')
}
......@@ -168,5 +268,15 @@ export default {
</script>
<style lang="scss" scoped>
.upload-demo {
.el-upload-list__item:first-child {
margin-top: 5px !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
......
<template>
<div style="padding:10px">
<div style="margin-bottom:10px">
<el-button type="primary" icon="el-icon-refresh" size="small" :loading="loading" @click="selectLog(1)">查 询
</el-button>
</div>
<Tables ref="goodsLogStation" ductName="goodsLogStation" :data="logTabelData" :headerData="logTabelHeader"
:selection="false" :order="true" :selectFixed="false" :loading="loading" :totalCount="logCount"
:limitSize="logData.size" :page="logData.page" layout="total,prev, pager, next, jumper, ->"
:pageSizes="[100]" :height="tableHeight" @currentChange="logCurrentChange">
</Tables>
</div>
</template>
<script>
import { userImportLog } from "@/api/goodsStation"
export default {
name: 'GoodsUploadLog',
data() {
return {
logData: {
page: 1,
size: 50
},
logTabelData: [],
logTabelHeader: this.tableHeaders['goodsLogStation'],
logCount: 0,
tableHeight: null,
loading: false,
}
},
created() {
this.selectLog()
},
watch: {
$route(to, from) {
if (to.name == 'GoodsUploadLog') {
this.selectLog()
}
}
},
methods: {
//日志查询
selectLog(val) {
if (val === 1) {
this.logData.page = 1
}
this.loading = true
userImportLog(this.logData).then(res => {
this.loading = false
if (res.code === 200) {
this.logCount = res.data.total
this.logTabelData = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
//日志分页
logCurrentChange(val) {
this.logData.page = val.page
this.selectLog()
},
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -27,18 +27,17 @@
style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel">
删 除
</el-button>
<el-button type="primary" icon="el-icon-download" size="small" style="margin-right:10px"
<el-button type="primary" icon="el-icon-download" size="small" style="margin-left:10px"
@click="downloadTempleate">下载模板
</el-button>
<el-button icon="el-icon-download" type="primary" size="small" style="margin-right:10px"
<el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
@click="downloadExcel">
导出Excel
</el-button>
<el-upload action="/goods/importGoods" name="file" :http-request="uploadExcel" :on-remove="handleRemove"
:limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" class="upload-demo"
v-hasPermi="['base:goodsStation:add']">
<el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button>
</el-upload>
<el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
v-hasPermi="['base:goodsStation:add']">导入Excel</el-button>
<el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
</el-button>
</div>
<Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
:order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
......@@ -60,7 +59,7 @@
<script>
import { downLoadTemplate } from "@/api/flightInfoImport";
import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation"
import { batchDeleteGoods, searchGoods } from "@/api/goodsStation"
import Dialog from './dialog.vue'
export default {
......@@ -189,29 +188,9 @@ export default {
this.selection()
},
//上传excel
uploadExcel(option) {
const file = option.file;
this.loading = true;
importGoods(file, '').then((res) => {
this.loading = false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
this.$message.warning(res.msg);
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
} else {
this.$message.warning(res.msg);
}
} else {
this.$message.success(res.msg);
this.selection(1)
}
});
uploadExcel() {
this.openStatus = 'uploadExcel'
this.open = true
},
//下载模板
downloadTempleate() {
......@@ -245,6 +224,9 @@ export default {
this.fileList.push(file);
this.uploadExcel(file);
},
selectLog() {
this.$router.push({ name: 'GoodsUploadLog' })
},
close() {
this.open = false
this.openStatus = ''
......@@ -260,16 +242,5 @@ export default {
</script>
<style lang="scss" scoped>
.upload-demo {
display: flex;
.el-upload-list__item:first-child {
margin-top: 5px !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
......
<template>
<div>
<el-dialog title="新 增" :visible.sync="dialogVisible" width="50%" top="1vh" :close-on-click-modal="false"
:show-close="false" append-to-body center>
<el-table ref="filterTable" class="mt20" :data="resultData" size="small" border>
<el-table-column label="行号" prop="line" width="50" align="center">
</el-table-column>
<el-table-column label="错误信息" prop="errorMessage" width="200">
<template slot-scope="scope">
<div v-for="(m, key) in scope.row.errorMessage" :key="key">
{{ m }}
</div>
</template>
</el-table-column>
<el-table-column v-if="resultData.length == 0"></el-table-column>
<el-table-column v-for="(value, key) in this.resultData[0]" :key="key"
v-if="key != 'errorMessage' && key != 'line'" header-align="center" align="center" :label="key"
:prop="key"></el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'UpDateResult',
props: {
dialogVisible: {
type: Boolean,
default: false
},
resultData: {
type: Array,
default: null
}
},
data() {
return {
}
},
wactch: {
dialogVisible(val) {
if (val) {
}
}
},
methods: {
close() {
this.$emit('close')
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -8,9 +8,9 @@
<el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称">
</el-input>
</el-form-item>
<el-form-item label="航班" prop="flightList">
<el-form-item label="航班" prop="flightList">
<el-input type="textarea" v-model="flightList" rows="4" maxlength="125"
placeholder="请输入航班,多个用“;”隔开">
placeholder="请输入航班,多个用“;”隔开">
</el-input>
</el-form-item>
</el-form>
......
......@@ -6,12 +6,12 @@
<el-row>
<el-col :span="4">
<el-form-item label="运单号">
<span>{{ data.waybillNo }}</span>
<span>{{ data.waybillNo }}</span>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="ACCSID">
<span>{{ data.accsId }}</span>
<span>{{ data.accsId }}</span>
</el-form-item>
</el-col>
</el-row>
......@@ -93,5 +93,4 @@ export default {
</script>
<style scoped>
</style>
\ No newline at end of file
......
......@@ -165,6 +165,14 @@
}}</el-button>
<el-button type="primary" size="small" icon="el-icon-s-flag" :disabled="selectTable.length == 0"
v-hasPermi="['base:cargo:release']" @click="release">释放舱位</el-button>
<el-button type="primary" size="small" icon="el-icon-sort" :disabled="selectTable.length == 0" @click="transfer"
v-hasPermi="['log:cargo:flightTransfer']">航班迁转</el-button>
<!-- <el-button type="primary" size="small" :disabled="cargoPlaneTime == null || cargoPlaneTime.length <= 0"
@click="historyFlie" v-hasPermi="['log:cargo:archiveData']">
<el-tooltip class="item" effect="dark" content="请先选择配置航班日期" placement="top">
<span class="el-icon-warning-outline">生成归档数据</span>
</el-tooltip>
</el-button> -->
<span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
<el-progress v-if="progress != 0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress"
:status="progress == 100 ? 'success' : 'warning'"></el-progress>
......@@ -208,18 +216,21 @@
</div>
</el-dialog>
<Dialog :dialogVisible="openView" :cargoData="cargoLog" @close="viewClose" />
<Info :tableData="selectTable" :dialogVisible="openTransfer" @dialogBeforeClose="dialogBeforeClose" />
</div>
</template>
<script>
import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes } from "@/api/cargoSelect";
import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes, historyCargo } from "@/api/cargoSelect";
import { downLoadXlsx } from "@/utils/zipdownload";
import Dialog from "./dialog.vue";
import Info from './info.vue'
export default {
name: "QueryCargo",
components: {
Dialog
Dialog,
Info
},
data() {
return {
......@@ -330,6 +341,7 @@ export default {
tableHeight: null,
dialogVisible: false,
openView: false,
openTransfer: false,
formShow: true, //菜单隐藏
};
},
......@@ -340,6 +352,7 @@ export default {
} else {
this.tableHeader = this.tableHeaders['cargo']
}
this.select(0)
},
activated() {
......@@ -476,6 +489,7 @@ export default {
},
//查询
async select(val) {
this.selectTable = []
this.tableData = [];
this.allWeight = 0;
this.allQty = 0;
......@@ -508,10 +522,9 @@ export default {
.catch(() => {
this.tableLoading = false;
});
this.$refs.newTables.clearTable();
this.cargoTotal();
},
//释放
//释放
release() {
let idList = []
this.selectTable.map(item => {
......@@ -534,7 +547,7 @@ export default {
val === item.id ? item.msg = item.msg + '正在释放中,请勿重复释放。' : ''
})
res.data['noFlight'].map(val => {
val === item.id ? item.msg = item.msg + '已释放位。' : ''
val === item.id ? item.msg = item.msg + '已释放位。' : ''
})
res.data['pushFalse'].map(val => {
val === item.id ? item.msg = item.msg + '该货物配舱结果已回推ACCS,不能释放。' : ''
......@@ -548,6 +561,26 @@ export default {
console.log(err)
})
},
transfer() {
this.openTransfer = true
},
//生成历史数据文件
historyFlie() {
if (new Date(this.cargoPlaneTime[1]).getTime() - new Date(this.cargoPlaneTime[0]).getTime() > 2592000000) {
this.msgWarning('配载日期区间不能大于31天!')
} else {
this.dataInfo();
historyCargo(this.formData).then(res => {
if (res.code === 200) {
this.msgSuccess('操作成功,正在生成中,稍后可在下载页面查看!')
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}
},
//关闭弹窗
close() {
this.dialogVisible = false
......@@ -725,6 +758,11 @@ export default {
viewClose() {
this.openView = false
},
//关闭迁转
dialogBeforeClose() {
this.openTransfer = false
this.select(0)
},
//设置关闭
headerSetClose(val) {
if (val == 1) {
......
<template>
<div>
<el-dialog title="货物配舱" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false" :show-close="false"
:append-to-body="true">
<el-divider content-position="left">已选货物信息</el-divider>
<el-table :data="tableData" size="mini" height="200" max-height="200" border stripe highlight-current-row
style="width: 100%">
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column v-for="(item, index) in cargoHeader" header-align="center" align="center" :prop="item.value"
:label="item.name" :key="index" :width="item.width" :show-overflow-tooltip="true" :formatter="formatter">
</el-table-column>
</el-table>
<el-form ref="form" class="form-header" label-position="right" label-width="auto"
style="width: 400px; margin: 30px auto" :model="formData" :rules="rules">
<el-form-item label="航班号" prop="fltNo">
<el-input class="formItem" v-model="fltNo" size="medium" placeholder="请输入航班号" maxlength="20"
style="width: 350px" @change="dateChange"></el-input>
</el-form-item>
<el-form-item label="航班日期:" prop="fltDate">
<el-date-picker class="formItem" v-model="formData.fltDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" size="medium" style="width: 350px" @change="dateChange">
</el-date-picker>
</el-form-item>
<el-form-item prop="route">
<template slot="label">
<div style="display:inline-block">航线:
<el-tooltip class="item" effect="dark" content="选择航线需要先输入航班号和航班日期,才能选择对应得航线" placement="top-start">
<span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span>
</el-tooltip>
</div>
</template>
<el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0">
<el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index">
<Tooltips :content="item.route" :refName="item.route"></Tooltips>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogBeforeClose">取 消</el-button>
<el-button type="primary" @click="submit" :loading="loading">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { batchMoveCargoToOtherFlight, findFlightRoute } from "@/api/cargoSelect";
export default {
props: {
dialogVisible: {
type: Boolean,
default: false,
},
tableData: {
type: Array,
default: null,
},
},
data() {
return {
formData: {
ids: [],
fltNo: undefined,
fltDate: undefined,
route: null,
overweight: false,
notInWhite: false,
},
cargoHeader: [
{ name: "口岸代码", value: "portName", width: "" },
{ name: "运单号", value: "waybillNo", width: "" },
{ name: "货物状态", value: "statusName", width: "" },
{ name: "站点", value: "siteName", width: "" },
{ name: "申报类型", value: "typeName", width: "" },
{ name: "URSA", value: "ursa", width: "" },
{ name: "实际重量", value: "actualWeight", width: "" },
{ name: "件数", value: "qty", width: "" },
{ name: "ACCS原航班号", value: "fltNoAccs", width: "120" },
{ name: "ACCS原航班日期", value: "fltDateAccs", width: "130" },
{ name: "品名描述", value: "nameDescription", width: "" },
{ name: "是否自动", value: "cargoRulesStatus", width: "" },
{ name: "创建人", value: "createUserName", width: "" },
{ name: "创建时间", value: "createTime", width: "" },
],
routeList: [],
rules: {
fltNo: [
{
required: true,
message: "航班号不能为空",
trigger: "blur",
},
],
fltDate: [
{
required: true,
message: "航班日期不能为空",
trigger: "blur",
},
],
route: [
{
required: true,
message: "航线不能为空",
trigger: "blur",
},
],
},
loading: false,
};
},
methods: {
cleaerForm() {
this.formData = {
ids: [],
fltNo: undefined,
fltDate: undefined,
route: undefined,
flightId: undefined,
overweight: false,
notInWhite: false,
};
this.routeList = []
},
//确定配舱
submit() {
this.formData.overweight = false
this.formData.notInWhite = false
this.$refs.form.validate(val => {
if (val) {
this.loading = true;
let arr = [];
this.tableData.forEach((item) => {
arr.push(item.id);
});
this.formData.ids = arr;
this.routeList.forEach(item => {
if (item.route === this.formData.route) {
this.formData.flightId = item.id
}
})
if (this.formData.fltNo && this.formData.fltDate) {
batchMoveCargoToOtherFlight(this.formData).then((res) => {
//code 200 配舱成功 202重量已满需要确认 203货物不在白名单需要确认 其余code直接输出msg 接口先判断重量后判断白名单 overweight/notInWhite初始默认false
if (res.code === 200) {
this.loading = false;
this.msgSuccess(res.msg)
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
} else if (res.code === 201) {
this.loading = false;
let arr = []
res.data.forEach(item => {
let obj = {
waybillNo: item.split(':')[0],
errorMessage: item.split(':')[1]
}
arr.push(obj)
})
this.$router.push({ name: 'UpDateResult', params: { data: arr, from: 'queryCargo' } })
this.dialogBeforeClose()
} else if (res.code === 202) {
this.reBatchMoveCargoToOtherFlight(res.msg, 'overweight')
} else if (res.code === 203) {
this.reBatchMoveCargoToOtherFlight(res.msg, 'notInWhite')
} else {
this.loading = false;
this.dialogBeforeClose()
this.msgWarning(res.msg)
}
}).catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.msgWarning('航班号或航班日期不能为空')
}
}
})
},
//迁转白名单/超重确认
reBatchMoveCargoToOtherFlight(msg, status) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
if (status == 'overweight') {
this.formData.overweight = true; //确定继续overweight变为true再次请求接口
} else {
this.formData.notInWhite = true; //确定继续notInWhite变为true再次请求接口
}
batchMoveCargoToOtherFlight(this.formData).then((res) => {
if (res.code === 200) {
this.loading = false
this.msgSuccess('航班迁转成功')
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
} else if (res.code === 201) {
let arr = []
res.data.forEach(item => {
let obj = {
waybillNo: item.split(':')[0],
errorMessage: item.split(':')[1]
}
arr.push(obj)
})
this.$router.push({ name: 'UpDateResult', params: { data: arr, from: 'queryCargo' } })
this.dialogBeforeClose()
} else if (res.code === 203) {
this.reBatchMoveCargoToOtherFlight(res.msg, 'notInWhite')
} else {
this.msgWarning(res.msg)
this.loading = false
}
})
}).ctach(() => {
//取消 取消当前配舱
this.loading = false
this.msgSuccess('迁转已取消')
this.cleaerForm();
this.$emit("dialogBeforeClose", {
close: false,
reload: true,
});
})
},
dialogBeforeClose() {
this.cleaerForm();
this.$refs['form'].clearValidate();
this.$emit("dialogBeforeClose", { close: false, reload: true });
},
formatter(row, column, cellValue, index) {
if (column.property == "cargoRulesStatus") {
if (cellValue == 1) {
return "手动"
} else {
return "自动"
}
}
return cellValue
},
//日期选择变化
dateChange(val) {
this.routeList = []
this.formData.route = null
if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') {
if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') {
let obj = {
fltNo: this.formData.fltNo,
fltDate: this.formData.fltDate,
}
findFlightRoute(obj).then(res => {
if (res.code === 200) {
res.data[0].route.indexOf(';') <= 0 ?
this.routeList = res.data :
res.data[0].route.split(';').forEach(item => {
this.routeList.push({ id: res.data[0].id, route: item })
})
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
} else {
this.msgWarning('航班日期不能为空')
}
} else {
this.msgWarning('航班号不能为空')
}
}
},
computed: {
fltNo: {
get: function () {
return this.formData.fltNo;
},
set: function (val) {
this.formData.fltNo = this.upCase(val);
},
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="login" :style="display">
<div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">IMAC后台管理系统</h3>
<el-form-item prop="username">
......@@ -13,8 +13,9 @@
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> -->
<el-form-item style="width: 100%; marginTop: 44px">
<el-form-item style="width: 100%; marginTop: 65px">
<el-button :loading="loading" size="medium" type="primary" style="width: 100%"
@click.native.prevent="handleLogin">
<span v-if="!loading">登 录</span>
......@@ -30,9 +31,6 @@
</template>
<script>
import { getCodeImg } from "@/api/login";
//import Cookies from "js-cookie";
import { encrypt } from "@/utils/jsencrypt";
export default {
name: "Login",
......@@ -55,7 +53,6 @@ export default {
},
loading: false,
redirect: undefined,
display: "display:flex",
};
},
watch: {
......@@ -63,8 +60,8 @@ export default {
handler: function (route) {
this.redirect = route.query && route.query.redirect;
},
immediate: true
}
immediate: true,
},
},
created() {
this.getCookie();
......@@ -101,12 +98,16 @@ export default {
}
this.$store
.dispatch("Login", this.loginForm)
.then(() => {
.then(res => {
this.loading = false;
if (res.code != 200) {
this.msgWarning(res.msg)
}
this.$router.push({ path: this.redirect || "/" }).catch(() => { });
})
.catch(() => {
.catch(err => {
this.loading = false;
//this.getCode();
this.msgWarning(err)
});
}
});
......
......@@ -4,9 +4,11 @@
<!-- <el-table-column label="行号" prop="line" width="50" align="center">
</el-table-column> -->
<el-table-column label="序号" type="index" width="70" align="center" />
<el-table-column label="运单号" prop="waybillNo" width="150" v-if="fromRoute == 'queryCargo'" />
<el-table-column label="错误信息" prop="errorMessage">
<template slot-scope="scope">
{{scope.row}}
<span v-if="fromRoute == 'queryCargo'">{{ scope.row.errorMessage }}</span>
<span v-else> {{ scope.row }}</span>
<!-- <div v-for="(m, key) in scope.row.errorMessage" :key="key">
{{ m }}
</div> -->
......@@ -42,6 +44,7 @@ export default {
},
methods: {
close() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
......
......@@ -26,7 +26,7 @@
<div v-else-if="dictName == '航线'">
<div v-if="status == 'add'">
<el-form-item label="航班号" prop="fltNo">
<el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="50">
<el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="20">
</el-input>
</el-form-item>
<el-form-item label="航线" prop="route">
......
......@@ -4,8 +4,8 @@
<!-- cardHeader -->
<div slot="header" class="clearfix">
<span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' :
tableName ==
'虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
tableName ==
'虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
}}</span>
<div style="float: right; padding: 3px 0">
<span class="selectLabel mr10">切换字典表</span>
......@@ -96,7 +96,7 @@
<template v-slot:fltNo="scope">
<el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })">
{{
scope.row.fltNo
scope.row.fltNo
}}<i class="el-icon-link"></i> </el-link>
</template>
<template slot="optionColumn">
......@@ -314,7 +314,6 @@ export default {
},
//修改
// upDate(val) {
// console.log(val)
// this.status = val.status
// this.addDictionary = val.data
// this.open = true
......
<template>
<div class="menuDrawer">
<el-dialog :title="drawerTitle" width="50%" :visible.sync="dialogVisible" :close-on-click-modal="false" :show-close="false"
:append-to-body="true">
<el-form ref="userForm" :model="menuForm" :disabled="menuFormDisabled" :rules="rules" label-width="auto"
style="margin: 10px">
<el-row>
<el-col :span="12">
<el-form-item label="菜单名称" prop="">
<!-- <el-input
placeholder="请输入权限名"
:disabled="menuFormDisabled"
v-model="menuData.userName"
size="mini"
></el-input> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="菜单路由" prop="">
<!-- <el-input
placeholder="请输入权限名"
:disabled="menuFormDisabled"
v-model="menuData.userName"
size="mini"
></el-input> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="组件名称" prop="">
<!-- <el-input
placeholder="请输入权限名"
:disabled="menuFormDisabled"
v-model="menuData.userName"
size="mini"
></el-input> -->
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="菜单状态" prop="">
<el-switch v-model="menuData.menuStatus" active-color="#13ce66" inactive-color="#ff4949"
:disabled="menuFormDisabled"></el-switch>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="图标选择" prop="">
<iconSelect @selected="selected"></iconSelect>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="权限设置" prop="">
<el-col :span="6">
<el-radio label="页面" size="medium"></el-radio>
</el-col>
<el-col :span="6">
<el-radio label="按钮" size="medium"></el-radio>
</el-col>
<el-col :span="24">
<el-card shadow="never">
<el-input placeholder=""></el-input>
</el-card>
</el-col>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import iconSelect from "@/components/IconSelect";
export default {
components: {
iconSelect,
},
props: {
drawerTitle: {
type: String,
default: "",
},
menuFormDisabled: {
type: Boolean,
default: false,
},
dialogVisible: {
type: Boolean,
default: false,
},
menuData: {
type: Object,
default: null,
},
},
data() {
return {
menuForm: {},
rules: {}
};
},
updated() {
this.menuForm = this.menuData;
},
watch: {
dialogVisible(val, oldVal) {
if (val) {
this.menuForm = this.menuData;
}
}
},
methods: {
handleClose() {
this.$emit("handleClose", false);
},
selected(val) {
console.log(val);
},
submit() { },
},
};
</script>
<style>
</style>
\ No newline at end of file
......@@ -44,9 +44,13 @@
<script>
import { getAllAuth, updateStatus } from "@/api/system/user.js";
import dictLabels from "@/assets/languages/dictLabels.js";
import Drawer from "./drawer.vue";
export default {
name: "MenuConfig",
components: {
Drawer,
},
data() {
return {
drawer: false,
......
<template>
<div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="60%" top="8vh" :before-close="close"
append-to-body :close-on-click-modal="false" @submit.native.prevent>
<el-form class="form-header" ref="superAllocationForm" :model="formData" label-width="auto"
label-position="left" style="margin-bottom:10px" @submit.native.prevent size="small" :rules="rules">
<el-row>
<el-col :span="22">
<el-form-item label="发件人账号" prop="shipperAccount">
<el-input type="textarea" v-model="formData.shipperAccount" placeholder="请输入发件人账号,多个以“;”分割"
maxlength="50" rows="4" :disabled="disabled" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班号" prop="flightNo">
<el-input class="formItem" ref="flightNoFormItem" v-focus v-model="formData.flightNo"
maxlength="20" placeholder="请输入航班号" @change="getRoute" :disabled="disabled">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班日期" prop="flightDate">
<el-date-picker class="formItem" v-model="formData.flightDate" type="date"
placeholder="选择日期" value-format="yyyy-MM-dd" @change="getRoute" :disabled="disabled">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="航线" prop="flightRoute">
<el-select class="formItem" v-model="formData.flightRoute" placeholder="未设置"
:disabled="routeList.length == 0 || disabled" @change="routeChange">
<el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route"
:key="item.id">
<Tooltips :content="item.route" :refName="item.route"></Tooltips>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="预留舱位(KG)" prop="groupAllWeight">
<el-input class="formItem" v-model="formData.groupAllWeight" placeholder="请输入预留舱位"
oninput="value=value.replace(/[^\d\.\-]/g,'')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="URSA包含" prop="includeUrsa">
<el-input class="formItem" v-model="formData.includeUrsa"
placeholder="URSA之间用分号分隔,例:F2;F3;P_" type="textarea" rows="3" maxlength="100">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="URSA不包含" prop="notIncludeUrsa">
<el-input class="formItem" v-model="formData.notIncludeUrsa"
placeholder="URSA之间用分号分隔,例:F2;F3;P_" type="textarea" rows="3" maxlength="100">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="申报类别" prop="classificationList">
<el-card shadow="never" style="width: 95%">
<el-checkbox-group v-model="formData.classificationList">
<el-row>
<el-col v-for="item in checkBoxItem.cargoType" :span="2" :key="item.id">
<el-checkbox v-if="item.status === 1" :label="item.chineseName"
:name="item.chineseName" :key="item.code">
<Tooltips :content="item.chineseName" :refName="item.chineseName">
</Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="Service Code" prop="serviceCodeList">
<el-card shadow="never" style="width: 95%">
<el-checkbox-group v-model="formData.serviceCodeList">
<el-row>
<el-col v-for="item in checkBoxItem.serviceCode" :span="2" :key="item.id">
<el-checkbox
v-if="item.status === 1 || checkBoxItem.serviceCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
:disabled="checkBoxItem.serviceCode.includes(item.chineseName) && item.status == 0"
:key="item.code">
<Tooltips :content="item.chineseName" :refName="item.chineseName">
</Tooltips>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button @click="close">取 消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { findFlightRoute } from "@/api/cargoSelect";
import { allDictData } from "@/api/destinationFlight";
import { saveOrUpdate } from "@/api/supserAllocation"
export default {
name: '',
props: {
dialogVisible: {
type: Boolean,
default: false
},
ruleData: {
type: Object,
default: null
},
status: {
type: String,
default: ''
}
},
data() {
return {
formData: {
flightNo: '',
flightDate: '',
flightRoute: null,
classificationList: [],
serviceCodeList: []
},
routeList: [],
checkBoxItem: {
cargoType: [],
serviceCode: []
},
rules: {
shipperAccount: [
{
required: true,
message: "发件人账号不能为空",
trigger: "blur",
},
],
flightDate: [
{
required: true,
message: "航班日期不能为空",
trigger: "blur",
},
],
flightNo: [
{
required: true,
message: "航班号不能为空",
trigger: "blur",
},
],
flightRoute: [
{
required: true,
message: "航线不能为空",
trigger: "change",
},
],
groupAllWeight: [
{
required: true,
message: "预留舱位不能为空",
trigger: "blur",
},
],
includeUrsa: [
{
required: true,
message: "URSA不能为空",
trigger: "blur",
},
],
},
title: '',
loading: false,
disabled: false
}
},
created() {
this.getCheckData()
},
watch: {
dialogVisible(val) {
if (val) {
if (this.status == 'add') {
this.title = '新增'
this.$nextTick(() => {
this.$refs["superAllocationForm"].clearValidate();
})
} else if (this.status == 'update') {
this.title = '修改'
this.formData = this.ruleData
this.disabled = true
this.getRoute(1)
} else if (this.status == 'copy') {
this.title = '复制'
this.formData = this.ruleData
this.getRoute(1)
}
}
}
},
methods: {
//获取复选框数据
getCheckData() {
allDictData().then(res => {
if (res.code === 200) {
this.checkBoxItem.cargoType = res.data.cargoType
this.checkBoxItem.serviceCode = res.data.serviceCode
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//获取航线
getRoute(val) {
this.routeList = []
if (val != 1) {
this.formData.flightRoute = null
}
this.formData.flightNo = this.formData.flightNo.toUpperCase()
let obj = {
fltNo: this.formData.flightNo,
fltDate: this.formData.flightDate
}
findFlightRoute(obj).then(res => {
if (res.code === 200) {
this.routeList = res.data
} else {
this.msgWarning(res.msg)
}
this.$refs['superAllocationForm'].clearValidate('flightRoute')
}).catch(err => {
console.log(err)
})
},
//提交
submit() {
this.$refs["superAllocationForm"].validate((valid) => {
if (valid) {
this.loading = true
this.formData.shipperAccount = this.formData.shipperAccount.replace(/;/g, ";")
this.formData.includeUrsa = this.formData.includeUrsa.replace(/;/g, ";")
if (this.formData.notIncludeUrsa && this.formData.notIncludeUrsa != null && this.formData.notIncludeUrsa != '') {
this.formData.notIncludeUrsa = this.formData.notIncludeUrsa.replace(/;/g, ";")
}
saveOrUpdate(this.formData).then(res => {
this.loading = false
if (res.code === 200) {
this.msgSuccess('操作成功!')
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
}
})
},
routeChange() {
this.$forceUpdate()
},
close() {
this.formData = {
flightNo: '',
flightDate: '',
classificationList: [],
serviceCodeList: []
}
this.$refs["superAllocationForm"].clearValidate();
this.routeList = []
this.disabled = false
this.$emit('close')
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div style="padding:20px 0">
<el-form class="form-header" ref="dictForm" label-width="auto" label-position="left" style="margin-bottom:10px"
@submit.native.prevent size="small">
<el-row>
<el-col :span="6">
<el-form-item label="发件人账号">
<el-input type="textarea" v-model="selectionData.shipperAccount" placeholder="请输入发件人账号,多个以“;”分割"
maxlength="50" rows="4" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="margin-left:20px;margin-bottom:10px">
<el-button icon="el-icon-search" type="primary" size="small" @click="selection(1)">查 询
</el-button>
<el-button v-hasPermi="['log:superAllocation:add']" icon="el-icon-plus" type="primary" size="small"
@click="add">添 加
</el-button>
</div>
<Tables ref="supserAllocation" ductName="supserAllocation" :data="tableData" :headerData="tableHeader"
:selection="false" :order="true" :selectFixed="false" :pagination="true" :totalCount="totalCount"
:loading="loading" :limitSize="selectionData.size" :page="selectionData.page"
layout="total,prev, pager, next, jumper, ->" :pageSizes="[100]" :height="tableHeight"
@currentChange="currentChange">
<template slot="optionColumn">
<el-table-column label="操作" width="250" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" v-if="scope.row.status != 0" icon="el-icon-edit"
v-hasPermi="['log:superAllocation:update']" @click="update(scope.row, 'update')">修改
</el-button>
<el-button type="text" v-if="scope.row.status === 1" size="mini" icon="el-icon-video-pause"
v-hasPermi="['log:superAllocation:openClose']" @click="changeStatus(scope.row)">
停 用</el-button>
<el-button type="text" v-if="scope.row.status === 0" size="mini" icon="el-icon-video-pause"
v-hasPermi="['log:superAllocation:openClose']" @click="changeStatus(scope.row)">
启 用</el-button>
<el-button type="text" icon="el-icon-document-copy" size="mini"
v-hasPermi="['log:superAllocation:copy']" @click="update(scope.row, 'copy')">复 制
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['log:superAllocation:delete']" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</template>
</Tables>
<Dialog :dialogVisible="dialogVisible" :ruleData="ruleData" :status="dialogStatus" @close="close" />
</div>
</template>
<script>
import { queryShipperAccountRule, changeStatusById, queryShipperAccountRuleById, getReleaseWeight } from "@/api/supserAllocation"
import Dialog from './dialog.vue';
export default {
name: 'SuperAllocation',
components: {
Dialog
},
data() {
return {
selectionData: {
shipperAccount: null,
page: 1,
size: 20,
},
tableData: [],
tableHeader: this.tableHeaders['superAllocation'],
ruleData: {
classificationList: [],
serviceCodeList: []
},
dialogStatus: 'add',
tableHeight: null,
totalCount: 0,
dialogVisible: false,
loading: false,
}
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.supserAllocation.$el.offsetHeight - 250
this.selection(1)
},
methods: {
//查询
selection(val) {
this.tableData = []
this.loading = true
if (val === 1) {
this.selectionData.page = 1
}
queryShipperAccountRule(this.selectionData).then(res => {
this.loading = false
if (res.code === 200) {
this.tableData = res.data.list
this.totalCount = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
//新增
add() {
this.dialogStatus = 'add'
this.dialogVisible = true
},
//修改
update(val, status) {
this.dialogStatus = status
queryShipperAccountRuleById({ id: val.id }).then(res => {
if (res.code === 200) {
this.ruleData = res.data
if (this.ruleData.classificationList == null || this.ruleData.classificationList.length < 1) {
this.ruleData.classificationList = []
}
if (this.ruleData.serviceCodeList == null || this.ruleData.serviceCodeList.length < 1) {
this.ruleData.serviceCodeList = []
}
if (status == 'copy') {
this.ruleData.id = undefined
}
this.dialogVisible = true
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//删除
del(val) {
getReleaseWeight({ id: val.id }).then(res => {
if (res.code === 200) {
this.$confirm(`是否要删除记录!预计释放舱位${res.data}`, "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
changeStatusById({ id: val.id, status: 2 }).then(res => {
if (res.code === 200) {
this.msgSuccess(`删除成功!已释放舱位${res.data}`)
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}).catch(() => { })
} else {
this.msgWarning(res.code)
}
}).catch(err => {
console.log(err)
})
},
//停用启用
changeStatus(val) {
let status = 0
let tip = ''
if (val.status == 0) {
status = 1
tip = '启用'
} else if (val.status == 1) {
status = 0
tip = '停用'
}
if (tip === "停用") {
getReleaseWeight({ id: val.id }).then(res => {
if (res.code === 200) {
this.$confirm(`预计释放舱位为${res.data},是否确定!`, "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.statusChange({ id: val.id, status: status, tip: tip })
}).catch(() => { })
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
} else {
this.$confirm(`是否要${tip}记录!`, "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.statusChange({ id: val.id, status: status, tip: tip })
}).catch(() => { })
}
},
//复制
copy(val) {
this.dialogStatus = 'copy'
this.ruleData = JSON.parse(JSON.stringify(val))
this.ruleData.id = undefined
this.dialogVisible = true
},
//状态修改请求
statusChange(val) {
changeStatusById(val).then(res => {
if (res.code === 200) {
if (val.tip == '停用') {
this.msgSuccess(`${val.tip}成功!已释放${res.data}`)
} else {
this.msgSuccess(`${val.tip}成功!`)
}
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//关闭
close() {
this.dialogVisible = false
this.ruleData = {}
this.selection(1)
},
//翻页
currentChange(val) {
this.selectionData.page = val.page
this.selection()
},
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-form ref="archiveDataForm" class="form-header" :model="selectForm" label-width="auto" size="small"
@submit.native.prevent>
<el-row>
<el-col :span="6">
<el-form-item label="操作时间">
<el-date-picker class="formItem" v-model="selectForm.dateList" type="daterange"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="ml20 mb20">
<el-button type="primary" size="small" icon="el-icon-search" :loading="loading" @click="selectLog(1)">查 询
</el-button>
</div>
<Tables ref="archiveDataTables" ductName="archiveDataTables" :order="true" :border='true' :data="data"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="true" :height="tableHeight"
:page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[20]" :totalCount="total"
:loading="loading" @currentChange="currentChange">
<template v-slot:queryParameter="scope">
<el-popover placement="top" width="350" trigger="hover">
<ul style="height:300px;overflow-y:scroll;"
v-if="scope.row.queryParameter != null && scope.row.queryParameter != ''">
<li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.queryParameter)).split(',')"
:key="index" style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li>
</ul>
<el-button type="text" slot="reference">查 看</el-button>
</el-popover>
</template>
<template v-slot:downloadPath="scope">
<el-button v-if="scope.row.downloadPath != null && scope.row.status == 1" type="text" size="mini"
icon="el-icon-download" @click="download(scope.row)">下载
</el-button>
<span v-else>暂无下载</span>
</template>
</Tables>
</div>
</template>
<script>
import { findArchiveCargoLog, isExistZip } from "@/api/system/logConfig.js";
import { downLoadZip } from "@/utils/zipdownload";
export default {
data() {
return {
selectForm: {
dateList: [],
page: 1,
size: 20
},
data: [],
tableHeader: this.tableHeaders['archiveData'],
tableHeight: null,
total: 0,
loading: false,
}
},
created() {
this.selectLog()
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.archiveDataForm.$el.offsetHeight - 200
},
methods: {
selectLog(val) {
this.loading = true
if (val == 1) {
this.selectForm.page = 1
}
let obj = {}
if (this.selectForm.dateList && this.selectForm.dateList.length > 0) {
obj.createTimeStart = this.selectForm.dateList[0]
obj.createTimeEnd = this.selectForm.dateList[1]
}
obj.page = this.selectForm.page
obj.size = this.selectForm.size
findArchiveCargoLog(obj).then(res => {
this.loading = false
if (res.code === 200) {
this.data = res.data.list
this.total = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = true
console.log(err)
})
},
download(val) {
isExistZip(val).then(res => {
if (res.code === 200) {
setTimeout(() => {
let url = '/archiveCargoLog/downloadZip'
let filename = val.packageName
downLoadZip(url, val, filename)
}, 500);
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
currentChange(val) {
this.selectForm.page = val.page
this.selectLog()
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -69,12 +69,19 @@
</template>
<template v-slot:flightFltNo="scope">
<el-link v-if="scope.row.allocDimId" type="primary"
@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 } })">
@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, } })">
{{
scope.row.flightFltNo
}}<i class="el-icon-link"></i> </el-link>
<span v-else>{{ scope.row.flightFltNo }}</span>
</template>
<template v-slot:remarksDetail="scope">
<span v-if="scope.row.remarksDetail == null || scope.row.remarksDetail == ''">{{ scope.row.remarksDetail
}}</span>
<div v-else>
<div v-for="item in scope.row.remarksDetail.split('\\r\\n')">{{ item }}</div>
</div>
</template>
</Tables>
</div>
</template>
......@@ -137,7 +144,7 @@ export default {
getDmDataList(this.selectForm).then((res) => {
this.loading = false;
if (res.code === 200) {
this.total = res.data.total;
this.total = res.data.total
if (res.data.total === 0) {
this.msgWarning('未查询到数据')
} else {
......
......@@ -64,6 +64,7 @@ export default {
},
//返回
close() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
......
<template>
<div>
<el-form ref="operationLogForm" class="form-header" :model="selectForm" label-width="auto" size="small"
@submit.native.prevent>
<el-row>
<el-col :span="6">
<el-form-item label="功能模块">
<el-select v-model="selectForm.module" class="formItem" placeholder="不限" clearable>
<el-option v-for="item in moduleList" :label="item" :value="item" :key="item"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="操作描述">
<el-input v-model="selectForm.describe" class="formItem" placeholder="请输入操作描述" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="操作人">
<el-input v-model="selectForm.userName" class="formItem" placeholder="请输入操作人" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="操作时间">
<el-date-picker class="formItem" v-model="dateList" type="daterange" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="ml20 mb20">
<el-button type="primary" size="small" icon="el-icon-search" :loading="loading" @click="selectLog(1)">查 询
</el-button>
</div>
<Tables ref="operationLogTables" ductName="operationLogTables" :order="true" :border='false' :data="data"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="true" :height="tableHeight"
:page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total"
:loading="loading" @currentChange="currentChange">
<template v-slot:result="scope">
<span>
{{ scope.row.result != null && typeof JSON.parse(scope.row.result) == 'object' ?
JSON.parse(scope.row.result).msg :
scope.row.result
}}
</span>
</template>
<template v-slot:remark="scope">
<el-popover placement="top" width="400" trigger="hover"
v-if="scope.row.remark != null && scope.row.remark != ''">
<ul style="height:300px;overflow-y:scroll;">
<li v-for="(item, index) in scope.row.remark.split('\n')" :key="index"
style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li>
</ul>
<el-button type="text" slot="reference">查 看</el-button>
</el-popover>
</template>
<template v-slot:requestParameters="scope">
<el-popover placement="top" width="400" trigger="hover"
v-if="scope.row.requestParameters != null && scope.row.requestParameters != ''">
<ul style="height:300px;overflow-y:scroll;">
<li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.requestParameters)).split(',')"
:key="index" style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li>
</ul>
<el-button type="text" slot="reference">查 看</el-button>
</el-popover>
</template>
</Tables>
</div>
</template>
<script>
import { findModuleCondition, getSystemOperationLogData } from "@/api/system/logConfig.js";
export default {
name: 'OperationLog',
data() {
return {
selectForm: {
module: null,
describe: null,
userName: null,
page: 1,
size: 100
},
data: [],
tableHeader: this.tableHeaders['operationLog'],
moduleList: [],
dateList: [],
defaultProps: {
children: 'children',
label: 'label'
},
tableHeight: null,
total: 0,
loading: false
}
},
created() {
this.getModule()
this.selectLog(1)
},
activated() {
this.selectLog();
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.operationLogForm.$el.offsetHeight - 240
},
methods: {
getModule() {
findModuleCondition().then(res => {
if (res.code === 200) {
this.moduleList = res.data.module
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
selectLog(val) {
this.loading = true
this.data = []
if (val == 1) {
this.selectForm.page = 1
}
let obj = {}
obj.module = this.selectForm.module
if (this.dateList && this.dateList.length > 0) {
obj.createTimeStart = this.dateList[0]
obj.createTimeEnd = this.dateList[1]
} else {
obj.createTimeStart = null
obj.createTimeEnd = null
}
obj.describe = this.selectForm.describe
obj.userName = this.selectForm.userName
obj.page = this.selectForm.page
obj.size = this.selectForm.size
getSystemOperationLogData(obj).then(res => {
this.loading = false
if (res.code === 200) {
this.data = res.data.list
this.total = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
currentChange(val) {
this.selectForm.page = val.page
this.selectLog()
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file