diff --git a/jjb.config.js b/jjb.config.js
index 29474a7..e3e69fe 100644
--- a/jjb.config.js
+++ b/jjb.config.js
@@ -28,8 +28,8 @@ module.exports = {
// 应用Key
appKey: "",
// fileUrl: "http://192.168.20.240:9787/mnt/",
- fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/",
- // fileUrl: "https://skqhdg.porthebei.com:9004/file/uploadFiles2/",
+ // fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/",
+ fileUrl: "https://skqhdg.porthebei.com:9004/file/uploadFiles2/",
},
// public/index.html注入全局变量
windowInject: {
diff --git a/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/List/index.js b/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/List/index.js
index 11a61f8..be420f9 100644
--- a/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/List/index.js
+++ b/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/List/index.js
@@ -8,14 +8,14 @@ import AddIcon from "zy-react-library/components/Icon/AddIcon";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
-import AreaSelect from "zy-react-library/components/SelectTree/Area";
+// import AreaSelect from "zy-react-library/components/SelectTree/Area";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useTable from "zy-react-library/hooks/useTable";
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
import { getLabelName } from "zy-react-library/utils";
import { NS_ENTERPRISE } from "~/enumerate/namespace";
-import { getAreaNamePath, useDebounce } from "~/utils";
+import { useDebounce } from "~/utils";
const ENTERPRISE_TYPE = [
{
@@ -43,11 +43,11 @@ function List(props) {
enterpriseType: 3,
geCreateTime: formData.CreateTime?.[0],
leCreateTime: formData.CreateTime?.[1],
- eqProvince: formData.cityRecord?.[0],
- eqCity: formData.cityRecord?.[1],
- eqCountry: formData.cityRecord?.[2],
- eqStreet: formData.cityRecord?.[3],
- eqVillage: formData.cityRecord?.[4],
+ // eqProvince: formData.cityRecord?.[0],
+ // eqCity: formData.cityRecord?.[1],
+ // eqCountry: formData.cityRecord?.[2],
+ // eqStreet: formData.cityRecord?.[3],
+ // eqVillage: formData.cityRecord?.[4],
};
},
@@ -57,7 +57,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
- content: "是否重置密码为Aa@12345678?",
+ content: "是否重置密码为Cc@12345678?",
onOk: () => {
props["corpInfoChangePassword"]({
id,
@@ -87,44 +87,44 @@ function List(props) {
},
});
};
- const onFinish = async () => {
- // 处理属地查询
- const arr = [];
- cityData.forEach((item) => {
- arr.push(item.value);
- });
- form.setFieldValue("cityRecord", arr);
- getData();
- };
+ // const onFinish = async () => {
+ // // 处理属地查询
+ // const arr = [];
+ // cityData.forEach((item) => {
+ // arr.push(item.value);
+ // });
+ // form.setFieldValue("cityRecord", arr);
+ // getData();
+ // };
- const onReset = () => {
- setCityData([]);
-
- form.setFieldValue("cityRecord", []);
- };
+ // const onReset = () => {
+ // setCityData([]);
+ //
+ // form.setFieldValue("cityRecord", []);
+ // };
return (
onFinish()}
- onReset={onReset}
+ onFinish={getData}
+ // onReset={onReset}
options={[
{
name: "likecorpName",
label: "企业名称",
},
- {
- name: "cityData",
- label: "属地",
- render: (
-
- setCityData(nodes)}
- />
- ),
- },
+ // {
+ // name: "cityData",
+ // label: "属地",
+ // render: (
+ //
+ // 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,14 +171,14 @@ function List(props) {
title: "企业名称",
dataIndex: "corpName",
},
- {
- title: "属地",
- dataIndex: "cityName",
- width: 300,
- render: (_, record) => (
- {getAreaNamePath(record)}
- ),
- },
+ // {
+ // title: "属地",
+ // dataIndex: "cityName",
+ // width: 300,
+ // render: (_, record) => (
+ // {getAreaNamePath(record)}
+ // ),
+ // },
{
title: "创建单位",
dataIndex: "tenantName",
@@ -447,6 +447,7 @@ function AddModalComponent(props) {
{
name: "code",
label: "统一社会信用代码",
+ required: false,
rules: [
{
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
@@ -454,23 +455,23 @@ function AddModalComponent(props) {
},
],
},
- {
- name: "ecoType",
- label: "经济类型",
- render: (
- {
- form.setFieldValue("ecoTypeName", label);
- }}
- />
- ),
- },
- {
- name: "ecoTypeName",
- label: "经济类型名称",
- onlyForLabel: true,
- },
+ // {
+ // name: "ecoType",
+ // label: "经济类型",
+ // render: (
+ // {
+ // form.setFieldValue("ecoTypeName", label);
+ // }}
+ // />
+ // ),
+ // },
+ // {
+ // name: "ecoTypeName",
+ // label: "经济类型名称",
+ // onlyForLabel: true,
+ // },
{
name: "type",
label: "相关方类型",
diff --git a/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/View/index.js b/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/View/index.js
index 9dd382a..0b0968d 100644
--- a/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/View/index.js
+++ b/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/View/index.js
@@ -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 { getCorpTypeNamePath } from "~/utils";
const ENTERPRISE_TYPE = [
{
@@ -103,33 +103,33 @@ function View(props) {
children: info.code,
},
- {
- label: "属地",
- children: {getAreaNamePath(info)}
,
- },
+ // {
+ // label: "属地",
+ // children: {getAreaNamePath(info)}
,
+ // },
- {
- label: "所属行业",
- children: {getCorpTypeNamePath(info)}
,
- },
+ // {
+ // label: "所属行业",
+ // children: {getCorpTypeNamePath(info)}
,
+ // },
- {
- label: "经济类型",
- children: info.ecoTypeName,
- },
- {
- label: "经度/纬度",
- children: info.longitude && `${info.longitude}/${info.latitude}`,
- },
+ // {
+ // label: "经济类型",
+ // children: info.ecoTypeName,
+ // },
+ // {
+ // label: "经度/纬度",
+ // children: info.longitude && `${info.longitude}/${info.latitude}`,
+ // },
{
label: "单位经营地址",
children: info.addressBusiness,
},
- {
- label: "企业规模",
- children: info.scaleName,
- },
+ // {
+ // label: "企业规模",
+ // children: info.scaleName,
+ // },
{
label: "法定代表人",
@@ -189,10 +189,10 @@ function View(props) {
),
},
- {
- label: "成立日期",
- children: info.createDate,
- },
+ // {
+ // label: "成立日期",
+ // children: info.createDate,
+ // },
{
label: "职工人数(人)",
children: info.employees,
@@ -202,14 +202,14 @@ function View(props) {
// children: info.areaCovered,
// },
- {
- label: "注册资金(万元)",
- children: info.regcapital,
- },
- {
- label: "资产总额(万元)",
- children: info.totalAssets,
- },
+ // {
+ // label: "注册资金(万元)",
+ // children: info.regcapital,
+ // },
+ // {
+ // label: "资产总额(万元)",
+ // children: info.totalAssets,
+ // },
{
label: "企业二维码",
diff --git a/src/pages/Container/Enterprise/StakeholderUnit/User/List/index.js b/src/pages/Container/Enterprise/StakeholderUnit/User/List/index.js
index f17faa3..226c2e7 100644
--- a/src/pages/Container/Enterprise/StakeholderUnit/User/List/index.js
+++ b/src/pages/Container/Enterprise/StakeholderUnit/User/List/index.js
@@ -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 (
onFinish()}
- onReset={onReset}
+ onFinish={getData}
+ // onReset={onReset}
options={[
{
name: "likeCorpName",
label: "企业名称",
},
- {
- name: "cityData",
- label: "属地",
- render: (
-
- setCityData(nodes)}
- />
- ),
- },
+ // {
+ // name: "cityData",
+ // label: "属地",
+ // render: (
+ //
+ // 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,
+ // },
]}
/>
(
- {getAreaNamePath(record)}
- ),
- },
+ // {
+ // title: "属地",
+ // dataIndex: "cityName",
+ // render: (_, record) => (
+ // {getAreaNamePath(record)}
+ // ),
+ // },
{
title: "创建单位",
dataIndex: "tenantName",
diff --git a/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js b/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js
index 07e4c19..b896cf2 100644
--- a/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js
+++ b/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js
@@ -47,7 +47,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
- content: "确定要重置密码为Aa@12345678吗?",
+ content: "确定要重置密码为Cc@12345678吗?",
onOk: () => {
props["userChangePassword"]({
id,
@@ -357,22 +357,22 @@ function AddModalComponent(props) {
label: "民族",
children: info.nationName,
},
- {
- label: "婚姻状况",
- children: info.maritalStatusName,
- },
+ // {
+ // label: "婚姻状况",
+ // children: info.maritalStatusName,
+ // },
{
label: "政治面貌",
children: info.politicalAffiliationName,
},
- {
- label: "户口所在地",
- children: info.locationAddress,
- },
- {
- label: "现住址",
- children: info.currentAddress,
- },
+ // {
+ // label: "户口所在地",
+ // children: info.locationAddress,
+ // },
+ // {
+ // label: "现住址",
+ // children: info.currentAddress,
+ // },
{
label: "文化程度",
children: info.culturalLevelName,
diff --git a/src/pages/Container/Enterprise/User/List/index.js b/src/pages/Container/Enterprise/User/List/index.js
index d6efc22..eab7ed6 100644
--- a/src/pages/Container/Enterprise/User/List/index.js
+++ b/src/pages/Container/Enterprise/User/List/index.js
@@ -85,7 +85,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
- content: "确定要重置密码为Aa@12345678吗?",
+ content: "确定要重置密码为Bb@12345678吗?",
onOk: () => {
props["userChangePassword"]({
id,
diff --git a/src/pages/Container/Stakeholder/CorpInfo/index.js b/src/pages/Container/Stakeholder/CorpInfo/index.js
index 4f8f764..a940c65 100644
--- a/src/pages/Container/Stakeholder/CorpInfo/index.js
+++ b/src/pages/Container/Stakeholder/CorpInfo/index.js
@@ -3,12 +3,8 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Form, message, Modal, QRCode } from "antd";
import { useEffect, useState } from "react";
import FormBuilder from "zy-react-library/components/FormBuilder";
-import Map from "zy-react-library/components/Map";
import Page from "zy-react-library/components/Page";
-import AreaSelect from "zy-react-library/components/SelectTree/Area";
-import DictionarySelect from "zy-react-library/components/SelectTree/Dictionary";
-import IndustrySelect from "zy-react-library/components/SelectTree/Industry";
import Upload from "zy-react-library/components/Upload";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
@@ -27,20 +23,20 @@ import { useDebounce } from "~/utils";
const REQUIRED_FIELDS = [
"corpName",
"code",
- "province",
- "ecoType",
+ // "province",
+ // "ecoType",
"addressBusiness",
- "scale",
+ // "scale",
"lrName",
"lrMobile",
"contacts",
"contactsPhone",
- "createDate",
+ // "createDate",
"employees",
- "regcapital",
- "totalAssets",
- "licenseStart",
- "licenseEnd",
+ // "regcapital",
+ // "totalAssets",
+ // "licenseStart",
+ // "licenseEnd",
];
const ENTERPRISE_STATUS = [
{
@@ -128,9 +124,9 @@ function CorpInfo(props) {
// 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;
+ // data.region = data.village || data.street || data.country || data.city || data.province;
setInfoData(data);
- setCorpInfoId(res.data.corpinfoId)
+ setCorpInfoId(res.data.corpinfoId);
setKeyId({
id: res.data.corpinfoId,
corpinfoId: res.data.userId,
@@ -140,7 +136,7 @@ function CorpInfo(props) {
eqForeignKey: res.data.userId ? res.data.userId : "",
});
data.INDUSTRYALL = getLastValidCorpTypeName(data);
- data.license = [data.licenseStart, data.licenseEnd];
+ // data.license = [data.licenseStart, data.licenseEnd];
data.scaleType = data.scaleType ?? 0;
const hasLicenseFile = Array.isArray(licenseFile) && licenseFile.length > 0;
@@ -162,7 +158,6 @@ function CorpInfo(props) {
});
};
useEffect(() => {
-
fetchData();
}, []);
const onSubmit = async (values) => {
@@ -220,22 +215,20 @@ 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"]({
+ 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);
- });
+ }).then((res) => {
+ // res.data.region = res.data.village || res.data.street || res.data.country || res.data.city || res.data.province;
+ setInfoData(res.data);
+ });
// data.lrMobile = data.lrMobile && data.lrMobile.label;
// data.contactsPhone = data.contactsPhone && data.contactsPhone.label;
-
-
}
});
};
@@ -340,32 +333,30 @@ function CorpInfo(props) {
message: "请输入正确的统一社会信用代码",
},
],
- componentProps: {
- disabled: true,
- },
- },
- {
- label: "属地",
- name: "region",
- render: (
-
- setCityData(nodes)}
- />
- ),
- },
- {
- label: "所属行业",
- name: "INDUSTRYALL",
- required: false,
- render: (
- {
- setIndustryData(data);
- }}
- />
- ),
+
},
+ // {
+ // label: "属地",
+ // name: "region",
+ // render: (
+ //
+ // setCityData(nodes)}
+ // />
+ // ),
+ // },
+ // {
+ // label: "所属行业",
+ // name: "INDUSTRYALL",
+ // required: false,
+ // render: (
+ // {
+ // setIndustryData(data);
+ // }}
+ // />
+ // ),
+ // },
// {
// label: "企业状态",
@@ -377,42 +368,42 @@ function CorpInfo(props) {
// disabled: true,
// },
// },
- {
- label: "经济类型",
- name: "ecoType",
- required: false,
- render: (
- {
- setEcoTypeData(data);
- }}
- />
- ),
- },
- {
- name: "map",
- customizeRender: true,
- render: ,
- span: 24,
- },
+ // {
+ // label: "经济类型",
+ // name: "ecoType",
+ // required: false,
+ // render: (
+ // {
+ // setEcoTypeData(data);
+ // }}
+ // />
+ // ),
+ // },
+ // {
+ // name: "map",
+ // customizeRender: true,
+ // render: ,
+ // span: 24,
+ // },
{
label: "企事业单位经营地址",
name: "addressBusiness",
},
- {
- label: "企业规模",
- name: "scale",
-
- render: (
- {
- setScaleData(data);
- }}
- />
- ),
- },
+ // {
+ // label: "企业规模",
+ // name: "scale",
+ //
+ // render: (
+ // {
+ // setScaleData(data);
+ // }}
+ // />
+ // ),
+ // },
{
label: "法定代表人",
name: "lrName",
@@ -443,12 +434,12 @@ function CorpInfo(props) {
},
],
},
- {
- label: "成立日期",
- name: "createDate",
-
- render: FORM_ITEM_RENDER_ENUM.DATE,
- },
+ // {
+ // label: "成立日期",
+ // name: "createDate",
+ //
+ // render: FORM_ITEM_RENDER_ENUM.DATE,
+ // },
{
label: "职工人数(人)",
@@ -456,16 +447,16 @@ function CorpInfo(props) {
render: FORM_ITEM_RENDER_ENUM.NUMBER,
},
- {
- label: "注册资金(万元)",
- name: "regcapital",
- render: FORM_ITEM_RENDER_ENUM.NUMBER,
- },
- {
- label: "资产总额(万元)",
- name: "totalAssets",
- render: FORM_ITEM_RENDER_ENUM.NUMBER,
- },
+ // {
+ // label: "注册资金(万元)",
+ // name: "regcapital",
+ // render: FORM_ITEM_RENDER_ENUM.NUMBER,
+ // },
+ // {
+ // label: "资产总额(万元)",
+ // name: "totalAssets",
+ // render: FORM_ITEM_RENDER_ENUM.NUMBER,
+ // },
{
label: "营业执照",
@@ -481,11 +472,11 @@ function CorpInfo(props) {
/>
),
},
- {
- label: "营业执照有效期",
- name: "license",
- render: FORM_ITEM_RENDER_ENUM.DATE_RANGE,
- },
+ // {
+ // label: "营业执照有效期",
+ // name: "license",
+ // render: FORM_ITEM_RENDER_ENUM.DATE_RANGE,
+ // },
{
name: "qrCode",
label: "企业二维码",
diff --git a/src/pages/Container/Stakeholder/User/Add/index.js b/src/pages/Container/Stakeholder/User/Add/index.js
index 7f61249..72b2011 100644
--- a/src/pages/Container/Stakeholder/User/Add/index.js
+++ b/src/pages/Container/Stakeholder/User/Add/index.js
@@ -14,11 +14,18 @@ import useGetFile from "zy-react-library/hooks/useGetFile";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useUploadFile from "zy-react-library/hooks/useUploadFile";
import nation from "zy-react-library/json/nation.json";
-import { ID_NUMBER, PHONE } from "zy-react-library/regular";
+import { PHONE } from "zy-react-library/regular";
import { getLabelName, idCardGetDateAndGender } from "zy-react-library/utils";
import { NS_USER } from "~/enumerate/namespace";
-import { getAgeByIdCard, getBirthDateFromIdCard, useDebounce, UseDecodeIdCard } from "~/utils";
+import {
+ getAgeByIdCard,
+ getBirthDateFromIdCard,
+ getChineseIdCardFullErrorMessage,
+ isValidChineseIdCard,
+ useDebounce,
+ UseDecodeIdCard,
+} from "~/utils";
export const WHETHER_ENUM = [
{
@@ -189,6 +196,9 @@ function Add(props) {
]);
return;
}
+ if (!isValidChineseIdCard(debouncedUserIdCard)) {
+ return;
+ }
props["verifyUser"]({
userIdCard: btoa(debouncedUserIdCard),
id: queryParams["id"] ?? "",
@@ -259,11 +269,22 @@ function Add(props) {
if ("userIdCard" in changedValues) {
const newIdCard = changedValues.userIdCard;
setUserIdCardValue(newIdCard ?? "");
- if (newIdCard) {
+ form.setFields([
+ {
+ name: "userIdCard",
+ errors: [],
+ },
+ ]);
+ if (newIdCard && isValidChineseIdCard(newIdCard)) {
form.setFieldValue("sex", idCardGetDateAndGender(newIdCard).sex);
form.setFieldValue("age", getAgeByIdCard(newIdCard));
form.setFieldValue("birthday", getBirthDateFromIdCard(newIdCard));
}
+ else {
+ form.setFieldValue("sex", undefined);
+ form.setFieldValue("age", undefined);
+ form.setFieldValue("birthday", undefined);
+ }
}
if ("username" in changedValues) {
setUsernameValue(changedValues.username ?? "");
@@ -369,10 +390,17 @@ function Add(props) {
{
name: "userIdCard",
label: "身份证号",
+ validateTrigger: "onChange",
rules: [
{
- pattern: ID_NUMBER,
- message: "请输入正确的身份证号",
+ validateTrigger: "onChange",
+ validator: (_, value) => {
+ const errorMessage = getChineseIdCardFullErrorMessage(value);
+ if (!errorMessage) {
+ return Promise.resolve();
+ }
+ return Promise.reject(new Error(errorMessage));
+ },
},
],
},
@@ -417,14 +445,14 @@ function Add(props) {
disabled: true,
},
},
- {
- name: "locationAddress",
- label: "户口所在地",
- },
- {
- name: "currentAddress",
- label: "现住址",
- },
+ // {
+ // name: "locationAddress",
+ // label: "户口所在地",
+ // },
+ // {
+ // name: "currentAddress",
+ // label: "现住址",
+ // },
{
name: "culturalLevel",
label: "文化程度",
@@ -437,12 +465,12 @@ function Add(props) {
/>
),
},
- {
- name: "maritalStatus",
- label: "婚姻状况",
- render: FORM_ITEM_RENDER_ENUM.RADIO,
- items: MARITAL_STATUS_ENUM,
- },
+ // {
+ // name: "maritalStatus",
+ // label: "婚姻状况",
+ // render: FORM_ITEM_RENDER_ENUM.RADIO,
+ // items: MARITAL_STATUS_ENUM,
+ // },
{
name: "politicalAffiliation",
label: "政治面貌",
@@ -458,7 +486,6 @@ function Add(props) {
{
name: "postName",
label: "岗位(工种)",
- required: false,
},
{
name: "flowFlag",
diff --git a/src/pages/Container/Stakeholder/User/List/index.js b/src/pages/Container/Stakeholder/User/List/index.js
index a6187f9..5f62b87 100644
--- a/src/pages/Container/Stakeholder/User/List/index.js
+++ b/src/pages/Container/Stakeholder/User/List/index.js
@@ -50,7 +50,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
- content: "确定要重置密码为Aa@12345678吗?",
+ content: "确定要重置密码为Cc@12345678吗?",
onOk: () => {
props["userChangePassword"]({
id,
@@ -516,22 +516,22 @@ function AddModalComponent(props) {
label: "民族",
children: info.nationName,
},
- {
- label: "婚姻状况",
- children: info.maritalStatusName,
- },
+ // {
+ // label: "婚姻状况",
+ // children: info.maritalStatusName,
+ // },
{
label: "政治面貌",
children: info.politicalAffiliationName,
},
- {
- label: "户口所在地",
- children: info.locationAddress,
- },
- {
- label: "现住址",
- children: info.currentAddress,
- },
+ // {
+ // label: "户口所在地",
+ // children: info.locationAddress,
+ // },
+ // {
+ // label: "现住址",
+ // children: info.currentAddress,
+ // },
{
label: "文化程度",
children: info.culturalLevelName,
diff --git a/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js b/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js
index 9e006ab..4463a4f 100644
--- a/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js
+++ b/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js
@@ -80,7 +80,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
- content: "是否重置密码为Aa@12345678?",
+ content: "是否重置密码为Bb@12345678?",
onOk: () => {
props["corpInfoChangePassword"]({
id,
diff --git a/src/pages/Container/Supervision/StakeholderUnit/AccountManage/List/index.js b/src/pages/Container/Supervision/StakeholderUnit/AccountManage/List/index.js
index 5912e0e..bd0348a 100644
--- a/src/pages/Container/Supervision/StakeholderUnit/AccountManage/List/index.js
+++ b/src/pages/Container/Supervision/StakeholderUnit/AccountManage/List/index.js
@@ -6,8 +6,6 @@ import FormBuilder from "zy-react-library/components/FormBuilder";
import AddIcon from "zy-react-library/components/Icon/AddIcon";
import Search from "zy-react-library/components/Search";
-import DictionarySelect from "zy-react-library/components/Select/Dictionary";
-import AreaSelect from "zy-react-library/components/SelectTree/Area";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useTable from "zy-react-library/hooks/useTable";
@@ -33,7 +31,7 @@ const ENTERPRISE_TYPE = [
];
function List(props) {
const [form] = Form.useForm();
- const [cityData, setCityData] = useState([]);
+ // const [cityData, setCityData] = useState([]);
const { tableProps, getData } = useTable(props["corpInfoList"], {
form,
transform: (formData) => {
@@ -42,11 +40,11 @@ function List(props) {
enterpriseType: 3,
geCreateTime: formData.CreateTime?.[0],
leCreateTime: formData.CreateTime?.[1],
- eqProvince: formData.cityRecord?.[0],
- eqCity: formData.cityRecord?.[1],
- eqCountry: formData.cityRecord?.[2],
- eqStreet: formData.cityRecord?.[3],
- eqVillage: formData.cityRecord?.[4],
+ // eqProvince: formData.cityRecord?.[0],
+ // eqCity: formData.cityRecord?.[1],
+ // eqCountry: formData.cityRecord?.[2],
+ // eqStreet: formData.cityRecord?.[3],
+ // eqVillage: formData.cityRecord?.[4],
};
},
@@ -56,7 +54,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
- content: "是否重置密码为Aa@12345678?",
+ content: "是否重置密码为Cc@12345678?",
onOk: () => {
props["corpInfoChangePassword"]({
id,
@@ -93,21 +91,21 @@ 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 (
onFinish()}
- onReset={onReset}
+ onFinish={getData}
+ // onReset={onReset}
options={[
{
name: "likecorpName",
label: "企业名称",
},
- {
- name: "cityData",
- label: "属地",
- render: (
-
- setCityData(nodes)}
- />
- ),
- },
+ // {
+ // name: "cityData",
+ // label: "属地",
+ // render: (
+ //
+ // setCityData(nodes)}
+ // />
+ // ),
+ // },
{
name: "CreateTime",
label: "开户时间",
@@ -145,12 +143,12 @@ function List(props) {
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: ENTERPRISE_TYPE,
},
- {
- name: "cityRecord",
- label: "属地",
- render: FORM_ITEM_RENDER_ENUM.SELECT,
- onlyForLabel: true,
- },
+ // {
+ // name: "cityRecord",
+ // label: "属地",
+ // render: FORM_ITEM_RENDER_ENUM.SELECT,
+ // onlyForLabel: true,
+ // },
]}
@@ -180,14 +178,14 @@ function List(props) {
title: "企业名称",
dataIndex: "corpName",
},
- {
- title: "属地",
- dataIndex: "cityName",
- width: 300,
- render: (_, record) => (
- {getAreaNamePath(record)}
- ),
- },
+ // {
+ // title: "属地",
+ // dataIndex: "cityName",
+ // width: 300,
+ // render: (_, record) => (
+ // {getAreaNamePath(record)}
+ // ),
+ // },
{
title: "创建单位",
dataIndex: "tenantName",
@@ -251,19 +249,19 @@ function List(props) {
)
}
-
{props.permission("gszhxxgl-resetPassword")
&& (
@@ -453,6 +451,7 @@ function AddModalComponent(props) {
{
name: "code",
label: "统一社会信用代码",
+ required: false,
rules: [
{
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
@@ -460,23 +459,24 @@ function AddModalComponent(props) {
},
],
},
- {
- name: "ecoType",
- label: "经济类型",
- render: (
- {
- form.setFieldValue("ecoTypeName", label);
- }}
- />
- ),
- },
- {
- name: "ecoTypeName",
- label: "经济类型名称",
- onlyForLabel: true,
- },
+ // {
+ // name: "ecoType",
+ // label: "经济类型",
+ // required: false,
+ // render: (
+ // {
+ // form.setFieldValue("ecoTypeName", label);
+ // }}
+ // />
+ // ),
+ // },
+ // {
+ // name: "ecoTypeName",
+ // label: "经济类型名称",
+ // onlyForLabel: true,
+ // },
{
name: "type",
label: "相关方类型",
diff --git a/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js b/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js
index cebc9de..81fbfc9 100644
--- a/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js
+++ b/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js
@@ -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 = [
{
@@ -103,33 +103,33 @@ function View(props) {
children: info.code,
},
- {
- label: "属地",
- children: {getAreaNamePath(info)}
,
- },
-
- {
- label: "所属行业",
- children: {getCorpTypeNamePath(info)}
,
- },
-
- {
- label: "经济类型",
- children: info.ecoTypeName,
- },
- {
- label: "经度/纬度",
- children: info.longitude && `${info.longitude}/${info.latitude}`,
- },
+ // {
+ // label: "属地",
+ // children: {getAreaNamePath(info)}
,
+ // },
+ //
+ // {
+ // label: "所属行业",
+ // children: {getCorpTypeNamePath(info)}
,
+ // },
+ //
+ // {
+ // label: "经济类型",
+ // children: info.ecoTypeName,
+ // },
+ // {
+ // label: "经度/纬度",
+ // children: info.longitude && `${info.longitude}/${info.latitude}`,
+ // },
{
label: "单位经营地址",
children: info.addressBusiness,
},
- {
- label: "企业规模",
- children: info.scaleName,
- },
+ // {
+ // label: "企业规模",
+ // children: info.scaleName,
+ // },
{
label: "法定代表人",
@@ -189,10 +189,10 @@ function View(props) {
),
},
- {
- label: "成立日期",
- children: info.createDate,
- },
+ // {
+ // label: "成立日期",
+ // children: info.createDate,
+ // },
{
label: "职工人数(人)",
children: info.employees,
@@ -202,14 +202,14 @@ function View(props) {
// children: info.areaCovered,
// },
- {
- label: "注册资金(万元)",
- children: info.regcapital,
- },
- {
- label: "资产总额(万元)",
- children: info.totalAssets,
- },
+ // {
+ // label: "注册资金(万元)",
+ // children: info.regcapital,
+ // },
+ // {
+ // label: "资产总额(万元)",
+ // children: info.totalAssets,
+ // },
{
label: "企业二维码",
diff --git a/src/pages/Container/Supervision/StakeholderUnit/User/List/index.js b/src/pages/Container/Supervision/StakeholderUnit/User/List/index.js
index f809ff5..1c0fd4e 100644
--- a/src/pages/Container/Supervision/StakeholderUnit/User/List/index.js
+++ b/src/pages/Container/Supervision/StakeholderUnit/User/List/index.js
@@ -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 (
onFinish()}
- onReset={onReset}
+ onFinish={getData}
+ // onReset={onReset}
options={[
{
name: "likeCorpName",
label: "企业名称",
},
- {
- name: "cityData",
- label: "属地",
- render: (
-
- setCityData(nodes)}
- />
- ),
- },
+ // {
+ // name: "cityData",
+ // label: "属地",
+ // render: (
+ //
+ // 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,
+ // },
]}
/>
(
- {getAreaNamePath(record)}
- ),
- },
+ // {
+ // title: "属地",
+ // dataIndex: "cityName",
+ // render: (_, record) => (
+ // {getAreaNamePath(record)}
+ // ),
+ // },
{
title: "创建单位",
dataIndex: "tenantName",
diff --git a/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js b/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js
index 385aef6..104921b 100644
--- a/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js
+++ b/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js
@@ -49,7 +49,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
- content: "确定要重置密码为Aa@12345678吗?",
+ content: "确定要重置密码为Cc@12345678吗?",
onOk: () => {
props["userChangePassword"]({
id,
@@ -362,22 +362,22 @@ function AddModalComponent(props) {
label: "民族",
children: info.nationName,
},
- {
- label: "婚姻状况",
- children: info.maritalStatusName,
- },
+ // {
+ // label: "婚姻状况",
+ // children: info.maritalStatusName,
+ // },
{
label: "政治面貌",
children: info.politicalAffiliationName,
},
- {
- label: "户口所在地",
- children: info.locationAddress,
- },
- {
- label: "现住址",
- children: info.currentAddress,
- },
+ // {
+ // label: "户口所在地",
+ // children: info.locationAddress,
+ // },
+ // {
+ // label: "现住址",
+ // children: info.currentAddress,
+ // },
{
label: "文化程度",
children: info.culturalLevelName,
diff --git a/src/utils/index.js b/src/utils/index.js
index 6820eec..348f4e5 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -1,5 +1,103 @@
import { useEffect, useRef, useState } from "react";
+/**
+ * 校验中国大陆18位身份证号
+ * 包含地址码、年份(18/19/20开头)、月份、日期、顺序码和校验位
+ * @param {string} idCard
+ * @returns {boolean}
+ */
+export function isValidChineseIdCard(idCard) {
+ if (!idCard || typeof idCard !== "string") {
+ return false;
+ }
+
+ const value = idCard.trim();
+ if (!isValidChineseIdCardFormat(value)) {
+ return false;
+ }
+
+ const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
+ const checkCodeMap = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"];
+ const sum = value
+ .substring(0, 17)
+ .split("")
+ .reduce((total, num, index) => total + Number(num) * weights[index], 0);
+
+ return checkCodeMap[sum % 11] === value[17].toUpperCase();
+}
+
+export function isValidChineseIdCardFormat(idCard) {
+ if (!idCard || typeof idCard !== "string") {
+ return false;
+ }
+
+ const value = idCard.trim();
+ const pattern = /^[1-9][0-9]{5}(18|19|20)[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])[0-9]{3}[0-9Xx]$/;
+
+ if (!pattern.test(value)) {
+ return false;
+ }
+
+ const year = Number.parseInt(value.substring(6, 10), 10);
+ const month = Number.parseInt(value.substring(10, 12), 10);
+ const day = Number.parseInt(value.substring(12, 14), 10);
+ const date = new Date(year, month - 1, day);
+
+ return (
+ date.getFullYear() === year
+ && date.getMonth() === month - 1
+ && date.getDate() === day
+ );
+}
+
+export function getChineseIdCardInputErrorMessage(idCard) {
+ if (!idCard || typeof idCard !== "string") {
+ return "";
+ }
+
+ const value = idCard.trim();
+
+ if (!/^[0-9Xx]*$/.test(value)) {
+ return "身份证号只能输入数字或X";
+ }
+
+ if (value.length > 18) {
+ return "身份证号长度不能超过18位";
+ }
+
+ if (value.length < 18) {
+ return "";
+ }
+
+ if (!isValidChineseIdCardFormat(value)) {
+ return "请输入正确的18位身份证号";
+ }
+
+ return "";
+}
+
+export function getChineseIdCardFullErrorMessage(idCard) {
+ const inputErrorMessage = getChineseIdCardInputErrorMessage(idCard);
+ if (inputErrorMessage) {
+ return inputErrorMessage;
+ }
+
+ if (!idCard || typeof idCard !== "string") {
+ return "";
+ }
+
+ const value = idCard.trim();
+ if (value.length < 18) {
+ return "";
+ }
+
+ if (!isValidChineseIdCard(value)) {
+ return "身份证校验位不正确";
+ }
+
+ return "";
+}
+
/**
* 根据身份证号计算年龄
* @param {string} idCard - 18位身份证号码