zjj
2025-05-19 83e3d34abd06c0256f61382c4c9cf89c4be109d8
rsf-admin/src/page/basicInfo/companys/CompanysList.jsx
@@ -40,7 +40,8 @@
import MyCreateButton from "../../components/MyCreateButton";
import MyExportButton from '../../components/MyExportButton';
import PageDrawer from "../../components/PageDrawer";
import MyField from "../../components/MyField";
import DictField from "../../components/DictField";
import DictSelect from "../../components/DictSelect";
import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
import * as Common from '@/utils/common';
@@ -60,14 +61,20 @@
const filters = [
    <SearchInput source="condition" alwaysOn />,
    <DateInput label='common.time.after' source="timeStart" alwaysOn />,
    <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
    <TextInput source="code" label="table.field.companys.code" />,
    <TextInput source="name" label="table.field.companys.name" />,
    <TextInput source="nameEn" label="table.field.companys.nameEn" />,
    <TextInput source="breifCode" label="table.field.companys.breifCode" />,
    <TextInput source="type" label="table.field.companys.type" />,
    //   <ReferenceInput source="type" reference="dictData" filter={{ dictTypeCode: 'sys_companys_type' }} label="table.field.companys.type">
    //     <AutocompleteInput label="table.field.companys.type" optionValue="value"/>
    //   </ReferenceInput>,
    <SelectInput label="table.field.companys.type" source="type"
        choices={[
            { id: 'shipper', name: 'common.field.shipper' },
            { id: 'customer', name: 'common.field.customer' },
            { id: 'supplier', name: 'common.field.supplier' },
            { id: 'partners', name: 'common.field.partners' }
        ]} />,
    <TextInput source="contact" label="table.field.companys.contact" />,
    <TextInput source="tel" label="table.field.companys.tel" />,
    <TextInput source="email" label="table.field.companys.email" />,
@@ -75,7 +82,6 @@
    <TextInput source="province" label="table.field.companys.province" />,
    <TextInput source="city" label="table.field.companys.city" />,
    <TextInput source="address" label="table.field.companys.address" />,
    <TextInput label="common.field.memo" source="memo" />,
    <SelectInput
        label="common.field.status"
@@ -90,7 +96,6 @@
const CompanysList = () => {
    const translate = useTranslate();
    const [createDialog, setCreateDialog] = useState(false);
    const [drawerVal, setDrawerVal] = useState(false);
@@ -103,10 +108,10 @@
                        theme.transitions.create(['all'], {
                            duration: theme.transitions.duration.enteringScreen,
                        }),
                    marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
                    marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
                }}
                title={"menu.companys"}
                empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
                empty={false}
                filters={filters}
                sort={{ field: "create_time", order: "desc" }}
                actions={(
@@ -123,16 +128,14 @@
                    preferenceKey='companys'
                    bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
                    rowClick={(id, resource, record) => false}
                    expand={() => <CompanysPanel />}
                    expandSingle={true}
                    omit={['id', 'createTime', 'createBy', 'memo']}
                >
                    <NumberField source="id" />
                    <TextField source="code" label="table.field.companys.code" />
                    <TextField source="name" label="table.field.companys.name" />
                    <TextField source="code" label="table.field.companys.code" />
                    <TextField source="nameEn" label="table.field.companys.nameEn" />
                    <TextField source="breifCode" label="table.field.companys.breifCode" />
                    <TextField source="type" label="table.field.companys.type" />
                    <DictField source="type" label="table.field.companys.type" dictTypeCode={'sys_companys_type'} />
                    <TextField source="contact" label="table.field.companys.contact" />
                    <TextField source="tel" label="table.field.companys.tel" />
                    <TextField source="email" label="table.field.companys.email" />
@@ -140,14 +143,9 @@
                    <TextField source="province" label="table.field.companys.province" />
                    <TextField source="city" label="table.field.companys.city" />
                    <TextField source="address" label="table.field.companys.address" />
                    <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
                        <TextField source="nickname" />
                    </ReferenceField>
                    <TextField source="updateBy$" label="common.field.updateBy" />
                    <DateField source="updateTime" label="common.field.updateTime" showTime />
                    <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}>
                        <TextField source="nickname" />
                    </ReferenceField>
                    <TextField source="createBy$" label="common.field.createBy" />
                    <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} />