Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
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
陈智峰
jinfa-platform
Commits
500cea0e
Commit
500cea0e
authored
Sep 03, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:添加商品价格需要询问类型价格校验问题,商品列表显示异常
parent
0ca7ff75
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+3
-3
basicInfoForm.tsx
...ages/commodity/products/addProductsItem/basicInfoForm.tsx
+0
-1
index.tsx
src/pages/commodity/products/index.tsx
+8
-1
No files found.
src/pages/commodity/products/addProducts.tsx
View file @
500cea0e
...
...
@@ -214,8 +214,8 @@ const AddProducts: React.FC<{}> = (props) => {
try
{
let
hasPriceArray
=
_params
.
unitPriceAndPicList
.
map
(
item
=>
item
.
unitPrice
)
hasPriceArray
.
map
(
item
=>
{
if
(
JSON
.
stringify
(
item
)
===
'{}'
)
throw
new
Error
(
'商品价格
为必填项!'
)
if
(
JSON
.
stringify
(
item
)
===
'{}'
&&
_params
.
priceType
!==
2
)
// 除价格需要询问类型 其他都需要校验价格或积分
throw
new
Error
(
_params
.
priceType
===
1
?
'商品价格为必填项!'
:
'商品积分
为必填项!'
)
})
}
catch
(
e
){
return
e
...
...
@@ -229,7 +229,7 @@ const AddProducts: React.FC<{}> = (props) => {
PublicApi
.
postProductCommoditySaveOrUpdateCommodity
(
_params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
){
setIsEnableCheck
(
false
)
setIsDisableSaveBtn
(
false
)
//
setIsDisableSaveBtn(false)
setReponseId
(
res
.
data
)
history
.
goBack
()
}
...
...
src/pages/commodity/products/addProductsItem/basicInfoForm.tsx
View file @
500cea0e
...
...
@@ -79,7 +79,6 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
if
(
!
item
.
children
.
length
)
delete
item
.
children
})
console
.
log
(
data
)
setCustomerCategoryTree
(
data
)
}
})
...
...
src/pages/commodity/products/index.tsx
View file @
500cea0e
...
...
@@ -140,7 +140,14 @@ const Products: React.FC<{}> = () => {
title
:
'价格'
,
dataIndex
:
'min'
,
key
:
'min'
,
render
:
(
text
:
any
,
reocrd
:
any
)
=>
(<>
¥
{
reocrd
.
min
}
~ ¥
{
reocrd
.
max
}
</>)
render
:
(
text
:
any
,
reocrd
:
any
)
=>
{
if
(
reocrd
.
priceType
===
1
)
return
<>
¥
{
reocrd
.
min
}
~ ¥
{
reocrd
.
max
}
</>
if
(
reocrd
.
priceType
===
3
)
return
<>
{
reocrd
.
min
}
~
{
reocrd
.
max
}
</>
if
(
reocrd
.
priceType
===
2
)
return
null
}
},
{
title
:
'审核时间'
,
...
...
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