作者 小范

20200623-trans

@@ -204,7 +204,7 @@ @@ -204,7 +204,7 @@
204 if(response.code=='200'){ 204 if(response.code=='200'){
205 this.centerDialogVisible=true; 205 this.centerDialogVisible=true;
206 this.msg=response.msg; 206 this.msg=response.msg;
207 - this.$router.push({path:'/queryArrival',query:{flightNo:JSON.stringify(this.arrival.flightNo),flightDate:JSON.stringify(this.arrival.flightDate)},}); 207 + this.$router.push({path:'/queryArrival',query:{flightNo:this.arrival.flightNo,flightDate:this.arrival.flightDate}});
208 }else{ 208 }else{
209 this.msg=response.msg; 209 this.msg=response.msg;
210 } 210 }
@@ -77,6 +77,7 @@ @@ -77,6 +77,7 @@
77 flightNo:undefined, 77 flightNo:undefined,
78 ietype:undefined, 78 ietype:undefined,
79 reamrk:undefined, 79 reamrk:undefined,
  80 + accessFlag:'1'
80 }, 81 },
81 rules: { 82 rules: {
82 flightNo: [ 83 flightNo: [
@@ -94,7 +95,6 @@ @@ -94,7 +95,6 @@
94 tableData:[], 95 tableData:[],
95 msg:undefined, 96 msg:undefined,
96 centerDialogVisible:false, 97 centerDialogVisible:false,
97 - accessFlag:'1'  
98 } 98 }
99 }, 99 },
100 methods:{ 100 methods:{
@@ -107,7 +107,7 @@ @@ -107,7 +107,7 @@
107 if(response.code=='200'){ 107 if(response.code=='200'){
108 this.centerDialogVisible=true; 108 this.centerDialogVisible=true;
109 this.msg=response.msg; 109 this.msg=response.msg;
110 - this.$router.push({path:'/queryConfigure',query:{flightNo:JSON.stringify(this.queryConfigure.flightNo)},}); 110 + this.$router.push({path:'/queryConfigure',query:{flightNo:this.configure.flightNo}});
111 }else{ 111 }else{
112 this.msg=response.msg; 112 this.msg=response.msg;
113 } 113 }
@@ -177,7 +177,7 @@ @@ -177,7 +177,7 @@
177 if(response.code=='200'){ 177 if(response.code=='200'){
178 this.centerDialogVisible=true; 178 this.centerDialogVisible=true;
179 this.msg=response.msg; 179 this.msg=response.msg;
180 - this.$router.push({path:'/queryConfirmatory',query:{flightNo:JSON.stringify(this.confirmatory.flightNo),flightDate:JSON.stringify(this.confirmatory.flightDate)},}); 180 + this.$router.push({path:'/queryConfirmatory',query:{flightNo:this.confirmatory.flightNo,flightDate:this.confirmatory.flightDate}});
181 }else{ 181 }else{
182 this.msg=response.msg; 182 this.msg=response.msg;
183 } 183 }
@@ -23,6 +23,8 @@ @@ -23,6 +23,8 @@
23 <el-date-picker 23 <el-date-picker
24 v-model="declare.flightDate" 24 v-model="declare.flightDate"
25 type="date" 25 type="date"
  26 + value-format="yyyyMMdd"
  27 + format="yyyyMMdd"
26 style="width:275px" 28 style="width:275px"
27 placeholder="选择日期"> 29 placeholder="选择日期">
28 </el-date-picker> 30 </el-date-picker>
@@ -30,17 +32,24 @@ @@ -30,17 +32,24 @@
30 </el-col> 32 </el-col>
31 <el-col :span="8"> 33 <el-col :span="8">
32 <el-form-item label="离港时间" prop="departuredatetime" label-width="120px"> 34 <el-form-item label="离港时间" prop="departuredatetime" label-width="120px">
33 - <el-input v-model="declare.departuredatetime"></el-input> 35 + <el-input v-model="declare.departuredatetime"
  36 + type="date"
  37 + value-format="yyyyMMdd"
  38 + format="yyyyMMdd"
  39 + style="width:100%"
  40 + placeholder="任意时间点">></el-input>
34 </el-form-item> 41 </el-form-item>
35 </el-col> 42 </el-col>
36 <el-col :span="8"> 43 <el-col :span="8">
37 <el-form-item label="出发港" prop="departurePort" label-width="120px"> 44 <el-form-item label="出发港" prop="departurePort" label-width="120px">
38 - <el-input v-model="declare.departurePort"></el-input> 45 + <el-input v-model="declare.departurePort" @input="e => declare.departurePort=inputMe(e)"
  46 + maxLength='3'></el-input>
39 </el-form-item> 47 </el-form-item>
40 </el-col> 48 </el-col>
41 <el-col :span="8"> 49 <el-col :span="8">
42 <el-form-item label="关区代码" prop="customDistrictNo" label-width="120px"> 50 <el-form-item label="关区代码" prop="customDistrictNo" label-width="120px">
43 - <el-input v-model="declare.customDistrictNo"></el-input> 51 + <el-input v-model="declare.customDistrictNo" oninput="value=value.replace(/[^\d]/g,'')"
  52 + maxLength='4'></el-input>
44 </el-form-item> 53 </el-form-item>
45 </el-col> 54 </el-col>
46 <el-col :span="24"> 55 <el-col :span="24">
@@ -54,6 +63,20 @@ @@ -54,6 +63,20 @@
54 <el-col :span="24"> <el-button type="primary" @click="submitForm('declare')">保 存</el-button> 63 <el-col :span="24"> <el-button type="primary" @click="submitForm('declare')">保 存</el-button>
55 <el-button type="success">保存并发送</el-button></el-col> 64 <el-button type="success">保存并发送</el-button></el-col>
56 </el-row> 65 </el-row>
  66 + <!--对话提示框-->
  67 + <el-row>
  68 + <el-dialog
  69 + title="系统提示"
  70 + :visible.sync="centerDialogVisible"
  71 + width="30%"
  72 + center>
  73 + <span>{{msg}}</span>
  74 + <span slot="footer" class="dialog-footer">
  75 + <el-button @click="centerDialogVisible = false">取 消</el-button>
  76 + <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
  77 + </span>
  78 + </el-dialog>
  79 + </el-row>
57 </el-main> 80 </el-main>
58 </el-container> 81 </el-container>
59 </template> 82 </template>
@@ -76,6 +99,8 @@ @@ -76,6 +99,8 @@
76 .el-col{margin-right: 0px;} 99 .el-col{margin-right: 0px;}
77 </style> 100 </style>
78 <script> 101 <script>
  102 + import {addConfirm} from "../../api/transport";
  103 +
79 export default { 104 export default {
80 data(){ 105 data(){
81 return{ 106 return{
@@ -111,31 +136,45 @@ @@ -111,31 +136,45 @@
111 ], 136 ],
112 137
113 }, 138 },
114 - tableData:[] 139 + tableData:[],
  140 + msg:undefined,
  141 + centerDialogVisible:false,
115 } 142 }
116 }, 143 },
117 methods:{ 144 methods:{
  145 + //新增出港确报申报(保存按钮)
118 submitForm(formName) { 146 submitForm(formName) {
119 this.$refs[formName].validate((valid) => { 147 this.$refs[formName].validate((valid) => {
120 if (valid) { 148 if (valid) {
121 - alert('submit!'); 149 + addConfirm(this.declare).then(res=>{
  150 + let response=res.data;
  151 + if(response.code=='200'){
  152 + this.centerDialogVisible=true;
  153 + this.msg=response.msg;
  154 + this.$router.push({path:'/queryDeclare',query:{flightNo:this.declare.flightNo,flightDate:this.declare.flightDate}});
  155 + }else{
  156 + this.msg=response.msg;
  157 + }
  158 + });
122 } else { 159 } else {
123 console.log('error submit!!'); 160 console.log('error submit!!');
124 return false; 161 return false;
125 } 162 }
126 }); 163 });
127 }, 164 },
128 - submitPerson(formName){  
129 - this.$refs[formName].validate((valid) => {  
130 - if (valid) {  
131 - alert('submit!');  
132 - } else {  
133 - console.log('error submit!!');  
134 - return false;  
135 - }  
136 - }); 165 + //加载默认值
  166 + defaultData(){
  167 + if(this.$route.query!=null){
  168 + let ob=Object.assign(this.declare, this.$route.query);
  169 + }
137 }, 170 },
138 - 171 + // 过滤中英文
  172 + inputMe(e){
  173 + return e.replace(/[^a-zA-Z]/g,'').toUpperCase();
  174 + }
  175 + },
  176 + mounted(){
  177 + this.defaultData();
139 } 178 }
140 } 179 }
141 </script> 180 </script>
@@ -23,6 +23,8 @@ @@ -23,6 +23,8 @@
23 <el-date-picker 23 <el-date-picker
24 v-model="departure.flightDate" 24 v-model="departure.flightDate"
25 type="date" 25 type="date"
  26 + value-format="yyyyMMdd"
  27 + format="yyyyMMdd"
26 style="width:275px" 28 style="width:275px"
27 placeholder="选择日期"> 29 placeholder="选择日期">
28 </el-date-picker> 30 </el-date-picker>
@@ -30,22 +32,30 @@ @@ -30,22 +32,30 @@
30 </el-col> 32 </el-col>
31 <el-col :span="8"> 33 <el-col :span="8">
32 <el-form-item label="出发港" prop="departurePort" label-width="120px"> 34 <el-form-item label="出发港" prop="departurePort" label-width="120px">
33 - <el-input v-model="departure.departurePort"></el-input> 35 + <el-input v-model="departure.departurePort" @input="e => departure.departurePort=inputMe(e)"
  36 + maxLength='3'></el-input>
34 </el-form-item> 37 </el-form-item>
35 </el-col> 38 </el-col>
36 <el-col :span="8"> 39 <el-col :span="8">
37 <el-form-item label="目的港" prop="arrivalPort" label-width="120px"> 40 <el-form-item label="目的港" prop="arrivalPort" label-width="120px">
38 - <el-input v-model="departure.arrivalPort"></el-input> 41 + <el-input v-model="departure.arrivalPort" @input="e => departure.arrivalPort=inputMe(e)"
  42 + maxLength='3'></el-input>
39 </el-form-item> 43 </el-form-item>
40 </el-col> 44 </el-col>
41 <el-col :span="8"> 45 <el-col :span="8">
42 <el-form-item label="关区代码" prop="customDistrictNo" label-width="120px"> 46 <el-form-item label="关区代码" prop="customDistrictNo" label-width="120px">
43 - <el-input v-model="departure.customDistrictNo"></el-input> 47 + <el-input v-model="departure.customDistrictNo" oninput="value=value.replace(/[^\d]/g,'')"
  48 + maxLength='4'></el-input>
44 </el-form-item> 49 </el-form-item>
45 </el-col> 50 </el-col>
46 <el-col :span="8"> 51 <el-col :span="8">
47 <el-form-item label="预计离港时间" prop="departuredatetime" label-width="120px"> 52 <el-form-item label="预计离港时间" prop="departuredatetime" label-width="120px">
48 - <el-input v-model="departure.departuredatetime"></el-input> 53 + <el-input v-model="departure.departuredatetime"
  54 + type="date"
  55 + format="yyyyMMdd"
  56 + value-format="yyyyMMdd"
  57 + style="width:100%"
  58 + placeholder="任意时间点">></el-input>
49 </el-form-item> 59 </el-form-item>
50 </el-col> 60 </el-col>
51 <el-col :span="8"> 61 <el-col :span="8">
@@ -64,6 +74,20 @@ @@ -64,6 +74,20 @@
64 <el-col :span="24"> <el-button type="primary" @click="submitForm('departure')">保 存</el-button> 74 <el-col :span="24"> <el-button type="primary" @click="submitForm('departure')">保 存</el-button>
65 <el-button type="success">保存并发送</el-button></el-col> 75 <el-button type="success">保存并发送</el-button></el-col>
66 </el-row> 76 </el-row>
  77 + <!--对话提示框-->
  78 + <el-row>
  79 + <el-dialog
  80 + title="系统提示"
  81 + :visible.sync="centerDialogVisible"
  82 + width="30%"
  83 + center>
  84 + <span>{{msg}}</span>
  85 + <span slot="footer" class="dialog-footer">
  86 + <el-button @click="centerDialogVisible = false">取 消</el-button>
  87 + <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
  88 + </span>
  89 + </el-dialog>
  90 + </el-row>
67 </el-main> 91 </el-main>
68 </el-container> 92 </el-container>
69 </template> 93 </template>
@@ -86,6 +110,8 @@ @@ -86,6 +110,8 @@
86 .el-col{margin-right: 0px;} 110 .el-col{margin-right: 0px;}
87 </style> 111 </style>
88 <script> 112 <script>
  113 + import {addPrediction} from "../../api/transport";
  114 +
89 export default { 115 export default {
90 data(){ 116 data(){
91 return{ 117 return{
@@ -129,31 +155,45 @@ @@ -129,31 +155,45 @@
129 {required: true, message: '请输入', trigger: 'blur'} 155 {required: true, message: '请输入', trigger: 'blur'}
130 ], 156 ],
131 }, 157 },
132 - tableData:[] 158 + tableData:[],
  159 + centerDialogVisible:false,
  160 + msg:undefined,
133 } 161 }
134 }, 162 },
135 methods:{ 163 methods:{
  164 + //新增出港预报申报(保存按钮)
136 submitForm(formName) { 165 submitForm(formName) {
137 this.$refs[formName].validate((valid) => { 166 this.$refs[formName].validate((valid) => {
138 if (valid) { 167 if (valid) {
139 - alert('submit!'); 168 + addPrediction(this.departure).then(res=>{
  169 + let response=res.data;
  170 + if(response.code=='200'){
  171 + this.centerDialogVisible=true;
  172 + this.msg=response.msg;
  173 + this.$router.push({path:'/queryDeparture',query:{flightNo:this.departure.flightNo,flightDate:this.departure.flightDate}});
  174 + }else{
  175 + this.msg=response.msg;
  176 + }
  177 + });
140 } else { 178 } else {
141 console.log('error submit!!'); 179 console.log('error submit!!');
142 return false; 180 return false;
143 } 181 }
144 }); 182 });
145 }, 183 },
146 - submitPerson(formName){  
147 - this.$refs[formName].validate((valid) => {  
148 - if (valid) {  
149 - alert('submit!');  
150 - } else {  
151 - console.log('error submit!!');  
152 - return false;  
153 - }  
154 - }); 184 + //加载默认值
  185 + defaultData(){
  186 + if(this.$route.query!=null){
  187 + let ob=Object.assign(this.departure, this.$route.query);
  188 + }
155 }, 189 },
156 - 190 + // 过滤中英文
  191 + inputMe(e){
  192 + return e.replace(/[^a-zA-Z]/g,'').toUpperCase();
  193 + }
  194 + },
  195 + mounted(){
  196 + this.defaultData();
157 } 197 }
158 } 198 }
159 </script> 199 </script>
@@ -32,6 +32,20 @@ @@ -32,6 +32,20 @@
32 <el-col :span="24"> <el-button type="primary" @click="submitForm('outConfigure')">保 存</el-button> 32 <el-col :span="24"> <el-button type="primary" @click="submitForm('outConfigure')">保 存</el-button>
33 </el-col> 33 </el-col>
34 </el-row> 34 </el-row>
  35 + <!--对话提示框-->
  36 + <el-row>
  37 + <el-dialog
  38 + title="系统提示"
  39 + :visible.sync="centerDialogVisible"
  40 + width="30%"
  41 + center>
  42 + <span>{{msg}}</span>
  43 + <span slot="footer" class="dialog-footer">
  44 + <el-button @click="centerDialogVisible = false">取 消</el-button>
  45 + <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
  46 + </span>
  47 + </el-dialog>
  48 + </el-row>
35 </el-main> 49 </el-main>
36 </el-container> 50 </el-container>
37 </template> 51 </template>
@@ -54,6 +68,8 @@ @@ -54,6 +68,8 @@
54 .el-col{margin-right: 0px;} 68 .el-col{margin-right: 0px;}
55 </style> 69 </style>
56 <script> 70 <script>
  71 + import {addSchedule} from "../../api/transport";
  72 +
57 export default { 73 export default {
58 data(){ 74 data(){
59 return{ 75 return{
@@ -76,31 +92,41 @@ @@ -76,31 +92,41 @@
76 {value:'1',label:'进港'}, 92 {value:'1',label:'进港'},
77 {value:'2',label:'出港'} 93 {value:'2',label:'出港'}
78 ], 94 ],
79 - tableData:[] 95 + tableData:[],
  96 + msg:undefined,
  97 + centerDialogVisible:false,
80 } 98 }
81 }, 99 },
82 methods:{ 100 methods:{
  101 + //新增出港确报申报(保存按钮)
83 submitForm(formName) { 102 submitForm(formName) {
84 this.$refs[formName].validate((valid) => { 103 this.$refs[formName].validate((valid) => {
85 if (valid) { 104 if (valid) {
86 - alert('submit!'); 105 + addSchedule(this.outConfigure).then(res=>{
  106 + let response=res.data;
  107 + if(response.code=='200'){
  108 + this.centerDialogVisible=true;
  109 + this.msg=response.msg;
  110 + this.$router.push({path:'/queryFlightConfigure',query:{flightNo:this.outConfigure.flightNo}});
  111 + }else{
  112 + this.msg=response.msg;
  113 + }
  114 + });
87 } else { 115 } else {
88 console.log('error submit!!'); 116 console.log('error submit!!');
89 return false; 117 return false;
90 } 118 }
91 }); 119 });
92 }, 120 },
93 - submitPerson(formName){  
94 - this.$refs[formName].validate((valid) => {  
95 - if (valid) {  
96 - alert('submit!');  
97 - } else {  
98 - console.log('error submit!!');  
99 - return false;  
100 - }  
101 - }); 121 + //加载默认值
  122 + defaultData(){
  123 + if(this.$route.query!=null){
  124 + let ob=Object.assign(this.outConfigure, this.$route.query);
  125 + }
102 }, 126 },
103 - 127 + },
  128 + mounted(){
  129 + this.defaultData();
104 } 130 }
105 } 131 }
106 </script> 132 </script>
@@ -213,8 +213,10 @@ @@ -213,8 +213,10 @@
213 }, 213 },
214 //获取默认值 214 //获取默认值
215 defaultData() { 215 defaultData() {
216 - this.flightNo = JSON.parse(this.$route.query.flightNo);  
217 - this.flightDate = JSON.parse(this.$route.query.flightDate); 216 + Object.assign(this.queryArrival, this.$route.query);
  217 +
  218 + // this.flightNo = JSON.parse(this.$route.query.flightNo);
  219 + // this.flightDate = JSON.parse(this.$route.query.flightDate);
218 }, 220 },
219 //编辑进港预报 221 //编辑进港预报
220 handleEdit(index,row){ 222 handleEdit(index,row){
@@ -105,7 +105,7 @@ @@ -105,7 +105,7 @@
105 <el-button 105 <el-button
106 size="mini" 106 size="mini"
107 type="success" 107 type="success"
108 - @click="handleEdit(scope.$index, scope.row)">查看</el-button> 108 + @click="dialogTableVisible = true">查看</el-button>
109 <el-button 109 <el-button
110 size="mini" 110 size="mini"
111 type="danger" 111 type="danger"
@@ -127,6 +127,16 @@ @@ -127,6 +127,16 @@
127 </el-pagination> 127 </el-pagination>
128 </div> 128 </div>
129 </el-row> 129 </el-row>
  130 + //查看回执弹框
  131 + <el-dialog title="回执明细" :visible.sync="dialogTableVisible">
  132 + <el-table :data="gridData">
  133 + <el-table-column property="date" label="操作时间" width="150"></el-table-column>
  134 + <el-table-column property="name" label="操作人" width="200"></el-table-column>
  135 + <el-table-column property="address" label="航班号"></el-table-column>
  136 + <el-table-column property="dat" label="航班日期" width="150"></el-table-column>
  137 + <el-table-column property="nam" label="回执内容" width="200"></el-table-column>
  138 + </el-table>
  139 + </el-dialog>
130 </el-main> 140 </el-main>
131 </el-container> 141 </el-container>
132 </template> 142 </template>
@@ -165,7 +175,11 @@ @@ -165,7 +175,11 @@
165 currentPage: 1, 175 currentPage: 1,
166 pageSize:10, 176 pageSize:10,
167 total:0, 177 total:0,
168 - tableData:[] 178 + tableData:[],
  179 + gridData:{
  180 +
  181 + },
  182 + dialogTableVisible: false,
169 } 183 }
170 }, 184 },
171 methods: { 185 methods: {
@@ -193,7 +193,9 @@ @@ -193,7 +193,9 @@
193 }, 193 },
194 //获取默认值 194 //获取默认值
195 defaultData() { 195 defaultData() {
196 - this.flightNo = JSON.parse(this.$route.query.flightNo); 196 + Object.assign(this.queryConfigure, this.$route.query);
  197 +
  198 + // this.flightNo = JSON.parse(this.$route.query.flightNo);
197 }, 199 },
198 //编辑进港航班配置 200 //编辑进港航班配置
199 handleEdit(index,row){ 201 handleEdit(index,row){
@@ -214,7 +214,9 @@ @@ -214,7 +214,9 @@
214 }, 214 },
215 //获取默认值 215 //获取默认值
216 defaultData() { 216 defaultData() {
217 - this.flightNo = JSON.parse(this.$route.query.flightNo); 217 + Object.assign(this.queryConfirmatory, this.$route.query);
  218 +
  219 + // this.flightNo = JSON.parse(this.$route.query.flightNo);
218 }, 220 },
219 //编辑进港确报 221 //编辑进港确报
220 handleEdit(index,row){ 222 handleEdit(index,row){
@@ -8,13 +8,13 @@ @@ -8,13 +8,13 @@
8 </el-row> 8 </el-row>
9 <!-- 搜索区域--> 9 <!-- 搜索区域-->
10 <el-row> 10 <el-row>
11 - <el-form :label-position="labelPosition" :model="queryDeclare" :rules="rules" ref="queryFlight" 11 + <el-form :label-position="labelPosition" :model="queryDeclare" ref="queryFlight"
12 label-width="130px" class="demo-ruleForm"> 12 label-width="130px" class="demo-ruleForm">
13 - <el-col :span="6" >  
14 - <el-form-item label="承运人:" prop="awcd" label-width="80px">  
15 - <el-input v-model="queryDeclare.awcd" style="width:190px"></el-input>  
16 - </el-form-item>  
17 - </el-col> 13 +<!-- <el-col :span="6" >-->
  14 +<!-- <el-form-item label="承运人:" prop="awcd" label-width="80px">-->
  15 +<!-- <el-input v-model="queryDeclare.awcd" style="width:190px"></el-input>-->
  16 +<!-- </el-form-item>-->
  17 +<!-- </el-col>-->
18 <el-col :span="6" > 18 <el-col :span="6" >
19 <el-form-item label="航班号:" prop="flightNo" label-width="80px"> 19 <el-form-item label="航班号:" prop="flightNo" label-width="80px">
20 <el-input v-model="queryDeclare.flightNo" style="width:190px"></el-input> 20 <el-input v-model="queryDeclare.flightNo" style="width:190px"></el-input>
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
40 <el-table 40 <el-table
41 :data="tableData" 41 :data="tableData"
42 border 42 border
  43 + v-loading="tableloading"
43 style="width: 100%;margin-bottom: 10px"> 44 style="width: 100%;margin-bottom: 10px">
44 <el-table-column 45 <el-table-column
45 fixed="left" 46 fixed="left"
@@ -122,10 +123,10 @@ @@ -122,10 +123,10 @@
122 @size-change="handleSizeChange" 123 @size-change="handleSizeChange"
123 @current-change="handleCurrentChange" 124 @current-change="handleCurrentChange"
124 :current-page="currentPage" 125 :current-page="currentPage"
125 - :page-sizes="[100, 200, 300, 400]"  
126 - :page-size="100" 126 + :page-sizes="[10, 20, 30, 40]"
  127 + :page-size="pageSize"
127 layout="total, sizes, prev, pager, next, jumper" 128 layout="total, sizes, prev, pager, next, jumper"
128 - :total="400"> 129 + :total="total">
129 </el-pagination> 130 </el-pagination>
130 </div> 131 </div>
131 </el-row> 132 </el-row>
@@ -151,37 +152,89 @@ @@ -151,37 +152,89 @@
151 152
152 </style> 153 </style>
153 <script> 154 <script>
  155 + import {editConfirm, selectConfirm} from "../../api/transport";
  156 +
154 export default { 157 export default {
155 data(){ 158 data(){
156 return{ 159 return{
157 queryDeclare:{ 160 queryDeclare:{
158 - awcd:undefined, 161 + // awcd:undefined,
159 flightNo:undefined, 162 flightNo:undefined,
160 flightDate:undefined, 163 flightDate:undefined,
161 }, 164 },
162 - rules:{  
163 - awcd: [  
164 - {required: true, message: '请输入', trigger: 'blur'}  
165 - ],  
166 - flightNo: [  
167 - {required: true, message: '请输入', trigger: 'blur'}  
168 - ],  
169 - flightDate: [  
170 - {required: true, message: '请选择', trigger: 'change'}  
171 - ],  
172 - },  
173 labelPosition:'left', 165 labelPosition:'left',
174 - currentPage: 4, 166 + currentPage: 1,
  167 + pageSize:10,
  168 + total:0,
  169 + tableloading:false,
175 tableData:[] 170 tableData:[]
176 } 171 }
177 }, 172 },
178 methods: { 173 methods: {
  174 + //分页
179 handleSizeChange(val) { 175 handleSizeChange(val) {
180 - console.log(`每页 ${val} 条`); 176 + this.pageSize=val;
181 }, 177 },
182 handleCurrentChange(val) { 178 handleCurrentChange(val) {
183 - console.log(`当前页: ${val}`);  
184 - } 179 + this.currentPage=val;
  180 + this.submitForm();
  181 + },
  182 + //获取进港确报查询列表
  183 + submitForm() {
  184 + let params = {
  185 + currentPage: this.currentPage, pageSize: this.pageSize, flightNo: this.queryDeclare.flightNo,
  186 + flightDate: this.queryDeclare.flightDate
  187 + };
  188 + this.tableloading = true;
  189 + selectConfirm(params).then(res => {
  190 + let response = res.data.data;
  191 + this.tableData = response.list;
  192 + this.tableloading = false;
  193 + this.total = response.total;
  194 + });
  195 + },
  196 + //列表删除功能
  197 + handleDel(index, row) {
  198 + this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
  199 + confirmButtonText: '确定',
  200 + cancelButtonText: '取消',
  201 + type: 'warning'
  202 + }).then(() => {
  203 + editConfirm(row).then(res => {
  204 + let response = res.data;
  205 + if (response.code == '200') {
  206 + this.$message({
  207 + type: 'info',
  208 + message: '删除成功'
  209 + });
  210 + this.submitForm();
  211 + } else {
  212 + this.$message({
  213 + type: 'info',
  214 + message: '删除失败'
  215 + });
  216 + }
  217 + });
  218 + }).catch(() => {
  219 + this.$message({
  220 + type: 'info',
  221 + message: '已取消删除'
  222 + });
  223 + });
  224 + },
  225 + //获取默认值
  226 + defaultData() {
  227 + Object.assign(this.queryDeclare, this.$route.query);
  228 + },
  229 + //编辑进港确报
  230 + handleEdit(index,row){
  231 + this.$router.push({path:'/declare',query: row})
  232 + },
185 }, 233 },
  234 + //渲染方法
  235 + mounted(){
  236 + this.defaultData();
  237 + this.submitForm();
  238 + }
186 } 239 }
187 </script> 240 </script>
@@ -8,13 +8,13 @@ @@ -8,13 +8,13 @@
8 </el-row> 8 </el-row>
9 <!-- 搜索区域--> 9 <!-- 搜索区域-->
10 <el-row> 10 <el-row>
11 - <el-form :label-position="labelPosition" :model="queryDeparture" :rules="rules" ref="queryFlight" 11 + <el-form :label-position="labelPosition" :model="queryDeparture" ref="queryFlight"
12 label-width="130px" class="demo-ruleForm"> 12 label-width="130px" class="demo-ruleForm">
13 - <el-col :span="6" >  
14 - <el-form-item label="承运人:" prop="awcd" label-width="80px">  
15 - <el-input v-model="queryDeparture.awcd" style="width:190px"></el-input>  
16 - </el-form-item>  
17 - </el-col> 13 +<!-- <el-col :span="6" >-->
  14 +<!-- <el-form-item label="承运人:" prop="awcd" label-width="80px">-->
  15 +<!-- <el-input v-model="queryDeparture.awcd" style="width:190px"></el-input>-->
  16 +<!-- </el-form-item>-->
  17 +<!-- </el-col>-->
18 <el-col :span="6" > 18 <el-col :span="6" >
19 <el-form-item label="航班号:" prop="flightNo" label-width="80px"> 19 <el-form-item label="航班号:" prop="flightNo" label-width="80px">
20 <el-input v-model="queryDeparture.flightNo" style="width:190px"></el-input> 20 <el-input v-model="queryDeparture.flightNo" style="width:190px"></el-input>
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
40 <el-table 40 <el-table
41 :data="tableData" 41 :data="tableData"
42 border 42 border
  43 + v-loading="tableloading"
43 style="width: 100%;margin-bottom: 10px"> 44 style="width: 100%;margin-bottom: 10px">
44 <el-table-column 45 <el-table-column
45 fixed="left" 46 fixed="left"
@@ -122,10 +123,10 @@ @@ -122,10 +123,10 @@
122 @size-change="handleSizeChange" 123 @size-change="handleSizeChange"
123 @current-change="handleCurrentChange" 124 @current-change="handleCurrentChange"
124 :current-page="currentPage" 125 :current-page="currentPage"
125 - :page-sizes="[100, 200, 300, 400]"  
126 - :page-size="100" 126 + :page-sizes="[10, 20, 30, 40]"
  127 + :page-size="pageSize"
127 layout="total, sizes, prev, pager, next, jumper" 128 layout="total, sizes, prev, pager, next, jumper"
128 - :total="400"> 129 + :total="total">
129 </el-pagination> 130 </el-pagination>
130 </div> 131 </div>
131 </el-row> 132 </el-row>
@@ -151,37 +152,88 @@ @@ -151,37 +152,88 @@
151 152
152 </style> 153 </style>
153 <script> 154 <script>
  155 + import {editPrediction, selectPrediction} from "../../api/transport";
  156 +
154 export default { 157 export default {
155 data(){ 158 data(){
156 return{ 159 return{
157 queryDeparture:{ 160 queryDeparture:{
158 - awcd:undefined,  
159 flightNo:undefined, 161 flightNo:undefined,
160 flightDate:undefined, 162 flightDate:undefined,
161 }, 163 },
162 - rules:{  
163 - awcd: [  
164 - {required: true, message: '请输入', trigger: 'blur'}  
165 - ],  
166 - flightNo: [  
167 - {required: true, message: '请输入', trigger: 'blur'}  
168 - ],  
169 - flightDate: [  
170 - {required: true, message: '请选择', trigger: 'change'}  
171 - ],  
172 - },  
173 labelPosition:'left', 164 labelPosition:'left',
174 - currentPage: 4,  
175 - tableData:[] 165 + currentPage: 1,
  166 + pageSize:10,
  167 + total:0,
  168 + tableData:[],
  169 + tableloading:false
176 } 170 }
177 }, 171 },
178 methods: { 172 methods: {
  173 + //分页
179 handleSizeChange(val) { 174 handleSizeChange(val) {
180 - console.log(`每页 ${val} 条`); 175 + this.pageSize=val;
181 }, 176 },
182 handleCurrentChange(val) { 177 handleCurrentChange(val) {
183 - console.log(`当前页: ${val}`);  
184 - } 178 + this.currentPage=val;
  179 + this.submitForm();
  180 + },
  181 + //获取出港预报查询列表
  182 + submitForm() {
  183 + let params = {
  184 + currentPage: this.currentPage, pageSize: this.pageSize, flightNo: this.queryDeparture.flightNo,
  185 + flightDate: this.queryDeparture.flightDate
  186 + };
  187 + this.tableloading = true;
  188 + selectPrediction(params).then(res => {
  189 + let response = res.data.data;
  190 + this.tableData = response.list;
  191 + this.tableloading = false;
  192 + this.total = response.total;
  193 + });
  194 + },
  195 + //列表删除功能
  196 + handleDel(index, row) {
  197 + this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
  198 + confirmButtonText: '确定',
  199 + cancelButtonText: '取消',
  200 + type: 'warning'
  201 + }).then(() => {
  202 + editPrediction(row).then(res => {
  203 + let response = res.data;
  204 + if (response.code == '200') {
  205 + this.$message({
  206 + type: 'info',
  207 + message: '删除成功'
  208 + });
  209 + this.submitForm();
  210 + } else {
  211 + this.$message({
  212 + type: 'info',
  213 + message: '删除失败'
  214 + });
  215 + }
  216 + });
  217 + }).catch(() => {
  218 + this.$message({
  219 + type: 'info',
  220 + message: '已取消删除'
  221 + });
  222 + });
  223 + },
  224 + //获取默认值
  225 + defaultData() {
  226 + Object.assign(this.queryDeparture, this.$route.query);
  227 + },
  228 + //编辑进港预报
  229 + handleEdit(index,row){
  230 + this.$router.push({path:'/departure',query: row})
  231 + },
185 }, 232 },
  233 + //渲染方法
  234 + mounted(){
  235 + this.defaultData();
  236 + this.submitForm();
  237 + }
186 } 238 }
187 </script> 239 </script>
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 </el-row> 8 </el-row>
9 <!-- 搜索区域--> 9 <!-- 搜索区域-->
10 <el-row> 10 <el-row>
11 - <el-form :label-position="labelPosition" :model="queryFlightConfigure" :rules="rules" ref="queryFlight" 11 + <el-form :label-position="labelPosition" :model="queryFlightConfigure" ref="queryFlight"
12 label-width="130px" class="demo-ruleForm"> 12 label-width="130px" class="demo-ruleForm">
13 13
14 <el-col :span="6" > 14 <el-col :span="6" >
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
26 <el-table 26 <el-table
27 :data="tableData" 27 :data="tableData"
28 border 28 border
  29 + v-loading="tableloading"
29 style="width: 100%;margin-bottom: 10px"> 30 style="width: 100%;margin-bottom: 10px">
30 <el-table-column 31 <el-table-column
31 fixed="left" 32 fixed="left"
@@ -94,10 +95,10 @@ @@ -94,10 +95,10 @@
94 @size-change="handleSizeChange" 95 @size-change="handleSizeChange"
95 @current-change="handleCurrentChange" 96 @current-change="handleCurrentChange"
96 :current-page="currentPage" 97 :current-page="currentPage"
97 - :page-sizes="[100, 200, 300, 400]"  
98 - :page-size="100" 98 + :page-sizes="[10, 20, 30, 40]"
  99 + :page-size="pageSize"
99 layout="total, sizes, prev, pager, next, jumper" 100 layout="total, sizes, prev, pager, next, jumper"
100 - :total="400"> 101 + :total="total">
101 </el-pagination> 102 </el-pagination>
102 </div> 103 </div>
103 </el-row> 104 </el-row>
@@ -123,29 +124,86 @@ @@ -123,29 +124,86 @@
123 124
124 </style> 125 </style>
125 <script> 126 <script>
  127 + import {editSchedule, selectSchedule} from "../../api/transport";
  128 +
126 export default { 129 export default {
127 data(){ 130 data(){
128 return{ 131 return{
129 queryFlightConfigure:{ 132 queryFlightConfigure:{
130 flightNo:undefined, 133 flightNo:undefined,
131 }, 134 },
132 - rules:{  
133 - flightNo: [  
134 - {required: true, message: '请输入', trigger: 'blur'}  
135 - ],  
136 - },  
137 labelPosition:'left', 135 labelPosition:'left',
138 - currentPage: 4, 136 + currentPage: 1,
  137 + pageSize:10,
  138 + total:0,
  139 + tableloading:false,
139 tableData:[] 140 tableData:[]
140 } 141 }
141 }, 142 },
142 methods: { 143 methods: {
  144 + //分页
143 handleSizeChange(val) { 145 handleSizeChange(val) {
144 - console.log(`每页 ${val} 条`); 146 + this.pageSize=val;
145 }, 147 },
146 handleCurrentChange(val) { 148 handleCurrentChange(val) {
147 - console.log(`当前页: ${val}`);  
148 - } 149 + this.currentPage=val;
  150 + this.submitForm();
  151 + },
  152 + //获取出港航班配置查询列表
  153 + submitForm() {
  154 + let params = {
  155 + currentPage: this.currentPage, pageSize: this.pageSize, flightNo: this.queryFlightConfigure.flightNo,
  156 + };
  157 + this.tableloading = true;
  158 + selectSchedule(params).then(res => {
  159 + let response = res.data.data;
  160 + this.tableData = response.list;
  161 + this.tableloading = false;
  162 + this.total = response.total;
  163 + });
  164 + },
  165 + //列表删除功能
  166 + handleDel(index, row) {
  167 + this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
  168 + confirmButtonText: '确定',
  169 + cancelButtonText: '取消',
  170 + type: 'warning'
  171 + }).then(() => {
  172 + editSchedule(row).then(res => {
  173 + let response = res.data;
  174 + if (response.code == '200') {
  175 + this.$message({
  176 + type: 'info',
  177 + message: '删除成功'
  178 + });
  179 + this.submitForm();
  180 + } else {
  181 + this.$message({
  182 + type: 'info',
  183 + message: '删除失败'
  184 + });
  185 + }
  186 + });
  187 + }).catch(() => {
  188 + this.$message({
  189 + type: 'info',
  190 + message: '已取消删除'
  191 + });
  192 + });
  193 + },
  194 + //获取默认值
  195 + defaultData() {
  196 + Object.assign(this.queryFlightConfigure, this.$route.query);
  197 + },
  198 + //编辑出港航班配置
  199 + handleEdit(index,row){
  200 + this.$router.push({path:'/outConfigure',query: row})
  201 + },
149 }, 202 },
  203 + //渲染方法
  204 + mounted(){
  205 + this.defaultData();
  206 + this.submitForm();
  207 + }
150 } 208 }
151 </script> 209 </script>