king
2025-05-27 a5bc394eceeaae5923057f1fd919968fd234af23
src/utils/utils.js
@@ -249,9 +249,6 @@
              config.checkBid = true
              item.checkShift = true
              if (config.setting) {
                config.setting.checkBid = true
              }
            }
            item.initval = ''
@@ -317,9 +314,6 @@
              config.checkBid = true
              item.checkShift = true
              if (config.setting) {
                config.setting.checkBid = true
              }
            }
            item.initval = ''
@@ -418,9 +412,6 @@
        if (/@BID@/ig.test(item.dataSource) && supModule) {
          config.checkBid = true
          item.checkBid = true
          if (config.setting) {
            config.setting.checkBid = true
          }
        }
        if (item.initval === '$first') {
          item.initval = ''
@@ -468,6 +459,15 @@
      return item
    })
    if (config.checkBid) {
      if (config.setting) {
        config.setting.checkBid = true
      }
      if (config.type !== 'search') {
        config.$checkBid = true
      }
    }
    config.$s_keys = keys
    config.$s_req = required
@@ -1188,6 +1188,10 @@
        val = val.replace(/(^\s+$)|\t+|\v+/ig, '')
        if (col.interception !== 'false') {
          val = val.replace(/^\s+|\s+$/g, '')
        }
        if (!val && col.required === 'true') {            // 必填校验
          errors.push(_position + '内容不可为空')
        } else if (col.limit && val.length > col.limit) { // 长度校验
@@ -1877,6 +1881,7 @@
  let _initColfields = []
  let _declarefields = []
  let verifyValSql = ''
  let datavars = {}
  // 获取字段键值对
  formdata && formdata.forEach(form => {
@@ -1891,6 +1896,7 @@
    }
    let _key = form.key.toLowerCase()
    datavars[_key] = form.value
    if (!_initvars.includes(_key)) {
      _initvars.push(_key)
@@ -1945,6 +1951,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 +2247,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 +2258,6 @@
        
        if (_key === 'bid') {
          _val2 = BID
        } else {
          _val2 = `' + @${_field} + '`
        }
        
        _fieldValue.push(`${_key}=${_val}`)