From bfc43ca0e4683c1c0322a6cad5d5be2bc07decc3 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期四, 24 七月 2025 15:00:44 +0800 Subject: [PATCH] 新增调拔单功能 盘点功能优化 --- rsf-admin/src/page/basicInfo/companys/CompanysList.jsx | 39 +++++++++++++++++++++++---------------- 1 files changed, 23 insertions(+), 16 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/companys/CompanysList.jsx b/rsf-admin/src/page/basicInfo/companys/CompanysList.jsx index ce74af0..069abe4 100644 --- a/rsf-admin/src/page/basicInfo/companys/CompanysList.jsx +++ b/rsf-admin/src/page/basicInfo/companys/CompanysList.jsx @@ -41,6 +41,7 @@ import MyExportButton from '../../components/MyExportButton'; import PageDrawer from "../../components/PageDrawer"; 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'; @@ -56,16 +57,30 @@ '& .opt': { width: 200 }, + + '& .MuiTableCell-root': { + whiteSpace: 'nowrap', + overflow: 'visible', + textOverflow: 'unset' + }, })); const filters = [ <SearchInput source="condition" 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' } + ]} alwaysOn />, <TextInput source="contact" label="table.field.companys.contact" />, <TextInput source="tel" label="table.field.companys.tel" />, <TextInput source="email" label="table.field.companys.email" />, @@ -73,7 +88,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" @@ -88,7 +102,6 @@ const CompanysList = () => { const translate = useTranslate(); - const [createDialog, setCreateDialog] = useState(false); const [drawerVal, setDrawerVal] = useState(false); @@ -104,7 +117,7 @@ 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={( @@ -121,13 +134,12 @@ preferenceKey='companys' bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} rowClick={(id, resource, record) => false} - expand={() => <CompanysPanel />} - expandSingle={true} - omit={['id', 'createTime', 'createBy', 'memo']} + omit={['id', 'createTime', 'createBy', 'memo','createBy$','updateBy$','statusBool','province','city','address']} > <NumberField source="id" /> - {/* <TextField source="code" label="table.field.companys.code" /> */} + <TextField source="code" label="table.field.companys.code" /> <TextField source="name" label="table.field.companys.name" /> + <TextField source="nameEn" label="table.field.companys.nameEn" /> <TextField source="breifCode" label="table.field.companys.breifCode" /> <DictField source="type" label="table.field.companys.type" dictTypeCode={'sys_companys_type'} /> @@ -138,14 +150,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} /> -- Gitblit v1.9.1