zjj
2025-05-23 e19d522b1996ecd64654557bde30315502a2dc9b
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
@@ -59,7 +60,7 @@
                    defaultValues={{}}
                // 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,21 +74,27 @@
                            />
                        </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()}
                                />
                                <AutocompleteInput
                                    choices={business}
                                    optionText="label"
                                    label="table.field.asnOrder.wkType"
                                    source="wkType"
                                    optionValue="value"
                                    parse={v => v}
                                />
                                <TextInput
                                    label="table.field.purchase.source"
                                    source="source"
                                    parse={v => v}
                                    validate={required()}
                                />
                                <DateInput
                                    label="table.field.purchase.preArr"
                                    source="preArr"
                                />
                                <NumberInput
                                    label="table.field.purchase.anfme"
@@ -96,15 +103,10 @@
                                />
                            </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"
                                    parse={v => v}
                                />
                                <TextInput
                                    label="table.field.purchase.channel"
@@ -116,20 +118,13 @@
                                    source="platCode"
                                    parse={v => v}
                                />
                            </Stack>
                            <Stack direction='row' gap={2}>
                            <DateInput
                                <DateInput
                                    label="table.field.purchase.startTime"
                                    source="startTime"
                                />
                                <DateInput
                                    label="table.field.purchase.endTime"
                                    source="endTime"
                                />
                                <TextInput
                                    label="table.field.purchase.project"
                                    source="project"
                                    parse={v => v}
                                />
                            </Stack>
                        </Grid>
@@ -144,7 +139,7 @@
                    </Grid>
                </SimpleForm>
            </Edit >
            <PurchaseItemList />
            <PurchaseItemList />
        </>
    )
}