king
2023-05-22 43a517b80f2803e0dcf6658113520c4a14c8c17f
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -19,6 +19,7 @@
const { confirm } = Modal
const { Paragraph } = Typography
const EditTable = asyncComponent(() => import('@/templates/zshare/editTable'))
const FullScripts = asyncComponent(() => import('@/templates/zshare/verifycard/fullScripts'))
class VerifyCard extends Component {
  static propTpyes = {
@@ -464,6 +465,7 @@
  changeColumns = (columns) => {
    const { verify } = this.state
    let reset = false
    columns = columns.map(col => {
      col.type = col.type || 'Nvarchar(50)'
      if (col.type === 'text' || col.type === 'image') {
@@ -476,8 +478,14 @@
        col.limit = col.type.match(/\d+/) ? col.type.match(/\d+/)[0] : '20000'
      } else if (/^Decimal/ig.test(col.type)) {
        col.limit = col.type.match(/\d+/ig)[1]
        if (col.required === 'false') {
          reset = true
        }
        col.required = 'true'
      } else if (/^int/ig.test(col.type)) {
        if (col.required === 'false') {
          reset = true
        }
        col.required = 'true'
      } else {
        col.limit = ''
@@ -488,6 +496,10 @@
      return col
    })
    if (reset) {
      message.warn('数值类型均为必填。')
    }
    this.setState({verify: {...verify, columns}}, () => {
      this.resetUniqueColumns()
@@ -844,6 +856,23 @@
              {verify.scripts.length ? <span className="count-tip">{verify.scripts.length}</span> : null}
            </span>
          } key="scripts" id="mk-exin-script">
            <FullScripts
              verify={verify}
              getScriptsFullForm={() => this.scriptsFullForm}
              getScriptsForm={() => this.scriptsForm}
              handleStatus={this.handleStatus}
              handleDelete={this.handleDelete}
            >
              <CustomScript
                type="fullscreen"
                btn={this.props.card}
                usefulfields={verify.columns}
                scripts={verify.scripts}
                systemScripts={this.state.systemScripts}
                scriptsChange={this.scriptsChange}
                wrappedComponentRef={(inst) => this.scriptsFullForm = inst}
              />
            </FullScripts>
            <CustomScript
              btn={this.props.card}
              usefulfields={verify.columns}