Compare commits
17 Commits
e5909ef864
...
04beb13b51
| Author | SHA1 | Date |
|---|---|---|
|
|
04beb13b51 | |
|
|
306e8193f9 | |
|
|
734b265041 | |
|
|
f9c8788d1a | |
|
|
b032a65aa8 | |
|
|
845925bc82 | |
|
|
0fdb8f77cc | |
|
|
8b5f6319c4 | |
|
|
30951578f5 | |
|
|
8844bb25ee | |
|
|
583e255167 | |
|
|
9195a5ad78 | |
|
|
5fa8301255 | |
|
|
5c0938bfeb | |
|
|
08c9dc09b9 | |
|
|
744a6501c5 | |
|
|
b91899d3ea |
|
|
@ -11,4 +11,5 @@ npm-debug.log*
|
|||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.idea
|
||||
yarn.lock
|
||||
yarn.lock
|
||||
basicInfo.zip
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ module.exports = {
|
|||
javaGitBranch: "<branch-name>",
|
||||
|
||||
// 接口服务地址
|
||||
API_HOST: "http://192.168.20.100:30140",
|
||||
// API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||
// API_HOST: "http://192.168.20.100:30140",
|
||||
API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||
},
|
||||
production: {
|
||||
// 应用后端分支名称,部署上线需要
|
||||
|
|
@ -29,6 +29,7 @@ module.exports = {
|
|||
appKey: "",
|
||||
// fileUrl: "http://192.168.20.240:9787/mnt/",
|
||||
fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/",
|
||||
// fileUrl: "https://skqhdg.porthebei.com:9004/file/uploadFiles2/",
|
||||
},
|
||||
// public/index.html注入全局变量
|
||||
windowInject: {
|
||||
|
|
@ -48,7 +49,7 @@ module.exports = {
|
|||
// 开发服务
|
||||
server: {
|
||||
// 监听端口号
|
||||
port: "8088",
|
||||
port: "8089",
|
||||
// 服务地址
|
||||
host: "127.0.0.1",
|
||||
// 是否自动打开浏览器
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"relation-graph": "^2.2.11",
|
||||
"zy-react-library": "^1.1.10"
|
||||
"zy-react-library": "^1.2.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
|||
|
||||
export const corpInfoList = declareRequest(
|
||||
"enterpriseLoading",
|
||||
"Post > @/basicInfo/corpInfo/list",
|
||||
"Post > @/basicInfo/corpInfo/basicList",
|
||||
);
|
||||
export const corpInfoDetails = declareRequest(
|
||||
"enterpriseLoading",
|
||||
|
|
@ -40,6 +40,11 @@ export const corpUserMiddlePage = declareRequest(
|
|||
"enterpriseLoading",
|
||||
"Post > @/basicInfo/corpInfo/corpUserMiddlePage",
|
||||
);
|
||||
export const userChangeRecordList = declareRequest(
|
||||
"enterpriseLoading",
|
||||
"Post > @/basicInfo/userChangeRecord/userCorpInfoList",
|
||||
);
|
||||
|
||||
|
||||
// 获取当前登录人信息
|
||||
export const userGetInfo = declareRequest(
|
||||
|
|
|
|||
|
|
@ -90,3 +90,19 @@ export const getChangerRecordInfoById = declareRequest(
|
|||
"userLoading",
|
||||
"Post > @/basicInfo/userCorpRecord/getUserCorpRecordById",
|
||||
);
|
||||
export const pageByNopermission = declareRequest(
|
||||
"enterpriseLoading",
|
||||
"Post > @/basicInfo/user/pageByNopermission",
|
||||
);
|
||||
export const userChangeRecordList = declareRequest(
|
||||
"enterpriseLoading",
|
||||
"Post > @/basicInfo/userChangeRecord/list",
|
||||
);
|
||||
export const userChangeRecordgGtRecordInfoById = declareRequest(
|
||||
"enterpriseLoading",
|
||||
"Post > @/basicInfo/userChangeRecord/getChangerRecordInfoById",
|
||||
);
|
||||
export const workChangeHandle = declareRequest(
|
||||
"enterpriseLoading",
|
||||
"Post > @/basicInfo/userChangeRecord/workChangeHandle",
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,7 +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);
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,342 @@
|
|||
import { Button, Descriptions, Divider, Form, message, Modal } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
|
||||
import { UseDecodeIdCard } from "~/utils";
|
||||
|
||||
function XgfUserInfo(props) {
|
||||
const [form] = Form.useForm();
|
||||
const [info, setInfo] = useState({});
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
||||
useEffect(() => {
|
||||
if (props.currentId) {
|
||||
const fetchData = async () => {
|
||||
const res = await props.requestDetails({
|
||||
id: props.currentId,
|
||||
});
|
||||
|
||||
const userImg = (res.data && res.data.userAvatarUrl)
|
||||
? [
|
||||
{
|
||||
filePath: res.data.userAvatarUrl,
|
||||
},
|
||||
]
|
||||
: await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
|
||||
const cardImg = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
const socSecurity = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["15"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
const empInsurance = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["16"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
const insurance = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["11"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
|
||||
const contract = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["10"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
const threeLevel = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["19"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
res.data.userImg = userImg;
|
||||
res.data.cardImg = cardImg;
|
||||
|
||||
res.data.socSecurity = socSecurity;
|
||||
res.data.empInsurance = empInsurance;
|
||||
res.data.insurance = insurance;
|
||||
res.data.contract = contract;
|
||||
res.data.threeLevel = threeLevel;
|
||||
|
||||
setInfo(res.data);
|
||||
};
|
||||
fetchData();
|
||||
}
|
||||
}, [props.currentId]);
|
||||
|
||||
const onCancel = () => {
|
||||
form.resetFields();
|
||||
props.onCancel();
|
||||
};
|
||||
|
||||
const handleReview = (reviewStatus, successMessage) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: reviewStatus === 2 ? "确定审核通过吗?" : "确定驳回吗?",
|
||||
onOk: () => {
|
||||
props.requestReviewStatus({
|
||||
corpinfoId: info.corpinfoId,
|
||||
employmentFlag: info.employmentFlag,
|
||||
reviewStatus,
|
||||
userId: info.id,
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
message.success(successMessage);
|
||||
props.getData?.();
|
||||
props.onCancel();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const footer = props.modalType === "review"
|
||||
? [
|
||||
<Button key="return" onClick={onCancel}>
|
||||
关闭
|
||||
</Button>,
|
||||
<Button key="reject" onClick={() => handleReview(3, "驳回成功")}>
|
||||
驳回
|
||||
</Button>,
|
||||
<Button key="pass" type="primary" onClick={() => handleReview(2, "审核成功")}>
|
||||
审核通过
|
||||
</Button>,
|
||||
]
|
||||
: undefined;
|
||||
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.modalType === "review" ? "审核" : "查看"}
|
||||
cancelText="关闭"
|
||||
width={1200}
|
||||
okButtonProps={{
|
||||
style: {
|
||||
display: "none",
|
||||
},
|
||||
}}
|
||||
confirmLoading={getFileLoading}
|
||||
onOk={form.submit}
|
||||
onCancel={onCancel}
|
||||
footer={footer}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
padding: 20,
|
||||
}}
|
||||
>
|
||||
<Divider orientation="left">基础信息</Divider>
|
||||
<Descriptions
|
||||
bordered
|
||||
items={[
|
||||
{
|
||||
label: props.userPhotoLabel || "人脸照片",
|
||||
children: <PreviewImg files={info.userImg} />,
|
||||
},
|
||||
{
|
||||
label: "身份证照片",
|
||||
children: <PreviewImg files={info.cardImg} />,
|
||||
},
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
},
|
||||
{
|
||||
label: "性别",
|
||||
children: info.sex,
|
||||
},
|
||||
|
||||
{
|
||||
label: "出生年月",
|
||||
children: info.birthday,
|
||||
},
|
||||
{
|
||||
label: "年龄",
|
||||
children: info.age,
|
||||
},
|
||||
{
|
||||
label: "手机号",
|
||||
children: (
|
||||
<div>
|
||||
{info.phone}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "身份证号",
|
||||
children: (
|
||||
<div>
|
||||
{UseDecodeIdCard(info.userIdCard) }
|
||||
</div>
|
||||
),
|
||||
|
||||
},
|
||||
...(
|
||||
props.showEmail
|
||||
? [
|
||||
{
|
||||
label: "电子邮箱",
|
||||
children: info.email,
|
||||
},
|
||||
]
|
||||
: []
|
||||
),
|
||||
{
|
||||
label: "民族",
|
||||
children: info.nationName,
|
||||
},
|
||||
// {
|
||||
// label: "婚姻状况",
|
||||
// children: info.maritalStatusName,
|
||||
// },
|
||||
{
|
||||
label: "政治面貌",
|
||||
children: info.politicalAffiliationName,
|
||||
},
|
||||
// {
|
||||
// label: "户口所在地",
|
||||
// children: info.locationAddress,
|
||||
// },
|
||||
// {
|
||||
// label: "现住址",
|
||||
// children: info.currentAddress,
|
||||
// },
|
||||
{
|
||||
label: "文化程度",
|
||||
children: info.culturalLevelName,
|
||||
},
|
||||
{
|
||||
label: "岗位名称",
|
||||
children: info.postName,
|
||||
},
|
||||
]}
|
||||
column={2}
|
||||
styles={{ label: { width: 200 }, content: { width: 500 } }}
|
||||
/>
|
||||
<Divider orientation="left">社保信息</Divider>
|
||||
<Descriptions
|
||||
bordered
|
||||
|
||||
items={[
|
||||
{
|
||||
label: "是否参加三级安全培训",
|
||||
children: info.isLevelThree === 1 ? "是" : "否",
|
||||
span: 2,
|
||||
},
|
||||
{
|
||||
label: "是否特殊工种",
|
||||
children: info.isSpecialJob === 1 ? "是" : "否",
|
||||
span: 2,
|
||||
},
|
||||
{
|
||||
label: "是否为部门负责人",
|
||||
children: info.isDepaRrtmentHead === 1 ? "是" : "否",
|
||||
span: 2,
|
||||
},
|
||||
|
||||
{
|
||||
label: "是否签订劳动合同",
|
||||
children: info.isSignLabor === 1 ? "是" : "否",
|
||||
span: 2,
|
||||
},
|
||||
...(
|
||||
info.isPay === 1
|
||||
? [
|
||||
|
||||
{
|
||||
label: "合同图片",
|
||||
children: <PreviewImg files={info.contract} />,
|
||||
span: 4,
|
||||
},
|
||||
]
|
||||
: []
|
||||
),
|
||||
{
|
||||
label: "是否缴纳社保",
|
||||
children: info.isSocial === 1 ? "是" : "否",
|
||||
span: 4,
|
||||
},
|
||||
...(
|
||||
info.isSocial === 1
|
||||
? [
|
||||
{
|
||||
label: "社会保障号码",
|
||||
children: info.socialNumber,
|
||||
},
|
||||
{
|
||||
label: "社保卡照片",
|
||||
children: <PreviewImg files={info.socSecurity} />,
|
||||
},
|
||||
]
|
||||
: []
|
||||
),
|
||||
{
|
||||
label: "是否按期缴纳工伤保险",
|
||||
children: info.isInjuriesPay === 1 ? "是" : "否",
|
||||
span: 4,
|
||||
},
|
||||
...(
|
||||
info.isInjuriesPay === 1
|
||||
? [
|
||||
{
|
||||
label: "工伤保险有效期",
|
||||
children: info.isInjuriesPayTime,
|
||||
},
|
||||
{
|
||||
label: "工伤保险凭证",
|
||||
children: <PreviewImg files={info.empInsurance} />,
|
||||
},
|
||||
]
|
||||
: []
|
||||
),
|
||||
{
|
||||
label: "是否缴纳商业保险",
|
||||
children: info.isPay === 1 ? "是" : "否",
|
||||
span: 4,
|
||||
},
|
||||
...(
|
||||
info.isPay === 1
|
||||
? [
|
||||
{
|
||||
label: "商业保险单号",
|
||||
children: info.payNumber,
|
||||
},
|
||||
{
|
||||
label: "保险图片",
|
||||
children: <PreviewImg files={info.insurance} />,
|
||||
},
|
||||
]
|
||||
: []
|
||||
),
|
||||
{
|
||||
label: "是否缴纳其他人身伤害保险",
|
||||
children: info.isBf === 1 ? "是" : "否",
|
||||
},
|
||||
...(
|
||||
info.isBf === 1
|
||||
? [
|
||||
|
||||
{
|
||||
label: "其他人身伤害保险照片",
|
||||
children: <PreviewImg files={info.threeLevel} />,
|
||||
span: 4,
|
||||
},
|
||||
]
|
||||
: []
|
||||
),
|
||||
]}
|
||||
column={2}
|
||||
styles={{ label: { width: 200 }, content: { width: 500 } }}
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
export default XgfUserInfo;
|
||||
|
|
@ -2,6 +2,7 @@ import { setJJBCommonAntdMessage } from "@cqsjjb/jjb-common-lib";
|
|||
import { setup } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { message } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import { getFileUrlFromServer } from "zy-react-library/utils";
|
||||
import "dayjs/locale/zh-cn";
|
||||
import "../blessed_by_buddha";
|
||||
|
||||
|
|
@ -12,9 +13,10 @@ dayjs.locale("zh-cn");
|
|||
setJJBCommonAntdMessage(message);
|
||||
|
||||
const app = setup();
|
||||
|
||||
getFileUrlFromServer();
|
||||
window.mapLongitude = "119.69457721306945";
|
||||
window.mapLatitude = "39.940504336846665";
|
||||
window.mapBaiDuKey = "OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr";
|
||||
|
||||
// 非底座环境运行
|
||||
if (!window.__POWERED_BY_QIANKUN__) {
|
||||
|
|
|
|||
|
|
@ -181,6 +181,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ function Info(props) {
|
|||
),
|
||||
},
|
||||
{
|
||||
label: "企事业单位经营地址",
|
||||
label: "单位经营地址",
|
||||
children: info.addressBusiness,
|
||||
},
|
||||
{
|
||||
|
|
@ -275,6 +275,7 @@ function Info(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ function Update(props) {
|
|||
whetherLiquidammoniaFlag: 0,
|
||||
whetherPipelineFlag: 0,
|
||||
}}
|
||||
confirmLoading={
|
||||
loading={
|
||||
deleteFileLoading
|
||||
|| uploadFileLoading
|
||||
|| getFileLoading
|
||||
|
|
@ -467,7 +467,7 @@ function Update(props) {
|
|||
items: WHETHER_ENUM,
|
||||
},
|
||||
{
|
||||
label: "企事业单位经营地址",
|
||||
label: "单位经营地址",
|
||||
name: "addressBusiness",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ const ENTERPRISE_TYPE = [
|
|||
bianma: 1,
|
||||
name: "集团单位",
|
||||
},
|
||||
{
|
||||
bianma: 6,
|
||||
name: "物资中心",
|
||||
},
|
||||
];
|
||||
function ChangeList(props) {
|
||||
const [form] = Form.useForm();
|
||||
|
|
|
|||
|
|
@ -217,6 +217,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
cancelText="关闭"
|
||||
|
|
|
|||
|
|
@ -157,11 +157,13 @@ function OrganizationStructure(props) {
|
|||
<Button
|
||||
block
|
||||
type="link"
|
||||
title={record.name}
|
||||
onClick={() => handleTableNodeClick(record)}
|
||||
>
|
||||
{`${record.name}>`}
|
||||
{`${record.name.length > 25 ? `${record.name.slice(0, 25)}...` : record.name}>`}
|
||||
</Button>
|
||||
),
|
||||
|
||||
},
|
||||
{ title: "部门负责人", dataIndex: "departmentUserLeaderList" },
|
||||
{ title: "部门级别", dataIndex: "levelName" },
|
||||
|
|
@ -272,6 +274,7 @@ function AddModalComponent(props) {
|
|||
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
|||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import AreaSelect from "zy-react-library/components/SelectTree/Area";
|
||||
// import AreaSelect from "zy-react-library/components/SelectTree/Area";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
||||
import { getAreaNamePath, useDebounce } from "~/utils";
|
||||
import { useDebounce } from "~/utils";
|
||||
|
||||
const ENTERPRISE_TYPE = [
|
||||
{
|
||||
|
|
@ -43,11 +43,11 @@ function List(props) {
|
|||
enterpriseType: 3,
|
||||
geCreateTime: formData.CreateTime?.[0],
|
||||
leCreateTime: formData.CreateTime?.[1],
|
||||
eqProvince: formData.cityRecord?.[0],
|
||||
eqCity: formData.cityRecord?.[1],
|
||||
eqCountry: formData.cityRecord?.[2],
|
||||
eqStreet: formData.cityRecord?.[3],
|
||||
eqVillage: formData.cityRecord?.[4],
|
||||
// eqProvince: formData.cityRecord?.[0],
|
||||
// eqCity: formData.cityRecord?.[1],
|
||||
// eqCountry: formData.cityRecord?.[2],
|
||||
// eqStreet: formData.cityRecord?.[3],
|
||||
// eqVillage: formData.cityRecord?.[4],
|
||||
|
||||
};
|
||||
},
|
||||
|
|
@ -57,7 +57,7 @@ function List(props) {
|
|||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "是否重置密码为Aa@12345678?",
|
||||
content: "是否重置密码为Cc@12345678?",
|
||||
onOk: () => {
|
||||
props["corpInfoChangePassword"]({
|
||||
id,
|
||||
|
|
@ -87,44 +87,44 @@ function List(props) {
|
|||
},
|
||||
});
|
||||
};
|
||||
const onFinish = async () => {
|
||||
// 处理属地查询
|
||||
const arr = [];
|
||||
cityData.forEach((item) => {
|
||||
arr.push(item.value);
|
||||
});
|
||||
form.setFieldValue("cityRecord", arr);
|
||||
getData();
|
||||
};
|
||||
// const onFinish = async () => {
|
||||
// // 处理属地查询
|
||||
// const arr = [];
|
||||
// cityData.forEach((item) => {
|
||||
// arr.push(item.value);
|
||||
// });
|
||||
// form.setFieldValue("cityRecord", arr);
|
||||
// getData();
|
||||
// };
|
||||
|
||||
const onReset = () => {
|
||||
setCityData([]);
|
||||
|
||||
form.setFieldValue("cityRecord", []);
|
||||
};
|
||||
// const onReset = () => {
|
||||
// setCityData([]);
|
||||
//
|
||||
// form.setFieldValue("cityRecord", []);
|
||||
// };
|
||||
return (
|
||||
<div>
|
||||
<Page isShowAllAction={false}>
|
||||
|
||||
<Search
|
||||
form={form}
|
||||
onFinish={() => onFinish()}
|
||||
onReset={onReset}
|
||||
onFinish={getData}
|
||||
// onReset={onReset}
|
||||
options={[
|
||||
{
|
||||
name: "likecorpName",
|
||||
label: "企业名称",
|
||||
},
|
||||
{
|
||||
name: "cityData",
|
||||
label: "属地",
|
||||
render: (
|
||||
<AreaSelect
|
||||
onGetNodePaths={nodes =>
|
||||
setCityData(nodes)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// name: "cityData",
|
||||
// label: "属地",
|
||||
// render: (
|
||||
// <AreaSelect
|
||||
// onGetNodePaths={nodes =>
|
||||
// setCityData(nodes)}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
{
|
||||
name: "CreateTime",
|
||||
label: "开户时间",
|
||||
|
|
@ -136,12 +136,12 @@ function List(props) {
|
|||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_TYPE,
|
||||
},
|
||||
{
|
||||
name: "cityRecord",
|
||||
label: "属地",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
onlyForLabel: true,
|
||||
},
|
||||
// {
|
||||
// name: "cityRecord",
|
||||
// label: "属地",
|
||||
// render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
// onlyForLabel: true,
|
||||
// },
|
||||
|
||||
]}
|
||||
|
||||
|
|
@ -171,17 +171,17 @@ function List(props) {
|
|||
title: "企业名称",
|
||||
dataIndex: "corpName",
|
||||
},
|
||||
{
|
||||
title: "属地",
|
||||
dataIndex: "cityName",
|
||||
width: 300,
|
||||
render: (_, record) => (
|
||||
<div>{getAreaNamePath(record)}</div>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// title: "属地",
|
||||
// dataIndex: "cityName",
|
||||
// width: 300,
|
||||
// render: (_, record) => (
|
||||
// <div>{getAreaNamePath(record)}</div>
|
||||
// ),
|
||||
// },
|
||||
{
|
||||
title: "创建单位",
|
||||
dataIndex: "createName",
|
||||
dataIndex: "tenantName",
|
||||
},
|
||||
{
|
||||
title: "开户人",
|
||||
|
|
@ -240,6 +240,19 @@ function List(props) {
|
|||
</Button>
|
||||
)
|
||||
}
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() =>
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "请联系管理员操作!",
|
||||
onOk: () => {
|
||||
|
||||
},
|
||||
})}
|
||||
>
|
||||
修改企业名称
|
||||
</Button>
|
||||
{props.permission("qyd-xgf-resetPassword")
|
||||
&& (
|
||||
<Button
|
||||
|
|
@ -301,15 +314,15 @@ function AddModalComponent(props) {
|
|||
id: props.currentId,
|
||||
})
|
||||
.then((res) => {
|
||||
const arr = [];
|
||||
|
||||
if (res.data.selectfromList && res.data.selectfromList.length > 0) {
|
||||
res.data.selectfromList.forEach((item) => {
|
||||
arr.push(item.itemCode);
|
||||
});
|
||||
|
||||
res.data.selectfromList = arr;
|
||||
}
|
||||
// const arr = [];
|
||||
//
|
||||
// if (res.data.selectfromList && res.data.selectfromList.length > 0) {
|
||||
// res.data.selectfromList.forEach((item) => {
|
||||
// arr.push(item.itemCode);
|
||||
// });
|
||||
//
|
||||
// res.data.selectfromList = arr;
|
||||
// }
|
||||
|
||||
form.setFieldsValue(res.data);
|
||||
});
|
||||
|
|
@ -320,19 +333,19 @@ function AddModalComponent(props) {
|
|||
props.onCancel();
|
||||
};
|
||||
const onSubmit = async (values) => {
|
||||
const arr = [];
|
||||
|
||||
values.selectfromList.forEach((item) => {
|
||||
selectfromData.forEach((row) => {
|
||||
if (item === row.dictValue) {
|
||||
arr.push({
|
||||
itemName: row.dictLabel,
|
||||
itemCode: row.dictValue,
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
values.selectfromList = arr;
|
||||
// const arr = [];
|
||||
//
|
||||
// values.selectfromList.forEach((item) => {
|
||||
// selectfromData.forEach((row) => {
|
||||
// if (item === row.dictValue) {
|
||||
// arr.push({
|
||||
// itemName: row.dictLabel,
|
||||
// itemCode: row.dictValue,
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// values.selectfromList = arr;
|
||||
|
||||
if (props.currentId) {
|
||||
values.id = props.currentId;
|
||||
|
|
@ -408,6 +421,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
@ -420,15 +434,20 @@ function AddModalComponent(props) {
|
|||
form={form}
|
||||
span={24}
|
||||
|
||||
confirmLoading={props.loading}
|
||||
loading={props.loading}
|
||||
options={[
|
||||
{
|
||||
name: "corpName",
|
||||
label: "企业名称",
|
||||
required: !props.currentId,
|
||||
componentProps: {
|
||||
disabled: props.currentId,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "code",
|
||||
label: "统一社会信用代码",
|
||||
required: false,
|
||||
rules: [
|
||||
{
|
||||
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
|
||||
|
|
@ -436,45 +455,48 @@ function AddModalComponent(props) {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "ecoType",
|
||||
label: "经济类型",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="ECO_TYPE"
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("ecoTypeName", label);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "ecoTypeName",
|
||||
label: "经济类型名称",
|
||||
onlyForLabel: true,
|
||||
},
|
||||
// {
|
||||
// name: "ecoType",
|
||||
// label: "经济类型",
|
||||
// render: (
|
||||
// <DictionarySelect
|
||||
// dictValue="ECO_TYPE"
|
||||
// onGetLabel={(label) => {
|
||||
// form.setFieldValue("ecoTypeName", label);
|
||||
// }}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
// {
|
||||
// name: "ecoTypeName",
|
||||
// label: "经济类型名称",
|
||||
// onlyForLabel: true,
|
||||
// },
|
||||
{
|
||||
name: "type",
|
||||
label: "相关方类型",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_TYPE,
|
||||
componentProps: {
|
||||
disabled: props.currentId,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "selectfromList",
|
||||
label: "选取形式",
|
||||
|
||||
render: (
|
||||
<DictionarySelect
|
||||
mode="multiple"
|
||||
dictValue="select_from_List"
|
||||
|
||||
onGetData={(data) => {
|
||||
setSelectfromData(data);
|
||||
}}
|
||||
|
||||
/>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// name: "selectfromList",
|
||||
// label: "选取形式",
|
||||
//
|
||||
// render: (
|
||||
// <DictionarySelect
|
||||
// mode="multiple"
|
||||
// dictValue="select_from_List"
|
||||
//
|
||||
// onGetData={(data) => {
|
||||
// setSelectfromData(data);
|
||||
// }}
|
||||
//
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
]}
|
||||
labelCol={{
|
||||
span: 10,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
|||
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
||||
import { getAreaNamePath, getCorpTypeNamePath } from "~/utils";
|
||||
|
||||
const ENTERPRISE_TYPE = [
|
||||
{
|
||||
|
|
@ -42,14 +41,14 @@ function View(props) {
|
|||
const res = await props.corpInfoDetails({
|
||||
id: queryParams["id"],
|
||||
});
|
||||
const arr = [];
|
||||
|
||||
res.data.selectfromList && res.data.selectfromList.forEach((item) => {
|
||||
arr.push(item.itemName);
|
||||
});
|
||||
if (arr.length > 0) {
|
||||
res.data.selectfromList = arr.join(",");
|
||||
}
|
||||
// const arr = [];
|
||||
//
|
||||
// res.data.selectfromList && res.data.selectfromList.forEach((item) => {
|
||||
// arr.push(item.itemName);
|
||||
// });
|
||||
// if (arr.length > 0) {
|
||||
// res.data.selectfromList = arr.join(",");
|
||||
// }
|
||||
|
||||
const licenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
|
||||
|
|
@ -102,34 +101,41 @@ function View(props) {
|
|||
label: "统一社会信用代码",
|
||||
children: info.code,
|
||||
},
|
||||
{
|
||||
label: "开户银行",
|
||||
children: info.depositBank,
|
||||
},
|
||||
{
|
||||
label: "开户银行账号",
|
||||
children: info.depositBankAccount,
|
||||
},
|
||||
// {
|
||||
// label: "属地",
|
||||
// children: <div>{getAreaNamePath(info)}</div>,
|
||||
// },
|
||||
|
||||
{
|
||||
label: "属地",
|
||||
children: <div>{getAreaNamePath(info)}</div>,
|
||||
},
|
||||
// {
|
||||
// label: "所属行业",
|
||||
// children: <div>{getCorpTypeNamePath(info)}</div>,
|
||||
// },
|
||||
|
||||
{
|
||||
label: "所属行业",
|
||||
children: <div>{getCorpTypeNamePath(info)}</div>,
|
||||
},
|
||||
|
||||
{
|
||||
label: "经济类型",
|
||||
children: info.ecoTypeName,
|
||||
},
|
||||
{
|
||||
label: "经度/纬度",
|
||||
children: info.longitude && `${info.longitude}/${info.latitude}`,
|
||||
},
|
||||
// {
|
||||
// label: "经济类型",
|
||||
// children: info.ecoTypeName,
|
||||
// },
|
||||
// {
|
||||
// label: "经度/纬度",
|
||||
// children: info.longitude && `${info.longitude}/${info.latitude}`,
|
||||
// },
|
||||
|
||||
{
|
||||
label: "单位经营地址",
|
||||
children: info.addressBusiness,
|
||||
},
|
||||
{
|
||||
label: "企业规模",
|
||||
children: info.scaleName,
|
||||
},
|
||||
// {
|
||||
// label: "企业规模",
|
||||
// children: info.scaleName,
|
||||
// },
|
||||
|
||||
{
|
||||
label: "法定代表人",
|
||||
|
|
@ -189,10 +195,10 @@ function View(props) {
|
|||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "成立日期",
|
||||
children: info.createDate,
|
||||
},
|
||||
// {
|
||||
// label: "成立日期",
|
||||
// children: info.createDate,
|
||||
// },
|
||||
{
|
||||
label: "职工人数(人)",
|
||||
children: info.employees,
|
||||
|
|
@ -202,15 +208,31 @@ function View(props) {
|
|||
// children: info.areaCovered,
|
||||
// },
|
||||
|
||||
{
|
||||
label: "注册资金(万元)",
|
||||
children: info.regcapital,
|
||||
},
|
||||
{
|
||||
label: "资产总额(万元)",
|
||||
children: info.totalAssets,
|
||||
},
|
||||
// {
|
||||
// label: "注册资金(万元)",
|
||||
// children: info.regcapital,
|
||||
// },
|
||||
// {
|
||||
// label: "资产总额(万元)",
|
||||
// children: info.totalAssets,
|
||||
// },
|
||||
|
||||
|
||||
{
|
||||
label: "相关方类型",
|
||||
children: getLabelName({
|
||||
status: info.type,
|
||||
list: ENTERPRISE_TYPE,
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: "创建单位",
|
||||
children: info.tenantName,
|
||||
},
|
||||
{
|
||||
label: "经营范围",
|
||||
children: info.natureBusiness,
|
||||
},
|
||||
{
|
||||
label: "企业二维码",
|
||||
children: (
|
||||
|
|
@ -224,21 +246,10 @@ function View(props) {
|
|||
</Button>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "相关方类型",
|
||||
children: getLabelName({
|
||||
status: info.type,
|
||||
list: ENTERPRISE_TYPE,
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: "创建单位",
|
||||
children: info.createName,
|
||||
},
|
||||
{
|
||||
label: "选取形式",
|
||||
children: info.selectfromList,
|
||||
},
|
||||
// {
|
||||
// label: "选取形式",
|
||||
// children: info.selectfromList,
|
||||
// },
|
||||
]}
|
||||
column={2}
|
||||
loding={getFileLoading}
|
||||
|
|
@ -255,16 +266,16 @@ function View(props) {
|
|||
label: "营业执照",
|
||||
children: <PreviewImg files={info.licenseFile} />,
|
||||
},
|
||||
{
|
||||
label: "营业执照有效期",
|
||||
children: info.licenseStart ? ` ${info.licenseStart} 至 ${info.licenseEnd}` : "",
|
||||
},
|
||||
// {
|
||||
// label: "营业执照有效期",
|
||||
// children: info.licenseStart ? ` ${info.licenseStart} 至 ${info.licenseEnd}` : "",
|
||||
// },
|
||||
]}
|
||||
column={2}
|
||||
column={1}
|
||||
labelStyle={{
|
||||
width: 200,
|
||||
width: 185,
|
||||
}}
|
||||
contentStyle={{ width: "40%" }}
|
||||
|
||||
/>
|
||||
</Page>
|
||||
{corpInfoQrCodeOpen && (
|
||||
|
|
@ -277,6 +288,7 @@ function View(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
@ -325,6 +337,7 @@ const CorpInfoQrCode = (props) => {
|
|||
return (
|
||||
<Modal
|
||||
open={props.open}
|
||||
maskClosable={false}
|
||||
title="企业二维码"
|
||||
footer={[
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -37,58 +37,58 @@ function List(props) {
|
|||
return {
|
||||
...formData,
|
||||
enterpriseType: 3,
|
||||
eqProvince: formData.cityRecord?.[0],
|
||||
eqCity: formData.cityRecord?.[1],
|
||||
eqCountry: formData.cityRecord?.[2],
|
||||
eqStreet: formData.cityRecord?.[3],
|
||||
eqVillage: formData.cityRecord?.[4],
|
||||
// eqProvince: formData.cityRecord?.[0],
|
||||
// eqCity: formData.cityRecord?.[1],
|
||||
// eqCountry: formData.cityRecord?.[2],
|
||||
// eqStreet: formData.cityRecord?.[3],
|
||||
// eqVillage: formData.cityRecord?.[4],
|
||||
};
|
||||
},
|
||||
});
|
||||
const onFinish = async () => {
|
||||
// 处理属地查询
|
||||
const arr = [];
|
||||
cityData.forEach((item) => {
|
||||
arr.push(item.value);
|
||||
});
|
||||
form.setFieldValue("cityRecord", arr);
|
||||
getData();
|
||||
};
|
||||
// const onFinish = async () => {
|
||||
// // 处理属地查询
|
||||
// const arr = [];
|
||||
// cityData.forEach((item) => {
|
||||
// arr.push(item.value);
|
||||
// });
|
||||
// form.setFieldValue("cityRecord", arr);
|
||||
// getData();
|
||||
// };
|
||||
|
||||
const onReset = () => {
|
||||
setCityData([]);
|
||||
|
||||
form.setFieldValue("cityRecord", []);
|
||||
};
|
||||
// const onReset = () => {
|
||||
// setCityData([]);
|
||||
//
|
||||
// form.setFieldValue("cityRecord", []);
|
||||
// };
|
||||
return (
|
||||
<div>
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
form={form}
|
||||
onFinish={() => onFinish()}
|
||||
onReset={onReset}
|
||||
onFinish={getData}
|
||||
// onReset={onReset}
|
||||
options={[
|
||||
{
|
||||
name: "likeCorpName",
|
||||
label: "企业名称",
|
||||
},
|
||||
{
|
||||
name: "cityData",
|
||||
label: "属地",
|
||||
render: (
|
||||
<AreaSelect
|
||||
onGetNodePaths={nodes =>
|
||||
setCityData(nodes)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// name: "cityData",
|
||||
// label: "属地",
|
||||
// render: (
|
||||
// <AreaSelect
|
||||
// onGetNodePaths={nodes =>
|
||||
// setCityData(nodes)}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
{ name: "eqType", label: "相关方类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_TYPE },
|
||||
{
|
||||
name: "cityRecord",
|
||||
label: "属地",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
onlyForLabel: true,
|
||||
},
|
||||
// {
|
||||
// name: "cityRecord",
|
||||
// label: "属地",
|
||||
// render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
// onlyForLabel: true,
|
||||
// },
|
||||
]}
|
||||
/>
|
||||
<Table
|
||||
|
|
@ -109,13 +109,13 @@ function List(props) {
|
|||
),
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: "属地",
|
||||
dataIndex: "cityName",
|
||||
render: (_, record) => (
|
||||
<div>{getAreaNamePath(record)}</div>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// title: "属地",
|
||||
// dataIndex: "cityName",
|
||||
// render: (_, record) => (
|
||||
// <div>{getAreaNamePath(record)}</div>
|
||||
// ),
|
||||
// },
|
||||
{
|
||||
title: "创建单位",
|
||||
dataIndex: "tenantName",
|
||||
|
|
|
|||
|
|
@ -1,20 +1,17 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, Input, message, Modal, Space } from "antd";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import LeftTree from "zy-react-library/components/LeftTree/Department/Gwj/index";
|
||||
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
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 XgfUserInfo from "~/components/XgfUserInfo";
|
||||
import { NS_USER } from "~/enumerate/namespace";
|
||||
import { UseDecodeIdCard } from "~/utils";
|
||||
|
||||
const FLOW_USER_TYPE = [
|
||||
{
|
||||
|
|
@ -47,7 +44,7 @@ function List(props) {
|
|||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定要重置密码为Aa@12345678吗?",
|
||||
content: "确定要重置密码为Cc@12345678吗?",
|
||||
onOk: () => {
|
||||
props["userChangePassword"]({
|
||||
id,
|
||||
|
|
@ -133,9 +130,9 @@ function List(props) {
|
|||
},
|
||||
{
|
||||
title: "人员类型",
|
||||
dataIndex: "employmentFlag",
|
||||
dataIndex: "flowFlag",
|
||||
render: (_, record) => (
|
||||
<div>{record.employmentFlag === 0 ? "非流动人员" : record.employmentFlag === 1 ? "流动人员" : ""}</div>
|
||||
<div>{record.flowFlag === 0 ? "非流动人员" : record.flowFlag === 1 ? "流动人员" : ""}</div>
|
||||
),
|
||||
},
|
||||
|
||||
|
|
@ -177,12 +174,12 @@ function List(props) {
|
|||
</div>
|
||||
</div>
|
||||
{addModalOpen && (
|
||||
<AddModal
|
||||
<XgfUserInfo
|
||||
open={addModalOpen}
|
||||
getData={getData}
|
||||
currentId={currentId}
|
||||
requestDetails={props["userDetails"]}
|
||||
requwstRolesAll={props["authRolesAll"]}
|
||||
requwstRolesAll={props["rolesAll"]}
|
||||
requestGetEncryInfo={props["getEncryInfo"]}
|
||||
onCancel={() => {
|
||||
setAddModalOpen(false);
|
||||
|
|
@ -195,233 +192,4 @@ function List(props) {
|
|||
);
|
||||
}
|
||||
|
||||
function AddModalComponent(props) {
|
||||
const [form] = Form.useForm();
|
||||
const [info, setInfo] = useState({});
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||
const [viewType, setViewType] = useState(false);
|
||||
const [viewData, setViewData] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (props.currentId) {
|
||||
const fetchData = async () => {
|
||||
const res = await props.requestDetails({
|
||||
id: props.currentId,
|
||||
});
|
||||
const userImg = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
const cardImg = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
res.data.userImg = userImg;
|
||||
res.data.cardImg = cardImg;
|
||||
setInfo(res.data);
|
||||
};
|
||||
fetchData();
|
||||
}
|
||||
}, [props.currentId]);
|
||||
const onCancel = () => {
|
||||
form.resetFields();
|
||||
props.onCancel();
|
||||
};
|
||||
const handleOk = async () => {
|
||||
const values = await form.validateFields();
|
||||
|
||||
const { data } = await props.requestGetEncryInfo({ id: props.currentId, password: values.password });
|
||||
if (data) {
|
||||
if (viewType === "phone") {
|
||||
setViewData(data.phone);
|
||||
}
|
||||
else {
|
||||
setViewData(data.userIdCard);
|
||||
}
|
||||
}
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
open={props.open}
|
||||
title="查看"
|
||||
width={1200}
|
||||
cancelText="关闭"
|
||||
okButtonProps={{
|
||||
style: {
|
||||
display: "none",
|
||||
},
|
||||
}}
|
||||
onOk={form.submit}
|
||||
onCancel={onCancel}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
padding: 20,
|
||||
}}
|
||||
>
|
||||
<Descriptions
|
||||
bordered
|
||||
items={[
|
||||
{
|
||||
label: "人脸照片",
|
||||
children: <PreviewImg files={info.userImg} />,
|
||||
},
|
||||
{
|
||||
label: "身份证照片",
|
||||
children: <PreviewImg files={info.cardImg} />,
|
||||
},
|
||||
// {
|
||||
// label: "用户角色",
|
||||
// children: getLabelName({
|
||||
// status: info.roleId,
|
||||
// list: rolesData,
|
||||
// idKey: "id",
|
||||
// nameKey: "roleName",
|
||||
// }),
|
||||
// },
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
},
|
||||
{
|
||||
label: "性别",
|
||||
children: info.sex,
|
||||
},
|
||||
|
||||
{
|
||||
label: "出生年月",
|
||||
children: info.birthday,
|
||||
},
|
||||
{
|
||||
label: "年龄",
|
||||
children: info.age,
|
||||
},
|
||||
{
|
||||
label: "手机号",
|
||||
children: (
|
||||
<div>
|
||||
|
||||
{info.phone}
|
||||
{/* {info.phone */}
|
||||
{/* && ( */}
|
||||
{/* <Button */}
|
||||
{/* type="link" */}
|
||||
{/* onClick={() => { */}
|
||||
{/* setIsModalOpen(true); */}
|
||||
{/* setViewType("phone"); */}
|
||||
{/* setViewData(""); */}
|
||||
{/* form.resetFields(); */}
|
||||
{/* }} */}
|
||||
{/* > */}
|
||||
{/* 点击查看 */}
|
||||
{/* </Button> */}
|
||||
{/* )} */}
|
||||
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "身份证号",
|
||||
children: (
|
||||
<div>
|
||||
{UseDecodeIdCard(info.userIdCard) }
|
||||
{/* { info.userIdCard */}
|
||||
{/* && ( */}
|
||||
{/* <Button */}
|
||||
{/* type="link" */}
|
||||
{/* onClick={() => { */}
|
||||
{/* setIsModalOpen(true); */}
|
||||
{/* setViewType("userIdCard"); */}
|
||||
{/* form.resetFields(); */}
|
||||
{/* setViewData(""); */}
|
||||
{/* }} */}
|
||||
{/* > */}
|
||||
{/* 点击查看 */}
|
||||
{/* </Button> */}
|
||||
{/* )} */}
|
||||
</div>
|
||||
),
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
label: "民族",
|
||||
children: info.nationName,
|
||||
},
|
||||
{
|
||||
label: "婚姻状况",
|
||||
children: info.maritalStatusName,
|
||||
},
|
||||
{
|
||||
label: "政治面貌",
|
||||
children: info.politicalAffiliationName,
|
||||
},
|
||||
{
|
||||
label: "户口所在地",
|
||||
children: info.locationAddress,
|
||||
},
|
||||
{
|
||||
label: "现住址",
|
||||
children: info.currentAddress,
|
||||
},
|
||||
{
|
||||
label: "文化程度",
|
||||
children: info.culturalLevelName,
|
||||
},
|
||||
{
|
||||
label: "岗位名称",
|
||||
children: info.postName,
|
||||
},
|
||||
]}
|
||||
column={2}
|
||||
labelStyle={{
|
||||
width: 200,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
onCancel={() => setIsModalOpen(false)}
|
||||
>
|
||||
<Form
|
||||
name="basic"
|
||||
form={form}
|
||||
>
|
||||
<Form.Item
|
||||
label="请输入登录密码"
|
||||
name="password"
|
||||
hidden={
|
||||
viewData
|
||||
}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="手机号"
|
||||
hidden={!(viewType === "phone" && viewData)}
|
||||
>
|
||||
{viewData}
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="身份证号"
|
||||
hidden={!(viewType === "userIdCard" && viewData)}
|
||||
>
|
||||
{viewData}
|
||||
</Form.Item>
|
||||
|
||||
</Form>
|
||||
</Modal>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
const AddModal = AddModalComponent;
|
||||
export default Connect([NS_USER], true)(Permission(List));
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ function Add(props) {
|
|||
values={{
|
||||
departmentLeaderFlag: 0,
|
||||
}}
|
||||
confirmLoading={uploadFileLoading || props.user.userLoading}
|
||||
loading={uploadFileLoading || props.user.userLoading}
|
||||
options={[
|
||||
{
|
||||
name: "roleId",
|
||||
|
|
@ -322,6 +322,10 @@ function Add(props) {
|
|||
{
|
||||
name: "name",
|
||||
label: "姓名",
|
||||
componentProps: {
|
||||
maxLength: 20,
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -379,7 +383,7 @@ function Add(props) {
|
|||
fontSize: 12,
|
||||
}}
|
||||
>
|
||||
<div>* 图像格式:JPG、JPEG、PNG</div>
|
||||
<div>* 图像格式:jpg、jpeg、png</div>
|
||||
<div>* 图像大小:不超过4M。</div>
|
||||
<div>* 照片大小: 推荐 500*500</div>
|
||||
<div>* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图</div>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ function List(props) {
|
|||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定要重置密码为Aa@12345678吗?",
|
||||
content: "确定要重置密码为Bb@12345678吗?",
|
||||
onOk: () => {
|
||||
props["userChangePassword"]({
|
||||
id,
|
||||
|
|
@ -341,11 +341,16 @@ function AddModalComponent(props) {
|
|||
const res = await props.requestDetails({
|
||||
id: props.currentId,
|
||||
});
|
||||
res.data.userAvatarUrl = [
|
||||
{
|
||||
filePath: res.data.userAvatarUrl,
|
||||
},
|
||||
];
|
||||
if (res.data && res.data.userAvatarUrl) {
|
||||
res.data.userAvatarUrl = [
|
||||
{
|
||||
filePath: res.data.userAvatarUrl,
|
||||
},
|
||||
];
|
||||
}
|
||||
else {
|
||||
res.data.userAvatarUrl = [];
|
||||
}
|
||||
|
||||
setInfo(res.data);
|
||||
};
|
||||
|
|
@ -372,6 +377,7 @@ function AddModalComponent(props) {
|
|||
return (
|
||||
<>
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
cancelText="关闭"
|
||||
|
|
@ -411,7 +417,11 @@ function AddModalComponent(props) {
|
|||
children: info.postName,
|
||||
},
|
||||
{
|
||||
label: "用户名(手机号)",
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
},
|
||||
{
|
||||
label: "手机号",
|
||||
children: (
|
||||
<div>
|
||||
|
||||
|
|
@ -434,11 +444,6 @@ function AddModalComponent(props) {
|
|||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
},
|
||||
|
||||
{
|
||||
label: "人员类型",
|
||||
children: info.personnelTypeName,
|
||||
|
|
@ -507,6 +512,7 @@ function AddModalComponent(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
@ -168,6 +169,7 @@ function AddModalComponent(props) {
|
|||
function PreviewModalComponent(props) {
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="预览"
|
||||
footer={[
|
||||
|
|
|
|||
|
|
@ -3,12 +3,8 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { Button, Form, message, Modal, QRCode } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Map from "zy-react-library/components/Map";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import AreaSelect from "zy-react-library/components/SelectTree/Area";
|
||||
|
||||
import DictionarySelect from "zy-react-library/components/SelectTree/Dictionary";
|
||||
import IndustrySelect from "zy-react-library/components/SelectTree/Industry";
|
||||
import Upload from "zy-react-library/components/Upload";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
|
|
@ -20,50 +16,52 @@ import {
|
|||
PHONE,
|
||||
UNIFIED_SOCIAL_CREDIT_CODE,
|
||||
} from "zy-react-library/regular";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
||||
import { useDebounce } from "~/utils";
|
||||
|
||||
const REQUIRED_FIELDS = [
|
||||
"corpName",
|
||||
"code",
|
||||
"province",
|
||||
"ecoType",
|
||||
// "province",
|
||||
// "ecoType",
|
||||
"addressBusiness",
|
||||
"scale",
|
||||
// "scale",
|
||||
"lrName",
|
||||
"lrMobile",
|
||||
"contacts",
|
||||
"contactsPhone",
|
||||
"createDate",
|
||||
// "createDate",
|
||||
"employees",
|
||||
"regcapital",
|
||||
"totalAssets",
|
||||
"licenseStart",
|
||||
"licenseEnd",
|
||||
];
|
||||
const ENTERPRISE_STATUS = [
|
||||
{
|
||||
bianma: "filialstate01",
|
||||
name: "在产",
|
||||
},
|
||||
{
|
||||
bianma: "filialstate02",
|
||||
name: "在建",
|
||||
},
|
||||
{
|
||||
bianma: "filialstate03",
|
||||
name: "代建",
|
||||
},
|
||||
{
|
||||
bianma: "filialstate04",
|
||||
name: "停产",
|
||||
},
|
||||
{
|
||||
bianma: "filialstate05",
|
||||
name: "破产",
|
||||
},
|
||||
"depositBank",
|
||||
"depositBankAccount",
|
||||
"natureBusiness",
|
||||
// "regcapital",
|
||||
// "totalAssets",
|
||||
// "licenseStart",
|
||||
// "licenseEnd",
|
||||
];
|
||||
// const ENTERPRISE_STATUS = [
|
||||
// {
|
||||
// bianma: "filialstate01",
|
||||
// name: "在产",
|
||||
// },
|
||||
// {
|
||||
// bianma: "filialstate02",
|
||||
// name: "在建",
|
||||
// },
|
||||
// {
|
||||
// bianma: "filialstate03",
|
||||
// name: "代建",
|
||||
// },
|
||||
// {
|
||||
// bianma: "filialstate04",
|
||||
// name: "停产",
|
||||
// },
|
||||
// {
|
||||
// bianma: "filialstate05",
|
||||
// name: "破产",
|
||||
// },
|
||||
// ];
|
||||
// const WHETHER_ENUM = [
|
||||
// {
|
||||
// bianma: 1,
|
||||
|
|
@ -91,13 +89,14 @@ function CorpInfo(props) {
|
|||
const [canShowQrCode, setCanShowQrCode] = useState(false);
|
||||
|
||||
const [keyId, setKeyId] = useState({});
|
||||
const [scaleData, setScaleData] = useState([]);
|
||||
const [ecoTypeData, setEcoTypeData] = useState([]);
|
||||
const [industryData, setIndustryData] = useState([]);
|
||||
const [cityData, setCityData] = useState([]);
|
||||
// const [scaleData, setScaleData] = useState([]);
|
||||
// const [ecoTypeData, setEcoTypeData] = useState([]);
|
||||
// const [industryData, setIndustryData] = useState([]);
|
||||
// const [cityData, setCityData] = useState([]);
|
||||
const [info, setInfoData] = useState([]);
|
||||
const [codeValue, setCodeValue] = useState("");
|
||||
const [corpNameValue, setCorpNameValue] = useState("");
|
||||
const [corpinfoId, setCorpInfoId] = useState("");
|
||||
const debouncedCode = useDebounce(codeValue, 600);
|
||||
const debouncedCorpName = useDebounce(corpNameValue, 600);
|
||||
function getLastValidCorpTypeName(item) {
|
||||
|
|
@ -119,45 +118,48 @@ function CorpInfo(props) {
|
|||
// 全为空则返回空字符串或默认值
|
||||
return "";
|
||||
}
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
const res = await props["userGetInfo"]();
|
||||
const { data } = await props["corpInfoDetails"]({
|
||||
id: res.data.corpinfoId,
|
||||
});
|
||||
// data.lrMobile = data.lrMobile && data.lrMobile.label;
|
||||
// data.contactsPhone = data.contactsPhone && data.contactsPhone.label;
|
||||
const fetchData = async () => {
|
||||
const res = await props["userGetInfo"]();
|
||||
const { data } = await props["corpInfoDetails"]({
|
||||
id: res.data.corpinfoId,
|
||||
});
|
||||
// data.lrMobile = data.lrMobile && data.lrMobile.label;
|
||||
// data.contactsPhone = data.contactsPhone && data.contactsPhone.label;
|
||||
|
||||
data.region = data.village || data.street || data.country || data.city || data.province;
|
||||
setInfoData(data);
|
||||
setKeyId({
|
||||
id: res.data.corpinfoId,
|
||||
corpinfoId: res.data.userId,
|
||||
});
|
||||
const licenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
|
||||
eqForeignKey: res.data.userId ? res.data.userId : "",
|
||||
});
|
||||
data.INDUSTRYALL = getLastValidCorpTypeName(data);
|
||||
data.license = [data.licenseStart, data.licenseEnd];
|
||||
data.scaleType = data.scaleType ?? 0;
|
||||
// data.region = data.village || data.street || data.country || data.city || data.province;
|
||||
setInfoData(data);
|
||||
setCorpInfoId(res.data.corpinfoId);
|
||||
setKeyId({
|
||||
id: res.data.corpinfoId,
|
||||
corpinfoId: res.data.userId,
|
||||
});
|
||||
const licenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
|
||||
eqForeignKey: res.data.userId ? res.data.userId : "",
|
||||
});
|
||||
data.INDUSTRYALL = getLastValidCorpTypeName(data);
|
||||
// data.license = [data.licenseStart, data.licenseEnd];
|
||||
data.scaleType = data.scaleType ?? 0;
|
||||
|
||||
const hasLicenseFile = Array.isArray(licenseFile) && licenseFile.length > 0;
|
||||
const hasLicenseFile = Array.isArray(licenseFile) && licenseFile.length > 0;
|
||||
|
||||
const allRequiredFilled = REQUIRED_FIELDS.every((field) => {
|
||||
const val = data[field];
|
||||
return val != null && val !== "" && !(typeof val === "number");
|
||||
});
|
||||
setCanShowQrCode(allRequiredFilled && hasLicenseFile);
|
||||
const allRequiredFilled = REQUIRED_FIELDS.every((field) => {
|
||||
const val = data[field];
|
||||
// 允许0值,但排除null、undefined和空字符串
|
||||
return val != null && val !== "";
|
||||
});
|
||||
|
||||
const values = {
|
||||
licenseFile,
|
||||
...data,
|
||||
};
|
||||
form.setFieldsValue({
|
||||
...values,
|
||||
});
|
||||
setCanShowQrCode(allRequiredFilled && hasLicenseFile);
|
||||
|
||||
const values = {
|
||||
licenseFile,
|
||||
...data,
|
||||
};
|
||||
form.setFieldsValue({
|
||||
...values,
|
||||
});
|
||||
};
|
||||
useEffect(() => {
|
||||
fetchData();
|
||||
}, []);
|
||||
const onSubmit = async (values) => {
|
||||
|
|
@ -165,46 +167,46 @@ function CorpInfo(props) {
|
|||
single: false,
|
||||
files: deleteHiddenImageFiles,
|
||||
});
|
||||
values.ecoTypeName = getLabelName({
|
||||
status: values.ecoType,
|
||||
list: ecoTypeData,
|
||||
idKey: "dictValue",
|
||||
nameKey: "dictLabel",
|
||||
});
|
||||
values.scaleName = getLabelName({
|
||||
status: values.scale,
|
||||
list: scaleData,
|
||||
idKey: "dictValue",
|
||||
nameKey: "dictLabel",
|
||||
});
|
||||
values.corpStateName = getLabelName({
|
||||
status: values.corpState,
|
||||
list: ENTERPRISE_STATUS,
|
||||
// values.ecoTypeName = getLabelName({
|
||||
// status: values.ecoType,
|
||||
// list: ecoTypeData,
|
||||
// idKey: "dictValue",
|
||||
// nameKey: "dictLabel",
|
||||
// });
|
||||
// values.scaleName = getLabelName({
|
||||
// status: values.scale,
|
||||
// list: scaleData,
|
||||
// idKey: "dictValue",
|
||||
// nameKey: "dictLabel",
|
||||
// });
|
||||
// values.corpStateName = getLabelName({
|
||||
// status: values.corpState,
|
||||
// list: ENTERPRISE_STATUS,
|
||||
//
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
if (cityData.length > 0) {
|
||||
values.province = cityData[0].value;
|
||||
values.provinceName = cityData[0].label;
|
||||
values.city = cityData[1] && cityData[1].value;
|
||||
values.cityName = cityData[1] && cityData[1].label;
|
||||
values.country = cityData[2] && cityData[2].value;
|
||||
values.countryName = cityData[2] && cityData[2].label;
|
||||
values.street = cityData[3] && cityData[3].value;
|
||||
values.streetName = cityData[3] && cityData[3].label;
|
||||
values.village = cityData[4] && cityData[4].value;
|
||||
values.villageName = cityData[4] && cityData[4].label;
|
||||
}
|
||||
if (industryData.length > 0) {
|
||||
values.corpType = industryData[0].dict_value;
|
||||
values.corpTypeName = industryData[0].dict_label;
|
||||
values.corpType2 = industryData[1] && industryData[1].dict_value;
|
||||
values.corpType2Name = industryData[1] && industryData[1].dict_label;
|
||||
values.corpType3 = industryData[2] && industryData[2].dict_value;
|
||||
values.corpType3Name = industryData[2] && industryData[2].dict_label;
|
||||
values.corpType4 = industryData[3] && industryData[3].dict_value;
|
||||
values.corpType4Name = industryData[3] && industryData[3].dict_label;
|
||||
}
|
||||
// if (cityData.length > 0) {
|
||||
// values.province = cityData[0].value;
|
||||
// values.provinceName = cityData[0].label;
|
||||
// values.city = cityData[1] && cityData[1].value;
|
||||
// values.cityName = cityData[1] && cityData[1].label;
|
||||
// values.country = cityData[2] && cityData[2].value;
|
||||
// values.countryName = cityData[2] && cityData[2].label;
|
||||
// values.street = cityData[3] && cityData[3].value;
|
||||
// values.streetName = cityData[3] && cityData[3].label;
|
||||
// values.village = cityData[4] && cityData[4].value;
|
||||
// values.villageName = cityData[4] && cityData[4].label;
|
||||
// }
|
||||
// if (industryData.length > 0) {
|
||||
// values.corpType = industryData[0].dict_value;
|
||||
// values.corpTypeName = industryData[0].dict_label;
|
||||
// values.corpType2 = industryData[1] && industryData[1].dict_value;
|
||||
// values.corpType2Name = industryData[1] && industryData[1].dict_label;
|
||||
// values.corpType3 = industryData[2] && industryData[2].dict_value;
|
||||
// values.corpType3Name = industryData[2] && industryData[2].dict_label;
|
||||
// values.corpType4 = industryData[3] && industryData[3].dict_value;
|
||||
// values.corpType4Name = industryData[3] && industryData[3].dict_label;
|
||||
// }
|
||||
await uploadFile({
|
||||
single: false,
|
||||
files: values.licenseFile,
|
||||
|
|
@ -215,13 +217,21 @@ function CorpInfo(props) {
|
|||
});
|
||||
values.corpinfoId = keyId.corpinfoId;
|
||||
values.id = keyId.id;
|
||||
values.licenseStart = values.license[0];
|
||||
values.licenseEnd = values.license[1];
|
||||
// values.licenseStart = values.license[0];
|
||||
// values.licenseEnd = values.license[1];
|
||||
delete values.license;
|
||||
props["corpInfoEdit"](values).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("操作成功!");
|
||||
window.location.reload();
|
||||
props["corpInfoDetails"]({
|
||||
id: corpinfoId,
|
||||
}).then((res) => {
|
||||
// res.data.region = res.data.village || res.data.street || res.data.country || res.data.city || res.data.province;
|
||||
setInfoData(res.data);
|
||||
fetchData();
|
||||
});
|
||||
// data.lrMobile = data.lrMobile && data.lrMobile.label;
|
||||
// data.contactsPhone = data.contactsPhone && data.contactsPhone.label;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -289,7 +299,7 @@ function CorpInfo(props) {
|
|||
<FormBuilder
|
||||
showCancelButton={false}
|
||||
form={form}
|
||||
confirmLoading={
|
||||
loading={
|
||||
deleteFileLoading
|
||||
|| uploadFileLoading
|
||||
|| getFileLoading
|
||||
|
|
@ -326,32 +336,42 @@ function CorpInfo(props) {
|
|||
message: "请输入正确的统一社会信用代码",
|
||||
},
|
||||
],
|
||||
componentProps: {
|
||||
disabled: true,
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
label: "属地",
|
||||
name: "region",
|
||||
render: (
|
||||
<AreaSelect
|
||||
onGetNodePaths={nodes =>
|
||||
setCityData(nodes)}
|
||||
/>
|
||||
),
|
||||
label: "单位经营地址",
|
||||
name: "addressBusiness",
|
||||
},
|
||||
{
|
||||
label: "所属行业",
|
||||
name: "INDUSTRYALL",
|
||||
required: false,
|
||||
render: (
|
||||
<IndustrySelect
|
||||
onGetNodePaths={(data) => {
|
||||
setIndustryData(data);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
name: "depositBank",
|
||||
label: "开户银行",
|
||||
},
|
||||
{
|
||||
name: "depositBankAccount",
|
||||
label: "开户银行账号",
|
||||
},
|
||||
// {
|
||||
// label: "属地",
|
||||
// name: "region",
|
||||
// render: (
|
||||
// <AreaSelect
|
||||
// onGetNodePaths={nodes =>
|
||||
// setCityData(nodes)}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
// {
|
||||
// label: "所属行业",
|
||||
// name: "INDUSTRYALL",
|
||||
// required: false,
|
||||
// render: (
|
||||
// <IndustrySelect
|
||||
// onGetNodePaths={(data) => {
|
||||
// setIndustryData(data);
|
||||
// }}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
|
||||
// {
|
||||
// label: "企业状态",
|
||||
|
|
@ -363,42 +383,39 @@ function CorpInfo(props) {
|
|||
// disabled: true,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
label: "经济类型",
|
||||
name: "ecoType",
|
||||
required: false,
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="ECO_TYPE"
|
||||
onGetData={(data) => {
|
||||
setEcoTypeData(data);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "map",
|
||||
customizeRender: true,
|
||||
render: <Map required={false} />,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
label: "企事业单位经营地址",
|
||||
name: "addressBusiness",
|
||||
},
|
||||
{
|
||||
label: "企业规模",
|
||||
name: "scale",
|
||||
// {
|
||||
// label: "经济类型",
|
||||
// name: "ecoType",
|
||||
// required: false,
|
||||
// render: (
|
||||
// <DictionarySelect
|
||||
// dictValue="ECO_TYPE"
|
||||
// onGetData={(data) => {
|
||||
// setEcoTypeData(data);
|
||||
// }}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
// {
|
||||
// name: "map",
|
||||
// customizeRender: true,
|
||||
// render: <Map required={false} />,
|
||||
// span: 24,
|
||||
// },
|
||||
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="scale"
|
||||
onGetData={(data) => {
|
||||
setScaleData(data);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// label: "企业规模",
|
||||
// name: "scale",
|
||||
//
|
||||
// render: (
|
||||
// <DictionarySelect
|
||||
// dictValue="scale"
|
||||
// onGetData={(data) => {
|
||||
// setScaleData(data);
|
||||
// }}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
{
|
||||
label: "法定代表人",
|
||||
name: "lrName",
|
||||
|
|
@ -429,12 +446,12 @@ function CorpInfo(props) {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "成立日期",
|
||||
name: "createDate",
|
||||
|
||||
render: FORM_ITEM_RENDER_ENUM.DATE,
|
||||
},
|
||||
// {
|
||||
// label: "成立日期",
|
||||
// name: "createDate",
|
||||
//
|
||||
// render: FORM_ITEM_RENDER_ENUM.DATE,
|
||||
// },
|
||||
|
||||
{
|
||||
label: "职工人数(人)",
|
||||
|
|
@ -442,20 +459,25 @@ function CorpInfo(props) {
|
|||
render: FORM_ITEM_RENDER_ENUM.NUMBER,
|
||||
},
|
||||
|
||||
// {
|
||||
// label: "注册资金(万元)",
|
||||
// name: "regcapital",
|
||||
// render: FORM_ITEM_RENDER_ENUM.NUMBER,
|
||||
// },
|
||||
// {
|
||||
// label: "资产总额(万元)",
|
||||
// name: "totalAssets",
|
||||
// render: FORM_ITEM_RENDER_ENUM.NUMBER,
|
||||
// },
|
||||
{
|
||||
label: "注册资金(万元)",
|
||||
name: "regcapital",
|
||||
render: FORM_ITEM_RENDER_ENUM.NUMBER,
|
||||
label: "经营范围",
|
||||
name: "natureBusiness",
|
||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
||||
},
|
||||
{
|
||||
label: "资产总额(万元)",
|
||||
name: "totalAssets",
|
||||
render: FORM_ITEM_RENDER_ENUM.NUMBER,
|
||||
},
|
||||
|
||||
{
|
||||
label: "营业执照",
|
||||
name: "licenseFile",
|
||||
|
||||
render: (
|
||||
<Upload
|
||||
onGetRemoveFile={(file) => {
|
||||
|
|
@ -467,25 +489,24 @@ function CorpInfo(props) {
|
|||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "营业执照有效期",
|
||||
name: "license",
|
||||
render: FORM_ITEM_RENDER_ENUM.DATE_RANGE,
|
||||
},
|
||||
|
||||
{
|
||||
name: "qrCode",
|
||||
label: "企业二维码",
|
||||
hidden: canShowQrCode,
|
||||
required: false,
|
||||
render: (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setCorpInfoQrCodeOpen(true);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<div>
|
||||
<Button
|
||||
disabled={!canShowQrCode}
|
||||
onClick={() => {
|
||||
setCorpInfoQrCodeOpen(true);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<div style={{ color: "red", marginTop: 10 }}>请完善企业信息后查看二维码;</div>
|
||||
</div>
|
||||
|
||||
),
|
||||
},
|
||||
// { label: "单位资质信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||
|
|
@ -509,6 +530,7 @@ function CorpInfo(props) {
|
|||
const CorpInfoQrCode = (props) => {
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="企业二维码"
|
||||
footer={[
|
||||
|
|
|
|||
|
|
@ -179,9 +179,10 @@ function Department(props) {
|
|||
<Button
|
||||
block
|
||||
type="link"
|
||||
title={record.name}
|
||||
onClick={() => handleTableNodeClick(record)}
|
||||
>
|
||||
{`${record.name}>`}
|
||||
{`${record.name.length > 25 ? `${record.name.slice(0, 25)}...` : record.name}>`}
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
|
|
@ -309,6 +310,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Form, message } from "antd";
|
||||
import { Alert, Form, message } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
|
|
@ -14,11 +14,18 @@ import useGetFile from "zy-react-library/hooks/useGetFile";
|
|||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||
import nation from "zy-react-library/json/nation.json";
|
||||
import { ID_NUMBER, PHONE } from "zy-react-library/regular";
|
||||
import { PHONE } from "zy-react-library/regular";
|
||||
|
||||
import { getLabelName, idCardGetDateAndGender } from "zy-react-library/utils";
|
||||
import { getFileUrl, getLabelName, idCardGetDateAndGender } from "zy-react-library/utils";
|
||||
import { NS_USER } from "~/enumerate/namespace";
|
||||
import { getAgeByIdCard, getBirthDateFromIdCard, useDebounce, UseDecodeIdCard } from "~/utils";
|
||||
import {
|
||||
getAgeByIdCard,
|
||||
getBirthDateFromIdCard,
|
||||
getChineseIdCardFullErrorMessage,
|
||||
isValidChineseIdCard,
|
||||
useDebounce,
|
||||
UseDecodeIdCard,
|
||||
} from "~/utils";
|
||||
|
||||
export const WHETHER_ENUM = [
|
||||
{
|
||||
|
|
@ -58,6 +65,11 @@ function Add(props) {
|
|||
const [politicalAffiliationData, setPoliticalAffiliationData] = useState([]);
|
||||
const [deleteUserImageFiles, setDeleteUserImageFiles] = useState([]);
|
||||
const [deleteCardImageFiles, setDeleteCardImageFiles] = useState([]);
|
||||
const [deleteSocSecurityImageFiles, setDeleteSocSecurityImageFiles] = useState([]);
|
||||
const [deleteEmpInsuranceImageFiles, setDeleteEmpInsuranceImageFiles] = useState([]);
|
||||
const [deleteInsuranceImageFiles, setDeleteInsuranceImageFiles] = useState([]);
|
||||
const [deleteContractImageFiles, setDeleteContractImageFiles] = useState([]);
|
||||
const [deleteThreeLevelImageFiles, setDeleteThreeLevelImageFiles] = useState([]);
|
||||
const { loading: deleteFileLoading, deleteFile } = useDeleteFile();
|
||||
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
|
@ -78,18 +90,67 @@ function Add(props) {
|
|||
|
||||
data.sex = data.sex === "男" ? "1" : "0";
|
||||
setUserID(data.userId);
|
||||
const userImg = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||
eqForeignKey: data.userId,
|
||||
});
|
||||
|
||||
const userImg = (data && data.userAvatarUrl)
|
||||
? [
|
||||
{
|
||||
url: getFileUrl() + data.userAvatarUrl,
|
||||
},
|
||||
]
|
||||
: await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||
eqForeignKey: data.userId,
|
||||
});
|
||||
|
||||
const cardImg = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
||||
eqForeignKey: data.userId,
|
||||
});
|
||||
|
||||
// 15 社保卡照片 10 劳动合同图片 11 商业保险图片 16 工伤保险凭证 19三级教育培训
|
||||
|
||||
const socSecurity = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["15"],
|
||||
eqForeignKey: data.userId,
|
||||
});
|
||||
|
||||
const empInsurance = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["16"],
|
||||
eqForeignKey: data.userId,
|
||||
});
|
||||
const insurance = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["11"],
|
||||
eqForeignKey: data.userId,
|
||||
});
|
||||
|
||||
const contract = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["10"],
|
||||
eqForeignKey: data.userId,
|
||||
});
|
||||
const threeLevel = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["19"],
|
||||
eqForeignKey: data.userId,
|
||||
});
|
||||
|
||||
data.isBf = data.isBf ? data.isBf : 0;
|
||||
data.isSignLabor = data.isSignLabor ? data.isSignLabor : 0;
|
||||
data.isPay = data.isPay ? data.isPay : 0;
|
||||
data.isInjuriesPay = data.isInjuriesPay ? data.isInjuriesPay : 0;
|
||||
data.isLevelThree = data.isLevelThree ? data.isLevelThree : 0;
|
||||
data.isDepaRrtmentHead = data.isDepaRrtmentHead ? data.isDepaRrtmentHead : 0;
|
||||
data.isSocial = data.isSocial ? data.isSocial : 0;
|
||||
data.isSpecialJob = data.isSpecialJob ? data.isSpecialJob : 0;
|
||||
|
||||
const values = {
|
||||
userImg,
|
||||
cardImg,
|
||||
socSecurity,
|
||||
empInsurance,
|
||||
insurance,
|
||||
contract,
|
||||
threeLevel,
|
||||
...data,
|
||||
|
||||
};
|
||||
form.setFieldsValue({
|
||||
...values,
|
||||
|
|
@ -107,6 +168,28 @@ function Add(props) {
|
|||
single: false,
|
||||
files: deleteCardImageFiles,
|
||||
});
|
||||
await deleteFile({
|
||||
single: false,
|
||||
files: deleteSocSecurityImageFiles,
|
||||
});
|
||||
await deleteFile({
|
||||
single: false,
|
||||
files: deleteEmpInsuranceImageFiles,
|
||||
});
|
||||
|
||||
await deleteFile({
|
||||
single: false,
|
||||
files: deleteInsuranceImageFiles,
|
||||
});
|
||||
await deleteFile({
|
||||
single: false,
|
||||
files: deleteContractImageFiles,
|
||||
});
|
||||
await deleteFile({
|
||||
single: false,
|
||||
files: deleteThreeLevelImageFiles,
|
||||
});
|
||||
|
||||
values.mainCorpFlag = 0;
|
||||
values.userType = 1;
|
||||
values.nationName = getLabelName({
|
||||
|
|
@ -133,15 +216,17 @@ function Add(props) {
|
|||
if (values.userIdCard) {
|
||||
values.userIdCard = btoa(values.userIdCard); // Base64 编码
|
||||
}
|
||||
const { id } = await uploadFile({
|
||||
single: false,
|
||||
|
||||
const { filePath } = await uploadFile({
|
||||
single: true,
|
||||
files: values.userImg,
|
||||
params: {
|
||||
type: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||
foreignKey: userID,
|
||||
},
|
||||
});
|
||||
await uploadFile({
|
||||
|
||||
const { id } = await uploadFile({
|
||||
single: false,
|
||||
files: values.cardImg,
|
||||
params: {
|
||||
|
|
@ -149,6 +234,47 @@ function Add(props) {
|
|||
foreignKey: userID || id,
|
||||
},
|
||||
});
|
||||
await uploadFile({
|
||||
single: false,
|
||||
files: values.socSecurity,
|
||||
params: {
|
||||
type: UPLOAD_FILE_TYPE_ENUM["15"],
|
||||
foreignKey: userID || id,
|
||||
},
|
||||
});
|
||||
await uploadFile({
|
||||
single: false,
|
||||
files: values.empInsurance,
|
||||
params: {
|
||||
type: UPLOAD_FILE_TYPE_ENUM["16"],
|
||||
foreignKey: userID || id,
|
||||
},
|
||||
});
|
||||
await uploadFile({
|
||||
single: false,
|
||||
files: values.insurance,
|
||||
params: {
|
||||
type: UPLOAD_FILE_TYPE_ENUM["11"],
|
||||
foreignKey: userID || id,
|
||||
},
|
||||
});
|
||||
|
||||
await uploadFile({
|
||||
single: false,
|
||||
files: values.contract,
|
||||
params: {
|
||||
type: UPLOAD_FILE_TYPE_ENUM["10"],
|
||||
foreignKey: userID || id,
|
||||
},
|
||||
});
|
||||
await uploadFile({
|
||||
single: false,
|
||||
files: values.threeLevel,
|
||||
params: {
|
||||
type: UPLOAD_FILE_TYPE_ENUM["19"],
|
||||
foreignKey: userID || id,
|
||||
},
|
||||
});
|
||||
|
||||
if (Number.isInteger(values.age) && values.age < 0) {
|
||||
message.error("年龄请输入正整数!");
|
||||
|
|
@ -159,6 +285,7 @@ function Add(props) {
|
|||
return;
|
||||
}
|
||||
values.userId = userID || id;
|
||||
values.userAvatarUrl = filePath;
|
||||
if (queryParams["id"]) {
|
||||
values.id = queryParams["id"];
|
||||
|
||||
|
|
@ -189,6 +316,9 @@ function Add(props) {
|
|||
]);
|
||||
return;
|
||||
}
|
||||
if (!isValidChineseIdCard(debouncedUserIdCard)) {
|
||||
return;
|
||||
}
|
||||
props["verifyUser"]({
|
||||
userIdCard: btoa(debouncedUserIdCard),
|
||||
id: queryParams["id"] ?? "",
|
||||
|
|
@ -259,11 +389,22 @@ function Add(props) {
|
|||
if ("userIdCard" in changedValues) {
|
||||
const newIdCard = changedValues.userIdCard;
|
||||
setUserIdCardValue(newIdCard ?? "");
|
||||
if (newIdCard) {
|
||||
form.setFields([
|
||||
{
|
||||
name: "userIdCard",
|
||||
errors: [],
|
||||
},
|
||||
]);
|
||||
if (newIdCard && isValidChineseIdCard(newIdCard)) {
|
||||
form.setFieldValue("sex", idCardGetDateAndGender(newIdCard).sex);
|
||||
form.setFieldValue("age", getAgeByIdCard(newIdCard));
|
||||
form.setFieldValue("birthday", getBirthDateFromIdCard(newIdCard));
|
||||
}
|
||||
else {
|
||||
form.setFieldValue("sex", undefined);
|
||||
form.setFieldValue("age", undefined);
|
||||
form.setFieldValue("birthday", undefined);
|
||||
}
|
||||
}
|
||||
if ("username" in changedValues) {
|
||||
setUsernameValue(changedValues.username ?? "");
|
||||
|
|
@ -281,14 +422,21 @@ function Add(props) {
|
|||
>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
confirmLoading={
|
||||
labelCol={{
|
||||
span: 8,
|
||||
}}
|
||||
loading={
|
||||
deleteFileLoading
|
||||
|| uploadFileLoading
|
||||
|| getFileLoading
|
||||
|| props.user.userLoading
|
||||
}
|
||||
values={{ flowFlag: 0 }}
|
||||
values={{ flowFlag: 0, isSocial: 0, isBf: 0, isSpecialJob: 0, isDepaRrtmentHead: 0, isInjuriesPay: 0, isPay: 0, isSignLabor: 0, isLevelThree: 0 }}
|
||||
options={[
|
||||
{
|
||||
label: "基础信息",
|
||||
render: FORM_ITEM_RENDER_ENUM.DIVIDER,
|
||||
},
|
||||
{
|
||||
label: "用户照片",
|
||||
name: "userImg",
|
||||
|
|
@ -296,6 +444,7 @@ function Add(props) {
|
|||
render: (
|
||||
<Upload
|
||||
size={4}
|
||||
maxCount={1}
|
||||
fileType="image"
|
||||
tipContent={(
|
||||
<div
|
||||
|
|
@ -305,7 +454,7 @@ function Add(props) {
|
|||
fontSize: 12,
|
||||
}}
|
||||
>
|
||||
<div>* 图像格式:JPG、JPEG、PNG</div>
|
||||
<div>* 图像格式:jpg、jpeg、png</div>
|
||||
<div>* 图像大小:不超过4M。</div>
|
||||
<div>* 照片大小: 推荐 500*500</div>
|
||||
<div>* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图</div>
|
||||
|
|
@ -348,6 +497,9 @@ function Add(props) {
|
|||
{
|
||||
name: "name",
|
||||
label: "姓名",
|
||||
componentProps: {
|
||||
maxLength: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "phone",
|
||||
|
|
@ -369,13 +521,21 @@ function Add(props) {
|
|||
{
|
||||
name: "userIdCard",
|
||||
label: "身份证号",
|
||||
validateTrigger: "onChange",
|
||||
rules: [
|
||||
{
|
||||
pattern: ID_NUMBER,
|
||||
message: "请输入正确的身份证号",
|
||||
validateTrigger: "onChange",
|
||||
validator: (_, value) => {
|
||||
const errorMessage = getChineseIdCardFullErrorMessage(value);
|
||||
if (!errorMessage) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return Promise.reject(new Error(errorMessage));
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
name: "email",
|
||||
label: "电子邮箱",
|
||||
|
|
@ -417,14 +577,14 @@ function Add(props) {
|
|||
disabled: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "locationAddress",
|
||||
label: "户口所在地",
|
||||
},
|
||||
{
|
||||
name: "currentAddress",
|
||||
label: "现住址",
|
||||
},
|
||||
// {
|
||||
// name: "locationAddress",
|
||||
// label: "户口所在地",
|
||||
// },
|
||||
// {
|
||||
// name: "currentAddress",
|
||||
// label: "现住址",
|
||||
// },
|
||||
{
|
||||
name: "culturalLevel",
|
||||
label: "文化程度",
|
||||
|
|
@ -437,12 +597,12 @@ function Add(props) {
|
|||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "maritalStatus",
|
||||
label: "婚姻状况",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: MARITAL_STATUS_ENUM,
|
||||
},
|
||||
// {
|
||||
// name: "maritalStatus",
|
||||
// label: "婚姻状况",
|
||||
// render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
// items: MARITAL_STATUS_ENUM,
|
||||
// },
|
||||
{
|
||||
name: "politicalAffiliation",
|
||||
label: "政治面貌",
|
||||
|
|
@ -458,7 +618,6 @@ function Add(props) {
|
|||
{
|
||||
name: "postName",
|
||||
label: "岗位(工种)",
|
||||
required: false,
|
||||
},
|
||||
{
|
||||
name: "flowFlag",
|
||||
|
|
@ -470,6 +629,10 @@ function Add(props) {
|
|||
items: WHETHER_ENUM,
|
||||
|
||||
},
|
||||
{
|
||||
label: "社保信息",
|
||||
render: FORM_ITEM_RENDER_ENUM.DIVIDER,
|
||||
},
|
||||
// { name: "deputyLeaderFlag", label: "是否为
|
||||
// 分管领导", required: false, render: FORM_ITEM_RENDER_ENUM.RADIO, items: WHETHER_ENUM },
|
||||
// {
|
||||
|
|
@ -480,156 +643,201 @@ function Add(props) {
|
|||
// hidden: formValues => !(formValues.politicalStatus === "zhonggongdangyuan"),
|
||||
// },
|
||||
// { name: "postId", label: "岗位名称(工种)" },
|
||||
// {
|
||||
// name: "isSocial",
|
||||
// label: "是否缴纳社保",
|
||||
// render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
// items: WHETHER_ENUM,
|
||||
// componentProps: {
|
||||
// onChange: () => {
|
||||
// form.setFieldValue("socialNumber", undefined);
|
||||
// form.setFieldValue("socSecurity", undefined);
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: "socialNumber",
|
||||
// label: "社会保障号码",
|
||||
// dependencies: ["isSocial"],
|
||||
// hidden: formValues => !(formValues.isSocial === "1"),
|
||||
// },
|
||||
// {
|
||||
// name: "socSecurity",
|
||||
// label: "社保卡照片",
|
||||
// render: <Upload fileType="image" />,
|
||||
// dependencies: ["isSocial"],
|
||||
// hidden: formValues => !(formValues.isSocial === "1"),
|
||||
// },
|
||||
// {
|
||||
// name: "isBf",
|
||||
// label: "是否缴纳保险",
|
||||
// render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
// items: WHETHER_ENUM,
|
||||
// },
|
||||
// {
|
||||
// name: "isSignLabor",
|
||||
// label: "是否签订劳动合同",
|
||||
// render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
// items: WHETHER_ENUM,
|
||||
// componentProps: {
|
||||
// onChange: () => {
|
||||
// form.setFieldValue("contract", undefined);
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: "contract",
|
||||
// label: "合同图片",
|
||||
// render: <Upload fileType="image" />,
|
||||
// dependencies: ["isSignLabor"],
|
||||
// hidden: formValues => !(formValues.isSignLabor === "1"),
|
||||
// },
|
||||
// {
|
||||
// name: "ispay",
|
||||
// label: "是否缴纳商业保险",
|
||||
// render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
// items: WHETHER_ENUM,
|
||||
// componentProps: {
|
||||
// onChange: () => {
|
||||
// form.setFieldValue("ispayNumber", undefined);
|
||||
// form.setFieldValue("insurance", undefined);
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: "ispayNumber",
|
||||
// label: "商业保险单号",
|
||||
// dependencies: ["ispay"],
|
||||
// hidden: formValues => !(formValues.ispay === "1"),
|
||||
// },
|
||||
// {
|
||||
// name: "insurance",
|
||||
// label: "保险图片",
|
||||
// render: <Upload fileType="image" />,
|
||||
// dependencies: ["ispay"],
|
||||
// hidden: formValues => !(formValues.ispay === "1"),
|
||||
// },
|
||||
// {
|
||||
// name: "isInjuriesPay",
|
||||
// label: "是否按期缴纳工伤保险",
|
||||
// render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
// items: WHETHER_ENUM,
|
||||
// componentProps: {
|
||||
// onChange: () => {
|
||||
// form.setFieldValue("isInjuriesPayTime", undefined);
|
||||
// form.setFieldValue("empInsurance", undefined);
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: "isInjuriesPayTime",
|
||||
// label: "工伤保险有效期",
|
||||
// dependencies: ["isInjuriesPay"],
|
||||
// render: FORM_ITEM_RENDER_ENUM.DATE,
|
||||
// hidden: formValues => !(formValues.isInjuriesPay === "1"),
|
||||
// },
|
||||
// {
|
||||
// name: "empInsurance",
|
||||
// label: "工伤保险凭证",
|
||||
// render: <Upload fileType="image" />,
|
||||
// dependencies: ["isInjuriesPay"],
|
||||
// hidden: formValues => !(formValues.isInjuriesPay === "1"),
|
||||
// },
|
||||
// {
|
||||
// name: "isLevelThree",
|
||||
// label: "是否参加三级安全培训",
|
||||
// render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
// items: WHETHER_ENUM,
|
||||
// componentProps: {
|
||||
// onChange: () => {
|
||||
// form.setFieldValue("threeLevel", undefined);
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: "threeLevel",
|
||||
// label: "三级安全培训照片",
|
||||
// render: <Upload fileType="image" />,
|
||||
// dependencies: ["isLevelThree"],
|
||||
// hidden: formValues => !(formValues.isLevelThree === "1"),
|
||||
// },
|
||||
// {
|
||||
// name: "isflow",
|
||||
// label: "是否流动人员",
|
||||
// render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
// items: WHETHER_ENUM,
|
||||
// },
|
||||
// {
|
||||
// name: "IS_SPECIAL_JOB",
|
||||
// label: "是否特殊工种",
|
||||
// required: false,
|
||||
// render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
// items: WHETHER_ENUM,
|
||||
// // componentProps: { disabled: true },
|
||||
// },
|
||||
// {
|
||||
// name: "IS_DEPARTMENT_HEAD",
|
||||
// label: "是否为部门负责人",
|
||||
// required: false,
|
||||
// render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
// items: WHETHER_ENUM,
|
||||
// // componentProps: { disabled: true },
|
||||
// },
|
||||
// {
|
||||
// name: "alert",
|
||||
// span: 24,
|
||||
// customizeRender: true,
|
||||
// render: () => (<Alert message="新增完成后请提示该用户去相关方app端完善特种证书信息,特种证书完善后用户的'是否特殊工种'将变为'是'" type="error" />),
|
||||
// },
|
||||
|
||||
{
|
||||
name: "isLevelThree",
|
||||
label: "是否参加三级安全培训",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: WHETHER_ENUM,
|
||||
componentProps: {
|
||||
onChange: () => {
|
||||
form.setFieldValue("threeLevel", undefined);
|
||||
},
|
||||
},
|
||||
span: 24,
|
||||
},
|
||||
|
||||
{
|
||||
name: "isSpecialJob",
|
||||
label: "是否特殊工种",
|
||||
required: false,
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: WHETHER_ENUM,
|
||||
componentProps: { disabled: true },
|
||||
span: 24,
|
||||
},
|
||||
|
||||
{
|
||||
name: "isDepaRrtmentHead",
|
||||
label: "是否为部门负责人",
|
||||
required: false,
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: WHETHER_ENUM,
|
||||
span: 24,
|
||||
// componentProps: { disabled: true },
|
||||
},
|
||||
{
|
||||
name: "isSocial",
|
||||
label: "是否缴纳社保",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: WHETHER_ENUM,
|
||||
componentProps: {
|
||||
onChange: () => {
|
||||
form.setFieldValue("socialNumber", undefined);
|
||||
form.setFieldValue("socSecurity", undefined);
|
||||
},
|
||||
},
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
name: "socialNumber",
|
||||
label: "社会保障号码",
|
||||
dependencies: ["isSocial"],
|
||||
hidden: formValues => !(formValues.isSocial === 1),
|
||||
},
|
||||
{
|
||||
name: "socSecurity",
|
||||
label: "社保卡照片",
|
||||
render: (
|
||||
<Upload
|
||||
maxCount={4}
|
||||
fileType="image"
|
||||
onGetRemoveFile={(file) => {
|
||||
setDeleteSocSecurityImageFiles([...deleteSocSecurityImageFiles, file]);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
dependencies: ["isSocial"],
|
||||
hidden: formValues => !(formValues.isSocial === 1),
|
||||
},
|
||||
{
|
||||
name: "isInjuriesPay",
|
||||
label: "是否按期缴纳工伤保险",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: WHETHER_ENUM,
|
||||
componentProps: {
|
||||
onChange: () => {
|
||||
form.setFieldValue("isInjuriesPayTime", undefined);
|
||||
form.setFieldValue("empInsurance", undefined);
|
||||
},
|
||||
},
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
name: "isInjuriesPayTime",
|
||||
label: "工伤保险有效期",
|
||||
dependencies: ["isInjuriesPay"],
|
||||
render: FORM_ITEM_RENDER_ENUM.DATE,
|
||||
hidden: formValues => !(formValues.isInjuriesPay === 1),
|
||||
},
|
||||
{
|
||||
name: "empInsurance",
|
||||
label: "工伤保险凭证",
|
||||
render: (
|
||||
<Upload
|
||||
size={4}
|
||||
fileType="image"
|
||||
onGetRemoveFile={(file) => {
|
||||
setDeleteEmpInsuranceImageFiles([...deleteEmpInsuranceImageFiles, file]);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
dependencies: ["isInjuriesPay"],
|
||||
hidden: formValues => !(formValues.isInjuriesPay === 1),
|
||||
},
|
||||
{
|
||||
name: "isPay",
|
||||
label: "是否缴纳商业保险",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: WHETHER_ENUM,
|
||||
componentProps: {
|
||||
onChange: () => {
|
||||
form.setFieldValue("payNumber", undefined);
|
||||
form.setFieldValue("insurance", undefined);
|
||||
},
|
||||
},
|
||||
span: 24,
|
||||
},
|
||||
|
||||
{
|
||||
name: "payNumber",
|
||||
label: "商业保险单号",
|
||||
dependencies: ["isPay"],
|
||||
hidden: formValues => !(formValues.isPay === 1),
|
||||
},
|
||||
|
||||
{
|
||||
name: "insurance",
|
||||
label: "保险图片",
|
||||
render: (
|
||||
<Upload
|
||||
maxCount={4}
|
||||
fileType="image"
|
||||
onGetRemoveFile={(file) => {
|
||||
setDeleteInsuranceImageFiles([...deleteInsuranceImageFiles, file]);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
dependencies: ["isPay"],
|
||||
hidden: formValues => !(formValues.isPay === 1),
|
||||
},
|
||||
{
|
||||
name: "isSignLabor",
|
||||
label: "是否签订劳动合同",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: WHETHER_ENUM,
|
||||
componentProps: {
|
||||
onChange: () => {
|
||||
form.setFieldValue("contract", undefined);
|
||||
},
|
||||
},
|
||||
span: 24,
|
||||
},
|
||||
|
||||
{
|
||||
name: "contract",
|
||||
label: "合同图片",
|
||||
render: (
|
||||
<Upload
|
||||
maxCount={4}
|
||||
fileType="image"
|
||||
onGetRemoveFile={(file) => {
|
||||
setDeleteContractImageFiles([...deleteContractImageFiles, file]);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
dependencies: ["isSignLabor"],
|
||||
hidden: formValues => !(formValues.isSignLabor === 1),
|
||||
},
|
||||
{
|
||||
name: "isBf",
|
||||
label: "是否缴纳其他人身伤害保险",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: WHETHER_ENUM,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
name: "threeLevel",
|
||||
label: "其他人身伤害保险照片",
|
||||
render: (
|
||||
<Upload
|
||||
maxCount={4}
|
||||
fileType="image"
|
||||
onGetRemoveFile={(file) => {
|
||||
setDeleteThreeLevelImageFiles([...deleteThreeLevelImageFiles, file]);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
dependencies: ["isBf"],
|
||||
hidden: formValues => !(formValues.isBf === 1),
|
||||
},
|
||||
|
||||
]}
|
||||
onFinish={onSubmit}
|
||||
onValuesChange={onValuesChange}
|
||||
/>
|
||||
<Alert style={{ height: 40, marginBottom: 40, color: "#f56c6c" }} message="新增完成后请提示该用户去相关方app端完善特种证书信息,特种证书完善后用户的'是否特殊工种'将变为'是'" type="error" />
|
||||
|
||||
</Page>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,24 +1,27 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, Input, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import LeftTree from "zy-react-library/components/LeftTree/Department/Gwj/index";
|
||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||
// import DictionarySelect from "zy-react-library/components/SelectTree/Dictionary";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import XgfUserInfo from "~/components/XgfUserInfo";
|
||||
import { NS_USER } from "~/enumerate/namespace";
|
||||
import { UseDecodeIdCard } from "~/utils";
|
||||
|
||||
const JOB_STATUS = {
|
||||
1: "在职",
|
||||
0: "离职",
|
||||
3: "离职",
|
||||
2: "信息变更中",
|
||||
3: "未入职",
|
||||
4: "实习生",
|
||||
5: "实习结束",
|
||||
6: "退休",
|
||||
7: "劳务派遣",
|
||||
8: "劳务派遣结束",
|
||||
11: "入职待审核",
|
||||
10: "离职待审核",
|
||||
};
|
||||
|
|
@ -44,7 +47,7 @@ function List(props) {
|
|||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定要重置密码为Aa@12345678吗?",
|
||||
content: "确定要重置密码为Cc@12345678吗?",
|
||||
onOk: () => {
|
||||
props["userChangePassword"]({
|
||||
id,
|
||||
|
|
@ -283,7 +286,7 @@ function List(props) {
|
|||
</div>
|
||||
</div>
|
||||
{addModalOpen && (
|
||||
<AddModal
|
||||
<XgfUserInfo
|
||||
open={addModalOpen}
|
||||
getData={getData}
|
||||
currentId={currentId}
|
||||
|
|
@ -291,6 +294,8 @@ function List(props) {
|
|||
requestGetEncryInfo={props["getEncryInfo"]}
|
||||
requestReviewStatus={props["reviewStatus"]}
|
||||
modalType={modalType}
|
||||
showEmail
|
||||
userPhotoLabel="用户照片"
|
||||
onCancel={() => {
|
||||
setAddModalOpen(false);
|
||||
setCurrentId("");
|
||||
|
|
@ -300,283 +305,4 @@ function List(props) {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
function AddModalComponent(props) {
|
||||
const [form] = Form.useForm();
|
||||
const [info, setInfo] = useState({});
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||
const [viewType, setViewType] = useState(false);
|
||||
const [viewData, setViewData] = useState(false);
|
||||
useEffect(() => {
|
||||
if (props.currentId) {
|
||||
const fetchData = async () => {
|
||||
const res = await props.requestDetails({
|
||||
id: props.currentId,
|
||||
});
|
||||
const userImg = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
const cardImg = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
res.data.userImg = userImg;
|
||||
res.data.cardImg = cardImg;
|
||||
setInfo(res.data);
|
||||
};
|
||||
fetchData();
|
||||
}
|
||||
}, [props.currentId]);
|
||||
const onCancel = () => {
|
||||
form.resetFields();
|
||||
props.onCancel();
|
||||
};
|
||||
const handleOk = async () => {
|
||||
const values = await form.validateFields();
|
||||
|
||||
const { data } = await props.requestGetEncryInfo({ id: props.currentId, password: values.password });
|
||||
if (data) {
|
||||
if (viewType === "phone") {
|
||||
setViewData(data.phone);
|
||||
}
|
||||
else {
|
||||
setViewData(data.userIdCard);
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleReject = () => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定驳回吗?",
|
||||
onOk: () => {
|
||||
props.requestReviewStatus({
|
||||
corpinfoId: info.corpinfoId,
|
||||
employmentFlag: info.employmentFlag,
|
||||
reviewStatus: 3,
|
||||
userId: info.id,
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("驳回成功");
|
||||
props.getData();
|
||||
props.onCancel();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
const handlePass = () => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定审核通过吗?",
|
||||
onOk: () => {
|
||||
props.requestReviewStatus({
|
||||
corpinfoId: info.corpinfoId,
|
||||
employmentFlag: info.employmentFlag,
|
||||
reviewStatus: 2,
|
||||
userId: info.id,
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("审核成功");
|
||||
props.getData();
|
||||
props.onCancel();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
open={props.open}
|
||||
title={props.modalType === "see" ? "查看" : "审核"}
|
||||
width={1200}
|
||||
okButtonProps={{
|
||||
style: {
|
||||
display: "none",
|
||||
},
|
||||
}}
|
||||
onOk={form.submit}
|
||||
onCancel={onCancel}
|
||||
confirmLoading={getFileLoading}
|
||||
footer={[
|
||||
<Button key="return" onClick={onCancel}>
|
||||
关闭
|
||||
</Button>,
|
||||
<Button key="reject" onClick={handleReject} hidden={props.modalType === "see"}>
|
||||
驳回
|
||||
</Button>,
|
||||
<Button key="pass" type="primary" onClick={handlePass} hidden={props.modalType === "see"}>
|
||||
审核通过
|
||||
</Button>,
|
||||
|
||||
]}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
padding: 20,
|
||||
}}
|
||||
>
|
||||
<Descriptions
|
||||
|
||||
bordered
|
||||
items={[
|
||||
{
|
||||
label: "用户照片",
|
||||
children: <PreviewImg files={info.userImg} />,
|
||||
},
|
||||
{
|
||||
label: "身份证照片",
|
||||
children: <PreviewImg files={info.cardImg} />,
|
||||
},
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
},
|
||||
{
|
||||
label: "性别",
|
||||
children: info.sex,
|
||||
|
||||
},
|
||||
{
|
||||
label: "出生年月",
|
||||
children: info.birthday,
|
||||
},
|
||||
{
|
||||
label: "年龄",
|
||||
children: info.age,
|
||||
},
|
||||
{
|
||||
label: "手机号",
|
||||
children: (
|
||||
<div>
|
||||
|
||||
{info.phone}
|
||||
{/* {info.phone */}
|
||||
{/* && ( */}
|
||||
{/* <Button */}
|
||||
{/* type="link" */}
|
||||
{/* onClick={() => { */}
|
||||
{/* setIsModalOpen(true); */}
|
||||
{/* setViewType("phone"); */}
|
||||
{/* setViewData(""); */}
|
||||
{/* form.resetFields(); */}
|
||||
{/* }} */}
|
||||
{/* > */}
|
||||
{/* 点击查看 */}
|
||||
{/* </Button> */}
|
||||
{/* )} */}
|
||||
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "身份证号",
|
||||
children: (
|
||||
<div>
|
||||
{UseDecodeIdCard(info.userIdCard) }
|
||||
{/* { info.userIdCard */}
|
||||
{/* && ( */}
|
||||
{/* <Button */}
|
||||
{/* type="link" */}
|
||||
{/* onClick={() => { */}
|
||||
{/* setIsModalOpen(true); */}
|
||||
{/* setViewType("userIdCard"); */}
|
||||
{/* form.resetFields(); */}
|
||||
{/* setViewData(""); */}
|
||||
{/* }} */}
|
||||
{/* > */}
|
||||
{/* 点击查看 */}
|
||||
{/* </Button> */}
|
||||
{/* )} */}
|
||||
</div>
|
||||
),
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
label: "电子邮箱",
|
||||
children: info.email,
|
||||
},
|
||||
{
|
||||
label: "民族",
|
||||
children: info.nationName,
|
||||
},
|
||||
{
|
||||
label: "婚姻状况",
|
||||
children: info.maritalStatusName,
|
||||
},
|
||||
{
|
||||
label: "政治面貌",
|
||||
children: info.politicalAffiliationName,
|
||||
},
|
||||
{
|
||||
label: "户口所在地",
|
||||
children: info.locationAddress,
|
||||
},
|
||||
{
|
||||
label: "现住址",
|
||||
children: info.currentAddress,
|
||||
},
|
||||
{
|
||||
label: "文化程度",
|
||||
children: info.culturalLevelName,
|
||||
},
|
||||
|
||||
{
|
||||
label: "岗位名称",
|
||||
children: info.postName,
|
||||
},
|
||||
]}
|
||||
column={2}
|
||||
labelStyle={{
|
||||
width: 200,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
onCancel={() => setIsModalOpen(false)}
|
||||
|
||||
>
|
||||
<Form
|
||||
name="basic"
|
||||
form={form}
|
||||
>
|
||||
<Form.Item
|
||||
label="请输入登录密码"
|
||||
name="password"
|
||||
hidden={
|
||||
viewData
|
||||
}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="手机号"
|
||||
hidden={!(viewType === "phone" && viewData)}
|
||||
>
|
||||
{viewData}
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="身份证号"
|
||||
hidden={!(viewType === "userIdCard" && viewData)}
|
||||
>
|
||||
{viewData}
|
||||
</Form.Item>
|
||||
|
||||
</Form>
|
||||
</Modal>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
const AddModal = AddModalComponent;
|
||||
export default Connect([NS_USER], true)(Permission(List));
|
||||
|
|
|
|||
|
|
@ -6,12 +6,6 @@ import Table from "zy-react-library/components/Table";
|
|||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_USER } from "~/enumerate/namespace";
|
||||
|
||||
const JOB_STATUS = {
|
||||
1: "在职",
|
||||
0: "离职",
|
||||
11: "入职待审核",
|
||||
10: "离职待审核",
|
||||
};
|
||||
function ResignationReview(props) {
|
||||
const queryParams = useGetUrlQuery();
|
||||
const [info, setInfo] = useState({});
|
||||
|
|
|
|||
|
|
@ -313,6 +313,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -347,6 +347,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
|||
// import { getLabelName } from "zy-react-library/utils";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
||||
import { useDebounce } from "~/utils";
|
||||
|
||||
|
|
@ -34,6 +34,11 @@ const ENTERPRISE_TYPE = [
|
|||
bianma: 1,
|
||||
name: "集团单位",
|
||||
},
|
||||
{
|
||||
bianma: 6,
|
||||
name: "物资中心",
|
||||
},
|
||||
|
||||
];
|
||||
const ENTERPRISE_STATUS = [
|
||||
{
|
||||
|
|
@ -75,7 +80,7 @@ function List(props) {
|
|||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "是否重置密码为Aa@12345678?",
|
||||
content: "是否重置密码为Bb@12345678?",
|
||||
onOk: () => {
|
||||
props["corpInfoChangePassword"]({
|
||||
id,
|
||||
|
|
@ -140,11 +145,11 @@ function List(props) {
|
|||
options={[
|
||||
{
|
||||
name: "likecorpName",
|
||||
label: "公司名称",
|
||||
label: "分公司名称",
|
||||
},
|
||||
{
|
||||
name: "eqCorpState",
|
||||
label: "公司状态",
|
||||
label: "分公司状态",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_STATUS,
|
||||
},
|
||||
|
|
@ -184,7 +189,7 @@ function List(props) {
|
|||
)}
|
||||
columns={[
|
||||
{
|
||||
title: "公司名称",
|
||||
title: "分公司名称",
|
||||
dataIndex: "corpName",
|
||||
},
|
||||
{
|
||||
|
|
@ -208,12 +213,14 @@ function List(props) {
|
|||
// dataIndex: "ecoTypeName",
|
||||
// },
|
||||
{
|
||||
title: "公司状态",
|
||||
title: "分公司状态",
|
||||
dataIndex: "corpStateName",
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
dataIndex: "useFlag",
|
||||
width: 180,
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
{record.useFlag === 0
|
||||
|
|
@ -226,26 +233,26 @@ function List(props) {
|
|||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 500,
|
||||
width: 400,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
{" "}
|
||||
{
|
||||
props.permission("zgszhgl-edit")
|
||||
&& (
|
||||
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setAddModalOpen(true);
|
||||
setCurrentId(record.id);
|
||||
setOpenType("edit");
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
{/* { */}
|
||||
{/* props.permission("zgszhgl-edit") */}
|
||||
{/* && ( */}
|
||||
|
||||
{/* <Button */}
|
||||
{/* type="link" */}
|
||||
{/* onClick={() => { */}
|
||||
{/* setAddModalOpen(true); */}
|
||||
{/* setCurrentId(record.id); */}
|
||||
{/* setOpenType("edit"); */}
|
||||
{/* }} */}
|
||||
{/* > */}
|
||||
{/* 编辑 */}
|
||||
{/* </Button> */}
|
||||
{/* ) */}
|
||||
{/* } */}
|
||||
{
|
||||
props.permission("zgszhgl-editName")
|
||||
&& (
|
||||
|
|
@ -373,19 +380,39 @@ function AddModalComponent(props) {
|
|||
const onSubmit = async (values) => {
|
||||
if (props.openType === "editName") {
|
||||
values.id = props.currentId;
|
||||
await props.requestChangeCompanyName(values);
|
||||
|
||||
await props.requestChangeCompanyName(values).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("修改成功");
|
||||
onCancel();
|
||||
props.getData();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
values.corpStateName = getLabelName({
|
||||
status: values.corpState,
|
||||
list: ENTERPRISE_STATUS,
|
||||
|
||||
});
|
||||
|
||||
if (props.openType === "edit") {
|
||||
values.id = props.currentId;
|
||||
await props.requestEdit(values).then(() => {
|
||||
onCancel();
|
||||
props.getData();
|
||||
await props.requestEdit(values).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("编辑成功");
|
||||
onCancel();
|
||||
props.getData();
|
||||
}
|
||||
});
|
||||
}
|
||||
if (props.openType === "add") {
|
||||
await props.requestAdd(values).then(() => {
|
||||
onCancel();
|
||||
props.getData();
|
||||
await props.requestAdd(values).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("新增成功");
|
||||
onCancel();
|
||||
props.getData();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -452,6 +479,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
@ -463,15 +491,16 @@ function AddModalComponent(props) {
|
|||
<FormBuilder
|
||||
form={form}
|
||||
span={24}
|
||||
confirmLoading={props.loading}
|
||||
loading={props.loading}
|
||||
options={[
|
||||
{
|
||||
name: "corpName",
|
||||
label: "公司名称",
|
||||
label: "分公司名称",
|
||||
},
|
||||
{
|
||||
name: "code",
|
||||
label: "统一社会信用代码",
|
||||
required: false,
|
||||
rules: [
|
||||
{
|
||||
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
|
||||
|
|
@ -488,24 +517,25 @@ function AddModalComponent(props) {
|
|||
hidden: props.openType === "editName",
|
||||
},
|
||||
{
|
||||
name: "ecoType",
|
||||
label: "经济类型",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="ECO_TYPE"
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("ecoTypeName", label);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
hidden: props.openType === "editName",
|
||||
},
|
||||
{
|
||||
name: "ecoTypeName",
|
||||
label: "经济类型名称",
|
||||
onlyForLabel: true,
|
||||
name: "corpState",
|
||||
label: "分公司状态",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_STATUS,
|
||||
},
|
||||
|
||||
// {
|
||||
// name: "ecoType",
|
||||
// label: "经济类型",
|
||||
// render: (
|
||||
// <DictionarySelect
|
||||
// dictValue="ECO_TYPE"
|
||||
// onGetLabel={(label) => {
|
||||
// form.setFieldValue("ecoTypeName", label);
|
||||
// }}
|
||||
// />
|
||||
// ),
|
||||
// hidden: props.openType === "editName",
|
||||
// },
|
||||
{
|
||||
name: "corpOrder",
|
||||
label: "列表排序",
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ const ENTERPRISE_TYPE = [
|
|||
bianma: 5,
|
||||
name: "驻港单位",
|
||||
},
|
||||
{
|
||||
bianma: 6,
|
||||
name: "物资中心",
|
||||
},
|
||||
];
|
||||
function View(props) {
|
||||
const queryParams = useGetUrlQuery();
|
||||
|
|
@ -57,7 +61,7 @@ function View(props) {
|
|||
bordered
|
||||
items={[
|
||||
{
|
||||
label: "公司名称",
|
||||
label: "分公司名称",
|
||||
children: info.corpName && info.corpName,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ const ENTERPRISE_TYPE = [
|
|||
bianma: 1,
|
||||
name: "集团单位",
|
||||
},
|
||||
{
|
||||
bianma: 6,
|
||||
name: "物资中心",
|
||||
},
|
||||
];
|
||||
const BRANCH_CONPANY_STATUS = [
|
||||
{
|
||||
|
|
@ -70,12 +74,12 @@ function List(props) {
|
|||
form={form}
|
||||
options={[
|
||||
{
|
||||
name: "likecorpName",
|
||||
label: "公司名称",
|
||||
name: "likeCorpName",
|
||||
label: "分公司名称",
|
||||
},
|
||||
{
|
||||
name: "eqCorpState",
|
||||
label: "公司状态",
|
||||
label: "分公司状态",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: BRANCH_CONPANY_STATUS,
|
||||
},
|
||||
|
|
@ -91,7 +95,7 @@ function List(props) {
|
|||
<Table
|
||||
columns={[
|
||||
{
|
||||
title: "公司名称",
|
||||
title: "分公司名称",
|
||||
dataIndex: "corpName",
|
||||
|
||||
},
|
||||
|
|
@ -123,7 +127,7 @@ function List(props) {
|
|||
),
|
||||
},
|
||||
{
|
||||
title: "公司状态",
|
||||
title: "分公司状态",
|
||||
dataIndex: "corpStateName",
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ function View(props) {
|
|||
},
|
||||
{
|
||||
title: "部门级别",
|
||||
dataIndex: "name",
|
||||
dataIndex: "levelName",
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -124,6 +124,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
width={800}
|
||||
|
|
@ -144,7 +145,7 @@ function AddModalComponent(props) {
|
|||
},
|
||||
{
|
||||
label: "部门名称",
|
||||
children: info.parentName,
|
||||
children: info.name,
|
||||
},
|
||||
{
|
||||
label: "部门级别",
|
||||
|
|
@ -152,8 +153,8 @@ function AddModalComponent(props) {
|
|||
},
|
||||
|
||||
{
|
||||
label: "备注",
|
||||
children: info.remarks,
|
||||
label: "岗位职责",
|
||||
children: info.departmentFunction,
|
||||
},
|
||||
{
|
||||
label: "排序",
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ function List(props) {
|
|||
message.success("定位成功!");
|
||||
}
|
||||
});
|
||||
// props.
|
||||
};
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
|
|
@ -90,10 +89,10 @@ function List(props) {
|
|||
options={[
|
||||
{
|
||||
name: "likecorpName",
|
||||
label: "公司名称",
|
||||
label: "分公司名称",
|
||||
},
|
||||
{
|
||||
label: "公司状态",
|
||||
label: "分公司状态",
|
||||
name: "eqCorpState",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_STATUS,
|
||||
|
|
@ -113,11 +112,11 @@ function List(props) {
|
|||
// )}
|
||||
columns={[
|
||||
{
|
||||
title: "公司名称",
|
||||
title: "分公司名称",
|
||||
dataIndex: "corpName",
|
||||
},
|
||||
{
|
||||
title: "企事业单位经营地址",
|
||||
title: "单位经营地址",
|
||||
dataIndex: "addressBusiness",
|
||||
},
|
||||
{
|
||||
|
|
@ -133,7 +132,7 @@ function List(props) {
|
|||
dataIndex: "contactsPhone",
|
||||
},
|
||||
{
|
||||
title: "公司状态",
|
||||
title: "分公司状态",
|
||||
dataIndex: "corpStateName",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function View(props) {
|
|||
loding={getFileLoading}
|
||||
items={[
|
||||
{
|
||||
label: "公司名称",
|
||||
label: "分公司名称",
|
||||
children: info.corpName && info.corpName,
|
||||
},
|
||||
{
|
||||
|
|
@ -127,7 +127,7 @@ function View(props) {
|
|||
},
|
||||
|
||||
{
|
||||
label: "企事业单位经营地址",
|
||||
label: "单位经营地址",
|
||||
children: info.addressBusiness,
|
||||
},
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ function View(props) {
|
|||
children: info.licenseStart ? ` ${info.licenseStart} 至 ${info.licenseEnd}` : "",
|
||||
},
|
||||
{
|
||||
label: "公司状态",
|
||||
label: "分公司状态",
|
||||
children: info.corpStateName,
|
||||
},
|
||||
]}
|
||||
|
|
@ -299,6 +299,7 @@ function View(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
|
|||
|
|
@ -63,12 +63,12 @@ function List(props) {
|
|||
options={[
|
||||
{
|
||||
name: "likeCorpName",
|
||||
label: "公司名称",
|
||||
label: "分公司名称",
|
||||
placeholder: "请输入分公司名称",
|
||||
},
|
||||
{
|
||||
name: "eqCorpState",
|
||||
label: "公司状态",
|
||||
label: "分公司状态",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_STATUS,
|
||||
},
|
||||
|
|
@ -84,7 +84,7 @@ function List(props) {
|
|||
<Table
|
||||
columns={[
|
||||
{
|
||||
title: "公司名称",
|
||||
title: "分公司名称",
|
||||
dataIndex: "corpName",
|
||||
},
|
||||
{
|
||||
|
|
@ -95,7 +95,7 @@ function List(props) {
|
|||
),
|
||||
},
|
||||
{
|
||||
title: "公司状态",
|
||||
title: "分公司状态",
|
||||
dataIndex: "corpStateName",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, Input, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
|
|
@ -7,11 +8,10 @@ import PreviewImg from "zy-react-library/components/PreviewImg";
|
|||
import Table from "zy-react-library/components/Table";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { NS_USER } from "~/enumerate/namespace";
|
||||
import { UseDecodeIdCard } from "~/utils";
|
||||
import {Permission} from "@cqsjjb/jjb-common-decorator/permission";
|
||||
|
||||
function List(props) {
|
||||
const queryParams = useGetUrlQuery();
|
||||
|
|
@ -155,6 +155,7 @@ function AddModalComponent(props) {
|
|||
return (
|
||||
<>
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
width={1200}
|
||||
|
|
@ -192,10 +193,10 @@ function AddModalComponent(props) {
|
|||
label: "所属岗位",
|
||||
children: info.postName,
|
||||
},
|
||||
{
|
||||
label: "用户名",
|
||||
children: info.username,
|
||||
},
|
||||
// {
|
||||
// label: "用户名",
|
||||
// children: info.username,
|
||||
// },
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
|
|
@ -294,6 +295,7 @@ function AddModalComponent(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
|
|||
|
|
@ -2,84 +2,60 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { Button, Form, Space } from "antd";
|
||||
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_USER } from "~/enumerate/namespace";
|
||||
|
||||
const ENTERPRISE_TYPE = [
|
||||
{
|
||||
bianma: 0,
|
||||
name: "普通企业",
|
||||
},
|
||||
{
|
||||
bianma: 1,
|
||||
name: "集团单位",
|
||||
},
|
||||
];
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["userEmploymentLogAll"], {
|
||||
const queryParams = useGetUrlQuery();
|
||||
const { tableProps } = useTable(props["userChangeRecordList"], {
|
||||
form,
|
||||
usePermission: false,
|
||||
transform: (formData) => {
|
||||
return {
|
||||
...formData,
|
||||
params: { eqUserId: queryParams.id },
|
||||
|
||||
};
|
||||
},
|
||||
});
|
||||
return (
|
||||
<div>
|
||||
<Page
|
||||
headerTitle="变更记录列表"
|
||||
headerTitle="变更列表"
|
||||
isShowFooter={false}
|
||||
>
|
||||
<Search
|
||||
form={form}
|
||||
options={[
|
||||
{
|
||||
name: "name",
|
||||
label: "公司名称",
|
||||
},
|
||||
{
|
||||
name: "eqtype",
|
||||
label: "企业类型",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_TYPE,
|
||||
},
|
||||
]}
|
||||
onFinish={getData}
|
||||
/>
|
||||
|
||||
<Table
|
||||
options={false}
|
||||
columns={[
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "userName",
|
||||
},
|
||||
{
|
||||
title: "变更时间",
|
||||
dataIndex: "updateTime",
|
||||
dataIndex: "changeTime",
|
||||
},
|
||||
{
|
||||
title: "企业名称",
|
||||
dataIndex: "corpinfoName",
|
||||
dataIndex: "corpinfoNameAfter",
|
||||
},
|
||||
{
|
||||
title: "部门名称",
|
||||
dataIndex: "departmentName",
|
||||
dataIndex: "departmentNameAfter",
|
||||
},
|
||||
{
|
||||
title: "岗位名称",
|
||||
dataIndex: "postName",
|
||||
dataIndex: "postIdAfter",
|
||||
},
|
||||
{
|
||||
title: "员工",
|
||||
dataIndex: "name",
|
||||
title: "员工状态",
|
||||
dataIndex: "status",
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
{record.employmentFlag === 1
|
||||
? "在职"
|
||||
: record.employmentFlag === 1
|
||||
? "离职"
|
||||
{record.status === 1
|
||||
? "待审批"
|
||||
: record.status === 2
|
||||
? "通过"
|
||||
: ""}
|
||||
</div>
|
||||
),
|
||||
|
|
@ -93,7 +69,7 @@ function List(props) {
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() =>
|
||||
props.history.push(`./ChangeView?id=${record.id}&type=record`)}
|
||||
props.history.push(`./ChangeView?id=${record.userChangeRecordId}&userId=${record.userId}`)}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Divider, message, Modal } from "antd";
|
||||
import { Button, Descriptions, Divider, Form, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
|
|
@ -9,57 +11,61 @@ import { NS_ENTERPRISE, NS_USER } from "~/enumerate/namespace";
|
|||
|
||||
function ChangeView(props) {
|
||||
const queryParams = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
const [info, setInfo] = useState({});
|
||||
const [handoverModalOpen, setHandoverModalOpen] = useState(false);
|
||||
const [departmentId, setDepartmentId] = useState();
|
||||
const [currentHandoverRecord, setCurrentHandoverRecord] = useState({});
|
||||
const [handoverUserInfo, setHandoverUserInfo] = useState({});
|
||||
|
||||
useEffect(() => {
|
||||
props["getChangerRecordInfoById"]({ corpinfoId: queryParams["corpinfoId"], userId: queryParams["id"] }).then((res) => {
|
||||
const getRecordInfo = () => {
|
||||
props["userChangeRecordgGtRecordInfoById"]({ userChangeRecordId: queryParams["id"], userId: queryParams["userId"] }).then((res) => {
|
||||
if (res.data) {
|
||||
setInfo(res.data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getRecordInfo();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async () => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确认后,该名员工的信息将处于离职状态,涉及的待完成相关工作,可能会受到异常。",
|
||||
onOk: () => {
|
||||
props["reviewStatus"]({
|
||||
corpinfoId: queryParams["corpinfoId"],
|
||||
employmentFlag: queryParams["employmentFlag"],
|
||||
reviewStatus: 2,
|
||||
userId: queryParams["id"],
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("审核成功");
|
||||
window.history.back();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
const handleReject = () => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定驳回吗?",
|
||||
onOk: () => {
|
||||
props["reviewStatus"]({
|
||||
corpinfoId: queryParams["corpinfoId"],
|
||||
employmentFlag: queryParams["employmentFlag"],
|
||||
reviewStatus: 3,
|
||||
userId: queryParams["id"],
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("驳回成功");
|
||||
window.history.back();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
const onOpenHandoverModal = (record) => {
|
||||
form.resetFields();
|
||||
setDepartmentId();
|
||||
setCurrentHandoverRecord(record || {});
|
||||
setHandoverUserInfo({});
|
||||
setHandoverModalOpen(true);
|
||||
};
|
||||
|
||||
const onGoBack = () => {
|
||||
window.history.back();
|
||||
const onCloseHandoverModal = () => {
|
||||
form.resetFields();
|
||||
setDepartmentId();
|
||||
setCurrentHandoverRecord({});
|
||||
setHandoverUserInfo({});
|
||||
setHandoverModalOpen(false);
|
||||
};
|
||||
|
||||
const onSubmitHandover = (values) => {
|
||||
const params = {
|
||||
handoverCompanyId: handoverUserInfo.corpinfoId || handoverUserInfo.corpInfoId,
|
||||
handoverCompanyName: handoverUserInfo.corpinfoName || handoverUserInfo.corpInfoName,
|
||||
handoverDepartmentId: handoverUserInfo.departmentId,
|
||||
handoverDepartmentName: handoverUserInfo.departmentName,
|
||||
handoverPostId: handoverUserInfo.postId,
|
||||
handoverPostName: handoverUserInfo.postName,
|
||||
handoverUserId: handoverUserInfo.id || values.userId,
|
||||
handoverUserName: handoverUserInfo.name,
|
||||
id: currentHandoverRecord.id,
|
||||
};
|
||||
|
||||
props["workChangeHandle"](params).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("交接成功");
|
||||
onCloseHandoverModal();
|
||||
getRecordInfo();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
@ -90,7 +96,15 @@ function ChangeView(props) {
|
|||
},
|
||||
{
|
||||
label: "员工状态",
|
||||
children: info.userStatusBefore,
|
||||
children: (
|
||||
<div>
|
||||
{info.userStatusBefore === 1
|
||||
? "待审批"
|
||||
: info.userStatusBefore === 2
|
||||
? "通过"
|
||||
: ""}
|
||||
</div>
|
||||
),
|
||||
|
||||
},
|
||||
]}
|
||||
|
|
@ -98,6 +112,7 @@ function ChangeView(props) {
|
|||
labelStyle={{
|
||||
width: 200,
|
||||
}}
|
||||
contentStyle={{ width: 500 }}
|
||||
/>
|
||||
<Divider orientation="left">变更后信息</Divider>
|
||||
<Descriptions
|
||||
|
|
@ -121,67 +136,123 @@ function ChangeView(props) {
|
|||
},
|
||||
{
|
||||
label: "员工状态",
|
||||
children: info.userStatusAfter,
|
||||
children: (
|
||||
<div>
|
||||
{info.userStatusAfter === 1
|
||||
? "待审批"
|
||||
: info.userStatusAfter === 2
|
||||
? "通过"
|
||||
: ""}
|
||||
</div>
|
||||
),
|
||||
|
||||
},
|
||||
{
|
||||
label: "变更时间",
|
||||
children: info.changeTime,
|
||||
contentStyle: { display: queryParams["type"] === "disposal" ? "none" : "" },
|
||||
labelStyle: { display: queryParams["type"] === "disposal" ? "none" : "" },
|
||||
|
||||
},
|
||||
]}
|
||||
column={2}
|
||||
labelStyle={{
|
||||
width: 200,
|
||||
}}
|
||||
contentStyle={{ width: 500 }}
|
||||
/>
|
||||
<Divider orientation="left">{queryParams["type"] === "disposal" ? "未完成工作" : "工作交接"}</Divider>
|
||||
<Divider orientation="left">{queryParams["type"] === "disposal" ? "工作交接情况" : "交接信息"}</Divider>
|
||||
<Table
|
||||
pagination={false}
|
||||
options={false}
|
||||
columns={[
|
||||
{
|
||||
title: "工作项目",
|
||||
dataIndex: "corpName",
|
||||
title: "工作类别",
|
||||
dataIndex: "workProject",
|
||||
},
|
||||
{
|
||||
title: "工作内容",
|
||||
dataIndex: "type",
|
||||
title: "待办事项",
|
||||
dataIndex: "workContent",
|
||||
},
|
||||
{
|
||||
title: "处理人",
|
||||
dataIndex: "departMentCount",
|
||||
hidden: queryParams["type"] === "disposal",
|
||||
dataIndex: "handoverUserName",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 200,
|
||||
hidden: queryParams["type"] !== "disposal",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
disabled={record.handoverStatus === 1}
|
||||
onClick={() => onOpenHandoverModal(record)}
|
||||
>
|
||||
交接
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
dataSource={info.userJobHandoverCOList}
|
||||
/>
|
||||
</Page>
|
||||
|
||||
{
|
||||
queryParams["type"] === "disposal"
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={handoverModalOpen}
|
||||
title="交接"
|
||||
width={900}
|
||||
confirmLoading={props.user?.enterpriseLoading}
|
||||
onOk={() => form.submit()}
|
||||
onCancel={onCloseHandoverModal}
|
||||
>
|
||||
<Form
|
||||
form={form}
|
||||
labelCol={{ span: 4 }}
|
||||
wrapperCol={{ span: 18 }}
|
||||
onFinish={onSubmitHandover}
|
||||
>
|
||||
<Form.Item
|
||||
name="departmentId"
|
||||
label="选择部门"
|
||||
rules={[{ required: true, message: "请选择部门" }]}
|
||||
>
|
||||
<DepartmentSelectTree
|
||||
placeholder="当前登录账号公司组织机构"
|
||||
onChange={(value) => {
|
||||
setDepartmentId(value);
|
||||
setHandoverUserInfo({});
|
||||
form.setFieldValue("userId", undefined);
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="userId"
|
||||
label="选择人员"
|
||||
rules={[{ required: true, message: "请选择人员" }]}
|
||||
>
|
||||
<PersonnelSelect
|
||||
|
||||
&& (
|
||||
<div style={{ textAlign: "center", height: 50, marginTop: 20 }} className="no-print">
|
||||
|
||||
<Button style={{ marginRight: 20 }} onClick={onGoBack}>
|
||||
取消
|
||||
</Button>
|
||||
|
||||
<Button key="reject" onClick={handleReject} style={{ marginRight: 20 }}>
|
||||
驳回
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
type="primary"
|
||||
|
||||
onClick={onSubmit}
|
||||
|
||||
>
|
||||
通过
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
onGetOption={(value) => {
|
||||
// 在这里 公司 部门 岗位 人员 取value里的这些字段
|
||||
// {
|
||||
// "id":"2008787570160480256"
|
||||
// "name": "股份_王雯仲",
|
||||
// "corpinfoId": "1976974388809424896",
|
||||
// "corpinfoName": "秦皇岛港股份有限公司",
|
||||
// "departmentId": "2008786394509651968",
|
||||
// "departmentName": "总经办",
|
||||
// "postId": "2008786566382211074",
|
||||
// "postName": "董事长助理",
|
||||
// }
|
||||
setHandoverUserInfo(value || {});
|
||||
}}
|
||||
params={{ departmentId }}
|
||||
placeholder="选择部门下人员、单选"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,15 +19,34 @@ const ENTERPRISE_TYPE = [
|
|||
bianma: 1,
|
||||
name: "集团单位",
|
||||
},
|
||||
{
|
||||
bianma: 2,
|
||||
name: "股份单位",
|
||||
},
|
||||
{
|
||||
bianma: 3,
|
||||
name: "普通企业",
|
||||
},
|
||||
{
|
||||
bianma: 4,
|
||||
name: "货主单位",
|
||||
},
|
||||
{
|
||||
bianma: 5,
|
||||
name: "驻港单位",
|
||||
},
|
||||
{
|
||||
bianma: 6,
|
||||
name: "物资中心",
|
||||
},
|
||||
];
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["corpUserMiddlePage"], {
|
||||
const { tableProps, getData } = useTable(props["userChangeRecordList"], {
|
||||
form,
|
||||
transform: (formData) => {
|
||||
return {
|
||||
...formData,
|
||||
enterpriseType: 2,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
@ -41,12 +60,7 @@ function List(props) {
|
|||
name: "name",
|
||||
label: "公司名称",
|
||||
},
|
||||
{
|
||||
name: "eqType",
|
||||
label: "企业类型",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_TYPE,
|
||||
},
|
||||
|
||||
]}
|
||||
onFinish={getData}
|
||||
/>
|
||||
|
|
@ -70,27 +84,27 @@ function List(props) {
|
|||
},
|
||||
{
|
||||
title: "部门数",
|
||||
dataIndex: "departMentCount",
|
||||
dataIndex: "departmentCount",
|
||||
},
|
||||
{
|
||||
title: "岗位数",
|
||||
dataIndex: "postCount",
|
||||
},
|
||||
{
|
||||
title: "用户数",
|
||||
title: "人员总数",
|
||||
dataIndex: "userCount",
|
||||
},
|
||||
{
|
||||
title: "中台人员存在数",
|
||||
dataIndex: "middleUserCount",
|
||||
title: "人资存在数",
|
||||
dataIndex: "rzUserCount",
|
||||
render: (_, record) => (
|
||||
<div>{record.middleUserCount ?? 0}</div>
|
||||
<div>{record.rzUserCount ?? 0}</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 200,
|
||||
// hidden: !(props.permission("qyyhzt-info")),
|
||||
hidden: !(props.permission("qyyhzt-info")),
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,17 @@ import { UseDecodeIdCard } from "~/utils";
|
|||
|
||||
const USER_TYPE = [
|
||||
{
|
||||
bianma: 1,
|
||||
bianma: "1",
|
||||
name: "在职",
|
||||
},
|
||||
{
|
||||
bianma: 2,
|
||||
bianma: "0",
|
||||
name: "离职",
|
||||
},
|
||||
{
|
||||
bianma: "2",
|
||||
name: "信息变更中",
|
||||
},
|
||||
];
|
||||
function List(props) {
|
||||
const [selectedNodeId, setSelectedNodeId] = useState();
|
||||
|
|
@ -32,14 +36,14 @@ function List(props) {
|
|||
const [currentId, setCurrentId] = useState("");
|
||||
const queryParams = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["userList"], {
|
||||
const { tableProps, getData } = useTable(props["pageByNopermission"], {
|
||||
form,
|
||||
usePermission: false,
|
||||
transform: (formData) => {
|
||||
return {
|
||||
...formData,
|
||||
eqDepartmentId: selectedNodeId,
|
||||
corpinfoId: queryParams["id"],
|
||||
eqCorpinfoId: queryParams["id"],
|
||||
noMain: 1,
|
||||
|
||||
};
|
||||
|
|
@ -68,7 +72,7 @@ function List(props) {
|
|||
return (
|
||||
<div>
|
||||
<Page
|
||||
headerTitle="列表"
|
||||
headerTitle="人员列表"
|
||||
isShowFooter={false}
|
||||
>
|
||||
<div
|
||||
|
|
@ -91,7 +95,7 @@ function List(props) {
|
|||
label: "姓名",
|
||||
},
|
||||
{
|
||||
name: "eqtype",
|
||||
name: "eqEmploymentFlag",
|
||||
label: "人员状态",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: USER_TYPE,
|
||||
|
|
@ -125,22 +129,29 @@ function List(props) {
|
|||
dataIndex: "phone",
|
||||
},
|
||||
{
|
||||
title: "中台是否存在",
|
||||
dataIndex: "name",
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
dataIndex: "name",
|
||||
title: "人资系统是否存在",
|
||||
dataIndex: "rzFlag",
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
{record.employmentFlag === 1
|
||||
? "在职"
|
||||
: record.employmentFlag === 1
|
||||
? "离职"
|
||||
{record.rzFlag === 1
|
||||
? "是"
|
||||
: record.rzFlag === 0
|
||||
? "否"
|
||||
: ""}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "人员状态",
|
||||
dataIndex: "employmentFlag",
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
{
|
||||
getLabelName({ list: USER_TYPE, status: record.employmentFlag })
|
||||
}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 180,
|
||||
|
|
@ -169,13 +180,12 @@ function List(props) {
|
|||
)
|
||||
}
|
||||
{
|
||||
props.permission("qyyuzt-info-disposal")
|
||||
&& (
|
||||
props.permission("qyyuzt-info-disposal") && record.employmentFlag === 2 && (
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() =>
|
||||
props.history.push(`./ChangeView?id=${record.id}&type=disposal`)}
|
||||
props.history.push(`./ChangeView?userId=${record.id}&type=disposal`)}
|
||||
>
|
||||
变更处置
|
||||
</Button>
|
||||
|
|
@ -234,6 +244,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
cancelText="关闭"
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ import FormBuilder from "zy-react-library/components/FormBuilder";
|
|||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import AreaSelect from "zy-react-library/components/SelectTree/Area";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
|
|
@ -33,8 +31,7 @@ const ENTERPRISE_TYPE = [
|
|||
];
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const [cityData, setCityData] = useState([]);
|
||||
// const [cityData, setCityData] = useState([]);
|
||||
const { tableProps, getData } = useTable(props["corpInfoList"], {
|
||||
form,
|
||||
transform: (formData) => {
|
||||
|
|
@ -43,11 +40,11 @@ function List(props) {
|
|||
enterpriseType: 3,
|
||||
geCreateTime: formData.CreateTime?.[0],
|
||||
leCreateTime: formData.CreateTime?.[1],
|
||||
eqProvince: formData.cityRecord?.[0],
|
||||
eqCity: formData.cityRecord?.[1],
|
||||
eqCountry: formData.cityRecord?.[2],
|
||||
eqStreet: formData.cityRecord?.[3],
|
||||
eqVillage: formData.cityRecord?.[4],
|
||||
// eqProvince: formData.cityRecord?.[0],
|
||||
// eqCity: formData.cityRecord?.[1],
|
||||
// eqCountry: formData.cityRecord?.[2],
|
||||
// eqStreet: formData.cityRecord?.[3],
|
||||
// eqVillage: formData.cityRecord?.[4],
|
||||
|
||||
};
|
||||
},
|
||||
|
|
@ -57,7 +54,7 @@ function List(props) {
|
|||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "是否重置密码为Aa@12345678?",
|
||||
content: "是否重置密码为Cc@12345678?",
|
||||
onOk: () => {
|
||||
props["corpInfoChangePassword"]({
|
||||
id,
|
||||
|
|
@ -71,37 +68,44 @@ function List(props) {
|
|||
});
|
||||
};
|
||||
|
||||
const onDelete = (id) => {
|
||||
const onDelete = () => {
|
||||
// Modal.confirm({
|
||||
// title: "提示",
|
||||
// content: "确定删除吗?",
|
||||
// onOk: () => {
|
||||
// props["corpInfoRemove"]({
|
||||
// id,
|
||||
// }).then((res) => {
|
||||
// if (res.success) {
|
||||
// message.success("删除成功");
|
||||
// getData();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// });
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定删除吗?",
|
||||
content: "删除请联系管理员操作!",
|
||||
onOk: () => {
|
||||
props["corpInfoRemove"]({
|
||||
id,
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
});
|
||||
};
|
||||
const onFinish = async () => {
|
||||
// 处理属地查询
|
||||
const arr = [];
|
||||
cityData.forEach((item) => {
|
||||
arr.push(item.value);
|
||||
});
|
||||
form.setFieldValue("cityRecord", arr);
|
||||
getData();
|
||||
};
|
||||
// const onFinish = async () => {
|
||||
// // 处理属地查询
|
||||
// const arr = [];
|
||||
// cityData.forEach((item) => {
|
||||
// arr.push(item.value);
|
||||
// });
|
||||
// form.setFieldValue("cityRecord", arr);
|
||||
// getData();
|
||||
// };
|
||||
|
||||
const onReset = () => {
|
||||
setCityData([]);
|
||||
|
||||
form.setFieldValue("cityRecord", []);
|
||||
};
|
||||
// const onReset = () => {
|
||||
// setCityData([]);
|
||||
//
|
||||
// form.setFieldValue("cityRecord", []);
|
||||
// };
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
|
|
@ -111,23 +115,23 @@ function List(props) {
|
|||
|
||||
<Search
|
||||
form={form}
|
||||
onFinish={() => onFinish()}
|
||||
onReset={onReset}
|
||||
onFinish={getData}
|
||||
// onReset={onReset}
|
||||
options={[
|
||||
{
|
||||
name: "likecorpName",
|
||||
label: "企业名称",
|
||||
},
|
||||
{
|
||||
name: "cityData",
|
||||
label: "属地",
|
||||
render: (
|
||||
<AreaSelect
|
||||
onGetNodePaths={nodes =>
|
||||
setCityData(nodes)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// name: "cityData",
|
||||
// label: "属地",
|
||||
// render: (
|
||||
// <AreaSelect
|
||||
// onGetNodePaths={nodes =>
|
||||
// setCityData(nodes)}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
{
|
||||
name: "CreateTime",
|
||||
label: "开户时间",
|
||||
|
|
@ -139,12 +143,12 @@ function List(props) {
|
|||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_TYPE,
|
||||
},
|
||||
{
|
||||
name: "cityRecord",
|
||||
label: "属地",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
onlyForLabel: true,
|
||||
},
|
||||
// {
|
||||
// name: "cityRecord",
|
||||
// label: "属地",
|
||||
// render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
// onlyForLabel: true,
|
||||
// },
|
||||
|
||||
]}
|
||||
|
||||
|
|
@ -174,18 +178,19 @@ function List(props) {
|
|||
title: "企业名称",
|
||||
dataIndex: "corpName",
|
||||
},
|
||||
{
|
||||
title: "属地",
|
||||
dataIndex: "cityName",
|
||||
width: 300,
|
||||
render: (_, record) => (
|
||||
<div>{getAreaNamePath(record)}</div>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// title: "属地",
|
||||
// dataIndex: "cityName",
|
||||
// width: 300,
|
||||
// render: (_, record) => (
|
||||
// <div>{getAreaNamePath(record)}</div>
|
||||
// ),
|
||||
// },
|
||||
{
|
||||
title: "创建单位",
|
||||
dataIndex: "createName",
|
||||
dataIndex: "tenantName",
|
||||
},
|
||||
|
||||
{
|
||||
title: "开户人",
|
||||
dataIndex: "accountContactName",
|
||||
|
|
@ -243,6 +248,21 @@ function List(props) {
|
|||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() =>
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "请联系管理员操作!",
|
||||
onOk: () => {
|
||||
|
||||
},
|
||||
})}
|
||||
>
|
||||
修改企业名称
|
||||
</Button>
|
||||
|
||||
{props.permission("gszhxxgl-resetPassword")
|
||||
&& (
|
||||
<Button
|
||||
|
|
@ -279,6 +299,8 @@ function List(props) {
|
|||
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
||||
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
||||
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
||||
|
||||
loding={props.enterprise.userLoading}
|
||||
onCancel={() => {
|
||||
setAddModalOpen(false);
|
||||
setCurrentId("");
|
||||
|
|
@ -294,7 +316,7 @@ function AddModalComponent(props) {
|
|||
const [corpNameValue, setCorpNameValue] = useState("");
|
||||
const debouncedCode = useDebounce(codeValue, 600);
|
||||
const debouncedCorpName = useDebounce(corpNameValue, 600);
|
||||
const [selectfromData, setSelectfromData] = useState([]);
|
||||
// const [selectfromData, setSelectfromData] = useState([]);
|
||||
useEffect(() => {
|
||||
if (props.currentId) {
|
||||
props
|
||||
|
|
@ -302,13 +324,13 @@ function AddModalComponent(props) {
|
|||
id: props.currentId,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data && res.data.selectfromList) {
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
|
@ -318,18 +340,18 @@ function AddModalComponent(props) {
|
|||
props.onCancel();
|
||||
};
|
||||
const onSubmit = async (values) => {
|
||||
const arr = [];
|
||||
values.selectfromList.forEach((item) => {
|
||||
selectfromData.forEach((row) => {
|
||||
if (item === row.dictValue) {
|
||||
arr.push({
|
||||
itemName: row.dictLabel,
|
||||
itemCode: row.dictValue,
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
values.selectfromList = arr;
|
||||
// const arr = [];
|
||||
// values.selectfromList.forEach((item) => {
|
||||
// selectfromData.forEach((row) => {
|
||||
// if (item === row.dictValue) {
|
||||
// arr.push({
|
||||
// itemName: row.dictLabel,
|
||||
// itemCode: row.dictValue,
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// values.selectfromList = arr;
|
||||
|
||||
if (props.currentId) {
|
||||
values.id = props.currentId;
|
||||
|
|
@ -405,11 +427,14 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
onOk={form.submit}
|
||||
onCancel={onCancel}
|
||||
|
||||
loading={props.loading}
|
||||
>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
|
|
@ -417,11 +442,16 @@ function AddModalComponent(props) {
|
|||
options={[
|
||||
{
|
||||
name: "corpName",
|
||||
label: "单位名称",
|
||||
label: "企业名称",
|
||||
required: !props.currentId,
|
||||
componentProps: {
|
||||
disabled: props.currentId,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "code",
|
||||
label: "统一社会信用代码",
|
||||
required: false,
|
||||
rules: [
|
||||
{
|
||||
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
|
||||
|
|
@ -429,46 +459,50 @@ function AddModalComponent(props) {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "ecoType",
|
||||
label: "经济类型",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="ECO_TYPE"
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("ecoTypeName", label);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "ecoTypeName",
|
||||
label: "经济类型名称",
|
||||
onlyForLabel: true,
|
||||
},
|
||||
// {
|
||||
// name: "ecoType",
|
||||
// label: "经济类型",
|
||||
// required: false,
|
||||
// render: (
|
||||
// <DictionarySelect
|
||||
// dictValue="ECO_TYPE"
|
||||
// onGetLabel={(label) => {
|
||||
// form.setFieldValue("ecoTypeName", label);
|
||||
// }}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
// {
|
||||
// name: "ecoTypeName",
|
||||
// label: "经济类型名称",
|
||||
// onlyForLabel: true,
|
||||
// },
|
||||
{
|
||||
name: "type",
|
||||
label: "相关方类型",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_TYPE,
|
||||
componentProps: {
|
||||
disabled: props.currentId,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "selectfromList",
|
||||
label: "选取形式",
|
||||
|
||||
render: (
|
||||
<DictionarySelect
|
||||
mode="multiple"
|
||||
dictValue="select_from_List"
|
||||
idKey="dictValue"
|
||||
nameKey="dictLabel"
|
||||
onGetData={(data) => {
|
||||
setSelectfromData(data);
|
||||
}}
|
||||
|
||||
/>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// name: "selectfromList",
|
||||
// label: "选取形式",
|
||||
//
|
||||
// render: (
|
||||
// <DictionarySelect
|
||||
// mode="multiple"
|
||||
// dictValue="select_from_List"
|
||||
// idKey="dictValue"
|
||||
// nameKey="dictLabel"
|
||||
// onGetData={(data) => {
|
||||
// setSelectfromData(data);
|
||||
// }}
|
||||
//
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
]}
|
||||
labelCol={{
|
||||
span: 10,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
|||
import { getLabelName } from "zy-react-library/utils";
|
||||
|
||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
||||
import { getAreaNamePath, getCorpTypeNamePath } from "~/utils";
|
||||
// import { getAreaNamePath, getCorpTypeNamePath } from "~/utils";
|
||||
|
||||
const ENTERPRISE_TYPE = [
|
||||
{
|
||||
|
|
@ -42,14 +42,14 @@ function View(props) {
|
|||
const res = await props.corpInfoDetails({
|
||||
id: queryParams["id"],
|
||||
});
|
||||
const arr = [];
|
||||
|
||||
res.data.selectfromList && res.data.selectfromList.forEach((item) => {
|
||||
arr.push(item.itemName);
|
||||
});
|
||||
if (arr.length > 0) {
|
||||
res.data.selectfromList = arr.join(",");
|
||||
}
|
||||
// const arr = [];
|
||||
//
|
||||
// res.data.selectfromList && res.data.selectfromList.forEach((item) => {
|
||||
// arr.push(item.itemName);
|
||||
// });
|
||||
// if (arr.length > 0) {
|
||||
// res.data.selectfromList = arr.join(",");
|
||||
// }
|
||||
|
||||
const licenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
|
||||
|
|
@ -102,34 +102,41 @@ function View(props) {
|
|||
label: "统一社会信用代码",
|
||||
children: info.code,
|
||||
},
|
||||
|
||||
{
|
||||
label: "属地",
|
||||
children: <div>{getAreaNamePath(info)}</div>,
|
||||
},
|
||||
|
||||
{
|
||||
label: "所属行业",
|
||||
children: <div>{getCorpTypeNamePath(info)}</div>,
|
||||
},
|
||||
|
||||
{
|
||||
label: "经济类型",
|
||||
children: info.ecoTypeName,
|
||||
label: "开户银行",
|
||||
children: info.depositBank,
|
||||
},
|
||||
{
|
||||
label: "经度/纬度",
|
||||
children: info.longitude && `${info.longitude}/${info.latitude}`,
|
||||
label: "开户银行账号",
|
||||
children: info.depositBankAccount,
|
||||
},
|
||||
// {
|
||||
// label: "属地",
|
||||
// children: <div>{getAreaNamePath(info)}</div>,
|
||||
// },
|
||||
//
|
||||
// {
|
||||
// label: "所属行业",
|
||||
// children: <div>{getCorpTypeNamePath(info)}</div>,
|
||||
// },
|
||||
//
|
||||
// {
|
||||
// label: "经济类型",
|
||||
// children: info.ecoTypeName,
|
||||
// },
|
||||
// {
|
||||
// label: "经度/纬度",
|
||||
// children: info.longitude && `${info.longitude}/${info.latitude}`,
|
||||
// },
|
||||
|
||||
{
|
||||
label: "单位经营地址",
|
||||
children: info.addressBusiness,
|
||||
},
|
||||
{
|
||||
label: "企业规模",
|
||||
children: info.scaleName,
|
||||
},
|
||||
// {
|
||||
// label: "企业规模",
|
||||
// children: info.scaleName,
|
||||
// },
|
||||
|
||||
{
|
||||
label: "法定代表人",
|
||||
|
|
@ -189,10 +196,10 @@ function View(props) {
|
|||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "成立日期",
|
||||
children: info.createDate,
|
||||
},
|
||||
// {
|
||||
// label: "成立日期",
|
||||
// children: info.createDate,
|
||||
// },
|
||||
{
|
||||
label: "职工人数(人)",
|
||||
children: info.employees,
|
||||
|
|
@ -202,13 +209,29 @@ function View(props) {
|
|||
// children: info.areaCovered,
|
||||
// },
|
||||
|
||||
// {
|
||||
// label: "注册资金(万元)",
|
||||
// children: info.regcapital,
|
||||
// },
|
||||
// {
|
||||
// label: "资产总额(万元)",
|
||||
// children: info.totalAssets,
|
||||
// },
|
||||
|
||||
{
|
||||
label: "注册资金(万元)",
|
||||
children: info.regcapital,
|
||||
label: "相关方类型",
|
||||
children: getLabelName({
|
||||
status: info.type,
|
||||
list: ENTERPRISE_TYPE,
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: "资产总额(万元)",
|
||||
children: info.totalAssets,
|
||||
label: "创建单位",
|
||||
children: info.tenantName,
|
||||
},
|
||||
{
|
||||
label: "经营范围",
|
||||
children: info.natureBusiness,
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -224,27 +247,17 @@ function View(props) {
|
|||
</Button>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "相关方类型",
|
||||
children: getLabelName({
|
||||
status: info.type,
|
||||
list: ENTERPRISE_TYPE,
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: "创建单位",
|
||||
children: info.createName,
|
||||
},
|
||||
{
|
||||
label: "选取形式",
|
||||
children: info.selectfromList,
|
||||
},
|
||||
// {
|
||||
// label: "选取形式",
|
||||
// children: info.selectfromList,
|
||||
// },
|
||||
]}
|
||||
column={2}
|
||||
loding={getFileLoading}
|
||||
labelStyle={{
|
||||
width: 200,
|
||||
}}
|
||||
|
||||
/>
|
||||
<Divider orientation="left">营业执照</Divider>
|
||||
<Descriptions
|
||||
|
|
@ -255,16 +268,16 @@ function View(props) {
|
|||
label: "营业执照",
|
||||
children: <PreviewImg files={info.licenseFile} />,
|
||||
},
|
||||
{
|
||||
label: "营业执照有效期",
|
||||
children: info.licenseStart ? ` ${info.licenseStart} 至 ${info.licenseEnd}` : "",
|
||||
},
|
||||
// {
|
||||
// label: "营业执照有效期",
|
||||
// children: info.licenseStart ? ` ${info.licenseStart} 至 ${info.licenseEnd}` : "",
|
||||
// },
|
||||
]}
|
||||
column={2}
|
||||
labelStyle={{
|
||||
width: 200,
|
||||
width: 185,
|
||||
}}
|
||||
contentStyle={{ width: "40%" }}
|
||||
|
||||
/>
|
||||
</div>
|
||||
{corpInfoQrCodeOpen && (
|
||||
|
|
@ -277,6 +290,8 @@ function View(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
@ -324,6 +339,7 @@ function View(props) {
|
|||
const CorpInfoQrCode = (props) => {
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="企业二维码"
|
||||
footer={[
|
||||
|
|
|
|||
|
|
@ -287,6 +287,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -315,6 +315,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -30,36 +30,36 @@ const ENTERPRISE_TYPE = [
|
|||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const [cityData, setCityData] = useState([]);
|
||||
// const [cityData, setCityData] = useState([]);
|
||||
const { tableProps, getData } = useTable(props["corpUserMiddlePage"], {
|
||||
form,
|
||||
transform: (formData) => {
|
||||
return {
|
||||
...formData,
|
||||
enterpriseType: 3,
|
||||
eqProvince: formData.cityRecord?.[0],
|
||||
eqCity: formData.cityRecord?.[1],
|
||||
eqCountry: formData.cityRecord?.[2],
|
||||
eqStreet: formData.cityRecord?.[3],
|
||||
eqVillage: formData.cityRecord?.[4],
|
||||
// eqProvince: formData.cityRecord?.[0],
|
||||
// eqCity: formData.cityRecord?.[1],
|
||||
// eqCountry: formData.cityRecord?.[2],
|
||||
// eqStreet: formData.cityRecord?.[3],
|
||||
// eqVillage: formData.cityRecord?.[4],
|
||||
};
|
||||
},
|
||||
});
|
||||
const onFinish = async () => {
|
||||
// 处理属地查询
|
||||
const arr = [];
|
||||
cityData.forEach((item) => {
|
||||
arr.push(item.value);
|
||||
});
|
||||
form.setFieldValue("cityRecord", arr);
|
||||
getData();
|
||||
};
|
||||
// const onFinish = async () => {
|
||||
// // 处理属地查询
|
||||
// const arr = [];
|
||||
// cityData.forEach((item) => {
|
||||
// arr.push(item.value);
|
||||
// });
|
||||
// form.setFieldValue("cityRecord", arr);
|
||||
// getData();
|
||||
// };
|
||||
|
||||
const onReset = () => {
|
||||
setCityData([]);
|
||||
|
||||
form.setFieldValue("cityRecord", []);
|
||||
};
|
||||
// const onReset = () => {
|
||||
// setCityData([]);
|
||||
//
|
||||
// form.setFieldValue("cityRecord", []);
|
||||
// };
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
|
|
@ -68,30 +68,30 @@ function List(props) {
|
|||
>
|
||||
<Search
|
||||
form={form}
|
||||
onFinish={() => onFinish()}
|
||||
onReset={onReset}
|
||||
onFinish={getData}
|
||||
// onReset={onReset}
|
||||
options={[
|
||||
{
|
||||
name: "likeCorpName",
|
||||
label: "企业名称",
|
||||
},
|
||||
{
|
||||
name: "cityData",
|
||||
label: "属地",
|
||||
render: (
|
||||
<AreaSelect
|
||||
onGetNodePaths={nodes =>
|
||||
setCityData(nodes)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// name: "cityData",
|
||||
// label: "属地",
|
||||
// render: (
|
||||
// <AreaSelect
|
||||
// onGetNodePaths={nodes =>
|
||||
// setCityData(nodes)}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
{ name: "eqType", label: "相关方类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_TYPE },
|
||||
{
|
||||
name: "cityRecord",
|
||||
label: "属地",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
onlyForLabel: true,
|
||||
},
|
||||
// {
|
||||
// name: "cityRecord",
|
||||
// label: "属地",
|
||||
// render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
// onlyForLabel: true,
|
||||
// },
|
||||
]}
|
||||
/>
|
||||
<Table
|
||||
|
|
@ -112,13 +112,13 @@ function List(props) {
|
|||
),
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: "属地",
|
||||
dataIndex: "cityName",
|
||||
render: (_, record) => (
|
||||
<div>{getAreaNamePath(record)}</div>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// title: "属地",
|
||||
// dataIndex: "cityName",
|
||||
// render: (_, record) => (
|
||||
// <div>{getAreaNamePath(record)}</div>
|
||||
// ),
|
||||
// },
|
||||
{
|
||||
title: "创建单位",
|
||||
dataIndex: "tenantName",
|
||||
|
|
|
|||
|
|
@ -1,21 +1,18 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, Input, message, Modal, Space } from "antd";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import LeftTree from "zy-react-library/components/LeftTree/Department/Gwj/index";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
|
||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
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 XgfUserInfo from "~/components/XgfUserInfo";
|
||||
import { NS_USER } from "~/enumerate/namespace";
|
||||
import { UseDecodeIdCard } from "~/utils";
|
||||
|
||||
function List(props) {
|
||||
const [selectedNodeId, setSelectedNodeId] = useState();
|
||||
|
|
@ -38,18 +35,18 @@ function List(props) {
|
|||
const FLOW_USER_TYPE = [
|
||||
{
|
||||
name: "流动人员",
|
||||
bianma: 1,
|
||||
bianma: "1",
|
||||
},
|
||||
{
|
||||
name: "非流动人员",
|
||||
bianma: 0,
|
||||
bianma: "0",
|
||||
},
|
||||
];
|
||||
|
||||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定要重置密码为Aa@12345678吗?",
|
||||
content: "确定要重置密码为Cc@12345678吗?",
|
||||
onOk: () => {
|
||||
props["userChangePassword"]({
|
||||
id,
|
||||
|
|
@ -109,7 +106,7 @@ function List(props) {
|
|||
label: "姓名",
|
||||
},
|
||||
{
|
||||
name: "eqEmploymentFlag",
|
||||
name: "eqFlowFlag",
|
||||
label: "人员类型",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: FLOW_USER_TYPE,
|
||||
|
|
@ -133,7 +130,11 @@ function List(props) {
|
|||
},
|
||||
{
|
||||
title: "人员类型",
|
||||
dataIndex: "personnelTypeName",
|
||||
dataIndex: "flowFlag",
|
||||
|
||||
render: (_, record) => (
|
||||
record.flowFlag === 1 ? "流动人员" : record.flowFlag === 0 ? "非流动人员" : ""
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -175,7 +176,7 @@ function List(props) {
|
|||
</div>
|
||||
</div>
|
||||
{addModalOpen && (
|
||||
<AddModal
|
||||
<XgfUserInfo
|
||||
open={addModalOpen}
|
||||
getData={getData}
|
||||
currentId={currentId}
|
||||
|
|
@ -192,235 +193,4 @@ function List(props) {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function AddModalComponent(props) {
|
||||
const [form] = Form.useForm();
|
||||
const [info, setInfo] = useState({});
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||
const [viewType, setViewType] = useState(false);
|
||||
const [viewData, setViewData] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (props.currentId) {
|
||||
const fetchData = async () => {
|
||||
const res = await props.requestDetails({
|
||||
id: props.currentId,
|
||||
});
|
||||
const userImg = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
const cardImg = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
||||
eqForeignKey: res.data.userId,
|
||||
});
|
||||
res.data.userImg = userImg;
|
||||
res.data.cardImg = cardImg;
|
||||
|
||||
setInfo(res.data);
|
||||
};
|
||||
fetchData();
|
||||
}
|
||||
}, [props.currentId]);
|
||||
const onCancel = () => {
|
||||
form.resetFields();
|
||||
props.onCancel();
|
||||
};
|
||||
const handleOk = async () => {
|
||||
const values = await form.validateFields();
|
||||
|
||||
const { data } = await props.requestGetEncryInfo({ id: props.currentId, password: values.password });
|
||||
if (data) {
|
||||
if (viewType === "phone") {
|
||||
setViewData(data.phone);
|
||||
}
|
||||
else {
|
||||
setViewData(data.userIdCard);
|
||||
}
|
||||
}
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
open={props.open}
|
||||
title="查看"
|
||||
cancelText="关闭"
|
||||
width={1200}
|
||||
okButtonProps={{
|
||||
style: {
|
||||
display: "none",
|
||||
},
|
||||
}}
|
||||
onOk={form.submit}
|
||||
onCancel={onCancel}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
padding: 20,
|
||||
}}
|
||||
>
|
||||
<Descriptions
|
||||
bordered
|
||||
items={[
|
||||
{
|
||||
label: "人脸照片",
|
||||
children: <PreviewImg files={info.userImg} />,
|
||||
},
|
||||
{
|
||||
label: "身份证照片",
|
||||
children: <PreviewImg files={info.cardImg} />,
|
||||
},
|
||||
// {
|
||||
// label: "用户角色",
|
||||
// children: getLabelName({
|
||||
// status: info.roleId,
|
||||
// list: rolesData,
|
||||
// idKey: "id",
|
||||
// nameKey: "roleName",
|
||||
// }),
|
||||
// },
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
},
|
||||
{
|
||||
label: "性别",
|
||||
children: info.sex,
|
||||
},
|
||||
|
||||
{
|
||||
label: "出生年月",
|
||||
children: info.birthday,
|
||||
},
|
||||
{
|
||||
label: "年龄",
|
||||
children: info.age,
|
||||
},
|
||||
{
|
||||
label: "手机号",
|
||||
children: (
|
||||
<div>
|
||||
|
||||
{info.phone}
|
||||
{/* {info.phone */}
|
||||
{/* && ( */}
|
||||
{/* <Button */}
|
||||
{/* type="link" */}
|
||||
{/* onClick={() => { */}
|
||||
{/* setIsModalOpen(true); */}
|
||||
{/* setViewType("phone"); */}
|
||||
{/* setViewData(""); */}
|
||||
{/* form.resetFields(); */}
|
||||
{/* }} */}
|
||||
{/* > */}
|
||||
{/* 点击查看 */}
|
||||
{/* </Button> */}
|
||||
{/* )} */}
|
||||
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "身份证号",
|
||||
children: (
|
||||
<div>
|
||||
{UseDecodeIdCard(info.userIdCard) }
|
||||
{/* { info.userIdCard */}
|
||||
{/* && ( */}
|
||||
{/* <Button */}
|
||||
{/* type="link" */}
|
||||
{/* onClick={() => { */}
|
||||
{/* setIsModalOpen(true); */}
|
||||
{/* setViewType("userIdCard"); */}
|
||||
{/* form.resetFields(); */}
|
||||
{/* setViewData(""); */}
|
||||
{/* }} */}
|
||||
{/* > */}
|
||||
{/* 点击查看 */}
|
||||
{/* </Button> */}
|
||||
{/* )} */}
|
||||
</div>
|
||||
),
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
label: "民族",
|
||||
children: info.nationName,
|
||||
},
|
||||
{
|
||||
label: "婚姻状况",
|
||||
children: info.maritalStatusName,
|
||||
},
|
||||
{
|
||||
label: "政治面貌",
|
||||
children: info.politicalAffiliationName,
|
||||
},
|
||||
{
|
||||
label: "户口所在地",
|
||||
children: info.locationAddress,
|
||||
},
|
||||
{
|
||||
label: "现住址",
|
||||
children: info.currentAddress,
|
||||
},
|
||||
{
|
||||
label: "文化程度",
|
||||
children: info.culturalLevelName,
|
||||
},
|
||||
{
|
||||
label: "岗位名称",
|
||||
children: info.postName,
|
||||
},
|
||||
]}
|
||||
column={2}
|
||||
labelStyle={{
|
||||
width: 200,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
onCancel={() => setIsModalOpen(false)}
|
||||
>
|
||||
<Form
|
||||
name="basic"
|
||||
form={form}
|
||||
>
|
||||
<Form.Item
|
||||
label="请输入登录密码"
|
||||
name="password"
|
||||
hidden={
|
||||
viewData
|
||||
}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="手机号"
|
||||
hidden={!(viewType === "phone" && viewData)}
|
||||
>
|
||||
{viewData}
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="身份证号"
|
||||
hidden={!(viewType === "userIdCard" && viewData)}
|
||||
>
|
||||
{viewData}
|
||||
</Form.Item>
|
||||
|
||||
</Form>
|
||||
</Modal>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
const AddModal = AddModalComponent;
|
||||
export default Connect([NS_USER], true)(Permission(List));
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ function Update(props) {
|
|||
<FormBuilder
|
||||
form={form}
|
||||
|
||||
confirmLoading={
|
||||
loading={
|
||||
|
||||
props.enterprise.enterpriseLoading
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,9 +192,10 @@ function Department(props) {
|
|||
<Button
|
||||
block
|
||||
type="link"
|
||||
title={record.name}
|
||||
onClick={() => handleTableNodeClick(record)}
|
||||
>
|
||||
{`${record.name}>`}
|
||||
{`${record.name.length > 25 ? `${record.name.slice(0, 25)}...` : record.name}>`}
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
|
|
@ -269,6 +270,7 @@ function Department(props) {
|
|||
{chartModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={chartModalOpen}
|
||||
title="组织架构图"
|
||||
width="80%"
|
||||
|
|
@ -327,6 +329,7 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,15 @@ function Add(props) {
|
|||
fetchData();
|
||||
}
|
||||
props["rolesAll"]({ pageIndex: 1, pageSize: 1000 }).then((res) => {
|
||||
setRolesData(res.data);
|
||||
const arr = [];
|
||||
if (res.data && res.data.length > 0) {
|
||||
res.data.forEach((item) => {
|
||||
if (item.roleGroupId === "2008482924409827329") {
|
||||
arr.push(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
setRolesData(arr);
|
||||
});
|
||||
}, []);
|
||||
const onSubmit = async (values) => {
|
||||
|
|
@ -270,7 +278,7 @@ function Add(props) {
|
|||
values={{
|
||||
departmentLeaderFlag: 0,
|
||||
}}
|
||||
confirmLoading={uploadFileLoading || props.user.userLoading}
|
||||
loading={uploadFileLoading || props.user.userLoading}
|
||||
options={[
|
||||
{
|
||||
name: "roleId",
|
||||
|
|
@ -314,6 +322,9 @@ function Add(props) {
|
|||
{
|
||||
name: "name",
|
||||
label: "姓名",
|
||||
componentProps: {
|
||||
maxLength: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "phone",
|
||||
|
|
@ -386,7 +397,7 @@ function Add(props) {
|
|||
fontSize: 12,
|
||||
}}
|
||||
>
|
||||
<div>* 图像格式:JPG、JPEG、PNG</div>
|
||||
<div>* 图像格式:jpg、jpeg、png</div>
|
||||
<div>* 图像大小:不超过4M。</div>
|
||||
<div>* 照片大小: 推荐 500*500</div>
|
||||
<div>* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图</div>
|
||||
|
|
|
|||
|
|
@ -292,7 +292,6 @@ function List(props) {
|
|||
render: (_, record) => (
|
||||
<div>
|
||||
{
|
||||
|
||||
getLabelName({
|
||||
status: String(record.employmentFlag),
|
||||
list: employmentFlagData,
|
||||
|
|
@ -411,11 +410,16 @@ function AddModalComponent(props) {
|
|||
const res = await props.requestDetails({
|
||||
id: props.currentId,
|
||||
});
|
||||
res.data.userAvatarUrl = [
|
||||
{
|
||||
filePath: res.data.userAvatarUrl,
|
||||
},
|
||||
];
|
||||
if (res.data && res.data.userAvatarUrl) {
|
||||
res.data.userAvatarUrl = [
|
||||
{
|
||||
filePath: res.data.userAvatarUrl,
|
||||
},
|
||||
];
|
||||
}
|
||||
else {
|
||||
res.data.userAvatarUrl = [];
|
||||
}
|
||||
setInfo(res.data);
|
||||
};
|
||||
fetchData();
|
||||
|
|
@ -442,6 +446,7 @@ function AddModalComponent(props) {
|
|||
<>
|
||||
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
width={1200}
|
||||
|
|
@ -486,10 +491,10 @@ function AddModalComponent(props) {
|
|||
label: "所属岗位",
|
||||
children: info.postName,
|
||||
},
|
||||
{
|
||||
label: "用户名",
|
||||
children: info.username,
|
||||
},
|
||||
// {
|
||||
// label: "用户名",
|
||||
// children: info.username,
|
||||
// },
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
|
|
@ -580,6 +585,7 @@ function AddModalComponent(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,103 @@
|
|||
import { useEffect, useRef, useState } from "react";
|
||||
|
||||
/**
|
||||
* 校验中国大陆18位身份证号
|
||||
* 包含地址码、年份(18/19/20开头)、月份、日期、顺序码和校验位
|
||||
* @param {string} idCard
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isValidChineseIdCard(idCard) {
|
||||
if (!idCard || typeof idCard !== "string") {
|
||||
return false;
|
||||
}
|
||||
|
||||
const value = idCard.trim();
|
||||
if (!isValidChineseIdCardFormat(value)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
|
||||
const checkCodeMap = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"];
|
||||
const sum = value
|
||||
.substring(0, 17)
|
||||
.split("")
|
||||
.reduce((total, num, index) => total + Number(num) * weights[index], 0);
|
||||
|
||||
return checkCodeMap[sum % 11] === value[17].toUpperCase();
|
||||
}
|
||||
|
||||
export function isValidChineseIdCardFormat(idCard) {
|
||||
if (!idCard || typeof idCard !== "string") {
|
||||
return false;
|
||||
}
|
||||
|
||||
const value = idCard.trim();
|
||||
const pattern = /^[1-9][0-9]{5}(18|19|20)[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])[0-9]{3}[0-9Xx]$/;
|
||||
|
||||
if (!pattern.test(value)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const year = Number.parseInt(value.substring(6, 10), 10);
|
||||
const month = Number.parseInt(value.substring(10, 12), 10);
|
||||
const day = Number.parseInt(value.substring(12, 14), 10);
|
||||
const date = new Date(year, month - 1, day);
|
||||
|
||||
return (
|
||||
date.getFullYear() === year
|
||||
&& date.getMonth() === month - 1
|
||||
&& date.getDate() === day
|
||||
);
|
||||
}
|
||||
|
||||
export function getChineseIdCardInputErrorMessage(idCard) {
|
||||
if (!idCard || typeof idCard !== "string") {
|
||||
return "";
|
||||
}
|
||||
|
||||
const value = idCard.trim();
|
||||
|
||||
if (!/^[0-9Xx]*$/.test(value)) {
|
||||
return "身份证号只能输入数字或X";
|
||||
}
|
||||
|
||||
if (value.length > 18) {
|
||||
return "身份证号长度不能超过18位";
|
||||
}
|
||||
|
||||
if (value.length < 18) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (!isValidChineseIdCardFormat(value)) {
|
||||
return "请输入正确的18位身份证号";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
export function getChineseIdCardFullErrorMessage(idCard) {
|
||||
const inputErrorMessage = getChineseIdCardInputErrorMessage(idCard);
|
||||
if (inputErrorMessage) {
|
||||
return inputErrorMessage;
|
||||
}
|
||||
|
||||
if (!idCard || typeof idCard !== "string") {
|
||||
return "";
|
||||
}
|
||||
|
||||
const value = idCard.trim();
|
||||
if (value.length < 18) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (!isValidChineseIdCard(value)) {
|
||||
return "身份证校验位不正确";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据身份证号计算年龄
|
||||
* @param {string} idCard - 18位身份证号码
|
||||
|
|
|
|||
Loading…
Reference in New Issue