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} 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,