From 2842610ebf8393e07dd0859b67492b5a961396aa Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Mon, 8 Aug 2022 18:30:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=85=91=E6=8D=A2=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,