fix(inspection): 修复检查人显示和计划状态判断逻辑
- 将确认人字段标签更正为检查人 - 修复检查人信息展示时电话号码为空的情况处理 - 修正检查时间显示中的变量引用错误 - 添加审核意见和签字的条件渲染逻辑 - 增加被检查单位签字的条件显示控制 - 在计划管理列表中新增计划执行单位列 - 修复计划完成状态判断逻辑,使用正确的执行总数进行比较master
parent
bfe994f90d
commit
ffb2b480a0
|
|
@ -231,7 +231,7 @@ function DefenseHandlingModalComponent(props) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "signature",
|
name: "signature",
|
||||||
label: "确认人",
|
label: "检查人",
|
||||||
required: false,
|
required: false,
|
||||||
rules: [{ required: true, message: "请签名" }],
|
rules: [{ required: true, message: "请签名" }],
|
||||||
dependencies: ["status"],
|
dependencies: ["status"],
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ function InspectionView(props) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data.inspectorVerificationList.forEach((item) => {
|
data.inspectorVerificationList.forEach((item) => {
|
||||||
setCurrentInspectorUserName(prev => [...prev, `${item.userName}(${item.phone})` || ""]);
|
setCurrentInspectorUserName(prev => [...prev, `${item.userName}(${item.phone || "-"})` || ""]);
|
||||||
});
|
});
|
||||||
setInfo(data);
|
setInfo(data);
|
||||||
const { data: hiddenList } = await props["hiddenList"]({ foreignKey: query.inspectionId, pageIndex: 1, pageSize: 999 });
|
const { data: hiddenList } = await props["hiddenList"]({ foreignKey: query.inspectionId, pageIndex: 1, pageSize: 999 });
|
||||||
|
|
@ -90,7 +90,7 @@ function InspectionView(props) {
|
||||||
{ label: "牵头检查部门", children: info.inspector?.departmentName },
|
{ label: "牵头检查部门", children: info.inspector?.departmentName },
|
||||||
{ label: "检查人", children: currentInspectorUserName.join(",") },
|
{ label: "检查人", children: currentInspectorUserName.join(",") },
|
||||||
{ label: "检查类型", children: info.typeName },
|
{ label: "检查类型", children: info.typeName },
|
||||||
{ label: "检查时间", children: (info.timeStart && info.timeEnd) ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "" },
|
{ label: "检查时间", children: (info.timeStart && info.timeEnd) ? `自${formatDate(info.timeStart)}至${formatDate(info.timeEnd)}止` : "" },
|
||||||
{ label: "检查场所", children: info.place, span: 2 },
|
{ label: "检查场所", children: info.place, span: 2 },
|
||||||
{ label: "计划属性", children: getLabelName({ list: PLAN_ENUM, status: info.planType }), span: 2 },
|
{ label: "计划属性", children: getLabelName({ list: PLAN_ENUM, status: info.planType }), span: 2 },
|
||||||
...(info.planType === 1 ? [{ label: "计划名称", children: info.planName, span: 2 }] : []),
|
...(info.planType === 1 ? [{ label: "计划名称", children: info.planName, span: 2 }] : []),
|
||||||
|
|
@ -178,8 +178,8 @@ function InspectionView(props) {
|
||||||
options={false}
|
options={false}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "审核人员", dataIndex: "userName" },
|
{ title: "审核人员", dataIndex: "userName" },
|
||||||
{ title: "审核意见", dataIndex: "userRemarks" },
|
{ title: "审核意见", dataIndex: "userRemarks", render: (_, record) => record.status ? record.userRemarks : "-" },
|
||||||
{ title: "签字", render: (_, record) => (record.signature && <PreviewImg files={[record.signature]} />) },
|
{ title: "签字", render: (_, record) => (record.signature && <PreviewImg files={record.status ? [record.signature] : []} />) },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<table className="print-table">
|
<table className="print-table">
|
||||||
|
|
@ -210,7 +210,7 @@ function InspectionView(props) {
|
||||||
bordered
|
bordered
|
||||||
styles={{ label: { width: 200 } }}
|
styles={{ label: { width: 200 } }}
|
||||||
items={[
|
items={[
|
||||||
{ label: "被检查单位现场负责人(签字)", children: (<PreviewImg files={[info.inspectedPartyConfirmation.signature]} />) },
|
{ label: "被检查单位现场负责人(签字)", children: (<PreviewImg files={info.inspectedPartyConfirmation?.status ? [info.inspectedPartyConfirmation.signature] : []} />) },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ function List(props) {
|
||||||
{ title: "计划类型", dataIndex: "planTypeName" },
|
{ title: "计划类型", dataIndex: "planTypeName" },
|
||||||
{ title: "计划开始时间", dataIndex: "planStartTime" },
|
{ title: "计划开始时间", dataIndex: "planStartTime" },
|
||||||
{ title: "计划结束时间", dataIndex: "planEndTime" },
|
{ title: "计划结束时间", dataIndex: "planEndTime" },
|
||||||
|
{ title: "计划执行单位", dataIndex: "corpName" ,hidden: props.supervision !== "1"},
|
||||||
{
|
{
|
||||||
title: "计划执行总次数",
|
title: "计划执行总次数",
|
||||||
dataIndex: "planExecuteTotal",
|
dataIndex: "planExecuteTotal",
|
||||||
|
|
@ -123,12 +124,12 @@ function List(props) {
|
||||||
title: "计划状态",
|
title: "计划状态",
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
const { planExecuteTotal, userExecuteNum, planStartTime, planEndTime } = record;
|
const { planExecuteTotal, userExecuteNum,userExecuteTotal, planStartTime, planEndTime } = record;
|
||||||
const currentTime = dayjs();
|
const currentTime = dayjs();
|
||||||
|
|
||||||
let statusText = "";
|
let statusText = "";
|
||||||
|
|
||||||
if (planExecuteTotal === userExecuteNum && planExecuteTotal > 0) {
|
if (userExecuteTotal <= userExecuteNum && planExecuteTotal > 0) {
|
||||||
statusText = "已完成";
|
statusText = "已完成";
|
||||||
}
|
}
|
||||||
else if (currentTime.isBefore(planStartTime, "day")) {
|
else if (currentTime.isBefore(planStartTime, "day")) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue