1) 增加 映射分销商 模糊搜索
This commit is contained in:
parent
3bf0ecc1a7
commit
f608c84598
|
@ -10,6 +10,8 @@ const UseLazyLoadingSelect = ({
|
|||
width,
|
||||
onChangePage,
|
||||
disabled = false,
|
||||
onKeywordChange,
|
||||
keyword = "",
|
||||
}) => {
|
||||
let firstOpen = true;
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
@ -74,6 +76,8 @@ const UseLazyLoadingSelect = ({
|
|||
disabled={disabled}
|
||||
onOpenChange={handleOpenChange}
|
||||
renderOptionList={renderOptionList}
|
||||
onKeywordChange={onKeywordChange}
|
||||
keyword={keyword}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -168,6 +168,7 @@ export default class adduserinfo extends React.Component {
|
|||
], //身份类型
|
||||
limit: 15,
|
||||
page: 1,
|
||||
keyword: "",
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -190,16 +191,7 @@ export default class adduserinfo extends React.Component {
|
|||
this.directList(params);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
// 典型用法(不要忘记比较 props):
|
||||
if (this.state.page !== prevState.page) {
|
||||
let params = {
|
||||
limit: this.state.limit,
|
||||
page: this.state.page,
|
||||
};
|
||||
this.directList(params);
|
||||
}
|
||||
}
|
||||
componentDidUpdate(prevProps, prevState) {}
|
||||
|
||||
// 获取分销商数据
|
||||
directList(param) {
|
||||
|
@ -298,6 +290,11 @@ export default class adduserinfo extends React.Component {
|
|||
this.setState({
|
||||
page: that.state.page + 1,
|
||||
});
|
||||
let params = {
|
||||
limit: this.state.limit,
|
||||
page: that.state.page + 1,
|
||||
};
|
||||
this.directList(params);
|
||||
closeLoading && closeLoading();
|
||||
}
|
||||
//校验分销商名称
|
||||
|
@ -536,6 +533,16 @@ export default class adduserinfo extends React.Component {
|
|||
changeKind() {
|
||||
this.setState({ pwdtype: "password" });
|
||||
}
|
||||
onKeywordChange(e) {
|
||||
console.log("keyword ==>", e);
|
||||
let params = {
|
||||
limit: this.state.limit,
|
||||
page: this.state.page,
|
||||
key_word: e,
|
||||
};
|
||||
this.directList(params);
|
||||
this.setState({ keyword: e });
|
||||
}
|
||||
render() {
|
||||
const companyOptions = this.state.companyList;
|
||||
//校验规则
|
||||
|
@ -1147,6 +1154,8 @@ export default class adduserinfo extends React.Component {
|
|||
value={this.state.model.direct_reseller_id}
|
||||
onChangePage={this.onChangePageSelect.bind(this)}
|
||||
disabled={this.state.isSelectDirect}
|
||||
keyword={this.state.keyword}
|
||||
onKeywordChange={this.onKeywordChange.bind(this)}
|
||||
onChange={(e) => {
|
||||
this.onDirectChange(e);
|
||||
Bus.emit("change", "direct_reseller_id", e);
|
||||
|
|
Loading…
Reference in New Issue