| | |
| | | import './index.scss' |
| | | |
| | | const { MonthPicker, WeekPicker, RangePicker } = DatePicker |
| | | const { Search } = Input |
| | | |
| | | const MutilForm = asyncSpinComponent(() => import('./advanceform')) |
| | | const CheckCard = asyncComponent(() => import('@/tabviews/zshare/mutilform/checkCard')) |
| | |
| | | _searchlist = fromJS(config.search).toJS() |
| | | if (config.type === 'search' && config.subtype === 'mainsearch') { |
| | | float = config.wrap.float |
| | | showButton = config.wrap.float === 'left' && config.wrap.show === 'true' |
| | | showButton = config.wrap.show !== 'false' |
| | | searchStyle = config.style |
| | | } else { |
| | | formId = '' |
| | |
| | | item.required = item.required === 'true' |
| | | |
| | | if (['select', 'link', 'multiselect', 'checkcard'].includes(item.type)) { |
| | | if (item.setAll === 'true' && item.type !== 'multiselect') { |
| | | if (item.setAll === 'true' && ['select', 'link'].includes(item.type)) { |
| | | item.options.unshift({ |
| | | key: Utils.getuuid(), |
| | | Value: '', |
| | |
| | | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const { dict, showButton, formId, showAdvanced } = this.state |
| | | const { dict, showButton, formId, showAdvanced, float } = this.state |
| | | const fields = [] |
| | | |
| | | this.state.searchlist.forEach((item, index) => { |
| | |
| | | message: dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<Input placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSearch} />)} |
| | | })(item.inputType === 'search' ? |
| | | <Search placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onSearch={this.handleSearch} enterButton/> : |
| | | <Input placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSearch} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'checkcard') { // 多选框 |
| | | } else if (item.type === 'checkcard') { |
| | | fields.push( |
| | | <Col span={item.ratio || 6} key={index}> |
| | | <Form.Item label={item.labelShow !== 'false' ? item.label : ''}> |
| | |
| | | }) |
| | | |
| | | if (showButton) { |
| | | fields.push( |
| | | let action = ( |
| | | <Col span={6} style={{ whiteSpace: 'nowrap' }} className="search-button" key="actions"> |
| | | <Form.Item label={' '} colon={false} style={{ minHeight: '40px' }}> |
| | | <Button type="primary" onClick={this.handleSearch}> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | if (float === 'right') { |
| | | fields.unshift(action) |
| | | } else { |
| | | fields.push(action) |
| | | } |
| | | } |
| | | |
| | | return fields |
| | |
| | | cell.match = 'between' |
| | | |
| | | search.push(cell) |
| | | if (item.transfer === 'true') { |
| | | let copy = fromJS(cell).toJS() |
| | | copy.type = 'group' |
| | | copy.key = item.field.replace(/@tail@$/, '') |
| | | copy.value = searchValues[item.field] || '' |
| | | copy.match = '=' |
| | | copy.forbid = true |
| | | search.push(copy) |
| | | } |
| | | |
| | | let copy = fromJS(cell).toJS() |
| | | copy.type = 'group' |
| | | copy.key = item.field.replace(/@tail@$/, '') |
| | | copy.value = searchValues[item.field] || '' |
| | | copy.match = '=' |
| | | copy.forbid = true |
| | | search.push(copy) |
| | | } else { |
| | | let _value = values[item.field] || cell.value || '' |
| | | if (!_value) { |