Browse Source

update:department rules

dev
powersir 9 months ago
parent
commit
dbfdd939b9
1 changed files with 17 additions and 3 deletions
  1. +17
    -3
      src/pages/system/dept/create-department.tsx

+ 17
- 3
src/pages/system/dept/create-department.tsx View File

@@ -42,6 +42,7 @@ const DepartmentEditor: React.FC<EditorProps> = (props) => {
}, [visible]);

const save = async () => {
await form.validateFields();
setSaveLoading(true);
const fieldValues = form.getFieldsValue();
const newValue = isEdit ? { ...data, ...fieldValues } : fieldValues;
@@ -65,7 +66,7 @@ const DepartmentEditor: React.FC<EditorProps> = (props) => {
width={640}
onOk={save}
onCancel={() => onCancel()}
confirmLoading= {saveLoading}
confirmLoading={saveLoading}
destroyOnClose
>
<Form
@@ -107,11 +108,24 @@ const DepartmentEditor: React.FC<EditorProps> = (props) => {
<Input />
</Form.Item>

<Form.Item name="sort" label="显示排序" >
<Form.Item name="sort" label="显示排序"
rules={[
{
required: true,
message: '请输入显示排序',
},
]}
>
<InputNumber min={1} max={100} />
</Form.Item>

<Form.Item name="status" label="状态">
<Form.Item name="status" label="状态"
rules={[
{
required: true,
message: '请设置状态',
},
]}>
<Radio.Group options={[
{ value: 0, label: "开启" },
{ value: 1, label: "关闭" }


Loading…
Cancel
Save