1) 增加 分销商 列表

This commit is contained in:
zhangds 2022-04-13 16:09:41 +08:00
parent 3643b0faed
commit b4e22647cc
3 changed files with 12 additions and 1 deletions

View File

@ -9,6 +9,7 @@ const UseLazyLoadingSelect = ({
onChange,
width,
onChangePage,
disabled = false,
}) => {
let firstOpen = true;
const [loading, setLoading] = useState(true);
@ -70,6 +71,7 @@ const UseLazyLoadingSelect = ({
width={width}
loading={loading}
open={open}
disabled={disabled}
onOpenChange={handleOpenChange}
renderOptionList={renderOptionList}
/>

View File

@ -75,6 +75,7 @@ export default class acclist extends React.Component {
delete data.email2;
delete data.email3;
delete data.email4;
data.direct_reseller_id = formInfo.direct_reseller_id.key;
if (_this.state.enumer == 0) {
postCreateReseller(data)
.then((res) => {

View File

@ -44,6 +44,7 @@ export default class adduserinfo extends React.Component {
phoneSwitch: [false, false, false, false],
emailSwitch: [false, false, false, false],
defaultFileList: [{ src: "" }], //默认回显头像,//默认回显头像
isSelectDirect: false,
model: {
//数据模型不可少
name: "",
@ -147,6 +148,7 @@ export default class adduserinfo extends React.Component {
{ type: "required", message: "请输入联系人邮箱" },
// { type: "regExp", message: "联系人邮箱格式不对",reg:"^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$"}
],
direct_reseller_id: [{ type: "required", message: "请选择映射分销商" }],
},
companyList: [],
directList: [],
@ -179,7 +181,7 @@ export default class adduserinfo extends React.Component {
});
}
componentDidMount(e) {
componentDidMount() {
let params = {
limit: this.state.limit,
page: this.state.page,
@ -387,6 +389,10 @@ export default class adduserinfo extends React.Component {
text: reselData.salesman_name,
},
subject: reselData.subject,
direct_reseller_id: {
key: formInfo.direct_reseller_id,
text: formInfo.direct_reseller_name,
},
};
let phoneTo = reselData.contact_phone;
@ -421,6 +427,7 @@ export default class adduserinfo extends React.Component {
email_nums: emailTo.length,
model: data,
disabled: true,
isSelectDirect: true,
defaultFileList: [img],
id: reselData.id,
headImg: reselData.head_img,
@ -1128,6 +1135,7 @@ export default class adduserinfo extends React.Component {
placeholder="请选择映射分销商"
value={this.state.model.direct_reseller_id}
onChangePage={this.onChangePageSelect.bind(this)}
disabled={this.state.isSelectDirect}
onChange={(e) => {
this.onDirectChange(e);
Bus.emit("change", "direct_reseller_id", e);