Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
50a9e51c
Commit
50a9e51c
authored
Oct 12, 2020
by
李硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限制库存和不限库存切换校验限制
parent
59107fa8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
prize-dialog.js
client/components/dialog/prize-dialog/prize-dialog.js
+7
-10
No files found.
client/components/dialog/prize-dialog/prize-dialog.js
View file @
50a9e51c
...
@@ -69,7 +69,7 @@ Component({
...
@@ -69,7 +69,7 @@ Component({
status
:
"success"
,
status
:
"success"
,
content
:
""
,
content
:
""
,
},
},
goodIdTips
:
{
good
s
IdTips
:
{
status
:
"success"
,
status
:
"success"
,
content
:
""
,
content
:
""
,
},
},
...
@@ -397,11 +397,11 @@ Component({
...
@@ -397,11 +397,11 @@ Component({
}
}
//实物奖品的配置商品id
//实物奖品的配置商品id
// if (type == OBJECT_TYPE) {
// if (type == OBJECT_TYPE) {
// if (!goodId) {
// if (!good
s
Id) {
// this.showItemTips('goodIdTips', 'error', '请选择商品链接');
// this.showItemTips('good
s
IdTips', 'error', '请选择商品链接');
// }
// }
// else {
// else {
// this.showItemTips('goodIdTips', 'success', '');
// this.showItemTips('good
s
IdTips', 'success', '');
// }
// }
// }
// }
if
(
type
==
EQUITY_TYPE
||
type
==
OBJECT_TYPE
)
{
if
(
type
==
EQUITY_TYPE
||
type
==
OBJECT_TYPE
)
{
...
@@ -421,10 +421,7 @@ Component({
...
@@ -421,10 +421,7 @@ Component({
}
}
// 库存奖品的库存值判断
// 库存奖品的库存值判断
let
usePass
=
switchStock
==
1
?
+
stock
>
(
useStock
||
0
)
:
true
;
let
usePass
=
switchStock
==
1
?
+
stock
>
(
useStock
||
0
)
:
true
;
// console.log("stock==", stock, "useStock==", useStock, 'type===', type);
let
stockPass
=
switchStock
==
1
?
!
validateRangeNumber
(
credits
,
[
0
,
99999
])
:
true
;
let
intNum
=
/^
[
1-9
]
+
[
0-9
]
*$/
;
let
stockPass
=
switchStock
==
1
?
(
intNum
.
test
(
+
stock
)
&&
+
stock
>
0
&&
+
stock
<=
99999
)
:
true
;
console
.
log
(
intNum
.
test
(
+
stock
),
+
stock
<=
0
,
+
stock
>
99999
,
usePass
);
if
(
!
stockPass
||
!
usePass
)
{
if
(
!
stockPass
||
!
usePass
)
{
this
.
showItemTips
(
this
.
showItemTips
(
"prizeNumberTips"
,
"prizeNumberTips"
,
...
@@ -480,7 +477,7 @@ Component({
...
@@ -480,7 +477,7 @@ Component({
creditsValueTips
,
creditsValueTips
,
useUrlTips
,
useUrlTips
,
prizeDescTips
,
prizeDescTips
,
goodIdTips
,
good
s
IdTips
,
}
=
this
.
data
;
}
=
this
.
data
;
const
isImagePass
=
image
&&
imageTips
.
status
!==
"error"
;
const
isImagePass
=
image
&&
imageTips
.
status
!==
"error"
;
...
@@ -500,7 +497,7 @@ Component({
...
@@ -500,7 +497,7 @@ Component({
isImagePass
&&
isImagePass
&&
probabilityTips
.
status
!==
"error"
&&
probabilityTips
.
status
!==
"error"
&&
prizeNumberTips
.
status
!==
"error"
&&
prizeNumberTips
.
status
!==
"error"
&&
goodIdTips
.
status
!==
"error"
&&
good
s
IdTips
.
status
!==
"error"
&&
prizeDescTips
.
status
!==
"error"
;
prizeDescTips
.
status
!==
"error"
;
const
isCreditsPass
=
const
isCreditsPass
=
type
==
CREDITS_TYPE
&&
type
==
CREDITS_TYPE
&&
...
...
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