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

fix:修复仓位调拨时字段显示问题

parent d3e86448
......@@ -30,6 +30,9 @@ const AddRepository:React.FC<{}> = (props) => {
const {
id,
} = usePageStatus()
// 强制渲染
const [forceRender, setForceRender] = useState(0)
// 获取到的所有仓库, 用于选中后获得仓库库存
const [reposits, setReposits] = useState<any>([])
const [isEdit, setIsEdit] = useState(false)
......@@ -60,7 +63,7 @@ const AddRepository:React.FC<{}> = (props) => {
}
})
}
}, [initValue])
}, [initValue, forceRender])
const tableRecordColumns: any[] = [
{ dataIndex: 'id', title: 'ID', align: 'center' },
......@@ -107,11 +110,17 @@ const AddRepository:React.FC<{}> = (props) => {
repositInAction.setFieldValue('NO_SUBMIT2', bringUpTheInventory)
repositInAction.setFieldValue('NO_SUBMIT1', callInInventory)
repositOutAction.setFieldValue('NO_SUBMIT1', bringUpTheInventory)
repositInAction.setFieldValue('foldInventory', 0, false)
repositInAction.setFieldState('foldInventory', state => {
state.props["x-component-props"].max = callInInventory
state.props["x-component-props"].marks = getStepNumber(callInInventory)
})
repositOutAction.setFieldValue('foldFreightSpaceId', '')
repositOutAction.setFieldValue('NO_SUBMIT2', 0)
setForceRender(forceRender + 1)
tableRecordRef.current.reload && tableRecordRef.current.reload()
}
}
......@@ -130,11 +139,18 @@ const AddRepository:React.FC<{}> = (props) => {
repositOutAction.setFieldValue('NO_SUBMIT1', bringUpTheInventory)
repositOutAction.setFieldValue('NO_SUBMIT2', callInInventory)
repositInAction.setFieldValue('freightSpaceId', '')
repositInAction.setFieldValue('NO_SUBMIT1', 0)
repositInAction.setFieldValue('NO_SUBMIT2', bringUpTheInventory)
repositOutAction.setFieldValue('foldInventory', 0, false)
repositOutAction.setFieldState('foldInventory', state => {
state.props["x-component-props"].max = callInInventory
state.props["x-component-props"].marks = getStepNumber(callInInventory)
})
setForceRender(forceRender + 1)
tableRecordRef.current.reload && tableRecordRef.current.reload()
}
......
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