king
2021-03-17 922fbb1d818d5fa8c178c66b21885291e6376701
src/tabviews/zshare/mutilform/index.jsx
@@ -59,8 +59,7 @@
  }
  componentDidMount () {
    const { data, BData } = this.props
    let action = fromJS(this.props.action).toJS()
    const { data, BData, action } = this.props
    
    let datatype = {}
    let readtype = {}
@@ -71,8 +70,9 @@
    let intercepts = []
    let _inputfields = []
    if (action.groups.length > 0) {
      action.groups.forEach(group => {
    if (action.groups && action.groups.length > 0) {
      let groups = fromJS(action.groups).toJS()
      groups.forEach(group => {
        if (group.sublist.length === 0) return
        if (!group.default) {
@@ -86,7 +86,7 @@
        formlist.push(...group.sublist)
      })
    } else {
      formlist = action.fields
      formlist = fromJS(action.fields).toJS()
    }
    let linkFields = {} // 关联菜单
@@ -153,11 +153,11 @@
      if (item.type === 'linkMain') {
        newval = BData && BData[item.field] ? BData[item.field] : ''
      } else if (_readin && !/^date/.test(item.type) && this.props.data && this.props.data.hasOwnProperty(item.field)) {
        newval = this.props.data[item.field]
      } else if (_readin && !/^date/.test(item.type) && data && data.hasOwnProperty(item.field)) {
        newval = data[item.field]
      } else if (item.type === 'date') { // 时间搜索
        if (_readin && this.props.data && this.props.data.hasOwnProperty(item.field)) {
          newval = this.props.data[item.field]
        if (_readin && data && data.hasOwnProperty(item.field)) {
          newval = data[item.field]
        }
        if (newval) {
          newval = moment(newval, 'YYYY-MM-DD')
@@ -169,8 +169,8 @@
          newval = null
        }
      } else if (item.type === 'datemonth') {
        if (_readin && this.props.data && this.props.data.hasOwnProperty(item.field)) {
          newval = this.props.data[item.field]
        if (_readin && data && data.hasOwnProperty(item.field)) {
          newval = data[item.field]
        }
        if (newval) {
          newval = moment(newval, 'YYYY-MM')
@@ -182,8 +182,8 @@
          newval = null
        }
      } else if (item.type === 'datetime') {
        if (_readin && this.props.data && this.props.data.hasOwnProperty(item.field)) {
          newval = this.props.data[item.field]
        if (_readin && data && data.hasOwnProperty(item.field)) {
          newval = data[item.field]
        }
        if (newval) {
          newval = moment(newval, 'YYYY-MM-DD HH:mm:ss')
@@ -1402,7 +1402,7 @@
    }
    return (
      <Form {...formItemLayout} className="ant-advanced-search-form main-form-field" id="main-form-box">
      <Form {...formItemLayout} className="main-form-field" id="main-form-box">
        <Row className={'cols' + cols} gutter={24}>{this.getFields()}</Row>
      </Form>
    )