| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (btn.Ot !== 'notRequired' && !setting.primaryKey) { |
| | | // 需要选择行时,校验是否设置主键 |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未设置主键!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (!btn.pageTemplate) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | let MenuNo = '' |
| | | let Remark = '' |
| | | if (btn.Ot === 'requiredSgl' && data[0]) { |
| | | Id = data[0][setting.primaryKey] || '' |
| | | Id = setting.primaryKey ? (data[0][setting.primaryKey] || '') : '' |
| | | name = data[0].PrintTempName || '' |
| | | MenuNo = data[0].PrintTempNO || '' |
| | | Remark = data[0].Remark || '' |
| | |
| | | _name = '单据打印' |
| | | if (btn.Ot === 'required' && data && data.length > 0) { |
| | | data.forEach((item, i) => { |
| | | let _id = item[setting.primaryKey] || '' |
| | | let _id = setting.primaryKey ? (item[setting.primaryKey] || '') : '' |
| | | let url = '#/billprint/' + window.btoa(window.encodeURIComponent(JSON.stringify({ id: _id, tempId: btn.printTemp, dataM: sessionStorage.getItem('dataM') }))) |
| | | window.open(url) |
| | | }) |
| | |
| | | <Button |
| | | type="link" |
| | | title={show === 'icon' ? btn.label : ''} |
| | | style={btn.btnstyle} |
| | | style={btn.style} |
| | | icon={show === 'text' ? '' : (btn.icon || '')} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{show === 'icon' && btn.icon ? '' : btn.label}</Button> |