From 2ba05033837f468ba9d3f8fc60855dacbf527cb2 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期三, 17 九月 2025 15:00:30 +0800 Subject: [PATCH] 跑酷 --- rsf-admin/src/page/orders/purchase/PurchaseEdit.jsx | 80 ++++++++++++++++++++++++--------------- 1 files changed, 49 insertions(+), 31 deletions(-) diff --git a/rsf-admin/src/page/orders/purchase/PurchaseEdit.jsx b/rsf-admin/src/page/orders/purchase/PurchaseEdit.jsx index 759b842..1a0c2f7 100644 --- a/rsf-admin/src/page/orders/purchase/PurchaseEdit.jsx +++ b/rsf-admin/src/page/orders/purchase/PurchaseEdit.jsx @@ -42,7 +42,8 @@ const PurchaseEdit = () => { const translate = useTranslate(); - + const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_in_stock_type')) || []; + const business = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_business_type'))?.filter(data => (data.group == '1')) || []; return ( <> <Edit @@ -54,12 +55,26 @@ <SimpleForm shouldUnregister warnWhenUnsavedChanges - toolbar={<FormToolbar />} + toolbar={false} mode="onTouched" defaultValues={{}} + sx={{ + "& .MuiFormLabel-root.MuiInputLabel-root.Mui-disabled": { + bgcolor: 'white', + WebkitTextFillColor: "rgba(0, 0, 0)" + }, + + "& .MuiInputBase-input.MuiFilledInput-input.Mui-disabled": { + bgcolor: 'white', + WebkitTextFillColor: "rgba(0, 0, 0)" + }, + "& .MuiFilledInput-root.MuiInputBase-sizeSmall": { + bgcolor: 'white', + } + }} // validate={(values) => { }} > - <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}> + <Grid container width={{ xs: '100%', xl: '100%' }} rowSpacing={3} columnSpacing={3}> <Grid item xs={18} md={10}> <Typography variant="h6" gutterBottom> {translate('common.edit.title.main')} @@ -73,78 +88,81 @@ /> </Stack> */} <Stack direction='row' gap={2}> - <TextInput - label="table.field.purchase.type" - source="type$" + <AutocompleteInput + choices={dicts} + optionText="label" + label="table.field.asnOrder.type" + source="type" + optionValue="value" parse={v => v} - validate={required()} + readOnly + /> + <AutocompleteInput + choices={business} + optionText="label" + label="table.field.asnOrder.wkType" + source="wkType" + optionValue="value" + parse={v => v} + readOnly /> <TextInput label="table.field.purchase.source" source="source" parse={v => v} + readOnly validate={required()} - /> - <DateInput - label="table.field.purchase.preArr" - source="preArr" /> <NumberInput label="table.field.purchase.anfme" source="anfme" + readOnly validate={required()} /> </Stack> <Stack direction='row' gap={2}> - <NumberInput - label="table.field.purchase.qty" - source="qty" - validate={required()} - /> - <NumberInput - label="table.field.purchase.workQty" - source="workQty" - validate={required()} + <TextInput + label="table.field.purchase.project" + source="project" + readOnly + parse={v => v} /> <TextInput label="table.field.purchase.channel" source="channel" parse={v => v} + readOnly /> <TextInput label="table.field.purchase.platCode" source="platCode" parse={v => v} + readOnly /> - </Stack> - <Stack direction='row' gap={2}> - <DateInput + <DateInput label="table.field.purchase.startTime" source="startTime" + readOnly /> <DateInput label="table.field.purchase.endTime" source="endTime" - /> - <TextInput - label="table.field.purchase.project" - source="project" - parse={v => v} + readOnly /> </Stack> </Grid> - <Grid item xs={6} md={2}> + {/* <Grid item xs={6} md={2}> <Typography variant="h6" gutterBottom> {translate('common.edit.title.common')} </Typography> <StatusSelectInput /> <Box mt="2em" /> <MemoInput /> - </Grid> + </Grid> */} </Grid> </SimpleForm> </Edit > - <PurchaseItemList /> + <PurchaseItemList /> </> ) } -- Gitblit v1.9.1