From 2842610ebf8393e07dd0859b67492b5a961396aa Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Mon, 8 Aug 2022 18:30:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=85=91=E6=8D=A2?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/copyCode/index.jsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/pages/exchangecode/copyCode/index.jsx b/src/pages/exchangecode/copyCode/index.jsx index 2efbcb49..5f5a8a79 100644 --- a/src/pages/exchangecode/copyCode/index.jsx +++ b/src/pages/exchangecode/copyCode/index.jsx @@ -210,14 +210,13 @@ export default class acclist extends React.Component { pr.quantity = item.quantity pr.describe = item.describe pr.product = item.product + pr.checked = true /* 不是复制得兑换码 无法编辑 */ - if (copy_code_id !== item.id) { - pr.checked = true - pr.disabled = true - pr.title = item.title + if (copy_code_id === item.id) { + pr.title = `${item.title}_${item.copy_count + 1}` } else { - pr.checked = true - pr.title = item.title + '_' + ++req.copy_count + pr.title = item.title + pr.disabled = true } return pr }) @@ -706,6 +705,7 @@ export default class acclist extends React.Component { dataCopy.map((item) => item.products.map(() => { + item.copy_code_batch_id = copy_code_batch_id item.product = { legal: item.products.filter((item2) => item2.type == 1), reduce: item.products @@ -742,7 +742,6 @@ export default class acclist extends React.Component { reseller_name: this.state.reseller.name, company_name: this.state.reseller.company_name, receive_email: this.state.reseller.contact_email[0], - copy_code_batch_id, payment_direction: this.state.payment_direction[this.state.paytype - 1] } @@ -777,7 +776,6 @@ export default class acclist extends React.Component { reseller_name: this.state.reseller?.name, company_name: this.state.reseller?.company_name, receive_email: this.state.reseller?.contact_email[0], - copy_code_batch_id, payment_direction: this.state.payment_direction[this.state.paytype - 1] } @@ -812,7 +810,6 @@ export default class acclist extends React.Component { reseller_name: this.state.reseller.name, company_name: this.state.reseller.company_name, receive_email: this.state.reseller.contact_email[0], - copy_code_batch_id, payment_direction: this.state.payment_direction[this.state.paytype - 1] } @@ -857,7 +854,6 @@ export default class acclist extends React.Component { mobile_excel: this.state.mobile_excel, mobile_repeat: this.state.mobile_repeat, code_batch: dataCopy, - copy_code_batch_id, reseller_id: this.state.reseller.id, reseller_name: this.state.reseller.name, company_name: this.state.reseller.company_name, From 6545da20dd57a10914f981b96fff5cb832e03c8c Mon Sep 17 00:00:00 2001 From: Apple <> Date: Tue, 9 Aug 2022 09:57:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=84=E7=90=86Ipt=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/input/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/input/main.js b/src/components/input/main.js index 408614d8..8b2cac8e 100644 --- a/src/components/input/main.js +++ b/src/components/input/main.js @@ -184,7 +184,7 @@ import classNames from 'classnames' {kind=="text"?:} :null} {disabled==false&&clearShow==true&&this.state.iptVal?:null} - {disabled==false&&countShow==true?{this.props.value.length}/{maxLength}:null} + {disabled==false&&countShow==true?{String(this.props.value).length}/{maxLength}:null} {unit?{unit}:null}