| | |
| | | earlier: 'Earlier...', |
| | | }, |
| | | validate: { |
| | | pwdMisMatch: 'The password confirmation is not the same as the password.' |
| | | pwdMisMatch: 'The password confirmation is not the same as the password.', |
| | | gtZero: 'The value must be greater than 0.', |
| | | }, |
| | | settings: { |
| | | base: 'Base', |
| | |
| | | earlier: '更早...', |
| | | }, |
| | | validate: { |
| | | pwdMisMatch: '密码不一致' |
| | | pwdMisMatch: '密码不一致', |
| | | gtZero: '请输入大于0的数值', |
| | | }, |
| | | settings: { |
| | | base: '基本设置', |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import React, { useMemo } from "react"; |
| | | import { |
| | | CreateBase, |
| | | useTranslate, |
| | |
| | | |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const greaterThanZero = useMemo(() => (value) => { |
| | | if (value === undefined || value === null || value === '') { |
| | | return undefined; |
| | | } |
| | | return Number(value) >= 0 ? undefined : translate('validate.gtZero'); |
| | | }, [translate]); |
| | | |
| | | const handleClose = (event, reason) => { |
| | | if (reason !== "backdropClick") { |
| | |
| | | <NumberInput |
| | | label="table.field.sta.capacity" |
| | | source="capacity" |
| | | validate={required()} |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | </Grid> |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | <NumberInput |
| | | label="table.field.sta.height" |
| | | source="height" |
| | | validate={required()} |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.sta.depth" |
| | | source="depth" |
| | | validate={required()} |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.sta.angle" |
| | | source="angle" |
| | | validate={required()} |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.sta.inboundWait" |
| | | source="inboundWait" |
| | | validate={greaterThanZero} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.sta.outboundWait" |
| | | source="outboundWait" |
| | | validate={greaterThanZero} |
| | | /> |
| | | </Grid> |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | {/* <Typography variant="subtitle2" color="textSecondary" gutterBottom> |
| | | {translate('common.field.status')} |
| | | </Typography> */} |
| | | <Grid container spacing={2}> |
| | | {/* <Grid container spacing={2}> |
| | | {STATUS_FIELDS.map(({ key, labelKey }) => ( |
| | | <Grid item xs={6} sm={3} key={key}> |
| | | <StatusIndicator labelKey={labelKey} value={record[key]} /> |
| | | </Grid> |
| | | ))} |
| | | </Grid> |
| | | <Divider sx={{ my: 2 }} /> |
| | | <Divider sx={{ my: 2 }} /> */} |
| | | |
| | | <Box> |
| | | <Typography variant="subtitle1" gutterBottom> |
| | |
| | | backgroundColor: 'action.selected', |
| | | }; |
| | | } |
| | | if (record.staType$ === 'ROLLER') |
| | | return { |
| | | ...style, |
| | | borderLeftColor: orange[500], |
| | | borderLeftWidth: 5, |
| | | borderLeftStyle: 'solid', |
| | | }; |
| | | if (record.staType$ === 'RACK') |
| | | return { |
| | | ...style, |
| | | borderLeftColor: blue[500], |
| | | borderLeftWidth: 5, |
| | | borderLeftStyle: 'solid', |
| | | }; |
| | | if (record.connect) |
| | | return { |
| | | ...style, |
| | |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.common.SpringUtils; |
| | | import com.zy.acs.manager.manager.service.CodeService; |
| | | import com.zy.acs.manager.manager.service.StaTypeService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | // return null; |
| | | // } |
| | | // |
| | | // public String getStaType$(){ |
| | | // StaTypeService service = SpringUtils.getBean(StaTypeService.class); |
| | | // StaType staType = service.getById(this.staType); |
| | | // if (!Cools.isEmpty(staType)){ |
| | | // return String.valueOf(staType.getName()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | public String getStaType$(){ |
| | | StaTypeService service = SpringUtils.getBean(StaTypeService.class); |
| | | StaType staType = service.getById(this.staType); |
| | | if (!Cools.isEmpty(staType)){ |
| | | return String.valueOf(staType.getUuid()); |
| | | } |
| | | return null; |
| | | } |
| | | // |
| | | public String getCode$(){ |
| | | CodeService service = SpringUtils.getBean(CodeService.class); |