搜索组件

feature/2.0-sales-trade
Lei OT 2 years ago
parent 00b70fe392
commit 2fdb443514

@ -20,7 +20,7 @@ const Business_unit = (props) => {
} }
store?.bu_handleChange(value); store?.bu_handleChange(value);
}} }}
labelInValue={true} labelInValue={false}
{...extProps} {...extProps}
> >
{props.show_all ? <Select.Option key="-1" value="ALL">ALL 事业部</Select.Option> : ''} {props.show_all ? <Select.Option key="-1" value="ALL">ALL 事业部</Select.Option> : ''}

@ -21,7 +21,7 @@ const Business_unit = (props) => {
} }
// store?.bu_handleChange(value); // store?.bu_handleChange(value);
}} }}
labelInValue={true} labelInValue={false}
{...extProps} {...extProps}
> >
{_show_all ? <Select.Option key="-1" value="ALL">ALL 事业部</Select.Option> : ''} {_show_all ? <Select.Option key="-1" value="ALL">ALL 事业部</Select.Option> : ''}

@ -23,15 +23,16 @@ class DataTypeSelect extends Component {
}; };
render() { render() {
const store = this.props.store; const { store, ...extProps } = this.props;
return ( return (
<Select labelInValue={true} <Select labelInValue={false}
// value={store.date_type} // value={store.date_type}
value={this.props?.value || store?.date_type} value={this.props?.value || store?.date_type}
style={{ width: '100%' }} style={{ width: '100%' }}
placeholder="选择日期类型" placeholder="选择日期类型"
// onChange={(value) => store.onChange_datetype(value)} // onChange={(value) => store.onChange_datetype(value)}
onChange={this.handleChange} onChange={this.handleChange}
{...extProps}
> >
{dateTypes.map((ele) => ( {dateTypes.map((ele) => (
<Select.Option key={ele.key} value={ele.key}> <Select.Option key={ele.key} value={ele.key}>

@ -26,7 +26,7 @@ class GroupSelect extends Component {
} }
store?.group_handleChange(value); store?.group_handleChange(value);
}} }}
labelInValue={true} labelInValue={false}
maxTagCount={1} maxTagCount={1}
maxTagPlaceholder={(omittedValues) => ` + ${omittedValues.length} 更多...`} maxTagPlaceholder={(omittedValues) => ` + ${omittedValues.length} 更多...`}
allowClear={_mode != null} allowClear={_mode != null}

@ -175,7 +175,7 @@ export default observer((props) => {
}; };
const onValuesChange = (...args) => { const onValuesChange = (...args) => {
const [changedValues, allValues] = args; const [changedValues, allValues] = args;
console.log('form onValuesChange', Object.keys(changedValues), args); // console.log('form onValuesChange', Object.keys(changedValues), args);
const dest = formValuesMapper(allValues); const dest = formValuesMapper(allValues);
searchFormStore.setFormValues(allValues); searchFormStore.setFormValues(allValues);
@ -232,28 +232,28 @@ function getFields(props) {
'HTBusinessUnits', 'HTBusinessUnits',
99, 99,
<Form.Item name={`HTBusinessUnits`} initialValue={at(props, 'initialValue.HTBusinessUnits')[0] || undefined}> <Form.Item name={`HTBusinessUnits`} initialValue={at(props, 'initialValue.HTBusinessUnits')[0] || undefined}>
<BusinessUnitSelect {...fieldProps.HTBusinessUnits} /> <BusinessUnitSelect {...fieldProps.HTBusinessUnits} labelInValue={true} />
</Form.Item> </Form.Item>
), ),
item( item(
'businessUnits', 'businessUnits',
99, 99,
<Form.Item name={`businessUnits`} initialValue={at(props, 'initialValue.businessUnits')[0] || undefined}> <Form.Item name={`businessUnits`} initialValue={at(props, 'initialValue.businessUnits')[0] || undefined}>
<BusinessSelect {...fieldProps.businessUnits} /> <BusinessSelect {...fieldProps.businessUnits} labelInValue={true} />
</Form.Item> </Form.Item>
), ),
item( item(
'DepartmentList', 'DepartmentList',
99, 99,
<Form.Item name={`DepartmentList`} initialValue={at(props, 'initialValue.DepartmentList')[0] || (fieldProps?.DepartmentList?.show_all ? { key: 'ALL', label: '所有小组' } : undefined)}> <Form.Item name={`DepartmentList`} initialValue={at(props, 'initialValue.DepartmentList')[0] || (fieldProps?.DepartmentList?.show_all ? { key: 'ALL', label: '所有小组' } : undefined)}>
<GroupSelect {...fieldProps.DepartmentList} /> <GroupSelect {...fieldProps.DepartmentList} labelInValue={true} />
</Form.Item> </Form.Item>
), ),
item( item(
'WebCode', 'WebCode',
99, 99,
<Form.Item name={`WebCode`} initialValue={at(props, 'initialValue.WebCode')[0] || (fieldProps?.WebCode?.show_all ? { key: 'ALL', label: '所有来源' } : undefined)}> <Form.Item name={`WebCode`} initialValue={at(props, 'initialValue.WebCode')[0] || (fieldProps?.WebCode?.show_all ? { key: 'ALL', label: '所有来源' } : undefined)}>
<SiteSelect {...fieldProps.WebCode} /> <SiteSelect {...fieldProps.WebCode} labelInValue={true} />
</Form.Item> </Form.Item>
), ),
item( item(
@ -277,7 +277,7 @@ function getFields(props) {
'DateType', 'DateType',
99, 99,
<Form.Item name={`DateType`} initialValue={at(props, 'initialValue.DateType')[0] || { key: 'applyDate', label: '提交日期' }}> <Form.Item name={`DateType`} initialValue={at(props, 'initialValue.DateType')[0] || { key: 'applyDate', label: '提交日期' }}>
<DateTypeSelect /> <DateTypeSelect labelInValue={true} />
</Form.Item>, </Form.Item>,
2 2
), ),

@ -26,7 +26,7 @@ class SiteSelect extends Component {
} }
store?.handleChange_webcode(value); store?.handleChange_webcode(value);
}} }}
labelInValue={true} labelInValue={false}
maxTagCount={1} maxTagCount={1}
maxTagPlaceholder={(omittedValues) => ` + ${omittedValues.length} 更多...`} maxTagPlaceholder={(omittedValues) => ` + ${omittedValues.length} 更多...`}
allowClear={_mode != null} allowClear={_mode != null}

Loading…
Cancel
Save