king
2021-12-07 b41a10bc4bf59c1741a1219616c1c74ee6edc39a
src/utils/utils.js
@@ -1383,7 +1383,7 @@
    if (!_initvars.includes(_key)) {
      _initvars.push(_key)
      if (form.type === 'number') {
      if (form.type === 'number' || form.type === 'rate') {
        let val = form.value
        if (typeof(val) !== 'number') {
          val = parseFloat(val)
@@ -1392,6 +1392,8 @@
          }
        }
        _initFormfields.push(`@${_key}=${val}`)
      } else if (['date', 'datemonth', 'datetime'].includes(form.type)) {
        _initFormfields.push(`@${_key}='${form.value || '1900-01-01'}'`)
      } else {
        _initFormfields.push(`@${_key}='${form.value}'`)
      }
@@ -1410,6 +1412,8 @@
        _type = 'datetime'
      } else if (form.type === 'number') {
        _type = `decimal(18,${form.fieldlen})`
      } else if (form.type === 'rate') {
        _type = `decimal(18,2)`
      }
      _declarefields.push(`@${_key} ${_type}`)
@@ -2255,6 +2259,8 @@
            type = 'datetime=null'
          } else if (item.type === 'number') {
            type = `decimal(18,${item.decimal})=0`
          } else if (item.type === 'rate') {
            type = `decimal(18,2)=0`
          } else {
            type = 'nvarchar(50)=\'\''
          }