作者 小范

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

@@ -82,17 +82,25 @@ export const sendAircraft = params => { return http.post(`${baseUrlAircraft}/sen @@ -82,17 +82,25 @@ export const sendAircraft = params => { return http.post(`${baseUrlAircraft}/sen
82 export const selectAircraft=params=>{return http.get(`${baseUrlAircraft}/selectAircraft`, params);}; 82 export const selectAircraft=params=>{return http.get(`${baseUrlAircraft}/selectAircraft`, params);};
83 //删除方法 83 //删除方法
84 export const editAircraft=params=>{return http.put(`${baseUrlAircraft}/editAircraft`, params);}; 84 export const editAircraft=params=>{return http.put(`${baseUrlAircraft}/editAircraft`, params);};
  85 +//变更申请
  86 +export const changeAircraft = params => { return http.post(`${baseUrlAircraft}/changeAircraft`, params); };
  87 +//撤销申请
  88 +export const cancleAircraft = params => { return http.post(`${baseUrlAircraft}/cancleAircraft`, params); };
85 89
86 //航线航空器申报 90 //航线航空器申报
87 //新增方法 91 //新增方法
88 export const addAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/addAirLineAircraft`, params); }; 92 export const addAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/addAirLineAircraft`, params); };
89 //保存并发送 93 //保存并发送
90 export const sendAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/sendAirLineAircraft`, params); }; 94 export const sendAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/sendAirLineAircraft`, params); };
91 -  
92 //删除方法 95 //删除方法
93 export const editAirLineAircraft=params=>{return http.put(`${baseUrlAirLineAircraft}/editAirLineAircraft`, params);}; 96 export const editAirLineAircraft=params=>{return http.put(`${baseUrlAirLineAircraft}/editAirLineAircraft`, params);};
94 //查询列表 97 //查询列表
95 export const selectAirLineAircraft=params=>{return http.get(`${baseUrlAirLineAircraft}/selectAirLineAircraft`, params);}; 98 export const selectAirLineAircraft=params=>{return http.get(`${baseUrlAirLineAircraft}/selectAirLineAircraft`, params);};
  99 +//变更申请
  100 +export const changeAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/changeAirLineAircraft`, params); };
  101 +//撤销申请
  102 +export const cancleAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/cancleAirLineAircraft`, params); };
  103 +
96 104
97 105
98 //进港预报申报prediction 106 //进港预报申报prediction
@@ -186,10 +186,14 @@ @@ -186,10 +186,14 @@
186 <script> 186 <script>
187 const fecha = require('fecha'); 187 const fecha = require('fecha');
188 import {addAircraft, selectCountry, selectCreden, sendAircraft} from "../../api/transport"; 188 import {addAircraft, selectCountry, selectCreden, sendAircraft} from "../../api/transport";
  189 + import loginUserInfo from '../../api/base'
  190 +
189 export default { 191 export default {
190 data(){ 192 data(){
191 return{ 193 return{
192 aircraft:{ 194 aircraft:{
  195 + createBy:loginUserInfo.username,
  196 + updateBy:loginUserInfo.username,
193 agentcode:undefined, 197 agentcode:undefined,
194 customcode:undefined, 198 customcode:undefined,
195 uuid:undefined, 199 uuid:undefined,
@@ -210,9 +214,7 @@ @@ -210,9 +214,7 @@
210 statusMsg:undefined, 214 statusMsg:undefined,
211 status:undefined, 215 status:undefined,
212 createTime:undefined, 216 createTime:undefined,
213 - createBy:undefined,  
214 updateTime:undefined, 217 updateTime:undefined,
215 - updateBy:undefined,  
216 meno:undefined, 218 meno:undefined,
217 isDelete:undefined, 219 isDelete:undefined,
218 messageid:undefined 220 messageid:undefined
@@ -222,9 +224,9 @@ @@ -222,9 +224,9 @@
222 countryOptions:[], 224 countryOptions:[],
223 225
224 rules:{ 226 rules:{
225 - // airwayCode: [  
226 - // {required: true, message: '请输入', trigger: 'blur'}  
227 - // ], 227 + customcode: [
  228 + {required: true, message: '请输入', trigger: 'blur'}
  229 + ],
228 airwayNameEn: [ 230 airwayNameEn: [
229 {required: true, message: '请输入英文名称', trigger: 'blur'} 231 {required: true, message: '请输入英文名称', trigger: 'blur'}
230 ], 232 ],
@@ -333,6 +335,7 @@ @@ -333,6 +335,7 @@
333 sendForm(formName) { 335 sendForm(formName) {
334 this.$refs[formName].validate((valid) => { 336 this.$refs[formName].validate((valid) => {
335 if (valid) { 337 if (valid) {
  338 + this.aircraft.createBy=loginUserInfo.username
336 sendAircraft(this.aircraft).then(res=>{ 339 sendAircraft(this.aircraft).then(res=>{
337 let response=res.data; 340 let response=res.data;
338 console.log(response); 341 console.log(response);
@@ -98,11 +98,11 @@ @@ -98,11 +98,11 @@
98 <el-button 98 <el-button
99 size="mini" 99 size="mini"
100 type="success" 100 type="success"
101 - @click="changeApply(scope.$index, scope.row)">变更申请</el-button> 101 + @click="change(scope.$index, scope.row)">变更申请</el-button>
102 <el-button 102 <el-button
103 size="mini" 103 size="mini"
104 type="warning" 104 type="warning"
105 - @click="cancellApply(scope.$index, scope.row)">撤销申请</el-button> 105 + @click="cancle(scope.$index, scope.row)">撤销申请</el-button>
106 <el-button 106 <el-button
107 size="mini" 107 size="mini"
108 type="danger" 108 type="danger"
@@ -156,7 +156,7 @@ @@ -156,7 +156,7 @@
156 156
157 </style> 157 </style>
158 <script> 158 <script>
159 - import {selectAircraft, editAircraft, selectReturnMsg} from "../../api/transport"; 159 + import {selectAircraft, editAircraft, selectReturnMsg, changeAircraft, cancleAircraft} from "../../api/transport";
160 160
161 export default { 161 export default {
162 data(){ 162 data(){
@@ -239,6 +239,64 @@ @@ -239,6 +239,64 @@
239 }); 239 });
240 }); 240 });
241 }, 241 },
  242 + //更改申请
  243 + change(index, row) {
  244 + this.$confirm('变更申请, 是否继续?', '提示', {
  245 + confirmButtonText: '确定',
  246 + cancelButtonText: '取消',
  247 + type: 'warning'
  248 + }).then(() => {
  249 + changeAircraft(row).then(res => {
  250 + let response = res.data;
  251 + if (response.code == '200') {
  252 + this.$message({
  253 + type: 'success',
  254 + message: '变更申请成功'
  255 + });
  256 + this.submitForm();
  257 + } else {
  258 + this.$message({
  259 + type: 'info',
  260 + message: '变更申请失败'
  261 + });
  262 + }
  263 + });
  264 + }).catch(() => {
  265 + this.$message({
  266 + type: 'info',
  267 + message: '已取消变更申请'
  268 + });
  269 + });
  270 + },
  271 + //撤销申请
  272 + cancle(index, row) {
  273 + this.$confirm('撤销申请, 是否继续?', '提示', {
  274 + confirmButtonText: '确定',
  275 + cancelButtonText: '取消',
  276 + type: 'warning'
  277 + }).then(() => {
  278 + cancleAircraft(row).then(res => {
  279 + let response = res.data;
  280 + if (response.code == '200') {
  281 + this.$message({
  282 + type: 'success',
  283 + message: '撤销申请成功'
  284 + });
  285 + this.submitForm();
  286 + } else {
  287 + this.$message({
  288 + type: 'info',
  289 + message: '撤销申请失败'
  290 + });
  291 + }
  292 + });
  293 + }).catch(() => {
  294 + this.$message({
  295 + type: 'info',
  296 + message: '已取消撤销申请'
  297 + });
  298 + });
  299 + },
242 //获取默认值 300 //获取默认值
243 defaultData() { 301 defaultData() {
244 Object.assign(this.queryAircraft, this.$route.query); 302 Object.assign(this.queryAircraft, this.$route.query);
@@ -101,11 +101,11 @@ @@ -101,11 +101,11 @@
101 <el-button 101 <el-button
102 size="mini" 102 size="mini"
103 type="success" 103 type="success"
104 - @click="changeApply(scope.$index, scope.row)">变更申请</el-button> 104 + @click="change(scope.$index, scope.row)">变更申请</el-button>
105 <el-button 105 <el-button
106 size="mini" 106 size="mini"
107 type="warning" 107 type="warning"
108 - @click="cancellApply(scope.$index, scope.row)">撤销申请</el-button> 108 + @click="cancle(scope.$index, scope.row)">撤销申请</el-button>
109 <el-button 109 <el-button
110 size="mini" 110 size="mini"
111 type="danger" 111 type="danger"
@@ -159,7 +159,14 @@ @@ -159,7 +159,14 @@
159 159
160 </style> 160 </style>
161 <script> 161 <script>
162 - import {editAirLineAircraft, selectAirLineAircraft, selectReturnMsg} from "../../api/transport"; 162 + import {
  163 + editAirLineAircraft,
  164 + selectAirLineAircraft,
  165 + selectReturnMsg,
  166 + cancleAirLineAircraft,
  167 + changeAirLineAircraft,
  168 + changeAircraft, cancleAircraft
  169 + } from "../../api/transport";
163 170
164 export default { 171 export default {
165 data(){ 172 data(){
@@ -179,6 +186,64 @@ @@ -179,6 +186,64 @@
179 } 186 }
180 }, 187 },
181 methods: { 188 methods: {
  189 + //更改申请
  190 + change(index, row) {
  191 + this.$confirm('变更申请, 是否继续?', '提示', {
  192 + confirmButtonText: '确定',
  193 + cancelButtonText: '取消',
  194 + type: 'warning'
  195 + }).then(() => {
  196 + changeAirLineAircraft(row).then(res => {
  197 + let response = res.data;
  198 + if (response.code == '200') {
  199 + this.$message({
  200 + type: 'success',
  201 + message: '变更申请成功'
  202 + });
  203 + this.submitForm();
  204 + } else {
  205 + this.$message({
  206 + type: 'info',
  207 + message: '变更申请失败'
  208 + });
  209 + }
  210 + });
  211 + }).catch(() => {
  212 + this.$message({
  213 + type: 'info',
  214 + message: '已取消变更申请'
  215 + });
  216 + });
  217 + },
  218 + //撤销申请
  219 + cancle(index, row) {
  220 + this.$confirm('撤销申请, 是否继续?', '提示', {
  221 + confirmButtonText: '确定',
  222 + cancelButtonText: '取消',
  223 + type: 'warning'
  224 + }).then(() => {
  225 + cancleAirLineAircraft(row).then(res => {
  226 + let response = res.data;
  227 + if (response.code == '200') {
  228 + this.$message({
  229 + type: 'success',
  230 + message: '撤销申请成功'
  231 + });
  232 + this.submitForm();
  233 + } else {
  234 + this.$message({
  235 + type: 'info',
  236 + message: '撤销申请失败'
  237 + });
  238 + }
  239 + });
  240 + }).catch(() => {
  241 + this.$message({
  242 + type: 'info',
  243 + message: '已取消撤销申请'
  244 + });
  245 + });
  246 + },
182 //查询回执列表 247 //查询回执列表
183 selectDetail(index,row){ 248 selectDetail(index,row){
184 this.gridData=[]; 249 this.gridData=[];
@@ -163,11 +163,14 @@ @@ -163,11 +163,14 @@
163 </style> 163 </style>
164 <script> 164 <script>
165 import {addAirLineAircraft, selectCreden, sendAirLineAircraft} from "../../api/transport"; 165 import {addAirLineAircraft, selectCreden, sendAirLineAircraft} from "../../api/transport";
  166 + import loginUserInfo from "../../api/base";
166 167
167 export default { 168 export default {
168 data(){ 169 data(){
169 return{ 170 return{
170 aircraft:{ 171 aircraft:{
  172 + createBy:loginUserInfo.username,
  173 + updateBy:loginUserInfo.username,
171 uuid:undefined, 174 uuid:undefined,
172 customcode:undefined, 175 customcode:undefined,
173 operatcode:undefined, 176 operatcode:undefined,
@@ -188,9 +191,7 @@ @@ -188,9 +191,7 @@
188 statusMsg:undefined, 191 statusMsg:undefined,
189 status:undefined, 192 status:undefined,
190 createTime:undefined, 193 createTime:undefined,
191 - createBy:undefined,  
192 updateTime:undefined, 194 updateTime:undefined,
193 - updateBy:undefined,  
194 meno:undefined, 195 meno:undefined,
195 isDelete:undefined, 196 isDelete:undefined,
196 messageid:undefined 197 messageid:undefined
@@ -199,9 +200,9 @@ @@ -199,9 +200,9 @@
199 certOptions:[], 200 certOptions:[],
200 201
201 rules:{ 202 rules:{
202 - // airwayCode: [  
203 - // {required: true, message: '请输入', trigger: 'blur'}  
204 - // ], 203 + customcode: [
  204 + {required: true, message: '请输入', trigger: 'blur'}
  205 + ],
205 operatcode: [ 206 operatcode: [
206 {required: true, message: '请输入编码', trigger: 'blur'} 207 {required: true, message: '请输入编码', trigger: 'blur'}
207 ], 208 ],
@@ -295,6 +296,7 @@ @@ -295,6 +296,7 @@
295 sendForm(formName) { 296 sendForm(formName) {
296 this.$refs[formName].validate((valid) => { 297 this.$refs[formName].validate((valid) => {
297 if (valid) { 298 if (valid) {
  299 + this.aircraft.createBy=loginUserInfo.username
298 sendAirLineAircraft(this.aircraft).then(res=>{ 300 sendAirLineAircraft(this.aircraft).then(res=>{
299 let response=res.data; 301 let response=res.data;
300 if(response.code=='200'){ 302 if(response.code=='200'){