king
2021-12-30 09e0de52a398dd08a0dc3f4b43e4589d211e9c27
src/tabviews/zshare/topSearch/index.jsx
@@ -16,7 +16,7 @@
import './index.scss'
const MutilForm = asyncSpinComponent(() => import('./advanceform'))
const MKCheckCard = asyncComponent(() => import('@/tabviews/zshare/mutilform/checkCard'))
const MKCheckCard = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkCheckCard'))
const MKSelect = asyncComponent(() => import('./mkSelect'))
const DateGroup = asyncComponent(() => import('./dategroup'))
const MKDatePicker = asyncComponent(() => import('./mkDatePicker'))
@@ -95,7 +95,8 @@
    }
    _searchlist.forEach(item => {
      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})
      }
@@ -131,7 +132,8 @@
          item.options.unshift({
            key: Utils.getuuid(),
            Value: '',
            Text: this.state.dict['main.all']
            Text: '全部',
            ParentID: ''
          })
        }
@@ -165,11 +167,11 @@
    let _list = _searchlist.map(item => {
      if (item.hidden) return item
      if (linkFields[item.field]) {
      if (linkFields[item.field] && (item.type === 'select' || item.type === 'link' || (item.type === 'checkcard' && item.multiple !== 'true'))) {
        item.linkFields = linkFields[item.field]
      }
      if (item.type === 'link') {
      if (item.linkField) {
        let supItem = fieldMap.get(item.linkField)
        
        if (!supItem) {
@@ -388,7 +390,7 @@
            _item = {..._item, ...cell}
          }
          if (item.type === 'link') {
          if (item.linkField) {
            _item.ParentID = cell[item.linkField]
          }
@@ -398,13 +400,13 @@
        item.oriOptions = [...item.oriOptions, ...options]
      }
      if (item.type === 'link') {
      if (item.linkField) {
        if (item.supInitVal) {
          item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal || option.Value === '')
        } else {
          item.options = item.oriOptions
        }
      } else if (item.type === 'select' || item.type === 'multiselect' || item.type === 'checkcard') {
      } else if (item.oriOptions) {
        item.options = item.oriOptions
      }
@@ -426,7 +428,9 @@
        this.handleSubmit()
      }, 1000)
    } else {
      this.handleSubmit()
      setTimeout(() => {
        this.handleSubmit()
      }, 10)
    }
  }
@@ -435,6 +439,16 @@
    this.record[item.field] = type
    this.handleSubmit()
  }
  cardChange = (val, item) => {
    this.record[item.field] = val
    if (!item.linkFields) {
      setTimeout(() => {
        this.handleSubmit()
      }, 10)
    }
  }
  getFields() {
@@ -469,7 +483,7 @@
        content = <DateGroup position={index} config={item} onChange={(val, type) => this.dateGroupChange(val, type, item)} />
      } else if (item.type === 'checkcard') {
        className = 'checkcard'
        content = <MKCheckCard card={item} onChange={this.handleSubmit} />
        content = <MKCheckCard config={item} onChange={(val) => this.cardChange(val, item)} />
      }
      if (content) {
@@ -520,7 +534,7 @@
    this.setState({}, () => {
      this.props.form.validateFields((err, values) => {
        if (err) return
        let { searches, error } = this.getFieldsValues(values)
  
        if (error) {