king
2021-12-29 2245384d97d69e36d09cd6baa877e50a81d9aff9
src/tabviews/zshare/mutilform/index.jsx
@@ -56,18 +56,23 @@
    let check = action.setting.formType === 'check'
    formlist = formlist.filter(item => {
      if (item.supField && item.supvalue) { // 多层表单控制
      if (item.supField) { // 多层表单控制
        let supvals = []
        item.supvalue.split(',').forEach(val => {
          supvals.push(val)
          if (/^([-]?(0|[1-9][0-9]*)(\.[0-9]+)?)$/.test(val)) {
            supvals.push(+val)
          }
        })
        if (item.supvalue) {
          item.supvalue.split(',').forEach(val => {
            supvals.push(val)
            if (/^([-]?(0|[1-9][0-9]*)(\.[0-9]+)?)$/.test(val)) {
              supvals.push(+val)
            }
          })
        } else {
          supvals.push('')
        }
        controlFields[item.supField] = controlFields[item.supField] || []
        controlFields[item.supField].push({field: item.field, values: supvals})
      }
      if (item.type === 'link') {
      // if (item.type === 'link') {
      if (item.linkField) {
        linkFields[item.linkField] = linkFields[item.linkField] || []
        linkFields[item.linkField].push({field: item.field, uuid: item.uuid})
      }
@@ -317,7 +322,8 @@
      if (!cell.field || !fieldMap.has(cell.field)) return cell
      let item = fieldMap.get(cell.field)
      if (item.type === 'link') {
      // if (item.type === 'link') {
      if (item.linkField) {
        item.supInitVal = ''
        if (fieldMap.has(item.linkField)) {
@@ -585,7 +591,7 @@
            _cell = {..._cell, ...cell}
          }
  
          if (item.type === 'link') {
          if (item.linkField) {
            _cell.ParentID = cell[item.linkField] === undefined ? '' : cell[item.linkField]
          }
          if (item.subFields) {
@@ -603,9 +609,11 @@
        item.oriOptions = [...item.oriOptions, ...options]
        if (item.type === 'link') {
        // if (item.type === 'link') {
        if (item.linkField) {
          item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal || option.value === '')
        } else if (['select', 'radio', 'checkbox', 'checkcard', 'multiselect'].includes(item.type)) {
        // } else if (['select', 'radio', 'checkbox', 'checkcard', 'multiselect'].includes(item.type)) {
        } else {
          item.options = item.oriOptions
        }
      }
@@ -722,7 +730,7 @@
        } else if (item.type === 'checkbox') {
          content = (<MKCheckbox config={item} onChange={(val) => this.recordChange({[item.field]: val})}/>)
        } else if (item.type === 'radio') {
          content = (<MKRadio config={item} onChange={(val) => this.recordChange({[item.field]: val}, item)}/>)
          content = (<MKRadio config={item} onChange={(val, other) => this.recordChange({[item.field]: val, ...other}, item)}/>)
        } else if (item.type === 'date' || item.type === 'datemonth' || item.type === 'datetime') {
          content = (<MKDatePicker config={item} onChange={(val) => this.recordChange({[item.field]: val})} />)
        } else if (item.type === 'fileupload') {