0814 需求变更

dev
LiuJiaNan 2026-08-20 16:38:00 +08:00
parent ca3a42cc91
commit 3d3ef70f8f
5 changed files with 25 additions and 13 deletions

View File

@ -32,12 +32,12 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-to-print": "^3.2.0",
"zy-react-library": "^1.3.17"
"zy-react-library": "^1.3.29"
},
"devDependencies": {
"@antfu/eslint-config": "^5.4.1",
"@babel/plugin-proposal-decorators": "^7.19.3",
"@cqsjjb/scripts": "latest",
"@cqsjjb/scripts": "2.0.0",
"@eslint-react/eslint-plugin": "^2.2.2",
"cross-env": "^7.0.3",
"eslint": "^9.37.0",

View File

@ -16,3 +16,7 @@ export const rectificationSave = declareRequest(
"rectificationLoading",
"Put > @/hidden/hidden/rectify",
);
export const rectificationCanRequestAnExtension = declareRequest(
"rectificationLoading",
"Get > /hidden/hiddenExamine/canRequestAnExtension/{id}",
);

View File

@ -35,7 +35,7 @@ function List(props) {
hiddenFindTime: formData.hiddenFindTime?.[0],
hiddenFindTimeLe: formData.hiddenFindTime?.[1],
state: formData.state ? [formData.state] : undefined,
hiddenLevels: ["hiddenLevel1001", "hiddenLevel1004", "hiddenLevel1002"],
hiddenLevels: ["hiddenLevel1004", "hiddenLevel1002"],
}),
});
@ -70,7 +70,7 @@ function List(props) {
name: "hiddenLevel",
label: "隐患级别",
render: (
<HiddenLevelSelectTree isShowLarger={false} isShowMajor={false} />
<HiddenLevelSelectTree isShowLarger={false} isShowMajor={false} isShowNeglect={false} />
),
},
{ name: "creatorName", label: "隐患发现人" },
@ -78,7 +78,7 @@ function List(props) {
name: "state",
label: "隐患状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: getUnmatchedItems({ list: HIDDEN_STATE_ENUM, value: ["98", "102"] }),
items: getUnmatchedItems({ list: HIDDEN_STATE_ENUM, value: ["98", "102", "101", "202", "400"] }),
},
{ name: "confirmUserName", label: "确认人" },
{ name: "rectificationUserName", label: "整改人" },

View File

@ -39,7 +39,6 @@ function List(props) {
});
const getInfoData = async () => {
const data = await getUserInfo();
console.log(data.id);
setUserId(data.id);
};
@ -150,10 +149,13 @@ function List(props) {
{props.permission(props.sqyqButton || "fgs-yqzg-sqyq") && !record.noReviewExtensionNum && userId === record.rectifyUserId && (
<Button
type="link"
onClick={() => {
onClick={async () => {
const { success } = await props["rectificationCanRequestAnExtension"]({ id: record.hiddenId });
if (success) {
setRequestAnExtensionModalOpen(true);
setCurrentId(record.hiddenId);
setRectificationDeadTime(record.rectificationDeadline);
}
}}
>
申请延期
@ -264,10 +266,13 @@ const RequestAnExtensionModalComponent = (props) => {
return callback();
}
const selectDay = dayjs(value);
const today = dayjs(props.rectificationDeadTime).endOf("day");
if (selectDay.isBefore(today)) {
const rectificationDeadTime = dayjs(props.rectificationDeadTime).endOf("day");
if (selectDay.isBefore(rectificationDeadTime)) {
callback(new Error("申请延期日期不能选择整改期限之前,请选择整改期限以后的日期"));
}
if (selectDay.diff(rectificationDeadTime, "month", true) > 3) {
callback(new Error("申请延期日期不能超过整改期限 3 个月,请重新选择"));
}
else {
callback();
}

View File

@ -113,7 +113,10 @@ function Rectification(props) {
name: "status",
label: "是否正常整改",
render: FORM_ITEM_RENDER_ENUM.RADIO,
items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }],
items: [
{ bianma: 1, name: "是" },
// { bianma: 0, name: "否" }
],
},
...(
status === 0