Commit 6cdba9dd authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理不选货品的商品编辑时候显示异常

parent 4cfd3adc
...@@ -94,7 +94,7 @@ const AddProducts: React.FC<{}> = (props) => { ...@@ -94,7 +94,7 @@ const AddProducts: React.FC<{}> = (props) => {
// 预先设置选择货品 // 预先设置选择货品
let unitPicList = data.unitPriceAndPicList.map(item => item.goods) let unitPicList = data.unitPriceAndPicList.map(item => item.goods)
let selectGoods = Object.values(unitPicList.reduce((item, next)=>{ let selectGoods = Object.values(unitPicList.reduce((item, next)=>{
item[next.id] = next; item[next?.id] = next;
return item return item
},{})) },{}))
setSelectedGoods(selectGoods) setSelectedGoods(selectGoods)
......
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