Commit 48f1c50a26cfcf3997e1966c7c847e1d84775939
1 parent
30e913d8
增加审核标识
Showing
3 changed files
with
25 additions
and
7 deletions
src/mes/common/commonModelComponent/index.js
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | import React, { useEffect, useRef, useState } from "react"; | 2 | import React, { useEffect, useRef, useState } from "react"; |
| 3 | import moment from "moment"; | 3 | import moment from "moment"; |
| 4 | import { cloneDeep } from "lodash"; | 4 | import { cloneDeep } from "lodash"; |
| 5 | -import { Tabs, Modal, Space, Button, DatePicker, Radio, message } from "antd"; | 5 | +import { Tabs, Modal, Space, Button, DatePicker, Radio, message , Avatar} from "antd"; |
| 6 | import * as commonUtils from "@/utils/utils"; | 6 | import * as commonUtils from "@/utils/utils"; |
| 7 | import * as commonConfig from "@/utils/config"; | 7 | import * as commonConfig from "@/utils/config"; |
| 8 | import * as commonServices from "@/services/services"; | 8 | import * as commonServices from "@/services/services"; |
| @@ -1587,7 +1587,7 @@ const CommonModel = baseProps => { | @@ -1587,7 +1587,7 @@ const CommonModel = baseProps => { | ||
| 1587 | }; | 1587 | }; |
| 1588 | 1588 | ||
| 1589 | const CommonModelComponent = props => { | 1589 | const CommonModelComponent = props => { |
| 1590 | - const { tabConfig = [], level, modelStyle, app, bMesBill, enabled } = props; | 1590 | + const { tabConfig = [], level, modelStyle, app, bMesBill, enabled ,masterData, sModelsType} = props; |
| 1591 | const { userinfo } = app; | 1591 | const { userinfo } = app; |
| 1592 | const sLanguage = userinfo.sLanguage; | 1592 | const sLanguage = userinfo.sLanguage; |
| 1593 | const getComponent = (config, index = 0) => { | 1593 | const getComponent = (config, index = 0) => { |
| @@ -1605,6 +1605,8 @@ const CommonModelComponent = props => { | @@ -1605,6 +1605,8 @@ const CommonModelComponent = props => { | ||
| 1605 | if (!children.length) return ""; | 1605 | if (!children.length) return ""; |
| 1606 | const footerComponent = useFooterComponent({ ...props, sTabName }); | 1606 | const footerComponent = useFooterComponent({ ...props, sTabName }); |
| 1607 | const modelStyle = footerComponent ? { height: "calc(100% - 50px)" } : {}; | 1607 | const modelStyle = footerComponent ? { height: "calc(100% - 50px)" } : {}; |
| 1608 | + | ||
| 1609 | + | ||
| 1608 | return ( | 1610 | return ( |
| 1609 | <> | 1611 | <> |
| 1610 | <CommonModelComponent | 1612 | <CommonModelComponent |
| @@ -1938,6 +1940,9 @@ const CommonViewTableComponent = props => { | @@ -1938,6 +1940,9 @@ const CommonViewTableComponent = props => { | ||
| 1938 | sName, | 1940 | sName, |
| 1939 | belongsToForm: true, | 1941 | belongsToForm: true, |
| 1940 | }; | 1942 | }; |
| 1943 | + const {masterData, sModelsType, app} = props | ||
| 1944 | + const {bCheck} = masterData | ||
| 1945 | + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app); | ||
| 1941 | return ( | 1946 | return ( |
| 1942 | <> | 1947 | <> |
| 1943 | {sName === "master" ? ( | 1948 | {sName === "master" ? ( |
| @@ -1973,6 +1978,9 @@ const CommonViewTableComponent = props => { | @@ -1973,6 +1978,9 @@ const CommonViewTableComponent = props => { | ||
| 1973 | ) : ( | 1978 | ) : ( |
| 1974 | "" | 1979 | "" |
| 1975 | )} | 1980 | )} |
| 1981 | + { | ||
| 1982 | + bCheck ? <div className={styles.bShow}><Avatar src={imgSrc} /></div> : '' | ||
| 1983 | + } | ||
| 1976 | </> | 1984 | </> |
| 1977 | ); | 1985 | ); |
| 1978 | }; | 1986 | }; |
src/mes/common/commonModelComponent/index.less
| @@ -53,7 +53,16 @@ | @@ -53,7 +53,16 @@ | ||
| 53 | } | 53 | } |
| 54 | } | 54 | } |
| 55 | } | 55 | } |
| 56 | - | 56 | +.bShow>span>img { |
| 57 | + position: fixed; | ||
| 58 | + width: 93px; | ||
| 59 | + height: 93px; | ||
| 60 | + right: 0px; | ||
| 61 | + z-index: 999; | ||
| 62 | + top: 122px; | ||
| 63 | + /* 解决审核图标挡住操作按钮 */ | ||
| 64 | + object-fit: contain; | ||
| 65 | +} | ||
| 57 | .commonFooter { | 66 | .commonFooter { |
| 58 | .size(100%, 50px); | 67 | .size(100%, 50px); |
| 59 | .flex(center, flex-end); | 68 | .flex(center, flex-end); |
src/mes/common/commonOperationBarComponent/index.js
| @@ -737,10 +737,8 @@ const useCommonOperationBarComponentEvent = props => { | @@ -737,10 +737,8 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 737 | console.log("=====err", { tempData, str: sDefault, strNew, error }); | 737 | console.log("=====err", { tempData, str: sDefault, strNew, error }); |
| 738 | } | 738 | } |
| 739 | } else if (props.bMesBill) { | 739 | } else if (props.bMesBill) { |
| 740 | - | ||
| 741 | - const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); | ||
| 742 | - console.log(btnName,props, 'btnName'); | ||
| 743 | 740 | ||
| 741 | + const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); | ||
| 744 | if (props.enabled) { | 742 | if (props.enabled) { |
| 745 | if (["btnupd", 'btnevent', 'btnsubmit', 'btnsubmitcancel', 'btnexamine', 'btncancelexamine'].includes(btnName)) { | 743 | if (["btnupd", 'btnevent', 'btnsubmit', 'btnsubmitcancel', 'btnexamine', 'btncancelexamine'].includes(btnName)) { |
| 746 | defaultProps.disabled = true; | 744 | defaultProps.disabled = true; |
| @@ -764,7 +762,10 @@ const useCommonOperationBarComponentEvent = props => { | @@ -764,7 +762,10 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 764 | defaultProps.disabled = true; | 762 | defaultProps.disabled = true; |
| 765 | } | 763 | } |
| 766 | } else { | 764 | } else { |
| 767 | - if (["btnexamine"].includes(btnName)) { | 765 | + // if (["btnexamine"].includes(btnName)) { |
| 766 | + // defaultProps.disabled = true; | ||
| 767 | + // } | ||
| 768 | + if (["btnupd", 'btnevent', 'btnsubmit', 'btnsubmitcancel', 'btnexamine', "btncancel", "btndel"].includes(btnName)) { | ||
| 768 | defaultProps.disabled = true; | 769 | defaultProps.disabled = true; |
| 769 | } | 770 | } |
| 770 | } | 771 | } |