king
2023-08-27 da64ab0923bf8817fc8599a6e37b953ce38f64c8
src/tabviews/zshare/topSearch/advanceform/index.jsx
@@ -6,9 +6,11 @@
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const { Search } = Input
const MKCheckCard = asyncComponent(() => import('@/tabviews/zshare/mutilform/checkCard'))
const MKCheckCard = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkCheckCard'))
const MKSelect = asyncComponent(() => import('../mkSelect'))
const MKCheck = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkCheck'))
const MKSwitch = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkSwitch'))
const MKRadio = asyncComponent(() => import('../mkRadio'))
const MKDatePicker = asyncComponent(() => import('../mkDatePicker'))
class AdvanceSearch extends Component {
@@ -42,23 +44,29 @@
      item.initval = record[item.field] || ''
      if (item.type === 'text') {
        if (item.inputType === 'search') {
          content = <Search allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onSearch={this.handleSubmit} enterButton/>
        } else {
          content = <Input allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSubmit} />
        }
        content = <Input allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSubmit} />
      } else if (item.type === 'select' || item.type === 'link' || item.type === 'multiselect') {
        content = (<MKSelect config={item}/>)
      } else if (item.type === 'date' || item.type === 'datemonth' || item.type === 'dateweek' || item.type === 'daterange') {
        content = (<MKDatePicker config={item}/>)
      } else if (item.type === 'checkcard') {
        content = <MKCheckCard card={item}/>
        content = <MKCheckCard config={item}/>
      } else if (item.type === 'radio') {
        content = <MKRadio config={item} onChange={(val) => this.recordChange(val, false, item)} />
      } else if (item.type === 'check') {
        content = <MKCheck config={item}/>
      } else if (item.type === 'switch') {
        content = <MKSwitch config={item}/>
      }
      if (content) {
        fields.push(
          <Col span={item.ratio || 6} key={index}>
            <Form.Item label={item.labelShow !== 'false' ? item.label : ''}>
          <Col className="mk-search-col" span={item.ratio || 6} key={index}>
            <Form.Item
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.labelShow !== 'false' ? item.label : ''}
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: _rules