| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Form, Row, Col, Select, Button, InputNumber, Input, Tooltip, Icon } from 'antd' |
| | | import { Form, Row, Col, Select, Button, InputNumber, Input, Tooltip } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import { formRule } from '@/utils/option.js' |
| | | import './index.scss' |
| | | |
| | |
| | | UNSAFE_componentWillMount() { |
| | | let _modularDetail = [] |
| | | let _billFields = [] |
| | | |
| | | if (this.props.modular.length > 0) { |
| | | _modularDetail = this.props.modularDetail.filter(item => item.BID === this.props.modular[0].ID) |
| | | } |
| | | |
| | | let fieldMap = new Map() |
| | | this.props.fields.forEach(_field => { |
| | | if (_field.type === 'text' && !fieldMap.has(_field.field)) { |
| | | if (_field.type === 'text' && !fieldMap.has(_field.field.toLowerCase())) { |
| | | _billFields.push(_field) |
| | | fieldMap.set(_field.field, true) |
| | | fieldMap.set(_field.field.toLowerCase(), true) |
| | | } |
| | | }) |
| | | |
| | | if (this.props.btn.Ot !== 'notRequired') { |
| | | this.props.columns.forEach(_field => { |
| | | if (_field.type === 'text' && !fieldMap.has(_field.field)) { |
| | | if (_field.type === 'text' && !fieldMap.has(_field.field.toLowerCase())) { |
| | | _billFields.push(_field) |
| | | fieldMap.set(_field.field, true) |
| | | fieldMap.set(_field.field.toLowerCase(), true) |
| | | } |
| | | }) |
| | | } |
| | |
| | | </Col> : null} |
| | | {TypeCharOne === 'Lp' ? <Col span={7}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="该标识用于生成行号规则,为空时使用按钮ID"> |
| | | <Icon type="question-circle" /> |
| | | {'标识'} |
| | | <Tooltip placement="topLeft" title="该标识用于生成行号规则"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 标识 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('mark', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '标识!' |
| | | }, |
| | | { |
| | | pattern: /^[a-zA-Z0-9]*$/ig, |
| | | message: formRule.input.letternummsg |
| | | } |