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