fix
parent
35f8b990d8
commit
8dd70ed8db
|
|
@ -576,7 +576,7 @@ function StaffFormModal({
|
|||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="birthDate" label="出生日期">
|
||||
<Form.Item name="birthDate" label="出生日期" rules={[{ required: true, message: "请选择出生日期" }]}>
|
||||
<DatePicker style={{ width: "100%" }} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ function OrgEquipmentSelectModalInner(props) {
|
|||
const { open, onCancel, onConfirm, existingIds = [] } = props;
|
||||
const [searchForm] = Form.useForm();
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
const [selectedRows, setSelectedRows] = useState([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [dataSource, setDataSource] = useState([]);
|
||||
const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 });
|
||||
|
|
@ -37,6 +38,7 @@ function OrgEquipmentSelectModalInner(props) {
|
|||
useEffect(() => {
|
||||
if (open) {
|
||||
setSelectedRowKeys([]);
|
||||
setSelectedRows([]);
|
||||
searchForm.resetFields();
|
||||
getData();
|
||||
}
|
||||
|
|
@ -52,7 +54,7 @@ function OrgEquipmentSelectModalInner(props) {
|
|||
Modal.warning({ title: "提示", content: "请选择至少一项未添加的装备" });
|
||||
return;
|
||||
}
|
||||
const rows = dataSource.filter((row) => ids.includes(row.id));
|
||||
const rows = selectedRows.filter((row) => ids.includes(row.id));
|
||||
onConfirm?.(ids, rows);
|
||||
};
|
||||
|
||||
|
|
@ -82,7 +84,11 @@ function OrgEquipmentSelectModalInner(props) {
|
|||
scroll={ { y: 400 }}
|
||||
rowSelection={{
|
||||
selectedRowKeys,
|
||||
onChange: setSelectedRowKeys,
|
||||
preserveSelectedRowKeys: true,
|
||||
onChange: (keys, rows) => {
|
||||
setSelectedRowKeys(keys);
|
||||
setSelectedRows(rows);
|
||||
},
|
||||
getCheckboxProps: (record) => ({
|
||||
disabled: existingIds.includes(String(record.id)),
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ export default function OrgPersonnelSelectModal(props) {
|
|||
const { open, onCancel, onConfirm, existingIds = [] } = props;
|
||||
const [searchForm] = Form.useForm();
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
const [selectedRows, setSelectedRows] = useState([]);
|
||||
const [viewId, setViewId] = useState("");
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [dataSource, setDataSource] = useState([]);
|
||||
|
|
@ -47,6 +48,7 @@ export default function OrgPersonnelSelectModal(props) {
|
|||
useEffect(() => {
|
||||
if (open) {
|
||||
setSelectedRowKeys([]);
|
||||
setSelectedRows([]);
|
||||
searchForm.resetFields();
|
||||
getData();
|
||||
}
|
||||
|
|
@ -62,7 +64,7 @@ export default function OrgPersonnelSelectModal(props) {
|
|||
Modal.warning({ title: "提示", content: "请选择至少一名未添加的人员" });
|
||||
return;
|
||||
}
|
||||
const rows = dataSource.filter((row) => ids.includes(row.id));
|
||||
const rows = selectedRows.filter((row) => ids.includes(row.id));
|
||||
onConfirm?.(ids, rows);
|
||||
};
|
||||
|
||||
|
|
@ -92,7 +94,11 @@ export default function OrgPersonnelSelectModal(props) {
|
|||
dataSource={dataSource}
|
||||
rowSelection={{
|
||||
selectedRowKeys,
|
||||
onChange: setSelectedRowKeys,
|
||||
preserveSelectedRowKeys: true,
|
||||
onChange: (keys, rows) => {
|
||||
setSelectedRowKeys(keys);
|
||||
setSelectedRows(rows);
|
||||
},
|
||||
getCheckboxProps: (record) => ({
|
||||
disabled: existingIds.includes(String(record.id)),
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -416,6 +416,7 @@ function FilingFormPage(props) {
|
|||
!readOnly && mode !== FILING_FORM_MODE.CHANGE ? (
|
||||
<Button
|
||||
loading={submitting}
|
||||
type="primary"
|
||||
onClick={() => handleVerifyConfirm({ isSaveDraft: true })}
|
||||
>
|
||||
暂存
|
||||
|
|
|
|||
Loading…
Reference in New Issue