Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
New file |
| | |
| | | VITE_BASE_IP=192.168.4.24 |
| | | # VITE_BASE_IP=47.76.147.249 |
| | | VITE_BASE_PORT=8080 |
| | |
| | | container: 'Container', |
| | | contract: 'Contract', |
| | | qlyInspect: 'QlyInspect', |
| | | qlyIsptItem: '质检信息明细', |
| | | dictType: 'DictType', |
| | | dictData: 'DictData', |
| | | companys: 'Companys', |
| | |
| | | projectName: "ProjectName", |
| | | }, |
| | | qlyInspect: { |
| | | asnItemId: "asnItemId", |
| | | code: "code", |
| | | wkType: "wkType", |
| | | safeQty: "safeQty", |
| | |
| | | batchWarehouseAreas: "batchWarehouseAreas", |
| | | batchLocType: "batchLocType", |
| | | batchPrint: "batch print", |
| | | quality: "quality", |
| | | complete: "complete", |
| | | close: "close", |
| | | }, |
| | | }; |
| | | |
| | |
| | | container: '容器管理', |
| | | contract: '合同信息', |
| | | qlyInspect: '质检信息', |
| | | qlyIsptItem: '质检信息明细', |
| | | dictType: '数据字典', |
| | | dictData: '字典数据集', |
| | | companys: '往来企业', |
| | |
| | | projectName: "项目名称", |
| | | }, |
| | | qlyInspect: { |
| | | asnItemId: "通知单明细ID", |
| | | code: "编码", |
| | | wkType: "wkType", |
| | | wkType: "业务类型", |
| | | safeQty: "合格数量", |
| | | dlyQty: "dlyQty", |
| | | rcptQty: "rcptQty", |
| | | isptQty: "isptQty", |
| | | dlyQty: "送货数量", |
| | | rcptQty: "收货数量 ", |
| | | isptQty: "质检数量", |
| | | }, |
| | | qlyIsptItem: { |
| | | ispectId: "ispectId", |
| | | matnrCode: "matnrCode", |
| | | maktx: "maktx", |
| | | label: "label", |
| | | splrName: "splrName", |
| | | splrBatch: "splrBatch", |
| | | stockBatch: "stockBatch", |
| | | rcptQty: "rcptQty", |
| | | dlyQty: "dlyQty", |
| | | disQty: "disQty", |
| | | safeQty: "safeQty", |
| | | picPath: "picPath", |
| | | ispectId: "主单ID", |
| | | matnrCode: "编号", |
| | | maktx: "物料名称", |
| | | label: "标签", |
| | | splrName: "供应商名称", |
| | | splrBatch: "供应商批次", |
| | | stockBatch: "库存批次", |
| | | rcptQty: "收货数量", |
| | | dlyQty: "送货数量", |
| | | disQty: "不合数量", |
| | | safeQty: "合格数量", |
| | | picPath: "图片路径", |
| | | }, |
| | | dictType: { |
| | | code: "字典编码", |
| | |
| | | batchWarehouseAreas: "批量库区", |
| | | batchLocType: "批量库位类型", |
| | | batchPrint: "批量打印", |
| | | quality: "质检", |
| | | complete: "完成", |
| | | close: "关闭", |
| | | }, |
| | | }; |
| | | |
| | |
| | | const [columns, setColumns] = useState([ |
| | | |
| | | { |
| | | field: 'matnrId', |
| | | headerName: translate('table.field.asnOrderItem.matnrId'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: false, |
| | | }, |
| | | { |
| | | field: 'maktx', |
| | | headerName: translate('table.field.asnOrderItem.maktx'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: true, |
| | | editable: false, |
| | | }, |
| | | { |
| | | field: 'maktxCode', |
| | | headerName: translate('table.field.asnOrderItem.maktxCode'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: true, |
| | | }, |
| | | { |
| | | field: 'poDetlId', |
| | | headerName: translate('table.field.asnOrderItem.poDetlId'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | }, |
| | | { |
| | | field: 'poDetlCode', |
| | | headerName: translate('table.field.asnOrderItem.poDetlCode'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: false, |
| | | }, |
| | | { |
| | | field: 'anfme', |
| | |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: true, |
| | | }, |
| | | { |
| | | field: 'stockUnit', |
| | | headerName: translate('table.field.asnOrderItem.stockUnit'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: false, |
| | | }, |
| | | // { |
| | | // field: 'purQty', |
| | | // headerName: translate('table.field.asnOrderItem.purQty'), |
| | | // minWidth: 100, |
| | | // flex: 1, |
| | | // editable: true, |
| | | // }, |
| | | { |
| | | field: 'purUnit', |
| | | headerName: translate('table.field.asnOrderItem.purUnit'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: false, |
| | | }, |
| | | { |
| | | field: 'splrCode', |
| | |
| | | flex: 1, |
| | | editable: true, |
| | | }, |
| | | { |
| | | field: 'poDetlId', |
| | | headerName: translate('table.field.asnOrderItem.poDetlId'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | }, |
| | | { |
| | | field: 'poDetlCode', |
| | | headerName: translate('table.field.asnOrderItem.poDetlCode'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | }, |
| | | |
| | | { |
| | | field: 'stockUnit', |
| | | headerName: translate('table.field.asnOrderItem.stockUnit'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: false, |
| | | }, |
| | | // { |
| | | // field: 'purQty', |
| | | // headerName: translate('table.field.asnOrderItem.purQty'), |
| | | // minWidth: 100, |
| | | // flex: 1, |
| | | // editable: true, |
| | | // }, |
| | | { |
| | | field: 'purUnit', |
| | | headerName: translate('table.field.asnOrderItem.purUnit'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: false, |
| | | }, |
| | | |
| | | |
| | | |
| | | ]) |
| | |
| | | headerName: el.fieldsAlise, |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: true |
| | | editable: false |
| | | })) |
| | | setColumns([...columns, ...cols, action]) |
| | | } else { |
| | |
| | | setSelectedRows(ids) |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | return ( |
| | | <div style={{ height: 400, width: '100%' }}> |
| | |
| | | <DialogContent sx={{ mt: 2 }}> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.asnItemId" |
| | | source="asnItemId" |
| | | autoFocus |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.qlyInspect.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.asnItemId" |
| | | source="asnItemId" |
| | | autoFocus |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.qlyInspect.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | Button, |
| | | useRefresh, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import ConstructionIcon from "@mui/icons-material/Construction"; |
| | | import CloseIcon from "@mui/icons-material/Close"; |
| | | import TaskIcon from '@mui/icons-material/Task'; |
| | | import request from '@/utils/request'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <NumberInput source="asnItemId" label="table.field.qlyInspect.asnItemId" />, |
| | | <TextInput source="code" label="table.field.qlyInspect.code" />, |
| | | <TextInput source="wkType" label="table.field.qlyInspect.wkType" />, |
| | | <NumberInput source="safeQty" label="table.field.qlyInspect.safeQty" />, |
| | |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='qlyInspect' /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='qlyInspect' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | bulkActionButtons={<BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <QlyInspectPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="asnItemId$" label="table.field.qlyInspect.asnItemId" /> |
| | | <TextField source="code" label="table.field.qlyInspect.code" /> |
| | | <TextField source="wkType" label="table.field.qlyInspect.wkType" /> |
| | | <NumberField source="safeQty" label="table.field.qlyInspect.safeQty" /> |
| | |
| | | <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' }} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | {/* <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> */} |
| | | <InspectionButton /> |
| | | <CompleteButton /> |
| | | <CloseButton /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | |
| | | } |
| | | |
| | | export default QlyInspectList; |
| | | |
| | | const InspectionButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const inspection = () => { |
| | | // requestInspect([record]) |
| | | }; |
| | | |
| | | // const requestInspect = async (rows) => { |
| | | // const { data: { code, data, msg } } = await request.post(`/asnOrder/inspect`, rows); |
| | | |
| | | // if (code === 200) { |
| | | // notify(msg); |
| | | // refresh() |
| | | // } else { |
| | | // notify(msg); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | return ( |
| | | <Button onClick={inspection} label={"toolbar.quality"}> |
| | | <ConstructionIcon /> |
| | | </Button> |
| | | ) |
| | | } |
| | | |
| | | const CompleteButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const requestComplete = async () => { |
| | | const { data: { code, data, msg } } = await request.post(`/qlyInspect/update`, { ...record, code: '222222' }); |
| | | |
| | | if (code === 200) { |
| | | notify(msg); |
| | | refresh() |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | |
| | | return ( |
| | | <Button onClick={requestComplete} label={"toolbar.complete"}> |
| | | <TaskIcon /> |
| | | </Button> |
| | | ) |
| | | } |
| | | |
| | | const CloseButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | const requestClose = async () => { |
| | | const { data: { code, data, msg } } = await request.post(`/qlyInspect/update`, { ...record, code: '222222' }); |
| | | |
| | | if (code === 200) { |
| | | notify(msg); |
| | | refresh() |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | |
| | | return ( |
| | | <Button onClick={requestClose} label={"toolbar.close"}> |
| | | <CloseIcon /> |
| | | </Button> |
| | | ) |
| | | } |
| | |
| | | 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 QlyInspectPanel = () => { |
| | | 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.qlyInspect.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.qlyInspect.code" |
| | | property={record.code} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.qlyInspect.wkType" |
| | | property={record.wkType} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.qlyInspect.safeQty" |
| | | property={record.safeQty} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.qlyInspect.dlyQty" |
| | | property={record.dlyQty} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.qlyInspect.rcptQty" |
| | | property={record.rcptQty} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.qlyInspect.isptQty" |
| | | property={record.isptQty} |
| | | /> |
| | | </Grid> |
| | | const notify = useNotify(); |
| | | const [rows, setRows] = useState([]); |
| | | const [maktx, setMaktx] = useState(''); |
| | | const ispectId = record.id; |
| | | |
| | | </Grid> |
| | | </CardContent> |
| | | </Card > |
| | | </> |
| | | useEffect(() => { |
| | | debouncedHttp({ maktx }); |
| | | }, [ispectId, maktx]); |
| | | |
| | | |
| | | const http = async (parmas) => { |
| | | const res = await request.post('/qlyIsptItem/page', { ...parmas, ispectId }); |
| | | if (res?.data?.code === 200) { |
| | | setRows(res.data.data.records) |
| | | } else { |
| | | notify(res.data.msg); |
| | | } |
| | | } |
| | | |
| | | const debouncedHttp = useMemo(() => debounce(http, 300), []); |
| | | |
| | | const columns = [ |
| | | { |
| | | field: 'ispectId', |
| | | headerName: translate('table.field.qlyIsptItem.ispectId') |
| | | }, |
| | | { |
| | | field: 'matnrCode', |
| | | headerName: translate('table.field.qlyIsptItem.matnrCode') |
| | | }, |
| | | { |
| | | field: 'maktx', |
| | | headerName: translate('table.field.qlyIsptItem.maktx') |
| | | }, |
| | | { |
| | | field: 'label', |
| | | headerName: translate('table.field.qlyIsptItem.label') |
| | | }, |
| | | { |
| | | field: 'splrName', |
| | | headerName: translate('table.field.qlyIsptItem.splrName') |
| | | }, |
| | | { |
| | | field: 'splrBatch', |
| | | headerName: translate('table.field.qlyIsptItem.splrBatch') |
| | | }, |
| | | { |
| | | field: 'stockBatch', |
| | | headerName: translate('table.field.qlyIsptItem.stockBatch') |
| | | }, |
| | | { |
| | | field: 'rcptQty', |
| | | headerName: translate('table.field.qlyIsptItem.rcptQty') |
| | | }, |
| | | { |
| | | field: 'dlyQty', |
| | | headerName: translate('table.field.qlyIsptItem.dlyQty') |
| | | }, |
| | | { |
| | | field: 'disQty', |
| | | headerName: translate('table.field.qlyIsptItem.disQty') |
| | | }, |
| | | { |
| | | field: 'safeQty', |
| | | headerName: translate('table.field.qlyIsptItem.safeQty') |
| | | }, |
| | | { |
| | | field: 'picPath', |
| | | headerName: translate('table.field.qlyIsptItem.picPath') |
| | | } |
| | | ]; |
| | | |
| | | 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 />, |
| | | |
| | | <NumberInput source="ispectId" label="table.field.qlyIsptItem.ispectId" />, |
| | | <TextInput source="matnrCode" label="table.field.qlyIsptItem.matnrCode" />, |