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-02 15:44:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9ea12cd0c6f5509178792e9c108a55d4340773bc
9ea12cd0
1 parent
1d67db2f
停用、启用和跳转
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
7 deletions
src/api/destinationFlight.js
src/views/allocationConfig/flightAllocConfig/index.vue
src/views/allocationConfig/flightAllocConfig/info.vue
src/api/destinationFlight.js
View file @
9ea12cd
...
...
@@ -49,6 +49,21 @@ export function delFlightId(id){
})
}
//启用/停止规则
export
function
enableOrDisable
(
id
,
status
){
//statsu 1-有效 3-停用
const
data
=
{
id
,
status
}
return
request
({
url
:
'/destinationFlight/enableOrDisable'
,
method
:
'post'
,
data
:
data
})
}
//申报类别
export
function
cargoTypeData
(){
return
request
({
...
...
src/views/allocationConfig/flightAllocConfig/index.vue
View file @
9ea12cd
...
...
@@ -74,10 +74,18 @@
@click="del(scope.row.id)"
>删除</el-button
>
<el-button type="text" size="mini" icon="el-icon-video-play"
<el-button
type="text"
size="mini"
icon="el-icon-video-play"
@click="changeStatus(scope.row.id, 1)"
>启用</el-button
>
<el-button type="text" size="mini" icon="el-icon-video-pause"
<el-button
type="text"
size="mini"
icon="el-icon-video-pause"
@click="changeStatus(scope.row.id, 3)"
>停用</el-button
>
</template>
...
...
@@ -100,7 +108,11 @@
</template>
<script>
import { findFlightNo, delFlightId } from "@/api/destinationFlight";
import {
findFlightNo,
delFlightId,
enableOrDisable,
} from "@/api/destinationFlight";
export default {
data() {
...
...
@@ -145,7 +157,8 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(function () {
})
.then(function () {
return delFlightId(id);
})
.then(() => {
...
...
@@ -154,8 +167,23 @@ export default {
})
.catch(function () {});
},
//删除,启用,停用
changeStatus(id, handle) {},
//启用,停用
changeStatus(id, status) {
let tip = status === 1 ? "启用" : "停用";
this.$confirm("是否确认" + tip + "此航班规则?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return enableOrDisable(id, status);
})
.then(() => {
this.getList();
this.msgSuccess(tip + "成功");
})
.catch(function () {});
},
},
created() {
this.getList();
...
...
src/views/allocationConfig/flightAllocConfig/info.vue
View file @
9ea12cd
...
...
@@ -189,12 +189,13 @@ export default {
type: 'success'
});
}
this.
btnLoading = false
;
this.
close()
;
});
this.form.typeOfGoods = this.typeOfGoods;
this.form.declarationCategory = this.declarationCategory;
this.form.serviceCode = this.formServiceCode;
this.form.subCategory = this.formSubCategory;
this.btnLoading = false;
},
close() {
...
...
Please
register
or
login
to post a comment