jinhui.wang

同步uat

Showing 69 changed files with 4943 additions and 443 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,29 @@ 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
})
}
//黑名单自动配舱开关
/**
* @param updateIds idList *
* @param status 状态 * 1开 0关
*/
export function updateBlackListSwitchBatch(data) {
return request({
url: '/FlightPreserveController/updateBlackListSwitchBatch',
method: 'post',
data: data
})
}
......
......@@ -41,6 +41,7 @@ export function batchDeleteGoods(data) {
/**
* @param page * 页数
* @param size * 页长
* @param goodsType 查询状态 1白名单 2黑名单 默认查询白名单
* @param goodsStation 货站名
*/
export function searchGoods(data) {
......@@ -54,9 +55,60 @@ export function searchGoods(data) {
//查询货站
/**
*/
export function findStationName() {
export function findStationName(data) {
return request({
url: '/goods/findStationName',
method: 'post',
data: data
})
}
//白名单批量导入
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
})
}
//黑名单上传excel
export function uploadGoodsBlackExce(file, goodsStation) {
let formData = new FormData();
formData.append("file", file);
formData.append("goodsStation", goodsStation);
return request({
url: '/goods/uploadGoodsBlackExcel',
method: 'post',
data: formData
})
}
//批量添加黑名单
/**
* @param goodsStation * 货站名
* @param goodsList * 货品名list
*/
export function batchAddBlackGoods(data) {
return request({
url: '/goods/batchAddBlackGoods',
method: 'post',
data: data
})
}
\ No newline at end of file
......
import request from '@/utils/request'
import settings from "@/settings"
//模板下载
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 request({
method: 'post',
url: settings.baseURL + '/flightDestination/importFlightDestination',
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 request({
method: 'post',
url: settings.baseURL + '/ursaDestination/importUrsaDestination',
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
......@@ -11,7 +11,8 @@ export function findSourceFlightRulesApi(data) {
// 目标航班查询
export function findSourceFlightAndFlightDateApi(data) {
return request({
url: '/sourceFlight/findSourceFlightAndFlightDate',
// url: '/sourceFlight/findSourceFlightAndFlightDate',
url: '/sourceFlight/findActualAllocateFlightList',
method: 'post',
data: data
})
......
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
......@@ -39,3 +39,57 @@ export function findCargoDataChangeLog(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
})
}
//查询归档文件是否可下载
/**
* @param object 查询结果集行数据
*/
export function isExistZip(data) {
return request({
url: '/archiveCargoLog/isExistZip',
method: 'post',
data: data
})
}
\ No newline at end of file
......
This diff could not be displayed because it is too large.
......@@ -19,7 +19,8 @@ let ductLabels = {
"7": "预审导出",
"8": "预审导入",
"9": "航班不推送修改为待推送",
"10": "回推ACCS"
"10": "回推ACCS",
"11": "航班迁转"
}
},
"menu": {//菜单设置
......@@ -62,6 +63,16 @@ let ductLabels = {
"1": "是",
"2": "否",
},
"whiteListSwitch": {
"1": "开启",
"0": "关闭",
null: '关闭'
},
"blackListSwitch": {
"1": "开启",
"0": "关闭",
null: '开启'
}
},
"flightRand": {//航班顺位设置
"status": {
......@@ -123,7 +134,8 @@ let ductLabels = {
"1": "pre-MD cutoff",
"2": "航班迁转手动释放",
"3": "预审不通过定时任务",
"4": "自动配舱"
"4": "自动配舱",
"5": "航班迁转"
},
"weightMark": {
"1": "增加",
......@@ -135,6 +147,27 @@ let ductLabels = {
"0": "关闭",
"1": "开启"
}
},
"preMdeSelect": {
"manualRde": {
},
},
'goodsLogStation': {
"status": {
"0": "未处理",
"1": "处理中",
"2": "处理成功",
"3": "处理失败"
}
},
"archiveDataTables": {
"status": {
"0": "未处理",
"1": "处理成功",
"2": "处理失败",
"3": "处理中"
}
}
}
......
......@@ -131,7 +131,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "申报类",
columnChineseName: "申报类",
columnName: "typeName",
columnWidth: "100",
ext1: "sorTable",
......@@ -152,7 +152,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "subcategory",
columnChineseName: "Subcategory",
columnName: "subCategory",
columnWidth: "140",
ext1: "sorTable",
......@@ -427,7 +427,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "航线",
columnChineseName: "当前配载航线",
columnName: "flightRoute",
columnWidth: "140",
status: 1
......@@ -521,6 +521,18 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "白名单是否自动配舱",
columnName: "whiteListSwitch",
columnWidth: "160",
status: 1
},
{
columnChineseName: "黑名单是否自动配舱",
columnName: "blackListSwitch",
columnWidth: "160",
status: 1
},
{
columnChineseName: "总重量",
columnName: "totalWeight",
columnWidth: "90",
......@@ -539,6 +551,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 +728,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",
......@@ -718,7 +749,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "subcategory",
columnChineseName: "Subcategory",
columnName: "subCategory",
columnWidth: "140",
ext1: "sorTable",
......@@ -739,6 +770,13 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "体积",
columnName: "volume",
columnWidth: "100",
ext1: "sorTable",
status: 1
},
{
columnChineseName: "收件人国家代码",
columnName: "consigneeCountry",
columnWidth: "150",
......@@ -793,6 +831,13 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "终配航线",
columnName: "finalFlightRoute",
columnWidth: "140",
ext1: "sorTable",
status: 1
},
{
columnChineseName: "二配航班号",
columnName: "twoMatchFlightNo",
columnWidth: "120",
......@@ -807,6 +852,13 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "二配航线",
columnName: "twoFlightRoute",
columnWidth: "140",
ext1: "sorTable",
status: 1
},
{
columnChineseName: "预配航班号",
columnName: "preplanFlightNo",
columnWidth: "120",
......@@ -1220,7 +1272,8 @@ let tableHeaders = {
columnName: "remarksDetail",
columnWidth: "450",
align: 'left',
status: 1
status: 1,
ext1: 'slot',
},
{
columnChineseName: "处理状态级别",
......@@ -1287,7 +1340,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "是否开启高价",
columnChineseName: "是否开启高价",
columnName: "highLowPriceFlg",
columnWidth: "",
status: 1
......@@ -1493,91 +1546,733 @@ 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: "module",
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: "500",
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
},
]
}
......
......@@ -293,3 +293,18 @@ body {
.el-select-dropdown {
max-width: 300px;
}
.backgroundCollapse {
.el-collapse-item__header {
background-color: #d9ecff !important;
border-bottom: 1px solid #ccc;
}
}
.numberInput {
width: 100% !important;
}
.el-select-dropdown__wrap {
max-height: 350px !important;
}
\ No newline at end of file
......
......@@ -81,8 +81,7 @@ export default {
<style lang="scss" scoped>
.container {
max-width: 350px;
min-height: 32px;
max-height: 150px;
height: 150px;
overflow-y: scroll;
padding: 0;
border: 1px solid #ccc;
......
<template>
<div>
<el-button v-if="buttonShow" class="mt5" size="mini" icon="el-icon-edit-outline" circle @click="visibleOpen">
<el-button v-if="buttonShow" class="mt5" size="mini" style="color:#1890ff" icon="el-icon-edit-outline" circle
@click="visibleOpen">
</el-button>
<el-dialog title="表格显示设置" :visible.sync="open" width="40%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
append-to-body center @close="close">
<div style="text-align: center">
<el-transfer style="text-align: left; display: inline-block" :data="transferData"
:right-default-checked="rightDefaultChecked" v-model="transferValue" :titles="transferTitle"
......
<template>
<div class="component-upload-image">
<el-upload
:action="uploadImgUrl"
list-type="picture-card"
:on-success="handleUploadSuccess"
:before-upload="handleBeforeUpload"
:on-error="handleUploadError"
name="file"
:show-file-list="false"
:headers="headers"
style="display: inline-block; vertical-align: top"
>
<el-upload :action="uploadImgUrl" list-type="picture-card" :on-success="handleUploadSuccess"
:before-upload="handleBeforeUpload" :on-error="handleUploadError" name="file" :show-file-list="false"
:headers="headers" style="display: inline-block; vertical-align: top">
<el-image v-if="!value" :src="value">
<div slot="error" class="image-slot">
<i class="el-icon-plus" />
</div>
</el-image>
<div v-else class="image">
<el-image :src="value" :style="`width:150px;height:150px;`" fit="fill"/>
<el-image :src="value" :style="`width:150px;height:150px;`" fit="fill" />
<div class="mask">
<div class="actions">
<span title="预览" @click.stop="dialogVisible = true">
......@@ -30,7 +22,7 @@
</div>
</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible" title="预览" width="800" append-to-body>
<el-dialog :visible.sync="dialogVisible" title="预览" width="800" append-to-body :close-on-press-escape="false">
<img :src="value" style="display: block; max-width: 100%; margin: 0 auto;">
</el-dialog>
</div>
......@@ -85,6 +77,7 @@ export default {
<style scoped lang="scss">
.image {
position: relative;
.mask {
opacity: 0;
position: absolute;
......@@ -93,6 +86,7 @@ export default {
background-color: rgba(0, 0, 0, 0.5);
transition: all 0.3s;
}
&:hover .mask {
opacity: 1;
}
......
<template>
<div class="top-right-btn">
<el-row>
<el-tooltip
class="item"
effect="dark"
:content="showSearch ? '隐藏搜索' : '显示搜索'"
placement="top"
>
<el-button
:size="size"
circle
icon="el-icon-search"
@click="toggleSearch()"
/>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button :size="size" circle icon="el-icon-search" @click="toggleSearch()" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button
:size="size"
circle
icon="el-icon-refresh"
@click="refresh()"
/>
<el-button :size="size" circle icon="el-icon-refresh" @click="refresh()" />
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
content="显隐列"
placement="top"
v-if="columns"
>
<el-button
:size="size"
circle
icon="el-icon-menu"
@click="showColumn()"
/>
<el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns">
<el-button :size="size" circle icon="el-icon-menu" @click="showColumn()" />
</el-tooltip>
</el-row>
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-transfer
:titles="['显示', '隐藏']"
v-model="value"
:data="columns"
@change="dataChange"
></el-transfer>
<el-dialog :title="title" :visible.sync="open" append-to-body :close-on-press-escape="false">
<el-transfer :titles="['显示', '隐藏']" v-model="value" :data="columns" @change="dataChange"></el-transfer>
</el-dialog>
</div>
</template>
......@@ -111,6 +80,7 @@ export default {
display: block;
margin-left: 0px;
}
::v-deep .el-transfer__button:first-child {
margin-bottom: 10px;
}
......
<template>
<div style="padding:10px;" v-loading="loading">
<canvas :class="className" :style="{
height: height, width: width
}"></canvas>
</div>
</template>
<script>
import Chart from '../../assets/languages/chart.js'
export default {
name: '',
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: "350px"
},
chartData: {
type: Object,
required: true
},
loading: {
type: Boolean,
default: false
}
},
data() {
return {
chart: null,
padding: "10px"
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
watch: {
chartData: {
deep: true,
handler(val) {
this.chartUpdata()
}
}
},
methods: {
initChart() {
let ctx = document.getElementsByClassName(this.className)
this.chart = new Chart(ctx, this.setOptions(this.chartData))
},
setOptions({ names, data1, data2, data3 }) {
// let setOption = ({
// tooltip: {
// trigger: 'axis',
// axisPointer: { // 坐标轴指示器,坐标轴触发有效
// type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
// }
// },
// legend: {
// show: true
// },
// dataZoom: [
// {
// type: 'inside',
// xAxisIndex: [0],
// },
// {
// type: 'slider',
// show: true,
// start: 0,
// end: 85,
// handleSize: 8
// },
// ],
// grid: {
// top: '15%',
// left: '2%',
// right: '2%',
// containLabel: true
// },
// xAxis: [{
// type: 'category',
// data: names,
// axisTick: {
// alignWithLabel: true
// }
// }],
// yAxis: [{
// type: 'value',
// axisTick: {
// show: false
// }
// }],
// series: [{
// name: '件数',
// type: 'bar',
// data: data1,
// barWidth: '10%',
// barGap: '0%',
// label: {
// show: true,
// position: 'top',
// fontSize: 14
// },
// animationDuration: 1000
// },
// {
// name: '票数',
// type: 'bar',
// data: data2,
// barWidth: '10%',
// barGap: '0%',
// label: {
// show: true,
// position: 'top',
// fontSize: 14
// },
// animationDuration: 1000
// },
// {
// name: '重量',
// type: 'bar',
// data: data3,
// barWidth: '10%',
// barGap: '0%',
// label: {
// show: true,
// position: 'top',
// fontSize: 14
// },
// animationDuration: 1000
// }]
// })
let setOption = {
type: 'bar',
data: {
labels: names,
datasets: [{
label: '件数',
data: data1,
backgroundColor: 'rgba(255, 99, 132, 1)',
stack: 'group1'
},
{
label: '票数',
data: data2,
backgroundColor: 'rgba(153, 102, 255, 1)',
stack: 'group2'
},
{
label: '重量',
data: data3,
backgroundColor: 'rgba(255, 205, 86, 1)',
stack: 'group3'
}]
},
options: {
events: [''],
hover: {
intersect: false,
animationDuration: 0
},
animation: {
duration: 500,
onComplete: (val) => {
let ctx = val.chart.ctx
ctx.textAlign = 'center';
ctx.textBaseline = 'bottom';
ctx.font = '14px \"Helvetica Neue\", Helvetica, Arial, sans-serif'
val.chart.data.datasets.forEach((dataset, i) => {
if (val.chart.isDatasetVisible(i)) {
var meta = val.chart.getDatasetMeta(i);
meta.data.forEach(function (bar, index) {
var data = dataset.data[index];
ctx.fillText(data, bar.x, bar.y - 5);
});
}
});
}
},
legend: {
display: true
},
tooltips: {
enabled: false,
},
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
}
return setOption
},
chartUpdata() {
this.chart.data = {
labels: this.chartData.names,
datasets: [{
label: '件数',
data: this.chartData.data1,
backgroundColor: 'rgba(255, 99, 132, 1)',
stack: 'group1'
},
{
label: '票数',
data: this.chartData.data2,
backgroundColor: 'rgba(153, 102, 255, 1)',
stack: 'group2'
},
{
label: '重量',
data: this.chartData.data3,
backgroundColor: 'rgba(255, 205, 86, 1)',
stack: 'group3'
}]
}
this.chart.update()
}
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.destroy()
this.chart = null
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -3,9 +3,9 @@
* Copyright (c) 2019 FedEx
*/
import store from '@/store'
import store from '@/store'
export default {
export default {
inserted(el, binding, vnode) {
const { value } = binding
const all_permission = "*:*:*";
......@@ -42,5 +42,4 @@
});
return newRouter
}
}
\ No newline at end of file
}
......
......@@ -40,7 +40,6 @@ import { mapGetters } from "vuex"
import Breadcrumb from "@/components/Breadcrumb"
import TopNav from "@/components/TopNav"
import Hamburger from "@/components/Hamburger"
import { removeToken } from '@/utils/auth'
import settings from "@/settings"
export default {
......@@ -89,7 +88,6 @@ export default {
.then((res) => {
if (res.code === 200) {
this.$store.dispatch('tagsView/delAllCachedViews')
this.$store.dispatch('tagsView/delAllVisitedViews')
// location.reload();
if (this.$route.path != '/index') {
this.$router.push('/index')
......@@ -127,7 +125,6 @@ export default {
type: "warning",
}).then(() => {
this.$store.dispatch("LogOut").then(() => {
removeToken()
window.location.href = settings.logoutURL;//wsso系统跳转
});
});
......
<template>
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }">
<div class="sidebar-logo-container" :class="{ 'collapse': collapse }"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }">
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1>
<h1 v-else class="sidebar-title"
:style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title
}} </h1>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1>
<h1 class="sidebar-title"
:style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title
}} </h1>
</router-link>
</transition>
</div>
......@@ -16,6 +21,8 @@
<script>
import logoImg from '@/assets/logo/logo.png'
import variables from '@/assets/styles/variables.scss'
import { createDecipheriv } from 'crypto';
import { mapState } from 'vuex'
export default {
name: 'SidebarLogo',
......@@ -26,6 +33,9 @@ export default {
}
},
computed: {
...mapState({
sidebar: state => state.app.sidebar,
}),
variables() {
return variables;
},
......@@ -36,9 +46,16 @@ export default {
data() {
return {
title: 'IMAC管理系统',
logo: logoImg
}
logo: logoImg,
logoClassName: 'sidebar-logo'
}
},
created() {
this.logoClassName = localStorage.getItem('logoName')
},
updated() {
this.logoClassName = localStorage.getItem('logoName')
},
}
</script>
......@@ -66,7 +83,7 @@ export default {
width: 100%;
& .sidebar-logo {
//width: 32px;
width: auto;
height: 32px;
vertical-align: middle;
margin-right: 12px;
......@@ -82,6 +99,13 @@ export default {
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
vertical-align: middle;
}
& .sidebar-logo-mini {
width: auto;
height: 24px;
vertical-align: middle;
margin-right: 12px;
}
}
&.collapse {
......
<template>
<div
:class="{ 'has-logo': showLogo }"
:style="{
<div :class="{ 'has-logo': showLogo }" :style="{
backgroundColor:
settings.sideTheme === 'theme-dark'
? variables.menuBg
: variables.menuLightBg,
}"
>
}">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="
<el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="
settings.sideTheme === 'theme-dark'
? variables.menuBg
: variables.menuLightBg
"
:text-color="
" :text-color="
settings.sideTheme === 'theme-dark'
? variables.menuText
: 'rgba(0,0,0,.65)'
"
:unique-opened="true"
:active-text-color="settings.theme"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path"
/>
" :unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical">
<sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route"
:base-path="route.path" />
</el-menu>
<div class="version">{{ version }}</div>
</el-scrollbar>
......
<template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<sidebar class="sidebar-container" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{hasTagsView:needTagsView}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{ hasTagsView: needTagsView }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div>
<app-main />
<right-panel v-if="showSettings">
<right-panel v-if="false">
<settings />
</right-panel>
</div>
......@@ -64,10 +65,10 @@ export default {
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.app-wrapper {
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
......@@ -77,9 +78,9 @@ export default {
position: fixed;
top: 0;
}
}
}
.drawer-bg {
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
......@@ -87,22 +88,22 @@ export default {
height: 100%;
position: absolute;
z-index: 999;
}
}
.fixed-header {
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$sideBarWidth});
transition: width 0.28s;
}
}
.hideSidebar .fixed-header {
.hideSidebar .fixed-header {
width: calc(100% - 54px)
}
}
.mobile .fixed-header {
.mobile .fixed-header {
width: 100%;
}
}
</style>
......
......@@ -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
......
......@@ -25,10 +25,10 @@ router.beforeEach((to, from, next) => {
})
}).catch(err => {
Message.error(err)
store.dispatch('LogOut').then(() => {
// next({ path: '/' })
window.location.href = settings.logoutURL;//wsso系统跳转
})
// store.dispatch('LogOut').then(() => {
// // next({ path: '/' })
// window.location.href = settings.loginURL;//wsso系统跳转
// })
})
} else {
next()
......@@ -47,7 +47,7 @@ router.beforeEach((to, from, next) => {
// 在免登录白名单,直接进入
next()
} else {
window.location.href = settings.logoutURL;//wsso系统跳转
window.location.href = settings.loginURL;//wsso系统跳转
}
}
}
......
......@@ -62,19 +62,18 @@ 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',
path: '/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status',
component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
name: 'FlightAllocConfigInfo',
meta: { title: '航班配舱', icon: 'user' }
......@@ -86,18 +85,24 @@ export const constantRoutes = [
meta: { title: '流水表', icon: 'user' }
},
{
path: '/upDateResult->:from',
path: '/upDateResult',
component: (resolve) => require(['@/views/preMdeConfig/upDateResult'], resolve),
name: 'UpDateResult',
meta: { title: '导入信息', icon: 'user' }
meta: { title: '错误信息提示', icon: 'user' }
},
{
path: '/goodsLog/type=:type',
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
base: settings.routerBase,
})
......
......@@ -42,7 +42,8 @@ module.exports = {
/**
* logout
*/
logoutURL: 'https://test-myapps.secure.fedex.com/purpleid/signout/',
loginURL: 'https://test-myapps.secure.fedex.com/L2/iMAC/',
logoutURL: 'https://test-myapps.secure.fedex.com/logout/',
/**
* 后端接口
......@@ -58,5 +59,5 @@ module.exports = {
/**
* 版本号
*/
version: 'version:1.7.0'
version: 'version:2.0.0'
}
......
......@@ -7,6 +7,7 @@ const getters = {
token: state => state.user.token,
avatar: state => state.user.avatar,
name: state => state.user.name,
id: state => state.user.id,
activePortName: state => state.user.activePortName,
portName: state => state.user.portName,
introduction: state => state.user.introduction,
......
......@@ -18,7 +18,7 @@ const mutations = {
//Cookies.set('sidebarStatus', 1)
localStorage.setItem('sidebarStatus', 1)
} else {
Cookies.set('sidebarStatus', 0)
// Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
}
},
......
......@@ -3,6 +3,7 @@ import { getTableHeader } from '@/api/menu'
import { changeCurrentPort } from "@/api/system/user.js";
import { getToken, setToken, removeToken } from '@/utils/auth'
import { Message } from 'element-ui'
import settings from "@/settings"
const user = {
state: {
......@@ -101,7 +102,7 @@ const user = {
type: 'error'
})
this.LogOut().then(() => {
window.location.href = "https://test-myapps.secure.fedex.com/purpleid/signout/";//wsso系统跳转
window.location.href = settings.loginURL;//wsso系统跳转
})
}
if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
......
......@@ -10,10 +10,10 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL: settings.baseURL,
// 超时
timeout: 30000,
timeout: 90000,
})
// request拦截器
service.interceptors.request.use(config => {
// 是否需要设置 token
......@@ -52,21 +52,23 @@ service.interceptors.request.use(config => {
// 响应拦截器
service.interceptors.response.use(res => {
if (res.headers['token']) {
setToken(decodeURIComponent(res.headers['token']))
setToken(res.headers['token'])
}
// 未设置状态码则默认成功状态
const code = res.data.code || 200;
// 获取错误信息
const msg = errorCode[code] || res.data.msg || errorCode['default']
if (code === 301) {
MessageBox.confirm('登录状态已过期,需重新登录', '系统提示', {
confirmButtonText: '确定',
MessageBox.confirm('登录状态已过期,需重新登录!msg:' + msg, '系统提示', {
closeOnClickModal: false,
showCancelButton: false,
confirmButtonText: '重新登录',
type: 'warning'
}
).then(() => {
store.dispatch('LogOut').then(() => {
// location.href = '/';
window.location.href = settings.logoutURL;//wsso系统跳转
window.location.href = settings.loginURL;//wsso系统跳转
})
});
} else if (code === 403) {
......
......@@ -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
......
......@@ -6,17 +6,18 @@ const mimeMap = {
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
zip: 'application/zip'
}
const baseUrl = settings.downLoadURL //uat服务器
const baseUrl = settings.downLoadURL //接口地址
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)
})
}
......@@ -25,15 +26,14 @@ export function downLoadZip(str, filename) {
* @param {*} res blob响应内容
* @param {String} mimeType MIME类型
*/
export function resolveBlob(res, mimeType) {
export function resolveBlob(res, mimeType, fileName) {
const aLink = document.createElement('a')
var blob = new Blob([res], { type: mimeType })
var blob = new Blob([res.data], { type: mimeType })
// //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
var contentDisposition = decodeURI(res.headers['content-disposition'])
var result = patt.exec(contentDisposition)
var fileName = result[1]
fileName = fileName.replace(/\"/g, '')
// var contentDisposition = decodeURI(res.headers['content-disposition'])
// var result = patt.exec(contentDisposition)
// var fileName = result[1]
aLink.href = URL.createObjectURL(blob)
aLink.setAttribute('download', fileName) // 设置下载文件名称
document.body.appendChild(aLink)
......@@ -52,7 +52,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 +106,4 @@ export function cargoTableXlsxPre(val) {
aLink.click()
document.body.removeChild(aLink);
}
......
......@@ -142,12 +142,12 @@
</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-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id" v-if="item.status == 1">
<el-checkbox :label="item.chineseName" v-model="item.chineseName">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-checkbox>
......@@ -158,12 +158,12 @@
</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-col :span="2" v-for="item in selectData.SubCategory" :key="item.id" v-if="item.status == 1">
<el-checkbox :label="item.chineseName" v-model="item.chineseName">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-checkbox>
......@@ -176,17 +176,17 @@
<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']" @click="xlsx(0)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @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']" @click="xlsx(1)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(1)"
:loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="mini" v-hasPermi="['allocation:cargo:allocation']" @click="addFit"
:disabled="tableSelection.length <= 0">添加到航班</el-button>
<el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']"
@click="addFit" :disabled="tableSelection.length <= 0">添加到航班</el-button>
<div class="tips">
<span style="paddingRight: 50px">总重量:{{ allWeight }}</span>
<span>总件数:{{ allQty }}</span>
......@@ -331,6 +331,7 @@ export default {
},
//查询
async select(val) {
this.tableSelection = []
this.loading = true;
this.dataInfo();
if (val === 0) {
......
<template>
<div>
<el-dialog title="货物配舱" width="80%" top="5vh" :visible.sync="dialogVisible" :close-on-click-modal="false"
:show-close="false" :append-to-body="true">
:show-close="false" :append-to-body="true" @close="dialogBeforeClose">
<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" :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"
......@@ -30,7 +30,7 @@
</el-tooltip>
</div>
</template>
<el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0">
<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>
......@@ -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,11 +121,16 @@ export default {
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) => {
......@@ -138,50 +144,66 @@ export default {
})
if (this.formData.fltNo && this.formData.fltDate) {
allocationFlight(this.formData).then((res) => {
this.loading = false;
//code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg
//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.$confirm(res.msg, "提示", {
//超重航班确实是否继续配舱
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('航班号或航班日期不能为空')
}
}
})
},
//手动配舱超重或白名单不存在提示
reallocationFlight(msg, status) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
}).then(() => {
if (status == 'overweight') {
this.formData.overweight = true; //确定继续overweight变为true再次请求接口
} else {
this.formData.notInWhite = true; //确定继续notInWhite变为true再次请求接口
}
allocationFlight(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 === 203) {
this.reallocationFlight(res.msg, 'notInWhite')
} else {
this.msgWarning(res.msg)
this.loading = false
}
});
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
})
.catch(() => {
//取消 取消当前配舱
}).catch(() => {
this.msgSuccess('配舱已取消')
this.loading = false
this.cleaerForm();
this.$emit("dialogBeforeClose", {
close: false,
reload: true,
});
});
} else {
this.loading = false;
this.msgWarning(res.msg)
}
}).catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.msgWarning('航班号或航班日期不能为空')
}
})
},
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 = {
......
<template>
<div>
<el-dialog title="航线优先级排序" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
@close="close" append-to-body center>
<el-form ref="routeOrder" label-width="auto" label-position="left" size="small" @submit.native.prevent>
<el-form-item label="航班号:" prop="fltNo">
<span>{{ fltNo }}</span>
......@@ -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>
......@@ -543,12 +543,30 @@ export default {
this.fltNoDisabled = true
this.infoForm.fltNo = this.$route.params.fltNo
this.infoForm.fltDate = this.$route.params.fltDate
this.infoForm.route = this.$route.params.route
if (this.$route.params.status) {
if (this.routeSatus == 'dmLog') {
this.infoForm.route = this.$route.params.route
this.getIdDimension(this.$route.params.id)
} else {
this.getRouteDimension({ fltNo: this.$route.params.fltNo, fltDate: this.$route.params.fltDate, route: this.$route.params.route ? this.$route.params.route : '', status: this.$route.params.status ? this.$route.params.status : '' })
let obj = {
fltNo: this.$route.params.fltNo,
fltDate: this.$route.params.fltDate,
status: this.$route.params.status ? this.$route.params.status : ''
}
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
this.infoForm.route = this.$route.params.route
obj.route = this.$route.params.route
obj.flightRouteListStr = this.$route.params.route
} else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
this.infoForm.route = ''
obj.route = ''
obj.flightRouteListStr = this.$route.params.route
} else {
obj.route = this.$route.params.route ? this.$route.params.route : ''
}
this.getRouteDimension(obj)
}
}
} else {
......@@ -572,7 +590,23 @@ export default {
if (this.routeSatus == 'dmLog') {
this.getIdDimension(this.$route.params.id)
} else {
this.getRouteDimension({ fltNo: this.$route.params.fltNo, fltDate: this.$route.params.fltDate, route: this.$route.params.route ? this.$route.params.route : '', status: '' })
let obj = {
fltNo: this.$route.params.fltNo,
fltDate: this.$route.params.fltDate,
status: this.$route.params.status ? this.$route.params.status : ''
}
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
obj.route = this.$route.params.route
obj.flightRouteListStr = this.$route.params.route
} else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
obj.route = ''
obj.flightRouteListStr = this.$route.params.route
} else {
obj.route = this.$route.params.route ? this.$route.params.route : ''
}
this.getRouteDimension(obj)
}
}
},
......@@ -614,11 +648,12 @@ export default {
this.infoForm.fltDate = res.data.list.ruleDate
this.infoForm.route = res.data.list.flightRoute
this.infoForm.list.push(this.dataHandle(res.data.list))
console.log(this.infoForm)
} else {
this.isEmpty = true
}
} else {
this.msgWarning("查询到数据!")
this.msgWarning("查询到数据!")
this.isEmpty = true
}
}).catch(err => {
......@@ -634,11 +669,15 @@ export default {
purposeOfFlightNo: val.fltNo,
flightDate: val.fltDate,
flightRoute: val.route,
flightRouteListStr: val.flightRouteListStr,
status: val.status ? val.status : ''
}
if (this.$route.params.handle != 'add') {
findDestinationFltRuleByFlightNo(obj).then(res => {
if (res.code === 200) {
if (res.data.routeList.length <= 0) {
this.msgWarning('未查询到航线信息!')
} else {
this.routeList = res.data.routeList
if (res.data.list.length > 0) {
//请求到数据
......@@ -700,8 +739,10 @@ export default {
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
flightRouteListStr: this.$route.params.route,
status: this.$route.params.status
}).then(response => {
this.routeList = response.data.routeList
if (response.data.list.length > 0) {
//查询到通用维度,去除id status,航线赋值,航线优先级赋值
if (this.routeSatus == 'flightInformationMaintenanceWhite Tail') {
......@@ -773,13 +814,18 @@ export default {
console.log(err)
})
} else {
//航线为空,提示未找到维度数据
if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
//航线为空
if (this.routeSatus == 'FlightRandConfig') {
if (this.routeSatus == 'FlightRandConfig') {
this.infoForm.fltDate = ''
}
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
flightRouteListStr: this.$route.params.route,
status: this.$route.params.status
}).then(response => {
this.routeList = response.data.routeList
if (response.data.list.length > 0) {
this.routeList.forEach(route => {
let routeStatus = 1
......@@ -817,6 +863,16 @@ export default {
this.isEmpty = true
console.log(err)
})
} else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
this.routeList.forEach((route) => {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
})
}
}
}
}
......@@ -848,6 +904,7 @@ export default {
})
})
} else {
this.msgWarning('未查询到航线信息!')
this.routeList = []
this.infoForm.list = []
}
......@@ -1189,3 +1246,26 @@ export default {
}
}
</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;
}
}
......
......@@ -55,7 +55,7 @@
</Tables>
<!-- 查看目的航班对话框 -->
<el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false"
:show-close="false" :append-to-body="true">
:show-close="false" :append-to-body="true" @close="cancelFlightDate">
<el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate">
<el-table-column type="index" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
......@@ -67,7 +67,7 @@
<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, scope.row.route)">查看配置维度
@click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">查看配置维度
</el-button>
</template>
</el-table-column>
......@@ -78,7 +78,7 @@
</el-dialog>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="55%" :append-to-body="true" :close-on-click-modal="false"
:show-close="false">
:show-close="false" @close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto" size="small">
<el-row>
<el-col :span="8">
......@@ -113,7 +113,7 @@
<el-col :span="24" style="margin-bottom: 5%">
<span style="color: #ff4949; margin-left: 10%">提示:配载航班之间请用分号分隔【符号不区分中英文】,例:CA1053;C7433</span><br />
<span
style="color: #ff4949; margin-left: 10%">提示:如果需要设置配载航班延迟或提前可以直接在目的航后加减【+-】天数。如:CA1053+1;CZ433-1</span>
style="color: #ff4949; margin-left: 10%">提示:如果需要设置配载航班延迟或提前可以直接在目的航后加减【+-】天数。如:CA1053+1;CZ433-1</span>
</el-col>
<el-col :span="24">
<el-form-item label="配载航班" prop="flightRank">
......@@ -268,7 +268,7 @@ export default {
},
methods: {
//跳转到查看,修改页面
handleClick(fltNo, handle, fltDate, route) {
handleClick(fltNo, handle, fltDate, route, status) {
this.openFlightDate = false;
let obj = {
id: ' ',
......@@ -277,8 +277,8 @@ export default {
fltDate: fltDate != null ? fltDate : ' ',
route: route,
routeStatus: 'FlightRandConfig',
status: ' ',
createStatus: 1
status: status,
createStatus: 1,
}
this.$router.push({
name: "FlightAllocConfigInfo",
......
......@@ -41,7 +41,7 @@
layout="total,prev, pager, next, jumper, ->" @tableSelect="tableSelection" @tableSelectAll="tableSelectAll">
</Tables>
<el-dialog title="新增预审航班" width="20%" :visible.sync="dialogVisible" :close-on-click-modal="false"
:show-close="false" :append-to-body="true">
:show-close="false" :append-to-body="true" @close="close">
<el-form ref="addForm" :model="newPre" label-width="auto" label-position="left" size="small" :rules="rules"
@submit.native.prevent>
<el-form-item label="航班号" prop="addFlitNo">
......@@ -230,4 +230,5 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss">
</style>
......
......@@ -5,11 +5,12 @@
<el-upload action="/caPreReviewImport/importFlight" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx"
class="upload-demo" v-hasPermi="['base:caImport:import']">
<el-button type="primary">点击上传</el-button>
<el-button icon="el-icon-upload2" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="downloadTempleate" v-hasPermi="['base:caImport:download']">下载模板</el-button>
<el-button type="primary" icon="el-icon-download" @click="downloadTempleate"
v-hasPermi="['base:caImport:download']">下载模板</el-button>
</el-form-item>
</el-form>
<div style="font-size: 12px; font-weight: 700">
......@@ -71,7 +72,6 @@ export default {
this.$message.error("下载失败");
}
});
},
uploadExcel(option) {
//上传excel
......
......@@ -12,11 +12,12 @@
<el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx"
class="upload-demo" v-hasPermi="['base:flightImport:importFlight']">
<el-button type="primary">点击上传</el-button>
<el-button icon="el-icon-upload2" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="downloadTempleate" v-hasPermi="['base:flightImport:exportExcel']">下载模板
<el-button type="primary" icon="el-icon-download" @click="downloadTempleate"
v-hasPermi="['base:flightImport:exportExcel']">下载模板
</el-button>
</el-form-item>
</el-form>
......
......@@ -47,21 +47,35 @@
</el-form-item>
</el-col>
</el-row>
<el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索
<el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading"
@click="handleQuery">搜索
</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['base:flightInfo:add']">
<el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:flightInfo:add']">
新增</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@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"
<el-button class="mt10" 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="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" @click="handleDelete"
v-hasPermi="['base:flightInfo:delete']">删除
<el-button class="mt10" 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 class="mt10" 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 class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="BlackListSwitchStatus(1)">黑名单自动配舱开启
</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="BlackListSwitchStatus(0)">黑名单自动配舱关闭
</el-button>
<el-button class="mt10" type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0"
@click="handleDelete" v-hasPermi="['base:flightInfo:delete']">删除
</el-button>
</el-form>
<Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader"
......@@ -83,7 +97,7 @@
</Tables>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true"
:show-close="false">
:show-close="false" @close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto" size="small">
<el-row>
<el-col :span="12">
......@@ -118,7 +132,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row style="margin-bottom:5px">
<el-col :span="12">
<el-form-item prop="route">
<template slot="label">
......@@ -130,12 +144,13 @@
</div>
</template>
<el-select ref="routeSelect" class="wid80" v-model="form.route" :disabled="formdisabled.route"
placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :multiple='routeMultiple'
:key="routeMultiple">
placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange" :loading="routeLoading"
:multiple='routeMultiple' :key="routeMultiple">
<el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
</el-option>
</el-select>
</el-form-item>
<div class="formTips" v-if="title == '修改航班信息'">注意!:移除航线,相对应日期级别航线维度会同时删除</div>
</el-col>
<el-col :span="12">
<el-form-item label="航班类型" prop="typeId">
......@@ -195,20 +210,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 +231,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 +257,12 @@
</el-col>
<el-col :span="12">
<el-form-item label="特殊规则预留总重量" prop="accountTotalWeight">
<el-input class="wid80" v-model="form.accountTotalWeight" disabled />
<el-input-number 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-number class="wid80" v-model="form.accountAllocatedWeight" disabled placeholder="配置特殊规则后计算" />
</el-form-item>
</el-col>
</el-row>
......@@ -258,7 +273,7 @@
</div>
</el-dialog>
<el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false"
:append-to-body="true">
:append-to-body="true" :close-on-press-escape="false">
<el-table :data="gridData">
<el-table-column property="fltNo" label="航班号"></el-table-column>
<el-table-column property="fltDate" label="航班日期"></el-table-column>
......@@ -278,6 +293,8 @@ import {
findFltCommonConf,
updateStatusBatch,
updateAutoPushBatch,
updateWhiteListSwitchBatch,
updateBlackListSwitchBatch
} from "@/api/findAllFltData";
import { getpreAudit } from '@/api/system/preReview.js'
import { queryRouteByFltNo } from '@/api/destinationFlight.js'
......@@ -307,7 +324,7 @@ export default {
fltNo: [
{
required: true,
message: "ACCS原航班号不能为空",
message: "航班号不能为空",
trigger: "blur",
},
],
......@@ -335,7 +352,7 @@ export default {
route: [
{
required: true,
message: "航班线路不能为空",
message: "航班路线不能为空",
trigger: "blur",
},
// {
......@@ -439,6 +456,7 @@ export default {
ishighPriceWeightPercent: true,
//遮罩层
loading: false,
routeLoading: false,
//遮罩层
loadingFlightDate: false,
//删除失败弹框
......@@ -491,6 +509,8 @@ export default {
//输入航班号后
blurfltNo() {
this.routeList = []
this.form.accountTotalWeight = 0
this.form.accountAllocatedWeight = 0
if (
this.form.fltNo != null &&
this.form.fltNo != undefined &&
......@@ -553,14 +573,17 @@ export default {
this.msgError(response.msg);
}
});
this.routeLoading = true
//获取航线
queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => {
this.routeLoading = false
if (res.code === 200) {
this.routeList = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.routeLoading = false
console.log(err)
})
}
......@@ -677,7 +700,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 +736,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 (
......@@ -764,8 +787,7 @@ export default {
this.formdisabled.fltDate = true;
//航班种类
this.formdisabled.kindId = true;
//航线
this.formdisabled.route = true
//根据ID查item
findFltById(row).then((response) => {
if (response.code == 200) {
......@@ -777,6 +799,31 @@ export default {
// this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false;
// 计算高低价可配
// this.LowHighAvailable();
//航线
this.selectOption.flightKindlist.forEach(item => {
if (item.id == this.form.kindId) {
if (item.chineseName.indexOf('White') >= 0) {
this.formdisabled.route = true
} else if (item.chineseName.indexOf('Purple') >= 0) {
this.formdisabled.route = false
this.routeMultiple = true
//获取航线
queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => {
this.routeLoading = false
if (res.code === 200) {
this.routeList = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.routeLoading = false
console.log(err)
})
}
}
})
this.ishighPriceWeightPercent = this.form.highLowPriceFlg === 1 ? false : true
} else {
this.msgError(response.msg);
}
......@@ -789,10 +836,10 @@ export default {
handle: 'update',
fltNo: val.fltNo,
fltDate: val.fltDate ? val.fltDate : null,
route: val.flightKindName != 'Purple Tail' ? val.route : ' ',
route: val.route,
routeStatus: 'flightInformationMaintenance' + val.flightKindName,
status: ' ',
createStatus: 1
createStatus: 1,
}
this.$router.push({
name: 'FlightAllocConfigInfo',
......@@ -890,7 +937,9 @@ export default {
//取消按钮
cancel() {
this.routeList = []
this.ishighPriceWeightPercent = true
this.routeMultiple = false
this.routeLoading = false
this.open = false;
this.findAllFltData();
this.findFltConditionData();
......@@ -973,6 +1022,46 @@ 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)
})
},
//黑名单配舱开关
BlackListSwitchStatus(val) {
let obj = {
updateIds: []
}
obj.status = val
this.ids.forEach(item => {
obj.updateIds.push(item.id)
})
updateBlackListSwitchBatch(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()
......@@ -1027,4 +1116,10 @@ export default {
.el-table__body tr.hover-row>td {
background-color: #d9ecff !important;
}
.formTips {
width: 85%;
color: #ff4949;
text-align: right;
}
</style>
......
<template>
<div>
<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
@close="close">
<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'">
<el-form-item label="货站名称" prop="goodsStation">
<el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称">
</el-input>
</el-form-item>
<el-form-item label="品名" prop="goodsList">
<el-input type="textarea" v-model="formData.goodsList" rows="4" maxlength="125"
placeholder="请输入品名,多个用“;”隔开">
</el-input>
</el-form-item>
</div>
<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="不限">
<el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" :key="item">
</el-option>
</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" 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 { batchAddBlackGoods, findStationName, uploadGoodsBlackExce } from "@/api/goodsStation"
import { downLoadXlsx } from "@/utils/zipdownload";
export default {
name: '',
props: {
open: {
type: Boolean,
default: false
},
openStatus: {
type: String,
default: 'add'
}
},
data() {
return {
formData: {
goodsStation: null,
uploadGoodsStation: null,
goodsList: '',
file: null
},
goodsStationList: [],
rules: {
goodsStation: [
{
required: true,
message: "货站名称不能为空",
trigger: "change",
},
],
goodsList: [
{
required: true,
message: "品名不能为空",
trigger: "blur",
},
],
uploadGoodsStation: [
{
required: true,
message: "货站名称不能为空",
trigger: "change",
},
],
file: [
{
required: true,
message: "文件不能为空",
trigger: "change",
},
]
},
fileList: [],
errorData: [],
goodsStationLoading: false,
downloading: false,
loading: false,
}
},
watch: {
open(val) {
if (val && this.openStatus == 'downloadExcel') {
this.getgoods()
}
}
},
methods: {
//查询货站
getgoods() {
this.goodsStationLoading = true
findStationName({ goodsType: 2 }).then(res => {
this.goodsStationLoading = false
if (res.code === 200) {
this.goodsStationList = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.goodsStationLoading = false
console.log(err)
})
},
//提交
submit() {
let obj = {
goodsList: []
}
obj.goodsStation = this.formData.goodsStation
this.formData.goodsList = this.formData.goodsList.replace(/;/g, ";")
if (this.formData.goodsList != null && this.formData.goodsList != '') {
this.formData.goodsList.split(';').forEach(item => {
if (item != null && item != '') {
obj.goodsList.push(item)
}
})
}
this.$refs['addForm'].validate(val => {
if (val) {
this.loading = true
batchAddBlackGoods(obj).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)
})
}
})
},
//选择文件
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
uploadGoodsBlackExce(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', query: { 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 => {
if (val) {
this.downloading = true
let data = { goodsStation: this.formData.goodsStation, goodsType: 2 }
downLoadXlsx("/goods/exportGoods", data, "黑名单货站表")
.then(() => {
this.downloading = false
this.close()
})
.catch(() => {
this.downloading = false
});
}
})
},
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')
}
}
}
</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>
<el-form class="form-header" ref="goodsStationForm" :model="selectionData" label-position="right"
label-width="auto" size="small" @submit.native.prevent>
<el-row>
<el-col :span="6">
<el-form-item label="货站名称">
<el-input class="formItem" v-model="selectionData.goodsStation" placeholder="请输入货站名称"
maxlength="50" clearable />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="品名">
<el-input class="formItem" v-model="selectionData.goodsName" placeholder="请输入品名" maxlength="50"
clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="display:flex;padding:10px 20px">
<el-button icon="el-icon-search" type="primary" :loading="loading" size="small" @click="selection(1)">查 询
</el-button>
<el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['base:goodsBlackStation:add']"
@click="add">新 增
</el-button>
<el-button icon="el-icon-delete" type="danger" size="small" v-hasPermi="['base:goodsBlackStation:delete']"
style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel">
删 除
</el-button>
<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-left:10px"
@click="downloadExcel">
黑名单导出
</el-button>
<el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
v-hasPermi="['base:goodsBlackStation:add']">黑名单导入</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"
:limitSize="selectionData.size" :page="selectionData.page" layout="total,prev, pager, next, jumper, ->"
:pageSizes="[100]" :height="tableHeight" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
@currentChange="currentChange">
<template slot="optionColumn">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['base:goodsBlackStation:delete']" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</template>
</Tables>
<Dialog :open="open" :openStatus="openStatus" @close="close" />
</div>
</template>
<script>
import { downLoadTemplate } from "@/api/flightInfoImport";
import { batchDeleteGoods, searchGoods } from "@/api/goodsStation"
import Dialog from './dialog.vue'
export default {
name: 'GoodsBlackStation',
components: {
Dialog,
},
data() {
return {
selectionData: {
goodsStation: '',
goodsName: '',
goodsType: 2,
size: 20,
page: 1
},
tableData: [],
tableHeader: this.tableHeaders['goodsStation'],
checkData: [],
fileList: [],
errorData: [],
tableHeight: null,
totalCount: 0,
openStatus: '',
loading: false,
open: false,
}
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200
this.selection(1)
},
watch: {
$route(to, from) {
if (to.name == 'GoodsStation') {
this.selection()
}
}
},
methods: {
//查询
selection(val) {
this.tableData = []
this.checkData = []
this.loading = true
if (val === 1) {
this.selectionData.page = 1
}
searchGoods(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.open = true
this.openStatus = 'add'
},
//删除
del(val) {
this.$confirm("是否要删除这条记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.deleteGoods([val.id])
}).catch(() => {
})
},
//批量删除
batchDel() {
let arr = []
this.checkData.forEach(item => {
arr.push(item.id)
})
this.$confirm("是否要删除这些记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.deleteGoods(arr)
}).catch(() => {
})
},
//删除请求
deleteGoods(val) {
batchDeleteGoods(val).then(res => {
if (res.code === 200) {
this.msgSuccess('删除成功!')
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//导出
downloadExcel() {
this.open = true
this.openStatus = 'downloadExcel'
},
//复选
tableSelect(val) {
this.checkData = val.selection
},
//全选
tableSelectAll(val) {
this.checkData = val
},
//分页
currentChange(val) {
this.selectionData.page = val.page
this.selection()
},
//上传excel
uploadExcel() {
this.openStatus = 'uploadExcel'
this.open = true
},
//下载模板
downloadTempleate() {
downLoadTemplate('goodsStation').then((res) => {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = '黑名单货物品名模板.xlsx'; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click(); //执行下载
URL.revokeObjectURL(link.href); //释放url
document.body.removeChild(link); //释放标签
} else {
this.$message.error("下载失败");
}
})
},
handleRemove(file, fileList) {
//清掉上传的文件
this.errorData = [];
this.fileList = [];
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.uploadExcel(file);
},
selectLog() {
this.$router.push({ name: 'GoodsUploadLog', params: { type: 2 } })
},
close() {
this.open = false
this.openStatus = ''
this.selection(1)
},
resultClose() {
this.resultOpen = false
this.selection(1)
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<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
@close="close">
<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,28 +16,44 @@
</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="不限">
<el-option v-for="(item, index) in goodsStationList" :label="item" :value="item"
:key="item">
<el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" :key="item">
</el-option>
</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 +72,9 @@ export default {
return {
formData: {
goodsStation: null,
goodsList: ''
uploadGoodsStation: null,
goodsList: '',
file: null
},
goodsStationList: [],
rules: {
......@@ -73,7 +92,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,
......@@ -90,7 +125,7 @@ export default {
//查询货站
getgoods() {
this.goodsStationLoading = true
findStationName().then(res => {
findStationName({ goodsType: 1 }).then(res => {
this.goodsStationLoading = false
if (res.code === 200) {
this.goodsStationList = res.data.list
......@@ -104,11 +139,17 @@ export default {
},
//提交
submit() {
let obj = {}
let obj = {
goodsList: []
}
obj.goodsStation = this.formData.goodsStation
this.formData.goodsList = this.formData.goodsList.replace(/;/g, ";")
if (this.formData.goodsList != null && this.formData.goodsList != '') {
obj.goodsList = this.formData.goodsList.split(';')
this.formData.goodsList.split(';').forEach(item => {
if (item != null && item != '') {
obj.goodsList.push(item)
}
})
}
this.$refs['addForm'].validate(val => {
if (val) {
......@@ -128,13 +169,59 @@ 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', query: { 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 => {
if (val) {
this.downloading = true
let data = { goodsStation: this.formData.goodsStation }
downLoadXlsx("/goods/exportGoods", data, "货站表")
let data = { goodsStation: this.formData.goodsStation, goodsType: 1 }
downLoadXlsx("/goods/exportGoods", data, "白名单货站表")
.then(() => {
this.downloading = false
this.close()
......@@ -146,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')
}
......@@ -162,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) {
this.logTabelData = []
if (val === 1) {
this.logData.page = 1
}
this.loading = true
userImportLog(this.logData).then(res => {
this.loading = false
if (res.code === 200) {
res.data.list.forEach(item => {
if (this.$route.params.type == 1 && item.module == '白名单导入') {
this.logTabelData.push(item)
} else if (this.$route.params.type == 2 && item.module == '黑名单导入') {
this.logTabelData.push(item)
}
})
this.logCount = this.logTabelData.length
} 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-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
v-hasPermi="['base:goodsStation:add']">白名单导入</el-button>
<el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
</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>
</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 {
......@@ -73,6 +72,7 @@ export default {
selectionData: {
goodsStation: '',
goodsName: '',
goodsType: 1,
size: 20,
page: 1
},
......@@ -189,29 +189,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() {
......@@ -219,7 +199,7 @@ export default {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = '货物品名模板.xlsx'; //a标签添加属性
link.download = '白名单货物品名模板.xlsx'; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
......@@ -245,6 +225,9 @@ export default {
this.fileList.push(file);
this.uploadExcel(file);
},
selectLog() {
this.$router.push({ name: 'GoodsUploadLog', params: { type: 1 } })
},
close() {
this.open = false
this.openStatus = ''
......@@ -260,16 +243,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="open" width="25%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
append-to-body center @close="close">
<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>
<el-form-item label="货站名称" prop="goodsStation">
<el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称">
</el-input>
</el-form-item>
<el-form-item label="航班" prop="flightList">
<el-input type="textarea" v-model="flightList" rows="4" maxlength="125" placeholder="请输入航班,多个用“;”隔开">
<el-form-item label="航班号" prop="flightList">
<el-input type="textarea" v-model="flightList" rows="4" maxlength="125"
placeholder="请输入航班号,多个用“;”隔开">
</el-input>
</el-form-item>
</el-form>
......@@ -62,11 +63,17 @@ export default {
methods: {
//提交
submit() {
let obj = {}
let obj = {
flightList: []
}
obj.goodsStation = this.formData.goodsStation
if (this.formData.flightList != null && this.formData.flightList != '') {
this.formData.flightList = this.formData.flightList.toUpperCase()
obj.flightList = this.formData.flightList.split(';')
this.formData.flightList.split(';').forEach(item => {
if (item != null && item != '') {
obj.flightList.push(item)
}
})
}
this.$refs['addForm'].validate(val => {
if (val) {
......
<template>
<div>
<el-dialog title="查看日志" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false"
:show-close="false" :append-to-body="true" top="2vh">
:show-close="false" :append-to-body="true" top="2vh" @close="close">
<el-form class="form-header" label-position="right" label-width="auto" size="small">
<el-row>
<el-col :span="4">
......
<template>
<div class="cargoPage">
<el-form ref="cargoForm" class="form-header" label-position="right" label-width="auto" size="small"
:model="formData">
<el-form ref="cargoForm" class="form-header" label-position="right" label-width="auto" size="small" :model="formData">
<el-row type="flex" style="flexWrap: wrap !important">
<el-col :span="6">
<el-form-item label="配舱航班日期">
......@@ -139,30 +138,53 @@
</div>
</template>
<el-select class="formItem" v-model="formData.cargoPlaneRoute" placeholder="不限"
:disabled="routeList.length == 0" clearable @change="routeSelectChange"
:key="formData.cargoPlaneRoute">
:disabled="routeList.length == 0" clearable @change="routeSelectChange" :key="formData.cargoPlaneRoute">
<el-option v-for="(item, index) in routeList" :label="item" :value="item" :key="item">
<Tooltips :content="item" :refName="item"></Tooltips>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="预审状态">
<el-select v-model="formData.preStatus" placeholder="不限" class="formItem" clearable multiple>
<el-option v-for="item in findConditionData.preQualificationStatus" :label="item == '' ? '非预审' : item"
:value="item"> </el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="发件人账号">
<el-input ref='userInfo' type="textarea" v-model="formData.shipperAccount" class="formItem"
placeholder="请输入发件人账号(;间隔)" :rows="4" :maxlength="12000" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
<div class="pl10 mt20">
<el-button type="primary" icon="el-icon-search" size="small" :loading="tableLoading" @click="select(0)">查询
</el-button>
<el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="small" @click="xlse(0)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
<el-button v-hasPermi="['base:cargo:export']" icon="el-icon-download"
:type="downLoadingTip.downloading ? 'warning' : 'primary'" size="small" @click="xlse(0)"
:disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="small" @click="xlse(1)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
<el-button v-hasPermi="['base:cargo:export']" icon="el-icon-download"
:type="downLoadingTip.downloading ? 'warning' : 'primary'" size="small" @click="xlse(1)"
:disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']"
@click="release">释放舱位</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>
......@@ -175,8 +197,8 @@
<el-button class="mr20" icon="el-icon-search" size="mini" @click="formShow = !formShow" circle></el-button>
</el-tooltip>
<el-tooltip content="表格设置" placement="top">
<HeaderSetting tableName="cargo" class="mr20" style="float:right;line-height: 48px;"
@close="headerSetClose"></HeaderSetting>
<HeaderSetting tableName="cargo" class="mr20" style="float:right;line-height: 48px;" @close="headerSetClose">
</HeaderSetting>
</el-tooltip>
</div>
</div>
......@@ -192,8 +214,8 @@
}}<i class="el-icon-link"></i> </el-link>
</template>
</Tables>
<el-dialog title="舱位释放结果" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false"
:show-close="false" :append-to-body="true">
<el-dialog title="舱位释放结果" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false" :show-close="false"
:append-to-body="true" @close="close">
<el-table :data="selectTable" size="mini" border stripe highlight-current-row style="width: 100%">
<el-table-column type="index" label="序号" align="center">
</el-table-column>
......@@ -206,18 +228,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 {
......@@ -238,6 +263,7 @@ export default {
typeId: null,
statusId: null,
serviceTypeId: null,
shipperAccount: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
......@@ -248,6 +274,7 @@ export default {
cargoPlaneStart: null,
cargoPlaneEnd: null,
cargoPlaneRoute: null,
preStatus: undefined,
limitStart: 1,
limitSize: 100,
}, //表单数据
......@@ -306,6 +333,7 @@ export default {
tableData: [], //表格数据
cargoLog: {},
routeList: [],
preQualificationStatusList: [],
allWeight: 0,//总重量
allQty: 0,//总件数
shiftKey: false,
......@@ -328,6 +356,7 @@ export default {
tableHeight: null,
dialogVisible: false,
openView: false,
openTransfer: false,
formShow: true, //菜单隐藏
};
},
......@@ -338,6 +367,7 @@ export default {
} else {
this.tableHeader = this.tableHeaders['cargo']
}
// this.select(0,'create')
},
activated() {
......@@ -362,6 +392,8 @@ export default {
typeId: null,
statusId: null,
serviceTypeId: null,
shipperAccount: null,
shipperAccountList: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
......@@ -379,15 +411,15 @@ export default {
this.formData.cargoPlaneEnd = this.$route.params.fltDate
this.formData.cargoPlaneNo = this.$route.params.fltNo
this.formData.cargoPlaneRoute = this.$route.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
this.planeNoChange(this.formData.cargoPlaneNo.split(';'))
this.select(0, 'activated')
} else {
//否则请求原页面缓存状态
if (this.$store.state.tagsView.cachedViews.length > 0) {
this.$store.state.tagsView.cachedViews.forEach(item => {
if (item === 'QueryCargo') {
this.findCondition()
this.totalCount > 0 ? this.select() : ''
this.select()
}
})
}
......@@ -414,44 +446,46 @@ export default {
watch: {
$route: {
handler(to, from) {
if (to.name === 'Index') {
this.formData = {
fltDateStart: "",
fltDateEnd: "",
prematchFltDateStart: "",
prematchFltDateEnd: "",
createTimeStart: null,
createTimeEnd: null,
pickUpDate: null,
hasFlight: null,
waybillNo: "",
siteName: "",
fltNo: "",
mawbCode: "",
ursa: "",
typeId: null,
statusId: null,
serviceTypeId: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
dataSources: "",
customsReceiptStatusId: null,
big: null,
cargoPlaneNo: null,
cargoPlaneStart: null,
cargoPlaneEnd: null,
limitStart: 1,
limitSize: 100,
}
this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate]
this.formData.cargoPlaneStart = from.params.fltDate
this.formData.cargoPlaneEnd = from.params.fltDate
this.formData.cargoPlaneNo = from.params.fltNo
this.formData.cargoPlaneRoute = from.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
}
// if (to.name === 'Index') {
// this.formData = {
// fltDateStart: "",
// fltDateEnd: "",
// prematchFltDateStart: "",
// prematchFltDateEnd: "",
// createTimeStart: null,
// createTimeEnd: null,
// pickUpDate: null,
// hasFlight: null,
// waybillNo: "",
// siteName: "",
// fltNo: "",
// mawbCode: "",
// ursa: "",
// typeId: null,
// statusId: null,
// serviceTypeId: null,
// shipperAccount: null,
// shipperAccountList: null,
// allocationTypeId: null,
// kindToAllocFlightId: null,
// historyAllocaCargoTypeId: null,
// dataSources: "",
// customsReceiptStatusId: null,
// big: null,
// cargoPlaneNo: null,
// cargoPlaneStart: null,
// cargoPlaneEnd: null,
// limitStart: 1,
// limitSize: 100,
// }
// this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate]
// this.formData.cargoPlaneStart = from.params.fltDate
// this.formData.cargoPlaneEnd = from.params.fltDate
// this.formData.cargoPlaneNo = from.params.fltNo
// this.formData.cargoPlaneRoute = from.params.route
// this.planeNoChange(this.formData.cargoPlaneNo)
// this.select(0, 'watch')
// }
}
},
formShow(val, oldVal) {
......@@ -473,7 +507,8 @@ export default {
});
},
//查询
async select(val) {
async select(val, type) {
this.selectTable = []
this.tableData = [];
this.allWeight = 0;
this.allQty = 0;
......@@ -506,10 +541,9 @@ export default {
.catch(() => {
this.tableLoading = false;
});
this.$refs.newTables.clearTable();
this.cargoTotal();
},
//释放
//释放
release() {
let idList = []
this.selectTable.map(item => {
......@@ -532,7 +566,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,不能释放。' : ''
......@@ -546,6 +580,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
......@@ -597,6 +651,12 @@ export default {
if (this.formData.hasFlight == "") {
this.formData.hasFlight = null
}
if (this.formData.shipperAccount != null && this.formData.shipperAccount != '') {
this.formData.shipperAccountList = this.formData.shipperAccount.split(';')
} else {
this.formData.shipperAccountList = null
}
this.formData.limitStart = this.limitStart;
this.formData.limitSize = 100;
},
......@@ -632,7 +692,13 @@ export default {
},
//配载航班号获取航线
planeNoChange(val) {
getFlightsRoutes(val.split(';')).then(res => {
let arr = []
if (typeof val != 'object') {
arr = val.split(';')
} else {
arr = val
}
getFlightsRoutes(arr).then(res => {
if (res.code === 200) {
this.routeList = res.data
} else {
......@@ -723,6 +789,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" @close="dialogBeforeClose">
<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,
},
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', query: { 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', query: { 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
......@@ -44,7 +44,7 @@
<el-row class="card2">
<el-col :span="1" v-for="item in fltBox">
<div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate, route: '' })"
:style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 100 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }">
:style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }">
<div class="fltName">{{ item.fltNo }}</div>
<div class="fltWeight">{{ (item.percentage == 0 ? 0 : ((item.percentage) * 100).toFixed(2)) + '%' }}
</div>
......@@ -59,7 +59,7 @@
@currentChange="currentChange" @rowClick="rowClick">
<template v-slot:percentage="scope">
<el-progress stroke-width="100"
:color="(scope.row.percentage * 100).toFixed(2) >= 100 ? '#13ce66' : (scope.row.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949'"
:color="(scope.row.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (scope.row.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949'"
:stroke-width="18"
:percentage="scope.row.percentage == 0 ? 0 : Number((scope.row.percentage * 100).toFixed(2))">
</el-progress>
......
<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)
});
}
});
......
<template>
<div style="margin: 20px">
<el-form ref="selectForm" :model="formData" class="form-header" label-position="right" label-width="auto"
size="small">
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="航班号">
<el-input type="text" v-model="formData.fltNo" placeholder="请输入航班号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="地区">
<el-input type="text" v-model="formData.area" placeholder="请输入地区"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading"
@click="selection(1)">
查询</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-row>
<el-col :span="6">
<el-form-item label="生效日期" prop="beginDate" :rules="rules">
<el-date-picker class="formItem" v-model="formData.beginDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList"
accept=".xlsx" class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"
:disabled="formData.beginDate == null">
<el-button type="primary" icon="el-icon-upload2" size="small" @click="upload">导入Excel
</el-button>
</el-upload>
</el-col>
</el-row>
</el-col>
</el-row>
</el-form>
<div style="width:100%;display: flex;margin-bottom:10px">
<!-- <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading" @click="selection(1)">
查询</el-button> -->
<el-button type="primary" icon="el-icon-download" size="small" @click="downloadTempleate"
v-hasPermi="['base:flightImport:exportExcel']">
下载模板
</el-button>
</div>
<Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true'
:height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"
:totalCount="total" :loading="tableLoading" @currentChange="currentChange">">
</Tables>
</div>
</template>
<script>
import {
downLoadTemplate,
importFlightDestination,
searchFlightDestination
} from "@/api/preMdeConfig";
import settings from "@/settings"
export default {
name: "FlightToArea",
data() {
return {
formData: {
fltNo: null,
area: null,
beginDate: null,
page: 1,
},
tableData: [],
errorData: [],
tableHeaders: this.tableHeaders['flightToArea'],
tableHeight: null,
total: 0,
flightType: [],
form: {
type: "",
region: "",
},
rules: {
validator: (rule, value, callback) => {
if (this.formData.beginDate == null) {
callback(new Error('上传前请选择生效时间'))
}
},
trigger: 'change'
},
fileList: [],
tableLoading: false,
};
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170
this.selection(1)
},
activated() {
},
methods: {
selection(val) {
this.tableData = []
this.tableLoading = true
if (val === 1) {
this.formData.page = 1
}
let obj = {
fltNo: this.formData.fltNo,
area: this.formData.area,
page: this.formData.page,
size: 20
}
if (obj.area == '') {
obj.area = null
}
searchFlightDestination(obj).then(res => {
this.tableLoading = false
if (res.code === 200) {
this.tableData = res.data.list
this.total = res.data.total
}
}).catch(err => {
this.tableLoading = false
console.log(err)
})
},
downloadTempleate() {
let downloadType = "flightDestination";
let fileName = "航班目的地模板.xlsx";
downLoadTemplate(downloadType).then((res) => {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = fileName; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click(); //执行下载
URL.revokeObjectURL(link.href); //释放url
document.body.removeChild(link); //释放标签
} else {
this.$message.error("下载失败");
}
});
},
uploadExcel(option) {
//上传excel
const file = option.file;
importFlightDestination(file, this.formData.beginDate).then((res) => {
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
this.msgWarning(res.msg);
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', query: { data: this.errorData, from: 'FlightToArea' } })
} else {
this.msgWarning(res.msg);
}
} else {
this.msgSuccess("导入成功");
this.selection(1)
}
});
},
handleRemove(file, fileList) {
//清掉上传的文件
this.fileList = [];
this.selection()
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.uploadExcel(file);
},
currentChange(val) {
this.formData.page = val.page
this.selection()
},
upload() {
this.$refs.selectForm.validateField('beginDate')
}
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.upload-demo {
display: flex;
margin-left: 10px;
float: none !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
vertical-align: top;
}
</style>
\ No newline at end of file
<template>
<div>
<el-form ref="preMdeSelectForm" class="form-header" label-position="right" label-width="auto" size="small"
:model="formData">
<el-row>
<el-col :span="6">
<el-form-item label="区域">
<el-select class="formItem" v-model="formData.regionArray" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectData.region" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="地区">
<el-select class="formItem" v-model="formData.areaArray" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectData.area" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申报类别">
<el-select class="formItem" v-model="formData.typeName" filterable clearable placeholder="不限">
<el-option v-for="item in selectData.declarationCategory" :label="item.chineseName"
:value="item.chineseName" :key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="服务类型">
<el-select class="formItem" v-model="formData.serviceTypeArray" filterable clearable
placeholder="不限">
<el-option v-for="item in selectData.serviceType" :label="item.chineseName"
:value="item.chineseName" :key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="运单号">
<el-input type="textarea" v-model="formData.waybillNo" class="formItem"
placeholder="请输入运单号(回车间隔)" :rows="4" :maxlength="12000" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="URSA">
<el-input type="textarea" v-model="formData.ursa" class="formItem" placeholder="S_;P_;E2"
:rows="4" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK"
:rows="4" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
<el-date-picker class="formItem" type="daterange" v-model="accsDate" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" :value-format="valueFormat" clearable>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input type="text" class="formItem" v-model="formData.flightNo" placeholder="请输入航班号"
clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS航线">
<el-input type="text" class="formItem" v-model="formData.flightRoute" placeholder="请输入航线"
clearable>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="ml20 mb20">
<el-button type="primary" icon="el-icon-search" size="small" :loading="tableLoading" @click="select(0)">查询
</el-button>
<el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
:loading="downloading" @click="downloadExcel" v-hasPermi="['base:preMde:export']">
导出全部查询结果
</el-button>
<span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
</div>
<Tables ref="preMdeSelectTables" ductName="preMdeSelect" :data="tableData" :headerData="tableHeader"
:selection="false" :order="true" :totalCount="totalCount" :pageSizes="[100]" :loading="tableLoading"
:limitSize="formData.size" :height="tableHeight" @currentChange="currentChange">
</Tables>
</div>
</template>
<script>
import {
findDmPreMdeData,
findDmPreMdeCondition
} from "@/api/preMdeConfig";
import { downLoadXlsx } from "@/utils/zipdownload";
export default {
name: 'PreMdeSelect',
data() {
return {
formData: {
regionArray: [],
areaArray: [],
serviceTypeArray: null,
page: 1,
size: 100,
},
selectData: {
serviceType: [],
declarationCategory: [],
region: [],
area: []
},
tableData: [],
tableHeader: this.tableHeaders['preMdeSelect'],
accsDate: [],
valueFormat: "yyyy-MM-dd",
tableHeight: null,
tableLoading: false,
downloading: false,
totalCount: 0,
}
},
created() {
this.selectOptionData()
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150
this.select(0)
},
watch: {
$route(to, from) {
if (to.name == 'PreMdeSelect') {
this.selection()
}
}
},
methods: {
//查询条件
selectOptionData() {
findDmPreMdeCondition().then(res => {
if (res.code == 200) {
this.selectData = res.data
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//查询
select(val) {
this.tableLoading = true
let obj = JSON.parse(JSON.stringify(this.datainfo(this.formData)))
if (this.accsDate != null && this.accsDate.length > 0) {
obj.fltDateStart = this.accsDate[0]
obj.fltDateEnd = this.accsDate[1]
} else {
obj.fltDateStart = null
obj.fltDateEnd = null
}
findDmPreMdeData(obj).then(res => {
this.tableLoading = false
if (res.code == 200) {
this.tableData = res.data.list
this.totalCount = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.tableLoading = false
console.log(err)
})
},
//导出
downloadExcel() {
this.downloading = true
let data = this.datainfo(this.formData)
if (this.accsDate != null && this.accsDate.length > 0) {
data.fltDateStart = this.accsDate[0]
data.fltDateEnd = this.accsDate[1]
} else {
data.fltDateStart = null
data.fltDateEnd = null
}
downLoadXlsx("/dmPreMde/excel", data, "Pre-MDE查询表")
.then(() => {
this.downloading = false
})
.catch(() => {
this.downloading = false
});
},
//数据处理
datainfo(val) {
if (val.ursa && val.ursa != null && val.ursa != '') {
val.ursa = val.ursa.toUpperCase().replace(/;/g, ';')
}
if (val.siteName && val.siteName != null && val.siteName != '') {
val.siteName = val.siteName.toUpperCase().replace(/;/g, ';')
}
if (val.flightNo && val.flightNo != null && val.flightNo != '') {
val.flightNo = val.flightNo.toUpperCase()
}
if (val.flightRoute && val.flightRoute != null && val.flightRoute != '') {
val.flightRoute = val.flightRoute.toUpperCase()
}
if (val.regionArray != null && val.regionArray.length == 0) {
val.regionArray = null
}
if (val.areaArray != null && val.areaArray.length == 0) {
val.areaArray = null
}
if (val.serviceTypeArray != null && val.serviceTypeArray.length == 0) {
val.serviceTypeArray = null
}
return val
},
//翻页
currentChange(val) {
this.formData.page = val.page
this.select()
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<el-form ref="reportForm" class="form-header" :model="formData" label-position="right" label-width="auto"
size="small">
<el-row>
<el-col :span="4">
<el-form-item label="取件日期">
<el-date-picker class="formItem" v-model="formData.pickUpDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="区域">
<el-select v-model="formData.regionArray" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.region" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="地区">
<el-select v-model="formData.areaArray" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.area" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="URSA">
<el-select v-model="formData.ursas" class="formItem" filterable multiple clearable placeholder="不限">
<el-option v-for="item in selectOptionList.ursaList" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="Service Type">
<el-select v-model="formData.serviceTypeArray" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.serviceType" :label="item.chineseName"
:value="item.chineseName" :key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="ml20 mt20 mb20">
<el-button type="primary" icon="el-icon-search" size="small" :loading="loading" @click="select(0)">查 询
</el-button>
</div>
<div style="padding:10px">
<el-form label-position="right" label-width="auto" size="small">
<el-form-item label="类型">
<el-radio-group v-model="formData.dimensionName" @change="typeChange">
<el-radio label="region">区域</el-radio>
<el-radio label="area">地区</el-radio>
<el-radio label="ursa">URSA</el-radio>
<el-radio label="serviceType">Service Type</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div v-for="(item, index) in barChartData" :key="index">
<Chart :className="'chart' + index.toString()" :chartData="item" height="350px" style="margin-bottom:10px"
:loading="loading" />
</div>
</div>
</div>
</template>
<script>
import Chart from '@/components/echarts/echarts-series.vue'
import { findDmPreMdeCondition, findPreMdeReport } from "@/api/preMdeConfig";
export default {
components: {
Chart
},
data() {
return {
formData: {
ursas: [],
serviceTypeArray: [],
regionArray: [],
areaArray: [],
pickUpDate: null,
dimensionName: 'region',
},
tableHeader: this.tableHeaders['report'],
barChartData: [],
selectOptionList: {
ursaList: ["A_", "B_", "C_", "D_", "E_", "F_", "G_", "H_", "I_", "J_", "K_", "L_", "M_", "N_", "O_", "P_", "Q_", "R_", "S_", "T_", "U_", 'V_', "W_", "X_", "Y_", "Z_", '1_', '2_', '3_', '4_', '5_', '6_', '7_', '8_', '9_'],
serviceType: [],
region: [],
area: [],
},
tableHeight: null,
totalCount: 10,
loading: false
}
},
created() {
this.formData.pickUpDate = this.nowDate()
this.getOption()
this.select()
},
activated() {
this.select()
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.reportForm.$el.offsetHeight - 240
},
methods: {
getOption() {
findDmPreMdeCondition().then(res => {
if (res.code === 200) {
this.selectOptionList.serviceType = res.data.serviceType
this.selectOptionList.region = res.data.region
this.selectOptionList.area = res.data.area
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
select(val) {
this.loading = true
let obj = {}
if (this.formData.ursas.length > 0) {
obj.ursas = this.formData.ursas
} else {
obj.ursas = null
}
if (this.formData.serviceTypeArray.length > 0) {
obj.serviceTypeArray = this.formData.serviceTypeArray
} else {
obj.serviceTypeArray = null
}
if (this.formData.regionArray.length > 0) {
obj.regionArray = this.formData.regionArray
} else {
obj.regionArray = null
}
if (this.formData.areaArray.length > 0) {
obj.areaArray = this.formData.areaArray
} else {
obj.areaArray = null
}
obj.pickUpDate = this.formData.pickUpDate
obj.dimensionName = this.formData.dimensionName
findPreMdeReport(obj).then(res => {
this.loading = false
if (res.code === 200) {
if (res.data.dimensionList && res.data.dimensionList.length > 0) {
this.dataHandle(res.data.dimensionList, 8)
} else {
this.msgWarning('未查询到数据')
}
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
typeChange(val) {
this.select()
},
dataHandle(val, num) {
this.barChartData = []
let obj = {
names: [],
data1: [],
data2: [],
data3: []
}
val.forEach(item => {
obj.names.push(item.name)
obj.data1.push(item.totalPcs)
obj.data2.push(item.total)
obj.data3.push(item.totalWeight)
})
this.arrList(obj.names, num).forEach((item, index) => {
let objItem = {
names: [],
data1: [],
data2: [],
data3: [],
}
objItem.names = item
objItem.data1 = this.arrList(obj.data1, num)[index]
objItem.data2 = this.arrList(obj.data2, num)[index]
objItem.data3 = this.arrList(obj.data3, num)[index]
this.barChartData.push(objItem)
})
},
arrList(list, last) {
let index = 0
let arr = []
if (list.length < last) {
arr.push(list)
} else {
while (index < list.length) {
arr.push(list.slice(index, index += last))
index++
}
}
return arr
},
currentChange(val) {
this.formData.page = val.page
this.select()
}
}
}
</script>
<style></style>
\ No newline at end of file
......@@ -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> -->
......@@ -31,17 +33,16 @@ export default {
}
},
created() {
this.tableData = this.$route.params.data
this.fromRoute = this.$route.params.from
this.tableData = this.$route.query.data
this.fromRoute = this.$route.query.from
},
wactch: {
dialogVisible(val) {
if (val) {
}
}
activated() {
this.tableData = this.$route.query.data
this.fromRoute = this.$route.query.from
},
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
......@@ -53,6 +54,4 @@ export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<style lang="scss" scoped></style>
\ No newline at end of file
......
<template>
<div style="margin: 20px">
<el-form ref="selectForm" :model="formData" class="form-header" label-position="right" label-width="auto"
size="small">
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="URSA">
<el-input type="textarea" v-model="formData.ursa" placeholder="URSA之间用分号分隔,例:F2;F3;P_" rows="2">
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="地区">
<el-input type="text" v-model="formData.area" placeholder="请输入地区"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading"
@click="selection(1)">
查询</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-row>
<el-col :span="6">
<el-form-item label="生效日期" prop="beginDate" :rules="rules">
<el-date-picker class="formItem" v-model="formData.beginDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList"
accept=".xlsx" class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"
:disabled="formData.beginDate == null">
<el-button type="primary" icon="el-icon-upload2" size="small" @click="upload">导入Excel
</el-button>
</el-upload>
</el-col>
</el-row>
</el-col>
</el-row>
</el-form>
<div style="width:100%;display: flex;margin-bottom:10px">
<!-- <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading" @click="selection(1)">
查询</el-button> -->
<el-button type="primary" icon="el-icon-download" size="small" @click="downloadTempleate"
v-hasPermi="['base:flightImport:exportExcel']">
下载模板
</el-button>
</div>
<Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true'
:height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"
:totalCount="total" :loading="tableLoading" @currentChange="currentChange"
layout="total,prev, pager, next, jumper, ->">
</Tables>
</div>
</template>
<script>
import {
downLoadTemplate,
importUrsaDestination,
searchUrsaDestination
} from "@/api/preMdeConfig";
import settings from "@/settings"
export default {
name: "UrsaToArea",
data() {
return {
formData: {
ursa: null,
area: null,
page: 1,
},
tableData: [],
errorData: [],
tableHeaders: this.tableHeaders['ursaToArea'],
tableHeight: null,
total: 0,
flightType: [],
form: {
type: "",
region: "",
},
rules: {
validator: (rule, value, callback) => {
if (this.formData.beginDate == null) {
callback(new Error('上传前请选择生效时间'))
}
},
trigger: 'change'
},
fileList: [],
tableLoading: false,
};
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170
this.selection(1)
},
activated() {
},
methods: {
selection(val) {
this.tableData = []
this.tableLoading = true
if (val === 1) {
this.formData.page = 1
}
let obj = {
area: this.formData.area,
page: this.formData.page,
size: 20
}
if (this.formData.ursa && this.formData.ursa != null && this.formData.ursa != '') {
obj.ursa = this.formData.ursa.split(';')
} else {
obj.ursa = null
}
if (obj.area == '') {
obj.area = null
}
searchUrsaDestination(obj).then(res => {
this.tableLoading = false
if (res.code === 200) {
this.tableData = res.data.list
this.total = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.tableLoading = false
console.log(err)
})
},
downloadTempleate() {
let downloadType = "ursaDestination";
let fileName = "URSA目的地模板.xlsx";
downLoadTemplate(downloadType).then((res) => {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = fileName; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click(); //执行下载
URL.revokeObjectURL(link.href); //释放url
document.body.removeChild(link); //释放标签
} else {
this.$message.error("下载失败");
}
});
},
uploadExcel(option) {
//上传excel
const file = option.file;
importUrsaDestination(file, this.formData.beginDate).then((res) => {
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
this.msgWarning(res.msg);
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', query: { data: this.errorData, from: 'FlightInformationImport' } })
} else {
this.msgWarning(res.msg);
}
} else {
this.msgSuccess("导入成功");
this.selection(1)
}
});
},
handleRemove(file, fileList) {
//清掉上传的文件
this.fileList = [];
this.selection()
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.uploadExcel(file);
},
currentChange(val) {
this.formData.page = val.page
this.selection()
},
upload() {
this.$refs.selectForm.validateField('beginDate')
}
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.upload-demo {
display: flex;
margin-left: 10px;
float: none !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
vertical-align: top;
}
</style>
\ No newline at end of file
<template>
<div>
<el-dialog :title="title" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
@close="close" append-to-body center>
<el-form ref="add" :model="newDictionary" label-width="auto" label-position="left" size="small"
:rules="rules" @submit.native.prevent>
<!-- 新增虚拟航班 -->
......@@ -26,13 +26,16 @@
<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">
<el-input type="text" v-model="newDictionary.route" placeholder="请输入航线" maxlength="40">
</el-input>
</el-form-item>
<el-form-item>
<div style="color:#ff4949;line-height: 30px;">注意:此处不能添加虚拟航班!</div>
</el-form-item>
</div>
<div v-else-if="status == 'sort'">
<el-form-item label="航班号" prop="fltNo">
......@@ -81,7 +84,8 @@
</template>
<script>
import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, queryRoute, orderRoute } from '@/api/system/dictionary.js'
import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, orderRoute } from '@/api/system/dictionary.js'
import { queryRouteByFltNo } from "@/api/destinationFlight"
export default {
props: {
......@@ -154,7 +158,7 @@ export default {
} else if (this.status == 'sort') {
this.newDictionary = this.addDictionary.serviceCodeKey
this.title = '航线排序'
queryRoute({ fltNo: this.newDictionary.fltNo }).then(res => {
queryRouteByFltNo({ fltNo: this.newDictionary.fltNo }).then(res => {
if (res.code === 200) {
this.routeList = res.data.list
} else {
......@@ -377,4 +381,5 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
......
......@@ -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" @close="handleClose">
<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 class="roleDrawer">
<el-drawer :title="drawerTitle" :visible.sync="drawer" direction="rtl" size="40%" destroy-on-close
:close-on-click-modal="false" :wrapperClosable="false" :show-close="false">
:close-on-click-modal="false" :wrapperClosable="false" :show-close="false" @close="handleClose">
<el-form ref="roleForm" :model="roleForm" label-width="auto" :rules="rules" size="mini" style="margin: 10px"
@submit.native.prevent>
<el-row :gutter="10">
......@@ -176,4 +176,5 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
......
<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 @close="close">
<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="未设置"
:loading="routeLoading" :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,
routeLoading: 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 = []
this.routeLoading = true
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 => {
this.routeLoading = false
if (res.code === 200) {
this.routeList = res.data
} else {
this.msgWarning(res.msg)
}
this.$refs['superAllocationForm'].clearValidate('flightRoute')
}).catch(err => {
this.routeLoading = false
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 })
}).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 })
}).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 class="userDrawer">
<el-drawer :title="drawerTitle" :visible.sync="drawer" direction="rtl" size="40%" :close-on-click-modal="false"
:wrapperClosable="false" :show-close="false">
:wrapperClosable="false" :show-close="false" @close="handleClose">
<el-form ref="userForm" :model="userForm" label-width="auto" :rules="rules" style="margin: 10px"
@submit.native.prevent>
<el-row :gutter="10">
......@@ -244,7 +244,7 @@ export default {
roleIds: [],
};
this.clearValidate('userForm')
this.$emit("handleClose", false);
this.$emit("handleClose");
},
//提交
submit() {
......@@ -276,4 +276,5 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
......
......@@ -41,7 +41,8 @@
>修改密码</el-button
> -->
<el-button :type="scope.row.isValid == 1 ? 'warning' : 'primary'" size="mini"
v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{ scope.row.isValid == 1 ? "停用" : "启用"
v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{
scope.row.isValid == 1 ? "停用" : "启用"
}}</el-button>
<el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']">删除用户
</el-button>
......@@ -236,7 +237,7 @@ export default {
.catch(() => { });
},
handleClose(val) {
this.drawer = val;
this.drawer = false;
this.userData = {};
this.selectUser();
},
......@@ -253,4 +254,5 @@ export default {
</script>
<style>
</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="false" :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> -->
<div>
{{ scope.row.remark }}
</div>
</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