diff --git a/src/pages/exchangecode/edit/edit.js b/src/pages/exchangecode/edit/edit.js index 56212ada..48ea9937 100644 --- a/src/pages/exchangecode/edit/edit.js +++ b/src/pages/exchangecode/edit/edit.js @@ -425,6 +425,11 @@ export default class exchangedit extends React.Component { } submit() { + if (this.state.direct_reseller_id <= 0) { + // 老数据不能进行新增商品操作 + Notify.error(`请编辑映射分销商`); + return; + } if (this.refs.code_info.validator() && this.refs.code_rule.validator()) { if (this.state.uploading) { Notify.error("还有图片上传中,不可提交"); diff --git a/src/pages/plan/add/add.js b/src/pages/plan/add/add.js index 3e7bc2fb..efadd636 100644 --- a/src/pages/plan/add/add.js +++ b/src/pages/plan/add/add.js @@ -169,6 +169,12 @@ export default class add extends React.Component { }); } if (this.state.curstep == 3) { + if (this.state.direct_reseller_id <= 0) { + // 老数据不能进行新增商品操作 + Notify.error(`请编辑映射分销商`); + return; + } + let data = this.refs.step3.submit(); if (data) { let obj = { diff --git a/src/pages/plan/add/edit.js b/src/pages/plan/add/edit.js index 176eec31..3fa446a4 100644 --- a/src/pages/plan/add/edit.js +++ b/src/pages/plan/add/edit.js @@ -235,6 +235,12 @@ export default class add extends React.Component { } } + if (this.state.direct_reseller_id <= 0) { + // 老数据不能进行新增商品操作 + Notify.error(`请编辑映射分销商`); + return; + } + let obj = { info: JSON.parse(sessionStorage.getItem("step1")), key: temp, @@ -411,7 +417,11 @@ export default class add extends React.Component { payment_direction: this.state.payment_direction[this.state.paytype - 1], }; - + if (this.state.direct_reseller_id <= 0) { + // 老数据不能进行新增商品操作 + Notify.error(`请编辑映射分销商`); + return; + } approvals(plan_id, data).then((res) => { handelResponse( res, diff --git a/src/pages/plan/key/edit.js b/src/pages/plan/key/edit.js index 1afe47bc..9c537502 100644 --- a/src/pages/plan/key/edit.js +++ b/src/pages/plan/key/edit.js @@ -230,6 +230,11 @@ export default class acclist extends React.Component { async submit() { let valide = false; + if (this.state.direct_reseller_id <= 0) { + // 老数据不能进行新增商品操作 + Notify.error(`请编辑映射分销商`); + return; + } if (this.refs.form1.validator()) { let data = {}; data.style = this.state.model.style;