copy from rsf-admin/src/page/stock/StockPanel.jsx
copy to rsf-admin/src/page/basicInfo/companys/CompanysPanel.jsx
File was copied from rsf-admin/src/page/stock/StockPanel.jsx |
| | |
| | | useTranslate, |
| | | useRecordContext, |
| | | } from 'react-admin'; |
| | | import PanelTypography from "../components/PanelTypography"; |
| | | import PanelTypography from "../../components/PanelTypography"; |
| | | import * as Common from '@/utils/common' |
| | | |
| | | const StockPanel = () => { |
| | | const CompanysPanel = () => { |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | | const translate = useTranslate(); |
| | |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | }}> |
| | | {Common.camelToPascalWithSpaces(translate('table.field.stock.id'))}: {record.id} |
| | | {Common.camelToPascalWithSpaces(translate('table.field.companys.name'))}: {record.name} |
| | | </Typography> |
| | | {/* inherit, primary, secondary, textPrimary, textSecondary, error */} |
| | | <Typography variant="h6" gutterBottom align="right" > |
| | |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.asnOrder" |
| | | property={record.asnOrder} |
| | | title="table.field.companys.code" |
| | | property={record.code} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpToken" |
| | | property={record.erpToken} |
| | | title="table.field.companys.name" |
| | | property={record.name} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpOrder" |
| | | property={record.erpOrder} |
| | | title="table.field.companys.nameEn" |
| | | property={record.nameEn} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpStkAdr" |
| | | property={record.erpStkAdr} |
| | | title="table.field.companys.breifCode" |
| | | property={record.breifCode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.contractId" |
| | | property={record.contractId$} |
| | | title="table.field.companys.type" |
| | | property={record.type} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockReason" |
| | | property={record.lockReason} |
| | | title="table.field.companys.contact" |
| | | property={record.contact} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockStatus" |
| | | property={record.lockStatus} |
| | | title="table.field.companys.tel" |
| | | property={record.tel} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.locker" |
| | | property={record.locker} |
| | | title="table.field.companys.email" |
| | | property={record.email} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockedTime" |
| | | property={record.lockedTime$} |
| | | title="table.field.companys.pcode" |
| | | property={record.pcode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.companys.province" |
| | | property={record.province} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.companys.city" |
| | | property={record.city} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.companys.address" |
| | | property={record.address} |
| | | /> |
| | | </Grid> |
| | | |
| | |
| | | ); |
| | | }; |
| | | |
| | | export default StockPanel; |
| | | export default CompanysPanel; |