diff --git a/.gitignore b/.gitignore index 4d29575d..fa9b5e2e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +src/pages/exchangecode/contenttaggedwith/add.js +src/pages/exchangecode/contenttaggedwith/add.less diff --git a/src/pages/exchangecode/add/add.js b/src/pages/exchangecode/add/add.js index 603a794d..1657deda 100644 --- a/src/pages/exchangecode/add/add.js +++ b/src/pages/exchangecode/add/add.js @@ -77,18 +77,17 @@ export default class acclist extends React.Component{ componentDidMount(e){ let batch_id=sessionStorage.getItem("keybatch_id") - + let copyOpearo=sessionStorage.getItem("copyOpearo") //编辑 - if(batch_id > 0) + if(batch_id > 0||copyOpearo==2) { - this.setState({isEdit:true}) + // this.setState({isEdit:true}) getKeyBatchDetail(batch_id).then((res)=>{ handelResponse(res,(req,msg)=>{ - - console.log("和编辑",req) - this.setState({pagetitle:"编辑key"}) + this.setState({pagetitle:"复制key"}) let model = { - batch_name:req.batch_name, + title:req.plan_title, + batch_name:'', style: req.style, quantity:req.quantity, allow_repetition:req.allow_repetition, @@ -102,8 +101,8 @@ export default class acclist extends React.Component{ this.setState({begintime:req.begin_time}) let list = _.map(req.code_batch,(item)=>{ - item.disabled = true; - item.checked = true; + // item.disabled = true; + // item.checked = true; return item }) console.log(list) @@ -895,7 +894,7 @@ export default class acclist extends React.Component{
- +
{this.state.model.title}
@@ -940,7 +939,7 @@ export default class acclist extends React.Component{ {this.onCheckChange(e)}} disabled={this.state.isEdit} > 兑换码 优惠券 - 立减金 + {/* 立减金 */} { diff --git a/src/pages/plan/add/step2.js b/src/pages/plan/add/step2.js index 0f5adc33..76194aca 100644 --- a/src/pages/plan/add/step2.js +++ b/src/pages/plan/add/step2.js @@ -767,7 +767,7 @@ export default class acclist extends React.Component{ {this.onCheckChange(e)}}> 兑换码 优惠券 - 立减金 + {/* 立减金 */}
{ diff --git a/src/pages/plan/key/edit.js b/src/pages/plan/key/edit.js index 3b4d2876..24bde0f2 100644 --- a/src/pages/plan/key/edit.js +++ b/src/pages/plan/key/edit.js @@ -832,7 +832,7 @@ export default class acclist extends React.Component{ - +
{this.state.model.plan_title}
@@ -867,7 +867,7 @@ export default class acclist extends React.Component{ {this.onCheckChange(e)}} disabled={this.state.isEdit} > 兑换码 优惠券 - 立减金 + {/* 立减金 */}
{ diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index cc584402..26195e31 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -46,7 +46,7 @@ const Column = [ name: 'plan', type: "slot", prop:'edit', - width:'90px' + width:'120px' }, { title: '状态', @@ -266,7 +266,7 @@ export default class acclist extends React.Component{ } ]}] sessionStorage.setItem("keybatch_id","") - + sessionStorage.setItem("copyOpearo",0) sessionStorage.setItem('breakchangenav',JSON.stringify(activerou)); } aboutFn(e,row){ @@ -283,7 +283,25 @@ export default class acclist extends React.Component{ } ]}] sessionStorage.setItem('breaknav',JSON.stringify(activerou)); - } + } + //复制 + onCopyRow(status,row){ + this.props.history.push('/home/exchangecode-add'); + sessionStorage.setItem('pathname2','/home/exchangecode-add') + let activerou=[{pagetitle:'复制',items:[ + { + "path": "/home/exchangecode-list", + "name": "key列表管理" + }, + { + "path": "/home/exchangecode-add", + "name": "复制key" + } + ]}] + sessionStorage.setItem("keybatch_id",row.id) + sessionStorage.setItem("copyOpearo",1) + sessionStorage.setItem('breakchangenav',JSON.stringify(activerou)); + } //page pageChange(e){ this.setState({page:e}); @@ -397,6 +415,7 @@ onEditRow(status,row){ sessionStorage.setItem("keybatch_id",row.id) } + //敲回车查询 iptsureFn(){ this.setState({page:1}) @@ -621,6 +640,7 @@ linkTo(row){ str = {this.onEditRow(e,rowData)}} >编辑 + {this.onCopyRow(e,rowData)}} >复制 { keysIsSend(rowData.id).then((res)=>{