From bd26cd9c33c3e097f15d47105ea969b4e10aa333 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期二, 05 八月 2025 13:02:16 +0800 Subject: [PATCH] 新增库存调整弹框 --- rsf-admin/src/page/stockManage/locRevise/LocReviseCreate.jsx | 106 ++++++++++++++++++++++++++-------------------------- 1 files changed, 53 insertions(+), 53 deletions(-) diff --git a/rsf-admin/src/page/stockManage/locRevise/LocReviseCreate.jsx b/rsf-admin/src/page/stockManage/locRevise/LocReviseCreate.jsx index d8b8919..daf0441 100644 --- a/rsf-admin/src/page/stockManage/locRevise/LocReviseCreate.jsx +++ b/rsf-admin/src/page/stockManage/locRevise/LocReviseCreate.jsx @@ -342,20 +342,20 @@ const notify = useNotify(); const [columns, setColumns] = useState([ { - field: 'maktx', - headerName: translate('table.field.outStockItem.maktx'), - width: 250, + field: 'code', + headerName: translate('table.field.locItem.locCode'), + width: 100, editable: false, }, { - field: 'matnrCode', - headerName: translate('table.field.outStockItem.matnrCode'), + field: 'areaId', + headerName: translate('table.field.loc.areaId'), width: 130, editable: false, }, { - field: 'anfme', - headerName: translate('table.field.outStockItem.anfme'), + field: 'type', + headerName: translate('table.field.loc.type'), type: 'number', minWidth: 100, flex: 1, @@ -363,8 +363,8 @@ valueFormatter: (val) => val < 0 ? 0 : val, }, { - field: 'splrCode', - headerName: translate('table.field.outStockItem.splrCode'), + field: 'warehouseId', + headerName: translate('table.field.loc.warehouseId'), minWidth: 100, flex: 1, editable: true, @@ -373,8 +373,8 @@ ), }, { - field: 'splrName', - headerName: translate('table.field.outStockItem.splrName') + "*", + field: 'useStatus', + headerName: translate('table.field.loc.useStatus') + "*", minWidth: 100, flex: 1, editable: true, @@ -383,18 +383,32 @@ ), }, { - field: 'batch', - headerName: translate('table.field.outStockItem.splrBatch'), + field: 'channel', + headerName: translate('table.field.loc.channel'), minWidth: 100, flex: 1, editable: true, }, { - field: 'stockUnit', - headerName: translate('table.field.outStockItem.stockUnit'), + field: 'row', + headerName: translate('table.field.loc.row'), minWidth: 100, flex: 1, - editable: true, + editable: false, + }, + { + field: 'col', + headerName: translate('table.field.loc.col'), + minWidth: 100, + flex: 1, + editable: false, + }, + { + field: 'lev', + headerName: translate('table.field.loc.lev'), + minWidth: 100, + flex: 1, + editable: false, }, ]) @@ -414,49 +428,39 @@ let cdata = useRef([]); - useEffect(() => { - if (extendColumns == undefined || extendColumns.length < 1) { - getDynamicFields(); - } - }, []); + // useEffect(() => { + // if (extendColumns == undefined || extendColumns.length < 1) { + // getDynamicFields(); + // } + // }, []); useEffect(() => { cdata.current = tabelData }, [tabelData]); - const getDynamicFields = async () => { - const { - data: { code, data, msg }, - } = await request.get("/fields/enable/list"); - if (code === 200) { - const cols = data.map(el => ({ - field: el.fields, - headerName: el.fieldsAlise, - minWidth: 100, - flex: 1, - editable: false - })) - setColumns([...columns, ...cols, action]) - setExtendColumns(cols); - } else { - notify(msg); - } - } - + // const getDynamicFields = async () => { + // const { + // data: { code, data, msg }, + // } = await request.get("/fields/enable/list"); + // if (code === 200) { + // const cols = data.map(el => ({ + // field: el.fields, + // headerName: el.fieldsAlise, + // minWidth: 100, + // flex: 1, + // editable: false + // })) + // setColumns([...columns, ...cols, action]) + // setExtendColumns(cols); + // } else { + // notify(msg); + // } + // } const handleDelete = (row) => { const newData = _.filter(cdata.current, (item) => item.matnrId !== row.matnrId); setTableData(newData); - }; - - - const processRowUpdate = (newRow, oldRow) => { - const rows = tabelData.map((r) => - r.matnrId === newRow.matnrId ? { ...newRow } : r - ) - setTableData(rows) - return newRow; }; const handleSelectionChange = (ids) => { @@ -464,11 +468,7 @@ }; tableRef.current = useGridApiRef(); - const tableIds = tabelData.map(map => map.id); - // setSelectedRows(tableIds); - // // console.log(selectedRows); - return ( <Box> -- Gitblit v1.9.1