0814 需求变更
parent
ca3a42cc91
commit
3d3ef70f8f
|
|
@ -32,12 +32,12 @@
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-to-print": "^3.2.0",
|
"react-to-print": "^3.2.0",
|
||||||
"zy-react-library": "^1.3.17"
|
"zy-react-library": "^1.3.29"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^5.4.1",
|
"@antfu/eslint-config": "^5.4.1",
|
||||||
"@babel/plugin-proposal-decorators": "^7.19.3",
|
"@babel/plugin-proposal-decorators": "^7.19.3",
|
||||||
"@cqsjjb/scripts": "latest",
|
"@cqsjjb/scripts": "2.0.0",
|
||||||
"@eslint-react/eslint-plugin": "^2.2.2",
|
"@eslint-react/eslint-plugin": "^2.2.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^9.37.0",
|
"eslint": "^9.37.0",
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,7 @@ export const rectificationSave = declareRequest(
|
||||||
"rectificationLoading",
|
"rectificationLoading",
|
||||||
"Put > @/hidden/hidden/rectify",
|
"Put > @/hidden/hidden/rectify",
|
||||||
);
|
);
|
||||||
|
export const rectificationCanRequestAnExtension = declareRequest(
|
||||||
|
"rectificationLoading",
|
||||||
|
"Get > /hidden/hiddenExamine/canRequestAnExtension/{id}",
|
||||||
|
);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ function List(props) {
|
||||||
hiddenFindTime: formData.hiddenFindTime?.[0],
|
hiddenFindTime: formData.hiddenFindTime?.[0],
|
||||||
hiddenFindTimeLe: formData.hiddenFindTime?.[1],
|
hiddenFindTimeLe: formData.hiddenFindTime?.[1],
|
||||||
state: formData.state ? [formData.state] : undefined,
|
state: formData.state ? [formData.state] : undefined,
|
||||||
hiddenLevels: ["hiddenLevel1001", "hiddenLevel1004", "hiddenLevel1002"],
|
hiddenLevels: ["hiddenLevel1004", "hiddenLevel1002"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ function List(props) {
|
||||||
name: "hiddenLevel",
|
name: "hiddenLevel",
|
||||||
label: "隐患级别",
|
label: "隐患级别",
|
||||||
render: (
|
render: (
|
||||||
<HiddenLevelSelectTree isShowLarger={false} isShowMajor={false} />
|
<HiddenLevelSelectTree isShowLarger={false} isShowMajor={false} isShowNeglect={false} />
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{ name: "creatorName", label: "隐患发现人" },
|
{ name: "creatorName", label: "隐患发现人" },
|
||||||
|
|
@ -78,7 +78,7 @@ function List(props) {
|
||||||
name: "state",
|
name: "state",
|
||||||
label: "隐患状态",
|
label: "隐患状态",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
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: "confirmUserName", label: "确认人" },
|
||||||
{ name: "rectificationUserName", label: "整改人" },
|
{ name: "rectificationUserName", label: "整改人" },
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ function List(props) {
|
||||||
});
|
});
|
||||||
const getInfoData = async () => {
|
const getInfoData = async () => {
|
||||||
const data = await getUserInfo();
|
const data = await getUserInfo();
|
||||||
console.log(data.id);
|
|
||||||
setUserId(data.id);
|
setUserId(data.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -150,10 +149,13 @@ function List(props) {
|
||||||
{props.permission(props.sqyqButton || "fgs-yqzg-sqyq") && !record.noReviewExtensionNum && userId === record.rectifyUserId && (
|
{props.permission(props.sqyqButton || "fgs-yqzg-sqyq") && !record.noReviewExtensionNum && userId === record.rectifyUserId && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={async () => {
|
||||||
|
const { success } = await props["rectificationCanRequestAnExtension"]({ id: record.hiddenId });
|
||||||
|
if (success) {
|
||||||
setRequestAnExtensionModalOpen(true);
|
setRequestAnExtensionModalOpen(true);
|
||||||
setCurrentId(record.hiddenId);
|
setCurrentId(record.hiddenId);
|
||||||
setRectificationDeadTime(record.rectificationDeadline);
|
setRectificationDeadTime(record.rectificationDeadline);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
申请延期
|
申请延期
|
||||||
|
|
@ -264,10 +266,13 @@ const RequestAnExtensionModalComponent = (props) => {
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
const selectDay = dayjs(value);
|
const selectDay = dayjs(value);
|
||||||
const today = dayjs(props.rectificationDeadTime).endOf("day");
|
const rectificationDeadTime = dayjs(props.rectificationDeadTime).endOf("day");
|
||||||
if (selectDay.isBefore(today)) {
|
if (selectDay.isBefore(rectificationDeadTime)) {
|
||||||
callback(new Error("申请延期日期不能选择整改期限之前,请选择整改期限以后的日期"));
|
callback(new Error("申请延期日期不能选择整改期限之前,请选择整改期限以后的日期"));
|
||||||
}
|
}
|
||||||
|
if (selectDay.diff(rectificationDeadTime, "month", true) > 3) {
|
||||||
|
callback(new Error("申请延期日期不能超过整改期限 3 个月,请重新选择"));
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,10 @@ function Rectification(props) {
|
||||||
name: "status",
|
name: "status",
|
||||||
label: "是否正常整改",
|
label: "是否正常整改",
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||||
items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }],
|
items: [
|
||||||
|
{ bianma: 1, name: "是" },
|
||||||
|
// { bianma: 0, name: "否" }
|
||||||
|
],
|
||||||
},
|
},
|
||||||
...(
|
...(
|
||||||
status === 0
|
status === 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue