Commit 97512ea7d1f35c2709007a46c59ca6e221ccc4d5
1 parent
7c13492d
出版选择颜色
Showing
3 changed files
with
414 additions
and
162 deletions
src/components/Common/CommonBill/index.js
| 1 | /* eslint-disable */ | 1 | /* eslint-disable */ |
| 2 | /* eslint-disable prefer-destructuring */ | 2 | /* eslint-disable prefer-destructuring */ |
| 3 | -import React, { Component } from 'react'; | 3 | +import React, { Component, useEffect, useState } from 'react'; |
| 4 | import { UploadOutlined } from '@ant-design/icons'; | 4 | import { UploadOutlined } from '@ant-design/icons'; |
| 5 | import { Form } from '@ant-design/compatible'; | 5 | import { Form } from '@ant-design/compatible'; |
| 6 | // import '@ant-design/compatible/assets/index.css'; | 6 | // import '@ant-design/compatible/assets/index.css'; |
| @@ -16,7 +16,8 @@ import { | @@ -16,7 +16,8 @@ import { | ||
| 16 | Table, | 16 | Table, |
| 17 | Upload, | 17 | Upload, |
| 18 | Input, | 18 | Input, |
| 19 | - Modal | 19 | + Modal, |
| 20 | + Space | ||
| 20 | } from 'antd-v4'; | 21 | } from 'antd-v4'; |
| 21 | import { message } from '@/utils/common/message'; | 22 | import { message } from '@/utils/common/message'; |
| 22 | import CommonSales from '@/components/Common/CommonBillEvent';/* 继承销售模块业务功能 */ | 23 | import CommonSales from '@/components/Common/CommonBillEvent';/* 继承销售模块业务功能 */ |
| @@ -425,7 +426,7 @@ class CommonBill extends Component { | @@ -425,7 +426,7 @@ class CommonBill extends Component { | ||
| 425 | const tableDataRowAdd = commonFunc.getDefaultData(controlConfig, allTableData); | 426 | const tableDataRowAdd = commonFunc.getDefaultData(controlConfig, allTableData); |
| 426 | tableDataRowAdd.handleType = 'add'; | 427 | tableDataRowAdd.handleType = 'add'; |
| 427 | tableDataRowAdd.sId = commonUtils.createSid(); | 428 | tableDataRowAdd.sId = commonUtils.createSid(); |
| 428 | - tableDataRowAdd.sNodeId = tableDataRowAdd.sId ; | 429 | + tableDataRowAdd.sNodeId = tableDataRowAdd.sId; |
| 429 | tableDataRowAdd.sParentId = masterData && masterData.sId ? masterData.sId : null; | 430 | tableDataRowAdd.sParentId = masterData && masterData.sId ? masterData.sId : null; |
| 430 | tableDataRowAdd.sSlaveId = slaveSelectedRowKeys[0]; | 431 | tableDataRowAdd.sSlaveId = slaveSelectedRowKeys[0]; |
| 431 | tableDataRowAdd.key = tableDataRowAdd.sId; | 432 | tableDataRowAdd.key = tableDataRowAdd.sId; |
| @@ -695,7 +696,7 @@ class CommonBill extends Component { | @@ -695,7 +696,7 @@ class CommonBill extends Component { | ||
| 695 | } | 696 | } |
| 696 | } | 697 | } |
| 697 | tableData.push(tableDataRow); | 698 | tableData.push(tableDataRow); |
| 698 | - this.props.onSaveState({ [`${name}Data`]: tableData, [`${name}SelectedRowKeys`]: [tableDataRow.sId]}); | 699 | + this.props.onSaveState({ [`${name}Data`]: tableData, [`${name}SelectedRowKeys`]: [tableDataRow.sId] }); |
| 699 | } else if (name === 'materials' || name === 'process') { | 700 | } else if (name === 'materials' || name === 'process') { |
| 700 | tableDataRow = this.props.onDataRowAdd(name, true); | 701 | tableDataRow = this.props.onDataRowAdd(name, true); |
| 701 | if (commonUtils.isEmptyArr(controlSelectedRowKeys)) { | 702 | if (commonUtils.isEmptyArr(controlSelectedRowKeys)) { |
| @@ -773,7 +774,7 @@ class CommonBill extends Component { | @@ -773,7 +774,7 @@ class CommonBill extends Component { | ||
| 773 | return false; | 774 | return false; |
| 774 | } | 775 | } |
| 775 | } else if (name === 'slave') { /* 删除子表 */ | 776 | } else if (name === 'slave') { /* 删除子表 */ |
| 776 | - if( slaveConfig.sTableType === 'multiple' && commonUtils.isNotEmptyObject(slaveInfoConfig)) { | 777 | + if (slaveConfig.sTableType === 'multiple' && commonUtils.isNotEmptyObject(slaveInfoConfig)) { |
| 777 | if (commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { | 778 | if (commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { |
| 778 | let slaveInfoReturnData = {}; | 779 | let slaveInfoReturnData = {}; |
| 779 | if (commonUtils.isNotEmptyObject(slaveInfoConfig)) { | 780 | if (commonUtils.isNotEmptyObject(slaveInfoConfig)) { |
| @@ -786,11 +787,11 @@ class CommonBill extends Component { | @@ -786,11 +787,11 @@ class CommonBill extends Component { | ||
| 786 | }); | 787 | }); |
| 787 | return true; | 788 | return true; |
| 788 | } | 789 | } |
| 789 | - } else if( slaveConfig.sTableType === 'single') { /* 单表删除 */ | 790 | + } else if (slaveConfig.sTableType === 'single') { /* 单表删除 */ |
| 790 | if (commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { | 791 | if (commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { |
| 791 | let slaveSelectedRowNewKeys = slaveSelectedRowKeys; | 792 | let slaveSelectedRowNewKeys = slaveSelectedRowKeys; |
| 792 | const newSelectedRowKeys = this.handleDelSlaveChild(slaveData, slaveSelectedRowKeys[0], slaveSelectedRowKeys); | 793 | const newSelectedRowKeys = this.handleDelSlaveChild(slaveData, slaveSelectedRowKeys[0], slaveSelectedRowKeys); |
| 793 | - if(commonUtils.isNotEmptyArr(newSelectedRowKeys)) { | 794 | + if (commonUtils.isNotEmptyArr(newSelectedRowKeys)) { |
| 794 | slaveSelectedRowNewKeys = newSelectedRowKeys; | 795 | slaveSelectedRowNewKeys = newSelectedRowKeys; |
| 795 | } | 796 | } |
| 796 | const slaveReturnData = this.props.onDataRowDel(name, isWait, slaveSelectedRowNewKeys); | 797 | const slaveReturnData = this.props.onDataRowDel(name, isWait, slaveSelectedRowNewKeys); |
| @@ -866,17 +867,17 @@ class CommonBill extends Component { | @@ -866,17 +867,17 @@ class CommonBill extends Component { | ||
| 866 | }; | 867 | }; |
| 867 | handleSelect = async (name, selectConfig, selectData) => { | 868 | handleSelect = async (name, selectConfig, selectData) => { |
| 868 | const { | 869 | const { |
| 869 | - [`${name}Data`]: tableData, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, [`${name}Config`]: tableConfig, masterConfig, controlSelectedRowKeys, sModelsId, token, app, tableName, sModelsType, | 870 | + [`${name}Data`]: tableData, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, [`${name}Config`]: tableConfig, masterConfig, controlSelectedRowKeys, sModelsId, token, app, tableName, sModelsType, |
| 870 | } = this.props; | 871 | } = this.props; |
| 871 | - let { masterData}= this.props; | ||
| 872 | - if(commonUtils.isNotEmptyObject(selectConfig.sControlName) && selectConfig.sControlName.toLowerCase().includes('tmplnfobysqlsalesorder')) { | ||
| 873 | - const { slaveData, slaveSelectedRowKeys} = this.props; | 872 | + let { masterData } = this.props; |
| 873 | + if (commonUtils.isNotEmptyObject(selectConfig.sControlName) && selectConfig.sControlName.toLowerCase().includes('tmplnfobysqlsalesorder')) { | ||
| 874 | + const { slaveData, slaveSelectedRowKeys } = this.props; | ||
| 874 | const dataUrl = `${commonConfig.server_host}salesorder/getTmpInfoBySql/?sModelsId=${sModelsId}`; | 875 | const dataUrl = `${commonConfig.server_host}salesorder/getTmpInfoBySql/?sModelsId=${sModelsId}`; |
| 875 | const sConfigformId = commonUtils.isEmpty(selectConfig) ? '' : selectConfig.sParentId; | 876 | const sConfigformId = commonUtils.isEmpty(selectConfig) ? '' : selectConfig.sParentId; |
| 876 | const sControlName = commonUtils.isNotEmptyObject(selectConfig.sControlName) ? selectConfig.sControlName : 'BtnCopyFrom.TmpInfoBySql'; | 877 | const sControlName = commonUtils.isNotEmptyObject(selectConfig.sControlName) ? selectConfig.sControlName : 'BtnCopyFrom.TmpInfoBySql'; |
| 877 | let sSqlCondition = ''; | 878 | let sSqlCondition = ''; |
| 878 | const conditonValues0 = this.props.getSqlCondition(selectConfig, 'slave', selectData[0]); | 879 | const conditonValues0 = this.props.getSqlCondition(selectConfig, 'slave', selectData[0]); |
| 879 | - if(commonUtils.isNotEmptyObject(conditonValues0)) { | 880 | + if (commonUtils.isNotEmptyObject(conditonValues0)) { |
| 880 | sSqlCondition = conditonValues0; | 881 | sSqlCondition = conditonValues0; |
| 881 | } else { | 882 | } else { |
| 882 | sSqlCondition = { sId: selectData[0].sId }; | 883 | sSqlCondition = { sId: selectData[0].sId }; |
| @@ -886,14 +887,14 @@ class CommonBill extends Component { | @@ -886,14 +887,14 @@ class CommonBill extends Component { | ||
| 886 | let slaveRow = {}; | 887 | let slaveRow = {}; |
| 887 | 888 | ||
| 888 | if (commonUtils.isNotEmptyArr(slaveData)) { | 889 | if (commonUtils.isNotEmptyArr(slaveData)) { |
| 889 | - if(commonUtils.isEmptyArr(slaveSelectedRowKeys)){ | 890 | + if (commonUtils.isEmptyArr(slaveSelectedRowKeys)) { |
| 890 | iSlaveIndex = 0; | 891 | iSlaveIndex = 0; |
| 891 | - } else{ | 892 | + } else { |
| 892 | iSlaveIndex = slaveData.findIndex(item => slaveSelectedRowKeys.includes(item.sId)); | 893 | iSlaveIndex = slaveData.findIndex(item => slaveSelectedRowKeys.includes(item.sId)); |
| 893 | } | 894 | } |
| 894 | } | 895 | } |
| 895 | 896 | ||
| 896 | - if(iSlaveIndex > -1 ){ | 897 | + if (iSlaveIndex > -1) { |
| 897 | slaveRow = slaveData[iSlaveIndex]; | 898 | slaveRow = slaveData[iSlaveIndex]; |
| 898 | } | 899 | } |
| 899 | 900 | ||
| @@ -910,29 +911,29 @@ class CommonBill extends Component { | @@ -910,29 +911,29 @@ class CommonBill extends Component { | ||
| 910 | const sName = `${key}Data`; | 911 | const sName = `${key}Data`; |
| 911 | const sDelName = `${key}DelData`; | 912 | const sDelName = `${key}DelData`; |
| 912 | // allReturnMap[sName] = returnData[key]; | 913 | // allReturnMap[sName] = returnData[key]; |
| 913 | - let {[`${key}Data`]: oldData, [`${sDelName}`]: oldDelData } = this.props; | 914 | + let { [`${key}Data`]: oldData, [`${sDelName}`]: oldDelData } = this.props; |
| 914 | 915 | ||
| 915 | - if(commonUtils.isEmptyArr(oldDelData)) { | 916 | + if (commonUtils.isEmptyArr(oldDelData)) { |
| 916 | oldDelData = []; | 917 | oldDelData = []; |
| 917 | } | 918 | } |
| 918 | - if(commonUtils.isEmptyArr(oldData)) { | 919 | + if (commonUtils.isEmptyArr(oldData)) { |
| 919 | oldData = []; | 920 | oldData = []; |
| 920 | } | 921 | } |
| 921 | /* 找到赋值字段 */ | 922 | /* 找到赋值字段 */ |
| 922 | - const tableConfig = masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes(sTmpInfoBySqlBtnName +'.' + key)); | 923 | + const tableConfig = masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes(sTmpInfoBySqlBtnName + '.' + key)); |
| 923 | const tableField = commonUtils.isNotEmptyArr(tableConfig) ? tableConfig[0].sAssignField : ''; | 924 | const tableField = commonUtils.isNotEmptyArr(tableConfig) ? tableConfig[0].sAssignField : ''; |
| 924 | - if(sTmpInfoBySqlBtnName.includes('_edit')) { /* 替换 根据对应字段对比 相同的不管 不同的插入 */ | 925 | + if (sTmpInfoBySqlBtnName.includes('_edit')) { /* 替换 根据对应字段对比 相同的不管 不同的插入 */ |
| 925 | /* 对应字段 */ | 926 | /* 对应字段 */ |
| 926 | const sActiveKey = selectConfig.sActiveKey; | 927 | const sActiveKey = selectConfig.sActiveKey; |
| 927 | const keyData = returnData[key]; | 928 | const keyData = returnData[key]; |
| 928 | /* 找到赋值字段 */ | 929 | /* 找到赋值字段 */ |
| 929 | 930 | ||
| 930 | let newData = []; | 931 | let newData = []; |
| 931 | - if(commonUtils.isNotEmptyArr(keyData)) { | 932 | + if (commonUtils.isNotEmptyArr(keyData)) { |
| 932 | keyData.forEach((child) => { | 933 | keyData.forEach((child) => { |
| 933 | const filterData = oldData.filter(item => item[sActiveKey] !== child[sActiveKey]); | 934 | const filterData = oldData.filter(item => item[sActiveKey] !== child[sActiveKey]); |
| 934 | - if(commonUtils.isNotEmptyArr(filterData) && filterData.length === oldData.length) { | ||
| 935 | - let tableRow ={}; | 935 | + if (commonUtils.isNotEmptyArr(filterData) && filterData.length === oldData.length) { |
| 936 | + let tableRow = {}; | ||
| 936 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 | 937 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 |
| 937 | tableRow.sId = commonUtils.createSid(); | 938 | tableRow.sId = commonUtils.createSid(); |
| 938 | tableRow.sParentId = masterData.sId; | 939 | tableRow.sParentId = masterData.sId; |
| @@ -943,18 +944,18 @@ class CommonBill extends Component { | @@ -943,18 +944,18 @@ class CommonBill extends Component { | ||
| 943 | newData = oldData.concat(newData); | 944 | newData = oldData.concat(newData); |
| 944 | } | 945 | } |
| 945 | allReturnMap[sName] = newData; | 946 | allReturnMap[sName] = newData; |
| 946 | - } else if(sTmpInfoBySqlBtnName.includes('_del')) { /* 替换 根据对应字段对比 相同的不管 不同的插入 */ | 947 | + } else if (sTmpInfoBySqlBtnName.includes('_del')) { /* 替换 根据对应字段对比 相同的不管 不同的插入 */ |
| 947 | /* 对应字段 */ | 948 | /* 对应字段 */ |
| 948 | oldData.forEach((child) => { | 949 | oldData.forEach((child) => { |
| 949 | - child.handleType ='del'; | 950 | + child.handleType = 'del'; |
| 950 | oldDelData.push(child); | 951 | oldDelData.push(child); |
| 951 | }); | 952 | }); |
| 952 | allReturnMap[sDelName] = oldDelData; | 953 | allReturnMap[sDelName] = oldDelData; |
| 953 | oldData = []; | 954 | oldData = []; |
| 954 | const keyData = returnData[key]; | 955 | const keyData = returnData[key]; |
| 955 | - if(commonUtils.isNotEmptyArr(keyData)) { | 956 | + if (commonUtils.isNotEmptyArr(keyData)) { |
| 956 | keyData.forEach((child) => { | 957 | keyData.forEach((child) => { |
| 957 | - let tableRow ={}; | 958 | + let tableRow = {}; |
| 958 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 | 959 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 |
| 959 | tableRow.sId = commonUtils.createSid(); | 960 | tableRow.sId = commonUtils.createSid(); |
| 960 | tableRow.sParentId = masterData.sId; | 961 | tableRow.sParentId = masterData.sId; |
| @@ -963,30 +964,30 @@ class CommonBill extends Component { | @@ -963,30 +964,30 @@ class CommonBill extends Component { | ||
| 963 | }); | 964 | }); |
| 964 | } | 965 | } |
| 965 | allReturnMap[sName] = oldData; | 966 | allReturnMap[sName] = oldData; |
| 966 | - } else{ /* 插入 数据都插入进去 */ | 967 | + } else { /* 插入 数据都插入进去 */ |
| 967 | /* 对应字段 */ | 968 | /* 对应字段 */ |
| 968 | const keyData = returnData[key]; | 969 | const keyData = returnData[key]; |
| 969 | 970 | ||
| 970 | // 生产补印备料 | 971 | // 生产补印备料 |
| 971 | - if (this.props.sModelsId === '12710101117005582604140' && key !=='master') { | 972 | + if (this.props.sModelsId === '12710101117005582604140' && key !== 'master') { |
| 972 | oldData.forEach((child) => { | 973 | oldData.forEach((child) => { |
| 973 | - child.handleType ='del'; | 974 | + child.handleType = 'del'; |
| 974 | oldDelData.push(child); | 975 | oldDelData.push(child); |
| 975 | }); | 976 | }); |
| 976 | allReturnMap[sDelName] = oldDelData; | 977 | allReturnMap[sDelName] = oldDelData; |
| 977 | oldData = []; | 978 | oldData = []; |
| 978 | } | 979 | } |
| 979 | - if(key === 'master') { | 980 | + if (key === 'master') { |
| 980 | let newData = keyData; | 981 | let newData = keyData; |
| 981 | if (commonUtils.isNotEmptyArr(keyData) && Array.isArray(keyData)) { | 982 | if (commonUtils.isNotEmptyArr(keyData) && Array.isArray(keyData)) { |
| 982 | newData = keyData[0] | 983 | newData = keyData[0] |
| 983 | } | 984 | } |
| 984 | oldData = { ...oldData, ...commonFunc.getAssignFieldValue(tableField, newData) }; // 取赋值字段 | 985 | oldData = { ...oldData, ...commonFunc.getAssignFieldValue(tableField, newData) }; // 取赋值字段 |
| 985 | - masterData.handleType = commonUtils.isEmpty( masterData.handleType) ? 'update' : masterData.handleType; | ||
| 986 | - } else if(key === 'slave') { /* 从表 */ | ||
| 987 | - if(commonUtils.isNotEmptyObject(slaveRow) && commonUtils.isNotEmptyArr(oldData)) { | 986 | + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType; |
| 987 | + } else if (key === 'slave') { /* 从表 */ | ||
| 988 | + if (commonUtils.isNotEmptyObject(slaveRow) && commonUtils.isNotEmptyArr(oldData)) { | ||
| 988 | oldData[iSlaveIndex] = { ...slaveRow, ...commonFunc.getAssignFieldValue(tableField, keyData[0]) }; // 取赋值字段 | 989 | oldData[iSlaveIndex] = { ...slaveRow, ...commonFunc.getAssignFieldValue(tableField, keyData[0]) }; // 取赋值字段 |
| 989 | - oldData[iSlaveIndex].sOriginalId = commonUtils.isNotEmptyObject(keyData[0].sOriginalId) ? keyData[0].sOriginalId: keyData[0].sSlaveId; | 990 | + oldData[iSlaveIndex].sOriginalId = commonUtils.isNotEmptyObject(keyData[0].sOriginalId) ? keyData[0].sOriginalId : keyData[0].sSlaveId; |
| 990 | // 生产补印备料 | 991 | // 生产补印备料 |
| 991 | if (this.props.sModelsId === '12710101117005582604140') { | 992 | if (this.props.sModelsId === '12710101117005582604140') { |
| 992 | oldData[iSlaveIndex].sBomId = selectData[0].sProductCardId; | 993 | oldData[iSlaveIndex].sBomId = selectData[0].sProductCardId; |
| @@ -997,9 +998,9 @@ class CommonBill extends Component { | @@ -997,9 +998,9 @@ class CommonBill extends Component { | ||
| 997 | } | 998 | } |
| 998 | slaveData[iSlaveIndex] = oldData[iSlaveIndex]; | 999 | slaveData[iSlaveIndex] = oldData[iSlaveIndex]; |
| 999 | } else { | 1000 | } else { |
| 1000 | - if(commonUtils.isNotEmptyArr(keyData)) { | 1001 | + if (commonUtils.isNotEmptyArr(keyData)) { |
| 1001 | keyData.forEach((child) => { | 1002 | keyData.forEach((child) => { |
| 1002 | - let tableRow ={}; | 1003 | + let tableRow = {}; |
| 1003 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 | 1004 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 |
| 1004 | tableRow.sId = commonUtils.createSid(); | 1005 | tableRow.sId = commonUtils.createSid(); |
| 1005 | tableRow.sParentId = masterData.sId; | 1006 | tableRow.sParentId = masterData.sId; |
| @@ -1018,7 +1019,7 @@ class CommonBill extends Component { | @@ -1018,7 +1019,7 @@ class CommonBill extends Component { | ||
| 1018 | } | 1019 | } |
| 1019 | } | 1020 | } |
| 1020 | /* sFatherSlaveId对应为新的sId */ | 1021 | /* sFatherSlaveId对应为新的sId */ |
| 1021 | - if(commonUtils.isNotEmptyArr(oldData)) { | 1022 | + if (commonUtils.isNotEmptyArr(oldData)) { |
| 1022 | const materialsFilterData = oldData.filter(item => commonUtils.isNotEmptyObject(item.sFatherSlaveId)); | 1023 | const materialsFilterData = oldData.filter(item => commonUtils.isNotEmptyObject(item.sFatherSlaveId)); |
| 1023 | if (commonUtils.isNotEmptyArr(materialsFilterData)) { | 1024 | if (commonUtils.isNotEmptyArr(materialsFilterData)) { |
| 1024 | materialsFilterData.forEach((filterItem, index) => { | 1025 | materialsFilterData.forEach((filterItem, index) => { |
| @@ -1036,10 +1037,10 @@ class CommonBill extends Component { | @@ -1036,10 +1037,10 @@ class CommonBill extends Component { | ||
| 1036 | }); | 1037 | }); |
| 1037 | } | 1038 | } |
| 1038 | } | 1039 | } |
| 1039 | - }else { | ||
| 1040 | - if(commonUtils.isNotEmptyArr(keyData)) { | 1040 | + } else { |
| 1041 | + if (commonUtils.isNotEmptyArr(keyData)) { | ||
| 1041 | keyData.forEach((child) => { | 1042 | keyData.forEach((child) => { |
| 1042 | - let tableRow ={}; | 1043 | + let tableRow = {}; |
| 1043 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 | 1044 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 |
| 1044 | tableRow.sId = commonUtils.createSid(); | 1045 | tableRow.sId = commonUtils.createSid(); |
| 1045 | tableRow.sParentId = masterData.sId; | 1046 | tableRow.sParentId = masterData.sId; |
| @@ -1048,7 +1049,7 @@ class CommonBill extends Component { | @@ -1048,7 +1049,7 @@ class CommonBill extends Component { | ||
| 1048 | if (this.props.sModelsId === '12710101117005582604140') { | 1049 | if (this.props.sModelsId === '12710101117005582604140') { |
| 1049 | tableRow.sProductCardId = selectData[0].sProductCardId; | 1050 | tableRow.sProductCardId = selectData[0].sProductCardId; |
| 1050 | tableRow.sZmldlt = child.sZmldlt; | 1051 | tableRow.sZmldlt = child.sZmldlt; |
| 1051 | - tableRow.sSlaveId = commonUtils.isNotEmptyArr(slaveData) && slaveData[0].sId ? slaveData[0].sId : ''; | 1052 | + tableRow.sSlaveId = commonUtils.isNotEmptyArr(slaveData) && slaveData[0].sId ? slaveData[0].sId : ''; |
| 1052 | tableRow.sProcessTbId = child.sProcessTbId; | 1053 | tableRow.sProcessTbId = child.sProcessTbId; |
| 1053 | tableRow.sParentMaterialsId = child.sParentMaterialsId; | 1054 | tableRow.sParentMaterialsId = child.sParentMaterialsId; |
| 1054 | tableRow.sInkFatherMaterialsTbId = child.sInkFatherMaterialsTbId; | 1055 | tableRow.sInkFatherMaterialsTbId = child.sInkFatherMaterialsTbId; |
| @@ -1056,7 +1057,7 @@ class CommonBill extends Component { | @@ -1056,7 +1057,7 @@ class CommonBill extends Component { | ||
| 1056 | 1057 | ||
| 1057 | } | 1058 | } |
| 1058 | 1059 | ||
| 1059 | - if(key === 'control') { | 1060 | + if (key === 'control') { |
| 1060 | tableRow.sSrcControlId = child.sId; | 1061 | tableRow.sSrcControlId = child.sId; |
| 1061 | } else { | 1062 | } else { |
| 1062 | tableRow.sSrcControlId = child.sControlId; | 1063 | tableRow.sSrcControlId = child.sControlId; |
| @@ -1065,9 +1066,9 @@ class CommonBill extends Component { | @@ -1065,9 +1066,9 @@ class CommonBill extends Component { | ||
| 1065 | oldData.push(tableRow); | 1066 | oldData.push(tableRow); |
| 1066 | }); | 1067 | }); |
| 1067 | } | 1068 | } |
| 1068 | - if(commonUtils.isNotEmptyObject(slaveRow)){ | 1069 | + if (commonUtils.isNotEmptyObject(slaveRow)) { |
| 1069 | /* 将部件、材料、工序的sSlaveId 均换成最新的 */ | 1070 | /* 将部件、材料、工序的sSlaveId 均换成最新的 */ |
| 1070 | - oldData = commonUtils.genSlaveNewId(oldData, key, 'sSlaveId', 'sOriginalId', slaveData[iSlaveIndex]); | 1071 | + oldData = commonUtils.genSlaveNewId(oldData, key, 'sSlaveId', 'sOriginalId', slaveData[iSlaveIndex]); |
| 1071 | } | 1072 | } |
| 1072 | } | 1073 | } |
| 1073 | allReturnMap[sName] = oldData; | 1074 | allReturnMap[sName] = oldData; |
| @@ -1076,19 +1077,19 @@ class CommonBill extends Component { | @@ -1076,19 +1077,19 @@ class CommonBill extends Component { | ||
| 1076 | } | 1077 | } |
| 1077 | 1078 | ||
| 1078 | /* 将工序材料表的sControlId 换成最新的 */ | 1079 | /* 将工序材料表的sControlId 换成最新的 */ |
| 1079 | - if(commonUtils.isNotEmptyObject(allReturnMap)) { | 1080 | + if (commonUtils.isNotEmptyObject(allReturnMap)) { |
| 1080 | const controlNewData = allReturnMap.controlData; | 1081 | const controlNewData = allReturnMap.controlData; |
| 1081 | const materialsNewData = allReturnMap.materialsData; | 1082 | const materialsNewData = allReturnMap.materialsData; |
| 1082 | const processNewData = allReturnMap.processData; | 1083 | const processNewData = allReturnMap.processData; |
| 1083 | - if(commonUtils.isNotEmptyArr(controlNewData)) { | 1084 | + if (commonUtils.isNotEmptyArr(controlNewData)) { |
| 1084 | 1085 | ||
| 1085 | - controlNewData.forEach((controlRow) =>{ | 1086 | + controlNewData.forEach((controlRow) => { |
| 1086 | 1087 | ||
| 1087 | /* 替换工序数据中sControlId为最新控制表的sId */ | 1088 | /* 替换工序数据中sControlId为最新控制表的sId */ |
| 1088 | - if(commonUtils.isNotEmptyArr(processNewData)) { | 1089 | + if (commonUtils.isNotEmptyArr(processNewData)) { |
| 1089 | const processFilterData = processNewData.filter(materialsRow => materialsRow.sSrcControlId === controlRow.sSrcControlId); | 1090 | const processFilterData = processNewData.filter(materialsRow => materialsRow.sSrcControlId === controlRow.sSrcControlId); |
| 1090 | - if(commonUtils.isNotEmptyArr(processFilterData)) { | ||
| 1091 | - processFilterData.forEach((filterRow) =>{ | 1091 | + if (commonUtils.isNotEmptyArr(processFilterData)) { |
| 1092 | + processFilterData.forEach((filterRow) => { | ||
| 1092 | const index = processNewData.findIndex(materialsRow => materialsRow.sId === filterRow.sId); | 1093 | const index = processNewData.findIndex(materialsRow => materialsRow.sId === filterRow.sId); |
| 1093 | filterRow.sControlId = controlRow.sId; | 1094 | filterRow.sControlId = controlRow.sId; |
| 1094 | filterRow.sPartsName = controlRow.sPartsName; | 1095 | filterRow.sPartsName = controlRow.sPartsName; |
| @@ -1100,10 +1101,10 @@ class CommonBill extends Component { | @@ -1100,10 +1101,10 @@ class CommonBill extends Component { | ||
| 1100 | } | 1101 | } |
| 1101 | 1102 | ||
| 1102 | /* 替换材料数据中sControlId为最新控制表的sId */ | 1103 | /* 替换材料数据中sControlId为最新控制表的sId */ |
| 1103 | - if(commonUtils.isNotEmptyArr(materialsNewData)) { | 1104 | + if (commonUtils.isNotEmptyArr(materialsNewData)) { |
| 1104 | let materialsFilterData = materialsNewData.filter(materialsRow => materialsRow.sSrcControlId === controlRow.sSrcControlId); | 1105 | let materialsFilterData = materialsNewData.filter(materialsRow => materialsRow.sSrcControlId === controlRow.sSrcControlId); |
| 1105 | - if(commonUtils.isNotEmptyArr(materialsFilterData)) { | ||
| 1106 | - materialsFilterData.forEach((filterRow) =>{ | 1106 | + if (commonUtils.isNotEmptyArr(materialsFilterData)) { |
| 1107 | + materialsFilterData.forEach((filterRow) => { | ||
| 1107 | const index = materialsNewData.findIndex(materialsRow => materialsRow.sId === filterRow.sId); | 1108 | const index = materialsNewData.findIndex(materialsRow => materialsRow.sId === filterRow.sId); |
| 1108 | filterRow.sControlId = controlRow.sId; | 1109 | filterRow.sControlId = controlRow.sId; |
| 1109 | filterRow.sPartsName = controlRow.sPartsName; | 1110 | filterRow.sPartsName = controlRow.sPartsName; |
| @@ -1123,13 +1124,13 @@ class CommonBill extends Component { | @@ -1123,13 +1124,13 @@ class CommonBill extends Component { | ||
| 1123 | 1124 | ||
| 1124 | const materialsData = materialsNewData; | 1125 | const materialsData = materialsNewData; |
| 1125 | materialsFilterData = materialsData.filter(item => commonUtils.isNotEmptyObject(item.sParentMaterialsId)); | 1126 | materialsFilterData = materialsData.filter(item => commonUtils.isNotEmptyObject(item.sParentMaterialsId)); |
| 1126 | - if(commonUtils.isNotEmptyArr(materialsFilterData)) { | 1127 | + if (commonUtils.isNotEmptyArr(materialsFilterData)) { |
| 1127 | materialsFilterData.forEach((filterItem, index) => { | 1128 | materialsFilterData.forEach((filterItem, index) => { |
| 1128 | const iIndex = materialsData.findIndex(item => item.sOriginalOldId === filterItem.sParentMaterialsId); | 1129 | const iIndex = materialsData.findIndex(item => item.sOriginalOldId === filterItem.sParentMaterialsId); |
| 1129 | - if(iIndex > -1) { | 1130 | + if (iIndex > -1) { |
| 1130 | const iNexIndex = materialsData.findIndex(item => item.sId === filterItem.sId); | 1131 | const iNexIndex = materialsData.findIndex(item => item.sId === filterItem.sId); |
| 1131 | if (iNexIndex > -1) { | 1132 | if (iNexIndex > -1) { |
| 1132 | - materialsData[iNexIndex] = {...materialsData[iNexIndex], sParentMaterialsId: materialsData[iIndex].sId } | 1133 | + materialsData[iNexIndex] = { ...materialsData[iNexIndex], sParentMaterialsId: materialsData[iIndex].sId } |
| 1133 | } | 1134 | } |
| 1134 | } | 1135 | } |
| 1135 | 1136 | ||
| @@ -1137,13 +1138,13 @@ class CommonBill extends Component { | @@ -1137,13 +1138,13 @@ class CommonBill extends Component { | ||
| 1137 | } | 1138 | } |
| 1138 | 1139 | ||
| 1139 | const materialsInkFilterData = materialsData.filter(item => commonUtils.isNotEmptyObject(item.sInkFatherMaterialsTbId)); | 1140 | const materialsInkFilterData = materialsData.filter(item => commonUtils.isNotEmptyObject(item.sInkFatherMaterialsTbId)); |
| 1140 | - if(commonUtils.isNotEmptyArr(materialsInkFilterData)) { | 1141 | + if (commonUtils.isNotEmptyArr(materialsInkFilterData)) { |
| 1141 | materialsInkFilterData.forEach((filterItem, index) => { | 1142 | materialsInkFilterData.forEach((filterItem, index) => { |
| 1142 | const iIndex = materialsData.findIndex(item => item.sOriginalOldId === filterItem.sInkFatherMaterialsTbId); | 1143 | const iIndex = materialsData.findIndex(item => item.sOriginalOldId === filterItem.sInkFatherMaterialsTbId); |
| 1143 | - if(iIndex > -1) { | 1144 | + if (iIndex > -1) { |
| 1144 | const iNexIndex = materialsData.findIndex(item => item.sId === filterItem.sId); | 1145 | const iNexIndex = materialsData.findIndex(item => item.sId === filterItem.sId); |
| 1145 | - if(iNexIndex > -1) { | ||
| 1146 | - materialsData[iNexIndex] = { ...materialsData[iNexIndex], sInkFatherMaterialsTbId: materialsData[iIndex].sId} | 1146 | + if (iNexIndex > -1) { |
| 1147 | + materialsData[iNexIndex] = { ...materialsData[iNexIndex], sInkFatherMaterialsTbId: materialsData[iIndex].sId } | ||
| 1147 | } | 1148 | } |
| 1148 | } | 1149 | } |
| 1149 | }); | 1150 | }); |
| @@ -1170,13 +1171,13 @@ class CommonBill extends Component { | @@ -1170,13 +1171,13 @@ class CommonBill extends Component { | ||
| 1170 | message.warn('数据未配置!不能生成!'); | 1171 | message.warn('数据未配置!不能生成!'); |
| 1171 | return; | 1172 | return; |
| 1172 | } | 1173 | } |
| 1173 | - } else if(commonUtils.isNotEmptyObject(selectConfig.sControlName) && selectConfig.sControlName.toLowerCase().includes('tmpinfobysql')) { | 1174 | + } else if (commonUtils.isNotEmptyObject(selectConfig.sControlName) && selectConfig.sControlName.toLowerCase().includes('tmpinfobysql')) { |
| 1174 | const dataUrl = `${commonConfig.server_host}salesorder/getTmpInfoBySql/?sModelsId=${sModelsId}`; | 1175 | const dataUrl = `${commonConfig.server_host}salesorder/getTmpInfoBySql/?sModelsId=${sModelsId}`; |
| 1175 | const sConfigformId = commonUtils.isEmpty(selectConfig) ? '' : selectConfig.sParentId; | 1176 | const sConfigformId = commonUtils.isEmpty(selectConfig) ? '' : selectConfig.sParentId; |
| 1176 | const sControlName = commonUtils.isNotEmptyObject(selectConfig.sControlName) ? selectConfig.sControlName : 'BtnCopyFrom.TmpInfoBySql'; | 1177 | const sControlName = commonUtils.isNotEmptyObject(selectConfig.sControlName) ? selectConfig.sControlName : 'BtnCopyFrom.TmpInfoBySql'; |
| 1177 | let sSqlCondition = ''; | 1178 | let sSqlCondition = ''; |
| 1178 | const conditonValues0 = this.props.getSqlCondition(selectConfig, 'slave', selectData[0]); | 1179 | const conditonValues0 = this.props.getSqlCondition(selectConfig, 'slave', selectData[0]); |
| 1179 | - if(commonUtils.isNotEmptyObject(conditonValues0)) { | 1180 | + if (commonUtils.isNotEmptyObject(conditonValues0)) { |
| 1180 | sSqlCondition = conditonValues0; | 1181 | sSqlCondition = conditonValues0; |
| 1181 | } else { | 1182 | } else { |
| 1182 | sSqlCondition = { sId: selectData[0].sId }; | 1183 | sSqlCondition = { sId: selectData[0].sId }; |
| @@ -1194,29 +1195,29 @@ class CommonBill extends Component { | @@ -1194,29 +1195,29 @@ class CommonBill extends Component { | ||
| 1194 | const sName = `${key}Data`; | 1195 | const sName = `${key}Data`; |
| 1195 | const sDelName = `${key}DelData`; | 1196 | const sDelName = `${key}DelData`; |
| 1196 | // allReturnMap[sName] = returnData[key]; | 1197 | // allReturnMap[sName] = returnData[key]; |
| 1197 | - let {[`${key}Data`]: oldData, [`${key}Data`]: oldDelData } = this.props; | 1198 | + let { [`${key}Data`]: oldData, [`${key}Data`]: oldDelData } = this.props; |
| 1198 | 1199 | ||
| 1199 | - if(commonUtils.isEmptyArr(oldDelData)) { | 1200 | + if (commonUtils.isEmptyArr(oldDelData)) { |
| 1200 | oldDelData = []; | 1201 | oldDelData = []; |
| 1201 | } | 1202 | } |
| 1202 | - if(commonUtils.isEmptyArr(oldData)) { | 1203 | + if (commonUtils.isEmptyArr(oldData)) { |
| 1203 | oldData = []; | 1204 | oldData = []; |
| 1204 | } | 1205 | } |
| 1205 | /* 找到赋值字段 */ | 1206 | /* 找到赋值字段 */ |
| 1206 | - const tableConfig = masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes(sTmpInfoBySqlBtnName +'.' + key)); | 1207 | + const tableConfig = masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes(sTmpInfoBySqlBtnName + '.' + key)); |
| 1207 | const tableField = commonUtils.isNotEmptyArr(tableConfig) ? tableConfig[0].sAssignField : ''; | 1208 | const tableField = commonUtils.isNotEmptyArr(tableConfig) ? tableConfig[0].sAssignField : ''; |
| 1208 | - if(sTmpInfoBySqlBtnName.includes('_edit')) { /* 替换 根据对应字段对比 相同的不管 不同的插入 */ | 1209 | + if (sTmpInfoBySqlBtnName.includes('_edit')) { /* 替换 根据对应字段对比 相同的不管 不同的插入 */ |
| 1209 | /* 对应字段 */ | 1210 | /* 对应字段 */ |
| 1210 | const sActiveKey = selectConfig.sActiveKey; | 1211 | const sActiveKey = selectConfig.sActiveKey; |
| 1211 | const keyData = returnData[key]; | 1212 | const keyData = returnData[key]; |
| 1212 | /* 找到赋值字段 */ | 1213 | /* 找到赋值字段 */ |
| 1213 | 1214 | ||
| 1214 | let newData = []; | 1215 | let newData = []; |
| 1215 | - if(commonUtils.isNotEmptyArr(keyData)) { | 1216 | + if (commonUtils.isNotEmptyArr(keyData)) { |
| 1216 | keyData.forEach((child) => { | 1217 | keyData.forEach((child) => { |
| 1217 | const filterData = oldData.filter(item => item[sActiveKey] !== child[sActiveKey]); | 1218 | const filterData = oldData.filter(item => item[sActiveKey] !== child[sActiveKey]); |
| 1218 | - if(commonUtils.isNotEmptyArr(filterData) && filterData.length === oldData.length) { | ||
| 1219 | - let tableRow ={}; | 1219 | + if (commonUtils.isNotEmptyArr(filterData) && filterData.length === oldData.length) { |
| 1220 | + let tableRow = {}; | ||
| 1220 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 | 1221 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 |
| 1221 | tableRow.sId = commonUtils.createSid(); | 1222 | tableRow.sId = commonUtils.createSid(); |
| 1222 | tableRow.sParentId = masterData.sId; | 1223 | tableRow.sParentId = masterData.sId; |
| @@ -1230,15 +1231,15 @@ class CommonBill extends Component { | @@ -1230,15 +1231,15 @@ class CommonBill extends Component { | ||
| 1230 | } else { /* 替换 根据对应字段对比 相同的不管 不同的插入 */ | 1231 | } else { /* 替换 根据对应字段对比 相同的不管 不同的插入 */ |
| 1231 | /* 对应字段 */ | 1232 | /* 对应字段 */ |
| 1232 | oldData.forEach((child) => { | 1233 | oldData.forEach((child) => { |
| 1233 | - child.handleType ='del'; | 1234 | + child.handleType = 'del'; |
| 1234 | oldDelData.push(child); | 1235 | oldDelData.push(child); |
| 1235 | }); | 1236 | }); |
| 1236 | allReturnMap[sDelName] = oldDelData; | 1237 | allReturnMap[sDelName] = oldDelData; |
| 1237 | oldData = []; | 1238 | oldData = []; |
| 1238 | const keyData = returnData[key]; | 1239 | const keyData = returnData[key]; |
| 1239 | - if(commonUtils.isNotEmptyArr(keyData)) { | 1240 | + if (commonUtils.isNotEmptyArr(keyData)) { |
| 1240 | keyData.forEach((child) => { | 1241 | keyData.forEach((child) => { |
| 1241 | - let tableRow ={}; | 1242 | + let tableRow = {}; |
| 1242 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 | 1243 | tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(tableField, child) }; // 取赋值字段 |
| 1243 | tableRow.sId = commonUtils.createSid(); | 1244 | tableRow.sId = commonUtils.createSid(); |
| 1244 | tableRow.sParentId = masterData.sId; | 1245 | tableRow.sParentId = masterData.sId; |
| @@ -1612,7 +1613,7 @@ class CommonBill extends Component { | @@ -1612,7 +1613,7 @@ class CommonBill extends Component { | ||
| 1612 | } | 1613 | } |
| 1613 | 1614 | ||
| 1614 | /* 审核备注文本框改变事件 */ | 1615 | /* 审核备注文本框改变事件 */ |
| 1615 | - textChange= (e, record) => { | 1616 | + textChange = (e, record) => { |
| 1616 | const sCheckRemark = commonUtils.isNotEmptyObject(record) && commonUtils.isNotEmptyObject(e.target.value) ? e.target.value : ''; | 1617 | const sCheckRemark = commonUtils.isNotEmptyObject(record) && commonUtils.isNotEmptyObject(e.target.value) ? e.target.value : ''; |
| 1617 | this.props.onSaveState({ sCheckRemark });/* 审核备注 */ | 1618 | this.props.onSaveState({ sCheckRemark });/* 审核备注 */ |
| 1618 | } | 1619 | } |
| @@ -1702,7 +1703,7 @@ class CommonBill extends Component { | @@ -1702,7 +1703,7 @@ class CommonBill extends Component { | ||
| 1702 | }; | 1703 | }; |
| 1703 | // ----------------------------数据修改回带end ---------------------------- // | 1704 | // ----------------------------数据修改回带end ---------------------------- // |
| 1704 | 1705 | ||
| 1705 | - handleMenuClick= (e) => { | 1706 | + handleMenuClick = (e) => { |
| 1706 | let { sId } = this.props.masterData; | 1707 | let { sId } = this.props.masterData; |
| 1707 | const Type = e.key; | 1708 | const Type = e.key; |
| 1708 | const { token } = this.props.app; | 1709 | const { token } = this.props.app; |
| @@ -1717,7 +1718,7 @@ class CommonBill extends Component { | @@ -1717,7 +1718,7 @@ class CommonBill extends Component { | ||
| 1717 | sId = slaveSelectedRowKeys; | 1718 | sId = slaveSelectedRowKeys; |
| 1718 | } | 1719 | } |
| 1719 | const downloadUrl = `${commonConfig.server_host}sqlfile/scriptSqlDownload?methodName=${Type | 1720 | const downloadUrl = `${commonConfig.server_host}sqlfile/scriptSqlDownload?methodName=${Type |
| 1720 | - }&sId=${sId}&token=${token}&sType=${sType}`; | 1721 | + }&sId=${sId}&token=${token}&sType=${sType}`; |
| 1721 | window.open(downloadUrl); | 1722 | window.open(downloadUrl); |
| 1722 | this.props.onSaveState({ | 1723 | this.props.onSaveState({ |
| 1723 | downloadUrl, | 1724 | downloadUrl, |
| @@ -1757,7 +1758,7 @@ class CommonBill extends Component { | @@ -1757,7 +1758,7 @@ class CommonBill extends Component { | ||
| 1757 | } | 1758 | } |
| 1758 | 1759 | ||
| 1759 | handleCheckBoxStatus = (status, dataIndex, name) => { | 1760 | handleCheckBoxStatus = (status, dataIndex, name) => { |
| 1760 | - const { [`${name}Data`]: dataSource} = this.props; | 1761 | + const { [`${name}Data`]: dataSource } = this.props; |
| 1761 | if (!Array.isArray(dataSource)) return; | 1762 | if (!Array.isArray(dataSource)) return; |
| 1762 | const result = dataSource.map(i => ({ | 1763 | const result = dataSource.map(i => ({ |
| 1763 | ...i, | 1764 | ...i, |
| @@ -1823,10 +1824,10 @@ class CommonBill extends Component { | @@ -1823,10 +1824,10 @@ class CommonBill extends Component { | ||
| 1823 | 1824 | ||
| 1824 | // 找到关联的从表 */ | 1825 | // 找到关联的从表 */ |
| 1825 | let controlTableData = []; | 1826 | let controlTableData = []; |
| 1826 | - if(visibleModal) { | ||
| 1827 | - if(commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { | 1827 | + if (visibleModal) { |
| 1828 | + if (commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { | ||
| 1828 | controlTableData = controlData.filter(item => item.sSlaveId === slaveSelectedRowKeys[0]) | 1829 | controlTableData = controlData.filter(item => item.sSlaveId === slaveSelectedRowKeys[0]) |
| 1829 | - }else { | 1830 | + } else { |
| 1830 | controlTableData = controlData; | 1831 | controlTableData = controlData; |
| 1831 | } | 1832 | } |
| 1832 | } | 1833 | } |
| @@ -1835,7 +1836,7 @@ class CommonBill extends Component { | @@ -1835,7 +1836,7 @@ class CommonBill extends Component { | ||
| 1835 | tableProps: { | 1836 | tableProps: { |
| 1836 | CalLastWidth: modalWidth, AutoTableHeight: fixedAutoHeight, setCopyAll, setProcess, setMaterial, chooseProcessConfigRow: chooseProcessConfig, chooseMaterialsConfigRow: chooseMaterialsConfig, onRow: (record) => { return { onClick: () => { this.onRowClick('control', record); } }; }, | 1837 | CalLastWidth: modalWidth, AutoTableHeight: fixedAutoHeight, setCopyAll, setProcess, setMaterial, chooseProcessConfigRow: chooseProcessConfig, chooseMaterialsConfigRow: chooseMaterialsConfig, onRow: (record) => { return { onClick: () => { this.onRowClick('control', record); } }; }, |
| 1837 | }, | 1838 | }, |
| 1838 | - data: commonUtils.isNotEmptyArr(controlTableData) ? commonUtils.genTreeByArr(controlTableData, "sNodeId", "sControlParentId") : [], | 1839 | + data: commonUtils.isNotEmptyArr(controlTableData) ? commonUtils.genTreeByArr(controlTableData, "sNodeId", "sControlParentId") : [], |
| 1839 | filteredValue: slaveSelectedRowKeys, | 1840 | filteredValue: slaveSelectedRowKeys, |
| 1840 | onFilterData: this.handleFilterSlaveData, | 1841 | onFilterData: this.handleFilterSlaveData, |
| 1841 | OnGetFilterData: this.handleGetFilterData, | 1842 | OnGetFilterData: this.handleGetFilterData, |
| @@ -1963,11 +1964,11 @@ class CommonBill extends Component { | @@ -1963,11 +1964,11 @@ class CommonBill extends Component { | ||
| 1963 | // eslint-disable-next-line jsx-a11y/anchor-is-valid | 1964 | // eslint-disable-next-line jsx-a11y/anchor-is-valid |
| 1964 | const operateAdd = <a title="添加同级" alt="" onClick={this.props.enabled ? this.handleTableAdd.bind(this, 'control', false, 'sameNode') : null}>{this.props.enabled ? setAdd.img : setAdd.disableimg} </a>; | 1965 | const operateAdd = <a title="添加同级" alt="" onClick={this.props.enabled ? this.handleTableAdd.bind(this, 'control', false, 'sameNode') : null}>{this.props.enabled ? setAdd.img : setAdd.disableimg} </a>; |
| 1965 | // eslint-disable-next-line jsx-a11y/anchor-is-valid | 1966 | // eslint-disable-next-line jsx-a11y/anchor-is-valid |
| 1966 | - const operateAddChild = <a title="添加子级" onClick={this.props.enabled ? this.handleTableAdd.bind(this, 'control', false, 'childNode') : null}>{this.props.enabled ? setAddChild.img : setAddChild.disableimg }</a>; | 1967 | + const operateAddChild = <a title="添加子级" onClick={this.props.enabled ? this.handleTableAdd.bind(this, 'control', false, 'childNode') : null}>{this.props.enabled ? setAddChild.img : setAddChild.disableimg}</a>; |
| 1967 | // eslint-disable-next-line jsx-a11y/anchor-is-valid | 1968 | // eslint-disable-next-line jsx-a11y/anchor-is-valid |
| 1968 | const operateCopy = <a title="复制" onClick={this.props.enabled ? this.props.onDataRowCopy.bind(this, 'control', false, true) : null}>{this.props.enabled ? setCopy.img : setCopy.disableimg}</a>; | 1969 | const operateCopy = <a title="复制" onClick={this.props.enabled ? this.props.onDataRowCopy.bind(this, 'control', false, true) : null}>{this.props.enabled ? setCopy.img : setCopy.disableimg}</a>; |
| 1969 | // eslint-disable-next-line jsx-a11y/anchor-is-valid | 1970 | // eslint-disable-next-line jsx-a11y/anchor-is-valid |
| 1970 | - const operateUpdate = <a title="复制全部" onClick={this.props.enabled ? this.props.onDataRowCopyAll.bind(this, 'control', false, true) : null}>{this.props.enabled ? setCopyAll.img : setCopyAll.disableimg }</a>; | 1971 | + const operateUpdate = <a title="复制全部" onClick={this.props.enabled ? this.props.onDataRowCopyAll.bind(this, 'control', false, true) : null}>{this.props.enabled ? setCopyAll.img : setCopyAll.disableimg}</a>; |
| 1971 | // eslint-disable-next-line jsx-a11y/anchor-is-valid | 1972 | // eslint-disable-next-line jsx-a11y/anchor-is-valid |
| 1972 | const operateDel = <a title="删除" onClick={this.props.enabled ? this.handleTableDel.bind(this, 'control', true, '', true) : null}>{this.props.enabled ? setDelete.img : setDelete.disableimg}</a>; | 1973 | const operateDel = <a title="删除" onClick={this.props.enabled ? this.handleTableDel.bind(this, 'control', true, '', true) : null}>{this.props.enabled ? setDelete.img : setDelete.disableimg}</a>; |
| 1973 | 1974 | ||
| @@ -2019,14 +2020,14 @@ class CommonBill extends Component { | @@ -2019,14 +2020,14 @@ class CommonBill extends Component { | ||
| 2019 | <Button key="submit" type="primary" onClick={this.handleOk.bind(this, 1, 1, true)}> | 2020 | <Button key="submit" type="primary" onClick={this.handleOk.bind(this, 1, 1, true)}> |
| 2020 | {btnSure} | 2021 | {btnSure} |
| 2021 | </Button>, | 2022 | </Button>, |
| 2022 | - ]} | 2023 | + ]} |
| 2023 | > | 2024 | > |
| 2024 | <Table columns={columns} dataSource={checkConditions} bordered pagination={false} className={styles.checkTable} /> | 2025 | <Table columns={columns} dataSource={checkConditions} bordered pagination={false} className={styles.checkTable} /> |
| 2025 | <div style={{ float: 'left', width: '15%' }}>{checkPerson}</div> | 2026 | <div style={{ float: 'left', width: '15%' }}>{checkPerson}</div> |
| 2026 | <div style={{ float: 'left', width: '60%' }}> | 2027 | <div style={{ float: 'left', width: '60%' }}> |
| 2027 | <Checkbox.Group style={{ width: '100%' }} onChange={this.onChange}> | 2028 | <Checkbox.Group style={{ width: '100%' }} onChange={this.onChange}> |
| 2028 | <Row> | 2029 | <Row> |
| 2029 | - { commonUtils.isNotEmptyObject(checkPersonData) ? | 2030 | + {commonUtils.isNotEmptyObject(checkPersonData) ? |
| 2030 | checkPersonData.map((item) => { | 2031 | checkPersonData.map((item) => { |
| 2031 | return ( | 2032 | return ( |
| 2032 | <Col span={8}> | 2033 | <Col span={8}> |
| @@ -2035,12 +2036,12 @@ class CommonBill extends Component { | @@ -2035,12 +2036,12 @@ class CommonBill extends Component { | ||
| 2035 | ); | 2036 | ); |
| 2036 | }) | 2037 | }) |
| 2037 | : '' | 2038 | : '' |
| 2038 | - } | 2039 | + } |
| 2039 | </Row> | 2040 | </Row> |
| 2040 | </Checkbox.Group> | 2041 | </Checkbox.Group> |
| 2041 | </div> | 2042 | </div> |
| 2042 | </AntdDraggableModal> | 2043 | </AntdDraggableModal> |
| 2043 | - : '' | 2044 | + : '' |
| 2044 | } | 2045 | } |
| 2045 | { | 2046 | { |
| 2046 | visibleModal ? | 2047 | visibleModal ? |
| @@ -2093,50 +2094,50 @@ class CommonBill extends Component { | @@ -2093,50 +2094,50 @@ class CommonBill extends Component { | ||
| 2093 | } | 2094 | } |
| 2094 | <div id="ModalMaterialRemark" > | 2095 | <div id="ModalMaterialRemark" > |
| 2095 | { | 2096 | { |
| 2096 | - sModelsType === 'sales/salesOrderPack' && false ? | ||
| 2097 | - <div style={{ | ||
| 2098 | - marginTop: 0, height: '180px', overflowY: 'hidden', overflowX: 'hidden', | ||
| 2099 | -}} | ||
| 2100 | - > | ||
| 2101 | - <div className="xly-bill-pack"> | ||
| 2102 | - <Sider className="controlhandcover"> | ||
| 2103 | - <div className="xly-control"> | ||
| 2104 | - <div style={{ backgroundColor: '#f5f5f5', height: '30px', lineHeight: '30px' }}> | ||
| 2105 | - <span style={{ | ||
| 2106 | - fontSize: '12px', color: 'rgba(0, 0, 0, 0.85)', fontWeight: '600', paddingLeft: '8px', | ||
| 2107 | -}} | ||
| 2108 | - >部件信息 | ||
| 2109 | - </span> | ||
| 2110 | - </div> | ||
| 2111 | - <div className="xly-control-tree"><StaticEditTree {...treeProps} /></div> | ||
| 2112 | - <div className="xly-control-operate" > | ||
| 2113 | - <span>{operateAdd}</span> | ||
| 2114 | - <span>{operateAddChild}</span> | ||
| 2115 | - <span>{operateCopy}</span> | ||
| 2116 | - <span>{operateUpdate}</span> | ||
| 2117 | - <span>{operateDel}</span> | ||
| 2118 | - </div> | 2097 | + sModelsType === 'sales/salesOrderPack' && false ? |
| 2098 | + <div style={{ | ||
| 2099 | + marginTop: 0, height: '180px', overflowY: 'hidden', overflowX: 'hidden', | ||
| 2100 | + }} | ||
| 2101 | + > | ||
| 2102 | + <div className="xly-bill-pack"> | ||
| 2103 | + <Sider className="controlhandcover"> | ||
| 2104 | + <div className="xly-control"> | ||
| 2105 | + <div style={{ backgroundColor: '#f5f5f5', height: '30px', lineHeight: '30px' }}> | ||
| 2106 | + <span style={{ | ||
| 2107 | + fontSize: '12px', color: 'rgba(0, 0, 0, 0.85)', fontWeight: '600', paddingLeft: '8px', | ||
| 2108 | + }} | ||
| 2109 | + >部件信息 | ||
| 2110 | + </span> | ||
| 2111 | + </div> | ||
| 2112 | + <div className="xly-control-tree"><StaticEditTree {...treeProps} /></div> | ||
| 2113 | + <div className="xly-control-operate" > | ||
| 2114 | + <span>{operateAdd}</span> | ||
| 2115 | + <span>{operateAddChild}</span> | ||
| 2116 | + <span>{operateCopy}</span> | ||
| 2117 | + <span>{operateUpdate}</span> | ||
| 2118 | + <span>{operateDel}</span> | ||
| 2119 | </div> | 2119 | </div> |
| 2120 | - </Sider> | ||
| 2121 | - <div style={{ overflowX: 'auto', overflowY: 'hidden' }}> | ||
| 2122 | - <StaticEditTable {...controlPropsType} footer="hidden" setOpterationColumn="Y" /> | ||
| 2123 | </div> | 2120 | </div> |
| 2121 | + </Sider> | ||
| 2122 | + <div style={{ overflowX: 'auto', overflowY: 'hidden' }}> | ||
| 2123 | + <StaticEditTable {...controlPropsType} footer="hidden" setOpterationColumn="Y" /> | ||
| 2124 | </div> | 2124 | </div> |
| 2125 | - </div> : | ||
| 2126 | - <div className='xly-commonbill-choose' style={{ marginTop: 0, overflowY: 'hidden' }} > | ||
| 2127 | - <Layout> | ||
| 2128 | - <Sider style={{width: 32}}> | ||
| 2129 | - {controlInfo} | ||
| 2130 | - </Sider> | ||
| 2131 | - <Content> | ||
| 2132 | - <StaticEditTable {...controlPropsType} footer="hidden" setOpterationColumn="Y" /> | ||
| 2133 | - </Content> | ||
| 2134 | - </Layout> | ||
| 2135 | </div> | 2125 | </div> |
| 2136 | - } | 2126 | + </div> : |
| 2127 | + <div className='xly-commonbill-choose' style={{ marginTop: 0, overflowY: 'hidden' }} > | ||
| 2128 | + <Layout> | ||
| 2129 | + <Sider style={{ width: 32 }}> | ||
| 2130 | + {controlInfo} | ||
| 2131 | + </Sider> | ||
| 2132 | + <Content> | ||
| 2133 | + <StaticEditTable {...controlPropsType} footer="hidden" setOpterationColumn="Y" /> | ||
| 2134 | + </Content> | ||
| 2135 | + </Layout> | ||
| 2136 | + </div> | ||
| 2137 | + } | ||
| 2137 | <div className='xly-commonbill-choose' style={{ marginTop: 10, overflowY: 'hidden' }}> | 2138 | <div className='xly-commonbill-choose' style={{ marginTop: 10, overflowY: 'hidden' }}> |
| 2138 | <Layout> | 2139 | <Layout> |
| 2139 | - <Sider style={{width: 32, backgroundColor: '#fff8e6'}}> | 2140 | + <Sider style={{ width: 32, backgroundColor: '#fff8e6' }}> |
| 2140 | {materialsInfo} | 2141 | {materialsInfo} |
| 2141 | </Sider> | 2142 | </Sider> |
| 2142 | <Content> | 2143 | <Content> |
| @@ -2145,8 +2146,8 @@ class CommonBill extends Component { | @@ -2145,8 +2146,8 @@ class CommonBill extends Component { | ||
| 2145 | </Layout> | 2146 | </Layout> |
| 2146 | </div> | 2147 | </div> |
| 2147 | <div className='xly-commonbill-choose' style={{ marginTop: 10, overflowY: 'hidden' }} id="chooseProcessModal"> | 2148 | <div className='xly-commonbill-choose' style={{ marginTop: 10, overflowY: 'hidden' }} id="chooseProcessModal"> |
| 2148 | - <Layout> | ||
| 2149 | - <Sider style={{width: 32, backgroundColor: '#fff8e6'}}> | 2149 | + <Layout> |
| 2150 | + <Sider style={{ width: 32, backgroundColor: '#fff8e6' }}> | ||
| 2150 | {processInfo} | 2151 | {processInfo} |
| 2151 | </Sider> | 2152 | </Sider> |
| 2152 | <Content> | 2153 | <Content> |
| @@ -2156,7 +2157,7 @@ class CommonBill extends Component { | @@ -2156,7 +2157,7 @@ class CommonBill extends Component { | ||
| 2156 | </div> | 2157 | </div> |
| 2157 | </div> | 2158 | </div> |
| 2158 | </AntdDraggableModal> | 2159 | </AntdDraggableModal> |
| 2159 | - : ''} | 2160 | + : ''} |
| 2160 | </div> | 2161 | </div> |
| 2161 | </Spin> | 2162 | </Spin> |
| 2162 | </div> | 2163 | </div> |
| @@ -2197,9 +2198,9 @@ const BillComponent = Form.create({ | @@ -2197,9 +2198,9 @@ const BillComponent = Form.create({ | ||
| 2197 | onReturnForm(form); | 2198 | onReturnForm(form); |
| 2198 | 2199 | ||
| 2199 | const { currentPane } = app; | 2200 | const { currentPane } = app; |
| 2200 | - let bFlow = currentPane?.bFlow; /* 是否需要展示审批流程信息 */ | 2201 | + let bFlow = currentPane?.bFlow; /* 是否需要展示审批流程信息 */ |
| 2201 | 2202 | ||
| 2202 | - if(bDelegate) { | 2203 | + if (bDelegate) { |
| 2203 | bFlow = false; | 2204 | bFlow = false; |
| 2204 | } | 2205 | } |
| 2205 | 2206 | ||
| @@ -2302,7 +2303,7 @@ const BillComponent = Form.create({ | @@ -2302,7 +2303,7 @@ const BillComponent = Form.create({ | ||
| 2302 | importExcelProps = { | 2303 | importExcelProps = { |
| 2303 | ...commonBusiness.getTableTypes('import', props), | 2304 | ...commonBusiness.getTableTypes('import', props), |
| 2304 | tableProps: { | 2305 | tableProps: { |
| 2305 | - setAdd, setCopy, setCopyAll, setDelete, setMaterialRemark, setMaterial, chooseMaterialsConfigRow: chooseMaterialsConfig, pagination:null, onChange: props.onTitleChange, | 2306 | + setAdd, setCopy, setCopyAll, setDelete, setMaterialRemark, setMaterial, chooseMaterialsConfigRow: chooseMaterialsConfig, pagination: null, onChange: props.onTitleChange, |
| 2306 | AutoTableHeight: 400, | 2307 | AutoTableHeight: 400, |
| 2307 | }, | 2308 | }, |
| 2308 | onDelRow: props.onDelRow, | 2309 | onDelRow: props.onDelRow, |
| @@ -2358,26 +2359,52 @@ const BillComponent = Form.create({ | @@ -2358,26 +2359,52 @@ const BillComponent = Form.create({ | ||
| 2358 | // const saleOrder = commonFunc.showMessage(app.commonConst, 'saleOrder');/* 销售订单 s*/ | 2359 | // const saleOrder = commonFunc.showMessage(app.commonConst, 'saleOrder');/* 销售订单 s*/ |
| 2359 | setMaterialRemark = props.sModelsType !== undefined && props.sModelsType.includes('sales/salesOrder') ? setMaterialRemark : null; | 2360 | setMaterialRemark = props.sModelsType !== undefined && props.sModelsType.includes('sales/salesOrder') ? setMaterialRemark : null; |
| 2360 | /* 通过从表是否配置材料与工艺按钮的显示不显示来判断是否有选择材料与工艺 */ | 2361 | /* 通过从表是否配置材料与工艺按钮的显示不显示来判断是否有选择材料与工艺 */ |
| 2361 | - const materialRemarkArr = commonUtils.isNotEmptyObject(slaveConfig) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName && | 2362 | + const materialRemarkArr = commonUtils.isNotEmptyObject(slaveConfig) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName && |
| 2362 | item.sControlName.includes('BtnSetMaterialRemark')) : []; | 2363 | item.sControlName.includes('BtnSetMaterialRemark')) : []; |
| 2363 | - if(commonUtils.isNotEmptyArr(materialRemarkArr)) { | 2364 | + if (commonUtils.isNotEmptyArr(materialRemarkArr)) { |
| 2364 | setMaterialRemark = materialRemarkArr[0].bVisible ? setMaterialRemark : null; | 2365 | setMaterialRemark = materialRemarkArr[0].bVisible ? setMaterialRemark : null; |
| 2365 | } | 2366 | } |
| 2366 | const bBillTree = commonUtils.isNotEmptyObject(slaveConfig) && slaveConfig.sTableType && slaveConfig.sTableType.includes('multiple'); /* 是否是树形的单据 */ | 2367 | const bBillTree = commonUtils.isNotEmptyObject(slaveConfig) && slaveConfig.sTableType && slaveConfig.sTableType.includes('multiple'); /* 是否是树形的单据 */ |
| 2367 | const bSingleTree = commonUtils.isNotEmptyObject(slaveConfig) && slaveConfig.sTableType === 'single'; /* 单表数据 */ | 2368 | const bSingleTree = commonUtils.isNotEmptyObject(slaveConfig) && slaveConfig.sTableType === 'single'; /* 单表数据 */ |
| 2368 | - const bShowTreeAddChild = commonUtils.isNotEmptyObject(slaveConfig) && commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName.includes('BtnAddChildNode') && item.bVisible)) ? true : false ; /* 是否是树形的单据 */ | 2369 | + const bShowTreeAddChild = commonUtils.isNotEmptyObject(slaveConfig) && commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName.includes('BtnAddChildNode') && item.bVisible)) ? true : false; /* 是否是树形的单据 */ |
| 2370 | + const handleViewChoose = (tableName, sFieldName, record, index, isColor) => { | ||
| 2371 | + if (isColor) { | ||
| 2372 | + const { sId } = record; /* 控制表主键 */ | ||
| 2373 | + const { enabled, processSelectedRowKeys } = props; | ||
| 2374 | + const NoProcessParameters = commonFunc.showLocalMessage(props, 'NoProcessParameters', '无工艺参数!'); | ||
| 2375 | + const sisColorSelectedRowKeys = []; | ||
| 2376 | + let jsonData = []; | ||
| 2377 | + const { [`${tableName}Data`]: tableData } = props; | ||
| 2378 | + const iIndex = tableData?.findIndex(item => item.sId === sId); | ||
| 2379 | + if (iIndex > -1) { | ||
| 2380 | + const sPositiveColor = tableData[iIndex][sFieldName]; | ||
| 2381 | + const sPositiveColorList = (sPositiveColor && sPositiveColor !== 'undefined' && sPositiveColor !== 'null') | ||
| 2382 | + ? JSON.parse(sPositiveColor) | ||
| 2383 | + : []; | ||
| 2384 | + props.onSaveState({ | ||
| 2385 | + sisColorChooseVisible: true, | ||
| 2386 | + controlSelectedRowId: sId, /* 控制表选中行sId */ | ||
| 2387 | + processSelectedRowId: '', /* 工序表选中行sId */ | ||
| 2388 | + sisColorSelectedRowKeys, | ||
| 2389 | + sisColorSelectedData: sPositiveColorList, | ||
| 2390 | + sisColorField: sFieldName, | ||
| 2391 | + sisTableName: tableName, | ||
| 2392 | + }); | ||
| 2369 | 2393 | ||
| 2394 | + } | ||
| 2395 | + } | ||
| 2396 | + } | ||
| 2370 | const slaveTableProps = { | 2397 | const slaveTableProps = { |
| 2371 | ...commonBusiness.getTableTypes('slave', props), | 2398 | ...commonBusiness.getTableTypes('slave', props), |
| 2372 | tableProps: { | 2399 | tableProps: { |
| 2373 | setAdd, setCopy, setCopyAll, setDelete, setMaterialRemark, setMaterial, chooseMaterialsConfigRow: chooseMaterialsConfig, | 2400 | setAdd, setCopy, setCopyAll, setDelete, setMaterialRemark, setMaterial, chooseMaterialsConfigRow: chooseMaterialsConfig, |
| 2374 | - pagination, onChange: props.onTitleChange, bShowTreeAddChild:bShowTreeAddChild, | 2401 | + pagination, onChange: props.onTitleChange, bShowTreeAddChild: bShowTreeAddChild, |
| 2375 | }, | 2402 | }, |
| 2376 | - data: bSingleTree && commonUtils.isNotEmptyArr(slaveData) ? commonUtils.genTreeByArr(slaveData, 'sNodeId', 'sFatherSlaveId') : slaveData, | 2403 | + data: bSingleTree && commonUtils.isNotEmptyArr(slaveData) ? commonUtils.genTreeByArr(slaveData, 'sNodeId', 'sFatherSlaveId') : slaveData, |
| 2377 | onDelRow: props.onDelRow, | 2404 | onDelRow: props.onDelRow, |
| 2378 | - onTableFilterData: bBillTree ? props.onTableFilterData : null, | 2405 | + onTableFilterData: bBillTree ? props.onTableFilterData : null, |
| 2379 | templateProps, | 2406 | templateProps, |
| 2380 | - sTableType : commonUtils.isNotEmptyObject(slaveConfig) && commonUtils.isNotEmptyObject(slaveConfig.sTableType) ? slaveConfig.sTableType : 'zero', | 2407 | + sTableType: commonUtils.isNotEmptyObject(slaveConfig) && commonUtils.isNotEmptyObject(slaveConfig.sTableType) ? slaveConfig.sTableType : 'zero', |
| 2381 | onKeyDown: props.onKeyDown, | 2408 | onKeyDown: props.onKeyDown, |
| 2382 | onContextMenu: props.onContextMenu, | 2409 | onContextMenu: props.onContextMenu, |
| 2383 | masterData: props.masterData, // 为通用弹窗提供主表数据(孟总需求:产品新增需要带上客户信息) | 2410 | masterData: props.masterData, // 为通用弹窗提供主表数据(孟总需求:产品新增需要带上客户信息) |
| @@ -2403,7 +2430,7 @@ const BillComponent = Form.create({ | @@ -2403,7 +2430,7 @@ const BillComponent = Form.create({ | ||
| 2403 | ...commonBusiness.getTableTypes(`slave${index}`, props), | 2430 | ...commonBusiness.getTableTypes(`slave${index}`, props), |
| 2404 | tableProps: { | 2431 | tableProps: { |
| 2405 | pagination: slaveTablePagination, onChange: props.onTitleChange1.bind(this, `slave${index}`), | 2432 | pagination: slaveTablePagination, onChange: props.onTitleChange1.bind(this, `slave${index}`), |
| 2406 | - AutoTableHeight: bHasSlaveChild ? 150 : 375, | 2433 | + AutoTableHeight: bHasSlaveChild ? 150 : 375, |
| 2407 | }, | 2434 | }, |
| 2408 | }; | 2435 | }; |
| 2409 | }); | 2436 | }); |
| @@ -2498,10 +2525,10 @@ const BillComponent = Form.create({ | @@ -2498,10 +2525,10 @@ const BillComponent = Form.create({ | ||
| 2498 | item.sControlName.indexOf('Btn') === -1 && | 2525 | item.sControlName.indexOf('Btn') === -1 && |
| 2499 | item.sControlName.indexOf('_') !== -1 | 2526 | item.sControlName.indexOf('_') !== -1 |
| 2500 | ) || ( | 2527 | ) || ( |
| 2501 | - item.sControlName && | ||
| 2502 | - item.sControlName.indexOf('DividerArea') !== -1 && | ||
| 2503 | - item.sControlName.indexOf('.hide') === -1 | ||
| 2504 | - ) | 2528 | + item.sControlName && |
| 2529 | + item.sControlName.indexOf('DividerArea') !== -1 && | ||
| 2530 | + item.sControlName.indexOf('.hide') === -1 | ||
| 2531 | + ) | ||
| 2505 | ); | 2532 | ); |
| 2506 | 2533 | ||
| 2507 | if (commonUtils.isEmptyArr(controlArr)) { | 2534 | if (commonUtils.isEmptyArr(controlArr)) { |
| @@ -2535,8 +2562,8 @@ const BillComponent = Form.create({ | @@ -2535,8 +2562,8 @@ const BillComponent = Form.create({ | ||
| 2535 | let tabName = tabNameKey.replace(/\d+/g, ""); | 2562 | let tabName = tabNameKey.replace(/\d+/g, ""); |
| 2536 | const num = tabNameKey.replace(/[^\d]/g, "").trim(); | 2563 | const num = tabNameKey.replace(/[^\d]/g, "").trim(); |
| 2537 | const tableConfigArr = config?.gdsconfigformslave.filter(row => row.sControlName === tabNameKey.trim()); | 2564 | const tableConfigArr = config?.gdsconfigformslave.filter(row => row.sControlName === tabNameKey.trim()); |
| 2538 | - if(commonUtils.isNotEmptyArr(tableConfigArr)) { | ||
| 2539 | - tabName= tableConfigArr[0].showName; | 2565 | + if (commonUtils.isNotEmptyArr(tableConfigArr)) { |
| 2566 | + tabName = tableConfigArr[0].showName; | ||
| 2540 | } | 2567 | } |
| 2541 | const viewProps = { | 2568 | const viewProps = { |
| 2542 | ...props, | 2569 | ...props, |
| @@ -2561,7 +2588,7 @@ const BillComponent = Form.create({ | @@ -2561,7 +2588,7 @@ const BillComponent = Form.create({ | ||
| 2561 | }); | 2588 | }); |
| 2562 | } | 2589 | } |
| 2563 | 2590 | ||
| 2564 | - const flexRowStyle = bFlow ? {display:'flex', flexDirection:'row'} : {}; | 2591 | + const flexRowStyle = bFlow ? { display: 'flex', flexDirection: 'row' } : {}; |
| 2565 | /* | 2592 | /* |
| 2566 | if (props.sModelsType === 'sales/salesOrder') { | 2593 | if (props.sModelsType === 'sales/salesOrder') { |
| 2567 | const btnUpload = ( | 2594 | const btnUpload = ( |
| @@ -2579,7 +2606,7 @@ const BillComponent = Form.create({ | @@ -2579,7 +2606,7 @@ const BillComponent = Form.create({ | ||
| 2579 | <Header className={styles.header}> | 2606 | <Header className={styles.header}> |
| 2580 | <div className="billToolBar"> | 2607 | <div className="billToolBar"> |
| 2581 | <Toolbar {...props} className="billBtnGroup btnGroupHasImport" pageFrom="billList" /> | 2608 | <Toolbar {...props} className="billBtnGroup btnGroupHasImport" pageFrom="billList" /> |
| 2582 | - { commonUtils.isNotEmptyArr(ImportData) ? | 2609 | + {commonUtils.isNotEmptyArr(ImportData) ? |
| 2583 | <div id="btnImportData" className={`importData ${props.enabled}`} > | 2610 | <div id="btnImportData" className={`importData ${props.enabled}`} > |
| 2584 | <Upload {...outProps}><UploadOutlined />{BtnimportData} | 2611 | <Upload {...outProps}><UploadOutlined />{BtnimportData} |
| 2585 | <Button {...uploadPropsSales} /> | 2612 | <Button {...uploadPropsSales} /> |
| @@ -2587,8 +2614,8 @@ const BillComponent = Form.create({ | @@ -2587,8 +2614,8 @@ const BillComponent = Form.create({ | ||
| 2587 | </div> : ''} | 2614 | </div> : ''} |
| 2588 | </div> | 2615 | </div> |
| 2589 | </Header> | 2616 | </Header> |
| 2590 | - <Layout className={styles.clayout} style={flexRowStyle}> | ||
| 2591 | - <Content className={styles.content} style={{ overflowY: 'unset', width: bFlow ? '75%':'100%', }} ref={(ref) => { props.setContentRef(ref); }}> | 2617 | + <Layout className={styles.clayout} style={flexRowStyle}> |
| 2618 | + <Content className={styles.content} style={{ overflowY: 'unset', width: bFlow ? '75%' : '100%', }} ref={(ref) => { props.setContentRef(ref); }}> | ||
| 2592 | <div style={{ | 2619 | <div style={{ |
| 2593 | border: '1px solid #c2c3c5', | 2620 | border: '1px solid #c2c3c5', |
| 2594 | margin: '0 10px', | 2621 | margin: '0 10px', |
| @@ -2600,7 +2627,7 @@ const BillComponent = Form.create({ | @@ -2600,7 +2627,7 @@ const BillComponent = Form.create({ | ||
| 2600 | <CommonView {...props} /> | 2627 | <CommonView {...props} /> |
| 2601 | </div> | 2628 | </div> |
| 2602 | </div> | 2629 | </div> |
| 2603 | - { onlyMaster ? | 2630 | + {onlyMaster ? |
| 2604 | <div id="slaveTabs" className={styles.bShow}> | 2631 | <div id="slaveTabs" className={styles.bShow}> |
| 2605 | <div> | 2632 | <div> |
| 2606 | <Avatar src={props.imgSrc} className={customStyles.bShowImg} /> | 2633 | <Avatar src={props.imgSrc} className={customStyles.bShowImg} /> |
| @@ -2613,7 +2640,7 @@ const BillComponent = Form.create({ | @@ -2613,7 +2640,7 @@ const BillComponent = Form.create({ | ||
| 2613 | <Tabs className={styles.slaveTabs} style={{ overflowY: 'unset' }} tabBarStyle={{ margin: '0 10px' }} > | 2640 | <Tabs className={styles.slaveTabs} style={{ overflowY: 'unset' }} tabBarStyle={{ margin: '0 10px' }} > |
| 2614 | <TabPane tab={MainContent} key={10} className="xly-bill-list"> | 2641 | <TabPane tab={MainContent} key={10} className="xly-bill-list"> |
| 2615 | <div className="TabPaneStyle"> | 2642 | <div className="TabPaneStyle"> |
| 2616 | - <StaticEditTable {...slaveTableProps} setOpterationColumn={props.sModelsType !== 'cost/cosexpenseshare' ? 'Y' : ''} /> | 2643 | + <StaticEditTable {...slaveTableProps} setOpterationColumn={props.sModelsType !== 'cost/cosexpenseshare' ? 'Y' : ''} onViewChoose={handleViewChoose} /> |
| 2617 | </div> | 2644 | </div> |
| 2618 | </TabPane> | 2645 | </TabPane> |
| 2619 | {getTabPaneExtra('slave')} | 2646 | {getTabPaneExtra('slave')} |
| @@ -2635,7 +2662,7 @@ const BillComponent = Form.create({ | @@ -2635,7 +2662,7 @@ const BillComponent = Form.create({ | ||
| 2635 | <> | 2662 | <> |
| 2636 | <TabPane tab={CheckInfo} key={50} className="xly-bill-list"> | 2663 | <TabPane tab={CheckInfo} key={50} className="xly-bill-list"> |
| 2637 | <div className="TabPaneStyle"> | 2664 | <div className="TabPaneStyle"> |
| 2638 | - <StaticEditTable {...commonBusiness.getTableTypes('check', props)} /> | 2665 | + <StaticEditTable {...commonBusiness.getTableTypes('check', props)} /> |
| 2639 | </div> | 2666 | </div> |
| 2640 | </TabPane> | 2667 | </TabPane> |
| 2641 | {getTabPaneExtra('check')} | 2668 | {getTabPaneExtra('check')} |
| @@ -2643,8 +2670,8 @@ const BillComponent = Form.create({ | @@ -2643,8 +2670,8 @@ const BillComponent = Form.create({ | ||
| 2643 | ) : '' | 2670 | ) : '' |
| 2644 | } | 2671 | } |
| 2645 | </Tabs> | 2672 | </Tabs> |
| 2646 | - </div> } | ||
| 2647 | - { onlyMasterAndSlave ? | 2673 | + </div>} |
| 2674 | + {onlyMasterAndSlave ? | ||
| 2648 | <div id="slaveTabs" className={styles.bShow}> | 2675 | <div id="slaveTabs" className={styles.bShow}> |
| 2649 | <div> | 2676 | <div> |
| 2650 | <Avatar src={props.imgSrc} /> | 2677 | <Avatar src={props.imgSrc} /> |
| @@ -2653,13 +2680,13 @@ const BillComponent = Form.create({ | @@ -2653,13 +2680,13 @@ const BillComponent = Form.create({ | ||
| 2653 | <TabPane tab={MainContent} key={10} className="xly-bill-list"> | 2680 | <TabPane tab={MainContent} key={10} className="xly-bill-list"> |
| 2654 | <StaticEditTable {...slaveTableProps} setOpterationColumn={props.sModelsType !== 'cashier/receipt' && props.sModelsType !== 'cashier/payment' ? 'Y' : ''} /> | 2681 | <StaticEditTable {...slaveTableProps} setOpterationColumn={props.sModelsType !== 'cashier/receipt' && props.sModelsType !== 'cashier/payment' ? 'Y' : ''} /> |
| 2655 | </TabPane> | 2682 | </TabPane> |
| 2656 | - {getTabPaneExtra('slave')} | 2683 | + {getTabPaneExtra('slave')} |
| 2657 | </Tabs> | 2684 | </Tabs> |
| 2658 | - </div> : '' } | 2685 | + </div> : ''} |
| 2659 | </Content> | 2686 | </Content> |
| 2660 | { | 2687 | { |
| 2661 | bFlow ? | 2688 | bFlow ? |
| 2662 | - <div id='examInfo' style={{width:'25%', textAlign:'center', height:'900px', maxHeight: 'calc(100vh - 130px)' , backgroundColor:'#f0f0f0'}}> | 2689 | + <div id='examInfo' style={{ width: '25%', textAlign: 'center', height: '900px', maxHeight: 'calc(100vh - 130px)', backgroundColor: '#f0f0f0' }}> |
| 2663 | <CommonExamInfo {...props} /> | 2690 | <CommonExamInfo {...props} /> |
| 2664 | </div> | 2691 | </div> |
| 2665 | : '' | 2692 | : '' |
| @@ -2742,19 +2769,238 @@ const BillComponent = Form.create({ | @@ -2742,19 +2769,238 @@ const BillComponent = Form.create({ | ||
| 2742 | width={1480} | 2769 | width={1480} |
| 2743 | zIndex={1000} | 2770 | zIndex={1000} |
| 2744 | title={importExcelTitle} | 2771 | title={importExcelTitle} |
| 2745 | - bodyStyle ={{ height:'450px' }} | 2772 | + bodyStyle={{ height: '450px' }} |
| 2746 | visible={props.showImportErrorVisible} | 2773 | visible={props.showImportErrorVisible} |
| 2747 | onCancel={props.handleCancelModal.bind(this, 'showImportErrorVisible')} | 2774 | onCancel={props.handleCancelModal.bind(this, 'showImportErrorVisible')} |
| 2748 | onOk={props.handleCancelModal.bind(this, 'showImportErrorVisible')} | 2775 | onOk={props.handleCancelModal.bind(this, 'showImportErrorVisible')} |
| 2749 | onSaveState={props.onSaveState} | 2776 | onSaveState={props.onSaveState} |
| 2750 | - // footer={null} | 2777 | + // footer={null} |
| 2751 | > | 2778 | > |
| 2752 | <StaticEditTable {...importExcelProps} /> | 2779 | <StaticEditTable {...importExcelProps} /> |
| 2753 | </AntdDraggableModal> | 2780 | </AntdDraggableModal> |
| 2754 | : '' | 2781 | : '' |
| 2755 | } | 2782 | } |
| 2783 | + <SisColorChooseComponent {...props} /> | ||
| 2756 | </Form> | 2784 | </Form> |
| 2757 | ); | 2785 | ); |
| 2758 | }); | 2786 | }); |
| 2787 | +const SisColorChooseComponent = props => { | ||
| 2788 | + const { sisColorChooseVisible, sisColorField, sisTableName, controlSelectedRowId } = props; | ||
| 2789 | + | ||
| 2790 | + const [rightData, setRightData] = useState(props?.sisColorSelectedData?.filter(item => item.bSelected) || []); | ||
| 2791 | + useEffect(() => { | ||
| 2792 | + if (props.sisColorSelectedData && props.sisColorSelectedData.length > 0) { | ||
| 2793 | + setRightData(props?.sisColorSelectedData?.filter(item => item.bSelected) || []); | ||
| 2794 | + } else { | ||
| 2795 | + setRightData([]); | ||
| 2796 | + } | ||
| 2797 | + }, [props.sisColorSelectedData, props.sisColorChooseVisible]) | ||
| 2798 | + if (!sisColorChooseVisible) return ""; | ||
| 2799 | + | ||
| 2800 | + const handleClose = () => { | ||
| 2801 | + | ||
| 2802 | + props.onSaveState({ | ||
| 2803 | + sisColorChooseVisible: false, | ||
| 2804 | + }); | ||
| 2805 | + }; | ||
| 2806 | + | ||
| 2807 | + const handelSubmit = () => { | ||
| 2808 | + const { [`${sisTableName}Data`]: tableData } = props; | ||
| 2809 | + const iIndex = tableData?.findIndex(item => item.sId === controlSelectedRowId); | ||
| 2810 | + // iPositiveColor sPositiveColor sOppositeColor | ||
| 2811 | + if (props?.sisColorSelectedData && props?.sisColorSelectedData?.length === 0) { | ||
| 2812 | + props.onSaveState({ | ||
| 2813 | + sisColorChooseVisible: false, | ||
| 2814 | + sisColorSelectedData: [] | ||
| 2815 | + }); | ||
| 2816 | + return | ||
| 2817 | + } | ||
| 2818 | + const colorList = JSON.parse(tableData[iIndex][sisColorField]).map(item => { | ||
| 2819 | + const i = rightData.findIndex(rightItem => rightItem.sId === item.sId); | ||
| 2820 | + let newItem = { | ||
| 2821 | + ...item | ||
| 2822 | + } | ||
| 2823 | + if (i > -1) { | ||
| 2824 | + newItem = { | ||
| 2825 | + ...newItem, | ||
| 2826 | + bSelected: true | ||
| 2827 | + } | ||
| 2828 | + } | ||
| 2829 | + return newItem | ||
| 2830 | + }); | ||
| 2831 | + tableData[iIndex] = { | ||
| 2832 | + ...tableData[iIndex], | ||
| 2833 | + [sisColorField]: JSON.stringify(colorList), | ||
| 2834 | + } | ||
| 2835 | + const { sPositiveColor, sOppositeColor } = tableData[iIndex] | ||
| 2836 | + const sPositiveColorList = (sPositiveColor && sPositiveColor !== 'undefined' && sPositiveColor !== 'null') | ||
| 2837 | + ? JSON.parse(sPositiveColor).filter(item => item.bSelected) | ||
| 2838 | + : []; | ||
| 2839 | + const sOppositeColorList = (sOppositeColor && sOppositeColor !== 'undefined' && sOppositeColor !== 'null') | ||
| 2840 | + ? JSON.parse(sOppositeColor).filter(item => item.bSelected) | ||
| 2841 | + : []; | ||
| 2842 | + const allTotalDColor = sPositiveColorList.reduce((total, item) => total + item.dColor, 0) + sOppositeColorList.reduce((total, item) => total + item.dColor, 0); | ||
| 2843 | + tableData[iIndex] = { | ||
| 2844 | + ...tableData[iIndex], | ||
| 2845 | + iOutsideQty: allTotalDColor, | ||
| 2846 | + iPublishQty: allTotalDColor | ||
| 2847 | + } | ||
| 2848 | + | ||
| 2849 | + props.onSaveState({ | ||
| 2850 | + [`${sisTableName}Data`]: [...tableData], | ||
| 2851 | + sisColorChooseVisible: false, | ||
| 2852 | + sisColorSelectedData: [] | ||
| 2853 | + }); | ||
| 2854 | + | ||
| 2855 | + } | ||
| 2856 | + | ||
| 2857 | + const handleLeftSelectChange = (selectedRowKeys, selectedRows) => { | ||
| 2858 | + setRightData(selectedRows); | ||
| 2859 | + }; | ||
| 2860 | + | ||
| 2861 | + const handleDeleteRight = (record) => { | ||
| 2862 | + const newData = rightData.filter(item => item.sId !== record.sId); | ||
| 2863 | + setRightData(newData); | ||
| 2864 | + }; | ||
| 2865 | + | ||
| 2866 | + const leftRowSelection = { | ||
| 2867 | + type: 'checkbox', | ||
| 2868 | + selectedRowKeys: rightData.map(item => item.sId), | ||
| 2869 | + onChange: handleLeftSelectChange, | ||
| 2870 | + }; | ||
| 2871 | + | ||
| 2872 | + | ||
| 2873 | + const rowCellStyleLeft = { | ||
| 2874 | + fontSize: '16px', | ||
| 2875 | + }; | ||
| 2876 | + | ||
| 2877 | + const rowCellStyleRight = { | ||
| 2878 | + fontSize: '16px', | ||
| 2879 | + }; | ||
| 2880 | + | ||
| 2881 | + const headerCellStyle = { | ||
| 2882 | + fontSize: '20px', | ||
| 2883 | + fontWeight: 'bold', | ||
| 2884 | + }; | ||
| 2885 | + | ||
| 2886 | + const CustomCellLeft = (cellProps) => ( | ||
| 2887 | + <td {...cellProps} style={{ ...cellProps.style, ...rowCellStyleLeft }} /> | ||
| 2888 | + ); | ||
| 2889 | + | ||
| 2890 | + const CustomCellRight = (cellProps) => ( | ||
| 2891 | + <td {...cellProps} style={{ ...cellProps.style, ...rowCellStyleRight }} /> | ||
| 2892 | + ); | ||
| 2893 | + | ||
| 2894 | + const baseColumns = [ | ||
| 2895 | + { | ||
| 2896 | + title: '序号', | ||
| 2897 | + dataIndex: 'index', | ||
| 2898 | + key: 'index', | ||
| 2899 | + width: 60, | ||
| 2900 | + align: 'center', | ||
| 2901 | + render: (_, record, index) => index + 1, | ||
| 2902 | + customHeaderCell: () => ({ style: headerCellStyle }), | ||
| 2903 | + }, | ||
| 2904 | + { | ||
| 2905 | + title: '名称', | ||
| 2906 | + dataIndex: 'sName', | ||
| 2907 | + customHeaderCell: () => ({ style: headerCellStyle }), | ||
| 2908 | + }, | ||
| 2909 | + { | ||
| 2910 | + title: '板数', | ||
| 2911 | + dataIndex: 'dColor', | ||
| 2912 | + customHeaderCell: () => ({ style: headerCellStyle }), | ||
| 2913 | + }, | ||
| 2914 | + ]; | ||
| 2759 | 2915 | ||
| 2916 | + const rightColumns = [ | ||
| 2917 | + ...baseColumns.map(col => ({ ...col })), | ||
| 2918 | + { | ||
| 2919 | + title: '操作', | ||
| 2920 | + key: 'action', | ||
| 2921 | + width: 80, | ||
| 2922 | + align: 'center', | ||
| 2923 | + customHeaderCell: () => ({ style: headerCellStyle }), | ||
| 2924 | + render: (_, record) => ( | ||
| 2925 | + <a | ||
| 2926 | + onClick={(e) => { e.stopPropagation(); handleDeleteRight(record); }} | ||
| 2927 | + style={{ color: '#ff4d4f', cursor: 'pointer' }} | ||
| 2928 | + > | ||
| 2929 | + 删除 | ||
| 2930 | + </a> | ||
| 2931 | + ), | ||
| 2932 | + }, | ||
| 2933 | + ]; | ||
| 2934 | + | ||
| 2935 | + // --- 组件映射 --- | ||
| 2936 | + | ||
| 2937 | + const tableComponentsLeft = { | ||
| 2938 | + body: { | ||
| 2939 | + cell: CustomCellLeft, | ||
| 2940 | + }, | ||
| 2941 | + }; | ||
| 2942 | + | ||
| 2943 | + const tableComponentsRight = { | ||
| 2944 | + body: { | ||
| 2945 | + cell: CustomCellRight, | ||
| 2946 | + }, | ||
| 2947 | + }; | ||
| 2948 | + | ||
| 2949 | + return ( | ||
| 2950 | + <Modal | ||
| 2951 | + title='颜色选择' | ||
| 2952 | + open={sisColorChooseVisible} | ||
| 2953 | + width={1000} | ||
| 2954 | + height={400} | ||
| 2955 | + | ||
| 2956 | + footer={ | ||
| 2957 | + <Space> | ||
| 2958 | + <Button | ||
| 2959 | + size="large" | ||
| 2960 | + type="primary" | ||
| 2961 | + onClick={handelSubmit} | ||
| 2962 | + > | ||
| 2963 | + 确认 | ||
| 2964 | + </Button> | ||
| 2965 | + <Button | ||
| 2966 | + size="large" | ||
| 2967 | + type="primary" | ||
| 2968 | + onClick={handleClose} | ||
| 2969 | + > | ||
| 2970 | + 取消 | ||
| 2971 | + </Button> | ||
| 2972 | + </Space> | ||
| 2973 | + } | ||
| 2974 | + onCancel={handleClose} | ||
| 2975 | + > | ||
| 2976 | + <Row gutter={[8, 0]}> | ||
| 2977 | + {/* 左侧表格 */} | ||
| 2978 | + <Col span={8} className="commonColorModal"> | ||
| 2979 | + <Table | ||
| 2980 | + rowSelection={leftRowSelection} | ||
| 2981 | + rowKey="sId" | ||
| 2982 | + columns={baseColumns} | ||
| 2983 | + dataSource={props.sisColorSelectedData || []} | ||
| 2984 | + pagination={false} | ||
| 2985 | + scroll={{ y: 350 }} | ||
| 2986 | + components={tableComponentsLeft} | ||
| 2987 | + /> | ||
| 2988 | + </Col> | ||
| 2989 | + | ||
| 2990 | + {/* 右侧表格 */} | ||
| 2991 | + <Col span={16} className="commonColorModal"> | ||
| 2992 | + <Table | ||
| 2993 | + rowSelection={null} | ||
| 2994 | + rowKey="sId" | ||
| 2995 | + columns={rightColumns} | ||
| 2996 | + dataSource={rightData} | ||
| 2997 | + pagination={false} | ||
| 2998 | + scroll={{ y: 350 }} | ||
| 2999 | + components={tableComponentsRight} | ||
| 3000 | + /> | ||
| 3001 | + </Col> | ||
| 3002 | + </Row> | ||
| 3003 | + </Modal> | ||
| 3004 | + ); | ||
| 3005 | +}; | ||
| 2760 | export default CommonBase(CommonSales(CommonBill)); | 3006 | export default CommonBase(CommonSales(CommonBill)); |
src/components/Common/CommonComponent/index.js
| @@ -284,6 +284,8 @@ export default class CommonComponent extends Component { | @@ -284,6 +284,8 @@ export default class CommonComponent extends Component { | ||
| 284 | onFocus = () => { | 284 | onFocus = () => { |
| 285 | this.isDropdownFilter = false; | 285 | this.isDropdownFilter = false; |
| 286 | this.setState({ sActiveDisplay: false }); | 286 | this.setState({ sActiveDisplay: false }); |
| 287 | + console.log(this.props, 'asdasdads'); | ||
| 288 | + | ||
| 287 | }; | 289 | }; |
| 288 | 290 | ||
| 289 | onBlur = event => { | 291 | onBlur = event => { |
| @@ -3369,6 +3371,10 @@ export default class CommonComponent extends Component { | @@ -3369,6 +3371,10 @@ export default class CommonComponent extends Component { | ||
| 3369 | this.props.onPreviewImage(e, dataUrl); | 3371 | this.props.onPreviewImage(e, dataUrl); |
| 3370 | }; | 3372 | }; |
| 3371 | handleViewChoose = () => { | 3373 | handleViewChoose = () => { |
| 3374 | + if (this.props?.showConfig?.sName.includes('Color')) { | ||
| 3375 | + this.props.onViewChoose(this.props.name, this.props.showConfig.sName, this.props.record, null, true); | ||
| 3376 | + return | ||
| 3377 | + } | ||
| 3372 | const bGycs = this.props.showConfig?.showName?.includes("工艺参数"); | 3378 | const bGycs = this.props.showConfig?.showName?.includes("工艺参数"); |
| 3373 | if (this.state.enabled || bGycs) this.props.onViewChoose(this.props.name, this.props.showConfig.sName, this.props.record); | 3379 | if (this.state.enabled || bGycs) this.props.onViewChoose(this.props.name, this.props.showConfig.sName, this.props.record); |
| 3374 | }; | 3380 | }; |
src/components/Common/CommonTable/index.js
| @@ -4157,8 +4157,8 @@ class CommonTableRc extends React.Component { | @@ -4157,8 +4157,8 @@ class CommonTableRc extends React.Component { | ||
| 4157 | this.props.onSaveState({ sCurrMemoProps }); | 4157 | this.props.onSaveState({ sCurrMemoProps }); |
| 4158 | } | 4158 | } |
| 4159 | } | 4159 | } |
| 4160 | - handleViewChoose = (name, sName, record, index) => { | ||
| 4161 | - this.props.onViewChoose(name, sName, record, index); | 4160 | + handleViewChoose = (name, sName, record, index, isColor) => { |
| 4161 | + this.props.onViewChoose(name, sName, record, index, isColor); | ||
| 4162 | } | 4162 | } |
| 4163 | /* 弹出通用窗体 */ | 4163 | /* 弹出通用窗体 */ |
| 4164 | handlePopupModal = (showConfig, name) => { | 4164 | handlePopupModal = (showConfig, name) => { |