搜索组件

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);
}}
labelInValue={true}
labelInValue={false}
{...extProps}
>
{props.show_all ? <Select.Option key="-1" value="ALL">ALL 事业部</Select.Option> : ''}

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

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

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

@ -175,7 +175,7 @@ export default observer((props) => {
};
const onValuesChange = (...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);
searchFormStore.setFormValues(allValues);
@ -232,28 +232,28 @@ function getFields(props) {
'HTBusinessUnits',
99,
<Form.Item name={`HTBusinessUnits`} initialValue={at(props, 'initialValue.HTBusinessUnits')[0] || undefined}>
<BusinessUnitSelect {...fieldProps.HTBusinessUnits} />
<BusinessUnitSelect {...fieldProps.HTBusinessUnits} labelInValue={true} />
</Form.Item>
),
item(
'businessUnits',
99,
<Form.Item name={`businessUnits`} initialValue={at(props, 'initialValue.businessUnits')[0] || undefined}>
<BusinessSelect {...fieldProps.businessUnits} />
<BusinessSelect {...fieldProps.businessUnits} labelInValue={true} />
</Form.Item>
),
item(
'DepartmentList',
99,
<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>
),
item(
'WebCode',
99,
<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>
),
item(
@ -277,7 +277,7 @@ function getFields(props) {
'DateType',
99,
<Form.Item name={`DateType`} initialValue={at(props, 'initialValue.DateType')[0] || { key: 'applyDate', label: '提交日期' }}>
<DateTypeSelect />
<DateTypeSelect labelInValue={true} />
</Form.Item>,
2
),

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

Loading…
Cancel
Save