作者 shenhailong

修改预配新增页面海关关区为 输入框

合并全部出港业务新增编辑  承运人 航班号问题
@@ -197,12 +197,12 @@ @@ -197,12 +197,12 @@
197 <span>航班信息</span> 197 <span>航班信息</span>
198 </div> 198 </div>
199 <el-row> 199 <el-row>
200 - <el-col :span="7.5">  
201 - <el-form-item label="承运人" prop="carrier">  
202 - <el-input v-model="carrier"  
203 - :disabled="fenStatus === 'addAwbh'"></el-input>  
204 - </el-form-item>  
205 - </el-col> 200 +<!-- <el-col :span="7.5">-->
  201 +<!-- <el-form-item label="承运人" prop="carrier">-->
  202 +<!-- <el-input v-model="carrier"-->
  203 +<!-- :disabled="fenStatus === 'addAwbh'"></el-input>-->
  204 +<!-- </el-form-item>-->
  205 +<!-- </el-col>-->
206 <el-col :span="7.5"> 206 <el-col :span="7.5">
207 <el-form-item label="航班号" prop="flightno"> 207 <el-form-item label="航班号" prop="flightno">
208 <el-input v-model="flightno" 208 <el-input v-model="flightno"
@@ -467,6 +467,7 @@ @@ -467,6 +467,7 @@
467 piece: [{required: true, trigger: 'change', validator: validatorNums}], 467 piece: [{required: true, trigger: 'change', validator: validatorNums}],
468 arrivetime: [{required: true, trigger: 'blur', message:'请选择运抵时间'}], 468 arrivetime: [{required: true, trigger: 'blur', message:'请选择运抵时间'}],
469 customcode: [{required: true, trigger: 'blur', message:'海关关区不能为空'}], 469 customcode: [{required: true, trigger: 'blur', message:'海关关区不能为空'}],
  470 + flightdate: [{required: true, trigger: 'blur', message:'请选择航班日期'}],
470 }, 471 },
471 arriveData: [], 472 arriveData: [],
472 detailData: [], 473 detailData: [],
@@ -654,9 +655,11 @@ @@ -654,9 +655,11 @@
654 handelAddArriveInfo() { 655 handelAddArriveInfo() {
655 this.restModel() 656 this.restModel()
656 // 给model赋值,所使用数据是以单独单号查询数据所得 657 // 给model赋值,所使用数据是以单独单号查询数据所得
657 - this.arriveModel.carrier = this.arriveQuery.carrier 658 + // this.arriveModel.carrier = this.arriveQuery.carrier
658 this.arriveModel.flightdate = this.arriveQuery.flightdate 659 this.arriveModel.flightdate = this.arriveQuery.flightdate
659 - this.arriveModel.flightno = this.arriveQuery.flightno 660 + if (this.arriveQuery.carrier!=undefined){
  661 + this.arriveModel.flightno = this.arriveQuery.carrier+this.arriveQuery.flightno
  662 + }
660 this.arriveModel.originstation = this.arriveQuery.originstation 663 this.arriveModel.originstation = this.arriveQuery.originstation
661 this.arriveModel.destinationstation = this.arriveQuery.destinationstation 664 this.arriveModel.destinationstation = this.arriveQuery.destinationstation
662 this.arriveModel.customcode = this.arriveQuery.customcode 665 this.arriveModel.customcode = this.arriveQuery.customcode
@@ -671,10 +674,10 @@ @@ -671,10 +674,10 @@
671 handleAddAwbh(row){ 674 handleAddAwbh(row){
672 this.restModel() 675 this.restModel()
673 // 给model赋值,所使用数据是以单独单号查询数据所得 676 // 给model赋值,所使用数据是以单独单号查询数据所得
674 - this.arriveModel.carrier = row.carrier 677 + // this.arriveModel.carrier = row.carrier
675 this.arriveModel.awba = row.awba 678 this.arriveModel.awba = row.awba
676 this.arriveModel.flightdate = row.flightdate 679 this.arriveModel.flightdate = row.flightdate
677 - this.arriveModel.flightno = row.flightno 680 + this.arriveModel.flightno =row.carrier+ row.flightno
678 this.arriveModel.originstation = row.originstation 681 this.arriveModel.originstation = row.originstation
679 this.arriveModel.destinationstation = row.destinationstation 682 this.arriveModel.destinationstation = row.destinationstation
680 this.arriveModel.customcode = row.customcode 683 this.arriveModel.customcode = row.customcode
@@ -691,6 +694,8 @@ @@ -691,6 +694,8 @@
691 createData() { 694 createData() {
692 this.$refs.arriveFormData.validate(valid => { 695 this.$refs.arriveFormData.validate(valid => {
693 if (valid) { 696 if (valid) {
  697 + this.arriveModel.carrier = this.arriveModel.flightno.substring(0,2);
  698 + this.arriveModel.flightno = this.arriveModel.flightno.substring(2);
694 addMt3201(this.arriveModel).then(res => { 699 addMt3201(this.arriveModel).then(res => {
695 if (res.data.code == "200") { 700 if (res.data.code == "200") {
696 this.dialogFormVisible = false 701 this.dialogFormVisible = false
@@ -732,6 +737,7 @@ @@ -732,6 +737,7 @@
732 // 编辑 737 // 编辑
733 handleEdit(row) { 738 handleEdit(row) {
734 this.arriveModel = Object.assign({}, row) // copy obj 739 this.arriveModel = Object.assign({}, row) // copy obj
  740 + this.arriveModel.flightno = row.carrier+row.flightno
735 if (row.awbh === ''){ 741 if (row.awbh === ''){
736 this.fenStatus = undefined 742 this.fenStatus = undefined
737 }else { 743 }else {
@@ -751,6 +757,8 @@ @@ -751,6 +757,8 @@
751 username : loginedUserInfo().username 757 username : loginedUserInfo().username
752 } 758 }
753 if (valid) { 759 if (valid) {
  760 + this.arriveModel.carrier = this.arriveModel.flightno.substring(0,2);
  761 + this.arriveModel.flightno = this.arriveModel.flightno.substring(2);
754 updateMT3201(this.arriveModel).then(res => { 762 updateMT3201(this.arriveModel).then(res => {
755 if (res.data.code == "200") { 763 if (res.data.code == "200") {
756 this.dialogFormVisible = false 764 this.dialogFormVisible = false
@@ -177,11 +177,11 @@ @@ -177,11 +177,11 @@
177 <el-input v-model="loadingModel.awba" :disabled="dialogStatus ==='update'"></el-input> 177 <el-input v-model="loadingModel.awba" :disabled="dialogStatus ==='update'"></el-input>
178 </el-form-item> 178 </el-form-item>
179 </el-col> 179 </el-col>
180 - <el-col :span="7.5">  
181 - <el-form-item label="承运人" prop="carrier">  
182 - <el-input v-model="carrier" :disabled="dialogStatus ==='update'"></el-input>  
183 - </el-form-item>  
184 - </el-col> 180 +<!-- <el-col :span="7.5">-->
  181 +<!-- <el-form-item label="承运人" prop="carrier">-->
  182 +<!-- <el-input v-model="carrier" :disabled="dialogStatus ==='update'"></el-input>-->
  183 +<!-- </el-form-item>-->
  184 +<!-- </el-col>-->
185 <el-col :span="7.5"> 185 <el-col :span="7.5">
186 <el-form-item label="航班号" prop="flightno"> 186 <el-form-item label="航班号" prop="flightno">
187 <el-input v-model="flightno" :disabled="dialogStatus ==='update'"></el-input> 187 <el-input v-model="flightno" :disabled="dialogStatus ==='update'"></el-input>
@@ -478,8 +478,8 @@ @@ -478,8 +478,8 @@
478 goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}], 478 goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
479 carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}], 479 carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
480 flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}], 480 flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
481 - flightdate: [{required: true, trigger: 'blur'}],  
482 - loadingtime: [{required: true, trigger: 'blur'}], 481 + flightdate: [{required: true, trigger: 'blur', message:'请选择航班时间'}],
  482 + loadingtime: [{required: true, trigger: 'blur', message:'请选择装载时间'}],
483 originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}], 483 originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
484 destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}], 484 destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
485 lodingpiece: [{type: 'number',required: true, trigger: 'change', message: '只能输入数字'}], 485 lodingpiece: [{type: 'number',required: true, trigger: 'change', message: '只能输入数字'}],
@@ -545,7 +545,7 @@ @@ -545,7 +545,7 @@
545 }, 545 },
546 } 546 }
547 }, 547 },
548 - created() { 548 + activated() {
549 if (this.$route.params.flightData !== undefined) { 549 if (this.$route.params.flightData !== undefined) {
550 // 给查询条件赋值 550 // 给查询条件赋值
551 if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') { 551 if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
@@ -683,6 +683,7 @@ @@ -683,6 +683,7 @@
683 // 编辑 弹框 683 // 编辑 弹框
684 handleEdit(row) { 684 handleEdit(row) {
685 this.loadingModel = Object.assign({}, row) 685 this.loadingModel = Object.assign({}, row)
  686 + this.loadingModel.flightno = row.carrier+row.flightno
686 this.dialogStatus = 'update' 687 this.dialogStatus = 'update'
687 this.dialogFormVisible = true 688 this.dialogFormVisible = true
688 this.$nextTick(() => { 689 this.$nextTick(() => {
@@ -697,6 +698,8 @@ @@ -697,6 +698,8 @@
697 _this.loadingModel.user= { 698 _this.loadingModel.user= {
698 username : loginedUserInfo().username 699 username : loginedUserInfo().username
699 } 700 }
  701 + this.loadingModel.carrier = this.loadingModel.flightno.substring(0,2);
  702 + this.loadingModel.flightno = this.loadingModel.flightno.substring(2);
700 updateMT4201(this.loadingModel).then(res => { 703 updateMT4201(this.loadingModel).then(res => {
701 if (res.data.count > 0) { 704 if (res.data.count > 0) {
702 this.dialogFormVisible = false 705 this.dialogFormVisible = false
@@ -898,9 +901,11 @@ @@ -898,9 +901,11 @@
898 handelAddLoadingInfo() { 901 handelAddLoadingInfo() {
899 this.restModel() 902 this.restModel()
900 // 给model赋值,所使用数据是以单独单号查询数据所得 903 // 给model赋值,所使用数据是以单独单号查询数据所得
901 - this.loadingModel.carrier = this.loadingQuery.carrier 904 + // this.loadingModel.carrier = this.loadingQuery.carrier
902 this.loadingModel.flightdate = this.loadingQuery.flightdate 905 this.loadingModel.flightdate = this.loadingQuery.flightdate
903 - this.loadingModel.flightno = this.loadingQuery.flightno 906 + if ( this.loadingQuery.carrier != undefined){
  907 + this.loadingModel.flightno = this.loadingQuery.carrier + this.loadingQuery.flightno
  908 + }
904 this.loadingModel.originstation = this.loadingQuery.originstation 909 this.loadingModel.originstation = this.loadingQuery.originstation
905 this.loadingModel.destinationstation = this.loadingQuery.destinationstation 910 this.loadingModel.destinationstation = this.loadingQuery.destinationstation
906 this.loadingModel.customcode = this.loadingQuery.customcode 911 this.loadingModel.customcode = this.loadingQuery.customcode
@@ -915,6 +920,8 @@ @@ -915,6 +920,8 @@
915 createData() { 920 createData() {
916 this.$refs.loadingFormData.validate(valid => { 921 this.$refs.loadingFormData.validate(valid => {
917 if (valid) { 922 if (valid) {
  923 + this.loadingModel.carrier = this.loadingModel.flightno.substring(0,2);
  924 + this.loadingModel.flightno = this.loadingModel.flightno.substring(2);
918 addMt4201(this.loadingModel).then(res => { 925 addMt4201(this.loadingModel).then(res => {
919 if (res.data.count > 0) { 926 if (res.data.count > 0) {
920 this.dialogFormVisible = false 927 this.dialogFormVisible = false
@@ -575,10 +575,20 @@ @@ -575,10 +575,20 @@
575 </el-col> 575 </el-col>
576 <el-col :span="6"> 576 <el-col :span="6">
577 <el-form-item label="所属关区" prop="customcode"> 577 <el-form-item label="所属关区" prop="customcode">
578 - <el-select v-model="preModel.customcode" clearable class="filter-item" style="width: 140px" placeholder="请选择所属关区">  
579 - <el-option v-for="item in custom" :key="item.value"  
580 - :label="item.label"  
581 - :value="item.value"> 578 +<!-- <el-select v-model="preModel.customcode" clearable class="filter-item" style="width: 140px" placeholder="请选择所属关区">-->
  579 +<!-- <el-option v-for="item in custom" :key="item.value"-->
  580 +<!-- :label="item.label"-->
  581 +<!-- :value="item.value">-->
  582 +<!-- </el-option>-->
  583 +<!-- </el-select>-->
  584 + <el-select v-model="preModel.customcode" class="filter-item" placeholder="请输入关区代码"
  585 + filterable clearable remote :remote-method="remoteMethodCustomCode" :loading="customLoading"
  586 + allow-create
  587 + default-first-option>
  588 + <el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode"
  589 + :value="item.customcode">
  590 + <span style="float: left">{{ item.customcode }}</span>
  591 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
582 </el-option> 592 </el-option>
583 </el-select> 593 </el-select>
584 </el-form-item> 594 </el-form-item>
@@ -182,11 +182,11 @@ @@ -182,11 +182,11 @@
182 </el-col> 182 </el-col>
183 </el-row> 183 </el-row>
184 <el-row> 184 <el-row>
185 - <el-col :span="7.5">  
186 - <el-form-item label="承运人" prop="carrier">  
187 - <el-input v-model="carrier" :disabled="dialogStatus === 'update'"></el-input>  
188 - </el-form-item>  
189 - </el-col> 185 +<!-- <el-col :span="7.5">-->
  186 +<!-- <el-form-item label="承运人" prop="carrier">-->
  187 +<!-- <el-input v-model="carrier" :disabled="dialogStatus === 'update'"></el-input>-->
  188 +<!-- </el-form-item>-->
  189 +<!-- </el-col>-->
190 <el-col :span="7.5"> 190 <el-col :span="7.5">
191 <el-form-item label="航班号" prop="flightno"> 191 <el-form-item label="航班号" prop="flightno">
192 <el-input v-model="flightno" :disabled="dialogStatus === 'update'"></el-input> 192 <el-input v-model="flightno" :disabled="dialogStatus === 'update'"></el-input>
@@ -256,12 +256,12 @@ @@ -256,12 +256,12 @@
256 </el-row> 256 </el-row>
257 <el-row> 257 <el-row>
258 <el-col :span="7.5"> 258 <el-col :span="7.5">
259 - <el-form-item label="装载件数" prop="piece"> 259 + <el-form-item label="理货件数" prop="piece">
260 <el-input v-model="tidyModel.piece"></el-input> 260 <el-input v-model="tidyModel.piece"></el-input>
261 </el-form-item> 261 </el-form-item>
262 </el-col> 262 </el-col>
263 <el-col :span="7.5"> 263 <el-col :span="7.5">
264 - <el-form-item label="装载重量" prop="weight"> 264 + <el-form-item label="理货重量" prop="weight">
265 <el-input v-model="tidyModel.weight"></el-input> 265 <el-input v-model="tidyModel.weight"></el-input>
266 </el-form-item> 266 </el-form-item>
267 </el-col> 267 </el-col>
@@ -450,6 +450,7 @@ @@ -450,6 +450,7 @@
450 goodsname: [{required: true, message: "货物描述不能为空"},{ trigger: 'blur', validator: validAlphabetsSpanceKey}], 450 goodsname: [{required: true, message: "货物描述不能为空"},{ trigger: 'blur', validator: validAlphabetsSpanceKey}],
451 carrier: [{required: true, message:"承运人不能为空"},{trigger: 'blur', validator: validatorAwbh}], 451 carrier: [{required: true, message:"承运人不能为空"},{trigger: 'blur', validator: validatorAwbh}],
452 flightno: [{required: true, message:"航班号不能为空"}, { trigger: 'blur', validator: validatorAwbh}], 452 flightno: [{required: true, message:"航班号不能为空"}, { trigger: 'blur', validator: validatorAwbh}],
  453 + flightdate: [{required: true, trigger:'blur', message:"请选择航班日期"}],
453 originstation: [{required: true, message:"起始站不能为空"}, {trigger: 'blur', validator: validatorAlphabets}], 454 originstation: [{required: true, message:"起始站不能为空"}, {trigger: 'blur', validator: validatorAlphabets}],
454 destinationstation: [{required: true, message:"目的站不能为空"}, { trigger: 'blur', validator: validatorAlphabets}], 455 destinationstation: [{required: true, message:"目的站不能为空"}, { trigger: 'blur', validator: validatorAlphabets}],
455 weight: [{required: true, message:"重量不能为空"}, { trigger: 'change', validator: validatorNums}], 456 weight: [{required: true, message:"重量不能为空"}, { trigger: 'change', validator: validatorNums}],
@@ -724,10 +725,9 @@ @@ -724,10 +725,9 @@
724 // 清空from列表 725 // 清空from列表
725 this.restModel(); 726 this.restModel();
726 727
727 - this.tidyModel.carrier = row.carrier  
728 this.tidyModel.awba = row.awba 728 this.tidyModel.awba = row.awba
729 this.tidyModel.flightdate = row.flightdate 729 this.tidyModel.flightdate = row.flightdate
730 - this.tidyModel.flightno = row.flightno 730 + this.tidyModel.flightno = row.carrier + row.flightno
731 this.tidyModel.originstation = row.originstation 731 this.tidyModel.originstation = row.originstation
732 this.tidyModel.destinationstation = row.destinationstation 732 this.tidyModel.destinationstation = row.destinationstation
733 this.tidyModel.customcode = row.customcode 733 this.tidyModel.customcode = row.customcode
@@ -886,9 +886,10 @@ @@ -886,9 +886,10 @@
886 this.fenStatus=undefined; 886 this.fenStatus=undefined;
887 this.restModel() 887 this.restModel()
888 // 给model赋值,所使用数据是以单独单号查询数据所得 888 // 给model赋值,所使用数据是以单独单号查询数据所得
889 - this.tidyModel.carrier = this.tidyQuery.carrier  
890 this.tidyModel.flightdate = this.tidyQuery.flightdate 889 this.tidyModel.flightdate = this.tidyQuery.flightdate
891 - this.tidyModel.flightno = this.tidyQuery.flightno 890 + if (this.tidyQuery.carrier != undefined){
  891 + this.tidyModel.flightno = this.tidyQuery.carrier+this.tidyQuery.flightno
  892 + }
892 this.tidyModel.originstation = this.tidyQuery.originstation 893 this.tidyModel.originstation = this.tidyQuery.originstation
893 this.tidyModel.destinationstation = this.tidyQuery.destinationstation 894 this.tidyModel.destinationstation = this.tidyQuery.destinationstation
894 this.tidyModel.customcode = this.tidyQuery.customcode 895 this.tidyModel.customcode = this.tidyQuery.customcode
@@ -902,6 +903,8 @@ @@ -902,6 +903,8 @@
902 createData() { 903 createData() {
903 this.$refs.tidyFormData.validate(valid => { 904 this.$refs.tidyFormData.validate(valid => {
904 if (valid) { 905 if (valid) {
  906 + this.tidyModel.carrier = this.tidyModel.flightno.substring(0,2);
  907 + this.tidyModel.flightno = this.tidyModel.flightno.substring(2);
905 addMt520X(this.tidyModel).then(res => { 908 addMt520X(this.tidyModel).then(res => {
906 if (res.data.code == "200") { 909 if (res.data.code == "200") {
907 Message.success(res.data.msg); 910 Message.success(res.data.msg);
@@ -922,6 +925,7 @@ @@ -922,6 +925,7 @@
922 this.fenStatus=undefined 925 this.fenStatus=undefined
923 } 926 }
924 this.tidyModel = Object.assign({}, row) 927 this.tidyModel = Object.assign({}, row)
  928 + this.tidyModel.flightno = row.carrier+row.flightno
925 this.dialogStatus = 'update' 929 this.dialogStatus = 'update'
926 this.dialogFormVisible = true 930 this.dialogFormVisible = true
927 this.$nextTick(() => { 931 this.$nextTick(() => {
@@ -942,7 +946,8 @@ @@ -942,7 +946,8 @@
942 this.tidyModel.userinfo = { 946 this.tidyModel.userinfo = {
943 username : loginedUserInfo().username 947 username : loginedUserInfo().username
944 } 948 }
945 - 949 + this.tidyModel.carrier = this.tidyModel.flightno.substring(0,2);
  950 + this.tidyModel.flightno = this.tidyModel.flightno.substring(2);
946 updateMt520X(this.tidyModel).then(res => { 951 updateMt520X(this.tidyModel).then(res => {
947 console.log(res.data) 952 console.log(res.data)
948 if (res.data.count > 0) { 953 if (res.data.count > 0) {