作者 小范

航空器新增变更和撤销功能

... ... @@ -82,17 +82,25 @@ export const sendAircraft = params => { return http.post(`${baseUrlAircraft}/sen
export const selectAircraft=params=>{return http.get(`${baseUrlAircraft}/selectAircraft`, params);};
//删除方法
export const editAircraft=params=>{return http.put(`${baseUrlAircraft}/editAircraft`, params);};
//变更申请
export const changeAircraft = params => { return http.post(`${baseUrlAircraft}/changeAircraft`, params); };
//撤销申请
export const cancleAircraft = params => { return http.post(`${baseUrlAircraft}/cancleAircraft`, params); };
//航线航空器申报
//新增方法
export const addAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/addAirLineAircraft`, params); };
//保存并发送
export const sendAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/sendAirLineAircraft`, params); };
//删除方法
export const editAirLineAircraft=params=>{return http.put(`${baseUrlAirLineAircraft}/editAirLineAircraft`, params);};
//查询列表
export const selectAirLineAircraft=params=>{return http.get(`${baseUrlAirLineAircraft}/selectAirLineAircraft`, params);};
//变更申请
export const changeAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/changeAirLineAircraft`, params); };
//撤销申请
export const cancleAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/cancleAirLineAircraft`, params); };
//进港预报申报prediction
... ...
... ... @@ -186,10 +186,14 @@
<script>
const fecha = require('fecha');
import {addAircraft, selectCountry, selectCreden, sendAircraft} from "../../api/transport";
import loginUserInfo from '../../api/base'
export default {
data(){
return{
aircraft:{
createBy:loginUserInfo.username,
updateBy:loginUserInfo.username,
agentcode:undefined,
customcode:undefined,
uuid:undefined,
... ... @@ -210,9 +214,7 @@
statusMsg:undefined,
status:undefined,
createTime:undefined,
createBy:undefined,
updateTime:undefined,
updateBy:undefined,
meno:undefined,
isDelete:undefined,
messageid:undefined
... ... @@ -222,9 +224,9 @@
countryOptions:[],
rules:{
// airwayCode: [
// {required: true, message: '请输入', trigger: 'blur'}
// ],
customcode: [
{required: true, message: '请输入', trigger: 'blur'}
],
airwayNameEn: [
{required: true, message: '请输入英文名称', trigger: 'blur'}
],
... ... @@ -333,6 +335,7 @@
sendForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.aircraft.createBy=loginUserInfo.username
sendAircraft(this.aircraft).then(res=>{
let response=res.data;
console.log(response);
... ...
... ... @@ -98,11 +98,11 @@
<el-button
size="mini"
type="success"
@click="changeApply(scope.$index, scope.row)">变更申请</el-button>
@click="change(scope.$index, scope.row)">变更申请</el-button>
<el-button
size="mini"
type="warning"
@click="cancellApply(scope.$index, scope.row)">撤销申请</el-button>
@click="cancle(scope.$index, scope.row)">撤销申请</el-button>
<el-button
size="mini"
type="danger"
... ... @@ -156,7 +156,7 @@
</style>
<script>
import {selectAircraft, editAircraft, selectReturnMsg} from "../../api/transport";
import {selectAircraft, editAircraft, selectReturnMsg, changeAircraft, cancleAircraft} from "../../api/transport";
export default {
data(){
... ... @@ -239,6 +239,64 @@
});
});
},
//更改申请
change(index, row) {
this.$confirm('变更申请, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
changeAircraft(row).then(res => {
let response = res.data;
if (response.code == '200') {
this.$message({
type: 'success',
message: '变更申请成功'
});
this.submitForm();
} else {
this.$message({
type: 'info',
message: '变更申请失败'
});
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消变更申请'
});
});
},
//撤销申请
cancle(index, row) {
this.$confirm('撤销申请, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancleAircraft(row).then(res => {
let response = res.data;
if (response.code == '200') {
this.$message({
type: 'success',
message: '撤销申请成功'
});
this.submitForm();
} else {
this.$message({
type: 'info',
message: '撤销申请失败'
});
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤销申请'
});
});
},
//获取默认值
defaultData() {
Object.assign(this.queryAircraft, this.$route.query);
... ...
... ... @@ -101,11 +101,11 @@
<el-button
size="mini"
type="success"
@click="changeApply(scope.$index, scope.row)">变更申请</el-button>
@click="change(scope.$index, scope.row)">变更申请</el-button>
<el-button
size="mini"
type="warning"
@click="cancellApply(scope.$index, scope.row)">撤销申请</el-button>
@click="cancle(scope.$index, scope.row)">撤销申请</el-button>
<el-button
size="mini"
type="danger"
... ... @@ -159,7 +159,14 @@
</style>
<script>
import {editAirLineAircraft, selectAirLineAircraft, selectReturnMsg} from "../../api/transport";
import {
editAirLineAircraft,
selectAirLineAircraft,
selectReturnMsg,
cancleAirLineAircraft,
changeAirLineAircraft,
changeAircraft, cancleAircraft
} from "../../api/transport";
export default {
data(){
... ... @@ -179,6 +186,64 @@
}
},
methods: {
//更改申请
change(index, row) {
this.$confirm('变更申请, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
changeAirLineAircraft(row).then(res => {
let response = res.data;
if (response.code == '200') {
this.$message({
type: 'success',
message: '变更申请成功'
});
this.submitForm();
} else {
this.$message({
type: 'info',
message: '变更申请失败'
});
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消变更申请'
});
});
},
//撤销申请
cancle(index, row) {
this.$confirm('撤销申请, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancleAirLineAircraft(row).then(res => {
let response = res.data;
if (response.code == '200') {
this.$message({
type: 'success',
message: '撤销申请成功'
});
this.submitForm();
} else {
this.$message({
type: 'info',
message: '撤销申请失败'
});
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤销申请'
});
});
},
//查询回执列表
selectDetail(index,row){
this.gridData=[];
... ...
... ... @@ -163,11 +163,14 @@
</style>
<script>
import {addAirLineAircraft, selectCreden, sendAirLineAircraft} from "../../api/transport";
import loginUserInfo from "../../api/base";
export default {
data(){
return{
aircraft:{
createBy:loginUserInfo.username,
updateBy:loginUserInfo.username,
uuid:undefined,
customcode:undefined,
operatcode:undefined,
... ... @@ -188,9 +191,7 @@
statusMsg:undefined,
status:undefined,
createTime:undefined,
createBy:undefined,
updateTime:undefined,
updateBy:undefined,
meno:undefined,
isDelete:undefined,
messageid:undefined
... ... @@ -199,9 +200,9 @@
certOptions:[],
rules:{
// airwayCode: [
// {required: true, message: '请输入', trigger: 'blur'}
// ],
customcode: [
{required: true, message: '请输入', trigger: 'blur'}
],
operatcode: [
{required: true, message: '请输入编码', trigger: 'blur'}
],
... ... @@ -295,6 +296,7 @@
sendForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.aircraft.createBy=loginUserInfo.username
sendAirLineAircraft(this.aircraft).then(res=>{
let response=res.data;
if(response.code=='200'){
... ...