From 60f974487c6212f4cf0604dcd69ef54196031c05 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 18 四月 2025 13:42:03 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
---
rsf-admin/src/page/system/serialRule/SerialRuleEdit.jsx | 159 ++++++++++++++++++++++++++---------------------------
1 files changed, 78 insertions(+), 81 deletions(-)
diff --git a/rsf-admin/src/page/system/serialRule/SerialRuleEdit.jsx b/rsf-admin/src/page/system/serialRule/SerialRuleEdit.jsx
index 4440c43..c343e76 100644
--- a/rsf-admin/src/page/system/serialRule/SerialRuleEdit.jsx
+++ b/rsf-admin/src/page/system/serialRule/SerialRuleEdit.jsx
@@ -28,12 +28,13 @@
import CustomerTopToolBar from "../../components/EditTopToolBar";
import MemoInput from "../../components/MemoInput";
import StatusSelectInput from "../../components/StatusSelectInput";
+import SerialRuleItemList from "./SerialRuleItemList";
const FormToolbar = () => {
const { getValues } = useFormContext();
return (
- <Toolbar sx={{ justifyContent: 'space-between' }}>
+ <Toolbar sx={{ justifyContent: 'end' }}>
<SaveButton />
<DeleteButton mutationMode="optimistic" />
</Toolbar>
@@ -42,91 +43,87 @@
const SerialRuleEdit = () => {
const translate = useTranslate();
+ const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_task_reset_type')) || [];
return (
- <Edit
- redirect="list"
- mutationMode={EDIT_MODE}
- actions={<CustomerTopToolBar />}
- aside={<EditBaseAside />}
- >
- <SimpleForm
- shouldUnregister
- warnWhenUnsavedChanges
- toolbar={<FormToolbar />}
- mode="onTouched"
- defaultValues={{}}
- // validate={(values) => { }}
+ <>
+ <Edit
+ redirect="list"
+ mutationMode={EDIT_MODE}
+ actions={<CustomerTopToolBar />}
+ aside={<EditBaseAside />}
>
- <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}>
- <Grid item xs={12} md={8}>
- <Typography variant="h6" gutterBottom>
- {translate('common.edit.title.main')}
- </Typography>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.serialRule.code"
- source="code"
- parse={v => v}
- autoFocus
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.serialRule.name"
- source="name"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.serialRule.delimit"
- source="delimit"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.serialRule.reset"
- source="reset"
- parse={v => v}
- validate={required()}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.serialRule.resetDep"
- source="resetDep"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.serialRule.currValue"
- source="currValue"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.serialRule.lastCode"
- source="lastCode"
- parse={v => v}
- />
- </Stack>
+ <SimpleForm
+ shouldUnregister
+ warnWhenUnsavedChanges
+ toolbar={<FormToolbar />}
+ mode="onTouched"
+ defaultValues={{}}
+ // validate={(values) => { }}
+ >
+ <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}>
+ <Grid item xs={12} md={8}>
+ <Typography variant="h6" gutterBottom>
+ {translate('common.edit.title.main')}
+ </Typography>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.serialRule.code"
+ source="code"
+ parse={v => v}
+ readOnly
+ />
+ <TextInput
+ label="table.field.serialRule.name"
+ source="name"
+ parse={v => v}
+ />
+ <TextInput
+ label="table.field.serialRule.delimit"
+ source="delimit"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <AutocompleteInput
+ choices={dicts}
+ optionText="label"
+ label="table.field.serialRule.reset"
+ source="reset"
+ optionValue="value"
+ parse={v => v}
+ validate={[required()]} />
+ <TextInput
+ label="table.field.serialRule.resetDep"
+ source="resetDep"
+ parse={v => v}
+ />
+ <TextInput
+ label="table.field.serialRule.currValue"
+ source="currValue"
+ parse={v => v}
+ />
+ <TextInput
+ label="table.field.serialRule.lastCode"
+ source="lastCode"
+ parse={v => v}
+ />
+ </Stack>
+ </Grid>
+ <Grid item xs={12} md={4}>
+ <Typography variant="h6" gutterBottom>
+ {translate('common.edit.title.common')}
+ </Typography>
+ <StatusSelectInput />
+ <Box mt="2em" />
+ <MemoInput />
+ </Grid>
</Grid>
- <Grid item xs={12} md={4}>
- <Typography variant="h6" gutterBottom>
- {translate('common.edit.title.common')}
- </Typography>
- <StatusSelectInput />
- <Box mt="2em" />
- <MemoInput />
- </Grid>
- </Grid>
- </SimpleForm>
- </Edit >
+ </SimpleForm>
+ </Edit >
+ <SerialRuleItemList></SerialRuleItemList>
+ </>
)
}
--
Gitblit v1.9.1