| | |
| | | fieldsItem: '扩展字段明细', |
| | | warehouseAreasItem: '库区库存信息', |
| | | deviceSite: '站点管理', |
| | | waitPakin: '组托信息', |
| | | waitPakinItem: '组托信息明细', |
| | | waitPakinLog: '组托历史', |
| | | waitPakinItemLog: '组托历史明细', |
| | | waitPakin: '组拖通知档', |
| | | waitPakinItem: '组拖档明细', |
| | | waitPakinLog: '组拖历史档', |
| | | waitPakinItemLog: '组拖历史档明细', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | <TextField source="code" label="table.field.asnOrder.code" /> |
| | | <TextField source="poCode" label="table.field.asnOrder.poCode" /> |
| | | <NumberField source="poId" label="table.field.asnOrder.poId" /> |
| | | <TextField source="type" label="table.field.asnOrder.type" /> |
| | | <TextField source="wkType" label="table.field.asnOrder.wkType" /> |
| | | <TextField source="type$" label="table.field.asnOrder.type" /> |
| | | <TextField source="wkType$" label="table.field.asnOrder.wkType" /> |
| | | <NumberField source="anfme" label="table.field.asnOrder.anfme" /> |
| | | <NumberField source="qty" label="table.field.asnOrder.qty" /> |
| | | <TextField source="logisNo" label="table.field.asnOrder.logisNo" /> |
| | |
| | | headerName: translate('table.field.asnOrderItemLog.qty') |
| | | }, |
| | | { |
| | | field: 'splrBatch', |
| | | headerName: translate('table.field.asnOrderItem.splrBatch') |
| | | }, |
| | | { |
| | | field: 'splrCode', |
| | | headerName: translate('table.field.asnOrderItemLog.splrCode') |
| | | }, |
| | |
| | | headerName: translate('table.field.asnOrderItemLog.barcode') |
| | | }, |
| | | { |
| | | field: 'prodTime', |
| | | headerName: translate('table.field.asnOrderItem.prodTime') |
| | | }, |
| | | { |
| | | field: 'packName', |
| | | headerName: translate('table.field.asnOrderItemLog.packName') |
| | | }, |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { Box, Card, CardContent, Grid, Typography, Tooltip } from '@mui/material'; |
| | | import { Box, Card, CardContent, Grid, Typography, Button, TextField, Tooltip, Paper, TableContainer, Table, TableBody, TableCell, TableHead, TableRow } from '@mui/material'; |
| | | import { |
| | | useTranslate, |
| | | useRecordContext, |
| | | useNotify, |
| | | useRefresh, |
| | | useListContext, |
| | | } from 'react-admin'; |
| | | import PanelTypography from "../components/PanelTypography"; |
| | | import * as Common from '@/utils/common' |
| | | import { styled } from "@mui/material/styles"; |
| | | import request from '@/utils/request'; |
| | | import debounce from 'lodash/debounce'; |
| | | import { DataGrid } from '@mui/x-data-grid'; |
| | | |
| | | const WaitPakinPanel = () => { |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | | const translate = useTranslate(); |
| | | return ( |
| | | <> |
| | | <Card sx={{ width: { xs: 300, sm: 500, md: 600, lg: 800 }, margin: 'auto' }}> |
| | | <CardContent> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'space-between' }}> |
| | | <Typography variant="h6" gutterBottom align="left" sx={{ |
| | | maxWidth: { xs: '100px', sm: '180px', md: '260px', lg: '360px' }, |
| | | whiteSpace: 'nowrap', |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | }}> |
| | | {Common.camelToPascalWithSpaces(translate('table.field.waitPakin.id'))}: {record.id} |
| | | </Typography> |
| | | {/* inherit, primary, secondary, textPrimary, textSecondary, error */} |
| | | <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={20}> </Box> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakin.code" |
| | | property={record.code} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakin.ansId" |
| | | property={record.ansId} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakin.asnCode" |
| | | property={record.asnCode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakin.barcode" |
| | | property={record.barcode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakin.anfme" |
| | | property={record.anfme} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakin.ioStatus" |
| | | property={record.ioStatus$} |
| | | /> |
| | | </Grid> |
| | | const notify = useNotify(); |
| | | const [rows, setRows] = useState([]); |
| | | const [maktx, setMaktx] = useState(''); |
| | | const pakinId = record.id; |
| | | |
| | | </Grid> |
| | | </CardContent> |
| | | </Card > |
| | | </> |
| | | useEffect(() => { |
| | | debouncedHttp({ maktx }); |
| | | }, [pakinId, maktx]); |
| | | |
| | | |
| | | const http = async (parmas) => { |
| | | const res = await request.post('/waitPakinItem/page', { ...parmas, pakinId }); |
| | | if (res?.data?.code === 200) { |
| | | setRows(res.data.data.records) |
| | | } else { |
| | | notify(res.data.msg); |
| | | } |
| | | } |
| | | |
| | | const debouncedHttp = useMemo(() => debounce(http, 300), []); |
| | | |
| | | const columns = [ |
| | | { |
| | | field: 'pakinId', |
| | | headerName: translate('table.field.waitPakinItem.pakinId') |
| | | }, |
| | | { |
| | | field: 'maktx', |
| | | headerName: translate('table.field.waitPakinItem.maktx'), |
| | | width: 300 |
| | | }, |
| | | { |
| | | field: 'matnrId', |
| | | headerName: translate('table.field.waitPakinItem.matnrId') |
| | | }, |
| | | { |
| | | field: 'matnrCode', |
| | | headerName: translate('table.field.waitPakinItem.matnrCode') |
| | | }, |
| | | { |
| | | field: 'anfme', |
| | | headerName: translate('table.field.waitPakinItem.anfme') |
| | | }, |
| | | { |
| | | field: 'workQty', |
| | | headerName: translate('table.field.waitPakinItem.workQty') |
| | | }, |
| | | { |
| | | field: 'unit', |
| | | headerName: translate('table.field.waitPakinItem.unit') |
| | | }, |
| | | { |
| | | field: 'fieldsIndex', |
| | | headerName: translate('table.field.waitPakinItem.fieldsIndex') |
| | | }, |
| | | { |
| | | field: 'qty', |
| | | headerName: translate('table.field.waitPakinItem.qty') |
| | | }, |
| | | { |
| | | field: 'batch', |
| | | headerName: translate('table.field.waitPakinItem.batch') |
| | | }, |
| | | ] |
| | | |
| | | const maktxChange = (value) => { |
| | | setMaktx(value) |
| | | } |
| | | |
| | | |
| | | return ( |
| | | <Box sx={{ |
| | | position: 'relative', |
| | | padding: '5px 10px' |
| | | }}> |
| | | |
| | | <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '4px', alignItems: 'center' }}> |
| | | <TextField value={maktx} onChange={(e) => maktxChange(e.target.value)} label="搜索物料" variant="outlined" sx={{ width: '300px' }} /> |
| | | |
| | | <div style={{ display: 'flex', gap: '10px' }}> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <DataGrid |
| | | size="small" |
| | | rows={rows} |
| | | columns={columns} |
| | | disableRowSelectionOnClick |
| | | disableColumnMenu={true} |
| | | disableColumnSorting |
| | | disableMultipleColumnsSorting |
| | | /> |
| | | </Box > |
| | | ); |
| | | }; |
| | | |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <ReferenceInput source="pakinId" label="table.field.waitPakinItemLog.pakinId" reference="waitPakin"> |
| | | <AutocompleteInput label="table.field.waitPakinItemLog.pakinId" optionText="id" filterToQuery={(val) => ({ id: val })} /> |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.waitPakinItemLog"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | preferenceKey='waitPakinItemLog' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <WaitPakinItemLogPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <NumberInput source="pakinId" label="table.field.waitPakinLog.pakinId" />, |
| | | <TextInput source="code" label="table.field.waitPakinLog.code" />, |
| | |
| | | <SelectInput source="ioStatus" label="table.field.waitPakinLog.ioStatus" |
| | | choices={[ |
| | | { id: 0, name: '待入库' }, |
| | | { id: 1, name: ' 入库中' }, |
| | | { id: 1, name: ' 入库中' }, |
| | | ]} |
| | | />, |
| | | |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.waitPakinLog"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | {/* <MyCreateButton onClick={() => { setCreateDialog(true) }} /> */} |
| | | <SelectColumnsButton preferenceKey='waitPakinLog' /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | {/* <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> */} |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { Box, Card, CardContent, Grid, Typography, Tooltip } from '@mui/material'; |
| | | import { Box, Card, CardContent, Grid, Typography, Button, TextField, Tooltip, Paper, TableContainer, Table, TableBody, TableCell, TableHead, TableRow } from '@mui/material'; |
| | | import { |
| | | useTranslate, |
| | | useRecordContext, |
| | | useNotify, |
| | | useRefresh, |
| | | useListContext, |
| | | } from 'react-admin'; |
| | | import PanelTypography from "../components/PanelTypography"; |
| | | import * as Common from '@/utils/common' |
| | | import { styled } from "@mui/material/styles"; |
| | | import request from '@/utils/request'; |
| | | import debounce from 'lodash/debounce'; |
| | | import { DataGrid } from '@mui/x-data-grid'; |
| | | |
| | | const WaitPakinLogPanel = () => { |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | | const translate = useTranslate(); |
| | | return ( |
| | | <> |
| | | <Card sx={{ width: { xs: 300, sm: 500, md: 600, lg: 800 }, margin: 'auto' }}> |
| | | <CardContent> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'space-between' }}> |
| | | <Typography variant="h6" gutterBottom align="left" sx={{ |
| | | maxWidth: { xs: '100px', sm: '180px', md: '260px', lg: '360px' }, |
| | | whiteSpace: 'nowrap', |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | }}> |
| | | {Common.camelToPascalWithSpaces(translate('table.field.waitPakinLog.id'))}: {record.id} |
| | | </Typography> |
| | | {/* inherit, primary, secondary, textPrimary, textSecondary, error */} |
| | | <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={20}> </Box> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakinLog.pakinId" |
| | | property={record.pakinId} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakinLog.code" |
| | | property={record.code} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakinLog.barcode" |
| | | property={record.barcode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakinLog.anfme" |
| | | property={record.anfme} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.waitPakinLog.ioStatus" |
| | | property={record.ioStatus$} |
| | | /> |
| | | </Grid> |
| | | const notify = useNotify(); |
| | | const [rows, setRows] = useState([]); |
| | | const [maktx, setMaktx] = useState(''); |
| | | const pakinId = record.id; |
| | | |
| | | </Grid> |
| | | </CardContent> |
| | | </Card > |
| | | </> |
| | | const http = async (parmas) => { |
| | | const res = await request.post('/WaitPakinLog/page', { ...parmas, pakinId }); |
| | | if (res?.data?.code === 200) { |
| | | setRows(res.data.data.records) |
| | | } else { |
| | | notify(res.data.msg); |
| | | } |
| | | } |
| | | |
| | | const debouncedHttp = useMemo(() => debounce(http, 300), []); |
| | | |
| | | const columns = [ |
| | | { |
| | | field: 'pakinId', |
| | | headerName: translate('table.field.waitPakinItem.pakinId') |
| | | }, |
| | | { |
| | | field: 'maktx', |
| | | headerName: translate('table.field.waitPakinItem.maktx'), |
| | | width: 300 |
| | | }, |
| | | { |
| | | field: 'matnrId', |
| | | headerName: translate('table.field.waitPakinItem.matnrId') |
| | | }, |
| | | { |
| | | field: 'matnrCode', |
| | | headerName: translate('table.field.waitPakinItem.matnrCode') |
| | | }, |
| | | { |
| | | field: 'anfme', |
| | | headerName: translate('table.field.waitPakinItem.anfme') |
| | | }, |
| | | { |
| | | field: 'workQty', |
| | | headerName: translate('table.field.waitPakinItem.workQty') |
| | | }, |
| | | { |
| | | field: 'unit', |
| | | headerName: translate('table.field.waitPakinItem.unit') |
| | | }, |
| | | { |
| | | field: 'fieldsIndex', |
| | | headerName: translate('table.field.waitPakinItem.fieldsIndex') |
| | | }, |
| | | { |
| | | field: 'qty', |
| | | headerName: translate('table.field.waitPakinItem.qty') |
| | | }, |
| | | { |
| | | field: 'batch', |
| | | headerName: translate('table.field.waitPakinItem.batch') |
| | | }, |
| | | ] |
| | | |
| | | const maktxChange = (value) => { |
| | | setMaktx(value) |
| | | } |
| | | |
| | | return ( |
| | | <Box sx={{ |
| | | position: 'relative', |
| | | padding: '5px 10px' |
| | | }}> |
| | | |
| | | <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '4px', alignItems: 'center' }}> |
| | | <TextField value={maktx} onChange={(e) => maktxChange(e.target.value)} label="搜索物料" variant="outlined" sx={{ width: '300px' }} /> |
| | | |
| | | <div style={{ display: 'flex', gap: '10px' }}> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <DataGrid |
| | | size="small" |
| | | rows={rows} |
| | | columns={columns} |
| | | disableRowSelectionOnClick |
| | | disableColumnMenu={true} |
| | | disableColumnSorting |
| | | disableMultipleColumnsSorting |
| | | /> |
| | | </Box > |
| | | ); |
| | | }; |
| | | |