diff --git a/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/List/index.js b/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/List/index.js index 659d22b..59384d1 100644 --- a/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/List/index.js +++ b/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/List/index.js @@ -301,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); }); @@ -320,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; @@ -459,23 +459,26 @@ function AddModalComponent(props) { label: "相关方类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_TYPE, + componentProps: { + disabled: props.currentId, + }, }, - { - name: "selectfromList", - label: "选取形式", - - render: ( - { - setSelectfromData(data); - }} - - /> - ), - }, + // { + // name: "selectfromList", + // label: "选取形式", + // + // render: ( + // { + // setSelectfromData(data); + // }} + // + // /> + // ), + // }, ]} labelCol={{ span: 10, diff --git a/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/View/index.js b/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/View/index.js index f3bd1e2..f9349de 100644 --- a/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/View/index.js +++ b/src/pages/Container/Enterprise/StakeholderUnit/AccountManage/View/index.js @@ -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"], @@ -235,10 +235,10 @@ function View(props) { label: "创建单位", children: info.createName, }, - { - label: "选取形式", - children: info.selectfromList, - }, + // { + // label: "选取形式", + // children: info.selectfromList, + // }, ]} column={2} loding={getFileLoading} diff --git a/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js b/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js index 60ca049..5bf24fa 100644 --- a/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js +++ b/src/pages/Container/Enterprise/StakeholderUnit/User/UserList/index.js @@ -209,10 +209,16 @@ function AddModalComponent(props) { const res = await props.requestDetails({ id: props.currentId, }); - const userImg = await getFile({ - eqType: UPLOAD_FILE_TYPE_ENUM["13"], - eqForeignKey: res.data.userId, - }); + 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, diff --git a/src/pages/Container/Enterprise/User/Add/index.js b/src/pages/Container/Enterprise/User/Add/index.js index 2c2fd54..ee89e08 100644 --- a/src/pages/Container/Enterprise/User/Add/index.js +++ b/src/pages/Container/Enterprise/User/Add/index.js @@ -379,7 +379,7 @@ function Add(props) { fontSize: 12, }} > -
* 图像格式:JPG、JPEG、PNG
+
* 图像格式:jpg、jpeg、png
* 图像大小:不超过4M。
* 照片大小: 推荐 500*500
* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图
diff --git a/src/pages/Container/Enterprise/User/List/index.js b/src/pages/Container/Enterprise/User/List/index.js index 68e7226..87f9a49 100644 --- a/src/pages/Container/Enterprise/User/List/index.js +++ b/src/pages/Container/Enterprise/User/List/index.js @@ -341,11 +341,16 @@ function AddModalComponent(props) { const res = await props.requestDetails({ id: props.currentId, }); - res.data.userAvatarUrl = [ - { - filePath: res.data.userAvatarUrl, - }, - ]; + if (res.data && res.data.userAvatarUrl) { + res.data.userAvatarUrl = [ + { + filePath: res.data.userAvatarUrl, + }, + ]; + } + else { + res.data.userAvatarUrl = []; + } setInfo(res.data); }; diff --git a/src/pages/Container/Stakeholder/User/Add/index.js b/src/pages/Container/Stakeholder/User/Add/index.js index df36f85..7f61249 100644 --- a/src/pages/Container/Stakeholder/User/Add/index.js +++ b/src/pages/Container/Stakeholder/User/Add/index.js @@ -305,7 +305,7 @@ function Add(props) { fontSize: 12, }} > -
* 图像格式:JPG、JPEG、PNG
+
* 图像格式:jpg、jpeg、png
* 图像大小:不超过4M。
* 照片大小: 推荐 500*500
* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图
diff --git a/src/pages/Container/Stakeholder/User/List/index.js b/src/pages/Container/Stakeholder/User/List/index.js index 9be2895..a6187f9 100644 --- a/src/pages/Container/Stakeholder/User/List/index.js +++ b/src/pages/Container/Stakeholder/User/List/index.js @@ -320,10 +320,16 @@ function AddModalComponent(props) { const res = await props.requestDetails({ id: props.currentId, }); - const userImg = await getFile({ - eqType: UPLOAD_FILE_TYPE_ENUM["13"], - eqForeignKey: res.data.userId, - }); + 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, diff --git a/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js b/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js index 91ad261..9e006ab 100644 --- a/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js +++ b/src/pages/Container/Supervision/BranchCompany/AccountManage/List/index.js @@ -7,11 +7,11 @@ import AddIcon from "zy-react-library/components/Icon/AddIcon"; // import { getLabelName } from "zy-react-library/utils"; import Page from "zy-react-library/components/Page"; import Search from "zy-react-library/components/Search"; -import DictionarySelect from "zy-react-library/components/Select/Dictionary"; import Table from "zy-react-library/components/Table"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import useTable from "zy-react-library/hooks/useTable"; import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular"; +import { getLabelName } from "zy-react-library/utils"; import { NS_ENTERPRISE } from "~/enumerate/namespace"; import { useDebounce } from "~/utils"; @@ -34,6 +34,10 @@ const ENTERPRISE_TYPE = [ bianma: 1, name: "集团单位", }, + { + bianma: 6, + name: "物资中心", + }, ]; const ENTERPRISE_STATUS = [ @@ -141,11 +145,11 @@ function List(props) { options={[ { name: "likecorpName", - label: "公司名称", + label: "分公司名称", }, { name: "eqCorpState", - label: "公司状态", + label: "分公司状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_STATUS, }, @@ -185,7 +189,7 @@ function List(props) { )} columns={[ { - title: "公司名称", + title: "分公司名称", dataIndex: "corpName", }, { @@ -209,7 +213,7 @@ function List(props) { // dataIndex: "ecoTypeName", // }, { - title: "公司状态", + title: "分公司状态", dataIndex: "corpStateName", }, { @@ -374,6 +378,7 @@ 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("修改成功"); @@ -383,6 +388,12 @@ function AddModalComponent(props) { }); } + values.corpStateName = getLabelName({ + status: values.corpState, + list: ENTERPRISE_STATUS, + + }); + if (props.openType === "edit") { values.id = props.currentId; await props.requestEdit(values).then((res) => { @@ -482,7 +493,7 @@ function AddModalComponent(props) { options={[ { name: "corpName", - label: "公司名称", + label: "分公司名称", }, { name: "code", @@ -503,24 +514,25 @@ function AddModalComponent(props) { hidden: props.openType === "editName", }, { - name: "ecoType", - label: "经济类型", - render: ( - { - form.setFieldValue("ecoTypeName", label); - }} - /> - ), - hidden: props.openType === "editName", - }, - { - name: "ecoTypeName", - label: "经济类型名称", - onlyForLabel: true, + name: "corpState", + label: "分公司状态", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: ENTERPRISE_STATUS, }, + // { + // name: "ecoType", + // label: "经济类型", + // render: ( + // { + // form.setFieldValue("ecoTypeName", label); + // }} + // /> + // ), + // hidden: props.openType === "editName", + // }, { name: "corpOrder", label: "列表排序", diff --git a/src/pages/Container/Supervision/BranchCompany/AccountManage/View/index.js b/src/pages/Container/Supervision/BranchCompany/AccountManage/View/index.js index b84ae76..2a91870 100644 --- a/src/pages/Container/Supervision/BranchCompany/AccountManage/View/index.js +++ b/src/pages/Container/Supervision/BranchCompany/AccountManage/View/index.js @@ -61,7 +61,7 @@ function View(props) { bordered items={[ { - label: "公司名称", + label: "分公司名称", children: info.corpName && info.corpName, }, { diff --git a/src/pages/Container/Supervision/BranchCompany/DepartmentManage/List/index.js b/src/pages/Container/Supervision/BranchCompany/DepartmentManage/List/index.js index 96a9aed..340f0ea 100644 --- a/src/pages/Container/Supervision/BranchCompany/DepartmentManage/List/index.js +++ b/src/pages/Container/Supervision/BranchCompany/DepartmentManage/List/index.js @@ -75,11 +75,11 @@ function List(props) { options={[ { name: "likecorpName", - label: "公司名称", + label: "分公司名称", }, { name: "eqCorpState", - label: "公司状态", + label: "分公司状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: BRANCH_CONPANY_STATUS, }, @@ -95,7 +95,7 @@ function List(props) { { + const onDelete = () => { + // Modal.confirm({ + // title: "提示", + // content: "确定删除吗?", + // onOk: () => { + // props["corpInfoRemove"]({ + // id, + // }).then((res) => { + // if (res.success) { + // message.success("删除成功"); + // getData(); + // } + // }); + // }, + // }); Modal.confirm({ title: "提示", - content: "确定删除吗?", + content: "删除请联系管理员操作!", onOk: () => { - props["corpInfoRemove"]({ - id, - }).then((res) => { - if (res.success) { - message.success("删除成功"); - getData(); - } - }); + }, }); }; @@ -183,8 +190,9 @@ function List(props) { }, { title: "创建单位", - dataIndex: "createName", + dataIndex: "tenantName", }, + { title: "开户人", dataIndex: "accountContactName", @@ -295,7 +303,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 @@ -303,13 +311,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); }); } @@ -319,18 +327,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; @@ -459,23 +467,23 @@ function AddModalComponent(props) { disabled: props.currentId, }, }, - { - name: "selectfromList", - label: "选取形式", - - render: ( - { - setSelectfromData(data); - }} - - /> - ), - }, + // { + // name: "selectfromList", + // label: "选取形式", + // + // render: ( + // { + // setSelectfromData(data); + // }} + // + // /> + // ), + // }, ]} labelCol={{ span: 10, diff --git a/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js b/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js index e78bc13..825ee55 100644 --- a/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js +++ b/src/pages/Container/Supervision/StakeholderUnit/AccountManage/View/index.js @@ -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"], @@ -235,10 +235,10 @@ function View(props) { label: "创建单位", children: info.createName, }, - { - label: "选取形式", - children: info.selectfromList, - }, + // { + // label: "选取形式", + // children: info.selectfromList, + // }, ]} column={2} loding={getFileLoading} diff --git a/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js b/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js index 46dd27b..385aef6 100644 --- a/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js +++ b/src/pages/Container/Supervision/StakeholderUnit/User/UserList/index.js @@ -211,10 +211,18 @@ function AddModalComponent(props) { const res = await props.requestDetails({ id: props.currentId, }); - const userImg = await getFile({ - eqType: UPLOAD_FILE_TYPE_ENUM["13"], - eqForeignKey: res.data.userId, - }); + + 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, diff --git a/src/pages/Container/Supervision/Supervision/User/Add/index.js b/src/pages/Container/Supervision/Supervision/User/Add/index.js index ce4f5d2..062dd5e 100644 --- a/src/pages/Container/Supervision/Supervision/User/Add/index.js +++ b/src/pages/Container/Supervision/Supervision/User/Add/index.js @@ -386,7 +386,7 @@ function Add(props) { fontSize: 12, }} > -
* 图像格式:JPG、JPEG、PNG
+
* 图像格式:jpg、jpeg、png
* 图像大小:不超过4M。
* 照片大小: 推荐 500*500
* 人脸无遮挡(如戴帽子、口罩、眼镜等)、无修图
diff --git a/src/pages/Container/Supervision/Supervision/User/List/index.js b/src/pages/Container/Supervision/Supervision/User/List/index.js index 64d549c..662f253 100644 --- a/src/pages/Container/Supervision/Supervision/User/List/index.js +++ b/src/pages/Container/Supervision/Supervision/User/List/index.js @@ -410,11 +410,16 @@ function AddModalComponent(props) { const res = await props.requestDetails({ id: props.currentId, }); - res.data.userAvatarUrl = [ - { - filePath: res.data.userAvatarUrl, - }, - ]; + if (res.data && res.data.userAvatarUrl) { + res.data.userAvatarUrl = [ + { + filePath: res.data.userAvatarUrl, + }, + ]; + } + else { + res.data.userAvatarUrl = []; + } setInfo(res.data); }; fetchData();