This commit is contained in:
zhangds 2022-10-11 11:12:13 +08:00
commit 78e5365812
1 changed files with 8 additions and 6 deletions

View File

@ -827,16 +827,18 @@ export default class exchangeAdd extends React.Component {
addProduct(type) {
this.setState({ addIsType: type }); /* 类型 */
let direct_reseller_ids = this.state.direct_reseller_id;
if (!this.state.codeInfo.planSelect) {
Notify.error(`请选择归属计划`);
return;
if (!this.state.isState && !this.state.codeInfo.planSelect.key) {
return Notify.error(`请选择归属计划`);
}
if (!this.state.isState && !this.state.codeInfo.keyBatchSelect.key) {
return Notify.error(`请选择归属key`);
}
if (direct_reseller_ids <= 0) {
return Notify.error(`请添加映射分销商`);
}
if (!this.state.isState && !this.state.codeInfo.keyBatchSelect.key) {
return Notify.error(`请选择归属key批次`);
}
if (type === "addProduct") {
this.setState({ product_title: "新建商品", newGoodsBtnLoading: true });