| | |
| | | |
| | | this.setState({autoMatic: type === 'autoMatic'}) |
| | | |
| | | let _this = this |
| | | let that = this |
| | | let data = record || selectedData || [] |
| | | |
| | | let valid = this.checkBtnData(data) |
| | |
| | | cancelText: dict['cancel'] || '取消', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | _this.execSubmit(data, resolve) |
| | | that.execSubmit(data, resolve) |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | _this.setState({loading: false}) |
| | | that.setState({loading: false}) |
| | | } |
| | | }) |
| | | } else if (btn.OpenType === 'exec') { |
| | |
| | | return |
| | | } |
| | | |
| | | let _this = this |
| | | let that = this |
| | | let data = selectedData || [] |
| | | |
| | | let valid = this.checkBtnData(data) |
| | |
| | | cancelText: dict['cancel'] || '取消', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | _this.execSubmit(data, resolve) |
| | | that.execSubmit(data, resolve) |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | callback() |
| | | _this.setState({loading: false}) |
| | | that.setState({loading: false}) |
| | | } |
| | | }) |
| | | } else if (btn.OpenType === 'exec') { |
| | |
| | | msg = msg.replace(/\n|\r/ig, '<br/>') |
| | | msg = <span dangerouslySetInnerHTML={{__html: msg}}></span> |
| | | } |
| | | const _this = this |
| | | const that = this |
| | | confirm({ |
| | | title: window.GLOB.dict['exec_sure'] || '请确认', |
| | | content: msg, |
| | |
| | | return new Promise(resolve => { |
| | | Api.genericInterface(unCheckParam).then(result => { |
| | | if (result.status) { |
| | | _this.triggerNote(result, param.ID) // 消息 |
| | | that.triggerNote(result, param.ID) // 消息 |
| | | |
| | | if (params.length === 0) { |
| | | _this.execSuccess(result) |
| | | that.execSuccess(result) |
| | | _resolve() |
| | | } else { |
| | | _this.checkLoopRequest(params, _resolve) |
| | | that.checkLoopRequest(params, _resolve) |
| | | } |
| | | } else { |
| | | _this.execError(result) |
| | | that.execError(result) |
| | | _resolve() |
| | | } |
| | | resolve() |
| | |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | _this.execError(res) |
| | | that.execError(res) |
| | | _resolve() |
| | | } |
| | | }) |
| | |
| | | modelconfirm = () => { |
| | | const { BID } = this.props |
| | | const { btnconfig, selines, dict } = this.state |
| | | let _this = this |
| | | let that = this |
| | | |
| | | let result = [] |
| | | let _data = {} |
| | |
| | | cancelText: dict['cancel'] || '取消', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | _this.execSubmit(selines, resolve, result) |
| | | that.execSubmit(selines, resolve, result) |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | _this.preCallback && _this.preCallback() |
| | | _this.setState({ loading: false }) |
| | | that.preCallback && that.preCallback() |
| | | that.setState({ loading: false }) |
| | | } |
| | | }) |
| | | } |