|  |  |  | 
|---|
|  |  |  | import { Box, Typography, Card, Stack, Dialog, DialogActions, DialogTitle } from '@mui/material'; | 
|---|
|  |  |  | import { styled } from '@mui/material/styles'; | 
|---|
|  |  |  | import OutOrderItemCreate from "./OutOrderItemCreate"; | 
|---|
|  |  |  | import EmptyData from "../../components/EmptyData"; | 
|---|
|  |  |  | import MyCreateButton from "../../components/MyCreateButton"; | 
|---|
|  |  |  | import MyExportButton from '../../components/MyExportButton'; | 
|---|
|  |  |  | import PageDrawer from "../../components/PageDrawer"; | 
|---|
|  |  |  | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting'; | 
|---|
|  |  |  | import OutOrderItemEdit from "./OutOrderItemEdit"; | 
|---|
|  |  |  | import ImportButton from "../../components/ImportButton"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ | 
|---|
|  |  |  | '& .css-1vooibu-MuiSvgIcon-root': { | 
|---|
|  |  |  | 
|---|
|  |  |  | '& .opt': { | 
|---|
|  |  |  | width: 200 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | '& .MuiTableCell-root': { | 
|---|
|  |  |  | whiteSpace: 'nowrap', | 
|---|
|  |  |  | overflow: 'visible', | 
|---|
|  |  |  | textOverflow: 'unset' | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | })); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const filters = [ | 
|---|
|  |  |  | <SearchInput source="condition" alwaysOn />, | 
|---|
|  |  |  | <NumberInput source="asnId" label="table.field.outStockItem.asnId" />, | 
|---|
|  |  |  | <TextInput source="asnCode" label="table.field.outStockItem.asnCode" alwaysOn />, | 
|---|
|  |  |  | <NumberInput source="orderId" label="table.field.outStockItem.orderId" />, | 
|---|
|  |  |  | <TextInput source="orderCode" label="table.field.outStockItem.orderCode" alwaysOn />, | 
|---|
|  |  |  | <TextInput source="poDetlId" label="table.field.outStockItem.poDetlId" />, | 
|---|
|  |  |  | <TextInput source="matnrId" label="table.field.outStockItem.matnrId" />, | 
|---|
|  |  |  | <TextInput source="maktx" label="table.field.outStockItem.maktx" alwaysOn />, | 
|---|
|  |  |  | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | title={"menu.outStockItem"} | 
|---|
|  |  |  | empty={false} | 
|---|
|  |  |  | filter={{ asnId: asnId, deleted: 0 }} | 
|---|
|  |  |  | filter={{ orderId: asnId, deleted: 0 }} | 
|---|
|  |  |  | filters={filters} | 
|---|
|  |  |  | sort={{ field: "create_time", order: "desc" }} | 
|---|
|  |  |  | actions={( | 
|---|
|  |  |  | <TopToolbar> | 
|---|
|  |  |  | <FilterButton /> | 
|---|
|  |  |  | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> | 
|---|
|  |  |  | <SelectColumnsButton preferenceKey='outStockItem' /> | 
|---|
|  |  |  | {/* <MyExportButton /> */} | 
|---|
|  |  |  | </TopToolbar> | 
|---|
|  |  |  | )} | 
|---|
|  |  |  | perPage={DEFAULT_ITEM_PAGE_SIZE} | 
|---|
|  |  |  | 
|---|
|  |  |  | <StyledDatagrid | 
|---|
|  |  |  | preferenceKey='outStockItem' | 
|---|
|  |  |  | bulkActionButtons={false} | 
|---|
|  |  |  | rowClick={(id, resource, record) => { | 
|---|
|  |  |  | setSelect(record) | 
|---|
|  |  |  | setEditDialog(true) | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | omit={['id', 'createTime', 'createBy', 'memo', 'poDetlId', 'purQty', 'purUnit', 'trackCode', 'packName', 'qrcode', 'splrName', 'matnrId', 'asnId']} | 
|---|
|  |  |  | rowClick={false} | 
|---|
|  |  |  | omit={['id', 'createTime', 'createBy', 'memo', 'poDetlId', 'purQty', 'purUnit', 'trackCode', 'packName', 'qrcode', 'splrCode', 'matnrId', 'orderId','platOrderCode']} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <NumberField source="id" /> | 
|---|
|  |  |  | <NumberField source="asnId" label="table.field.outStockItem.asnId" /> | 
|---|
|  |  |  | <TextField source="asnCode" label="table.field.outStockItem.asnCode" /> | 
|---|
|  |  |  | <NumberField source="orderId" label="table.field.outStockItem.orderId" /> | 
|---|
|  |  |  | <TextField source="orderCode" label="table.field.outStockItem.orderCode" /> | 
|---|
|  |  |  | <TextField source="poCode" label="table.field.outStockItem.poCode" /> | 
|---|
|  |  |  | <TextField source="poDetlId" label="table.field.outStockItem.poDetlId" /> | 
|---|
|  |  |  | <TextField source="matnrId" label="table.field.outStockItem.matnrId" /> | 
|---|
|  |  |  | 
|---|
|  |  |  | <NumberField source="workQty" label="table.field.outStockItem.workQty" /> | 
|---|
|  |  |  | <NumberField source="qty" label="table.field.outStockItem.qty" /> | 
|---|
|  |  |  | <TextField source="stockUnit" label="table.field.outStockItem.stockUnit" /> | 
|---|
|  |  |  | <TextField source="splrBatch" label="table.field.outStockItem.splrBatch" /> | 
|---|
|  |  |  | <TextField source="purUnit" label="table.field.outStockItem.purUnit" /> | 
|---|
|  |  |  | <TextField source="splrCode" label="table.field.outStockItem.splrCode" /> | 
|---|
|  |  |  | <TextField source="splrName" label="table.field.outStockItem.splrName" /> | 
|---|