| | |
| | | import ConstructionIcon from "@mui/icons-material/Construction"; |
| | | import CloseIcon from "@mui/icons-material/Close"; |
| | | import TaskIcon from '@mui/icons-material/Task'; |
| | | import AddIcon from '@mui/icons-material/Add'; |
| | | import request from '@/utils/request'; |
| | | import AsnSelModal from "./AsnSelModal"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | const filters = [ |
| | | <SearchInput source="condition" 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" />, |
| | |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <AsnCreatButton /> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='qlyInspect' /> |
| | | <MyExportButton /> |
| | |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <QlyInspectPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'asnId']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="asnItemId$" label="table.field.qlyInspect.asnItemId" /> |
| | | <NumberField source="asnId" label="table.field.qlyInspect.asnId" /> |
| | | <NumberField source="asnCode" label="table.field.qlyInspect.asnCode" /> |
| | | <TextField source="code" label="table.field.qlyInspect.code" /> |
| | | <TextField source="isptStatus$" label="table.field.qlyInspect.isptStatus" /> |
| | | <TextField source="wkType" label="table.field.qlyInspect.wkType" /> |
| | | <NumberField source="safeQty" label="table.field.qlyInspect.safeQty" /> |
| | | <NumberField source="dlyQty" label="table.field.qlyInspect.dlyQty" /> |
| | |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | | </PageDrawer> |
| | | |
| | | |
| | | </Box> |
| | | ) |
| | | } |
| | |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const requestComplete = async () => { |
| | | const { data: { code, data, msg } } = await request.post(`/qlyInspect/update`, { ...record, code: '222222' }); |
| | | const { data: { code, data, msg } } = await request.post(`/qlyInspect/update`, { ...record, isptStatus: '1' }); |
| | | |
| | | if (code === 200) { |
| | | notify(msg); |
| | |
| | | const refresh = useRefresh(); |
| | | |
| | | const requestClose = async () => { |
| | | const { data: { code, data, msg } } = await request.post(`/qlyInspect/update`, { ...record, code: '222222' }); |
| | | const { data: { code, data, msg } } = await request.post(`/qlyInspect/update`, { ...record, isptStatus: '3' }); |
| | | |
| | | if (code === 200) { |
| | | notify(msg); |
| | |
| | | </Button> |
| | | ) |
| | | } |
| | | |
| | | const AsnCreatButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | | |
| | | |
| | | return ( |
| | | <> |
| | | <Button onClick={() => setCreateDialog(true)} label={"toolbar.asnCreate"}> |
| | | <AddIcon /> |
| | | </Button> |
| | | |
| | | <AsnSelModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | </> |
| | | ) |
| | | } |