jinhui.wang

代码更新

<template>
<div>
<el-dialog title="货物配舱" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false"
<el-dialog title="货物配舱" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false" :show-close="false"
:append-to-body="true">
<el-divider content-position="left">已选货物信息</el-divider>
<el-table :data="tableData" size="mini" height="200" max-height="200" border stripe highlight-current-row
......@@ -148,7 +148,7 @@ export default {
});
} else {
this.loading = false;
this.msgWarning("航班号或航班日期不能为空")
this.msgWarning('航班号或航班日期不能为空')
}
},
dialogBeforeClose() {
......
......@@ -16,13 +16,16 @@
</el-form-item>
<div>
<el-button style="margin-bottom: 20px" type="primary" icon="el-icon-plus" size="mini"
v-hasPermi="['allocation:alloc:add']"
@click="$router.push({ name: 'FlightAllocConfigAdd', params: { handle: 'add' } })">添加</el-button>
v-hasPermi="['allocation:alloc:add']" @click="
$router.push({
name: 'FlightAllocConfigAdd',
params: { handle: 'add' },
})
">添加</el-button>
</div>
</el-form>
<el-table :data="flyList" v-loading="loading" size="small" highlight-current-row border stripe>
<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>
......@@ -31,21 +34,18 @@
<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" v-hasPermi="['allocation:alloc:update']"
@click="handleClick(scope.row.id, 'update')">修改</el-button>
<el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949" v-hasPermi="['allocation:alloc:delete']"
@click="del(scope.row.id, scope.row.status)">删除</el-button>
<el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button>
<el-button type="text" size="mini" icon="el-icon-video-pause" v-hasPermi="['allocation:alloc:openClose']"
@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" v-hasPermi="['allocation:alloc:openClose']"
......@@ -66,6 +66,7 @@ import {
delFlightId,
enableOrDisable,
} from "@/api/destinationFlight";
export default {
name: "FlightAllocConfig",
data() {
......@@ -105,7 +106,7 @@ export default {
this.loading = true;
findFlightNo(this.queryParams).then((response) => {
if (response.code != 200) {
this.msgError(response.msg)
this.msgWarning(response.msg)
return;
}
this.flyList = response.data.list;
......@@ -134,15 +135,14 @@ export default {
cancelButtonText: "取消",
showCancelButton: true,
type: "warning",
})
.then(() => {
}).then(() => {
delFlightId(id)
.then((res) => {
res.code === 200 ? this.msgSuccess(res.msg) : this.msgWarning(res.msg)
this.getList()
})
.catch(() => { });
})
});
}
},
//启用,停用
......@@ -152,9 +152,9 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
enableOrDisable(id, status).then((res) => {
}).then(() => {
enableOrDisable(id, status)
.then((res) => {
if (res.code != 200) {
this.msgError(res.msg);
} else {
......@@ -163,7 +163,7 @@ export default {
}
})
.catch(() => { });
})
});
},
},
computed: {
......@@ -172,10 +172,10 @@ export default {
return this.queryParams.purposeOfFlightNo;
},
set: function (val) {
this.queryParams.purposeOfFlightNo = this.upCase(val)
this.queryParams.purposeOfFlightNo = this.upCase(val);
},
},
},
}
};
</script>
......
......@@ -9,7 +9,8 @@
<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-input v-model.trim="form.purposeOfFlightNo" maxlength="10" style="width: 60%"
:disabled="nameDisabled"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -25,39 +26,30 @@
<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-input type="textarea" v-model="form.location" :rows="6" resize="none" style="width: 600px"
placeholder="站点之间用回车符分隔"></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-input type="textarea" v-model="form.notLocation" :rows="6" resize="none" style="width: 600px"
placeholder="站点之间用回车符分隔"></el-input>
</el-form-item>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="URSA包含">
<el-input type="textarea" v-model.trim="includeUrsa" :rows="6" resize="none"></el-input>
<el-form-item label="URSA包含" prop="includeUrsa">
<el-input type="textarea" v-model.trim="includeUrsa" :rows="6" resize="none"
placeholder="URSA之间用分号分隔,例:F2;F3;P_"></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="URSA不包含">
<el-input type="textarea" v-model.trim="notIncludeUrsa" :rows="6" resize="none"></el-input>
<el-form-item label="URSA不包含" prop="notIncludeUrsa">
<el-input type="textarea" v-model.trim="notIncludeUrsa" :rows="6" resize="none"
placeholder="URSA之间用分号分隔,例:F2;F3;P_"></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>
......@@ -83,7 +75,6 @@
></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>
......@@ -115,68 +106,72 @@
</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 v-if="item.status === 1" :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-checkbox v-if="item.status === 1" :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-checkbox v-if="item.status === 1 || form.serviceCode.includes(item.englishName)"
:label="item.englishName" :name="item.englishName"
:disabled="form.serviceCode.includes(item.englishName) && item.status === 0">
</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-checkbox v-if="item.status === 1 || form.handlingCode.includes(item.englishName)"
:label="item.englishName" :name="item.englishName"
:disabled="form.handlingCode.includes(item.englishName) && item.status === 0">
</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-checkbox v-if="item.status === 1 || form.subCategory.includes(item.englishName)"
:label="item.englishName" :name="item.englishName"
:disabled="form.subCategory.includes(item.englishName) && item.status === 0">
</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')"
......@@ -241,9 +236,127 @@ export default {
isEmpty: false,
routeName: "",
dataId: "",
handleName: ""
handleName: "",
};
},
created() {
this.routeName = this.$route.name;
this.dataId = this.$route.params.id;
this.handleName = this.$route.params.handle;
this.dictData();
if (this.handleName === "detail") {
this.disable = true;
}
if (this.handleName != "add") {
this.nameDisabled = true;
let id = this.$route.params.id;
if (
sessionStorage.getItem("flightInfo" + id) &&
this.$route.name == "FlightAllocConfigInfo" &&
this.handleName != "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(this.dataId))) {
findDestinationFltRuleByActualFlight(this.dataId).then((response) => {
if (response.code != 200) {
this.msgWarning(response.msg)
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(this.dataId).then((response) => {
if (response.code != 200) {
this.msgWarning(response.msg)
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";
}
}
}
},
methods: {
//排序
sorttodo(arr, englishName) {
......@@ -268,8 +381,7 @@ export default {
});
this.btnLoading = true;
let handle = this.$route.params.handle;
if (handle === "update") {
if (this.handleName === "update") {
//修改,获取id
this.form.id = this.$route.params.id;
}
......@@ -282,13 +394,14 @@ export default {
this.formSubCategory = this.form.subCategory;
this.form.isNeedRequired = this.isNeedRequired;
if (this.form.purposeOfFlightNo) {
this.form.purposeOfFlightNo = this.upCase(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 &&
......@@ -299,6 +412,10 @@ export default {
let notInclude = this.form.notIncludeUrsa.split(";");
let errorList = [];
notInclude.forEach((element) => {
// if (include.includes(element)) {
// this.msgWarning("URSA包含与URSA不包含中有相同项,不能设置")
// return
// }
if (element.indexOf("_") > 0) {
errorList.push(element);
} else {
......@@ -319,17 +436,38 @@ export default {
}
});
if (errorList.length != 0) {
this.msgError("URSA不包含中[" + errorList + "]错误,URSA不包含必须属于URSA包含中的类型")
this.msgWarning("URSA不包含中[" + errorList + "]错误,URSA不包含必须属于URSA包含中的类型")
this.btnLoading = false;
return;
}
}
let service = []
this.serviceCode.forEach(item => {
if (item.status === 1 && this.form.serviceCode.includes(item.englishName)) {
service.push(item.englishName)
}
})
this.form.serviceCode = service
let hand = []
this.handlingCode.forEach(item => {
if (item.status === 1 && this.form.handlingCode.includes(item.englishName)) {
hand.push(item.englishName)
}
})
this.form.handlingCode = hand
let sub = []
this.subCategory.forEach(item => {
if (item.status === 1 && this.form.subCategory.includes(item.englishName)) {
sub.push(item.englishName)
}
})
this.form.subCategory = sub
updateOrAddFlight(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess('成功')
this.close();
} else {
this.msgError(response.msg)
this.msgWarning(response.msg)
this.btnLoading = false;
}
});
......@@ -340,7 +478,7 @@ export default {
this.form.subCategory = this.formSubCategory;
},
close() {
this.removes()
this.removes();
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
......@@ -348,22 +486,17 @@ export default {
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")
sessionStorage.setItem("flightAdd", "remove");
} else {
sessionStorage.setItem("flightInfo" + this.dataId, "remove")
sessionStorage.setItem("flightInfo" + this.dataId, "remove");
}
},
async dictData() {
dictData() {
allDictData().then((response) => {
if (response.code != 200) {
this.msgError(response.msg)
......@@ -372,149 +505,53 @@ export default {
let dict = response.data;
this.cargoType = dict.cargoType;
this.cargoStatus = dict.cargoStatus;
this.serviceCode = dict.serviceCode.sort((a, b) =>
this.serviceCode = this.dicSort(dict.serviceCode.sort((a, b) =>
a.englishName.localeCompare(b.englishName)
);
this.handlingCode = this.sorttodo(dict.handlingCode, "BLANK");
this.subCategory = dict.subCategory;
));
this.handlingCode = this.dicSort(this.sorttodo(dict.handlingCode, "BLANK"));
this.subCategory = this.dicSort(dict.subCategory);
});
},
dicSort(val) {
let status1 = []
let status0 = []
let arr = []
val.forEach(item => {
if (item.status == 1) {
status1.push(item)
} else {
status0.push(item)
}
})
arr = status1.concat(status0)
return arr
}
},
beforeDestroy() {
if (this.routeName == "FlightAllocConfigAdd") {
if (sessionStorage.getItem("flightAdd") == "remove") {
sessionStorage.removeItem("flightAdd")
sessionStorage.removeItem("flightAdd");
} else {
this.form.isNeedRequired = this.isNeedRequired
sessionStorage.setItem("flightAdd", JSON.stringify(this.form))
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)
sessionStorage.removeItem("flightInfo" + this.dataId);
} else {
if (this.handleName == "detail") {
this.form.isNeedRequired = this.isNeedRequired
sessionStorage.setItem("flightInfo" + this.dataId, JSON.stringify(this.form))
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;
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;
}
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.msgError(response.msg)
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.msgError(response.msg)
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: {
includeUrsa: {
get: function () {
......@@ -537,10 +574,12 @@ export default {
return this.form.minNumOfPieces;
},
set: function (val) {
const reg = /^[1-9]{0,}$/
if (reg.test(val)) {
this.form.minNumOfPieces = val
}
if (val == 0 || val == null || val == "-") {
this.form.minNumOfPieces = undefined;
} else if (!isNaN(val)) {
this.form.minNumOfPieces = val;
}
},
},
......@@ -549,10 +588,12 @@ export default {
return this.form.maxNumOfPieces;
},
set: function (val) {
const reg = /^[1-9]{0,}$/
if (reg.test(val)) {
this.form.maxNumOfPieces = val
}
if (val == 0 || val == null || val == "-") {
this.form.maxNumOfPieces = undefined;
} else if (!isNaN(val)) {
this.form.maxNumOfPieces = val;
}
},
},
......@@ -561,6 +602,8 @@ export default {
return this.form.minWeight;
},
set: function (val) {
const reg = /^\d{1,1}\d*\.{0,1}\d{0,}$/
console.log(reg.test(val))
if (val == null || val == "-") {
this.form.minWeight = undefined;
} else if (!isNaN(val)) {
......
<template>
<div>
<el-form class="form-header" :model="queryParams" ref="queryForm" size="medium" :inline="true"
label-position="right" label-width="auto">
<el-form class="form-header" :model="queryParams" ref="queryForm" size="small" :inline="true" label-position="right"
label-width="auto">
<el-form-item label="原航班">
<el-input type="text" v-model="sourceFlightNo" placeholder="请输入原航班" clearable></el-input>
</el-form-item>
......@@ -47,8 +47,8 @@
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['allocation:rand:update']"
@click="handleUpdate(scope.row)">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" v-hasPermi="['allocation:rand:delete']"
@click="handleDeleteorPlayorpause(scope.row, 0, '删除')" style="color:#ff4949">
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['allocation:rand: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'"
v-hasPermi="['allocation:rand:openClose']" @click="handleDeleteorPlayorpause(scope.row, 1, '启用')">启用
......@@ -63,7 +63,7 @@
: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">
:show-close="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>
......@@ -83,8 +83,9 @@
</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-position="right" label-width="auto">
<el-dialog :title="title" :visible.sync="open" width="55%" :append-to-body="true" :close-on-click-modal="false"
:show-close="false">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto" size="small">
<el-row>
<el-col :span="8">
<el-form-item label="原航班" prop="sourceFlightNo">
......@@ -93,7 +94,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="口岸" prop="portName">
<el-select :disabled="true" v-model="form.portName" size="mini" placeholder="选择口岸">
<el-select :disabled="true" v-model="form.portName" placeholder="选择口岸">
<el-option v-for="item in portNameList" :label="item" :value="item" :key="item">
</el-option>
</el-select>
......@@ -103,15 +104,15 @@
<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 clearable :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 clearable :picker-options="pickerOptionsEnd" v-model="form.endDate" type="date"
value-format="yyyy-MM-dd" placeholder="选择结束时间">
</el-date-picker>
</el-form-item>
</el-col>
......
<template>
<div>
<el-form class="form-header" :model="queryParams" label-position="right" label-width="auto" size="medium">
<el-form class="form-header" :model="queryParams" label-position="right" label-width="auto" size="small">
<el-row>
<el-col :span="6">
<el-form-item label="航班日期从" prop="fltDateStart">
......@@ -18,27 +18,27 @@
</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 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>
placeholder="请输入运单号(回车间隔)" rows="1"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<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 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 clearable type="textarea" v-model="ursa" class="formItem" placeholder="S_;P_;E2" rows="1">
</el-input>
</el-form-item>
</el-col>
......@@ -53,7 +53,6 @@
}}</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" />
<el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" />
......
......@@ -15,7 +15,8 @@
<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 ref="filterTable" :data="tableData" v-loading="loading" style="width: 100%; margin-top: 20px" size="small"
border>
<el-table-column label="行号" prop="line" width="50" align="center">
</el-table-column>
<el-table-column label="错误信息" prop="errorMessage" width="300">
......@@ -38,12 +39,12 @@
</template>
<script>
import {
import {
downLoadTemplate,
importcaPreReview,
} from "@/api/caPreReviewImport";
export default {
name:"CAPreReviewImport",
} from "@/api/caPreReviewImport";
export default {
name: "CAPreReviewImport",
data() {
return {
// 遮罩层
......@@ -80,9 +81,9 @@
uploadExcel(option) {
//上传excel
const file = option.file;
this.loading=true;
this.loading = true;
importcaPreReview(file, this.form.type).then((res) => {
this.loading=false;
this.loading = false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
......@@ -90,7 +91,7 @@
type: "warning",
});
} else {
this.$message.error(res.msg);
this.$message.warning(res.msg);
this.tableData = res.data;
}
} else {
......@@ -114,16 +115,16 @@
this.uploadExcel(file);
},
},
};
};
</script>
<style rel="stylesheet/scss" lang="scss">
.upload-demo {
.upload-demo {
float: right;
}
}
.el-upload-list {
.el-upload-list {
display: inline-block;
margin-left: 10px;
vertical-align: top;
}
}
</style>
......
......@@ -60,6 +60,15 @@ export default {
};
},
methods: {
typeData() {
filghtKindData().then((response) => {
if (response.code != 200) {
this.msgError(response.msg)
}
this.flightType = response.data;
this.form.type = response.data[0].code;
});
},
downloadTempleate() {
let downloadType = "";
let fileName = "";
......@@ -108,7 +117,7 @@ export default {
type: "warning",
});
} else {
this.$message.error(res.msg);
this.$message.warning(res.msg);
this.tableData = res.data;
}
} else {
......@@ -133,14 +142,11 @@ export default {
},
},
created() {
filghtKindData().then((response) => {
if (response.code != 200) {
this.msgError(response.msg)
}
this.flightType = response.data;
this.form.type = response.data[0].code;
});
this.typeData()
},
activated() {
this.typeData()
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
......
......@@ -299,17 +299,17 @@ export default {
trigger: "blur",
},
],
route: [
{
required: true,
message: "航班线路不能为空",
trigger: "blur",
},
{
pattern: /^([A-Z]{3,4})(\-[A-Z]{3,4})+$/,
message: "请输入正确得航班线路"
}
]
// route: [
// {
// required: true,
// message: "航班线路不能为空",
// trigger: "blur",
// },
// {
// pattern: /^([A-Z]{3,4})(\-[A-Z]{3,4})+$/,
// message: "请输入正确得航班线路"
// }
// ]
},
//原航班规则数据
findAllFltDatList: [],
......
......@@ -18,18 +18,6 @@
<div v-else>{{ roleData.remark }}</div>
</el-form-item>
</el-col>
<!-- <el-col :span="24">
<el-form-item label="角色状态:" prop="valid">
<el-switch
v-model="roleForm.valid"
:active-value="1"
:inactive-value="2"
active-color="#13ce66"
inactive-color="#ff4949"
:disabled="roleFormDisabled"
></el-switch>
</el-form-item>
</el-col> -->
<el-col :span="24">
<el-form-item label="角色权限:" prop="menuIdList">
<el-tree ref="tree" :data="treeData" node-key="id" :props="defaultProps" :show-checkbox="true"
......@@ -91,26 +79,13 @@ export default {
},
};
},
created() {
//权限列表
getAllAuth()
.then((res) => {
if (res.code === 200) {
this.treeData = this.treeDataInfo(res.data);
} else {
this.msgWarning(res.msg)
}
})
.catch((err) => {
console.log(err);
});
},
watch: {
roleFormDisabled() {
this.treeData = this.treeDisabled(this.treeData);
},
drawer(val, oldVal) {
if (val) {
this.allAuth()
this.roleForm = this.roleData;
} else {
this.loading = false;
......@@ -118,12 +93,25 @@ export default {
},
},
methods: {
//权限列表
allAuth() {
getAllAuth()
.then((res) => {
if (res.code === 200) {
this.treeData = this.treeDataInfo(res.data);
} else {
this.msgWarning(res.msg)
}
})
.catch((err) => {
console.log(err);
});
},
//关闭
handleClose() {
this.$refs["roleForm"].clearValidate();
this.$emit("handleClose", false);
},
//提交
submit() {
let formData = {};
......@@ -151,7 +139,6 @@ export default {
console.log(err);
});
},
//权限结构禁用
treeDisabled(val) {
let data = [];
......@@ -164,7 +151,7 @@ export default {
});
return data;
},
//权限结构数据整理
treeDataInfo(val) {
let data = [];
val.forEach((item) => {
......