Compare commits
No commits in common. "04beb13b51d896a24094595264872e0fd5e6dab0" and "e5909ef86473c2027689639203ccbe8ab7150d9c" have entirely different histories.
04beb13b51
...
e5909ef864
|
|
@ -11,5 +11,4 @@ npm-debug.log*
|
|||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.idea
|
||||
yarn.lock
|
||||
basicInfo.zip
|
||||
yarn.lock
|
||||
|
|
@ -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,7 +29,6 @@ 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: {
|
||||
|
|
@ -49,7 +48,7 @@ module.exports = {
|
|||
// 开发服务
|
||||
server: {
|
||||
// 监听端口号
|
||||
port: "8089",
|
||||
port: "8088",
|
||||
// 服务地址
|
||||
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.2.3"
|
||||
"zy-react-library": "^1.1.10"
|
||||
},
|
||||
"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/basicList",
|
||||
"Post > @/basicInfo/corpInfo/list",
|
||||
);
|
||||
export const corpInfoDetails = declareRequest(
|
||||
"enterpriseLoading",
|
||||
|
|
@ -40,11 +40,6 @@ export const corpUserMiddlePage = declareRequest(
|
|||
"enterpriseLoading",
|
||||
"Post > @/basicInfo/corpInfo/corpUserMiddlePage",
|
||||
);
|
||||
export const userChangeRecordList = declareRequest(
|
||||
"enterpriseLoading",
|
||||
"Post > @/basicInfo/userChangeRecord/userCorpInfoList",
|
||||
);
|
||||
|
||||
|
||||
// 获取当前登录人信息
|
||||
export const userGetInfo = declareRequest(
|
||||
|
|
|
|||
|
|
@ -90,19 +90,3 @@ 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);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,342 +0,0 @@
|
|||
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,7 +2,6 @@ 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";
|
||||
|
||||
|
|
@ -13,10 +12,9 @@ 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,7 +181,6 @@ 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,7 +275,6 @@ function Info(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ function Update(props) {
|
|||
whetherLiquidammoniaFlag: 0,
|
||||
whetherPipelineFlag: 0,
|
||||
}}
|
||||
loading={
|
||||
confirmLoading={
|
||||
deleteFileLoading
|
||||
|| uploadFileLoading
|
||||
|| getFileLoading
|
||||
|
|
@ -467,7 +467,7 @@ function Update(props) {
|
|||
items: WHETHER_ENUM,
|
||||
},
|
||||
{
|
||||
label: "单位经营地址",
|
||||
label: "企事业单位经营地址",
|
||||
name: "addressBusiness",
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,10 +19,6 @@ const ENTERPRISE_TYPE = [
|
|||
bianma: 1,
|
||||
name: "集团单位",
|
||||
},
|
||||
{
|
||||
bianma: 6,
|
||||
name: "物资中心",
|
||||
},
|
||||
];
|
||||
function ChangeList(props) {
|
||||
const [form] = Form.useForm();
|
||||
|
|
|
|||
|
|
@ -217,7 +217,6 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
cancelText="关闭"
|
||||
|
|
|
|||
|
|
@ -157,13 +157,11 @@ function OrganizationStructure(props) {
|
|||
<Button
|
||||
block
|
||||
type="link"
|
||||
title={record.name}
|
||||
onClick={() => handleTableNodeClick(record)}
|
||||
>
|
||||
{`${record.name.length > 25 ? `${record.name.slice(0, 25)}...` : record.name}>`}
|
||||
{`${record.name}>`}
|
||||
</Button>
|
||||
),
|
||||
|
||||
},
|
||||
{ title: "部门负责人", dataIndex: "departmentUserLeaderList" },
|
||||
{ title: "部门级别", dataIndex: "levelName" },
|
||||
|
|
@ -274,7 +272,6 @@ function AddModalComponent(props) {
|
|||
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -222,7 +222,6 @@ 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 { useDebounce } from "~/utils";
|
||||
import { getAreaNamePath, 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: "是否重置密码为Cc@12345678?",
|
||||
content: "是否重置密码为Aa@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={getData}
|
||||
// onReset={onReset}
|
||||
onFinish={() => onFinish()}
|
||||
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: "tenantName",
|
||||
dataIndex: "createName",
|
||||
},
|
||||
{
|
||||
title: "开户人",
|
||||
|
|
@ -240,19 +240,6 @@ function List(props) {
|
|||
</Button>
|
||||
)
|
||||
}
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() =>
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "请联系管理员操作!",
|
||||
onOk: () => {
|
||||
|
||||
},
|
||||
})}
|
||||
>
|
||||
修改企业名称
|
||||
</Button>
|
||||
{props.permission("qyd-xgf-resetPassword")
|
||||
&& (
|
||||
<Button
|
||||
|
|
@ -314,15 +301,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);
|
||||
});
|
||||
|
|
@ -333,19 +320,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;
|
||||
|
|
@ -421,7 +408,6 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
@ -434,20 +420,15 @@ function AddModalComponent(props) {
|
|||
form={form}
|
||||
span={24}
|
||||
|
||||
loading={props.loading}
|
||||
confirmLoading={props.loading}
|
||||
options={[
|
||||
{
|
||||
name: "corpName",
|
||||
label: "企业名称",
|
||||
required: !props.currentId,
|
||||
componentProps: {
|
||||
disabled: props.currentId,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "code",
|
||||
label: "统一社会信用代码",
|
||||
required: false,
|
||||
rules: [
|
||||
{
|
||||
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
|
||||
|
|
@ -455,48 +436,45 @@ 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,6 +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";
|
||||
|
||||
const ENTERPRISE_TYPE = [
|
||||
{
|
||||
|
|
@ -41,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"],
|
||||
|
|
@ -101,41 +102,34 @@ function View(props) {
|
|||
label: "统一社会信用代码",
|
||||
children: info.code,
|
||||
},
|
||||
|
||||
{
|
||||
label: "开户银行",
|
||||
children: info.depositBank,
|
||||
label: "属地",
|
||||
children: <div>{getAreaNamePath(info)}</div>,
|
||||
},
|
||||
|
||||
{
|
||||
label: "所属行业",
|
||||
children: <div>{getCorpTypeNamePath(info)}</div>,
|
||||
},
|
||||
|
||||
{
|
||||
label: "经济类型",
|
||||
children: info.ecoTypeName,
|
||||
},
|
||||
{
|
||||
label: "开户银行账号",
|
||||
children: info.depositBankAccount,
|
||||
label: "经度/纬度",
|
||||
children: info.longitude && `${info.longitude}/${info.latitude}`,
|
||||
},
|
||||
// {
|
||||
// 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: "法定代表人",
|
||||
|
|
@ -195,10 +189,10 @@ function View(props) {
|
|||
</div>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// label: "成立日期",
|
||||
// children: info.createDate,
|
||||
// },
|
||||
{
|
||||
label: "成立日期",
|
||||
children: info.createDate,
|
||||
},
|
||||
{
|
||||
label: "职工人数(人)",
|
||||
children: info.employees,
|
||||
|
|
@ -208,31 +202,15 @@ 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: (
|
||||
|
|
@ -246,10 +224,21 @@ function View(props) {
|
|||
</Button>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// label: "选取形式",
|
||||
// children: info.selectfromList,
|
||||
// },
|
||||
{
|
||||
label: "相关方类型",
|
||||
children: getLabelName({
|
||||
status: info.type,
|
||||
list: ENTERPRISE_TYPE,
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: "创建单位",
|
||||
children: info.createName,
|
||||
},
|
||||
{
|
||||
label: "选取形式",
|
||||
children: info.selectfromList,
|
||||
},
|
||||
]}
|
||||
column={2}
|
||||
loding={getFileLoading}
|
||||
|
|
@ -266,16 +255,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={1}
|
||||
column={2}
|
||||
labelStyle={{
|
||||
width: 185,
|
||||
width: 200,
|
||||
}}
|
||||
|
||||
contentStyle={{ width: "40%" }}
|
||||
/>
|
||||
</Page>
|
||||
{corpInfoQrCodeOpen && (
|
||||
|
|
@ -288,7 +277,6 @@ function View(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
@ -337,7 +325,6 @@ 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={getData}
|
||||
// onReset={onReset}
|
||||
onFinish={() => onFinish()}
|
||||
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,17 +1,20 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { Button, Descriptions, Form, Input, 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 = [
|
||||
{
|
||||
|
|
@ -44,7 +47,7 @@ function List(props) {
|
|||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定要重置密码为Cc@12345678吗?",
|
||||
content: "确定要重置密码为Aa@12345678吗?",
|
||||
onOk: () => {
|
||||
props["userChangePassword"]({
|
||||
id,
|
||||
|
|
@ -130,9 +133,9 @@ function List(props) {
|
|||
},
|
||||
{
|
||||
title: "人员类型",
|
||||
dataIndex: "flowFlag",
|
||||
dataIndex: "employmentFlag",
|
||||
render: (_, record) => (
|
||||
<div>{record.flowFlag === 0 ? "非流动人员" : record.flowFlag === 1 ? "流动人员" : ""}</div>
|
||||
<div>{record.employmentFlag === 0 ? "非流动人员" : record.employmentFlag === 1 ? "流动人员" : ""}</div>
|
||||
),
|
||||
},
|
||||
|
||||
|
|
@ -174,12 +177,12 @@ function List(props) {
|
|||
</div>
|
||||
</div>
|
||||
{addModalOpen && (
|
||||
<XgfUserInfo
|
||||
<AddModal
|
||||
open={addModalOpen}
|
||||
getData={getData}
|
||||
currentId={currentId}
|
||||
requestDetails={props["userDetails"]}
|
||||
requwstRolesAll={props["rolesAll"]}
|
||||
requwstRolesAll={props["authRolesAll"]}
|
||||
requestGetEncryInfo={props["getEncryInfo"]}
|
||||
onCancel={() => {
|
||||
setAddModalOpen(false);
|
||||
|
|
@ -192,4 +195,233 @@ 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,
|
||||
}}
|
||||
loading={uploadFileLoading || props.user.userLoading}
|
||||
confirmLoading={uploadFileLoading || props.user.userLoading}
|
||||
options={[
|
||||
{
|
||||
name: "roleId",
|
||||
|
|
@ -322,10 +322,6 @@ function Add(props) {
|
|||
{
|
||||
name: "name",
|
||||
label: "姓名",
|
||||
componentProps: {
|
||||
maxLength: 20,
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -383,7 +379,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: "确定要重置密码为Bb@12345678吗?",
|
||||
content: "确定要重置密码为Aa@12345678吗?",
|
||||
onOk: () => {
|
||||
props["userChangePassword"]({
|
||||
id,
|
||||
|
|
@ -341,16 +341,11 @@ function AddModalComponent(props) {
|
|||
const res = await props.requestDetails({
|
||||
id: props.currentId,
|
||||
});
|
||||
if (res.data && res.data.userAvatarUrl) {
|
||||
res.data.userAvatarUrl = [
|
||||
{
|
||||
filePath: res.data.userAvatarUrl,
|
||||
},
|
||||
];
|
||||
}
|
||||
else {
|
||||
res.data.userAvatarUrl = [];
|
||||
}
|
||||
res.data.userAvatarUrl = [
|
||||
{
|
||||
filePath: res.data.userAvatarUrl,
|
||||
},
|
||||
];
|
||||
|
||||
setInfo(res.data);
|
||||
};
|
||||
|
|
@ -377,7 +372,6 @@ function AddModalComponent(props) {
|
|||
return (
|
||||
<>
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
cancelText="关闭"
|
||||
|
|
@ -417,11 +411,7 @@ function AddModalComponent(props) {
|
|||
children: info.postName,
|
||||
},
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
},
|
||||
{
|
||||
label: "手机号",
|
||||
label: "用户名(手机号)",
|
||||
children: (
|
||||
<div>
|
||||
|
||||
|
|
@ -444,6 +434,11 @@ function AddModalComponent(props) {
|
|||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
},
|
||||
|
||||
{
|
||||
label: "人员类型",
|
||||
children: info.personnelTypeName,
|
||||
|
|
@ -512,7 +507,6 @@ function AddModalComponent(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
|
|||
|
|
@ -184,7 +184,6 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
@ -169,7 +168,6 @@ function AddModalComponent(props) {
|
|||
function PreviewModalComponent(props) {
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="预览"
|
||||
footer={[
|
||||
|
|
|
|||
|
|
@ -3,8 +3,12 @@ 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";
|
||||
|
|
@ -16,52 +20,50 @@ 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",
|
||||
"depositBank",
|
||||
"depositBankAccount",
|
||||
"natureBusiness",
|
||||
// "regcapital",
|
||||
// "totalAssets",
|
||||
// "licenseStart",
|
||||
// "licenseEnd",
|
||||
"regcapital",
|
||||
"totalAssets",
|
||||
"licenseStart",
|
||||
"licenseEnd",
|
||||
];
|
||||
const ENTERPRISE_STATUS = [
|
||||
{
|
||||
bianma: "filialstate01",
|
||||
name: "在产",
|
||||
},
|
||||
{
|
||||
bianma: "filialstate02",
|
||||
name: "在建",
|
||||
},
|
||||
{
|
||||
bianma: "filialstate03",
|
||||
name: "代建",
|
||||
},
|
||||
{
|
||||
bianma: "filialstate04",
|
||||
name: "停产",
|
||||
},
|
||||
{
|
||||
bianma: "filialstate05",
|
||||
name: "破产",
|
||||
},
|
||||
];
|
||||
// const ENTERPRISE_STATUS = [
|
||||
// {
|
||||
// bianma: "filialstate01",
|
||||
// name: "在产",
|
||||
// },
|
||||
// {
|
||||
// bianma: "filialstate02",
|
||||
// name: "在建",
|
||||
// },
|
||||
// {
|
||||
// bianma: "filialstate03",
|
||||
// name: "代建",
|
||||
// },
|
||||
// {
|
||||
// bianma: "filialstate04",
|
||||
// name: "停产",
|
||||
// },
|
||||
// {
|
||||
// bianma: "filialstate05",
|
||||
// name: "破产",
|
||||
// },
|
||||
// ];
|
||||
// const WHETHER_ENUM = [
|
||||
// {
|
||||
// bianma: 1,
|
||||
|
|
@ -89,14 +91,13 @@ 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) {
|
||||
|
|
@ -118,48 +119,45 @@ function CorpInfo(props) {
|
|||
// 全为空则返回空字符串或默认值
|
||||
return "";
|
||||
}
|
||||
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);
|
||||
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 allRequiredFilled = REQUIRED_FIELDS.every((field) => {
|
||||
const val = data[field];
|
||||
// 允许0值,但排除null、undefined和空字符串
|
||||
return val != null && val !== "";
|
||||
});
|
||||
|
||||
setCanShowQrCode(allRequiredFilled && hasLicenseFile);
|
||||
|
||||
const values = {
|
||||
licenseFile,
|
||||
...data,
|
||||
};
|
||||
form.setFieldsValue({
|
||||
...values,
|
||||
});
|
||||
};
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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 values = {
|
||||
licenseFile,
|
||||
...data,
|
||||
};
|
||||
form.setFieldsValue({
|
||||
...values,
|
||||
});
|
||||
};
|
||||
fetchData();
|
||||
}, []);
|
||||
const onSubmit = async (values) => {
|
||||
|
|
@ -167,46 +165,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,
|
||||
|
|
@ -217,21 +215,13 @@ 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("操作成功!");
|
||||
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;
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -299,7 +289,7 @@ function CorpInfo(props) {
|
|||
<FormBuilder
|
||||
showCancelButton={false}
|
||||
form={form}
|
||||
loading={
|
||||
confirmLoading={
|
||||
deleteFileLoading
|
||||
|| uploadFileLoading
|
||||
|| getFileLoading
|
||||
|
|
@ -336,42 +326,32 @@ function CorpInfo(props) {
|
|||
message: "请输入正确的统一社会信用代码",
|
||||
},
|
||||
],
|
||||
|
||||
componentProps: {
|
||||
disabled: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "单位经营地址",
|
||||
name: "addressBusiness",
|
||||
label: "属地",
|
||||
name: "region",
|
||||
render: (
|
||||
<AreaSelect
|
||||
onGetNodePaths={nodes =>
|
||||
setCityData(nodes)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "depositBank",
|
||||
label: "开户银行",
|
||||
label: "所属行业",
|
||||
name: "INDUSTRYALL",
|
||||
required: false,
|
||||
render: (
|
||||
<IndustrySelect
|
||||
onGetNodePaths={(data) => {
|
||||
setIndustryData(data);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "depositBankAccount",
|
||||
label: "开户银行账号",
|
||||
},
|
||||
// {
|
||||
// label: "属地",
|
||||
// name: "region",
|
||||
// render: (
|
||||
// <AreaSelect
|
||||
// onGetNodePaths={nodes =>
|
||||
// setCityData(nodes)}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
// {
|
||||
// label: "所属行业",
|
||||
// name: "INDUSTRYALL",
|
||||
// required: false,
|
||||
// render: (
|
||||
// <IndustrySelect
|
||||
// onGetNodePaths={(data) => {
|
||||
// setIndustryData(data);
|
||||
// }}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
|
||||
// {
|
||||
// label: "企业状态",
|
||||
|
|
@ -383,39 +363,42 @@ 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: "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: "scale",
|
||||
//
|
||||
// render: (
|
||||
// <DictionarySelect
|
||||
// dictValue="scale"
|
||||
// onGetData={(data) => {
|
||||
// setScaleData(data);
|
||||
// }}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="scale"
|
||||
onGetData={(data) => {
|
||||
setScaleData(data);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "法定代表人",
|
||||
name: "lrName",
|
||||
|
|
@ -446,12 +429,12 @@ function CorpInfo(props) {
|
|||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// label: "成立日期",
|
||||
// name: "createDate",
|
||||
//
|
||||
// render: FORM_ITEM_RENDER_ENUM.DATE,
|
||||
// },
|
||||
{
|
||||
label: "成立日期",
|
||||
name: "createDate",
|
||||
|
||||
render: FORM_ITEM_RENDER_ENUM.DATE,
|
||||
},
|
||||
|
||||
{
|
||||
label: "职工人数(人)",
|
||||
|
|
@ -459,25 +442,20 @@ 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: "natureBusiness",
|
||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
||||
label: "注册资金(万元)",
|
||||
name: "regcapital",
|
||||
render: FORM_ITEM_RENDER_ENUM.NUMBER,
|
||||
},
|
||||
{
|
||||
label: "资产总额(万元)",
|
||||
name: "totalAssets",
|
||||
render: FORM_ITEM_RENDER_ENUM.NUMBER,
|
||||
},
|
||||
|
||||
{
|
||||
label: "营业执照",
|
||||
name: "licenseFile",
|
||||
|
||||
render: (
|
||||
<Upload
|
||||
onGetRemoveFile={(file) => {
|
||||
|
|
@ -489,24 +467,25 @@ function CorpInfo(props) {
|
|||
/>
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
label: "营业执照有效期",
|
||||
name: "license",
|
||||
render: FORM_ITEM_RENDER_ENUM.DATE_RANGE,
|
||||
},
|
||||
{
|
||||
name: "qrCode",
|
||||
label: "企业二维码",
|
||||
hidden: canShowQrCode,
|
||||
required: false,
|
||||
render: (
|
||||
<div>
|
||||
<Button
|
||||
disabled={!canShowQrCode}
|
||||
onClick={() => {
|
||||
setCorpInfoQrCodeOpen(true);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<div style={{ color: "red", marginTop: 10 }}>请完善企业信息后查看二维码;</div>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setCorpInfoQrCodeOpen(true);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
// { label: "单位资质信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||
|
|
@ -530,7 +509,6 @@ function CorpInfo(props) {
|
|||
const CorpInfoQrCode = (props) => {
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="企业二维码"
|
||||
footer={[
|
||||
|
|
|
|||
|
|
@ -179,10 +179,9 @@ function Department(props) {
|
|||
<Button
|
||||
block
|
||||
type="link"
|
||||
title={record.name}
|
||||
onClick={() => handleTableNodeClick(record)}
|
||||
>
|
||||
{`${record.name.length > 25 ? `${record.name.slice(0, 25)}...` : record.name}>`}
|
||||
{`${record.name}>`}
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
|
|
@ -310,7 +309,6 @@ 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 { Alert, Form, message } from "antd";
|
||||
import { 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,18 +14,11 @@ 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 { PHONE } from "zy-react-library/regular";
|
||||
import { ID_NUMBER, PHONE } from "zy-react-library/regular";
|
||||
|
||||
import { getFileUrl, getLabelName, idCardGetDateAndGender } from "zy-react-library/utils";
|
||||
import { getLabelName, idCardGetDateAndGender } from "zy-react-library/utils";
|
||||
import { NS_USER } from "~/enumerate/namespace";
|
||||
import {
|
||||
getAgeByIdCard,
|
||||
getBirthDateFromIdCard,
|
||||
getChineseIdCardFullErrorMessage,
|
||||
isValidChineseIdCard,
|
||||
useDebounce,
|
||||
UseDecodeIdCard,
|
||||
} from "~/utils";
|
||||
import { getAgeByIdCard, getBirthDateFromIdCard, useDebounce, UseDecodeIdCard } from "~/utils";
|
||||
|
||||
export const WHETHER_ENUM = [
|
||||
{
|
||||
|
|
@ -65,11 +58,6 @@ 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();
|
||||
|
|
@ -90,67 +78,18 @@ function Add(props) {
|
|||
|
||||
data.sex = data.sex === "男" ? "1" : "0";
|
||||
setUserID(data.userId);
|
||||
|
||||
const userImg = (data && data.userAvatarUrl)
|
||||
? [
|
||||
{
|
||||
url: getFileUrl() + data.userAvatarUrl,
|
||||
},
|
||||
]
|
||||
: await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||
eqForeignKey: data.userId,
|
||||
});
|
||||
|
||||
const userImg = 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,
|
||||
|
|
@ -168,28 +107,6 @@ 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({
|
||||
|
|
@ -216,17 +133,15 @@ function Add(props) {
|
|||
if (values.userIdCard) {
|
||||
values.userIdCard = btoa(values.userIdCard); // Base64 编码
|
||||
}
|
||||
|
||||
const { filePath } = await uploadFile({
|
||||
single: true,
|
||||
const { id } = await uploadFile({
|
||||
single: false,
|
||||
files: values.userImg,
|
||||
params: {
|
||||
type: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||
foreignKey: userID,
|
||||
},
|
||||
});
|
||||
|
||||
const { id } = await uploadFile({
|
||||
await uploadFile({
|
||||
single: false,
|
||||
files: values.cardImg,
|
||||
params: {
|
||||
|
|
@ -234,47 +149,6 @@ 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("年龄请输入正整数!");
|
||||
|
|
@ -285,7 +159,6 @@ function Add(props) {
|
|||
return;
|
||||
}
|
||||
values.userId = userID || id;
|
||||
values.userAvatarUrl = filePath;
|
||||
if (queryParams["id"]) {
|
||||
values.id = queryParams["id"];
|
||||
|
||||
|
|
@ -316,9 +189,6 @@ function Add(props) {
|
|||
]);
|
||||
return;
|
||||
}
|
||||
if (!isValidChineseIdCard(debouncedUserIdCard)) {
|
||||
return;
|
||||
}
|
||||
props["verifyUser"]({
|
||||
userIdCard: btoa(debouncedUserIdCard),
|
||||
id: queryParams["id"] ?? "",
|
||||
|
|
@ -389,22 +259,11 @@ function Add(props) {
|
|||
if ("userIdCard" in changedValues) {
|
||||
const newIdCard = changedValues.userIdCard;
|
||||
setUserIdCardValue(newIdCard ?? "");
|
||||
form.setFields([
|
||||
{
|
||||
name: "userIdCard",
|
||||
errors: [],
|
||||
},
|
||||
]);
|
||||
if (newIdCard && isValidChineseIdCard(newIdCard)) {
|
||||
if (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 ?? "");
|
||||
|
|
@ -422,21 +281,14 @@ function Add(props) {
|
|||
>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
labelCol={{
|
||||
span: 8,
|
||||
}}
|
||||
loading={
|
||||
confirmLoading={
|
||||
deleteFileLoading
|
||||
|| uploadFileLoading
|
||||
|| getFileLoading
|
||||
|| props.user.userLoading
|
||||
}
|
||||
values={{ flowFlag: 0, isSocial: 0, isBf: 0, isSpecialJob: 0, isDepaRrtmentHead: 0, isInjuriesPay: 0, isPay: 0, isSignLabor: 0, isLevelThree: 0 }}
|
||||
values={{ flowFlag: 0 }}
|
||||
options={[
|
||||
{
|
||||
label: "基础信息",
|
||||
render: FORM_ITEM_RENDER_ENUM.DIVIDER,
|
||||
},
|
||||
{
|
||||
label: "用户照片",
|
||||
name: "userImg",
|
||||
|
|
@ -444,7 +296,6 @@ function Add(props) {
|
|||
render: (
|
||||
<Upload
|
||||
size={4}
|
||||
maxCount={1}
|
||||
fileType="image"
|
||||
tipContent={(
|
||||
<div
|
||||
|
|
@ -454,7 +305,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>
|
||||
|
|
@ -497,9 +348,6 @@ function Add(props) {
|
|||
{
|
||||
name: "name",
|
||||
label: "姓名",
|
||||
componentProps: {
|
||||
maxLength: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "phone",
|
||||
|
|
@ -521,21 +369,13 @@ function Add(props) {
|
|||
{
|
||||
name: "userIdCard",
|
||||
label: "身份证号",
|
||||
validateTrigger: "onChange",
|
||||
rules: [
|
||||
{
|
||||
validateTrigger: "onChange",
|
||||
validator: (_, value) => {
|
||||
const errorMessage = getChineseIdCardFullErrorMessage(value);
|
||||
if (!errorMessage) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return Promise.reject(new Error(errorMessage));
|
||||
},
|
||||
pattern: ID_NUMBER,
|
||||
message: "请输入正确的身份证号",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
name: "email",
|
||||
label: "电子邮箱",
|
||||
|
|
@ -577,14 +417,14 @@ function Add(props) {
|
|||
disabled: true,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// name: "locationAddress",
|
||||
// label: "户口所在地",
|
||||
// },
|
||||
// {
|
||||
// name: "currentAddress",
|
||||
// label: "现住址",
|
||||
// },
|
||||
{
|
||||
name: "locationAddress",
|
||||
label: "户口所在地",
|
||||
},
|
||||
{
|
||||
name: "currentAddress",
|
||||
label: "现住址",
|
||||
},
|
||||
{
|
||||
name: "culturalLevel",
|
||||
label: "文化程度",
|
||||
|
|
@ -597,12 +437,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: "政治面貌",
|
||||
|
|
@ -618,6 +458,7 @@ function Add(props) {
|
|||
{
|
||||
name: "postName",
|
||||
label: "岗位(工种)",
|
||||
required: false,
|
||||
},
|
||||
{
|
||||
name: "flowFlag",
|
||||
|
|
@ -629,10 +470,6 @@ 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 },
|
||||
// {
|
||||
|
|
@ -643,201 +480,156 @@ function Add(props) {
|
|||
// hidden: formValues => !(formValues.politicalStatus === "zhonggongdangyuan"),
|
||||
// },
|
||||
// { name: "postId", label: "岗位名称(工种)" },
|
||||
|
||||
{
|
||||
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),
|
||||
},
|
||||
|
||||
// {
|
||||
// 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" />),
|
||||
// },
|
||||
]}
|
||||
onFinish={onSubmit}
|
||||
onValuesChange={onValuesChange}
|
||||
/>
|
||||
<Alert style={{ height: 40, marginBottom: 40, color: "#f56c6c" }} message="新增完成后请提示该用户去相关方app端完善特种证书信息,特种证书完善后用户的'是否特殊工种'将变为'是'" type="error" />
|
||||
|
||||
</Page>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,27 +1,24 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import { Button, Descriptions, Form, Input, message, Modal, Space } from "antd";
|
||||
import { useEffect, 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: "离职",
|
||||
2: "信息变更中",
|
||||
3: "未入职",
|
||||
4: "实习生",
|
||||
5: "实习结束",
|
||||
6: "退休",
|
||||
7: "劳务派遣",
|
||||
8: "劳务派遣结束",
|
||||
3: "离职",
|
||||
11: "入职待审核",
|
||||
10: "离职待审核",
|
||||
};
|
||||
|
|
@ -47,7 +44,7 @@ function List(props) {
|
|||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定要重置密码为Cc@12345678吗?",
|
||||
content: "确定要重置密码为Aa@12345678吗?",
|
||||
onOk: () => {
|
||||
props["userChangePassword"]({
|
||||
id,
|
||||
|
|
@ -286,7 +283,7 @@ function List(props) {
|
|||
</div>
|
||||
</div>
|
||||
{addModalOpen && (
|
||||
<XgfUserInfo
|
||||
<AddModal
|
||||
open={addModalOpen}
|
||||
getData={getData}
|
||||
currentId={currentId}
|
||||
|
|
@ -294,8 +291,6 @@ function List(props) {
|
|||
requestGetEncryInfo={props["getEncryInfo"]}
|
||||
requestReviewStatus={props["reviewStatus"]}
|
||||
modalType={modalType}
|
||||
showEmail
|
||||
userPhotoLabel="用户照片"
|
||||
onCancel={() => {
|
||||
setAddModalOpen(false);
|
||||
setCurrentId("");
|
||||
|
|
@ -305,4 +300,283 @@ 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,6 +6,12 @@ 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,7 +313,6 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -347,7 +347,6 @@ 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,11 +34,6 @@ const ENTERPRISE_TYPE = [
|
|||
bianma: 1,
|
||||
name: "集团单位",
|
||||
},
|
||||
{
|
||||
bianma: 6,
|
||||
name: "物资中心",
|
||||
},
|
||||
|
||||
];
|
||||
const ENTERPRISE_STATUS = [
|
||||
{
|
||||
|
|
@ -80,7 +75,7 @@ function List(props) {
|
|||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "是否重置密码为Bb@12345678?",
|
||||
content: "是否重置密码为Aa@12345678?",
|
||||
onOk: () => {
|
||||
props["corpInfoChangePassword"]({
|
||||
id,
|
||||
|
|
@ -145,11 +140,11 @@ function List(props) {
|
|||
options={[
|
||||
{
|
||||
name: "likecorpName",
|
||||
label: "分公司名称",
|
||||
label: "公司名称",
|
||||
},
|
||||
{
|
||||
name: "eqCorpState",
|
||||
label: "分公司状态",
|
||||
label: "公司状态",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_STATUS,
|
||||
},
|
||||
|
|
@ -189,7 +184,7 @@ function List(props) {
|
|||
)}
|
||||
columns={[
|
||||
{
|
||||
title: "分公司名称",
|
||||
title: "公司名称",
|
||||
dataIndex: "corpName",
|
||||
},
|
||||
{
|
||||
|
|
@ -213,14 +208,12 @@ function List(props) {
|
|||
// dataIndex: "ecoTypeName",
|
||||
// },
|
||||
{
|
||||
title: "分公司状态",
|
||||
title: "公司状态",
|
||||
dataIndex: "corpStateName",
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
dataIndex: "useFlag",
|
||||
width: 180,
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
{record.useFlag === 0
|
||||
|
|
@ -233,26 +226,26 @@ function List(props) {
|
|||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 400,
|
||||
width: 500,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
{" "}
|
||||
{
|
||||
props.permission("zgszhgl-edit")
|
||||
&& (
|
||||
|
||||
{/* { */}
|
||||
{/* props.permission("zgszhgl-edit") */}
|
||||
{/* && ( */}
|
||||
|
||||
{/* <Button */}
|
||||
{/* type="link" */}
|
||||
{/* onClick={() => { */}
|
||||
{/* setAddModalOpen(true); */}
|
||||
{/* setCurrentId(record.id); */}
|
||||
{/* setOpenType("edit"); */}
|
||||
{/* }} */}
|
||||
{/* > */}
|
||||
{/* 编辑 */}
|
||||
{/* </Button> */}
|
||||
{/* ) */}
|
||||
{/* } */}
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setAddModalOpen(true);
|
||||
setCurrentId(record.id);
|
||||
setOpenType("edit");
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
{
|
||||
props.permission("zgszhgl-editName")
|
||||
&& (
|
||||
|
|
@ -380,39 +373,19 @@ function AddModalComponent(props) {
|
|||
const onSubmit = async (values) => {
|
||||
if (props.openType === "editName") {
|
||||
values.id = props.currentId;
|
||||
|
||||
await props.requestChangeCompanyName(values).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("修改成功");
|
||||
onCancel();
|
||||
props.getData();
|
||||
}
|
||||
});
|
||||
await props.requestChangeCompanyName(values);
|
||||
}
|
||||
|
||||
values.corpStateName = getLabelName({
|
||||
status: values.corpState,
|
||||
list: ENTERPRISE_STATUS,
|
||||
|
||||
});
|
||||
|
||||
if (props.openType === "edit") {
|
||||
values.id = props.currentId;
|
||||
await props.requestEdit(values).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("编辑成功");
|
||||
onCancel();
|
||||
props.getData();
|
||||
}
|
||||
await props.requestEdit(values).then(() => {
|
||||
onCancel();
|
||||
props.getData();
|
||||
});
|
||||
}
|
||||
if (props.openType === "add") {
|
||||
await props.requestAdd(values).then((res) => {
|
||||
if (res.success) {
|
||||
message.success("新增成功");
|
||||
onCancel();
|
||||
props.getData();
|
||||
}
|
||||
await props.requestAdd(values).then(() => {
|
||||
onCancel();
|
||||
props.getData();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -479,7 +452,6 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
@ -491,16 +463,15 @@ function AddModalComponent(props) {
|
|||
<FormBuilder
|
||||
form={form}
|
||||
span={24}
|
||||
loading={props.loading}
|
||||
confirmLoading={props.loading}
|
||||
options={[
|
||||
{
|
||||
name: "corpName",
|
||||
label: "分公司名称",
|
||||
label: "公司名称",
|
||||
},
|
||||
{
|
||||
name: "code",
|
||||
label: "统一社会信用代码",
|
||||
required: false,
|
||||
rules: [
|
||||
{
|
||||
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
|
||||
|
|
@ -517,25 +488,24 @@ function AddModalComponent(props) {
|
|||
hidden: props.openType === "editName",
|
||||
},
|
||||
{
|
||||
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: "ecoTypeName",
|
||||
label: "经济类型名称",
|
||||
onlyForLabel: true,
|
||||
},
|
||||
|
||||
// {
|
||||
// name: "ecoType",
|
||||
// label: "经济类型",
|
||||
// render: (
|
||||
// <DictionarySelect
|
||||
// dictValue="ECO_TYPE"
|
||||
// onGetLabel={(label) => {
|
||||
// form.setFieldValue("ecoTypeName", label);
|
||||
// }}
|
||||
// />
|
||||
// ),
|
||||
// hidden: props.openType === "editName",
|
||||
// },
|
||||
{
|
||||
name: "corpOrder",
|
||||
label: "列表排序",
|
||||
|
|
|
|||
|
|
@ -32,10 +32,6 @@ const ENTERPRISE_TYPE = [
|
|||
bianma: 5,
|
||||
name: "驻港单位",
|
||||
},
|
||||
{
|
||||
bianma: 6,
|
||||
name: "物资中心",
|
||||
},
|
||||
];
|
||||
function View(props) {
|
||||
const queryParams = useGetUrlQuery();
|
||||
|
|
@ -61,7 +57,7 @@ function View(props) {
|
|||
bordered
|
||||
items={[
|
||||
{
|
||||
label: "分公司名称",
|
||||
label: "公司名称",
|
||||
children: info.corpName && info.corpName,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,10 +18,6 @@ const ENTERPRISE_TYPE = [
|
|||
bianma: 1,
|
||||
name: "集团单位",
|
||||
},
|
||||
{
|
||||
bianma: 6,
|
||||
name: "物资中心",
|
||||
},
|
||||
];
|
||||
const BRANCH_CONPANY_STATUS = [
|
||||
{
|
||||
|
|
@ -74,12 +70,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,
|
||||
},
|
||||
|
|
@ -95,7 +91,7 @@ function List(props) {
|
|||
<Table
|
||||
columns={[
|
||||
{
|
||||
title: "分公司名称",
|
||||
title: "公司名称",
|
||||
dataIndex: "corpName",
|
||||
|
||||
},
|
||||
|
|
@ -127,7 +123,7 @@ function List(props) {
|
|||
),
|
||||
},
|
||||
{
|
||||
title: "分公司状态",
|
||||
title: "公司状态",
|
||||
dataIndex: "corpStateName",
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ function View(props) {
|
|||
},
|
||||
{
|
||||
title: "部门级别",
|
||||
dataIndex: "levelName",
|
||||
dataIndex: "name",
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -124,7 +124,6 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
width={800}
|
||||
|
|
@ -145,7 +144,7 @@ function AddModalComponent(props) {
|
|||
},
|
||||
{
|
||||
label: "部门名称",
|
||||
children: info.name,
|
||||
children: info.parentName,
|
||||
},
|
||||
{
|
||||
label: "部门级别",
|
||||
|
|
@ -153,8 +152,8 @@ function AddModalComponent(props) {
|
|||
},
|
||||
|
||||
{
|
||||
label: "岗位职责",
|
||||
children: info.departmentFunction,
|
||||
label: "备注",
|
||||
children: info.remarks,
|
||||
},
|
||||
{
|
||||
label: "排序",
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ function List(props) {
|
|||
message.success("定位成功!");
|
||||
}
|
||||
});
|
||||
// props.
|
||||
};
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
|
|
@ -89,10 +90,10 @@ function List(props) {
|
|||
options={[
|
||||
{
|
||||
name: "likecorpName",
|
||||
label: "分公司名称",
|
||||
label: "公司名称",
|
||||
},
|
||||
{
|
||||
label: "分公司状态",
|
||||
label: "公司状态",
|
||||
name: "eqCorpState",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_STATUS,
|
||||
|
|
@ -112,11 +113,11 @@ function List(props) {
|
|||
// )}
|
||||
columns={[
|
||||
{
|
||||
title: "分公司名称",
|
||||
title: "公司名称",
|
||||
dataIndex: "corpName",
|
||||
},
|
||||
{
|
||||
title: "单位经营地址",
|
||||
title: "企事业单位经营地址",
|
||||
dataIndex: "addressBusiness",
|
||||
},
|
||||
{
|
||||
|
|
@ -132,7 +133,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,7 +299,6 @@ 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,4 +1,3 @@
|
|||
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";
|
||||
|
|
@ -8,10 +7,11 @@ 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 { NS_USER } from "~/enumerate/namespace";
|
||||
import { UseDecodeIdCard } from "~/utils";
|
||||
import {Permission} from "@cqsjjb/jjb-common-decorator/permission";
|
||||
|
||||
function List(props) {
|
||||
const queryParams = useGetUrlQuery();
|
||||
|
|
@ -155,7 +155,6 @@ function AddModalComponent(props) {
|
|||
return (
|
||||
<>
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
width={1200}
|
||||
|
|
@ -193,10 +192,10 @@ function AddModalComponent(props) {
|
|||
label: "所属岗位",
|
||||
children: info.postName,
|
||||
},
|
||||
// {
|
||||
// label: "用户名",
|
||||
// children: info.username,
|
||||
// },
|
||||
{
|
||||
label: "用户名",
|
||||
children: info.username,
|
||||
},
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
|
|
@ -295,7 +294,6 @@ function AddModalComponent(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
|
|||
|
|
@ -2,60 +2,84 @@ 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 useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
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 queryParams = useGetUrlQuery();
|
||||
const { tableProps } = useTable(props["userChangeRecordList"], {
|
||||
const { tableProps, getData } = useTable(props["userEmploymentLogAll"], {
|
||||
form,
|
||||
usePermission: false,
|
||||
params: { eqUserId: queryParams.id },
|
||||
transform: (formData) => {
|
||||
return {
|
||||
...formData,
|
||||
|
||||
};
|
||||
},
|
||||
});
|
||||
return (
|
||||
<div>
|
||||
<Page
|
||||
headerTitle="变更列表"
|
||||
headerTitle="变更记录列表"
|
||||
isShowFooter={false}
|
||||
>
|
||||
|
||||
<Table
|
||||
options={false}
|
||||
columns={[
|
||||
<Search
|
||||
form={form}
|
||||
options={[
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "userName",
|
||||
name: "name",
|
||||
label: "公司名称",
|
||||
},
|
||||
{
|
||||
name: "eqtype",
|
||||
label: "企业类型",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_TYPE,
|
||||
},
|
||||
]}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{
|
||||
title: "变更时间",
|
||||
dataIndex: "changeTime",
|
||||
dataIndex: "updateTime",
|
||||
},
|
||||
{
|
||||
title: "企业名称",
|
||||
dataIndex: "corpinfoNameAfter",
|
||||
dataIndex: "corpinfoName",
|
||||
},
|
||||
{
|
||||
title: "部门名称",
|
||||
dataIndex: "departmentNameAfter",
|
||||
dataIndex: "departmentName",
|
||||
},
|
||||
{
|
||||
title: "岗位名称",
|
||||
dataIndex: "postIdAfter",
|
||||
dataIndex: "postName",
|
||||
},
|
||||
{
|
||||
title: "员工状态",
|
||||
dataIndex: "status",
|
||||
title: "员工",
|
||||
dataIndex: "name",
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
{record.status === 1
|
||||
? "待审批"
|
||||
: record.status === 2
|
||||
? "通过"
|
||||
{record.employmentFlag === 1
|
||||
? "在职"
|
||||
: record.employmentFlag === 1
|
||||
? "离职"
|
||||
: ""}
|
||||
</div>
|
||||
),
|
||||
|
|
@ -69,7 +93,7 @@ function List(props) {
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() =>
|
||||
props.history.push(`./ChangeView?id=${record.userChangeRecordId}&userId=${record.userId}`)}
|
||||
props.history.push(`./ChangeView?id=${record.id}&type=record`)}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Divider, Form, message, Modal, Space } from "antd";
|
||||
import { Button, Descriptions, Divider, message, Modal } 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";
|
||||
|
|
@ -11,62 +9,58 @@ 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({});
|
||||
|
||||
const getRecordInfo = () => {
|
||||
props["userChangeRecordgGtRecordInfoById"]({ userChangeRecordId: queryParams["id"], userId: queryParams["userId"] }).then((res) => {
|
||||
useEffect(() => {
|
||||
props["getChangerRecordInfoById"]({ corpinfoId: queryParams["corpinfoId"], userId: queryParams["id"] }).then((res) => {
|
||||
if (res.data) {
|
||||
setInfo(res.data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getRecordInfo();
|
||||
}, []);
|
||||
|
||||
const onOpenHandoverModal = (record) => {
|
||||
form.resetFields();
|
||||
setDepartmentId();
|
||||
setCurrentHandoverRecord(record || {});
|
||||
setHandoverUserInfo({});
|
||||
setHandoverModalOpen(true);
|
||||
};
|
||||
|
||||
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();
|
||||
}
|
||||
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 onGoBack = () => {
|
||||
window.history.back();
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
@ -96,15 +90,7 @@ function ChangeView(props) {
|
|||
},
|
||||
{
|
||||
label: "员工状态",
|
||||
children: (
|
||||
<div>
|
||||
{info.userStatusBefore === 1
|
||||
? "待审批"
|
||||
: info.userStatusBefore === 2
|
||||
? "通过"
|
||||
: ""}
|
||||
</div>
|
||||
),
|
||||
children: info.userStatusBefore,
|
||||
|
||||
},
|
||||
]}
|
||||
|
|
@ -112,7 +98,6 @@ function ChangeView(props) {
|
|||
labelStyle={{
|
||||
width: 200,
|
||||
}}
|
||||
contentStyle={{ width: 500 }}
|
||||
/>
|
||||
<Divider orientation="left">变更后信息</Divider>
|
||||
<Descriptions
|
||||
|
|
@ -136,123 +121,67 @@ function ChangeView(props) {
|
|||
},
|
||||
{
|
||||
label: "员工状态",
|
||||
children: (
|
||||
<div>
|
||||
{info.userStatusAfter === 1
|
||||
? "待审批"
|
||||
: info.userStatusAfter === 2
|
||||
? "通过"
|
||||
: ""}
|
||||
</div>
|
||||
),
|
||||
|
||||
children: info.userStatusAfter,
|
||||
},
|
||||
{
|
||||
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: "workProject",
|
||||
title: "工作项目",
|
||||
dataIndex: "corpName",
|
||||
},
|
||||
{
|
||||
title: "待办事项",
|
||||
dataIndex: "workContent",
|
||||
title: "工作内容",
|
||||
dataIndex: "type",
|
||||
},
|
||||
{
|
||||
title: "处理人",
|
||||
dataIndex: "handoverUserName",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 200,
|
||||
hidden: queryParams["type"] !== "disposal",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
disabled={record.handoverStatus === 1}
|
||||
onClick={() => onOpenHandoverModal(record)}
|
||||
>
|
||||
交接
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
dataIndex: "departMentCount",
|
||||
hidden: queryParams["type"] === "disposal",
|
||||
},
|
||||
]}
|
||||
dataSource={info.userJobHandoverCOList}
|
||||
/>
|
||||
</Page>
|
||||
|
||||
<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
|
||||
{
|
||||
queryParams["type"] === "disposal"
|
||||
|
||||
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 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>
|
||||
)
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,34 +19,15 @@ 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["userChangeRecordList"], {
|
||||
const { tableProps, getData } = useTable(props["corpUserMiddlePage"], {
|
||||
form,
|
||||
transform: (formData) => {
|
||||
return {
|
||||
...formData,
|
||||
enterpriseType: 2,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
@ -60,7 +41,12 @@ function List(props) {
|
|||
name: "name",
|
||||
label: "公司名称",
|
||||
},
|
||||
|
||||
{
|
||||
name: "eqType",
|
||||
label: "企业类型",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: ENTERPRISE_TYPE,
|
||||
},
|
||||
]}
|
||||
onFinish={getData}
|
||||
/>
|
||||
|
|
@ -84,27 +70,27 @@ function List(props) {
|
|||
},
|
||||
{
|
||||
title: "部门数",
|
||||
dataIndex: "departmentCount",
|
||||
dataIndex: "departMentCount",
|
||||
},
|
||||
{
|
||||
title: "岗位数",
|
||||
dataIndex: "postCount",
|
||||
},
|
||||
{
|
||||
title: "人员总数",
|
||||
title: "用户数",
|
||||
dataIndex: "userCount",
|
||||
},
|
||||
{
|
||||
title: "人资存在数",
|
||||
dataIndex: "rzUserCount",
|
||||
title: "中台人员存在数",
|
||||
dataIndex: "middleUserCount",
|
||||
render: (_, record) => (
|
||||
<div>{record.rzUserCount ?? 0}</div>
|
||||
<div>{record.middleUserCount ?? 0}</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 200,
|
||||
hidden: !(props.permission("qyyhzt-info")),
|
||||
// hidden: !(props.permission("qyyhzt-info")),
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,17 +18,13 @@ import { UseDecodeIdCard } from "~/utils";
|
|||
|
||||
const USER_TYPE = [
|
||||
{
|
||||
bianma: "1",
|
||||
bianma: 1,
|
||||
name: "在职",
|
||||
},
|
||||
{
|
||||
bianma: "0",
|
||||
bianma: 2,
|
||||
name: "离职",
|
||||
},
|
||||
{
|
||||
bianma: "2",
|
||||
name: "信息变更中",
|
||||
},
|
||||
];
|
||||
function List(props) {
|
||||
const [selectedNodeId, setSelectedNodeId] = useState();
|
||||
|
|
@ -36,14 +32,14 @@ function List(props) {
|
|||
const [currentId, setCurrentId] = useState("");
|
||||
const queryParams = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["pageByNopermission"], {
|
||||
const { tableProps, getData } = useTable(props["userList"], {
|
||||
form,
|
||||
usePermission: false,
|
||||
transform: (formData) => {
|
||||
return {
|
||||
...formData,
|
||||
eqDepartmentId: selectedNodeId,
|
||||
eqCorpinfoId: queryParams["id"],
|
||||
corpinfoId: queryParams["id"],
|
||||
noMain: 1,
|
||||
|
||||
};
|
||||
|
|
@ -72,7 +68,7 @@ function List(props) {
|
|||
return (
|
||||
<div>
|
||||
<Page
|
||||
headerTitle="人员列表"
|
||||
headerTitle="列表"
|
||||
isShowFooter={false}
|
||||
>
|
||||
<div
|
||||
|
|
@ -95,7 +91,7 @@ function List(props) {
|
|||
label: "姓名",
|
||||
},
|
||||
{
|
||||
name: "eqEmploymentFlag",
|
||||
name: "eqtype",
|
||||
label: "人员状态",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: USER_TYPE,
|
||||
|
|
@ -129,26 +125,19 @@ function List(props) {
|
|||
dataIndex: "phone",
|
||||
},
|
||||
{
|
||||
title: "人资系统是否存在",
|
||||
dataIndex: "rzFlag",
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
{record.rzFlag === 1
|
||||
? "是"
|
||||
: record.rzFlag === 0
|
||||
? "否"
|
||||
: ""}
|
||||
</div>
|
||||
),
|
||||
title: "中台是否存在",
|
||||
dataIndex: "name",
|
||||
},
|
||||
{
|
||||
title: "人员状态",
|
||||
dataIndex: "employmentFlag",
|
||||
title: "状态",
|
||||
dataIndex: "name",
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
{
|
||||
getLabelName({ list: USER_TYPE, status: record.employmentFlag })
|
||||
}
|
||||
{record.employmentFlag === 1
|
||||
? "在职"
|
||||
: record.employmentFlag === 1
|
||||
? "离职"
|
||||
: ""}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
|
|
@ -180,12 +169,13 @@ function List(props) {
|
|||
)
|
||||
}
|
||||
{
|
||||
props.permission("qyyuzt-info-disposal") && record.employmentFlag === 2 && (
|
||||
props.permission("qyyuzt-info-disposal")
|
||||
&& (
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() =>
|
||||
props.history.push(`./ChangeView?userId=${record.id}&type=disposal`)}
|
||||
props.history.push(`./ChangeView?id=${record.id}&type=disposal`)}
|
||||
>
|
||||
变更处置
|
||||
</Button>
|
||||
|
|
@ -244,7 +234,6 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
cancelText="关闭"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ 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";
|
||||
|
|
@ -31,7 +33,8 @@ 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) => {
|
||||
|
|
@ -40,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],
|
||||
|
||||
};
|
||||
},
|
||||
|
|
@ -54,7 +57,7 @@ function List(props) {
|
|||
const onResetPassword = (id) => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "是否重置密码为Cc@12345678?",
|
||||
content: "是否重置密码为Aa@12345678?",
|
||||
onOk: () => {
|
||||
props["corpInfoChangePassword"]({
|
||||
id,
|
||||
|
|
@ -68,44 +71,37 @@ function List(props) {
|
|||
});
|
||||
};
|
||||
|
||||
const onDelete = () => {
|
||||
// Modal.confirm({
|
||||
// title: "提示",
|
||||
// content: "确定删除吗?",
|
||||
// onOk: () => {
|
||||
// props["corpInfoRemove"]({
|
||||
// id,
|
||||
// }).then((res) => {
|
||||
// if (res.success) {
|
||||
// message.success("删除成功");
|
||||
// getData();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// });
|
||||
const onDelete = (id) => {
|
||||
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={{
|
||||
|
|
@ -115,23 +111,23 @@ function List(props) {
|
|||
|
||||
<Search
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
// onReset={onReset}
|
||||
onFinish={() => onFinish()}
|
||||
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: "开户时间",
|
||||
|
|
@ -143,12 +139,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,
|
||||
},
|
||||
|
||||
]}
|
||||
|
||||
|
|
@ -178,19 +174,18 @@ 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: "tenantName",
|
||||
dataIndex: "createName",
|
||||
},
|
||||
|
||||
{
|
||||
title: "开户人",
|
||||
dataIndex: "accountContactName",
|
||||
|
|
@ -248,21 +243,6 @@ function List(props) {
|
|||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() =>
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "请联系管理员操作!",
|
||||
onOk: () => {
|
||||
|
||||
},
|
||||
})}
|
||||
>
|
||||
修改企业名称
|
||||
</Button>
|
||||
|
||||
{props.permission("gszhxxgl-resetPassword")
|
||||
&& (
|
||||
<Button
|
||||
|
|
@ -299,8 +279,6 @@ function List(props) {
|
|||
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
||||
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
||||
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
||||
|
||||
loding={props.enterprise.userLoading}
|
||||
onCancel={() => {
|
||||
setAddModalOpen(false);
|
||||
setCurrentId("");
|
||||
|
|
@ -316,7 +294,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
|
||||
|
|
@ -324,13 +302,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);
|
||||
});
|
||||
}
|
||||
|
|
@ -340,18 +318,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;
|
||||
|
|
@ -427,14 +405,11 @@ 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}
|
||||
|
|
@ -442,16 +417,11 @@ function AddModalComponent(props) {
|
|||
options={[
|
||||
{
|
||||
name: "corpName",
|
||||
label: "企业名称",
|
||||
required: !props.currentId,
|
||||
componentProps: {
|
||||
disabled: props.currentId,
|
||||
},
|
||||
label: "单位名称",
|
||||
},
|
||||
{
|
||||
name: "code",
|
||||
label: "统一社会信用代码",
|
||||
required: false,
|
||||
rules: [
|
||||
{
|
||||
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
|
||||
|
|
@ -459,50 +429,46 @@ function AddModalComponent(props) {
|
|||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// name: "ecoType",
|
||||
// label: "经济类型",
|
||||
// required: false,
|
||||
// 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"
|
||||
// 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,41 +102,34 @@ function View(props) {
|
|||
label: "统一社会信用代码",
|
||||
children: info.code,
|
||||
},
|
||||
|
||||
{
|
||||
label: "开户银行",
|
||||
children: info.depositBank,
|
||||
label: "属地",
|
||||
children: <div>{getAreaNamePath(info)}</div>,
|
||||
},
|
||||
|
||||
{
|
||||
label: "所属行业",
|
||||
children: <div>{getCorpTypeNamePath(info)}</div>,
|
||||
},
|
||||
|
||||
{
|
||||
label: "经济类型",
|
||||
children: info.ecoTypeName,
|
||||
},
|
||||
{
|
||||
label: "开户银行账号",
|
||||
children: info.depositBankAccount,
|
||||
label: "经度/纬度",
|
||||
children: info.longitude && `${info.longitude}/${info.latitude}`,
|
||||
},
|
||||
// {
|
||||
// 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: "法定代表人",
|
||||
|
|
@ -196,10 +189,10 @@ function View(props) {
|
|||
</div>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// label: "成立日期",
|
||||
// children: info.createDate,
|
||||
// },
|
||||
{
|
||||
label: "成立日期",
|
||||
children: info.createDate,
|
||||
},
|
||||
{
|
||||
label: "职工人数(人)",
|
||||
children: info.employees,
|
||||
|
|
@ -209,29 +202,13 @@ function View(props) {
|
|||
// children: info.areaCovered,
|
||||
// },
|
||||
|
||||
// {
|
||||
// label: "注册资金(万元)",
|
||||
// children: info.regcapital,
|
||||
// },
|
||||
// {
|
||||
// label: "资产总额(万元)",
|
||||
// children: info.totalAssets,
|
||||
// },
|
||||
|
||||
{
|
||||
label: "相关方类型",
|
||||
children: getLabelName({
|
||||
status: info.type,
|
||||
list: ENTERPRISE_TYPE,
|
||||
}),
|
||||
label: "注册资金(万元)",
|
||||
children: info.regcapital,
|
||||
},
|
||||
{
|
||||
label: "创建单位",
|
||||
children: info.tenantName,
|
||||
},
|
||||
{
|
||||
label: "经营范围",
|
||||
children: info.natureBusiness,
|
||||
label: "资产总额(万元)",
|
||||
children: info.totalAssets,
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -247,17 +224,27 @@ function View(props) {
|
|||
</Button>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// label: "选取形式",
|
||||
// children: info.selectfromList,
|
||||
// },
|
||||
{
|
||||
label: "相关方类型",
|
||||
children: getLabelName({
|
||||
status: info.type,
|
||||
list: ENTERPRISE_TYPE,
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: "创建单位",
|
||||
children: info.createName,
|
||||
},
|
||||
{
|
||||
label: "选取形式",
|
||||
children: info.selectfromList,
|
||||
},
|
||||
]}
|
||||
column={2}
|
||||
loding={getFileLoading}
|
||||
labelStyle={{
|
||||
width: 200,
|
||||
}}
|
||||
|
||||
/>
|
||||
<Divider orientation="left">营业执照</Divider>
|
||||
<Descriptions
|
||||
|
|
@ -268,16 +255,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: 185,
|
||||
width: 200,
|
||||
}}
|
||||
|
||||
contentStyle={{ width: "40%" }}
|
||||
/>
|
||||
</div>
|
||||
{corpInfoQrCodeOpen && (
|
||||
|
|
@ -290,8 +277,6 @@ function View(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
@ -339,7 +324,6 @@ function View(props) {
|
|||
const CorpInfoQrCode = (props) => {
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="企业二维码"
|
||||
footer={[
|
||||
|
|
|
|||
|
|
@ -287,7 +287,6 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -315,7 +315,6 @@ 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={getData}
|
||||
// onReset={onReset}
|
||||
onFinish={() => onFinish()}
|
||||
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,18 +1,21 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { Button, Descriptions, Form, Input, 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();
|
||||
|
|
@ -35,18 +38,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: "确定要重置密码为Cc@12345678吗?",
|
||||
content: "确定要重置密码为Aa@12345678吗?",
|
||||
onOk: () => {
|
||||
props["userChangePassword"]({
|
||||
id,
|
||||
|
|
@ -106,7 +109,7 @@ function List(props) {
|
|||
label: "姓名",
|
||||
},
|
||||
{
|
||||
name: "eqFlowFlag",
|
||||
name: "eqEmploymentFlag",
|
||||
label: "人员类型",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: FLOW_USER_TYPE,
|
||||
|
|
@ -130,11 +133,7 @@ function List(props) {
|
|||
},
|
||||
{
|
||||
title: "人员类型",
|
||||
dataIndex: "flowFlag",
|
||||
|
||||
render: (_, record) => (
|
||||
record.flowFlag === 1 ? "流动人员" : record.flowFlag === 0 ? "非流动人员" : ""
|
||||
),
|
||||
dataIndex: "personnelTypeName",
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -176,7 +175,7 @@ function List(props) {
|
|||
</div>
|
||||
</div>
|
||||
{addModalOpen && (
|
||||
<XgfUserInfo
|
||||
<AddModal
|
||||
open={addModalOpen}
|
||||
getData={getData}
|
||||
currentId={currentId}
|
||||
|
|
@ -193,4 +192,235 @@ 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}
|
||||
|
||||
loading={
|
||||
confirmLoading={
|
||||
|
||||
props.enterprise.enterpriseLoading
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,10 +192,9 @@ function Department(props) {
|
|||
<Button
|
||||
block
|
||||
type="link"
|
||||
title={record.name}
|
||||
onClick={() => handleTableNodeClick(record)}
|
||||
>
|
||||
{`${record.name.length > 25 ? `${record.name.slice(0, 25)}...` : record.name}>`}
|
||||
{`${record.name}>`}
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
|
|
@ -270,7 +269,6 @@ function Department(props) {
|
|||
{chartModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={chartModalOpen}
|
||||
title="组织架构图"
|
||||
width="80%"
|
||||
|
|
@ -329,7 +327,6 @@ function AddModalComponent(props) {
|
|||
};
|
||||
return (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title={props.currentId ? "编辑" : "新增"}
|
||||
width={800}
|
||||
|
|
|
|||
|
|
@ -112,15 +112,7 @@ function Add(props) {
|
|||
fetchData();
|
||||
}
|
||||
props["rolesAll"]({ pageIndex: 1, pageSize: 1000 }).then((res) => {
|
||||
const arr = [];
|
||||
if (res.data && res.data.length > 0) {
|
||||
res.data.forEach((item) => {
|
||||
if (item.roleGroupId === "2008482924409827329") {
|
||||
arr.push(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
setRolesData(arr);
|
||||
setRolesData(res.data);
|
||||
});
|
||||
}, []);
|
||||
const onSubmit = async (values) => {
|
||||
|
|
@ -278,7 +270,7 @@ function Add(props) {
|
|||
values={{
|
||||
departmentLeaderFlag: 0,
|
||||
}}
|
||||
loading={uploadFileLoading || props.user.userLoading}
|
||||
confirmLoading={uploadFileLoading || props.user.userLoading}
|
||||
options={[
|
||||
{
|
||||
name: "roleId",
|
||||
|
|
@ -322,9 +314,6 @@ function Add(props) {
|
|||
{
|
||||
name: "name",
|
||||
label: "姓名",
|
||||
componentProps: {
|
||||
maxLength: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "phone",
|
||||
|
|
@ -397,7 +386,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,6 +292,7 @@ function List(props) {
|
|||
render: (_, record) => (
|
||||
<div>
|
||||
{
|
||||
|
||||
getLabelName({
|
||||
status: String(record.employmentFlag),
|
||||
list: employmentFlagData,
|
||||
|
|
@ -410,16 +411,11 @@ function AddModalComponent(props) {
|
|||
const res = await props.requestDetails({
|
||||
id: props.currentId,
|
||||
});
|
||||
if (res.data && res.data.userAvatarUrl) {
|
||||
res.data.userAvatarUrl = [
|
||||
{
|
||||
filePath: res.data.userAvatarUrl,
|
||||
},
|
||||
];
|
||||
}
|
||||
else {
|
||||
res.data.userAvatarUrl = [];
|
||||
}
|
||||
res.data.userAvatarUrl = [
|
||||
{
|
||||
filePath: res.data.userAvatarUrl,
|
||||
},
|
||||
];
|
||||
setInfo(res.data);
|
||||
};
|
||||
fetchData();
|
||||
|
|
@ -446,7 +442,6 @@ function AddModalComponent(props) {
|
|||
<>
|
||||
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
open={props.open}
|
||||
title="查看"
|
||||
width={1200}
|
||||
|
|
@ -491,10 +486,10 @@ function AddModalComponent(props) {
|
|||
label: "所属岗位",
|
||||
children: info.postName,
|
||||
},
|
||||
// {
|
||||
// label: "用户名",
|
||||
// children: info.username,
|
||||
// },
|
||||
{
|
||||
label: "用户名",
|
||||
children: info.username,
|
||||
},
|
||||
{
|
||||
label: "姓名",
|
||||
children: info.name,
|
||||
|
|
@ -585,7 +580,6 @@ function AddModalComponent(props) {
|
|||
{isModalOpen
|
||||
&& (
|
||||
<Modal
|
||||
maskClosable={false}
|
||||
title="查看"
|
||||
open={isModalOpen}
|
||||
onOk={handleOk}
|
||||
|
|
|
|||
|
|
@ -1,103 +1,5 @@
|
|||
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