zjj
6 天以前 eab76cd34bff799686f68e6b70f86c9001e4913f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import React, { useState, useRef, useEffect, useMemo, useCallback } from "react";
import { useNavigate } from 'react-router-dom';
import {
    List,
    DatagridConfigurable,
    SearchInput,
    TopToolbar,
    SelectColumnsButton,
    EditButton,
    FilterButton,
    CreateButton,
    ExportButton,
    BulkDeleteButton,
    WrapperField,
    useRecordContext,
    useTranslate,
    useNotify,
    useListContext,
    FunctionField,
    TextField,
    NumberField,
    DateField,
    BooleanField,
    ReferenceField,
    TextInput,
    DateTimeInput,
    DateInput,
    SelectInput,
    NumberInput,
    ReferenceInput,
    ReferenceArrayInput,
    AutocompleteInput,
    DeleteButton,
    useGetOne,
    Button,
    useRefresh,
    useGetRecordId,
} from 'react-admin';
import { Box, Typography, Card, Stack, LinearProgress, Dialog, DialogActions, DialogContent, DialogTitle, } from '@mui/material';
import { styled } from '@mui/material/styles';
import QlyIsptItemCreate from "./QlyIsptItemCreate";
import EmptyData from "../../components/EmptyData";
import MyCreateButton from "../../components/MyCreateButton";
import MyExportButton from '../../components/MyExportButton';
import PageDrawer from "../../components/PageDrawer";
import DialogCloseButton from "../../components/DialogCloseButton";
import request from '@/utils/request';
import MyField from "@/page/components/MyField";
import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting';
 
 
 
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
    '& .css-1vooibu-MuiSvgIcon-root': {
        height: '.9em'
    },
    '& .RaDatagrid-row': {
        cursor: 'auto'
    },
    '& .column-name': {
    },
    '& .opt': {
        width: 200
    },
}));
 
const QlyIsptItemResult = (props) => {
    const { record, drawerVal, setDrawerVal, from } = props
    const translate = useTranslate();
    const [createDialog, setCreateDialog] = useState(false);
    const handleClose = (event, reason) => {
        if (reason !== "backdropClick") {
            setDrawerVal(false);
        }
    };
 
    return (
        <Dialog
            open={drawerVal}
            onClose={handleClose}
            aria-labelledby="form-dialog-title"
            fullWidth
            disableRestoreFocus
            maxWidth="lg"
        >
            <DialogTitle id="form-dialog-title" sx={{
                position: 'sticky',
                top: 0,
                backgroundColor: 'background.paper',
                zIndex: 1000
            }}>
                <Box sx={{ position: 'absolute', top: 8, right: 8, zIndex: 1001 }}>
                    <DialogCloseButton onClose={handleClose} />
                </Box>
            </DialogTitle>
            <DialogContent sx={{ mt: 2 }}>
                <List
                    storeKey="IsptItem"
                    resource="qlyIsptItem/ispt/result"
                    filter={{ id: record?.id}}
                    empty={false}
                    filters={false}
                    sort={{ field: "create_time", order: "desc" }}
                    actions={false}
                    perPage={DEFAULT_ITEM_PAGE_SIZE}
                >
                    <StyledDatagrid
                        preferenceKey='IsptItem'
                        bulkActionButtons={false}
                        rowClick={false}
                        omit={['id', 'memo', 'dlyQty', 'label', 'stockBatch', 'picPath', 'ispectId']}
                    >
                        <NumberField source="id" />
                        <NumberField source="ispectId" label="table.field.qlyIsptItem.ispectId" />
                        <TextField source="matnrCode" label="table.field.qlyIsptItem.matnrCode" />
                        <TextField source="maktx" label="table.field.qlyIsptItem.maktx" />
                        <TextField source="label" label="table.field.qlyIsptItem.label" />
                        <TextField source="splrBatch" label="table.field.qlyIsptItem.splrBatch" />
                        <NumberField source="dlyQty" label="table.field.qlyIsptItem.dlyQty" />
                        <NumberField source="anfme" label="table.field.qlyIsptItem.anfme" />
                        <TextField source="splrName" label="table.field.qlyIsptItem.splrName" />
                        <NumberField source="isptResult$" label="table.field.qlyIsptItem.isptResult" />
                    </StyledDatagrid>
                </List>
            </DialogContent>
        </Dialog>
    )
}
 
export default QlyIsptItemResult;