Commit 8926399f3444dcb5e24a02a420d8c1d880d71fa0

Authored by chenxt
1 parent 10df095b

控件根据bVisible展示

src/components/Common/CommonHooks/useCommonBase.js
@@ -1669,7 +1669,7 @@ const useCommonBase = props => { @@ -1669,7 +1669,7 @@ const useCommonBase = props => {
1669 tbName, 1669 tbName,
1670 sConfigName 1670 sConfigName
1671 } = sRulesObj; 1671 } = sRulesObj;
1672 - console.log("tbName:", tbName); 1672 + console.log("tbName:", tbName,);
1673 /* 主表单表字段根据条件控制 其他字段的显示与隐藏 */ 1673 /* 主表单表字段根据条件控制 其他字段的显示与隐藏 */
1674 if (commonUtils.isEmptyObject(tbName)) { 1674 if (commonUtils.isEmptyObject(tbName)) {
1675 if (commonUtils.isNotEmptyArr(condition)) { 1675 if (commonUtils.isNotEmptyArr(condition)) {
src/components/Common/CommonTable/index.js
@@ -4795,6 +4795,8 @@ class CommonTableRc extends React.Component { @@ -4795,6 +4795,8 @@ class CommonTableRc extends React.Component {
4795 }} 4795 }}
4796 /> 4796 />
4797 } 4797 }
  4798 + console.log(props?.parentProps?.sModelType, props, 'messsss');
  4799 +
4798 4800
4799 if (this.isPopupShow) { 4801 if (this.isPopupShow) {
4800 const enabled = this.getTableBtnState('BtnPopup', record); 4802 const enabled = this.getTableBtnState('BtnPopup', record);
@@ -5058,7 +5060,7 @@ class CommonTableRc extends React.Component { @@ -5058,7 +5060,7 @@ class CommonTableRc extends React.Component {
5058 ) : ( 5060 ) : (
5059 "" 5061 ""
5060 )} 5062 )}
5061 - {props.mesAdd 5063 + {props.mesAdd && props?.parentProps?.sModelType !== '/indexPage/commonList'
5062 ? props.mesAdd({ 5064 ? props.mesAdd({
5063 tableName: props.name, 5065 tableName: props.name,
5064 tableClassName: this.state.tableClassName 5066 tableClassName: this.state.tableClassName
src/default.less
@@ -228,7 +228,14 @@ @@ -228,7 +228,14 @@
228 padding: @td_padding_sub; 228 padding: @td_padding_sub;
229 } 229 }
230 } 230 }
231 - 231 + .readonlyStyle{
  232 + .ant-form-item-control-input-content {
  233 + input[disabled] {
  234 + background: #f1f2f8 !important;
  235 + }
  236 + }
  237 +
  238 + }
232 input[disabled] { 239 input[disabled] {
233 color: #000 !important; 240 color: #000 !important;
234 background: #fff !important; 241 background: #fff !important;
@@ -364,8 +371,9 @@ @@ -364,8 +371,9 @@
364 margin-left: 6px; 371 margin-left: 6px;
365 margin-top: 6px; 372 margin-top: 6px;
366 } 373 }
  374 +
367 } 375 }
368 - 376 +
369 .ant-modal { 377 .ant-modal {
370 max-width: unset; 378 max-width: unset;
371 } 379 }
@@ -1012,4 +1020,11 @@ @@ -1012,4 +1020,11 @@
1012 display: none; 1020 display: none;
1013 } 1021 }
1014 } 1022 }
  1023 + .readonlyStyle {
  1024 + background: #f1f2f8 !important;
  1025 +
  1026 + .sActiveIdStyle {
  1027 + background: #f1f2f8 !important;
  1028 + }
  1029 + }
1015 } 1030 }
1016 \ No newline at end of file 1031 \ No newline at end of file
src/mes/common/commonModelComponent/index.js
@@ -1596,7 +1596,7 @@ const CommonViewTableComponent = props => { @@ -1596,7 +1596,7 @@ const CommonViewTableComponent = props => {
1596 return gdsconfigformslave.filter( 1596 return gdsconfigformslave.filter(
1597 item => 1597 item =>
1598 item.sName && 1598 item.sName &&
1599 - item.bControl && 1599 + item.bVisible &&
1600 item.sControlName.indexOf("Btn") === -1 && 1600 item.sControlName.indexOf("Btn") === -1 &&
1601 item.sControlName.indexOf("_") === -1 1601 item.sControlName.indexOf("_") === -1
1602 ); 1602 );
@@ -1609,7 +1609,7 @@ const CommonViewTableComponent = props => { @@ -1609,7 +1609,7 @@ const CommonViewTableComponent = props => {
1609 ); 1609 );
1610 } 1610 }
1611 }); 1611 });
1612 - 1612 +
1613 const operationBarProps = { 1613 const operationBarProps = {
1614 ...props, 1614 ...props,
1615 sName, 1615 sName,
src/mes/common/commonOperationBarComponent/MesToolbar.js
1 /* eslint-disable */ 1 /* eslint-disable */
2 import { message } from "antd"; 2 import { message } from "antd";
3 import * as commonUtils from "@/utils/utils"; 3 import * as commonUtils from "@/utils/utils";
4 - 4 +import * as commonFunc from "@/components/Common/commonFunc";
5 const ToolbarFun = (props) => { 5 const ToolbarFun = (props) => {
6 const { btnConfig, bMesBill } = props; 6 const { btnConfig, bMesBill } = props;
7 const currentMesPane = commonUtils.getAppData("currentMesPane"); 7 const currentMesPane = commonUtils.getAppData("currentMesPane");
@@ -131,10 +131,14 @@ const handleScanFace = (props) => { @@ -131,10 +131,14 @@ const handleScanFace = (props) => {
131 faceData: { sFaceParentId: faceData[0].sParentId, sFaceEmployeeNo: faceData[0].sEmployeeNo }, 131 faceData: { sFaceParentId: faceData[0].sParentId, sFaceEmployeeNo: faceData[0].sEmployeeNo },
132 onSuccess: (_, dataset) => { 132 onSuccess: (_, dataset) => {
133 const { proData = [] } = dataset.rows[0].dataSet; 133 const { proData = [] } = dataset.rows[0].dataSet;
134 - const { [`${addData}Data`]: tableData = [] } = props; 134 + const { [`${addData}Data`]: tableData = [], [`${addData}Config`]: config = {} } = props;
  135 + const { btnConfig = {}, copyToConfig = [], record = {} } = props?.parentProps || {}
  136 + const copyConfig = config?.gdsconfigformslave?.find(item => item.sControlName.toLowerCase().includes('btnscanface'))
135 proData.forEach(item => { 137 proData.forEach(item => {
  138 + const data = commonFunc.getAssignFieldValue(copyConfig?.sAssignField, item)
136 tableData.push({ 139 tableData.push({
137 ...item, 140 ...item,
  141 + ...data,
138 sId: commonUtils.createSid(), 142 sId: commonUtils.createSid(),
139 handleType: "add", 143 handleType: "add",
140 sParentId: props.masterData.sId, 144 sParentId: props.masterData.sId,
src/mes/scheduledTasks/machineTasks/index.js
@@ -578,7 +578,7 @@ const MachineTasks = baseProps => { @@ -578,7 +578,7 @@ const MachineTasks = baseProps => {
578 onTableBtnClick: item => { 578 onTableBtnClick: item => {
579 props.onTableBtnClick(item); 579 props.onTableBtnClick(item);
580 }, 580 },
581 - tableBtnsWidth: "280px", 581 + tableBtnsWidth: "200px",
582 fixedHeight: "335px", 582 fixedHeight: "335px",
583 onCopyTo: handleCopyTo 583 onCopyTo: handleCopyTo
584 }; 584 };