shanyunduo.cheng

航班名查询

......@@ -11,7 +11,7 @@ export function findFlightNo(query) {
})
}
// id查询目的航班列表
// id查询目的航班
export function findByFlightId(id) {
const data = {
id
......@@ -23,6 +23,19 @@ export function findByFlightId(id) {
})
}
//航班号查航班
export function findDestinationFltRuleByActualFlight(actualFlight){
const data = {
actualFlight
}
return request({
url:'/sourceFlight/findDestinationFltRuleByActualFlight',
method:'post',
data:data
})
}
export function updateOrAddFlight(form){
//处理数据
form.typeOfGoods = form.typeOfGoods.join(';');
......
......@@ -13,6 +13,12 @@
@keyup.enter.native="getList"
></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="queryParams.status" placeholder="状态" clearable >
<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"
......@@ -128,6 +134,7 @@ export default {
return {
queryParams: {
purposeOfFlightNo: "",
status:"1",
start: 0,
limit: 10,
},
......@@ -172,15 +179,15 @@ export default {
del(id, status) {
if (status == "1") {
this.$confirm("航班规则生效中,无法删除,请停用后再操作", "警告", {
confirmButtonText: '确定',
showCancelButton:false,
confirmButtonText: "确定",
showCancelButton: false,
type: "warning",
});
} else {
this.$confirm("是否确认删除此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
showCancelButton:true,
showCancelButton: true,
type: "warning",
})
.then(function () {
......
......@@ -221,6 +221,7 @@ import {
findByFlightId,
updateOrAddFlight,
allDictData,
findDestinationFltRuleByActualFlight,
} from "@/api/destinationFlight";
export default {
......@@ -307,10 +308,6 @@ export default {
},
},
created() {
let matched = this.$route.matched.filter(
(item) => item.meta && item.meta.title
);
let routers = this.$router.options.routes;
let handle = this.$route.params.handle;
allDictData().then((response) => {
......@@ -335,6 +332,33 @@ export default {
if (handle != "add") {
let id = this.$route.params.id;
if (isNaN(Number(id))) {
findDestinationFltRuleByActualFlight(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
reuturn;
}
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.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
this.form = info;
this.loading = false;
});
} else {
//货物信息
findByFlightId(id).then((response) => {
if (response.code != 200) {
......@@ -346,15 +370,22 @@ export default {
reuturn;
}
let info = response.data.list;
info.typeOfGoods = info.typeOfGoods ? info.typeOfGoods.split(";") : [];
info.typeOfGoods = info.typeOfGoods
? info.typeOfGoods.split(";")
: [];
info.declarationCategory = info.declarationCategory
? info.declarationCategory.split(";")
: [];
info.serviceCode = info.serviceCode ? info.serviceCode.split(";") : [];
info.subCategory = info.subCategory ? info.subCategory.split(";") : [];
info.serviceCode = info.serviceCode
? info.serviceCode.split(";")
: [];
info.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
this.form = info;
this.loading = false;
});
}
} else {
this.loading = false;
}
......