| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useLocation, useNavigate } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | |
| | | useRedirect, |
| | | useUnselectAll, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import AsnOrderModal from "./AsnOrderModal"; |
| | | import AsnOrderPanel from "./AsnOrderPanel"; |
| | | import EmptyData from "../../components/EmptyData"; |
| | | import MyCreateButton from "../../components/MyCreateButton"; |
| | | import MyExportButton from '../../components/MyExportButton'; |
| | | import BillStatusField from '../../components/BillStatusField'; |
| | | import ConfirmButton from '../../components/ConfirmButton'; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import ConstructionIcon from "@mui/icons-material/Construction"; |
| | | import EditIcon from '@mui/icons-material/Edit'; |
| | | import TaskIcon from '@mui/icons-material/Task'; |
| | | import CloseIcon from '@mui/icons-material/Close'; |
| | | import request from '@/utils/request'; |
| | | import CreateNewFolderOutlinedIcon from '@mui/icons-material/CreateNewFolderOutlined'; |
| | | import PrintOutlinedIcon from '@mui/icons-material/PrintOutlined'; |
| | | import DictionarySelect from "../../components/DictionarySelect"; |
| | | import ConstructionIcon from "@mui/icons-material/Construction"; |
| | | import BillStatusField from '../../components/BillStatusField'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import MyCreateButton from "../../components/MyCreateButton"; |
| | | import { useLocation, useNavigate } from 'react-router-dom'; |
| | | import MyExportButton from '../../components/MyExportButton'; |
| | | import ConfirmButton from '../../components/ConfirmButton'; |
| | | import ExitToAppIcon from '@mui/icons-material/ExitToApp'; |
| | | import ImportButton from "../../components/ImportButton"; |
| | | import PrintOutlinedIcon from '@mui/icons-material/PrintOutlined'; |
| | | import OrderPrintPreview from "./OrderPrintPreview"; |
| | | import CreateNewFolderOutlinedIcon from '@mui/icons-material/CreateNewFolderOutlined'; |
| | | import AsnCreateByPoModal from "./AsnCreateByPoModal"; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | import OrderPrintPreview from "./OrderPrintPreview"; |
| | | import CloseIcon from '@mui/icons-material/Close'; |
| | | import EditIcon from '@mui/icons-material/Edit'; |
| | | import TaskIcon from '@mui/icons-material/Task'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import AsnOrderModal from "./AsnOrderModal"; |
| | | import request from '@/utils/request'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | |
| | | }, |
| | | '& .column-name': { |
| | | }, |
| | | '& .opt': { |
| | | width: 220 |
| | | }, |
| | | |
| | | '& .wkType': { |
| | | width: 110 |
| | | }, |
| | | '& .status': { |
| | | width: 90 |
| | | }, |
| | | '& .MuiTableCell-root': { |
| | | whiteSpace: 'nowrap', |
| | | overflow: 'visible', |
| | | textOverflow: 'unset' |
| | | }, |
| | | '& .opt': { |
| | | width: 220, |
| | | |
| | | }, |
| | | })); |
| | | |
| | |
| | | title={"menu.asnOrder"} |
| | | empty={false} |
| | | filters={filters} |
| | | filter={{ deleted: 0, type: 'in' }} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true); setmodalType(0) }} /> |
| | | <CreateByPoButton setPoCreate={setPoCreate}/> |
| | | <CreateByPoButton setPoCreate={setPoCreate} /> |
| | | <SelectColumnsButton preferenceKey='asnOrder' /> |
| | | <ImportButton value={'asnOrderItem'} /> |
| | | <MyExportButton /> |
| | |
| | | </>} |
| | | rowClick={false} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'logisNo', 'poId', 'rleStatus$']} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'logisNo', 'poId', 'rleStatus$', 'createBy$']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.asnOrder.code" /> |
| | |
| | | <DateField source="arrTime" label="table.field.asnOrder.arrTime" showTime /> |
| | | <TextField source="rleStatus$" label="table.field.asnOrder.rleStatus" sortable={false} /> |
| | | <TextField source="logisNo" label="table.field.asnOrder.logisNo" /> |
| | | {/* <TextField source="ntyStatus$" label="table.field.asnOrder.ntyStatus" /> */} |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <TextField source="createBy$" label="common.field.createBy" /> |
| | |
| | | export default AsnOrderList; |
| | | |
| | | //按PO单新建 |
| | | const CreateByPoButton = ({setPoCreate}) => { |
| | | const CreateByPoButton = ({ setPoCreate }) => { |
| | | const record = useRecordContext(); |
| | | |
| | | const createEvent = (event) => { |
| | |
| | | |
| | | const BtnBulkExport = () => { |
| | | const { filter, selectedIds, filterValues, resource, sort, total } = useListContext(); |
| | | const refresh = useRefresh(); |
| | | const dataProvider = useDataProvider(); |
| | | const notify = useNotify(); |
| | | const unSelect = useUnselectAll(resource); |
| | | const dataProvider = useDataProvider(); |
| | | const refresh = useRefresh(); |
| | | const notify = useNotify(); |
| | | |
| | | const bulkExport = () => { |
| | | getExport() |
| | | unSelect(); |
| | | } |
| | | |
| | | const getExport = () => { |
| | | dataProvider |
| | | .export(resource, { |