| | |
| | | const VerifyExcelIn = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifyexcelin')) |
| | | const VerifyExcelOut = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifyexcelout')) |
| | | const VerifyMegvii = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifymegvii')) |
| | | const VerifyPay = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifypay')) |
| | | |
| | | class ActionComponent extends Component { |
| | | static propTpyes = { |
| | |
| | | const { card, actionlist } = this.state |
| | | |
| | | let _card = fromJS(card).toJS() |
| | | _card.style = style |
| | | _card.style = fromJS(style).toJS() |
| | | |
| | | if (_card.style.paddingLeft === '15px') { |
| | | delete _card.style.paddingLeft |
| | | } |
| | | if (_card.style.paddingRight === '15px') { |
| | | delete _card.style.paddingRight |
| | | } |
| | | if (_card.style.minHeight === '28px') { |
| | | delete _card.style.minHeight |
| | | } |
| | | |
| | | let _actionlist = actionlist.map(cell => { |
| | | if (cell.uuid === _card.uuid) return _card |
| | |
| | | |
| | | changeBtnStyle = (element) => { |
| | | let _style = element.style ? fromJS(element.style).toJS() : {} |
| | | let options = ['font', 'border', 'background', 'margin', 'padding'] |
| | | let options = ['font', 'border', 'background', 'margin', 'padding', 'minHeight'] |
| | | |
| | | _style.paddingLeft = _style.paddingLeft || '15px' |
| | | _style.paddingRight = _style.paddingRight || '15px' |
| | | _style.minHeight = _style.minHeight || '28px' |
| | | |
| | | this.setState({ |
| | | card: element |
| | |
| | | addButton = (cardId, element) => { |
| | | if (cardId !== this.props.config.uuid) return |
| | | |
| | | delete element.eleType |
| | | |
| | | const { actionlist } = this.state |
| | | |
| | | this.setState({actionlist: [...actionlist, element]}) |
| | |
| | | supId = '' |
| | | } |
| | | } |
| | | |
| | | let menu = window.GLOB.customMenu |
| | | |
| | | let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid, supId) |
| | | let modules = MenuUtils.getSubModules(menu.components, config.uuid, supId, menu.interfaces || null) |
| | | |
| | | if (config.subtype === 'basetable') { |
| | | delete card.eleType // 区分按钮位置 |
| | |
| | | formlist: getBaseTableActionForm(card, functip, config, usefulFields, modules) |
| | | }) |
| | | } else { |
| | | let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, config.uuid) || [] |
| | | let anchors = MenuUtils.getAnchors(menu.components, config.uuid) || [] |
| | | |
| | | this.setState({ |
| | | visible: true, |
| | |
| | | output: 'true', |
| | | required: 'false', |
| | | type: 'text', |
| | | noValue: 'true', |
| | | uuid: Utils.getuuid() |
| | | } |
| | | |
| | | if (item.type === 'number') { |
| | | cell.type = 'number' |
| | | cell.decimal = item.decimal |
| | | |
| | | if (item.noValue === 'hide') { |
| | | cell.noValue = 'false' |
| | | } |
| | | } |
| | | |
| | | columns.push(cell) |
| | |
| | | */ |
| | | deleteElement = (card) => { |
| | | const { config } = this.props |
| | | let _this = this |
| | | let that = this |
| | | |
| | | confirm({ |
| | | content: `确定删除 - ${card.label} ?`, |
| | | onOk() { |
| | | let _actionlist = fromJS(_this.state.actionlist).toJS() |
| | | let _actionlist = fromJS(that.state.actionlist).toJS() |
| | | |
| | | _actionlist = _actionlist.filter(item => item.uuid !== card.uuid) |
| | | |
| | | _this.setState({ |
| | | that.setState({ |
| | | actionlist: _actionlist |
| | | }, () => { |
| | | _this.props.updateaction({...config, action: _actionlist}) |
| | | that.props.updateaction({...config, action: _actionlist}) |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | |
| | | verifySubmit = () => { |
| | | const { config } = this.props |
| | | const { card } = this.state |
| | | |
| | | |
| | | this.verifyRef.handleConfirm().then(res => { |
| | | let _actionlist = fromJS(this.state.actionlist).toJS() |
| | | _actionlist = _actionlist.filter(item => !item.origin || item.uuid === card.uuid) |
| | |
| | | columns={config.columns} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> |
| | | } else if (card.payMode === 'system') { |
| | | return <VerifyPay |
| | | card={card} |
| | | columns={config.columns} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> |
| | | } |
| | | } |
| | | |
| | |
| | | destroyOnClose |
| | | > |
| | | <ActionForm |
| | | type={config.type === 'tree' ? 'card' : ''} |
| | | card={card} |
| | | formlist={this.state.formlist} |
| | | inputSubmit={this.handleSubmit} |