feat
parent
7aa52f77fe
commit
23a6e35604
|
|
@ -71,7 +71,6 @@ const InternalReviewContent = (props) => {
|
|||
setRows(next);
|
||||
};
|
||||
|
||||
|
||||
const isDispatched =
|
||||
internalReview?.reviewerSignatureTaskStatus === "dispatched";
|
||||
const problemCount = rows.filter(
|
||||
|
|
@ -80,41 +79,51 @@ const InternalReviewContent = (props) => {
|
|||
|
||||
const handleAssign = async () => {
|
||||
if (!projectId) return;
|
||||
const res = await props.evalInternalReviewAssign({ projectId, signTaskPersonCmd:{
|
||||
signerPersonnelId: selectedReviewer,
|
||||
signerName: reviewers.find((item) => item.personnelId === selectedReviewer)?.personnelName ,
|
||||
} });
|
||||
await handleConfirm("not_passed");
|
||||
const res = await props.evalInternalReviewAssign({
|
||||
projectId,
|
||||
signTaskPersonCmd: {
|
||||
signerPersonnelId: selectedReviewer,
|
||||
signerName: reviewers.find(
|
||||
(item) => item.personnelId === selectedReviewer,
|
||||
)?.personnelName,
|
||||
},
|
||||
});
|
||||
if (res?.success !== false) {
|
||||
message.success("已下发签字任务");
|
||||
fetchDetail();
|
||||
}
|
||||
};
|
||||
|
||||
const handleConfirm = async (resultCode) => {
|
||||
if (!projectId) return;
|
||||
const payload = {
|
||||
id: internalReview?.id,
|
||||
projectId,
|
||||
resultCode,
|
||||
opinionContent: overallOpinion,
|
||||
reviewItems: rows.map((r) => ({
|
||||
bizType: "eval_internal_review",
|
||||
bizId: internalReview?.id,
|
||||
reviewDimensionCode: r.reviewDimensionCode,
|
||||
reviewDimensionName: r.reviewDimensionName,
|
||||
reviewFocus: r.reviewFocus,
|
||||
reviewConclusion: r.reviewConclusion,
|
||||
reviewOpinion: r.reviewOpinion,
|
||||
})),
|
||||
};
|
||||
const res = await props.evalInternalReviewConfirm(payload);
|
||||
if (res?.success !== false) {
|
||||
message.success(
|
||||
resultCode === "passed" ? "已提交" : "已保存",
|
||||
);
|
||||
fetchDetail();
|
||||
props.getDetail?.();
|
||||
}
|
||||
return new Promise(async (resolve, reject) => {
|
||||
if (!projectId) return;
|
||||
const payload = {
|
||||
id: internalReview?.id,
|
||||
projectId,
|
||||
resultCode,
|
||||
opinionContent: overallOpinion,
|
||||
reviewItems: rows.map((r) => ({
|
||||
bizType: "eval_internal_review",
|
||||
bizId: internalReview?.id,
|
||||
reviewDimensionCode: r.reviewDimensionCode,
|
||||
reviewDimensionName: r.reviewDimensionName,
|
||||
reviewFocus: r.reviewFocus,
|
||||
reviewConclusion: r.reviewConclusion,
|
||||
reviewOpinion: r.reviewOpinion,
|
||||
})),
|
||||
};
|
||||
const res = await props.evalInternalReviewConfirm(payload);
|
||||
if (res?.success !== false) {
|
||||
message.success(resultCode === "passed" ? "已提交" : "已保存");
|
||||
resolve(res);
|
||||
if (resultCode === "passed") {
|
||||
props.getDetail?.();
|
||||
}
|
||||
}
|
||||
else{
|
||||
reject(res);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const columns = [
|
||||
|
|
@ -128,7 +137,9 @@ const InternalReviewContent = (props) => {
|
|||
<Select
|
||||
value={val}
|
||||
size="small"
|
||||
style={{ width: 100 }}
|
||||
style={{ width: 130 }}
|
||||
allowClear
|
||||
placeholder="请选择结论"
|
||||
onChange={(v) => updateRow(idx, "reviewConclusion", v)}
|
||||
>
|
||||
{CONCLUSION_OPTIONS.map((opt) => (
|
||||
|
|
@ -169,9 +180,20 @@ const InternalReviewContent = (props) => {
|
|||
<Col span={8}>
|
||||
<Card size="small">
|
||||
<Typography.Text type="secondary">内审人</Typography.Text>
|
||||
<div style={{ overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
|
||||
<Tooltip title={(reviewers || []).map((r) => r.personnelName).join("、")}>
|
||||
<strong>{(reviewers || []).map((r) => r.personnelName).join("、") || "-"}</strong>
|
||||
<div
|
||||
style={{
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
}}
|
||||
>
|
||||
<Tooltip
|
||||
title={(reviewers || []).map((r) => r.personnelName).join("、")}
|
||||
>
|
||||
<strong>
|
||||
{(reviewers || []).map((r) => r.personnelName).join("、") ||
|
||||
"-"}
|
||||
</strong>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</Card>
|
||||
|
|
@ -213,6 +235,9 @@ const InternalReviewContent = (props) => {
|
|||
<TextArea
|
||||
rows={2}
|
||||
value={overallOpinion}
|
||||
allowClear
|
||||
placeholder="请输入总体审核意见"
|
||||
maxLength={120}
|
||||
onChange={(e) => setOverallOpinion(e.target.value)}
|
||||
style={{ marginTop: 4 }}
|
||||
/>
|
||||
|
|
@ -237,7 +262,6 @@ const InternalReviewContent = (props) => {
|
|||
onClick={handleAssign}
|
||||
loading={internalReviewAssignLoading}
|
||||
disabled={isDispatched || !selectedReviewer}
|
||||
|
||||
>
|
||||
{isDispatched ? "已下发APP签字" : "下发APP签字"}
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -61,6 +61,13 @@ const NoticePanel = () => (
|
|||
下载模板
|
||||
</Button>
|
||||
</div>
|
||||
<AttachmentUpload
|
||||
name="PRACTICE_NOTIFICATION"
|
||||
label="从业告知书"
|
||||
maxCount={1}
|
||||
accept=".docx"
|
||||
extra="仅支持上传 Word 格式文件"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
@ -111,19 +118,72 @@ const InspectionPanel = ({ dataSource = [], evalProjectDetailData = {} }) => {
|
|||
<span>签到日期:{dataSource?.[0]?.singInTime ? dayjs(dataSource?.[0]?.singInTime).format('YYYY-MM-DD') : '-'}</span>
|
||||
</div>
|
||||
</Card>
|
||||
<AttachmentUpload
|
||||
name="SITE_INSPECTION_FORM"
|
||||
label="现场检查表"
|
||||
maxCount={10}
|
||||
accept=".pdf,.doc,.docx,.xls,.xlsx"
|
||||
extra="检查表应包含项目名称、检查日期、检查人员、检查依据、逐项检查结果和不符合项记录;上传后与人员打卡记录共同作为现场踏勘凭证。
|
||||
支持Excel、Word、PDF和清晰扫描件"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const SimpleUploadPanel = ({ index, title, desc }) => (
|
||||
const RectificationNoticePanel = () => (
|
||||
<div>
|
||||
<div className="pf-section-header">
|
||||
<div>
|
||||
<span style={{ fontSize: 20, fontWeight: 600, color: "#1677ff", marginRight: 8 }}>{index}</span>
|
||||
<Typography.Text strong style={{ fontSize: 15 }}>{title}</Typography.Text>
|
||||
<Typography.Paragraph type="secondary" style={{ margin: 0 }}>{desc}</Typography.Paragraph>
|
||||
<span style={{ fontSize: 20, fontWeight: 600, color: "#1677ff", marginRight: 8 }}>03</span>
|
||||
<Typography.Text strong style={{ fontSize: 15 }}>整改通知单上传</Typography.Text>
|
||||
<Typography.Paragraph type="secondary" style={{ margin: 0 }}>本节点不在线编制整改通知,只归档机构已出具的《整改通知单》文件;上传成功即完成,后续可替换修改。</Typography.Paragraph>
|
||||
</div>
|
||||
</div>
|
||||
<AttachmentUpload
|
||||
name="RECTIFICATION_NOTICE"
|
||||
label="整改通知单"
|
||||
maxCount={10}
|
||||
accept=".pdf,.doc,.docx,.jpg,.jpeg,.png,.xls,.xlsx"
|
||||
extra="支持 PDF、Word、JPG、PNG、Excel 格式,最多上传 10 个文件"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
const EnterpriseRectificationPanel = () => (
|
||||
<div>
|
||||
<div className="pf-section-header">
|
||||
<div>
|
||||
<span style={{ fontSize: 20, fontWeight: 600, color: "#1677ff", marginRight: 8 }}>04</span>
|
||||
<Typography.Text strong style={{ fontSize: 15 }}>企业整改报告上传</Typography.Text>
|
||||
<Typography.Paragraph type="secondary" style={{ margin: 0 }}>企业线下提交《整改报告》后,由机构人员上传归档;本系统不提供企业在线提交和逐项整改流程。</Typography.Paragraph>
|
||||
</div>
|
||||
</div>
|
||||
<AttachmentUpload
|
||||
name="ENTERPRISE_RECTIFICATION"
|
||||
label="企业整改报告"
|
||||
maxCount={10}
|
||||
accept=".pdf,.doc,.docx,.jpg,.jpeg,.png,.zip,.rar,.7z"
|
||||
extra="支持 PDF、Word、压缩包、图片格式,最多上传 10 个文件"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
const RectificationReviewPanel = () => (
|
||||
<div>
|
||||
<div className="pf-section-header">
|
||||
<div>
|
||||
<span style={{ fontSize: 20, fontWeight: 600, color: "#1677ff", marginRight: 8 }}>05</span>
|
||||
<Typography.Text strong style={{ fontSize: 15 }}>整改复查单上传</Typography.Text>
|
||||
<Typography.Paragraph type="secondary" style={{ margin: 0 }}>机构人员现场复查后,将经双方签字确认的《整改复查单》上传归档;上传后本节点自动标记完成。</Typography.Paragraph>
|
||||
</div>
|
||||
</div>
|
||||
<AttachmentUpload
|
||||
name="RECTIFICATION_REVIEW"
|
||||
label="整改情况复查单"
|
||||
maxCount={10}
|
||||
accept=".pdf,.doc,.docx,.jpg,.jpeg,.png,.xls,.xlsx"
|
||||
extra="支持 PDF、Word、JPG、PNG、Excel 格式,最多上传 10 个文件"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
@ -217,39 +277,22 @@ const SurveyContent = (props) => {
|
|||
items={STAGES.map((s) => ({ title: s.label }))}
|
||||
/>
|
||||
|
||||
{activeStage === "PRACTICE_NOTIFICATION" && <NoticePanel />}
|
||||
{activeStage === "SITE_INSPECTION_FORM" && <InspectionPanel dataSource={surveyPersonnel} evalProjectDetailData={evalProjectDetailData} />}
|
||||
{activeStage === "RECTIFICATION_NOTICE" && (
|
||||
<SimpleUploadPanel
|
||||
index="03" title="整改通知单上传"
|
||||
desc="本节点不在线编制整改通知,只归档机构已出具的《整改通知单》文件;上传成功即完成,后续可替换修改。"
|
||||
/>
|
||||
)}
|
||||
{activeStage === "ENTERPRISE_RECTIFICATION" && (
|
||||
<SimpleUploadPanel
|
||||
index="04" title="企业整改报告上传"
|
||||
desc="企业线下提交《整改报告》后,由机构人员上传归档;本系统不提供企业在线提交和逐项整改流程。"
|
||||
/>
|
||||
)}
|
||||
{activeStage === "RECTIFICATION_REVIEW" && (
|
||||
<SimpleUploadPanel
|
||||
index="05" title="整改复查单上传"
|
||||
desc="机构人员现场复查后,将经双方签字确认的《整改复查单》上传归档;上传后本节点自动标记完成。"
|
||||
/>
|
||||
)}
|
||||
|
||||
<Form form={form} layout="vertical">
|
||||
{STAGES.map((s) => (
|
||||
<div key={s.key} style={{ display: s.key === activeStage ? "block" : "none" }}>
|
||||
<AttachmentUpload
|
||||
name={s.key}
|
||||
label="上传附件"
|
||||
maxCount={10}
|
||||
accept=".pdf,.doc,.docx,.jpg,.jpeg,.png,.xls,.xlsx"
|
||||
extra="支持 PDF、Word、JPG、PNG、Excel 格式,最多上传 10 个文件"
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
<div style={{ display: activeStage === "PRACTICE_NOTIFICATION" ? "block" : "none" }}>
|
||||
<NoticePanel />
|
||||
</div>
|
||||
<div style={{ display: activeStage === "SITE_INSPECTION_FORM" ? "block" : "none" }}>
|
||||
<InspectionPanel dataSource={surveyPersonnel} evalProjectDetailData={evalProjectDetailData} />
|
||||
</div>
|
||||
<div style={{ display: activeStage === "RECTIFICATION_NOTICE" ? "block" : "none" }}>
|
||||
<RectificationNoticePanel />
|
||||
</div>
|
||||
<div style={{ display: activeStage === "ENTERPRISE_RECTIFICATION" ? "block" : "none" }}>
|
||||
<EnterpriseRectificationPanel />
|
||||
</div>
|
||||
<div style={{ display: activeStage === "RECTIFICATION_REVIEW" ? "block" : "none" }}>
|
||||
<RectificationReviewPanel />
|
||||
</div>
|
||||
</Form>
|
||||
|
||||
<Flex justify="flex-end" gap={8} style={{ marginTop: 16 }}>
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ const TechnicalReviewContent = (props) => {
|
|||
|
||||
const handleAssign = async () => {
|
||||
if (!projectId) return;
|
||||
await handleConfirm("2");
|
||||
const res = await props.evalTechReviewAssign({
|
||||
projectId,
|
||||
signTaskPersonCmd: {
|
||||
|
|
@ -87,35 +88,40 @@ const TechnicalReviewContent = (props) => {
|
|||
});
|
||||
if (res?.success !== false) {
|
||||
message.success("已下发签字任务");
|
||||
fetchDetail();
|
||||
}
|
||||
};
|
||||
|
||||
const handleConfirm = async (resultCode) => {
|
||||
if (!projectId) return;
|
||||
const payload = {
|
||||
id: techReview?.id,
|
||||
projectId,
|
||||
resultCode,
|
||||
opinionContent: overallOpinion,
|
||||
reviewItems: rows.map((r) => ({
|
||||
bizType: "eval_tech_review",
|
||||
bizId: techReview?.id,
|
||||
reviewDimensionCode: r.reviewDimensionCode,
|
||||
reviewDimensionName: r.reviewDimensionName,
|
||||
reviewFocus: r.reviewFocus,
|
||||
reviewConclusion: r.reviewConclusion,
|
||||
reviewOpinion: r.reviewOpinion,
|
||||
})),
|
||||
};
|
||||
const res = await props.evalTechReviewConfirm(payload);
|
||||
if (res?.success !== false) {
|
||||
message.success(
|
||||
resultCode === "1" ? "已确认技审并提交过程控制" : "已保存",
|
||||
);
|
||||
fetchDetail();
|
||||
props.getDetail?.();
|
||||
}
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const payload = {
|
||||
id: techReview?.id,
|
||||
projectId,
|
||||
resultCode,
|
||||
opinionContent: overallOpinion,
|
||||
reviewItems: rows.map((r) => ({
|
||||
bizType: "eval_tech_review",
|
||||
bizId: techReview?.id,
|
||||
reviewDimensionCode: r.reviewDimensionCode,
|
||||
reviewDimensionName: r.reviewDimensionName,
|
||||
reviewFocus: r.reviewFocus,
|
||||
reviewConclusion: r.reviewConclusion,
|
||||
reviewOpinion: r.reviewOpinion,
|
||||
})),
|
||||
};
|
||||
const res = await props.evalTechReviewConfirm(payload);
|
||||
if (res?.success !== false) {
|
||||
resolve(res);
|
||||
message.success(
|
||||
resultCode === "1" ? "已确认技审并提交过程控制" : "已保存",
|
||||
);
|
||||
if (resultCode === "1") {
|
||||
props.getDetail?.();
|
||||
}
|
||||
} else {
|
||||
reject(res);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const columns = [
|
||||
|
|
@ -129,7 +135,9 @@ const TechnicalReviewContent = (props) => {
|
|||
<Select
|
||||
value={val}
|
||||
size="small"
|
||||
style={{ width: 100 }}
|
||||
style={{ width: 130 }}
|
||||
allowClear
|
||||
placeholder="请选择结论"
|
||||
onChange={(v) => updateRow(idx, "reviewConclusion", v)}
|
||||
>
|
||||
{CONCLUSION_OPTIONS.map((opt) => (
|
||||
|
|
@ -228,6 +236,9 @@ const TechnicalReviewContent = (props) => {
|
|||
<TextArea
|
||||
rows={2}
|
||||
value={overallOpinion}
|
||||
allowClear
|
||||
placeholder="请输入技术审核意见"
|
||||
maxLength={120}
|
||||
onChange={(e) => setOverallOpinion(e.target.value)}
|
||||
style={{ marginTop: 4 }}
|
||||
/>
|
||||
|
|
@ -259,7 +270,12 @@ const TechnicalReviewContent = (props) => {
|
|||
</Flex>
|
||||
|
||||
<Flex justify="flex-end" gap={8} style={{ marginTop: 16 }}>
|
||||
<Button onClick={() => handleConfirm("2")}>保存意见</Button>
|
||||
<Button
|
||||
loading={props.safetyEvalBusiness?.techReviewConfirmLoading}
|
||||
onClick={() => handleConfirm("2")}
|
||||
>
|
||||
保存意见
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => handleConfirm("1")}
|
||||
|
|
|
|||
Loading…
Reference in New Issue