|
@@ -10,12 +10,13 @@ import {
|
|
|
type Props = {id: string};
|
|
type Props = {id: string};
|
|
|
|
|
|
|
|
const Info: FC<Props> = function ({id}) {
|
|
const Info: FC<Props> = function ({id}) {
|
|
|
- const {control, watch, setValue} = useFormContextState();
|
|
|
|
|
const [{data: materialOptions, isFetching}, onMaterialSearch] =
|
|
const [{data: materialOptions, isFetching}, onMaterialSearch] =
|
|
|
useDictionaryWidthCode('物料字典', {
|
|
useDictionaryWidthCode('物料字典', {
|
|
|
findValue: state => state.code,
|
|
findValue: state => state.code,
|
|
|
});
|
|
});
|
|
|
useWatchId(id, onMaterialSearch);
|
|
useWatchId(id, onMaterialSearch);
|
|
|
|
|
+
|
|
|
|
|
+ const {control, watch, setValue} = useFormContextState();
|
|
|
const {data: warehouseOptions, isFetching: warehouseIsFetching} =
|
|
const {data: warehouseOptions, isFetching: warehouseIsFetching} =
|
|
|
useDictionaryOptions('仓库');
|
|
useDictionaryOptions('仓库');
|
|
|
const warehouseId = watch('warehouseId');
|
|
const warehouseId = watch('warehouseId');
|
|
@@ -42,7 +43,6 @@ const Info: FC<Props> = function ({id}) {
|
|
|
label='所属仓库'
|
|
label='所属仓库'
|
|
|
control={control}
|
|
control={control}
|
|
|
data={warehouseOptions}
|
|
data={warehouseOptions}
|
|
|
- showSearch
|
|
|
|
|
loading={warehouseIsFetching}
|
|
loading={warehouseIsFetching}
|
|
|
/>
|
|
/>
|
|
|
<ModalSelect
|
|
<ModalSelect
|
|
@@ -50,7 +50,6 @@ const Info: FC<Props> = function ({id}) {
|
|
|
label='所属库位'
|
|
label='所属库位'
|
|
|
control={control}
|
|
control={control}
|
|
|
data={storageOtions}
|
|
data={storageOtions}
|
|
|
- showSearch
|
|
|
|
|
loading={isStorageFetching}
|
|
loading={isStorageFetching}
|
|
|
/>
|
|
/>
|
|
|
</>
|
|
</>
|