Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
919fd2e8
Commit
919fd2e8
authored
Jul 02, 2020
by
wkliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3422f478
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
engine-product/app/base/api/impl/op/action.js
+3
-13
No files found.
engine-product/app/base/api/impl/op/action.js
View file @
919fd2e8
...
@@ -37,28 +37,18 @@ class ActionAPI extends APIBase {
...
@@ -37,28 +37,18 @@ class ActionAPI extends APIBase {
action_body
.
types
,
action_body
.
keywords
)
action_body
.
types
,
action_body
.
keywords
)
break
break
case
'createOrUpdate'
:
case
'createOrUpdate'
:
if
(
action_body
.
product_type
==
0
&&
action_body
.
items
)
{
if
(
action_body
.
product_type
==
1
&&
action_body
.
items
)
{
return
system
.
getResult
(
null
,
'单产品不能有子产品'
)
return
system
.
getResult
(
null
,
'单产品不能有子产品'
)
}
}
if
(
action_body
.
product_type
==
1
&&
(
!
action_body
.
items
||
action_body
.
items
.
length
==
0
))
{
if
(
action_body
.
product_type
==
2
&&
(
!
action_body
.
items
||
action_body
.
items
.
length
==
0
))
{
return
system
.
getResult
(
null
,
'未选择子产品'
)
return
system
.
getResult
(
null
,
'未选择子产品'
)
}
}
if
(
action_body
.
product_type
==
1
)
{
if
(
action_body
.
product_type
==
2
)
{
let
checkRes
=
await
this
.
productSve
.
checkSitem
(
action_body
.
items
)
let
checkRes
=
await
this
.
productSve
.
checkSitem
(
action_body
.
items
)
if
(
!
checkRes
)
{
if
(
!
checkRes
)
{
return
system
.
getResult
(
null
,
'不能选择组合产品为子产品'
)
return
system
.
getResult
(
null
,
'不能选择组合产品为子产品'
)
}
}
}
}
if
(
isNaN
(
parseInt
(
action_body
.
limit
)))
{
return
system
.
getResult
(
null
,
`can't use limit of except number`
)
}
else
{
action_body
.
limit
=
parseInt
(
action_body
.
limit
)
}
if
(
isNaN
(
parseInt
(
action_body
.
page
)))
{
return
system
.
getResult
(
null
,
`can't use page of except number`
)
}
else
{
action_body
.
page
=
parseInt
(
action_body
.
page
)
}
result
=
await
this
.
productSve
.
createOrUpdate
(
action_body
)
result
=
await
this
.
productSve
.
createOrUpdate
(
action_body
)
break
break
case
'getAllDic'
:
case
'getAllDic'
:
...
...
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