作者 朱兆平

合并分支 'nmms-import-dev' 到 'master'

优化机场代码,国家代码,关区代码



查看合并请求 !7
@@ -203,11 +203,11 @@ @@ -203,11 +203,11 @@
203 <el-pagination 203 <el-pagination
204 @size-change="handleSizeChange" 204 @size-change="handleSizeChange"
205 @current-change="handleCurrentChange" 205 @current-change="handleCurrentChange"
206 - :current-page="currentPage4" 206 + :current-page="currentPage"
207 :page-sizes="[100, 200, 300, 400]" 207 :page-sizes="[100, 200, 300, 400]"
208 - :page-size="100" 208 + :page-size="pageSize"
209 layout="total, sizes, prev, pager, next, jumper" 209 layout="total, sizes, prev, pager, next, jumper"
210 - :total="400"> 210 + :total="total">
211 </el-pagination> 211 </el-pagination>
212 </div> 212 </div>
213 </el-col> 213 </el-col>
@@ -520,7 +520,9 @@ @@ -520,7 +520,9 @@
520 tableData: [], 520 tableData: [],
521 multipleSelection: [], 521 multipleSelection: [],
522 labelPosition:'left', 522 labelPosition:'left',
523 - currentPage4: 4, 523 + currentPage:1,
  524 + pageSize:10,
  525 + total:0,
524 dialogStatus:'', 526 dialogStatus:'',
525 IouterVisible: false, 527 IouterVisible: false,
526 AouterVisible: false, 528 AouterVisible: false,
@@ -618,25 +620,33 @@ @@ -618,25 +620,33 @@
618 console.log(row); 620 console.log(row);
619 }, 621 },
620 handleSizeChange(val) { 622 handleSizeChange(val) {
621 - console.log(`每页 ${val} 条`); 623 + this.pageSize=val;
  624 + this.Query();
622 }, 625 },
623 handleCurrentChange(val) { 626 handleCurrentChange(val) {
624 - console.log(`当前页: ${val}`); 627 + this.currentPage=val;
  628 + this.query();
625 }, 629 },
626 //条件查询 630 //条件查询
627 Query(){ 631 Query(){
  632 + this.listLoading = true;
628 QueryData(this.defaultQuery).then(res =>{ 633 QueryData(this.defaultQuery).then(res =>{
629 - //console.log(res); 634 + console.log(res);
630 let response=res.data.data; 635 let response=res.data.data;
631 - this.tableData=response; 636 + this.tableData=response.list;
  637 + this.total=response.total;
  638 + this.listLoading = false;
632 }); 639 });
633 }, 640 },
634 getList(){ 641 getList(){
635 this.defaultQuery=this.$route.params; 642 this.defaultQuery=this.$route.params;
  643 + this.listLoading = true;
636 QueryData(this.defaultQuery).then(res =>{ 644 QueryData(this.defaultQuery).then(res =>{
637 //console.log(res); 645 //console.log(res);
638 let response=res.data.data; 646 let response=res.data.data;
639 - this.tableData=response; 647 + this.tableData=response.list;
  648 + this.total=response.total;
  649 + this.listLoading = false;
640 }); 650 });
641 }, 651 },
642 //运抵信息编辑 652 //运抵信息编辑
@@ -26,9 +26,14 @@ @@ -26,9 +26,14 @@
26 </el-col> 26 </el-col>
27 <el-col :span="5"> 27 <el-col :span="5">
28 <el-form-item label="始发站" prop="originstation"> 28 <el-form-item label="始发站" prop="originstation">
29 - <el-select v-model="ruleForm.originstation" filterable 29 + <el-select v-model="ruleForm.originstation"
  30 + filterable
30 allow-create 31 allow-create
31 - default-first-option filterable placeholder="请选择"> 32 + default-first-option
  33 + remote
  34 + :remote-method="remoteMethod"
  35 + :loading="loading"
  36 + placeholder="请选择">
32 <el-option 37 <el-option
33 v-for="item in options" 38 v-for="item in options"
34 :key="item.airportid" 39 :key="item.airportid"
@@ -44,7 +49,10 @@ @@ -44,7 +49,10 @@
44 <el-form-item label="目的站" prop="destinationstation"> 49 <el-form-item label="目的站" prop="destinationstation">
45 <el-select v-model="ruleForm.destinationstation" filterable 50 <el-select v-model="ruleForm.destinationstation" filterable
46 allow-create 51 allow-create
47 - default-first-option filterable placeholder="请选择"> 52 + default-first-option
  53 + remote
  54 + :remote-method="remoteMethod"
  55 + :loading="loading" placeholder="请选择">
48 <el-option 56 <el-option
49 v-for="item in options2" 57 v-for="item in options2"
50 :key="item.airportid" 58 :key="item.airportid"
@@ -92,6 +100,7 @@ @@ -92,6 +100,7 @@
92 options: [], 100 options: [],
93 options2:[], 101 options2:[],
94 airportid:'', 102 airportid:'',
  103 + loading: false,
95 /*表单校验规则*/ 104 /*表单校验规则*/
96 rules: { 105 rules: {
97 flightno: [ 106 flightno: [
@@ -113,11 +122,24 @@ @@ -113,11 +122,24 @@
113 }; 122 };
114 }, 123 },
115 methods:{ 124 methods:{
116 - getFlightList:function() {  
117 - let params={};  
118 - selectAirport(params).then(res=>{ 125 + remoteMethod:function(query) {
  126 + this.options = [];
  127 + this.options2=[];
  128 + let param={airportid:query};
  129 + this.loading = true;
  130 + selectAirport(param).then(res=>{
  131 + if (res !== '') {
  132 + setTimeout(() => {
  133 + this.loading = false;
119 this.options=res.data.data; 134 this.options=res.data.data;
120 this.options2=res.data.data; 135 this.options2=res.data.data;
  136 + }, 200);
  137 + } else {
  138 + this.options = [];
  139 + this.options2=[];
  140 + }
  141 + //this.options=res.data.data;
  142 + //this.options2=res.data.data;
121 }); 143 });
122 }, 144 },
123 /*按钮点击请求方法*/ 145 /*按钮点击请求方法*/
@@ -150,7 +172,7 @@ @@ -150,7 +172,7 @@
150 /*渲染方法*/ 172 /*渲染方法*/
151 mounted(){ 173 mounted(){
152 this.getDefaultData(); 174 this.getDefaultData();
153 - this.getFlightList(); 175 + //this.getFlightList();
154 } 176 }
155 }; 177 };
156 </script> 178 </script>
@@ -31,7 +31,11 @@ @@ -31,7 +31,11 @@
31 <el-form-item label="始发站" prop="originstation"> 31 <el-form-item label="始发站" prop="originstation">
32 <el-select v-model="ruleForm.originstation" filterable 32 <el-select v-model="ruleForm.originstation" filterable
33 allow-create 33 allow-create
34 - default-first-option filterable placeholder="请选择"> 34 + default-first-option
  35 + remote
  36 + :remote-method="remoteMethod"
  37 + :loading="loading"
  38 + placeholder="请选择">
35 <el-option 39 <el-option
36 v-for="item in options" 40 v-for="item in options"
37 :key="item.airportid" 41 :key="item.airportid"
@@ -48,9 +52,14 @@ @@ -48,9 +52,14 @@
48 <el-input placeholder="" v-model="ruleForm.destinationstation" :disabled="true"></el-input> 52 <el-input placeholder="" v-model="ruleForm.destinationstation" :disabled="true"></el-input>
49 </el-form-item>--> 53 </el-form-item>-->
50 <el-form-item label="目的站" prop="destinationstation"> 54 <el-form-item label="目的站" prop="destinationstation">
51 - <el-select v-model="ruleForm.destinationstation" filterable 55 + <el-select v-model="ruleForm.destinationstation"
  56 + filterable
52 allow-create 57 allow-create
53 - default-first-option filterable placeholder="请选择"> 58 + default-first-option
  59 + remote
  60 + :remote-method="remoteMethod"
  61 + :loading="loading"
  62 + placeholder="请选择">
54 <el-option 63 <el-option
55 v-for="item in options" 64 v-for="item in options"
56 :key="item.airportid" 65 :key="item.airportid"
@@ -118,10 +127,20 @@ @@ -118,10 +127,20 @@
118 }; 127 };
119 }, 128 },
120 methods:{ 129 methods:{
121 - getFlightList:function() {  
122 - let params={}; 130 + remoteMethod:function(query) {
  131 + this.options = [];
  132 + let params={airportid:query};
  133 + this.loading = true;
123 selectAirport(params).then(res=>{ 134 selectAirport(params).then(res=>{
  135 + if (res !== '') {
  136 + setTimeout(() => {
  137 + this.loading = false;
124 this.options=res.data.data; 138 this.options=res.data.data;
  139 + this.options2=res.data.data;
  140 + }, 200);
  141 + } else {
  142 + this.options = [];
  143 + }
125 }); 144 });
126 }, 145 },
127 /*按钮点击请求方法*/ 146 /*按钮点击请求方法*/
@@ -361,9 +361,13 @@ @@ -361,9 +361,13 @@
361 </el-col> 361 </el-col>
362 <el-col :span="6"> 362 <el-col :span="6">
363 <el-form-item label="海关关区" prop="customcode"> 363 <el-form-item label="海关关区" prop="customcode">
364 - <el-select v-model="ruleForm.customcode" filterable 364 + <el-select v-model="ruleForm.customcode"
  365 + filterable
365 allow-create 366 allow-create
366 - default-first-option filterable placeholder="请选择" style="display:inline"> 367 + default-first-option
  368 + remote
  369 + :remote-method="remoteMethod2"
  370 + :loading="loading" placeholder="请选择" style="display:inline">
367 <el-option 371 <el-option
368 v-for="item in customcodes" 372 v-for="item in customcodes"
369 :key="item.customcode" 373 :key="item.customcode"
@@ -404,9 +408,13 @@ @@ -404,9 +408,13 @@
404 </el-select> 408 </el-select>
405 </el-form-item>--> 409 </el-form-item>-->
406 <el-form-item label="国家代码" prop="awbinfo.shprcountyr"> 410 <el-form-item label="国家代码" prop="awbinfo.shprcountyr">
407 - <el-select v-model="ruleForm.awbinfo.shprcountyr" filterable 411 + <el-select v-model="ruleForm.awbinfo.shprcountyr"
  412 + filterable
408 allow-create 413 allow-create
409 - default-first-option filterable placeholder="请选择"> 414 + default-first-option
  415 + remote
  416 + :remote-method="remoteMethod"
  417 + :loading="loading" placeholder="请选择">
410 <el-option 418 <el-option
411 v-for="item in shprcountyrs" 419 v-for="item in shprcountyrs"
412 :key="item.countryCode" 420 :key="item.countryCode"
@@ -444,9 +452,13 @@ @@ -444,9 +452,13 @@
444 <el-col :span="6"> 452 <el-col :span="6">
445 453
446 <el-form-item label="国家代码" prop="awbinfo.cnscountyr"> 454 <el-form-item label="国家代码" prop="awbinfo.cnscountyr">
447 - <el-select v-model="ruleForm.awbinfo.cnscountyr" filterable 455 + <el-select v-model="ruleForm.awbinfo.cnscountyr"
  456 + filterable
448 allow-create 457 allow-create
449 - default-first-option filterable placeholder="请选择"> 458 + default-first-option
  459 + remote
  460 + :remote-method="remoteMethod"
  461 + :loading="loading" placeholder="请选择">
450 <el-option 462 <el-option
451 v-for="item in cnscountyrs" 463 v-for="item in cnscountyrs"
452 :key="item.countryCode" 464 :key="item.countryCode"
@@ -763,7 +775,8 @@ @@ -763,7 +775,8 @@
763 { 775 {
764 value: '008', 776 value: '008',
765 label: '惰性物料' 777 label: '惰性物料'
766 - }], 778 + }
  779 + ],
767 customcodes:[], 780 customcodes:[],
768 customcode:'', 781 customcode:'',
769 rules: { 782 rules: {
@@ -938,20 +951,40 @@ @@ -938,20 +951,40 @@
938 }); 951 });
939 }, 952 },
940 /*获取国家代码*/ 953 /*获取国家代码*/
941 - getCountryCode(){  
942 - let params={}; 954 + remoteMethod:function(query){
  955 + this.shprcountyrs=[];
  956 + this.cnscountyrs=[];
  957 + let params={countryCode:query};
  958 + this.loading = true;
943 getCountryCode(params).then(res =>{ 959 getCountryCode(params).then(res =>{
944 - //console.log(res); 960 + if (res !== '') {
  961 + setTimeout(() => {
  962 + this.loading = false;
945 this.shprcountyrs=res.data.data; 963 this.shprcountyrs=res.data.data;
946 this.cnscountyrs=res.data.data; 964 this.cnscountyrs=res.data.data;
  965 + }, 200);
  966 + } else {
  967 + this.shprcountyrs = [];
  968 + this.cnscountyrs=[];
  969 + }
  970 +
947 }); 971 });
948 }, 972 },
949 //获取关区代码 973 //获取关区代码
950 - selectCustomcode(){  
951 - let params={}; 974 + remoteMethod2:function(query){
  975 + this.customcodes=[];
  976 + let params={customcode:query};
  977 + this.loading = true;
952 selectCustomcode(params).then(res =>{ 978 selectCustomcode(params).then(res =>{
953 - //console.log(res); 979 + if (res !== '') {
  980 + setTimeout(() => {
  981 + this.loading = false;
954 this.customcodes=res.data.data; 982 this.customcodes=res.data.data;
  983 + }, 200);
  984 + } else {
  985 + this.customcodes = [];
  986 + }
  987 +
955 }); 988 });
956 }, 989 },
957 //新增原始舱单按钮 990 //新增原始舱单按钮
@@ -105,7 +105,7 @@ @@ -105,7 +105,7 @@
105 <el-button 105 <el-button
106 v-else 106 v-else
107 @click="handleTally(scope.row)" type="text" size="small">进港理货</el-button> 107 @click="handleTally(scope.row)" type="text" size="small">进港理货</el-button>
108 - <el-button @click="handleClick(scope.row)" type="text" size="small">修改状态</el-button> 108 + <el-button @click="handleStuts(scope.row)" type="text" size="small">修改状态</el-button>
109 </template> 109 </template>
110 </el-table-column> 110 </el-table-column>
111 <el-table-column 111 <el-table-column
@@ -268,6 +268,8 @@ @@ -268,6 +268,8 @@
268 this.currentPage=val; 268 this.currentPage=val;
269 this.QueryData(); 269 this.QueryData();
270 }, 270 },
  271 + //修改状态
  272 + handleStuts(){},
271 //条件查询方法 273 //条件查询方法
272 QueryData(){ 274 QueryData(){
273 let params={currentPage:this.currentPage,pageSize:this.pageSize,awba:this.defaultQuery.awba,carrier:this.defaultQuery.carrier, 275 let params={currentPage:this.currentPage,pageSize:this.pageSize,awba:this.defaultQuery.awba,carrier:this.defaultQuery.carrier,