Commit d3e86448 authored by 前端-许佳敏's avatar 前端-许佳敏

fix:新增仓位-商品无货品时不请求接口

parent 82464089
......@@ -226,12 +226,17 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
addonAfter: <div style={{marginLeft: 4}}>{selectResult.unitName}</div>
}
})
// 查询到的货品id
const { data } = await PublicApi.getProductGoodsGetGoods({
id: goodsId
})
// 设置货品名称
addSchemaAction.setFieldValue('itemNo', data?.name || '')
// 商品有可能没有货品, 没有货品时不请求
if (goodsId) {
// 查询到的货品id
const { data } = await PublicApi.getProductGoodsGetGoods({
id: goodsId
})
// 设置货品名称
addSchemaAction.setFieldValue('itemNo', data?.name || '')
}
}
const fetchMemberList = async (params) => {
......
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