| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, InputNumber, Select, Radio } from 'antd' |
| | | import { formRule } from '@/utils/option.js' |
| | | import TransferForm from '../transferform' |
| | | import './index.scss' |
| | | |
| | |
| | | |
| | | state = { |
| | | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | const { card } = this.props |
| | | |
| | | if (card.focus) { |
| | | try { |
| | | let _form = document.getElementById('label') |
| | | _form.select() |
| | | } catch { |
| | | console.warn('表单focus失败!') |
| | | } |
| | | } |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | |
| | | |
| | | let _card = {...this.props.card, ...values, sublist: targetKeys, subfield: subfield} |
| | | |
| | | resolve({ |
| | | type: 'columns', |
| | | values: _card |
| | | }) |
| | | resolve(_card) |
| | | } else { |
| | | reject(err) |
| | | } |
| | |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + this.props.dict['header.form.name'] + '!' |
| | | }, |
| | | { |
| | | max: formRule.input.max, |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |