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
shanyunduo.cheng
2021-12-06 09:44:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3a16eb8d3a11e95f06d7dd39e0dfdc29a2b0b709
3a16eb8d
1 parent
bdc00600
航班停用后再删除
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
src/views/allocationConfig/flightAllocConfig/index.vue
src/views/allocationConfig/flightAllocConfig/index.vue
View file @
3a16eb8
...
...
@@ -31,11 +31,7 @@
@click="$router.push({ name: 'Add', params: { handle: 'add' } })"
>添加</el-button
>
<el-table
:data="flyList"
v-loading="loading"
size="small"
>
<el-table :data="flyList" v-loading="loading" size="small">
<el-table-column
prop="purposeOfFlightNo"
label="航班号"
...
...
@@ -56,7 +52,7 @@
<el-table-column prop="createTime" label="更新时间" align="center">
<template slot-scope="scope">
{{
scope.row.createTime | formatTimer
}}
{{
scope.row.createTime | formatTimer
}}
</template>
</el-table-column>
...
...
@@ -80,7 +76,7 @@
type="text"
size="mini"
icon="el-icon-delete"
@click="del(scope.row.id)"
@click="del(scope.row.id
, scope.row.status
)"
>删除</el-button
>
<el-button
...
...
@@ -99,7 +95,6 @@
v-else
>启用</el-button
>
</template>
</el-table-column>
</el-table>
...
...
@@ -126,9 +121,7 @@ import {
enableOrDisable,
} from "@/api/destinationFlight";
import {
parseTime
} from "@/utils/FedEx";
import { parseTime } from "@/utils/FedEx";
export default {
data() {
...
...
@@ -176,10 +169,18 @@ export default {
});
},
//删除规则
del(id) {
del(id, status) {
if (status == "1") {
this.$confirm("航班规则生效中,无法删除,请停用后再操作", "警告", {
confirmButtonText: '确定',
showCancelButton:false,
type: "warning",
});
} else {
this.$confirm("是否确认删除此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
showCancelButton:true,
type: "warning",
})
.then(function () {
...
...
@@ -190,6 +191,7 @@ export default {
this.msgSuccess("删除成功");
})
.catch(function () {});
}
},
//启用,停用
changeStatus(id, status) {
...
...
@@ -208,18 +210,18 @@ export default {
})
.catch(function () {});
},
parseDate(time){
parseDate(time)
{
// debugger
let str = new Date(time).format("yyyy-MM-dd");
// let str = parseTime(date, 'yyyy-dd-mm');
return str;
}
}
,
},
created() {
this.getList();
},
filters: {
formatTimer: function(value) {
formatTimer: function
(value) {
let date = new Date(value);
let y = date.getFullYear();
let MM = date.getMonth() + 1;
...
...
@@ -233,7 +235,7 @@ export default {
let s = date.getSeconds();
s = s < 10 ? "0" + s : s;
return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
}
}
,
},
};
</script>
...
...
Please
register
or
login
to post a comment