Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Elements-SY
2023-10-19 10:15:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
723c66c8ff57fc8d25423ba1b7ee8a7984f995e1
723c66c8
1 parent
3212f94e
modify
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
12 deletions
src/views/allocationConfig/flightAllocConfig/mixins/index.js
src/views/allocationConfig/flightAllocConfig/mixins/index.js
View file @
723c66c
...
...
@@ -766,50 +766,79 @@ export default {
blurEvent
({
originOfFlightNo
})
{
this
.
queryForm
.
originOfFlightNo
=
this
.
upCase
(
originOfFlightNo
);
},
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
)
);
}
},
// 包含始发站失焦事件
locationBur
({
index
,
item
})
{
/*
对于单选框这种,不论是勾选哪一个两则都使用一个布尔值;
// 校验:只能字母和数组组合,不能有重复的,包含中不能有包含的
*/
console
.
log
(
this
.
routesInfo
);
console
.
log
(
"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
);
//
console.log("notLocationBur", index, item);
},
// 包含目的站失焦事件
destinationSiteBur
({
index
,
item
})
{
console
.
log
(
"destinationSiteBur"
,
index
,
item
);
//
console.log("destinationSiteBur", index, item);
},
// 不包含目的站失焦事件
notDestinationSiteBur
({
index
,
item
})
{
console
.
log
(
"notDestinationSiteBur"
,
index
,
item
);
//
console.log("notDestinationSiteBur", index, item);
},
// URSA包含失焦事件
includeUrsaBur
({
index
,
item
})
{
console
.
log
(
"includeUrsaBur"
,
index
,
item
);
//
console.log("includeUrsaBur", index, item);
},
// URSA不包含失焦事件
notIncludeUrsaBur
({
index
,
item
})
{
console
.
log
(
"notIncludeUrsaBur"
,
index
,
item
);
//
console.log("notIncludeUrsaBur", index, item);
},
// 最少件数失焦事件
minNumOfPiecesBur
({
index
,
item
})
{
console
.
log
(
"minNumOfPiecesBur"
,
index
,
item
);
//
console.log("minNumOfPiecesBur", index, item);
},
// 最多件数失焦事件
maxNumOfPiecesBur
({
index
,
item
})
{
console
.
log
(
"maxNumOfPiecesBur"
,
index
,
item
);
//
console.log("maxNumOfPiecesBur", index, item);
},
// 最小重量失焦事件
minWeightBur
({
index
,
item
})
{
console
.
log
(
"minWeightBur"
,
index
,
item
);
//
console.log("minWeightBur", index, item);
},
// 最大重量失焦事件
maxWeightBur
({
index
,
item
})
{
console
.
log
(
"maxWeightBur"
,
index
,
item
);
//
console.log("maxWeightBur", index, item);
},
},
};
...
...
Please
register
or
login
to post a comment