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
shenshaokai
jinfa-platform
Commits
c132c008
Commit
c132c008
authored
Nov 13, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改商品详情库存默认显示
parent
90d9032f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+13
-1
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+1
-1
No files found.
src/pages/lxMall/commodityDetail/index.tsx
View file @
c132c008
...
...
@@ -636,11 +636,23 @@ const CommodityDetail = (props) => {
}
}
setCurrentPriceRange
(
sortUnitPrice
(
unitPricePicList
[
0
].
unitPrice
))
setStockCount
(
unitPricePicList
[
0
].
stockCount
)
initStockCount
(
unitPricePicList
)
// setStockCount(unitPricePicList[0].stockCount)
setCommodityImgList
(
tempImgList
)
setAttributeList
(
tempAttrList
)
}
const
initStockCount
=
(
unitPricePicList
:
any
)
=>
{
if
(
!
unitPricePicList
)
{
return
}
let
total
=
0
for
(
let
item
of
unitPricePicList
)
{
total
+=
item
.
stockCount
}
setStockCount
(
total
)
}
/**
* 对阶梯价格进行从大到小的排序
* @param priceObj
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
c132c008
...
...
@@ -515,7 +515,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
priceRange
:
item
.
commodityUnitPrice
.
priceRange
,
category
:
item
.
commodityUnitPrice
.
commodity
.
customerCategory
.
name
,
brand
:
item
.
commodityUnitPrice
.
commodity
.
brand
.
name
,
commodityPic
:
item
.
commodityUnitPrice
.
commodity
Pic
[
0
]
,
commodityPic
:
item
.
commodityUnitPrice
.
commodity
.
mainPic
,
attribute
:
item
.
commodityUnitPrice
.
attributeAndValueList
,
stockCount
:
item
.
stockCount
||
0
}
...
...
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