Elements-SY

Merge branch 'et86-black' into uat

......@@ -80,6 +80,7 @@
:rows="4"
placeholder="始发站之间用回车符分隔"
style="width: 500px"
@blur="location({ index, item, $event })"
>
</el-input>
<el-input
......@@ -90,6 +91,7 @@
:rows="4"
placeholder="始发站之间用回车符分隔"
style="width: 500px"
@blur="notLocation({ index, item, $event })"
>
</el-input>
</el-col>
......@@ -116,6 +118,7 @@
:rows="4"
placeholder="目的站之间用回车符分隔"
style="width: 500px"
@blur="destinationSite({ index, item, $event })"
>
</el-input>
<el-input
......@@ -126,6 +129,9 @@
:rows="4"
placeholder="目的站之间用回车符分隔"
style="width: 500px"
@blur="
notDestinationSite({ index, item, $event })
"
>
</el-input>
</el-col>
......@@ -140,6 +146,7 @@
v-model="item.includeUrsa"
:rows="4"
placeholder="URSA之间用分号分隔,例:F1_;F2_;F3_"
@blur="includeUrsa({ index, item, $event })"
>
</el-input>
</el-form-item>
......@@ -152,6 +159,7 @@
v-model="item.notIncludeUrsa"
:rows="4"
placeholder="URSA之间用分号分隔,例:F1;F2;F3"
@blur="notIncludeUrsa({ index, item, $event })"
>
</el-input>
</el-form-item>
......@@ -166,6 +174,7 @@
class="numberInput"
v-model.trim="item.minNumOfPieces"
placeholder="最少件数"
@blur="minNumOfPieces({ index, item, $event })"
>
</el-input>
<span
......@@ -182,6 +191,7 @@
class="numberInput"
v-model.trim="item.maxNumOfPieces"
placeholder="最多件数"
@blur="maxNumOfPieces({ index, item, $event })"
>
</el-input>
</el-col>
......@@ -195,6 +205,7 @@
class="numberInput"
v-model.trim="item.minWeight"
placeholder="最小重量"
@blur="minWeight({ index, item, $event })"
>
</el-input>
<span
......@@ -211,6 +222,7 @@
class="numberInput"
v-model.trim="item.maxWeight"
placeholder="最大重量"
@blur="maxWeight({ index, item, $event })"
>
</el-input>
</el-col>
......@@ -606,6 +618,46 @@ export default {
deleteSubmit(item, index) {
this.$emit("delete", item, index);
},
// 包含始发站失焦事件
location(item) {
this.$emit("locationBur", item);
},
// 不包含始发站失焦事件
notLocation(item) {
this.$emit("notLocationBur", item);
},
// 包含目的站失焦事件
destinationSite(item) {
this.$emit("destinationSiteBur", item);
},
// 不包含目的站失焦事件
notDestinationSite(item) {
this.$emit("notDestinationSiteBur", item);
},
// URSA包含失焦事件
includeUrsa(item) {
this.$emit("includeUrsaBur", item);
},
// URSA不包含失焦事件
notIncludeUrsa(item) {
this.$emit("notIncludeUrsaBur", item);
},
// 最少件数失焦事件
minNumOfPieces(item) {
this.$emit("minNumOfPiecesBur", item);
},
// 最多件数失焦事件
maxNumOfPieces(item) {
this.$emit("maxNumOfPiecesBur", item);
},
// 最小重量失焦事件
minWeight(item) {
this.$emit("minWeightBur", item);
},
// 最大重量失焦事件
maxWeight(item) {
this.$emit("maxWeightBur", item);
},
},
};
</script>
......
......@@ -36,12 +36,20 @@
:subCategory="subCategory"
:status="getRouter"
:loading="loading"
@location="changeLocation"
@destinationSite="changeDestinationSite"
@addRlue="addRlue"
@save="saveSubmit"
@onOff="onOffSubmit"
@delete="deleteSubmit"
@locationBur="locationBur"
@notLocationBur="notLocationBur"
@destinationSiteBur="destinationSiteBur"
@notDestinationSiteBur="notDestinationSiteBur"
@includeUrsaBur="includeUrsaBur"
@notIncludeUrsaBur="notIncludeUrsaBur"
@minNumOfPiecesBur="minNumOfPiecesBur"
@maxNumOfPiecesBur="maxNumOfPiecesBur"
@minWeightBur="minWeightBur"
@maxWeightBur="maxWeightBur"
>
</route-info>
</el-col>
......
......@@ -766,13 +766,79 @@ export default {
blurEvent({ originOfFlightNo }) {
this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo);
},
// 始发站
changeLocation(val) {
// console.log("始发站:", val);
validateLocation({ isLocation, location, notLocation }) {
let locationVal,
notLocationVal,
repeat,
validateLocation,
validateNotlocation;
if (isLocation == "1") {
// 分隔字符串并且转数组&去除数组空字符串
locationVal = location.split(";").filter((str) => str !== "");
// 是否有重复的
repeat = new Set(locationVal).size !== locationVal.length;
// 校验校验开头以字母或者数字开头的/^[a-zA-Z0-9]*$/
validateLocation = locationVal.every((item) =>
/^[a-zA-Z0-9]*$/.test(item)
);
} else {
notLocationVal = notLocation.split(";").filter((str) => str !== "");
repeat = new Set(notLocationVal).size !== notLocationVal.length;
validateNotlocation = locationVal.every((item) =>
/^[a-zA-Z0-9]*$/.test(item)
);
}
},
// 目的站
changeDestinationSite(val) {
// console.log("目的站:", val);
// 包含始发站失焦事件
locationBur({ index, item }) {
/*
对于单选框这种,不论是勾选哪一个两则都使用一个布尔值;
// 校验:只能字母和数组组合,不能有重复的,包含中不能有包含的
*/
// console.log(this.routesInfo);
// console.log("locationBur", index, item);
// 不为空的时候做校验
// if (item.location || item.notLocation) {
// this.validateLocation(item);
// }
},
// 不包含始发站失焦事件
notLocationBur({ index, item }) {
// console.log("notLocationBur", index, item);
},
// 包含目的站失焦事件
destinationSiteBur({ index, item }) {
// console.log("destinationSiteBur", index, item);
},
// 不包含目的站失焦事件
notDestinationSiteBur({ index, item }) {
// console.log("notDestinationSiteBur", index, item);
},
// URSA包含失焦事件
includeUrsaBur({ index, item }) {
// console.log("includeUrsaBur", index, item);
},
// URSA不包含失焦事件
notIncludeUrsaBur({ index, item }) {
// console.log("notIncludeUrsaBur", index, item);
},
// 最少件数失焦事件
minNumOfPiecesBur({ index, item }) {
// console.log("minNumOfPiecesBur", index, item);
},
// 最多件数失焦事件
maxNumOfPiecesBur({ index, item }) {
// console.log("maxNumOfPiecesBur", index, item);
},
// 最小重量失焦事件
minWeightBur({ index, item }) {
// console.log("minWeightBur", index, item);
},
// 最大重量失焦事件
maxWeightBur({ index, item }) {
// console.log("maxWeightBur", index, item);
},
},
};
......
......@@ -462,7 +462,7 @@ export default {
maxWeight: "",
minNumOfPieces: "", // 最小件数
maxNumOfPieces: "",
currencyCd: "CNY", // 人民币种
currencyCd: "RMB", // 人民币种
currencyCdUsd: "SUD", // 美元币种
minCustomVal: "", // 人民币最小申报值
maxCustomVal: "", // 人民币最大申报值
......@@ -511,7 +511,7 @@ export default {
{
id: this.id,
flightNo: "", // 航班号
calculateDay: "", // 航班日期//+1 -1
calculateDay: "", // 航班日期 +1 -1
flightRoute: "", // 航线
routeList: [], // 航线列表
permitOverweight: "N" ? false : true, // 爆仓是否继续配舱 Y-是,N-否
......@@ -521,6 +521,7 @@ export default {
];
}
},
mounted() {},
methods: {
// ET86新增
postAdd(params) {
......@@ -562,7 +563,7 @@ export default {
this.tableData = data.list.flightRankDtoList;
Object.keys(data.list.fltRuleDto).map((key) => {
if (key == "multiHs") {
// N为单品名,Y为多品名
// Y为单品名,N为多品名
if (data.list.fltRuleDto[key] == "Y") {
data.list.fltRuleDto[key] = true;
} else {
......@@ -622,7 +623,7 @@ export default {
}
this.cargoType = res.data.cargoType; // 申报类别
if (res.data.serviceCode.length) {
this.getObj(res.data);
this.getObj(res.data); // 获取serviceCode字典
}
})
.catch(() => {});
......@@ -657,7 +658,7 @@ export default {
},
// 航班号input 聚焦事件
inputFlightNoFocus({ $index, row }) {
this.currentFlightNo = row.flightNo.trim();
this.currentFlightNo = row.flightNo.trim(); // 当前航班号
this.currentIndex = $index;
},
// 失焦查询
......@@ -692,7 +693,7 @@ export default {
this.getQueryRouteByFltNo(params); // 航线查询
}
// 航班号为空时
if(params.fltNo.length == 0) {
if (params.fltNo.length == 0) {
this.tableData[this.currentIndex].flightRoute = "";
this.tableData[this.currentIndex].routeList = [];
this.msgError("请输入航班号");
......@@ -811,7 +812,7 @@ export default {
this.msgError("ET86配舱航班顺位中存在重复设置");
return;
}
queryParmas.fltRuleDto.multiHs = this.queryForm.multiHs ? "Y" : "N"; // N为单品名,Y为多品名
queryParmas.fltRuleDto.multiHs = this.queryForm.multiHs ? "Y" : "N"; // Y为单品名,N为多品名
if (this.validateForm && this.$route.query.name == "add") {
this.postAdd(queryParmas); // 新增
} else {
......
......@@ -50,7 +50,7 @@ export default {
target.dispatchEvent(new Event("input"));
}
}, 800),
// 获取字典
// 获取serviceCode字典
getObj({ serviceCode }) {
let service_Code = [];
serviceCode.map((item) => {
......