diff --git a/src/main/webapp/assets/js/entity/approval-design.jsx b/src/main/webapp/assets/js/entity/approval-design.jsx index 89c75439a..48c321d88 100644 --- a/src/main/webapp/assets/js/entity/approval-design.jsx +++ b/src/main/webapp/assets/js/entity/approval-design.jsx @@ -145,7 +145,7 @@ class Node extends NodeSpec { else if (data.users[0] !== 'ALL') users = '指定用户 (' + data.users.length + ')' } if (this.nodeType === 'approver') users += ' ' + (data.signMode === 'AND' ? '会签' : (data.signMode === 'ALL' ? '依次审批' : '或签')) - else if (this.nodeType === 'cc' && data.users && data.users.length > 0) users += ' ' + (data.selfSelecting === false ? '' : '且允许自选') + else if (this.nodeType === 'cc' && data.users && data.users.length > 0) users += ' ' + (data.selfSelecting === false ? '' : '同时允许自选') return (
@@ -564,6 +564,8 @@ class RbFlowCanvas extends NodeGroupSpec { this.setState({ nodes: flowNodes }, () => { isCanvasMounted = true }) + } else { + isCanvasMounted = true } $('.box-scale').draggable({ cursor: 'move', axis: 'x', scroll: false }) diff --git a/src/main/webapp/assets/js/rb-forms.jsx b/src/main/webapp/assets/js/rb-forms.jsx index 93916115c..7e30c6009 100644 --- a/src/main/webapp/assets/js/rb-forms.jsx +++ b/src/main/webapp/assets/js/rb-forms.jsx @@ -74,7 +74,7 @@ class RbFormModal extends React.Component { show(state) { state = state || {} if ((state.id !== this.state.id || state.entity !== this.state.entity) || this.state.isDestroy === true) { - state = { ...state, formComponent: null, inLoad: true, id: state.id, entity: state.entity } + state = { formComponent: null, initialValue: null, inLoad: true, ...state } this.setState(state, () => { this.showAfter({ isDestroy: false }, true) }) @@ -146,33 +146,35 @@ class RbForm extends React.Component { } renderFormAction() { let pmodel = this.props.$$$parent.state.__formModel - let saveBtns = ( -
- - -
- {pmodel.isSlave === true && this.post(101)}>保存并继续添加} - {pmodel.isMaster === true && this.post(102)}>保存并添加明细} - {pmodel.isSlave !== true && this.post(101)}>保存并继续新建} -
-
- ) + let moreActions = [] + if (pmodel.isApproval === true) { + moreActions.push( this.post(103)}>保存并提交) + } + if (pmodel.isMaster === true) { + moreActions.push( this.post(102)}>保存并添加明细) + } else if (pmodel.isSlave === true) { + moreActions.push( this.post(101)}>保存并继续添加) + } - let entity = this.state.entity - let wpc = window.__PageConfig - if (entity === 'User' || entity === 'Department' || entity === 'Role' - || wpc.type === 'SlaveView' || wpc.type === 'SlaveList' || this.isNew !== true) { - saveBtns = + let actionBtn = + if (moreActions.length > 0) { + actionBtn = ( +
+ + +
+ {moreActions.map((item) => { return item })} +
+
) } return (
- {saveBtns} + {actionBtn}
-
- ) +
) } componentDidMount() { @@ -217,7 +219,11 @@ class RbForm extends React.Component { }) } + /** + * @next {Number} + */ post(next) { + next = next || 100 let _data = {} for (let k in this.__FormData) { let err = this.__FormData[k].error @@ -240,7 +246,7 @@ class RbForm extends React.Component { if (next === 101) { let pstate = that.props.$$$parent.state - rb.RbFormModal({ title: pstate.title, entity: pstate.entity, icon: pstate.icon }) + rb.RbFormModal({ title: pstate.title, entity: pstate.entity, icon: pstate.icon, initialValue: pstate.initialValue }) } else if (next === 102) { let iv = { '$MASTER$': res.data.id } let sm = that.props.$$$parent.state.__formModel.slaveMeta