| | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import MkCounter from './mkcounter' |
| | | // import './index.scss' |
| | | |
| | | import './index.scss' |
| | | |
| | | const MutilForm = asyncSpinComponent(() => import('@/tabviews/zshare/mutilform')) |
| | | const { confirm } = Modal |
| | |
| | | } |
| | | }) |
| | | |
| | | if (btn.verify && btn.verify.printEnable === 'true' && !btn.output && !ex.reps.includes('ID') && values.id) { |
| | | exps.push({ |
| | | key: 'ID', |
| | | value: values.id |
| | | }) |
| | | } |
| | | |
| | | if (process && btn.verify.workFlow === 'true') { |
| | | let flow = window.GLOB.UserCacheMap.get(btn.$flowId) |
| | | let node = null |
| | |
| | | }, 600) |
| | | } |
| | | |
| | | this.triggerNote(res, _param.ID) // 消息 |
| | | this.triggerNote(res, _param) // 消息 |
| | | this.execSuccess(res) |
| | | } else { |
| | | this.execError(res) |
| | |
| | | setTimeout(() => { |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | | this.triggerNote(res, param.ID) // 消息 |
| | | this.triggerNote(res, param) // 消息 |
| | | } |
| | | resolve(res) |
| | | }, (error) => { |
| | |
| | | |
| | | Api.genericInterface(param, btn.$callbackScript, 'callback').then(res => { |
| | | if (res.status) { |
| | | this.triggerNote(res, param.ID) // 消息 |
| | | this.triggerNote(res, param) // 消息 |
| | | |
| | | if (params.length === 0) { |
| | | this.execSuccess(res) |
| | |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | | this.triggerNote(res, param.ID) // 消息 |
| | | this.triggerNote(res, param) // 消息 |
| | | |
| | | if (params.length === 0) { |
| | | this.execSuccess(res) |
| | |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | | this.triggerNote(res, param.ID) // 消息 |
| | | this.triggerNote(res, param) // 消息 |
| | | |
| | | if (params.length === 0) { |
| | | this.execSuccess(res) |
| | |
| | | return new Promise(resolve => { |
| | | Api.genericInterface(unCheckParam).then(result => { |
| | | if (result.status) { |
| | | that.triggerNote(result, param.ID) // 消息 |
| | | that.triggerNote(result, param) // 消息 |
| | | |
| | | if (params.length === 0) { |
| | | that.execSuccess(result) |
| | |
| | | |
| | | Api.genericInterface(param, btn.$callbackScript, 'callback').then(res => { |
| | | if (res.status) { |
| | | this.triggerNote(res, param.ID) // 消息 |
| | | this.triggerNote(res, param) // 消息 |
| | | |
| | | // 一次请求成功,进行下一项请求 |
| | | if (params.length === 0) { |
| | |
| | | }) |
| | | } |
| | | |
| | | triggerNote = (res, ID) => { |
| | | triggerNote = (res, param) => { |
| | | const { btn } = this.props |
| | | |
| | | if (!btn.verify) return |
| | |
| | | } |
| | | |
| | | if (btn.verify.printEnable === 'true') { |
| | | this.billPrint(id || ID) |
| | | let _id = id || param.ID |
| | | |
| | | if (!_id && param.data && param.data[0] && param.data[0].exps) { |
| | | param.data[0].exps.forEach(cell => { |
| | | if (cell.key === 'ID') { |
| | | _id = cell.value |
| | | } |
| | | }) |
| | | } |
| | | this.billPrint(_id) |
| | | } |
| | | |
| | | if (!id) return |
| | |
| | | <Button onClick={this.handleCancel} style={{ marginRight: 8 }}> |
| | | {dict['cancel'] || '取消'} |
| | | </Button> |
| | | {btn.extBtn === 'true' ? <Button style={{color: 'var(--mk-sys-color)', borderColor: 'var(--mk-sys-color)'}} disabled={confirmLoading && submitType !== btn.extValue} loading={confirmLoading && submitType === btn.extValue} onClick={() => this.handleOk(btn.extValue)}>{btn.extLabel}</Button> : null} |
| | | {btn.extBtn === 'true' ? <Button type="primary" disabled={confirmLoading && submitType !== ''} loading={confirmLoading && submitType === ''} onClick={() => this.handleOk()}>{dict['ok'] || '确定'}</Button> : null} |
| | | {btn.extBtn === 'true' ? <Button className={'extend-btn ' + (btn.extStyle || '')} disabled={confirmLoading && submitType !== btn.extValue} loading={confirmLoading && submitType === btn.extValue} onClick={() => this.handleOk(btn.extValue)}>{btn.extLabel}</Button> : null} |
| | | {btn.extBtn === 'true' ? <Button className={'confirm-btn ' + (btn.confStyle || '')} disabled={confirmLoading && submitType !== ''} loading={confirmLoading && submitType === ''} onClick={() => this.handleOk()}>{btn.confLabel || dict['ok'] || '确定'}</Button> : null} |
| | | {btn.extBtn !== 'true' ? <Button type="primary" loading={confirmLoading} onClick={() => this.handleOk()}>{dict['ok'] || '确定'}</Button> : null} |
| | | </div>} |
| | | </Drawer> |
| | |
| | | onCancel={this.handleCancel} |
| | | footer={[ |
| | | <Button key="cancel" onClick={this.handleCancel}>{dict['cancel'] || '取消'}</Button>, |
| | | btn.extBtn === 'true' ? <Button key="extend" style={{color: 'var(--mk-sys-color)', borderColor: 'var(--mk-sys-color)'}} disabled={confirmLoading && submitType !== btn.extValue} loading={confirmLoading && submitType === btn.extValue} onClick={() => this.handleOk(btn.extValue)}>{btn.extLabel}</Button> : null, |
| | | btn.extBtn === 'true' ? <Button key="confirm" type="primary" disabled={confirmLoading && submitType !== ''} loading={confirmLoading && submitType === ''} onClick={() => this.handleOk()}>{dict['ok'] || '确定'}</Button> : null, |
| | | btn.extBtn === 'true' ? <Button key="extend" className={'extend-btn ' + (btn.extStyle || '')} disabled={confirmLoading && submitType !== btn.extValue} loading={confirmLoading && submitType === btn.extValue} onClick={() => this.handleOk(btn.extValue)}>{btn.extLabel}</Button> : null, |
| | | btn.extBtn === 'true' ? <Button key="confirm" className={'confirm-btn ' + (btn.confStyle || '')} disabled={confirmLoading && submitType !== ''} loading={confirmLoading && submitType === ''} onClick={() => this.handleOk()}>{btn.confLabel || dict['ok'] || '确定'}</Button> : null, |
| | | btn.extBtn !== 'true' ? <Button key="confirm" type="primary" loading={confirmLoading} onClick={() => this.handleOk()}>{dict['ok'] || '确定'}</Button> : null |
| | | ]} |
| | | destroyOnClose |