作者 小范

进出港预报查询页面新增消申报功能

... ... @@ -12,6 +12,10 @@ let baseUrlLongtimeplan = 'air-server-transport/transport/longtimeplan'
let baseUrlBillperson = 'air-server-transport/transport/billperson'
let baseUrlResultMsg = 'air-server-transport/transport/returnmsg'
let baseUrlDynamics = 'air-server-transport/transport/aircraftStaying'
let baseUrlCancel = 'air-server-transport/transport/prediction'
//进港预报 取消申报原因
export const cancelPrediction = params => { return http.post(`${baseUrlCancel}/cancelPrediction`, params); };
//在港动态
... ...
... ... @@ -162,7 +162,7 @@
],
stayid: [
{required: true, message: '请选择', trigger: 'blur'},
{ pattern: /^[0-9]{6}$/, message: '请输入正确机坪号码', trigger: 'blur' }
// { pattern: /^[0-9]{6}$/, message: '请输入正确机坪号码', trigger: 'blur' }
],
},
tableData:[],
... ...
... ... @@ -92,7 +92,7 @@
fixed="right"
prop=""
label="报文操作"
width="200">
width="280">
<template slot-scope="scope">
<el-button
size="mini"
... ... @@ -100,6 +100,10 @@
@click="selectDetail(scope.$index,scope.row)">查看回执</el-button>
<el-button
size="mini"
type="warning"
@click="trans_cancle(scope.row)">取消申报</el-button>
<el-button
size="mini"
type="danger"
@click="handleDel(scope.$index, scope.row)">删除</el-button>
</template>
... ... @@ -122,13 +126,30 @@
<!--查看回执弹框-->
<el-dialog title="回执明细" :visible.sync="dialogTableVisible">
<el-table :data="gridData">
<el-table-column property="sendtime" label="操作时间" ></el-table-column>
<el-table-column property="sendtime" label="操作时间"></el-table-column>
<el-table-column property="createBy" label="操作人" ></el-table-column>
<el-table-column property="flightNo" label="航班号"></el-table-column>
<el-table-column property="flightDate" label="航班日期" ></el-table-column>
<el-table-column property="receiptContent" label="回执内容" ></el-table-column>
<el-table-column property="flightDate" label="航班日期"></el-table-column>
<el-table-column property="receiptContent" label="回执内容"></el-table-column>
</el-table>
</el-dialog>
<!-- 取消申报弹框-->
<el-dialog title="取消申报" :visible.sync="dialogFormVisible">
<el-form :model="form">
<el-form-item label="取消原因" prop="content" >
<el-input
v-model="form.content"
type="textarea"
:rows="2" required="required"
placeholder="取消原因必填"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="trans_add('form')">确 定</el-button>
</div>
</el-dialog>
</el-main>
</el-container>
</template>
... ... @@ -151,7 +172,7 @@
</style>
<script>
import {editPrediction, selectPrediction, selectReturnMsg} from "../../api/transport";
import {addAircraftStaying, editPrediction, selectPrediction, selectReturnMsg, cancelPrediction} from "../../api/transport";
export default {
data(){
... ... @@ -169,6 +190,13 @@
tableloading:false,
gridData:[],
dialogTableVisible: false,
form:{
content:''
},
dialogFormVisible: false,
textarea: '',
row2:undefined
}
},
methods: {
... ... @@ -183,6 +211,38 @@
this.gridData=response;
});
},
//取消申报
trans_cancle(row){
this.dialogFormVisible=true;
this.row2=row;
},
trans_add(form) {
this.dialogFormVisible=true;
this.row2.content=this.form.content;
console.log(this.row2);
// 进行表单的预验证
// this.$refs.form.validate(valid => {
// // 未通过,表单预校验
// if (!valid) return
cancelPrediction(this.row2).then((response) => {
const res = response.data
// 添加失败
if (res.code !== '200') {
// 关闭加载
return this.$message.error(res.msg)
}
// 添加,成功
this.$message.success(res.msg)
// 隐藏对话框
this.dialogFormVisible = false
// 刷新列表
this.submitForm()
}).catch(error => {
this.$message.error(error.toString())
})
// })
},
//分页
handleSizeChange(val) {
this.pageSize=val;
... ...
... ... @@ -96,7 +96,7 @@
<el-table-column
prop=""
label="报文操作"
width="200">
width="280">
<template slot-scope="scope">
<el-button
size="mini"
... ... @@ -104,6 +104,10 @@
@click="selectDetail(scope.$index,scope.row)">查看回执</el-button>
<el-button
size="mini"
type="warning"
@click="trans_cancle(scope.row)">取消申报</el-button>
<el-button
size="mini"
type="danger"
@click="handleDel(scope.$index, scope.row)">删除</el-button>
</template>
... ... @@ -133,6 +137,24 @@
<el-table-column property="receiptContent" label="回执内容" ></el-table-column>
</el-table>
</el-dialog>
<!-- 取消申报弹框-->
<el-dialog title="取消申报" :visible.sync="dialogFormVisible">
<el-form :model="form">
<el-form-item label="取消原因" prop="content" >
<el-input
v-model="form.content"
type="textarea"
:rows="2" required="required"
placeholder="取消原因必填"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="trans_add('form')">确 定</el-button>
</div>
</el-dialog>
</el-main>
</el-container>
</template>
... ... @@ -155,7 +177,7 @@
</style>
<script>
import {editPrediction, selectPrediction, selectReturnMsg} from "../../api/transport";
import {cancelPrediction, editPrediction, selectPrediction, selectReturnMsg} from "../../api/transport";
export default {
data(){
... ... @@ -172,6 +194,12 @@
tableloading:false,
gridData:[],
dialogTableVisible: false,
form:{
content:''
},
dialogFormVisible: false,
textarea: '',
row2:undefined
}
},
methods: {
... ... @@ -208,6 +236,38 @@
this.total = response.total;
});
},
//取消申报
trans_cancle(row){
this.dialogFormVisible=true;
this.row2=row;
},
trans_add(form) {
this.dialogFormVisible=true;
this.row2.content=this.form.content;
console.log(this.row2);
// 进行表单的预验证
// this.$refs.form.validate(valid => {
// // 未通过,表单预校验
// if (!valid) return
cancelPrediction(this.row2).then((response) => {
const res = response.data
// 添加失败
if (res.code !== '200') {
// 关闭加载
return this.$message.error(res.msg)
}
// 添加,成功
this.$message.success(res.msg)
// 隐藏对话框
this.dialogFormVisible = false
// 刷新列表
this.submitForm()
}).catch(error => {
this.$message.error(error.toString())
})
// })
},
//列表删除功能
handleDel(index, row) {
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
... ...