Commit 0b21fe96fc5b4a23b165b1da9c6551dbcb9b0598
Merge branch 'release/customer/2025/五彩' into release/customer/2025/mes-std
# Conflicts: # src/components/Common/CommonHooks/useCommonBase.js # src/components/Common/CommonTable/index.js # src/mes/common/commonModelComponent/index.js
Showing
13 changed files
with
781 additions
and
261 deletions
src/components/Common/CommonBillEvent.js
| @@ -7435,7 +7435,6 @@ export default (ChildComponent) => { | @@ -7435,7 +7435,6 @@ export default (ChildComponent) => { | ||
| 7435 | materials0Data.push(tableDataRowAdd); | 7435 | materials0Data.push(tableDataRowAdd); |
| 7436 | }); | 7436 | }); |
| 7437 | } | 7437 | } |
| 7438 | - console.log('222', materials0Data, copyToAssignField); | ||
| 7439 | 7438 | ||
| 7440 | if (commonUtils.isNotEmptyArr(materials0Data) && location.pathname.includes('processCardPackTableTree')) { | 7439 | if (commonUtils.isNotEmptyArr(materials0Data) && location.pathname.includes('processCardPackTableTree')) { |
| 7441 | /* 根据配置过滤数据 */ | 7440 | /* 根据配置过滤数据 */ |
| @@ -7649,7 +7648,6 @@ export default (ChildComponent) => { | @@ -7649,7 +7648,6 @@ export default (ChildComponent) => { | ||
| 7649 | 7648 | ||
| 7650 | 7649 | ||
| 7651 | }); | 7650 | }); |
| 7652 | - console.log('放大镜确认数据:', tbName, tableData, materials0Data) | ||
| 7653 | this.props.onSaveState({ materials0Data }); | 7651 | this.props.onSaveState({ materials0Data }); |
| 7654 | } | 7652 | } |
| 7655 | } else if (selectConfig.sControlName && selectConfig.sControlName.includes('BtnPopupMaterials')) { /* 报价单工序表放大镜 选择材料 */ | 7653 | } else if (selectConfig.sControlName && selectConfig.sControlName.includes('BtnPopupMaterials')) { /* 报价单工序表放大镜 选择材料 */ |
src/components/Common/CommonComponent/index.js
| @@ -1518,7 +1518,7 @@ export default class CommonComponent extends Component { | @@ -1518,7 +1518,7 @@ export default class CommonComponent extends Component { | ||
| 1518 | }, /* 数据改变回带到父组件 */ | 1518 | }, /* 数据改变回带到父组件 */ |
| 1519 | parser: (oldValue) => { | 1519 | parser: (oldValue) => { |
| 1520 | const value = this.handleCheckNumberInnerInput(oldValue); | 1520 | const value = this.handleCheckNumberInnerInput(oldValue); |
| 1521 | - return value?.replace(/\$\s?|(,*)/g, ''); | 1521 | + return String(value || '').replace(/\$\s?|(,*)/g, ''); |
| 1522 | }, | 1522 | }, |
| 1523 | formatter: (value) => { | 1523 | formatter: (value) => { |
| 1524 | if (value === '' || value === undefined || value === null || location.pathname.includes("indexPad")) { | 1524 | if (value === '' || value === undefined || value === null || location.pathname.includes("indexPad")) { |
| @@ -1971,6 +1971,9 @@ export default class CommonComponent extends Component { | @@ -1971,6 +1971,9 @@ export default class CommonComponent extends Component { | ||
| 1971 | extraClassName = "sideInfoTitle"; | 1971 | extraClassName = "sideInfoTitle"; |
| 1972 | } | 1972 | } |
| 1973 | } else { | 1973 | } else { |
| 1974 | + if( this.props.showConfig.sName === 'sMemo'){ | ||
| 1975 | + extraClassName = "memoInfoTitle"; | ||
| 1976 | + } | ||
| 1974 | // if (showNameNew?.length > 7) { | 1977 | // if (showNameNew?.length > 7) { |
| 1975 | // titleStyle.fontSize = 14; | 1978 | // titleStyle.fontSize = 14; |
| 1976 | // } else if (showNameNew?.length > 6) { | 1979 | // } else if (showNameNew?.length > 6) { |
src/components/Common/CommonHooks/useCommonBase.js
| @@ -58,14 +58,17 @@ const useCommonBase = props => { | @@ -58,14 +58,17 @@ const useCommonBase = props => { | ||
| 58 | const { sModelsId, app } = state; | 58 | const { sModelsId, app } = state; |
| 59 | const isChoosePlate = sModelsId !== '12710101117087374661080' | 59 | const isChoosePlate = sModelsId !== '12710101117087374661080' |
| 60 | const formData = await handleGetModelConfig({ sModelsId }); | 60 | const formData = await handleGetModelConfig({ sModelsId }); |
| 61 | - const addState = {}; | 61 | + let addState = {}; |
| 62 | let pageRoute = props.sModelType; | 62 | let pageRoute = props.sModelType; |
| 63 | // 如果是弹窗且没有pageLayout,则认为是commonBill | 63 | // 如果是弹窗且没有pageLayout,则认为是commonBill |
| 64 | if (commonUtils.isNotEmptyObject(props.parentProps) && formData.length && !formData[0].gdsconfigformslave.some(item => item.sControlName === 'pageLayout')) { | 64 | if (commonUtils.isNotEmptyObject(props.parentProps) && formData.length && !formData[0].gdsconfigformslave.some(item => item.sControlName === 'pageLayout')) { |
| 65 | pageRoute = '/indexPage/commonBill'; | 65 | pageRoute = '/indexPage/commonBill'; |
| 66 | } | 66 | } |
| 67 | + if (formData.length && formData[0]?.sName.includes('/indexPage/commonSubBill')) { | ||
| 68 | + pageRoute = formData[0]?.sName | ||
| 69 | + } | ||
| 67 | 70 | ||
| 68 | - if (formData.length && !props.currentContent && ['/indexPage/commonList', '/indexPage/commonBill'].includes(pageRoute) && !formData[0].gdsconfigformslave.some(item => item.sControlName === 'pageLayout')) { | 71 | + if (formData.length && !props.currentContent && ['/indexPage/commonList', '/indexPage/commonBill', '/indexPage/commonSubBill'].includes(pageRoute) && !formData[0].gdsconfigformslave.some(item => item.sControlName === 'pageLayout')) { |
| 69 | if (pageRoute === '/indexPage/commonList') { | 72 | if (pageRoute === '/indexPage/commonList') { |
| 70 | formData[0].sGrd = isChoosePlate ? 'slave' : formData[0].sGrd; | 73 | formData[0].sGrd = isChoosePlate ? 'slave' : formData[0].sGrd; |
| 71 | formData[0].gdsconfigformslave.push({ | 74 | formData[0].gdsconfigformslave.push({ |
| @@ -98,6 +101,102 @@ const useCommonBase = props => { | @@ -98,6 +101,102 @@ const useCommonBase = props => { | ||
| 98 | }) | 101 | }) |
| 99 | addState.bMesBill = true; | 102 | addState.bMesBill = true; |
| 100 | addState.copyTo = { master: { maxBillNo: 'sBillNo' } }; | 103 | addState.copyTo = { master: { maxBillNo: 'sBillNo' } }; |
| 104 | + } else if (pageRoute === '/indexPage/commonSubBill') { | ||
| 105 | + const { sLanguage } = app.userinfo; | ||
| 106 | + const [tableList, tabConfig] = [[], []]; | ||
| 107 | + let addState1 = {} | ||
| 108 | + const filterData = formData.filter(item => item.bGrd && item.sTbName !== 'sysbillcheckresult' && item.bGrdVisible); | ||
| 109 | + if (commonUtils.isNotEmptyArr(filterData) && filterData.length > 1 && filterData.length === 2) { | ||
| 110 | + const slaveChildConfig = filterData[1]; | ||
| 111 | + const slaveChildColumn = commonFunc.getHeaderConfig(slaveChildConfig); | ||
| 112 | + // handleGetOneMemoData('slaveChild', slaveChildConfig); | ||
| 113 | + const slaveChildPageSize = commonUtils.isNotEmptyObject(slaveChildConfig) && commonUtils.isNotEmptyNumber(slaveChildConfig.iPageSize) && slaveChildConfig.iPageSize !== 0 ? | ||
| 114 | + slaveChildConfig.iPageSize : commonConfig.pageSize; | ||
| 115 | + addState1 = { | ||
| 116 | + slaveChildConfig, | ||
| 117 | + slaveChildColumn, | ||
| 118 | + slaveChildPageSize, | ||
| 119 | + }; | ||
| 120 | + } else if (commonUtils.isNotEmptyArr(filterData) && filterData.length > 2) { | ||
| 121 | + const slaveChildConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName !== 'sysbillcheckresult' && item.bGrdVisible && commonUtils.isNotEmptyObject(item.sChildTableName))) ? | ||
| 122 | + formData.filter(item => item.bGrd && item.sTbName !== 'sysbillcheckresult' && item.bGrdVisible && commonUtils.isNotEmptyObject(item.sChildTableName))[0] : {}; | ||
| 123 | + | ||
| 124 | + const slaveChildColumn = commonUtils.isNotEmptyObject(slaveChildConfig) ? commonFunc.getHeaderConfig(slaveChildConfig) : []; | ||
| 125 | + // handleGetOneMemoData('slaveChild', slaveChildConfig); | ||
| 126 | + const slaveChildPageSize = commonUtils.isNotEmptyObject(slaveChildConfig) && commonUtils.isNotEmptyNumber(slaveChildConfig.iPageSize) && slaveChildConfig.iPageSize !== 0 ? | ||
| 127 | + slaveChildConfig.iPageSize : commonConfig.pageSize; | ||
| 128 | + addState1 = { | ||
| 129 | + slaveChildConfig, | ||
| 130 | + slaveChildColumn, | ||
| 131 | + slaveChildPageSize, | ||
| 132 | + }; | ||
| 133 | + | ||
| 134 | + // eslint-disable-next-line no-unused-vars | ||
| 135 | + const addState2 = {}; | ||
| 136 | + const memoDataList = []; | ||
| 137 | + const slaveInfoList = []; | ||
| 138 | + let slaveIndex = 0; | ||
| 139 | + formData.forEach((item, index) => { | ||
| 140 | + if (index >= 2 && commonUtils.isNotEmptyObject(item) && item.bGrd && item.bGrdVisible && commonUtils.isEmptyObject(item.sChildTableName)) { | ||
| 141 | + addState1[`slave${slaveIndex}Config`] = item; | ||
| 142 | + config[`slave${slaveIndex}Config`] = item; | ||
| 143 | + addState1[`slave${slaveIndex}Column`] = commonFunc.getHeaderConfig(item); | ||
| 144 | + memoDataList.push({ | ||
| 145 | + name: `slave${slaveIndex}`, | ||
| 146 | + config: item, | ||
| 147 | + }); | ||
| 148 | + slaveInfoList.push(`slave${slaveIndex}`); | ||
| 149 | + // eslint-disable-next-line no-plusplus | ||
| 150 | + slaveIndex++; | ||
| 151 | + } | ||
| 152 | + }); | ||
| 153 | + addState1.slaveInfoList = slaveInfoList; | ||
| 154 | + } | ||
| 155 | + const deferredItems = []; | ||
| 156 | + formData.forEach((item, index) => { | ||
| 157 | + if (index === 0) { | ||
| 158 | + item.sGrd = isChoosePlate ? 'master' : item.sGrd; | ||
| 159 | + tableList.push('master'); | ||
| 160 | + tabConfig.push({ "configList": [{ "sName": "master", "showType": "form", "bHideTitle": true, "defaultEnabled": true }], "mode": "advanced", "height": "auto", "width": "100%" }); | ||
| 161 | + } else { | ||
| 162 | + const tablename = `slave${index - 2 < 0 ? '' : index - 2}`; | ||
| 163 | + if (item.bGrd && item.sTbName !== 'sysbillcheckresult' && item.bGrdVisible && index - 2 === 0) { | ||
| 164 | + deferredItems.push({ item, tablename }); | ||
| 165 | + return | ||
| 166 | + } | ||
| 167 | + item.sGrd = isChoosePlate ? tablename : item.sGrd; | ||
| 168 | + tableList.push(tablename); | ||
| 169 | + if (!tabConfig[1]) { | ||
| 170 | + tabConfig.push({ "configList": [], "mode": "advanced" }); | ||
| 171 | + } | ||
| 172 | + tabConfig[1].configList.push({ "sName": tablename, "sTabName": item[sLanguage], "showType": "table", "defaultEnabled": true, "bHideTitle": true }); | ||
| 173 | + } | ||
| 174 | + }); | ||
| 175 | + deferredItems.forEach(({ item, tablename }) => { | ||
| 176 | + item.sGrd = isChoosePlate ? tablename : item.sGrd; | ||
| 177 | + tableList.push(tablename); | ||
| 178 | + | ||
| 179 | + if (!tabConfig[2]) { | ||
| 180 | + tabConfig.push({ "configList": [], "mode": "advanced" }); | ||
| 181 | + } | ||
| 182 | + tabConfig[2].configList.push({ | ||
| 183 | + "sName": tablename, | ||
| 184 | + "sTabName": item[sLanguage], | ||
| 185 | + "showType": "table", | ||
| 186 | + "defaultEnabled": true, | ||
| 187 | + "bHideTitle": true, | ||
| 188 | + "slaveChild": true, | ||
| 189 | + }); | ||
| 190 | + }); | ||
| 191 | + formData[0].gdsconfigformslave.push({ | ||
| 192 | + sId: commonUtils.createSid(), | ||
| 193 | + sControlName: 'pageLayout', | ||
| 194 | + sDefault: JSON.stringify([tableList, tabConfig]), | ||
| 195 | + }) | ||
| 196 | + | ||
| 197 | + addState.bMesSubBill = true; | ||
| 198 | + // addState.copyTo = { master: { maxBillNo: 'sBillNo' } }; | ||
| 199 | + addState = { ...addState, ...addState1 }; | ||
| 101 | } | 200 | } |
| 102 | } | 201 | } |
| 103 | 202 | ||
| @@ -195,7 +294,7 @@ const useCommonBase = props => { | @@ -195,7 +294,7 @@ const useCommonBase = props => { | ||
| 195 | }) | 294 | }) |
| 196 | } else if (bFilterName !== undefined && bFilterCondition !== undefined && bFilterValue !== undefined) { | 295 | } else if (bFilterName !== undefined && bFilterCondition !== undefined && bFilterValue !== undefined) { |
| 197 | const currentValue = masterData[bFilterName]; | 296 | const currentValue = masterData[bFilterName]; |
| 198 | - flag = handleCompareValues(currentValue, bFilterValue, bFilterCondition); | 297 | + // flag = handleCompareValues(currentValue, bFilterValue, bFilterCondition); |
| 199 | } | 298 | } |
| 200 | if (!flag) { | 299 | if (!flag) { |
| 201 | break; | 300 | break; |
| @@ -287,6 +386,7 @@ const useCommonBase = props => { | @@ -287,6 +386,7 @@ const useCommonBase = props => { | ||
| 287 | clearSelectData, | 386 | clearSelectData, |
| 288 | isPagination, // mes的通用列表需要真分页,所以增加isPagination参数控制是否分页 | 387 | isPagination, // mes的通用列表需要真分页,所以增加isPagination参数控制是否分页 |
| 289 | } = params; | 388 | } = params; |
| 389 | + | ||
| 290 | const { | 390 | const { |
| 291 | token, | 391 | token, |
| 292 | sModelsId, | 392 | sModelsId, |
| @@ -325,7 +425,7 @@ const useCommonBase = props => { | @@ -325,7 +425,7 @@ const useCommonBase = props => { | ||
| 325 | } | 425 | } |
| 326 | } | 426 | } |
| 327 | } | 427 | } |
| 328 | - if ( isPagination ) { | 428 | + if (isPagination) { |
| 329 | condition.pageSize = condition.pageSize || 10; /* 前台传入页数或者默认页数 */ | 429 | condition.pageSize = condition.pageSize || 10; /* 前台传入页数或者默认页数 */ |
| 330 | condition.pageNum = condition.pageNum || 1; /* 前台传入页数或者默认页数 */ | 430 | condition.pageNum = condition.pageNum || 1; /* 前台传入页数或者默认页数 */ |
| 331 | } | 431 | } |
| @@ -378,23 +478,25 @@ const useCommonBase = props => { | @@ -378,23 +478,25 @@ const useCommonBase = props => { | ||
| 378 | if (commonUtils.isNotEmptyObject(props.parentProps)) { | 478 | if (commonUtils.isNotEmptyObject(props.parentProps)) { |
| 379 | pageRoute = '/indexPage/commonBill'; | 479 | pageRoute = '/indexPage/commonBill'; |
| 380 | } | 480 | } |
| 381 | - if (name === 'master' && pageRoute.includes('indexPage/commonBill')) { | 481 | + if (name === 'master' && ['/indexPage/commonBill', 'indexPage/commonSubBill'].includes(pageRoute)) { |
| 382 | // condition.sId = configDataId | 482 | // condition.sId = configDataId |
| 383 | condition.pageNum = '' | 483 | condition.pageNum = '' |
| 384 | condition.pageSize = '' | 484 | condition.pageSize = '' |
| 385 | delete condition.sSqlCondition | 485 | delete condition.sSqlCondition |
| 386 | } | 486 | } |
| 387 | - if (name.includes('slave') && pageRoute.includes('indexPage/commonBill')) { | ||
| 388 | - delete condition.sSqlCondition | 487 | + |
| 488 | + if (name.includes('slave') && ['/indexPage/commonBill', '/indexPage/commonSubBill'].includes(pageRoute)) { | ||
| 389 | delete condition.sId | 489 | delete condition.sId |
| 390 | condition.sSqlCondition = { | 490 | condition.sSqlCondition = { |
| 391 | sParentId: condition?.sSqlCondition?.sParentId | 491 | sParentId: condition?.sSqlCondition?.sParentId |
| 392 | } | 492 | } |
| 493 | + | ||
| 393 | } | 494 | } |
| 394 | // 只有弹窗没有不查询 | 495 | // 只有弹窗没有不查询 |
| 395 | - if (name === 'master' && sId === '' && props.parentProps && pageRoute.includes('indexPage/commonBill')) return | 496 | + if (name === 'master' && (sId === '' || !sId) && props.parentProps && ['/indexPage/commonBill', '/indexPage/commonSubBill'].includes(pageRoute)) return |
| 396 | const dataUrl = `${commonConfig.server_host | 497 | const dataUrl = `${commonConfig.server_host |
| 397 | }business/getBusinessDataByFormcustomId/${configDataId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`; | 498 | }business/getBusinessDataByFormcustomId/${configDataId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`; |
| 499 | + | ||
| 398 | const dataReturn = (await commonServices.postValueService( | 500 | const dataReturn = (await commonServices.postValueService( |
| 399 | token, | 501 | token, |
| 400 | condition, | 502 | condition, |
| @@ -431,13 +533,16 @@ const useCommonBase = props => { | @@ -431,13 +533,16 @@ const useCommonBase = props => { | ||
| 431 | const filterConditionNew = commonUtils.isNotEmptyObject(filterCondition) | 533 | const filterConditionNew = commonUtils.isNotEmptyObject(filterCondition) |
| 432 | ? filterCondition.filter(item => item.bFilterType !== "tree") | 534 | ? filterCondition.filter(item => item.bFilterType !== "tree") |
| 433 | : ""; | 535 | : ""; |
| 536 | + // 如果state中存在slaveChildConfig 那么就是commonSubBill | ||
| 537 | + const slaveChild = state?.formData?.find(x => x.sId === state?.slaveChildConfig?.sId) | ||
| 538 | + const names = slaveChild && slaveChild.sGrd === name ? 'slaveChild' : name | ||
| 434 | const addState = { | 539 | const addState = { |
| 435 | - [`${name}Data`]: returnData, | ||
| 436 | - [`${name}TotalData`]: totalData, | 540 | + [`${names}Data`]: returnData, |
| 541 | + [`${names}TotalData`]: totalData, | ||
| 437 | // [`${name}Pagination`]: returnPagination, | 542 | // [`${name}Pagination`]: returnPagination, |
| 438 | - [`${name}FilterCondition`]: filterConditionNew, | ||
| 439 | - [`${name}OrderBy`]: orderBy, | ||
| 440 | - [`${name}SelectedRowKeys`]: tableSelectedRowKeys, | 543 | + [`${names}FilterCondition`]: filterConditionNew, |
| 544 | + [`${names}OrderBy`]: orderBy, | ||
| 545 | + [`${names}SelectedRowKeys`]: tableSelectedRowKeys, | ||
| 441 | menuChildData, | 546 | menuChildData, |
| 442 | pageLoading: false, | 547 | pageLoading: false, |
| 443 | iPageSize, | 548 | iPageSize, |
| @@ -451,19 +556,21 @@ const useCommonBase = props => { | @@ -451,19 +556,21 @@ const useCommonBase = props => { | ||
| 451 | 556 | ||
| 452 | // 添加动态列数据 | 557 | // 添加动态列数据 |
| 453 | if (commonUtils.isNotEmptyArr(columnConfig)) { | 558 | if (commonUtils.isNotEmptyArr(columnConfig)) { |
| 454 | - addState[`${name}ColumnConfig`] = columnConfig; | 559 | + addState[`${names}ColumnConfig`] = columnConfig; |
| 455 | } | 560 | } |
| 456 | 561 | ||
| 457 | const slaveSelectedData = []; | 562 | const slaveSelectedData = []; |
| 458 | - addState[`${name}SelectedData`] = slaveSelectedData; | 563 | + addState[`${names}SelectedData`] = slaveSelectedData; |
| 459 | /* 如果获取数据集时候 删除数据集有数据 则清空 */ | 564 | /* 如果获取数据集时候 删除数据集有数据 则清空 */ |
| 460 | if (commonUtils.isNotEmptyArr(tableDelData)) { | 565 | if (commonUtils.isNotEmptyArr(tableDelData)) { |
| 461 | - addState[`${name}DelData`] = []; | 566 | + addState[`${names}DelData`] = []; |
| 462 | } | 567 | } |
| 568 | + | ||
| 463 | if (isWait) { | 569 | if (isWait) { |
| 464 | return addState; | 570 | return addState; |
| 465 | } | 571 | } |
| 466 | { | 572 | { |
| 573 | + | ||
| 467 | handleSaveState(addState); | 574 | handleSaveState(addState); |
| 468 | } | 575 | } |
| 469 | } else { | 576 | } else { |
| @@ -2795,7 +2902,6 @@ const useCommonBase = props => { | @@ -2795,7 +2902,6 @@ const useCommonBase = props => { | ||
| 2795 | const { sControlName = "", sInstruct } = config; | 2902 | const { sControlName = "", sInstruct } = config; |
| 2796 | const sControlLowerName = sControlName.toLowerCase(); | 2903 | const sControlLowerName = sControlName.toLowerCase(); |
| 2797 | // 调用指令集 | 2904 | // 调用指令集 |
| 2798 | - console.log(sInstruct, 'sInstruct'); | ||
| 2799 | if (sInstruct) { | 2905 | if (sInstruct) { |
| 2800 | handleExecInstructSet({ | 2906 | handleExecInstructSet({ |
| 2801 | ...props, | 2907 | ...props, |
| @@ -2971,7 +3077,7 @@ const useCommonBase = props => { | @@ -2971,7 +3077,7 @@ const useCommonBase = props => { | ||
| 2971 | }; | 3077 | }; |
| 2972 | 3078 | ||
| 2973 | // 表格行新增 | 3079 | // 表格行新增 |
| 2974 | - const handleMesTableLineAdd = ({ tableName, callback, bAddFirst }) => { | 3080 | + const handleMesTableLineAdd = ({ tableName, callback, bAddFirst, slaveChild }) => { |
| 2975 | const { | 3081 | const { |
| 2976 | [`${tableName}Config`]: config = {}, | 3082 | [`${tableName}Config`]: config = {}, |
| 2977 | [`${tableName}Data`]: data = [], | 3083 | [`${tableName}Data`]: data = [], |
| @@ -3017,19 +3123,34 @@ const useCommonBase = props => { | @@ -3017,19 +3123,34 @@ const useCommonBase = props => { | ||
| 3017 | if (masterData.sId) { | 3123 | if (masterData.sId) { |
| 3018 | addRowData.sParentId = masterData.sId; | 3124 | addRowData.sParentId = masterData.sId; |
| 3019 | } | 3125 | } |
| 3126 | + if (tableName === 'slaveChild') { | ||
| 3127 | + /* 找到从表的sSqlConditionId */ | ||
| 3128 | + const { slaveSelectedRowKeys, slaveData } = state | ||
| 3129 | + if (commonUtils.isEmptyArr(slaveSelectedRowKeys)) { | ||
| 3130 | + message.error('请选择父级!'); | ||
| 3131 | + return; | ||
| 3132 | + } | ||
| 3133 | + let iIndex = slaveData.findIndex(item => slaveSelectedRowKeys.includes(item.sId)); | ||
| 3134 | + if (iIndex > -1) { | ||
| 3135 | + addRowData.sSqlConditionId = slaveData[iIndex].sSqlConditionId; | ||
| 3136 | + } | ||
| 3020 | 3137 | ||
| 3138 | + } | ||
| 3021 | const newData = bAddFirst ? [addRowData, ...data] : [...data, addRowData]; | 3139 | const newData = bAddFirst ? [addRowData, ...data] : [...data, addRowData]; |
| 3022 | const selectedRowKeys = [newSid]; | 3140 | const selectedRowKeys = [newSid]; |
| 3023 | const addState = {}; | 3141 | const addState = {}; |
| 3024 | if (location.pathname.includes("indexPad")) { | 3142 | if (location.pathname.includes("indexPad")) { |
| 3025 | addState.enabled = true; | 3143 | addState.enabled = true; |
| 3026 | } | 3144 | } |
| 3027 | - | 3145 | + // const slaveChildData = slaveChild ? { |
| 3146 | + // [`${'slaveChild'}Data`]: newData, | ||
| 3147 | + // [`${'slaveChild'}SelectedRowKeys`]: selectedRowKeys | ||
| 3148 | + // } : {} | ||
| 3028 | handleSaveState( | 3149 | handleSaveState( |
| 3029 | { | 3150 | { |
| 3030 | ...addState, | 3151 | ...addState, |
| 3031 | [`${tableName}Data`]: newData, | 3152 | [`${tableName}Data`]: newData, |
| 3032 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | 3153 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, |
| 3033 | }, | 3154 | }, |
| 3034 | callback | 3155 | callback |
| 3035 | ); | 3156 | ); |
| @@ -3063,6 +3184,17 @@ const useCommonBase = props => { | @@ -3063,6 +3184,17 @@ const useCommonBase = props => { | ||
| 3063 | tableDataRow.bDefault = false; | 3184 | tableDataRow.bDefault = false; |
| 3064 | tableDataRow.iOrder = commonUtils.isNotEmptyArr(tableData) ? iOrderMax + 1 : 1; | 3185 | tableDataRow.iOrder = commonUtils.isNotEmptyArr(tableData) ? iOrderMax + 1 : 1; |
| 3065 | tableDataRow.defaultAdded = tableData.length === 0; | 3186 | tableDataRow.defaultAdded = tableData.length === 0; |
| 3187 | + if (name === 'slaveChild') { | ||
| 3188 | + /* 找到从表的sSqlConditionId */ | ||
| 3189 | + if (commonUtils.isEmptyArr(slaveSelectedRowKeys)) { | ||
| 3190 | + message.error('请选择父级!'); | ||
| 3191 | + return; | ||
| 3192 | + } | ||
| 3193 | + let iIndex = slaveData.findIndex(item => slaveSelectedRowKeys.includes(item.sId)); | ||
| 3194 | + if (iIndex > -1) { | ||
| 3195 | + tableDataRow.sSqlConditionId = slaveData[iIndex].sSqlConditionId; | ||
| 3196 | + } | ||
| 3197 | + } | ||
| 3066 | if (isWait) { | 3198 | if (isWait) { |
| 3067 | return tableDataRow; | 3199 | return tableDataRow; |
| 3068 | } else { | 3200 | } else { |
| @@ -3143,9 +3275,105 @@ const useCommonBase = props => { | @@ -3143,9 +3275,105 @@ const useCommonBase = props => { | ||
| 3143 | tableName, | 3275 | tableName, |
| 3144 | actionName: "mesTableLineDel" | 3276 | actionName: "mesTableLineDel" |
| 3145 | }); | 3277 | }); |
| 3278 | + if (tableName === 'slaveChild') { | ||
| 3279 | + const params = { | ||
| 3280 | + sFieldName: 'dAuxiliaryQty', | ||
| 3281 | + tableDataRow: commonUtils.isEmptyArr(nextProps.slaveChildData) ? [] : nextProps.slaveChildData[0], | ||
| 3282 | + } | ||
| 3283 | + // 汇总到从表方法 | ||
| 3284 | + handleWriteBack(params, nextProps); | ||
| 3285 | + // this.handleGroupDataByDefineNoAfterChange(); | ||
| 3286 | + } | ||
| 3146 | } | 3287 | } |
| 3147 | ); | 3288 | ); |
| 3148 | }; | 3289 | }; |
| 3290 | + // 汇总 | ||
| 3291 | + const handleWriteBack = async (params, nextProps) => { | ||
| 3292 | + const { | ||
| 3293 | + sFieldName, | ||
| 3294 | + tableDataRow, | ||
| 3295 | + } = params; | ||
| 3296 | + const { | ||
| 3297 | + slaveSelectedRowKeys, | ||
| 3298 | + slaveData, | ||
| 3299 | + slaveChildConfig, | ||
| 3300 | + slaveChildData, | ||
| 3301 | + slave0SelectedRowKeys, | ||
| 3302 | + slave0Data, | ||
| 3303 | + } = nextProps; | ||
| 3304 | + if (commonUtils.isEmptyArr(slaveData)) { | ||
| 3305 | + return; | ||
| 3306 | + } | ||
| 3307 | + const addState = {}; | ||
| 3308 | + const sId = tableDataRow.sSqlConditionId || slaveSelectedRowKeys[0] || slaveData[0].sId; | ||
| 3309 | + const iSlaveIndex = slaveData.findIndex(item => item.sId === sId); | ||
| 3310 | + const slaveDataRow = slaveData[iSlaveIndex]; | ||
| 3311 | + const slaveChildFilter = slaveChildData.filter(item => item.sSqlConditionId === slaveDataRow.sSqlConditionId); | ||
| 3312 | + let iSlave0Index = commonUtils.isNotEmptyArr(slave0Data) ? (commonUtils.isNotEmptyArr(slave0SelectedRowKeys) ? | ||
| 3313 | + slave0Data.findIndex(item => slave0SelectedRowKeys.includes(item.sId)) : 0) : -1; | ||
| 3314 | + const slave0DataRow = iSlave0Index > -1 ? slave0Data[iSlave0Index] : {}; | ||
| 3315 | + // 需要汇总的字段 | ||
| 3316 | + const writeBackFields = ['dAuxiliaryQty', 'dProductQty', 'dArrivalQty', 'sBarcode', 'sDefineNo']; | ||
| 3317 | + | ||
| 3318 | + const bHasiType = slaveChildConfig.gdsconfigformslave.find(item => ['itype', 'iType'].includes(item.sName)); | ||
| 3319 | + if (bHasiType && ['dAuxiliaryQty', 'itype', 'iType', 'dProductQty'].includes(sFieldName)) { | ||
| 3320 | + // 需要汇总到从表的字段 1:dAuxiliaryQty,2:dEscrowQty,3:dGiveAuxiliaryQty | ||
| 3321 | + let dAuxiliaryQty = 0; | ||
| 3322 | + let dEscrowAuxiliaryQty = 0; | ||
| 3323 | + let dGiveAuxiliaryQty = 0; | ||
| 3324 | + let dProductQty = 0; | ||
| 3325 | + slaveChildFilter.forEach(item => { | ||
| 3326 | + const dataRow = item.sId === params.tableDataRow.sId ? params.tableDataRow : item; | ||
| 3327 | + const { itype, iType } = dataRow; | ||
| 3328 | + const type = itype !== undefined ? itype : iType !== undefined ? iType : 11; | ||
| 3329 | + | ||
| 3330 | + if (type === 1 || type === '1') { | ||
| 3331 | + dAuxiliaryQty += commonUtils.isNull(Number(dataRow.dAuxiliaryQty), 0); | ||
| 3332 | + } else if (type === 2 || type === '2') { | ||
| 3333 | + dEscrowAuxiliaryQty += commonUtils.isNull(Number(dataRow.dAuxiliaryQty), 0); | ||
| 3334 | + } else if (type === 3 || type === '3') { | ||
| 3335 | + dGiveAuxiliaryQty += commonUtils.isNull(Number(dataRow.dAuxiliaryQty), 0); | ||
| 3336 | + } else if (type === 10 || type === '10') { | ||
| 3337 | + dAuxiliaryQty += commonUtils.isNull(Number(dataRow.dProductQty), 0); | ||
| 3338 | + } else if (type === 11 || type === '11') { | ||
| 3339 | + dProductQty += commonUtils.isNull(Number(dataRow.dAuxiliaryQty), 0); | ||
| 3340 | + } else if (type === 12 || type === '12') { | ||
| 3341 | + dProductQty += commonUtils.isNull(Number(dataRow.dProductQty), 0); | ||
| 3342 | + } | ||
| 3343 | + }); | ||
| 3344 | + const iIndex = slaveData.findIndex(item => item.sId === sId); | ||
| 3345 | + let tableDataRow = {}; | ||
| 3346 | + tableDataRow = await this.handleTableChange('slave', 'dEscrowAuxiliaryQty', { dEscrowAuxiliaryQty }, sId, [], true); | ||
| 3347 | + slaveData[iIndex] = tableDataRow; | ||
| 3348 | + window.tmpSlaveData = slaveData; | ||
| 3349 | + tableDataRow = await this.handleTableChange('slave', 'dGiveAuxiliaryQty', { dGiveAuxiliaryQty }, sId, [], true); | ||
| 3350 | + slaveData[iIndex] = tableDataRow; | ||
| 3351 | + window.tmpSlaveData = slaveData; | ||
| 3352 | + tableDataRow = await this.handleTableChange('slave', 'dAuxiliaryQty', { dAuxiliaryQty }, sId, [], true); | ||
| 3353 | + slaveData[iIndex] = tableDataRow; | ||
| 3354 | + if (commonUtils.isNotEmptyObject(slave0DataRow)) { | ||
| 3355 | + const dSlave0AuxiliaryQty = slave0DataRow['dAuxiliaryQty']; | ||
| 3356 | + const table0DataRow = await this.handleTableChange('slave0', 'dAuxiliaryQty', { dSlave0AuxiliaryQty }, slave0DataRow.sId, [], true); | ||
| 3357 | + slave0Data[iSlave0Index] = table0DataRow; | ||
| 3358 | + addState.slave0Data = slave0Data; | ||
| 3359 | + } | ||
| 3360 | + if (slaveChildFilter.some(item => item.itype === 11 || item.iType === 11 || item.itype === 12 || item.iType === 12) || commonUtils.isEmptyArr(slaveChildFilter)) { | ||
| 3361 | + window.tmpSlaveData = slaveData; | ||
| 3362 | + tableDataRow = await this.handleTableChange('slave', 'dProductQty', { dProductQty }, sId, [], true); | ||
| 3363 | + slaveData[iIndex] = tableDataRow; | ||
| 3364 | + } | ||
| 3365 | + window.tmpSlaveData = null; | ||
| 3366 | + this.props.onSaveState({ slaveData, ...addState }); | ||
| 3367 | + } else if (bHasiType && writeBackFields.includes(sFieldName)) { | ||
| 3368 | + let dQty = 0; | ||
| 3369 | + slaveChildFilter.forEach(item => { | ||
| 3370 | + const dataRow = item.sId === tableDataRow.sId ? tableDataRow : item; | ||
| 3371 | + dQty += commonUtils.isNull(dataRow[sFieldName], 0); | ||
| 3372 | + }); | ||
| 3373 | + this.handleTableChange('slave', sFieldName, { [sFieldName]: dQty }, sId, [], false); | ||
| 3374 | + } | ||
| 3375 | + | ||
| 3376 | + } | ||
| 3149 | // 表格行复制 | 3377 | // 表格行复制 |
| 3150 | const handleMesTableLineCopy = ({ tableName, record, index, callback }) => { | 3378 | const handleMesTableLineCopy = ({ tableName, record, index, callback }) => { |
| 3151 | const { [`${tableName}Data`]: data = [] } = state; | 3379 | const { [`${tableName}Data`]: data = [] } = state; |
| @@ -3488,7 +3716,6 @@ const useCommonBase = props => { | @@ -3488,7 +3716,6 @@ const useCommonBase = props => { | ||
| 3488 | handleOkDel(props); | 3716 | handleOkDel(props); |
| 3489 | }; | 3717 | }; |
| 3490 | const handleBtnChoose = async (name, sControlName, chooseConfig, recordIndex, tableName) => { | 3718 | const handleBtnChoose = async (name, sControlName, chooseConfig, recordIndex, tableName) => { |
| 3491 | - console.log("🚀 ~ handleBtnChoose ~ chooseConfig:", name, sControlName, chooseConfig, recordIndex, tableName) | ||
| 3492 | return | 3719 | return |
| 3493 | const { token } = props; | 3720 | const { token } = props; |
| 3494 | const url = `${commonConfig.server_host}/gdsmodule/getGdsmoduleById/${chooseConfig.sActiveId}?sModelsId=${chooseConfig.sActiveId}`; | 3721 | const url = `${commonConfig.server_host}/gdsmodule/getGdsmoduleById/${chooseConfig.sActiveId}?sModelsId=${chooseConfig.sActiveId}`; |
src/components/Common/CommonTable/index.js
| @@ -1490,7 +1490,7 @@ class CommonTableRc extends React.Component { | @@ -1490,7 +1490,7 @@ class CommonTableRc extends React.Component { | ||
| 1490 | name | 1490 | name |
| 1491 | ) /* 选择行发生改变时调用的函数 */, | 1491 | ) /* 选择行发生改变时调用的函数 */, |
| 1492 | getCheckboxProps: record => ({ | 1492 | getCheckboxProps: record => ({ |
| 1493 | - disabled: !!record.checkboxDisabled || record.bDisplayHighLight, | 1493 | + disabled: !!record?.checkboxDisabled || record?.bDisplayHighLight, |
| 1494 | style: | 1494 | style: |
| 1495 | record.bSum && commonConfig.hasSum | 1495 | record.bSum && commonConfig.hasSum |
| 1496 | ? { display: "none" } | 1496 | ? { display: "none" } |
| @@ -2184,12 +2184,12 @@ class CommonTableRc extends React.Component { | @@ -2184,12 +2184,12 @@ class CommonTableRc extends React.Component { | ||
| 2184 | if (!bEnabled) return; | 2184 | if (!bEnabled) return; |
| 2185 | 2185 | ||
| 2186 | let newValue = ""; | 2186 | let newValue = ""; |
| 2187 | - if (!value) { | 2187 | + if (!value || value === '/') { |
| 2188 | newValue = "✓"; | 2188 | newValue = "✓"; |
| 2189 | } else if (["1", "✓"].includes(value)) { | 2189 | } else if (["1", "✓"].includes(value)) { |
| 2190 | newValue = "✗"; | 2190 | newValue = "✗"; |
| 2191 | - } else { | ||
| 2192 | - newValue = "✓"; | 2191 | + } else if (["0", "✗"].includes(value)) { |
| 2192 | + newValue = "/"; | ||
| 2193 | } | 2193 | } |
| 2194 | 2194 | ||
| 2195 | const dataNew = [...this.props.data]; | 2195 | const dataNew = [...this.props.data]; |
| @@ -2260,6 +2260,22 @@ class CommonTableRc extends React.Component { | @@ -2260,6 +2260,22 @@ class CommonTableRc extends React.Component { | ||
| 2260 | ✗ | 2260 | ✗ |
| 2261 | </div> | 2261 | </div> |
| 2262 | ); | 2262 | ); |
| 2263 | + } else if (value === "3" || value === '/') { | ||
| 2264 | + return ( | ||
| 2265 | + <div | ||
| 2266 | + className={`${styles.xunjianNone} ${false ? styles.xunjianEnabled : "" | ||
| 2267 | + }`} | ||
| 2268 | + onClick={xunjianClick.bind(this, { | ||
| 2269 | + bEnabled, | ||
| 2270 | + value, | ||
| 2271 | + record, | ||
| 2272 | + index, | ||
| 2273 | + sName: column.dataIndex | ||
| 2274 | + })} | ||
| 2275 | + > | ||
| 2276 | + / | ||
| 2277 | + </div> | ||
| 2278 | + ); | ||
| 2263 | } else { | 2279 | } else { |
| 2264 | return ( | 2280 | return ( |
| 2265 | <div | 2281 | <div |
| @@ -3347,8 +3363,8 @@ class CommonTableRc extends React.Component { | @@ -3347,8 +3363,8 @@ class CommonTableRc extends React.Component { | ||
| 3347 | } else { | 3363 | } else { |
| 3348 | components.header = { cell: ResizeableTitle }; | 3364 | components.header = { cell: ResizeableTitle }; |
| 3349 | } | 3365 | } |
| 3350 | - let bPagination = true; /* 默认表格分页 */ | ||
| 3351 | - let {mesTotalCount , mesPageSize, mesPageNum, isPagination} = this.props.tableProps || {}; | 3366 | + let bPagination = true; /* 默认表格分页s */ |
| 3367 | + let { mesTotalCount, mesPageSize, mesPageNum, isPagination } = this.props.tableProps || {}; | ||
| 3352 | 3368 | ||
| 3353 | if (commonUtils.isNotEmptyObject(this.props)) { | 3369 | if (commonUtils.isNotEmptyObject(this.props)) { |
| 3354 | bPagination = | 3370 | bPagination = |
| @@ -3373,76 +3389,76 @@ class CommonTableRc extends React.Component { | @@ -3373,76 +3389,76 @@ class CommonTableRc extends React.Component { | ||
| 3373 | // } | 3389 | // } |
| 3374 | // } | 3390 | // } |
| 3375 | 3391 | ||
| 3376 | - // if (!this.props.noVlist && !noVlistController) { | ||
| 3377 | - if (this.props.slaveInfo || this.useVListNew) { | ||
| 3378 | - if (!this.uniqueId) { | ||
| 3379 | - this.uniqueId = this.props.formId | ||
| 3380 | - ? `${this.props.formId}_${lodash.uniqueId()}` | ||
| 3381 | - : lodash.uniqueId(); | ||
| 3382 | - } | ||
| 3383 | - if (!this.Vcomponents || window.vlistNewSearh) { | ||
| 3384 | - const { tableClassName } = this.state; | ||
| 3385 | - const oTable = document.querySelectorAll(`.${tableClassName}`)[0]; | ||
| 3386 | - if (oTable) { | ||
| 3387 | - const oBody = oTable.querySelector(".ant-table-body"); | ||
| 3388 | - oBody && (oBody.scrollTop = 0); | ||
| 3389 | - } | ||
| 3390 | - window.vlistNewSearh = null; | ||
| 3391 | - this.Vcomponents = VListNew({ | ||
| 3392 | - height: this.scrollY, | ||
| 3393 | - vid: this.uniqueId, | ||
| 3394 | - onScroll: () => { | ||
| 3395 | - setTimeout(() => { | ||
| 3396 | - let divs = document.getElementsByClassName("noInputInsert"); | ||
| 3397 | - if (divs.length) { | ||
| 3398 | - Array.prototype.forEach.call(divs, item => { | ||
| 3399 | - item.parentNode.parentNode.parentNode.parentNode.classList.add( | ||
| 3400 | - "insertTd" | ||
| 3401 | - ); | ||
| 3402 | - }); | ||
| 3403 | - } | ||
| 3404 | - }, 20); | 3392 | + if (!this.props.noVlist && !noVlistController) { |
| 3393 | + if (this.props.slaveInfo || this.useVListNew) { | ||
| 3394 | + if (!this.uniqueId) { | ||
| 3395 | + this.uniqueId = this.props.formId | ||
| 3396 | + ? `${this.props.formId}_${lodash.uniqueId()}` | ||
| 3397 | + : lodash.uniqueId(); | ||
| 3398 | + } | ||
| 3399 | + if (!this.Vcomponents || window.vlistNewSearh) { | ||
| 3400 | + const { tableClassName } = this.state; | ||
| 3401 | + const oTable = document.querySelectorAll(`.${tableClassName}`)[0]; | ||
| 3402 | + if (oTable) { | ||
| 3403 | + const oBody = oTable.querySelector(".ant-table-body"); | ||
| 3404 | + oBody && (oBody.scrollTop = 0); | ||
| 3405 | } | 3405 | } |
| 3406 | - }); | ||
| 3407 | - } | ||
| 3408 | - components = { ...this.Vcomponents, ...components }; | ||
| 3409 | - } else { | ||
| 3410 | - // vid是多个列表在同个页面中,同时渲染会促发问题 | ||
| 3411 | - // vid不可以为随机数,随机数会导致双击时,点击的两个VList id不同 | ||
| 3412 | - if (!this.uniqueId) { | ||
| 3413 | - this.uniqueId = this.props.formId | ||
| 3414 | - ? `${this.props.formId}_${lodash.uniqueId()}` | ||
| 3415 | - : lodash.uniqueId(); | ||
| 3416 | - } | ||
| 3417 | - if (!this.Vcomponents1 || window.vlistNewSearh) { | ||
| 3418 | - const { tableClassName } = this.state; | ||
| 3419 | - const oTable = document.querySelectorAll(`.${tableClassName}`)[0]; | ||
| 3420 | - if (oTable) { | ||
| 3421 | - const oBody = oTable.querySelector(".ant-table-body"); | ||
| 3422 | - oBody && (oBody.scrollTop = 0); | ||
| 3423 | - } | ||
| 3424 | - window.vlistNewSearh = null; | ||
| 3425 | - this.Vcomponents1 = VList({ | ||
| 3426 | - height: this.scrollY, | ||
| 3427 | - vid: this.uniqueId, | ||
| 3428 | - rowKey: this.rowKey, | ||
| 3429 | - onScroll: () => { | ||
| 3430 | - setTimeout(() => { | ||
| 3431 | - let divs = document.getElementsByClassName("noInputInsert"); | ||
| 3432 | - if (divs.length) { | ||
| 3433 | - Array.prototype.forEach.call(divs, item => { | ||
| 3434 | - item.parentNode.parentNode.parentNode.parentNode.classList.add( | ||
| 3435 | - "insertTd" | ||
| 3436 | - ); | ||
| 3437 | - }); | ||
| 3438 | - } | ||
| 3439 | - }, 20); | 3406 | + window.vlistNewSearh = null; |
| 3407 | + this.Vcomponents = VListNew({ | ||
| 3408 | + height: this.scrollY, | ||
| 3409 | + vid: this.uniqueId, | ||
| 3410 | + onScroll: () => { | ||
| 3411 | + setTimeout(() => { | ||
| 3412 | + let divs = document.getElementsByClassName("noInputInsert"); | ||
| 3413 | + if (divs.length) { | ||
| 3414 | + Array.prototype.forEach.call(divs, item => { | ||
| 3415 | + item.parentNode.parentNode.parentNode.parentNode.classList.add( | ||
| 3416 | + "insertTd" | ||
| 3417 | + ); | ||
| 3418 | + }); | ||
| 3419 | + } | ||
| 3420 | + }, 20); | ||
| 3421 | + } | ||
| 3422 | + }); | ||
| 3423 | + } | ||
| 3424 | + components = { ...this.Vcomponents, ...components }; | ||
| 3425 | + } else { | ||
| 3426 | + // vid是多个列表在同个页面中,同时渲染会促发问题 | ||
| 3427 | + // vid不可以为随机数,随机数会导致双击时,点击的两个VList id不同 | ||
| 3428 | + if (!this.uniqueId) { | ||
| 3429 | + this.uniqueId = this.props.formId | ||
| 3430 | + ? `${this.props.formId}_${lodash.uniqueId()}` | ||
| 3431 | + : lodash.uniqueId(); | ||
| 3432 | + } | ||
| 3433 | + if (!this.Vcomponents1 || window.vlistNewSearh) { | ||
| 3434 | + const { tableClassName } = this.state; | ||
| 3435 | + const oTable = document.querySelectorAll(`.${tableClassName}`)[0]; | ||
| 3436 | + if (oTable) { | ||
| 3437 | + const oBody = oTable.querySelector(".ant-table-body"); | ||
| 3438 | + oBody && (oBody.scrollTop = 0); | ||
| 3440 | } | 3439 | } |
| 3441 | - }); | 3440 | + window.vlistNewSearh = null; |
| 3441 | + this.Vcomponents1 = VList({ | ||
| 3442 | + height: this.scrollY, | ||
| 3443 | + vid: this.uniqueId, | ||
| 3444 | + rowKey: this.rowKey, | ||
| 3445 | + onScroll: () => { | ||
| 3446 | + setTimeout(() => { | ||
| 3447 | + let divs = document.getElementsByClassName("noInputInsert"); | ||
| 3448 | + if (divs.length) { | ||
| 3449 | + Array.prototype.forEach.call(divs, item => { | ||
| 3450 | + item.parentNode.parentNode.parentNode.parentNode.classList.add( | ||
| 3451 | + "insertTd" | ||
| 3452 | + ); | ||
| 3453 | + }); | ||
| 3454 | + } | ||
| 3455 | + }, 20); | ||
| 3456 | + } | ||
| 3457 | + }); | ||
| 3458 | + } | ||
| 3459 | + components = { ...this.Vcomponents1, ...components }; | ||
| 3442 | } | 3460 | } |
| 3443 | - components = { ...this.Vcomponents1, ...components }; | ||
| 3444 | } | 3461 | } |
| 3445 | - // } | ||
| 3446 | if (this.props.config && this.props.config.iFreezeColumn) { | 3462 | if (this.props.config && this.props.config.iFreezeColumn) { |
| 3447 | tableColumn.forEach((val, index) => { | 3463 | tableColumn.forEach((val, index) => { |
| 3448 | if (tableColumn[index].fixedHelp) { | 3464 | if (tableColumn[index].fixedHelp) { |
| @@ -7747,6 +7763,7 @@ class CommonTableRc extends React.Component { | @@ -7747,6 +7763,7 @@ class CommonTableRc extends React.Component { | ||
| 7747 | } | 7763 | } |
| 7748 | const cells = []; | 7764 | const cells = []; |
| 7749 | const cells1 = []; | 7765 | const cells1 = []; |
| 7766 | + | ||
| 7750 | if (totalData.length) { | 7767 | if (totalData.length) { |
| 7751 | let summaryCellTotal = ""; | 7768 | let summaryCellTotal = ""; |
| 7752 | summaryCellTotal = ( | 7769 | summaryCellTotal = ( |
| @@ -9904,7 +9921,7 @@ class CommonTableRc extends React.Component { | @@ -9904,7 +9921,7 @@ class CommonTableRc extends React.Component { | ||
| 9904 | if (searchText !== props.searchText) { | 9921 | if (searchText !== props.searchText) { |
| 9905 | stateValue.searchText = props.searchText; | 9922 | stateValue.searchText = props.searchText; |
| 9906 | } | 9923 | } |
| 9907 | - if (props.enabled) { | 9924 | + if (true || props.enabled) { |
| 9908 | const { config } = this.props; | 9925 | const { config } = this.props; |
| 9909 | if (commonUtils.isNotEmptyObject(config)) { | 9926 | if (commonUtils.isNotEmptyObject(config)) { |
| 9910 | const productionRoute = | 9927 | const productionRoute = |
| @@ -11147,13 +11164,33 @@ class CommonTableRc extends React.Component { | @@ -11147,13 +11164,33 @@ class CommonTableRc extends React.Component { | ||
| 11147 | this.setState({ affixMenuVisible: false }); | 11164 | this.setState({ affixMenuVisible: false }); |
| 11148 | } | 11165 | } |
| 11149 | }; | 11166 | }; |
| 11150 | - let { mesTotalCount , mesPageSize, mesPageNum, isPagination} = this.props.tableProps || {}; | 11167 | + let { mesTotalCount, mesPageSize, mesPageNum, isPagination } = this.props.tableProps || {}; |
| 11151 | const handleMesPaginationChange = (page, pageSize) => { | 11168 | const handleMesPaginationChange = (page, pageSize) => { |
| 11152 | - this.props.onSaveState({ | ||
| 11153 | - mesPageNum: page, | ||
| 11154 | - mesPageSize: pageSize, | ||
| 11155 | - mesPageChange: true | ||
| 11156 | - }); | 11169 | + this.props.onSaveState({ |
| 11170 | + mesPageNum: page, | ||
| 11171 | + mesPageSize: pageSize, | ||
| 11172 | + mesPageChange: true | ||
| 11173 | + }); | ||
| 11174 | + } | ||
| 11175 | + | ||
| 11176 | + if (this.props?.name === 'slaveChild') { | ||
| 11177 | + tableProps.dataSource = tableProps.dataSource | ||
| 11178 | + .map(item => { | ||
| 11179 | + const { slaveSelectedRowKeys, slaveData } = this.props?.parentProps; | ||
| 11180 | + | ||
| 11181 | + if (commonUtils.isEmptyArr(slaveSelectedRowKeys)) { | ||
| 11182 | + return null; | ||
| 11183 | + } | ||
| 11184 | + | ||
| 11185 | + let iIndex = slaveData.findIndex(slaveItem => | ||
| 11186 | + slaveSelectedRowKeys.includes(slaveItem.sId) && | ||
| 11187 | + slaveItem.sSqlConditionId === item?.sSqlConditionId | ||
| 11188 | + ); | ||
| 11189 | + | ||
| 11190 | + return iIndex > -1 ? item : null; | ||
| 11191 | + }) | ||
| 11192 | + .filter(item => item !== null); // 过滤掉 null/undefined | ||
| 11193 | + | ||
| 11157 | } | 11194 | } |
| 11158 | 11195 | ||
| 11159 | return ( | 11196 | return ( |
| @@ -11253,33 +11290,33 @@ class CommonTableRc extends React.Component { | @@ -11253,33 +11290,33 @@ class CommonTableRc extends React.Component { | ||
| 11253 | /> | 11290 | /> |
| 11254 | </DndProvider> | 11291 | </DndProvider> |
| 11255 | ) : ( | 11292 | ) : ( |
| 11256 | - <div style={{position: 'relative', width: '100%', height: '100%'}}> | 11293 | + <div style={{ position: 'relative', width: '100%', height: '100%' }}> |
| 11257 | <Table | 11294 | <Table |
| 11258 | - {...tableProps} | ||
| 11259 | - addRow={addProps} | ||
| 11260 | - delProps={delProps} | ||
| 11261 | - tableLayout="fixed" | ||
| 11262 | - expandable={{ | ||
| 11263 | - expandedRowRender: | ||
| 11264 | - this.props.setExpandedRowRender === "Y" ? expandedRow : null, | ||
| 11265 | - defaultExpandAllRows: this.props.defaultExpandAllRows || null | ||
| 11266 | - }} | ||
| 11267 | - scroll={{ | ||
| 11268 | - x: this.scrollX, | ||
| 11269 | - y: !layoutScrollY ? this.scrollY : layoutScrollY | ||
| 11270 | - }} | ||
| 11271 | - summary={this.genFooter} | ||
| 11272 | - size="small" | ||
| 11273 | - sticky={this.sticky} | ||
| 11274 | - showSorterTooltip={false} | ||
| 11275 | - > | 11295 | + {...tableProps} |
| 11296 | + addRow={addProps} | ||
| 11297 | + delProps={delProps} | ||
| 11298 | + tableLayout="fixed" | ||
| 11299 | + expandable={{ | ||
| 11300 | + expandedRowRender: | ||
| 11301 | + this.props.setExpandedRowRender === "Y" ? expandedRow : null, | ||
| 11302 | + defaultExpandAllRows: this.props.defaultExpandAllRows || null | ||
| 11303 | + }} | ||
| 11304 | + scroll={{ | ||
| 11305 | + x: this.scrollX, | ||
| 11306 | + y: !layoutScrollY ? this.scrollY : layoutScrollY | ||
| 11307 | + }} | ||
| 11308 | + summary={this.genFooter} | ||
| 11309 | + size="small" | ||
| 11310 | + sticky={this.sticky} | ||
| 11311 | + showSorterTooltip={false} | ||
| 11312 | + > | ||
| 11276 | 11313 | ||
| 11277 | - </Table> | ||
| 11278 | - <div style={{textAlign: 'center', position: 'absolute', bottom: '50px', left: '50%', transform: 'translateX(-50%)', fontSize:'30px'}} > | ||
| 11279 | - { | ||
| 11280 | - isPagination && <Pagination size="default " simple defaultCurrent={mesPageNum} total={mesTotalCount} onChange={handleMesPaginationChange} /> | ||
| 11281 | - } | ||
| 11282 | - </div> | 11314 | + </Table> |
| 11315 | + <div style={{ textAlign: 'center', position: 'absolute', bottom: '50px', left: '50%', transform: 'translateX(-50%)', fontSize: '30px' }} > | ||
| 11316 | + { | ||
| 11317 | + isPagination && <Pagination size="default " simple defaultCurrent={mesPageNum} total={mesTotalCount} onChange={handleMesPaginationChange} /> | ||
| 11318 | + } | ||
| 11319 | + </div> | ||
| 11283 | </div> | 11320 | </div> |
| 11284 | )} | 11321 | )} |
| 11285 | </div> | 11322 | </div> |
| @@ -11820,7 +11857,7 @@ const useCommonTableEvent = props => { | @@ -11820,7 +11857,7 @@ const useCommonTableEvent = props => { | ||
| 11820 | // if (data?.length === 0) { | 11857 | // if (data?.length === 0) { |
| 11821 | // data.push({ sId: commonUtils.createSid() }); | 11858 | // data.push({ sId: commonUtils.createSid() }); |
| 11822 | // } | 11859 | // } |
| 11823 | - handleSetIRowNum(data); | 11860 | + handleSetIRowNum(data, props); |
| 11824 | handleSetCheckboxDisabled({ ...props, getBtnDisabled }); // 限制多选框选择 | 11861 | handleSetCheckboxDisabled({ ...props, getBtnDisabled }); // 限制多选框选择 |
| 11825 | handleSetCostomEnabledList({ ...props, allTableSelectedOneData }, data); | 11862 | handleSetCostomEnabledList({ ...props, allTableSelectedOneData }, data); |
| 11826 | setUpdateRowNumTime(pre => pre + 1); | 11863 | setUpdateRowNumTime(pre => pre + 1); |
| @@ -12146,9 +12183,10 @@ const CommonTable = baseProps => { | @@ -12146,9 +12183,10 @@ const CommonTable = baseProps => { | ||
| 12146 | return <CommonTableRc {...props} />; | 12183 | return <CommonTableRc {...props} />; |
| 12147 | }; | 12184 | }; |
| 12148 | 12185 | ||
| 12149 | -const handleSetIRowNum = data => { | 12186 | +const handleSetIRowNum = (data, props) => { |
| 12150 | data.forEach((item, index) => { | 12187 | data.forEach((item, index) => { |
| 12151 | item.iRowNum = index + 1; | 12188 | item.iRowNum = index + 1; |
| 12189 | + | ||
| 12152 | if (commonUtils.isNotEmptyArr(item.children)) { | 12190 | if (commonUtils.isNotEmptyArr(item.children)) { |
| 12153 | handleSetIRowNum(item.children); | 12191 | handleSetIRowNum(item.children); |
| 12154 | } | 12192 | } |
| @@ -12288,7 +12326,7 @@ const useGetTableBtnOprSetting = props => { | @@ -12288,7 +12326,7 @@ const useGetTableBtnOprSetting = props => { | ||
| 12288 | }; | 12326 | }; |
| 12289 | if (sDefault === '') { | 12327 | if (sDefault === '') { |
| 12290 | // sDefault = | 12328 | // sDefault = |
| 12291 | - const btnList = gdsconfigformslave.filter(item => item.bVisible && item.sControlName.includes('Btn')) | 12329 | + const btnList = gdsconfigformslave.filter(item => item.bVisible && item.sControlName.includes('Btn') && !item.sControlName.includes('BtnLeft')) |
| 12292 | sDefault = btnList?.map(item => { | 12330 | sDefault = btnList?.map(item => { |
| 12293 | return getButtonName(item.sControlName.toLowerCase()) | 12331 | return getButtonName(item.sControlName.toLowerCase()) |
| 12294 | }).join(',') | 12332 | }).join(',') |
| @@ -12372,7 +12410,8 @@ const useGetTableBtnOprSetting = props => { | @@ -12372,7 +12410,8 @@ const useGetTableBtnOprSetting = props => { | ||
| 12372 | callback: props.bAddFirst | 12410 | callback: props.bAddFirst |
| 12373 | ? scrollToTop(params.tableClassName) | 12411 | ? scrollToTop(params.tableClassName) |
| 12374 | : scrollToBottom(params.tableClassName), | 12412 | : scrollToBottom(params.tableClassName), |
| 12375 | - bAddFirst: props.bAddFirst | 12413 | + bAddFirst: props.bAddFirst, |
| 12414 | + slaveChild: props?.parentProps?.slaveChild | ||
| 12376 | }); | 12415 | }); |
| 12377 | } | 12416 | } |
| 12378 | 12417 |
src/components/Common/CommonTable/index.less
| @@ -673,6 +673,15 @@ button.mesSave { | @@ -673,6 +673,15 @@ button.mesSave { | ||
| 673 | cursor: default; | 673 | cursor: default; |
| 674 | user-select: none | 674 | user-select: none |
| 675 | } | 675 | } |
| 676 | +.xunjianNone{ | ||
| 677 | + .flex(center, center); | ||
| 678 | + .size(); | ||
| 679 | + color: #efb700; | ||
| 680 | + font-size: 24px; | ||
| 681 | + cursor: default; | ||
| 682 | + user-select: none | ||
| 683 | + | ||
| 684 | +} | ||
| 676 | 685 | ||
| 677 | .xunjianEnabled { | 686 | .xunjianEnabled { |
| 678 | text-decoration: underline; | 687 | text-decoration: underline; |
| @@ -766,5 +775,5 @@ button.mesSave { | @@ -766,5 +775,5 @@ button.mesSave { | ||
| 766 | .btnIcon { | 775 | .btnIcon { |
| 767 | width: 24px; | 776 | width: 24px; |
| 768 | height: 24px; | 777 | height: 24px; |
| 769 | - | ||
| 770 | -} | ||
| 771 | \ No newline at end of file | 778 | \ No newline at end of file |
| 779 | + | ||
| 780 | +} |
src/components/Common/CommonViewTable/index.js
| @@ -308,7 +308,7 @@ class CommonViewTableRc extends Component { | @@ -308,7 +308,7 @@ class CommonViewTableRc extends Component { | ||
| 308 | }, | 308 | }, |
| 309 | wrapperCol: { span: this.props?.sModelsId !== "17086722220003015078585693314000" ? 17 : 8, } | 309 | wrapperCol: { span: this.props?.sModelsId !== "17086722220003015078585693314000" ? 17 : 8, } |
| 310 | }; | 310 | }; |
| 311 | - | 311 | + |
| 312 | /* 字段弹窗功能 */ | 312 | /* 字段弹窗功能 */ |
| 313 | let commonFieldPopupProps = {}; | 313 | let commonFieldPopupProps = {}; |
| 314 | let commonFieldPopupTitle = "选择弹窗"; | 314 | let commonFieldPopupTitle = "选择弹窗"; |
src/indexNew.less
| @@ -117,6 +117,12 @@ | @@ -117,6 +117,12 @@ | ||
| 117 | flex-flow: row nowrap; | 117 | flex-flow: row nowrap; |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | + .memoInfoTitle{ | ||
| 121 | + .ant-form-item-label:not(.skipFlexBasis) { | ||
| 122 | + height: auto !important; // 干掉固定40px,由父flex拉伸高度 | ||
| 123 | + } | ||
| 124 | + } | ||
| 125 | + | ||
| 120 | .ant-form-item-label:not(.skipFlexBasis) { | 126 | .ant-form-item-label:not(.skipFlexBasis) { |
| 121 | background-color: var(--form-label-bgColor, #EEEEEE) !important; | 127 | background-color: var(--form-label-bgColor, #EEEEEE) !important; |
| 122 | // flex-basis: 160px !important; | 128 | // flex-basis: 160px !important; |
src/mes/common/commonModalComponent/index.js
| @@ -6,7 +6,7 @@ import RouterComponent from "@/routes/mes/routerComponent"; | @@ -6,7 +6,7 @@ import RouterComponent from "@/routes/mes/routerComponent"; | ||
| 6 | import * as commonUtils from "@/utils/utils"; | 6 | import * as commonUtils from "@/utils/utils"; |
| 7 | 7 | ||
| 8 | const CommonModalComponent = props => { | 8 | const CommonModalComponent = props => { |
| 9 | - const bSmall = props?.sModelsId ==='17211911815017669983448000'; | 9 | + const bSmall = props?.sModelsId ==='17211911815017669983448000' || props?.sModelsId === '172117190122117805553443590'; |
| 10 | const { | 10 | const { |
| 11 | visible, | 11 | visible, |
| 12 | title, | 12 | title, |
src/mes/common/commonModelComponent/index.js
| @@ -256,6 +256,7 @@ const useCommonModelEvent = props => { | @@ -256,6 +256,7 @@ const useCommonModelEvent = props => { | ||
| 256 | }; | 256 | }; |
| 257 | 257 | ||
| 258 | const [refreshCount, setRefreshCount] = useState(0); | 258 | const [refreshCount, setRefreshCount] = useState(0); |
| 259 | + const [copyToInitialized, setCopyToInitialized] = useState(false); | ||
| 259 | const sModelType = | 260 | const sModelType = |
| 260 | Array.isArray(formData) && formData.length > 0 | 261 | Array.isArray(formData) && formData.length > 0 |
| 261 | ? (formData[0]?.sName || formData[0]?.sModelType || '') | 262 | ? (formData[0]?.sName || formData[0]?.sModelType || '') |
| @@ -264,7 +265,6 @@ const useCommonModelEvent = props => { | @@ -264,7 +265,6 @@ const useCommonModelEvent = props => { | ||
| 264 | // 初始化事件 | 265 | // 初始化事件 |
| 265 | useEffect( | 266 | useEffect( |
| 266 | async () => { | 267 | async () => { |
| 267 | - | ||
| 268 | if (commonUtils.isNotEmptyArr(formData)) { | 268 | if (commonUtils.isNotEmptyArr(formData)) { |
| 269 | let pageLayout = []; | 269 | let pageLayout = []; |
| 270 | let addState = {}; | 270 | let addState = {}; |
| @@ -285,10 +285,10 @@ const useCommonModelEvent = props => { | @@ -285,10 +285,10 @@ const useCommonModelEvent = props => { | ||
| 285 | const [tableList, tabConfig] = pageLayout; | 285 | const [tableList, tabConfig] = pageLayout; |
| 286 | const colunmData = handleGetColumnData(tableList, true); | 286 | const colunmData = handleGetColumnData(tableList, true); |
| 287 | let result = {}; | 287 | let result = {}; |
| 288 | - if(!noGetData && sModelsId === '17211911815017669983448000'){ | 288 | + if (!noGetData && sModelsId === '17211911815017669983448000') { |
| 289 | result = await handleGetDataPop(tableList, true, true) | 289 | result = await handleGetDataPop(tableList, true, true) |
| 290 | } else if (!commonUtils.isEmptyObject(copyTo)) { | 290 | } else if (!commonUtils.isEmptyObject(copyTo)) { |
| 291 | - result = await handleGetData(tableList, true, true); | 291 | + result = await handleGetData(tableList, true, true, copyTo); |
| 292 | } else if (noGetData) { | 292 | } else if (noGetData) { |
| 293 | result = await handleGetData( | 293 | result = await handleGetData( |
| 294 | tableList.filter( | 294 | tableList.filter( |
| @@ -413,7 +413,7 @@ const useCommonModelEvent = props => { | @@ -413,7 +413,7 @@ const useCommonModelEvent = props => { | ||
| 413 | 413 | ||
| 414 | const { masterConfig, sModelsId, masterData } = props; | 414 | const { masterConfig, sModelsId, masterData } = props; |
| 415 | const { btnConfig = {}, copyToConfig = [], record = {} } = props?.parentProps || {} | 415 | const { btnConfig = {}, copyToConfig = [], record = {} } = props?.parentProps || {} |
| 416 | - if (masterData && masterData.sBillNo) return | 416 | + if (masterData && masterData.sBillNo || masterData && masterData.sId) return |
| 417 | let masterDataCopyTo = {}; | 417 | let masterDataCopyTo = {}; |
| 418 | for (const key in copyTo) { | 418 | for (const key in copyTo) { |
| 419 | const tableData = copyTo[key]; | 419 | const tableData = copyTo[key]; |
| @@ -542,7 +542,6 @@ const useCommonModelEvent = props => { | @@ -542,7 +542,6 @@ const useCommonModelEvent = props => { | ||
| 542 | } | 542 | } |
| 543 | }; | 543 | }; |
| 544 | const handleGetDataPop = async (tableList = [], isWait, bInit) => { | 544 | const handleGetDataPop = async (tableList = [], isWait, bInit) => { |
| 545 | - console.log('handleGetData开始执行,tableList:', tableList); | ||
| 546 | let addState = {}; | 545 | let addState = {}; |
| 547 | for (let i = 0; i < tableList.length; i++) { | 546 | for (let i = 0; i < tableList.length; i++) { |
| 548 | const tableName = tableList[i]; | 547 | const tableName = tableList[i]; |
| @@ -682,7 +681,7 @@ const useCommonModelEvent = props => { | @@ -682,7 +681,7 @@ const useCommonModelEvent = props => { | ||
| 682 | configData: config, | 681 | configData: config, |
| 683 | condition: { | 682 | condition: { |
| 684 | sSqlCondition: { ...conditonValues, ...sFilterConditions }, | 683 | sSqlCondition: { ...conditonValues, ...sFilterConditions }, |
| 685 | - bFilter | 684 | + bFilter, |
| 686 | }, | 685 | }, |
| 687 | isWait: true | 686 | isWait: true |
| 688 | }) || Promise.resolve({}); | 687 | }) || Promise.resolve({}); |
| @@ -752,7 +751,6 @@ const useCommonModelEvent = props => { | @@ -752,7 +751,6 @@ const useCommonModelEvent = props => { | ||
| 752 | item => item.sControlName === "bFirstlineSelected" && item.bVisible | 751 | item => item.sControlName === "bFirstlineSelected" && item.bVisible |
| 753 | ); | 752 | ); |
| 754 | // 配置刷新数据时,配置 数据集名称+FirstlineSelected,默认选中首行数据。 | 753 | // 配置刷新数据时,配置 数据集名称+FirstlineSelected,默认选中首行数据。 |
| 755 | - console.log('bFirstlineSelected', bFirstlineSelected); | ||
| 756 | if (!bFirstlineSelected) { | 754 | if (!bFirstlineSelected) { |
| 757 | bFirstlineSelected = | 755 | bFirstlineSelected = |
| 758 | tableList.findIndex( | 756 | tableList.findIndex( |
| @@ -785,10 +783,11 @@ const useCommonModelEvent = props => { | @@ -785,10 +783,11 @@ const useCommonModelEvent = props => { | ||
| 785 | }; | 783 | }; |
| 786 | 784 | ||
| 787 | // 获取数据集 | 785 | // 获取数据集 |
| 788 | - const handleGetData = async (tableList = [], isWait, bInit) => { | 786 | + const handleGetData = async (tableList = [], isWait, bInit, copyTo) => { |
| 789 | let addState = {}; | 787 | let addState = {}; |
| 790 | const { currentId } = props | 788 | const { currentId } = props |
| 791 | - const currentIds = currentId ? currentId : props?.parentProps?.record?.sId | 789 | + const currentIds = currentId || props?.parentProps?.record?.sId; |
| 790 | + | ||
| 792 | for (let i = 0; i < tableList.length; i++) { | 791 | for (let i = 0; i < tableList.length; i++) { |
| 793 | const tableName = tableList[i]; | 792 | const tableName = tableList[i]; |
| 794 | const config = formData.find(item => item.sGrd === tableName); | 793 | const config = formData.find(item => item.sGrd === tableName); |
| @@ -902,6 +901,7 @@ const useCommonModelEvent = props => { | @@ -902,6 +901,7 @@ const useCommonModelEvent = props => { | ||
| 902 | } | 901 | } |
| 903 | 902 | ||
| 904 | const masterState = {}; | 903 | const masterState = {}; |
| 904 | + | ||
| 905 | if (currentIds && tableName === 'master') { | 905 | if (currentIds && tableName === 'master') { |
| 906 | masterState.sId = currentIds; | 906 | masterState.sId = currentIds; |
| 907 | } | 907 | } |
| @@ -915,14 +915,14 @@ const useCommonModelEvent = props => { | @@ -915,14 +915,14 @@ const useCommonModelEvent = props => { | ||
| 915 | isPagination = true | 915 | isPagination = true |
| 916 | 916 | ||
| 917 | } | 917 | } |
| 918 | + const sSqlCondition = { ...sFilterConditions, ...conditonValues, } | ||
| 918 | const result = | 919 | const result = |
| 919 | (await props.onGetDataSet({ | 920 | (await props.onGetDataSet({ |
| 920 | name: tableName, | 921 | name: tableName, |
| 921 | configData: config, | 922 | configData: config, |
| 922 | condition: { | 923 | condition: { |
| 923 | ...masterState, | 924 | ...masterState, |
| 924 | - // sId: currentIds, | ||
| 925 | - sSqlCondition: { ...conditonValues, ...sFilterConditions, }, | 925 | + sSqlCondition, |
| 926 | bFilter, | 926 | bFilter, |
| 927 | pageNum: isPagination ? props?.mesPageNum || 1 : undefined, | 927 | pageNum: isPagination ? props?.mesPageNum || 1 : undefined, |
| 928 | pageSize: isPagination ? props?.mesPageSize || 10 : undefined, | 928 | pageSize: isPagination ? props?.mesPageSize || 10 : undefined, |
| @@ -983,9 +983,23 @@ const useCommonModelEvent = props => { | @@ -983,9 +983,23 @@ const useCommonModelEvent = props => { | ||
| 983 | if (tableName === "tableS0" && props.sSReserve1) { | 983 | if (tableName === "tableS0" && props.sSReserve1) { |
| 984 | addState.sSReserve1 = undefined; | 984 | addState.sSReserve1 = undefined; |
| 985 | } | 985 | } |
| 986 | + | ||
| 987 | + } | ||
| 988 | + | ||
| 989 | + // 只有弹窗首次打开时才执行 copyTo 数据回填,防止后续刷新覆盖当前数据 | ||
| 990 | + if (!copyToInitialized && !commonUtils.isEmptyObject(copyTo) && copyTo?.isTmpinfobysql) { | ||
| 991 | + tableList.forEach((item, index) => { | ||
| 992 | + addState = { | ||
| 993 | + ...addState, | ||
| 994 | + enabled: true, | ||
| 995 | + [`${tableList[index]}Data`]: index === 0 ? copyTo.masterData : copyTo['slave' + (index - 1 === 0 ? '' : index - 1) + 'Data'], | ||
| 996 | + } | ||
| 997 | + }) | ||
| 998 | + setCopyToInitialized(true); | ||
| 986 | } | 999 | } |
| 987 | 1000 | ||
| 988 | props.setTempRef({}, true); | 1001 | props.setTempRef({}, true); |
| 1002 | + | ||
| 989 | if (isWait) { | 1003 | if (isWait) { |
| 990 | return addState; | 1004 | return addState; |
| 991 | } else { | 1005 | } else { |
| @@ -1894,9 +1908,10 @@ const CommonModel = baseProps => { | @@ -1894,9 +1908,10 @@ const CommonModel = baseProps => { | ||
| 1894 | }; | 1908 | }; |
| 1895 | 1909 | ||
| 1896 | const CommonModelComponent = props => { | 1910 | const CommonModelComponent = props => { |
| 1897 | - const { tabConfig = [], level, modelStyle, app, bMesBill, enabled, masterData, sModelsType } = props; | 1911 | + const { tabConfig = [], level, modelStyle, app, bMesBill, bMesSubBill, enabled, masterData, sModelsType, formData } = props; |
| 1898 | const { userinfo } = app; | 1912 | const { userinfo } = app; |
| 1899 | const sLanguage = userinfo.sLanguage; | 1913 | const sLanguage = userinfo.sLanguage; |
| 1914 | + const pageRoute = formData?.[0]?.sName | ||
| 1900 | const getComponent = (config, index = 0) => { | 1915 | const getComponent = (config, index = 0) => { |
| 1901 | const { | 1916 | const { |
| 1902 | sName, | 1917 | sName, |
| @@ -1905,7 +1920,8 @@ const CommonModelComponent = props => { | @@ -1905,7 +1920,8 @@ const CommonModelComponent = props => { | ||
| 1905 | defaultEnabled, | 1920 | defaultEnabled, |
| 1906 | bHideTitle, | 1921 | bHideTitle, |
| 1907 | tableBtnsConfig, | 1922 | tableBtnsConfig, |
| 1908 | - children = [] | 1923 | + children = [], |
| 1924 | + slaveChild | ||
| 1909 | } = config; | 1925 | } = config; |
| 1910 | 1926 | ||
| 1911 | if (showType === "none") { | 1927 | if (showType === "none") { |
| @@ -1928,6 +1944,31 @@ const CommonModelComponent = props => { | @@ -1928,6 +1944,31 @@ const CommonModelComponent = props => { | ||
| 1928 | } else if (showType === "costom") { | 1944 | } else if (showType === "costom") { |
| 1929 | return <RouterComponent {...props} sModelType={sName} />; | 1945 | return <RouterComponent {...props} sModelType={sName} />; |
| 1930 | } else { | 1946 | } else { |
| 1947 | + if (pageRoute.includes('commonSubBill')) { | ||
| 1948 | + let componentProps = { | ||
| 1949 | + ...props, | ||
| 1950 | + showType, // 展示类型(表单/表格) | ||
| 1951 | + enabled: !bMesSubBill ? defaultEnabled : enabled, // 是否可编辑 | ||
| 1952 | + sTabName, // 标题名称 | ||
| 1953 | + sName: slaveChild ? 'slaveChild' : sName, // 配置对应的sGrd | ||
| 1954 | + bHideTitle, //隐藏标题 | ||
| 1955 | + tableBtnsConfig, // 表格按钮配置 | ||
| 1956 | + bFirstComponent: level === 0 && index === -1, | ||
| 1957 | + slaveChild | ||
| 1958 | + }; | ||
| 1959 | + | ||
| 1960 | + const commonDivHeight = useComputedCommonDivHeight(componentProps); | ||
| 1961 | + return ( | ||
| 1962 | + <div | ||
| 1963 | + className="commonDiv" | ||
| 1964 | + style={{ height: commonDivHeight }} | ||
| 1965 | + key={sName} | ||
| 1966 | + > | ||
| 1967 | + <CommonViewTableComponent {...componentProps} /> | ||
| 1968 | + <CommonTableComponent {...componentProps} /> | ||
| 1969 | + </div> | ||
| 1970 | + ); | ||
| 1971 | + } | ||
| 1931 | let componentProps = { | 1972 | let componentProps = { |
| 1932 | ...props, | 1973 | ...props, |
| 1933 | showType, // 展示类型(表单/表格) | 1974 | showType, // 展示类型(表单/表格) |
| @@ -1938,6 +1979,7 @@ const CommonModelComponent = props => { | @@ -1938,6 +1979,7 @@ const CommonModelComponent = props => { | ||
| 1938 | tableBtnsConfig, // 表格按钮配置 | 1979 | tableBtnsConfig, // 表格按钮配置 |
| 1939 | bFirstComponent: level === 0 && index === -1 | 1980 | bFirstComponent: level === 0 && index === -1 |
| 1940 | }; | 1981 | }; |
| 1982 | + | ||
| 1941 | const commonDivHeight = useComputedCommonDivHeight(componentProps); | 1983 | const commonDivHeight = useComputedCommonDivHeight(componentProps); |
| 1942 | return ( | 1984 | return ( |
| 1943 | <div | 1985 | <div |
| @@ -1958,9 +2000,9 @@ const CommonModelComponent = props => { | @@ -1958,9 +2000,9 @@ const CommonModelComponent = props => { | ||
| 1958 | extraStyle.flexDirection = 'column'; | 2000 | extraStyle.flexDirection = 'column'; |
| 1959 | extraStyle.paddingTop = 5; | 2001 | extraStyle.paddingTop = 5; |
| 1960 | } | 2002 | } |
| 1961 | - const { sModelsId } = props; | 2003 | + const { sModelsId, slaveChildConfig } = props; |
| 1962 | const isNotTab = sModelsId === '12710101117119423319470' | 2004 | const isNotTab = sModelsId === '12710101117119423319470' |
| 1963 | - | 2005 | + const subHeight = slaveChildConfig ? '' : '100%' |
| 1964 | return ( | 2006 | return ( |
| 1965 | <> | 2007 | <> |
| 1966 | <div className={styles.commonModel} style={{ ...modelStyle, ...extraStyle }}> | 2008 | <div className={styles.commonModel} style={{ ...modelStyle, ...extraStyle }}> |
| @@ -1972,7 +2014,7 @@ const CommonModelComponent = props => { | @@ -1972,7 +2014,7 @@ const CommonModelComponent = props => { | ||
| 1972 | sBig5EntireTabName, | 2014 | sBig5EntireTabName, |
| 1973 | mode, | 2015 | mode, |
| 1974 | width = "100%", | 2016 | width = "100%", |
| 1975 | - height = "100%" | 2017 | + height = subHeight |
| 1976 | } = item; | 2018 | } = item; |
| 1977 | const sEntireTabNameNew = sLanguage === 'sEnglish' ? sEnglishEntireTabName : | 2019 | const sEntireTabNameNew = sLanguage === 'sEnglish' ? sEnglishEntireTabName : |
| 1978 | sLanguage === 'sBig5EntireTabName' ? sBig5EntireTabName : sEntireTabName; | 2020 | sLanguage === 'sBig5EntireTabName' ? sBig5EntireTabName : sEntireTabName; |
| @@ -1995,7 +2037,7 @@ const CommonModelComponent = props => { | @@ -1995,7 +2037,7 @@ const CommonModelComponent = props => { | ||
| 1995 | // advancedStyle.border = "1px solid green"; | 2037 | // advancedStyle.border = "1px solid green"; |
| 1996 | // { width: "100%", height: level === 0 ? "100%" : "auto" } | 2038 | // { width: "100%", height: level === 0 ? "100%" : "auto" } |
| 1997 | 2039 | ||
| 1998 | - if (configList.length === 1 && configList[0].showType !== "none") { | 2040 | + if (configList.length === 1 && configList[0].showType !== "none" && !configList[0].slaveChild) { |
| 1999 | if ( | 2041 | if ( |
| 2000 | [ | 2042 | [ |
| 2001 | "维修申请记录", | 2043 | "维修申请记录", |
| @@ -2016,6 +2058,7 @@ const CommonModelComponent = props => { | @@ -2016,6 +2058,7 @@ const CommonModelComponent = props => { | ||
| 2016 | ...props, | 2058 | ...props, |
| 2017 | sTabName: configList[0].sTabName | 2059 | sTabName: configList[0].sTabName |
| 2018 | }; | 2060 | }; |
| 2061 | + | ||
| 2019 | return ( | 2062 | return ( |
| 2020 | <> | 2063 | <> |
| 2021 | <EquipmentRepair {...equipmentRepairProps} /> | 2064 | <EquipmentRepair {...equipmentRepairProps} /> |
| @@ -2067,6 +2110,7 @@ const CommonModelComponent = props => { | @@ -2067,6 +2110,7 @@ const CommonModelComponent = props => { | ||
| 2067 | ) | 2110 | ) |
| 2068 | .map((config, index) => { | 2111 | .map((config, index) => { |
| 2069 | const { sName, sEnglishTabName, sBig5TabName, sTabName } = config; | 2112 | const { sName, sEnglishTabName, sBig5TabName, sTabName } = config; |
| 2113 | + | ||
| 2070 | const sTabNewName = sLanguage === 'sEnglish' ? sEnglishTabName : sLanguage === 'sBig5' ? | 2114 | const sTabNewName = sLanguage === 'sEnglish' ? sEnglishTabName : sLanguage === 'sBig5' ? |
| 2071 | sBig5TabName : sTabName; | 2115 | sBig5TabName : sTabName; |
| 2072 | let disabled = false; | 2116 | let disabled = false; |
| @@ -2094,6 +2138,7 @@ const CommonModelComponent = props => { | @@ -2094,6 +2138,7 @@ const CommonModelComponent = props => { | ||
| 2094 | props.salveWybz2Data?.[0]?.bSave === false || | 2138 | props.salveWybz2Data?.[0]?.bSave === false || |
| 2095 | props.salveWybz2Data?.[0]?.bSave === 0; | 2139 | props.salveWybz2Data?.[0]?.bSave === 0; |
| 2096 | } | 2140 | } |
| 2141 | + | ||
| 2097 | return ( | 2142 | return ( |
| 2098 | <TabPane | 2143 | <TabPane |
| 2099 | tab={sTabNewName} | 2144 | tab={sTabNewName} |
| @@ -2339,6 +2384,7 @@ const CommonViewTableComponent = props => { | @@ -2339,6 +2384,7 @@ const CommonViewTableComponent = props => { | ||
| 2339 | const { masterData, sModelsType, app } = props | 2384 | const { masterData, sModelsType, app } = props |
| 2340 | const { bCheck = false } = masterData || {} | 2385 | const { bCheck = false } = masterData || {} |
| 2341 | const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app); | 2386 | const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app); |
| 2387 | + | ||
| 2342 | return ( | 2388 | return ( |
| 2343 | <> | 2389 | <> |
| 2344 | {sName === "master" ? ( | 2390 | {sName === "master" ? ( |
| @@ -2571,40 +2617,40 @@ const CommonTableComponent = props => { | @@ -2571,40 +2617,40 @@ const CommonTableComponent = props => { | ||
| 2571 | // showSizeChanger: !isSmall, | 2617 | // showSizeChanger: !isSmall, |
| 2572 | // showQuickJumper: !isSmall, | 2618 | // showQuickJumper: !isSmall, |
| 2573 | // }; | 2619 | // }; |
| 2574 | - const { mesTotalCount , mesPageSize, mesPageNum, isPagination } = baseProps?.parentProps || {}; | ||
| 2575 | - const tableProps = { | ||
| 2576 | - ...baseProps, | ||
| 2577 | - tableBtnsConfig: btnsConfig, | ||
| 2578 | - // tableBtnsWidth: '100px', | ||
| 2579 | - // tableBtnsConfig: (params) => { | ||
| 2580 | - // console.log('=====params', params); | ||
| 2581 | - // return btnsConfig; | ||
| 2582 | - // }, | ||
| 2583 | - onTableBtnClick, | ||
| 2584 | - tableProps: { | ||
| 2585 | - onChange: () => { }, | ||
| 2586 | - rowKey: baseProps?.config?.sId === "17091154460006421964039036672000" || baseProps?.config?.sName?.includes('/indexPage/commonList') ? 'sSlaveId' : 'sId', | ||
| 2587 | - mesTotalCount, | ||
| 2588 | - mesPageSize, | ||
| 2589 | - mesPageNum, | ||
| 2590 | - isPagination, | ||
| 2591 | - // AutoTableHeight: 200 | ||
| 2592 | - }, | ||
| 2593 | - onViewClick: (tableName, sFieldName, record, index, config) => { | ||
| 2594 | - // 异常事件提报-提报信息-事件类型字段点击事件 | ||
| 2595 | - if (tableName === "slave" && sFieldName === "sClassifyName") { | ||
| 2596 | - props.onTableBtnClick({ | ||
| 2597 | - name: tableName, | ||
| 2598 | - record, | ||
| 2599 | - config | ||
| 2600 | - }); | ||
| 2601 | - } | ||
| 2602 | - }, | ||
| 2603 | - onViewChoose: (tableName, sFieldName, record, index, isColor) => { | ||
| 2604 | - handleViewChoose(tableName, sFieldName, record, index, isColor); | ||
| 2605 | - | 2620 | + const { mesTotalCount, mesPageSize, mesPageNum, isPagination } = baseProps?.parentProps || {}; |
| 2621 | + const tableProps = { | ||
| 2622 | + ...baseProps, | ||
| 2623 | + tableBtnsConfig: btnsConfig, | ||
| 2624 | + // tableBtnsWidth: '100px', | ||
| 2625 | + // tableBtnsConfig: (params) => { | ||
| 2626 | + // console.log('=====params', params); | ||
| 2627 | + // return btnsConfig; | ||
| 2628 | + // }, | ||
| 2629 | + onTableBtnClick, | ||
| 2630 | + tableProps: { | ||
| 2631 | + onChange: () => { }, | ||
| 2632 | + rowKey: baseProps?.config?.sId === "17091154460006421964039036672000" || baseProps?.config?.sName?.includes('/indexPage/commonList') ? 'sSlaveId' : 'sId', | ||
| 2633 | + mesTotalCount, | ||
| 2634 | + mesPageSize, | ||
| 2635 | + mesPageNum, | ||
| 2636 | + isPagination, | ||
| 2637 | + // AutoTableHeight: 200 | ||
| 2638 | + }, | ||
| 2639 | + onViewClick: (tableName, sFieldName, record, index, config) => { | ||
| 2640 | + // 异常事件提报-提报信息-事件类型字段点击事件 | ||
| 2641 | + if (tableName === "slave" && sFieldName === "sClassifyName") { | ||
| 2642 | + props.onTableBtnClick({ | ||
| 2643 | + name: tableName, | ||
| 2644 | + record, | ||
| 2645 | + config | ||
| 2646 | + }); | ||
| 2606 | } | 2647 | } |
| 2607 | - }; | 2648 | + }, |
| 2649 | + onViewChoose: (tableName, sFieldName, record, index, isColor) => { | ||
| 2650 | + handleViewChoose(tableName, sFieldName, record, index, isColor); | ||
| 2651 | + | ||
| 2652 | + } | ||
| 2653 | + }; | ||
| 2608 | const handleViewChoose = (tableName, sFieldName, record, index, isColor) => { | 2654 | const handleViewChoose = (tableName, sFieldName, record, index, isColor) => { |
| 2609 | if (isColor) { | 2655 | if (isColor) { |
| 2610 | const { sId } = record; /* 控制表主键 */ | 2656 | const { sId } = record; /* 控制表主键 */ |
src/mes/common/commonOperationBarComponent/MesToolbar.js
| @@ -19,7 +19,6 @@ const ToolbarFun = async (props) => { | @@ -19,7 +19,6 @@ const ToolbarFun = async (props) => { | ||
| 19 | } else if (btnName.includes('btnfooter')) { | 19 | } else if (btnName.includes('btnfooter')) { |
| 20 | return false | 20 | return false |
| 21 | } | 21 | } |
| 22 | - | ||
| 23 | // const { sControlName } = btnConfig; | 22 | // const { sControlName } = btnConfig; |
| 24 | // const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); | 23 | // const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); |
| 25 | let flag = 0; | 24 | let flag = 0; |
| @@ -326,6 +325,10 @@ const ToolbarFun = async (props) => { | @@ -326,6 +325,10 @@ const ToolbarFun = async (props) => { | ||
| 326 | handleForceComplete(props, btnName); | 325 | handleForceComplete(props, btnName); |
| 327 | } | 326 | } |
| 328 | } | 327 | } |
| 328 | + } else if (btnName.includes('tmpinfobysql')) { | ||
| 329 | + return false | ||
| 330 | + } else if (btnName && btnName.includes('btncalc')) { | ||
| 331 | + handleCalc(props, btnConfig) | ||
| 329 | } | 332 | } |
| 330 | 333 | ||
| 331 | 334 | ||
| @@ -856,7 +859,6 @@ const handleForceComplete = (props, name, createDate) => { | @@ -856,7 +859,6 @@ const handleForceComplete = (props, name, createDate) => { | ||
| 856 | } | 859 | } |
| 857 | } | 860 | } |
| 858 | } | 861 | } |
| 859 | - console.log("singleRow:", singleRow); | ||
| 860 | if (sIndex > -1) { | 862 | if (sIndex > -1) { |
| 861 | if (target === "slaveInfo") { | 863 | if (target === "slaveInfo") { |
| 862 | singleConfig = props.slaveInfoConfig.gdsconfigformslave[sIndex]; | 864 | singleConfig = props.slaveInfoConfig.gdsconfigformslave[sIndex]; |
| @@ -955,6 +957,94 @@ const handleForceComplete = (props, name, createDate) => { | @@ -955,6 +957,94 @@ const handleForceComplete = (props, name, createDate) => { | ||
| 955 | }); | 957 | }); |
| 956 | } | 958 | } |
| 957 | }; | 959 | }; |
| 960 | +// subbill | ||
| 961 | +const handleCalc = async (props, btnConfig) => { | ||
| 962 | + const { masterConfig, masterData, sModelsId, } = props; | ||
| 963 | + props.onSaveState({ pageLoading: true }); | ||
| 964 | + | ||
| 965 | + if (commonUtils.isNotEmptyObject(btnConfig)) { | ||
| 966 | + /* 组装allTableData */ | ||
| 967 | + const allTableMap = {}; | ||
| 968 | + const allReturnMap = {}; | ||
| 969 | + const slaveNameList = []; | ||
| 970 | + /* 从props找到 所有的Config */ | ||
| 971 | + if (commonUtils.isNotEmptyArr(props)) { | ||
| 972 | + for (const key of Object.keys(props)) { | ||
| 973 | + if (key.includes('Config') && !key.includes('onGet') && !key.includes('report')) { | ||
| 974 | + const tablename = key.replace('Config', '').trim(); | ||
| 975 | + slaveNameList.push(tablename); | ||
| 976 | + } | ||
| 977 | + } | ||
| 978 | + } | ||
| 979 | + | ||
| 980 | + if (commonUtils.isNotEmptyArr(slaveNameList)) { | ||
| 981 | + slaveNameList.forEach((name, index) => { | ||
| 982 | + const tableConfig = props[name + 'Config']; /* 动态配置 */ | ||
| 983 | + const tableData = props[name + 'Data']; /* 动态配置 */ | ||
| 984 | + const tableSelectedRowKeys = props[name + 'SelectedRowKeys']; /* 选中Key */ | ||
| 985 | + if (commonUtils.isNotEmptyObject(tableConfig)) { | ||
| 986 | + allTableMap[name + '.' + tableConfig.sTbName] = tableData | ||
| 987 | + } | ||
| 988 | + | ||
| 989 | + }) | ||
| 990 | + const masterTbName = masterConfig.sTbName; | ||
| 991 | + allTableMap['master.' + masterTbName] = masterData; | ||
| 992 | + } | ||
| 993 | + const sButtonParam = btnConfig.sButtonParam; | ||
| 994 | + const btn = commonUtils.isJSON(sButtonParam) ? JSON.parse(sButtonParam) : ''; | ||
| 995 | + const sProName = btn.sproName; | ||
| 996 | + const url = `${commonConfig.server_host}calcprocedure/calc?sModelsId=${sModelsId}`; | ||
| 997 | + const value = { | ||
| 998 | + sProName, | ||
| 999 | + sButtonParam, | ||
| 1000 | + allTableMap | ||
| 1001 | + }; | ||
| 1002 | + const dataReturn = (await commonServices.postValueService(props.app.token, value, url)).data; | ||
| 1003 | + if (dataReturn.code === 1) { | ||
| 1004 | + /* 数据操作 数据回传页面 */ | ||
| 1005 | + message.success('操作成功!'); | ||
| 1006 | + const returnData = dataReturn.dataset.rows[0]; | ||
| 1007 | + if (commonUtils.isNotEmptyArr(slaveNameList) && commonUtils.isNotEmptyObject(returnData)) { | ||
| 1008 | + slaveNameList.forEach((name, index) => { | ||
| 1009 | + const tableConfig = props[name + 'Config']; /* 动态配置 */ | ||
| 1010 | + let tableDelData = props[name + 'DelData']; | ||
| 1011 | + if (commonUtils.isEmptyArr(tableDelData)) { | ||
| 1012 | + tableDelData = []; | ||
| 1013 | + } | ||
| 1014 | + let tableDelDataNew = [] | ||
| 1015 | + let tableData = []; | ||
| 1016 | + if (commonUtils.isNotEmptyObject(tableConfig)) { | ||
| 1017 | + tableData = returnData[name + '.' + tableConfig.sTbName]; /* 动态配置 */ | ||
| 1018 | + if (commonUtils.isNotEmptyArr(tableData) && Array.isArray(tableData)) { | ||
| 1019 | + tableDelDataNew = tableData.filter(item => item.handleType === 'del'); | ||
| 1020 | + tableData = tableData.filter(item => item.handleType !== 'del'); | ||
| 1021 | + tableDelData = tableDelData.concat(tableDelDataNew); | ||
| 1022 | + } | ||
| 1023 | + | ||
| 1024 | + } | ||
| 1025 | + allReturnMap[name + 'Data'] = tableData; | ||
| 1026 | + allReturnMap[name + 'DelData'] = tableDelData; | ||
| 1027 | + }); | ||
| 1028 | + const masterTbName = masterConfig.sTbName; | ||
| 1029 | + allReturnMap.masterData = returnData['master.' + masterTbName]; | ||
| 1030 | + allReturnMap.masterData.enabled = true; | ||
| 1031 | + } | ||
| 1032 | + // allReturnMap?.slaveChildData?.forEach(item => { | ||
| 1033 | + // item.sSqlConditionId = allReturnMap?.slaveData?.[0].sSqlConditionId | ||
| 1034 | + // }) | ||
| 1035 | + allReturnMap.slaveSelectedRowKeys = [allReturnMap?.slaveData?.[0].sId] | ||
| 1036 | + | ||
| 1037 | + props.onSaveState({ ...allReturnMap, pageLoading: false }); | ||
| 1038 | + } else if (dataReturn.code === -8 || dataReturn.code === 2) { | ||
| 1039 | + props.getServiceError(dataReturn); | ||
| 1040 | + props.onSaveState({ pageLoading: false }); | ||
| 1041 | + } else { /* 失败 */ | ||
| 1042 | + props.getServiceError(dataReturn); | ||
| 1043 | + props.onSaveState({ pageLoading: false }); | ||
| 1044 | + } | ||
| 1045 | + | ||
| 1046 | + } | ||
| 1047 | +} | ||
| 958 | // 新增 | 1048 | // 新增 |
| 959 | const handleAdd = (props) => { | 1049 | const handleAdd = (props) => { |
| 960 | const { slaveConfig } = props; | 1050 | const { slaveConfig } = props; |
| @@ -1059,9 +1149,9 @@ const handleScanFace = (props) => { | @@ -1059,9 +1149,9 @@ const handleScanFace = (props) => { | ||
| 1059 | proData.forEach(item => { | 1149 | proData.forEach(item => { |
| 1060 | const data = commonFunc.getAssignFieldValue(copyConfig?.sAssignField, item) | 1150 | const data = commonFunc.getAssignFieldValue(copyConfig?.sAssignField, item) |
| 1061 | const index = tableData.findIndex(x => x.sEmployeeNo === item.sEmployeeNo) | 1151 | const index = tableData.findIndex(x => x.sEmployeeNo === item.sEmployeeNo) |
| 1062 | - // if (index !== -1) { | ||
| 1063 | - // message.error('人员重复,请重新添加', 5) | ||
| 1064 | - // } else { | 1152 | + if (index !== -1) { |
| 1153 | + message.error('人员重复,请重新添加', 5) | ||
| 1154 | + } else { | ||
| 1065 | tableData.push({ | 1155 | tableData.push({ |
| 1066 | ...item, | 1156 | ...item, |
| 1067 | ...data, | 1157 | ...data, |
| @@ -1070,7 +1160,7 @@ const handleScanFace = (props) => { | @@ -1070,7 +1160,7 @@ const handleScanFace = (props) => { | ||
| 1070 | sParentId: props.masterData.sId, | 1160 | sParentId: props.masterData.sId, |
| 1071 | slaveId: props?.slaveData ? props?.slaveData[0].sId : '' | 1161 | slaveId: props?.slaveData ? props?.slaveData[0].sId : '' |
| 1072 | }) | 1162 | }) |
| 1073 | - // } | 1163 | + } |
| 1074 | 1164 | ||
| 1075 | }); | 1165 | }); |
| 1076 | 1166 |
src/mes/common/commonOperationBarComponent/index.js
| @@ -79,7 +79,7 @@ const useCommonOperationBarComponentEvent = props => { | @@ -79,7 +79,7 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 79 | 79 | ||
| 80 | // 按钮点击事件 | 80 | // 按钮点击事件 |
| 81 | const clickRef = useRef(null); | 81 | const clickRef = useRef(null); |
| 82 | - const handleBtnClick = async (config, searchField) => { | 82 | + const handleBtnClick = async (config, searchField, btnLeftConfig) => { |
| 83 | // 限制半秒内只能点一次 | 83 | // 限制半秒内只能点一次 |
| 84 | if (clickRef.current) return; | 84 | if (clickRef.current) return; |
| 85 | clickRef.current = true; | 85 | clickRef.current = true; |
| @@ -92,10 +92,12 @@ const useCommonOperationBarComponentEvent = props => { | @@ -92,10 +92,12 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 92 | 92 | ||
| 93 | const delayedOvertime = commonFunc.showLocalMessage(props, 'delayedOvertime', '延迟加班'); | 93 | const delayedOvertime = commonFunc.showLocalMessage(props, 'delayedOvertime', '延迟加班'); |
| 94 | const cancelDelayedOvertime = commonFunc.showLocalMessage(props, 'cancelDelayedOvertime', '取消延迟加班'); | 94 | const cancelDelayedOvertime = commonFunc.showLocalMessage(props, 'cancelDelayedOvertime', '取消延迟加班'); |
| 95 | + | ||
| 95 | // 走工具栏功能逻辑 | 96 | // 走工具栏功能逻辑 |
| 96 | if (await MesToolbar({ ...props, btnConfig: config })) { | 97 | if (await MesToolbar({ ...props, btnConfig: config })) { |
| 97 | return; | 98 | return; |
| 98 | } | 99 | } |
| 100 | + | ||
| 99 | // 自定义按钮事件 | 101 | // 自定义按钮事件 |
| 100 | if ( | 102 | if ( |
| 101 | costomPageFun({ | 103 | costomPageFun({ |
| @@ -305,8 +307,9 @@ const useCommonOperationBarComponentEvent = props => { | @@ -305,8 +307,9 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 305 | } | 307 | } |
| 306 | 308 | ||
| 307 | // 弹窗 | 309 | // 弹窗 |
| 310 | + | ||
| 308 | if (sActiveId) { | 311 | if (sActiveId) { |
| 309 | - handleOpenCommonModal(config); | 312 | + handleOpenCommonModal(config, btnLeftConfig); |
| 310 | } | 313 | } |
| 311 | 314 | ||
| 312 | if (["BtnLeft.setUpStart"].includes(sControlName)) { | 315 | if (["BtnLeft.setUpStart"].includes(sControlName)) { |
| @@ -551,15 +554,17 @@ const useCommonOperationBarComponentEvent = props => { | @@ -551,15 +554,17 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 551 | }; | 554 | }; |
| 552 | 555 | ||
| 553 | // 弹窗 | 556 | // 弹窗 |
| 554 | - const handleOpenCommonModal = config => { | 557 | + const handleOpenCommonModal = async (config, btnLeftConfig) => { |
| 555 | const { sActiveId, sActiveName } = config; | 558 | const { sActiveId, sActiveName } = config; |
| 556 | 559 | ||
| 557 | - const copyTo = handleGetCopyTo(config); | ||
| 558 | - | ||
| 559 | - // 获取sqlCondition值 | 560 | + const copyTo = await handleGetCopyTo(config, btnLeftConfig); |
| 561 | + // // 获取sqlCondition值 | ||
| 560 | const sParentConditions = props.getSqlCondition(config); | 562 | const sParentConditions = props.getSqlCondition(config); |
| 563 | + const { slaveSelectedRowKeys, slaveData, formData } = props | ||
| 564 | + const record = slaveData.find(item => slaveSelectedRowKeys?.includes(item.sId) || slaveSelectedRowKeys.includes(item.sSlaveId)); | ||
| 561 | 565 | ||
| 562 | - // 弹窗展示 | 566 | + // !formData[0].gdsconfigformslave.some(item => item.sControlName === 'pageLayout') |
| 567 | + // // 弹窗展示 | ||
| 563 | props.onOpenCommonModal({ | 568 | props.onOpenCommonModal({ |
| 564 | type: "commonModal", | 569 | type: "commonModal", |
| 565 | sActiveId, | 570 | sActiveId, |
| @@ -567,7 +572,7 @@ const useCommonOperationBarComponentEvent = props => { | @@ -567,7 +572,7 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 567 | copyTo, | 572 | copyTo, |
| 568 | sModelType: '/indexPage/commonBill', | 573 | sModelType: '/indexPage/commonBill', |
| 569 | sParentConditions, | 574 | sParentConditions, |
| 570 | - parentProps: props, | 575 | + parentProps: { ...props, record }, |
| 571 | onOk: data => { | 576 | onOk: data => { |
| 572 | console.log("=====onOk", data); | 577 | console.log("=====onOk", data); |
| 573 | }, | 578 | }, |
| @@ -578,8 +583,90 @@ const useCommonOperationBarComponentEvent = props => { | @@ -578,8 +583,90 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 578 | }; | 583 | }; |
| 579 | 584 | ||
| 580 | // 获取copyTo数据 | 585 | // 获取copyTo数据 |
| 581 | - const handleGetCopyTo = config => { | ||
| 582 | - const copyTo = {}; | 586 | + const handleGetCopyTo = async (config, btnLeftConfig) => { |
| 587 | + let copyTo = {}; | ||
| 588 | + const { sModelsId, sName, token, app } = props | ||
| 589 | + const name = config?.sControlName | ||
| 590 | + const copyToConfig = btnLeftConfig.filter(x => x.sControlName.includes(config?.sControlName)) | ||
| 591 | + const allReturnMap = {}; | ||
| 592 | + let copyToData = props[sName + 'Data'] || [] | ||
| 593 | + if (commonUtils.isNotEmptyObject(config?.sControlName) && config?.sControlName.toLowerCase().includes('btncopyto.tmpinfobysql')) { | ||
| 594 | + const dataUrl = `${commonConfig.server_host}salesorder/getTmpInfoBySql/?sModelsId=${sModelsId}`; | ||
| 595 | + const sConfigformId = commonUtils.isEmpty(copyToConfig) ? '' : copyToConfig[0]?.sParentId; | ||
| 596 | + const sControlName = commonUtils.isNotEmptyObject(config?.sControlName) ? config?.sControlName : 'BtnCopyTo.TmpInfoBySql'; | ||
| 597 | + const selectedRowKeys = props[sName + 'SelectedRowKeys']?.[0] || '' | ||
| 598 | + const selectedRowKeysList = props[sName + 'SelectedRowKeys'] | ||
| 599 | + const slaveSelectedData = props[sName + 'Data'] || [] | ||
| 600 | + const sRowData = slaveSelectedData.map(item => { | ||
| 601 | + const i = selectedRowKeysList.findIndex(x => x === item.id || x === item.sSlaveId) | ||
| 602 | + if (i !== -1) { | ||
| 603 | + return item | ||
| 604 | + } else { | ||
| 605 | + return null | ||
| 606 | + } | ||
| 607 | + }).filter(x => x !== null) | ||
| 608 | + /* 塞原始数据 */ | ||
| 609 | + if (commonUtils.isNotEmptyArr(slaveSelectedData)) { | ||
| 610 | + delete slaveSelectedData?.[0]?.bCheck | ||
| 611 | + const sAssignField = copyToConfig?.[0]?.sAssignField | ||
| 612 | + let addSAssignField = { | ||
| 613 | + ...commonFunc.getAssignFieldValue(sAssignField, props?.app?.userinfo) | ||
| 614 | + } | ||
| 615 | + copyTo.masterData = { | ||
| 616 | + ...addSAssignField, | ||
| 617 | + ...commonFunc.getAssignFieldValue(sAssignField, slaveSelectedData[0]), | ||
| 618 | + handleType: "add", | ||
| 619 | + sId: commonUtils.createSid(), | ||
| 620 | + sFormId: sModelsId, | ||
| 621 | + maxBillNo: "sBillNo", | ||
| 622 | + };; | ||
| 623 | + copyTo.slaveData = slaveSelectedData; | ||
| 624 | + } | ||
| 625 | + const values = { sConfigformId, sControlName, sRowData }; | ||
| 626 | + const dataReturn = (await commonServices.postValueService(token, values, dataUrl)).data; | ||
| 627 | + if (dataReturn.code === 1) { | ||
| 628 | + const returnData = dataReturn.dataset.rows[0]; | ||
| 629 | + if (commonUtils.isNotEmptyObject(returnData)) { | ||
| 630 | + for (const key of Object.keys(returnData)) { | ||
| 631 | + const sName = `${key}Data`; | ||
| 632 | + const sDelName = `${key}DelData`; | ||
| 633 | + const sAssignField = copyToConfig.find(x => x.sControlName.includes(key))?.sAssignField | ||
| 634 | + const keyData = returnData[key]; | ||
| 635 | + let newData = [] | ||
| 636 | + if (commonUtils.isNotEmptyArr(keyData)) { | ||
| 637 | + keyData.forEach(item => { | ||
| 638 | + let tableRow = {}; | ||
| 639 | + tableRow = { ...tableRow, ...commonFunc.getAssignFieldValue(sAssignField, item) }; // 取赋值字段 | ||
| 640 | + tableRow.sId = commonUtils.createSid(); | ||
| 641 | + tableRow.sParentId = copyTo.masterData.sId; | ||
| 642 | + tableRow.handleType = 'add'; | ||
| 643 | + tableRow.sSqlConditionOldId = tableRow.sSqlConditionId; | ||
| 644 | + tableRow.sSqlConditionId = tableRow.sId | ||
| 645 | + newData.push(tableRow); | ||
| 646 | + }) | ||
| 647 | + } | ||
| 648 | + allReturnMap[sName] = newData; | ||
| 649 | + | ||
| 650 | + } | ||
| 651 | + | ||
| 652 | + if (commonUtils.isNotEmptyArr(copyTo.masterData) && Array.isArray(copyTo.masterData)) { | ||
| 653 | + copyTo.masterData = copyTo.masterData[0]; | ||
| 654 | + } | ||
| 655 | + const configName = copyToConfig[0].sControlName.split(".").pop(); | ||
| 656 | + copyTo = { | ||
| 657 | + ...copyTo, | ||
| 658 | + ...allReturnMap, | ||
| 659 | + isTmpinfobysql: true | ||
| 660 | + } | ||
| 661 | + if (configName && allReturnMap[configName]) { | ||
| 662 | + copyTo.masterData = allReturnMap[configName] | ||
| 663 | + } | ||
| 664 | + } | ||
| 665 | + } else { | ||
| 666 | + message.error(dataReturn.msg); | ||
| 667 | + } | ||
| 668 | + } | ||
| 669 | + | ||
| 583 | return copyTo; | 670 | return copyTo; |
| 584 | }; | 671 | }; |
| 585 | 672 | ||
| @@ -613,11 +700,11 @@ const useCommonOperationBarComponentEvent = props => { | @@ -613,11 +700,11 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 613 | }; | 700 | }; |
| 614 | 701 | ||
| 615 | // 获取按钮配置 | 702 | // 获取按钮配置 |
| 616 | - const handleGetBtnPropps = (config, searchField) => { | 703 | + const handleGetBtnPropps = (config, searchField, btnLeftConfig) => { |
| 617 | const defaultProps = { | 704 | const defaultProps = { |
| 618 | type: "primary", | 705 | type: "primary", |
| 619 | size: "large", | 706 | size: "large", |
| 620 | - onClick: handleBtnClick.bind(this, config, searchField) | 707 | + onClick: handleBtnClick.bind(this, config, searchField, btnLeftConfig) |
| 621 | }; | 708 | }; |
| 622 | 709 | ||
| 623 | const { sDefault, sControlName } = config; | 710 | const { sDefault, sControlName } = config; |
| @@ -736,7 +823,7 @@ const useCommonOperationBarComponentEvent = props => { | @@ -736,7 +823,7 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 736 | } catch (error) { | 823 | } catch (error) { |
| 737 | console.log("=====err", { tempData, str: sDefault, strNew, error }); | 824 | console.log("=====err", { tempData, str: sDefault, strNew, error }); |
| 738 | } | 825 | } |
| 739 | - } else if (props.bMesBill) { | 826 | + } else if (props.bMesBill || props.bMesSubBill) { |
| 740 | 827 | ||
| 741 | const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); | 828 | const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); |
| 742 | let enabled = props.enabled | 829 | let enabled = props.enabled |
| @@ -749,7 +836,9 @@ const useCommonOperationBarComponentEvent = props => { | @@ -749,7 +836,9 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 749 | } | 836 | } |
| 750 | 837 | ||
| 751 | } else { | 838 | } else { |
| 752 | - if (["btnsave", "btnscanface"].includes(btnName)) { | 839 | + |
| 840 | + | ||
| 841 | + if (["btnsave", "btnscanface"].includes(btnName) || btnName?.startsWith('btncalc')) { | ||
| 753 | defaultProps.disabled = true; | 842 | defaultProps.disabled = true; |
| 754 | } | 843 | } |
| 755 | if (!bSubmit) { | 844 | if (!bSubmit) { |
| @@ -955,9 +1044,17 @@ const CommonOperationBarComponent = basProps => { | @@ -955,9 +1044,17 @@ const CommonOperationBarComponent = basProps => { | ||
| 955 | props.setExtraBtns(extraBtns); | 1044 | props.setExtraBtns(extraBtns); |
| 956 | } | 1045 | } |
| 957 | 1046 | ||
| 958 | - const btnLeftConfig = gdsconfigformslave.filter( | 1047 | + const originalData = gdsconfigformslave.filter( |
| 959 | item => item.bVisible && item.sControlName.includes("BtnLeft.") | 1048 | item => item.bVisible && item.sControlName.includes("BtnLeft.") |
| 960 | ); | 1049 | ); |
| 1050 | + const btnLeftConfig = originalData.filter(item => { | ||
| 1051 | + const str = item.sControlName; | ||
| 1052 | + if (!str.includes("BtnCopyTo")) { | ||
| 1053 | + return true; | ||
| 1054 | + } | ||
| 1055 | + | ||
| 1056 | + return /BtnCopyTo\.[^.]*$/.test(str); | ||
| 1057 | + }); | ||
| 961 | 1058 | ||
| 962 | // 将扫码上料放到最后 | 1059 | // 将扫码上料放到最后 |
| 963 | const scanCodeToLoadMaterialsIndex = btnLeftConfig.findIndex( | 1060 | const scanCodeToLoadMaterialsIndex = btnLeftConfig.findIndex( |
| @@ -1408,7 +1505,7 @@ const CommonOperationBarComponent = basProps => { | @@ -1408,7 +1505,7 @@ const CommonOperationBarComponent = basProps => { | ||
| 1408 | </div> | 1505 | </div> |
| 1409 | } | 1506 | } |
| 1410 | return ( | 1507 | return ( |
| 1411 | - <Button {...props.onGetBtnPropps(item, searchField)}> | 1508 | + <Button {...props.onGetBtnPropps(item, searchField, originalData)}> |
| 1412 | {item.showName} | 1509 | {item.showName} |
| 1413 | </Button> | 1510 | </Button> |
| 1414 | ); | 1511 | ); |
| @@ -1503,58 +1600,63 @@ const BarcodeComponent = props => { | @@ -1503,58 +1600,63 @@ const BarcodeComponent = props => { | ||
| 1503 | item => item.sName === "sSearchProductName" | 1600 | item => item.sName === "sSearchProductName" |
| 1504 | ); | 1601 | ); |
| 1505 | 1602 | ||
| 1506 | - props.onExecInstructSet({ | ||
| 1507 | - btnConfig, | ||
| 1508 | - nextProps: { scanCodeData: [{ value: valueNew }] }, | ||
| 1509 | - // callback: () => { | ||
| 1510 | - // if (commonUtils.isNotEmptyArr(searchProductConfig)) { | ||
| 1511 | - // props.onSaveState({ | ||
| 1512 | - // refreshMachineDataFlag: new Date().getTime(), | ||
| 1513 | - // productionTableList: [sName] | ||
| 1514 | - // }); | ||
| 1515 | - // } | ||
| 1516 | - // }, | ||
| 1517 | - inscallback: nextProps => { | ||
| 1518 | - if (commonUtils.isNotEmptyArr(searchProductConfig)) { | ||
| 1519 | - props.onSaveState({ | ||
| 1520 | - refreshMachineDataFlag: new Date().getTime(), | ||
| 1521 | - productionTableList: [sName] | ||
| 1522 | - }, ()=>{ | ||
| 1523 | - props.onRefresh && props.onRefresh(); | ||
| 1524 | - }); | 1603 | + try { |
| 1604 | + props.onExecInstructSet({ | ||
| 1605 | + btnConfig, | ||
| 1606 | + nextProps: { scanCodeData: [{ value: valueNew }] }, | ||
| 1607 | + // callback: () => { | ||
| 1608 | + // if (commonUtils.isNotEmptyArr(searchProductConfig)) { | ||
| 1609 | + // props.onSaveState({ | ||
| 1610 | + // refreshMachineDataFlag: new Date().getTime(), | ||
| 1611 | + // productionTableList: [sName] | ||
| 1612 | + // }); | ||
| 1613 | + // } | ||
| 1614 | + // }, | ||
| 1615 | + inscallback: nextProps => { | ||
| 1616 | + if (commonUtils.isNotEmptyArr(searchProductConfig)) { | ||
| 1617 | + props.onSaveState({ | ||
| 1618 | + refreshMachineDataFlag: new Date().getTime(), | ||
| 1619 | + productionTableList: [sName] | ||
| 1620 | + }, () => { | ||
| 1621 | + // props.onRefresh && props.onRefresh(); | ||
| 1622 | + }); | ||
| 1623 | + } | ||
| 1525 | } | 1624 | } |
| 1526 | - } | ||
| 1527 | - // inscallback: nextProps => { | ||
| 1528 | - // if (commonUtils.isNotEmptyArr(searchProductConfig)) { | ||
| 1529 | - // const { machinedataData } = nextProps; | ||
| 1530 | - // if (commonUtils.isNotEmptyArr(machinedataData)) { | ||
| 1531 | - // const { | ||
| 1532 | - // sProductId, | ||
| 1533 | - // sProductNo, | ||
| 1534 | - // sSearchProductId = sProductId, | ||
| 1535 | - // sSearchProductNo = sProductNo | ||
| 1536 | - // } = machinedataData[0]; | ||
| 1537 | - // nextProps.onSaveState( | ||
| 1538 | - // { | ||
| 1539 | - // workOrderInfoData: machinedataData, | ||
| 1540 | - // sSearchProductId: sSearchProductId | ||
| 1541 | - // }, | ||
| 1542 | - // nextPropsNew => { | ||
| 1543 | - // props.onSearchProductNameChange( | ||
| 1544 | - // "", | ||
| 1545 | - // "", | ||
| 1546 | - // { | ||
| 1547 | - // sSearchProductId, | ||
| 1548 | - // sSearchProductNo | ||
| 1549 | - // }, | ||
| 1550 | - // true | ||
| 1551 | - // ); | ||
| 1552 | - // } | ||
| 1553 | - // ); | ||
| 1554 | - // } | ||
| 1555 | - // } | ||
| 1556 | - // } | ||
| 1557 | - }); | 1625 | + // inscallback: nextProps => { |
| 1626 | + // if (commonUtils.isNotEmptyArr(searchProductConfig)) { | ||
| 1627 | + // const { machinedataData } = nextProps; | ||
| 1628 | + // if (commonUtils.isNotEmptyArr(machinedataData)) { | ||
| 1629 | + // const { | ||
| 1630 | + // sProductId, | ||
| 1631 | + // sProductNo, | ||
| 1632 | + // sSearchProductId = sProductId, | ||
| 1633 | + // sSearchProductNo = sProductNo | ||
| 1634 | + // } = machinedataData[0]; | ||
| 1635 | + // nextProps.onSaveState( | ||
| 1636 | + // { | ||
| 1637 | + // workOrderInfoData: machinedataData, | ||
| 1638 | + // sSearchProductId: sSearchProductId | ||
| 1639 | + // }, | ||
| 1640 | + // nextPropsNew => { | ||
| 1641 | + // props.onSearchProductNameChange( | ||
| 1642 | + // "", | ||
| 1643 | + // "", | ||
| 1644 | + // { | ||
| 1645 | + // sSearchProductId, | ||
| 1646 | + // sSearchProductNo | ||
| 1647 | + // }, | ||
| 1648 | + // true | ||
| 1649 | + // ); | ||
| 1650 | + // } | ||
| 1651 | + // ); | ||
| 1652 | + // } | ||
| 1653 | + // } | ||
| 1654 | + // } | ||
| 1655 | + }); | ||
| 1656 | + } finally { | ||
| 1657 | + console.log('finily-上料执行界面刷新:'); | ||
| 1658 | + props.onRefresh && props.onRefresh(); | ||
| 1659 | + } | ||
| 1558 | }; | 1660 | }; |
| 1559 | 1661 | ||
| 1560 | // 判断是否扫码枪输入 | 1662 | // 判断是否扫码枪输入 |
src/mes/productionExec/noticeModal/index.less
src/mes/productionExec/productionExecMain/index.js
| @@ -1102,7 +1102,7 @@ const ProductionExecContent0 = props => { | @@ -1102,7 +1102,7 @@ const ProductionExecContent0 = props => { | ||
| 1102 | <div className="topPart"> | 1102 | <div className="topPart"> |
| 1103 | <div className="type1Content"> | 1103 | <div className="type1Content"> |
| 1104 | <div className="leftTable"> | 1104 | <div className="leftTable"> |
| 1105 | - <StaticEditTable {...tableProps} /> | 1105 | + <StaticEditTable {...tableProps} noVlist /> |
| 1106 | </div> | 1106 | </div> |
| 1107 | <div className="rightForm"> | 1107 | <div className="rightForm"> |
| 1108 | <CommonViewTable className="rightFormBox" {...viewProps} /> | 1108 | <CommonViewTable className="rightFormBox" {...viewProps} /> |