king
2021-08-23 cd8bf53b0a1ed5ec9e668bfe190e149f5b7489de
src/templates/zshare/verifycard/billcodeform/index.jsx
@@ -29,24 +29,30 @@
  UNSAFE_componentWillMount() {
    let _modularDetail = []
    let _billFields = []
    let _billFields = [{
      field: 'BID',
      label: 'BID',
      type: 'text',
      uuid: 'BID'
    }]
    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)
        }
      })
    }