king
2023-01-28 1b60547cb25f5c0a4371e5be0517adf092f2dc62
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -811,22 +811,37 @@
  changeColumns = (columns) => {
    const { verify } = this.state
    if (columns[0] && !['image', 'text', 'number'].includes(columns[0].type)) {
      columns = columns.map(col => {
        let _cell = {
          uuid: Utils.getuuid(),
          Column: col.Column,
          Text: col.Text,
          Width: 20,
          abs: 'false',
          output: col.output || 'true',
          required: col.required || 'false',
          type: 'text',
        }
    columns = columns.map(col => {
      col.type = col.type || 'text'
      col.output = col.output || 'true'
      col.required = col.required || 'false'
        return _cell
      })
    }
      if (!['text', 'image', 'number'].includes(col.type)) {
        if (/^Decimal/ig.test(col.type)) {
          col.type = 'number'
        } else {
          col.type = 'text'
        }
      }
      return col
    })
    // if (columns[0] && !['image', 'text', 'number'].includes(columns[0].type)) {
    //   columns = columns.map(col => {
    //     let _cell = {
    //       uuid: Utils.getuuid(),
    //       Column: col.Column,
    //       Text: col.Text,
    //       Width: 20,
    //       abs: 'false',
    //       output: col.output || 'true',
    //       required: col.required || 'false',
    //       type: 'text',
    //     }
    //     return _cell
    //   })
    // }
    this.setState({verify: {...verify, columns}})
  }