From 116dcaad9eb1d4d3021076e0454083c19b8e1c79 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 12 十二月 2024 15:25:38 +0800 Subject: [PATCH] 2024-12-12 --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 45 +++++++++++++++++++++++++++++++-------------- 1 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 78a63bd..8b39337 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -13,7 +13,8 @@ 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 @@ -893,6 +894,13 @@ } }) + 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 @@ -1580,7 +1588,7 @@ }, 600) } - this.triggerNote(res, _param.ID) // 娑堟伅 + this.triggerNote(res, _param) // 娑堟伅 this.execSuccess(res) } else { this.execError(res) @@ -1605,7 +1613,7 @@ setTimeout(() => { Api.genericInterface(param).then(res => { if (res.status) { - this.triggerNote(res, param.ID) // 娑堟伅 + this.triggerNote(res, param) // 娑堟伅 } resolve(res) }, (error) => { @@ -1983,7 +1991,7 @@ 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) @@ -2330,7 +2338,7 @@ Api.genericInterface(param).then(res => { if (res.status) { - this.triggerNote(res, param.ID) // 娑堟伅 + this.triggerNote(res, param) // 娑堟伅 if (params.length === 0) { this.execSuccess(res) @@ -2364,7 +2372,7 @@ Api.genericInterface(param).then(res => { if (res.status) { - this.triggerNote(res, param.ID) // 娑堟伅 + this.triggerNote(res, param) // 娑堟伅 if (params.length === 0) { this.execSuccess(res) @@ -2388,7 +2396,7 @@ 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) @@ -2645,7 +2653,7 @@ Api.genericInterface(param, btn.$callbackScript, 'callback').then(res => { if (res.status) { - this.triggerNote(res, param.ID) // 娑堟伅 + this.triggerNote(res, param) // 娑堟伅 // 涓�娆¤姹傛垚鍔燂紝杩涜涓嬩竴椤硅姹� if (params.length === 0) { @@ -3073,7 +3081,7 @@ }) } - triggerNote = (res, ID) => { + triggerNote = (res, param) => { const { btn } = this.props if (!btn.verify) return @@ -3085,7 +3093,16 @@ } 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 @@ -4133,8 +4150,8 @@ <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> @@ -4166,8 +4183,8 @@ 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 -- Gitblit v1.8.0