This commit is contained in:
姜棚 2021-12-10 11:48:41 +08:00
parent fb1a1e3ca9
commit 416b344c00
3 changed files with 21 additions and 9 deletions

View File

@ -31,7 +31,14 @@ const Column = [
prop:'order_number',
type: "normal",
width:'100px'
}, {
}, {
title: '兑换码-批次ID',
name: 'key_batch_id',
prop:'key_batch_id',
type: "normal",
width:'100px'
},
{
title: '商品名称',
prop:'product_name',
name: 'product_name',

View File

@ -166,6 +166,8 @@ export default class add extends React.Component{
addNewkey(){
let step = "step2-" + this.state.keys.length
this.state.keys.push(step)
this.setState({keys:this.state.keys})
console.log(this.state.keys)
}
onPhoneChange(e){
@ -181,12 +183,15 @@ export default class add extends React.Component{
closeStep(index){
_.remove(this.state.keys, (n)=>{
return n == this.state.keys[index];
});
// _.remove(this.state.keys, (n)=>{
// return n == this.state.keys[index];
// });
this.state.keys[index] = ""
this.setState({keys:this.state.keys})
console.log("当前的key")
console.log(this.state.keys)
}
@ -289,7 +294,7 @@ export default class add extends React.Component{
<div className="plan-title">key</div>
{
this.state.keys.map((item,index) => {
return(
return item ? (
<Card style={{ width:'100%',height:"auto","margin-bottom":"10px" }} title={this.state.step2_pagetitle} action={
index > 0 ?
( <span className="zent-link" target="_blank" onClick={(e)=>{ this.closeStep(index)} }>
@ -299,9 +304,9 @@ export default class add extends React.Component{
}>
<Step2 ref={"step2-"+ index} addNewkey ={()=>{this.addNewkey()}} />
<Step2 ref={item} addNewkey ={()=>{this.addNewkey()}} />
</Card>
)
) : null
})
}
</div>

View File

@ -252,7 +252,7 @@ export default class acclist extends React.Component{
}}
value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'520px'} alignment={'left'}/>
value={this.state.model.title} countShow={false} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'520px'} alignment={'left'}/>