From a6991a33e18f69264f93a63459a4b64ea799295a Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期二, 05 八月 2025 13:02:24 +0800 Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop --- rsf-admin/src/page/orders/asnOrder/POItemModal.jsx | 36 +++++++++++++++++++++--------------- 1 files changed, 21 insertions(+), 15 deletions(-) diff --git a/rsf-admin/src/page/orders/asnOrder/POItemModal.jsx b/rsf-admin/src/page/orders/asnOrder/POItemModal.jsx index 0e9ccc3..65d8f88 100644 --- a/rsf-admin/src/page/orders/asnOrder/POItemModal.jsx +++ b/rsf-admin/src/page/orders/asnOrder/POItemModal.jsx @@ -105,21 +105,19 @@ const handleSubmit = async () => { setFinally() setDisabled(true) - setOpen(false) const parmas = { "purchaseId": record, "items": tabelData, } - console.log('--------->'); - console.log(parmas); - // const res = await request.post(`/asnOrder/purchases/save`, parmas); - // if (res?.data?.code === 200) { - // setOpen(false); - // refresh(); - // resetData() - // } else { - // notify(res.data.msg); - // } + const res = await request.post(`/asnOrder/purchases/save`, parmas); + if (res?.data?.code === 200) { + notify(res.data.msg); + } else { + notify(res.data.msg); + } + setOpen(false); + refresh(); + resetData() setDisabled(false) }; @@ -167,7 +165,7 @@ </Box> </DialogContent> <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}> - <Toolbar sx={{ width: '100%', justifyContent: 'space-between' }} > + <Toolbar sx={{ width: '100%', justifyContent: 'end' }} > <Button disabled={disabled} onClick={handleSubmit} variant="contained" startIcon={<SaveIcon />}> {translate('toolbar.confirm')} </Button> @@ -283,6 +281,14 @@ headerClassName: "custom", }, { + field: 'qty', + headerName: translate('table.field.asnOrderItem.qty') + "*", + type: 'number', + minWidth: 100, + flex: 1, + valueFormatter: (val) => val < 0 ? 0 : val, + }, + { field: 'unit', headerName: translate('table.field.asnOrderItem.stockUnit'), minWidth: 100, @@ -339,7 +345,7 @@ flex: 1, editable: true })) - setColumns([...columns, ...cols, action]) + setColumns([...columns, ...cols]) } else { notify(msg); } @@ -388,9 +394,9 @@ }, }, }} - pageSizeOptions={[10, 25, 50, 100]} + pageSizeOptions={[15, 25, 50, 100]} editMode="row" - checkboxSelection + onRowSelectionModelChange={handleSelectionChange} selectionModel={selectedRows} sx={{ -- Gitblit v1.9.1