| | |
| | | |
| | | let data = record || selectedData || [] |
| | | |
| | | if (btn.Ot === 'requiredSgl' && data.length !== 1) { |
| | | if (btn.Ot !== 'notRequired' && data.length === 0) { |
| | | // 需要选择行时,校验数据 |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请选择行!', |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else if (btn.Ot === 'requiredSgl' && data.length !== 1) { |
| | | // 需要选择单行时,校验数据 |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | |
| | | if (btn.Ot === 'requiredSgl') { |
| | | primaryId = data[0].$$uuid || '' |
| | | } else if (btn.Ot === 'requiredOnce') { |
| | | let ids = data.map(d => (d.$$uuid || '')) |
| | | ids = ids.filter(Boolean) |
| | | primaryId = ids.join(',') |
| | | } else if (btn.Ot === 'notRequired' && BID) { |
| | | primaryId = BID |
| | | } |