From 0d3a5be1512815a38f37ae81e7d9fc0948fd3f16 Mon Sep 17 00:00:00 2001 From: verou <857149855@qq.com> Date: 星期二, 25 三月 2025 13:54:57 +0800 Subject: [PATCH] 1 --- rsf-admin/src/page/asnOrder/AsnOrderModal.jsx | 44 ++++++++++++++++++++++---------------------- 1 files changed, 22 insertions(+), 22 deletions(-) diff --git a/rsf-admin/src/page/asnOrder/AsnOrderModal.jsx b/rsf-admin/src/page/asnOrder/AsnOrderModal.jsx index 1b23e74..debec59 100644 --- a/rsf-admin/src/page/asnOrder/AsnOrderModal.jsx +++ b/rsf-admin/src/page/asnOrder/AsnOrderModal.jsx @@ -53,6 +53,7 @@ import { Add, Edit, Delete } from '@mui/icons-material'; import _ from 'lodash'; import { DataGrid } from '@mui/x-data-grid'; +import DictionarySelect from "../components/DictionarySelect"; const AsnOrderModal = (props) => { const { open, setOpen, asnId } = props; @@ -84,8 +85,8 @@ const [tabelData, setTableData] = useState([]); - const handleChange = (e) => { - const { name, value } = e.target; + + const handleChange = (value, name) => { setFormData((prevData) => ({ ...prevData, [name]: value @@ -171,34 +172,33 @@ </Box> </DialogTitle> <DialogContent sx={{ mt: 2 }}> - <Box component="form" sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}> - <form> + <Box sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}> + <Form> <Grid container spacing={2}> <Grid item xs={4}> - <TextField - label={translate('table.field.asnOrder.type')} + <DictionarySelect + label={translate("table.field.asnOrder.type")} name="type" value={formData.type} - onChange={handleChange} - onBlur={requestSetHead} - variant="outlined" + onChange={(e) => handleChange(+e.target.value, 'type')} size="small" - required + dictTypeCode="sys_order_type" /> + </Grid> - {/* <Grid item xs={4}> - <TextField - label={translate('table.field.asnOrder.wkType')} - name="wkType" - value={formData.wkType} - onChange={handleChange} - variant="outlined" - size="small" - /> - </Grid> */} + <Grid item xs={4}> + <DictionarySelect + label={translate("table.field.asnOrder.wkType")} + name="wkType" + value={formData.wkType} + onChange={(e) => handleChange(+e.target.value, 'wkType')} + size="small" + dictTypeCode="sys_business_type" + /> + </Grid> </Grid> - </form> + </Form> </Box> <Box sx={{ mt: 2 }}> @@ -216,7 +216,7 @@ <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}> <Toolbar sx={{ width: '100%', justifyContent: 'space-between' }} > <Button onClick={handleSubmit} variant="contained" startIcon={<SaveIcon />}> - 纭 + {translate('toolbar.confirm')} </Button> </Toolbar> </DialogActions> -- Gitblit v1.9.1