1) 修复分销商新增报错

This commit is contained in:
zhangds 2022-04-14 17:51:42 +08:00
parent 024f30e05d
commit e2916c9eb6
1 changed files with 14 additions and 10 deletions

View File

@ -371,17 +371,21 @@ export default class adduserinfo extends React.Component {
componentWillMount() { componentWillMount() {
this.getPersonnelFn(); this.getPersonnelFn();
this.getCompanyFn(); this.getCompanyFn();
let formInfo = JSON.parse(sessionStorage.getItem("dataInfo"));
let direct_reseller_ids =
formInfo.direct_reseller_id === 0
? ""
: {
key: formInfo.direct_reseller_id,
text: formInfo.direct_reseller_name,
};
let isSelectDirects = formInfo.direct_reseller_id === 0 ? false : true;
console.log("formInfo ==>", formInfo);
if (this.props.enumer == 1) { if (this.props.enumer == 1) {
let formInfo = JSON.parse(sessionStorage.getItem("dataInfo"));
let direct_reseller_ids = "";
let isSelectDirects = "";
if (formInfo) {
direct_reseller_ids =
formInfo.direct_reseller_id === 0
? ""
: {
key: formInfo.direct_reseller_id,
text: formInfo.direct_reseller_name,
};
isSelectDirects = formInfo.direct_reseller_id === 0 ? false : true;
}
let reselData = _.cloneDeep(formInfo); //表单的信息 let reselData = _.cloneDeep(formInfo); //表单的信息
let data = { let data = {
name: reselData.name, name: reselData.name,