Commit 34b51b0b authored by GuanHua's avatar GuanHua

fix: 1: 进货单多选问题;2.浏览记录样式问题

parent 9cdcfbc3
......@@ -55,13 +55,12 @@
}
.commodityList {
display: flex;
flex-wrap: wrap;
padding: 0 5px 50px 0;
overflow-y: auto;
height: 100vh;
.commodityItem {
display: inline-block;
width: 50%;
.commodityItemBody {
......
......@@ -149,7 +149,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
if(isMemberPrice) {
parameter = await getMemberCredit(item.commodityUnitPrice.commodity.memberId, item.commodityUnitPrice.commodity.memberRoleId)
}
Object.keys(unitPrice).forEach(key => {
unitPrice && Object.keys(unitPrice).forEach(key => {
const keyArr = key.split('-')
const min = keyArr[0]
const max = keyArr[1]
......@@ -225,6 +225,9 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
const index = checkedList.indexOf(id)
checkedList.splice(index, 1)
setCheckedList(checkedList)
if(checkedList.length === 0) {
setIndeterminate(false)
}
}
}
......@@ -319,7 +322,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
if (isEmpty(priceItem)) {
priceItem = getMaxCountRange(priceRange, count)
}
return parseFloat(priceItem.price) * count
return (priceItem && priceItem.price) ? parseFloat(priceItem.price) * count : 0
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment