From e17c715a2ba319a5ffbf3ec728bf4b13899e0549 Mon Sep 17 00:00:00 2001 From: zhangds Date: Mon, 4 Mar 2024 18:29:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=BB=84=E5=90=88?= =?UTF-8?q?=E5=95=86=E5=93=81=20=E5=8C=85=E7=A0=81=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/combiningList/list.js | 2 +- src/pages/plan/add/step2.js | 13 ++++++++++++- src/pages/plan/key/UseKeyAddEdit.jsx | 12 +++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/pages/exchangecode/combiningList/list.js b/src/pages/exchangecode/combiningList/list.js index 89959602..8b617ecf 100644 --- a/src/pages/exchangecode/combiningList/list.js +++ b/src/pages/exchangecode/combiningList/list.js @@ -154,7 +154,7 @@ export default class acclist extends React.Component { [4, 5, 8].includes(params.keyBatch?.status) && [3, 5, 4].includes(params.keyBatch.plan?.status)) - if (isCopy) { + if (isCopy && params.keyBatch.plan.settlement_type === 0) { element = ( this.addCodeFunction(1, params)}> 复制 diff --git a/src/pages/plan/add/step2.js b/src/pages/plan/add/step2.js index 1673b497..cd859be9 100644 --- a/src/pages/plan/add/step2.js +++ b/src/pages/plan/add/step2.js @@ -363,18 +363,21 @@ export default class acclist extends React.Component { planAddExchangeCoupon(type) { switch (type) { case 0: + sessionStorage.removeItem("has_combining") this.setState({ draw_title: "新建兑换码", exchangeType: 1, rowExchangeData: null }) setTimeout(() => { this.refs.addEditExchangeEl.clearExchangeForm() }, 300) break case 1: + sessionStorage.removeItem("has_combining") this.setState({ draw_title: "新建优惠券" }) setTimeout(() => { this.refs.addEditCouponEl.clearCouponForm() }, 300) break case 2: + sessionStorage.setItem("has_combining", 1) this.setState({ draw_title: "新建组合商品", exchangeType: 2, rowExchangeData: null }) setTimeout(() => { this.refs.addEditExchangeEl.clearExchangeForm() @@ -603,7 +606,7 @@ export default class acclist extends React.Component { let param = this.refs.addEditExchangeEl.getModel() // 第三步:包码只能选一个 - if (this.props.isSettlement >= 1) { + if (this.props.isSettlement >= 1 && !sessionStorage.getItem("has_combining")) { // 合并数组 let all_arr = [...param.product.legal, ...param.product.reduce, ...param.product.cash] if (all_arr.length > 1) { @@ -1345,6 +1348,14 @@ export default class acclist extends React.Component {