king
2024-04-29 50b49c1b760489c3430fc382656d57c5fbbab07c
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -716,39 +716,46 @@
        if (!err) {
          let _verify = {...verify, ...values}
          if (_verify.excelHandle !== 'true') {
          if (_verify.excelHandle !== 'true') {
            delete _verify.excel_func
          }
          if (_verify.default === 'false' && _verify.scripts.length === 0) {
            notification.warning({
              top: 92,
              message: '不执行默认sql时,必须设置自定义脚本!',
              duration: 5
            })
            return
          }
          let cols = _verify.columns.map(col => col.Column.toLowerCase())
          cols = Array.from(new Set(cols))
          let error = ''
          if (_verify.columns.length === 0) {
            notification.warning({
              top: 92,
              message: '请设置Excel列字段!',
              duration: 5
            })
            return
            error = '请设置Excel列字段!'
          } else if (_verify.columns.length > cols.length) {
            notification.warning({
              top: 92,
              message: 'Excel列字段名,不可重复!',
              duration: 5
            })
            return
            error = 'Excel列字段名,不可重复!'
          } else if (cols.includes('bid')) {
            error = 'bid字段为保留字,不可使用!'
          } else if (cols.includes('jskey')) {
            error = 'jskey字段为保留字,不可使用!'
          } else if (_verify.range === 1) {
            let tEmptys = _verify.columns.filter(op => !op.Text)
            if (tEmptys.length > 0) {
              notification.warning({
                top: 92,
                message: '忽略首行时,会使用Text值校验Excel首行内容,Text值与Excel表首行内容相同,且均不可为空!',
                duration: 5
              })
              return
              error = '忽略首行时,会使用Text值校验Excel首行内容,Text值与Excel表首行内容相同,且均不可为空!'
            }
          }
          if (error) {
            notification.warning({
              top: 92,
              message: error,
              duration: 5
            })
            return
          }
          _verify.columns.sort((a, b) => {
            if (a.import === 'init' && b.import !== 'init') {
              return 1