Commit df8603985cfb4eeb3bf96de6be2dfdf49130fe0e
1 parent
d54895c8
修改保存后查询;
Showing
1 changed file
with
7 additions
and
6 deletions
src/mes/common/commonModelComponent/index.js
| ... | ... | @@ -575,12 +575,12 @@ const useCommonModelEvent = props => { |
| 575 | 575 | conditonValues.sSReserve1 = props.sSReserve1; |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | - if (currentId) { | |
| 579 | - if (tableName === 'master') { | |
| 580 | - conditonValues.sId = currentId; | |
| 581 | - } else { | |
| 582 | - conditonValues.sParentId = currentId; | |
| 583 | - } | |
| 578 | + const masterState = {}; | |
| 579 | + if (currentId && tableName === 'master') { | |
| 580 | + masterState.sId = currentId; | |
| 581 | + } | |
| 582 | + if (currentId && tableName !== 'master') { | |
| 583 | + conditonValues.sParentId = currentId; | |
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | const result = |
| ... | ... | @@ -588,6 +588,7 @@ const useCommonModelEvent = props => { |
| 588 | 588 | name: tableName, |
| 589 | 589 | configData: config, |
| 590 | 590 | condition: { |
| 591 | + ...masterState, | |
| 591 | 592 | sSqlCondition: { ...conditonValues, ...sFilterConditions }, |
| 592 | 593 | bFilter |
| 593 | 594 | }, | ... | ... |