feat
parent
4b2483fd3a
commit
3aefacff95
|
|
@ -113,7 +113,7 @@ function QualificationCertPage(props) {
|
||||||
cancelText: "否",
|
cancelText: "否",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const action = enabled ? props.orgQualificationCertDisable : props.orgQualificationCertEnable;
|
const action = enabled ? props.orgQualificationCertDisable : props.orgQualificationCertEnable;
|
||||||
const res = await action({ id: record.id });
|
const res = await action({ data: record.id });
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("操作成功");
|
message.success("操作成功");
|
||||||
await getData();
|
await getData();
|
||||||
|
|
@ -234,15 +234,13 @@ function QualificationCertPage(props) {
|
||||||
<Button danger type="link" onClick={() => onDelete(record.id)}>
|
<Button danger type="link" onClick={() => onDelete(record.id)}>
|
||||||
删除
|
删除
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="link" onClick={() => onToggleStatus(record)}>
|
|
||||||
{record.enableFlag === 1 ? "禁用" : "启用"}
|
|
||||||
</Button>
|
|
||||||
</TableAction>
|
</TableAction>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
scroll={{ y: props.scrollY }}
|
scroll={{ y: props.scrollY , x: 1400}}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
total,
|
total,
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,9 @@ import {
|
||||||
Select,
|
Select,
|
||||||
Table,
|
Table,
|
||||||
Tag,
|
Tag,
|
||||||
Upload,
|
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
|
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
|
||||||
import { UploadOutlined } from "@ant-design/icons";
|
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||||
|
|
@ -212,7 +211,6 @@ function ResignationApplyPage(props) {
|
||||||
function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [submitting, setSubmitting] = useState(false);
|
const [submitting, setSubmitting] = useState(false);
|
||||||
const [uploading, setUploading] = useState(false);
|
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
|
|
@ -228,6 +226,7 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
||||||
values.expectedResignDate =
|
values.expectedResignDate =
|
||||||
values.expectedResignDate?.format?.("YYYY-MM-DD") ||
|
values.expectedResignDate?.format?.("YYYY-MM-DD") ||
|
||||||
values.expectedResignDate;
|
values.expectedResignDate;
|
||||||
|
values.reportFileUrl = values.reportFileUrl?.map?.((f) => f.url).filter(Boolean).join(",") || undefined;
|
||||||
const res = await requestAdd(values);
|
const res = await requestAdd(values);
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
|
|
@ -290,35 +289,7 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
||||||
<Form.Item name="remark" label="备注">
|
<Form.Item name="remark" label="备注">
|
||||||
<Input.TextArea rows={2} placeholder="请输入备注" />
|
<Input.TextArea rows={2} placeholder="请输入备注" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<AttachmentUpload name="reportFileUrl" label="离职通知报告" maxCount={1} accept=".pdf" />
|
||||||
name="reportFileUrl"
|
|
||||||
label="离职通知报告"
|
|
||||||
rules={[{ required: true, message: "请上传离职通知报告" }]}
|
|
||||||
>
|
|
||||||
<Upload
|
|
||||||
action={`${window.process.env.app.API_HOST}/safetyEval/file/upload`}
|
|
||||||
showUploadList={false}
|
|
||||||
maxCount={1}
|
|
||||||
accept=".pdf"
|
|
||||||
onChange={(info) => {
|
|
||||||
if (info.file.status === "uploading") {
|
|
||||||
setUploading(true);
|
|
||||||
} else {
|
|
||||||
setUploading(false);
|
|
||||||
if (info.file.status === "done") {
|
|
||||||
const data = info.file.response?.data;
|
|
||||||
if (data) {
|
|
||||||
form.setFieldsValue({ reportFileUrl: data.url || data });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Button loading={uploading} icon={<UploadOutlined />}>
|
|
||||||
上传文件
|
|
||||||
</Button>
|
|
||||||
</Upload>
|
|
||||||
</Form.Item>
|
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,8 @@ function OrgPersonnelSelectModalInner(props) {
|
||||||
onChange: (page, pageSize) => getData(page, pageSize),
|
onChange: (page, pageSize) => getData(page, pageSize),
|
||||||
}}
|
}}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "人员姓名", dataIndex: "staffName" },
|
{ title: "人员姓名", dataIndex: "userName" },
|
||||||
{ title: "类型", dataIndex: "personType" },
|
{ title: "类型", dataIndex: "personTypeName" },
|
||||||
{ title: "职务", dataIndex: "positionName" },
|
{ title: "职务", dataIndex: "positionName" },
|
||||||
{ title: "职称", dataIndex: "titleName" },
|
{ title: "职称", dataIndex: "titleName" },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ export default function PersonnelStep({
|
||||||
const [viewId, setViewId] = useState("");
|
const [viewId, setViewId] = useState("");
|
||||||
|
|
||||||
const existingIds = personnelList.map((item) => String(item.sourcePersonnelId || ""));
|
const existingIds = personnelList.map((item) => String(item.sourcePersonnelId || ""));
|
||||||
|
console.log(personnelList);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
@ -35,7 +36,7 @@ export default function PersonnelStep({
|
||||||
dataSource={personnelList}
|
dataSource={personnelList}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "序号", width: 60, render: (_, __, index) => index + 1 },
|
{ title: "序号", width: 60, render: (_, __, index) => index + 1 },
|
||||||
{ title: "人员姓名", dataIndex: "personName" },
|
{ title: "人员姓名", dataIndex: "userName" },
|
||||||
{ title: "类型", dataIndex: "personTypeName" },
|
{ title: "类型", dataIndex: "personTypeName" },
|
||||||
{ title: "职务", dataIndex: "positionName" },
|
{ title: "职务", dataIndex: "positionName" },
|
||||||
{ title: "职称", dataIndex: "titleName" },
|
{ title: "职称", dataIndex: "titleName" },
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,6 @@ function FilingFormPage(props) {
|
||||||
const detailRef = useRef(null);
|
const detailRef = useRef(null);
|
||||||
const readOnly = query.readOnly;
|
const readOnly = query.readOnly;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const saveActionHint =
|
const saveActionHint =
|
||||||
mode === FILING_FORM_MODE.FILED
|
mode === FILING_FORM_MODE.FILED
|
||||||
? "请点击提交后保存"
|
? "请点击提交后保存"
|
||||||
|
|
@ -138,7 +136,7 @@ function FilingFormPage(props) {
|
||||||
setSubmitting(true);
|
setSubmitting(true);
|
||||||
|
|
||||||
const currentDetail = collectCurrentDetail();
|
const currentDetail = collectCurrentDetail();
|
||||||
const word= mode === "change" ? "Change" : "";
|
const word = mode === "change" ? "Change" : "";
|
||||||
const body = {
|
const body = {
|
||||||
[`qualFiling${word}AddCmd`]: {
|
[`qualFiling${word}AddCmd`]: {
|
||||||
...currentDetail,
|
...currentDetail,
|
||||||
|
|
@ -165,9 +163,9 @@ function FilingFormPage(props) {
|
||||||
delete params.commitment;
|
delete params.commitment;
|
||||||
}
|
}
|
||||||
|
|
||||||
let action=props.submitQualFiling;
|
let action = props.submitQualFiling;
|
||||||
if (mode === FILING_FORM_MODE.CHANGE) {
|
if (mode === FILING_FORM_MODE.CHANGE) {
|
||||||
action=props.submitQualFilingChange;
|
action = props.submitQualFilingChange;
|
||||||
}
|
}
|
||||||
const result = await action(body);
|
const result = await action(body);
|
||||||
|
|
||||||
|
|
@ -213,9 +211,7 @@ function FilingFormPage(props) {
|
||||||
const rowMap = new Map((rows || []).map((row) => [String(row.id), row]));
|
const rowMap = new Map((rows || []).map((row) => [String(row.id), row]));
|
||||||
const newRows = idsToAdd.map((id) => {
|
const newRows = idsToAdd.map((id) => {
|
||||||
const row = rowMap.get(String(id));
|
const row = rowMap.get(String(id));
|
||||||
return row
|
return row;
|
||||||
? mapStaffRowToFilingPersonnel(row)
|
|
||||||
: mapStaffRowToFilingPersonnel({ id });
|
|
||||||
});
|
});
|
||||||
setDetail((prev) => ({
|
setDetail((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
|
|
@ -227,7 +223,7 @@ function FilingFormPage(props) {
|
||||||
const handlePersonnelRemove = (record) => {
|
const handlePersonnelRemove = (record) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: `确认删除人员「${record.personName}」?`,
|
content: `确认删除人员「${record.userName}」?`,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
setDetail((prev) => ({
|
setDetail((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
|
|
@ -354,7 +350,6 @@ function FilingFormPage(props) {
|
||||||
title={MODE_TITLE[mode] || "资质备案表单"}
|
title={MODE_TITLE[mode] || "资质备案表单"}
|
||||||
history={props.history}
|
history={props.history}
|
||||||
previous
|
previous
|
||||||
|
|
||||||
>
|
>
|
||||||
<Spin spinning={loading || submitting}>
|
<Spin spinning={loading || submitting}>
|
||||||
<Tabs
|
<Tabs
|
||||||
|
|
@ -372,7 +367,6 @@ function FilingFormPage(props) {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<Space>
|
<Space>
|
||||||
{stepIndex > 0 && (
|
{stepIndex > 0 && (
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -408,7 +402,6 @@ function FilingFormPage(props) {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
|
|
||||||
</Spin>
|
</Spin>
|
||||||
<PrerequisiteVerifyModal
|
<PrerequisiteVerifyModal
|
||||||
open={verifyOpen}
|
open={verifyOpen}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue