fix
parent
82d8a2c7f6
commit
0616a469cd
|
|
@ -51,7 +51,7 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
|
|||
}}
|
||||
>
|
||||
<Upload
|
||||
//disabled={disabled}
|
||||
disabled={disabled}
|
||||
listType="picture-card"
|
||||
headers={{
|
||||
token: sessionStorage.getItem('token')
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ const BaiduMapPicker = ({ visible, onCancel, onConfirm }) => {
|
|||
type: "script",
|
||||
attr: { type: "text/javascript" },
|
||||
});
|
||||
setTimeout(() => {
|
||||
setLoaded(true);
|
||||
}, 1000);
|
||||
};
|
||||
if (window?.base?.loadDynamicResource) {
|
||||
callback();
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ const BusinessReminder = (props) => {
|
|||
if (years >= 1) {
|
||||
return Number.isInteger(years) ? `${years}年` : `${years.toFixed(1)}年`;
|
||||
}
|
||||
return `${days}天`;
|
||||
return `${days}年`;
|
||||
};
|
||||
|
||||
const renderWaringStatus = (status) => {
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ const MyProject = (props) => {
|
|||
render: (_, record) => (
|
||||
<TableAction>
|
||||
<Button type="link" size="small" onClick={() =>
|
||||
props.history.push(`ProjectFlow?id=${record.id}`)}>编辑</Button>
|
||||
props.history.push(`ProjectFlow?id=${record.id}${record.archiveFlag === 1 ? '&readOnly=1' : ''}`)}>{record.archiveFlag === 1 ? '查看' : '编辑'}</Button>
|
||||
|
||||
</TableAction>
|
||||
),
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const YES_NO_OPTIONS = [
|
|||
{ label: "否", value: 2 },
|
||||
];
|
||||
|
||||
const ContractContent = (props) => {
|
||||
const ContractContent = ({ readOnly, ...props }) => {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const projectId = router.query?.id;
|
||||
|
|
@ -130,7 +130,7 @@ const ContractContent = (props) => {
|
|||
</span>
|
||||
</div>
|
||||
<Card title="项目合同信息" styles={{ header: { textAlign: "center" } }}>
|
||||
<Form form={form} layout="vertical">
|
||||
<Form form={form} layout="vertical" disabled={readOnly}>
|
||||
<Card
|
||||
type="inner"
|
||||
size="small"
|
||||
|
|
@ -518,20 +518,23 @@ const ContractContent = (props) => {
|
|||
label="项目合同扫描件"
|
||||
accept=".pdf"
|
||||
maxCount={10}
|
||||
disabled={readOnly}
|
||||
extra="请上传PDF文件,大小不应超过500MB,不超过10个文件。"
|
||||
/>
|
||||
</Form>
|
||||
|
||||
<Flex justify="flex-end" gap={8}>
|
||||
<Button onClick={() => props.history.goBack()}>取消</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={handleSave}
|
||||
loading={contractSaveLoading}
|
||||
>
|
||||
完成合同录入并保存
|
||||
</Button>
|
||||
</Flex>
|
||||
{!readOnly && (
|
||||
<Flex justify="flex-end" gap={8}>
|
||||
<Button onClick={() => props.history.goBack()}>取消</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={handleSave}
|
||||
loading={contractSaveLoading}
|
||||
>
|
||||
完成合同录入并保存
|
||||
</Button>
|
||||
</Flex>
|
||||
)}
|
||||
</Card>
|
||||
</div>
|
||||
</Spin>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import { tools } from "@cqsjjb/jjb-common-lib";
|
|||
const { TextArea } = Input;
|
||||
const { router } = tools;
|
||||
|
||||
const ControlContent = (props) => {
|
||||
const ControlContent = ({ readOnly, ...props }) => {
|
||||
const projectId = router.query?.id;
|
||||
const { processControlDetail, processControlFiles, evalProjectDetailData } =
|
||||
props.safetyEvalBusiness || {};
|
||||
|
|
@ -190,6 +190,7 @@ const ControlContent = (props) => {
|
|||
size="small"
|
||||
style={{ width: 130 }}
|
||||
allowClear
|
||||
disabled={readOnly}
|
||||
placeholder="请选择结果"
|
||||
onChange={(v) => updateRow(idx, "reviewConclusion", v)}
|
||||
>
|
||||
|
|
@ -206,6 +207,7 @@ const ControlContent = (props) => {
|
|||
size="small"
|
||||
value={val}
|
||||
allowClear
|
||||
disabled={readOnly}
|
||||
maxLength={60}
|
||||
placeholder="请输入意见"
|
||||
onChange={(e) => updateRow(idx, "reviewOpinion", e.target.value)}
|
||||
|
|
@ -364,13 +366,15 @@ const ControlContent = (props) => {
|
|||
]}
|
||||
/>
|
||||
<Flex justify="flex-end" gap={8} style={{ padding: "12px 0" }}>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => handleConfirm("passed")}
|
||||
loading={props.safetyEvalBusiness?.processControlConfirmLoading}
|
||||
>
|
||||
过程控制签字提交
|
||||
</Button>
|
||||
{!readOnly && (
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => handleConfirm("passed")}
|
||||
loading={props.safetyEvalBusiness?.processControlConfirmLoading}
|
||||
>
|
||||
过程控制签字提交
|
||||
</Button>
|
||||
)}
|
||||
</Flex>
|
||||
</Card>
|
||||
)}
|
||||
|
|
@ -422,6 +426,7 @@ const ControlContent = (props) => {
|
|||
rows={3}
|
||||
value={approvalOpinion}
|
||||
onChange={(e) => setApprovalOpinion(e.target.value)}
|
||||
disabled={readOnly}
|
||||
placeholder="请输入签发意见"
|
||||
style={{ marginTop: 4 }}
|
||||
/>
|
||||
|
|
@ -441,7 +446,7 @@ const ControlContent = (props) => {
|
|||
size="small"
|
||||
allowClear
|
||||
style={{ width: 180 }}
|
||||
disabled={isDispatched}
|
||||
disabled={isDispatched || readOnly}
|
||||
value={selectPeople?.value}
|
||||
onChange={(value, option) => {
|
||||
setSelectPeople(option);
|
||||
|
|
@ -457,7 +462,7 @@ const ControlContent = (props) => {
|
|||
loading={
|
||||
props.safetyEvalBusiness?.processControlAssignLoading
|
||||
}
|
||||
disabled={isDispatched || !selectPeople?.value}
|
||||
disabled={isDispatched || !selectPeople?.value || readOnly}
|
||||
>
|
||||
{isDispatched ? "已下发APP签字" : "下发APP签字"}
|
||||
</Button>
|
||||
|
|
@ -492,7 +497,7 @@ const ControlContent = (props) => {
|
|||
size="small"
|
||||
/>
|
||||
|
||||
<Form form={archiveForm} layout="vertical">
|
||||
<Form form={archiveForm} layout="vertical" disabled={readOnly}>
|
||||
<Row gutter={16} style={{ marginTop: 16, marginBottom: 16 }}>
|
||||
<Col span={6}>
|
||||
<Form.Item label="项目编号" name="projectNo">
|
||||
|
|
@ -522,21 +527,23 @@ const ControlContent = (props) => {
|
|||
align="center"
|
||||
style={{ marginTop: 12, paddingBottom: 16 }}
|
||||
>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={handleArchive}
|
||||
loading={props.safetyEvalBusiness?.processControlArchiveLoading}
|
||||
disabled={!canArchive}
|
||||
title={
|
||||
!canArchive
|
||||
? !isSignatureCompleted
|
||||
? "需签字完成后才可归档"
|
||||
: "需生成归档交接单后才可归档"
|
||||
: ""
|
||||
}
|
||||
>
|
||||
双方签字并确认入库
|
||||
</Button>
|
||||
{!readOnly && (
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={handleArchive}
|
||||
loading={props.safetyEvalBusiness?.processControlArchiveLoading}
|
||||
disabled={!canArchive}
|
||||
title={
|
||||
!canArchive
|
||||
? !isSignatureCompleted
|
||||
? "需签字完成后才可归档"
|
||||
: "需生成归档交接单后才可归档"
|
||||
: ""
|
||||
}
|
||||
>
|
||||
双方签字并确认入库
|
||||
</Button>
|
||||
)}
|
||||
</Flex>
|
||||
</Card>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const CONCLUSION_OPTIONS = [
|
|||
{ value: "not_conform_to", label: "需修改" },
|
||||
];
|
||||
|
||||
const InternalReviewContent = (props) => {
|
||||
const InternalReviewContent = ({ readOnly, ...props }) => {
|
||||
const projectId = router.query?.id;
|
||||
const {
|
||||
internalReviewDetail,
|
||||
|
|
@ -145,6 +145,7 @@ const InternalReviewContent = (props) => {
|
|||
size="small"
|
||||
style={{ width: 130 }}
|
||||
allowClear
|
||||
disabled={readOnly}
|
||||
defaultValue={'conform_to'}
|
||||
placeholder="请选择结论"
|
||||
onChange={(v) => updateRow(idx, "reviewConclusion", v)}
|
||||
|
|
@ -166,6 +167,7 @@ const InternalReviewContent = (props) => {
|
|||
size="small"
|
||||
value={val}
|
||||
allowClear
|
||||
disabled={readOnly}
|
||||
placeholder="请输入审核意见"
|
||||
maxLength={80}
|
||||
onChange={(e) => updateRow(idx, "reviewOpinion", e.target.value)}
|
||||
|
|
@ -243,6 +245,7 @@ const InternalReviewContent = (props) => {
|
|||
rows={2}
|
||||
value={overallOpinion}
|
||||
allowClear
|
||||
disabled={readOnly}
|
||||
placeholder="请输入总体审核意见"
|
||||
maxLength={120}
|
||||
onChange={(e) => setOverallOpinion(e.target.value)}
|
||||
|
|
@ -259,6 +262,7 @@ const InternalReviewContent = (props) => {
|
|||
style={{ width: 140 }}
|
||||
value={selectedReviewer}
|
||||
onChange={setSelectedReviewer}
|
||||
disabled={readOnly}
|
||||
options={(reviewers || []).map((r) => ({
|
||||
value: r.personnelId,
|
||||
label: r.personnelName,
|
||||
|
|
@ -268,7 +272,7 @@ const InternalReviewContent = (props) => {
|
|||
size="small"
|
||||
onClick={handleAssign}
|
||||
loading={internalReviewAssignLoading || props.safetyEvalBusiness?.internalReviewConfirmLoading}
|
||||
disabled={isDispatched || !selectedReviewer}
|
||||
disabled={isDispatched || !selectedReviewer || readOnly}
|
||||
>
|
||||
{isDispatched ? "已下发APP签字" : "下发APP签字"}
|
||||
</Button>
|
||||
|
|
@ -308,21 +312,23 @@ const InternalReviewContent = (props) => {
|
|||
},
|
||||
]}
|
||||
/>
|
||||
<Flex justify="flex-end" gap={8} style={{ marginTop: 16 }}>
|
||||
<Button
|
||||
loading={props.safetyEvalBusiness?.internalReviewConfirmLoading}
|
||||
onClick={() => handleConfirm("not_passed")}
|
||||
>
|
||||
保存意见
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => handleConfirm("passed")}
|
||||
loading={props.safetyEvalBusiness?.internalReviewConfirmLoading}
|
||||
>
|
||||
确认修改并提交技审
|
||||
</Button>
|
||||
</Flex>
|
||||
{!readOnly && (
|
||||
<Flex justify="flex-end" gap={8} style={{ marginTop: 16 }}>
|
||||
<Button
|
||||
loading={props.safetyEvalBusiness?.internalReviewConfirmLoading}
|
||||
onClick={() => handleConfirm("not_passed")}
|
||||
>
|
||||
保存意见
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => handleConfirm("passed")}
|
||||
loading={props.safetyEvalBusiness?.internalReviewConfirmLoading}
|
||||
>
|
||||
确认修改并提交技审
|
||||
</Button>
|
||||
</Flex>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const EVAL_TYPE_OPTIONS = [
|
|||
{ label: "安全现状评价", value: "STATUS" },
|
||||
];
|
||||
|
||||
const RiskAnalysisContent = (props) => {
|
||||
const RiskAnalysisContent = ({ readOnly, ...props }) => {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const projectId = router.query?.id;
|
||||
|
|
@ -160,7 +160,7 @@ const RiskAnalysisContent = (props) => {
|
|||
title="安全评价风险分析记录表"
|
||||
styles={{ header: { textAlign: "center" } }}
|
||||
>
|
||||
<Form form={form} layout="vertical">
|
||||
<Form form={form} layout="vertical" disabled={readOnly}>
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Form.Item label="风险分析时间" name="analysisDate">
|
||||
|
|
@ -424,7 +424,7 @@ const RiskAnalysisContent = (props) => {
|
|||
evalSignTaskSaveLoading &&
|
||||
signingIndex === field.name
|
||||
}
|
||||
disabled={value === 1 || value === 2}
|
||||
disabled={value === 1 || value === 2 || readOnly}
|
||||
onClick={() => handleSignApp(field.name)}
|
||||
>
|
||||
{text}
|
||||
|
|
@ -439,6 +439,7 @@ const RiskAnalysisContent = (props) => {
|
|||
type="link"
|
||||
danger
|
||||
size="small"
|
||||
disabled={readOnly}
|
||||
onClick={() => remove(field.name)}
|
||||
>
|
||||
删除
|
||||
|
|
@ -449,17 +450,19 @@ const RiskAnalysisContent = (props) => {
|
|||
rowKey={(_, index) => index}
|
||||
pagination={false}
|
||||
/>
|
||||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
style={{ marginTop: 8 }}
|
||||
onClick={() => {
|
||||
setSelectedParticipantIds([]);
|
||||
setParticipantModalOpen(true);
|
||||
}}
|
||||
>
|
||||
+ 添加参与人员
|
||||
</Button>
|
||||
{!readOnly && (
|
||||
<Button
|
||||
type="dashed"
|
||||
size="small"
|
||||
style={{ marginTop: 8 }}
|
||||
onClick={() => {
|
||||
setSelectedParticipantIds([]);
|
||||
setParticipantModalOpen(true);
|
||||
}}
|
||||
>
|
||||
+ 添加参与人员
|
||||
</Button>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}}
|
||||
|
|
@ -472,6 +475,7 @@ const RiskAnalysisContent = (props) => {
|
|||
label="风险分析表附件"
|
||||
accept=".pdf,.docx,.jpg,.png"
|
||||
maxCount={10}
|
||||
disabled={readOnly}
|
||||
extra="支持 PDF、Word、JPG、PNG 格式。上传后可替换修改,系统保留当前归档文件信息"
|
||||
/>
|
||||
</Form>
|
||||
|
|
@ -570,22 +574,24 @@ const RiskAnalysisContent = (props) => {
|
|||
/>
|
||||
</Modal>
|
||||
|
||||
<Flex justify="flex-end" gap={8}>
|
||||
<Button
|
||||
onClick={() => handleSave(1)}
|
||||
loading={riskAnalysisSaveLoading}
|
||||
>
|
||||
暂存
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => handleSave(2)}
|
||||
loading={riskAnalysisSaveLoading}
|
||||
>
|
||||
完成分析并保存
|
||||
</Button>
|
||||
</Flex>
|
||||
{!readOnly && (
|
||||
<Flex justify="flex-end" gap={8}>
|
||||
<Button
|
||||
onClick={() => handleSave(1)}
|
||||
loading={riskAnalysisSaveLoading}
|
||||
>
|
||||
暂存
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => handleSave(2)}
|
||||
loading={riskAnalysisSaveLoading}
|
||||
>
|
||||
完成分析并保存
|
||||
</Button>
|
||||
</Flex>
|
||||
)}
|
||||
</div>
|
||||
</Spin>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const downloadTemplate = async () => {
|
|||
}
|
||||
};
|
||||
|
||||
const NoticePanel = () => (
|
||||
const NoticePanel = ({ readOnly }) => (
|
||||
<div>
|
||||
<div className="pf-section-header">
|
||||
<div>
|
||||
|
|
@ -66,12 +66,13 @@ const NoticePanel = () => (
|
|||
label="从业告知书"
|
||||
maxCount={1}
|
||||
accept=".docx"
|
||||
disabled={readOnly}
|
||||
extra="仅支持上传 Word 格式文件"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
const InspectionPanel = ({ dataSource = [], evalProjectDetailData = {} }) => {
|
||||
const InspectionPanel = ({ dataSource = [], evalProjectDetailData = {}, readOnly }) => {
|
||||
const calcDuration = (signIn, signOut) => {
|
||||
if (!signIn || !signOut) return '-';
|
||||
const start = new Date(signIn);
|
||||
|
|
@ -135,6 +136,7 @@ const InspectionPanel = ({ dataSource = [], evalProjectDetailData = {} }) => {
|
|||
label="现场检查表"
|
||||
maxCount={10}
|
||||
accept=".pdf,.doc,.docx,.xls,.xlsx"
|
||||
disabled={readOnly}
|
||||
extra="检查表应包含项目名称、检查日期、检查人员、检查依据、逐项检查结果和不符合项记录;上传后与人员打卡记录共同作为现场踏勘凭证。
|
||||
支持Excel、Word、PDF和清晰扫描件"
|
||||
/>
|
||||
|
|
@ -142,7 +144,7 @@ const InspectionPanel = ({ dataSource = [], evalProjectDetailData = {} }) => {
|
|||
);
|
||||
};
|
||||
|
||||
const RectificationNoticePanel = () => (
|
||||
const RectificationNoticePanel = ({ readOnly }) => (
|
||||
<div>
|
||||
<div className="pf-section-header">
|
||||
<div>
|
||||
|
|
@ -156,12 +158,13 @@ const RectificationNoticePanel = () => (
|
|||
label="整改通知单"
|
||||
maxCount={10}
|
||||
accept=".pdf,.doc,.docx,.jpg,.jpeg,.png,.xls,.xlsx"
|
||||
disabled={readOnly}
|
||||
extra="支持 PDF、Word、JPG、PNG、Excel 格式,最多上传 10 个文件"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
const EnterpriseRectificationPanel = () => (
|
||||
const EnterpriseRectificationPanel = ({ readOnly }) => (
|
||||
<div>
|
||||
<div className="pf-section-header">
|
||||
<div>
|
||||
|
|
@ -175,12 +178,13 @@ const EnterpriseRectificationPanel = () => (
|
|||
label="企业整改报告"
|
||||
maxCount={10}
|
||||
accept=".pdf,.doc,.docx,.jpg,.jpeg,.png,.zip,.rar,.7z"
|
||||
disabled={readOnly}
|
||||
extra="支持 PDF、Word、压缩包、图片格式,最多上传 10 个文件"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
const RectificationReviewPanel = () => (
|
||||
const RectificationReviewPanel = ({ readOnly }) => (
|
||||
<div>
|
||||
<div className="pf-section-header">
|
||||
<div>
|
||||
|
|
@ -194,12 +198,13 @@ const RectificationReviewPanel = () => (
|
|||
label="整改情况复查单"
|
||||
maxCount={10}
|
||||
accept=".pdf,.doc,.docx,.jpg,.jpeg,.png,.xls,.xlsx"
|
||||
disabled={readOnly}
|
||||
extra="支持 PDF、Word、JPG、PNG、Excel 格式,最多上传 10 个文件"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
const SurveyContent = (props) => {
|
||||
const SurveyContent = ({ readOnly, ...props }) => {
|
||||
const [form] = Form.useForm();
|
||||
const [activeStage, setActiveStage] = useState("PRACTICE_NOTIFICATION");
|
||||
const [attachMap, setAttachMap] = useState({});
|
||||
|
|
@ -289,28 +294,28 @@ const SurveyContent = (props) => {
|
|||
items={STAGES.map((s) => ({ title: s.label }))}
|
||||
/>
|
||||
|
||||
<Form form={form} layout="vertical">
|
||||
<Form form={form} layout="vertical" disabled={readOnly}>
|
||||
<div style={{ display: activeStage === "PRACTICE_NOTIFICATION" ? "block" : "none" }}>
|
||||
<NoticePanel />
|
||||
<NoticePanel readOnly={readOnly} />
|
||||
</div>
|
||||
<div style={{ display: activeStage === "SITE_INSPECTION_FORM" ? "block" : "none" }}>
|
||||
<InspectionPanel dataSource={surveyPersonnel} evalProjectDetailData={evalProjectDetailData} />
|
||||
<InspectionPanel dataSource={surveyPersonnel} evalProjectDetailData={evalProjectDetailData} readOnly={readOnly} />
|
||||
</div>
|
||||
<div style={{ display: activeStage === "RECTIFICATION_NOTICE" ? "block" : "none" }}>
|
||||
<RectificationNoticePanel />
|
||||
<RectificationNoticePanel readOnly={readOnly} />
|
||||
</div>
|
||||
<div style={{ display: activeStage === "ENTERPRISE_RECTIFICATION" ? "block" : "none" }}>
|
||||
<EnterpriseRectificationPanel />
|
||||
<EnterpriseRectificationPanel readOnly={readOnly} />
|
||||
</div>
|
||||
<div style={{ display: activeStage === "RECTIFICATION_REVIEW" ? "block" : "none" }}>
|
||||
<RectificationReviewPanel />
|
||||
<RectificationReviewPanel readOnly={readOnly} />
|
||||
</div>
|
||||
</Form>
|
||||
|
||||
<Flex justify="flex-end" gap={8} style={{ marginTop: 16 }}>
|
||||
{!isFirst && <Button onClick={goPrev} disabled={evalSurveySaveAttachLoading}>上一步</Button>}
|
||||
{isLast ? (
|
||||
<Button type="primary" onClick={handleSave} loading={evalSurveySaveAttachLoading}>保存</Button>
|
||||
!readOnly && <Button type="primary" onClick={handleSave} loading={evalSurveySaveAttachLoading}>保存</Button>
|
||||
) : (
|
||||
<Button type="primary" onClick={goNext} disabled={evalSurveySaveAttachLoading}>下一步</Button>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const { router } = tools;
|
|||
|
||||
|
||||
|
||||
const TeamContent = (props) => {
|
||||
const TeamContent = ({ readOnly, ...props }) => {
|
||||
const { safetyEvalBusiness, evalProjectMemberPage, evalProjectMemberSave } = props;
|
||||
const { evalProjectDetailData, memberLoading, memberSaveLoading } = safetyEvalBusiness || {};
|
||||
const participants = evalProjectDetailData?.participants || [];
|
||||
|
|
@ -144,7 +144,7 @@ const TeamContent = (props) => {
|
|||
render: (roles, record) => (
|
||||
<div style={{ display: "flex", flexWrap: "wrap", gap: 4 }}>
|
||||
{roles.map((r) => (
|
||||
<Tag key={r.role} color="blue" closable onClose={() => {
|
||||
<Tag key={r.role} color="blue" closable={!readOnly} onClose={() => {
|
||||
setTeamMembers((prev) => prev.map((m) => {
|
||||
if (m.personnelId !== record.personnelId) return m;
|
||||
const updated = m.roles.filter((role) => role.role !== r.role);
|
||||
|
|
@ -165,7 +165,7 @@ const TeamContent = (props) => {
|
|||
{
|
||||
title: "操作", width: 80, fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Button type="link" danger size="small" onClick={() => handleRemovePerson(record.personnelId)}>移除</Button>
|
||||
<Button type="link" danger size="small" disabled={readOnly} onClick={() => handleRemovePerson(record.personnelId)}>移除</Button>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
|
@ -206,7 +206,7 @@ const TeamContent = (props) => {
|
|||
</Row>
|
||||
|
||||
<Flex justify="flex-end" className="pf-add-bar">
|
||||
<Button type="primary" size="small" onClick={handleOpenModal}>+ 添加人员与角色</Button>
|
||||
{!readOnly && <Button type="primary" size="small" onClick={handleOpenModal}>+ 添加人员与角色</Button>}
|
||||
</Flex>
|
||||
|
||||
<Table dataSource={teamMembers} columns={columns} rowKey="personnelId" pagination={false} scroll={{ x: 1600, y: 320 }} />
|
||||
|
|
@ -227,9 +227,7 @@ const TeamContent = (props) => {
|
|||
</details>
|
||||
|
||||
<Flex justify="flex-end" gap={8} className="pf-bottom-actions">
|
||||
|
||||
|
||||
<Button type="primary" loading={memberSaveLoading} onClick={handleSave}>确认项目组</Button>
|
||||
{!readOnly && <Button type="primary" loading={memberSaveLoading} onClick={handleSave}>确认项目组</Button>}
|
||||
</Flex>
|
||||
|
||||
<Modal title="添加项目人员与角色" open={modalOpen} onCancel={() => setModalOpen(false)} width={700}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const CONCLUSION_OPTIONS = [
|
|||
{ value: "not_conform_to", label: "需修改" },
|
||||
];
|
||||
|
||||
const TechnicalReviewContent = (props) => {
|
||||
const TechnicalReviewContent = ({ readOnly, ...props }) => {
|
||||
const projectId = router.query?.id;
|
||||
const { techReviewDetail } = props.safetyEvalBusiness || {};
|
||||
const { techReview, reviewers, reviewItems } = techReviewDetail || {};
|
||||
|
|
@ -145,6 +145,7 @@ const TechnicalReviewContent = (props) => {
|
|||
style={{ width: 130 }}
|
||||
defaultValue={'conform_to'}
|
||||
allowClear
|
||||
disabled={readOnly}
|
||||
placeholder="请选择结论"
|
||||
onChange={(v) => updateRow(idx, "reviewConclusion", v)}
|
||||
>
|
||||
|
|
@ -162,6 +163,7 @@ const TechnicalReviewContent = (props) => {
|
|||
render: (val, _, idx) => (
|
||||
<Input
|
||||
size="small"
|
||||
disabled={readOnly}
|
||||
placeholder="请输入技术意见"
|
||||
maxLength={80}
|
||||
value={val}
|
||||
|
|
@ -181,7 +183,7 @@ const TechnicalReviewContent = (props) => {
|
|||
</div>
|
||||
|
||||
<Row gutter={16} style={{ marginBottom: 16 }}>
|
||||
<Col span={8}>
|
||||
<Col span={24}>
|
||||
<Card size="small">
|
||||
<Typography.Text type="secondary">技术负责人</Typography.Text>
|
||||
<div
|
||||
|
|
@ -202,7 +204,7 @@ const TechnicalReviewContent = (props) => {
|
|||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
{/* <Col span={8}>
|
||||
<Card size="small">
|
||||
<Typography.Text type="secondary">专业匹配</Typography.Text>
|
||||
<div>
|
||||
|
|
@ -227,7 +229,7 @@ const TechnicalReviewContent = (props) => {
|
|||
</Typography.Text>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
</Col> */}
|
||||
</Row>
|
||||
|
||||
<Table
|
||||
|
|
@ -245,6 +247,7 @@ const TechnicalReviewContent = (props) => {
|
|||
rows={2}
|
||||
value={overallOpinion}
|
||||
allowClear
|
||||
disabled={readOnly}
|
||||
placeholder="请输入技术审核意见"
|
||||
maxLength={120}
|
||||
onChange={(e) => setOverallOpinion(e.target.value)}
|
||||
|
|
@ -261,6 +264,7 @@ const TechnicalReviewContent = (props) => {
|
|||
style={{ width: 160 }}
|
||||
value={selectedReviewer}
|
||||
onChange={setSelectedReviewer}
|
||||
disabled={readOnly}
|
||||
options={(reviewers || []).map((r) => ({
|
||||
value: r.personnelId,
|
||||
label: r.personnelName,
|
||||
|
|
@ -270,7 +274,7 @@ const TechnicalReviewContent = (props) => {
|
|||
size="small"
|
||||
onClick={handleAssign}
|
||||
loading={props.safetyEvalBusiness?.techReviewAssignLoading || props.safetyEvalBusiness?.techReviewConfirmLoading}
|
||||
disabled={isDispatched || !selectedReviewer}
|
||||
disabled={isDispatched || !selectedReviewer || readOnly}
|
||||
>
|
||||
{isDispatched ? "已下发APP签字" : "下发APP签字"}
|
||||
</Button>
|
||||
|
|
@ -310,21 +314,23 @@ const TechnicalReviewContent = (props) => {
|
|||
},
|
||||
]}
|
||||
/>
|
||||
<Flex justify="flex-end" gap={8} style={{ marginTop: 16 }}>
|
||||
<Button
|
||||
loading={props.safetyEvalBusiness?.techReviewConfirmLoading}
|
||||
onClick={() => handleConfirm("not_passed")}
|
||||
>
|
||||
保存意见
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => handleConfirm("passed")}
|
||||
loading={props.safetyEvalBusiness?.techReviewConfirmLoading}
|
||||
>
|
||||
确认技审并提交过程控制
|
||||
</Button>
|
||||
</Flex>
|
||||
{!readOnly && (
|
||||
<Flex justify="flex-end" gap={8} style={{ marginTop: 16 }}>
|
||||
<Button
|
||||
loading={props.safetyEvalBusiness?.techReviewConfirmLoading}
|
||||
onClick={() => handleConfirm("not_passed")}
|
||||
>
|
||||
保存意见
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => handleConfirm("passed")}
|
||||
loading={props.safetyEvalBusiness?.techReviewConfirmLoading}
|
||||
>
|
||||
确认技审并提交过程控制
|
||||
</Button>
|
||||
</Flex>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ const ProjectFlow = (props) => {
|
|||
const [visible, setVisible] = useState(false);
|
||||
const { wpsDoc, evalProjectDetailData } = props.safetyEvalBusiness || {};
|
||||
const projectId = router.query?.id;
|
||||
const readOnly = router.query?.readOnly === '1';
|
||||
|
||||
const processTabs = buildProcessTabs(evalProjectDetailData?.projectNode);
|
||||
|
||||
|
|
@ -145,26 +146,26 @@ const ProjectFlow = (props) => {
|
|||
let children = null;
|
||||
switch (item.key) {
|
||||
case "risk":
|
||||
children = <RiskAnalysisContent getDetail={getDetail} />;
|
||||
children = <RiskAnalysisContent getDetail={getDetail} readOnly={readOnly} />;
|
||||
break;
|
||||
case "contract":
|
||||
children = <ContractContent getDetail={getDetail} />;
|
||||
children = <ContractContent getDetail={getDetail} readOnly={readOnly} />;
|
||||
break;
|
||||
case "team":
|
||||
children = <TeamContent getDetail={getDetail} />;
|
||||
children = <TeamContent getDetail={getDetail} readOnly={readOnly} />;
|
||||
break;
|
||||
case "survey":
|
||||
children = <SurveyContent getDetail={getDetail} />;
|
||||
children = <SurveyContent getDetail={getDetail} readOnly={readOnly} />;
|
||||
break;
|
||||
|
||||
case "internal":
|
||||
children = <InternalReviewContent getDetail={getDetail} />;
|
||||
children = <InternalReviewContent getDetail={getDetail} readOnly={readOnly} />;
|
||||
break;
|
||||
case "technical":
|
||||
children = <TechnicalReviewContent getDetail={getDetail} />;
|
||||
children = <TechnicalReviewContent getDetail={getDetail} readOnly={readOnly} />;
|
||||
break;
|
||||
case "control":
|
||||
children = <ControlContent getDetail={getDetail} />;
|
||||
children = <ControlContent getDetail={getDetail} readOnly={readOnly} />;
|
||||
break;
|
||||
default:
|
||||
children = null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue