diff --git a/src/pages/exchangecode/exchangecodeAdd/index.jsx b/src/pages/exchangecode/exchangecodeAdd/index.jsx index b988115a..c6d23243 100644 --- a/src/pages/exchangecode/exchangecodeAdd/index.jsx +++ b/src/pages/exchangecode/exchangecodeAdd/index.jsx @@ -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 });