| | |
| | | wareArea: 'Warehouse Areas', |
| | | maktx: "maktx", |
| | | matnrCode: "matnrCode", |
| | | diffQty: 'Diff Qty', |
| | | trackCode: "trackCode", |
| | | unit: "unit", |
| | | anfme: "anfme", |
| | |
| | | matnrCode: "物料编码", |
| | | trackCode: "跟踪码", |
| | | workQty: '执行数', |
| | | diffQty: '差异数量', |
| | | reviseQty: '实际数量', |
| | | deadTime: '停留时间(天)', |
| | | qty: '完成数', |
| | |
| | | useRecordContext, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { useTheme } from '@mui/material/styles'; |
| | | import CircleIcon from '@mui/icons-material/Circle'; |
| | | import { useTheme } from '@mui/material/styles'; |
| | | |
| | | const CheckDiffField = () => { |
| | | const record = useRecordContext(); |
| | |
| | | import MyCreateButton from "@/page/components/MyCreateButton"; |
| | | import MyExportButton from '@/page/components/MyExportButton'; |
| | | import PageEditDrawer from "@/page/components/PageEditDrawer"; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { Box, Typography, Card, Stack, Switch } from '@mui/material'; |
| | | import ConfirmButton from '../../components/ConfirmButton'; |
| | | import LocReviseCreate from "./LocReviseCreate"; |
| | | import TaskIcon from '@mui/icons-material/Task'; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | export default LocReviseList; |
| | |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import * as Common from '@/utils/common'; |
| | | import CheckDiffField from "../../components/CheckDiffField"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | <TextField source="unit" label="table.field.locItem.unit" /> |
| | | <NumberField source="anfme" label="table.field.locItem.anfme" /> |
| | | <NumberField source="reviseQty" label="table.field.locItem.reviseQty" /> |
| | | <CheckDiffField source="diffQty" label="table.field.locItem.diffQty" /> |
| | | <TextField source="batch" label="table.field.locItem.batch" /> |
| | | <TextField source="spec" label="table.field.locItem.spec" /> |
| | | <TextField source="model" label="table.field.locItem.model" /> |
| | |
| | | useGetOne, |
| | | } from 'react-admin'; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import { Box, Typography, Card, Stack, Switch } from '@mui/material'; |
| | | import MyCreateButton from "@/page/components/MyCreateButton"; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import ReviseLogItemList from "./ReviseLogItemList"; |
| | | import SelectLocsRevise from "./SelectLocsRevise"; |
| | | import EditIcon from '@mui/icons-material/Edit'; |
| | | import LocsReviseDetl from "./LocsReviseDetl"; |
| | | import { styled } from '@mui/material/styles'; |
| | | import * as Common from '@/utils/common'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | const ReviseLogList = ({ record }) => { |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const [checked, setChecked] = useState(true); |
| | | const [item, setItem] = useState(); |
| | | const translate = useTranslate(); |
| | | const orderId = useGetRecordId(); |
| | |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <DiffShowButton checked={checked} setChecked={setChecked}/> |
| | | <FilterButton /> |
| | | <CreateItemButton setCreateDialog={setCreateDialog} record={record} /> |
| | | <SelectColumnsButton preferenceKey='check' /> |
| | |
| | | |
| | | export default ReviseLogList; |
| | | |
| | | //显示差异开关 |
| | | const DiffShowButton = ({checked, setChecked}) => { |
| | | const handleChange = (event) => { |
| | | setChecked(event.target.checked); |
| | | }; |
| | | |
| | | return ( |
| | | <> |
| | | <Switch |
| | | checked={checked} |
| | | size="small" |
| | | onChange={handleChange} |
| | | slotProps={{ input: { 'aria-label': 'controlled' } }} |
| | | /> |
| | | </> |
| | | ) |
| | | } |
| | | |
| | | |
| | | const CreateItemButton = ({ setCreateDialog, record }) => { |
| | | return ( |
| | | record?.exceStatus < 2 ? <MyCreateButton onClick={() => { setCreateDialog(true); }} /> : <></> |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public Double getDiffQty() { |
| | | return Math.round((this.reviseQty - this.anfme) * 10000) / 10000.0; |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | |
| | | if (Objects.isNull(loc)) { |
| | | throw new CoolException("库位不存在!!"); |
| | | } |
| | | List<LocItem> list = locItemService.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId())); |
| | | if (!list.isEmpty()) { |
| | | throw new CoolException("库位:" + loc.getCode() + ", 调整信息为空!!"); |
| | | } |
| | | locItemService.remove(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId())); |
| | | listMap.get(items).forEach(logItem -> { |
| | | LocItem locDetl = new LocItem(); |