Elements-SY

Merge branch 'et86-black' into uat

...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
80 :rows="4" 80 :rows="4"
81 placeholder="始发站之间用回车符分隔" 81 placeholder="始发站之间用回车符分隔"
82 style="width: 500px" 82 style="width: 500px"
83 + @blur="location({ index, item, $event })"
83 > 84 >
84 </el-input> 85 </el-input>
85 <el-input 86 <el-input
...@@ -90,6 +91,7 @@ ...@@ -90,6 +91,7 @@
90 :rows="4" 91 :rows="4"
91 placeholder="始发站之间用回车符分隔" 92 placeholder="始发站之间用回车符分隔"
92 style="width: 500px" 93 style="width: 500px"
94 + @blur="notLocation({ index, item, $event })"
93 > 95 >
94 </el-input> 96 </el-input>
95 </el-col> 97 </el-col>
...@@ -116,6 +118,7 @@ ...@@ -116,6 +118,7 @@
116 :rows="4" 118 :rows="4"
117 placeholder="目的站之间用回车符分隔" 119 placeholder="目的站之间用回车符分隔"
118 style="width: 500px" 120 style="width: 500px"
121 + @blur="destinationSite({ index, item, $event })"
119 > 122 >
120 </el-input> 123 </el-input>
121 <el-input 124 <el-input
...@@ -126,6 +129,9 @@ ...@@ -126,6 +129,9 @@
126 :rows="4" 129 :rows="4"
127 placeholder="目的站之间用回车符分隔" 130 placeholder="目的站之间用回车符分隔"
128 style="width: 500px" 131 style="width: 500px"
132 + @blur="
133 + notDestinationSite({ index, item, $event })
134 + "
129 > 135 >
130 </el-input> 136 </el-input>
131 </el-col> 137 </el-col>
...@@ -140,6 +146,7 @@ ...@@ -140,6 +146,7 @@
140 v-model="item.includeUrsa" 146 v-model="item.includeUrsa"
141 :rows="4" 147 :rows="4"
142 placeholder="URSA之间用分号分隔,例:F1_;F2_;F3_" 148 placeholder="URSA之间用分号分隔,例:F1_;F2_;F3_"
149 + @blur="includeUrsa({ index, item, $event })"
143 > 150 >
144 </el-input> 151 </el-input>
145 </el-form-item> 152 </el-form-item>
...@@ -152,6 +159,7 @@ ...@@ -152,6 +159,7 @@
152 v-model="item.notIncludeUrsa" 159 v-model="item.notIncludeUrsa"
153 :rows="4" 160 :rows="4"
154 placeholder="URSA之间用分号分隔,例:F1;F2;F3" 161 placeholder="URSA之间用分号分隔,例:F1;F2;F3"
162 + @blur="notIncludeUrsa({ index, item, $event })"
155 > 163 >
156 </el-input> 164 </el-input>
157 </el-form-item> 165 </el-form-item>
...@@ -166,6 +174,7 @@ ...@@ -166,6 +174,7 @@
166 class="numberInput" 174 class="numberInput"
167 v-model.trim="item.minNumOfPieces" 175 v-model.trim="item.minNumOfPieces"
168 placeholder="最少件数" 176 placeholder="最少件数"
177 + @blur="minNumOfPieces({ index, item, $event })"
169 > 178 >
170 </el-input> 179 </el-input>
171 <span 180 <span
...@@ -182,6 +191,7 @@ ...@@ -182,6 +191,7 @@
182 class="numberInput" 191 class="numberInput"
183 v-model.trim="item.maxNumOfPieces" 192 v-model.trim="item.maxNumOfPieces"
184 placeholder="最多件数" 193 placeholder="最多件数"
194 + @blur="maxNumOfPieces({ index, item, $event })"
185 > 195 >
186 </el-input> 196 </el-input>
187 </el-col> 197 </el-col>
...@@ -195,6 +205,7 @@ ...@@ -195,6 +205,7 @@
195 class="numberInput" 205 class="numberInput"
196 v-model.trim="item.minWeight" 206 v-model.trim="item.minWeight"
197 placeholder="最小重量" 207 placeholder="最小重量"
208 + @blur="minWeight({ index, item, $event })"
198 > 209 >
199 </el-input> 210 </el-input>
200 <span 211 <span
...@@ -211,6 +222,7 @@ ...@@ -211,6 +222,7 @@
211 class="numberInput" 222 class="numberInput"
212 v-model.trim="item.maxWeight" 223 v-model.trim="item.maxWeight"
213 placeholder="最大重量" 224 placeholder="最大重量"
225 + @blur="maxWeight({ index, item, $event })"
214 > 226 >
215 </el-input> 227 </el-input>
216 </el-col> 228 </el-col>
...@@ -606,6 +618,46 @@ export default { ...@@ -606,6 +618,46 @@ export default {
606 deleteSubmit(item, index) { 618 deleteSubmit(item, index) {
607 this.$emit("delete", item, index); 619 this.$emit("delete", item, index);
608 }, 620 },
621 + // 包含始发站失焦事件
622 + location(item) {
623 + this.$emit("locationBur", item);
624 + },
625 + // 不包含始发站失焦事件
626 + notLocation(item) {
627 + this.$emit("notLocationBur", item);
628 + },
629 + // 包含目的站失焦事件
630 + destinationSite(item) {
631 + this.$emit("destinationSiteBur", item);
632 + },
633 + // 不包含目的站失焦事件
634 + notDestinationSite(item) {
635 + this.$emit("notDestinationSiteBur", item);
636 + },
637 + // URSA包含失焦事件
638 + includeUrsa(item) {
639 + this.$emit("includeUrsaBur", item);
640 + },
641 + // URSA不包含失焦事件
642 + notIncludeUrsa(item) {
643 + this.$emit("notIncludeUrsaBur", item);
644 + },
645 + // 最少件数失焦事件
646 + minNumOfPieces(item) {
647 + this.$emit("minNumOfPiecesBur", item);
648 + },
649 + // 最多件数失焦事件
650 + maxNumOfPieces(item) {
651 + this.$emit("maxNumOfPiecesBur", item);
652 + },
653 + // 最小重量失焦事件
654 + minWeight(item) {
655 + this.$emit("minWeightBur", item);
656 + },
657 + // 最大重量失焦事件
658 + maxWeight(item) {
659 + this.$emit("maxWeightBur", item);
660 + },
609 }, 661 },
610 }; 662 };
611 </script> 663 </script>
......
...@@ -36,12 +36,20 @@ ...@@ -36,12 +36,20 @@
36 :subCategory="subCategory" 36 :subCategory="subCategory"
37 :status="getRouter" 37 :status="getRouter"
38 :loading="loading" 38 :loading="loading"
39 - @location="changeLocation"
40 - @destinationSite="changeDestinationSite"
41 @addRlue="addRlue" 39 @addRlue="addRlue"
42 @save="saveSubmit" 40 @save="saveSubmit"
43 @onOff="onOffSubmit" 41 @onOff="onOffSubmit"
44 @delete="deleteSubmit" 42 @delete="deleteSubmit"
43 + @locationBur="locationBur"
44 + @notLocationBur="notLocationBur"
45 + @destinationSiteBur="destinationSiteBur"
46 + @notDestinationSiteBur="notDestinationSiteBur"
47 + @includeUrsaBur="includeUrsaBur"
48 + @notIncludeUrsaBur="notIncludeUrsaBur"
49 + @minNumOfPiecesBur="minNumOfPiecesBur"
50 + @maxNumOfPiecesBur="maxNumOfPiecesBur"
51 + @minWeightBur="minWeightBur"
52 + @maxWeightBur="maxWeightBur"
45 > 53 >
46 </route-info> 54 </route-info>
47 </el-col> 55 </el-col>
......
...@@ -766,13 +766,79 @@ export default { ...@@ -766,13 +766,79 @@ export default {
766 blurEvent({ originOfFlightNo }) { 766 blurEvent({ originOfFlightNo }) {
767 this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo); 767 this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo);
768 }, 768 },
769 - // 始发站 769 +
770 - changeLocation(val) { 770 + validateLocation({ isLocation, location, notLocation }) {
771 - // console.log("始发站:", val); 771 + let locationVal,
772 + notLocationVal,
773 + repeat,
774 + validateLocation,
775 + validateNotlocation;
776 + if (isLocation == "1") {
777 + // 分隔字符串并且转数组&去除数组空字符串
778 + locationVal = location.split(";").filter((str) => str !== "");
779 + // 是否有重复的
780 + repeat = new Set(locationVal).size !== locationVal.length;
781 + // 校验校验开头以字母或者数字开头的/^[a-zA-Z0-9]*$/
782 + validateLocation = locationVal.every((item) =>
783 + /^[a-zA-Z0-9]*$/.test(item)
784 + );
785 + } else {
786 + notLocationVal = notLocation.split(";").filter((str) => str !== "");
787 + repeat = new Set(notLocationVal).size !== notLocationVal.length;
788 + validateNotlocation = locationVal.every((item) =>
789 + /^[a-zA-Z0-9]*$/.test(item)
790 + );
791 + }
772 }, 792 },
773 - // 目的站 793 +
774 - changeDestinationSite(val) { 794 + // 包含始发站失焦事件
775 - // console.log("目的站:", val); 795 + locationBur({ index, item }) {
796 + /*
797 + 对于单选框这种,不论是勾选哪一个两则都使用一个布尔值;
798 + // 校验:只能字母和数组组合,不能有重复的,包含中不能有包含的
799 + */
800 + // console.log(this.routesInfo);
801 + // console.log("locationBur", index, item);
802 + // 不为空的时候做校验
803 + // if (item.location || item.notLocation) {
804 + // this.validateLocation(item);
805 + // }
806 + },
807 + // 不包含始发站失焦事件
808 + notLocationBur({ index, item }) {
809 + // console.log("notLocationBur", index, item);
810 + },
811 + // 包含目的站失焦事件
812 + destinationSiteBur({ index, item }) {
813 + // console.log("destinationSiteBur", index, item);
814 + },
815 + // 不包含目的站失焦事件
816 + notDestinationSiteBur({ index, item }) {
817 + // console.log("notDestinationSiteBur", index, item);
818 + },
819 + // URSA包含失焦事件
820 + includeUrsaBur({ index, item }) {
821 + // console.log("includeUrsaBur", index, item);
822 + },
823 + // URSA不包含失焦事件
824 + notIncludeUrsaBur({ index, item }) {
825 + // console.log("notIncludeUrsaBur", index, item);
826 + },
827 + // 最少件数失焦事件
828 + minNumOfPiecesBur({ index, item }) {
829 + // console.log("minNumOfPiecesBur", index, item);
830 + },
831 + // 最多件数失焦事件
832 + maxNumOfPiecesBur({ index, item }) {
833 + // console.log("maxNumOfPiecesBur", index, item);
834 + },
835 + // 最小重量失焦事件
836 + minWeightBur({ index, item }) {
837 + // console.log("minWeightBur", index, item);
838 + },
839 + // 最大重量失焦事件
840 + maxWeightBur({ index, item }) {
841 + // console.log("maxWeightBur", index, item);
776 }, 842 },
777 }, 843 },
778 }; 844 };
......
...@@ -462,7 +462,7 @@ export default { ...@@ -462,7 +462,7 @@ export default {
462 maxWeight: "", 462 maxWeight: "",
463 minNumOfPieces: "", // 最小件数 463 minNumOfPieces: "", // 最小件数
464 maxNumOfPieces: "", 464 maxNumOfPieces: "",
465 - currencyCd: "CNY", // 人民币种 465 + currencyCd: "RMB", // 人民币种
466 currencyCdUsd: "SUD", // 美元币种 466 currencyCdUsd: "SUD", // 美元币种
467 minCustomVal: "", // 人民币最小申报值 467 minCustomVal: "", // 人民币最小申报值
468 maxCustomVal: "", // 人民币最大申报值 468 maxCustomVal: "", // 人民币最大申报值
...@@ -511,7 +511,7 @@ export default { ...@@ -511,7 +511,7 @@ export default {
511 { 511 {
512 id: this.id, 512 id: this.id,
513 flightNo: "", // 航班号 513 flightNo: "", // 航班号
514 - calculateDay: "", // 航班日期//+1 -1 514 + calculateDay: "", // 航班日期 +1 -1
515 flightRoute: "", // 航线 515 flightRoute: "", // 航线
516 routeList: [], // 航线列表 516 routeList: [], // 航线列表
517 permitOverweight: "N" ? false : true, // 爆仓是否继续配舱 Y-是,N-否 517 permitOverweight: "N" ? false : true, // 爆仓是否继续配舱 Y-是,N-否
...@@ -521,6 +521,7 @@ export default { ...@@ -521,6 +521,7 @@ export default {
521 ]; 521 ];
522 } 522 }
523 }, 523 },
524 + mounted() {},
524 methods: { 525 methods: {
525 // ET86新增 526 // ET86新增
526 postAdd(params) { 527 postAdd(params) {
...@@ -562,7 +563,7 @@ export default { ...@@ -562,7 +563,7 @@ export default {
562 this.tableData = data.list.flightRankDtoList; 563 this.tableData = data.list.flightRankDtoList;
563 Object.keys(data.list.fltRuleDto).map((key) => { 564 Object.keys(data.list.fltRuleDto).map((key) => {
564 if (key == "multiHs") { 565 if (key == "multiHs") {
565 - // N为单品名,Y为多品名 566 + // Y为单品名,N为多品名
566 if (data.list.fltRuleDto[key] == "Y") { 567 if (data.list.fltRuleDto[key] == "Y") {
567 data.list.fltRuleDto[key] = true; 568 data.list.fltRuleDto[key] = true;
568 } else { 569 } else {
...@@ -622,7 +623,7 @@ export default { ...@@ -622,7 +623,7 @@ export default {
622 } 623 }
623 this.cargoType = res.data.cargoType; // 申报类别 624 this.cargoType = res.data.cargoType; // 申报类别
624 if (res.data.serviceCode.length) { 625 if (res.data.serviceCode.length) {
625 - this.getObj(res.data); 626 + this.getObj(res.data); // 获取serviceCode字典
626 } 627 }
627 }) 628 })
628 .catch(() => {}); 629 .catch(() => {});
...@@ -657,7 +658,7 @@ export default { ...@@ -657,7 +658,7 @@ export default {
657 }, 658 },
658 // 航班号input 聚焦事件 659 // 航班号input 聚焦事件
659 inputFlightNoFocus({ $index, row }) { 660 inputFlightNoFocus({ $index, row }) {
660 - this.currentFlightNo = row.flightNo.trim(); 661 + this.currentFlightNo = row.flightNo.trim(); // 当前航班号
661 this.currentIndex = $index; 662 this.currentIndex = $index;
662 }, 663 },
663 // 失焦查询 664 // 失焦查询
...@@ -692,7 +693,7 @@ export default { ...@@ -692,7 +693,7 @@ export default {
692 this.getQueryRouteByFltNo(params); // 航线查询 693 this.getQueryRouteByFltNo(params); // 航线查询
693 } 694 }
694 // 航班号为空时 695 // 航班号为空时
695 - if(params.fltNo.length == 0) { 696 + if (params.fltNo.length == 0) {
696 this.tableData[this.currentIndex].flightRoute = ""; 697 this.tableData[this.currentIndex].flightRoute = "";
697 this.tableData[this.currentIndex].routeList = []; 698 this.tableData[this.currentIndex].routeList = [];
698 this.msgError("请输入航班号"); 699 this.msgError("请输入航班号");
...@@ -811,7 +812,7 @@ export default { ...@@ -811,7 +812,7 @@ export default {
811 this.msgError("ET86配舱航班顺位中存在重复设置"); 812 this.msgError("ET86配舱航班顺位中存在重复设置");
812 return; 813 return;
813 } 814 }
814 - queryParmas.fltRuleDto.multiHs = this.queryForm.multiHs ? "Y" : "N"; // N为单品名,Y为多品名 815 + queryParmas.fltRuleDto.multiHs = this.queryForm.multiHs ? "Y" : "N"; // Y为单品名,N为多品名
815 if (this.validateForm && this.$route.query.name == "add") { 816 if (this.validateForm && this.$route.query.name == "add") {
816 this.postAdd(queryParmas); // 新增 817 this.postAdd(queryParmas); // 新增
817 } else { 818 } else {
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
50 target.dispatchEvent(new Event("input")); 50 target.dispatchEvent(new Event("input"));
51 } 51 }
52 }, 800), 52 }, 800),
53 - // 获取字典 53 + // 获取serviceCode字典
54 getObj({ serviceCode }) { 54 getObj({ serviceCode }) {
55 let service_Code = []; 55 let service_Code = [];
56 serviceCode.map((item) => { 56 serviceCode.map((item) => {
......