Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
17f3f7db
Commit
17f3f7db
authored
Dec 30, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善阶梯价组件的错误提示
parent
b1a8a0e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
PriceStep.vue
src/views/ecw/productPrice/components/PriceStep.vue
+12
-10
No files found.
src/views/ecw/productPrice/components/PriceStep.vue
View file @
17f3f7db
...
...
@@ -98,32 +98,34 @@ export default {
},
// 校验
validate
(){
let
valid
=
true
const
index
=
this
.
index
const
errors
=
[]
// 区间设置检查
if
(
index
>
0
&&
!
this
.
value
.
startNum
){
valid
=
false
this
.
$message
.
error
(
`请设置第
${
index
+
1
}
阶段的起始值`
)
errors
.
push
(
`请设置
${
this
.
priceName
}
第
${
index
+
1
}
阶段的起始值`
)
}
if
(
!
this
.
value
.
endNum
){
valid
=
false
this
.
$message
.
error
(
`请设置第
${
index
+
1
}
阶段的结束值`
)
errors
.
push
(
`请设置
${
this
.
priceName
}
第
${
index
+
1
}
阶段的结束值`
)
}
// 价格检查
if
(
!
this
.
validatePrice
(
this
.
value
[
`
${
this
.
fieldPrefix
}
Price`
])){
valid
=
false
this
.
$message
.
error
(
`请设置第
${
index
+
1
}
阶段的
${
this
.
priceName
}
`
)
errors
.
push
(
`请设置第
${
index
+
1
}
阶段的
${
this
.
priceName
}
`
)
}
// 包装价格检查
if
(
this
.
value
.
packagingList
?.
length
){
this
.
value
.
packagingList
.
forEach
((
item
,
i
)
=>
{
if
(
item
.
packagingTypes
?.
length
&&
!
this
.
validatePrice
(
item
.
packagingPrice
)){
valid
=
false
this
.
$message
.
error
(
`请设置第
${
index
+
1
}
阶段的包装类型
${
i
+
1
}
的
${
this
.
priceName
}
`
)
errors
.
push
(
`请设置第
${
index
+
1
}
阶段的包装类型
${
i
+
1
}
的
${
this
.
priceName
}
`
)
}
})
}
return
valid
if
(
errors
.
length
){
this
.
$notify
.
error
({
title
:
this
.
$t
(
"
表单错误
"
),
message
:
errors
.
join
(
'
;
\n
'
)
});
}
return
!
errors
.
length
},
// 校验价格是否为空,可以是0
validatePrice
(
value
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment