king
2023-04-15 f060c6cef14f380afb7bb67c12240b4ab241d5e6
2023-04-15
2个文件已修改
32 ■■■■ 已修改文件
src/tabviews/zshare/actionList/normalbutton/index.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -855,17 +855,20 @@
  
      if (!_initvars.includes(_key)) {
        _initvars.push(_key)
        let val = form.value
  
        if (form.type === 'number' || form.type === 'rate') {
          let val = form.value
          if (isNaN(val)) {
            val = 0
          }
          _initFormfields.push(`@${_key}=${val}`)
        } else if (['date', 'datemonth'].includes(form.type)) {
          _initFormfields.push(`@${_key}='${form.value || '1949-10-01'}'`)
          _initFormfields.push(`@${_key}='${val || '1949-10-01'}'`)
        } else {
          _initFormfields.push(`@${_key}='${form.value}'`)
          if (/'/.test(val)) {
            val = val.replace(/'/ig, '"')
          }
          _initFormfields.push(`@${_key}='${val}'`)
        }
      }
      
@@ -912,6 +915,10 @@
            _val = '1949-10-01'
          }
  
          if (/'/.test(_val)) {
            _val = _val.replace(/'/ig, '"')
          }
          _initvars.push(_key)
          _initColfields.push(`@${_key}='${_val}'`)
        }
src/utils/utils.js
@@ -962,7 +962,11 @@
          val = val.toString()
        }
        val = val.replace(/(^\s*$)|\t*|\v*|'*/ig, '')
        if (/'/.test(val)) {
          val = val.replace(/'/ig, '"')
        }
        val = val.replace(/(^\s*$)|\t*|\v*/ig, '')
        if (!val && col.required === 'true') {            // 必填校验
          errors.push(_position + '内容不可为空')
@@ -1469,17 +1473,20 @@
    if (!_initvars.includes(_key)) {
      _initvars.push(_key)
      let val = form.value
      if (form.type === 'number' || form.type === 'rate') {
        let val = form.value
        if (isNaN(val)) {
          val = 0
        }
        _initFormfields.push(`@${_key}=${val}`)
      } else if (['date', 'datemonth'].includes(form.type)) {
        _initFormfields.push(`@${_key}='${form.value || '1949-10-01'}'`)
        _initFormfields.push(`@${_key}='${val || '1949-10-01'}'`)
      } else {
        _initFormfields.push(`@${_key}='${form.value}'`)
        if (/'/.test(val)) {
          val = val.replace(/'/ig, '"')
        }
        _initFormfields.push(`@${_key}='${val}'`)
      }
    }
    
@@ -1526,6 +1533,10 @@
          _val = '1949-10-01'
        }
        if (/'/.test(_val)) {
          _val = _val.replace(/'/ig, '"')
        }
        _initvars.push(_key)
        _initColfields.push(`@${_key}='${_val}'`)
      }