From 06d7fb698ce6d0efc7ff4224c6b68d2f50feb716 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期一, 21 四月 2025 16:23:46 +0800 Subject: [PATCH] DO单修改及优化 --- rsf-admin/src/page/orders/delivery/DeliveryCreate.jsx | 40 ++++++++++++++-------------------------- 1 files changed, 14 insertions(+), 26 deletions(-) diff --git a/rsf-admin/src/page/orders/delivery/DeliveryCreate.jsx b/rsf-admin/src/page/orders/delivery/DeliveryCreate.jsx index eeccfba..eb55fcb 100644 --- a/rsf-admin/src/page/orders/delivery/DeliveryCreate.jsx +++ b/rsf-admin/src/page/orders/delivery/DeliveryCreate.jsx @@ -36,6 +36,8 @@ const translate = useTranslate(); const notify = useNotify(); + const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_order_type')) || []; + const business = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_business_type')) || []; const handleClose = (event, reason) => { if (reason !== "backdropClick") { @@ -84,36 +86,28 @@ </DialogTitle> <DialogContent sx={{ mt: 2 }}> <Grid container rowSpacing={2} columnSpacing={2}> - <Grid item xs={6} display="flex" gap={1}> - <TextInput - label="table.field.delivery.code" - source="code" - parse={v => v} - autoFocus - /> - </Grid> - <Grid item xs={6} display="flex" gap={1}> + <Grid item xs={16} display="flex" gap={1}> <TextInput label="table.field.delivery.platId" source="platId" parse={v => v} /> - </Grid> - <Grid item xs={6} display="flex" gap={1}> - <TextInput - label="table.field.delivery.type" + <AutocompleteInput + choices={dicts} + optionText="label" + label="table.field.asnOrder.type" source="type" + optionValue="value" parse={v => v} /> - </Grid> - <Grid item xs={6} display="flex" gap={1}> - <TextInput - label="table.field.delivery.wkType" + <AutocompleteInput + choices={business} + optionText="label" + label="table.field.asnOrder.wkType" source="wkType" + optionValue="value" parse={v => v} /> - </Grid> - <Grid item xs={6} display="flex" gap={1}> <TextInput label="table.field.delivery.source" source="source" @@ -121,28 +115,22 @@ validate={required()} /> </Grid> - <Grid item xs={6} display="flex" gap={1}> + <Grid item xs={16} display="flex" gap={1}> <NumberInput label="table.field.delivery.anfme" source="anfme" validate={required()} /> - </Grid> - <Grid item xs={6} display="flex" gap={1}> <NumberInput label="table.field.delivery.qty" source="qty" validate={required()} /> - </Grid> - <Grid item xs={6} display="flex" gap={1}> <NumberInput label="table.field.delivery.workQty" source="workQty" validate={required()} /> - </Grid> - <Grid item xs={6} display="flex" gap={1}> <TextInput label="table.field.delivery.platCode" source="platCode" -- Gitblit v1.9.1