分公司模块 统一修改为分公司
parent
b91899d3ea
commit
744a6501c5
|
|
@ -301,15 +301,15 @@ function AddModalComponent(props) {
|
||||||
id: props.currentId,
|
id: props.currentId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const arr = [];
|
// const arr = [];
|
||||||
|
//
|
||||||
if (res.data.selectfromList && res.data.selectfromList.length > 0) {
|
// if (res.data.selectfromList && res.data.selectfromList.length > 0) {
|
||||||
res.data.selectfromList.forEach((item) => {
|
// res.data.selectfromList.forEach((item) => {
|
||||||
arr.push(item.itemCode);
|
// arr.push(item.itemCode);
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
res.data.selectfromList = arr;
|
// res.data.selectfromList = arr;
|
||||||
}
|
// }
|
||||||
|
|
||||||
form.setFieldsValue(res.data);
|
form.setFieldsValue(res.data);
|
||||||
});
|
});
|
||||||
|
|
@ -320,19 +320,19 @@ function AddModalComponent(props) {
|
||||||
props.onCancel();
|
props.onCancel();
|
||||||
};
|
};
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
const arr = [];
|
// const arr = [];
|
||||||
|
//
|
||||||
values.selectfromList.forEach((item) => {
|
// values.selectfromList.forEach((item) => {
|
||||||
selectfromData.forEach((row) => {
|
// selectfromData.forEach((row) => {
|
||||||
if (item === row.dictValue) {
|
// if (item === row.dictValue) {
|
||||||
arr.push({
|
// arr.push({
|
||||||
itemName: row.dictLabel,
|
// itemName: row.dictLabel,
|
||||||
itemCode: row.dictValue,
|
// itemCode: row.dictValue,
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
values.selectfromList = arr;
|
// values.selectfromList = arr;
|
||||||
|
|
||||||
if (props.currentId) {
|
if (props.currentId) {
|
||||||
values.id = props.currentId;
|
values.id = props.currentId;
|
||||||
|
|
@ -459,23 +459,26 @@ function AddModalComponent(props) {
|
||||||
label: "相关方类型",
|
label: "相关方类型",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_TYPE,
|
items: ENTERPRISE_TYPE,
|
||||||
|
componentProps: {
|
||||||
|
disabled: props.currentId,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: "selectfromList",
|
// name: "selectfromList",
|
||||||
label: "选取形式",
|
// label: "选取形式",
|
||||||
|
//
|
||||||
render: (
|
// render: (
|
||||||
<DictionarySelect
|
// <DictionarySelect
|
||||||
mode="multiple"
|
// mode="multiple"
|
||||||
dictValue="select_from_List"
|
// dictValue="select_from_List"
|
||||||
|
//
|
||||||
onGetData={(data) => {
|
// onGetData={(data) => {
|
||||||
setSelectfromData(data);
|
// setSelectfromData(data);
|
||||||
}}
|
// }}
|
||||||
|
//
|
||||||
/>
|
// />
|
||||||
),
|
// ),
|
||||||
},
|
// },
|
||||||
]}
|
]}
|
||||||
labelCol={{
|
labelCol={{
|
||||||
span: 10,
|
span: 10,
|
||||||
|
|
|
||||||
|
|
@ -42,14 +42,14 @@ function View(props) {
|
||||||
const res = await props.corpInfoDetails({
|
const res = await props.corpInfoDetails({
|
||||||
id: queryParams["id"],
|
id: queryParams["id"],
|
||||||
});
|
});
|
||||||
const arr = [];
|
// const arr = [];
|
||||||
|
//
|
||||||
res.data.selectfromList && res.data.selectfromList.forEach((item) => {
|
// res.data.selectfromList && res.data.selectfromList.forEach((item) => {
|
||||||
arr.push(item.itemName);
|
// arr.push(item.itemName);
|
||||||
});
|
// });
|
||||||
if (arr.length > 0) {
|
// if (arr.length > 0) {
|
||||||
res.data.selectfromList = arr.join(",");
|
// res.data.selectfromList = arr.join(",");
|
||||||
}
|
// }
|
||||||
|
|
||||||
const licenseFile = await getFile({
|
const licenseFile = await getFile({
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
|
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
|
||||||
|
|
@ -235,10 +235,10 @@ function View(props) {
|
||||||
label: "创建单位",
|
label: "创建单位",
|
||||||
children: info.createName,
|
children: info.createName,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: "选取形式",
|
// label: "选取形式",
|
||||||
children: info.selectfromList,
|
// children: info.selectfromList,
|
||||||
},
|
// },
|
||||||
]}
|
]}
|
||||||
column={2}
|
column={2}
|
||||||
loding={getFileLoading}
|
loding={getFileLoading}
|
||||||
|
|
|
||||||
|
|
@ -209,10 +209,16 @@ function AddModalComponent(props) {
|
||||||
const res = await props.requestDetails({
|
const res = await props.requestDetails({
|
||||||
id: props.currentId,
|
id: props.currentId,
|
||||||
});
|
});
|
||||||
const userImg = await getFile({
|
const userImg = (res.data && res.data.userAvatarUrl)
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
? [
|
||||||
eqForeignKey: res.data.userId,
|
{
|
||||||
});
|
filePath: res.data.userAvatarUrl,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: await getFile({
|
||||||
|
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||||
|
eqForeignKey: res.data.userId,
|
||||||
|
});
|
||||||
const cardImg = await getFile({
|
const cardImg = await getFile({
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
||||||
eqForeignKey: res.data.userId,
|
eqForeignKey: res.data.userId,
|
||||||
|
|
|
||||||
|
|
@ -379,7 +379,7 @@ function Add(props) {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div>* 图像格式:JPG、JPEG、PNG</div>
|
<div>* 图像格式:jpg、jpeg、png</div>
|
||||||
<div>* 图像大小:不超过4M。</div>
|
<div>* 图像大小:不超过4M。</div>
|
||||||
<div>* 照片大小: 推荐 500*500</div>
|
<div>* 照片大小: 推荐 500*500</div>
|
||||||
<div>* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图</div>
|
<div>* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图</div>
|
||||||
|
|
|
||||||
|
|
@ -341,11 +341,16 @@ function AddModalComponent(props) {
|
||||||
const res = await props.requestDetails({
|
const res = await props.requestDetails({
|
||||||
id: props.currentId,
|
id: props.currentId,
|
||||||
});
|
});
|
||||||
res.data.userAvatarUrl = [
|
if (res.data && res.data.userAvatarUrl) {
|
||||||
{
|
res.data.userAvatarUrl = [
|
||||||
filePath: res.data.userAvatarUrl,
|
{
|
||||||
},
|
filePath: res.data.userAvatarUrl,
|
||||||
];
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
res.data.userAvatarUrl = [];
|
||||||
|
}
|
||||||
|
|
||||||
setInfo(res.data);
|
setInfo(res.data);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -305,7 +305,7 @@ function Add(props) {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div>* 图像格式:JPG、JPEG、PNG</div>
|
<div>* 图像格式:jpg、jpeg、png</div>
|
||||||
<div>* 图像大小:不超过4M。</div>
|
<div>* 图像大小:不超过4M。</div>
|
||||||
<div>* 照片大小: 推荐 500*500</div>
|
<div>* 照片大小: 推荐 500*500</div>
|
||||||
<div>* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图</div>
|
<div>* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图</div>
|
||||||
|
|
|
||||||
|
|
@ -320,10 +320,16 @@ function AddModalComponent(props) {
|
||||||
const res = await props.requestDetails({
|
const res = await props.requestDetails({
|
||||||
id: props.currentId,
|
id: props.currentId,
|
||||||
});
|
});
|
||||||
const userImg = await getFile({
|
const userImg = (res.data && res.data.userAvatarUrl)
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
? [
|
||||||
eqForeignKey: res.data.userId,
|
{
|
||||||
});
|
filePath: res.data.userAvatarUrl,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: await getFile({
|
||||||
|
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||||
|
eqForeignKey: res.data.userId,
|
||||||
|
});
|
||||||
const cardImg = await getFile({
|
const cardImg = await getFile({
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
||||||
eqForeignKey: res.data.userId,
|
eqForeignKey: res.data.userId,
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@ import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||||
// import { getLabelName } from "zy-react-library/utils";
|
// import { getLabelName } from "zy-react-library/utils";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
||||||
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
||||||
import { useDebounce } from "~/utils";
|
import { useDebounce } from "~/utils";
|
||||||
|
|
||||||
|
|
@ -34,6 +34,10 @@ const ENTERPRISE_TYPE = [
|
||||||
bianma: 1,
|
bianma: 1,
|
||||||
name: "集团单位",
|
name: "集团单位",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
bianma: 6,
|
||||||
|
name: "物资中心",
|
||||||
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
const ENTERPRISE_STATUS = [
|
const ENTERPRISE_STATUS = [
|
||||||
|
|
@ -141,11 +145,11 @@ function List(props) {
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "likecorpName",
|
name: "likecorpName",
|
||||||
label: "公司名称",
|
label: "分公司名称",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "eqCorpState",
|
name: "eqCorpState",
|
||||||
label: "公司状态",
|
label: "分公司状态",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_STATUS,
|
items: ENTERPRISE_STATUS,
|
||||||
},
|
},
|
||||||
|
|
@ -185,7 +189,7 @@ function List(props) {
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
title: "公司名称",
|
title: "分公司名称",
|
||||||
dataIndex: "corpName",
|
dataIndex: "corpName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -209,7 +213,7 @@ function List(props) {
|
||||||
// dataIndex: "ecoTypeName",
|
// dataIndex: "ecoTypeName",
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
title: "公司状态",
|
title: "分公司状态",
|
||||||
dataIndex: "corpStateName",
|
dataIndex: "corpStateName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -374,6 +378,7 @@ function AddModalComponent(props) {
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
if (props.openType === "editName") {
|
if (props.openType === "editName") {
|
||||||
values.id = props.currentId;
|
values.id = props.currentId;
|
||||||
|
|
||||||
await props.requestChangeCompanyName(values).then((res) => {
|
await props.requestChangeCompanyName(values).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success("修改成功");
|
message.success("修改成功");
|
||||||
|
|
@ -383,6 +388,12 @@ function AddModalComponent(props) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
values.corpStateName = getLabelName({
|
||||||
|
status: values.corpState,
|
||||||
|
list: ENTERPRISE_STATUS,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
if (props.openType === "edit") {
|
if (props.openType === "edit") {
|
||||||
values.id = props.currentId;
|
values.id = props.currentId;
|
||||||
await props.requestEdit(values).then((res) => {
|
await props.requestEdit(values).then((res) => {
|
||||||
|
|
@ -482,7 +493,7 @@ function AddModalComponent(props) {
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "corpName",
|
name: "corpName",
|
||||||
label: "公司名称",
|
label: "分公司名称",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "code",
|
name: "code",
|
||||||
|
|
@ -503,24 +514,25 @@ function AddModalComponent(props) {
|
||||||
hidden: props.openType === "editName",
|
hidden: props.openType === "editName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ecoType",
|
name: "corpState",
|
||||||
label: "经济类型",
|
label: "分公司状态",
|
||||||
render: (
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
<DictionarySelect
|
items: ENTERPRISE_STATUS,
|
||||||
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",
|
name: "corpOrder",
|
||||||
label: "列表排序",
|
label: "列表排序",
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ function View(props) {
|
||||||
bordered
|
bordered
|
||||||
items={[
|
items={[
|
||||||
{
|
{
|
||||||
label: "公司名称",
|
label: "分公司名称",
|
||||||
children: info.corpName && info.corpName,
|
children: info.corpName && info.corpName,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -75,11 +75,11 @@ function List(props) {
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "likecorpName",
|
name: "likecorpName",
|
||||||
label: "公司名称",
|
label: "分公司名称",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "eqCorpState",
|
name: "eqCorpState",
|
||||||
label: "公司状态",
|
label: "分公司状态",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: BRANCH_CONPANY_STATUS,
|
items: BRANCH_CONPANY_STATUS,
|
||||||
},
|
},
|
||||||
|
|
@ -95,7 +95,7 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
title: "公司名称",
|
title: "分公司名称",
|
||||||
dataIndex: "corpName",
|
dataIndex: "corpName",
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -127,7 +127,7 @@ function List(props) {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "公司状态",
|
title: "分公司状态",
|
||||||
dataIndex: "corpStateName",
|
dataIndex: "corpStateName",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ function AddModalComponent(props) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "部门名称",
|
label: "部门名称",
|
||||||
children: info.parentName,
|
children: info.name,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "部门级别",
|
label: "部门级别",
|
||||||
|
|
|
||||||
|
|
@ -89,10 +89,10 @@ function List(props) {
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "likecorpName",
|
name: "likecorpName",
|
||||||
label: "公司名称",
|
label: "分公司名称",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "公司状态",
|
label: "分公司状态",
|
||||||
name: "eqCorpState",
|
name: "eqCorpState",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_STATUS,
|
items: ENTERPRISE_STATUS,
|
||||||
|
|
@ -112,7 +112,7 @@ function List(props) {
|
||||||
// )}
|
// )}
|
||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
title: "公司名称",
|
title: "分公司名称",
|
||||||
dataIndex: "corpName",
|
dataIndex: "corpName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -132,7 +132,7 @@ function List(props) {
|
||||||
dataIndex: "contactsPhone",
|
dataIndex: "contactsPhone",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "公司状态",
|
title: "分公司状态",
|
||||||
dataIndex: "corpStateName",
|
dataIndex: "corpStateName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ function View(props) {
|
||||||
loding={getFileLoading}
|
loding={getFileLoading}
|
||||||
items={[
|
items={[
|
||||||
{
|
{
|
||||||
label: "公司名称",
|
label: "分公司名称",
|
||||||
children: info.corpName && info.corpName,
|
children: info.corpName && info.corpName,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -140,7 +140,7 @@ function View(props) {
|
||||||
children: info.licenseStart ? ` ${info.licenseStart} 至 ${info.licenseEnd}` : "",
|
children: info.licenseStart ? ` ${info.licenseStart} 至 ${info.licenseEnd}` : "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "公司状态",
|
label: "分公司状态",
|
||||||
children: info.corpStateName,
|
children: info.corpStateName,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
|
||||||
|
|
@ -63,12 +63,12 @@ function List(props) {
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "likeCorpName",
|
name: "likeCorpName",
|
||||||
label: "公司名称",
|
label: "分公司名称",
|
||||||
placeholder: "请输入分公司名称",
|
placeholder: "请输入分公司名称",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "eqCorpState",
|
name: "eqCorpState",
|
||||||
label: "公司状态",
|
label: "分公司状态",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_STATUS,
|
items: ENTERPRISE_STATUS,
|
||||||
},
|
},
|
||||||
|
|
@ -84,7 +84,7 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
title: "公司名称",
|
title: "分公司名称",
|
||||||
dataIndex: "corpName",
|
dataIndex: "corpName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -95,7 +95,7 @@ function List(props) {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "公司状态",
|
title: "分公司状态",
|
||||||
dataIndex: "corpStateName",
|
dataIndex: "corpStateName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -70,19 +70,26 @@ function List(props) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDelete = (id) => {
|
const onDelete = () => {
|
||||||
|
// Modal.confirm({
|
||||||
|
// title: "提示",
|
||||||
|
// content: "确定删除吗?",
|
||||||
|
// onOk: () => {
|
||||||
|
// props["corpInfoRemove"]({
|
||||||
|
// id,
|
||||||
|
// }).then((res) => {
|
||||||
|
// if (res.success) {
|
||||||
|
// message.success("删除成功");
|
||||||
|
// getData();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// });
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "确定删除吗?",
|
content: "删除请联系管理员操作!",
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
props["corpInfoRemove"]({
|
|
||||||
id,
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
message.success("删除成功");
|
|
||||||
getData();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -183,8 +190,9 @@ function List(props) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建单位",
|
title: "创建单位",
|
||||||
dataIndex: "createName",
|
dataIndex: "tenantName",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "开户人",
|
title: "开户人",
|
||||||
dataIndex: "accountContactName",
|
dataIndex: "accountContactName",
|
||||||
|
|
@ -295,7 +303,7 @@ function AddModalComponent(props) {
|
||||||
const [corpNameValue, setCorpNameValue] = useState("");
|
const [corpNameValue, setCorpNameValue] = useState("");
|
||||||
const debouncedCode = useDebounce(codeValue, 600);
|
const debouncedCode = useDebounce(codeValue, 600);
|
||||||
const debouncedCorpName = useDebounce(corpNameValue, 600);
|
const debouncedCorpName = useDebounce(corpNameValue, 600);
|
||||||
const [selectfromData, setSelectfromData] = useState([]);
|
// const [selectfromData, setSelectfromData] = useState([]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (props.currentId) {
|
if (props.currentId) {
|
||||||
props
|
props
|
||||||
|
|
@ -303,13 +311,13 @@ function AddModalComponent(props) {
|
||||||
id: props.currentId,
|
id: props.currentId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data && res.data.selectfromList) {
|
// if (res.data && res.data.selectfromList) {
|
||||||
const arr = [];
|
// const arr = [];
|
||||||
res.data.selectfromList.forEach((item) => {
|
// res.data.selectfromList.forEach((item) => {
|
||||||
arr.push(item.itemCode);
|
// arr.push(item.itemCode);
|
||||||
});
|
// });
|
||||||
res.data.selectfromList = arr;
|
// res.data.selectfromList = arr;
|
||||||
}
|
// }
|
||||||
form.setFieldsValue(res.data);
|
form.setFieldsValue(res.data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -319,18 +327,18 @@ function AddModalComponent(props) {
|
||||||
props.onCancel();
|
props.onCancel();
|
||||||
};
|
};
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
const arr = [];
|
// const arr = [];
|
||||||
values.selectfromList.forEach((item) => {
|
// values.selectfromList.forEach((item) => {
|
||||||
selectfromData.forEach((row) => {
|
// selectfromData.forEach((row) => {
|
||||||
if (item === row.dictValue) {
|
// if (item === row.dictValue) {
|
||||||
arr.push({
|
// arr.push({
|
||||||
itemName: row.dictLabel,
|
// itemName: row.dictLabel,
|
||||||
itemCode: row.dictValue,
|
// itemCode: row.dictValue,
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
values.selectfromList = arr;
|
// values.selectfromList = arr;
|
||||||
|
|
||||||
if (props.currentId) {
|
if (props.currentId) {
|
||||||
values.id = props.currentId;
|
values.id = props.currentId;
|
||||||
|
|
@ -459,23 +467,23 @@ function AddModalComponent(props) {
|
||||||
disabled: props.currentId,
|
disabled: props.currentId,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: "selectfromList",
|
// name: "selectfromList",
|
||||||
label: "选取形式",
|
// label: "选取形式",
|
||||||
|
//
|
||||||
render: (
|
// render: (
|
||||||
<DictionarySelect
|
// <DictionarySelect
|
||||||
mode="multiple"
|
// mode="multiple"
|
||||||
dictValue="select_from_List"
|
// dictValue="select_from_List"
|
||||||
idKey="dictValue"
|
// idKey="dictValue"
|
||||||
nameKey="dictLabel"
|
// nameKey="dictLabel"
|
||||||
onGetData={(data) => {
|
// onGetData={(data) => {
|
||||||
setSelectfromData(data);
|
// setSelectfromData(data);
|
||||||
}}
|
// }}
|
||||||
|
//
|
||||||
/>
|
// />
|
||||||
),
|
// ),
|
||||||
},
|
// },
|
||||||
]}
|
]}
|
||||||
labelCol={{
|
labelCol={{
|
||||||
span: 10,
|
span: 10,
|
||||||
|
|
|
||||||
|
|
@ -42,14 +42,14 @@ function View(props) {
|
||||||
const res = await props.corpInfoDetails({
|
const res = await props.corpInfoDetails({
|
||||||
id: queryParams["id"],
|
id: queryParams["id"],
|
||||||
});
|
});
|
||||||
const arr = [];
|
// const arr = [];
|
||||||
|
//
|
||||||
res.data.selectfromList && res.data.selectfromList.forEach((item) => {
|
// res.data.selectfromList && res.data.selectfromList.forEach((item) => {
|
||||||
arr.push(item.itemName);
|
// arr.push(item.itemName);
|
||||||
});
|
// });
|
||||||
if (arr.length > 0) {
|
// if (arr.length > 0) {
|
||||||
res.data.selectfromList = arr.join(",");
|
// res.data.selectfromList = arr.join(",");
|
||||||
}
|
// }
|
||||||
|
|
||||||
const licenseFile = await getFile({
|
const licenseFile = await getFile({
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
|
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
|
||||||
|
|
@ -235,10 +235,10 @@ function View(props) {
|
||||||
label: "创建单位",
|
label: "创建单位",
|
||||||
children: info.createName,
|
children: info.createName,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: "选取形式",
|
// label: "选取形式",
|
||||||
children: info.selectfromList,
|
// children: info.selectfromList,
|
||||||
},
|
// },
|
||||||
]}
|
]}
|
||||||
column={2}
|
column={2}
|
||||||
loding={getFileLoading}
|
loding={getFileLoading}
|
||||||
|
|
|
||||||
|
|
@ -211,10 +211,18 @@ function AddModalComponent(props) {
|
||||||
const res = await props.requestDetails({
|
const res = await props.requestDetails({
|
||||||
id: props.currentId,
|
id: props.currentId,
|
||||||
});
|
});
|
||||||
const userImg = await getFile({
|
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
const userImg = (res.data && res.data.userAvatarUrl)
|
||||||
eqForeignKey: res.data.userId,
|
? [
|
||||||
});
|
{
|
||||||
|
filePath: res.data.userAvatarUrl,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: await getFile({
|
||||||
|
eqType: UPLOAD_FILE_TYPE_ENUM["13"],
|
||||||
|
eqForeignKey: res.data.userId,
|
||||||
|
});
|
||||||
|
|
||||||
const cardImg = await getFile({
|
const cardImg = await getFile({
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
eqType: UPLOAD_FILE_TYPE_ENUM["14"],
|
||||||
eqForeignKey: res.data.userId,
|
eqForeignKey: res.data.userId,
|
||||||
|
|
|
||||||
|
|
@ -386,7 +386,7 @@ function Add(props) {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div>* 图像格式:JPG、JPEG、PNG</div>
|
<div>* 图像格式:jpg、jpeg、png</div>
|
||||||
<div>* 图像大小:不超过4M。</div>
|
<div>* 图像大小:不超过4M。</div>
|
||||||
<div>* 照片大小: 推荐 500*500</div>
|
<div>* 照片大小: 推荐 500*500</div>
|
||||||
<div>* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图</div>
|
<div>* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图</div>
|
||||||
|
|
|
||||||
|
|
@ -410,11 +410,16 @@ function AddModalComponent(props) {
|
||||||
const res = await props.requestDetails({
|
const res = await props.requestDetails({
|
||||||
id: props.currentId,
|
id: props.currentId,
|
||||||
});
|
});
|
||||||
res.data.userAvatarUrl = [
|
if (res.data && res.data.userAvatarUrl) {
|
||||||
{
|
res.data.userAvatarUrl = [
|
||||||
filePath: res.data.userAvatarUrl,
|
{
|
||||||
},
|
filePath: res.data.userAvatarUrl,
|
||||||
];
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
res.data.userAvatarUrl = [];
|
||||||
|
}
|
||||||
setInfo(res.data);
|
setInfo(res.data);
|
||||||
};
|
};
|
||||||
fetchData();
|
fetchData();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue