Browse Source

提交

storemanagementweb
gwbvipvip 11 months ago
parent
commit
c4bde9927f
1 changed files with 21 additions and 9 deletions
  1. +21
    -9
      src/pages/shopmanage/storeStaff/components/CreateForm.jsx

+ 21
- 9
src/pages/shopmanage/storeStaff/components/CreateForm.jsx View File

@@ -40,16 +40,28 @@ const CreateForm = (props) => {
}
</Select>
</Form.Item>
<Form.Item name="status" label="状态"
rules={[{ required: true, message: '请选择状态' }]} >
<Select placeholder="请选择状态">
<OptGroup>
<Select.Option value={0}>正常</Select.Option>
<Select.Option value={1}>停用</Select.Option>
<Select.Option value={2}>删除</Select.Option>
</OptGroup>
</Select>

<Form.Item
noStyle
shouldUpdate={(prevValues, currentValues) =>
prevValues.mode !== currentValues.mode
} >
{({ getFieldValue }) =>
(props.values.id) ? (
<Form.Item name="status" label="状态"
rules={[{ required: true, message: '请选择状态' }]} >
<Select placeholder="请选择状态">
<OptGroup>
<Select.Option value={0}>正常</Select.Option>
<Select.Option value={1}>停用</Select.Option>
</OptGroup>
</Select>
</Form.Item>
) : null
}
</Form.Item>


<Form.Item>
<Button type="primary" htmlType="submit">
保存


Loading…
Cancel
Save