king
2024-10-28 ba4d6e414fbb37121e80815d3f5ab1aca7a60b08
src/templates/zshare/verifycard/index.jsx
@@ -754,13 +754,14 @@
    let formfields = []
    _fields = _fields.filter(_f => _f.field)
    _fields.forEach(_f => {
      if (_f.field.toLowerCase() === 'bid') {
      let key = _f.field.toLowerCase()
      if (key === 'bid') {
        hasBid = true
      }
      if (fieldArr.includes(_f.field.toLowerCase())) return
      if (fieldArr.includes(key)) return
      fieldArr.push(_f.field.toLowerCase())
      fieldArr.push(key)
      formfields.push(_f.field)
@@ -791,6 +792,8 @@
      } else {
        _select.push(`@${_f.field}=''`)
      }
      if (['appkey'].includes(key)) return
      _declare.push(`@${_f.field} ${_type}`)
    })
@@ -831,31 +834,34 @@
            _select.push(`@${_f.field}=''`)
          }
          if (['appkey'].includes(key)) return
          _declare.push(`@${_f.field} ${_f.datatype}`)
          return
        }
        let _fieldlen = _f.fieldlength || 50
        if (_fieldlen > 4000) {
          _fieldlen = 'max'
        }
        let _type = `nvarchar(${_fieldlen})`
        if (_f.type === 'number') {
          _type = `decimal(18,${_f.decimal ? _f.decimal : 0})`
        } else if (_f.type === 'picture' || _f.type === 'textarea') {
          _type = `nvarchar(${_fieldlen})`
        }
        if (_f.type === 'number') {
          _select.push(`@${_f.field}=1`)
        } else {
          _select.push(`@${_f.field}=''`)
        }
          let _fieldlen = _f.fieldlength || 50
          if (_fieldlen > 4000) {
            _fieldlen = 'max'
          }
          let _type = `nvarchar(${_fieldlen})`
          if (_f.type === 'number') {
            _type = `decimal(18,${_f.decimal ? _f.decimal : 0})`
          } else if (_f.type === 'picture' || _f.type === 'textarea') {
            _type = `nvarchar(${_fieldlen})`
          }
          if (_f.type === 'number') {
            _select.push(`@${_f.field}=1`)
          } else {
            _select.push(`@${_f.field}=''`)
          }
          if (['appkey'].includes(key)) return
        _declare.push(`@${_f.field} ${_type}`)
          _declare.push(`@${_f.field} ${_type}`)
        }
      })
    }