Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jinhui.wang
2022-03-03 17:07:29 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
0add639abace6e3f74dc040a5ea4fb13235099ce
0add639a
2 parents
25318063
4805cd52
更新代码
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
0 additions
and
5660 deletions
src/views/allocationConfig/cargoAllocation/index.vue
src/views/allocationConfig/cargoAllocation/info.vue
src/views/allocationConfig/flightAllocConfig/index.vue
src/views/allocationConfig/flightAllocConfig/info.vue
src/views/allocationConfig/flightRandConfig/index.vue
src/views/basicInformation/caExportPreQualification/index.vue
src/views/basicInformation/caPreReviewImport/index.vue
src/views/basicInformation/flightInformationImport/index.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/views/basicInformation/queryCargo/index.vue
src/views/allocationConfig/cargoAllocation/index.vue
deleted
100644 → 0
View file @
2531806
<template>
<div class="cargoAllocation">
<el-form
ref="form"
v-model="formData"
class="form-header"
label-position="right"
label-width="auto"
size="small"
>
<el-row type="flex" style="flexWrap: wrap !important">
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
<el-date-picker
class="formItem"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
v-model="fltDate"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input
v-model="fltNo"
placeholder="请输入ACCS原航班号"
class="formItem"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关回执状态">
<el-select
placeholder="不限"
v-model="formData.customsReceiptStatusId"
class="formItem"
multiple
clearable
>
<el-option
v-for="item in selectData.findConditionData
.cargoCustomsReturnStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="货物状态">
<el-select
placeholder="不限"
v-model="formData.statusId"
class="formItem"
clearable
>
<el-option
v-for="item in selectData.findConditionData.cargoStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运单号">
<el-input
class="formItem"
type="textarea"
placeholder="请输入运单号(回车分割)"
:autosize="true"
v-model="formData.waybillNo"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申报类别">
<el-select
placeholder="不限"
v-model="formData.typeId"
class="formItem"
clearable
>
<el-option
v-for="item in selectData.findConditionData.cargoType"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="服务类型">
<el-select
placeholder="不限"
v-model="formData.serviceTypeId"
class="formItem"
clearable
>
<el-option
v-for="item in selectData.findConditionData.cargoServiceType"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="URSA">
<el-input
class="formItem"
type="textarea"
placeholder="S_;P_;E2"
v-model="ursa"
:autosize="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-input
class="formItem"
type="textarea"
placeholder="PVG;PEK"
v-model="siteName"
:autosize="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="重量区间">
<el-row>
<el-col :span="11"
><el-input-number
class="formItem"
size="mini"
v-model="formData.minWeight"
:controls="false"
:min="0"
:precision="2"
></el-input-number
></el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="11"
><el-input-number
class="formItem"
size="mini"
v-model="formData.maxWeight"
:controls="false"
:min="formData.minWeight"
:precision="2"
></el-input-number
></el-col>
</el-row>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="件数区间">
<el-row>
<el-col :span="11"
><el-input-number
class="formItem"
size="mini"
v-model="formData.minNumber"
:controls="false"
:min="0"
></el-input-number
></el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="11"
><el-input-number
class="formItem"
size="mini"
v-model="formData.maxNumber"
:controls="false"
:min="formData.minNumber"
></el-input-number
></el-col>
</el-row>
</el-form-item>
</el-col>
<!-- <el-col :span="6">
<el-form-item label="航班类型">
<el-select
placeholder="不限"
v-model="formData.kindToAllocFlightId"
class="formItem"
clearable
>
<el-option
v-for="item in selectData.fltTypes"
:label="item.chineseName"
v-model="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="6">
<el-form-item label="取件日期">
<el-date-picker
v-model="formData.pickUpDate"
type="date"
placeholder="选择日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="口岸代码">
<el-input
v-model="portName"
placeholder="请输入口岸代码"
class="formItem"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="Handling Code">
<el-empty
description="暂无数据"
v-if="
!selectData.HandlingCode || selectData.HandlingCode.length == 0
"
></el-empty>
<el-checkbox-group v-model="handingCodes" v-else>
<el-checkbox
v-for="item in selectData.HandlingCode"
:label="item.chineseName"
v-model="item.englishName"
:key="item.id"
></el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="Sub Category">
<el-empty
description="暂无数据"
v-if="
!selectData.SubCategory || selectData.SubCategory.length == 0
"
></el-empty>
<el-checkbox-group v-model="subCategorys" v-else>
<el-checkbox
v-for="item in selectData.SubCategory"
:label="item.chineseName"
v-model="item.englishName"
:key="item.id"
></el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<div style="margin: 0 0 0 10px">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
:loading="loading"
@click="select(0)"
>查询</el-button
>
<el-button
:type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="mini"
@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"
@click="xlsx(1)"
:loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0"
>{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button
>
<el-button
type="primary"
size="mini"
@click="addFit"
:disabled="tableSelection.length <= 0"
>添加到航班</el-button
>
<div class="tips">
<span style="paddingRight: 50px">总重量:{{ allWeight }}</span>
<span>总件数:{{ allQty }}</span>
</div>
</div>
</el-form>
<Tables
ref="newTables"
:data="tableData"
:headerData="tableHeader"
:totalCount="totalCount"
:loading="loading"
:limitSize="size"
:limitStart="formData.limitStart"
:page="page"
:shiftKey="shiftKey"
height="350"
@tableSelect="tableSelect"
@tableSelectAll="tableSelectAll"
@currentChange="currentChange"
@sortChange="sortChange"
></Tables>
<Dialog
:tableData="tableSelection"
:dialogVisible="dialogVisible"
@dialogBeforeClose="dialogBeforeClose"
></Dialog>
</div>
</template>
<script>
import Dialog from "./info.vue";
import { findConditionData, findCargoAllocationData } from "@/api/cargoSelect";
import { allDictData } from "@/api/destinationFlight";
// import { findFltConditionDataApi } from "@/api/findAllFltData";
import { downLoadXlsx } from "@/utils/zipdownload";
import { upCase } from "@/utils/FedEx";
export default {
name: "CargoAllocation",
components: {
Dialog,
},
data() {
return {
formData: {
fltDateStart: null,
fltDateEnd: null,
typeId: null,
portName: null,
statusId: null,
kindToAllocFlightId: null,
serviceTypeId: null,
waybillNo: null,
fltNo: null,
ursaList: null,
siteNameList: null,
minWeight: undefined,
maxWeight: undefined,
minNumber: undefined,
maxNumber: undefined,
pickUpDate: null,
handingCodes: null,
subCategorys: null,
customsReceiptStatusId: null,
}, //查询数据
tableHeader: [
{
type: "selection",
name: "",
value: "",
width: "50",
align: "center",
sorTable: false,
fixed: true,
},
{
type: "index",
name: "",
value: "",
width: "50",
align: "center",
sorTable: false,
fixed: false,
},
{
type: "",
name: "口岸代码",
value: "portName",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "取件日期",
value: "pickUpDate",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "取件扫描号",
value: "pickUpScanNo",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "站点",
value: "siteName",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "运单号",
value: "waybillNo",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "总单号",
value: "totalWaybillNo",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "服务类型",
value: "serviceTypeName",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "服务代码",
value: "serviceCode",
width: "150",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "URSA",
value: "ursa",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "申报类型",
value: "typeName",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "HandlingCode",
value: "handingCode",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "subcategory",
value: "subCategory",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "件数",
value: "qty",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "实际重量",
value: "actualWeight",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "收件人国家代码",
value: "consigneeCountry",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "品名描述",
value: "nameDescription",
width: "150",
align: "center",
sorTable: false,
fixed: false,
},
{
type: "",
name: "海关回执状态",
value: "customsReceiptStatusName",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "预审状态",
value: "preQualificationStatus",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "航班预审意见",
value: "caPretrialOpinion",
width: "150",
align: "center",
sorTable: false,
fixed: false,
},
{
type: "",
name: "货物状态",
value: "statusName",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "终配航班号",
value: "finalFlightNo",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "终配航班日期",
value: "finalFlightTime",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "二配航班号",
value: "twoMatchFlightNo",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "二配航班日期",
value: "twoMatchFlightTime",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "预配航班号",
value: "preplanFlightNo",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "预配航班日期",
value: "preplanFlightTime",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "ACCS原航班号",
value: "fltNoAccs",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "ACCS原航班日期",
value: "fltDateAccs",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "ACCS原航线",
value: "accsFlightRoute",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "是否RDE手工录入",
value: "manualRde",
width: "170",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "是否自动",
value: "cargoRulesStatus",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "发件人账号",
value: "shipperAccount",
width: "150",
align: "center",
sorTable: false,
fixed: false,
},
{
type: "",
name: "发件公司中文名称",
value: "shipperCompany",
width: "150",
align: "center",
sorTable: false,
fixed: false,
},
{
type: "",
name: "始发地城市名称",
value: "originCity",
width: "150",
align: "center",
sorTable: false,
fixed: false,
},
{
type: "",
name: "收件地",
value: "destinationSiteName",
width: "150",
align: "center",
sorTable: false,
fixed: false,
},
{
type: "",
name: "尺寸",
value: "sizeStr",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "大货预审意见(是否可以配置航班)",
value: "bigPretrialOpinion",
width: "300",
align: "center",
sorTable: false,
fixed: false,
},
{
type: "",
name: "大货预审时间",
value: "bigPretrialTime",
width: "150",
align: "center",
sorTable: false,
fixed: false,
},
{
type: "",
name: "海关回执时间",
value: "customsReceiptTime",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "航班预审时间",
value: "caPretrialTime",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "创建人",
value: "createUserName",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
{
type: "",
name: "创建时间",
value: "createTime",
width: "150",
align: "center",
sorTable: true,
fixed: false,
},
], //表头数据
tableData: [], //表格数据
tableSelection: [], //选中数据
selectData: {
findConditionData: [],
fltTypes: [],
HandlingCode: [],
SubCategory: [],
}, //查询条件
fltDate: [],
ursaList: "",
siteNameList: "",
handingCodes: [],
subCategorys: [],
valueFormat: "yyyy-MM-dd",
totalCount: 0,
page: 1,
size: 100,
allWeight: 0,
allQty: 0,
dialogVisible: false,
shiftKey: false,
createDate: null,
loading: false,
downLoadingTip: {
tip: "",
downloading: false,
},
};
},
created() {
this.seleData();
this.select();
},
mounted() {
window.addEventListener("keydown", (code) => {
if (code.keyCode === 16 && code.shiftKey) {
this.shiftKey = true;
}
});
window.addEventListener("keyup", (code) => {
if (code.keyCode === 16) {
this.shiftKey = false;
}
});
},
methods: {
//查询条件
async seleData() {
// findFltConditionDataApi()
// .then((res) => {
// if (res.code === 200) {
// this.selectData.fltTypes = res.data.flightType;
// }else{
// this.$message({
// message: "查询条件不存在",
// type: "warning",
// });
// }
// })
// .catch(() => {});
allDictData()
.then((res) => {
if (res.code === 200) {
this.selectData.HandlingCode = res.data.handlingCode;
this.selectData.SubCategory = res.data.subCategory;
}else{
this.$message({
message: "查询条件不存在",
type: "warning",
});
}
})
.catch(() => {});
findConditionData()
.then((res) => {
if (res.code == 200) {
this.selectData.findConditionData = res.data;
}else{
this.$message({
message: "查询条件不存在",
type: "warning",
});
}
})
.catch(() => {});
},
//查询
async select(val) {
this.loading = true;
this.dataInfo();
if(val === 0){
this.page = 1;
this.formData.page = 1;
}
findCargoAllocationData(this.formData)
.then((res) => {
this.loading = false;
if (res.code === 200) {
this.tableData = res.data.list;
this.totalCount = res.data.total;
if (res.data.list.length > 0) {
this.tableData.forEach((item, index = 0) => {
item.index = index;
});
} else {
this.$message({
message: "未查询到数据",
type: "warning",
});
}
} else {
this.$message({
message: res.msg,
type: "warning",
});
}
})
.catch(() => {
this.loading = false;
});
},
//总和
cargoTotal() {
this.allWeight = 0;
this.allQty = 0;
if (this.tableSelection.length > 0) {
this.tableSelection.forEach((item) => {
this.allWeight = this.allWeight + item.actualWeight;
this.allQty = this.allQty + item.qty;
});
this.allWeight = this.allWeight.toFixed(2);
this.allQty = this.allQty.toFixed();
}
},
//数据初始化
dataInfo() {
this.formData.ursaList = null;
this.formData.siteNameList = null;
this.formData.handingCodes = null;
this.formData.subCategorys = null;
if (this.handingCodes.length > 0) {
this.formData.handingCodes = this.handingCodes;
}
if (this.subCategorys.length > 0) {
this.formData.subCategorys = this.subCategorys;
}
if (this.formData.minWeight === 0) {
this.formData.minWeight = undefined;
}
if (this.formData.maxWeight === 0) {
this.formData.maxWeight = undefined;
}
if (this.formData.minNumber === 0) {
this.formData.minNumber = undefined;
}
if (this.formData.maxNumber === 0) {
this.formData.maxNumber = undefined;
}
if (this.ursaList && this.ursaList != "") {
this.formData.ursaList = this.ursaList.split(";" || "");
}
if (this.siteNameList && this.siteNameList != "") {
this.formData.siteNameList = this.siteNameList.split(";" || "");
}
if (this.fltDate && this.fltDate.length > 0) {
this.formData.fltDateStart = this.fltDate[0];
this.formData.fltDateEnd = this.fltDate[1];
} else {
this.formData.fltDateStart = null;
this.formData.fltDateEnd = null;
}
if (
this.formData.customsReceiptStatusId != null &&
this.formData.customsReceiptStatusId.length < 1
) {
this.formData.customsReceiptStatusId = null;
}
this.formData.page = this.page;
this.formData.size = this.size;
if(this.formData.waybillNo){
this.formData.waybillNo = this.formData.waybillNo.trim();
}
},
//导出表格
xlsx(val) {
this.downLoadingTip.downloading = true;
this.dataInfo();
if (val === 0) {
this.downLoadingTip.tip = "正在导出本页结果集";
downLoadXlsx("/cargo/allocationExcel", this.formData, "手动配舱表")
.then((res) => {
this.downLoadingTip.downloading = false;
})
.catch((err) => {
this.downLoadingTip.downloading = false;
console.log(err);
});
} else {
this.downLoadingTip.tip = "正在导出全部结果集请耐心等待";
this.formData.page = null;
this.formData.size = null;
downLoadXlsx("/cargo/allocationExcel", this.formData, "手动配舱表")
.then((res) => {
this.downLoadingTip.downloading = false;
})
.catch((err) => {
this.downLoadingTip.downloading = false;
console.log(err);
});
}
},
//表格选择
tableSelect(val) {
this.tableSelection = val.selection;
this.cargoTotal();
},
//表格全选
tableSelectAll(val) {
this.tableSelection = val;
this.cargoTotal();
},
//分页
currentChange(val) {
this.page = val.page;
this.select();
},
//排序
sortChange(val) {
let data = [];
let nullData = [];
this.tableData.forEach((item) => {
if (item[val.prop]) {
data.push(item);
} else {
nullData.push(item);
}
});
data = data.sort(this.$refs.newTables.compare(val.prop, val.order));
if (val.order != "ascending") {
this.tableData = nullData.concat(data);
} else {
this.tableData = data.concat(nullData);
}
this.tableData.forEach((item, index = 0) => {
item.index = index;
});
},
//添加到航班
addFit() {
this.dialogVisible = true;
},
//关闭弹框
dialogBeforeClose(val) {
this.dialogVisible = val.close;
if (val.reload) {
this.tableSelection = [];
this.$refs.newTables.clearTable();
this.cargoTotal();
this.select();
}
},
},
computed: {
fltNo: {
get: function () {
return this.formData.fltNo;
},
set: function (val) {
this.formData.fltNo = upCase(val);
},
},
ursa: {
get: function () {
return this.ursaList;
},
set: function (val) {
this.ursaList = upCase(val);
},
},
siteName: {
get: function () {
return this.siteNameList;
},
set: function (val) {
this.siteNameList = upCase(val);
},
},
portName: {
get: function () {
return this.formData.portName;
},
set: function (val) {
this.formData.portName = upCase(val);
},
},
},
};
</script>
<style lang="scss">
.tips {
display: inline-block;
color: #606266;
font-size: 14px;
margin-top: 10px;
margin-left: 50px;
}
.line {
text-align: center;
}
.el-empty {
width: 30%;
height: 37px;
padding: 0px;
line-height: 37px;
.el-empty__image {
width: 0px;
height: 0px;
}
.el-empty__description {
margin-top: 0px;
}
}
</style>
\ No newline at end of file
src/views/allocationConfig/cargoAllocation/info.vue
deleted
100644 → 0
View file @
2531806
<template>
<div>
<el-dialog
title="货物配舱"
width="80%"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-divider content-position="left">已选货物信息</el-divider>
<el-table
:data="tableData"
size="mini"
height="200"
max-height="200"
border
stripe
highlight-current-row
style="width: 100%"
>
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column
v-for="(item, index) in cargoHeader"
header-align="center"
align="center"
:prop="item.value"
:label="item.name"
:key="index"
:show-overflow-tooltip="true"
>
</el-table-column>
</el-table>
<el-form
ref="form"
label-position="right"
label-width="auto"
style="width: 400px; margin: 30px auto"
>
<el-form-item label="航班号" prop="fltNo">
<el-input
v-model="fltNo"
size="medium"
placeholder="请输入航班号"
style="width: 350px"
></el-input>
</el-form-item>
<el-form-item label="航班日期:" prop="fltDate">
<el-date-picker
v-model="formData.fltDate"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
size="medium"
style="width: 350px"
>
</el-date-picker>
</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 { allocationFlight } from "@/api/cargoSelect";
import { MessageBox } from "element-ui";
export default {
props: {
dialogVisible: {
type: Boolean,
default: false,
},
tableData: {
type: Array,
default: null,
},
},
data() {
return {
formData: {
ids: [],
fltNo: undefined,
fltDate: undefined,
overweight: 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" },
],
rules: {
fltNo: [
{
required: true,
message: "航班号不能为空",
trigger: "blur",
},
],
fltDate: [
{
required: true,
message: "航班日期不能为空",
trigger: "change",
},
],
},
loading:false
};
},
methods: {
cleaerForm() {
this.formData = {
ids: [],
fltNo: undefined,
fltDate: undefined,
overweight: false,
};
},
//确定配舱
submit() {
this.loading = true;
let arr = [];
this.tableData.forEach((item) => {
arr.push(item.id);
});
this.formData.ids = arr;
if (this.formData.fltNo && this.formData.fltDate) {
allocationFlight(this.formData).then((res) => {
//code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg
if (res.code === 200) {
this.$message({
message: "货物配舱成功",
type: "success",
});
this.cleaerForm();
this.loading = false;
this.$emit("dialogBeforeClose", { close: false, reload: true });
} else if (res.code === 202) {
MessageBox.confirm(res.msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.formData.overweight = true; //确定继续overweight变为true再次请求接口
allocationFlight(this.formData).then((res) => {
if (res.code === 200) {
this.$message({
message: "货物配舱成功",
type: "success",
});
} else {
this.$message({
message: res.msg,
type: "warning",
});
}
});
this.cleaerForm();
this.loading = false;
this.$emit("dialogBeforeClose", { close: false, reload: true });
})
.catch(() => {
//取消 取消当前配舱
this.$message({
message: "配舱已取消",
type: "success",
});
this.cleaerForm();
this.loading = false;
this.$emit("dialogBeforeClose", {
close: false,
reload: true,
});
});
} else {
this.loading = false;
this.$message({
message: res.msg,
type: "warning",
});
}
}).catch(()=>{
this.loading = false;
});
} else {
this.loading = false;
this.$message({
message: "航班号或航班日期不能为空",
type: "warning",
});
}
},
dialogBeforeClose() {
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
},
},
computed: {
fltNo: {
get: function () {
return this.formData.fltNo;
},
set: function (val) {
this.formData.fltNo = val.toUpperCase();
},
},
},
};
</script>
<style>
</style>
\ No newline at end of file
src/views/allocationConfig/flightAllocConfig/index.vue
deleted
100644 → 0
View file @
2531806
<template>
<div style="margin: 40px" class="app-container">
<el-form
:inline="true"
:model="queryParams"
class="demo-form-inline"
size="small"
>
<el-form-item label="航班号">
<el-input
v-model.trim="purposeOfFlightNo"
placeholder="航班号"
@keyup.enter.native="getList"
></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="queryParams.status" placeholder="状态">
<el-option label="有效" value="1"></el-option>
<el-option label="停用" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
@click="getList"
size="mini"
>查询</el-button
>
</el-form-item>
</el-form>
<el-button
style="margin-bottom: 20px"
type="primary"
icon="el-icon-plus"
size="mini"
@click="
$router.push({
name: 'FlightAllocConfigAdd',
params: { handle: 'add' },
})
"
>添加</el-button
>
<el-table :data="flyList" v-loading="loading" size="small">
<el-table-column
prop="purposeOfFlightNo"
label="航班号"
align="center"
></el-table-column>
<el-table-column prop="status" label="状态" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status === '0'">无效</span>
<span v-if="scope.row.status === '1'">有效</span>
<span v-if="scope.row.status === '2'">配置中</span>
<span v-if="scope.row.status === '3'">停用</span>
</template>
</el-table-column>
<el-table-column prop="createUserName" label="操作人" align="center">
</el-table-column>
<el-table-column prop="createTime" label="更新时间" align="center">
</el-table-column>
<el-table-column label="操作" prop="id" align="center">
<template slot-scope="scope">
<el-button
type="text"
size="mini"
icon="el-icon-view"
@click="handleClick(scope.row.id, 'detail')"
>查看</el-button
>
<el-button
type="text"
size="mini"
icon="el-icon-edit"
@click="handleClick(scope.row.id, 'update')"
>修改</el-button
>
<el-button
type="text"
size="mini"
icon="el-icon-delete"
@click="del(scope.row.id, scope.row.status)"
>删除</el-button
>
<el-button
type="text"
size="mini"
icon="el-icon-video-pause"
@click="changeStatus(scope.row.id, 3)"
v-if="scope.row.status == '1'"
>停用</el-button
>
<el-button
type="text"
size="mini"
icon="el-icon-video-play"
@click="changeStatus(scope.row.id, 1)"
v-else
>启用</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="getList"
@current-change="getList"
:current-page.sync="curPage"
:page-sizes="[10, 20, 30, 40]"
:page-size.sync="limit"
layout="prev, pager, next, jumper, sizes, total"
:total="total"
background
:hide-on-single-page="true"
style="margin-top: 40px; text-align: right"
>
</el-pagination>
</div>
</template>
<script>
import {
findFlightNo,
delFlightId,
enableOrDisable,
} from "@/api/destinationFlight";
export default {
name: "FlightAllocConfig",
data() {
return {
queryParams: {
purposeOfFlightNo: "",
status: "1",
start: 0,
limit: 10,
},
flyList: [],
curPage: 1,
limit: 10,
total: 0,
loading: false,
};
},
activated(){
this.getList()
},
methods: {
getList() {
this.queryParams.limit = this.limit;
if (this.curPage > 1) {
this.queryParams.start = (this.curPage - 1) * this.queryParams.limit;
} else {
this.queryParams.start = 0;
}
this.loading = true;
findFlightNo(this.queryParams).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
return;
}
this.flyList = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
});
},
//跳转到查看,修改页面
handleClick(flightiId, handle) {
this.$router.push({
name: "FlightAllocConfigInfo",
params: { handle: handle, id: flightiId },
});
},
//删除规则
del(id, status) {
if (status == "1") {
this.$confirm("航班规则生效中,无法删除,请停用后再操作", "警告", {
confirmButtonText: "确定",
showCancelButton: false,
type: "warning",
});
} else {
this.$confirm("是否确认删除此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
showCancelButton: true,
type: "warning",
}).then(() => {
delFlightId(id)
.then((res) => {
this.$message({
message: res.msg,
type: res.code === 200 ? "success" : "warning",
});
this.getList();
})
.catch(() => {});
});
}
},
//启用,停用
changeStatus(id, status) {
let tip = status === 1 ? "启用" : "停用";
this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
enableOrDisable(id, status)
.then((res) => {
if (res.code != 200) {
this.msgError(res.msg);
} else {
this.getList();
this.msgSuccess(tip + "成功");
}
})
.catch(() => {});
});
},
},
created() {
this.getList();
},
computed: {
purposeOfFlightNo: {
get: function () {
return this.queryParams.purposeOfFlightNo;
},
set: function (val) {
this.queryParams.purposeOfFlightNo = val.toUpperCase();
},
},
},
};
</script>
src/views/allocationConfig/flightAllocConfig/info.vue
deleted
100644 → 0
View file @
2531806
<template>
<div style="margin: 40px" v-loading="loading">
<div v-if="isEmpty">
<el-empty description="找不到这条数据!"></el-empty>
<el-button size="small" @click="close">返回</el-button>
</div>
<template v-else>
<el-form
ref="form"
:model="form"
label-width="200px"
size="small"
:disabled="disable"
:rules="rules"
>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="航班号" prop="purposeOfFlightNo">
<el-input
v-model.trim="form.purposeOfFlightNo"
style="width: 60%"
:disabled="nameDisabled"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班预审" prop="isNeedRequired">
<el-switch
v-model="isNeedRequired"
:active-value="1"
:inactive-value="0"
>
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-form-item>
<el-row :gutter="20">
<el-col :span="6">
<el-radio v-model="isLocation" label="1" size="mini"
>站点包含</el-radio
>
<el-radio v-model="isLocation" label="2" size="mini"
>站点不包含</el-radio
>
</el-col>
<el-col :span="6">
<el-alert
title="提示:站点之间用回车符分隔"
type="warning"
show-icon
size="mini"
:closable="false"
style="height: 30px; width: fit-content"
>
</el-alert>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="站点包含" v-show="isLocation == 1">
<el-input
type="textarea"
v-model="form.location"
:rows="6"
resize="none"
style="width: 600px"
></el-input>
</el-form-item>
<el-form-item label="站点不包含" v-show="isLocation == 2">
<el-input
type="textarea"
v-model="form.notLocation"
:rows="6"
resize="none"
style="width: 600px"
></el-input>
</el-form-item>
<el-form-item>
<el-alert
title="提示:URSA之间用分号分隔,例:F2;F3;P_"
type="warning"
show-icon
size="mini"
:closable="false"
style="height: 30px; width: fit-content"
>
</el-alert>
</el-form-item>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="URSA包含">
<el-input
type="textarea"
v-model.trim="form.includeUrsa"
:rows="6"
resize="none"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="URSA不包含">
<el-input
type="textarea"
v-model.trim="form.notIncludeUrsa"
:rows="6"
resize="none"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="件数">
<el-col :span="3">
<el-input
class="numberInput"
v-model.trim="minNumOfPieces"
></el-input>
<!-- <el-input-number
v-model="minNumOfPieces"
:precision="0"
:controls="false"
style="width: 100%"
></el-input-number> -->
</el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="3">
<el-input
class="numberInput"
v-model.trim="maxNumOfPieces"
></el-input>
<!-- <el-input-number
v-model="
form.maxNumOfPieces == 0
? (form.maxNumOfPieces = undefined)
: form.maxNumOfPieces
"
:precision="0"
:controls="false"
style="width: 100%"
></el-input-number> -->
</el-col>
</el-form-item>
<el-form-item label="重量">
<el-col :span="3">
<el-input class="numberInput" v-model.trim="minWeight"></el-input>
<!-- <el-input-number
v-model="
form.minWeight == 0
? (form.minWeight = undefined)
: form.minWeight
"
:precision="2"
:controls="false"
style="width: 100%"
></el-input-number> -->
</el-col>
<el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="3">
<el-input class="numberInput" v-model.trim="maxWeight"></el-input>
<!-- <el-input-number
v-model="
form.maxWeight == 0
? (form.maxWeight = undefined)
: form.maxWeight
"
:precision="2"
:controls="false"
style="width: 100%"
></el-input-number> -->
</el-col>
<el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
</el-form-item>
<el-form-item label="申报类别">
<el-card shadow="never" style="width: 80%">
<el-checkbox-group v-model="form.typeOfGoods">
<el-row>
<el-col :span="2" v-for="item in cargoType" :key="item.id">
<el-checkbox
:label="item.chineseName"
:name="item.chineseName"
>
</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item label="货物类型">
<el-card shadow="never" style="width: 80%">
<el-checkbox-group v-model="form.declarationCategory">
<el-row>
<el-col :span="3" v-for="item in cargoStatus" :key="item.id">
<el-checkbox
:label="item.chineseName"
:name="item.chineseName"
disabled
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item label="Service Code">
<el-card shadow="never" style="width: 80%">
<el-checkbox-group v-model="form.serviceCode">
<el-row>
<el-col :span="2" v-for="item in serviceCode" :key="item.id">
<el-checkbox
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item label="Handling Code">
<el-card shadow="never" style="width: 80%">
<el-checkbox-group v-model="form.handlingCode">
<el-row>
<el-col :span="3" v-for="item in handlingCode" :key="item.id">
<el-checkbox
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item label="Sub Category">
<el-card shadow="never" style="width: 80%">
<el-checkbox-group v-model="form.subCategory">
<el-row>
<el-col :span="3" v-for="item in subCategory" :key="item.id">
<el-checkbox
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-form>
<div style="marginleft: 200px">
<el-button
type="primary"
size="small"
v-if="$route.params.handle != 'detail'"
@click="submit('form')"
:loading="btnLoading"
>
<span v-if="$route.params.handle === 'add'">添加</span>
<span v-else>保存</span>
</el-button>
<el-button size="small" @click="close">取消</el-button>
</div>
</template>
</div>
</template>
<script>
import {
findByFlightId,
updateOrAddFlight,
allDictData,
findDestinationFltRuleByActualFlight,
} from "@/api/destinationFlight";
export default {
name:"",
data() {
return {
form: {
minNumOfPieces: undefined,
maxNumOfPieces: undefined,
minWeight: undefined,
maxWeight: undefined,
typeOfGoods: [],
declarationCategory: [],
serviceCode: [],
subCategory: [],
handlingCode: [],
},
rules: {
purposeOfFlightNo: [
{
required: true,
message: "请输入航班号",
trigger: "blur",
},
],
},
typeOfGoods: [],
declarationCategory: [],
formServiceCode: [],
formHandlingCode: [],
formSubCategory: [],
cargoType: [],
cargoStatus: [],
serviceCode: [],
handlingCode: [],
subCategory: [],
isLocation: "1",
isNeedRequired: 0,
disable: false,
nameDisabled: false,
btnLoading: false,
loading: true,
isEmpty: false,
routeName:"",
dataId:"",
handleName:""
};
},
methods: {
//排序
sorttodo(arr, englishName) {
var index = 1,
newArr = [],
length = arr.length;
for (var i = 0; i < length; i++) {
if (arr[i].englishName === englishName) {
newArr[0] = arr[i];
} else {
newArr[index++] = arr[i];
}
}
return newArr;
},
submit(form) {
this.$refs[form].validate((valid) => {
if (!valid) {
return false;
}
});
this.btnLoading = true;
let handle = this.$route.params.handle;
if (handle === "update") {
//修改,获取id
this.form.id = this.$route.params.id;
}
//调用接口
this.typeOfGoods = this.form.typeOfGoods;
this.declarationCategory = this.form.declarationCategory;
this.formServiceCode = this.form.serviceCode;
this.formHandlingCode = this.form.handlingCode;
this.formSubCategory = this.form.subCategory;
this.form.isNeedRequired = this.isNeedRequired;
if(this.form.purposeOfFlightNo){
this.form.purposeOfFlightNo = this.form.purposeOfFlightNo.toUpperCase();
}
if (this.isLocation == 1) {
this.form.notLocation = "";
} else {
this.form.location = "";
}
if (
this.form.includeUrsa &&
this.form.includeUrsa.length != 0 &&
this.form.notIncludeUrsa &&
this.form.notIncludeUrsa.length != 0
) {
let include = this.form.includeUrsa.split(";");
let notInclude = this.form.notIncludeUrsa.split(";");
let errorList = [];
notInclude.forEach((element) => {
if (element.indexOf("_") > 0) {
errorList.push(element);
} else {
let flag = 0;
for (let i = 0; i < include.length; i++) {
if (
element == "" ||
(include[i].indexOf("_") > 0 &&
include[i].substring(0, 1) == element.substring(0, 1))
) {
flag = 1;
break;
}
}
if (flag == 0) {
errorList.push(element);
}
}
});
if (errorList.length != 0) {
this.$message({
showClose: true,
message:
"URSA不包含中[" +
errorList +
"]错误,URSA不包含必须属于URSA包含中的类型",
type: "error",
});
this.btnLoading = false;
return;
}
}
updateOrAddFlight(this.form).then((response) => {
if (response.code === 200) {
this.$message({
showClose: true,
message: "成功",
type: "success",
});
this.close();
} else {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.btnLoading = false;
}
});
this.form.typeOfGoods = this.typeOfGoods;
this.form.declarationCategory = this.declarationCategory;
this.form.serviceCode = this.formServiceCode;
this.form.handlingCode = this.formHandlingCode;
this.form.subCategory = this.formSubCategory;
},
close() {
this.removes()
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
),
1
);
this.$router.push({name:"FlightAllocConfig"})
// this.$router.push(
// this.$store.state.tagsView.visitedViews[
// this.$store.state.tagsView.visitedViews.length - 1
// ].path
// );
},
removes(){
if(this.routeName == "FlightAllocConfigAdd"){
sessionStorage.setItem("flightAdd","remove")
}else{
sessionStorage.setItem("flightInfo"+this.dataId,"remove")
}
},
},
beforeDestroy(){
if(this.routeName == "FlightAllocConfigAdd"){
if(sessionStorage.getItem("flightAdd") == "remove"){
sessionStorage.removeItem("flightAdd")
}else{
this.form.isNeedRequired = this.isNeedRequired
sessionStorage.setItem("flightAdd",JSON.stringify(this.form))
}
}else{
if(sessionStorage.getItem("flightInfo"+this.dataId) == "remove"){
sessionStorage.removeItem("flightInfo"+this.dataId)
}else{
if(this.handleName == "detail"){
this.form.isNeedRequired = this.isNeedRequired
sessionStorage.setItem("flightInfo"+this.dataId,JSON.stringify(this.form))
}
}
}
},
created() {
let handle = this.$route.params.handle;
allDictData().then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
return;
}
let dict = response.data;
this.cargoType = dict.cargoType;
this.cargoStatus = dict.cargoStatus;
this.serviceCode = dict.serviceCode.sort((a, b) =>
a.englishName.localeCompare(b.englishName)
);
this.handlingCode = this.sorttodo(dict.handlingCode, "BLANK");
this.subCategory = dict.subCategory;
});
this.routeName = this.$route.name;
this.dataId = this.$route.params.id;
this.handleName = this.$route.params.handle;
if (handle === "detail") {
this.disable = true;
}
if (handle != "add") {
this.nameDisabled = true;
let id = this.$route.params.id;
if(sessionStorage.getItem("flightInfo"+id) && this.$route.name == "FlightAllocConfigInfo" && handle != "detail"){
this.loading = false
this.form = JSON.parse(sessionStorage.getItem("flightInfo"+this.$route.params.id))
this.isNeedRequired = this.form.isNeedRequired;
if(this.form.notLocation != null || this.form.notLocation == ""){
this.isLocation = "2";
}else{
this.isLocation = "1";
}
}else{
if (isNaN(Number(id))) {
findDestinationFltRuleByActualFlight(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.isEmpty = true;
} else if (response.data == null) {
this.isEmpty = true;
} else {
let info = response.data;
info.typeOfGoods = info.typeOfGoods
? info.typeOfGoods.split(";")
: [];
info.declarationCategory = info.declarationCategory
? info.declarationCategory.split(";")
: [];
info.serviceCode = info.serviceCode
? info.serviceCode.split(";")
: [];
info.handlingCode = info.handlingCode
? info.handlingCode.split(";")
: [];
info.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
this.form = info;
if (info.notLocation != null || info.notLocation == "") {
this.isLocation = "2";
} else {
this.isLocation = "1";
}
this.isNeedRequired = info.isNeedRequired;
}
this.loading = false;
}).catch(()=>{
this.loading = false;
})
} else {
//货物信息
findByFlightId(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.isEmpty = true;
} else {
let info = response.data.list;
info.typeOfGoods = info.typeOfGoods
? info.typeOfGoods.split(";")
: [];
info.declarationCategory = info.declarationCategory
? info.declarationCategory.split(";")
: [];
info.serviceCode = info.serviceCode
? info.serviceCode.split(";")
: [];
info.handlingCode = info.handlingCode
? info.handlingCode.split(";")
: [];
info.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
this.form = info;
if (info.notLocation != null || info.notLocation == "") {
this.isLocation = "2";
} else {
this.isLocation = "1";
}
let isNeedRequired = response.data.isNeedRequired;
this.form.isNeedRequired = isNeedRequired;
this.isNeedRequired = isNeedRequired;
}
this.loading = false;
}).catch(()=>{
this.loading = false;
})
}
}
} else {
this.loading = false;
}
if(this.$route.name == "FlightAllocConfigAdd"){
if(sessionStorage.getItem("flightAdd")){
this.form = JSON.parse(sessionStorage.getItem("flightAdd"))
this.isNeedRequired = this.form.isNeedRequired;
if(this.form.notLocation != null || this.form.notLocation == ""){
this.isLocation = "2";
}else{
this.isLocation = "1";
}
}
}
},
computed: {
minNumOfPieces: {
get: function () {
return this.form.minNumOfPieces;
},
set: function (val) {
if (val == 0 || val == null || val == "-") {
this.form.minNumOfPieces = undefined;
} else if (!isNaN(val)) {
this.form.minNumOfPieces = val;
}
},
},
maxNumOfPieces: {
get: function () {
return this.form.maxNumOfPieces;
},
set: function (val) {
if (val == 0 || val == null || val == "-") {
this.form.maxNumOfPieces = undefined;
} else if (!isNaN(val)) {
this.form.maxNumOfPieces = val;
}
},
},
minWeight: {
get: function () {
return this.form.minWeight;
},
set: function (val) {
if (val == null || val == "-") {
this.form.minWeight = undefined;
} else if (!isNaN(val)) {
this.form.minWeight = val;
}
},
},
maxWeight: {
get: function () {
return this.form.maxWeight;
},
set: function (val) {
if (val == null || val == "-") {
this.form.maxWeight = undefined;
} else if (!isNaN(val)) {
this.form.maxWeight = val;
}
},
},
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.el-textarea.is-disabled .el-textarea__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-input.is-disabled .el-input__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: rgba(255, 255, 255, 0.5);
}
.el-checkbox__input.is-disabled + span.el-checkbox__label {
color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
border-color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
border-color: #606266;
}
.numberInput {
input {
text-align: center;
}
}
</style>
src/views/allocationConfig/flightRandConfig/index.vue
deleted
100644 → 0
View file @
2531806
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="ACCS原航班">
<el-input
type="text"
v-model="upCase"
placeholder="请输入ACCS原航班"
clearable
class="formItem"
></el-input>
<!-- <el-input v-model="upCase" placeholder="请输入原航班" clearable size="small" /> -->
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择"
clearable
size="small"
>
<el-option
v-for="dict in statusList"
:key="dict.id"
:label="dict.name"
:value="dict.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询ACCS原航班配置</el-button
>
</el-form-item>
<br />
<el-form-item label="日期" prop="flightDate">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="queryParams.flightDate"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="findSourceFlightAndFlightDate"
>查询实际配载航班 </el-button
> 
<span style="color: #ff4949"
>注:ACCS原航班+日期查询该日期的航班实际情况</span
>
</el-form-item>
<br />
<el-form-item>
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>添加规则</el-button
>
</el-col>
 
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="sourceFlightRulesList">
<el-table-column type="index" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column
label="ACCS原航班"
align="center"
prop="sourceFlightNo"
/>
<el-table-column
label="配载航班排序"
align="center"
prop="flightRank"
width="280"
/>
<!-- <el-table-column label="优先级" align="center" prop="priority" /> -->
<el-table-column
label="周期"
align="center"
prop="dayOfWeek"
width="180"
/>
<el-table-column
label="状态"
align="center"
prop="status"
:formatter="statusFormat"
/>
<el-table-column
label="开始时间"
align="center"
prop="startDate"
width="100"
/>
<el-table-column
label="结束时间"
align="center"
prop="endDate"
width="100"
/>
<el-table-column
label="最后修改人"
align="center"
prop="updateUserName"
width="100"
/>
<el-table-column
label="最后修改时间"
align="center"
prop="updateTime"
width="100"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="180"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDeleteorPlayorpause(scope.row, 0, '删除')"
>
删除</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-video-play"
v-if="scope.row.status == '3'"
@click="handleDeleteorPlayorpause(scope.row, 1, '启用')"
>启用</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-video-pause"
v-if="scope.row.status != '3'"
@click="handleDeleteorPlayorpause(scope.row, 3, '停用')"
>停用</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
layout=" prev, pager, next, jumper, sizes,total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.limit"
@pagination="findSourceFlightRules"
/>
<!-- 查看目的航班对话框 -->
<el-dialog
title="实际配载航班"
:visible.sync="openFlightDate"
width="70%"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate">
<el-table-column type="index" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column
label="ACCS原航班"
align="center"
prop="sourceFlightNo"
/>
<el-table-column
label="实际配载航班"
align="center"
prop="actualFlight"
width="280"
/>
<el-table-column label="航班日期" align="center" prop="flightDate" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleClick(scope.row.actualFlight, 'detail')"
>查看配置维度</el-button
>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelFlightDate">返 回</el-button>
</div>
</el-dialog>
<!-- 添加或修改对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="55%"
:append-to-body="true"
:close-on-click-modal="false"
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="10">
<el-form-item label="ACCS原航班" prop="sourceFlightNo">
<el-input
v-model="form.sourceFlightNo"
placeholder="请输入ACCS原航班号"
maxlength="10"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="有效开始时间" prop="startDate">
<el-date-picker
clearable
size="small"
:picker-options="pickerOptionsStart"
v-model="form.startDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择开始时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="有效结束时间" prop="endDate">
<el-date-picker
clearable
size="small"
:picker-options="pickerOptionsEnd"
v-model="form.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择结束时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<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
>
</el-col>
<el-col :span="24">
<el-form-item label="配载航班" prop="flightRank">
<el-input
type="textarea"
v-model="form.flightRank"
:rows="4"
></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="周期段">
<el-checkbox-group v-model="dayOfWeek">
<el-checkbox
v-for="item in dayOfWeekList"
:key="item"
:label="item"
:name="item"
></el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
findSourceFlightRulesApi,
sourceFlightRulesSaveApi,
delOrEnableORDisableApi,
findSourceFlightAndFlightDateApi,
} from "@/api/sourceFlightRules";
export default {
name: "FlightRandConfig",
data() {
return {
// data 中设定
pickerOptionsStart: {
disabledDate: (time) => {
let endDateVal = this.form.endDate;
if (endDateVal) {
return (
time.getTime() > new Date(endDateVal).getTime() ||
time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000
);
} else {
return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
}
},
},
pickerOptionsEnd: {
disabledDate: (time) => {
let beginDateVal = this.form.startDate;
if (beginDateVal) {
return time.getTime() < new Date(beginDateVal).getTime();
} else {
return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
}
},
},
//周期段
dayOfWeekList: ["D1", "D2", "D3", "D4", "D5", "D6", "D7"],
// 遮罩层
loading: false,
// 遮罩层
loadingFlightDate: false,
// 弹出层标题
title: "",
// 总条数
total: 0,
// 原航班规则数据
sourceFlightRulesList: [],
//目的航班数据
sourceFlightAndFlightDate: [],
statusList: [
{
id: 1,
name: "有效",
},
{
id: 3,
name: "停用",
},
],
// 新增修改查看规则弹出层
open: false,
// 是否显示查看目的航班弹出层
openFlightDate: false,
// 查询参数
queryParams: {
start: 0, //当前条数【代表第几条数据 +1开始】
pageNum: 1,
limit: 20, //一页显示多少条数据
sourceFlightNo: undefined, //原航班号
status: undefined, //状态
flightDate: undefined, //日期
},
dayOfWeek: [],
// 表单参数
form: {
dayOfWeek: [],
},
// 表单校验
rules: {
sourceFlightNo: [
{
required: true,
message: "ACCS原航班号不能为空",
trigger: "blur",
},
],
flightRank: [
{
required: true,
message: "配载航班不能为空",
trigger: "blur",
},
],
},
};
},
created() {
this.findSourceFlightRules();
},
methods: {
//跳转到查看,修改页面
handleClick(flightiId, handle) {
this.openFlightDate = false;
this.$router.push({
name: "FlightAllocConfigInfo",
params: {
handle: handle,
id: flightiId,
},
});
},
/** 查询原航班顺位规则*/
findSourceFlightRules() {
this.loading = true;
if (this.queryParams.pageNum > 1) {
this.queryParams.start =
(this.queryParams.pageNum - 1) * this.queryParams.limit;
} else {
this.queryParams.start = 0;
}
findSourceFlightRulesApi(this.queryParams).then((response) => {
if (response.code == 200) {
this.sourceFlightRulesList = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
} else {
this.msgError(response.msg);
}
});
},
/** 新增按钮操作 */
handleAdd() {
this.form = {};
this.open = true;
this.title = "添加ACCS原航班顺位规则";
this.form.id = -1;
this.dayOfWeek = [];
},
/** 修改按钮操作 */
handleUpdate(row) {
this.form = {};
this.dayOfWeek = [];
this.open = true;
this.title = "修改ACCS原航班顺位规则";
this.form = JSON.parse(JSON.stringify(row));
this.dayOfWeek = this.form.dayOfWeek
? this.form.dayOfWeek.split(";")
: [];
//this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
},
/** 删除 启用 停用按钮操作 */
handleDeleteorPlayorpause(row, status, statusText) {
//删除前需要停用
if (status === 0 && row.status != "3") {
this.$message({
message: "请停用后删除",
type: "warning",
});
return;
}
this.$confirm("是否确认" + statusText + "此数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let disable = {
id: row.id,
status: status,
};
delOrEnableORDisableApi(disable)
.then((response) => {
if (response.code == 200) {
this.findSourceFlightRules();
this.msgSuccess(statusText + "成功");
} else {
this.msgError(response.msg);
}
})
.catch(() => {});
});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.dayOfWeek = this.dayOfWeek.sort();
let formdata = JSON.parse(JSON.stringify(this.form));
formdata.sourceFlightNo = formdata.sourceFlightNo
.trim()
.toUpperCase();
formdata.flightRank = formdata.flightRank.trim().toUpperCase();
if (formdata.startDate === undefined || formdata.startDate == null) {
formdata.startDate = "";
}
if (formdata.endDate === undefined || formdata.endDate == null) {
formdata.endDate = "";
}
//处理数据
sourceFlightRulesSaveApi(formdata).then((response) => {
if (response.code === 200) {
this.msgSuccess("保存成功");
this.open = false;
this.findSourceFlightRules();
} else {
this.msgError(response.msg);
}
});
}
});
},
// 表单重置
reset() {
this.form = {
dayOfWeek: [],
};
this.resetForm("form");
},
/** 查询目的航班*/
findSourceFlightAndFlightDate() {
//校验原航班号非空
if (
this.queryParams.sourceFlightNo === null ||
this.queryParams.sourceFlightNo === undefined ||
this.queryParams.sourceFlightNo.trim() === ""
) {
this.$message.warning("ACCS原航班号为空");
return;
}
//校验原日期非空
if (
this.queryParams.flightDate === null ||
this.queryParams.flightDate === undefined
) {
this.$message.warning("日期为空");
return;
}
this.openFlightDate = true;
this.loadingFlightDate = true;
this.sourceFlightAndFlightDate = [];
findSourceFlightAndFlightDateApi(this.queryParams).then((response) => {
if (response.code === 200) {
this.sourceFlightAndFlightDate = response.data;
this.loadingFlightDate = false;
} else {
this.msgError(response.msg);
}
});
},
// 目的航班弹出框返回
cancelFlightDate() {
this.openFlightDate = false;
this.findSourceFlightRules();
},
// 取消按钮
cancel() {
this.open = false;
this.findSourceFlightRules();
//this.reset();
},
// 状态字典翻译
statusFormat(row) {
if (row.status === "1") {
return "有效";
} else if (row.status === "0") {
return "执行中";
} else if (row.status === "3") {
return "停用";
}
return row.status;
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.sourceFlightNo = undefined;
this.resetForm("queryForm");
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParams.start = 0;
this.findSourceFlightRules();
},
},
computed: {
upCase: {
get: function () {
return this.queryParams.sourceFlightNo;
},
set: function (val) {
this.queryParams.sourceFlightNo = val.toUpperCase();
},
},
},
};
</script>
<style>
</style>
src/views/basicInformation/caExportPreQualification/index.vue
deleted
100644 → 0
View file @
2531806
<template>
<div class="app-container">
<el-form
class="form-header"
:model="queryParams"
label-position="right"
label-width="auto"
size="medium"
>
<el-row>
<el-col :span="6">
<el-form-item label="航班日期从" prop="fltDateStart">
<el-date-picker
value-format="yyyy-MM-dd"
class="formItem"
v-model="queryParams.fltDateStart"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="到" prop="fltDateEnd">
<el-date-picker
value-format="yyyy-MM-dd"
class="formItem"
v-model="queryParams.fltDateEnd"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班号">
<el-input
type="textarea"
v-model="fltNo"
clearable
class="formItem"
placeholder="AC001;AC002"
rows="1"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运单号">
<el-input
clearable
type="textarea"
v-model="queryParams.waybillNo"
class="formItem"
placeholder="请输入运单号(回车间隔)"
rows="1"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-input
type="textarea"
v-model="siteName"
class="formItem"
placeholder="PVG;PEK"
clearable
rows="1"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="URSA">
<el-input
clearable
type="textarea"
v-model="ursa"
class="formItem"
placeholder="S_;P_;E2"
rows="1"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-switch
v-model="queryParams.reExport"
active-color="#13ce66"
active-text="重新导出"
style="padding-left: 35px"
>
</el-switch>
</el-col>
</el-row>
<div style="margin-top: 25px">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
type="warning"
:disabled="tableData.length == 0"
@click="xlse()"
:loading="downLoadingTip.downloading"
icon="el-icon-download"
size="mini"
>{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出"
}}</el-button
>
</div>
</el-form>
<el-table
max-height="500"
highlight-current-row
border
stripe
v-loading="loading"
:data="tableData"
>
<el-table-column
label="运单号"
align="center"
prop="waybillNo"
width="150"
/>
<el-table-column
:show-overflow-tooltip="true"
label="品牌描述"
align="center"
prop="nameDescription"
width="150"
/>
<el-table-column
label="航班日期"
align="center"
prop="fltDate"
width="150"
/>
<el-table-column label="航班号" align="center" prop="fltNo" />
<el-table-column
label="航班路线"
align="center"
prop="route"
width="150"
/>
<el-table-column
label="配置航班类型"
align="center"
prop="kindName"
width="130"
/>
<el-table-column label="尺寸" align="center" prop="sizeStr" />
<el-table-column label="件数" align="center" prop="qty" />
<el-table-column label="实际重量" align="center" prop="actualWeight" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="180"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
layout=" prev, pager, next, jumper, sizes,total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.limitSize"
@pagination="findAllFltData"
/>
</div>
</template>
<script>
import { findCagroPreData } from "@/api/cargoSelect";
import { cargoXlsxPre } from "@/utils/zipdownload";
export default {
name: "CAPreQualificationExport",
data() {
return {
//导出
downLoadingTip: {
tip: "",
downloading: false,
},
tableData: [], //表格数据
// 遮罩层
loading: false,
// 弹出层标题
title: "",
// 总条数
total: 0,
// 原航班规则数据
findAllFltDatList: [],
// 新增修改查看规则弹出层
open: false,
// 查询参数
queryParams: {
limitStart: 0, //当前条数【代表第几条数据 +1开始】
pageNum: 1,
limitSize: 20, //一页显示多少条数据
fltDateStart: undefined, //航班日期开始
fltDateEnd: undefined, //航班日期结束
reExport: false,
//航班号
fltNo: null,
//运单号
waybillNo: "",
//站点
siteName: "",
//ursa
ursa: "",
},
// 表单校验
rules: {},
};
},
created() {},
methods: {
// 导出表格
xlse() {
this.downLoadingTip.downloading = true;
this.downLoadingTip.tip = "正在导出结果集请耐心等待";
let cargoXlse = { title: "航班预审表", cargoExportPreQueryDto: {} };
cargoXlse.cargoExportPreQueryDto = JSON.parse(
JSON.stringify(this.queryParams)
);
cargoXlse.cargoExportPreQueryDto.limitStart = 0;
cargoXlse.cargoExportPreQueryDto.limitSize = -1;
cargoXlsxPre("/cargo/excelPre", cargoXlse)
.then(() => {
this.downLoadingTip.downloading = false;
this.downLoadingTip.tip = "";
this.progress = 100;
})
.catch(() => {
this.downLoadingTip.downloading = false;
this.downLoadingTip.tip = "";
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParams.start = 0;
this.findAllFltData();
},
/** 预审信息查寻*/
findAllFltData() {
this.loading = true;
if (this.queryParams.pageNum > 1) {
this.queryParams.limitStart =
(this.queryParams.pageNum - 1) * this.queryParams.limitSize;
} else {
this.queryParams.limitStart = 0;
}
findCagroPreData(this.queryParams).then((response) => {
if (response.code == 200) {
this.tableData = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
} else {
this.msgError(response.msg);
}
});
},
},
computed: {
fltNo: {
get: function () {
return this.queryParams.fltNo;
},
set: function (val) {
this.queryParams.fltNo = val.toUpperCase();
},
},
siteName: {
get: function () {
return this.queryParams.siteName;
},
set: function (val) {
this.queryParams.siteName = val.toUpperCase();
},
},
ursa: {
get: function () {
return this.queryParams.ursa;
},
set: function (val) {
this.queryParams.ursa = val.toUpperCase();
},
},
},
};
</script>
<style scoped>
.tips {
float: right;
color: #606266;
font-size: 14px;
margin-right: 40px;
}
</style>
src/views/basicInformation/caPreReviewImport/index.vue
deleted
100644 → 0
View file @
2531806
<template>
<div style="margin: 20px">
<el-form :inline="true" :model="form" class="demo-form-inline" size="small">
<el-form-item>
<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">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="downloadTempleate">下载模板</el-button>
</el-form-item>
</el-form>
<div style="font-size: 12px; font-weight: 700">
提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span>
</div>
<el-table ref="filterTable" :data="tableData" v-loading="loading" style="width: 100%; margin-top: 20px" size="small" border>
<el-table-column label="行号" prop="line" fixed width="50" align="center">
</el-table-column>
<el-table-column label="错误信息" prop="errorMessage" fixed width="300">
<template slot-scope="scope">
<div v-for="(m, key) in scope.row.errorMessage" :key="key">
{{ m }}
</div>
</template>
</el-table-column>
<el-table-column v-if="tableData.length == 0"></el-table-column>
<el-table-column v-if="tableData.length > 0" label="运单号" align="center" prop="A" />
<el-table-column v-if="tableData.length > 0" label="品名描述" align="center" prop="B" />
<el-table-column v-if="tableData.length > 0" label="航班日期" align="center" prop="C" />
<el-table-column v-if="tableData.length > 0" label="航班号" align="center" prop="D" />
<el-table-column v-if="tableData.length > 0" label="预审意见" align="center" prop="E" />
<!-- <el-table-column v-for="(value, key) in this.tableData[0]" :key="key"
v-if="key != 'errorMessage' && key != 'line'" :label="key" :prop="key" width="120"></el-table-column>-->
</el-table>
</div>
</template>
<script>
import {
downLoadTemplate,
importcaPreReview,
} from "@/api/caPreReviewImport";
export default {
name:"CAPreReviewImport",
data() {
return {
// 遮罩层
loading: false,
flightType: [],
form: {
type: "",
region: "",
},
fileList: [],
tableData: [],
};
},
methods: {
downloadTempleate() {
let fileName = "航班预审导入模板.xlsx";
downLoadTemplate().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;
this.loading=true;
importcaPreReview(file, this.form.type).then((res) => {
this.loading=false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else {
this.$message.error(res.msg);
this.tableData = res.data;
}
} else {
this.$message.success(res.msg);
this.tableData = res.data;
}
});
},
handleRemove(file, fileList) {
//清掉上传的文件
this.tableData = [];
this.fileList = [];
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.uploadExcel(file);
},
},
created() {
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.upload-demo {
float: right;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
vertical-align: top;
}
</style>
src/views/basicInformation/flightInformationImport/index.vue
deleted
100644 → 0
View file @
2531806
<template>
<div style="margin: 20px">
<el-form :inline="true" :model="form" class="demo-form-inline" size="small">
<el-form-item label="航班种类">
<el-select v-model="form.type" placeholder="航班种类">
<el-option
v-for="item in flightType"
:key="item.id"
:label="item.englishName"
:value="item.code"
>{{ item.englishName }}</el-option
>
</el-select>
</el-form-item>
<el-form-item>
<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"
>
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="downloadTempleate"
>下载模板</el-button
>
</el-form-item>
</el-form>
<div style="font-size: 12px; font-weight: 700">
提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span>
</div>
<el-table
ref="filterTable"
:data="tableData"
style="width: 100%; margin-top: 20px"
size="small"
border
>
<el-table-column label="行号" prop="line" fixed width="50" align="center">
</el-table-column>
<el-table-column label="错误信息" prop="errorMessage" fixed width="200">
<template slot-scope="scope">
<div v-for="(m, key) in scope.row.errorMessage" :key="key">
{{ m }}
</div>
</template>
</el-table-column>
<el-table-column v-if="tableData.length == 0"></el-table-column>
<el-table-column
v-for="(value, key) in this.tableData[0]"
:key="key"
v-if="key != 'errorMessage' && key != 'line'"
:label="key"
:prop="key"
width="120"
></el-table-column>
</el-table>
</div>
</template>
<script>
import {
filghtKindData,
downLoadTemplate,
importFlight,
} from "@/api/flightInfoImport";
export default {
name: "FlightInformationImport",
data() {
return {
flightType: [],
form: {
type: "",
region: "",
},
fileList: [],
tableData: [],
};
},
methods: {
downloadTempleate() {
let downloadType = "";
let fileName = "";
switch (this.form.type) {
case "flightKind20":
downloadType = "whiteTail";
fileName = "航班信息导入模板WhiteTail.xlsx";
break;
case "flightKind30":
downloadType = "purpleTail";
fileName = "航班信息导入模板PurpleTail.xlsx";
break;
default:
this.$confirm("此类航班暂无模板,请选择其他类型航班", "提示", {
confirmButtonText: "确定",
showCancelButton: false,
type: "warning",
});
}
if (downloadType != "") {
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;
importFlight(file, this.form.type).then((res) => {
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else {
this.$message.error(res.msg);
this.tableData = res.data;
}
} else {
this.$message.success("导入成功");
this.tableData = res.data;
}
});
},
handleRemove(file, fileList) {
//清掉上传的文件
this.tableData = [];
this.fileList = [];
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.uploadExcel(file);
},
},
created() {
filghtKindData().then((response) => {
if (response.code != 200) {
this.$message({
message: response.msg,
type: "error",
});
}
this.flightType = response.data;
this.form.type = response.data[0].code;
});
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.upload-demo {
float: right;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
vertical-align: top;
}
</style>
\ No newline at end of file
src/views/basicInformation/flightInformationMaintenance/index.vue
deleted
100644 → 0
View file @
2531806
<template>
<div>
<el-form
class="form-header"
:model="queryParams"
ref="queryForm"
label-position="right"
label-width="auto"
size="medium"
>
<el-row>
<el-col :span="6">
<el-form-item label="航班日期从" prop="fltDateStart">
<el-date-picker
class="formItem"
value-format="yyyy-MM-dd"
v-model="queryParams.fltDateStart"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="到" prop="fltDateEnd">
<el-date-picker
class="formItem"
value-format="yyyy-MM-dd"
v-model="queryParams.fltDateEnd"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班号" prop="fltNo">
<el-input
class="formItem"
v-model="queryParams.fltNo"
placeholder="请输入航班号"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班类型" prop="typeId">
<el-select
class="formItem"
v-model="queryParams.typeId"
placeholder="请选择航班类型"
clearable
>
<el-option
v-for="dict in flightTypelist"
:key="dict.id"
:label="dict.chineseName"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班状态" prop="statusId">
<el-select
class="formItem"
v-model="queryParams.statusId"
placeholder="请选择航班状态"
clearable
>
<el-option
v-for="dict in flightStatuslist"
:key="dict.id"
:label="dict.chineseName"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班种类" prop="flightKindId">
<el-select
class="formItem"
v-model="queryParams.flightKindId"
placeholder="请选择航班种类"
clearable
>
<el-option
v-for="dict in flightKindlist"
:key="dict.id"
:label="dict.chineseName"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@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"
>新增</el-button
>
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
size="mini"
@click="handleFlightStatus('flightStatus10')"
>自动配舱开启</el-button
>
<el-button
type="primary"
icon="el-icon-circle-close"
size="mini"
@click="handleFlightStatus('flightStatus80')"
>自动配舱关闭</el-button
>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate">修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple">删除
</el-button>
</el-col>
</el-row> -->
<el-table
height="550"
highlight-current-row
border
stripe
v-loading="loading"
:data="findAllFltDatList"
size="small"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="航班日期"
align="center"
prop="fltDate"
width="120"
/>
<el-table-column
label="航班起飞时间"
align="center"
prop="takeOffTime"
width="120"
/>
<el-table-column label="航班号" align="center" prop="fltNo" width="150"/>
<el-table-column label="航班路线" align="center" prop="route" width="150" />
<el-table-column
label="航班类型"
align="center"
prop="typeName"
width="100"
/>
<el-table-column
label="航班种类"
align="center"
prop="flightKindName"
width="130"
/>
<el-table-column label="航班状态" align="center" prop="statusName" />
<el-table-column
label="总重量"
align="center"
prop="totalWeight"
width="130"
/>
<el-table-column
label="原始重量(KG)"
align="center"
prop="originalWeight"
width="130"
/>
<el-table-column
label="总体积(cm³)"
align="center"
prop="totalVolume"
width="130"
/>
<el-table-column
label="是否限制一票一件"
align="center"
prop="ticketToPiece"
width="150"
:formatter="ticketToPieceFormat"
/>
<el-table-column
label="是否需要预审"
align="center"
prop="needRequired"
width="150"
:formatter="needRequiredFormat"
/>
<el-table-column
label="额外增重百分比"
align="center"
prop="extraWeightPercent"
width="150"
/>
<el-table-column
label="高价百分比"
align="center"
prop="highPriceWeightPercent"
width="150"
/>
<el-table-column
label="低价百分比"
align="center"
prop="lowPriceWeightPercent"
width="150"
/>
<el-table-column
label="是否开启高地价"
align="center"
prop="highLowPriceFlg"
width="150"
:formatter="highLowPriceFlgFormat"
/>
<el-table-column
label="已配重量"
align="center"
prop="alloctedWeight"
width="150"
/>
<el-table-column
label="已配体积(cm³)"
align="center"
prop="alloctedVolume"
width="150"
/>
<el-table-column
label="航班优先级"
align="center"
prop="priorityName"
width="150"
/>
<el-table-column
label="配舱优先级"
align="center"
prop="priorityRuleName"
width="150"
/>
<el-table-column
label="创建人"
align="center"
prop="createUserName"
width="120"
/>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="155"
/>
<!-- <el-table-column label="创建时间" align="center" prop="createTime" width="155">
<template slot-scope="scope">
<span>{{ renderTime(scope.row.createTime) }}</span>
</template>
</el-table-column> -->
<el-table-column
label="最后修改人"
align="center"
prop="lastModifyUserName"
width="155"
/>
<!-- <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="155">
<template slot-scope="scope">
<span>{{ renderTime(scope.row.lastModifyTime) }}</span>
</template>
</el-table-column> -->
<el-table-column
label="最后修改时间"
align="center"
prop="lastModifyTime"
width="120"
/>
<el-table-column
v-if="findAllFltDatList.length > 0"
label="操作"
align="center"
class-name="small-padding fixed-width"
width="130"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button
>
<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row,'删除')">
删除</el-button> -->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
layout=" prev, pager, next, jumper, sizes,total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.limitSize"
@pagination="findAllFltData"
/>
<!-- 添加或修改对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="60%"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-position="right"
label-width="auto"
>
<el-row>
<el-col :span="12">
<el-form-item label="航班号" prop="fltNo">
<el-input
@blur="blurfltNo"
:disabled="formdisabled.fltNo"
style="width: 93%"
v-model="form.fltNo"
placeholder="请输入航班号"
/>
</el-form-item>
</el-col>
<!-- <el-col :span="1">  </el-col> -->
<el-col :span="12">
<el-form-item label="航班日期" prop="fltDate">
<el-date-picker
:disabled="formdisabled.fltDate"
clearable
size="small"
v-model="form.fltDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择航班日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班路线" prop="route">
<el-input
style="width: 93%"
v-model="form.route"
placeholder="请输入航班路线"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班种类" prop="kindId">
<el-select v-model="form.kindId" placeholder="请选择航班种类">
<el-option
v-for="item in flightKindlist"
:key="item.id"
:label="item.chineseName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班类型" prop="typeId">
<el-select v-model="form.typeId" placeholder="请选择航班类型">
<el-option
v-for="item in flightTypelist"
:key="item.id"
:label="item.chineseName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班状态" prop="statusId">
<el-select
:disabled="true"
v-model="form.statusId"
placeholder="请选择航班状态"
>
<el-option
v-for="item in flightStatuslist"
:key="item.id"
:label="item.chineseName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原始重量(KG)" prop="originalWeight">
<el-input-number
@change="LowHighAvailable"
placeholder="请输入原始重量(KG)"
style="width: 93%"
v-model="form.originalWeight"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="额外增重百分比" prop="extraWeightPercent">
<el-input-number
@change="LowHighAvailable"
placeholder="请输入额外增重百分比"
style="width: 93%"
v-model="form.extraWeightPercent"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否开启高低价" prop="highLowPriceFlg">
<el-switch
@change="LowHighAvailable"
v-model="form.highLowPriceFlg"
active-color="#13ce66"
>
</el-switch>
</el-form-item>
</el-col>
<!-- 是否需要预审,1:预审,0:取消预审 -->
<el-col :span="12">
<el-form-item label="是否预审" prop="isNeedRequired">
<el-switch
:disabled="true"
v-model="form.isNeedRequired"
active-color="#13ce66"
>
</el-switch>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高价百分比" prop="highPriceWeightPercent">
<el-input-number
:disabled="ishighPriceWeightPercent"
@change="LowHighAvailable"
placeholder="请输入高价百分比"
style="width: 93%"
v-model="form.highPriceWeightPercent"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价百分比" prop="lowPriceWeightPercent">
<el-input-number
:disabled="true"
placeholder="请输入低价百分比"
style="width: 93%"
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
:disabled="true"
placeholder="请输入高价可配重量"
style="width: 93%"
v-model="form.highAvailableWeight"
:precision="2"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价可配重量" prop="lowAvailableWeight">
<el-input-number
:disabled="true"
placeholder="请输入低价可配重量"
style="width: 93%"
v-model="form.lowAvailableWeight"
:precision="2"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高价已配重量" prop="highAllocatedWeight">
<el-input-number
:disabled="true"
placeholder="请输入高价已配重量"
style="width: 93%"
v-model="form.highAllocatedWeight"
:precision="2"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价已配重量" prop="lowAllocatedWeight">
<el-input-number
:disabled="true"
placeholder="请输入低价已配重量"
style="width: 93%"
v-model="form.lowAllocatedWeight"
:precision="2"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="已配总重量" prop="alloctedWeight">
<el-input-number
:disabled="true"
placeholder="请输入已配总重量"
style="width: 93%"
v-model="form.alloctedWeight"
:precision="2"
></el-input-number>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<el-dialog
title="未删除成功航班"
width="40%"
center
:visible.sync="dialogTableVisible"
:close-on-click-modal="false" :append-to-body="true"
>
<el-table :data="gridData">
<el-table-column
property="fltNo"
label="航班号"
width="150"
></el-table-column>
<el-table-column
property="fltDate"
label="航班日期"
width="200"
></el-table-column>
<el-table-column
property="alloctedWeight"
label="已配重量"
width="200"
></el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import {
delFlight,
findFltConditionDataApi,
findAllFltDataApi,
findFltById,
saveOrUpdate,
findFltCommonConf,
updateStatusBatch,
} from "@/api/findAllFltData";
export default {
name: "FlightInformationMaintenance",
data() {
return {
gridData: [],
dialogTableVisible: false,
//高价百分比是否打开
ishighPriceWeightPercent: true,
//form属性禁用状态
formdisabled: {
//航班号
fltNo: false,
//航班日期
fltDate: false,
//航班路线
route: false,
//航班种类
kindId: false,
//航班类型
typeId: false,
//原始重量
originalWeight: false,
},
//航班种类
flightKindlist: [],
//航班状态
flightStatuslist: [],
//航班类型
flightTypelist: [],
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 遮罩层
loading: false,
// 遮罩层
loadingFlightDate: false,
// 弹出层标题
title: "",
// 总条数
total: 0,
// 原航班规则数据
findAllFltDatList: [],
//目的航班数据
sourceFlightAndFlightDate: [],
statusList: [
{
id: 1,
name: "有效",
},
{
id: 3,
name: "停用",
},
],
// 新增修改查看规则弹出层
open: false,
// 是否显示查看目的航班弹出层
openFlightDate: false,
// 查询参数
queryParams: {
limitStart: 0, //当前条数【代表第几条数据 +1开始】
pageNum: 1,
limitSize: 20, //一页显示多少条数据
fltDateStart: undefined, //航班日期开始
fltDateEnd: undefined, //航班日期结束
typeId: undefined, //航班类型
statusId: undefined, //航班状态
flightKindId: undefined, //航班种类
fltNo: undefined, //航班号,要大写
},
// 表单参数
form: {},
// 表单校验
rules: {
fltNo: [
{
required: true,
message: "ACCS原航班号不能为空",
trigger: "blur",
},
],
fltDate: [
{
required: true,
message: "航班日期不能为空",
trigger: "blur",
},
],
kindId: [
{
required: true,
message: "航班种类不能为空",
trigger: "change",
},
],
originalWeight: [
{
required: true,
message: "原始重量(KG)不能为空",
trigger: "blur",
},
],
},
};
},
created() {
//查询条件数据源
this.findFltConditionData();
this.findAllFltData();
},
methods: {
//输入航班号后
blurfltNo() {
if (
this.form.fltNo != null &&
this.form.fltNo != undefined &&
this.form.fltNo != ""
) {
this.form.fltNo = this.form.fltNo.toUpperCase();
findFltCommonConf(this.form).then((response) => {
if (response.code == 200) {
//额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑
if (
response.data != null &&
response.data.extraWeightPercent != null &&
response.data.extraWeightPercent != undefined
) {
this.$set(
this.form,
"extraWeightPercent",
response.data.extraWeightPercent
);
// this.form.extraWeightPercent=response.data.extraWeightPercent;
} else {
this.$set(this.form, "extraWeightPercent", 0);
//this.form.extraWeightPercent=response.data.extraWeightPercent=0;
}
//是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑
if (
response.data != null &&
response.data.highLowPriceFlg != null &&
response.data.highLowPriceFlg != undefined
) {
this.form.highLowPriceFlg =
response.data.highLowPriceFlg === 1 ? true : false;
} else {
this.$set(this.form, "highLowPriceFlg", true);
//this.form.highLowPriceFlg = true;
}
//是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑;
if (
response.data != null &&
response.data.isNeedRequired != null &&
response.data.isNeedRequired != undefined
) {
this.form.isNeedRequired =
response.data.isNeedRequired === 1 ? true : false;
} else {
this.form.isNeedRequired = false;
}
//高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑
if (
response.data != null &&
response.data.highPriceWeightPercent != null &&
response.data.highPriceWeightPercent != undefined
) {
this.form.highPriceWeightPercent =
response.data.highPriceWeightPercent;
} else {
this.form.highPriceWeightPercent = 60;
}
if (
response.data != null &&
response.data.lowPriceWeightPercent != null &&
response.data.lowPriceWeightPercent != undefined
) {
this.form.lowPriceWeightPercent =
response.data.lowPriceWeightPercent;
} else {
this.form.lowPriceWeightPercent = 40;
}
this.LowHighAvailable();
} else {
this.msgError(response.msg);
}
});
}
},
// 是否一票一件
ticketToPieceFormat(row) {
if (row.ticketToPiece === 1) {
return "是";
} else {
return "否";
}
return row.ticketToPiece;
},
// 是否需要预审 1 预审 0 取消预审
needRequiredFormat(row) {
if (row.needRequired === 1) {
return "是";
} else {
return "否";
}
return row.ticketToPiece;
},
//是否开启高低价
highLowPriceFlgFormat(row) {
if (row.highLowPriceFlg === 1) {
return "开启";
} else {
return "未开启";
}
return row.ticketToPiece;
},
//时间格式化
renderTime(date) {
var dateee = new Date(date).toJSON();
return new Date(+new Date(dateee) + 8 * 3600 * 1000)
.toISOString()
.replace(/T/g, " ")
.replace(/\.[\d]{3}Z/, "");
},
//查询条件数据源
findFltConditionData() {
findFltConditionDataApi().then((response) => {
if (response.code == 200) {
//航班种类
this.flightKindlist = response.data.flightKind;
//航班类型
this.flightTypelist = response.data.flightType;
//航班状态
this.flightStatuslist = response.data.flightStatus;
} else {
this.msgError(response.msg);
}
});
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 航班信息维护查询*/
findAllFltData() {
this.loading = true;
if (this.queryParams.pageNum > 1) {
this.queryParams.limitStart =
(this.queryParams.pageNum - 1) * this.queryParams.limitSize;
} else {
this.queryParams.limitStart = 0;
}
if (
this.queryParams.fltNo != null &&
this.queryParams.fltNo != undefined &&
this.queryParams.fltNo != ""
) {
this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase();
}
findAllFltDataApi(this.queryParams).then((response) => {
if (response.code == 200) {
this.findAllFltDatList = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
} else {
this.msgError(response.msg);
}
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加航班信息";
this.form.id = null;
this.form.statusId = this.flightStatuslist[0].id;
this.form.alloctedWeight = 0; //已配重量
this.form.lowAllocatedWeight = 0; //低价已配重量
this.form.highAllocatedWeight = 0; //高价已配重量
//航班号
this.formdisabled.fltNo = false;
//航班日期
this.formdisabled.fltDate = false;
//航班路线
this.formdisabled.route = false;
//航班种类
this.formdisabled.kindId = false;
//航班类型
this.formdisabled.typeId = false;
//原始重量
this.formdisabled.originalWeight = false;
},
//计算高地价可配
LowHighAvailable() {
//判断是否开启高地价
if (this.form.highLowPriceFlg) {
this.ishighPriceWeightPercent = false;
let Weight = 0;
//计算实际重量
if (
this.form.highPriceWeightPercent > 0 ||
this.form.lowPriceWeightPercent > 0
) {
Weight = this.Weightall();
}
//高价可配
if (this.form.highPriceWeightPercent >= 0) {
this.$set(
this.form,
"lowPriceWeightPercent",
100 - this.form.highPriceWeightPercent
);
this.$set(
this.form,
"highAvailableWeight",
(Weight - this.form.alloctedWeight) *
(this.form.highPriceWeightPercent / 100)
);
// this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100)
} else if (
this.title == "修改航班信息" &&
this.form.highPriceWeightPercent > 0
) {
if (this.form.highAvailableWeight) {
this.$set(
this.form,
"highAvailableWeight",
this.form.highAvailableWeight
);
} else {
this.$set(
this.form,
"highAvailableWeight",
(Weight - this.form.alloctedWeight) *
(this.form.highPriceWeightPercent / 100)
);
}
} else {
this.$set(this.form, "highAvailableWeight", 0);
// this.form.HighAvailableWeight = 0;
}
//低价可配
if (this.form.lowPriceWeightPercent > 0) {
this.$set(
this.form,
"lowAvailableWeight",
Weight - this.form.alloctedWeight - this.form.highAvailableWeight
);
//this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight;
} else if (
this.title == "修改航班信息" &&
this.form.lowPriceWeightPercent > 0
) {
if (this.form.lowAvailableWeight) {
this.$set(
this.form,
"lowAvailableWeight",
this.form.lowAvailableWeight
);
} else {
this.$set(
this.form,
"lowAvailableWeight",
Weight - this.form.alloctedWeight - this.form.highAvailableWeight
);
}
} else {
this.$set(this.form, "lowAvailableWeight", 0);
// this.form.lowAvailableWeight = 0;
}
} else {
this.ishighPriceWeightPercent = true;
}
},
//计算实际重量
Weightall() {
let Weight = 0;
if (this.form.extraWeightPercent > 0) {
Weight =
this.form.originalWeight +
this.form.originalWeight * (this.form.extraWeightPercent / 100);
} else {
Weight = this.form.originalWeight;
}
return Weight;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.open = true;
this.title = "修改航班信息";
//航班号
this.formdisabled.fltNo = true;
//航班日期
this.formdisabled.fltDate = true;
//根据ID查item
findFltById(row).then((response) => {
if (response.code == 200) {
this.form = response.data;
//是否开启高地价
this.form.highLowPriceFlg =
this.form.highLowPriceFlg === 1 ? true : false;
//是否预审
this.form.isNeedRequired =
this.form.isNeedRequired === 1 ? true : false;
// 计算高地价可配
this.LowHighAvailable();
} else {
this.msgError(response.msg);
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const fIds = this.ids;
this.$confirm("是否确认删除所选数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
return delFlight(fIds);
})
.then((response) => {
this.findAllFltData();
if (response.data.length > 0) {
this.gridData = response.data;
this.$confirm(response.msg, "提示", {
confirmButtonText: "查看删除失败航班信息",
cancelButtonText: "取消",
type: "warning",
center: true,
})
.then(() => {
this.dialogTableVisible = true;
})
.catch(() => {});
} else {
this.msgSuccess(response.msg);
}
})
.catch(() => {});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
let formdata = JSON.parse(JSON.stringify(this.form));
//高价百分比和低价百分比和不可以大于100
if (
this.form.highLowPriceFlg &&
(formdata.highPriceWeightPercent > 100 ||
formdata.highPriceWeightPercent < 0)
) {
this.$message.warning("请正确填写高低价百分比");
return;
}
//已删除的无法修改
//拿到已删除的id
let statusId = 0;
this.flightStatuslist.map((item) => {
// this.unitList 是你 select option遍历的集合 e 是选中的id
if (item.chineseName === "已删除") {
statusId = item.id;
return;
}
});
if (statusId === formdata.statusId) {
this.$message.warning("已删除的航班无法修改");
return;
}
//是否开启高地价
formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0;
//是否预审
formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0;
//处理数据
saveOrUpdate(formdata).then((response) => {
if (response.code === 200) {
this.msgSuccess("保存成功");
this.open = false;
this.findAllFltData();
} else {
this.msgError(response.msg);
}
});
}
});
},
// 表单重置
reset() {
this.form = {};
this.resetForm("form");
},
// 取消按钮
cancel() {
this.open = false;
this.findAllFltData();
this.reset();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParams.start = 0;
this.findAllFltData();
},
//批量开启/关闭航班
handleFlightStatus(status) {
let handle = status == "flightStatus80" ? "关闭" : "开启";
if (this.ids.length == 0) {
this.msgError("请选择批量" + handle + "的航班");
return;
}
let data = {};
data.status = status;
data.updateIds = this.ids;
updateStatusBatch(data).then((response) => {
if (response.code === 200) {
this.msgSuccess(handle + "成功");
this.findAllFltData();
} else {
this.msgError(response.msg);
}
});
},
},
};
</script>
<style>
.el-table--striped .el-table__body tr.el-table__row--striped.current-row td,
.el-table__body tr.current-row > td {
background-color: #a0cfff;
}
.el-table--striped .el-table__body tr.hover-row.el-table__row--striped > td,
.el-table__body tr.hover-row > td {
background-color: #d9ecff !important;
}
</style>
src/views/basicInformation/queryCargo/index.vue
deleted
100644 → 0
View file @
2531806
<template>
<div class="cargoPage">
<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="配舱航班日期">
<el-date-picker
class="formItem"
v-model="cargoPlaneTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="配载航班号">
<el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :autosize="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关回执状态">
<el-select
placeholder="不限"
v-model="formData.customsReceiptStatusId"
class="formItem"
multiple
clearable
>
<el-option
v-for="item in findConditionData.cargoCustomsReturnStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运单号">
<el-input
type="textarea"
v-model="formData.waybillNo"
class="formItem"
placeholder="请输入运单号(回车间隔)"
:autosize="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申报类别">
<el-select
placeholder="不限"
v-model="formData.typeId"
class="formItem"
clearable
>
<el-option
v-for="item in findConditionData.cargoType"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="服务类型">
<el-select
placeholder="不限"
v-model="formData.serviceTypeId"
class="formItem"
filterable
clearable
>
<el-option
v-for="item in findConditionData.cargoServiceType"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="URSA">
<el-input
type="textarea"
v-model="ursa"
class="formItem"
placeholder="S_;P_;E2"
:autosize="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-input
type="textarea"
v-model="siteName"
class="formItem"
placeholder="PVG;PEK"
:autosize="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-show="formShow">
<el-row type="flex" style="flexWrap: wrap!important">
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
<el-date-picker
class="formItem"
v-model="flightTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input type="text" v-model="fltNo" class="formItem" placeholder="请输入ACCS航班号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="取件日期">
<el-date-picker
class="formItem"
v-model="formData.pickUpDate"
type="date"
placeholder="选择日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建日期">
<el-date-picker
class="formItem"
v-model="createDate"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="货物状态">
<el-select
placeholder="不限"
v-model="formData.statusId"
class="formItem"
filterable
clearable
>
<el-option
v-for="item in findConditionData.cargoStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否自动">
<el-select
placeholder="不限"
v-model="formData.allocationTypeId"
class="formItem"
clearable
>
<el-option
label="手动"
value="1"
>
</el-option>
<el-option
label="自动"
value="2"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
<div style="paddingLeft: 10px;marginTop:20px">
<el-button
type="primary"
icon="el-icon-search"
size="small"
:loading="tableLoading"
@click="select(0)"
>查询</el-button
>
<el-button :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 :type="downLoadingTip.downloading?'warning':'primary'" size="small" @click="xlse(1)" :disabled="tableData.length==0" :loading="downLoadingTip.downloading"
>{{downLoadingTip.downloading?downLoadingTip.tip:"导出全部查询结果"}}</el-button
>
<span style="marginLeft:20px;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>
<div class="tips">
<span style="paddingRight: 50px">总重量:{{ allWeight }}</span>
<span>总件数:{{ allQty }}</span>
</div>
<div class="formShow" @click="formShow = !formShow"><i class="el-icon-s-tools"></i>{{formShow?'收起条件':'更多条件'}}</div>
</div>
</el-form>
<Tables
ref="newTables"
:data="tableData"
:headerData="tableHeader"
:totalCount="totalCount"
:loading="tableLoading"
:limitSize="limitSize"
:limitStart="limitStart"
:page="page"
:shiftKey="shiftKey"
height="550"
@tableSelect="tableSelect"
@tableSelectAll="tableSelectAll"
@currentChange="currentChange"
@sortChange="sortChange"
></Tables>
</div>
</template>
<script>
import { findConditionData, findCargoData } from "@/api/cargoSelect";
import { downLoadXlsx } from "@/utils/zipdownload";
import { upCase } from "@/utils/FedEx"
export default {
name:"QueryCargo",
data() {
return {
formData: {
fltDateStart: "",
fltDateEnd: "",
prematchFltDateStart: "",
prematchFltDateEnd: "",
createTimeStart: null,
createTimeEnd: null,
pickUpDate: 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,
}, //表单数据
tableHeader: [
{
type: "selection",
name: "",
value: "",
width: "50",
align: "center",
sorTable: false,
fixed:true,
},
{
type: "index",
name: "",
value: "",
width: "50",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "口岸代码",
value: "portName",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "取件日期",
value: "pickUpDate",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "取件扫描号",
value: "pickUpScanNo",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "站点",
value: "siteName",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "运单号",
value: "waybillNo",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "总单号",
value: "totalWaybillNo",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "服务类型",
value: "serviceTypeName",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "服务代码",
value: "serviceCode",
width: "150",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "URSA",
value: "ursa",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "申报类型",
value: "typeName",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "HandlingCode",
value: "handingCode",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "subcategory",
value: "subCategory",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "件数",
value: "qty",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "实际重量",
value: "actualWeight",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "收件人国家代码",
value: "consigneeCountry",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "品名描述",
value: "nameDescription",
width: "150",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "海关回执状态",
value: "customsReceiptStatusName",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "预审状态",
value: "preQualificationStatus",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "航班预审意见",
value: "caPretrialOpinion",
width: "150",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "货物状态",
value: "statusName",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "终配航班号",
value: "finalFlightNo",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "终配航班日期",
value: "finalFlightTime",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "二配航班号",
value: "twoMatchFlightNo",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "二配航班日期",
value: "twoMatchFlightTime",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "预配航班号",
value: "preplanFlightNo",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "预配航班日期",
value: "preplanFlightTime",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "ACCS原航班号",
value: "fltNoAccs",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "ACCS原航班日期",
value: "fltDateAccs",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "ACCS原航线",
value: "accsFlightRoute",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "是否RDE手工录入",
value: "manualRde",
width: "170",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "是否自动",
value: "cargoRulesStatus",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "发件人账号",
value: "shipperAccount",
width: "150",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "发件公司中文名称",
value: "shipperCompany",
width: "150",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "始发地城市名称",
value: "originCity",
width: "150",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "收件地",
value: "destinationSiteName",
width: "150",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "尺寸",
value: "sizeStr",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "大货预审意见(是否可以配置航班)",
value: "bigPretrialOpinion",
width: "300",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "大货预审时间",
value: "bigPretrialTime",
width: "150",
align: "center",
sorTable: false,
fixed:false,
},
{
type: "",
name: "海关回执时间",
value: "customsReceiptTime",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "航班预审时间",
value: "caPretrialTime",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "创建人",
value: "createUserName",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
{
type: "",
name: "创建时间",
value: "createTime",
width: "150",
align: "center",
sorTable: true,
fixed:false,
},
], //表头数据
findConditionData: {}, //货物查询条件
tableData: [], //表格数据
allWeight: 0,
allQty: 0,
shiftKey: false,
valueFormat: "yyyy-MM-dd",
tableLoading: false,
downLoadingTip:{
tip:"",
downloading:false,
},
totalCount: 0,
selectTable: [],
flightTime: [],
prepalyFlightTime: [],
cargoPlaneTime:[],
createDate: [],
limitStart: 1,
limitSize: 100, //无限制-1
page:1,
progress:0,
formShow:false,
};
},
created() {
// 查询条件
findConditionData().then((res) => {
if (res.code == 200) {
this.findConditionData = res.data;
} else {
this.$message({
message: "查询条件不存在",
type: "warning",
});
}
});
},
mounted() {
window.addEventListener("keydown", (code) => {
if (code.keyCode === 16 && code.shiftKey) {
this.shiftKey = true;
}
});
window.addEventListener("keyup", (code) => {
if (code.keyCode === 16) {
this.shiftKey = false;
}
});
},
methods: {
clear() {
this.$refs.cargoForm.resetFields();
},
//查询
select(val) {
this.tableData = [];
this.allWeight = 0;
this.allQty = 0;
this.tableLoading = true;
this.dataInfo();
if(val === 0){
this.formData.limitStart = 1;
this.limitStart = 1;
this.page = 1;
}
findCargoData(this.formData).then((res) => {
if (res.code == 200) {
this.tableData = res.data.list;
this.totalCount = res.data.totalCount;
if (res.data.list.length > 0) {
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].index = i;
}
} else {
this.$message({
message: "未查询到数据",
type: "warning",
});
}
} else {
this.$message({
message: res.msg,
type: "warning",
});
}
this.tableLoading = false;
}).catch(()=>{
this.tableLoading = false;
});
this.$refs.newTables.clearTable();
this.cargoTotal();
},
//数据初始化
dataInfo(){
if(this.formData.customsReceiptStatusId != null && this.formData.customsReceiptStatusId.length < 1){
this.formData.customsReceiptStatusId = null;
}
if (this.createDate != null && this.createDate.length > 0) {
this.formData.createTimeStart = this.createDate[0];
this.formData.createTimeEnd = this.createDate[1];
}else{
this.formData.createTimeStart = null;
this.formData.createTimeEnd = null;
}
if (this.prepalyFlightTime != null && this.prepalyFlightTime.length > 0) {
this.formData.prematchFltDateStart = this.prepalyFlightTime[0];
this.formData.prematchFltDateEnd = this.prepalyFlightTime[1];
}else{
this.formData.prematchFltDateStart ="";
this.formData.prematchFltDateEnd = "";
}
if (this.flightTime != null && this.flightTime.length > 0) {
this.formData.fltDateStart = this.flightTime[0];
this.formData.fltDateEnd = this.flightTime[1];
}else{
this.formData.fltDateStart = "";
this.formData.fltDateEnd = "";
}
if(this.cargoPlaneTime != null && this.cargoPlaneTime.length > 0){
this.formData.cargoPlaneStart = this.cargoPlaneTime[0];
this.formData.cargoPlaneEnd = this.cargoPlaneTime[1];
}else{
this.formData.cargoPlaneStart = null;
this.formData.cargoPlaneEnd = null;
}
if(this.formData.waybillNo){
this.formData.waybillNo = this.formData.waybillNo.trim();
}
this.formData.limitStart = this.limitStart;
this.formData.limitSize = 100;
},
//总和
cargoTotal(){
this.allWeight = 0;
this.allQty = 0;
if(this.selectTable.length > 0){
this.selectTable.forEach(item=>{
this.allWeight = this.allWeight + item.actualWeight;
this.allQty = this.allQty + item.qty;
})
this.allWeight = this.allWeight.toFixed(2);
this.allQty = this.allQty.toFixed();
}
},
//表格多选
tableSelect(val){
this.selectTable = val.selection;
this.cargoTotal();
},
//表格全选
tableSelectAll(val){
this.selectTable = val;
this.cargoTotal();
},
//分页
currentChange(val){
this.formData.limitStart = val.start;
this.limitStart = val.start;
this.page = val.page;
this.select()
},
//排序
sortChange(val){
let data = []
let nullData = []
this.tableData.forEach(item=>{
if(item[val.prop]){
data.push(item)
}else{
nullData.push(item)
}
})
data = data.sort(this.$refs.newTables.compare(val.prop,val.order))
if(val.order != "ascending"){
this.tableData = nullData.concat(data)
}else{
this.tableData = data.concat(nullData)
}
this.tableData.forEach((item, index = 0) => {
item.index = index;
});
},
// 导出表格
xlse(page) {
this.progress = 1;
this.downLoadingTip.downloading = true;
let cargoXlse = {title:"货物导出表",cargoConditionDto:{}};
this.dataInfo();
cargoXlse.cargoConditionDto = this.formData;
cargoXlse.cargoConditionDto.limitSize = this.limitSize;
if (page == 0) {
this.downLoadingTip.tip = "正在导出本页结果集"
cargoXlse.cargoConditionDto.limitStart = this.limitStart;
downLoadXlsx("/cargo/excel",cargoXlse,"货物表").then(()=>{
this.downLoadingTip.downloading = false;
this.downLoadingTip.tip = ""
this.progress = 100;
}).catch(()=>{
this.downLoadingTip.downloading = false;
this.downLoadingTip.tip = "";
})
} else {
if(this.totalCount < 80000){
this.downLoadingTip.tip = "正在导出全部结果集请耐心等待"
cargoXlse.cargoConditionDto.limitStart = 0;
cargoXlse.cargoConditionDto.limitSize = -1;
downLoadXlsx("/cargo/excel",cargoXlse,"货物表").then(()=>{
this.downLoadingTip.downloading = false;
this.downLoadingTip.tip = ""
this.progress = 100;
}).catch(()=>{
this.downLoadingTip.downloading = false;
this.downLoadingTip.tip = ""
})
}else{
this.downLoadingTip.downloading = false;
this.$message({
message: "导出数据量过大,请不要超过8万条",
type: "warning",
});
}
}
},
},
computed: {
fltNo: {
get: function () {
return this.formData.fltNo;
},
set: function (val) {
this.formData.fltNo = upCase(val);
},
},
siteName: {
get: function () {
return this.formData.siteName;
},
set: function (val) {
this.formData.siteName = upCase(val);
},
},
ursa: {
get: function () {
return this.formData.ursa;
},
set: function (val) {
this.formData.ursa = upCase(val);
},
},
cargoPlaneNo:{
get: function () {
return this.formData.cargoPlaneNo;
},
set: function (val) {
this.formData.cargoPlaneNo = upCase(val);
},
}
},
};
</script>
<style scoped>
.tips {
display: inline-block;
color: #606266;
font-size: 14px;
margin-top: 10px;
margin-left: 50px;
}
.progress{
width:200px;
display: inline-block;
margin:0 0 0 20px;
}
.formShow{
width: max-content;
height:48px;
line-height: 48px;
font-weight: 900;
color: rgb(64, 158, 255);
font-size: 14px;
float: right;
margin-right:20px;
}
</style>
\ No newline at end of file
Please
register
or
login
to post a comment