| | |
| | | PRIMARY KEY (`id`) |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
| | | |
| | | update man_loc set comp_direct =2 where comp_direct =0 |
| | | update man_loc set comp_direct =2 where comp_direct =0 |
| | | |
| | | alter table man_sta |
| | | add act_dir int(1) null comment '作业方向' after angle; |
| | |
| | | }, |
| | | levOffset: 'lev offset', |
| | | bottomOffset: 'bottom offset', |
| | | enums: { |
| | | compDirect: { |
| | | left: 'Left', |
| | | right: 'Right', |
| | | forward: 'Forward', |
| | | }, |
| | | }, |
| | | }, |
| | | sta: { |
| | | depthHint: 'Set depth to 0 to keep the default value.', |
| | |
| | | }, |
| | | levOffset: '每层高度', |
| | | bottomOffset: '底部偏移量', |
| | | enums: { |
| | | compDirect: { |
| | | left: '左', |
| | | right: '右', |
| | | forward: '前', |
| | | }, |
| | | }, |
| | | }, |
| | | sta: { |
| | | depthHint: '深度设置为 0 表示沿用默认值。', |
| | |
| | | import DialogCloseButton from "../components/DialogCloseButton"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import { compDirectChoices } from "./compDirect"; |
| | | |
| | | const LocCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | |
| | | <SelectInput |
| | | label="table.field.loc.compDirect" |
| | | source="compDirect" |
| | | choices={[ |
| | | { id: 1, name: '大于' }, |
| | | { id: 0, name: '小于' }, |
| | | ]} |
| | | choices={compDirectChoices} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | import CustomerTopToolBar from "../components/EditTopToolBar"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import { compDirectChoices } from "./compDirect"; |
| | | |
| | | const FormToolbar = () => { |
| | | const { getValues } = useFormContext(); |
| | |
| | | <SelectInput |
| | | label="table.field.loc.compDirect" |
| | | source="compDirect" |
| | | choices={[ |
| | | { id: 1, name: '大于' }, |
| | | { id: 0, name: '小于' }, |
| | | ]} |
| | | choices={compDirectChoices} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | |
| | | import DialogCloseButton from "../components/DialogCloseButton"; |
| | | import CheckIcon from '@mui/icons-material/Check'; |
| | | import request from '@/utils/request' |
| | | import { compDirectChoices } from "./compDirect"; |
| | | |
| | | const LocInit = (props) => { |
| | | const { open, setOpen } = props; |
| | |
| | | <SelectInput |
| | | label="table.field.loc.compDirect" |
| | | source="compDirect" |
| | | choices={[ |
| | | { id: 1, name: '大于' }, |
| | | { id: 0, name: '小于' }, |
| | | ]} |
| | | choices={compDirectChoices} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | ) |
| | | } |
| | | |
| | | export default LocInit; |
| | | export default LocInit; |
| | |
| | | DeleteButton, |
| | | Button, |
| | | Pagination, |
| | | FunctionField, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | import rowSx from "./rowSx"; |
| | | import BulkUpdateButton from "../components/BulkUpdateButton"; |
| | | import LocBulkUpdateContent from './LocBulkUpdateContent'; |
| | | import { getCompDirectLabel } from './compDirect'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | <ReferenceField source="code" label="table.field.loc.code" reference="code" link={false} sortable={false}> |
| | | <TextField source="data" /> |
| | | </ReferenceField> |
| | | {/* <TextField source="compDirect$" label="table.field.loc.compDirect" sortable={false} /> */} |
| | | <FunctionField |
| | | label="table.field.loc.compDirect" |
| | | sortable={false} |
| | | render={(record) => getCompDirectLabel(translate, record?.compDirect)} |
| | | /> |
| | | <ReferenceField source="locSts" label="table.field.loc.locSts" reference="locSts" link={false} sortable={true}> |
| | | <TextField source="name" /> |
| | | </ReferenceField> |
| | |
| | | } from 'react-admin'; |
| | | import PanelTypography from "../components/PanelTypography"; |
| | | import * as Common from '@/utils/common' |
| | | import { getCompDirectLabel } from "./compDirect"; |
| | | |
| | | const LocPanel = () => { |
| | | const record = useRecordContext(); |
| | |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.loc.compDirect" |
| | | property={record.compDirect$} |
| | | property={getCompDirectLabel(translate, record.compDirect)} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| New file |
| | |
| | | const compDirectMap = { |
| | | 1: 'page.loc.enums.compDirect.left', |
| | | 2: 'page.loc.enums.compDirect.right', |
| | | 3: 'page.loc.enums.compDirect.forward', |
| | | }; |
| | | |
| | | export const compDirectChoices = [ |
| | | { id: 1, name: compDirectMap[1] }, |
| | | { id: 2, name: compDirectMap[2] }, |
| | | { id: 3, name: compDirectMap[3] }, |
| | | ]; |
| | | |
| | | export const getCompDirectLabel = (translate, compDirect, fallback = '-') => { |
| | | const key = compDirectMap[compDirect]; |
| | | if (!key) { |
| | | return fallback; |
| | | } |
| | | return typeof translate === 'function' |
| | | ? translate(key, { _: fallback }) |
| | | : key; |
| | | }; |
| | |
| | | return angle; |
| | | } |
| | | |
| | | // 坐标货架阈值 todo:luxiaotao |
| | | // 坐标货架阈值 |
| | | public AgvDirectionType calculateAgvWorkDirectionByShelf(Loc loc, Code code) { |
| | | Integer compDirect = loc.getCompDirect(); |
| | | Integer compDirect = loc.getCompDirect(); |
| | | return AgvDirectionType.fromVal(compDirect); |
| | | } |
| | | |