|
|
@@ -13,8 +13,6 @@ type FormState = {
|
|
|
storageLocationCode: string
|
|
|
/** 库位名称 */
|
|
|
storageLocationName: string
|
|
|
- /** 物料类型 */
|
|
|
- storageLocationType: string
|
|
|
/** 是否是混合库位 */
|
|
|
storageIsNotDisable: string
|
|
|
/** 所在仓库 */
|
|
|
@@ -24,7 +22,6 @@ type FormState = {
|
|
|
const validate = object({
|
|
|
storageLocationCode: string().required('请输入库位编号'),
|
|
|
storageLocationName: string().required('请输入库位名称'),
|
|
|
- storageLocationType: string().required('请输入物料类型'),
|
|
|
storageIsNotDisable: string().required('请选择是否是混合库位'),
|
|
|
storageWarehouse: string().required('请选择所在仓库'),
|
|
|
});
|
|
|
@@ -71,7 +68,6 @@ export function useFormState(
|
|
|
defaultValues: {
|
|
|
storageLocationCode: '',
|
|
|
storageLocationName: '',
|
|
|
- storageLocationType: '',
|
|
|
storageIsNotDisable: '0',
|
|
|
storageWarehouse: '',
|
|
|
},
|
|
|
@@ -91,14 +87,12 @@ export function useFormState(
|
|
|
const onSubmit = handleSubmit(function({
|
|
|
storageLocationName,
|
|
|
storageLocationCode,
|
|
|
- storageLocationType,
|
|
|
storageIsNotDisable,
|
|
|
storageWarehouse,
|
|
|
}) {
|
|
|
const params: AddStorageParams = {
|
|
|
storageLocationName,
|
|
|
storageLocationCode,
|
|
|
- storageLocationType,
|
|
|
isNotDisable: storageIsNotDisable,
|
|
|
warehouseWhere: storageWarehouse,
|
|
|
};
|
|
|
@@ -129,7 +123,6 @@ export function useFormInfoValue(id: string) {
|
|
|
useEffect(function() {
|
|
|
setValue('storageLocationCode', data?.storageLocationCode ?? '');
|
|
|
setValue('storageLocationName', data?.storageLocationName ?? '');
|
|
|
- setValue('storageLocationType', data?.storageLocationType ?? '');
|
|
|
setValue('storageIsNotDisable', data?.isNotDisable ?? '0');
|
|
|
setValue('storageWarehouse', data?.warehouseWhere ?? '');
|
|
|
}, [data, setValue]);
|