Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b2837176
authored
Jun 24, 2025
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改校验
1 parent
efbb0b6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
src/views/residentManage/inStoreManage/components/performanceDeductionDialog.vue
src/views/residentManage/inStoreManage/components/performanceDeductionDialog.vue
View file @
b283717
...
@@ -221,7 +221,8 @@
...
@@ -221,7 +221,8 @@
ref=
"selectTagForm"
ref=
"selectTagForm"
:storeSelected=
"
:storeSelected=
"
form.configList.length
form.configList.length
? form.configList[this.configIndex].staffList
? form.configList[this.configIndex] &&
form.configList[this.configIndex].staffList
: []
: []
"
"
:selectingList=
"selectingList"
:selectingList=
"selectingList"
...
@@ -302,6 +303,7 @@ export default {
...
@@ -302,6 +303,7 @@ export default {
methods
:
{
methods
:
{
//删除配置
//删除配置
deleteConfig
(
deleteConfig
)
{
deleteConfig
(
deleteConfig
)
{
console
.
log
(
deleteConfig
)
this
.
form
.
configList
.
splice
(
deleteConfig
,
1
)
this
.
form
.
configList
.
splice
(
deleteConfig
,
1
)
},
},
getPerformanceSalaryConfig
()
{
getPerformanceSalaryConfig
()
{
...
@@ -475,13 +477,16 @@ export default {
...
@@ -475,13 +477,16 @@ export default {
validateNumber
(
item
,
field
,
maxLimit
=
31
)
{
validateNumber
(
item
,
field
,
maxLimit
=
31
)
{
// console.log(item, field)
// console.log(item, field)
let
value
=
item
[
field
]
let
value
=
item
[
field
]
value
=
parseInt
(
value
)
||
"
0
"
value
=
parseInt
(
value
)
||
""
// 限制最大值
// 限制最大值
if
(
parseInt
(
value
)
>
maxLimit
)
{
if
(
parseInt
(
value
)
>
maxLimit
)
{
value
=
maxLimit
.
toString
()
value
=
""
this
.
$message
.
warning
(
`输入值不能超过
${
maxLimit
}
`
)
this
.
$message
.
warning
(
`输入值不能超过
${
maxLimit
}
`
)
}
}
if
(
parseInt
(
value
)
<
0
)
{
value
=
""
this
.
$message
.
warning
(
`输入值不能小于0`
)
}
this
.
$set
(
item
,
field
,
value
)
this
.
$set
(
item
,
field
,
value
)
// 自动修正 min <= max(仅对 maxAssessmentValue 生效)
// 自动修正 min <= max(仅对 maxAssessmentValue 生效)
...
@@ -497,19 +502,22 @@ export default {
...
@@ -497,19 +502,22 @@ export default {
validatePercentage
(
item
)
{
validatePercentage
(
item
)
{
let
value
=
item
.
performanceSalarDeductionRatio
let
value
=
item
.
performanceSalarDeductionRatio
// 去除非数字和小数点
// 去除非数字和小数点
value
=
parseInt
(
value
)
||
1
console
.
log
(
value
)
// // 处理小数位
// if (value.includes(".")) {
// const parts = value.split(".")
// value = parts[0] + "." + (parts[1] ? parts[1].slice(0, 2) : "")
// }
// 限制范围
let
numValue
=
parseFloat
(
value
||
"1"
)
if
(
isNaN
(
numValue
))
numValue
=
1
if
(
numValue
<
1
)
numValue
=
1
if
(
numValue
>
100
)
numValue
=
100
// 限制范围
let
numValue
=
parseFloat
(
value
)
if
(
isNaN
(
numValue
))
numValue
=
""
// if (numValue < 1) numValue = 1
// if (numValue > 100) numValue = 100
// 限制最大值
if
(
parseInt
(
value
)
>
100
)
{
numValue
=
""
this
.
$message
.
warning
(
`输入值不能超过100`
)
}
if
(
parseInt
(
value
)
<
1
)
{
numValue
=
""
this
.
$message
.
warning
(
`输入值不能小于1`
)
}
// value = parseInt(value) || ""
this
.
$set
(
item
,
"performanceSalarDeductionRatio"
,
numValue
.
toString
())
this
.
$set
(
item
,
"performanceSalarDeductionRatio"
,
numValue
.
toString
())
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment