king
2025-03-31 ca3737b6e1b379bd2a68c8b2d97996c5a03eb96a
2025-03-31
5个文件已修改
49 ■■■■ 已修改文件
src/menu/components/card/cardcomponent/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardsimplecomponent/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/doublecardcomponent/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/index.jsx
@@ -294,7 +294,8 @@
          field: item.field || '',
          width: item.span || 12,
          value: '',
          style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'}
          style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'},
          fixStyle: 'alone'
        }
        if (item.type === 'number') {
src/menu/components/card/cardsimplecomponent/index.jsx
@@ -210,7 +210,8 @@
          field: item.field || '',
          width: item.span || 12,
          value: '',
          style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'}
          style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'},
          fixStyle: 'alone'
        }
        if (item.type === 'number') {
src/menu/components/card/doublecardcomponent/index.jsx
@@ -231,7 +231,8 @@
          field: item.field || '',
          width: item.span || 12,
          value: '',
          style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'}
          style: {marginBottom: '15px', color: 'rgba(0, 0, 0, 0.85)'},
          fixStyle: 'alone'
        }
        if (item.type === 'number') {
src/utils/utils-custom.js
@@ -3933,6 +3933,30 @@
  
    // 唯一性验证,必须存在表单(表单存在时,主键均为单值),必须填写数据源,多行拼接时不可用
    if (formdata && verify.uniques && verify.uniques.length > 0 && btn.Ot !== 'requiredOnce') {
      let nFields = []
      let dataFields = []
      formdata.forEach(form => {
        let _key = form.key.toLowerCase()
        if (form.type === 'number' || form.type === 'rate') {
          nFields.push(_key)
        } else if (form.type === 'date') {
          dataFields.push(_key)
        }
      })
      if (columns && columns.length > 0 && btn.Ot !== 'notRequired') {
        columns.forEach(col => {
          let _key = col.field.toLowerCase()
          if (col.type === 'number') {
            if (!nFields.includes(_key)) {
              nFields.push(_key)
            }
          } else if (/^date/ig.test(col.datatype)) {
            if (!dataFields.includes(_key)) {
              dataFields.push(_key)
            }
          }
        })
      }
      verify.uniques.forEach(item => {
        let _fieldValue = []                     // 表单键值对field=value
        let _value = []                          // 表单值,用于错误提示
@@ -3958,7 +3982,13 @@
            _val2 = `' + ${BID} + '`
          } else {
            // _val2 = `@mk_${_key}_mk@`
            _val2 = `' + @${_field} + '`
            if (nFields.includes(_key)) {
              _val2 = `' + cast (@${_field} as nvarchar(50)) + '`
            } else if (dataFields.includes(_key)) {
              _val2 = `' + CONVERT(nvarchar(50), @${_field}, 23) + '`
            } else {
              _val2 = `' + @${_field} + '`
            }
          }
          _value.push(`${_labels[index] || ''}:${_val2}`)
src/utils/utils.js
@@ -1877,6 +1877,7 @@
  let _initColfields = []
  let _declarefields = []
  let verifyValSql = ''
  let datavars = {}
  // 获取字段键值对
  formdata && formdata.forEach(form => {
@@ -1891,6 +1892,7 @@
    }
    let _key = form.key.toLowerCase()
    datavars[_key] = form.value
    if (!_initvars.includes(_key)) {
      _initvars.push(_key)
@@ -1945,6 +1947,8 @@
  // 添加数据中字段,表单值优先(按钮不选行或多行拼接时跳过)
  if (data && btn.Ot !== 'notRequired' && columns && columns.length > 0) {
    datavars = {..._data, ...datavars}
    const setField = (col) => {
      if (!col.field) return
      let _key = col.field.toLowerCase()
@@ -2239,7 +2243,7 @@
      item.field.split(',').forEach((_field, index) => {
        let _key = _field.toLowerCase()
        let _val = ''
        let _val2 = ''
        let _val2 = datavars[_key] !== undefined ? datavars[_key] : ''
        arr.push(_key)
        if (_key === 'bid') {
@@ -2250,8 +2254,6 @@
        
        if (_key === 'bid') {
          _val2 = BID
        } else {
          _val2 = `' + @${_field} + '`
        }
        
        _fieldValue.push(`${_key}=${_val}`)