添加相关方考评模块
parent
0f2ab752fa
commit
beff89f10c
|
|
@ -1,3 +1,8 @@
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
|
const pdfjsDistEntry = path.resolve(__dirname, "node_modules/pdfjs-dist/legacy/build/pdf.mjs");
|
||||||
|
const pdfjsDistPatchLoader = path.resolve(__dirname, "loaders/pdfjs-dist-patch-loader.cjs");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// 应用后端git地址,部署上线需要
|
// 应用后端git地址,部署上线需要
|
||||||
javaGit: "<git-url>",
|
javaGit: "<git-url>",
|
||||||
|
|
@ -74,5 +79,22 @@ module.exports = {
|
||||||
// 自动注入编译后的文件到public/index.html中
|
// 自动注入编译后的文件到public/index.html中
|
||||||
inject: true,
|
inject: true,
|
||||||
},
|
},
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
"~": path.resolve(__dirname, "src"),
|
||||||
|
"pdfjs-dist": pdfjsDistEntry,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /pdf\.mjs$/,
|
||||||
|
include: [pdfjsDistEntry],
|
||||||
|
use: [{
|
||||||
|
loader: pdfjsDistPatchLoader,
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
const replacements = [
|
||||||
|
["__webpack_exports__", "__pdfjs_dist_exports__"],
|
||||||
|
["__webpack_module_cache__", "__pdfjs_dist_module_cache__"],
|
||||||
|
["__webpack_modules__", "__pdfjs_dist_modules__"],
|
||||||
|
["__webpack_require__", "__pdfjs_dist_require__"],
|
||||||
|
];
|
||||||
|
|
||||||
|
module.exports = function pdfjsDistPatchLoader(source) {
|
||||||
|
let patchedSource = source;
|
||||||
|
|
||||||
|
for (const [from, to] of replacements) {
|
||||||
|
patchedSource = patchedSource.split(from).join(to);
|
||||||
|
}
|
||||||
|
|
||||||
|
return patchedSource;
|
||||||
|
};
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-pdf": "^10.4.1",
|
"react-pdf": "^10.4.1",
|
||||||
"zy-react-library": "^1.2.35"
|
"zy-react-library": "^1.3.14"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^5.4.1",
|
"@antfu/eslint-config": "^5.4.1",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
|
export const evaluationCorpPage = declareRequest(
|
||||||
|
"evaluationLoading",
|
||||||
|
`Post > @/xgfManager/evaluation/corpPage`,
|
||||||
|
);
|
||||||
|
export const evaluationList = declareRequest(
|
||||||
|
"evaluationLoading",
|
||||||
|
`Post > @/xgfManager/evaluation/list`,
|
||||||
|
);
|
||||||
|
export const evaluationAdd = declareRequest(
|
||||||
|
"evaluationLoading",
|
||||||
|
`Post > @/xgfManager/evaluation/save`,
|
||||||
|
);
|
||||||
|
|
||||||
|
export const projectPageNoPermission = declareRequest(
|
||||||
|
"evaluationLoading",
|
||||||
|
`Post > @/xgfManager/project/projectPageNoPermission`,
|
||||||
|
);
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Button, Descriptions, Modal } from "antd";
|
import { Button, Descriptions, Modal } from "antd";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||||
import PreviewPdf from "zy-react-library/components/PreviewPdf";
|
// import PreviewPdf from "zy-react-library/components/PreviewPdf";
|
||||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
import { getFileSuffix } from "zy-react-library/utils";
|
import { getFileSuffix } from "zy-react-library/utils";
|
||||||
|
|
@ -31,7 +31,7 @@ const ViewProjectReviewDetailsModal = (props) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div><PreviewImg files={imgFiles} /></div>
|
<div><PreviewImg files={imgFiles} /></div>
|
||||||
<div style={{ marginTop: 20 }}><PreviewPdf files={pdfFiles} urlKey="url" /></div>
|
{/*<div style={{ marginTop: 20 }}><PreviewPdf files={pdfFiles} urlKey="url" /></div>*/}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -39,7 +39,7 @@ const ViewProjectReviewDetailsModal = (props) => {
|
||||||
return <PreviewImg files={imgFiles} />;
|
return <PreviewImg files={imgFiles} />;
|
||||||
}
|
}
|
||||||
if (pdfFiles.length > 0) {
|
if (pdfFiles.length > 0) {
|
||||||
return <PreviewPdf files={pdfFiles} />;
|
// return <PreviewPdf files={pdfFiles} />;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,101 @@
|
||||||
import { Button, Descriptions, Modal } from "antd";
|
import { Button, Descriptions, Modal, Space, message } from "antd";
|
||||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||||
import PreviewPdf from "zy-react-library/components/PreviewPdf";
|
import PreviewPdf from "zy-react-library/components/PreviewPdf";
|
||||||
import { getFileSuffix } from "zy-react-library/utils";
|
import { getFileName, getFileSuffix, getFileUrl } from "zy-react-library/utils";
|
||||||
|
|
||||||
const ViewQualificationDetailsModal = (props) => {
|
const ViewQualificationDetailsModal = (props) => {
|
||||||
|
const handleDownload = async (file) => {
|
||||||
|
const baseUrl = getFileUrl();
|
||||||
|
const fileUrl = file.url || (file.filePath ? `${baseUrl}${file.filePath}` : "");
|
||||||
|
const fileName = file.fileName || file.name || getFileName(file.filePath || fileUrl);
|
||||||
|
|
||||||
|
if (!fileUrl) {
|
||||||
|
message.error("文件地址不存在");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch(fileUrl);
|
||||||
|
const blob = await response.blob();
|
||||||
|
const link = document.createElement("a");
|
||||||
|
const blobUrl = window.URL.createObjectURL(blob);
|
||||||
|
|
||||||
|
link.href = blobUrl;
|
||||||
|
link.download = fileName;
|
||||||
|
link.style.display = "none";
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
window.URL.revokeObjectURL(blobUrl);
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
message.error("下载失败");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const previewFile = () => {
|
const previewFile = () => {
|
||||||
|
const files = props.data.files || [];
|
||||||
const imgFiles = [];
|
const imgFiles = [];
|
||||||
const pdfFiles = [];
|
const pdfFiles = [];
|
||||||
for (let i = 0; i < props.data.files.length; i++) {
|
const compressedFiles = [];
|
||||||
if (getFileSuffix(props.data.files[i].fileName) === "pdf") {
|
|
||||||
pdfFiles.push(props.data.files[i]);
|
for (let i = 0; i < files.length; i++) {
|
||||||
|
const file = files[i];
|
||||||
|
const suffix = getFileSuffix(file.fileName || file.name || "").toLowerCase();
|
||||||
|
|
||||||
|
if (suffix === "pdf") {
|
||||||
|
pdfFiles.push(file);
|
||||||
|
}
|
||||||
|
else if (suffix === "zip" || suffix === "rar") {
|
||||||
|
compressedFiles.push(file);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
imgFiles.push(props.data.files[i]);
|
imgFiles.push(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const compressedFileNodes = compressedFiles.length > 0 && (
|
||||||
|
<div style={{ marginTop: imgFiles.length > 0 || pdfFiles.length > 0 ? 20 : 0 }}>
|
||||||
|
<Space direction="vertical" size="middle">
|
||||||
|
{compressedFiles.map(file => (
|
||||||
|
<Space key={file.id || file.filePath || file.url || file.fileName || file.name}>
|
||||||
|
<span>{file.fileName || file.name || getFileName(file.filePath || file.url || "")}</span>
|
||||||
|
<Button type="primary" size="small" onClick={() => handleDownload(file)}>
|
||||||
|
下载
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
))}
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
if (imgFiles.length > 0 && pdfFiles.length > 0) {
|
if (imgFiles.length > 0 && pdfFiles.length > 0) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div><PreviewImg files={imgFiles} /></div>
|
<div><PreviewImg files={imgFiles} /></div>
|
||||||
<div style={{ marginTop: 20 }}><PreviewPdf files={pdfFiles} urlKey="url" /></div>
|
<div style={{ marginTop: 20 }}><PreviewPdf files={pdfFiles} urlKey="url" /></div>
|
||||||
|
{compressedFileNodes}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (imgFiles.length > 0) {
|
if (imgFiles.length > 0) {
|
||||||
return <PreviewImg files={imgFiles} />;
|
return (
|
||||||
|
<>
|
||||||
|
<PreviewImg files={imgFiles} />
|
||||||
|
{compressedFileNodes}
|
||||||
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (pdfFiles.length > 0) {
|
if (pdfFiles.length > 0) {
|
||||||
return <PreviewPdf files={pdfFiles} />;
|
return (
|
||||||
|
<>
|
||||||
|
<PreviewPdf files={pdfFiles} />
|
||||||
|
{compressedFileNodes}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (compressedFiles.length > 0) {
|
||||||
|
return compressedFileNodes;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,3 +11,4 @@ export const NS_QUALIFICATION_RECORDS = defineNamespace("qualificationRecords");
|
||||||
export const NS_QUALIFICATION_STATISTICS = defineNamespace("qualificationStatistics");
|
export const NS_QUALIFICATION_STATISTICS = defineNamespace("qualificationStatistics");
|
||||||
export const NS_QUALIFICATION_APPLY = defineNamespace("qualificationApply");
|
export const NS_QUALIFICATION_APPLY = defineNamespace("qualificationApply");
|
||||||
export const NS_HIDDEN = defineNamespace("hidden");
|
export const NS_HIDDEN = defineNamespace("hidden");
|
||||||
|
export const NS_EVALUATION = defineNamespace("evaluation");
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import ListPage from "~/pages/Container/Supervision/EvaluationManage/CompositeManage/List";
|
import ListPage from "~/pages/Container/Supervision/EvaluationManage/CompositeManage/List";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
return <ListPage xmsbtn="qud-xgfzhkpgl-xms" yhsbtn="qud-xgfzhkpgl-yhs" dflbbtn="qyd-xgfzhkpgl-dflb" {...props} />;
|
return <ListPage xmsbtn="qud-xgfzhkpgl-xms" yhsbtn="qud-xgfzhkpgl-yhs" dflbbtn="qud-xgfzhkpgl-dflb" {...props} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default List;
|
export default List;
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function EvaluationManage(props) {
|
||||||
|
return (<div>{props.children}</div>);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EvaluationManage;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ function HiddenView() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page headerTitle={query.history === "1" ? "过程记录" : "查看"} contentPadding="0 20px 20px 20px">
|
<Page headerTitle={query.history === "1" ? "过程记录" : "查看"} contentPadding="0 20px 20px 20px">
|
||||||
{/*<HiddenInfo history={query.history === "1"} />*/}
|
<HiddenInfo history={query.history === "1"} />
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -529,7 +529,7 @@ const FileUpload = (props) => {
|
||||||
<Upload
|
<Upload
|
||||||
fileType="image"
|
fileType="image"
|
||||||
maxCount={10}
|
maxCount={10}
|
||||||
accept=".pdf,.jpg,.jpeg,.png"
|
accept=".pdf,.jpg,.jpeg,.png,.zip,.rar"
|
||||||
onGetRemoveFile={(file) => {
|
onGetRemoveFile={(file) => {
|
||||||
form.setFieldValue("deleteFiles", [...(form.getFieldValue("deleteFiles") || []), file]);
|
form.setFieldValue("deleteFiles", [...(form.getFieldValue("deleteFiles") || []), file]);
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,8 @@ const StepOneComponent = (props) => {
|
||||||
}, [qualificationsTypeId]);
|
}, [qualificationsTypeId]);
|
||||||
return (
|
return (
|
||||||
<FormBuilder
|
<FormBuilder
|
||||||
labelCol={{ span: 6 }}
|
labelCol={{ span: 8 }}
|
||||||
|
labelWrap
|
||||||
form={form}
|
form={form}
|
||||||
span={8}
|
span={8}
|
||||||
loading={props.qualificationStatistics.qualificationStatisticsLoading}
|
loading={props.qualificationStatistics.qualificationStatisticsLoading}
|
||||||
|
|
|
||||||
|
|
@ -305,7 +305,7 @@ function Review(props) {
|
||||||
{ label: "公司名称", children: info.corpInfo?.corpName },
|
{ label: "公司名称", children: info.corpInfo?.corpName },
|
||||||
{ label: "企业状态", children: (info.corpInfo?.corpStateName) ? info.corpInfo?.corpStateName : "-" },
|
{ label: "企业状态", children: (info.corpInfo?.corpStateName) ? info.corpInfo?.corpStateName : "-" },
|
||||||
{ label: "开户人", children: info.corpInfo?.accountContactName },
|
{ label: "开户人", children: info.corpInfo?.accountContactName },
|
||||||
{ label: "社会统一信号代码", children: info.corpInfo?.code },
|
{ label: "统一社会信号代码", children: info.corpInfo?.code },
|
||||||
{ label: "属地", children: (info.corpInfo?.provinceName) ? `${info.corpInfo?.provinceName}/${info.corpInfo?.cityName}/${info.corpInfo?.countryName}` : "-" },
|
{ label: "属地", children: (info.corpInfo?.provinceName) ? `${info.corpInfo?.provinceName}/${info.corpInfo?.cityName}/${info.corpInfo?.countryName}` : "-" },
|
||||||
{ label: "所属行业", children: [info.corpInfo?.corpType2Name, info.corpInfo?.corpType3Name, info.corpInfo?.corpType4Name, info.corpInfo?.corpTypeName].filter(Boolean).join("/") },
|
{ label: "所属行业", children: [info.corpInfo?.corpType2Name, info.corpInfo?.corpType3Name, info.corpInfo?.corpType4Name, info.corpInfo?.corpTypeName].filter(Boolean).join("/") },
|
||||||
{ label: "单位经营地址", children: info.corpInfo?.addressBusiness },
|
{ label: "单位经营地址", children: info.corpInfo?.addressBusiness },
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,11 @@ import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { getLabelName, getUnmatchedItems } from "zy-react-library/utils";
|
import { getLabelName, getUnmatchedItems } from "zy-react-library/utils";
|
||||||
import { IS_RELATED_ENUM } from "~/enumerate/constant";
|
import { IS_RELATED_ENUM } from "~/enumerate/constant";
|
||||||
import {NS_HIDDEN} from "~/enumerate/namespace";
|
import {NS_HIDDEN} from "~/enumerate/namespace";
|
||||||
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
const query = useGetUrlQuery();
|
||||||
const { tableProps, getData } = useTable(props["ledgerList"], {
|
const { tableProps, getData } = useTable(props["ledgerList"], {
|
||||||
form,
|
form,
|
||||||
usePermission:false,
|
usePermission:false,
|
||||||
|
|
@ -26,7 +27,9 @@ 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: ["hiddenLevel1001", "hiddenLevel1004", "hiddenLevel1002"],
|
||||||
|
xgfCorpId: query.corpinfoId,
|
||||||
|
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Form, Space,message,Modal } from "antd";
|
import { Button, Form, Space,message,Modal } from "antd";
|
||||||
|
import dayjs from "dayjs";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||||
|
|
@ -8,22 +9,48 @@ import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { PROJECT_STATUS_MAP } from "~/enumerate/constant";
|
import { PROJECT_STATUS_MAP } from "~/enumerate/constant";
|
||||||
import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace";
|
import {NS_EVALUATION, NS_QUALIFICATION_STATISTICS} from "~/enumerate/namespace";
|
||||||
import {FORM_ITEM_RENDER_ENUM} from "zy-react-library/enum/formItemRender";
|
import {FORM_ITEM_RENDER_ENUM} from "zy-react-library/enum/formItemRender";
|
||||||
import { useState } from "react";
|
import {useEffect, useState} from "react";
|
||||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||||
|
import {evaluationAdd} from "~/api/evaluation";
|
||||||
|
|
||||||
|
const validatorScore = (_, value) => {
|
||||||
|
if (value === undefined || value === null || value === "") {
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
const score = Number(value);
|
||||||
|
|
||||||
|
if (!Number.isInteger(score) || score < 1 || score > 100) {
|
||||||
|
return Promise.reject(new Error("\u9879\u76ee\u5206\u6570\u53ea\u5141\u8bb8\u8f93\u51651-100\u6b63\u6574\u6570"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return Promise.resolve();
|
||||||
|
};
|
||||||
|
|
||||||
|
const disabledEvaluationMonth = (current) => {
|
||||||
|
if (!current) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const minMonth = dayjs().startOf("month").subtract(3, "month");
|
||||||
|
const maxMonth = dayjs().endOf("month");
|
||||||
|
|
||||||
|
return current.isBefore(minMonth, "month") || current.isAfter(maxMonth, "month");
|
||||||
|
};
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [configModalOpen, setConfigModalOpen] = useState(false);
|
const [configModalOpen, setConfigModalOpen] = useState(false);
|
||||||
const [currentRecord, setCurrentRecord] = useState(null);
|
const [currentRecord, setCurrentRecord] = useState(null);
|
||||||
const { tableProps, getData } = useTable(props["inCheckList"], {
|
const { tableProps, getData } = useTable(props["evaluationCorpPage"], {
|
||||||
form,
|
form,
|
||||||
transform: (formData) => {
|
transform: (formData) => {
|
||||||
return {
|
return {
|
||||||
...formData,
|
...formData,
|
||||||
startTime: formData.time?.[0],
|
startTime: formData.time?.[0] ? formData.time?.[0] + " 00:00:00" :"",
|
||||||
endTime: formData.time?.[1],
|
endTime: formData.time?.[1] ? formData.time?.[1] + " 23:59:59" :"",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -33,7 +60,7 @@ function List(props) {
|
||||||
<Search
|
<Search
|
||||||
labelCol={{ span: 8 }}
|
labelCol={{ span: 8 }}
|
||||||
options={[
|
options={[
|
||||||
{ name: "likeCorpInfoName", label: "相关方名称" },
|
{ name: "corpinfoName", label: "相关方名称" },
|
||||||
{
|
{
|
||||||
name: "time",
|
name: "time",
|
||||||
label: "时间范围",
|
label: "时间范围",
|
||||||
|
|
@ -46,33 +73,33 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "相关方名称", dataIndex: "corpinfoName" },
|
{ title: "相关方名称", dataIndex: "corpinfoName" },
|
||||||
{ title: "项目数", dataIndex: "projectName",render:(_, record) => (
|
{ title: "项目数", dataIndex: "projectCount",render:(_, record) => (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
// disabled={ !(props.permission(props.xmsbtn && "jgd-xgfzhkpgl-xms"))}
|
disabled={ !(props.permission(props.xmsbtn || "jgd-xgfzhkpgl-xms"))}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`./ProjectList?id=${record.id}`);
|
props.history.push(`./ProjectList?corpinfoId=${record.corpinfoId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{record.projectName}
|
{record.projectCount}
|
||||||
</Button>
|
</Button>
|
||||||
) },
|
) },
|
||||||
{ title: "已验收/隐患数", dataIndex: "manageDeptName",render:(_, record) => (
|
{ title: "已验收/隐患数", dataIndex: "manageDeptName",render:(_, record) => (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
// disabled={ !(props.permission(props.yhsbtn && "jgd-xgfzhkpgl-yhs"))}
|
disabled={ !(props.permission(props.yhsbtn || "jgd-xgfzhkpgl-yhs"))}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`./HiddenList?id=${record.id}`);
|
props.history.push(`./HiddenList?corpinfoId=${record.corpinfoId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{record.manageDeptName}
|
{ `${record.rectifiedHiddenCount}/${record.totalHiddenCount}` }
|
||||||
</Button>
|
</Button>
|
||||||
) },
|
) },
|
||||||
{ title: "处罚金处罚次数", dataIndex: "qualificationsTypeName" },
|
{ title: "处罚金处罚次数", dataIndex: "penaltyTimes" },
|
||||||
{ title: "处罚金总额(元)", dataIndex: "companyName" },
|
{ title: "处罚金总额(元)", dataIndex: "totalPenaltyAmount" },
|
||||||
{
|
{
|
||||||
title: "已缴纳金额(元)",
|
title: "已缴纳金额(元)",
|
||||||
dataIndex: "projectStatus",
|
dataIndex: "paidAmount",
|
||||||
render: (_, record) => getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }),
|
render: (_, record) => getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -81,7 +108,7 @@ function List(props) {
|
||||||
width: 150,
|
width: 150,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{/*{props.permission(props.pfbtn) && (*/}
|
{props.permission(props.pfbtn) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -91,17 +118,17 @@ function List(props) {
|
||||||
>
|
>
|
||||||
评分
|
评分
|
||||||
</Button>
|
</Button>
|
||||||
{/*)}*/}
|
)}
|
||||||
{/*{props.permission(props.dflbbtn || "jgd-xgfzhkpgl-dflb") && (*/}
|
{props.permission(props.dflbbtn || "jgd-xgfzhkpgl-dflb") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`./ScoreList?id=${record.id}`);
|
props.history.push(`./ScoreList?corpinfoId=${record.corpinfoId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
得分列表
|
得分列表
|
||||||
</Button>
|
</Button>
|
||||||
{/*)}*/}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
@ -113,9 +140,7 @@ function List(props) {
|
||||||
&& (
|
&& (
|
||||||
<AddModal
|
<AddModal
|
||||||
currentData={currentRecord}
|
currentData={currentRecord}
|
||||||
requestEdit={props["keyProjectAlgorithmItemEdit"]}
|
evaluationAdd={props["evaluationAdd"]}
|
||||||
requestTypeList={props["algorithmListAll"]}
|
|
||||||
requestListItemByCamera={props["listItemByCamera"]}
|
|
||||||
open={configModalOpen}
|
open={configModalOpen}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setConfigModalOpen(false);
|
setConfigModalOpen(false);
|
||||||
|
|
@ -131,13 +156,26 @@ function List(props) {
|
||||||
function AddModalComponent(props) {
|
function AddModalComponent(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
console.log(props);
|
||||||
|
},[])
|
||||||
|
const splitYearMonth =(dateStr)=> {
|
||||||
|
const [year, month] = dateStr.split('-');
|
||||||
|
return { year, month };
|
||||||
|
}
|
||||||
const onCancel = () => {
|
const onCancel = () => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
props.onCancel();
|
props.onCancel();
|
||||||
};
|
};
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
const res = await props.requestEdit(submitValues);
|
values.corpinfoId = props.currentData.corpinfoId;
|
||||||
|
values.corpinfoName = props.currentData.corpinfoName;
|
||||||
|
|
||||||
|
const result = splitYearMonth(values.tims)
|
||||||
|
values.year = result.year;
|
||||||
|
values.month = result.month;
|
||||||
|
|
||||||
|
const res = await props.evaluationAdd(values);
|
||||||
if (res?.success) {
|
if (res?.success) {
|
||||||
onCancel();
|
onCancel();
|
||||||
props.getData();
|
props.getData();
|
||||||
|
|
@ -163,22 +201,27 @@ function AddModalComponent(props) {
|
||||||
|
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "algorithmTypeIds",
|
name: "tims",
|
||||||
label: "评分阶段",
|
label: "评分阶段",
|
||||||
render:FORM_ITEM_RENDER_ENUM.DATE_MONTH,
|
render:FORM_ITEM_RENDER_ENUM.DATE_MONTH,
|
||||||
span: 24,
|
span: 24,
|
||||||
|
componentProps: {
|
||||||
|
disabledDate: disabledEvaluationMonth,
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "score",
|
name: "score",
|
||||||
label: "项目分数",
|
label: "项目分数",
|
||||||
render:FORM_ITEM_RENDER_ENUM.NUMBER,
|
render:FORM_ITEM_RENDER_ENUM.INTEGER,
|
||||||
|
useConstraints: false,
|
||||||
componentProps:{
|
componentProps:{
|
||||||
max:"100",
|
max: 100,
|
||||||
min:"1",
|
min: 1,
|
||||||
step:"1",
|
precision: 0,
|
||||||
|
step: 1,
|
||||||
},
|
},
|
||||||
|
rules: [{ validator: validatorScore }],
|
||||||
span: 24,
|
span: 24,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -196,4 +239,4 @@ function AddModalComponent(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const AddModal = AddModalComponent;
|
const AddModal = AddModalComponent;
|
||||||
export default Connect([NS_QUALIFICATION_STATISTICS], true)(Permission(List));
|
export default Connect([NS_EVALUATION], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -11,17 +11,20 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { PROJECT_ONELEVEL_STATUS_MAP, PROJECT_STATUS_MAP } from "~/enumerate/constant";
|
import { PROJECT_ONELEVEL_STATUS_MAP, PROJECT_STATUS_MAP } from "~/enumerate/constant";
|
||||||
import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace";
|
import {NS_EVALUATION, NS_QUALIFICATION_STATISTICS} from "~/enumerate/namespace";
|
||||||
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
function ProjectList(props) {
|
function ProjectList(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { tableProps, getData } = useTable(props["inCheckList"], {
|
const query = useGetUrlQuery();
|
||||||
|
const { tableProps, getData } = useTable(props["projectPageNoPermission"], {
|
||||||
form,
|
form,
|
||||||
usePermission:false,
|
usePermission:false,
|
||||||
useStorageQueryCriteria:false,
|
useStorageQueryCriteria:false,
|
||||||
// params: {
|
params: {
|
||||||
// noneCompleted: props.noneCompleted ? props.noneCompleted : 2,
|
eqCorpinfoId: query.corpinfoId,
|
||||||
// },
|
eqProjectStatus:4,
|
||||||
|
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -54,7 +57,6 @@ function ProjectList(props) {
|
||||||
width: 120,
|
width: 120,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{/*{props.permission(props.ckbtn || "jgd-xgfzhkpgl-xmlb-info") && (*/}
|
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -63,8 +65,6 @@ function ProjectList(props) {
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
{/*)}*/}
|
|
||||||
|
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
@ -77,4 +77,4 @@ function ProjectList(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default Connect([NS_QUALIFICATION_STATISTICS], true)(Permission(ProjectList));
|
export default Connect([NS_EVALUATION], true)(Permission(ProjectList));
|
||||||
|
|
|
||||||
|
|
@ -5,18 +5,22 @@ import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace";
|
import {NS_EVALUATION} from "~/enumerate/namespace";
|
||||||
import {FORM_ITEM_RENDER_ENUM} from "zy-react-library/enum/formItemRender";
|
import {FORM_ITEM_RENDER_ENUM} from "zy-react-library/enum/formItemRender";
|
||||||
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
|
|
||||||
function ScoreList(props) {
|
function ScoreList(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { tableProps, getData } = useTable(props["inCheckList"], {
|
const query = useGetUrlQuery();
|
||||||
|
|
||||||
|
const { tableProps, getData } = useTable(props["evaluationList"], {
|
||||||
form,
|
form,
|
||||||
usePermission:false,
|
usePermission:false,
|
||||||
useStorageQueryCriteria:false,
|
useStorageQueryCriteria:false,
|
||||||
transform: (formData) => {
|
transform: (formData) => {
|
||||||
return {
|
return {
|
||||||
...formData,
|
...formData,
|
||||||
|
eqCorpinfoId: query.corpinfoId,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -26,7 +30,7 @@ function ScoreList(props) {
|
||||||
<Search
|
<Search
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "time",
|
name: "eqYear",
|
||||||
label: "选择年份",
|
label: "选择年份",
|
||||||
render: FORM_ITEM_RENDER_ENUM.DATE_YEAR,
|
render: FORM_ITEM_RENDER_ENUM.DATE_YEAR,
|
||||||
},
|
},
|
||||||
|
|
@ -35,15 +39,16 @@ function ScoreList(props) {
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
|
options={false}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "年份", dataIndex: "corpinfoName" },
|
{ title: "年份", dataIndex: "year" },
|
||||||
{ title: "月份", dataIndex: "projectName"},
|
{ title: "月份", dataIndex: "month"},
|
||||||
|
|
||||||
{ title: "主管部门", dataIndex: "qualificationsTypeName" },
|
{ title: "主管部门", dataIndex: "departmentName" },
|
||||||
{ title: "评分人员", dataIndex: "companyName" },
|
{ title: "评分人员", dataIndex: "userName" },
|
||||||
{
|
{
|
||||||
title: "得分",
|
title: "得分",
|
||||||
dataIndex: "projectStatus",
|
dataIndex: "score",
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
{...tableProps}
|
{...tableProps}
|
||||||
|
|
@ -52,4 +57,4 @@ function ScoreList(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_QUALIFICATION_STATISTICS], true)(Permission(ScoreList));
|
export default Connect([NS_EVALUATION], true)(Permission(ScoreList));
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ function HiddenView() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page headerTitle={query.history === "1" ? "过程记录" : "查看"} contentPadding="0 20px 20px 20px">
|
<Page headerTitle={query.history === "1" ? "过程记录" : "查看"} contentPadding="0 20px 20px 20px">
|
||||||
{/*<HiddenInfo history={query.history === "1"} />*/}
|
<HiddenInfo history={query.history === "1"} />
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ function ViewInfo(props) {
|
||||||
{ label: "公司名称", children: corpInfoData.corpName },
|
{ label: "公司名称", children: corpInfoData.corpName },
|
||||||
{ label: "企业状态", children: (corpInfoData.corpStateName) ? corpInfoData.corpStateName : "-" },
|
{ label: "企业状态", children: (corpInfoData.corpStateName) ? corpInfoData.corpStateName : "-" },
|
||||||
{ label: "开户人", children: corpInfoData.createName },
|
{ label: "开户人", children: corpInfoData.createName },
|
||||||
{ label: "统一社会信用代码", children: corpInfoData.code },
|
{ label: "统一社会信号代码", children: corpInfoData.code },
|
||||||
{ label: "属地", children: corpInfoData.cityName },
|
{ label: "属地", children: corpInfoData.cityName },
|
||||||
{
|
{
|
||||||
label: "所属行业",
|
label: "所属行业",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue