Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js # src/pages/Container/EnterpriseInfo/ResignationApply/index.jsv0.0.1-final
commit
7121437b4d
|
|
@ -14,7 +14,6 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
|
||||||
label={label}
|
label={label}
|
||||||
valuePropName="fileList"
|
valuePropName="fileList"
|
||||||
getValueProps={(value) => {
|
getValueProps={(value) => {
|
||||||
|
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
return { fileList: value };
|
return { fileList: value };
|
||||||
}
|
}
|
||||||
|
|
@ -30,7 +29,6 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
getValueFromEvent={({ fileList }) => {
|
getValueFromEvent={({ fileList }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
fileList?.map((file) => ({
|
fileList?.map((file) => ({
|
||||||
url: file.response?.data?.url || file.url,
|
url: file.response?.data?.url || file.url,
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,12 @@ export const GENDER_OPTIONS = [
|
||||||
{ label: "女", value: 2 },
|
{ label: "女", value: 2 },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/** 性别编码(1男2女) → 名称 */
|
||||||
|
export const GENDER_MAP = {
|
||||||
|
1: "男",
|
||||||
|
2: "女",
|
||||||
|
};
|
||||||
|
|
||||||
/** 审核结果 */
|
/** 审核结果 */
|
||||||
export const REVIEW_RESULT_OPTIONS = [
|
export const REVIEW_RESULT_OPTIONS = [
|
||||||
{ label: "通过", value: 1 },
|
{ label: "通过", value: 1 },
|
||||||
|
|
|
||||||
|
|
@ -181,8 +181,8 @@ function PersonnelChangePage(props) {
|
||||||
width: 140,
|
width: 140,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
const code = record.resignAuditStatus ?? record.auditStatus ?? record.auditStatusCode;
|
const code = record.resignAuditStatus ?? record.auditStatus ?? record.auditStatusCode;
|
||||||
const label = RESIGN_AUDIT_STATUS_LABEL[code] ?? "-";
|
return RESIGN_AUDIT_STATUS_LABEL[code] ? <Tag color={AUDIT_STATUS_COLOR[code]}>{label}</Tag> : "-";
|
||||||
return <Tag color={AUDIT_STATUS_COLOR[code]}>{label}</Tag>;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import {
|
||||||
} from "~/enumerate/enterpriseOptions";
|
} from "~/enumerate/enterpriseOptions";
|
||||||
import { getBirthDateFromIdCard } from "~/utils";
|
import { getBirthDateFromIdCard } from "~/utils";
|
||||||
import { idCardRule, mobileRule } from "~/utils/validators";
|
import { idCardRule, mobileRule } from "~/utils/validators";
|
||||||
|
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||||
import StaffViewModal from "../StaffViewModal";
|
import StaffViewModal from "../StaffViewModal";
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
@ -48,17 +49,26 @@ function PersonnelInfoPage(props) {
|
||||||
Get("/safetyEval/org-position/page", { current: 1, size: 200 }),
|
Get("/safetyEval/org-position/page", { current: 1, size: 200 }),
|
||||||
]);
|
]);
|
||||||
if (cancelled) return;
|
if (cancelled) return;
|
||||||
setDeptOptions((deptRes?.data || []).map((d) => ({ label: d.deptName, value: d.id })));
|
setDeptOptions(
|
||||||
setPositionOptions((posRes?.data || []).map((p) => ({
|
(deptRes?.data || []).map((d) => ({
|
||||||
label: p.positionName,
|
label: d.deptName,
|
||||||
value: p.id,
|
value: d.id,
|
||||||
deptId: p.deptId,
|
})),
|
||||||
})));
|
);
|
||||||
|
setPositionOptions(
|
||||||
|
(posRes?.data || []).map((p) => ({
|
||||||
|
label: p.positionName,
|
||||||
|
value: p.id,
|
||||||
|
deptId: p.deptId,
|
||||||
|
})),
|
||||||
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn("[PersonnelInfo] load dept/position options failed:", err);
|
console.warn("[PersonnelInfo] load dept/position options failed:", err);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
return () => { cancelled = true; };
|
return () => {
|
||||||
|
cancelled = true;
|
||||||
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -134,19 +144,37 @@ function PersonnelInfoPage(props) {
|
||||||
loading={loading}
|
loading={loading}
|
||||||
formLine={[
|
formLine={[
|
||||||
<Form.Item key="userName" name="userName">
|
<Form.Item key="userName" name="userName">
|
||||||
<ControlWrapper.Input label="用户名称" placeholder="请输入用户名称" allowClear />
|
<ControlWrapper.Input
|
||||||
|
label="用户名称"
|
||||||
|
placeholder="请输入用户名称"
|
||||||
|
allowClear
|
||||||
|
/>
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item key="deptId" name="deptId">
|
<Form.Item key="deptId" name="deptId">
|
||||||
<ControlWrapper.Select label="部门" placeholder="请选择部门" allowClear style={{ width: "100%" }}>
|
<ControlWrapper.Select
|
||||||
|
label="部门"
|
||||||
|
placeholder="请选择部门"
|
||||||
|
allowClear
|
||||||
|
style={{ width: "100%" }}
|
||||||
|
>
|
||||||
{deptOptions.map((d) => (
|
{deptOptions.map((d) => (
|
||||||
<Select.Option key={d.value} value={d.value}>{d.label}</Select.Option>
|
<Select.Option key={d.value} value={d.value}>
|
||||||
|
{d.label}
|
||||||
|
</Select.Option>
|
||||||
))}
|
))}
|
||||||
</ControlWrapper.Select>
|
</ControlWrapper.Select>
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item key="postId" name="postId">
|
<Form.Item key="postId" name="postId">
|
||||||
<ControlWrapper.Select label="岗位" placeholder="请选择岗位" allowClear style={{ width: "100%" }}>
|
<ControlWrapper.Select
|
||||||
|
label="岗位"
|
||||||
|
placeholder="请选择岗位"
|
||||||
|
allowClear
|
||||||
|
style={{ width: "100%" }}
|
||||||
|
>
|
||||||
{positionOptions.map((p) => (
|
{positionOptions.map((p) => (
|
||||||
<Select.Option key={p.value} value={p.value}>{p.label}</Select.Option>
|
<Select.Option key={p.value} value={p.value}>
|
||||||
|
{p.label}
|
||||||
|
</Select.Option>
|
||||||
))}
|
))}
|
||||||
</ControlWrapper.Select>
|
</ControlWrapper.Select>
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
|
|
@ -166,7 +194,7 @@ function PersonnelInfoPage(props) {
|
||||||
{ title: "用户名称", dataIndex: "userName" },
|
{ title: "用户名称", dataIndex: "userName" },
|
||||||
{ title: "账号", dataIndex: "account" },
|
{ title: "账号", dataIndex: "account" },
|
||||||
{ title: "部门", dataIndex: "deptName" },
|
{ title: "部门", dataIndex: "deptName" },
|
||||||
{ title: "岗位", dataIndex: "positionName" },
|
{ title: "岗位", dataIndex: "postName" },
|
||||||
{
|
{
|
||||||
title: "证照名称",
|
title: "证照名称",
|
||||||
dataIndex: "certNames",
|
dataIndex: "certNames",
|
||||||
|
|
@ -178,17 +206,51 @@ function PersonnelInfoPage(props) {
|
||||||
width: 320,
|
width: 320,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<TableAction>
|
<TableAction>
|
||||||
<Button type="link" size="small" onClick={() => { setCurrentId(record.id); setViewModalOpen(true); }}>
|
<Button
|
||||||
|
type="link"
|
||||||
|
size="small"
|
||||||
|
onClick={() => {
|
||||||
|
setCurrentId(record.id);
|
||||||
|
setViewModalOpen(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="link" size="small" onClick={() => { setCurrentId(record.id); setFormModalOpen(true); }}>
|
<Button
|
||||||
|
type="link"
|
||||||
|
size="small"
|
||||||
|
onClick={() => {
|
||||||
|
setCurrentId(record.id);
|
||||||
|
setFormModalOpen(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="link" size="small" onClick={() => { setCurrentId(record.id); goCertificate(record.id, record.userName); }}>
|
<Button
|
||||||
|
type="link"
|
||||||
|
size="small"
|
||||||
|
onClick={() => {
|
||||||
|
setCurrentId(record.id);
|
||||||
|
goCertificate(record.id, record.userName);
|
||||||
|
}}
|
||||||
|
>
|
||||||
证书
|
证书
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="link" size="small" onClick={() => onResetPassword(record.id)}>重置密码</Button>
|
<Button
|
||||||
<Button danger type="link" size="small" onClick={() => onDelete(record.id)}>删除</Button>
|
type="link"
|
||||||
|
size="small"
|
||||||
|
onClick={() => onResetPassword(record.id)}
|
||||||
|
>
|
||||||
|
重置密码
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
danger
|
||||||
|
type="link"
|
||||||
|
size="small"
|
||||||
|
onClick={() => onDelete(record.id)}
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</Button>
|
||||||
</TableAction>
|
</TableAction>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
@ -242,7 +304,15 @@ function PersonnelInfoPage(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function StaffFormModal({
|
function StaffFormModal({
|
||||||
open, currentId, staffInfoGet, staffInfoAdd, staffInfoEdit, deptOptions, positionOptions, onCancel, onSuccess,
|
open,
|
||||||
|
currentId,
|
||||||
|
staffInfoGet,
|
||||||
|
staffInfoAdd,
|
||||||
|
staffInfoEdit,
|
||||||
|
deptOptions,
|
||||||
|
positionOptions,
|
||||||
|
onCancel,
|
||||||
|
onSuccess,
|
||||||
}) {
|
}) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [submitting, setSubmitting] = useState(false);
|
const [submitting, setSubmitting] = useState(false);
|
||||||
|
|
@ -267,7 +337,11 @@ function StaffFormModal({
|
||||||
inflightDeptRef.current = id;
|
inflightDeptRef.current = id;
|
||||||
setPositionLoading(true);
|
setPositionLoading(true);
|
||||||
try {
|
try {
|
||||||
const res = await Get("/safetyEval/org-position/page", { current: 1, size: 200, deptId: id });
|
const res = await Get("/safetyEval/org-position/page", {
|
||||||
|
current: 1,
|
||||||
|
size: 200,
|
||||||
|
deptId: id,
|
||||||
|
});
|
||||||
const options = (res?.data || []).map((p) => ({
|
const options = (res?.data || []).map((p) => ({
|
||||||
label: p.positionName,
|
label: p.positionName,
|
||||||
value: p.id,
|
value: p.id,
|
||||||
|
|
@ -308,30 +382,29 @@ function StaffFormModal({
|
||||||
if (!open || !currentId) return;
|
if (!open || !currentId) return;
|
||||||
let cancelled = false;
|
let cancelled = false;
|
||||||
setDetailLoading(true);
|
setDetailLoading(true);
|
||||||
staffInfoGet({ id: currentId }).then((res) => {
|
staffInfoGet({ id: currentId })
|
||||||
if (cancelled || !res?.data) return;
|
.then((res) => {
|
||||||
const data = { ...res.data };
|
if (cancelled || !res?.data) return;
|
||||||
loadPositionsByDept(data.deptId);
|
const data = { ...res.data };
|
||||||
if (cancelled) return;
|
loadPositionsByDept(data.deptId);
|
||||||
const setFields = {
|
if (cancelled) return;
|
||||||
...data,
|
const setFields = {
|
||||||
};
|
...data,
|
||||||
if (data.birthDate) setFields.birthDate = dayjs(data.birthDate);
|
};
|
||||||
const fileList = data.proofMaterialUrl
|
if (data.birthDate) setFields.birthDate = dayjs(data.birthDate);
|
||||||
? data.proofMaterialUrl.split(",").filter(Boolean).map((url, i) => ({
|
|
||||||
uid: `-${i}`,
|
if (setFields.proofMaterialUrl) {
|
||||||
name: url.split("/").pop() || `附件${i + 1}`,
|
setFields.proofMaterialUrl = JSON.parse(setFields.proofMaterialUrl);
|
||||||
status: "done",
|
}
|
||||||
url,
|
|
||||||
}))
|
form.setFieldsValue(setFields);
|
||||||
: [];
|
})
|
||||||
setFields.proofMaterialUrl = fileList;
|
.finally(() => {
|
||||||
setUploadFileList(fileList);
|
if (!cancelled) setDetailLoading(false);
|
||||||
form.setFieldsValue(setFields);
|
});
|
||||||
}).finally(() => {
|
return () => {
|
||||||
if (!cancelled) setDetailLoading(false);
|
cancelled = true;
|
||||||
});
|
};
|
||||||
return () => { cancelled = true; };
|
|
||||||
}, [open, currentId]);
|
}, [open, currentId]);
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
|
|
@ -360,7 +433,12 @@ function StaffFormModal({
|
||||||
setSubmitting(true);
|
setSubmitting(true);
|
||||||
const payload = {
|
const payload = {
|
||||||
...values,
|
...values,
|
||||||
genderName: values.genderCode === 1 ? "男" : values.genderCode === 2 ? "女" : undefined,
|
genderName:
|
||||||
|
values.genderCode === 1
|
||||||
|
? "男"
|
||||||
|
: values.genderCode === 2
|
||||||
|
? "女"
|
||||||
|
: undefined,
|
||||||
personTypeCode: values.personTypeName,
|
personTypeCode: values.personTypeName,
|
||||||
personTypeName: values.personTypeName,
|
personTypeName: values.personTypeName,
|
||||||
professionalLevelCode: values.professionalLevelName,
|
professionalLevelCode: values.professionalLevelName,
|
||||||
|
|
@ -370,8 +448,8 @@ function StaffFormModal({
|
||||||
educationLevelCode: values.educationLevelName,
|
educationLevelCode: values.educationLevelName,
|
||||||
educationLevelName: values.educationLevelName,
|
educationLevelName: values.educationLevelName,
|
||||||
proofMaterialUrl: Array.isArray(values.proofMaterialUrl)
|
proofMaterialUrl: Array.isArray(values.proofMaterialUrl)
|
||||||
? values.proofMaterialUrl.map((f) => f.url || f.response?.data?.url).filter(Boolean).join(",")
|
? JSON.stringify(values.proofMaterialUrl)
|
||||||
: "",
|
: undefined,
|
||||||
};
|
};
|
||||||
if (payload.birthDate && typeof payload.birthDate !== "string") {
|
if (payload.birthDate && typeof payload.birthDate !== "string") {
|
||||||
payload.birthDate = payload.birthDate.format("YYYY-MM-DD");
|
payload.birthDate = payload.birthDate.format("YYYY-MM-DD");
|
||||||
|
|
@ -412,15 +490,26 @@ function StaffFormModal({
|
||||||
>
|
>
|
||||||
<Row gutter={16}>
|
<Row gutter={16}>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="userName" label="姓名" rules={[{ required: true, message: "请输入姓名" }]}>
|
<Form.Item
|
||||||
|
name="userName"
|
||||||
|
label="姓名"
|
||||||
|
rules={[{ required: true, message: "请输入姓名" }]}
|
||||||
|
>
|
||||||
<Input placeholder="请输入姓名" />
|
<Input placeholder="请输入姓名" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="genderCode" label="性别" rules={[{ required: true, message: "请选择性别" }]}>
|
<Form.Item
|
||||||
|
name="genderCode"
|
||||||
|
label="性别"
|
||||||
|
rules={[{ required: true, message: "请选择性别" }]}
|
||||||
|
>
|
||||||
<Select
|
<Select
|
||||||
placeholder="请选择性别"
|
placeholder="请选择性别"
|
||||||
options={[{ label: "男", value: 1 }, { label: "女", value: 2 }]}
|
options={[
|
||||||
|
{ label: "男", value: 1 },
|
||||||
|
{ label: "女", value: 2 },
|
||||||
|
]}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -430,17 +519,35 @@ function StaffFormModal({
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="account" label="账号" rules={[mobileRule("账号", true)]}>
|
<Form.Item
|
||||||
|
name="account"
|
||||||
|
label="账号"
|
||||||
|
rules={[mobileRule("账号", true)]}
|
||||||
|
>
|
||||||
<Input placeholder="请输入账号" />
|
<Input placeholder="请输入账号" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="deptId" label="部门" rules={[{ required: true, message: "请选择部门" }]}>
|
<Form.Item
|
||||||
<Select placeholder="请选择部门" options={deptOptions} allowClear showSearch optionFilterProp="label" />
|
name="deptId"
|
||||||
|
label="部门"
|
||||||
|
rules={[{ required: true, message: "请选择部门" }]}
|
||||||
|
>
|
||||||
|
<Select
|
||||||
|
placeholder="请选择部门"
|
||||||
|
options={deptOptions}
|
||||||
|
allowClear
|
||||||
|
showSearch
|
||||||
|
optionFilterProp="label"
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="postId" label="岗位" rules={[{ required: true, message: "请选择岗位" }]}>
|
<Form.Item
|
||||||
|
name="postId"
|
||||||
|
label="岗位"
|
||||||
|
rules={[{ required: true, message: "请选择岗位" }]}
|
||||||
|
>
|
||||||
<Select
|
<Select
|
||||||
placeholder="请选择岗位"
|
placeholder="请选择岗位"
|
||||||
options={deptPositionOptions}
|
options={deptPositionOptions}
|
||||||
|
|
@ -453,23 +560,38 @@ function StaffFormModal({
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="idCardNo" label="身份证号" rules={[idCardRule(true)]}>
|
<Form.Item
|
||||||
|
name="idCardNo"
|
||||||
|
label="身份证号"
|
||||||
|
rules={[idCardRule(true)]}
|
||||||
|
>
|
||||||
<Input placeholder="请输入身份证号" />
|
<Input placeholder="请输入身份证号" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="personTypeName" label="人员类型">
|
<Form.Item name="personTypeName" label="人员类型">
|
||||||
<Select placeholder="请选择人员类型" options={PERSON_TYPE_OPTIONS} />
|
<Select
|
||||||
|
placeholder="请选择人员类型"
|
||||||
|
options={PERSON_TYPE_OPTIONS}
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="qualScope" label="资质范围">
|
<Form.Item name="qualScope" label="资质范围">
|
||||||
<Select placeholder="请选择资质范围" allowClear options={QUALIFICATION_INDUSTRY_OPTIONS} />
|
<Select
|
||||||
|
placeholder="请选择资质范围"
|
||||||
|
allowClear
|
||||||
|
options={QUALIFICATION_INDUSTRY_OPTIONS}
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="professionalLevelName" label="职业等级">
|
<Form.Item name="professionalLevelName" label="职业等级">
|
||||||
<Select placeholder="请选择职业等级" allowClear options={PROFESSIONAL_LEVEL_OPTIONS} />
|
<Select
|
||||||
|
placeholder="请选择职业等级"
|
||||||
|
allowClear
|
||||||
|
options={PROFESSIONAL_LEVEL_OPTIONS}
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -479,12 +601,20 @@ function StaffFormModal({
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="educationTypeName" label="学历类型">
|
<Form.Item name="educationTypeName" label="学历类型">
|
||||||
<Select placeholder="请选择学历类型" allowClear options={EDUCATION_TYPE_OPTIONS} />
|
<Select
|
||||||
|
placeholder="请选择学历类型"
|
||||||
|
allowClear
|
||||||
|
options={EDUCATION_TYPE_OPTIONS}
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="educationLevelName" label="学历层次">
|
<Form.Item name="educationLevelName" label="学历层次">
|
||||||
<Select placeholder="请选择学历层次" allowClear options={EDUCATION_LEVEL_OPTIONS} />
|
<Select
|
||||||
|
placeholder="请选择学历层次"
|
||||||
|
allowClear
|
||||||
|
options={EDUCATION_LEVEL_OPTIONS}
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -493,17 +623,30 @@ function StaffFormModal({
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="registerEngineerFlag" label="是否注册安全工程师" initialValue={2}>
|
<Form.Item
|
||||||
<Select placeholder="请选择" options={REGISTER_ENGINEER_OPTIONS} />
|
name="registerEngineerFlag"
|
||||||
|
label="是否注册安全工程师"
|
||||||
|
initialValue={2}
|
||||||
|
>
|
||||||
|
<Select
|
||||||
|
placeholder="请选择"
|
||||||
|
options={REGISTER_ENGINEER_OPTIONS}
|
||||||
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item name="publications" label="出版学术专著、专利、获奖、发表学术论文等">
|
<Form.Item
|
||||||
|
name="publications"
|
||||||
|
label="出版学术专著、专利、获奖、发表学术论文等"
|
||||||
|
>
|
||||||
<Input.TextArea rows={2} placeholder="请输入" />
|
<Input.TextArea rows={2} placeholder="请输入" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Form.Item name="abilityDeclaration" label="自我申报的专业能力及认定方式">
|
<Form.Item
|
||||||
|
name="abilityDeclaration"
|
||||||
|
label="自我申报的专业能力及认定方式"
|
||||||
|
>
|
||||||
<Input.TextArea rows={2} placeholder="请输入" />
|
<Input.TextArea rows={2} placeholder="请输入" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -513,6 +656,11 @@ function StaffFormModal({
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
|
<AttachmentUpload
|
||||||
|
name="proofMaterialUrl"
|
||||||
|
label="申报专业能力证明材料"
|
||||||
|
maxCount={5}
|
||||||
|
/>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="proofMaterialUrl"
|
name="proofMaterialUrl"
|
||||||
label="申报专业能力证明材料"
|
label="申报专业能力证明材料"
|
||||||
|
|
@ -580,4 +728,7 @@ function StaffFormModal({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STAFF_INFO], true)(AntdTableFuncControl(PersonnelInfoPage));
|
export default Connect(
|
||||||
|
[NS_STAFF_INFO],
|
||||||
|
true,
|
||||||
|
)(AntdTableFuncControl(PersonnelInfoPage));
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Button, Descriptions, Modal, Table } from "antd";
|
import { Button, Descriptions, Modal, Table, Upload } from "antd";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import FilePreviewModal, { FilePreviewContent } from "~/components/FilePreviewModal";
|
import FilePreviewModal, { FilePreviewContent } from "~/components/FilePreviewModal";
|
||||||
import { resolvePreviewSrc } from "~/components/CertPreviewImg";
|
import { resolvePreviewSrc } from "~/components/CertPreviewImg";
|
||||||
|
|
@ -85,7 +85,9 @@ export default function StaffViewModal({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const proofFiles = info.proofMaterials || [];
|
|
||||||
|
const proofMaterialUrl= info.proofMaterialUrl? JSON.parse(info.proofMaterialUrl) : [];
|
||||||
|
|
||||||
const certPreviewFiles = certPreviewInfo?.certImgs?.length
|
const certPreviewFiles = certPreviewInfo?.certImgs?.length
|
||||||
? certPreviewInfo.certImgs
|
? certPreviewInfo.certImgs
|
||||||
: certPreviewInfo?.certImgFiles || [];
|
: certPreviewInfo?.certImgFiles || [];
|
||||||
|
|
@ -105,25 +107,25 @@ export default function StaffViewModal({
|
||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
>
|
>
|
||||||
<Descriptions bordered column={2} labelStyle={{ width: 120 }}>
|
<Descriptions bordered column={2} labelStyle={{ width: 120 }}>
|
||||||
<Descriptions.Item label="姓名">{info.staffName}</Descriptions.Item>
|
<Descriptions.Item label="姓名">{info.userName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="性别">{GENDER_MAP[info.gender]}</Descriptions.Item>
|
<Descriptions.Item label="性别">{GENDER_MAP[info.genderCode]}</Descriptions.Item>
|
||||||
<Descriptions.Item label="出生日期">{info.birthDate}</Descriptions.Item>
|
<Descriptions.Item label="出生日期">{info.birthDate}</Descriptions.Item>
|
||||||
<Descriptions.Item label="账号">{info.account}</Descriptions.Item>
|
<Descriptions.Item label="账号">{info.account}</Descriptions.Item>
|
||||||
<Descriptions.Item label="部门">{info.deptName}</Descriptions.Item>
|
<Descriptions.Item label="部门">{info.deptName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="岗位">{info.positionName}</Descriptions.Item>
|
<Descriptions.Item label="岗位">{info.postName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="人员类型">{info.personType || "基础人员"}</Descriptions.Item>
|
<Descriptions.Item label="人员类型">{info.personType || "基础人员"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="资质范围">{info.qualScope || "-"}</Descriptions.Item>
|
<Descriptions.Item label="资质范围">{info.qualScope || "-"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="职业等级">{info.professionalLevel || "-"}</Descriptions.Item>
|
<Descriptions.Item label="职业等级">{info.professionalLevelName || "-"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="证书编号">{info.evaluatorCertNo || "-"}</Descriptions.Item>
|
<Descriptions.Item label="证书编号">{info.evaluatorCertNo || "-"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="学历类型">{info.educationType || "-"}</Descriptions.Item>
|
<Descriptions.Item label="学历类型">{info.educationTypeName || "-"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="学历层次">{info.educationLevel || "-"}</Descriptions.Item>
|
<Descriptions.Item label="学历层次">{info.educationLevelName || "-"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="职称">{info.titleName || "-"}</Descriptions.Item>
|
<Descriptions.Item label="职称">{info.titleName || "-"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="是否注册安全工程师">
|
<Descriptions.Item label="是否注册安全工程师">
|
||||||
{REGISTER_ENGINEER_MAP[info.registerEngineerFlag] ?? "-"}
|
{REGISTER_ENGINEER_MAP[info.registerEngineerFlag] ?? "-"}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="身份证号">{info.idCardNo}</Descriptions.Item>
|
<Descriptions.Item label="身份证号">{info.idCardNo}</Descriptions.Item>
|
||||||
<Descriptions.Item label="学历">{info.education || "-"}</Descriptions.Item>
|
|
||||||
<Descriptions.Item label="现住地址" span={2}>{info.homeAddress}</Descriptions.Item>
|
<Descriptions.Item label="现住地址" span={2}>{info.currentAddress}</Descriptions.Item>
|
||||||
<Descriptions.Item label="办公地址" span={2}>{info.officeAddress}</Descriptions.Item>
|
<Descriptions.Item label="办公地址" span={2}>{info.officeAddress}</Descriptions.Item>
|
||||||
<Descriptions.Item label="毕业院校">{info.graduateSchool}</Descriptions.Item>
|
<Descriptions.Item label="毕业院校">{info.graduateSchool}</Descriptions.Item>
|
||||||
<Descriptions.Item label="专业">{info.major}</Descriptions.Item>
|
<Descriptions.Item label="专业">{info.major}</Descriptions.Item>
|
||||||
|
|
@ -137,26 +139,14 @@ export default function StaffViewModal({
|
||||||
{info.workExperience || "-"}
|
{info.workExperience || "-"}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="申报专业能力证明材料" span={2}>
|
<Descriptions.Item label="申报专业能力证明材料" span={2}>
|
||||||
{proofFiles.length ? (
|
{proofMaterialUrl.length ? proofMaterialUrl.map((item) => (
|
||||||
<div style={{ display: "flex", flexDirection: "column", gap: 4 }}>
|
<div key={item.id}>
|
||||||
{proofFiles.map((file, index) => {
|
<a href={item.url} target="_blank" rel="noopener noreferrer">
|
||||||
const fileName = file.name || file.fileName || `专业能力证明${index + 1}.pdf`;
|
{item.fileName || item.name || item.url}
|
||||||
return (
|
</a>
|
||||||
<div key={`${fileName}-${index}`} style={{ display: "flex", alignItems: "center", gap: 8 }}>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
size="small"
|
|
||||||
style={{ padding: 0 }}
|
|
||||||
onClick={() => setAttachmentPreview({ url: file.url, fileName })}
|
|
||||||
>
|
|
||||||
查看附件
|
|
||||||
</Button>
|
|
||||||
<span>{fileName}</span>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
</div>
|
||||||
) : "-"}
|
)) : "-"
|
||||||
|
}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ function QualificationCertPage(props) {
|
||||||
okText: "是",
|
okText: "是",
|
||||||
cancelText: "否",
|
cancelText: "否",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const res = await props.orgQualificationCertRemove({ id });
|
const res = await props.orgQualificationCertRemove({ data: id });
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
getData();
|
getData();
|
||||||
|
|
@ -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,
|
||||||
|
|
@ -315,7 +313,7 @@ function CertFormModal({
|
||||||
const data = { ...res.data };
|
const data = { ...res.data };
|
||||||
data.issueDate = toDayjs(data.issueDate);
|
data.issueDate = toDayjs(data.issueDate);
|
||||||
data.validDate = [toDayjs(data.validStartDate), toDayjs(data.validEndDate)];
|
data.validDate = [toDayjs(data.validStartDate), toDayjs(data.validEndDate)];
|
||||||
data.certImageUrl = parseCertImageUrl(data.certImageUrl);
|
data.certImageUrl = data.certImageUrl;
|
||||||
form.setFieldsValue(data);
|
form.setFieldsValue(data);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn("[QualificationCert] load detail failed:", err);
|
console.warn("[QualificationCert] load detail failed:", err);
|
||||||
|
|
@ -336,7 +334,7 @@ function CertFormModal({
|
||||||
setSubmitting(true);
|
setSubmitting(true);
|
||||||
values.validStartDate = values.validDate?.[0];
|
values.validStartDate = values.validDate?.[0];
|
||||||
values.validEndDate = values.validDate?.[1];
|
values.validEndDate = values.validDate?.[1];
|
||||||
values.certImageUrl = stringifyCertImageUrl(values.certImageUrl);
|
values.certImageUrl = values.certImageUrl?.map((item) => item.url).join(",");
|
||||||
if (currentId) values.id = currentId;
|
if (currentId) values.id = currentId;
|
||||||
const request = currentId ? requestEdit : requestAdd;
|
const request = currentId ? requestEdit : requestAdd;
|
||||||
const res = await request(values);
|
const res = await request(values);
|
||||||
|
|
@ -420,7 +418,7 @@ function CertFormModal({
|
||||||
<Form.Item name="remark" label="备注">
|
<Form.Item name="remark" label="备注">
|
||||||
<TextArea rows={3} placeholder="请输入备注" />
|
<TextArea rows={3} placeholder="请输入备注" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<AttachmentUpload name="certImageUrl" label="证书图片" maxCount={3} />
|
<AttachmentUpload name="certImageUrl" accept="image/*" label="证书图片" maxCount={3} />
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -10,9 +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 AttachmentUpload from "~/components/AttachmentUpload";
|
||||||
import { UploadOutlined } from "@ant-design/icons";
|
import { UploadOutlined } from "@ant-design/icons";
|
||||||
import PreviewUrlButton from "~/components/PreviewUrlButton";
|
import PreviewUrlButton from "~/components/PreviewUrlButton";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
@ -213,7 +213,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();
|
||||||
|
|
@ -226,9 +225,11 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
||||||
setSubmitting(true);
|
setSubmitting(true);
|
||||||
values.applyTime =
|
values.applyTime =
|
||||||
values.applyTime?.format?.("YYYY-MM-DD HH:mm:ss") || values.applyTime;
|
values.applyTime?.format?.("YYYY-MM-DD HH:mm:ss") || values.applyTime;
|
||||||
|
|
||||||
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("提交成功");
|
||||||
|
|
@ -291,6 +292,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>
|
||||||
|
<AttachmentUpload name="reportFileUrl" label="离职通知报告" maxCount={1} accept=".pdf" />
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="reportFileUrl"
|
name="reportFileUrl"
|
||||||
label="离职通知报告"
|
label="离职通知报告"
|
||||||
|
|
@ -388,6 +390,9 @@ function ViewModal({ open, currentId, requestDetail, onCancel }) {
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="备注">{info.remark}</Descriptions.Item>
|
<Descriptions.Item label="备注">{info.remark}</Descriptions.Item>
|
||||||
<Descriptions.Item label="离职通知报告">
|
<Descriptions.Item label="离职通知报告">
|
||||||
|
<a href={info.reportFileUrl} target="_blank" rel="noopener noreferrer">
|
||||||
|
查看
|
||||||
|
</a>
|
||||||
{info.reportFileUrl ? (
|
{info.reportFileUrl ? (
|
||||||
<PreviewUrlButton url={info.reportFileUrl}>
|
<PreviewUrlButton url={info.reportFileUrl}>
|
||||||
查看文件
|
查看文件
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,11 @@ const menuItems = [
|
||||||
label: "企业画像管理",
|
label: "企业画像管理",
|
||||||
icon: <BarChartOutlined />,
|
icon: <BarChartOutlined />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "/safetyEval/container/Supervision/ExperManage",
|
||||||
|
label: "专家管理",
|
||||||
|
icon: <IdcardOutlined />,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,11 @@ export default function BasicInfoStep({ form, disabled }) {
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="workplaceArea" label="工作场所建筑面积(㎡)">
|
<Form.Item
|
||||||
|
name="workplaceArea"
|
||||||
|
label="工作场所建筑面积(㎡)"
|
||||||
|
rules={[{ required: !disabled, message: "请输入工作场所建筑面积" }]}
|
||||||
|
>
|
||||||
<InputNumber style={{ width: "100%" }} min={0} placeholder="㎡" />
|
<InputNumber style={{ width: "100%" }} min={0} placeholder="㎡" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,9 @@ 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: "titleName" },
|
{ title: "职称", dataIndex: "titleName" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
|
|
|
||||||
|
|
@ -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,9 +36,9 @@ 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: "titleName" },
|
{ title: "职称", dataIndex: "titleName" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
@ -153,7 +151,10 @@ function FilingFormPage(props) {
|
||||||
delete params.materials;
|
delete params.materials;
|
||||||
}
|
}
|
||||||
if (params.personnelList) {
|
if (params.personnelList) {
|
||||||
body[`qualFilingPersonnel${word}AddCmds`] = params.personnelList;
|
body[`qualFilingPersonnel${word}AddCmds`] = params.personnelList.map((item) => ({
|
||||||
|
...item,
|
||||||
|
personName: item.userName,
|
||||||
|
}));
|
||||||
delete params.personnelList;
|
delete params.personnelList;
|
||||||
}
|
}
|
||||||
if (params.equipmentList) {
|
if (params.equipmentList) {
|
||||||
|
|
@ -165,9 +166,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 +214,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 +226,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 +353,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,43 +370,41 @@ function FilingFormPage(props) {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<Space>
|
||||||
<Space>
|
{stepIndex > 0 && (
|
||||||
{stepIndex > 0 && (
|
<Button
|
||||||
<Button
|
onClick={async () => {
|
||||||
onClick={async () => {
|
setActiveStep(STEP_ITEMS[stepIndex - 1].key);
|
||||||
setActiveStep(STEP_ITEMS[stepIndex - 1].key);
|
}}
|
||||||
}}
|
>
|
||||||
>
|
上一步
|
||||||
上一步
|
</Button>
|
||||||
</Button>
|
)}
|
||||||
)}
|
{!isLastStep && (
|
||||||
{!isLastStep && (
|
<Button
|
||||||
<Button
|
type="primary"
|
||||||
type="primary"
|
onClick={async () => {
|
||||||
onClick={async () => {
|
setActiveStep(STEP_ITEMS[stepIndex + 1].key);
|
||||||
setActiveStep(STEP_ITEMS[stepIndex + 1].key);
|
}}
|
||||||
}}
|
>
|
||||||
>
|
下一步
|
||||||
下一步
|
</Button>
|
||||||
</Button>
|
)}
|
||||||
)}
|
{!readOnly && isLastStep && (
|
||||||
{!readOnly && isLastStep && (
|
<>
|
||||||
<>
|
{mode !== FILING_FORM_MODE.FILED && (
|
||||||
{mode !== FILING_FORM_MODE.FILED && (
|
<Button
|
||||||
<Button
|
onClick={() => handleVerifyConfirm({ isSaveDraft: true })}
|
||||||
onClick={() => handleVerifyConfirm({ isSaveDraft: true })}
|
>
|
||||||
>
|
暂存
|
||||||
暂存
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
<Button type="primary" onClick={handleSubmitRequest}>
|
|
||||||
{mode === FILING_FORM_MODE.FILED ? "提交填报" : "提交申请"}
|
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
)}
|
||||||
)}
|
<Button type="primary" onClick={handleSubmitRequest}>
|
||||||
</Space>
|
{mode === FILING_FORM_MODE.FILED ? "提交填报" : "提交申请"}
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
</Spin>
|
</Spin>
|
||||||
<PrerequisiteVerifyModal
|
<PrerequisiteVerifyModal
|
||||||
open={verifyOpen}
|
open={verifyOpen}
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ const FilingTabs = ({
|
||||||
{ title: "序号", width: 60, render: (_, __, i) => i + 1 },
|
{ title: "序号", width: 60, render: (_, __, i) => i + 1 },
|
||||||
{ title: "人员姓名", dataIndex: "personName", width: 100 },
|
{ title: "人员姓名", dataIndex: "personName", width: 100 },
|
||||||
{ title: "类型", dataIndex: "personTypeName", width: 100 },
|
{ title: "类型", dataIndex: "personTypeName", width: 100 },
|
||||||
{ title: "职务", dataIndex: "positionName", width: 120 },
|
|
||||||
{ title: "职称", dataIndex: "titleName", width: 100 },
|
{ title: "职称", dataIndex: "titleName", width: 100 },
|
||||||
{ title: "操作", width: 80,
|
{ title: "操作", width: 80,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { NS_QUAL_EXPERT } from "~/enumerate/namespace";
|
import { NS_QUAL_EXPERT } from "~/enumerate/namespace";
|
||||||
import { GENDER_OPTIONS } from "~/enumerate/constant";
|
import { GENDER_OPTIONS, GENDER_MAP } from "~/enumerate/constant";
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
||||||
|
|
@ -116,9 +116,9 @@ const ExperManage = (props) => {
|
||||||
{ title: "账号", dataIndex: "account", width: 140 },
|
{ title: "账号", dataIndex: "account", width: 140 },
|
||||||
{
|
{
|
||||||
title: "性别",
|
title: "性别",
|
||||||
dataIndex: "genderName",
|
dataIndex: "genderCode",
|
||||||
width: 70,
|
width: 70,
|
||||||
render: (text) => text || "--",
|
render: (code) => GENDER_MAP[code] || "--",
|
||||||
},
|
},
|
||||||
{ title: "身份证号", dataIndex: "idCardNo", width: 180 },
|
{ title: "身份证号", dataIndex: "idCardNo", width: 180 },
|
||||||
{ title: "证书", dataIndex: "certificate", width: 120, ellipsis: true },
|
{ title: "证书", dataIndex: "certificate", width: 120, ellipsis: true },
|
||||||
|
|
@ -213,7 +213,7 @@ const ExperManage = (props) => {
|
||||||
<Descriptions column={2} bordered size="small" loading={qualExpertDetailLoading}>
|
<Descriptions column={2} bordered size="small" loading={qualExpertDetailLoading}>
|
||||||
<Descriptions.Item label="姓名">{qualExpertDetail?.userName || "--"}</Descriptions.Item>
|
<Descriptions.Item label="姓名">{qualExpertDetail?.userName || "--"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="账号">{qualExpertDetail?.account || "--"}</Descriptions.Item>
|
<Descriptions.Item label="账号">{qualExpertDetail?.account || "--"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="性别">{qualExpertDetail?.genderName || "--"}</Descriptions.Item>
|
<Descriptions.Item label="性别">{GENDER_MAP[qualExpertDetail?.genderCode] || "--"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="身份证号">{qualExpertDetail?.idCardNo || "--"}</Descriptions.Item>
|
<Descriptions.Item label="身份证号">{qualExpertDetail?.idCardNo || "--"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="证书" span={2}>{qualExpertDetail?.certificate || "--"}</Descriptions.Item>
|
<Descriptions.Item label="证书" span={2}>{qualExpertDetail?.certificate || "--"}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue