| | |
| | | this.props.refreshdata(item, type) |
| | | } |
| | | |
| | | actionTrigger = (item) => { |
| | | actionTrigger = (item, record) => { |
| | | const { setting } = this.props |
| | | |
| | | let _this = this |
| | | let data = this.props.gettableselected() || [] |
| | | |
| | | if (record) { // 表格中触发按钮 |
| | | data = [record] |
| | | } |
| | | |
| | | if (item.Ot !== 'notRequired' && data.length === 0) { |
| | | // 需要选择行时,校验数据 |
| | |
| | | this.improveAction(item) |
| | | }) |
| | | } else if (item.OpenType === 'excelOut') { |
| | | this.setState({loadingUuid: item.uuid}) |
| | | this.refreshdata(item, 'excelOut') |
| | | } else { |
| | | notification.warning({ |
| | |
| | | } |
| | | |
| | | execSuccess = (btn) => { |
| | | notification.success({ |
| | | top: 92, |
| | | message: this.props.dict['main.action.confirm.success'], |
| | | duration: 2 |
| | | }) |
| | | if (btn.OpenType === 'excelOut') { |
| | | this.setState({ |
| | | loadingUuid: '' |
| | | }) |
| | | } else { |
| | | notification.success({ |
| | | top: 92, |
| | | message: this.props.dict['main.action.confirm.success'], |
| | | duration: 2 |
| | | }) |
| | | } |
| | | |
| | | if (btn.OpenType === 'pop' && btn.setting && btn.setting.finish !== 'unclose') { |
| | | this.setState({ |
| | |
| | | } |
| | | |
| | | execError = (res, btn) => { |
| | | notification.error({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 15 |
| | | }) |
| | | if (!res.ErrCode || res.ErrCode === 'E') { |
| | | notification.error({ |
| | | top: 92, |
| | | message: res.message || res.ErrMesg, |
| | | duration: 15 |
| | | }) |
| | | } else if (res.ErrCode === 'E') { |
| | | Modal.error({ |
| | | title: res.message || res.ErrMesg |
| | | }) |
| | | } |
| | | |
| | | this.refreshdata(btn, 'error') |
| | | } |
| | | |