fix:【兑换码管理】新增兑换码,直接点击新建商品或者新建立减金,前端应该提示“请选择计划”

This commit is contained in:
wangsongsole 2022-10-11 10:53:20 +08:00
parent b7dbe179f8
commit 50e64532e6
1 changed files with 8 additions and 3 deletions

View File

@ -826,12 +826,17 @@ export default class exchangeAdd extends React.Component {
this.setState({ addIsType: type }) /* 类型 */
let direct_reseller_ids = this.state.direct_reseller_id
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 })