| | |
| | | ]; |
| | | |
| | | const INFO_FIELDS = [ |
| | | { labelKey: 'table.field.sta.uuid', valueKey: 'uuid' }, |
| | | // { labelKey: 'table.field.sta.uuid', valueKey: 'uuid' }, |
| | | { labelKey: 'table.field.sta.zoneId', valueKey: 'zoneId$' }, |
| | | { labelKey: 'table.field.sta.staType', valueKey: 'staType$' }, |
| | | { labelKey: 'table.field.sta.code', valueKey: 'code$' }, |
| | | { labelKey: 'table.field.sta.capacity', valueKey: 'capacity' }, |
| | | { labelKey: 'table.field.sta.offset', valueKey: 'offset' }, |
| | | { labelKey: 'table.field.sta.rsvInCnt', valueKey: 'rsvInCnt' }, |
| | | { labelKey: 'table.field.sta.rsvOutCnt', valueKey: 'rsvOutCnt' }, |
| | | { labelKey: 'table.field.sta.staSts', valueKey: 'staSts$' }, |
| | | // { labelKey: 'table.field.sta.staSts', valueKey: 'staSts$' }, |
| | | { labelKey: 'table.field.sta.offset', valueKey: 'offset' }, |
| | | { labelKey: 'table.field.sta.zpallet', valueKey: 'zpallet' }, |
| | | ]; |
| | | const StaPanel = () => { |
| | |
| | | setIsReservesLoading(true); |
| | | dataProvider.getList('staReserve', { |
| | | pagination: { page: 1, perPage: 10 }, |
| | | sort: { field: 'updateTime', order: 'DESC' }, |
| | | sort: { field: 'updateTime', order: 'desc' }, |
| | | filter: { staId: record.id }, |
| | | }) |
| | | .then(({ data }) => { |
| | | }).then(({ data }) => { |
| | | if (!isMounted) return; |
| | | setReserves(data || []); |
| | | }) |
| | | .catch(() => { |
| | | }).catch(() => { |
| | | if (!isMounted) return; |
| | | setReserves([]); |
| | | }) |
| | | .finally(() => { |
| | | }).finally(() => { |
| | | if (!isMounted) return; |
| | | setIsReservesLoading(false); |
| | | }); |
| | |
| | | |
| | | return ( |
| | | <> |
| | | <Card sx={{ width: { xs: 320, sm: 560, md: 680, lg: 900 }, margin: 'auto', mt: .5, mb: .5 }}> |
| | | <Card sx={{ maxWidth: '80%', margin: 'auto', mt: .5, mb: .5 }}> |
| | | <CardContent> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'space-between' }}> |
| | | <Typography variant="h6" gutterBottom align="left" sx={{ |
| | | <Typography variant="subtitle2" gutterBottom align="left" sx={{ |
| | | maxWidth: { xs: '140px', sm: '220px', md: '300px', lg: '360px' }, |
| | | whiteSpace: 'nowrap', |
| | | overflow: 'hidden', |
| | |
| | | }}> |
| | | {Common.camelToPascalWithSpaces(translate('table.field.sta.staNo'))}: {record.staNo} |
| | | </Typography> |
| | | <Typography variant="h6" gutterBottom align="right" > |
| | | ID: {record.id} |
| | | </Typography> |
| | | </Grid> |
| | | </Grid> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={12} container alignContent="flex-end"> |
| | | <Typography variant="caption" color="textSecondary" sx={{ wordWrap: 'break-word', wordBreak: 'break-all' }}> |
| | | {Common.camelToPascalWithSpaces(translate('common.field.memo'))}:{record.memo || '-'} |
| | | </Typography> |
| | | </Grid> |
| | | </Grid> |
| | | <Box height={16}> </Box> |
| | | |
| | | <Box height={12}> </Box> |
| | | |
| | | <Grid container spacing={2}> |
| | | {INFO_FIELDS.map(({ labelKey, valueKey }) => ( |
| | | <Grid item xs={12} sm={6} md={4} key={labelKey}> |
| | |
| | | |
| | | <Divider sx={{ my: 2 }} /> |
| | | |
| | | <Typography variant="subtitle2" color="textSecondary" gutterBottom> |
| | | {translate('common.field.status')} / {translate('table.field.sta.staNo')} |
| | | </Typography> |
| | | {/* <Typography variant="subtitle2" color="textSecondary" gutterBottom> |
| | | {translate('common.field.status')} |
| | | </Typography> */} |
| | | <Grid container spacing={2}> |
| | | {STATUS_FIELDS.map(({ key, labelKey }) => ( |
| | | <Grid item xs={6} sm={3} key={key}> |
| | |
| | | </Grid> |
| | | ))} |
| | | </Grid> |
| | | |
| | | <Divider sx={{ my: 2 }} /> |
| | | |
| | | <Box> |
| | |
| | | <Typography variant="caption" color="textSecondary"> |
| | | {Common.camelToPascalWithSpaces(translate(labelKey))} |
| | | </Typography> |
| | | <Typography variant="body2" fontWeight={600}> |
| | | <Typography variant="body2" fontWeight={400}> |
| | | {formatInfoValue(value)} |
| | | </Typography> |
| | | </Stack> |