jinhui.wang

代码修正

......@@ -14,7 +14,7 @@
@contextmenu.prevent.native="openMenu(tag,$event)"
>
{{ tag.title }}
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
<span v-if="tag.name != 'FlightAllocConfigAdd' && tag.name != 'FlightAllocConfigInfo' && !isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
</router-link>
</scroll-pane>
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
......
......@@ -81,7 +81,7 @@ export const constantRoutes = [
{
path: '/flightAllocConfig/:handle',
component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
name: 'FlightAllocConfigInfo',
name: 'FlightAllocConfigAdd',
meta: { title: '添加航班配舱', icon: 'user', breadcrumb: false }
},
]
......
......@@ -860,8 +860,8 @@ export default {
this.loading = false;
if (res.code === 200) {
this.tableData = res.data.list;
this.totalCount = res.data.total;
if (res.data.list.length > 0) {
this.totalCount = res.data.total;
this.tableData.forEach((item, index = 0) => {
item.index = index;
});
......@@ -1004,6 +1004,9 @@ export default {
} else {
this.tableData = data.concat(nullData);
}
this.tableData.forEach((item, index = 0) => {
item.index = index;
});
},
//添加到航班
addFit() {
......
......@@ -36,7 +36,7 @@
type="primary"
icon="el-icon-plus"
size="mini"
@click="$router.push({ name: 'FlightAllocConfigInfo', params: { handle: 'add' } })"
@click="$router.push({ name: 'FlightAllocConfigAdd', params: { handle: 'add' } })"
>添加</el-button
>
</div>
......
<template>
<div style="margin: 40px" v-loading="loading">
<el-empty description="找不到这条数据!" v-if="isEmpty"></el-empty>
<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"
......@@ -249,7 +252,6 @@
</el-card>
</el-form-item>
<el-form-item> </el-form-item>
</el-form>
<div style="marginleft: 200px">
<el-button
......@@ -317,6 +319,9 @@ export default {
btnLoading: false,
loading: true,
isEmpty: false,
routeName:"",
dataId:"",
handleName:""
};
},
methods: {
......@@ -356,7 +361,9 @@ export default {
this.formHandlingCode = this.form.handlingCode;
this.formSubCategory = this.form.subCategory;
this.form.isNeedRequired = this.isNeedRequired;
this.form.purposeOfFlightNo = this.form.purposeOfFlightNo.toUpperCase();
if(this.form.purposeOfFlightNo){
this.form.purposeOfFlightNo = this.form.purposeOfFlightNo.toUpperCase();
}
if (this.isLocation == 1) {
this.form.notLocation = "";
} else {
......@@ -428,41 +435,78 @@ export default {
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(
this.$store.state.tagsView.visitedViews[
this.$store.state.tagsView.visitedViews.length - 1
].path
);
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")
}
},
async dictData(){
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;
});
}
},
created() {
let handle = this.$route.params.handle;
allDictData().then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
return;
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))
}
let dict = response.data;
this.cargoType = dict.cargoType;
this.cargoStatus = dict.cargoStatus;
this.serviceCode = dict.serviceCode.sort((a, b) =>
a.englishName.localeCompare(b.englishName)
);
}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))
}
}
}
},
this.handlingCode = this.sorttodo(dict.handlingCode, "BLANK");
this.subCategory = dict.subCategory;
});
created() {
let handle = this.$route.params.handle;
this.routeName = this.$route.name;
this.dataId = this.$route.params.id;
this.handleName = this.$route.params.handle;
this.dictData()
if (handle === "detail") {
this.disable = true;
}
......@@ -470,8 +514,17 @@ export default {
if (handle != "add") {
this.nameDisabled = true;
let id = this.$route.params.id;
if (isNaN(Number(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({
......@@ -512,46 +565,58 @@ export default {
} 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";
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.isEmpty = true;
} else {
this.isLocation = "1";
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;
}
let isNeedRequired = response.data.isNeedRequired;
this.form.isNeedRequired = isNeedRequired;
this.isNeedRequired = isNeedRequired;
}
this.loading = false;
});
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: {
......
......@@ -122,26 +122,23 @@
label="运单号"
align="center"
prop="waybillNo"
width="120"
/>
<el-table-column
:show-overflow-tooltip="true"
label="品牌描述"
align="center"
prop="nameDescription"
width="120"
/>
<el-table-column
label="航班日期"
align="center"
prop="fltDate"
width="130"
/>
<el-table-column label="航班号" align="center" prop="fltNo" />
<el-table-column label="航班号" align="center" prop="fltNo" width="100"/>
<el-table-column
label="航班路线"
align="center"
prop="route"
width="150"
/>
<el-table-column
label="配置航班类型"
......@@ -149,9 +146,9 @@
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="sizeStr" width="70"/>
<el-table-column label="件数" align="center" prop="qty" width="70"/>
<el-table-column label="实际重量" align="center" prop="actualWeight" width="100"/>
<el-table-column
label="创建时间"
align="center"
......@@ -174,7 +171,7 @@
import { findCagroPreData } from "@/api/cargoSelect";
import { cargoXlsxPre } from "@/utils/zipdownload";
export default {
name: "caExportPreQualification",
name: "CAPreQualificationExport",
data() {
return {
//导出
......@@ -258,6 +255,12 @@ export default {
this.tableData = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
if(response.data.list.length == 0){
this.$message({
message: "未查询到数据",
type: "warning",
});
}
} else {
this.msgError(response.msg);
}
......
......@@ -70,13 +70,13 @@
</el-button>
</el-col>
</el-row> -->
<el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="findAllFltDatList"
<el-table max-height="550" highlight-current-row border stripe v-loading="loading" :data="findAllFltDatList" size="mini"
@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" />
<el-table-column label="航班路线" align="center" prop="route" />
<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" />
......
......@@ -748,9 +748,9 @@ export default {
this.dataInfo();
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) {
this.tableData = res.data.list;
this.totalCount = res.data.totalCount;
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].index = i;
}
......@@ -809,6 +809,8 @@ export default {
if(this.formData.waybillNo){
this.formData.waybillNo = this.formData.waybillNo.trim();
}
this.formData.limitStart = this.limitStart;
this.formData.limitSize = 100;
},
//总和
cargoTotal(){
......@@ -857,6 +859,9 @@ export default {
}else{
this.tableData = data.concat(nullData)
}
this.tableData.forEach((item, index = 0) => {
item.index = index;
});
},
// 导出表格
xlse(page) {
......