| | |
| | | import ConfirmationNumberIcon from '@mui/icons-material/ConfirmationNumber'; |
| | | import DialogCloseButton from "../../components/DialogCloseButton.jsx"; |
| | | import WarehouseSelect from "../../components/WarehouseSelect.jsx"; |
| | | import { useFormContext, useWatch } from "react-hook-form"; |
| | | import { DataGrid, useGridApiRef } from '@mui/x-data-grid'; |
| | | import ConfirmButton from "../../components/ConfirmButton"; |
| | | import { useFormContext, useWatch } from "react-hook-form"; |
| | | import CreateBySelectMats from "./CreateBySelectMats.jsx"; |
| | | import { Add, Edit, Delete } from '@mui/icons-material'; |
| | | import DictSelect from "../../components/DictSelect"; |
| | |
| | | } |
| | | |
| | | const newAddClick = () => { |
| | | if (formData.orgAreaId == null || formData.orgAreaId == undefined) { |
| | | if (!formData.orgAreaId) { |
| | | notify("原库区不能为空!!", { type: 'error' }) |
| | | return |
| | | } |
| | | if (formData.tarAreaId == null || formData.tarAreaId == undefined) { |
| | | if (!formData.tarAreaId) { |
| | | notify("目标库区不能为空!!", { type: 'error' }) |
| | | return |
| | | } |
| | | console.log(formData); |
| | | |
| | | setCreateDialog(true) |
| | | } |
| | | |
| | |
| | | </Grid> |
| | | <Grid item md={2}> |
| | | <WarehouseSelect |
| | | name="orgAreaId" |
| | | value={formData.orgAreaId} |
| | | variant="filled" |
| | | dictTypeCode="warehouse" |
| | |
| | | </Grid> |
| | | <Grid item md={2}> |
| | | <WarehouseSelect |
| | | name="tarAreaId" |
| | | label={translate("table.field.transfer.tarAreaName")} |
| | | value={formData.tarAreaId} |
| | | dictTypeCode="warehouse" |
| | |
| | | </Button> |
| | | </Toolbar> |
| | | <CreateBySelectMats |
| | | data={tabelData} |
| | | queryForm={formData} |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | selectedRows={selectedRows} |
| | | setSelectedRows={setSelectedRows} |
| | | data={tabelData} |
| | | setData={setTableData} |
| | | /> |
| | | </Box> |
| | |
| | | const tableIds = tabelData.map(map => map.id); |
| | | // setSelectedRows(tableIds); |
| | | // // console.log(selectedRows); |
| | | |
| | | |
| | | |
| | | return ( |
| | | <Box> |
| | |
| | | }, |
| | | }, |
| | | }} |
| | | pageSizeOptions={[15, 25, 50, 100]} |
| | | pageSizeOptions={[10, 20, 50, 100]} |
| | | editMode="row" |
| | | processRowUpdate={processRowUpdate} |
| | | checkboxSelection |
| | | rowSelectionModel={tableIds} |
| | | onRowSelectionModelChange={handleSelectionChange} |