Просмотр исходного кода

chore: 库位管理取消物料类型

xyh 2 лет назад
Родитель
Сommit
ca5a889613

+ 0 - 2
packages/app/src/models/request/storage.ts

@@ -18,8 +18,6 @@ export type AddStorageParams = {
   storageLocationCode: string
   /** 库位名称 */
   storageLocationName: string
-  /** 物料类型 */
-  storageLocationType: string
   /** 是否是混合库位 */
   isNotDisable: string
   /** 所在仓库 */

+ 2 - 13
packages/app/src/pages/storage/filter/index.tsx

@@ -2,7 +2,7 @@ import {FilterField, FilterButtonGroup, FilterSelect} from '@components';
 import {Card, Row, Space} from 'antd';
 import {FC} from 'react';
 import {useExport, useSearch} from './hooks';
-import {useContextSection, useDictionaryOptions, useFilterField} from '@hooks';
+import {useContextSection, useFilterField} from '@hooks';
 import {searchContext} from '../context';
 
 const disableOptions = [
@@ -18,11 +18,10 @@ const Filter: FC = function() {
     type: '',
     isNotDisable: '',
   });
-  const {code, name, type, isNotDisable} = fields;
+  const {code, name, isNotDisable} = fields;
   const onSearch = useSearch(fields);
   const [isExporting, onExport] = useExport();
   const {isSearching, refetch} = useContextSection(searchContext, state => state[0]);
-  const typeOptions = useDictionaryOptions('物料类型', true);
 
   return (
     <Card>
@@ -30,13 +29,6 @@ const Filter: FC = function() {
         <Row>
           <FilterField name='storageCode' label='库位编号' value={code} onChange={onChange('code')} />
           <FilterField name='storageName' label='库位名称' value={name} onChange={onChange('name')} />
-          <FilterSelect
-            name='storageType'
-            label='物料类型'
-            value={type}
-            onChange={onChange('type')}
-            options={typeOptions}
-          />
           <FilterSelect
             name='storageState'
             label='混合库位'
@@ -44,15 +36,12 @@ const Filter: FC = function() {
             onChange={onChange('isNotDisable')}
             options={disableOptions}
           />
-        </Row>
-        <Row>
           <FilterButtonGroup
             isSearching={isSearching}
             isExporting={isExporting}
             onSearch={onSearch}
             onExport={onExport}
             onRefresh={refetch}
-            disableAlign
           />
         </Row>
       </Space>

+ 0 - 1
packages/app/src/pages/storage/table/hooks.tsx

@@ -73,7 +73,6 @@ export function useHandle(reftch: () => void) {
     {title: '库位编号', dataIndex: 'storageLocationCode', key: 'storageLocationCode'},
     {title: '库位名称', dataIndex: 'storageLocationName', key: 'storageLocationName'},
     {title: '所在仓库', dataIndex: 'wareHouseName', key: 'wareHouseName'},
-    {title: '物料类型', dataIndex: 'materialName', key: 'materialName'},
     {
       title: '是否是混合库位',
       dataIndex: 'isNotDisable',

+ 0 - 8
packages/app/src/pages/storage/table/modal/Info.tsx

@@ -15,7 +15,6 @@ type Props = {
 const StoreModalInfo: FC<Props> = function({id}) {
   const control = useFormInstance();
   useFormInfoValue(id);
-  const typeOptions = useDictionaryOptions('物料类型');
   const storageOptions = useDictionaryOptions('仓库');
 
   return (
@@ -32,13 +31,6 @@ const StoreModalInfo: FC<Props> = function({id}) {
         label='库位名称'
         control={control}
       />
-      <ModalSelect
-        name='storageLocationType'
-        width='300px'
-        label='物料类型'
-        control={control}
-        data={typeOptions}
-      />
       <ModalSelect
         name='storageWarehouse'
         width='300px'

+ 0 - 7
packages/app/src/pages/storage/table/modal/hooks.ts

@@ -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]);