Commit 8926399f3444dcb5e24a02a420d8c1d880d71fa0

Authored by chenxt
1 parent 10df095b

控件根据bVisible展示

src/components/Common/CommonHooks/useCommonBase.js
... ... @@ -1669,7 +1669,7 @@ const useCommonBase = props => {
1669 1669 tbName,
1670 1670 sConfigName
1671 1671 } = sRulesObj;
1672   - console.log("tbName:", tbName);
  1672 + console.log("tbName:", tbName,);
1673 1673 /* 主表单表字段根据条件控制 其他字段的显示与隐藏 */
1674 1674 if (commonUtils.isEmptyObject(tbName)) {
1675 1675 if (commonUtils.isNotEmptyArr(condition)) {
... ...
src/components/Common/CommonTable/index.js
... ... @@ -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 4801 if (this.isPopupShow) {
4800 4802 const enabled = this.getTableBtnState('BtnPopup', record);
... ... @@ -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 5064 ? props.mesAdd({
5063 5065 tableName: props.name,
5064 5066 tableClassName: this.state.tableClassName
... ...
src/default.less
... ... @@ -228,7 +228,14 @@
228 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 239 input[disabled] {
233 240 color: #000 !important;
234 241 background: #fff !important;
... ... @@ -364,8 +371,9 @@
364 371 margin-left: 6px;
365 372 margin-top: 6px;
366 373 }
  374 +
367 375 }
368   -
  376 +
369 377 .ant-modal {
370 378 max-width: unset;
371 379 }
... ... @@ -1012,4 +1020,11 @@
1012 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 1031 \ No newline at end of file
... ...
src/mes/common/commonModelComponent/index.js
... ... @@ -1596,7 +1596,7 @@ const CommonViewTableComponent = props => {
1596 1596 return gdsconfigformslave.filter(
1597 1597 item =>
1598 1598 item.sName &&
1599   - item.bControl &&
  1599 + item.bVisible &&
1600 1600 item.sControlName.indexOf("Btn") === -1 &&
1601 1601 item.sControlName.indexOf("_") === -1
1602 1602 );
... ... @@ -1609,7 +1609,7 @@ const CommonViewTableComponent = props => {
1609 1609 );
1610 1610 }
1611 1611 });
1612   -
  1612 +
1613 1613 const operationBarProps = {
1614 1614 ...props,
1615 1615 sName,
... ...
src/mes/common/commonOperationBarComponent/MesToolbar.js
1 1 /* eslint-disable */
2 2 import { message } from "antd";
3 3 import * as commonUtils from "@/utils/utils";
4   -
  4 +import * as commonFunc from "@/components/Common/commonFunc";
5 5 const ToolbarFun = (props) => {
6 6 const { btnConfig, bMesBill } = props;
7 7 const currentMesPane = commonUtils.getAppData("currentMesPane");
... ... @@ -131,10 +131,14 @@ const handleScanFace = (props) => {
131 131 faceData: { sFaceParentId: faceData[0].sParentId, sFaceEmployeeNo: faceData[0].sEmployeeNo },
132 132 onSuccess: (_, dataset) => {
133 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 137 proData.forEach(item => {
  138 + const data = commonFunc.getAssignFieldValue(copyConfig?.sAssignField, item)
136 139 tableData.push({
137 140 ...item,
  141 + ...data,
138 142 sId: commonUtils.createSid(),
139 143 handleType: "add",
140 144 sParentId: props.masterData.sId,
... ...
src/mes/scheduledTasks/machineTasks/index.js
... ... @@ -578,7 +578,7 @@ const MachineTasks = baseProps => {
578 578 onTableBtnClick: item => {
579 579 props.onTableBtnClick(item);
580 580 },
581   - tableBtnsWidth: "280px",
  581 + tableBtnsWidth: "200px",
582 582 fixedHeight: "335px",
583 583 onCopyTo: handleCopyTo
584 584 };
... ...