king
2024-05-21 66bdbc1df92e8ec4a5108a4e0323e25a7b9ff8f8
src/tabviews/zshare/mutilform/index.jsx
@@ -393,11 +393,13 @@
          message: item.label + '不可为空!'
        }]
        if (typeof(item.min) === 'number' || typeof(item.max) === 'number') {
        if (typeof(item.min) === 'number' || typeof(item.max) === 'number' || item.notZero === 'true') {
          item.rules.push({
            validator: (rule, value, callback) => {
              if (isNaN(value)) {
                callback()
              } else if (item.notZero === 'true' && value === 0) {
                callback(item.label + '不可为0')
              } else if (typeof(item.min) === 'number' && value < item.min) {
                if (item.min < 1e-6) {
                  if (item.min === 1e-6) {
@@ -617,7 +619,11 @@
        item.supInitVal = ''
        if (fieldMap.has(item.linkField)) {
          item.supInitVal = fieldMap.get(item.linkField).initval || ''
          let supitem = fieldMap.get(item.linkField)
          item.supInitVal = supitem.initval || ''
          if (supitem.$first) {
            item.$resetSup = true
          }
        } else if (data.hasOwnProperty(item.linkField.toLowerCase())) {
          item.supInitVal = data[item.linkField.toLowerCase()]
        }
@@ -1087,7 +1093,11 @@
        // if (item.type === 'link') {
        if (item.linkField) {
          item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal || option.value === '')
          let supInitVal = item.supInitVal
          if (item.$resetSup) {
            supInitVal = this.record[item.linkField]
          }
          item.options = item.oriOptions.filter(option => option.ParentID === supInitVal || option.value === '')
        // } else if (['select', 'radio', 'checkbox', 'checkcard', 'multiselect'].includes(item.type)) {
        } else {
          item.options = item.oriOptions
@@ -1229,11 +1239,17 @@
      if (item.hidden) return
      if (item.type === 'split') {
        fields.push(
          <Col span={24} key={index}>
            <p className="mk-form-split-line" style={item.style}>{item.label}</p>
          </Col>
        )
        if (item.opacity === 'false') {
          fields.push(
            <div key={index}></div>
          )
        } else {
          fields.push(
            <Col span={24} key={index}>
              <p className="mk-form-split-line" style={item.style}>{item.label}</p>
            </Col>
          )
        }
      } else if (item.type === 'hint') {
        fields.push(
          <Col span={item.span || 24} key={index}>