From bfc43ca0e4683c1c0322a6cad5d5be2bc07decc3 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期四, 24 七月 2025 15:00:44 +0800 Subject: [PATCH] 新增调拔单功能 盘点功能优化 --- rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx | 86 ++++++++++++++++++++++++++++-------------- 1 files changed, 57 insertions(+), 29 deletions(-) diff --git a/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx b/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx index 0125c45..43a9442 100644 --- a/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx +++ b/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx @@ -58,7 +58,8 @@ 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"; const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ '& .css-1vooibu-MuiSvgIcon-root': { height: '.9em' @@ -68,14 +69,21 @@ }, '& .column-name': { }, - '& .opt': { - width: 220 - }, + '& .wkType': { width: 110 }, '& .status': { width: 90 + }, + '& .MuiTableCell-root': { + whiteSpace: 'nowrap', + overflow: 'visible', + textOverflow: 'unset' + }, + '& .opt': { + width: 220, + }, })); @@ -114,8 +122,10 @@ const [createDialog, setCreateDialog] = useState(false); const [drawerVal, setDrawerVal] = useState(false); const [modalType, setmodalType] = useState(0); + const [poCreate, setPoCreate] = useState(false); const [printOrder, setPrintOrder] = useState(false); const [select, setSelect] = useState({}); + const invoiceRef = useRef(); const billReload = useRef(); const notify = useNotify(); const refresh = useRefresh(); @@ -135,11 +145,13 @@ 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} /> <SelectColumnsButton preferenceKey='asnOrder' /> <ImportButton value={'asnOrderItem'} /> <MyExportButton /> @@ -155,12 +167,10 @@ <InspectionsButton /> <MyExportButton /> {/* <BtnBulkExport></BtnBulkExport> */} - <BulkDeleteButton mutationMode={OPERATE_MODE} - /> </>} rowClick={false} expandSingle={true} - omit={['id', 'createTime', 'createBy', 'memo', 'poId', 'rleStatus$']} + omit={['id', 'createTime', 'createBy', 'memo', 'logisNo', 'poId', 'rleStatus$','createBy$']} > <NumberField source="id" /> <TextField source="code" label="table.field.asnOrder.code" /> @@ -170,10 +180,9 @@ <TextField cellClassName="wkType" source="wkType$" label="table.field.asnOrder.wkType" /> <NumberField source="anfme" label="table.field.asnOrder.anfme" /> <NumberField source="qty" label="table.field.asnOrder.qty" /> - {/* <TextField source="logisNo" label="table.field.asnOrder.logisNo" /> */} <DateField source="arrTime" label="table.field.asnOrder.arrTime" showTime /> <TextField source="rleStatus$" label="table.field.asnOrder.rleStatus" sortable={false} /> - <TextField source="ntyStatus$" label="table.field.asnOrder.ntyStatus" /> + <TextField source="logisNo" label="table.field.asnOrder.logisNo" /> <TextField source="updateBy$" label="common.field.updateBy" /> <DateField source="updateTime" label="common.field.updateTime" showTime /> <TextField source="createBy$" label="common.field.createBy" /> @@ -185,8 +194,8 @@ <MyButton setCreateDialog={setCreateDialog} setmodalType={setmodalType} /> <InspectionButton /> <CompleteButton /> - <ODeleteButton /> - <PrintButton setPrintOrder={setPrintOrder} setSelect={setSelect}/> + <ODeleteButton /> + <PrintButton setPrintOrder={setPrintOrder} setSelect={setSelect} /> {/* <CloseButton /> */} </WrapperField> </StyledDatagrid> @@ -197,10 +206,14 @@ asnId={modalType} billReload={billReload} /> - <OrderPrintPreview + <OrderPrintPreview open={printOrder} setOpen={setPrintOrder} record={select} + /> + <AsnCreateByPoModal + open={poCreate} + setOpen={setPoCreate} /> <PageDrawer title='AsnOrder Detail' @@ -213,9 +226,24 @@ } export default AsnOrderList; +//鎸塒O鍗曟柊寤� +const CreateByPoButton = ({ setPoCreate }) => { + const record = useRecordContext(); + + const createEvent = (event) => { + event.stopPropagation(); + setPoCreate(true) + } + return ( + <Button label={"toolbar.poCreate"} onClick={createEvent}> + <CreateNewFolderOutlinedIcon /> + </Button> + ) +} + //鎵撳嵃鎸夐挳 -const PrintButton = ({setPrintOrder, setSelect}) => { +const PrintButton = ({ setPrintOrder, setSelect }) => { const record = useRecordContext(); const printOrder = (event) => { event.stopPropagation(); @@ -224,9 +252,9 @@ } return ( - <Button label={"toolbar.print"} onClick={printOrder}> - <PrintOutlinedIcon /> - </Button> + <Button label={"toolbar.print"} onClick={printOrder}> + <PrintOutlinedIcon /> + </Button> ) } @@ -234,7 +262,7 @@ const ODeleteButton = () => { const record = useRecordContext(); return ( - record.exceStatus === 0 ? <DeleteButton mutationMode="pessimistic"/> : <></> + record.exceStatus === 0 ? <DeleteButton mutationMode="pessimistic" /> : <></> ) } @@ -250,15 +278,15 @@ }; return ( record.exceStatus === 1 || record.exceStatus === 0 ? - <Button - color="primary" - startIcon={<EditIcon />} - onClick={(btn) => handleEditClick(btn)} - sx={{ ml: 1 }} - label={'ra.action.edit'} - > - </Button> - : <></> + <Button + color="primary" + startIcon={<EditIcon />} + onClick={(btn) => handleEditClick(btn)} + sx={{ ml: 1 }} + label={'ra.action.edit'} + > + </Button> + : <></> ) } @@ -283,7 +311,7 @@ } return ( - <ConfirmButton label={"toolbar.inspection"} color="secondary" startIcon={<ConstructionIcon />} onConfirm={inspection} /> + <ConfirmButton label={"toolbar.inspection"} color="secondary" startIcon={<ConstructionIcon />} onConfirm={inspection} /> ) } @@ -387,7 +415,7 @@ // record.exceStatus === 1 && (record.anfme === record.qty ? <Button onClick={requestComplete} label={"toolbar.complete"} color="secondary"> // <TaskIcon /> // </Button> : ) - record.exceStatus === 1 ? <ConfirmButton label={"toolbar.complete"} color="secondary" startIcon={<TaskIcon />} onConfirm={requestComplete} /> : <></> + record.exceStatus === 1 ? <ConfirmButton label={"toolbar.complete"} color="secondary" startIcon={<TaskIcon />} onConfirm={requestComplete} /> : <></> ) @@ -409,6 +437,6 @@ } return ( - <ConfirmButton label={"toolbar.close"} color="error" startIcon={<CloseIcon />} onConfirm={requestClose} /> + <ConfirmButton label={"toolbar.close"} color="error" startIcon={<CloseIcon />} onConfirm={requestClose} /> ) } -- Gitblit v1.9.1