| | |
| | | width: 90 |
| | | }, |
| | | '& .opt': { |
| | | width: 180 |
| | | width: 210 |
| | | }, |
| | | '& .MuiTableCell-root': { |
| | | whiteSpace: 'nowrap', |
| | | overflow: 'visible', |
| | | textOverflow: 'unset' |
| | | } |
| | | })); |
| | | |
| | | const filters = [ |
| | |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | const CreateTaskButton = () => { |
| | | const record = useRecordContext(); |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const { selectedIds, onUnselectItems, data } = useListContext(); |
| | |
| | | } |
| | | |
| | | const CreateTaskRowButton = () => { |
| | | const record = useRecordContext(); |
| | | const record = useRecordContext(); |
| | | const refresh = useRefresh(); |
| | | |
| | | const createTask = (event) => { |
| | |
| | | setSource([record]) |
| | | refresh() |
| | | } |
| | | |
| | | |
| | | return ( |
| | | <> |
| | | <Button onClick={(event) => createTask(event)} label={"toolbar.createTask"}> |
| | |
| | | bulkActionButtons={ |
| | | <> |
| | | <CreateTaskButton /> |
| | | <BulkDeleteButton mutationMode={OPERATE_MODE} /> |
| | | {/* <BulkDeleteButton mutationMode={OPERATE_MODE} /> */} |
| | | </>} |
| | | rowClick='edit' |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | rowClick={false} |
| | | omit={['id', 'createTime', 'createBy', 'memo','statusBool']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.waitPakin.code" /> |
| | | <TextField source="barcode" label="table.field.waitPakin.barcode" /> |
| | | <NumberField source="anfme" label="table.field.waitPakin.anfme" /> |
| | | <TextField source="ioStatus$" label="table.field.waitPakin.ioStatus" sortable={false} /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="createTime" label="common.field.createTime" showTime /> |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <EditButton label="toolbar.detail" sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <CreateTaskRowButton /> |
| | | {/* <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> */} |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |