king
2020-11-26 94339c7aa85dfc23a32790455629509f42096c2e
src/tabviews/zshare/mutilform/index.jsx
@@ -123,11 +123,11 @@
      fieldlen[item.field] = _fieldlen
      if (item.type === 'select' || item.type === 'link' || item.type === 'multiselect' || item.type === 'radio' || item.type === 'checkbox') {
        if (item.setAll === 'true') {
        if (item.setAll === 'true' && (item.type === 'select' || item.type === 'link' || item.type === 'radio')) {
          item.options.unshift({
            key: Utils.getuuid(),
            Value: '',
            Text: this.props.dict['main.all']
            Text: item.emptyText || '空'
          })
        }
@@ -406,26 +406,29 @@
      let _formlist = formlist.map(item => {
        if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(item.type) && result[item.field] && result[item.field].length > 0) {
          let options = result[item.field].map(cell => {
          let options = []
          result[item.field].forEach(cell => {
            let _cell = { key: Utils.getuuid() }
            if (item.type !== 'checkcard') {
              _cell.Value = cell[item.valueField]
              _cell.Text = cell[item.valueText]
              if ((!_cell.Value && _cell.Value !== 0) || (!_cell.Text && _cell.Text !== 0)) return
            } else {
              _cell.$value = cell[item.valueField]
              _cell = {..._cell, ...cell}
              if (!_cell.$value && _cell.$value !== 0) return
            }
    
            if (item.type === 'link') {
              _cell.ParentID = cell[item.linkField]
              _cell.ParentID = cell[item.linkField] === undefined ? '' : cell[item.linkField]
            } else if ((item.type === 'select' || item.type === 'radio') && item.linkSubField && item.linkSubField.length > 0) {
              item.linkSubField.forEach(_field => {
                _cell[_field] = (cell[_field] || cell[_field] === 0) ? cell[_field] : ''
              })
            }
    
            return _cell
            options.push(_cell)
          })
          item.oriOptions = [...item.oriOptions, ...options]
@@ -500,26 +503,29 @@
      let _formlist = formlist.map(item => {
        if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(item.type) && result[item.field] && result[item.field].length > 0) {
          let options = result[item.field].map(cell => {
          let options = []
          result[item.field].forEach(cell => {
            let _cell = { key: Utils.getuuid() }
            if (item.type !== 'checkcard') {
              _cell.Value = cell[item.valueField]
              _cell.Text = cell[item.valueText]
              if ((!_cell.Value && _cell.Value !== 0) || (!_cell.Text && _cell.Text !== 0)) return
            } else {
              _cell.$value = cell[item.valueField]
              _cell = {..._cell, ...cell}
              if (!_cell.$value && _cell.$value !== 0) return
            }
    
            if (item.type === 'link') {
              _cell.ParentID = cell[item.linkField]
              _cell.ParentID = cell[item.linkField] === undefined ? '' : cell[item.linkField]
            } else if ((item.type === 'select' || item.type === 'radio') && item.linkSubField && item.linkSubField.length > 0) {
              item.linkSubField.forEach(_field => {
                _cell[_field] = (cell[_field] || cell[_field] === 0) ? cell[_field] : ''
              })
            }
    
            return _cell
            options.push(_cell)
          })
          item.oriOptions = [...item.oriOptions, ...options]
@@ -916,6 +922,7 @@
              })(
                <Select
                  showSearch
                  allowClear={true}
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  onChange={(value) => {this.selectChange(item, value)}}
                  disabled={item.readonly === 'true'}