| | |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .RaList-content': { |
| | | '& .RaList-content': { |
| | | width: '200px' |
| | | }, |
| | | '& .RaList-main': { |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | |
| | | <TextInput source="name" label="table.field.matnr.name" alwaysOn />, |
| | | <TextInput source="code" label="table.field.matnr.code" alwaysOn />, |
| | | <ReferenceInput source="shipperId$" label="table.field.matnr.shipperId" reference="shipper"> |
| | |
| | | <NumberInput source="valid" label="table.field.matnr.valid" />, |
| | | <NumberInput source="validWarn" label="table.field.matnr.validWarn" />, |
| | | <NumberInput source="flagCheck" label="table.field.matnr.flagCheck" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const { isLoading } = useListContext(); |
| | | |
| | | const [columns, setColumns] = useState([]); |
| | | const refresh = useRefresh(); |
| | | |
| | | useEffect(() => { |
| | | getDynamicFields(); |
| | | }, []); |
| | |
| | | <NumberField key="stagn" source="stagn" label="table.field.matnr.stagn" />, |
| | | <NumberField key="valid" source="valid" label="table.field.matnr.valid" />, |
| | | <NumberField key="validWarn" source="validWarn" label="table.field.matnr.validWarn" />, |
| | | <NumberField key="flagCheck" source="flagCheck" label="table.field.matnr.flagCheck" />, |
| | | <BooleanField key="flagCheck" source="flagCheck" label="table.field.matnr.flagCheck" sortable={false} />, |
| | | <ReferenceField key="updateBy" source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField>, |
| | |
| | | const fields = data.map(el => <TextField key={el.fields} source={`extendFields.[${el.fields}]`} label={el.fieldsAlise} />) |
| | | const opt = <WrapperField key="opt" cellClassName="fixed" className="fixed" label="common.field.opt"> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <EnableButton /> |
| | | <PrintButton /> |
| | | </WrapperField> |
| | | setColumns([...arr, ...fields, opt]); |
| | | |
| | | //filters添加过滤字段 |
| | | data.map(el => { |
| | | var i =0; |
| | | filters.map((item) =>{ |
| | | if(item.key === el.fields){ |
| | | i = 1; |
| | | } |
| | | }) |
| | | i===0 && filters.push(<TextInput key={el.fields} source={el.fields} label={el.fieldsAlise} />) |
| | | }) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | |
| | | preferenceKey='matnr' |
| | | bulkActionButtons={<> |
| | | <BatchGroupButton /> |
| | | <BatchWarnButton /> |
| | | <BatchFlagButton /> |
| | | <BatchStatusButton /> |
| | | <BatchLevelButton /> |
| | | <BindButton /> |
| | | <PrintButton /> |
| | | <BatchPrintButton /> |
| | | <BulkDeleteButton mutationMode={OPERATE_MODE} /> |
| | | </>} |
| | | rowClick={(id, resource, record) => false} |
| | |
| | | |
| | | const MatnrList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const notify = useNotify(); |
| | |
| | | ) |
| | | } |
| | | |
| | | const BatchWarnButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | | return ( |
| | | <> |
| | | <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchValidWarn"}> |
| | | <EditIcon /> |
| | | </Button> |
| | | |
| | | <BatchModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | fieldType={'validWarn'} |
| | | /> |
| | | </> |
| | | |
| | | ) |
| | | } |
| | | |
| | | const BatchFlagButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | | return ( |
| | | <> |
| | | <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchFlagCheck"}> |
| | | <EditIcon /> |
| | | </Button> |
| | | |
| | | <BatchModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | fieldType={'flagCheck'} |
| | | /> |
| | | </> |
| | | |
| | | ) |
| | | } |
| | | |
| | | const BatchGroupButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | |
| | | ) |
| | | } |
| | | |
| | | const PrintButton = () => { |
| | | const BatchPrintButton = () => { |
| | | const record = useRecordContext(); |
| | | const { resource, selectedIds } = useListContext(); |
| | | const notify = useNotify(); |
| | |
| | | ) |
| | | } |
| | | |
| | | const PrintButton = () => { |
| | | const record = useRecordContext(); |
| | | |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | | return ( |
| | | <> |
| | | <Button color="secondary" onClick={() => setCreateDialog(true)} label={"toolbar.print"}> |
| | | <PrintIcon /> |
| | | </Button> |
| | | |
| | | <PrintModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | rows={[record.id]} |
| | | /> |
| | | </> |
| | | ) |
| | | } |
| | | |
| | | const BindButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |