diff --git a/jjb.config.js b/jjb.config.js index 1e3fa3a..29c1ba6 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -16,8 +16,8 @@ module.exports = { // 应用后端分支名称,部署上线需要 javaGitBranch: "", // 接口服务地址 - API_HOST: "https://gbs-gateway.qhdsafety.com", - // API_HOST: "http://192.168.20.100:30140", + API_HOST: "", + }, }, // 应用唯一标识符 @@ -26,8 +26,8 @@ module.exports = { contextInject: { // 应用Key appKey: "", - // fileUrl: "http://192.168.20.240:9787/mnt/", - fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/", + fileUrl: "http://192.168.20.240:9787/mnt/", + // fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/", }, // public/index.html注入全局变量 windowInject: { diff --git a/package.json b/package.json index daab48b..2cfcdd2 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "relation-graph": "^2.2.11", - "zy-react-library": "^1.0.152" + "zy-react-library": "^1.0.153" }, "devDependencies": { "@antfu/eslint-config": "^5.4.1", diff --git a/src/api/user/index.js b/src/api/user/index.js index cb05877..956025c 100644 --- a/src/api/user/index.js +++ b/src/api/user/index.js @@ -38,11 +38,17 @@ export const postAll = declareRequest( "userLoading", "Post > @/basicInfo/post/listAll", ); -// 获取角色 +// 股份端获取角色 export const rolesAll = declareRequest( "userLoading", "Get > /system/operation/roles", ); +// 获取角色 +export const authRolesAll = declareRequest( + "userLoading", + "Get > /system/operation/roles/auth-role", +); + export const dictData = declareRequest( "userLoading", "Get > /config/dict-trees/list/by/dictValues?", @@ -82,5 +88,5 @@ export const reviewStatus = declareRequest( // 用户变更详情 export const getChangerRecordInfoById = declareRequest( "userLoading", - "Post > @/basicInfo/userChangeRecord/getChangerRecordInfoById", + "Post > @/basicInfo/userCorpRecord/getUserCorpRecordById", ); diff --git a/src/components/OrgChartModal/index.js b/src/components/OrgChartModal/index.js index 5a13808..9adcda7 100644 --- a/src/components/OrgChartModal/index.js +++ b/src/components/OrgChartModal/index.js @@ -3,6 +3,7 @@ import RelationGraph from "relation-graph/react"; import { MySwitch } from "./RGDemoComponents/MyUIComponents"; const ExpandAnimation = (departmentData) => { + console.log(departmentData); const graphRef = useRef(null); const [relayout, setRelayout] = useState(true); diff --git a/src/pages/Container/Enterprise/CorpInfo/Info/index.js b/src/pages/Container/Enterprise/CorpInfo/Info/index.js index 1ca6a44..09bd162 100644 --- a/src/pages/Container/Enterprise/CorpInfo/Info/index.js +++ b/src/pages/Container/Enterprise/CorpInfo/Info/index.js @@ -85,24 +85,13 @@ function Info(props) { label: "规模", children: info.scaleName, }, - { - label: "是否规模以上", - children: ( -
- {info.scaleType === 1 - ? "是" - : info.scaleType === 0 - ? "否" - : ""} -
- ), - }, + { label: "经度/纬度", children: info.longitude && `${info.longitude}/${info.latitude}`, }, { - label: "职工人数", + label: "职工人数(人)", children: info.employees, }, { @@ -214,7 +203,18 @@ function Info(props) { ), }, - + { + label: "是否规模以上", + children: ( +
+ {info.scaleType === 1 + ? "是" + : info.scaleType === 0 + ? "否" + : ""} +
+ ), + }, { label: "企事业单位经营地址", children: info.addressBusiness, diff --git a/src/pages/Container/Enterprise/CorpInfo/Update/index.js b/src/pages/Container/Enterprise/CorpInfo/Update/index.js index 8a49700..c3e68a3 100644 --- a/src/pages/Container/Enterprise/CorpInfo/Update/index.js +++ b/src/pages/Container/Enterprise/CorpInfo/Update/index.js @@ -374,7 +374,7 @@ function Update(props) { span: 24, }, { - label: "职工人数", + label: "职工人数(人)", name: "employees", required: false, render: FORM_ITEM_RENDER_ENUM.NUMBER, diff --git a/src/pages/Container/Enterprise/EnterpriseMiddleground/ChangeList/index.js b/src/pages/Container/Enterprise/EnterpriseMiddleground/ChangeList/index.js index ba0ee3a..e6609c7 100644 --- a/src/pages/Container/Enterprise/EnterpriseMiddleground/ChangeList/index.js +++ b/src/pages/Container/Enterprise/EnterpriseMiddleground/ChangeList/index.js @@ -23,10 +23,11 @@ function List(props) { const [form] = Form.useForm(); const { tableProps, getData } = useTable(props["userEmploymentLogAll"], { form, + usePermission: false, transform: (formData) => { return { ...formData, - usePermission: false, + }; }, }); diff --git a/src/pages/Container/Enterprise/EnterpriseMiddleground/List/index.js b/src/pages/Container/Enterprise/EnterpriseMiddleground/List/index.js index dc59027..ad0a0b8 100644 --- a/src/pages/Container/Enterprise/EnterpriseMiddleground/List/index.js +++ b/src/pages/Container/Enterprise/EnterpriseMiddleground/List/index.js @@ -11,6 +11,7 @@ import useTable from "zy-react-library/hooks/useTable"; import { getLabelName } from "zy-react-library/utils"; import { NS_USER } from "~/enumerate/namespace"; +import { UseDecodeIdCard } from "~/utils"; const USER_TYPE = [ { @@ -33,7 +34,7 @@ function List(props) { return { ...formData, eqDepartmentId: selectedNodeId, - + noMain: 1, }; }, }); @@ -45,23 +46,24 @@ function List(props) { return (
-
-
+ +
+ +
- -
+ +
+ +
( +
{UseDecodeIdCard(record.userIdCard)}
+ ), }, { title: "手机号", @@ -161,7 +166,7 @@ function List(props) { getData={getData} currentId={currentId} requestDetails={props["userDetails"]} - requwstRolesAll={props["rolesAll"]} + requwstRolesAll={props["authRolesAll"]} onCancel={() => { setAddModalOpen(false); setCurrentId(""); @@ -202,6 +207,7 @@ function AddModalComponent(props) { { const currentPath = pathNodes; - // 情况1:当前路径为空(如初始化状态) if (currentPath.length === 0) { setPathNodes([record]); - // 无法构建路径,只切换选中项 - setSelectedNodeId(record.id); - setSelectedNodeName(record.name); - getData(); } else { - // 安全地扩展路径 const newPath = [...currentPath, { id: record.id, name: record.name, parentId: record.parentId }]; - setPathNodes(newPath); - setSelectedNodeId(record.id); - setSelectedNodeName(record.name); - getData(); } + setSelectedNodeId(record.id); + setSelectedNodeName(record.name); + getData(); }; return ( -
-
- -
+
+
+
+ +
+ +
- ( - <> - {props.permission("zzjgqyd-add") - && ( +
+
( + <> + {props.permission("zzjgqyd-add") && ( )} - - - )} - columns={[ - { - title: "部门名称", - dataIndex: "name", - render: (_, record) => ( - ), - }, - { title: "部门负责人", dataIndex: "departmentUserLeaderList" }, - { title: "部门级别", dataIndex: "levelName" }, - { - title: "操作", - width: 200, - render: (_, record) => ( - - - {props.permission("zzjgqyd-edit") - && ( - + + )} + columns={[ + { + title: "部门名称", + dataIndex: "name", + render: (_, record) => ( + + ), + }, + { title: "部门负责人", dataIndex: "departmentUserLeaderList" }, + { title: "部门级别", dataIndex: "levelName" }, + { + title: "操作", + width: 200, + render: (_, record) => ( + + {props.permission("zzjgqyd-edit") && ( )} - {props.permission("zzjgqyd-delete") - && ( + {props.permission("zzjgqyd-delete") && ( )} - - ), - }, - ]} - {...tableProps} - /> + + ), + }, + ]} + {...tableProps} + /> + @@ -209,7 +214,6 @@ function OrganizationStructure(props) { onCancel={() => { setAddModalOpen(false); setCurrentId(""); - // setSelectedNodeId(""); }} /> )} @@ -217,7 +221,6 @@ function OrganizationStructure(props) { ); } -// ====== AddModalComponent ====== function AddModalComponent(props) { const [form] = Form.useForm(); const [parentName, setParentName] = useState(null); @@ -251,11 +254,6 @@ function AddModalComponent(props) { }); values.parentId = props.parentId; - if (Number.isInteger(values.depOrder) && values.depOrder < 0) { - message.error("部门排序请输入正整数!"); - return; - } - let res; if (props.currentId) { values.id = props.currentId; @@ -305,12 +303,26 @@ function AddModalComponent(props) { /> ), }, - { name: "departmentFunction", label: "岗位职责", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, required: false }, { name: "depOrder", label: "部门排序", render: FORM_ITEM_RENDER_ENUM.NUMBER, + rules: [ + + { + validator: (_, value) => { + if (value === undefined || value === null || value === "") { + return Promise.resolve(); // 如果非必填可移除 required,这里允许空 + } + const num = Number(value); + if (!Number.isInteger(num) || num <= 0) { + return Promise.reject(new Error("请输入大于0的正整数")); + } + return Promise.resolve(); + }, + }, + ], }, ]} labelCol={{ span: 10 }} diff --git a/src/pages/Container/Enterprise/Post/index.js b/src/pages/Container/Enterprise/Post/index.js index 25dce08..4b78670 100644 --- a/src/pages/Container/Enterprise/Post/index.js +++ b/src/pages/Container/Enterprise/Post/index.js @@ -58,23 +58,24 @@ function Post(props) { }; return ( -
-
+ +
+ +
- -
+ +
+ +
{/* { const arr = []; + if (res.data.selectfromList && res.data.selectfromList.length > 0) { res.data.selectfromList.forEach((item) => { arr.push(item.itemCode); @@ -414,6 +415,8 @@ function AddModalComponent(props) { width={800} onOk={form.submit} onCancel={onCancel} + okButtonProps={{ disabled: props.loading }} + cancelButtonProps={{ disabled: props.loading }} > ), }, - { name: "eqType", label: "企业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_TYPE }, + { name: "eqType", label: "相关方类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_TYPE }, { name: "cityRecord", label: "属地", diff --git a/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js b/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js index 1067698..b6a8d07 100644 --- a/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js +++ b/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js @@ -15,6 +15,7 @@ import useGetFile from "zy-react-library/hooks/useGetFile"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useTable from "zy-react-library/hooks/useTable"; import { NS_USER } from "~/enumerate/namespace"; +import { UseDecodeIdCard } from "~/utils"; const FLOW_USER_TYPE = [ { @@ -34,12 +35,13 @@ function List(props) { const [form] = Form.useForm(); const { tableProps, getData } = useTable(props["userList"], { form, + usePermission: false, transform: (formData) => { return { ...formData, eqDepartmentId: selectedNodeId, eqCorpinfoId: queryParams["id"], - usePermission: false, + noMain: 1, }; }, }); @@ -165,7 +167,7 @@ function List(props) { getData={getData} currentId={currentId} requestDetails={props["userDetails"]} - requwstRolesAll={props["rolesAll"]} + requwstRolesAll={props["authRolesAll"]} requestGetEncryInfo={props["getEncryInfo"]} onCancel={() => { setAddModalOpen(false); @@ -205,7 +207,6 @@ function AddModalComponent(props) { setInfo(res.data); }; fetchData(); - } }, [props.currentId]); const onCancel = () => { @@ -231,6 +232,7 @@ function AddModalComponent(props) { open={props.open} title="查看" width={1200} + cancelText="关闭" okButtonProps={{ style: { display: "none", @@ -287,20 +289,20 @@ function AddModalComponent(props) {
{info.phone} - {info.phone - && ( - - )} + {/* {info.phone */} + {/* && ( */} + {/* */} + {/* )} */}
), @@ -309,21 +311,21 @@ function AddModalComponent(props) { label: "身份证号", children: (
- {info.userIdCard} - { info.userIdCard - && ( - - )} + {UseDecodeIdCard(info.userIdCard) } + {/* { info.userIdCard */} + {/* && ( */} + {/* */} + {/* )} */}
), diff --git a/src/pages/Container/Enterprise/User/Add/index.js b/src/pages/Container/Enterprise/User/Add/index.js index bdf1022..96a74ed 100644 --- a/src/pages/Container/Enterprise/User/Add/index.js +++ b/src/pages/Container/Enterprise/User/Add/index.js @@ -15,7 +15,7 @@ import { ID_NUMBER, PHONE } from "zy-react-library/regular"; import { getLabelName, idCardGetDateAndGender } from "zy-react-library/utils"; import { NS_USER } from "~/enumerate/namespace"; -import { useDebounce } from "~/utils"; +import { useDebounce, UseDecodeIdCard } from "~/utils"; const WHETHER_ENUM = [ { @@ -59,22 +59,7 @@ function Add(props) { id: queryParams["id"], }); - let idCardToSet = data.userIdCard; - if (idCardToSet) { - // 判断是否是 Base64 格式(可选) - try { - // 尝试解码,如果成功且结果是合法身份证号,则使用 - const decoded = atob(idCardToSet); - if (/^\d{17}[\dX]$/.test(decoded)) { - idCardToSet = decoded; - } - // 否则保留原值(兼容未加密数据) - } - catch { - console.warn("Not a valid Base64 string, keep as is:", idCardToSet); - } - } - data.userIdCard = idCardToSet; + data.userIdCard = UseDecodeIdCard(data.userIdCard); data.sex = data.sex === "男" ? "1" : "0"; @@ -109,7 +94,7 @@ function Add(props) { }; fetchData(); } - props["rolesAll"]().then((res) => { + props["authRolesAll"]().then((res) => { setRolesData(res.data); }); @@ -410,6 +395,21 @@ function Add(props) { label: "部门排序", required: false, render: FORM_ITEM_RENDER_ENUM.NUMBER, + + rules: [ + { + validator: (_, value) => { + if (value === undefined || value === null || value === "") { + return Promise.resolve(); // 如果非必填可移除 required,这里允许空 + } + const num = Number(value); + if (!Number.isInteger(num) || num <= 0) { + return Promise.reject(new Error("请输入大于0的正整数")); + } + return Promise.resolve(); + }, + }, + ], }, // { name: "rank_level", label: "人员职级", required: false, render: FORM_ITEM_RENDER_ENUM.SELECT, items: rankData, itemsField: { labelKey: "dictLabel", valueKey: "dictValue" } }, { diff --git a/src/pages/Container/Enterprise/User/List/index.js b/src/pages/Container/Enterprise/User/List/index.js index f626f93..f033e23 100644 --- a/src/pages/Container/Enterprise/User/List/index.js +++ b/src/pages/Container/Enterprise/User/List/index.js @@ -17,7 +17,9 @@ import useImportFile from "zy-react-library/hooks/useImportFile"; import useTable from "zy-react-library/hooks/useTable"; import { getLabelName } from "zy-react-library/utils"; + import { NS_USER } from "~/enumerate/namespace"; +import { UseDecodeIdCard } from "~/utils"; const WHETHER_ENUM = [ { @@ -45,6 +47,7 @@ function List(props) { ...formData, eqDepartmentId: selectedNodeId, userType: 2, + noMain: 1, }; }, }); @@ -111,37 +114,38 @@ function List(props) { getData(); }; return ( -
-
+ +
+ +
- -
+ +
+ +
@@ -214,19 +218,19 @@ function List(props) { title: "岗位", dataIndex: "postName", }, - { - title: "人资系统是否存在", - dataIndex: "rzFlag", - render: (_, record) => ( -
- {record.rzFlag === 0 - ? "否" - : record.rzFlag === 1 - ? "是" - : ""} -
- ), - }, + // { + // title: "人资系统是否存在", + // dataIndex: "rzFlag", + // render: (_, record) => ( + //
+ // {record.rzFlag === 0 + // ? "否" + // : record.rzFlag === 1 + // ? "是" + // : ""} + //
+ // ), + // }, { title: "操作", width: 300, @@ -306,7 +310,7 @@ function List(props) { getData={getData} currentId={currentId} requestDetails={props["userDetails"]} - requwstRolesAll={props["rolesAll"]} + requwstRolesAll={props["authRolesAll"]} requestGetEncryInfo={props["getEncryInfo"]} onCancel={() => { setAddModalOpen(false); @@ -367,6 +371,7 @@ function AddModalComponent(props) { {info.phone} - {info.phone - && ( - - )} + {/* {info.phone */} + {/* && ( */} + {/* */} + {/* )} */}
), @@ -439,21 +444,21 @@ function AddModalComponent(props) { label: "身份证号", children: (
- {info.userIdCard} - { info.userIdCard - && ( - - )} + {UseDecodeIdCard(info.userIdCard) } + {/* { info.userIdCard */} + {/* && ( */} + {/* */} + {/* )} */}
), diff --git a/src/pages/Container/Stakeholder/CorpInfo/index.js b/src/pages/Container/Stakeholder/CorpInfo/index.js index 6adcfd9..ee01f99 100644 --- a/src/pages/Container/Stakeholder/CorpInfo/index.js +++ b/src/pages/Container/Stakeholder/CorpInfo/index.js @@ -290,6 +290,7 @@ function CorpInfo(props) { }} >
{corpInfoQrCodeOpen && ( diff --git a/src/pages/Container/Stakeholder/Department/index.js b/src/pages/Container/Stakeholder/Department/index.js index 5592bcc..7c2a71f 100644 --- a/src/pages/Container/Stakeholder/Department/index.js +++ b/src/pages/Container/Stakeholder/Department/index.js @@ -25,8 +25,8 @@ function Department(props) { const [selectedNodeName, setSelectedNodeName] = useState(""); const { getUserInfo } = useGetUserInfo(); const [pathNodes, setPathNodes] = useState([]); // 仅由 LeftTree 更新 - const [treeKey, setTreeKey] = useState(0); const [form] = Form.useForm(); + const [treeKey, setTreeKey] = useState(0); // 初始 key const { tableProps, getData } = useTable(props["departmentList"], { form, transform: (formData) => { @@ -111,23 +111,26 @@ function Department(props) { } }; return ( -
-
+ +
+ +
- -
+ +
+ +
+ { setAddModalOpen(false); setCurrentId(""); - setSelectedNodeId(""); }} /> )} @@ -285,10 +287,7 @@ function AddModalComponent(props) { nameKey: "dictLabel", }); values.parentId = props.parentId; - if (Number.isInteger(values.depOrder) && values.depOrder < 0) { - message.error("部门排序请输入正整数!"); - return; - } + if (props.currentId) { values.parentId = props.parentId; values.id = props.currentId; @@ -351,6 +350,20 @@ function AddModalComponent(props) { name: "depOrder", label: "部门排序", render: FORM_ITEM_RENDER_ENUM.NUMBER, + rules: [ + { + validator: (_, value) => { + if (value === undefined || value === null || value === "") { + return Promise.resolve(); // 如果非必填可移除 required,这里允许空 + } + const num = Number(value); + if (!Number.isInteger(num) || num <= 0) { + return Promise.reject(new Error("请输入大于0的正整数")); + } + return Promise.resolve(); + }, + }, + ], }, // { // name: "securityFlag", diff --git a/src/pages/Container/Stakeholder/User/Add/index.js b/src/pages/Container/Stakeholder/User/Add/index.js index 8e4fea4..2cf952c 100644 --- a/src/pages/Container/Stakeholder/User/Add/index.js +++ b/src/pages/Container/Stakeholder/User/Add/index.js @@ -18,7 +18,7 @@ import { ID_NUMBER, PHONE } from "zy-react-library/regular"; import { getLabelName, idCardGetDateAndGender } from "zy-react-library/utils"; import { NS_USER } from "~/enumerate/namespace"; -import { getAgeByIdCard, getBirthDateFromIdCard, useDebounce } from "~/utils"; +import { getAgeByIdCard, getBirthDateFromIdCard, useDebounce, UseDecodeIdCard } from "~/utils"; export const WHETHER_ENUM = [ { @@ -74,22 +74,7 @@ function Add(props) { id: queryParams["id"], }); - let idCardToSet = data.userIdCard; - if (idCardToSet) { - // 判断是否是 Base64 格式(可选) - try { - // 尝试解码,如果成功且结果是合法身份证号,则使用 - const decoded = atob(idCardToSet); - if (/^\d{17}[\dX]$/.test(decoded)) { - idCardToSet = decoded; - } - // 否则保留原值(兼容未加密数据) - } - catch { - console.warn("Not a valid Base64 string, keep as is:", idCardToSet); - } - } - data.userIdCard = idCardToSet; + data.userIdCard = UseDecodeIdCard(data.userIdCard); data.sex = data.sex === "男" ? "1" : "0"; setUserID(data.userId); @@ -169,6 +154,10 @@ function Add(props) { message.error("年龄请输入正整数!"); return; } + if (values.cardImg.length !== 2) { + message.error("身份证照片必须上传两张"); + return; + } values.userId = userID || id; if (queryParams["id"]) { values.id = queryParams["id"]; diff --git a/src/pages/Container/Stakeholder/User/List/index.js b/src/pages/Container/Stakeholder/User/List/index.js index ad7b22e..f163d4d 100644 --- a/src/pages/Container/Stakeholder/User/List/index.js +++ b/src/pages/Container/Stakeholder/User/List/index.js @@ -14,6 +14,7 @@ import useGetFile from "zy-react-library/hooks/useGetFile"; import useTable from "zy-react-library/hooks/useTable"; import { NS_USER } from "~/enumerate/namespace"; +import { UseDecodeIdCard } from "~/utils"; const JOB_STATUS = { 1: "在职", @@ -29,6 +30,7 @@ function List(props) { const [currentId, setCurrentId] = useState(""); const [modalType, setModalType] = useState(""); const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["userXgfList"], { form, transform: (formData) => { @@ -36,6 +38,7 @@ function List(props) { ...formData, eqDepartmentId: selectedNodeId, userType: 3, + noMain: 1, }; }, }); @@ -78,23 +81,22 @@ function List(props) { getData(); }; return ( -
-
+ +
+
- -
+ +
+
)} - { (props.permission("yhglxgf-lzsh") && record.employmentFlag === 10) + { (record.employmentFlag === 10) && ( , - )} + {/* {info.phone */} + {/* && ( */} + {/* */} + {/* )} */}
), @@ -470,25 +473,30 @@ function AddModalComponent(props) { label: "身份证号", children: (
- {info.userIdCard} - { info.userIdCard - && ( - - )} + {UseDecodeIdCard(info.userIdCard) } + {/* { info.userIdCard */} + {/* && ( */} + {/* */} + {/* )} */}
), }, + + { + label: "电子邮箱", + children: info.email, + }, { label: "民族", children: info.nationName, diff --git a/src/pages/Container/Stakeholder/User/ResignationReview/index.js b/src/pages/Container/Stakeholder/User/ResignationReview/index.js index 73001d6..01cbfe9 100644 --- a/src/pages/Container/Stakeholder/User/ResignationReview/index.js +++ b/src/pages/Container/Stakeholder/User/ResignationReview/index.js @@ -84,19 +84,19 @@ function ResignationReview(props) { { label: "企业名称", // 离职取变更前 入职取变更后 - children: queryParams["employmentFlag"] === 10 ? info.corpinfoNameBefore : info.corpinfoNameAfter, + children: info.corpinfoName, }, { label: "部门名称", - children: queryParams["employmentFlag"] === 10 ? info.departmentNameBefore : info.departmentNameAfter, + children: info.departmentName, }, { label: "岗位名称", - children: queryParams["employmentFlag"] === 10 ? info.postNameBefore : info.postNameAfter, + children: info.postName, }, { label: "员工状态", - children: queryParams["employmentFlag"] === 10 ? JOB_STATUS[info.userStatusBefore] : JOB_STATUS[info.userStatusAfter], + children: queryParams["employmentFlag"] === "10" ? "离职待审核" : "入职待审核", }, { diff --git a/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js b/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js index 4604a51..f9ff328 100644 --- a/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js +++ b/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js @@ -144,11 +144,11 @@ function List(props) { options={[ { name: "likecorpName", - label: "分公司名称", + label: "公司名称", }, { name: "eqCorpState", - label: "分公司状态", + label: "公司状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_STATUS, }, @@ -172,23 +172,23 @@ function List(props) { { props.permission("zgszhgl-add") && ( - + ) } )} columns={[ { - title: "分公司名称", + title: "公司名称", dataIndex: "corpName", }, { @@ -212,7 +212,7 @@ function List(props) { // dataIndex: "ecoTypeName", // }, { - title: "分公司状态", + title: "公司状态", dataIndex: "corpStateName", }, { @@ -230,7 +230,7 @@ function List(props) { }, { title: "操作", - width: 550, + width: 500, render: (_, record) => ( {" "} @@ -457,6 +457,8 @@ function AddModalComponent(props) { width={800} onOk={form.submit} onCancel={onCancel} + okButtonProps={{ disabled: props.loading }} + cancelButtonProps={{ disabled: props.loading }} > { + if (value === undefined || value === null || value === "") { + return Promise.resolve(); // 如果非必填可移除 required,这里允许空 + } + const num = Number(value); + if (!Number.isInteger(num) || num <= 0) { + return Promise.reject(new Error("请输入大于0的正整数")); + } + return Promise.resolve(); + }, + }, + ], }, ]} labelCol={{ diff --git a/src/pages/Container/Supervision/BranchCompany/AccountManage/View/index.js b/src/pages/Container/Supervision/BranchCompany/AccountManage/View/index.js index b3cecd8..0ac4f02 100644 --- a/src/pages/Container/Supervision/BranchCompany/AccountManage/View/index.js +++ b/src/pages/Container/Supervision/BranchCompany/AccountManage/View/index.js @@ -23,7 +23,7 @@ const ENTERPRISE_TYPE = [ }, { bianma: 3, - name: "相关方企业", + name: "普通企业", }, { bianma: 4, @@ -60,7 +60,7 @@ function View(props) { bordered items={[ { - label: "分公司名称", + label: "公司名称", children: info.corpName && info.corpName, }, { diff --git a/src/pages/Container/Supervision/BranchCompany/DepartmentManage/List/index.js b/src/pages/Container/Supervision/BranchCompany/DepartmentManage/List/index.js index 0f1db96..0d59da5 100644 --- a/src/pages/Container/Supervision/BranchCompany/DepartmentManage/List/index.js +++ b/src/pages/Container/Supervision/BranchCompany/DepartmentManage/List/index.js @@ -83,11 +83,11 @@ function List(props) { options={[ { name: "likecorpName", - label: "分公司名称", + label: "公司名称", }, { name: "eqCorpState", - label: "分公司状态", + label: "公司状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: BRANCH_CONPANY_STATUS, }, @@ -103,7 +103,7 @@ function List(props) {
{ return { ...formData, eqCorpinfoId: queryParams["id"], eqParentId: selectedNodeId, - usePermission: false, + }; }, }); @@ -132,6 +133,7 @@ function AddModalComponent(props) { open={props.open} title="查看" width={800} + cancelText="关闭" okButtonProps={{ style: { display: "none", diff --git a/src/pages/Container/Supervision/BranchCompany/EnterpriseInfo/List/index.js b/src/pages/Container/Supervision/BranchCompany/EnterpriseInfo/List/index.js index b837328..180b524 100644 --- a/src/pages/Container/Supervision/BranchCompany/EnterpriseInfo/List/index.js +++ b/src/pages/Container/Supervision/BranchCompany/EnterpriseInfo/List/index.js @@ -93,11 +93,11 @@ function List(props) { options={[ { name: "likecorpName", - label: "分公司名称", + label: "公司名称", }, { - label: "企业状态", - name: "corpState", + label: "公司状态", + name: "eqCorpState", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_STATUS, }, @@ -116,7 +116,7 @@ function List(props) { // )} columns={[ { - title: "分公司名称", + title: "公司名称", dataIndex: "corpName", }, { diff --git a/src/pages/Container/Supervision/BranchCompany/EnterpriseInfo/View/index.js b/src/pages/Container/Supervision/BranchCompany/EnterpriseInfo/View/index.js index 697b38c..02f83d0 100644 --- a/src/pages/Container/Supervision/BranchCompany/EnterpriseInfo/View/index.js +++ b/src/pages/Container/Supervision/BranchCompany/EnterpriseInfo/View/index.js @@ -1,5 +1,5 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Descriptions, Divider, Form, Input, Modal } from "antd"; +import { Descriptions, Divider, Form, Input, Modal } from "antd"; import { useEffect, useState } from "react"; import HeaderBack from "zy-react-library/components/HeaderBack"; @@ -59,7 +59,7 @@ function View(props) { loading={getFileLoading} items={[ { - label: "企业名称", + label: "公司名称", children: info.corpName && info.corpName, }, { @@ -92,7 +92,7 @@ function View(props) { }, { - label: "职工人数", + label: "职工人数(人)", children: info.employees, }, { @@ -209,21 +209,21 @@ function View(props) {
{ info.contactsPhone } - {/*{ (info.contactsPhone && info.contactsPhone.label)*/} - {/* && (*/} - {/* {*/} - {/* setIsModalOpen(true);*/} - {/* setViewType("contactsPhone");*/} - {/* setViewData("");*/} - {/* setEncrypted(info.contactsPhone);*/} - {/* form.resetFields();*/} - {/* }}*/} - {/* >*/} - {/* 点击查看*/} - {/* */} - {/* )}*/} + {/* { (info.contactsPhone && info.contactsPhone.label) */} + {/* && ( */} + {/* */} + {/* )} */}
), @@ -249,21 +249,21 @@ function View(props) {
{info.safetyPhone } - {/*{ (info.safetyPhone && info.safetyPhone.label)*/} - {/* && (*/} - {/* {*/} - {/* setIsModalOpen(true);*/} - {/* setViewType("safetyPhone");*/} - {/* setEncrypted(info.safetyPhone);*/} - {/* setViewData("");*/} - {/* form.resetFields();*/} - {/* }}*/} - {/* >*/} - {/* 点击查看*/} - {/* */} - {/* )}*/} + {/* { (info.safetyPhone && info.safetyPhone.label) */} + {/* && ( */} + {/* */} + {/* )} */}
), diff --git a/src/pages/Container/Supervision/BranchCompany/SubsidiaryUser/List/index.js b/src/pages/Container/Supervision/BranchCompany/SubsidiaryUser/List/index.js index 6659537..5ba2072 100644 --- a/src/pages/Container/Supervision/BranchCompany/SubsidiaryUser/List/index.js +++ b/src/pages/Container/Supervision/BranchCompany/SubsidiaryUser/List/index.js @@ -63,7 +63,7 @@ function List(props) { options={[ { name: "likeCorpName", - label: "分公司名称", + label: "公司名称", placeholder: "请输入分公司名称", }, { @@ -84,7 +84,7 @@ function List(props) {
{ return { ...formData, eqDepartmentId: selectedNodeId, eqCorpinfoId: queryParams["id"], - usePermission: false, + noMain: 1, }; }, }); @@ -153,6 +155,7 @@ function AddModalComponent(props) { open={props.open} title="查看" width={1200} + cancelText="关闭" okButtonProps={{ style: { display: "none", @@ -200,20 +203,20 @@ function AddModalComponent(props) {
{info.phone} - {info.phone - && ( - - )} + {/* {info.phone */} + {/* && ( */} + {/* */} + {/* )} */}
), @@ -226,21 +229,21 @@ function AddModalComponent(props) { label: "身份证号", children: (
- {info.userIdCard} - { info.userIdCard - && ( - - )} + {UseDecodeIdCard(info.userIdCard) } + {/* { info.userIdCard */} + {/* && ( */} + {/* */} + {/* )} */}
), diff --git a/src/pages/Container/Supervision/EnterpriseMiddleground/ChangeList/index.js b/src/pages/Container/Supervision/EnterpriseMiddleground/ChangeList/index.js index ba0ee3a..e6609c7 100644 --- a/src/pages/Container/Supervision/EnterpriseMiddleground/ChangeList/index.js +++ b/src/pages/Container/Supervision/EnterpriseMiddleground/ChangeList/index.js @@ -23,10 +23,11 @@ function List(props) { const [form] = Form.useForm(); const { tableProps, getData } = useTable(props["userEmploymentLogAll"], { form, + usePermission: false, transform: (formData) => { return { ...formData, - usePermission: false, + }; }, }); diff --git a/src/pages/Container/Supervision/EnterpriseMiddleground/UserList/index.js b/src/pages/Container/Supervision/EnterpriseMiddleground/UserList/index.js index c120219..32fed41 100644 --- a/src/pages/Container/Supervision/EnterpriseMiddleground/UserList/index.js +++ b/src/pages/Container/Supervision/EnterpriseMiddleground/UserList/index.js @@ -13,6 +13,7 @@ import useTable from "zy-react-library/hooks/useTable"; import { getLabelName } from "zy-react-library/utils"; import { NS_USER } from "~/enumerate/namespace"; +import { UseDecodeIdCard } from "~/utils"; const USER_TYPE = [ { @@ -38,6 +39,7 @@ function List(props) { ...formData, eqDepartmentId: selectedNodeId, corpinfoId: queryParams["id"], + noMain: 1, }; }, @@ -101,6 +103,9 @@ function List(props) { { title: "身份证号", dataIndex: "userIdCard", + render: (_, record) => ( +
{UseDecodeIdCard(record.userIdCard)}
+ ), }, { title: "手机号", @@ -208,6 +213,7 @@ function AddModalComponent(props) { { - const arr = []; - - res.data.selectfromList.forEach((item) => { - arr.push(item.itemCode); - }); - res.data.selectfromList = arr; + if (res.data && res.data.selectfromList) { + const arr = []; + res.data.selectfromList.forEach((item) => { + arr.push(item.itemCode); + }); + res.data.selectfromList = arr; + } form.setFieldsValue(res.data); }); } @@ -447,7 +448,7 @@ function AddModalComponent(props) { }, { name: "type", - label: "相关方企业类型", + label: "相关方类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_TYPE, }, diff --git a/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js b/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js index 4bc220b..6338ebb 100644 --- a/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js +++ b/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js @@ -15,7 +15,7 @@ import { getAreaNamePath, getCorpTypeNamePath } from "~/utils"; const ENTERPRISE_TYPE = [ { bianma: 3, - name: "相关方企业", + name: "普通企业", }, { bianma: 4, @@ -88,11 +88,12 @@ function View(props) { { label: "企业名称", children: info.corpName && info.corpName, + span: 4, }, - { - label: "企业状态", - children: info.corpStateName, - }, + // { + // label: "企业状态", + // children: info.corpStateName, + // }, { label: "开户人", children: info.createName, @@ -193,7 +194,7 @@ function View(props) { children: info.createDate, }, { - label: "职工人数", + label: "职工人数(人)", children: info.employees, }, // { diff --git a/src/pages/Container/Supervision/StakeholderUnit/SecurityPersonnel/CertificateList/index.js b/src/pages/Container/Supervision/StakeholderUnit/SecurityPersonnel/CertificateList/index.js index 0b147f6..32fd770 100644 --- a/src/pages/Container/Supervision/StakeholderUnit/SecurityPersonnel/CertificateList/index.js +++ b/src/pages/Container/Supervision/StakeholderUnit/SecurityPersonnel/CertificateList/index.js @@ -28,12 +28,13 @@ function Department(props) { const [form] = Form.useForm(); const { tableProps, getData } = useTable(props["userQualificationInfoList"], { form, + usePermission: false, transform: (formData) => { return { ...formData, eqQualificationinfoType: 2, eqCorpinfoId: queryParams["id"], - usePermission: false, + }; }, }); diff --git a/src/pages/Container/Supervision/StakeholderUnit/SpecialPersonnel/CertificateList/index.js b/src/pages/Container/Supervision/StakeholderUnit/SpecialPersonnel/CertificateList/index.js index b67594e..4aada1d 100644 --- a/src/pages/Container/Supervision/StakeholderUnit/SpecialPersonnel/CertificateList/index.js +++ b/src/pages/Container/Supervision/StakeholderUnit/SpecialPersonnel/CertificateList/index.js @@ -30,12 +30,13 @@ function Department(props) { const [form] = Form.useForm(); const { tableProps, getData } = useTable(props["userQualificationInfoList"], { form, + usePermission: false, transform: (formData) => { return { ...formData, eqQualificationinfoType: 1, eqCorpinfoId: queryParams["id"], - usePermission: false, + }; }, }); diff --git a/src/pages/Container/Supervision/StakeholderUnit/User/List/index.js b/src/pages/Container/Supervision/StakeholderUnit/User/List/index.js index c1de087..f809ff5 100644 --- a/src/pages/Container/Supervision/StakeholderUnit/User/List/index.js +++ b/src/pages/Container/Supervision/StakeholderUnit/User/List/index.js @@ -16,7 +16,7 @@ import { getAreaNamePath } from "~/utils"; // import { getLabelName } from "zy-react-library/utils"; const ENTERPRISE_TYPE = [ - { bianma: 3, name: "相关方企业" }, + { bianma: 3, name: "普通企业" }, { bianma: 4, name: "货主单位" }, { bianma: 5, name: "驻港单位" }, ]; @@ -85,7 +85,7 @@ function List(props) { /> ), }, - { name: "eqType", label: "企业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_TYPE }, + { name: "eqType", label: "相关方类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_TYPE }, { name: "cityRecord", label: "属地", diff --git a/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js b/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js index 1b238e2..c3ce445 100644 --- a/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js +++ b/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js @@ -15,6 +15,7 @@ import useGetFile from "zy-react-library/hooks/useGetFile"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useTable from "zy-react-library/hooks/useTable"; import { NS_USER } from "~/enumerate/namespace"; +import { UseDecodeIdCard } from "~/utils"; function List(props) { const [selectedNodeId, setSelectedNodeId] = useState(); @@ -24,12 +25,13 @@ function List(props) { const [form] = Form.useForm(); const { tableProps, getData } = useTable(props["userList"], { form, + usePermission: false, transform: (formData) => { return { ...formData, eqDepartmentId: selectedNodeId, eqCorpinfoId: queryParams["id"], - usePermission: false, + noMain: 1, }; }, }); @@ -123,30 +125,24 @@ function List(props) { title: "操作", render: (_, record) => ( - {props.permission("ryxxgl-resetPassword") - && ( - - )} - { - props.permission("ryxxgl-info") - && ( - - ) - } + + + + ), }, @@ -226,6 +222,7 @@ function AddModalComponent(props) { {info.phone} - {info.phone - && ( - - )} + {/* {info.phone */} + {/* && ( */} + {/* */} + {/* )} */} ), @@ -305,21 +302,21 @@ function AddModalComponent(props) { label: "身份证号", children: (
- {info.userIdCard} - { info.userIdCard - && ( - - )} + {UseDecodeIdCard(info.userIdCard) } + {/* { info.userIdCard */} + {/* && ( */} + {/* */} + {/* )} */}
), diff --git a/src/pages/Container/Supervision/Supervision/Department/index.js b/src/pages/Container/Supervision/Supervision/Department/index.js index 2889175..dcc64ca 100644 --- a/src/pages/Container/Supervision/Supervision/Department/index.js +++ b/src/pages/Container/Supervision/Supervision/Department/index.js @@ -125,23 +125,24 @@ function Department(props) { }; return ( -
-
+ +
+ +
- setDepartmentData(data)} /> -
+ setDepartmentData(data)} /> +
+ +
{ + if (value === undefined || value === null || value === "") { + return Promise.resolve(); // 如果非必填可移除 required,这里允许空 + } + const num = Number(value); + if (!Number.isInteger(num) || num <= 0) { + return Promise.reject(new Error("请输入大于0的正整数")); + } + return Promise.resolve(); + }, + }, + ], }, ]} diff --git a/src/pages/Container/Supervision/Supervision/Post/index.js b/src/pages/Container/Supervision/Supervision/Post/index.js index 5dc482e..02c0d52 100644 --- a/src/pages/Container/Supervision/Supervision/Post/index.js +++ b/src/pages/Container/Supervision/Supervision/Post/index.js @@ -54,23 +54,24 @@ function Post(props) { }; return ( -
-
+ +
+ +
- -
+ +
+ +
{/* { + if (value === undefined || value === null || value === "") { + return Promise.resolve(); // 如果非必填可移除 required,这里允许空 + } + const num = Number(value); + if (!Number.isInteger(num) || num <= 0) { + return Promise.reject(new Error("请输入大于0的正整数")); + } + return Promise.resolve(); + }, + }, + ], }, { name: "rankLevel", diff --git a/src/pages/Container/Supervision/Supervision/User/List/index.js b/src/pages/Container/Supervision/Supervision/User/List/index.js index 14ec771..7144d3e 100644 --- a/src/pages/Container/Supervision/Supervision/User/List/index.js +++ b/src/pages/Container/Supervision/Supervision/User/List/index.js @@ -19,6 +19,7 @@ import useImportFile from "zy-react-library/hooks/useImportFile"; import useTable from "zy-react-library/hooks/useTable"; import { getLabelName } from "zy-react-library/utils"; import { NS_USER } from "~/enumerate/namespace"; +import { UseDecodeIdCard } from "~/utils"; function List(props) { const [importOpen, setImportOpen] = useState(false); @@ -38,7 +39,7 @@ function List(props) { return { ...formData, eqDepartmentId: selectedNodeId, - menuPath: "", + noMain: 1, }; }, }); @@ -113,23 +114,22 @@ function List(props) { getData(); }; return ( -
-
+ +
+
- -
+ +
+
@@ -520,7 +521,7 @@ function AddModalComponent(props) { label: "身份证号", children: (
- {info.userIdCard} + {UseDecodeIdCard(info.userIdCard) } {/* { info.userIdCard === "隐藏" */} {/* && ( */} {/*