diff --git a/src/pages/plan/add/step2.js b/src/pages/plan/add/step2.js index e4890b20..91aa9b7d 100644 --- a/src/pages/plan/add/step2.js +++ b/src/pages/plan/add/step2.js @@ -283,17 +283,16 @@ export default class acclist extends React.Component{ } onRestrict(e,rowdata){ + let text = e.target.value; + text = text.replace(/[^\d]/g,'') + let rowIndex =this.state.distdata.findIndex((o)=>{return o.title == rowdata.title}) - console.log(rowdata) - console.log("当前输入的值") - console.log( e.target.value) - console.log(rowIndex) - this.state.distdata[rowIndex].restrict = e.target.value; + + this.state.distdata[rowIndex].restrict =text; this.setState({distdata:this.state.distdata}) - console.log(this.state.distdata) } onDisabledCombinedDate = (val)=>{ @@ -536,7 +535,7 @@ export default class acclist extends React.Component{ if(com == "restrict") { - return {this.onRestrict(e,rowData)}} /> + return {this.onRestrict(e,rowData)}} /> } }} />