Browse Source

update: 调整库存信息字段

xyh 2 năm trước cách đây
mục cha
commit
d07da8d5c3

+ 6 - 0
packages/app/src/models/request/queryList.ts

@@ -40,6 +40,12 @@ export type GetStockListParams = {
   wbs: string;
   /** 所属仓库 */
   warehouseId: string;
+  /** 物料类型 */
+  wllbClass: string;
+  /** 物料类别 */
+  partType: string;
+  /** 计量单位 */
+  unitOfMeasurement: string;
 } & ListParams;
 
 export type GSInterfaceType =

+ 12 - 0
packages/app/src/models/response/queryList.ts

@@ -77,6 +77,18 @@ export type StockListData = {
   warehouseName: string;
   /** 公司编号 */
   accountSleeve: string;
+  /** 物料类型 */
+  wllbClass: string;
+  /** 单位 */
+  unitOfMeasurement: string;
+  /** 物料类别 */
+  partType: string;
+  /** 仓库编号 */
+  warehouseCode: string;
+  /** 安全库存 */
+  maxNum: string;
+  /** 库龄 */
+  day: number;
 };
 
 /** GS接口信息 */

+ 3 - 0
packages/app/src/pages/stock/context.ts

@@ -16,5 +16,8 @@ export const contextState: OriginalListParams<GetStockListParams> = {
   companyCode: '',
   supplierId: '',
   warehouseId: '',
+  wllbClass: '',
+  partType: '',
+  unitOfMeasurement: '',
 };
 export const context = createTableSearchContext(contextState);

+ 2 - 9
packages/app/src/pages/stock/filter/index.tsx

@@ -5,21 +5,14 @@ import {
   useTableSearchToolEvents,
 } from '@hooks';
 import {FC} from 'react';
-import {context, searchContext} from '../context';
+import {context, contextState, searchContext} from '../context';
 import {FilterSelectorModal, FilterTool} from '@components';
 import {fixedMap, sourceMap} from './state';
 
 const Filter: FC = function () {
   const [fields, {onChange, resetState}] = useFilterField(
     {
-      storageLocationName: '',
-      wllbCode: '',
-      materialName: '',
-      companyCode: '',
-      customerCode: '',
-      wbs: '',
-      supplierId: '',
-      warehouseId: '',
+      ...contextState,
     },
     true,
   );

+ 19 - 0
packages/app/src/pages/stock/filter/state.ts

@@ -36,4 +36,23 @@ export const sourceMap: FilterGroupMap<typeof contextState> = new Map([
     },
   ],
   ['4', {label: 'WBS编号', type: 'field', value: 'wbs'}],
+  ['5', {label: '物料类别', type: 'field', value: 'partType'}],
+  [
+    '6',
+    {
+      label: '物料类型',
+      type: 'keySelect',
+      value: 'wllbClass',
+      selectKey: '物料类型',
+    },
+  ],
+  [
+    '7',
+    {
+      label: '计量单位',
+      type: 'keySelect',
+      value: 'unitOfMeasurement',
+      selectKey: '计量单位',
+    },
+  ],
 ]);

+ 16 - 1
packages/app/src/pages/stock/table/index.tsx

@@ -20,17 +20,32 @@ import {
 const columns: ColumnsType<StockListData> = [
   {title: '物料编号', dataIndex: 'code', width: LARGE_TABLE_WIDTH},
   {title: '物料名称', dataIndex: 'name', width: HUGE_TABLE_WIDTH},
-  {title: '数量', dataIndex: 'sum', width: SMALL_TABLE_WIDTH, align: 'right'},
   {
     title: '库位名称',
     dataIndex: 'storageLocationName',
     width: NORMAL_TABLE_WIDTH,
   },
+  {title: '数量', dataIndex: 'sum', width: SMALL_TABLE_WIDTH, align: 'right'},
+  {title: '计量单位', dataIndex: 'unitOfMeasurement', width: SMALL_TABLE_WIDTH},
+  {title: '物料类型', dataIndex: 'wllbClass', width: NORMAL_TABLE_WIDTH},
+  {title: '物料类别', dataIndex: 'partType', width: NORMAL_TABLE_WIDTH},
   {title: '所属仓库', dataIndex: 'warehouseName', width: LARGE_TABLE_WIDTH},
   {title: '所属公司', dataIndex: 'companyName', width: LARGE_TABLE_WIDTH},
   {title: '公司编号', dataIndex: 'accountSleeve', width: SMALL_TABLE_WIDTH},
   {title: '供应商', dataIndex: 'supplierName', width: LARGE_TABLE_WIDTH},
   {title: 'WBS编号', dataIndex: 'wbs', width: NORMAL_TABLE_WIDTH},
+  {
+    title: '安全库存',
+    dataIndex: 'maxNum',
+    width: SMALL_TABLE_WIDTH,
+    align: 'right',
+  },
+  {
+    title: '库龄(天)',
+    dataIndex: 'day',
+    width: SMALL_TABLE_WIDTH,
+    align: 'right',
+  },
 ];
 
 const TableList: FC = function () {

+ 1 - 1
packages/app/src/utils/constants.ts

@@ -28,7 +28,7 @@ export const MODAL_PAGE_SIZE_LIST = ['5', ...PAGE_SIZE_LIST];
 /** 请求域名 */
 export const NETWORK_URL =
   process.env.NODE_ENV === 'development'
-    ? 'http://192.168.0.147:9560'
+    ? 'http://192.168.0.108:9560'
     : 'http://10.2.111.91:9560';
 export const E2E_NETWORK_URL = 'http://e2e.test.cn';
 /** 导出错误提示 */