lbq
4 天以前 72139f39a0845f8de31fd44bc5dd7077df17d48e
rsf-admin/src/page/warehouseAreas/WarehouseAreasList.jsx
@@ -67,7 +67,7 @@
}));
const filters = [
    <SearchInput source="condition" alwaysOn />,
    <SearchInput source="condition" placeholder="搜索库区名称" alwaysOn />,
    <ReferenceInput
        source="warehouseId"
        label="table.field.loc.warehouseId"
@@ -79,42 +79,41 @@
            filterToQuery={(val) => ({ name: val })}
        />
    </ReferenceInput>,
    <TextInput source="uuid" label="table.field.warehouseAreas.uuid" />,
    <TextInput source="name" label="table.field.warehouseAreas.name" />,
    // <TextInput source="uuid" label="table.field.warehouseAreas.uuid" />,
    <TextInput source="code" label="table.field.warehouseAreas.code" />,
    <TextInput source="name" label="table.field.warehouseAreas.name" />,
    <ReferenceInput source="shipperId" label="table.field.warehouseAreas.shipperId" reference="shipper">
        <AutocompleteInput label="table.field.warehouseAreas.shipperId" optionText="name" filterToQuery={(val) => ({ name: val })} />
    </ReferenceInput>,
    <NumberInput source="supplierId" label="table.field.warehouseAreas.supplierId" />,
    <SelectInput source="flagMinus" label="table.field.warehouseAreas.flagMinus"
        choices={[
            { id: 0, name: '否' },
            { id: 1, name: '是' },
        ]}
    />,
    <SelectInput source="flagLabelMange" label="table.field.warehouseAreas.flagLabelMange"
        choices={[
            { id: 0, name: ' 否' },
            { id: 1, name: ' 是' },
        ]}
    />,
    <SelectInput source="flagMix" label="table.field.warehouseAreas.flagMix"
        choices={[
            { id: 0, name: '否' },
            { id: 1, name: '是' },
        ]}
    />,
    <TextInput label="common.field.memo" source="memo" />,
    <SelectInput
        label="common.field.status"
        source="status"
        choices={[
            { id: '1', name: 'common.enums.statusTrue' },
            { id: '0', name: 'common.enums.statusFalse' },
        ]}
        resettable
    />,
    // <SelectInput source="flagMinus" label="table.field.warehouseAreas.flagMinus"
    //     choices={[
    //         { id: 0, name: '否' },
    //         { id: 1, name: '是' },
    //     ]}
    // />,
    // <SelectInput source="flagLabelMange" label="table.field.warehouseAreas.flagLabelMange"
    //     choices={[
    //         { id: 0, name: ' 否' },
    //         { id: 1, name: ' 是' },
    //     ]}
    // />,
    // <SelectInput source="flagMix" label="table.field.warehouseAreas.flagMix"
    //     choices={[
    //         { id: 0, name: '否' },
    //         { id: 1, name: '是' },
    //     ]}
    // />,
    // <TextInput label="common.field.memo" source="memo" />,
    // <SelectInput
    //     label="common.field.status"
    //     source="status"
    //     choices={[
    //         { id: '1', name: 'common.enums.statusTrue' },
    //         { id: '0', name: 'common.enums.statusFalse' },
    //     ]}
    //     resettable
    // />,
]
const WarehouseAreasList = () => {
@@ -147,9 +146,6 @@
                )}
                perPage={DEFAULT_PAGE_SIZE}
            > 
                <StyledDatagrid                                    
                    preferenceKey='warehouseAreas'
                    bulkActionButtons={
@@ -161,23 +157,17 @@
                        </>
                    }
                    rowClick={(id, resource, record) => false}
                    omit={['id', 'createTime', 'createBy', 'memo','statusBool','flagMix$','flagLabelMange$','shipperId$','supplierId']}
                    omit={['id', 'createTime', 'createBy', 'statusBool', 'flagLabelMange$','shipperId$','supplierId', 'updateBy', 'updateTime']}
                >
                    <NumberField source="id" />
                    {/* <TextField source="uuid" label="table.field.warehouseAreas.uuid" /> */}
                    <TextField source="code" label="table.field.warehouseAreas.code" />
                    <TextField source="name" label="table.field.warehouseAreas.name" />
                    <TextField source="type$" label="table.field.warehouseAreas.type"/>
                    {/* <ReferenceField source="shipperId" label="table.field.warehouseAreas.shipperId" reference="shipper" link={false} sortable={false}>
                        <TextField source="name" />
                    </ReferenceField> */}
                    <TextField source="warehouseId$" label="table.field.warehouseAreas.wareId" />
                    <TextField source="code" label="table.field.warehouseAreas.code" />
                    <TextField source="name" label="table.field.warehouseAreas.name" />
                    <TextField source="type$" label="table.field.warehouseAreas.type"/>
                    <TextField source="shipperId$" label="table.field.warehouseAreas.shipperId" />
                    <NumberField source="supplierId" label="table.field.warehouseAreas.supplierId" />
                    <TextField source="flagMinus$" label="table.field.warehouseAreas.flagMinus" sortable={false} />
                    <TextField source="flagLabelMange$" label="table.field.warehouseAreas.flagLabelMange" sortable={false} />
                    <TextField source="flagMix$" label="table.field.warehouseAreas.flagMix" sortable={false} />
                    <TextField source="flagMinus$" label="table.field.warehouseAreas.flagMinus" sortable={false} />
                    <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
                        <TextField source="nickname" />
                    </ReferenceField>
@@ -186,12 +176,18 @@
                        <TextField source="nickname" />
                    </ReferenceField>
                    <DateField source="createTime" label="common.field.createTime" showTime />
                    <BooleanField source="statusBool" label="common.field.status" sortable={false} />
                    {/* <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 sx={{ padding: '1px', fontSize: '.75rem' }} />
                        <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
                    </WrapperField>
                    {/* <TextField source="flagLabelMange$" label="table.field.warehouseAreas.flagLabelMange" sortable={false} /> */}
                    {/* <TextField source="uuid" label="table.field.warehouseAreas.uuid" /> */}
                    {/* <ReferenceField source="shipperId" label="table.field.warehouseAreas.shipperId" reference="shipper" link={false} sortable={false}>
                        <TextField source="name" />
                    </ReferenceField> */}
                </StyledDatagrid>
                
            </List>