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-20 15:15:44 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
79b2818f2764ab7a7b81d7924618fc92af7eb0b8
79b2818f
2 parents
df3551b7
e89245ed
Merge branch 'et86-black' into uat
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
283 additions
and
107 deletions
src/components/YlTable/index.vue
src/utils/mixins.js
src/views/allocationConfig/flightAllocConfig/components/RouteInfo.vue
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
src/views/allocationConfig/flightAllocConfig/mixins/index.js
src/components/YlTable/index.vue
View file @
79b2818
...
...
@@ -50,7 +50,7 @@
:empty-text="emptyText"
v-bind="attrs"
v-loading="tableLoading"
:data="tableData"
:data="tableData
? tableData : []
"
@selection-change="selectionChange"
ref="tableRef"
row-key="id"
...
...
@@ -176,7 +176,7 @@ export default {
window.addEventListener("resize", this.getTrCurrentHeight);
},
destroyed() {
if (this.tableData.length) {
if (this.tableData
&& this.tableData
.length) {
window.removeEventListener("resize", this.getTrCurrentHeight);
}
},
...
...
@@ -283,7 +283,7 @@ export default {
});
},
tableData() {
if (this.tableData.length && this.attrs.isDragSort) {
if (this.tableData
&& this.tableData
.length && this.attrs.isDragSort) {
// 拖拽行更新排序
// this.rowDrop();
// 拖拽列更新排序
...
...
src/utils/mixins.js
View file @
79b2818
...
...
@@ -133,20 +133,6 @@ export const inputBlurValidate = {
}
}
},
validateNumber
(
number
)
{
// 首先检查是否为合法数字
if
(
isNaN
(
number
))
{
return
"请输入有效数字"
;
}
// 然后检查是否大于0
if
(
number
<=
0
)
{
return
"请输入大于0的数字"
;
}
// 如果通过了以上两个条件,则表示数字合法
return
"数字合法"
;
},
// 人民币最小申报价值
inputCNYBlurMin
({
target
},
customVal
)
{
// 申报价值最小值和最大值都为空的情况下
...
...
src/views/allocationConfig/flightAllocConfig/components/RouteInfo.vue
View file @
79b2818
...
...
@@ -64,7 +64,7 @@
<el-col :span="2">
<el-radio-group
v-model="item.isLocation"
@change="changeLocation"
@change="changeLocation
({ index, item, $event })
"
:disabled="pageName || status"
>
<el-radio label="1">包含始发站</el-radio>
...
...
@@ -72,28 +72,34 @@
</el-radio-group>
</el-col>
<el-col :span="10">
<el-input
v-if="item.isLocation == '1'"
:disabled="pageName || status"
type="textarea"
v-model="item.location"
:rows="4"
placeholder="始发站之间用回车符分隔"
style="width: 500px"
@blur="location({ index, item, $event })"
>
</el-input>
<el-input
v-else
:disabled="pageName || status"
type="textarea"
v-model="item.notLocation"
:rows="4"
placeholder="始发站之间用回车符分隔"
style="width: 500px"
@blur="notLocation({ index, item, $event })"
>
</el-input>
<span style="width: 500px; display: block">
<el-input
v-show="item.isLocation == '1'"
:disabled="pageName || status"
type="textarea"
v-model="item.location"
:rows="4"
placeholder="始发站之间用回车符分隔"
@blur="location({ index, item, $event })"
>
</el-input>
<el-input
v-show="item.isLocation == '2'"
:disabled="pageName || status"
type="textarea"
v-model="item.notLocation"
:rows="4"
placeholder="始发站之间用回车符分隔"
@blur="notLocation({ index, item, $event })"
>
</el-input>
</span>
<div class="form-item-error-block">
<span
class="el-form-item__error"
v-text="item.locationError"
></span>
</div>
</el-col>
</el-form-item>
</el-col>
...
...
@@ -103,37 +109,45 @@
<el-radio-group
:disabled="pageName || status"
v-model="item.isDestinationSite"
@change="changeDestinationSite"
@change="
changeDestinationSite({ index, item, $event })
"
>
<el-radio label="1">包含目的站</el-radio>
<el-radio label="2">不包含目的站</el-radio>
</el-radio-group>
</el-col>
<el-col :span="10">
<el-input
v-if="item.isDestinationSite == '1'"
:disabled="pageName || status"
type="textarea"
v-model="item.destinationSite"
:rows="4"
placeholder="目的站之间用回车符分隔"
style="width: 500px"
@blur="destinationSite({ index, item, $event })"
>
</el-input>
<el-input
v-else
:disabled="pageName || status"
type="textarea"
v-model="item.notDestinationSite"
:rows="4"
placeholder="目的站之间用回车符分隔"
style="width: 500px"
@blur="
notDestinationSite({ index, item, $event })
"
>
</el-input>
<span style="width: 500px; display: block">
<el-input
v-show="item.isDestinationSite == '1'"
:disabled="pageName || status"
type="textarea"
v-model="item.destinationSite"
:rows="4"
placeholder="目的站之间用回车符分隔"
@blur="destinationSite({ index, item, $event })"
>
</el-input>
<el-input
v-show="item.isDestinationSite == '2'"
:disabled="pageName || status"
type="textarea"
v-model="item.notDestinationSite"
:rows="4"
placeholder="目的站之间用回车符分隔"
@blur="
notDestinationSite({ index, item, $event })
"
>
</el-input>
</span>
<div class="form-item-error-block">
<span
class="el-form-item__error"
v-text="item.destinationSiteError"
></span>
</div>
</el-col>
</el-form-item>
</el-col>
...
...
@@ -149,6 +163,10 @@
@blur="includeUrsa({ index, item, $event })"
>
</el-input>
<span
class="el-form-item__error"
v-text="item.ursaError"
></span>
</el-form-item>
</el-col>
<el-col :span="10">
...
...
@@ -162,6 +180,12 @@
@blur="notIncludeUrsa({ index, item, $event })"
>
</el-input>
<div class="form-item-error-block">
<span
class="el-form-item__error"
v-text="item.notUrsaError"
></span>
</div>
</el-form-item>
</el-col>
</el-col>
...
...
@@ -178,7 +202,6 @@
>
</el-input>
<span
ref="minNumOfPieces"
class="el-form-item__error"
></span>
</el-col>
...
...
@@ -209,7 +232,6 @@
>
</el-input>
<span
ref="minWeight"
class="el-form-item__error"
></span>
</el-col>
...
...
@@ -571,12 +593,12 @@ export default {
this.$emit("collapse", name);
},
// 始发站
changeLocation(
val
) {
this.$emit("loc
ation", val
);
changeLocation(
item
) {
this.$emit("loc
Radio", item
);
},
// 目的站
changeDestinationSite(
val
) {
this.$emit("des
tinationSite", val
);
changeDestinationSite(
item
) {
this.$emit("des
siteRadio", item
);
},
// 申报类别
changeCargoType(arr) {
...
...
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
View file @
79b2818
...
...
@@ -40,6 +40,8 @@
@save="saveSubmit"
@onOff="onOffSubmit"
@delete="deleteSubmit"
@locRadio="locRadio"
@dessiteRadio="dessiteRadio"
@locationBur="locationBur"
@notLocationBur="notLocationBur"
@destinationSiteBur="destinationSiteBur"
...
...
src/views/allocationConfig/flightAllocConfig/mixins/index.js
View file @
79b2818
...
...
@@ -766,63 +766,229 @@ 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
)
);
// 始发地
locRadio
({
index
,
item
})
{
const
validateData
=
{
reg
:
/^
[
a-zA-Z0-9
]
*$/
,
index
:
index
,
radio
:
item
.
isLocation
,
include
:
item
.
location
,
notInclude
:
item
.
notLocation
,
errorMsgAttr
:
"locationError"
,
validateForm
:
false
,
// form表单节流阀
errorMsg
:
{
repeat
:
"填写的始发站已重复"
,
empty
:
"不能为空"
,
error
:
"始发站之间用分号分隔,例:P1;P2;P3"
,
},
};
// this.validateParmas(validateData);
},
// 目的站
dessiteRadio
({
index
,
item
})
{
const
validateData
=
{
reg
:
/^
[
a-zA-Z0-9
]
*$/
,
index
:
index
,
radio
:
item
.
isLocation
,
include
:
item
.
location
,
notInclude
:
item
.
notLocation
,
errorMsgAttr
:
"destinationSiteError"
,
validateForm
:
false
,
// form表单节流阀
errorMsg
:
{
repeat
:
"填写的目的站已重复"
,
empty
:
"不能为空"
,
error
:
"目的站之间用分号分隔,例:P1;P2;P3"
,
},
};
// this.validateParmas(validateData);
},
// 校验目的地
validateParmas
({
reg
,
index
,
radio
,
include
,
notInclude
,
errorMsgAttr
,
errorMsg
,
ursaMark
,
})
{
let
includeVal
,
notIncludeVal
,
repeat
=
false
,
validate
=
true
;
if
(
radio
==
"1"
)
{
if
(
include
)
{
// 分隔字符串并且转数组&去除数组空字符串
includeVal
=
include
.
split
(
";"
).
filter
((
str
)
=>
str
!==
""
);
// 是否有重复的
repeat
=
new
Set
(
includeVal
).
size
!==
includeVal
.
length
;
// 校验校验开头以字母或者数字开头的/^[a-zA-Z0-9]*$/
validate
=
includeVal
.
every
((
item
)
=>
reg
.
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
)
);
if
(
notInclude
)
{
notIncludeVal
=
notInclude
.
split
(
";"
).
filter
((
str
)
=>
str
!==
""
);
repeat
=
new
Set
(
notIncludeVal
).
size
!==
notIncludeVal
.
length
;
validate
=
notIncludeVal
.
every
((
item
)
=>
reg
.
test
(
item
));
}
}
if
(
ursaMark
)
{
if
(
include
)
{
includeVal
=
include
.
split
(
";"
).
filter
((
str
)
=>
str
!==
""
);
repeat
=
new
Set
(
includeVal
).
size
!==
includeVal
.
length
;
validate
=
includeVal
.
every
((
item
)
=>
reg
.
test
(
item
));
}
else
{
this
.
routesInfo
[
index
].
validateForm
=
true
;
// form表单节流阀
this
.
routesInfo
[
index
][
errorMsgAttr
]
=
""
;
this
.
$set
(
this
.
routesInfo
,
index
,
this
.
routesInfo
[
index
]);
}
}
if
(
ursaMark
==
false
)
{
if
(
notInclude
)
{
notIncludeVal
=
notInclude
.
split
(
";"
).
filter
((
str
)
=>
str
!==
""
);
repeat
=
new
Set
(
notIncludeVal
).
size
!==
notIncludeVal
.
length
;
validate
=
notIncludeVal
.
every
((
item
)
=>
reg
.
test
(
item
));
}
else
{
this
.
routesInfo
[
index
].
validateForm
=
true
;
// form表单节流阀
this
.
routesInfo
[
index
][
errorMsgAttr
]
=
""
;
this
.
$set
(
this
.
routesInfo
,
index
,
this
.
routesInfo
[
index
]);
}
}
if
(
repeat
)
{
this
.
routesInfo
[
index
].
validateForm
=
false
;
// form表单节流阀
this
.
routesInfo
[
index
][
errorMsgAttr
]
=
errorMsg
.
repeat
;
this
.
$set
(
this
.
routesInfo
,
index
,
this
.
routesInfo
[
index
]);
}
if
(
!
validate
)
{
this
.
routesInfo
[
index
].
validateForm
=
false
;
// form表单节流阀
this
.
routesInfo
[
index
][
errorMsgAttr
]
=
errorMsg
.
error
;
this
.
$set
(
this
.
routesInfo
,
index
,
this
.
routesInfo
[
index
]);
}
if
(
!
repeat
&&
validate
)
{
this
.
routesInfo
[
index
].
validateForm
=
true
;
// form表单节流阀
this
.
routesInfo
[
index
][
errorMsgAttr
]
=
""
;
this
.
$set
(
this
.
routesInfo
,
index
,
this
.
routesInfo
[
index
]);
}
if
(
radio
==
"1"
&&
!
include
)
{
this
.
routesInfo
[
index
].
validateForm
=
true
;
// form表单节流阀
this
.
routesInfo
[
index
][
errorMsgAttr
]
=
""
;
this
.
$set
(
this
.
routesInfo
,
index
,
this
.
routesInfo
[
index
]);
}
if
(
radio
==
"2"
&&
!
notInclude
)
{
this
.
routesInfo
[
index
].
validateForm
=
true
;
// form表单节流阀
this
.
routesInfo
[
index
][
errorMsgAttr
]
=
""
;
this
.
$set
(
this
.
routesInfo
,
index
,
this
.
routesInfo
[
index
]);
}
},
// 包含始发站失焦事件
locationBur
({
index
,
item
})
{
/*
对于单选框这种,不论是勾选哪一个两则都使用一个布尔值;
// 校验:只能字母和数组组合,不能有重复的,包含中不能有包含的
*/
// console.log(this.routesInfo);
// console.log("locationBur", index, item);
// 不为空的时候做校验
// if (item.location || item.notLocation) {
// this.validateLocation(item);
// }
const
validateData
=
{
reg
:
/^
[
a-zA-Z0-9
]
*$/
,
index
:
index
,
radio
:
item
.
isLocation
,
include
:
item
.
location
,
notInclude
:
item
.
notLocation
,
errorMsgAttr
:
"locationError"
,
validateForm
:
false
,
// form表单节流阀
errorMsg
:
{
repeat
:
"填写的始发站已重复"
,
empty
:
"不能为空"
,
error
:
"始发站之间用分号分隔,例:P1;P2;P3"
,
},
};
// this.validateParmas(validateData);
},
// 不包含始发站失焦事件
notLocationBur
({
index
,
item
})
{
// console.log("notLocationBur", index, item);
const
validateData
=
{
reg
:
/^
[
a-zA-Z0-9
]
*$/
,
index
:
index
,
radio
:
item
.
isLocation
,
include
:
item
.
location
,
notInclude
:
item
.
notLocation
,
errorMsgAttr
:
"locationError"
,
validateForm
:
false
,
// form表单节流阀
errorMsg
:
{
repeat
:
"填写的始发站已重复"
,
empty
:
"不能为空"
,
error
:
"始发站之间用分号分隔,例:P1;P2;P3"
,
},
};
// this.validateParmas(validateData);
},
// 包含目的站失焦事件
destinationSiteBur
({
index
,
item
})
{
// console.log("destinationSiteBur", index, item);
const
validateData
=
{
reg
:
/^
[
a-zA-Z0-9
]
*$/
,
index
:
index
,
radio
:
item
.
isLocation
,
include
:
item
.
location
,
notInclude
:
item
.
notLocation
,
errorMsgAttr
:
"destinationSiteError"
,
validateForm
:
false
,
// form表单节流阀
errorMsg
:
{
repeat
:
"填写的目的站已重复"
,
empty
:
"不能为空"
,
error
:
"目的站之间用分号分隔,例:P1;P2;P3"
,
},
};
// this.validateParmas(validateData);
},
// 不包含目的站失焦事件
notDestinationSiteBur
({
index
,
item
})
{
// console.log("notDestinationSiteBur", index, item);
const
validateData
=
{
reg
:
/^
[
a-zA-Z0-9
]
*$/
,
index
:
index
,
radio
:
item
.
isLocation
,
include
:
item
.
location
,
notInclude
:
item
.
notLocation
,
errorMsgAttr
:
"destinationSiteError"
,
validateForm
:
false
,
// form表单节流阀
errorMsg
:
{
repeat
:
"填写的目的站已重复"
,
empty
:
"不能为空"
,
error
:
"目的站之间用分号分隔,例:P1;P2;P3"
,
},
};
// this.validateParmas(validateData);
},
// URSA包含失焦事件
includeUrsaBur
({
index
,
item
})
{
// console.log("includeUrsaBur", index, item);
const
validateData
=
{
reg
:
/^
[
a-zA-Z0-9
]
*_$/
,
index
:
index
,
ursaMark
:
true
,
include
:
item
.
includeUrsa
,
notInclude
:
item
.
notIncludeUrsa
,
errorMsgAttr
:
"ursaError"
,
validateForm
:
false
,
// form表单节流阀
errorMsg
:
{
repeat
:
"填写的URSA已重复"
,
empty
:
"不能为空"
,
error
:
"URSA包含之间用分号分隔,例:P1_;F2_;F3_"
,
},
};
// this.validateParmas(validateData);
},
// URSA不包含失焦事件
notIncludeUrsaBur
({
index
,
item
})
{
// console.log("notIncludeUrsaBur", index, item);
const
validateData
=
{
reg
:
/^
[
a-zA-Z0-9
]
*$/
,
index
:
index
,
ursaMark
:
false
,
include
:
item
.
includeUrsa
,
notInclude
:
item
.
notIncludeUrsa
,
errorMsgAttr
:
"notUrsaError"
,
validateForm
:
false
,
// form表单节流阀
errorMsg
:
{
repeat
:
"填写的URSA已重复"
,
empty
:
"不能为空"
,
error
:
"URSA包含之间用分号分隔,例:P1;F2;F3"
,
},
};
// this.validateParmas(validateData);
},
// 最少件数失焦事件
minNumOfPiecesBur
({
index
,
item
})
{
...
...
Please
register
or
login
to post a comment