Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
hooloo
web
soss
Commits
af29af1b
Commit
af29af1b
authored
2 years ago
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改折扣价和原价比较
parent
3a799fc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/views/goods/goods/components/Form.vue
+6
-2
No files found.
src/views/goods/goods/components/Form.vue
View file @
af29af1b
...
...
@@ -167,7 +167,9 @@ export default {
}
else
if
(
!
regular
.
test
(
value
)){
callback
(
new
Error
(
'请输入大于0的正数,最多保留1位小数'
));
}
else
if
(
this
.
form
.
price
){
if
(
value
>
this
.
form
.
price
){
let
discountValue
=
value
-
0
;
let
priceValue
=
this
.
form
.
price
-
0
;
if
(
discountValue
>
priceValue
){
callback
(
new
Error
(
'折扣价不能大于原价'
));
}
else
{
callback
();
...
...
@@ -184,7 +186,9 @@ export default {
}
else
if
(
!
regular
.
test
(
value
)){
callback
(
new
Error
(
'请输入大于0的正数,最多保留1位小数'
));
}
else
if
(
this
.
form
.
discount
){
if
(
value
<
this
.
form
.
discount
){
let
discountValue
=
this
.
form
.
discount
-
0
;
let
priceValue
=
value
-
0
;
if
(
priceValue
<
discountValue
){
callback
(
new
Error
(
'原价不能小于折扣价'
));
}
else
{
callback
();
...
...
This diff is collapsed.
Click to expand it.
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