| | |
| | | formdata: null, |
| | | selines: null, |
| | | btnconfig: null, |
| | | confirmLoading: false, |
| | | loading: false, |
| | | disabled: false, |
| | | hidden: false, |
| | |
| | | */ |
| | | execSuccess = (res) => { |
| | | const { btn } = this.props |
| | | const { autoMatic } = this.state |
| | | const { autoMatic, btnconfig } = this.state |
| | | |
| | | if ((res.ErrCode === 'S' || !res.ErrCode) || autoMatic) { // 执行成功 |
| | | notification.success({ |
| | |
| | | |
| | | } |
| | | |
| | | if (autoMatic || !btnconfig || btnconfig.setting.finish !== 'unclose') { |
| | | this.setState({ |
| | | visible: false |
| | | }) |
| | | } |
| | | |
| | | this.setState({ |
| | | loading: false |
| | | loading: false, |
| | | confirmLoading: false |
| | | }) |
| | | |
| | | if (autoMatic) { |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | loading: false |
| | | loading: false, |
| | | confirmLoading: false |
| | | }) |
| | | |
| | | if (autoMatic) { |
| | |
| | | * @description 模态框(表单),确认 |
| | | */ |
| | | handleOk = () => { |
| | | const { btnconfig, autoMatic } = this.state |
| | | |
| | | if (!this.formRef) return |
| | | |
| | | this.formRef.handleConfirm().then(res => { |
| | | if (btnconfig.setting.finish !== 'unclose' || autoMatic) { |
| | | this.setState({ |
| | | visible: false |
| | | }) |
| | | } |
| | | this.setState({ confirmLoading: true }) |
| | | this.triggerPrint(this.state.selines, res) |
| | | }) |
| | | } |
| | |
| | | handleCancel = () => { |
| | | this.setState({ |
| | | loading: false, |
| | | visible: false |
| | | visible: false, |
| | | confirmLoading: false |
| | | }) |
| | | } |
| | | |
| | |
| | | getContainer={container} |
| | | wrapClassName='action-modal' |
| | | visible={this.state.visible} |
| | | confirmLoading={this.state.confirmLoading} |
| | | width={width} |
| | | onOk={this.handleOk} |
| | | onCancel={this.handleCancel} |