From 0c84df247914f893ef5e41d57a422e10a2dc814c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 12 十一月 2021 17:02:06 +0800 Subject: [PATCH] 2021-11-12 --- src/templates/zshare/verifycard/billcodeform/index.jsx | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/templates/zshare/verifycard/billcodeform/index.jsx b/src/templates/zshare/verifycard/billcodeform/index.jsx index 544c8da..8b6a946 100644 --- a/src/templates/zshare/verifycard/billcodeform/index.jsx +++ b/src/templates/zshare/verifycard/billcodeform/index.jsx @@ -1,7 +1,9 @@ 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' @@ -30,23 +32,24 @@ 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) } }) } @@ -306,8 +309,8 @@ </Form.Item> </Col> : null} <Col span={3} className="add"> - <Button onClick={this.handleConfirm} type="primary"> - 纭畾 + <Button onClick={this.handleConfirm} className="mk-green"> + 淇濆瓨 </Button> </Col> {type === '1' ? <Col span={7}> @@ -349,15 +352,19 @@ </Col> : null} {TypeCharOne === 'Lp' ? <Col span={7}> <Form.Item label={ - <Tooltip placement="topLeft" title="璇ユ爣璇嗙敤浜庣敓鎴愯鍙疯鍒欙紝涓虹┖鏃朵娇鐢ㄦ寜閽甀D"> - <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 } -- Gitblit v1.8.0